@datalayer/agent-runtimes 1.5.70 → 1.5.73

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.
Files changed (810) hide show
  1. package/dist-embed/chunks/{DeckComponent-DAnUabRV.js → DeckComponent-Cd1sbs9L.js} +1 -1
  2. package/dist-embed/chunks/{DocumentView-BKFitqiB.js → DocumentView-ssQ835Wa.js} +1 -1
  3. package/dist-embed/chunks/{EphemeralDocument-BRzYMd8Z.js → EphemeralDocument-DNziilOG.js} +1 -1
  4. package/dist-embed/chunks/{ExcalidrawComponent-VnKcai35.js → ExcalidrawComponent-CQ4BeoQt.js} +1 -1
  5. package/dist-embed/chunks/{ExcalidrawModal-DrntFjbe.js → ExcalidrawModal-8W-b1OmA.js} +1 -1
  6. package/dist-embed/chunks/{JupyterLexicalExtension-BBivQZvX.js → JupyterLexicalExtension-BLYM-DTn.js} +4 -4
  7. package/dist-embed/chunks/{YouTubePlugin-C209681s.js → YouTubePlugin-BgZG6fCA.js} +1 -1
  8. package/dist-embed/chunks/abnfDiagram-VCTEODGH-BdOOK2nG.js +1 -0
  9. package/dist-embed/chunks/abnfDiagram-VCTEODGH-CHerLzZ0.js +1 -0
  10. package/dist-embed/chunks/{ar-SA-G6X2FPQ2-Dypu3IcK.js → ar-SA-G6X2FPQ2-Bcy9b6jn.js} +1 -1
  11. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-C22xzf-o.js → architectureDiagram-5GKGNRK7-C8jjE2mY.js} +2 -2
  12. package/dist-embed/chunks/architectureDiagram-5GKGNRK7-GukKr_g1.js +36 -0
  13. package/dist-embed/chunks/{az-AZ-76LH7QW2-D8CzfKb1.js → az-AZ-76LH7QW2-Bzy5rt95.js} +1 -1
  14. package/dist-embed/chunks/{bg-BG-XCXSNQG7-_NVFEM1_.js → bg-BG-XCXSNQG7-C3mQkAoD.js} +1 -1
  15. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-CHicgYkf.js → blockDiagram-I7D4REHJ-DH6ta7S_.js} +2 -2
  16. package/dist-embed/chunks/blockDiagram-I7D4REHJ-edfypROz.js +129 -0
  17. package/dist-embed/chunks/{bn-BD-2XOGV67Q-DMgdNi-k.js → bn-BD-2XOGV67Q-DHwDUFeg.js} +1 -1
  18. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-auJZQjpw.js → c4Diagram-7LVT6UL2-B6NHHf7w.js} +2 -2
  19. package/dist-embed/chunks/c4Diagram-7LVT6UL2-BD3Ld97M.js +38 -0
  20. package/dist-embed/chunks/{ca-ES-6MX7JW3Y-DpOQhzr4.js → ca-ES-6MX7JW3Y-CWMZCfjI.js} +1 -1
  21. package/dist-embed/chunks/{chunk-2Q5K7J3B-DpFWUcsT.js → chunk-2Q5K7J3B-9xCosPaH.js} +1 -1
  22. package/dist-embed/chunks/chunk-2Q5K7J3B-ZWnuQ6M2.js +1 -0
  23. package/dist-embed/chunks/{chunk-5VM5RSS4-CaowF8Al.js → chunk-5VM5RSS4-7q2jPq-I.js} +1 -1
  24. package/dist-embed/chunks/chunk-5VM5RSS4-C2EZUNrH.js +15 -0
  25. package/dist-embed/chunks/{chunk-F27PBJKO-D7PuEggc.js → chunk-F27PBJKO-hasZYXJc.js} +1 -1
  26. package/dist-embed/chunks/chunk-F27PBJKO-iAw_9Xtd.js +1 -0
  27. package/dist-embed/chunks/{chunk-IMKFNOWR-jZNuNkCa.js → chunk-IMKFNOWR-CR2LIHPi.js} +1 -1
  28. package/dist-embed/chunks/chunk-IMKFNOWR-CU661Hle.js +231 -0
  29. package/dist-embed/chunks/{chunk-JWPE2WC7-BIShIUcJ.js → chunk-JWPE2WC7-B40RAhYQ.js} +1 -1
  30. package/dist-embed/chunks/chunk-JWPE2WC7-D4pNFsZF.js +1 -0
  31. package/dist-embed/chunks/{chunk-POPQ4Y6H-DG5Q2OKT.js → chunk-POPQ4Y6H-CNc-_UkX.js} +1 -1
  32. package/dist-embed/chunks/chunk-POPQ4Y6H-PC7NS4ab.js +1 -0
  33. package/dist-embed/chunks/{chunk-SVP7TREG-ERRaAh-x.js → chunk-SVP7TREG-B-LR0OEY.js} +1 -1
  34. package/dist-embed/chunks/chunk-SVP7TREG-BgVpHjUA.js +88 -0
  35. package/dist-embed/chunks/{chunk-TICWLB2K-B91fA6Jd.js → chunk-TICWLB2K-BKUWUi4x.js} +1 -1
  36. package/dist-embed/chunks/chunk-TICWLB2K-D0mlrZUj.js +206 -0
  37. package/dist-embed/chunks/{chunk-XXDRQBXY-BAy0lBJk.js → chunk-XXDRQBXY-CFD4Agg8.js} +1 -1
  38. package/dist-embed/chunks/chunk-XXDRQBXY-DF8wFPCi.js +1 -0
  39. package/dist-embed/chunks/classDiagram-ZZMXUADV-B2RPE1Bl.js +1 -0
  40. package/dist-embed/chunks/classDiagram-ZZMXUADV-BSdRgwsr.js +1 -0
  41. package/dist-embed/chunks/classDiagram-v2-VYDZK3BY-B2RPE1Bl.js +1 -0
  42. package/dist-embed/chunks/classDiagram-v2-VYDZK3BY-BSdRgwsr.js +1 -0
  43. package/dist-embed/chunks/cose-bilkent-JH36ORCC-CGF9N16A.js +1 -0
  44. package/dist-embed/chunks/cose-bilkent-JH36ORCC-D976z1sp.js +1 -0
  45. package/dist-embed/chunks/{cs-CZ-2BRQDIVT-Fr-SpqHD.js → cs-CZ-2BRQDIVT-B_pe2qj9.js} +1 -1
  46. package/dist-embed/chunks/cynefin-OW5HDTMX-BBLugbYz.js +166 -0
  47. package/dist-embed/chunks/cynefinDiagram-5FMLGOSQ-Cil4cm66.js +62 -0
  48. package/dist-embed/chunks/cynefinDiagram-5FMLGOSQ-D7ioXav_.js +62 -0
  49. package/dist-embed/chunks/{da-DK-5WZEPLOC-DO_sAXvt.js → da-DK-5WZEPLOC-CGWCNcJj.js} +1 -1
  50. package/dist-embed/chunks/{dagre-GXQ25YYZ-BgrGEY09.js → dagre-GXQ25YYZ-Cp78_L9l.js} +2 -2
  51. package/dist-embed/chunks/dagre-GXQ25YYZ-DauBFK-x.js +4 -0
  52. package/dist-embed/chunks/{de-DE-XR44H4JA-4JnXB_iM.js → de-DE-XR44H4JA-DTdq2h_G.js} +1 -1
  53. package/dist-embed/chunks/{diagram-S7CK7UJ4-hQvZziAN.js → diagram-S7CK7UJ4-LsSU5PzE.js} +2 -2
  54. package/dist-embed/chunks/diagram-S7CK7UJ4-cLOCifii.js +30 -0
  55. package/dist-embed/chunks/diagram-UQ7AKVKN-BK4qe_eB.js +41 -0
  56. package/dist-embed/chunks/diagram-UQ7AKVKN-CoIPlGw-.js +41 -0
  57. package/dist-embed/chunks/diagram-VSXAHHWV-CIhWkrRX.js +3 -0
  58. package/dist-embed/chunks/{diagram-VSXAHHWV-WVuzjdxU.js → diagram-VSXAHHWV-DWWQ-Ga9.js} +2 -2
  59. package/dist-embed/chunks/diagram-VX7I27RA-43SwkivD.js +24 -0
  60. package/dist-embed/chunks/diagram-VX7I27RA-CQM8aGRO.js +24 -0
  61. package/dist-embed/chunks/diagram-Z3DM3KII-Da75Rc5Q.js +24 -0
  62. package/dist-embed/chunks/diagram-Z3DM3KII-DrILxydN.js +24 -0
  63. package/dist-embed/chunks/ebnfDiagram-PWID7BFC-CwBVaHP2.js +1 -0
  64. package/dist-embed/chunks/ebnfDiagram-PWID7BFC-Klx1dPe6.js +1 -0
  65. package/dist-embed/chunks/{el-GR-BZB4AONW-MydAlwHl.js → el-GR-BZB4AONW-qdInZt55.js} +1 -1
  66. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-zwXEFcAp.js → erDiagram-RLTQ6QDP-6YXMuidI.js} +2 -2
  67. package/dist-embed/chunks/erDiagram-RLTQ6QDP-DmlOR1VA.js +99 -0
  68. package/dist-embed/chunks/{es-ES-U4NZUMDT-rQmnr_uu.js → es-ES-U4NZUMDT-CbVgghD5.js} +1 -1
  69. package/dist-embed/chunks/{eu-ES-A7QVB2H4-j5Hf8ngk.js → eu-ES-A7QVB2H4-Cfyi4-QV.js} +1 -1
  70. package/dist-embed/chunks/{fa-IR-HGAKTJCU-DMJRRSBp.js → fa-IR-HGAKTJCU-Bpz9Yk2c.js} +1 -1
  71. package/dist-embed/chunks/{fi-FI-Z5N7JZ37-BFLC0BFd.js → fi-FI-Z5N7JZ37-CnNP_ASI.js} +1 -1
  72. package/dist-embed/chunks/{flowDiagram-HODETNUW-BrbR1EkW.js → flowDiagram-HODETNUW-DpJLPDJS.js} +1 -1
  73. package/dist-embed/chunks/flowDiagram-HODETNUW-_PPo6xx4.js +168 -0
  74. package/dist-embed/chunks/{fr-FR-RHASNOE6-CxjhSJC1.js → fr-FR-RHASNOE6-CXIU81zC.js} +1 -1
  75. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-DfJDZVnm.js → ganttDiagram-EL5Y4UJY-B3ddBLm-.js} +2 -2
  76. package/dist-embed/chunks/ganttDiagram-EL5Y4UJY-DnJUq63S.js +292 -0
  77. package/dist-embed/chunks/gitGraphDiagram-WWUBYQGX-CKVR9Ajq.js +106 -0
  78. package/dist-embed/chunks/gitGraphDiagram-WWUBYQGX-u7eHxrMk.js +106 -0
  79. package/dist-embed/chunks/{gl-ES-HMX3MZ6V-BuuMpTaX.js → gl-ES-HMX3MZ6V-Do1RdVfG.js} +1 -1
  80. package/dist-embed/chunks/{he-IL-6SHJWFNN-Cv3Nrcgu.js → he-IL-6SHJWFNN-NcTscmv6.js} +1 -1
  81. package/dist-embed/chunks/{hi-IN-IWLTKZ5I-Sddst60F.js → hi-IN-IWLTKZ5I-CyNpoQ12.js} +1 -1
  82. package/dist-embed/chunks/{hu-HU-A5ZG7DT2-ehrXVpD0.js → hu-HU-A5ZG7DT2-Bzge2Fdz.js} +1 -1
  83. package/dist-embed/chunks/{id-ID-SAP4L64H-Gfb1UYxZ.js → id-ID-SAP4L64H-DaNcoDhl.js} +1 -1
  84. package/dist-embed/chunks/{index-BaBNw6X5.js → index-BQdtKMKk.js} +56 -61
  85. package/dist-embed/chunks/index-CJys1M3A.js +6 -0
  86. package/dist-embed/chunks/{index-hxIHgkzg.js → index-CLdL3h_Z.js} +1 -1
  87. package/dist-embed/chunks/{index-DmpLE1d4.js → index-Cx_cIRez.js} +1 -1
  88. package/dist-embed/chunks/index-lOJZWhTu.js +337 -0
  89. package/dist-embed/chunks/infoDiagram-27XIBGKW-C3YByzAX.js +2 -0
  90. package/dist-embed/chunks/infoDiagram-27XIBGKW-CrHEoNfn.js +2 -0
  91. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-DrEzfSK9.js → ishikawaDiagram-5VMMS53U-B87JmQRn.js} +6 -6
  92. package/dist-embed/chunks/ishikawaDiagram-5VMMS53U-DkW3YLz9.js +70 -0
  93. package/dist-embed/chunks/{it-IT-JPQ66NNP-BehLHkar.js → it-IT-JPQ66NNP-6fWP-4Pk.js} +1 -1
  94. package/dist-embed/chunks/{ja-JP-DBVTYXUO-BZvqIigI.js → ja-JP-DBVTYXUO-TOPcUfq8.js} +1 -1
  95. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-DpWKIFIN.js → journeyDiagram-3NMN7TZE-BcfZXfHF.js} +2 -2
  96. package/dist-embed/chunks/journeyDiagram-3NMN7TZE-BjO5pIr-.js +139 -0
  97. package/dist-embed/chunks/{kaa-6HZHGXH3-DgAIF6rN.js → kaa-6HZHGXH3-WPmptgZr.js} +1 -1
  98. package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-DW4thPSJ.js → kab-KAB-ZGHBKWFO-CMOAXrZA.js} +1 -1
  99. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-DxbTprYr.js → kanban-definition-UXKFOSKX-D9d45rsU.js} +2 -2
  100. package/dist-embed/chunks/kanban-definition-UXKFOSKX-DKCJ8_n0.js +89 -0
  101. package/dist-embed/chunks/{kk-KZ-P5N5QNE5-CCy_nSJ7.js → kk-KZ-P5N5QNE5-B6ezOPzr.js} +1 -1
  102. package/dist-embed/chunks/{km-KH-HSX4SM5Z-kpXyoxjS.js → km-KH-HSX4SM5Z-C84QUPbc.js} +1 -1
  103. package/dist-embed/chunks/{ko-KR-MTYHY66A-CFm6WtQG.js → ko-KR-MTYHY66A-cuBEuTL_.js} +1 -1
  104. package/dist-embed/chunks/{ku-TR-6OUDTVRD-CKF85mOv.js → ku-TR-6OUDTVRD-B9KdlCAR.js} +1 -1
  105. package/dist-embed/chunks/{layout-DYytgC9r.js → layout-C6Twj1mW.js} +1 -1
  106. package/dist-embed/chunks/layout-Do3wJC1j.js +1 -0
  107. package/dist-embed/chunks/{lt-LT-XHIRWOB4-CO9Bo5qJ.js → lt-LT-XHIRWOB4-B39JwBGi.js} +1 -1
  108. package/dist-embed/chunks/{lv-LV-5QDEKY6T-CvZszc5p.js → lv-LV-5QDEKY6T-8WReOaa7.js} +1 -1
  109. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-_1SBIPav.js → mindmap-definition-YA3MSWOX-5wZuXgB8.js} +2 -2
  110. package/dist-embed/chunks/mindmap-definition-YA3MSWOX-BURkGTKI.js +96 -0
  111. package/dist-embed/chunks/{mr-IN-CRQNXWMA-Cio_dB9M.js → mr-IN-CRQNXWMA-DUaS8VWx.js} +1 -1
  112. package/dist-embed/chunks/{my-MM-5M5IBNSE-Z0RQ5Vbz.js → my-MM-5M5IBNSE-BdJYwQXg.js} +1 -1
  113. package/dist-embed/chunks/{nb-NO-T6EIAALU-BEQ0YP9J.js → nb-NO-T6EIAALU-C_p5yu1z.js} +1 -1
  114. package/dist-embed/chunks/{nl-NL-IS3SIHDZ-YtkJnS_J.js → nl-NL-IS3SIHDZ-DM5qgcCp.js} +1 -1
  115. package/dist-embed/chunks/{nn-NO-6E72VCQL-C1j2s3qO.js → nn-NO-6E72VCQL-BuX1DqI5.js} +1 -1
  116. package/dist-embed/chunks/{oc-FR-POXYY2M6-CinnjccW.js → oc-FR-POXYY2M6-BAWljcaf.js} +1 -1
  117. package/dist-embed/chunks/{pa-IN-N4M65BXN-c_6OtC6L.js → pa-IN-N4M65BXN-2iyq8qxX.js} +1 -1
  118. package/dist-embed/chunks/pegDiagram-XKGWAZYB-BjrOX_Ki.js +1 -0
  119. package/dist-embed/chunks/pegDiagram-XKGWAZYB-CyuSADYr.js +1 -0
  120. package/dist-embed/chunks/{percentages-BXMCSKIN-VqMxh8LK.js → percentages-BXMCSKIN-C9b5dzpq.js} +5 -5
  121. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-EvMxJb2S.js → pieDiagram-E7YTZNPT-GvxNnk0x.js} +2 -2
  122. package/dist-embed/chunks/pieDiagram-E7YTZNPT-ni9UMEzV.js +39 -0
  123. package/dist-embed/chunks/{pl-PL-T2D74RX3-Cn_9xZgM.js → pl-PL-T2D74RX3-C6nLJHhB.js} +1 -1
  124. package/dist-embed/chunks/{pt-BR-5N22H2LF-Da6r-Pp1.js → pt-BR-5N22H2LF-B1adz-DU.js} +1 -1
  125. package/dist-embed/chunks/{pt-PT-UZXXM6DQ-D6lhcuX9.js → pt-PT-UZXXM6DQ-BCZpI4LV.js} +1 -1
  126. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-rFaTvNlk.js → quadrantDiagram-AXDQQJYC-CufBEqrC.js} +4 -4
  127. package/dist-embed/chunks/quadrantDiagram-AXDQQJYC-Yg2WGHWh.js +7 -0
  128. package/dist-embed/chunks/railroadDiagram-O6MQD6OU-6tStysfX.js +1 -0
  129. package/dist-embed/chunks/railroadDiagram-O6MQD6OU-Df7m1mT4.js +1 -0
  130. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-DHLQ_9Lw.js → requirementDiagram-BXWQKSXE-0AqPqv7a.js} +2 -2
  131. package/dist-embed/chunks/requirementDiagram-BXWQKSXE-CmXBYo40.js +84 -0
  132. package/dist-embed/chunks/{ro-RO-JPDTUUEW-BFss9e8X.js → ro-RO-JPDTUUEW-BPM7y_F2.js} +1 -1
  133. package/dist-embed/chunks/{ru-RU-B4JR7IUQ-DIruW2gS.js → ru-RU-B4JR7IUQ-UViKo8dy.js} +1 -1
  134. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-Nk71fRsK.js → sankeyDiagram-P5KCCOFB-CqcWOAyy.js} +2 -2
  135. package/dist-embed/chunks/sankeyDiagram-P5KCCOFB-rQsp_j9w.js +40 -0
  136. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-Dm3QM01Z.js → sequenceDiagram-WJ2MYXX4-Br4F1sd7.js} +2 -2
  137. package/dist-embed/chunks/sequenceDiagram-WJ2MYXX4-GMFparx1.js +162 -0
  138. package/dist-embed/chunks/{si-LK-N5RQ5JYF-Dom-aTTE.js → si-LK-N5RQ5JYF-D7TIYEDr.js} +1 -1
  139. package/dist-embed/chunks/sizeCapture-INFHLROL-8qFOiWrK.js +1 -0
  140. package/dist-embed/chunks/sizeCapture-INFHLROL-C_M5Nl06.js +1 -0
  141. package/dist-embed/chunks/{sk-SK-C5VTKIMK-CLRU9TNq.js → sk-SK-C5VTKIMK-CQedcNlJ.js} +1 -1
  142. package/dist-embed/chunks/{sl-SI-NN7IZMDC-BKLCNVXA.js → sl-SI-NN7IZMDC-BX1W51zJ.js} +1 -1
  143. package/dist-embed/chunks/stateDiagram-D77RDMKH-CWrs6KzY.js +1 -0
  144. package/dist-embed/chunks/stateDiagram-D77RDMKH-XK76naDS.js +1 -0
  145. package/dist-embed/chunks/stateDiagram-v2-MP3YSRHH-D3ZN_IoS.js +1 -0
  146. package/dist-embed/chunks/stateDiagram-v2-MP3YSRHH-lpluVNfO.js +1 -0
  147. package/dist-embed/chunks/{subset-shared.chunk-zIH7OLsP.js → subset-shared.chunk-PVguOYyR.js} +1 -1
  148. package/dist-embed/chunks/{subset-worker.chunk-b9j7PKPe.js → subset-worker.chunk-iWGyr_E5.js} +1 -1
  149. package/dist-embed/chunks/{sv-SE-XGPEYMSR-D0UV0HV7.js → sv-SE-XGPEYMSR-DI7YcqUR.js} +1 -1
  150. package/dist-embed/chunks/swimlanes-42K2YHIH-B9qJ99nD.js +1 -0
  151. package/dist-embed/chunks/swimlanes-42K2YHIH-Ca0PhRmf.js +1 -0
  152. package/dist-embed/chunks/swimlanesDiagram-VR7AAH4N-BEQKTD21.js +8 -0
  153. package/dist-embed/chunks/swimlanesDiagram-VR7AAH4N-D-2e4UFJ.js +8 -0
  154. package/dist-embed/chunks/{ta-IN-2NMHFXQM-C-EJ3jDE.js → ta-IN-2NMHFXQM-OZH5xroe.js} +1 -1
  155. package/dist-embed/chunks/{th-TH-HPSO5L25-CfQh62Qa.js → th-TH-HPSO5L25-gAuWhBpT.js} +1 -1
  156. package/dist-embed/chunks/{timeline-definition-24CTP7MA-CKtubk73.js → timeline-definition-24CTP7MA-B8lxEouP.js} +2 -2
  157. package/dist-embed/chunks/timeline-definition-24CTP7MA-CtZZro9U.js +120 -0
  158. package/dist-embed/chunks/{tr-TR-DEFEU3FU-Lz7Ka2Zr.js → tr-TR-DEFEU3FU-DQ0SDuS6.js} +1 -1
  159. package/dist-embed/chunks/{uk-UA-QMV73CPH-DU0hsGUJ.js → uk-UA-QMV73CPH-7J4e2jng.js} +1 -1
  160. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-Bq0xMhnH.js → vennDiagram-4TSXK5OY-Ca7szyFH.js} +2 -2
  161. package/dist-embed/chunks/vennDiagram-4TSXK5OY-zaNGkt8b.js +28 -0
  162. package/dist-embed/chunks/{vi-VN-M7AON7JQ-CDvS0SiL.js → vi-VN-M7AON7JQ-dNpZ5DZ5.js} +1 -1
  163. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-DL5LgQWr.js → wardleyDiagram-VM6X3IG4-D_Q6gtp2.js} +2 -2
  164. package/dist-embed/chunks/wardleyDiagram-VM6X3IG4-Dh0UOrRp.js +78 -0
  165. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-BXkM4beH.js → xychartDiagram-S5SC5T6Z-4OhI4XQl.js} +2 -2
  166. package/dist-embed/chunks/xychartDiagram-S5SC5T6Z-D_TaZM0k.js +7 -0
  167. package/dist-embed/chunks/{zh-CN-LNUGB5OW-CWE-bF0d.js → zh-CN-LNUGB5OW-CZSp2g8b.js} +1 -1
  168. package/dist-embed/chunks/{zh-HK-E62DVLB3-pEfL2bds.js → zh-HK-E62DVLB3-DUqVOyB_.js} +1 -1
  169. package/dist-embed/chunks/{zh-TW-RAJ6MFWO-Cp6UFUuD.js → zh-TW-RAJ6MFWO-U-TalxxN.js} +1 -1
  170. package/dist-embed/datalayer-app-main.js +3 -3
  171. package/lib/Agent.js +2 -2
  172. package/lib/AgentDocument.js +6 -6
  173. package/lib/AgentNode.js +4 -4
  174. package/lib/AgentNotebook.js +3 -3
  175. package/lib/App.js +2 -2
  176. package/lib/AppExamples2.js +3 -4
  177. package/lib/agent-document-main.js +1 -1
  178. package/lib/agent-main.js +1 -1
  179. package/lib/agent-node-main.js +1 -1
  180. package/lib/agent-notebook-main.js +1 -1
  181. package/lib/agents/AgentDetails.js +5 -5
  182. package/lib/agents/AgentRuntimeChat.js +3 -3
  183. package/lib/api/index.js +5 -5
  184. package/lib/api/scheduler/index.js +1 -1
  185. package/lib/apps/apps/AppBrowserSandbox.js +3 -3
  186. package/lib/apps/apps/AppComposer.js +6 -6
  187. package/lib/apps/apps/AppFeedback.js +3 -3
  188. package/lib/apps/apps/AppKept.js +3 -3
  189. package/lib/apps/apps/AppRenderer.js +26 -26
  190. package/lib/apps/apps/AppRuntimePlugins.js +3 -3
  191. package/lib/apps/apps/agent.js +2 -2
  192. package/lib/apps/apps/appspec.js +5 -5
  193. package/lib/apps/apps/browserSandbox.js +1 -1
  194. package/lib/apps/apps/checks.js +24 -24
  195. package/lib/apps/apps/customComponents.js +1 -1
  196. package/lib/apps/apps/index.js +18 -18
  197. package/lib/apps/apps/language.js +1 -1
  198. package/lib/apps/apps/records.js +3 -3
  199. package/lib/apps/apps/rules.js +1 -1
  200. package/lib/apps/apps/sceneChecks.js +6 -6
  201. package/lib/apps/apps/sceneShape.js +2 -2
  202. package/lib/apps/apps/sceneYaml.js +2 -2
  203. package/lib/apps/apps/yaml.js +1 -1
  204. package/lib/apps/core/index.js +7 -7
  205. package/lib/apps/embed/AppEmbed.d.ts +1 -1
  206. package/lib/apps/embed/AppEmbed.js +11 -11
  207. package/lib/apps/embed/LoopEmbed.js +4 -4
  208. package/lib/apps/embed/datalayer-app.js +1 -1
  209. package/lib/apps/embed/element.js +7 -7
  210. package/lib/apps/embed/embedConfig.js +2 -2
  211. package/lib/apps/embed/embedSession.js +2 -2
  212. package/lib/apps/embed/hostBridge.js +3 -3
  213. package/lib/apps/embed/visitorApp.js +3 -3
  214. package/lib/apps/extensions.js +4 -4
  215. package/lib/apps/index.js +70 -70
  216. package/lib/apps/plugins/a2a-sidebar/A2ASidebar.js +6 -6
  217. package/lib/apps/plugins/a2a-sidebar/index.js +3 -3
  218. package/lib/apps/plugins/a2ui/A2uiView.js +2 -2
  219. package/lib/apps/plugins/a2ui/index.js +3 -3
  220. package/lib/apps/plugins/a2ui-scene/index.js +1 -1
  221. package/lib/apps/plugins/a2ui-surface/AnswerShows.js +3 -3
  222. package/lib/apps/plugins/a2ui-surface/InlineSurface.js +1 -1
  223. package/lib/apps/plugins/a2ui-surface/SurfaceToolResult.js +4 -4
  224. package/lib/apps/plugins/a2ui-surface/index.js +7 -7
  225. package/lib/apps/plugins/a2ui-surface/ownComponents.js +2 -2
  226. package/lib/apps/plugins/agent-a2a/index.js +1 -1
  227. package/lib/apps/plugins/agent-a2ui/index.js +1 -1
  228. package/lib/apps/plugins/agent-a2ui-jupyter-output/index.js +1 -1
  229. package/lib/apps/plugins/agent-capacity/index.js +1 -1
  230. package/lib/apps/plugins/agent-checkpoints/index.js +1 -1
  231. package/lib/apps/plugins/agent-code-sandbox/index.js +1 -1
  232. package/lib/apps/plugins/agent-code-sandboxes/index.js +1 -1
  233. package/lib/apps/plugins/agent-codemode/index.js +1 -1
  234. package/lib/apps/plugins/agent-compaction/index.js +1 -1
  235. package/lib/apps/plugins/agent-evals/index.js +1 -1
  236. package/lib/apps/plugins/agent-guardrails/index.js +1 -1
  237. package/lib/apps/plugins/agent-hooks/index.js +1 -1
  238. package/lib/apps/plugins/agent-inference/index.js +1 -1
  239. package/lib/apps/plugins/agent-mcp/index.js +1 -1
  240. package/lib/apps/plugins/agent-memory/index.js +1 -1
  241. package/lib/apps/plugins/agent-monitoring/index.js +1 -1
  242. package/lib/apps/plugins/agent-notifications/index.js +1 -1
  243. package/lib/apps/plugins/agent-otel/index.js +1 -1
  244. package/lib/apps/plugins/agent-outputs/index.js +1 -1
  245. package/lib/apps/plugins/agent-parameters/index.js +1 -1
  246. package/lib/apps/plugins/agent-skills/index.js +1 -1
  247. package/lib/apps/plugins/agent-subagents/index.js +1 -1
  248. package/lib/apps/plugins/agent-tool-approvals/index.js +1 -1
  249. package/lib/apps/plugins/agent-triggers/index.js +1 -1
  250. package/lib/apps/plugins/agents/AgentSummaryPanel.js +5 -5
  251. package/lib/apps/plugins/agents/AnonymousKeyBadge.js +2 -2
  252. package/lib/apps/plugins/agents/DatalayerAgentBridge.js +7 -7
  253. package/lib/apps/plugins/agents/DatalayerAgentMount.js +1 -1
  254. package/lib/apps/plugins/agents/SandboxSelector.js +3 -3
  255. package/lib/apps/plugins/agents/SandboxStatusBridge.js +2 -2
  256. package/lib/apps/plugins/agents/SandboxView.js +1 -1
  257. package/lib/apps/plugins/agents/TeamMemberPicker.js +2 -2
  258. package/lib/apps/plugins/agents/index.js +8 -8
  259. package/lib/apps/plugins/agents/plugin.js +10 -10
  260. package/lib/apps/plugins/agents/specSubagents.js +1 -1
  261. package/lib/apps/plugins/agents/switchable.js +3 -3
  262. package/lib/apps/plugins/agents/team.js +2 -2
  263. package/lib/apps/plugins/agents/useSandboxService.js +1 -1
  264. package/lib/apps/plugins/agents/useTeamSelection.js +1 -1
  265. package/lib/apps/plugins/agentspecs/AgentspecPicker.js +1 -1
  266. package/lib/apps/plugins/agentspecs/index.js +2 -2
  267. package/lib/apps/plugins/app-activity/AppActivity.js +2 -2
  268. package/lib/apps/plugins/app-activity/index.js +3 -3
  269. package/lib/apps/plugins/app-components/index.js +4 -4
  270. package/lib/apps/plugins/app-computer/AppComputer.js +3 -3
  271. package/lib/apps/plugins/app-computer/index.js +4 -4
  272. package/lib/apps/plugins/app-elements/AppElements.js +2 -2
  273. package/lib/apps/plugins/app-elements/QuestionView.js +1 -1
  274. package/lib/apps/plugins/app-elements/index.js +6 -6
  275. package/lib/apps/plugins/app-page/AppPage.js +7 -7
  276. package/lib/apps/plugins/app-page/appPageModel.js +1 -1
  277. package/lib/apps/plugins/app-page/index.js +6 -6
  278. package/lib/apps/plugins/app-rules/AppRulesCard.js +5 -5
  279. package/lib/apps/plugins/app-rules/index.js +4 -4
  280. package/lib/apps/plugins/assistant/index.js +12 -12
  281. package/lib/apps/plugins/assistant-characters/index.d.ts +1 -1
  282. package/lib/apps/plugins/assistant-characters/index.js +3 -3
  283. package/lib/apps/plugins/canvas-blocks/index.js +2 -2
  284. package/lib/apps/plugins/canvas-parts/index.js +10 -10
  285. package/lib/apps/plugins/chat/ChatView.js +43 -43
  286. package/lib/apps/plugins/chat/SessionActionsMenu.js +2 -2
  287. package/lib/apps/plugins/chat/index.js +4 -4
  288. package/lib/apps/plugins/chat/sessionActions.js +2 -2
  289. package/lib/apps/plugins/chat-extras/index.js +1 -1
  290. package/lib/apps/plugins/chat-header/HeaderView.js +1 -1
  291. package/lib/apps/plugins/chat-header/index.js +2 -2
  292. package/lib/apps/plugins/chat-view/index.js +2 -2
  293. package/lib/apps/plugins/checkpoints-sidebar/CheckpointsSidebar.js +2 -2
  294. package/lib/apps/plugins/checkpoints-sidebar/index.js +3 -3
  295. package/lib/apps/plugins/commands/index.js +1 -1
  296. package/lib/apps/plugins/decks/DecksMenu.js +2 -2
  297. package/lib/apps/plugins/decks/index.js +8 -8
  298. package/lib/apps/plugins/document/DocumentView.js +5 -5
  299. package/lib/apps/plugins/document/index.js +4 -4
  300. package/lib/apps/plugins/document/openingDocument.js +1 -1
  301. package/lib/apps/plugins/document-toolbar/SandboxStatusItem.js +2 -2
  302. package/lib/apps/plugins/document-toolbar/index.js +3 -3
  303. package/lib/apps/plugins/document-toolbar/plugin.js +3 -3
  304. package/lib/apps/plugins/document-view/index.js +1 -1
  305. package/lib/apps/plugins/graph/GraphToggle.js +1 -1
  306. package/lib/apps/plugins/graph/index.js +5 -5
  307. package/lib/apps/plugins/input-prompt/ComposerView.js +2 -2
  308. package/lib/apps/plugins/input-prompt/index.js +2 -2
  309. package/lib/apps/plugins/models/index.js +1 -1
  310. package/lib/apps/plugins/notebook/NotebookView.js +5 -5
  311. package/lib/apps/plugins/notebook/index.js +4 -4
  312. package/lib/apps/plugins/notebook-toolbar/index.js +3 -3
  313. package/lib/apps/plugins/notebook-toolbar/plugin.js +3 -3
  314. package/lib/apps/plugins/notebook-view/index.js +1 -1
  315. package/lib/apps/plugins/page-layout/SplitLayout.js +1 -1
  316. package/lib/apps/plugins/page-layout/TurnPanel.js +5 -5
  317. package/lib/apps/plugins/page-layout/index.js +5 -5
  318. package/lib/apps/plugins/pap-example/index.js +1 -1
  319. package/lib/apps/plugins/pap-sign-in/PapSignInCard.js +1 -1
  320. package/lib/apps/plugins/pap-sign-in/index.js +5 -5
  321. package/lib/apps/plugins/pap-sign-in/signIn.js +1 -1
  322. package/lib/apps/plugins/plugins-panel/index.js +1 -1
  323. package/lib/apps/plugins/prompt/index.js +3 -3
  324. package/lib/apps/plugins/shell/editorChoice.js +1 -1
  325. package/lib/apps/plugins/shell/index.js +4 -4
  326. package/lib/apps/plugins/shell/useEditorPreviews.js +1 -1
  327. package/lib/apps/plugins/shield-displays/DiffCard.js +1 -1
  328. package/lib/apps/plugins/shield-displays/TerminalCard.js +1 -1
  329. package/lib/apps/plugins/shield-displays/index.js +5 -5
  330. package/lib/apps/plugins/subagent-activity/SubagentPulse.js +3 -3
  331. package/lib/apps/plugins/subagent-activity/index.js +4 -4
  332. package/lib/apps/plugins/view-switch/index.js +3 -3
  333. package/lib/apps/plugins/window-frame/WindowFrame.js +1 -1
  334. package/lib/apps/plugins/window-frame/index.js +5 -5
  335. package/lib/apps/presets.js +21 -21
  336. package/lib/apps/shell/LoopWorkspace.js +4 -4
  337. package/lib/apps/shell/SidebarRail.js +1 -1
  338. package/lib/apps/shell/ViewSwitcher.js +1 -1
  339. package/lib/apps/shell/WorkspaceFullScreenAction.js +2 -2
  340. package/lib/apps/shell/index.js +7 -7
  341. package/lib/chat/Chat.js +7 -7
  342. package/lib/chat/ChatFloating.d.ts +1 -1
  343. package/lib/chat/ChatFloating.js +23 -23
  344. package/lib/chat/ChatInline.js +4 -4
  345. package/lib/chat/ChatLanguage.js +2 -2
  346. package/lib/chat/ChatPopupStandalone.js +4 -4
  347. package/lib/chat/ChatSidebar.js +2 -2
  348. package/lib/chat/ChatStandalone.js +3 -3
  349. package/lib/chat/assistant/AgentDetailsDialog.js +1 -1
  350. package/lib/chat/assistant/AssistantStage.d.ts +1 -1
  351. package/lib/chat/assistant/AssistantStage.js +16 -16
  352. package/lib/chat/assistant/Avatar3D.d.ts +1 -1
  353. package/lib/chat/assistant/Avatar3D.js +1 -1
  354. package/lib/chat/assistant/BalloonParts.js +8 -8
  355. package/lib/chat/assistant/BalloonVisual.js +1 -1
  356. package/lib/chat/assistant/ConversationBalloon.js +1 -1
  357. package/lib/chat/assistant/DecisionAsk.js +1 -1
  358. package/lib/chat/assistant/SandboxDetailsDialog.js +1 -1
  359. package/lib/chat/assistant/SpeechBalloon.js +5 -5
  360. package/lib/chat/assistant/SpriteCharacter.js +2 -2
  361. package/lib/chat/assistant/{avatar3d.d.ts → avatar3dModel.d.ts} +1 -1
  362. package/lib/chat/assistant/formats/acf.js +3 -3
  363. package/lib/chat/assistant/formats/acs.js +3 -3
  364. package/lib/chat/assistant/formats/agentCompression.js +1 -1
  365. package/lib/chat/assistant/formats/blobs.js +1 -1
  366. package/lib/chat/assistant/formats/clippy.js +3 -3
  367. package/lib/chat/assistant/formats/files.js +4 -4
  368. package/lib/chat/assistant/formats/index.js +7 -7
  369. package/lib/chat/assistant/formats/objectLiteral.js +1 -1
  370. package/lib/chat/assistant/toolLine.js +2 -2
  371. package/lib/chat/base/ChatBase.js +45 -45
  372. package/lib/chat/base/fullContextMessages.js +1 -1
  373. package/lib/chat/base/uiOps.js +3 -3
  374. package/lib/chat/display/EmptyState.js +3 -3
  375. package/lib/chat/document/EphemeralDocument.js +4 -4
  376. package/lib/chat/header/ChatHeaderBase.js +2 -2
  377. package/lib/chat/header/ChatViewModeToggle.js +1 -1
  378. package/lib/chat/index.js +24 -24
  379. package/lib/chat/indicators/McpStatusIndicator.js +1 -1
  380. package/lib/chat/indicators/SandboxStatusIndicator.js +1 -1
  381. package/lib/chat/indicators/index.js +3 -3
  382. package/lib/chat/marks/SpecMark.js +1 -1
  383. package/lib/chat/marks/index.js +3 -3
  384. package/lib/chat/marks/toolMarks.js +4 -4
  385. package/lib/chat/messages/ChatMarkdown.js +3 -3
  386. package/lib/chat/messages/ChatMessageList.js +13 -13
  387. package/lib/chat/messages/ChatMessages.js +2 -2
  388. package/lib/chat/messages/FormSubmissionMessage.js +1 -1
  389. package/lib/chat/messages/TurnFooter.js +2 -2
  390. package/lib/chat/notebook/EphemeralNotebook.js +4 -4
  391. package/lib/chat/parts/MessagePart.js +4 -4
  392. package/lib/chat/parts/ReasoningPart.js +2 -2
  393. package/lib/chat/parts/TextPart.js +2 -2
  394. package/lib/chat/parts/ToolPart.js +1 -1
  395. package/lib/chat/parts/index.js +5 -5
  396. package/lib/chat/presence/Presence.js +1 -1
  397. package/lib/chat/presence/presenceStatus.js +1 -1
  398. package/lib/chat/prompt/InputPrompt.js +9 -9
  399. package/lib/chat/prompt/InputPromptBase.js +6 -6
  400. package/lib/chat/prompt/InputPromptLexical.js +4 -4
  401. package/lib/chat/prompt/footer/BelowPromptFooter.js +1 -1
  402. package/lib/chat/prompt/footer/InPromptFooter.js +2 -2
  403. package/lib/chat/prompt/footer/index.js +2 -2
  404. package/lib/chat/prompt/header/BelowPromptHeader.js +1 -1
  405. package/lib/chat/prompt/header/InPromptHeader.js +1 -1
  406. package/lib/chat/prompt/header/index.js +2 -2
  407. package/lib/chat/prompt/index.js +10 -10
  408. package/lib/chat/prompt/menus/SkillsMenu.js +1 -1
  409. package/lib/chat/prompt/menus/SuggestionsMenu.js +1 -1
  410. package/lib/chat/prompt/menus/ToolsMenu.js +1 -1
  411. package/lib/chat/prompt/menus/index.js +6 -6
  412. package/lib/chat/prompt/plugins/AgentMentionPlugin.js +1 -1
  413. package/lib/chat/prompt/plugins/MentionNode.js +1 -1
  414. package/lib/chat/prompt/stack.js +1 -1
  415. package/lib/chat/tools/SubagentActivity.js +1 -1
  416. package/lib/chat/tools/ToolApprovalBanner.js +1 -1
  417. package/lib/chat/tools/ToolApprovalDialog.js +1 -1
  418. package/lib/chat/tools/ToolCallDisplay.js +2 -2
  419. package/lib/chat/tools/index.js +5 -5
  420. package/lib/chat/usage/ContextPie.js +1 -1
  421. package/lib/chat/words.js +1 -1
  422. package/lib/client/AgentRuntimesClient.js +2 -2
  423. package/lib/client/AgentsMixin.js +8 -8
  424. package/lib/client/index.js +3 -3
  425. package/lib/client/mixins/RuntimesMixin.js +6 -6
  426. package/lib/client/mixins/SpacerMixin.js +11 -11
  427. package/lib/client/utils/spacerUtils.js +2 -2
  428. package/lib/collaboration/DatalayerCollaborationProvider.js +1 -1
  429. package/lib/collaboration/index.js +2 -2
  430. package/lib/components/a2ui/custom/index.js +6 -6
  431. package/lib/components/a2ui/datalayer/Chart.js +2 -2
  432. package/lib/components/a2ui/datalayer/Chat.js +5 -5
  433. package/lib/components/a2ui/datalayer/Download.js +2 -2
  434. package/lib/components/a2ui/datalayer/Evidence.js +2 -2
  435. package/lib/components/a2ui/datalayer/FileUpload.js +3 -3
  436. package/lib/components/a2ui/datalayer/Form.js +3 -3
  437. package/lib/components/a2ui/datalayer/SchemaForm.js +1 -1
  438. package/lib/components/a2ui/datalayer/Table.js +2 -2
  439. package/lib/components/a2ui/datalayer/implementation.js +1 -1
  440. package/lib/components/a2ui/datalayer/index.js +17 -17
  441. package/lib/components/a2ui/datalayer/schema.js +1 -1
  442. package/lib/components/a2ui/index.js +7 -7
  443. package/lib/components/a2ui/visibleWhen.js +2 -2
  444. package/lib/components/agents/AgentSummary.js +1 -1
  445. package/lib/components/agents/index.js +1 -1
  446. package/lib/components/cards/NotificationEventCard.js +2 -2
  447. package/lib/components/cards/OutputCard.js +2 -2
  448. package/lib/components/cards/index.js +3 -3
  449. package/lib/components/code-sandboxes/CodeSandboxCellVariablesDialog.js +3 -3
  450. package/lib/components/code-sandboxes/CodeSandboxLauncher.js +9 -9
  451. package/lib/components/code-sandboxes/CodeSandboxPicker.js +9 -9
  452. package/lib/components/code-sandboxes/CodeSandboxPickerCell.js +7 -7
  453. package/lib/components/code-sandboxes/CodeSandboxUtils.js +3 -3
  454. package/lib/components/code-sandboxes/CodeSandboxVariables.js +1 -1
  455. package/lib/components/code-sandboxes/NewCodeSandboxControls.js +3 -3
  456. package/lib/components/code-sandboxes/index.js +14 -14
  457. package/lib/components/context/SpaceSelect.js +1 -1
  458. package/lib/components/flashes/FlashDisclaimer.js +1 -1
  459. package/lib/components/icons/index.js +1 -1
  460. package/lib/components/index.js +6 -6
  461. package/lib/components/inspector/AgentInspector.js +2 -2
  462. package/lib/components/inspector/AgentInspectorDialog.js +1 -1
  463. package/lib/components/inspector/a2aSpans.js +1 -1
  464. package/lib/components/inspector/chatSpans.js +2 -2
  465. package/lib/components/inspector/classify.js +1 -1
  466. package/lib/components/inspector/index.js +6 -6
  467. package/lib/components/nbgrader/index.js +1 -1
  468. package/lib/components/progress/index.js +1 -1
  469. package/lib/components/scheduler/ScheduleMenu.js +1 -1
  470. package/lib/components/scheduler/index.js +1 -1
  471. package/lib/components/snapshots/SandboxSnapshotMenu.js +2 -2
  472. package/lib/components/snapshots/index.js +1 -1
  473. package/lib/components/teams/A2ATeamGraph.d.ts +1 -1
  474. package/lib/components/teams/A2ATeamGraph.js +8 -8
  475. package/lib/components/teams/AnswerSurfaces.js +1 -1
  476. package/lib/components/teams/AnswerSurfacesView.js +4 -4
  477. package/lib/components/teams/NotebookPreview.js +2 -2
  478. package/lib/components/teams/NotebookPreviewView.js +1 -1
  479. package/lib/components/teams/SceneTranscript.d.ts +1 -1
  480. package/lib/components/teams/SceneTranscript.js +2 -2
  481. package/lib/components/teams/SceneView.d.ts +1 -1
  482. package/lib/components/teams/SceneView.js +1 -1
  483. package/lib/components/teams/TeamNotebook.js +1 -1
  484. package/lib/components/teams/TeamNotebookView.js +3 -3
  485. package/lib/components/teams/index.d.ts +1 -1
  486. package/lib/components/teams/index.js +13 -13
  487. package/lib/components/teams/sceneStage.js +2 -2
  488. package/lib/components/teams/{sceneTranscript.d.ts → sceneTranscriptRules.d.ts} +1 -1
  489. package/lib/components/teams/{sceneTranscript.js → sceneTranscriptRules.js} +1 -1
  490. package/lib/components/teams/teamConnections.js +3 -3
  491. package/lib/components/teams/useA2ATeam.js +6 -6
  492. package/lib/components/teams/usePeerSandbox.js +1 -1
  493. package/lib/components/tokens/index.js +1 -1
  494. package/lib/config/AgentConfiguration.js +2 -2
  495. package/lib/config/index.js +2 -2
  496. package/lib/context/CostUsageChart.js +4 -4
  497. package/lib/context/MessageHistory.js +1 -1
  498. package/lib/context/TokenUsageChart.js +4 -4
  499. package/lib/examples/A2UiAgentExample.js +9 -9
  500. package/lib/examples/A2UiComponentsGalleryExample.js +4 -4
  501. package/lib/examples/A2UiContactCardExample.js +4 -4
  502. package/lib/examples/A2UiJupyterOutputExample.js +11 -11
  503. package/lib/examples/A2UiRestaurantExample.js +4 -4
  504. package/lib/examples/A2UiViewerExample.js +6 -6
  505. package/lib/examples/AgUiAgenticExample.js +4 -4
  506. package/lib/examples/AgUiBackendToolRenderingExample.js +6 -6
  507. package/lib/examples/AgUiHaikuGenUiExample.js +6 -6
  508. package/lib/examples/AgUiHumanInTheLoopExample.js +5 -5
  509. package/lib/examples/AgUiSharedStateExample.js +4 -4
  510. package/lib/examples/AgUiToolsBasedGenUiExample.js +4 -4
  511. package/lib/examples/AgentA2AExample.js +7 -7
  512. package/lib/examples/AgentA2ATeamExample.js +10 -10
  513. package/lib/examples/AgentCheckpointsExample.js +14 -14
  514. package/lib/examples/AgentCodeSandboxExample.js +6 -6
  515. package/lib/examples/AgentCodeSandboxesExample.js +5 -5
  516. package/lib/examples/AgentCodemodeExample.js +12 -12
  517. package/lib/examples/AgentCompactionExample.js +8 -8
  518. package/lib/examples/AgentDecideExample.js +6 -6
  519. package/lib/examples/AgentEvalsExample.js +11 -11
  520. package/lib/examples/AgentGuardrailsExample.js +17 -17
  521. package/lib/examples/AgentHooksExample.js +5 -5
  522. package/lib/examples/AgentInferenceProviderExample.js +6 -6
  523. package/lib/examples/AgentMCPExample.js +14 -14
  524. package/lib/examples/AgentMemoryExample.js +11 -11
  525. package/lib/examples/AgentMonitoringExample.js +19 -19
  526. package/lib/examples/AgentNotificationsExample.js +9 -9
  527. package/lib/examples/AgentOtelExample.js +6 -6
  528. package/lib/examples/AgentOutputsExample.js +8 -8
  529. package/lib/examples/AgentParametersExample.js +6 -6
  530. package/lib/examples/AgentSkillsExample.js +9 -9
  531. package/lib/examples/AgentSubagentsExample.js +8 -8
  532. package/lib/examples/AgentToolApprovalsExample.js +10 -10
  533. package/lib/examples/AgentTriggersExample.js +14 -14
  534. package/lib/examples/AgentspecsExample.js +11 -11
  535. package/lib/examples/AvatarExample.js +8 -8
  536. package/lib/examples/AvatarGalleryExample.js +8 -8
  537. package/lib/examples/CellExample.js +2 -2
  538. package/lib/examples/ChatCustomExample.js +4 -4
  539. package/lib/examples/ChatExample.js +8 -8
  540. package/lib/examples/ChatStandaloneExample.js +2 -2
  541. package/lib/examples/CopilotKitLexicalExample.js +4 -4
  542. package/lib/examples/CopilotKitNotebookExample.js +4 -4
  543. package/lib/examples/DecksAgent.js +4 -4
  544. package/lib/examples/DocumentPageAgent.js +2 -2
  545. package/lib/examples/Lexical2Example.js +9 -9
  546. package/lib/examples/LexicalAgentExample.js +7 -7
  547. package/lib/examples/LexicalAgentSidebarExample.js +8 -8
  548. package/lib/examples/LoopAppComputerExample.js +4 -4
  549. package/lib/examples/LoopShellExample.js +6 -6
  550. package/lib/examples/LoopStrategyExample.js +6 -6
  551. package/lib/examples/LoopWorkspaceEmbed.js +1 -1
  552. package/lib/examples/LoopWorkspaceExample.js +11 -11
  553. package/lib/examples/NotebookAgentExample.js +5 -5
  554. package/lib/examples/NotebookAgentSidebarExample.js +5 -5
  555. package/lib/examples/NotebookCollaborationExample.js +6 -6
  556. package/lib/examples/NotebookExample.js +2 -2
  557. package/lib/examples/NotebookPageAgent.js +2 -2
  558. package/lib/examples/PapAccountTokensExample.js +4 -4
  559. package/lib/examples/PapAgentIdentityExample.js +4 -4
  560. package/lib/examples/PapAuthorizationBoundaryExample.js +4 -4
  561. package/lib/examples/PapCompanyDiscoveryExample.js +4 -4
  562. package/lib/examples/PapConversationControlExample.js +4 -4
  563. package/lib/examples/PapConversationStreamingExample.js +4 -4
  564. package/lib/examples/PapDpopProofExample.js +4 -4
  565. package/lib/examples/PapGuidedJourneyExample.js +4 -4
  566. package/lib/examples/PapMediatedSignInExample.js +4 -4
  567. package/lib/examples/PapOperationsExample.js +4 -4
  568. package/lib/examples/PapSessionLifecycleExample.js +4 -4
  569. package/lib/examples/PapSignInDisplayExample.js +4 -4
  570. package/lib/examples/PapTwoCompaniesExample.js +4 -4
  571. package/lib/examples/PapUserWithACompanyExample.js +4 -4
  572. package/lib/examples/ProtocolSignedRequestsExample.js +2 -2
  573. package/lib/examples/ProtocolUcpCheckoutExample.js +2 -2
  574. package/lib/examples/ScenesExample.js +8 -8
  575. package/lib/examples/ShieldHarnessExample.js +5 -5
  576. package/lib/examples/ShieldPolicyExample.js +2 -2
  577. package/lib/examples/VoiceChatExample.js +4 -4
  578. package/lib/examples/components/AuthRequiredView.js +1 -1
  579. package/lib/examples/components/ExampleWrapper.js +3 -3
  580. package/lib/examples/components/Header.js +2 -2
  581. package/lib/examples/components/LexicalEditor.js +1 -1
  582. package/lib/examples/components/MainContent.js +1 -1
  583. package/lib/examples/components/haiku/HaikuDisplay.js +1 -1
  584. package/lib/examples/components/haiku/index.js +2 -2
  585. package/lib/examples/components/index.js +13 -13
  586. package/lib/examples/components/weather/index.js +1 -1
  587. package/lib/examples/example-selector.js +78 -78
  588. package/lib/examples/hooks/useExampleAgentProtocol.js +2 -2
  589. package/lib/examples/hooks/useExampleAgentRuntime.js +4 -4
  590. package/lib/examples/hooks/useExampleAgentRuntimes.js +4 -4
  591. package/lib/examples/hooks/useExampleJupyterAgent.js +8 -8
  592. package/lib/examples/hooks/useToolRenderers.js +1 -1
  593. package/lib/examples/index.js +66 -66
  594. package/lib/examples/lexical/editorConfig.js +1 -1
  595. package/lib/examples/main.js +21 -21
  596. package/lib/examples/pap/PapAccountTokensView.js +1 -1
  597. package/lib/examples/pap/PapAgentIdentityView.js +2 -2
  598. package/lib/examples/pap/PapAuthorizationBoundaryView.js +1 -1
  599. package/lib/examples/pap/PapCompanyDiscoveryView.js +2 -2
  600. package/lib/examples/pap/PapConversationControlView.js +1 -1
  601. package/lib/examples/pap/PapConversationStreamingView.js +1 -1
  602. package/lib/examples/pap/PapDpopProofView.js +1 -1
  603. package/lib/examples/pap/PapGuidedJourneyView.js +2 -2
  604. package/lib/examples/pap/PapMediatedSignInView.js +1 -1
  605. package/lib/examples/pap/PapOperationsView.js +1 -1
  606. package/lib/examples/pap/PapSessionLifecycleView.js +1 -1
  607. package/lib/examples/pap/PapSignInDisplayView.js +2 -2
  608. package/lib/examples/pap/PapTraceView.js +1 -1
  609. package/lib/examples/pap/PapTwoCompaniesView.js +1 -1
  610. package/lib/examples/pap/PapUserWithACompanyView.js +1 -1
  611. package/lib/examples/pap/papSignInCases.js +1 -1
  612. package/lib/examples/protocols/signedRequestsDemo.js +1 -1
  613. package/lib/examples/protocols/ucpCheckoutDemo.js +3 -3
  614. package/lib/examples/scenes/A2UiComponentsGalleryScene.js +4 -4
  615. package/lib/examples/scenes/A2UiContactCardScene.js +3 -3
  616. package/lib/examples/scenes/A2UiRestaurantScene.js +5 -5
  617. package/lib/examples/scenes/A2UiViewerScene.js +3 -3
  618. package/lib/examples/utils/AvatarGalleryGrid.d.ts +1 -1
  619. package/lib/examples/utils/AvatarGalleryGrid.js +8 -8
  620. package/lib/examples/utils/a2ui.js +1 -1
  621. package/lib/examples/utils/a2uiMarkdownProvider.js +1 -1
  622. package/lib/examples/utils/avatarGallery.js +2 -2
  623. package/lib/examples/utils/clippyJsCharacters.js +1 -1
  624. package/lib/examples/utils/examplesStore.js +1 -1
  625. package/lib/examples/utils/notebookToolbarItems.js +1 -1
  626. package/lib/examples/utils/owlCharacterPlugin.js +1 -1
  627. package/lib/examples/utils/teardownAgents.js +1 -1
  628. package/lib/examples/utils/testSpriteCharacter.js +1 -1
  629. package/lib/examples/utils/themedProvider.js +1 -1
  630. package/lib/examples/utils/useExampleAgentRuntimesUrl.js +3 -3
  631. package/lib/examples2/DatalayerNotebookExample.js +3 -3
  632. package/lib/examples2/NativeNavigationExample.js +1 -1
  633. package/lib/examples2/NotebookMutationsKernel.js +2 -2
  634. package/lib/examples2/NotebookMutationsServiceManager.js +2 -2
  635. package/lib/examples2/ReactRouterExample.js +1 -1
  636. package/lib/examples2/example-selector.js +7 -7
  637. package/lib/examples2/index.js +2 -2
  638. package/lib/examples2/main.js +5 -5
  639. package/lib/hooks/index.js +26 -26
  640. package/lib/hooks/useAgUi.js +1 -1
  641. package/lib/hooks/useAgentRuntimes.js +9 -9
  642. package/lib/hooks/useAgentsCatalog.js +1 -1
  643. package/lib/hooks/useAgentsService.js +1 -1
  644. package/lib/hooks/useBrowserAgent.js +1 -1
  645. package/lib/hooks/useBrowserInference.js +2 -2
  646. package/lib/hooks/useCellOutputshot.js +1 -1
  647. package/lib/hooks/useChat.js +6 -6
  648. package/lib/hooks/useCheckpoints.js +10 -10
  649. package/lib/hooks/useConfig.js +1 -1
  650. package/lib/hooks/useContextSnapshot.js +1 -1
  651. package/lib/hooks/useNotifications.js +1 -1
  652. package/lib/hooks/useProgressTask.js +1 -1
  653. package/lib/hooks/useSandbox.js +1 -1
  654. package/lib/hooks/useSkills.js +1 -1
  655. package/lib/hooks/useToolApprovals.js +2 -2
  656. package/lib/hooks/useTools.js +1 -1
  657. package/lib/identity/AgentIdentity.js +3 -3
  658. package/lib/identity/IdentityConnect.js +2 -2
  659. package/lib/identity/OAuthCallback.js +1 -1
  660. package/lib/identity/identityStore.js +2 -2
  661. package/lib/identity/index.js +8 -8
  662. package/lib/identity/useIdentity.js +1 -1
  663. package/lib/index.js +11 -11
  664. package/lib/inference/DatalayerInferenceProvider.js +2 -2
  665. package/lib/inference/SelfHostedInferenceProvider.js +2 -2
  666. package/lib/inference/index.js +3 -3
  667. package/lib/jupyter/exec/Snippets.js +1 -1
  668. package/lib/jupyter/exec/index.js +2 -2
  669. package/lib/jupyter/index.js +3 -3
  670. package/lib/jupyter/useResumeServerExecutions.js +1 -1
  671. package/lib/lexical/ChatInlinePlugin.js +1 -1
  672. package/lib/lexical/index.js +2 -2
  673. package/lib/loop-example-main.js +2 -2
  674. package/lib/loop-main.js +9 -9
  675. package/lib/main.js +1 -1
  676. package/lib/mcp/index.js +1 -1
  677. package/lib/middleware/index.js +1 -1
  678. package/lib/mocks/models/CourseMock.js +1 -1
  679. package/lib/models/CodeSandboxSnapshotDTO.js +1 -1
  680. package/lib/models/ItemDTO.js +1 -1
  681. package/lib/models/LexicalDTO.js +2 -2
  682. package/lib/models/NotebookDTO.js +2 -2
  683. package/lib/models/Page.js +1 -1
  684. package/lib/models/RuntimeDTO.js +1 -1
  685. package/lib/models/SpaceDTO.js +7 -7
  686. package/lib/models/index.js +32 -32
  687. package/lib/portable/activity.js +1 -1
  688. package/lib/portable/approvalCard.js +1 -1
  689. package/lib/portable/attention.d.ts +204 -0
  690. package/lib/portable/attention.js +352 -0
  691. package/lib/portable/conversation.js +4 -4
  692. package/lib/portable/displays.js +1 -1
  693. package/lib/portable/fixtures.js +2 -2
  694. package/lib/portable/hosts/agentClient.js +4 -4
  695. package/lib/portable/hosts/client.js +1 -1
  696. package/lib/portable/hosts/deadLetters.js +3 -3
  697. package/lib/portable/hosts/deliveries.js +1 -1
  698. package/lib/portable/hosts/index.js +21 -21
  699. package/lib/portable/hosts/postgresQueue.js +1 -1
  700. package/lib/portable/hosts/quotas.js +1 -1
  701. package/lib/portable/hosts/schema.js +1 -1
  702. package/lib/portable/index.js +24 -24
  703. package/lib/portable/localApprovals.d.ts +72 -0
  704. package/lib/portable/localApprovals.js +125 -0
  705. package/lib/portable/localRuntime.d.ts +365 -0
  706. package/lib/portable/localRuntime.js +555 -0
  707. package/lib/portable/runMeasures.js +2 -2
  708. package/lib/portable/sessionList.d.ts +426 -0
  709. package/lib/portable/sessionList.js +618 -0
  710. package/lib/portable/sessions.js +4 -4
  711. package/lib/portable/thread.js +2 -2
  712. package/lib/portable/views.js +1 -1
  713. package/lib/protocols/A2AAdapter.js +3 -3
  714. package/lib/protocols/ACPAdapter.js +2 -2
  715. package/lib/protocols/AGUIAdapter.js +4 -4
  716. package/lib/protocols/BrowserAgentAdapter.js +3 -3
  717. package/lib/protocols/VercelAIAdapter.js +2 -2
  718. package/lib/protocols/a2a/index.js +1 -1
  719. package/lib/protocols/agentProtocols.js +8 -8
  720. package/lib/protocols/agentic-commerce/index.js +3 -3
  721. package/lib/protocols/commerce.js +1 -1
  722. package/lib/protocols/index.js +6 -6
  723. package/lib/protocols/mcp/index.js +2 -2
  724. package/lib/protocols/pact/index.js +1 -1
  725. package/lib/protocols/pap/index.js +1 -1
  726. package/lib/protocols/ucp/index.js +3 -3
  727. package/lib/protocols/ucp/merchant.js +1 -1
  728. package/lib/protocols/web-bot-auth/index.js +1 -1
  729. package/lib/protocols/web-bot-auth/tap.js +1 -1
  730. package/lib/runtimes/actions.js +3 -3
  731. package/lib/runtimes/browser/agent.js +2 -2
  732. package/lib/runtimes/browser/frontendTools.js +1 -1
  733. package/lib/runtimes/browser/index.js +6 -6
  734. package/lib/runtimes/browser/subagents.js +2 -2
  735. package/lib/runtimes/index.js +8 -8
  736. package/lib/runtimes/variants.js +1 -1
  737. package/lib/services/DatalayerServiceManager.js +1 -1
  738. package/lib/specs/agents/agents.js +4 -4
  739. package/lib/specs/agents/index.js +1 -1
  740. package/lib/specs/cogs.js +4 -4
  741. package/lib/specs/index.js +32 -32
  742. package/lib/specs/teams/index.js +1 -1
  743. package/lib/state/index.js +1 -1
  744. package/lib/state/substates/RuntimesState.js +1 -1
  745. package/lib/state/substates/index.js +7 -7
  746. package/lib/stores/agentRuntimeStore.js +3 -3
  747. package/lib/stores/index.js +3 -3
  748. package/lib/stories/Button.stories.js +1 -1
  749. package/lib/stories/Header.js +1 -1
  750. package/lib/stories/Header.stories.js +1 -1
  751. package/lib/stories/Page.js +1 -1
  752. package/lib/stories/Page.stories.js +1 -1
  753. package/lib/stories/loop/LoopReference.stories.js +1 -1
  754. package/lib/stories/loop/ReferenceScreens.js +11 -11
  755. package/lib/stories/loop/pictures-main.js +2 -2
  756. package/lib/tools/ToolExecutor.js +1 -1
  757. package/lib/tools/adapters/agent-runtimes/index.js +3 -3
  758. package/lib/tools/adapters/agent-runtimes/lexicalHooks.js +1 -1
  759. package/lib/tools/adapters/agent-runtimes/notebookHooks.js +1 -1
  760. package/lib/tools/adapters/commands/index.js +1 -1
  761. package/lib/tools/adapters/copilotkit/index.js +3 -3
  762. package/lib/tools/adapters/copilotkit/lexicalHooks.js +1 -1
  763. package/lib/tools/adapters/copilotkit/notebookHooks.js +1 -1
  764. package/lib/tools/index.js +3 -3
  765. package/lib/types/index.js +40 -40
  766. package/lib/ui-plugins/index.js +3 -3
  767. package/lib/utils/index.js +1 -1
  768. package/lib/utils/utils.js +2 -2
  769. package/lib/voice/ComposerVoice.js +5 -5
  770. package/lib/voice/HandsFree.js +5 -5
  771. package/lib/voice/ReadAloud.js +1 -1
  772. package/lib/voice/VoiceInput.js +3 -3
  773. package/lib/voice/VoiceMenu.js +3 -3
  774. package/lib/voice/captions.js +2 -2
  775. package/lib/voice/chatVoice.js +3 -3
  776. package/lib/voice/choices.js +1 -1
  777. package/lib/voice/{handsFree.d.ts → handsFreeRules.d.ts} +1 -1
  778. package/lib/voice/hearing.js +3 -3
  779. package/lib/voice/index.d.ts +1 -1
  780. package/lib/voice/index.js +22 -22
  781. package/lib/voice/keptSound.js +1 -1
  782. package/lib/voice/pinned.js +1 -1
  783. package/lib/voice/serverHearing.js +2 -2
  784. package/lib/voice/useSpokenAnswers.js +1 -1
  785. package/lib/voice/useVoiceSettings.js +1 -1
  786. package/lib/voice/useVoiceSpeaker.js +2 -2
  787. package/package.json +4 -3
  788. package/scripts/check-npm-pack.mjs +77 -0
  789. package/scripts/esm-specifiers.mjs +76 -0
  790. package/scripts/fully-specify-lib.mjs +61 -0
  791. package/dist-embed/chunks/abnfDiagram-VCTEODGH-m7LJLYga.js +0 -1
  792. package/dist-embed/chunks/classDiagram-ZZMXUADV-CGdcKCOI.js +0 -1
  793. package/dist-embed/chunks/classDiagram-v2-VYDZK3BY-CGdcKCOI.js +0 -1
  794. package/dist-embed/chunks/cose-bilkent-JH36ORCC-BsK2pWDL.js +0 -1
  795. package/dist-embed/chunks/cynefinDiagram-5FMLGOSQ-vmheD_S2.js +0 -62
  796. package/dist-embed/chunks/diagram-UQ7AKVKN-BFkOO3Wu.js +0 -41
  797. package/dist-embed/chunks/diagram-VX7I27RA-_LUOsaBb.js +0 -24
  798. package/dist-embed/chunks/diagram-Z3DM3KII-CY856Sry.js +0 -24
  799. package/dist-embed/chunks/ebnfDiagram-PWID7BFC-kqD9RLAA.js +0 -1
  800. package/dist-embed/chunks/gitGraphDiagram-WWUBYQGX-BujqTwbf.js +0 -106
  801. package/dist-embed/chunks/infoDiagram-27XIBGKW-C18Zz25F.js +0 -2
  802. package/dist-embed/chunks/pegDiagram-XKGWAZYB-BBVcHZ8T.js +0 -1
  803. package/dist-embed/chunks/railroadDiagram-O6MQD6OU-bR7xXZGS.js +0 -1
  804. package/dist-embed/chunks/sizeCapture-INFHLROL-BW7unDBA.js +0 -1
  805. package/dist-embed/chunks/stateDiagram-D77RDMKH-mLSMGpPQ.js +0 -1
  806. package/dist-embed/chunks/stateDiagram-v2-MP3YSRHH-C6TftAzE.js +0 -1
  807. package/dist-embed/chunks/swimlanes-42K2YHIH-BQTDK2Ta.js +0 -1
  808. package/dist-embed/chunks/swimlanesDiagram-VR7AAH4N-BV8Vb5g2.js +0 -8
  809. /package/lib/chat/assistant/{avatar3d.js → avatar3dModel.js} +0 -0
  810. /package/lib/voice/{handsFree.js → handsFreeRules.js} +0 -0
@@ -0,0 +1,337 @@
1
+ import{d as Kg}from"./index-CJys1M3A.js";import{au as Br,_ as yt}from"../datalayer-app-main.js";import{d as Zg,P as k,Q as E,q as D,o as O,n as me,r as Ke,s as mt,v as th,w as eh,x as rh,y as ih,z as oh,A as sh,B as Qg,D as Ri,E as ah,F as Jg,G as tp,H as nh,I as ep,J as rp,K as ip,L as lh,M as hh,N as op,O as sp,l as us,u as ch}from"./index-MIxQaicl.js";import{z as ap,A as np,B as lp,C as hp,D as cp,F as Vs,E as dp,G as up,H as gp,I as an}from"./fastdom-promised-BMVBoXkp.js";import{l as pp}from"./line-DUjWPDRX.js";import{c as Bi,a as nn,i as ln}from"./_baseRest-BmxuuM4H.js";import{k as fr,f as Ye,u as fp,r as mp}from"./forEach-hknrtmxV.js";import{f as vi,i as br,v as vo}from"./isUndefined-wBqHC1Hw.js";const Mr=20,yp={rect:"rectangle",circle:"ellipse"},Jr={startOnLoad:!1,flowchart:{curve:"linear"},themeVariables:{fontSize:`${Mr}px`},maxEdges:500,maxTextSize:5e4};class Ir{constructor({converter:t}){this.convert=(r,i)=>this.converter(r,{...i,fontSize:i.fontSize||Mr}),this.converter=t}}var Pe;(function(e){e.ROUND="round",e.STADIUM="stadium",e.DOUBLECIRCLE="doublecircle",e.CIRCLE="circle",e.DIAMOND="diamond",e.CYLINDER="cylinder"})(Pe||(Pe={}));var te;(function(e){e.COLOR="color"})(te||(te={}));var At;(function(e){e.FILL="fill",e.STROKE="stroke",e.STROKE_WIDTH="stroke-width",e.STROKE_DASHARRAY="stroke-dasharray"})(At||(At={}));const Cp=e=>{let t="";for(;e.includes(t);)t+="";return Kg.removeMarkdown(e.replace(/\n/g,t)).replace(new RegExp(t,"g"),`
2
+ `)},xp={arrow_circle:{endArrowhead:"circle"},arrow_cross:{endArrowhead:"bar"},arrow_open:{endArrowhead:null,startArrowhead:null},double_arrow_circle:{endArrowhead:"circle",startArrowhead:"circle"},double_arrow_cross:{endArrowhead:"bar",startArrowhead:"bar"},double_arrow_point:{endArrowhead:"arrow",startArrowhead:"arrow"}},bp=e=>xp[e],Re=e=>{let t=e.text;return e.labelType==="markdown"&&(t=Cp(t)),kp(t)},kp=e=>{const t=/\s?(fa|fab):[a-zA-Z0-9-]+/g;return e.replace(t,"")},gi=e=>{const t={};return Object.keys(e).forEach(r=>{switch(r){case At.FILL:{t.backgroundColor=e[r],t.fillStyle="solid";break}case At.STROKE:{t.strokeColor=e[r];break}case At.STROKE_WIDTH:{t.strokeWidth=Number(e[r]?.split("px")[0]);break}case At.STROKE_DASHARRAY:{t.strokeStyle="dashed";break}}}),t},gs=e=>{const t={};return Object.keys(e).forEach(r=>{r===te.COLOR&&(t.strokeColor=e[r])}),t},Sp=(e,t)=>[e,t],Tp=32,dh=.62,wp=12,Bp=12,vp=1.25,ps=5,uh=(e,t)=>{const r=Math.max(...e.split(`
3
+ `).map(i=>i.length));return Math.max(20,Math.ceil(r*t*dh))},gh=e=>({x:e.x??0,y:e.y??0,width:e.width||0,height:e.height||0}),fs=e=>{const{x:t,y:r,width:i,height:o}=gh(e);return{x:t+i/2,y:r+o/2}},Lp=(e,t)=>{const{x:r,y:i,width:o,height:s}=gh(t);return e.x>=r&&e.x<=r+o&&e.y>=i&&e.y<=i+s},hn=(e,t)=>{const r=fs(e),i=t.x-r.x,o=t.y-r.y,s=(e.width||0)/2,a=(e.height||0)/2,n=Math.min(i?s/Math.abs(i):Number.POSITIVE_INFINITY,o?a/Math.abs(o):Number.POSITIVE_INFINITY);return Number.isFinite(n)?{x:r.x+i*n,y:r.y+o*n}:r},cn=(e,t,r,i)=>{const o=r==="start"?e:e.slice().reverse(),s=o.findIndex(n=>!Lp(n,t));if(s===-1){const n=[...o];return n[0]=hn(t,i),r==="start"?n:n.reverse()}const a=[hn(t,o[s]),...o.slice(s)];return r==="start"?a:a.reverse()},Fp=(e,t)=>new Map(e.subGraphs.map(r=>{const o=uh(Re(r),t)+Tp*2,s=Math.max(r.width,o),a=r.x-(s-r.width)/2;return[r.id,{x:a,width:s,leftExpansion:r.x-a,rightExpansion:a+s-(r.x+r.width)}]})),Ep=(e,t)=>{const r=new Map;e.subGraphs.forEach(n=>{n.nodeIds.forEach(l=>r.set(l,n.id))});const i=[...Object.keys(e.vertices),...e.subGraphs.map(n=>n.id)],o=n=>{const l=new Set;let c=n;for(;r.has(c)&&!l.has(c);)l.add(c),c=r.get(c);return c},s=new Map;i.forEach(n=>{const l=o(n),c=s.get(l)||[];c.push(n),s.set(l,c)});const a=new Map(i.map(n=>[n,0]));return e.subGraphs.forEach(n=>{if(r.has(n.id)||!Re(n).includes(`
4
+ `))return;const l=t.get(n.id);if(!l||!l.leftExpansion&&!l.rightExpansion)return;const c=n.x+n.width/2;s.forEach((h,d)=>{if(d===n.id)return;const u=e.subGraphs.find(C=>C.id===d),g=e.vertices[d],y=(u?u.x+u.width/2:g?g.x+g.width/2:c)<c?-l.leftExpansion:l.rightExpansion;h.forEach(C=>a.set(C,(a.get(C)||0)+y))})}),a},Ap=(e,t,r)=>Math.min(...r.map(i=>{const o=e.vertices[i];return o?o.y:e.subGraphs.find(s=>s.id===i&&s.id!==t)?.y??Number.POSITIVE_INFINITY})),ph=(e,t)=>{const r=e.split(`
5
+ `).length;return r<2?0:Math.ceil(r*t*vp+ps*2)},_p=(e,t)=>{const r=[];return e.subGraphs.forEach(i=>{const o=ph(Re(i),t);if(!o)return;const s=Ap(e,i.id,i.nodeIds);if(!Number.isFinite(s))return;const a=Math.ceil(o-(s-i.y));if(a<=0)return;const n=r.find(l=>Math.abs(l.y-s)<.5);if(n){n.y=Math.min(n.y,s),n.amount=Math.max(n.amount,a);return}r.push({y:s,amount:a})}),r.sort((i,o)=>i.y-o.y)},ai=(e,t)=>e.reduce((r,i)=>i.y<=t?r+i.amount:r,0),Mp=(e,t,r)=>{const i=new Map,o=new Map(e.subGraphs.map(a=>[a.id,a])),s=a=>{const n=i.get(a);if(n)return n;const l=o.get(a);if(!l)return null;const c=l.y+ai(t,l.y),h=ph(Re(l),r);let d=c+Math.max(l.height,h);l.nodeIds.forEach(g=>{const m=e.vertices[g];if(m){const C=m.y+ai(t,m.y)+m.height;C>d&&(d=C+ps*2);return}if(g===a)return;const y=s(g);y&&y.y+y.height>d&&(d=y.y+y.height+ps*2)});const u={y:c,height:d-c};return i.set(a,u),u};return e.subGraphs.forEach(a=>s(a.id)),i},Ip=(e,t,r,i)=>{const o=i||Mr;if(e!==Pe.CYLINDER||!t)return o;const s=Math.max(20,r-wp);if(uh(t,o)<=s)return o;const n=Math.max(...t.split(`
6
+ `).map(l=>l.length));return Math.max(Bp,Math.floor(s/(n*dh)))},Op=e=>{const t={};e.subGraphs.map(i=>{i.nodeIds.forEach(o=>{t[i.id]={id:i.id,parent:null,isLeaf:!1},t[o]={id:o,parent:i.id,isLeaf:e.vertices[o]!==void 0}})});const r={};return[...Object.keys(e.vertices),...e.subGraphs.map(i=>i.id)].forEach(i=>{if(!t[i])return;let o=t[i];const s=[];for(o.isLeaf||s.push(`subgraph_group_${o.id}`);o.parent;)s.push(`subgraph_group_${o.parent}`),o=t[o.parent];r[i]=s}),{getGroupIds:i=>r[i]||[],getParentId:i=>t[i]?t[i].parent:null}},Dp=new Ir({converter:(e,t)=>{const r=[],i=t.fontSize,{getGroupIds:o,getParentId:s}=Op(e),a=i||Mr,n=_p(e,a),l=Mp(e,n,a),c=Fp(e,a),h=Ep(e,c),d=new Set(e.subGraphs.map(g=>g.id)),u=new Set(e.subGraphs.filter(g=>{const m=c.get(g.id),y=l.get(g.id);return Re(g).includes(`
7
+ `)&&m?.width!==g.width||y?.height!==g.height}).map(g=>g.id));return e.subGraphs.slice().reverse().forEach(g=>{const m=o(g.id),y=Re(g),C=a,x=c.get(g.id)||{x:g.x,width:g.width},b=x.width,S=x.x+(h.get(g.id)||0),B=l.get(g.id)||g,w=gi(g.containerStyle),v=gs(g.labelStyle),F={id:g.id,type:"rectangle",groupIds:m,x:S,y:B.y,width:b,height:B.height,label:{groupIds:m,text:y,fontSize:C,verticalAlign:"top",...v},...w};r.push(F)}),Object.values(e.vertices).forEach(g=>{if(!g)return;const m=o(g.id),y=Re(g),C=g.x+(h.get(g.id)||0),x=g.y+ai(n,g.y),b=Ip(g.type,y,g.width,i),S=gi(g.containerStyle),B=gs(g.labelStyle);let w={id:g.id,type:"rectangle",groupIds:m,x:C,y:x,width:g.width,height:g.height,strokeWidth:2,label:{groupIds:m,text:y,fontSize:b,...B},link:g.link||null,...S};switch(g.type){case Pe.STADIUM:{w={...w,roundness:{type:3}};break}case Pe.ROUND:{w={...w,roundness:{type:3}};break}case Pe.DOUBLECIRCLE:{m.push(`doublecircle_${g.id}}`);const F={type:"ellipse",groupIds:m,x:C+5,y:x+5,width:g.width-10,height:g.height-10,strokeWidth:2,roundness:{type:3},label:{groupIds:m,text:y,fontSize:b,...B}};w={...w,groupIds:m,type:"ellipse"},r.push(F);break}case Pe.CIRCLE:{w.type="ellipse";break}case Pe.DIAMOND:{w.type="diamond";break}}r.push(w)}),e.edges.forEach(g=>{let m=[];const y=s(g.start),C=s(g.end);y&&y===C&&(m=o(y));const{startX:x,startY:b,reflectionPoints:S}=g,B=h.get(g.start)||0,w=h.get(g.end)||0;let v=S.map((G,I)=>{const R=S.length>1?I/(S.length-1):0;return{...G,x:G.x+B+(w-B)*R,y:G.y+ai(n,G.y)}});const F=bp(g.type||"arrow_point"),L=r.find(G=>G.id===g.start),P=r.find(G=>G.id===g.end);if(!L||!P)return;const $=d.has(g.start);u.has(g.start)&&(v=cn(v,L,"start",fs(P))),u.has(g.end)&&(v=cn(v,P,"end",fs(L)));const N=v.map(G=>Sp(G.x-v[0].x,G.y-v[0].y)),J=$?v[0].y:b+ai(n,b),z={id:`${g.start}_${g.end}`,type:"arrow",groupIds:m,x:$?v[0].x:x+B,y:J,strokeWidth:g.stroke==="thick"?4:2,strokeStyle:g.stroke==="dotted"?"dashed":void 0,points:N,...g.text?{label:{text:Re(g),fontSize:i,groupIds:m}}:{},roundness:{type:2},...F,start:{id:L.id||""},end:{id:P.id||""}};r.push(z)}),{elements:r}}});let ae=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,r)=>(r&=63,r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r>62?t+="-":t+="_",t),"");const $p=new Ir({converter:e=>{const t=ae(),{width:r,height:i}=e,o={type:"image",x:0,y:0,width:r,height:i,status:"saved",fileId:t};return{files:{[t]:{id:t,mimeType:e.mimeType,dataURL:e.dataURL}},elements:[o]}}}),ni=(e,t)=>[e,t],Ze=e=>{const t={type:"line",x:e.startX,y:e.startY,points:[ni(0,0),ni(e.endX-e.startX,e.endY-e.startY)],width:e.endX-e.startX,height:e.endY-e.startY,strokeStyle:e.strokeStyle||"solid",strokeColor:e.strokeColor||"#000",strokeWidth:e.strokeWidth||1};return e.groupId&&Object.assign(t,{groupIds:[e.groupId]}),e.id&&Object.assign(t,{id:e.id}),t},Qe=e=>{const t={type:"text",x:e.x,y:e.y,width:e.width,height:e.height,text:e.text||"",fontSize:e.fontSize,verticalAlign:"top",strokeColor:e.color};return e.textAlign&&Object.assign(t,{textAlign:e.textAlign}),e.groupId&&Object.assign(t,{groupIds:[e.groupId]}),e.id&&Object.assign(t,{id:e.id}),t},Tr=e=>{const t={text:e?.label?.text||"",fontSize:e?.label?.fontSize,textAlign:e.label?.textAlign,verticalAlign:e.label?.verticalAlign||"middle",strokeColor:e.label?.color||"#000",...e.groupId?{groupIds:[e.groupId]}:{}};let r={};e.type==="rectangle"&&e.subtype==="activation"&&(r={backgroundColor:"#e9ecef",fillStyle:"solid"});const i={id:e.id,type:e.type,x:e.x,y:e.y,width:e.width,height:e.height,label:t,strokeStyle:e?.strokeStyle,strokeWidth:e?.strokeWidth,strokeColor:e?.strokeColor,backgroundColor:e?.bgColor,fillStyle:"solid",...r};return e.groupId&&Object.assign(i,{groupIds:[e.groupId]}),i},Ks=e=>{const t={type:"arrow",x:e.startX,y:e.startY,points:e.points?.map(([r,i])=>ni(r,i))||[ni(0,0),ni(e.endX-e.startX,e.endY-e.startY)],width:e.endX-e.startX,height:e.endY-e.startY,strokeStyle:e?.strokeStyle||"solid",endArrowhead:e?.endArrowhead||null,startArrowhead:e?.startArrowhead||null,label:{text:e?.label?.text||"",fontSize:16,textAlign:e?.label?.textAlign,verticalAlign:e?.label?.verticalAlign},roundness:{type:2},start:e.start,end:e.end};return e.groupId&&Object.assign(t,{groupIds:[e.groupId]}),t},mr=10,Lo=16,Pp=24,Rp=4,qp=1.25,Np=e=>{if(!e)return!0;const t=e.trim().toLowerCase();return t==="transparent"||t==="none"||t==="rgba(0,0,0,0)"||t==="rgba(0, 0, 0, 0)"},Wp=(e,t)=>{const r=Math.max(...e.split(`
8
+ `).map(i=>i.length));return Math.max(20,Math.round(r*t*.6))},zp=(e,t)=>Math.max(Pp,e.split(`
9
+ `).length*t*qp),dn=(e,t,r=!0)=>{const i=e,o=i.groupIds??[];if(o.includes(t)||(i.groupIds=[...o,t]),!r||!i.label)return;const s=i.label.groupIds??[];s.includes(t)||(i.label.groupIds=[...s,t])},Hp=new Ir({converter:e=>{const t=[],r=[];if(Object.values(e.nodes).forEach(i=>{!i||!i.length||i.forEach(o=>{let s;switch(o.type){case"line":s=Ze(o);break;case"rectangle":case"ellipse":s=Tr(o);break;case"text":s=Qe(o);break;default:throw`unknown type ${o.type}`}o.type==="rectangle"&&o?.subtype==="activation"?r.push(s):t.push(s)})}),Object.values(e.lines).forEach(i=>{i&&t.push(Ze(i))}),Object.values(e.arrows).forEach(i=>{i&&(t.push(Ks(i)),i.sequenceNumber&&t.push(Tr(i.sequenceNumber)))}),t.push(...r),e.loops){const{lines:i,texts:o,nodes:s}=e.loops;i.forEach(a=>{t.push(Ze(a))}),o.forEach(a=>{t.push(Qe(a))}),s.forEach(a=>{t.push(Tr(a))})}return e.groups&&e.groups.forEach(i=>{const{actorKeys:o,name:s}=i;let a=1/0,n=1/0,l=0,c=0;if(!o.length)return;const h=t.filter(w=>{if(w.id){const v=w.id.indexOf("-"),F=w.id.substring(0,v);return o.includes(F)}return!1});if(!h.length||(h.forEach(w=>{w.x===void 0||w.y===void 0||w.width===void 0||w.height===void 0||(a=Math.min(a,w.x),n=Math.min(n,w.y),l=Math.max(l,w.x+w.width),c=Math.max(c,w.y+w.height))}),!Number.isFinite(a)||!Number.isFinite(n)||!Number.isFinite(l)||!Number.isFinite(c)))return;const d=s?zp(s,Lo):0,u=s?Wp(s,Lo):0,g=l-a+mr*2,m=Math.max(g,u+mr*2),y=a-mr-(m-g)/2,C=n-mr-d,x=c-n+mr*2+d,b=ae(),S=ae(),B=Tr({type:"rectangle",x:y,y:C,width:m,height:x,bgColor:Np(i.fill)?void 0:i.fill,strokeColor:"#1f1f1f",strokeWidth:1,id:b,groupId:S});if(t.unshift(B),t.forEach(w=>{w.id!==b&&(w.x===void 0||w.y===void 0||w.width===void 0||w.height===void 0||w.x>=a&&w.x+w.width<=l&&w.y>=n&&w.y+w.height<=c&&dn(w,S))}),s){const w=Qe({id:ae(),text:s,x:y+Rp,y:C+mr,width:u,height:d,fontSize:Lo,color:"#1f1f1f",groupId:S});dn(w,S,!1),t.push(w)}}),{elements:t}}}),Yp=new Ir({converter:e=>{const t=[];return e.nodes.forEach(r=>{!r||!r.length||r.forEach(i=>{let o;switch(i.type){case"line":o=Ze(i);break;case"rectangle":case"ellipse":o=Tr(i);break;case"text":o=Qe(i);break;default:throw`unknown type ${i.type}`}t.push(o)})}),Object.values(e.lines).forEach(r=>{r&&t.push(Ze(r))}),Object.values(e.arrows).forEach(r=>{if(!r)return;const i=Ks(r);t.push(i)}),Object.values(e.text).forEach(r=>{const i=Qe(r);t.push(i)}),Object.values(e.namespaces).forEach(r=>{const i=Object.keys(r.classes),o=[...i],s=[...e.lines,...e.arrows,...e.text];i.forEach(n=>{const l=s.filter(c=>c.metadata&&c.metadata.classId===n).map(c=>c.id);l.length&&o.push(...l)});const a={type:"frame",id:ae(),name:r.id,children:o};t.push(a)}),{elements:t}}}),jp=new Ir({converter:e=>{const t=[];return e.nodes.forEach(r=>{!r||!r.length||r.forEach(i=>{let o;switch(i.type){case"line":o=Ze(i);break;case"rectangle":case"ellipse":o=Tr(i);break;case"text":o=Qe(i);break;default:throw`unknown type ${i.type}`}t.push(o)})}),e.lines.forEach(r=>{t.push(Ze(r))}),e.arrows.forEach(r=>{t.push(Ks(r))}),e.text.forEach(r=>{t.push(Qe(r))}),{elements:t}}}),ji=(e,t)=>[e,t],ti=16,fh=14,Xp=1,ms="#000000",mh=5,Gp=mh*2,Up=mh*2,Vp=1.25,yh=new Set(["choice","fork","join","stateStart","stateEnd","divider"]),ys=e=>e.shape==="stateEnd"?[`state_end_group_${e.id}`]:void 0,Ch=e=>e.shape==="rectWithTitle"&&e.description.length?[e.text,...e.description].join(`
10
+ `):e.text;let je;const Kp=()=>{if(je!==void 0)return je;if(typeof document>"u")return je=null,je;try{je=document.createElement("canvas").getContext("2d")}catch{je=null}return je},vr=(e,t)=>{const r=Kp();return r?(r.font=`${t}px Excalifont, sans-serif`,r.measureText(e).width):e.length*t*.6},Zp=(e,t,r)=>{if(vr(e,t)<=r)return[e];const i=[];let o="";for(const s of e){const a=`${o}${s}`;if(o&&vr(a,t)>r){i.push(o),o=s;continue}o=a}return o&&i.push(o),i},Qp=(e,t,r)=>{if(!e.trim()||vr(e,t)<=r)return e;const i=e.split(/\s+/).filter(Boolean),o=[];let s="";for(const a of i){const n=Zp(a,t,r);for(const[l,c]of n.entries()){const d=s?`${s}${s&&l===0?" ":""}${c}`:c;if(vr(d,t)<=r){s=d;continue}s&&o.push(s),s=c}n.length>1}return o.push(s),o.join(`
11
+ `)},Jp=(e,t,r)=>{const o=e.map(n=>Qp(n,t,r)).join(`
12
+ `).split(`
13
+ `),s=Math.max(...o.map(n=>vr(n,t))),a=o.length*t*Vp;return{width:s,height:a}},tf=(e,t,r,i)=>{const o=e.split(`
14
+ `);for(let s=ti;s>=fh;s-=Xp){const{height:a}=Jp(o,s,t);if(a<=r)return s}return i},ef=e=>{const t=Ch(e);if(!t||yh.has(e.shape))return ti;const r=Math.max(1,e.width-Gp),i=Math.max(1,e.height-Up),o=t.split(`
15
+ `);return o.length>1&&Math.max(...o.map(a=>vr(a,ti)))<=r?ti:tf(t,r,i,o.length===1?ti:fh)},rf=e=>{if(yh.has(e.shape))return;const t=Ch(e);if(t)return{text:t,fontSize:ef(e),verticalAlign:e.shape==="rectWithTitle"||e.shape==="roundedWithTitle"?"top":"middle",...gs(e.labelStyle)}},of=e=>{const t=gi(e.containerStyle),r=rf(e),i=e.shape==="choice"?"diamond":e.shape==="stateStart"||e.shape==="stateEnd"?"ellipse":"rectangle",o=e.shape==="rect"||e.shape==="rectWithTitle"||e.shape==="roundedWithTitle",s=e.shape==="stateStart"||e.shape==="fork"||e.shape==="join",a=t.backgroundColor||t.strokeColor||ms,n=t.strokeColor||t.backgroundColor||ms;return{id:e.id,type:i,...ys(e)?{groupIds:ys(e)}:{},x:e.x,y:e.y,width:e.width,height:e.height,...r?{label:r}:{},...t,...o?{roundness:{type:3}}:{},...s?{backgroundColor:a,strokeColor:n,fillStyle:"solid"}:{}}},sf=e=>{if(!e.dividerLine)return null;const t=gi(e.containerStyle);return{id:`${e.id}__divider`,type:"line",x:e.dividerLine.startX,y:e.dividerLine.startY,width:e.dividerLine.endX-e.dividerLine.startX,height:e.dividerLine.endY-e.dividerLine.startY,points:[ji(0,0),ji(e.dividerLine.endX-e.dividerLine.startX,e.dividerLine.endY-e.dividerLine.startY)],strokeColor:t.strokeColor||"#000",strokeWidth:t.strokeWidth||1}},af=e=>{const t=gi(e.containerStyle),r=Math.max(2,Math.min(e.width,e.height)*.32),i=e.endInnerColor||t.strokeColor||t.backgroundColor||ms;return{id:`${e.id}__inner`,type:"ellipse",groupIds:ys(e),x:e.x+r,y:e.y+r,width:Math.max(1,e.width-r*2),height:Math.max(1,e.height-r*2),backgroundColor:i,strokeColor:i,fillStyle:"solid",strokeWidth:1}},nf=e=>{const t=e.reflectionPoints.map((r,i,o)=>{const s=o[0];return i===0?ji(0,0):ji(r.x-s.x,r.y-s.y)});return{id:e.id,type:"arrow",x:e.startX,y:e.startY,width:e.endX-e.startX,height:e.endY-e.startY,points:t,strokeColor:e.strokeColor||"#000",strokeWidth:e.strokeWidth||2,strokeStyle:e.strokeStyle||"solid",endArrowhead:e.isNoteEdge?null:"triangle",roundness:{type:2},start:{id:e.start},end:{id:e.end},...e.text?{label:{text:e.text,fontSize:16}}:{}}},lf=new Ir({converter:e=>{const t=[];return e.nodes.forEach(r=>{if(!r.isRenderable)return;const i=of(r);t.push(i);const o=sf(r);o&&t.push(o),r.shape==="stateEnd"&&t.push(af(r))}),e.edges.forEach(r=>{t.push(nf(r))}),{elements:t}}}),Lr=e=>{e=cf(e);const t=e.replace(/#(\d+);/g,"&#$1;").replace(/#([a-z]+);/g,"&$1;"),r=document.createElement("textarea");return r.innerHTML=t,r.value},Je=e=>{const r=e.getAttribute("transform")?.match(/translate\(([ \d.-]+),\s*([\d.-]+)\)/);let i=0,o=0;return r&&(i=Number(r[1]),o=Number(r[2])),{transformX:i,transformY:o}},tr=e=>`"${e.replace(/["\\]/g,"\\$&").replace(/[\n\r\f]/g,t=>`\\${t.charCodeAt(0).toString(16)} `)}"`,hf=e=>{let t=e;return t=t.replace(/style.*:\S*#.*;/g,r=>r.substring(0,r.length-1)),t=t.replace(/classDef.*:\S*#.*;/g,r=>r.substring(0,r.length-1)),t=t.replace(/#\w+;/g,r=>{const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?`fl°°${i}¶ß`:`fl°${i}¶ß`}),t},cf=function(e){return e.replace(/fl°°/g,"#").replace(/fl°/g,"&").replace(/¶ß/g,";")},df=.5,Zs=(e,t=df)=>{const r=[];return e.forEach(i=>{const o=r[r.length-1];if(!o){r.push(i);return}Math.hypot(i[0]-o[0],i[1]-o[1])<=t||r.push(i)}),r},Qs=e=>{const t=e.getAttribute("d");if(!t)return null;const r=Array.from(t.matchAll(/-?\d*\.?\d+(?:e[-+]?\d+)?/gi),i=>Number(i[0]));return r.length<4?null:{startX:r[0],startY:r[1],endX:r[r.length-2],endY:r[r.length-1]}},xh=e=>{const t=e.getAttribute("data-points");if(!t){const r=Qs(e);return r?[{x:r.startX,y:r.startY},{x:r.endX,y:r.endY}]:[]}try{const r=atob(t),i=JSON.parse(r);return Array.isArray(i)?i.filter(o=>o&&typeof o.x=="number"&&typeof o.y=="number"&&Number.isFinite(o.x)&&Number.isFinite(o.y)):[]}catch{return[]}},bh=(e,t={x:0,y:0},r="LM")=>{if(e.tagName.toLowerCase()!=="path")throw new Error(`Invalid input: Expected an HTMLElement of tag "path", got ${e.tagName}`);const i=e.getAttribute("d");if(!i)throw new Error('Path element does not contain a "d" attribute');const o=i.split(new RegExp(`(?=[${r}])`)),s=o[0].substring(1).split(",").map(l=>parseFloat(l)),a=o[o.length-1].substring(1).split(",").map(l=>parseFloat(l)),n=o.map(l=>{const c=l[0],h=l.substring(1).split(",").map(d=>parseFloat(d));return c==="C"?{x:h[4],y:h[5],command:c}:{x:h[0],y:h[1],command:c}}).filter((l,c,h)=>{if(c===0||c===h.length-1)return!0;if(l.x===h[c-1].x&&l.y===h[c-1].y||c===h.length-2&&l.command==="C")return!1;if(c===h.length-2&&(h[c-1].x===l.x||h[c-1].y===l.y)){const d=h[h.length-1];return Math.hypot(d.x-l.x,d.y-l.y)>20}return l.x!==h[c-1].x||l.y!==h[c-1].y}).map(l=>({x:l.x+t.x,y:l.y+t.y}));return{startX:s[0]+t.x,startY:s[1]+t.y,endX:a[0]+t.x,endY:a[1]+t.y,reflectionPoints:n}},uf=e=>({...e,elements:e.elements.map(t=>{if(!("points"in t)||!Array.isArray(t.points))return t;const r=t.points;if(r.length<2)return t;const i=Zs(r);return i.length===r.length?t:{...t,points:i}})}),gf=(e,t={})=>{const r=(()=>{switch(e.type){case"graphImage":return $p.convert(e,t);case"flowchart":return Dp.convert(e,t);case"sequence":return Hp.convert(e,t);case"class":return Yp.convert(e,t);case"erd":return jp.convert(e,t);case"state":return lf.convert(e,t);default:throw new Error(`graphToExcalidraw: unknown graph type "${e.type}, only flowcharts are supported!"`)}})();return uf(r)};var kh=Object.defineProperty,p=(e,t)=>kh(e,"name",{value:t,configurable:!0}),pf=(e,t)=>{for(var r in t)kh(e,r,{get:t[r],enumerable:!0})},Ee={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},M={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Js=p(function(e="fatal"){let t=Ee.fatal;typeof e=="string"?e.toLowerCase()in Ee&&(t=Ee[e]):typeof e=="number"&&(t=e),M.trace=()=>{},M.debug=()=>{},M.info=()=>{},M.warn=()=>{},M.error=()=>{},M.fatal=()=>{},t<=Ee.fatal&&(M.fatal=console.error?console.error.bind(console,se("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",se("FATAL"))),t<=Ee.error&&(M.error=console.error?console.error.bind(console,se("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",se("ERROR"))),t<=Ee.warn&&(M.warn=console.warn?console.warn.bind(console,se("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",se("WARN"))),t<=Ee.info&&(M.info=console.info?console.info.bind(console,se("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",se("INFO"))),t<=Ee.debug&&(M.debug=console.debug?console.debug.bind(console,se("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",se("DEBUG"))),t<=Ee.trace&&(M.trace=console.debug?console.debug.bind(console,se("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",se("TRACE")))},"setLogLevel"),se=p(e=>`%c${Zg().format("ss.SSS")} : ${e} : `,"format"),Cs=p((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(o=>Cs(e,o,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(o=>{e.includes(o)||e.push(o)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const o=e;Object.entries(t).forEach(([s,a])=>{if(typeof a=="object"){if(a===null)return;Object.hasOwn(e,s)||Object.defineProperty(e,s,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),o[s]===void 0&&(o[s]=Array.isArray(a)?[]:{}),typeof o[s]=="object"&&(o[s]=Cs(o[s],a,{depth:r-1}))}else typeof o[s]!="object"&&(Object.hasOwn(e,s)?o[s]=a:Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),Yt=Cs,we="#ffffff",Be="#f2f2f2",ft=p((e,t)=>t?k(e,{s:-40,l:10}):k(e,{s:-40,l:-10}),"mkBorder"),ff=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||E(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||E(this.tertiaryColor),this.lineColor=this.lineColor||E(this.background),this.arrowheadColor=this.arrowheadColor||E(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?D(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||E(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||O(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||D(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||D(this.mainBkg,10)):(this.rowOdd=this.rowOdd||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||O(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=D(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=D(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||E(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||O(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||D(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||k(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||k(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||k(this.primaryColor,{h:64}),this.fillType3=this.fillType3||k(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||k(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||k(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||k(this.primaryColor,{h:128}),this.fillType7=this.fillType7||k(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||k(this.primaryColor,{l:-10}),this.pie5=this.pie5||k(this.secondaryColor,{l:-10}),this.pie6=this.pie6||k(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||k(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||k(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??k(this.primaryColor,{l:-30}),this.venn2=this.venn2??k(this.secondaryColor,{l:-30}),this.venn3=this.venn3??k(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??k(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??k(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??k(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??k(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??k(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||me(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?D(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||k(this.primaryColor,{h:-30}),this.git4=this.git4||k(this.primaryColor,{h:-60}),this.git5=this.git5||k(this.primaryColor,{h:-90}),this.git6=this.git6||k(this.primaryColor,{h:60}),this.git7=this.git7||k(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)),this.gitInv0=this.gitInv0||E(this.git0),this.gitInv1=this.gitInv1||E(this.git1),this.gitInv2=this.gitInv2||E(this.git2),this.gitInv3=this.gitInv3||E(this.git3),this.gitInv4=this.gitInv4||E(this.git4),this.gitInv5=this.gitInv5||E(this.git5),this.gitInv6=this.gitInv6||E(this.git6),this.gitInv7=this.gitInv7||E(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||we,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Be,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},mf=p(e=>{const t=new ff;return t.calculate(e),t},"getThemeVariables"),yf=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=E(this.background),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=E(this.primaryColor),this.secondaryTextColor=E(this.secondaryColor),this.tertiaryTextColor=E(this.tertiaryColor),this.lineColor=E(this.background),this.textColor=E(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(E("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ke(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=D("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=D(this.sectionBkgColor,10),this.taskBorderColor=Ke(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ke(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||O(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||D(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=O(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=O(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=O(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=E(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=k(this.primaryColor,{h:64}),this.fillType3=k(this.secondaryColor,{h:64}),this.fillType4=k(this.primaryColor,{h:-64}),this.fillType5=k(this.secondaryColor,{h:-64}),this.fillType6=k(this.primaryColor,{h:128}),this.fillType7=k(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||E(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||O(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||k(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this["surfacePeer"+e]=this["surfacePeer"+e]||k(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let e=0;e<8;e++)this["venn"+(e+1)]=this["venn"+(e+1)]??O(this["cScale"+e],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||me(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?D(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=O(this.secondaryColor,20),this.git1=O(this.pie2||this.secondaryColor,20),this.git2=O(this.pie3||this.tertiaryColor,20),this.git3=O(this.pie4||k(this.primaryColor,{h:-30}),20),this.git4=O(this.pie5||k(this.primaryColor,{h:-60}),20),this.git5=O(this.pie6||k(this.primaryColor,{h:-90}),10),this.git6=O(this.pie7||k(this.primaryColor,{h:60}),10),this.git7=O(this.pie8||k(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||E(this.git0),this.gitInv1=this.gitInv1||E(this.git1),this.gitInv2=this.gitInv2||E(this.git2),this.gitInv3=this.gitInv3||E(this.git3),this.gitInv4=this.gitInv4||E(this.git4),this.gitInv5=this.gitInv5||E(this.git5),this.gitInv6=this.gitInv6||E(this.git6),this.gitInv7=this.gitInv7||E(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||E(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||E(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||O("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||O("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||O("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||O("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||O(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||O(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||O(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||O(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Cf=p(e=>{const t=new yf;return t.calculate(e),t},"getThemeVariables"),xf=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=k(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=E(this.primaryColor),this.secondaryTextColor=E(this.secondaryColor),this.tertiaryTextColor=E(this.tertiaryColor),this.lineColor=E(this.background),this.textColor=E(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Ke(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||D(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||D(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=D(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||D(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||k(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||k(this.mainBkg,{h:30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||k(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||E(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||E(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||O(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||O(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=k(this.primaryColor,{h:64}),this.fillType3=k(this.secondaryColor,{h:64}),this.fillType4=k(this.primaryColor,{h:-64}),this.fillType5=k(this.secondaryColor,{h:-64}),this.fillType6=k(this.primaryColor,{h:128}),this.fillType7=k(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||k(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||k(this.primaryColor,{l:-10}),this.pie5=this.pie5||k(this.secondaryColor,{l:-30}),this.pie6=this.pie6||k(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||k(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||k(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??k(this.primaryColor,{l:-30}),this.venn2=this.venn2??k(this.secondaryColor,{l:-30}),this.venn3=this.venn3??k(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??k(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??k(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??k(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??k(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??k(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||me(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||k(this.primaryColor,{h:-30}),this.git4=this.git4||k(this.primaryColor,{h:-60}),this.git5=this.git5||k(this.primaryColor,{h:-90}),this.git6=this.git6||k(this.primaryColor,{h:60}),this.git7=this.git7||k(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)),this.gitInv0=this.gitInv0||D(E(this.git0),25),this.gitInv1=this.gitInv1||E(this.git1),this.gitInv2=this.gitInv2||E(this.git2),this.gitInv3=this.gitInv3||E(this.git3),this.gitInv4=this.gitInv4||E(this.git4),this.gitInv5=this.gitInv5||E(this.git5),this.gitInv6=this.gitInv6||E(this.git6),this.gitInv7=this.gitInv7||E(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||E(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||E(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||we,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Be}calculate(e){if(Object.keys(this).forEach(r=>{this[r]==="calculated"&&(this[r]=void 0)}),typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},bf=p(e=>{const t=new xf;return t.calculate(e),t},"getThemeVariables"),kf=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=O("#cde498",10),this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=E(this.primaryColor),this.secondaryTextColor=E(this.secondaryColor),this.tertiaryTextColor=E(this.primaryColor),this.lineColor=E(this.background),this.textColor=E(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=D(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||D(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||D(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=D(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||D(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||k(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||k(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||k(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||O(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=k(this.primaryColor,{h:64}),this.fillType3=k(this.secondaryColor,{h:64}),this.fillType4=k(this.primaryColor,{h:-64}),this.fillType5=k(this.secondaryColor,{h:-64}),this.fillType6=k(this.primaryColor,{h:128}),this.fillType7=k(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||k(this.primaryColor,{l:-30}),this.pie5=this.pie5||k(this.secondaryColor,{l:-30}),this.pie6=this.pie6||k(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||k(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||k(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??k(this.primaryColor,{l:-30}),this.venn2=this.venn2??k(this.secondaryColor,{l:-30}),this.venn3=this.venn3??k(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??k(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??k(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??k(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??k(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??k(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||me(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||k(this.primaryColor,{h:-30}),this.git4=this.git4||k(this.primaryColor,{h:-60}),this.git5=this.git5||k(this.primaryColor,{h:-90}),this.git6=this.git6||k(this.primaryColor,{h:60}),this.git7=this.git7||k(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)),this.gitInv0=this.gitInv0||E(this.git0),this.gitInv1=this.gitInv1||E(this.git1),this.gitInv2=this.gitInv2||E(this.git2),this.gitInv3=this.gitInv3||E(this.git3),this.gitInv4=this.gitInv4||E(this.git4),this.gitInv5=this.gitInv5||E(this.git5),this.gitInv6=this.gitInv6||E(this.git6),this.gitInv7=this.gitInv7||E(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||E(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||E(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||we,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Be}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Sf=p(e=>{const t=new kf;return t.calculate(e),t},"getThemeVariables"),Tf=class{static{p(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=O(this.contrast,55),this.background="#ffffff",this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=E(this.primaryColor),this.secondaryTextColor=E(this.secondaryColor),this.tertiaryTextColor=E(this.tertiaryColor),this.lineColor=E(this.background),this.textColor=E(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=O(this.contrast,55),this.border2=this.contrast,this.actorBorder=O(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||E(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||O(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||D(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||k(this.mainBkg,{l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||k(this.mainBkg,{l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=O(this.contrast,30),this.sectionBkgColor2=O(this.contrast,30),this.taskBorderColor=D(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=O(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=D(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=k(this.primaryColor,{h:64}),this.fillType3=k(this.secondaryColor,{h:64}),this.fillType4=k(this.primaryColor,{h:-64}),this.fillType5=k(this.secondaryColor,{h:-64}),this.fillType6=k(this.primaryColor,{h:128}),this.fillType7=k(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let e=0;e<8;e++)this["venn"+(e+1)]=this["venn"+(e+1)]??this["cScale"+e];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||me(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=D(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||k(this.primaryColor,{h:-30}),this.git4=this.pie5||k(this.primaryColor,{h:-60}),this.git5=this.pie6||k(this.primaryColor,{h:-90}),this.git6=this.pie7||k(this.primaryColor,{h:60}),this.git7=this.pie8||k(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||E(this.git0),this.gitInv1=this.gitInv1||E(this.git1),this.gitInv2=this.gitInv2||E(this.git2),this.gitInv3=this.gitInv3||E(this.git3),this.gitInv4=this.gitInv4||E(this.git4),this.gitInv5=this.gitInv5||E(this.git5),this.gitInv6=this.gitInv6||E(this.git6),this.gitInv7=this.gitInv7||E(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||we,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Be}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},wf=p(e=>{const t=new Tf;return t.calculate(e),t},"getThemeVariables"),Bf=class{static{p(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||E(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||E(this.tertiaryColor),this.lineColor=this.lineColor||E(this.background),this.arrowheadColor=this.arrowheadColor||E(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?D(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||E(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=k(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||O(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||k(e,{h:30}),this.cScale4=this.cScale4||k(e,{h:60}),this.cScale5=this.cScale5||k(e,{h:90}),this.cScale6=this.cScale6||k(e,{h:120}),this.cScale7=this.cScale7||k(e,{h:150}),this.cScale8=this.cScale8||k(e,{h:210,l:150}),this.cScale9=this.cScale9||k(e,{h:270}),this.cScale10=this.cScale10||k(e,{h:300}),this.cScale11=this.cScale11||k(e,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=D(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=D(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||E(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||O(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||D(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||k(this.mainBkg,{h:180,s:-15,l:i*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||k(this.mainBkg,{h:180,s:-15,l:i*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||k(e,{h:64}),this.fillType3=this.fillType3||k(t,{h:64}),this.fillType4=this.fillType4||k(e,{h:-64}),this.fillType5=this.fillType5||k(t,{h:-64}),this.fillType6=this.fillType6||k(e,{h:128}),this.fillType7=this.fillType7||k(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||r,this.pie4=this.pie4||k(e,{l:-10}),this.pie5=this.pie5||k(t,{l:-10}),this.pie6=this.pie6||k(r,{l:-10}),this.pie7=this.pie7||k(e,{h:60,l:-10}),this.pie8=this.pie8||k(e,{h:-60,l:-10}),this.pie9=this.pie9||k(e,{h:120,l:0}),this.pie10=this.pie10||k(e,{h:60,l:-20}),this.pie11=this.pie11||k(e,{h:-60,l:-20}),this.pie12=this.pie12||k(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||k(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||me(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?D(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||k(e,{h:-30}),this.git4=this.git4||k(e,{h:-60}),this.git5=this.git5||k(e,{h:-90}),this.git6=this.git6||k(e,{h:60}),this.git7=this.git7||k(e,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)),this.gitInv0=this.gitInv0||E(this.git0),this.gitInv1=this.gitInv1||E(this.git1),this.gitInv2=this.gitInv2||E(this.git2),this.gitInv3=this.gitInv3||E(this.git3),this.gitInv4=this.gitInv4||E(this.git4),this.gitInv5=this.gitInv5||E(this.git5),this.gitInv6=this.gitInv6||E(this.git6),this.gitInv7=this.gitInv7||E(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||we,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Be}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},vf=p(e=>{const t=new Bf;return t.calculate(e),t},"getThemeVariables"),Lf=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=E(this.background),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=E(this.primaryColor),this.secondaryTextColor=E(this.secondaryColor),this.tertiaryTextColor=E(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(E("#323D47"),10),this.border1="#ccc",this.border2=Ke(255,255,255,.25),this.arrowheadColor=E(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||E(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||E(this.tertiaryColor),this.lineColor=this.lineColor||E(this.background),this.arrowheadColor=this.arrowheadColor||E(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?D(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||E(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||O(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=D(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=D(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||E(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||O(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||D(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||k(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||k(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||k(this.primaryColor,{h:64}),this.fillType3=this.fillType3||k(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||k(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||k(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||k(this.primaryColor,{h:128}),this.fillType7=this.fillType7||k(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||k(this.primaryColor,{l:-10}),this.pie5=this.pie5||k(this.secondaryColor,{l:-10}),this.pie6=this.pie6||k(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||k(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||k(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||me(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?D(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)),this.gitInv0=this.gitInv0||E(this.git0),this.gitInv1=this.gitInv1||E(this.git1),this.gitInv2=this.gitInv2||E(this.git2),this.gitInv3=this.gitInv3||E(this.git3),this.gitInv4=this.gitInv4||E(this.git4),this.gitInv5=this.gitInv5||E(this.git5),this.gitInv6=this.gitInv6||E(this.git6),this.gitInv7=this.gitInv7||E(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||we,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Be}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Ff=p(e=>{const t=new Lf;return t.calculate(e),t},"getThemeVariables"),Ef=class{static{p(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ft("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||E(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||E(this.tertiaryColor),this.lineColor=this.lineColor||E(this.background),this.arrowheadColor=this.arrowheadColor||E(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?D(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||E(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=k(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||O(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=this.mainBkg;if(this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=D(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=D(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||E(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||O(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||D(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||k(this.mainBkg,{h:180,s:-15,l:i*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||k(this.mainBkg,{h:180,s:-15,l:i*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||k(e,{h:64}),this.fillType3=this.fillType3||k(t,{h:64}),this.fillType4=this.fillType4||k(e,{h:-64}),this.fillType5=this.fillType5||k(t,{h:-64}),this.fillType6=this.fillType6||k(e,{h:128}),this.fillType7=this.fillType7||k(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||r,this.pie4=this.pie4||k(e,{l:-10}),this.pie5=this.pie5||k(t,{l:-10}),this.pie6=this.pie6||k(r,{l:-10}),this.pie7=this.pie7||k(e,{h:60,l:-10}),this.pie8=this.pie8||k(e,{h:-60,l:-10}),this.pie9=this.pie9||k(e,{h:120,l:0}),this.pie10=this.pie10||k(e,{h:60,l:-20}),this.pie11=this.pie11||k(e,{h:-60,l:-20}),this.pie12=this.pie12||k(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||k(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||me(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?D(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||k(e,{h:-30}),this.git4=this.git4||k(e,{h:-60}),this.git5=this.git5||k(e,{h:-90}),this.git6=this.git6||k(e,{h:60}),this.git7=this.git7||k(e,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)),this.gitInv0=this.gitInv0||E(this.git0),this.gitInv1=this.gitInv1||E(this.git1),this.gitInv2=this.gitInv2||E(this.git2),this.gitInv3=this.gitInv3||E(this.git3),this.gitInv4=this.gitInv4||E(this.git4),this.gitInv5=this.gitInv5||E(this.git5),this.gitInv6=this.gitInv6||E(this.git6),this.gitInv7=this.gitInv7||E(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||we,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Be}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Af=p(e=>{const t=new Ef;return t.calculate(e),t},"getThemeVariables"),_f=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=E(this.background),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=E(this.primaryColor),this.secondaryTextColor=E(this.secondaryColor),this.tertiaryTextColor=E(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(E("#323D47"),10),this.border1="#ccc",this.border2=Ke(255,255,255,.25),this.arrowheadColor=E(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||E(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||E(this.tertiaryColor),this.lineColor=this.lineColor||E(this.background),this.arrowheadColor=this.arrowheadColor||E(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?D(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||E(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||O(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=D(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=D(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||E(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||O(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||D(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||k(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||k(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||k(this.primaryColor,{h:64}),this.fillType3=this.fillType3||k(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||k(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||k(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||k(this.primaryColor,{h:128}),this.fillType7=this.fillType7||k(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||k(this.primaryColor,{l:-10}),this.pie5=this.pie5||k(this.secondaryColor,{l:-10}),this.pie6=this.pie6||k(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||k(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||k(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||me(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?D(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||k(this.primaryColor,{h:-30}),this.git4=this.git4||k(this.primaryColor,{h:-60}),this.git5=this.git5||k(this.primaryColor,{h:-90}),this.git6=this.git6||k(this.primaryColor,{h:60}),this.git7=this.git7||k(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)),this.gitInv0=this.gitInv0||E(this.git0),this.gitInv1=this.gitInv1||E(this.git1),this.gitInv2=this.gitInv2||E(this.git2),this.gitInv3=this.gitInv3||E(this.git3),this.gitInv4=this.gitInv4||E(this.git4),this.gitInv5=this.gitInv5||E(this.git5),this.gitInv6=this.gitInv6||E(this.git6),this.gitInv7=this.gitInv7||E(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||we,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Be}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Mf=p(e=>{const t=new _f;return t.calculate(e),t},"getThemeVariables"),If=class{static{p(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||E(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||E(this.tertiaryColor),this.lineColor=this.lineColor||E(this.background),this.arrowheadColor=this.arrowheadColor||E(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?D(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||E(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=k(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||O(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||E(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||O(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||D(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||k(this.mainBkg,{h:180,s:-15,l:i*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||k(this.mainBkg,{h:180,s:-15,l:i*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||k(e,{h:64}),this.fillType3=this.fillType3||k(t,{h:64}),this.fillType4=this.fillType4||k(e,{h:-64}),this.fillType5=this.fillType5||k(t,{h:-64}),this.fillType6=this.fillType6||k(e,{h:128}),this.fillType7=this.fillType7||k(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||r,this.pie4=this.pie4||k(e,{l:-10}),this.pie5=this.pie5||k(t,{l:-10}),this.pie6=this.pie6||k(r,{l:-10}),this.pie7=this.pie7||k(e,{h:60,l:-10}),this.pie8=this.pie8||k(e,{h:-60,l:-10}),this.pie9=this.pie9||k(e,{h:120,l:0}),this.pie10=this.pie10||k(e,{h:60,l:-20}),this.pie11=this.pie11||k(e,{h:-60,l:-20}),this.pie12=this.pie12||k(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||k(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||me(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?D(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||k(e,{h:-30}),this.git4=this.git4||k(e,{h:-60}),this.git5=this.git5||k(e,{h:-90}),this.git6=this.git6||k(e,{h:60}),this.git7=this.git7||k(e,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)),this.gitInv0=this.gitInv0||E(this.git0),this.gitInv1=this.gitInv1||E(this.git1),this.gitInv2=this.gitInv2||E(this.git2),this.gitInv3=this.gitInv3||E(this.git3),this.gitInv4=this.gitInv4||E(this.git4),this.gitInv5=this.gitInv5||E(this.git5),this.gitInv6=this.gitInv6||E(this.git6),this.gitInv7=this.gitInv7||E(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||we,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Be}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Of=p(e=>{const t=new If;return t.calculate(e),t},"getThemeVariables"),Df=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=E(this.background),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=E(this.primaryColor),this.secondaryTextColor=E(this.secondaryColor),this.tertiaryTextColor=E(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(E("#323D47"),10),this.border1="#ccc",this.border2=Ke(255,255,255,.25),this.arrowheadColor=E(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||E(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||E(this.tertiaryColor),this.lineColor=this.lineColor||E(this.background),this.arrowheadColor=this.arrowheadColor||E(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?D(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||E(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||O(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||E(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||O(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||D(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=D(this["cScale"+t],75);const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||k(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||k(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||k(this.primaryColor,{h:64}),this.fillType3=this.fillType3||k(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||k(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||k(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||k(this.primaryColor,{h:128}),this.fillType7=this.fillType7||k(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||k(this.primaryColor,{l:-10}),this.pie5=this.pie5||k(this.secondaryColor,{l:-10}),this.pie6=this.pie6||k(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||k(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||k(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||me(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?D(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||k(this.primaryColor,{h:-30}),this.git4=this.git4||k(this.primaryColor,{h:-60}),this.git5=this.git5||k(this.primaryColor,{h:-90}),this.git6=this.git6||k(this.primaryColor,{h:60}),this.git7=this.git7||k(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)),this.gitInv0=this.gitInv0||E(this.git0),this.gitInv1=this.gitInv1||E(this.git1),this.gitInv2=this.gitInv2||E(this.git2),this.gitInv3=this.gitInv3||E(this.git3),this.gitInv4=this.gitInv4||E(this.git4),this.gitInv5=this.gitInv5||E(this.git5),this.gitInv6=this.gitInv6||E(this.git6),this.gitInv7=this.gitInv7||E(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||we,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Be}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},$f=p(e=>{const t=new Df;return t.calculate(e),t},"getThemeVariables"),Me={base:{getThemeVariables:mf},dark:{getThemeVariables:Cf},default:{getThemeVariables:bf},forest:{getThemeVariables:Sf},neutral:{getThemeVariables:wf},neo:{getThemeVariables:vf},"neo-dark":{getThemeVariables:Ff},redux:{getThemeVariables:Af},"redux-dark":{getThemeVariables:Mf},"redux-color":{getThemeVariables:Of},"redux-dark-color":{getThemeVariables:$f}},jt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Sh={...jt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:Me.default.getThemeVariables(),sequence:{...jt.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...jt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...jt.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...jt.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...jt.pie,useWidth:984},xyChart:{...jt.xyChart,useWidth:void 0},requirement:{...jt.requirement,useWidth:void 0},packet:{...jt.packet},eventmodeling:{...jt.eventmodeling},treeView:{...jt.treeView,useWidth:void 0},radar:{...jt.radar},railroad:{...jt.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...jt.ishikawa},sankey:{...jt.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...jt.venn},cynefin:{...jt.cynefin}},Th=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Th(e[i],"")]:[...r,t+i],[]),"keyify"),Pf=new Set(Th(Sh,"")),wh=Sh,Rf={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},qf=p((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(M.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),Xi=p(e=>{if(M.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Xi(t));return}for(const t of Object.keys(e)){if(M.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Pf.has(t)||e[t]==null){M.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=Rf[t];i?qf(e[t],i):(M.debug("sanitizing object",t),Xi(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(M.debug("sanitizing css option",t),e[t]=Bh(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}M.debug("After sanitization",e)}},"sanitizeDirective"),Bh=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Fr=Object.freeze(wh),ve=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),ie=Yt({},Fr),Gi,er=[],li=Yt({},Fr),xi=p((e,t)=>{let r=Yt({},e),i={};for(const o of t)Fh(o),i=Yt(i,o);if(r=Yt(r,i),i.theme&&i.theme in Me){const o=Yt({},Gi),s=Yt(o.themeVariables||{},i.themeVariables);r.theme&&r.theme in Me&&(r.themeVariables=Me[r.theme].getThemeVariables(s))}return li=r,jf(li),li},"updateCurrentConfig"),Nf=p(e=>(ie=Yt({},Fr),ie=Yt(ie,e),e.theme&&Me[e.theme]&&(ie.themeVariables=Me[e.theme].getThemeVariables(e.themeVariables)),xi(ie,er),ie),"setSiteConfig"),Wf=p(e=>{Gi=Yt({},e)},"saveConfigFromInitialize"),zf=p(e=>(ie=Yt(ie,e),xi(ie,er),ie),"updateSiteConfig"),vh=p(()=>Yt({},ie),"getSiteConfig"),Lh=p(e=>(xi(li,[e]),$t()),"setConfig"),$t=p(()=>Yt({},li),"getConfig"),Fh=p(e=>{e&&(["secure",...ie.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(M.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Fh(e[t])}))},"sanitize"),Hf=p(e=>{Xi(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),er.push(e),xi(ie,er)},"addDirective"),Ui=p((e=ie)=>{er=[],xi(e,er)},"reset"),Yf={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},un={},Eh=p(e=>{un[e]||(M.warn(Yf[e]),un[e]=!0)},"issueWarning"),jf=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Eh("LAZY_LOAD_DEPRECATED")},"checkConfig"),Z2=p(()=>{let e={};Gi&&(e=Yt(e,Gi));for(const t of er)e=Yt(e,t);return e},"getUserDefinedConfig"),Qt=p(e=>(e.flowchart?.htmlLabels!=null&&Eh("FLOWCHART_HTML_LABELS_DEPRECATED"),ve(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),Ah=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,hi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Xf=/\s*%%.*\n/gm,_h=class extends Error{static{p(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}},rr={},ta=p(function(e,t){e=e.replace(Ah,"").replace(hi,"").replace(Xf,`
16
+ `);for(const[r,{detector:i}]of Object.entries(rr))if(i(e,t))return r;throw new _h(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),xs=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)Mh(t,r,i)},"registerLazyLoadedDiagrams"),Mh=p((e,t,r)=>{rr[e]&&M.warn(`Detector with key ${e} already exists. Overwriting.`),rr[e]={detector:t,loader:r},M.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Gf=p(e=>rr[e].loader,"getDiagramLoader"),bi=/<br\s*\/?>/gi,Uf=p(e=>e?Dh(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Vf=(()=>{let e=!1;return()=>{e||(Ih(),e=!0)}})();function Ih(){const e="data-temp-href-target";Br.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Br.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(Ih,"setupDompurifyHooks");var Oh=p(e=>(Vf(),Br.sanitize(e)),"removeScript"),gn=p((e,t)=>{if(Qt(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Oh(e):r!=="loose"&&(e=Dh(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=Jf(e))}return e},"sanitizeMore"),ne=p((e,t)=>e&&(t.dompurifyConfig?e=Br.sanitize(gn(e,t),t.dompurifyConfig).toString():e=Br.sanitize(gn(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Kf=p((e,t)=>typeof e=="string"?ne(e,t):e.flat().map(r=>ne(r,t)),"sanitizeTextOrArray"),Zf=p(e=>bi.test(e),"hasBreaks"),Qf=p(e=>e.split(bi),"splitBreaks"),Jf=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Dh=p(e=>e.replace(bi,"#br#"),"breakToPlaceholder"),tm=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),em=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),rm=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),pn=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let o=t[i];if(o===","&&i>0&&i+1<t.length){const s=t[i-1],a=t[i+1];im(s,a)&&(o=s+","+a,i++,r.pop())}r.push(om(o))}return r.join("")},"parseGenericTypes"),bs=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),im=p((e,t)=>{const r=bs(e,"~"),i=bs(t,"~");return r===1&&i===1},"shouldCombineSets"),om=p(e=>{const t=bs(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let o=i.indexOf("~"),s=i.lastIndexOf("~");for(;o!==-1&&s!==-1&&o!==s;)i[o]="<",i[s]=">",o=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),fn=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),ks=/\$\$(.*?)\$\$/g,pi=p(e=>(e.match(ks)?.length??0)>0,"hasKatex"),Q2=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await $h(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},"calculateMathMLDimensions"),sm=p(async(e,t)=>{if(!pi(e))return e;if(!(fn()||t.legacyMathML||t.forceLegacyMathML))return e.replace(ks,"MathML is unsupported in this environment.");{const{default:r}=await yt(async()=>{const{default:o}=await import("../datalayer-app-main.js").then(s=>s.u0);return{default:o}},[],import.meta.url),i=t.forceLegacyMathML||!fn()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(bi).map(o=>pi(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(ks,(o,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),$h=p(async(e,t)=>ne(await sm(e,t),t),"renderKatexSanitized"),ki={getRows:Uf,sanitizeText:ne,sanitizeTextOrArray:Kf,hasBreaks:Zf,splitBreaks:Qf,lineBreakRegex:bi,removeScript:Oh,getUrl:tm,evaluate:ve,getMax:em,getMin:rm},am=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),nm=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Ph=p(function(e,t,r,i){const o=nm(t,r,i);am(e,o)},"configureSvgSize"),lm=p(function(e,t,r,i){const o=t.node().getBBox(),s=o.width,a=o.height;M.info(`SVG bounds: ${s}x${a}`,o);let n=0,l=0;M.info(`Graph bounds: ${n}x${l}`,e),n=s+r*2,l=a+r*2,M.info(`Calculated bounds: ${n}x${l}`),Ph(t,l,n,i);const c=`${o.x-r} ${o.y-r} ${o.width+2*r} ${o.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),qi={};function Ss(e){return[...e.cssRules].map(t=>t.cssText).join(`
17
+ `)}p(Ss,"cssStyleSheetToString");var hm=p((e,t,r,i)=>{let o="";return e in qi&&qi[e]?o=qi[e]({...r,svgId:i}):M.warn(`No theme found for ${e}`),`& {
18
+ font-family: ${r.fontFamily};
19
+ font-size: ${r.fontSize};
20
+ fill: ${r.textColor}
21
+ }
22
+ @keyframes edge-animation-frame {
23
+ from {
24
+ stroke-dashoffset: 0;
25
+ }
26
+ }
27
+ @keyframes dash {
28
+ to {
29
+ stroke-dashoffset: 0;
30
+ }
31
+ }
32
+ & .edge-animation-slow {
33
+ stroke-dasharray: 9,5 !important;
34
+ stroke-dashoffset: 900;
35
+ animation: dash 50s linear infinite;
36
+ stroke-linecap: round;
37
+ }
38
+ & .edge-animation-fast {
39
+ stroke-dasharray: 9,5 !important;
40
+ stroke-dashoffset: 900;
41
+ animation: dash 20s linear infinite;
42
+ stroke-linecap: round;
43
+ }
44
+ /* Classes common for multiple diagrams */
45
+
46
+ & .error-icon {
47
+ fill: ${r.errorBkgColor};
48
+ }
49
+ & .error-text {
50
+ fill: ${r.errorTextColor};
51
+ stroke: ${r.errorTextColor};
52
+ }
53
+
54
+ & .edge-thickness-normal {
55
+ stroke-width: ${r.strokeWidth??1}px;
56
+ }
57
+ & .edge-thickness-thick {
58
+ stroke-width: 3.5px
59
+ }
60
+ & .edge-pattern-solid {
61
+ stroke-dasharray: 0;
62
+ }
63
+ & .edge-thickness-invisible {
64
+ stroke-width: 0;
65
+ fill: none;
66
+ }
67
+ & .edge-pattern-dashed{
68
+ stroke-dasharray: 3;
69
+ }
70
+ .edge-pattern-dotted {
71
+ stroke-dasharray: 2;
72
+ }
73
+
74
+ & .marker {
75
+ fill: ${r.lineColor};
76
+ stroke: ${r.lineColor};
77
+ }
78
+ & .marker.cross {
79
+ stroke: ${r.lineColor};
80
+ }
81
+
82
+ & svg {
83
+ font-family: ${r.fontFamily};
84
+ font-size: ${r.fontSize};
85
+ }
86
+ & p {
87
+ margin: 0
88
+ }
89
+
90
+ ${o}
91
+ .node .neo-node {
92
+ stroke: ${r.nodeBorder};
93
+ }
94
+
95
+ [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
96
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
97
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
98
+ }
99
+ [data-look="neo"].swimlane.cluster rect {
100
+ filter: none;
101
+ }
102
+
103
+
104
+ [data-look="neo"].node path {
105
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
106
+ stroke-width: ${r.strokeWidth??1}px;
107
+ }
108
+
109
+ [data-look="neo"].node .outer-path {
110
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
111
+ }
112
+
113
+ [data-look="neo"].node .neo-line path {
114
+ stroke: ${r.nodeBorder};
115
+ filter: none;
116
+ }
117
+
118
+ [data-look="neo"].node circle{
119
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
120
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
121
+ }
122
+
123
+ [data-look="neo"].node circle .state-start{
124
+ fill: #000000;
125
+ }
126
+
127
+ [data-look="neo"].icon-shape .icon {
128
+ fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
129
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
130
+ }
131
+
132
+ [data-look="neo"].icon-shape .icon-neo path {
133
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
134
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
135
+ }
136
+
137
+ ${t}
138
+ `},"getStyles"),cm=p((e,t)=>{t!==void 0&&(qi[e]=t)},"addStylesForDiagram"),dm=hm,Rh={};pf(Rh,{clear:()=>um,getAccDescription:()=>mm,getAccTitle:()=>pm,getDiagramTitle:()=>Cm,setAccDescription:()=>fm,setAccTitle:()=>gm,setDiagramTitle:()=>ym});var ea="",ra="",ia="",oa=p(e=>ne(e,$t()),"sanitizeText"),um=p(()=>{ea="",ia="",ra=""},"clear"),gm=p(e=>{ea=oa(e).replace(/^\s+/g,"")},"setAccTitle"),pm=p(()=>ea,"getAccTitle"),fm=p(e=>{ia=oa(e).replace(/\n\s+/g,`
139
+ `)},"setAccDescription"),mm=p(()=>ia,"getAccDescription"),ym=p(e=>{ra=oa(e)},"setDiagramTitle"),Cm=p(()=>ra,"getDiagramTitle"),mn=M,xm=Js,Bt=$t,J2=Lh,tS=Fr,sa=p(e=>ne(e,Bt()),"sanitizeText"),bm=lm,km=p(()=>Rh,"getCommonDb"),Vi={},Ki=p((e,t,r)=>{Vi[e]&&mn.warn(`Diagram with id ${e} already registered. Overwriting.`),Vi[e]=t,r&&Mh(e,r),cm(e,t.styles),t.injectUtils?.(mn,xm,Bt,sa,bm,km(),()=>{})},"registerDiagram"),Ts=p(e=>{if(e in Vi)return Vi[e];throw new Sm(e)},"getDiagram"),Sm=class extends Error{static{p(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}},Tm=p(e=>{const{securityLevel:t}=Bt();let r=mt("body");if(t==="sandbox"){const s=mt(`#i${e}`).node()?.contentDocument??document;r=mt(s.body)}return r.select(`#${e}`)},"selectSvgElement"),wm=p(e=>{const{handDrawnSeed:t}=Bt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Bm=p(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),Or=p(e=>{const t=vm([...e.cssCompiledStyles||[],...e.cssStyles||[],...Bm(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),vm=p(e=>{const t=new Map;return e.forEach(r=>{const[i,o]=r.split(":");t.set(i.trim(),o?.trim())}),t},"styles2Map"),qh=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),at=p(e=>{const{stylesArray:t}=Or(e),r=[],i=[],o=[],s=[];return t.forEach(a=>{const n=a[0];qh(n)?r.push(a.join(":")+" !important"):(i.push(a.join(":")+" !important"),n.includes("stroke")&&o.push(a.join(":")+" !important"),n==="fill"&&s.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:o,backgroundStyles:s}},"styles2String"),et=p((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=Bt(),{nodeBorder:o,mainBkg:s}=r,{stylesMap:a}=Or(e);return Object.assign({roughness:.7,fill:a.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||o,seed:i,strokeWidth:a.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:Lm(a.get("stroke-dasharray"))},t)},"userNodeOverrides"),Lm=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const o=isNaN(t[0])?0:t[0];return[o,o]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),Fm={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},ws=new Map,Nh=new Map,Em=p(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(M.debug("Registering icon pack:",t.name),"loader"in t)Nh.set(t.name,t.loader);else if("icons"in t)ws.set(t.name,t.icons);else throw M.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Wh=p(async(e,t)=>{const r=hp(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let o=ws.get(i);if(!o){const a=Nh.get(i);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{o={...await a(),prefix:i},ws.set(i,o)}catch(n){throw M.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=cp(o,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),Am=p(async e=>{try{return await Wh(e),!0}catch{return!1}},"isIconAvailable"),Si=p(async(e,t,r)=>{let i;try{i=await Wh(e,t?.fallbackPrefix)}catch(a){M.error(a),i=Fm}const o=ap(i,t),s=np(lp(o.body),{...o.attributes,...r});return ne(s,$t())},"getIconSVG"),Li={},Ht={},yn;function _m(){return yn||(yn=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.BLANK_URL=Ht.relativeFirstCharacters=Ht.whitespaceEscapeCharsRegex=Ht.urlSchemeRegex=Ht.ctrlCharactersRegex=Ht.htmlCtrlEntityRegex=Ht.htmlEntitiesRegex=Ht.invalidProtocolRegex=void 0,Ht.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Ht.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Ht.htmlCtrlEntityRegex=/&(newline|tab);/gi,Ht.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Ht.urlSchemeRegex=/^.+(:|&colon;)/gim,Ht.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Ht.relativeFirstCharacters=[".","/"],Ht.BLANK_URL="about:blank"),Ht}var Cn;function Mm(){if(Cn)return Li;Cn=1,Object.defineProperty(Li,"__esModule",{value:!0}),Li.sanitizeUrl=s;var e=_m();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function r(a){var n=a.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(a){return URL.canParse(a)}function o(a){try{return decodeURIComponent(a)}catch{return a}}function s(a){if(!a)return e.BLANK_URL;var n,l=o(a.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=o(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),d=h.match(e.urlSchemeRegex);if(!d)return c;var u=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(u))return e.BLANK_URL;var g=h.replace(/\\/g,"/");if(u==="mailto:"||u.includes("://"))return g;if(u==="http:"||u==="https:"){if(!i(g))return e.BLANK_URL;var m=new URL(g);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return g}return Li}var Im=Mm(),Om="​",Dm={curveBasis:us,curveBasisClosed:sp,curveBasisOpen:op,curveBumpX:hh,curveBumpY:lh,curveBundle:ip,curveCardinalClosed:rp,curveCardinalOpen:ep,curveCardinal:nh,curveCatmullRomClosed:tp,curveCatmullRomOpen:Jg,curveCatmullRom:ah,curveLinear:Ri,curveLinearClosed:Qg,curveMonotoneX:sh,curveMonotoneY:oh,curveNatural:ih,curveStep:rh,curveStepAfter:eh,curveStepBefore:th},$m=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Pm=p(function(e,t){const r=zh(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const a=r.map(n=>n.args);Xi(a),i=Yt(i,[...a])}else i=r.args;if(!i)return;let o=ta(e,t);const s="config";return i[s]!==void 0&&(o==="flowchart-v2"&&(o="flowchart"),i[o]=i[s],delete i[s]),i},"detectInit"),zh=p(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${$m.source})(?=[}][%]{2}).*
140
+ `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),M.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const o=[];for(;(i=hi.exec(e))!==null;)if(i.index===hi.lastIndex&&hi.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const s=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;o.push({type:s,args:a})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(r){return M.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Rm=p(function(e){return e.replace(hi,"")},"removeDirectives"),qm=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function aa(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Dm[r]??t}p(aa,"interpolateToCurve");function Hh(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?Im.sanitizeUrl(r):r}p(Hh,"formatUrl");var Nm=p((e,...t)=>{const r=e.split("."),i=r.length-1,o=r[i];let s=window;for(let a=0;a<i;a++)if(s=s[r[a]],!s){M.error(`Function name: ${e} not found in window`);return}s[o](...t)},"runFunc");function na(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(na,"distance");function Yh(e){let t,r=0;e.forEach(o=>{r+=na(o,t),t=o});const i=r/2;return la(e,i)}p(Yh,"traverseEdge");function jh(e){return e.length===1?e[0]:Yh(e)}p(jh,"calcLabelPosition");var xn=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),la=p((e,t)=>{let r,i=t;for(const o of e){if(r){const s=na(o,r);if(s===0)return r;if(s<i)i-=s;else{const a=i/s;if(a<=0)return r;if(a>=1)return{x:o.x,y:o.y};if(a>0&&a<1)return{x:xn((1-a)*r.x+a*o.x,5),y:xn((1-a)*r.y+a*o.y,5)}}}r=o}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Wm=p((e,t,r)=>{M.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const o=la(t,25),s=e?10:5,a=Math.atan2(t[0].y-o.y,t[0].x-o.x),n={x:0,y:0};return n.x=Math.sin(a)*s+(t[0].x+o.x)/2,n.y=-Math.cos(a)*s+(t[0].y+o.y)/2,n},"calcCardinalityPosition");function Xh(e,t,r){const i=structuredClone(r);M.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const o=25+e,s=la(i,o),a=10+e*.5,n=Math.atan2(i[0].y-s.y,i[0].x-s.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*a+(i[0].x+s.x)/2,l.y=-Math.cos(n+Math.PI)*a+(i[0].y+s.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*a+(i[0].x+s.x)/2-5,l.y=-Math.cos(n-Math.PI)*a+(i[0].y+s.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*a+(i[0].x+s.x)/2-5,l.y=-Math.cos(n)*a+(i[0].y+s.y)/2-5):(l.x=Math.sin(n)*a+(i[0].x+s.x)/2,l.y=-Math.cos(n)*a+(i[0].y+s.y)/2),l}p(Xh,"calcTerminalLabelPosition");function Gh(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(Gh,"getStylesFromArray");var bn=0,zm=p(()=>(bn++,"id-"+Math.random().toString(36).substr(2,12)+"-"+bn),"generateId");function Uh(e){let t="";const r="0123456789abcdef",i=r.length;for(let o=0;o<e;o++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(Uh,"makeRandomHex");var Hm=p(e=>Uh(e.length),"random"),Ym=p(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),jm=p(function(e,t){const r=t.text.replace(ki.lineBreakRegex," "),[,i]=go(t.fontSize),o=e.append("text");o.attr("x",t.x),o.attr("y",t.y),o.style("text-anchor",t.anchor),o.style("font-family",t.fontFamily),o.style("font-size",i),o.style("font-weight",t.fontWeight),o.attr("fill",t.fill),t.class!==void 0&&o.attr("class",t.class);const s=o.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),o},"drawSimpleText"),Xm=Vs((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),ki.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),o=[];let s="";return i.forEach((a,n)=>{const l=Ie(`${a} `,r),c=Ie(s,r);if(l>t){const{hyphenatedStrings:u,remainingWord:g}=Gm(a,t,"-",r);o.push(s,...u),s=g}else c+l>=t?(o.push(s),s=a):s=[s,a].filter(Boolean).join(" ");n+1===i.length&&o.push(s)}),o.filter(a=>a!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Gm=Vs((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const o=[...e],s=[];let a="";return o.forEach((n,l)=>{const c=`${a}${n}`;if(Ie(c,i)>=t){const d=l+1,u=o.length===d,g=`${c}${r}`;s.push(u?c:g),a=""}else a=c}),{hyphenatedStrings:s,remainingWord:a}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Vh(e,t){return ha(e,t).height}p(Vh,"calculateTextHeight");function Ie(e,t){return ha(e,t).width}p(Ie,"calculateTextWidth");var ha=Vs((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:o=400}=t;if(!e)return{width:0,height:0};const[,s]=go(r),a=["sans-serif",i],n=e.split(ki.lineBreakRegex),l=[],c=mt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const u of a){let g=0;const m={width:0,height:0,lineHeight:0};for(const y of n){const C=Ym();C.text=y||Om;const x=jm(h,C).style("font-size",s).style("font-weight",o).style("font-family",u),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,b.width)),g=Math.round(b.height),m.height+=g,m.lineHeight=Math.round(Math.max(m.lineHeight,g))}l.push(m)}h.remove();const d=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[d]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Um=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{p(this,"InitIDGenerator")}},Fi,Vm=p(function(e){return Fi=Fi||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Fi.innerHTML=e,unescape(Fi.textContent)},"entityDecode");function ca(e){return"str"in e}p(ca,"isDetailedError");var Km=p((e,t,r,i)=>{if(!i)return;const o=e.node()?.getBBox();o&&e.append("text").text(i).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-r).attr("class",t)},"insertTitle"),go=p(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function da(e,t){return dp({},e,t)}p(da,"cleanAndMerge");var Zt={assignWithDepth:Yt,wrapLabel:Xm,calculateTextHeight:Vh,calculateTextWidth:Ie,calculateTextDimensions:ha,cleanAndMerge:da,detectInit:Pm,detectDirective:zh,isSubstringInArray:qm,interpolateToCurve:aa,calcLabelPosition:jh,calcCardinalityPosition:Wm,calcTerminalLabelPosition:Xh,formatUrl:Hh,getStylesFromArray:Gh,generateId:zm,random:Hm,runFunc:Nm,entityDecode:Vm,insertTitle:Km,isLabelCoordinateInPath:Kh,parseFontSize:go,InitIDGenerator:Um},Zm=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),We=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),eS=p((e,t,{counter:r=0,prefix:i,suffix:o},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${o?`_${o}`:""}`,"getEdgeId");function zt(e){return e??null}p(zt,"handleUndefinedAttr");function Kh(e,t){const r=Math.round(e.x),i=Math.round(e.y),o=t.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return o.includes(r.toString())||o.includes(i.toString())}p(Kh,"isLabelCoordinateInPath");function ua(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var nr=ua();function Zh(e){nr=e}var ci={exec:()=>null};function _t(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(o,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(ee.caret,"$1"),r=r.replace(o,a),i},getRegex:()=>new RegExp(r,t)};return i}var Qm=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ee={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Jm=/^(?:[ \t]*(?:\n|$))+/,ty=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ey=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ti=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ry=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ga=/(?:[*+-]|\d{1,9}[.)])/,Qh=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Jh=_t(Qh).replace(/bull/g,ga).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),iy=_t(Qh).replace(/bull/g,ga).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),pa=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,oy=/^[^\n]+/,fa=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,sy=_t(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",fa).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ay=_t(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ga).getRegex(),po="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ma=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ny=_t("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ma).replace("tag",po).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),tc=_t(pa).replace("hr",Ti).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",po).getRegex(),ly=_t(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",tc).getRegex(),ya={blockquote:ly,code:ty,def:sy,fences:ey,heading:ry,hr:Ti,html:ny,lheading:Jh,list:ay,newline:Jm,paragraph:tc,table:ci,text:oy},kn=_t("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ti).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",po).getRegex(),hy={...ya,lheading:iy,table:kn,paragraph:_t(pa).replace("hr",Ti).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",kn).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",po).getRegex()},cy={...ya,html:_t(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ma).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ci,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:_t(pa).replace("hr",Ti).replace("heading",` *#{1,6} *[^
141
+ ]`).replace("lheading",Jh).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},dy=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,uy=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ec=/^( {2,}|\\)\n(?!\s*$)/,gy=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,fo=/[\p{P}\p{S}]/u,Ca=/[\s\p{P}\p{S}]/u,rc=/[^\s\p{P}\p{S}]/u,py=_t(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ca).getRegex(),ic=/(?!~)[\p{P}\p{S}]/u,fy=/(?!~)[\s\p{P}\p{S}]/u,my=/(?:[^\s\p{P}\p{S}]|~)/u,yy=_t(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Qm?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),oc=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Cy=_t(oc,"u").replace(/punct/g,fo).getRegex(),xy=_t(oc,"u").replace(/punct/g,ic).getRegex(),sc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",by=_t(sc,"gu").replace(/notPunctSpace/g,rc).replace(/punctSpace/g,Ca).replace(/punct/g,fo).getRegex(),ky=_t(sc,"gu").replace(/notPunctSpace/g,my).replace(/punctSpace/g,fy).replace(/punct/g,ic).getRegex(),Sy=_t("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,rc).replace(/punctSpace/g,Ca).replace(/punct/g,fo).getRegex(),Ty=_t(/\\(punct)/,"gu").replace(/punct/g,fo).getRegex(),wy=_t(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),By=_t(ma).replace("(?:-->|$)","-->").getRegex(),vy=_t("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",By).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Zi=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Ly=_t(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Zi).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ac=_t(/^!?\[(label)\]\[(ref)\]/).replace("label",Zi).replace("ref",fa).getRegex(),nc=_t(/^!?\[(ref)\](?:\[\])?/).replace("ref",fa).getRegex(),Fy=_t("reflink|nolink(?!\\()","g").replace("reflink",ac).replace("nolink",nc).getRegex(),Sn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,xa={_backpedal:ci,anyPunctuation:Ty,autolink:wy,blockSkip:yy,br:ec,code:uy,del:ci,emStrongLDelim:Cy,emStrongRDelimAst:by,emStrongRDelimUnd:Sy,escape:dy,link:Ly,nolink:nc,punctuation:py,reflink:ac,reflinkSearch:Fy,tag:vy,text:gy,url:ci},Ey={...xa,link:_t(/^!?\[(label)\]\((.*?)\)/).replace("label",Zi).getRegex(),reflink:_t(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Zi).getRegex()},Bs={...xa,emStrongRDelimAst:ky,emStrongLDelim:xy,url:_t(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Sn).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:_t(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Sn).getRegex()},Ay={...Bs,br:_t(ec).replace("{2,}","*").getRegex(),text:_t(Bs.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ei={normal:ya,gfm:hy,pedantic:cy},Gr={normal:xa,gfm:Bs,breaks:Ay,pedantic:Ey},_y={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Tn=e=>_y[e];function be(e,t){if(t){if(ee.escapeTest.test(e))return e.replace(ee.escapeReplace,Tn)}else if(ee.escapeTestNoEncode.test(e))return e.replace(ee.escapeReplaceNoEncode,Tn);return e}function wn(e){try{e=encodeURI(e).replace(ee.percentDecode,"%")}catch{return null}return e}function Bn(e,t){let r=e.replace(ee.findPipe,(s,a,n)=>{let l=!1,c=a;for(;--c>=0&&n[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(ee.splitPipe),o=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;o<i.length;o++)i[o]=i[o].trim().replace(ee.slashPipe,"|");return i}function Ur(e,t,r){let i=e.length;if(i===0)return"";let o=0;for(;o<i&&e.charAt(i-o-1)===t;)o++;return e.slice(0,i-o)}function My(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function vn(e,t,r,i,o){let s=t.href,a=t.title||null,n=e[1].replace(o.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:a,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function Iy(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let o=i[1];return t.split(`
142
+ `).map(s=>{let a=s.match(r.other.beginningSpace);if(a===null)return s;let[n]=a;return n.length>=o.length?s.slice(o.length):s}).join(`
143
+ `)}var Qi=class{options;rules;lexer;constructor(t){this.options=t||nr}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Ur(i,`
144
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],o=Iy(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:o}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let o=Ur(i,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(i=o.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:Ur(r[0],`
145
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Ur(r[0],`
146
+ `).split(`
147
+ `),o="",s="",a=[];for(;i.length>0;){let n=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),n=!0;else if(!n)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
148
+ `),d=h.replace(this.rules.other.blockquoteSetextReplace,`
149
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}
150
+ ${h}`:h,s=s?`${s}
151
+ ${d}`:d;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=u,i.length===0)break;let g=a.at(-1);if(g?.type==="code")break;if(g?.type==="blockquote"){let m=g,y=m.raw+`
152
+ `+i.join(`
153
+ `),C=this.blockquote(y);a[a.length-1]=C,o=o.substring(0,o.length-m.raw.length)+C.raw,s=s.substring(0,s.length-m.text.length)+C.text;break}else if(g?.type==="list"){let m=g,y=m.raw+`
154
+ `+i.join(`
155
+ `),C=this.list(y);a[a.length-1]=C,o=o.substring(0,o.length-g.raw.length)+C.raw,s=s.substring(0,s.length-m.raw.length)+C.raw,i=y.substring(a.at(-1).raw.length).split(`
156
+ `);continue}}return{type:"blockquote",raw:o,tokens:a,text:s}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),o=i.length>1,s={type:"list",raw:"",ordered:o,start:o?+i.slice(0,-1):"",loose:!1,items:[]};i=o?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=o?i:"[*+-]");let a=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",d="";if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let u=r[2].split(`
157
+ `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),g=t.split(`
158
+ `,1)[0],m=!u.trim(),y=0;if(this.options.pedantic?(y=2,d=u.trimStart()):m?y=r[1].length+1:(y=r[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,d=u.slice(y),y+=r[1].length),m&&this.rules.other.blankLine.test(g)&&(h+=g+`
159
+ `,t=t.substring(g.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(y),S=this.rules.other.hrRegex(y),B=this.rules.other.fencesBeginRegex(y),w=this.rules.other.headingBeginRegex(y),v=this.rules.other.htmlBeginRegex(y);for(;t;){let F=t.split(`
160
+ `,1)[0],L;if(g=F,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),L=g):L=g.replace(this.rules.other.tabCharGlobal," "),B.test(g)||w.test(g)||v.test(g)||b.test(g)||S.test(g))break;if(L.search(this.rules.other.nonSpaceChar)>=y||!g.trim())d+=`
161
+ `+L.slice(y);else{if(m||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||B.test(u)||w.test(u)||S.test(u))break;d+=`
162
+ `+g}!m&&!g.trim()&&(m=!0),h+=F+`
163
+ `,t=t.substring(F.length+1),u=L.slice(y)}}s.loose||(n?s.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let C=null,x;this.options.gfm&&(C=this.rules.other.listIsTask.exec(d),C&&(x=C[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:h,task:!!C,checked:x,loose:!1,text:d,tokens:[]}),s.raw+=h}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){let h=s.items[c].tokens.filter(u=>u.type==="space"),d=h.length>0&&h.some(u=>this.rules.other.anyLine.test(u.raw));s.loose=d}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].loose=!0;return s}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:o,title:s}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Bn(r[1]),o=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
164
+ `):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===o.length){for(let n of o)this.rules.other.tableAlignRight.test(n)?a.align.push("right"):this.rules.other.tableAlignCenter.test(n)?a.align.push("center"):this.rules.other.tableAlignLeft.test(n)?a.align.push("left"):a.align.push(null);for(let n=0;n<i.length;n++)a.header.push({text:i[n],tokens:this.lexer.inline(i[n]),header:!0,align:a.align[n]});for(let n of s)a.rows.push(Bn(n,a.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[c]})));return a}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
165
+ `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=Ur(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=My(r[2],"()");if(a===-2)return;if(a>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let o=r[2],s="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(o);a&&(o=a[1],s=a[3])}else s=r[3]?r[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?o=o.slice(1):o=o.slice(1,-1)),vn(r,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let o=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[o.toLowerCase()];if(!s){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return vn(i,s,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let o=this.rules.inline.emStrongLDelim.exec(t);if(!(!o||o[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(o[1]||o[2])||!i||this.rules.inline.punctuation.exec(i))){let s=[...o[0]].length-1,a,n,l=s,c=0,h=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+s);(o=h.exec(r))!=null;){if(a=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!a)continue;if(n=[...a].length,o[3]||o[4]){l+=n;continue}else if((o[5]||o[6])&&s%3&&!((s+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let d=[...o[0]][0].length,u=t.slice(0,s+o.index+d+n);if(Math.min(s,n)%2){let m=u.slice(1,-1);return{type:"em",raw:u,text:m,tokens:this.lexer.inlineTokens(m)}}let g=u.slice(2,-2);return{type:"strong",raw:u,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(i),s=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return o&&s&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,o;return r[2]==="@"?(i=r[1],o="mailto:"+i):(i=r[1],o=i),{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,o;if(r[2]==="@")i=r[0],o="mailto:"+i;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(s!==r[0]);i=r[0],r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},ge=class vs{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||nr,this.options.tokenizer=this.options.tokenizer||new Qi,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:ee,block:Ei.normal,inline:Gr.normal};this.options.pedantic?(r.block=Ei.pedantic,r.inline=Gr.pedantic):this.options.gfm&&(r.block=Ei.gfm,this.options.breaks?r.inline=Gr.breaks:r.inline=Gr.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ei,inline:Gr}}static lex(t,r){return new vs(r).lex(t)}static lexInline(t,r){return new vs(r).inlineTokens(t)}lex(t){t=t.replace(ee.carriageReturn,`
166
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){for(this.options.pedantic&&(t=t.replace(ee.tabCharGlobal," ").replace(ee.spaceLine,""));t;){let o;if(this.options.extensions?.block?.some(a=>(o=a.call({lexer:this},t,r))?(t=t.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let a=r.at(-1);o.raw.length===1&&a!==void 0?a.raw+=`
167
+ `:r.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
168
+ `)?"":`
169
+ `)+o.raw,a.text+=`
170
+ `+o.text,this.inlineQueue.at(-1).src=a.text):r.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
171
+ `)?"":`
172
+ `)+o.raw,a.text+=`
173
+ `+o.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),r.push(o);continue}let s=t;if(this.options.extensions?.startBlock){let a=1/0,n=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},n),typeof l=="number"&&l>=0&&(a=Math.min(a,l))}),a<1/0&&a>=0&&(s=t.substring(0,a+1))}if(this.state.top&&(o=this.tokenizer.paragraph(s))){let a=r.at(-1);i&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
174
+ `)?"":`
175
+ `)+o.raw,a.text+=`
176
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(o),i=s.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let a=r.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
177
+ `)?"":`
178
+ `)+o.raw,a.text+=`
179
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(o);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,o=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,o.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)s=o[2]?o[2].length:0,i=i.slice(0,o.index+s)+"["+"a".repeat(o[0].length-s-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,n="";for(;t;){a||(n=""),a=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,n)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,d=t.slice(1),u;this.options.extensions.startInline.forEach(g=>{u=g.call({lexer:this},d),typeof u=="number"&&u>=0&&(h=Math.min(h,u))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(n=l.raw.slice(-1)),a=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},Ji=class{options;parser;constructor(t){this.options=t||nr}space(t){return""}code({text:t,lang:r,escaped:i}){let o=(r||"").match(ee.notSpaceStart)?.[0],s=t.replace(ee.endingNewline,"")+`
180
+ `;return o?'<pre><code class="language-'+be(o)+'">'+(i?s:be(s,!0))+`</code></pre>
181
+ `:"<pre><code>"+(i?s:be(s,!0))+`</code></pre>
182
+ `}blockquote({tokens:t}){return`<blockquote>
183
+ ${this.parser.parse(t)}</blockquote>
184
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
185
+ `}hr(t){return`<hr>
186
+ `}list(t){let r=t.ordered,i=t.start,o="";for(let n=0;n<t.items.length;n++){let l=t.items[n];o+=this.listitem(l)}let s=r?"ol":"ul",a=r&&i!==1?' start="'+i+'"':"";return"<"+s+a+`>
187
+ `+o+"</"+s+`>
188
+ `}listitem(t){let r="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+be(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
189
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
190
+ `}table(t){let r="",i="";for(let s=0;s<t.header.length;s++)i+=this.tablecell(t.header[s]);r+=this.tablerow({text:i});let o="";for(let s=0;s<t.rows.length;s++){let a=t.rows[s];i="";for(let n=0;n<a.length;n++)i+=this.tablecell(a[n]);o+=this.tablerow({text:i})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
191
+ <thead>
192
+ `+r+`</thead>
193
+ `+o+`</table>
194
+ `}tablerow({text:t}){return`<tr>
195
+ ${t}</tr>
196
+ `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
197
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${be(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let o=this.parser.parseInline(i),s=wn(t);if(s===null)return o;t=s;let a='<a href="'+t+'"';return r&&(a+=' title="'+be(r)+'"'),a+=">"+o+"</a>",a}image({href:t,title:r,text:i,tokens:o}){o&&(i=this.parser.parseInline(o,this.parser.textRenderer));let s=wn(t);if(s===null)return be(i);t=s;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${be(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:be(t.text)}},ba=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},pe=class Ls{options;renderer;textRenderer;constructor(t){this.options=t||nr,this.options.renderer=this.options.renderer||new Ji,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ba}static parse(t,r){return new Ls(r).parse(t)}static parseInline(t,r){return new Ls(r).parseInline(t)}parse(t,r=!0){let i="";for(let o=0;o<t.length;o++){let s=t[o];if(this.options.extensions?.renderers?.[s.type]){let n=s,l=this.options.extensions.renderers[n.type].call({parser:this},n);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){i+=l||"";continue}}let a=s;switch(a.type){case"space":{i+=this.renderer.space(a);continue}case"hr":{i+=this.renderer.hr(a);continue}case"heading":{i+=this.renderer.heading(a);continue}case"code":{i+=this.renderer.code(a);continue}case"table":{i+=this.renderer.table(a);continue}case"blockquote":{i+=this.renderer.blockquote(a);continue}case"list":{i+=this.renderer.list(a);continue}case"html":{i+=this.renderer.html(a);continue}case"def":{i+=this.renderer.def(a);continue}case"paragraph":{i+=this.renderer.paragraph(a);continue}case"text":{let n=a,l=this.renderer.text(n);for(;o+1<t.length&&t[o+1].type==="text";)n=t[++o],l+=`
198
+ `+this.renderer.text(n);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}parseInline(t,r=this.renderer){let i="";for(let o=0;o<t.length;o++){let s=t[o];if(this.options.extensions?.renderers?.[s.type]){let n=this.options.extensions.renderers[s.type].call({parser:this},s);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=n||"";continue}}let a=s;switch(a.type){case"escape":{i+=r.text(a);break}case"html":{i+=r.html(a);break}case"link":{i+=r.link(a);break}case"image":{i+=r.image(a);break}case"strong":{i+=r.strong(a);break}case"em":{i+=r.em(a);break}case"codespan":{i+=r.codespan(a);break}case"br":{i+=r.br(a);break}case"del":{i+=r.del(a);break}case"text":{i+=r.text(a);break}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}},ei=class{options;block;constructor(t){this.options=t||nr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?ge.lex:ge.lexInline}provideParser(){return this.block?pe.parse:pe.parseInline}},Oy=class{defaults=ua();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=pe;Renderer=Ji;TextRenderer=ba;Lexer=ge;Tokenizer=Qi;Hooks=ei;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let s=o;for(let a of s.header)i=i.concat(this.walkTokens(a.tokens,r));for(let a of s.rows)for(let n of a)i=i.concat(this.walkTokens(n.tokens,r));break}case"list":{let s=o;i=i.concat(this.walkTokens(s.items,r));break}default:{let s=o;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(a=>{let n=s[a].flat(1/0);i=i.concat(this.walkTokens(n,r))}):s.tokens&&(i=i.concat(this.walkTokens(s.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let o={...i};if(o.async=this.defaults.async||o.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let a=r.renderers[s.name];a?r.renderers[s.name]=function(...n){let l=s.renderer.apply(this,n);return l===!1&&(l=a.apply(this,n)),l}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[s.level];a?a.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),o.extensions=r),i.renderer){let s=this.defaults.renderer||new Ji(this.defaults);for(let a in i.renderer){if(!(a in s))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let n=a,l=i.renderer[n],c=s[n];s[n]=(...h)=>{let d=l.apply(s,h);return d===!1&&(d=c.apply(s,h)),d||""}}o.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new Qi(this.defaults);for(let a in i.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let n=a,l=i.tokenizer[n],c=s[n];s[n]=(...h)=>{let d=l.apply(s,h);return d===!1&&(d=c.apply(s,h)),d}}o.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new ei;for(let a in i.hooks){if(!(a in s))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let n=a,l=i.hooks[n],c=s[n];ei.passThroughHooks.has(a)?s[n]=h=>{if(this.defaults.async&&ei.passThroughHooksRespectAsync.has(a))return(async()=>{let u=await l.call(s,h);return c.call(s,u)})();let d=l.call(s,h);return c.call(s,d)}:s[n]=(...h)=>{if(this.defaults.async)return(async()=>{let u=await l.apply(s,h);return u===!1&&(u=await c.apply(s,h)),u})();let d=l.apply(s,h);return d===!1&&(d=c.apply(s,h)),d}}o.hooks=s}if(i.walkTokens){let s=this.defaults.walkTokens,a=i.walkTokens;o.walkTokens=function(n){let l=[];return l.push(a.call(this,n)),s&&(l=l.concat(s.call(this,n))),l}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return ge.lex(t,r??this.defaults)}parser(t,r){return pe.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let o={...i},s={...this.defaults,...o},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&o.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let n=s.hooks?await s.hooks.preprocess(r):r,l=await(s.hooks?await s.hooks.provideLexer():t?ge.lex:ge.lexInline)(n,s),c=s.hooks?await s.hooks.processAllTokens(l):l;s.walkTokens&&await Promise.all(this.walkTokens(c,s.walkTokens));let h=await(s.hooks?await s.hooks.provideParser():t?pe.parse:pe.parseInline)(c,s);return s.hooks?await s.hooks.postprocess(h):h})().catch(a);try{s.hooks&&(r=s.hooks.preprocess(r));let n=(s.hooks?s.hooks.provideLexer():t?ge.lex:ge.lexInline)(r,s);s.hooks&&(n=s.hooks.processAllTokens(n)),s.walkTokens&&this.walkTokens(n,s.walkTokens);let l=(s.hooks?s.hooks.provideParser():t?pe.parse:pe.parseInline)(n,s);return s.hooks&&(l=s.hooks.postprocess(l)),l}catch(n){return a(n)}}}onError(t,r){return i=>{if(i.message+=`
199
+ Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+be(i.message+"",!0)+"</pre>";return r?Promise.resolve(o):o}if(r)return Promise.reject(i);throw i}}},ir=new Oy;function It(e,t){return ir.parse(e,t)}It.options=It.setOptions=function(e){return ir.setOptions(e),It.defaults=ir.defaults,Zh(It.defaults),It};It.getDefaults=ua;It.defaults=nr;It.use=function(...e){return ir.use(...e),It.defaults=ir.defaults,Zh(It.defaults),It};It.walkTokens=function(e,t){return ir.walkTokens(e,t)};It.parseInline=ir.parseInline;It.Parser=pe;It.parser=pe.parse;It.Renderer=Ji;It.TextRenderer=ba;It.Lexer=ge;It.lexer=ge.lex;It.Tokenizer=Qi;It.Hooks=ei;It.parse=It;It.options;It.setOptions;It.use;It.walkTokens;It.parseInline;pe.parse;ge.lex;var Fs=typeof performance<"u"&&typeof performance.now=="function",yr=p(()=>Fs?performance.now():0,"now"),Fo="🧜 ",Dy="Mermaid render",$y="Mermaid",Py={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"};(class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}static{p(this,"Profiler")}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(e){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(e))}tickSync(e,t){if(!this.enabled)return t();const r=yr();try{return t()}finally{this.buckets[e]=(this.buckets[e]??0)+(yr()-r)}}async tick(e,t){if(!this.enabled)return t();const r=yr();try{return await t()}finally{this.buckets[e]=(this.buckets[e]??0)+(yr()-r)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const e=this.roots.at(-1),t=this.runLabel??e?.name;return e&&(this.records.push({label:t??e.name,tree:e,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(e,t)),this.runLabel=void 0,e}begin(e){if(!this.enabled)return;const t={name:e,start:yr(),duration:-1,children:[]},r=this.stack.at(-1);if(r?r.children.push(t):this.roots.push(t),this.stack.push(t),Fs&&typeof performance.mark=="function")try{performance.mark(`${Fo}${e} ▶`)}catch{}}end(){if(!this.enabled)return;const e=this.stack.pop();if(!e)return;const t=yr();if(e.duration=t-e.start,Fs&&typeof performance.measure=="function")try{performance.measure(`${Fo}${e.name}`,{start:e.start,end:t,detail:{devtools:{dataType:"track-entry",track:Dy,trackGroup:$y,color:Py[e.name]??"primary",tooltipText:`${e.name} — ${e.duration.toFixed(1)} ms`}}})}catch{}}async span(e,t){if(!this.enabled)return t();this.begin(e);try{return await t()}finally{this.end()}}report(){return this.records.at(-1)?.tree??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(e=this.report(),t){if(!e)return;const r=e.duration,i=t&&t!==e.name?`${e.name} [${t}]`:e.name,o=["ms % phase"],s=p((n,l)=>{const c=" ".repeat(l),h=n.duration.toFixed(1).padStart(8),d=r>0?`${(n.duration/r*100).toFixed(0).padStart(3)}%`:" -";o.push(`${h} ${d} ${c}${n.name}`);for(const u of n.children)s(u,l+1);if(n.children.length>0){const u=n.children.reduce((m,y)=>m+y.duration,0),g=n.duration-u;if(g>.5){const m=g.toFixed(1).padStart(8);o.push(`${m} ${c} (self)`)}}},"walk");s(e,0);const a=Object.keys(this.buckets);if(a.length>0){o.push("—— buckets (summed) ——");for(const n of a)o.push(`${this.buckets[n].toFixed(1).padStart(8)} ${n}`)}console.log(`${Fo}mermaid render profile · ${i}
200
+ ${o.join(`
201
+ `)}`)}});globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"};var Ry=up.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend(gp),or=Ry;function lc(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
202
+ `).replace(/\n{2,}/g,`
203
+ `);return ch(i)}p(lc,"preprocessMarkdown");function hc(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}p(hc,"nonMarkdownToLines");function cc(e,t={}){const r=lc(e,t),i=It.lexer(r),o=[[]];let s=0;function a(n,l="normal"){n.type==="text"?n.text.split(`
204
+ `).forEach((h,d)=>{d!==0&&(s++,o.push([])),h.split(" ").forEach(u=>{u=u.replace(/&#39;/g,"'"),u&&o[s].push({content:u,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{a(c,n.type)}):n.type==="html"&&o[s].push({content:n.text,type:"normal"})}return p(a,"processNode"),i.forEach(n=>{n.type==="paragraph"?n.tokens?.forEach(l=>{a(l)}):n.type==="html"?o[s].push({content:n.text,type:"normal"}):o[s].push({content:n.raw,type:"normal"})}),o}p(cc,"markdownToLines");function dc(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(dc,"nonMarkdownToHTML");function uc(e,{markdownAutoWrap:t}={}){const r=It.lexer(e);function i(o){return o.type==="text"?t===!1?o.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):o.text.replace(/\n */g,"<br/>"):o.type==="strong"?`<strong>${o.tokens?.map(i).join("")}</strong>`:o.type==="em"?`<em>${o.tokens?.map(i).join("")}</em>`:o.type==="paragraph"?`<p>${o.tokens?.map(i).join("")}</p>`:o.type==="space"?"":o.type==="html"?`${o.text}`:o.type==="escape"?o.text:(M.warn(`Unsupported markdown: ${o.type}`),o.raw)}return p(i,"output"),r.map(i).join("")}p(uc,"markdownToHTML");function gc(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(gc,"splitTextToChars");function pc(e,t){const r=gc(t.content);return ka(e,[],r,t.type)}p(pc,"splitWordToFitWidth");function ka(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[o,...s]=r,a=[...t,o];return e([{content:a.join(""),type:i}])?ka(e,a,s,i):(t.length===0&&o&&(t.push(o),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(ka,"splitWordToFitWidthRecursion");function fc(e,t){if(e.some(({content:r})=>r.includes(`
205
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return to(e,t)}p(fc,"splitLineToFitWidth");function to(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let o="";e[0].content===" "&&(o=" ",e.shift());const s=e.shift()??{content:" ",type:"normal"},a=[...i];if(o!==""&&a.push({content:o,type:"normal"}),a.push(s),t(a))return to(e,t,r,a);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[n,l]=pc(t,s);r.push([n]),l.content&&e.unshift(l)}return to(e,t,r)}p(to,"splitLineToFitWidthRecursion");function Es(e,t){t&&e.attr("style",t)}p(Es,"applyStyle");var Ln=16384;async function mc(e,t,r,i,o=!1,s=$t()){const a=e.append("foreignObject");a.attr("width",`${Math.min(10*r,Ln)}px`),a.attr("height",`${Math.min(10*r,Ln)}px`);const n=a.append("xhtml:div"),l=pi(t.label)?await $h(t.label.replace(ki.lineBreakRegex,`
206
+ `),s):ne(t.label,s),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");return h.html(l),Es(h,t.labelStyle),h.attr("class",`${c} ${i}`),Es(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),o&&n.attr("class","labelBkg"),(await or.measure(()=>n.node().getBoundingClientRect())).width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px")),a.node()}p(mc,"addHtmlSpan");function mo(e,t,r,i=!1){const o=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&o.attr("text-anchor","middle"),o}p(mo,"createTspan");function yc(e,t,r){const i=e.append("text"),o=mo(i,1,t);yo(o,r);const s=o.node().getComputedTextLength();return i.remove(),s}p(yc,"computeWidthOfText");function qy(e,t,r){const i=e.append("text"),o=mo(i,1,t);yo(o,[{content:r,type:"normal"}]);const s=o.node()?.getBoundingClientRect();return s&&i.remove(),s}p(qy,"computeDimensionOfText");function Cc(e,t,r,i=!1,o=!1){const a=t.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");o&&l.attr("text-anchor","middle");let c=0;for(const h of r){const d=p(g=>yc(a,1.1,g)<=e,"checkWidth"),u=d(h)?[h]:fc(h,d);for(const g of u){const m=mo(l,c,1.1,o);yo(m,g),c++}}if(i){const h=l.node().getBBox(),d=2;return n.attr("x",h.x-d).attr("y",h.y-d).attr("width",h.width+2*d).attr("height",h.height+2*d),a.node()}else return l.node()}p(Cc,"createFormattedText");function As(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}p(As,"decodeHTMLEntities");function yo(e,t){e.text(""),t.forEach((r,i)=>{const o=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?o.text(As(r.content)):o.text(" "+As(r.content))})}p(yo,"updateTextContentAndStyles");async function xc(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,s,a)=>(r.push((async()=>{const n=`${s}:${a}`;return await Am(n)?await Si(n,void 0,{class:"label-icon"}):`<i class='${ne(o,t).replace(":"," ")}'></i>`})()),o));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(xc,"replaceIconSubstring");var ye=p(async(e,t="",{style:r="",isTitle:i=!1,classes:o="",useHtmlLabels:s=!0,markdown:a=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(M.debug("XYZ createText",t,r,i,o,s,n,"addSvgBackground: ",c),s){const d=a?uc(t,h):dc(t),u=await xc(We(d),h),g=t.replace(/\\\\/g,"\\"),m={isNode:n,label:pi(t)?g:u,labelStyle:r.replace("fill:","color:")};return await mc(e,m,l,o,c,h)}else{const d=We(t.replace(/<br\s*\/?>/g,"<br/>")),u=a?cc(d.replace("<br>","<br/>"),h):hc(d),g=Cc(l,e,u,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");mt(g).attr("style",m)}else{const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");mt(g).select("rect").attr("style",m.replace(/background:/g,"fill:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");mt(g).select("text").attr("style",y)}return i?mt(g).selectAll("tspan.text-outer-tspan").classed("title-row",!0):mt(g).selectAll("tspan.text-outer-tspan").classed("row",!0),g}},"createText");function Eo(e,t,r){if(e&&e.length){const[i,o]=t,s=Math.PI/180*r,a=Math.cos(s),n=Math.sin(s);for(const l of e){const[c,h]=l;l[0]=(c-i)*a-(h-o)*n+i,l[1]=(c-i)*n+(h-o)*a+o}}}function Ny(e,t){return e[0]===t[0]&&e[1]===t[1]}function Wy(e,t,r,i=1){const o=r,s=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(o)for(const c of a)Eo(c,n,o);const l=(function(c,h,d){const u=[];for(const b of c){const S=[...b];Ny(S[0],S[S.length-1])||S.push([S[0][0],S[0][1]]),S.length>2&&u.push(S)}const g=[];h=Math.max(h,.1);const m=[];for(const b of u)for(let S=0;S<b.length-1;S++){const B=b[S],w=b[S+1];if(B[1]!==w[1]){const v=Math.min(B[1],w[1]);m.push({ymin:v,ymax:Math.max(B[1],w[1]),x:v===B[1]?B[0]:w[0],islope:(w[0]-B[0])/(w[1]-B[1])})}}if(m.sort(((b,S)=>b.ymin<S.ymin?-1:b.ymin>S.ymin?1:b.x<S.x?-1:b.x>S.x?1:b.ymax===S.ymax?0:(b.ymax-S.ymax)/Math.abs(b.ymax-S.ymax))),!m.length)return g;let y=[],C=m[0].ymin,x=0;for(;y.length||m.length;){if(m.length){let b=-1;for(let S=0;S<m.length&&!(m[S].ymin>C);S++)b=S;m.splice(0,b+1).forEach((S=>{y.push({s:C,edge:S})}))}if(y=y.filter((b=>!(b.edge.ymax<=C))),y.sort(((b,S)=>b.edge.x===S.edge.x?0:(b.edge.x-S.edge.x)/Math.abs(b.edge.x-S.edge.x))),(d!==1||x%h==0)&&y.length>1)for(let b=0;b<y.length;b+=2){const S=b+1;if(S>=y.length)break;const B=y[b].edge,w=y[S].edge;g.push([[Math.round(B.x),C],[Math.round(w.x),C]])}C+=d,y.forEach((b=>{b.edge.x=b.edge.x+d*b.edge.islope})),x++}return g})(a,s,i);if(o){for(const c of a)Eo(c,n,-o);(function(c,h,d){const u=[];c.forEach((g=>u.push(...g))),Eo(u,h,d)})(l,n,-o)}return l}function wi(e,t){var r;const i=t.hachureAngle+90;let o=t.hachureGap;o<0&&(o=4*t.strokeWidth),o=Math.round(Math.max(o,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=o),Wy(e,o,i,s||1)}class Sa{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=wi(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const o of t)i.push(...this.helper.doubleLineOps(o[0][0],o[0][1],o[1][0],o[1][1],r));return i}}function Co(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class zy extends Sa{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const o=wi(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,a=[],n=.5*i*Math.cos(s),l=.5*i*Math.sin(s);for(const[c,h]of o)Co([c,h])&&a.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,r)}}}class Hy extends Sa{fillPolygons(t,r){const i=this._fillPolygons(t,r),o=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,o);return i.ops=i.ops.concat(s.ops),i}}class Yy{constructor(t){this.helper=t}fillPolygons(t,r){const i=wi(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let o=r.hachureGap;o<0&&(o=4*r.strokeWidth),o=Math.max(o,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const a=o/4;for(const n of t){const l=Co(n),c=l/o,h=Math.ceil(c)-1,d=l-h*o,u=(n[0][0]+n[1][0])/2-o/4,g=Math.min(n[0][1],n[1][1]);for(let m=0;m<h;m++){const y=g+d+m*o,C=u-a+2*Math.random()*a,x=y-a+2*Math.random()*a,b=this.helper.ellipse(C,x,s,s,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class jy{constructor(t){this.helper=t}fillPolygons(t,r){const i=wi(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,o=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,s=[];return t.forEach((a=>{const n=Co(a),l=Math.floor(n/(i+o)),c=(n+o-l*(i+o))/2;let h=a[0],d=a[1];h[0]>d[0]&&(h=a[1],d=a[0]);const u=Math.atan((d[1]-h[1])/(d[0]-h[0]));for(let g=0;g<l;g++){const m=g*(i+o),y=m+i,C=[h[0]+m*Math.cos(u)+c*Math.cos(u),h[1]+m*Math.sin(u)+c*Math.sin(u)],x=[h[0]+y*Math.cos(u)+c*Math.cos(u),h[1]+y*Math.sin(u)+c*Math.sin(u)];s.push(...this.helper.doubleLineOps(C[0],C[1],x[0],x[1],r))}})),s}}class Xy{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,o=r.zigzagOffset<0?i:r.zigzagOffset,s=wi(t,r=Object.assign({},r,{hachureGap:i+o}));return{type:"fillSketch",ops:this.zigzagLines(s,o,r)}}zigzagLines(t,r,i){const o=[];return t.forEach((s=>{const a=Co(s),n=Math.round(a/(2*r));let l=s[0],c=s[1];l[0]>c[0]&&(l=s[1],c=s[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let d=0;d<n;d++){const u=2*d*r,g=2*(d+1)*r,m=Math.sqrt(2*Math.pow(r,2)),y=[l[0]+u*Math.cos(h),l[1]+u*Math.sin(h)],C=[l[0]+g*Math.cos(h),l[1]+g*Math.sin(h)],x=[y[0]+m*Math.cos(h+Math.PI/4),y[1]+m*Math.sin(h+Math.PI/4)];o.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],C[0],C[1],i))}})),o}}const re={};class Gy{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Uy=0,Ao=1,Fn=2,Ai={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function _o(e,t){return e.type===t}function Ta(e){const t=[],r=(function(a){const n=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:Uy,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Ao,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return n[n.length]={type:Fn,text:""},n})(e);let i="BOD",o=0,s=r[o];for(;!_o(s,Fn);){let a=0;const n=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return Ta("M0,0"+e);o++,a=Ai[s.text],i=s.text}else _o(s,Ao)?a=Ai[i]:(o++,a=Ai[s.text],i=s.text);if(!(o+a<r.length))throw new Error("Path data ended short");for(let l=o;l<o+a;l++){const c=r[l];if(!_o(c,Ao))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof Ai[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),o+=a,s=r[o],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function bc(e){let t=0,r=0,i=0,o=0;const s=[];for(const{key:a,data:n}of e)switch(a){case"M":s.push({key:"M",data:[...n]}),[t,r]=n,[i,o]=n;break;case"m":t+=n[0],r+=n[1],s.push({key:"M",data:[t,r]}),i=t,o=r;break;case"L":s.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],s.push({key:"L",data:[t,r]});break;case"C":s.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":s.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":s.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],s.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":s.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":s.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=i,r=o}return s}function kc(e){const t=[];let r="",i=0,o=0,s=0,a=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,o]=h,[s,a]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],o=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,o]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,o]});break;case"V":o=h[0],t.push({key:"L",data:[i,o]});break;case"S":{let d=0,u=0;r==="C"||r==="S"?(d=i+(i-n),u=o+(o-l)):(d=i,u=o),t.push({key:"C",data:[d,u,...h]}),n=h[0],l=h[1],i=h[2],o=h[3];break}case"T":{const[d,u]=h;let g=0,m=0;r==="Q"||r==="T"?(g=i+(i-n),m=o+(o-l)):(g=i,m=o);const y=i+2*(g-i)/3,C=o+2*(m-o)/3,x=d+2*(g-d)/3,b=u+2*(m-u)/3;t.push({key:"C",data:[y,C,x,b,d,u]}),n=g,l=m,i=d,o=u;break}case"Q":{const[d,u,g,m]=h,y=i+2*(d-i)/3,C=o+2*(u-o)/3,x=g+2*(d-g)/3,b=m+2*(u-m)/3;t.push({key:"C",data:[y,C,x,b,g,m]}),n=d,l=u,i=g,o=m;break}case"A":{const d=Math.abs(h[0]),u=Math.abs(h[1]),g=h[2],m=h[3],y=h[4],C=h[5],x=h[6];d===0||u===0?(t.push({key:"C",data:[i,o,C,x,C,x]}),i=C,o=x):(i!==C||o!==x)&&(Sc(i,o,C,x,d,u,g,m,y).forEach((function(b){t.push({key:"C",data:b})})),i=C,o=x);break}case"Z":t.push({key:"Z",data:[]}),i=s,o=a}r=c}return t}function Vr(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Sc(e,t,r,i,o,s,a,n,l,c){const h=(d=a,Math.PI*d/180);var d;let u=[],g=0,m=0,y=0,C=0;if(c)[g,m,y,C]=c;else{[e,t]=Vr(e,t,-h),[r,i]=Vr(r,i,-h);const W=(e-r)/2,z=(t-i)/2;let G=W*W/(o*o)+z*z/(s*s);G>1&&(G=Math.sqrt(G),o*=G,s*=G);const I=o*o,R=s*s,Y=I*R-I*z*z-R*W*W,lt=I*z*z+R*W*W,rt=(n===l?-1:1)*Math.sqrt(Math.abs(Y/lt));y=rt*o*z/s+(e+r)/2,C=rt*-s*W/o+(t+i)/2,g=Math.asin(parseFloat(((t-C)/s).toFixed(9))),m=Math.asin(parseFloat(((i-C)/s).toFixed(9))),e<y&&(g=Math.PI-g),r<y&&(m=Math.PI-m),g<0&&(g=2*Math.PI+g),m<0&&(m=2*Math.PI+m),l&&g>m&&(g-=2*Math.PI),!l&&m>g&&(m-=2*Math.PI)}let x=m-g;if(Math.abs(x)>120*Math.PI/180){const W=m,z=r,G=i;m=l&&m>g?g+120*Math.PI/180*1:g+120*Math.PI/180*-1,u=Sc(r=y+o*Math.cos(m),i=C+s*Math.sin(m),z,G,o,s,a,0,l,[m,W,y,C])}x=m-g;const b=Math.cos(g),S=Math.sin(g),B=Math.cos(m),w=Math.sin(m),v=Math.tan(x/4),F=4/3*o*v,L=4/3*s*v,P=[e,t],$=[e+F*S,t-L*b],N=[r+F*w,i-L*B],J=[r,i];if($[0]=2*P[0]-$[0],$[1]=2*P[1]-$[1],c)return[$,N,J].concat(u);{u=[$,N,J].concat(u);const W=[];for(let z=0;z<u.length;z+=3){const G=Vr(u[z][0],u[z][1],h),I=Vr(u[z+1][0],u[z+1][1],h),R=Vr(u[z+2][0],u[z+2][1],h);W.push([G[0],G[1],I[0],I[1],R[0],R[1]])}return W}}const Vy={randOffset:function(e,t){return pt(e,t)},randOffsetWithRange:function(e,t,r){return eo(e,t,r)},ellipse:function(e,t,r,i,o){const s=wc(r,i,o);return _s(e,t,o,s).opset},doubleLineOps:function(e,t,r,i,o){return ze(e,t,r,i,o,!0)}};function Tc(e,t,r,i,o){return{type:"path",ops:ze(e,t,r,i,o)}}function Ni(e,t,r){const i=(e||[]).length;if(i>2){const o=[];for(let s=0;s<i-1;s++)o.push(...ze(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&o.push(...ze(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:o}}return i===2?Tc(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function Ky(e,t,r,i,o){return(function(s,a){return Ni(s,!0,a)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],o)}function En(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=_i(r[0],1*(1+.2*t.roughness),t),o=t.disableMultiStroke?[]:_i(r[0],1.5*(1+.22*t.roughness),Mn(t));for(let s=1;s<r.length;s++){const a=r[s];if(a.length){const n=_i(a,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:_i(a,1.5*(1+.22*t.roughness),Mn(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&o.push(c)}}return{type:"path",ops:i.concat(o)}}return{type:"path",ops:[]}}function wc(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),o=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),s=2*Math.PI/o;let a=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return a+=pt(a*l,r),n+=pt(n*l,r),{increment:s,rx:a,ry:n}}function _s(e,t,r,i){const[o,s]=In(i.increment,e,t,i.rx,i.ry,1,i.increment*eo(.1,eo(.4,1,r),r),r);let a=ro(o,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=In(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=ro(n,null,r);a=a.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:a}}}function An(e,t,r,i,o,s,a,n,l){const c=e,h=t;let d=Math.abs(r/2),u=Math.abs(i/2);d+=pt(.01*d,l),u+=pt(.01*u,l);let g=o,m=s;for(;g<0;)g+=2*Math.PI,m+=2*Math.PI;m-g>2*Math.PI&&(g=0,m=2*Math.PI);const y=2*Math.PI/l.curveStepCount,C=Math.min(y/2,(m-g)/2),x=On(C,c,h,d,u,g,m,1,l);if(!l.disableMultiStroke){const b=On(C,c,h,d,u,g,m,1.5,l);x.push(...b)}return a&&(n?x.push(...ze(c,h,c+d*Math.cos(g),h+u*Math.sin(g),l),...ze(c,h,c+d*Math.cos(m),h+u*Math.sin(m),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+d*Math.cos(g),h+u*Math.sin(g)]})),{type:"path",ops:x}}function _n(e,t){const r=kc(bc(Ta(e))),i=[];let o=[0,0],s=[0,0];for(const{key:a,data:n}of r)switch(a){case"M":s=[n[0],n[1]],o=[n[0],n[1]];break;case"L":i.push(...ze(s[0],s[1],n[0],n[1],t)),s=[n[0],n[1]];break;case"C":{const[l,c,h,d,u,g]=n;i.push(...Zy(l,c,h,d,u,g,s,t)),s=[u,g];break}case"Z":i.push(...ze(s[0],s[1],o[0],o[1],t)),s=[o[0],o[1]]}return{type:"path",ops:i}}function Mo(e,t){const r=[];for(const i of e)if(i.length){const o=t.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+pt(o,t),i[0][1]+pt(o,t)]});for(let a=1;a<s;a++)r.push({op:"lineTo",data:[i[a][0]+pt(o,t),i[a][1]+pt(o,t)]})}}return{type:"fillPath",ops:r}}function Cr(e,t){return(function(r,i){let o=r.fillStyle||"hachure";if(!re[o])switch(o){case"zigzag":re[o]||(re[o]=new zy(i));break;case"cross-hatch":re[o]||(re[o]=new Hy(i));break;case"dots":re[o]||(re[o]=new Yy(i));break;case"dashed":re[o]||(re[o]=new jy(i));break;case"zigzag-line":re[o]||(re[o]=new Xy(i));break;default:o="hachure",re[o]||(re[o]=new Sa(i))}return re[o]})(t,Vy).fillPolygons(e,t)}function Mn(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Bc(e){return e.randomizer||(e.randomizer=new Gy(e.seed||0)),e.randomizer.next()}function eo(e,t,r,i=1){return r.roughness*i*(Bc(r)*(t-e)+e)}function pt(e,t,r=1){return eo(-e,e,t,r)}function ze(e,t,r,i,o,s=!1){const a=s?o.disableMultiStrokeFill:o.disableMultiStroke,n=Ms(e,t,r,i,o,!0,!1);if(a)return n;const l=Ms(e,t,r,i,o,!0,!0);return n.concat(l)}function Ms(e,t,r,i,o,s,a){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=o.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const d=h/2,u=.2+.2*Bc(o);let g=o.bowing*o.maxRandomnessOffset*(i-t)/200,m=o.bowing*o.maxRandomnessOffset*(e-r)/200;g=pt(g,o,c),m=pt(m,o,c);const y=[],C=()=>pt(d,o,c),x=()=>pt(h,o,c),b=o.preserveVertices;return a?y.push({op:"move",data:[e+(b?0:C()),t+(b?0:C())]}):y.push({op:"move",data:[e+(b?0:pt(h,o,c)),t+(b?0:pt(h,o,c))]}),a?y.push({op:"bcurveTo",data:[g+e+(r-e)*u+C(),m+t+(i-t)*u+C(),g+e+2*(r-e)*u+C(),m+t+2*(i-t)*u+C(),r+(b?0:C()),i+(b?0:C())]}):y.push({op:"bcurveTo",data:[g+e+(r-e)*u+x(),m+t+(i-t)*u+x(),g+e+2*(r-e)*u+x(),m+t+2*(i-t)*u+x(),r+(b?0:x()),i+(b?0:x())]}),y}function _i(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+pt(t,r),e[0][1]+pt(t,r)]),i.push([e[0][0]+pt(t,r),e[0][1]+pt(t,r)]);for(let o=1;o<e.length;o++)i.push([e[o][0]+pt(t,r),e[o][1]+pt(t,r)]),o===e.length-1&&i.push([e[o][0]+pt(t,r),e[o][1]+pt(t,r)]);return ro(i,null,r)}function ro(e,t,r){const i=e.length,o=[];if(i>3){const s=[],a=1-r.curveTightness;o.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(a*e[n+1][0]-a*e[n-1][0])/6,l[1]+(a*e[n+1][1]-a*e[n-1][1])/6],s[2]=[e[n+1][0]+(a*e[n][0]-a*e[n+2][0])/6,e[n+1][1]+(a*e[n][1]-a*e[n+2][1])/6],s[3]=[e[n+1][0],e[n+1][1]],o.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}}else i===3?(o.push({op:"move",data:[e[1][0],e[1][1]]}),o.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&o.push(...Ms(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return o}function In(e,t,r,i,o,s,a,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+o*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const d=[t+i*Math.cos(h),r+o*Math.sin(h)];l.push(d),c.push(d)}c.push([t+i*Math.cos(0),r+o*Math.sin(0)]),c.push([t+i*Math.cos(e),r+o*Math.sin(e)])}else{const h=pt(.5,n)-Math.PI/2;c.push([pt(s,n)+t+.9*i*Math.cos(h-e),pt(s,n)+r+.9*o*Math.sin(h-e)]);const d=2*Math.PI+h-.01;for(let u=h;u<d;u+=e){const g=[pt(s,n)+t+i*Math.cos(u),pt(s,n)+r+o*Math.sin(u)];l.push(g),c.push(g)}c.push([pt(s,n)+t+i*Math.cos(h+2*Math.PI+.5*a),pt(s,n)+r+o*Math.sin(h+2*Math.PI+.5*a)]),c.push([pt(s,n)+t+.98*i*Math.cos(h+a),pt(s,n)+r+.98*o*Math.sin(h+a)]),c.push([pt(s,n)+t+.9*i*Math.cos(h+.5*a),pt(s,n)+r+.9*o*Math.sin(h+.5*a)])}return[c,l]}function On(e,t,r,i,o,s,a,n,l){const c=s+pt(.1,l),h=[];h.push([pt(n,l)+t+.9*i*Math.cos(c-e),pt(n,l)+r+.9*o*Math.sin(c-e)]);for(let d=c;d<=a;d+=e)h.push([pt(n,l)+t+i*Math.cos(d),pt(n,l)+r+o*Math.sin(d)]);return h.push([t+i*Math.cos(a),r+o*Math.sin(a)]),h.push([t+i*Math.cos(a),r+o*Math.sin(a)]),ro(h,null,l)}function Zy(e,t,r,i,o,s,a,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const d=n.disableMultiStroke?1:2,u=n.preserveVertices;for(let g=0;g<d;g++)g===0?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(u?0:pt(c[0],n)),a[1]+(u?0:pt(c[0],n))]}),h=u?[o,s]:[o+pt(c[g],n),s+pt(c[g],n)],l.push({op:"bcurveTo",data:[e+pt(c[g],n),t+pt(c[g],n),r+pt(c[g],n),i+pt(c[g],n),h[0],h[1]]});return l}function Kr(e){return[...e]}function Dn(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(Kr(e[0]),Kr(e[1]),Kr(e[2]),Kr(e[2]));else{const o=[];o.push(e[0],e[0]);for(let n=1;n<e.length;n++)o.push(e[n]),n===e.length-1&&o.push(e[n]);const s=[],a=1-t;i.push(Kr(o[0]));for(let n=1;n+2<o.length;n++){const l=o[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(a*o[n+1][0]-a*o[n-1][0])/6,l[1]+(a*o[n+1][1]-a*o[n-1][1])/6],s[2]=[o[n+1][0]+(a*o[n][0]-a*o[n+2][0])/6,o[n+1][1]+(a*o[n][1]-a*o[n+2][1])/6],s[3]=[o[n+1][0],o[n+1][1]],i.push(s[1],s[2],s[3])}}return i}function Wi(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function Qy(e,t,r){const i=Wi(t,r);if(i===0)return Wi(e,t);let o=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return o=Math.max(0,Math.min(1,o)),Wi(e,Ue(t,r,o))}function Ue(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Is(e,t,r,i){const o=i||[];if((function(n,l){const c=n[l+0],h=n[l+1],d=n[l+2],u=n[l+3];let g=3*h[0]-2*c[0]-u[0];g*=g;let m=3*h[1]-2*c[1]-u[1];m*=m;let y=3*d[0]-2*u[0]-c[0];y*=y;let C=3*d[1]-2*u[1]-c[1];return C*=C,g<y&&(g=y),m<C&&(m=C),g+m})(e,t)<r){const n=e[t+0];o.length?(s=o[o.length-1],a=n,Math.sqrt(Wi(s,a))>1&&o.push(n)):o.push(n),o.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],d=e[t+3],u=Ue(l,c,.5),g=Ue(c,h,.5),m=Ue(h,d,.5),y=Ue(u,g,.5),C=Ue(g,m,.5),x=Ue(y,C,.5);Is([l,u,y,x],0,r,o),Is([x,C,m,d],0,r,o)}var s,a;return o}function Jy(e,t){return io(e,0,e.length,t)}function io(e,t,r,i,o){const s=o||[],a=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const d=Qy(e[h],a,n);d>l&&(l=d,c=h)}return Math.sqrt(l)>i?(io(e,t,c+1,i,s),io(e,c,r,i,s)):(s.length||s.push(a),s.push(n)),s}function Io(e,t=.15,r){const i=[],o=(e.length-1)/3;for(let s=0;s<o;s++)Is(e,3*s,t,i);return r&&r>0?io(i,0,i.length,r):i}const oe="none";class oo{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,o,s){const a=this._o(s);return this._d("line",[Tc(t,r,i,o,a)],a)}rectangle(t,r,i,o,s){const a=this._o(s),n=[],l=Ky(t,r,i,o,a);if(a.fill){const c=[[t,r],[t+i,r],[t+i,r+o],[t,r+o]];a.fillStyle==="solid"?n.push(Mo([c],a)):n.push(Cr([c],a))}return a.stroke!==oe&&n.push(l),this._d("rectangle",n,a)}ellipse(t,r,i,o,s){const a=this._o(s),n=[],l=wc(i,o,a),c=_s(t,r,a,l);if(a.fill)if(a.fillStyle==="solid"){const h=_s(t,r,a,l).opset;h.type="fillPath",n.push(h)}else n.push(Cr([c.estimatedPoints],a));return a.stroke!==oe&&n.push(c.opset),this._d("ellipse",n,a)}circle(t,r,i,o){const s=this.ellipse(t,r,i,i,o);return s.shape="circle",s}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Ni(t,!1,i)],i)}arc(t,r,i,o,s,a,n=!1,l){const c=this._o(l),h=[],d=An(t,r,i,o,s,a,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const u=Object.assign({},c);u.disableMultiStroke=!0;const g=An(t,r,i,o,s,a,!0,!1,u);g.type="fillPath",h.push(g)}else h.push((function(u,g,m,y,C,x,b){const S=u,B=g;let w=Math.abs(m/2),v=Math.abs(y/2);w+=pt(.01*w,b),v+=pt(.01*v,b);let F=C,L=x;for(;F<0;)F+=2*Math.PI,L+=2*Math.PI;L-F>2*Math.PI&&(F=0,L=2*Math.PI);const P=(L-F)/b.curveStepCount,$=[];for(let N=F;N<=L;N+=P)$.push([S+w*Math.cos(N),B+v*Math.sin(N)]);return $.push([S+w*Math.cos(L),B+v*Math.sin(L)]),$.push([S,B]),Cr([$],b)})(t,r,i,o,s,a,c));return c.stroke!==oe&&h.push(d),this._d("arc",h,c)}curve(t,r){const i=this._o(r),o=[],s=En(t,i);if(i.fill&&i.fill!==oe)if(i.fillStyle==="solid"){const a=En(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));o.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?a.push(...c):c.length===3?a.push(...Io(Dn([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):a.push(...Io(Dn(c),10,(1+i.roughness)/2))}a.length&&o.push(Cr([a],i))}return i.stroke!==oe&&o.push(s),this._d("curve",o,i)}polygon(t,r){const i=this._o(r),o=[],s=Ni(t,!0,i);return i.fill&&(i.fillStyle==="solid"?o.push(Mo([t],i)):o.push(Cr([t],i))),i.stroke!==oe&&o.push(s),this._d("polygon",o,i)}path(t,r){const i=this._o(r),o=[];if(!t)return this._d("path",o,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=i.fill&&i.fill!=="transparent"&&i.fill!==oe,a=i.stroke!==oe,n=!!(i.simplification&&i.simplification<1),l=(function(h,d,u){const g=kc(bc(Ta(h))),m=[];let y=[],C=[0,0],x=[];const b=()=>{x.length>=4&&y.push(...Io(x,d)),x=[]},S=()=>{b(),y.length&&(m.push(y),y=[])};for(const{key:w,data:v}of g)switch(w){case"M":S(),C=[v[0],v[1]],y.push(C);break;case"L":b(),y.push([v[0],v[1]]);break;case"C":if(!x.length){const F=y.length?y[y.length-1]:C;x.push([F[0],F[1]])}x.push([v[0],v[1]]),x.push([v[2],v[3]]),x.push([v[4],v[5]]);break;case"Z":b(),y.push([C[0],C[1]])}if(S(),!u)return m;const B=[];for(const w of m){const v=Jy(w,u);v.length&&B.push(v)}return B})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=_n(t,i);if(s)if(i.fillStyle==="solid")if(l.length===1){const h=_n(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));o.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else o.push(Mo(l,i));else o.push(Cr(l,i));return a&&(n?l.forEach((h=>{o.push(Ni(h,!1,i))})):o.push(c)),this._d("path",o,i)}opsToPath(t,r){let i="";for(const o of t.ops){const s=typeof r=="number"&&r>=0?o.data.map((a=>+a.toFixed(r))):o.data;switch(o.op){case"move":i+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":i+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":i+=`L${s[0]} ${s[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,o=[];for(const s of r){let a=null;switch(s.type){case"path":a={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:oe};break;case"fillPath":a={d:this.opsToPath(s),stroke:oe,strokeWidth:0,fill:i.fill||oe};break;case"fillSketch":a=this.fillSketch(s,i)}a&&o.push(a)}return o}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||oe,strokeWidth:i,fill:oe}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class tC{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new oo(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),o=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const a of r)switch(a.type){case"path":o.save(),o.strokeStyle=i.stroke==="none"?"transparent":i.stroke,o.lineWidth=i.strokeWidth,i.strokeLineDash&&o.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(o.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(o,a,s),o.restore();break;case"fillPath":{o.save(),o.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(o,a,s,n),o.restore();break}case"fillSketch":this.fillSketch(o,a,i)}}fillSketch(t,r,i){let o=i.fillWeight;o<0&&(o=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=o,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,o="nonzero"){t.beginPath();for(const s of r.ops){const a=typeof i=="number"&&i>=0?s.data.map((n=>+n.toFixed(i))):s.data;switch(s.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}r.type==="fillPath"?t.fill(o):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,o,s){const a=this.gen.line(t,r,i,o,s);return this.draw(a),a}rectangle(t,r,i,o,s){const a=this.gen.rectangle(t,r,i,o,s);return this.draw(a),a}ellipse(t,r,i,o,s){const a=this.gen.ellipse(t,r,i,o,s);return this.draw(a),a}circle(t,r,i,o){const s=this.gen.circle(t,r,i,o);return this.draw(s),s}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,o,s,a,n=!1,l){const c=this.gen.arc(t,r,i,o,s,a,n,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const Mi="http://www.w3.org/2000/svg";class eC{constructor(t,r){this.svg=t,this.gen=new oo(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),o=this.svg.ownerDocument||window.document,s=o.createElementNS(Mi,"g"),a=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=o.createElementNS(Mi,"path"),l.setAttribute("d",this.opsToPath(n,a)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=o.createElementNS(Mi,"path"),l.setAttribute("d",this.opsToPath(n,a)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(o,n,i)}l&&s.appendChild(l)}return s}fillSketch(t,r,i){let o=i.fillWeight;o<0&&(o=i.strokeWidth/2);const s=t.createElementNS(Mi,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",o+""),s.setAttribute("fill","none"),i.fillLineDash&&s.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,o,s){const a=this.gen.line(t,r,i,o,s);return this.draw(a)}rectangle(t,r,i,o,s){const a=this.gen.rectangle(t,r,i,o,s);return this.draw(a)}ellipse(t,r,i,o,s){const a=this.gen.ellipse(t,r,i,o,s);return this.draw(a)}circle(t,r,i,o){const s=this.gen.circle(t,r,i,o);return this.draw(s)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,o,s,a,n=!1,l){const c=this.gen.arc(t,r,i,o,s,a,n,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var it={canvas:(e,t)=>new tC(e,t),svg:(e,t)=>new eC(e,t),generator:e=>new oo(e),newSeed:()=>oo.newSeed()},rC=1,iC=3;async function wa(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!Ba(e);await Promise.all([...t].map(i=>new Promise(o=>{function s(){if(i.style.display="flex",i.style.flexDirection="column",r){const a=Bt().fontSize?Bt().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[l=wh.fontSize]=go(a),c=l*n+"px";i.style.minWidth=c,i.style.maxWidth=c}else i.style.width="100%";o(i)}p(s,"setupImage"),setTimeout(()=>{i.complete&&s()}),i.addEventListener("error",s),i.addEventListener("load",s)})))}p(wa,"configureLabelImages");function Ba(e){return e.nodeType===iC?e.textContent?.trim()!=="":e.nodeType!==rC||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(Ba)}p(Ba,"hasTextBesidesImages");var $n=3,oC=32,sC=p(async(e,t,r)=>{const i=Bt(),o=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),s=o.insert("g").attr("class","label").attr("style",zt(t.labelStyle)),n=[{text:typeof t.label=="string"?t.label:t.label?.[0]??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(x=>({text:x,cssClass:"c4-descr"}))].filter(x=>x.text),l=t.width?Math.max(t.width-2*(t.padding??0),oC):Bt().flowchart?.wrappingWidth??200,h=i.c4?.wrap??!0?l:Number.POSITIVE_INFINITY,d=await Promise.all(n.map(async x=>{const b=s.append("g").attr("class",x.cssClass),S=await ye(b,ne(We(x.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:h,style:t.labelStyle},i);return mt(S).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),mt(S).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:b,box:b.node().getBBox()}})),u=Math.max(...d.map(({box:x})=>x.width),0);let g=0;for(const{el:x,box:b}of d)x.attr("transform",`translate(${u/2-b.x-b.width/2}, ${g-b.y})`),g+=b.height+$n;const m=d.length>0?g-$n:0;s.insert("rect",":first-child"),s.attr("transform",`translate(${-u/2}, ${-m/2})`);const y=s.node().getBBox(),C=(t.padding??0)/2;return{shapeSvg:o,bbox:y,halfPadding:C,label:s}},"c4LabelHelper"),ct=p(async(e,t,r)=>{if(t.stereotype!==void 0)return sC(e,t,r);let i;const o=t.useHtmlLabels||ve(Bt()?.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),a=s.insert("g").attr("class","label").attr("style",zt(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",h=await ye(a,ne(We(n),Bt()),{useHtmlLabels:o,width:t.width||t.wrappingWidth||Bt().flowchart?.wrappingWidth,classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},Bt()),d=(t?.padding??0)/2;let u;if(o){const g=h.children[0],m=mt(h);await wa(g),u=await or.measure(()=>g.getBoundingClientRect()),m.attr("width",u.width),m.attr("height",u.height)}else u=await or.measure(()=>h.getBBox());return o?a.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):a.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&a.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:s,bbox:u,halfPadding:d,label:a}},"labelHelper"),Oo=p(async(e,t,r)=>{const i=r.useHtmlLabels??Qt(Bt()),o=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await ye(o,ne(We(t),Bt()),{useHtmlLabels:i,width:r.width||Bt()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),a=r.padding/2;let n;if(Qt(Bt())){const l=s.children[0],c=mt(s);n=await or.measure(()=>l.getBoundingClientRect()),c.attr("width",n.width),c.attr("height",n.height)}else n=await or.measure(()=>s.getBBox());return i?o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):o.attr("transform","translate(0, "+-n.height/2+")"),r.centerLabel&&o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:e,bbox:n,halfPadding:a,label:o}},"insertLabel"),st=p((e,t,r)=>{if(r){e.width=r.width,e.height=r.height;return}const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),dt=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function Et(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(Et,"createPathFromPoints");function He(e,t,r,i,o,s){const a=[],l=r-e,c=i-t,h=l/s,d=2*Math.PI/h,u=t+c/2;for(let g=0;g<=50;g++){const m=g/50,y=e+m*l,C=u+o*Math.sin(d*(y-e));a.push({x:y,y:C})}return a}p(He,"generateFullSineWavePoints");function Te(e,t,r,i,o,s){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const u=n+d*h,g=e+r*Math.cos(u),m=t+r*Math.sin(u);a.push({x:-g,y:-m})}return a}p(Te,"generateCirclePoints");function Os(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const o=t.find(l=>l.getAttribute("fill")!=="none"),s=t.find(l=>l.getAttribute("stroke")!=="none"),a=p((l,c)=>l?.getAttribute(c)??void 0,"getAttr");if(o){const l={fill:a(o,"fill"),"fill-opacity":a(o,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(s){const l={stroke:a(s,"stroke"),"stroke-width":a(s,"stroke-width")??"1","stroke-opacity":a(s,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}p(Os,"mergePaths");var aC=p((e,t)=>{var r=e.x,i=e.y,o=t.x-r,s=t.y-i,a=e.width/2,n=e.height/2,l,c;return Math.abs(s)*a>Math.abs(o)*n?(s<0&&(n=-n),l=s===0?0:n*o/s,c=n):(o<0&&(a=-a),l=a,c=o===0?0:a*s/o),{x:r+l,y:i+c}},"intersectRect"),lr=aC,de=p((e,t,r,i,o)=>["M",e+o,t,"H",e+r-o,"A",o,o,0,0,1,e+r,t+o,"V",t+i-o,"A",o,o,0,0,1,e+r-o,t+i,"H",e+o,"A",o,o,0,0,1,e,t+i-o,"V",t+o,"A",o,o,0,0,1,e+o,t,"Z"].join(" "),"createRoundedRectPathD"),nC=p(async(e,t,r,i=!1,o=!1)=>{let s=t||"";typeof s=="object"&&(s=s[0]);const a=Bt(),n=Qt(a);return await ye(e,s,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},a)},"createLabel"),qe=nC;function vc(e,t){return e.intersect(t)}p(vc,"intersectNode");var lC=vc;function Lc(e,t,r,i){var o=e.x,s=e.y,a=o-i.x,n=s-i.y,l=Math.sqrt(t*t*n*n+r*r*a*a),c=Math.abs(t*r*a/l);i.x<o&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<s&&(h=-h),{x:o+c,y:s+h}}p(Lc,"intersectEllipse");var Fc=Lc;function Ec(e,t,r){return Fc(e,t,t,r)}p(Ec,"intersectCircle");var hC=Ec;function Ac(e,t,r,i){{const o=t.y-e.y,s=e.x-t.x,a=t.x*e.y-e.x*t.y,n=o*r.x+s*r.y+a,l=o*i.x+s*i.y+a,c=1e-6;if(n!==0&&l!==0&&Ds(n,l))return;const h=i.y-r.y,d=r.x-i.x,u=i.x*r.y-r.x*i.y,g=h*e.x+d*e.y+u,m=h*t.x+d*t.y+u;if(Math.abs(g)<c&&Math.abs(m)<c&&Ds(g,m))return;const y=o*d-h*s;if(y===0)return;const C=Math.abs(y/2);let x=s*u-d*a;const b=x<0?(x-C)/y:(x+C)/y;x=h*a-o*u;const S=x<0?(x-C)/y:(x+C)/y;return{x:b,y:S}}}p(Ac,"intersectLine");function Ds(e,t){return e*t>0}p(Ds,"sameSign");var cC=Ac;function _c(e,t,r){let i=e.x,o=e.y,s=[],a=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){a=Math.min(a,h.x),n=Math.min(n,h.y)}):(a=Math.min(a,t.x),n=Math.min(n,t.y));let l=i-e.width/2-a,c=o-e.height/2-n;for(let h=0;h<t.length;h++){let d=t[h],u=t[h<t.length-1?h+1:0],g=cC(e,r,{x:l+d.x,y:c+d.y},{x:l+u.x,y:c+u.y});g&&s.push(g)}return s.length?(s.length>1&&s.sort(function(h,d){let u=h.x-r.x,g=h.y-r.y,m=Math.sqrt(u*u+g*g),y=d.x-r.x,C=d.y-r.y,x=Math.sqrt(y*y+C*C);return m<x?-1:m===x?0:1}),s[0]):e}p(_c,"intersectPolygon");var dC=_c,tt={node:lC,circle:hC,ellipse:Fc,polygon:dC,rect:lr};function Mc(e,t){const{labelStyles:r}=at(t);t.labelStyle=r;const i=dt(t);let o=i;i||(o="anchor");const s=e.insert("g").attr("class",o).attr("id",t.domId||t.id),a=1,{cssStyles:n}=t,l=it.svg(s),c=et(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,a*2,c),d=s.insert(()=>h,":first-child");return d.attr("class","anchor").attr("style",zt(n)),st(t,d),t.intersect=function(u){return M.info("Circle intersect",t,a,u),tt.circle(t,a,u)},s}p(Mc,"anchor");function $s(e,t,r,i,o,s,a){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),d=(r-e)/2,u=(i-t)/2,g=d/o,m=u/s,y=Math.sqrt(g**2+m**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");const C=Math.sqrt(1-y**2),x=l+C*s*Math.sin(h)*(a?-1:1),b=c-C*o*Math.cos(h)*(a?-1:1),S=Math.atan2((t-b)/s,(e-x)/o);let w=Math.atan2((i-b)/s,(r-x)/o)-S;a&&w<0&&(w+=2*Math.PI),!a&&w>0&&(w-=2*Math.PI);const v=[];for(let F=0;F<20;F++){const L=F/19,P=S+L*w,$=x+o*Math.cos(P),N=b+s*Math.sin(P);v.push({x:$,y:N})}return v}p($s,"generateArcPoints");function Ic(e,t,r){const[i,o]=[t,r].sort((s,a)=>a-s);return o*(1-Math.sqrt(1-(e/i/2)**2))}p(Ic,"calculateArcSagitta");async function Oc(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=p(P=>P+a,"calcTotalHeight"),l=p(P=>{const $=P/2;return[$/(2.5+P/50),$]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await ct(e,t,dt(t)),d=n(t?.height?t?.height:h.height),[u,g]=l(d),m=Ic(d,u,g),C=(t?.width?t?.width:h.width)+s*2+m-m,x=d,{cssStyles:b}=t,S=[{x:C/2,y:-x/2},{x:-C/2,y:-x/2},...$s(-C/2,-x/2,-C/2,x/2,u,g,!1),{x:C/2,y:x/2},...$s(C/2,x/2,C/2,-x/2,u,g,!0)],B=it.svg(c),w=et(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=Et(S),F=B.path(v,w),L=c.insert(()=>F,":first-child");return L.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${u/2}, 0)`),st(t,L),t.intersect=function(P){return tt.polygon(t,S,P)},c}p(Oc,"bowTieRect");async function Dc(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=at(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,label:n}=await ct(e,t,dt(t)),l=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,h=Math.max(a.width+c*2,t.width??0,80),d=Math.max(Math.min(h*.08,12),5),u=Math.max(a.height+c*2+d,t.height??0),g=-u/2+d,m=u/2,y=h*.72,C=[`M${-h/2},${g}`,`L${-y/2},${m}`,`A${y/2},${d} 0 0 0 ${y/2},${m}`,`L${h/2},${g}`,`A${h/2},${d} 0 0 0 ${-h/2},${g}`,"Z"].join(" "),{cssStyles:x}=t,b=s.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const L=it.svg(s).path(C,et(t,{}));b.node()?.appendChild(L),x&&b.attr("style",x)}else b.append("path").attr("d",C).attr("style",o);b.append("ellipse").attr("cx",0).attr("cy",g).attr("rx",h/2).attr("ry",d).attr("style",`fill:none;stroke:${l};stroke-width:1px`),st(t,b);const S=g+(m-g)/2;n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${S-a.height/2-(a.y-(a.top??0))})`);const B=12,w=p((F,L,P)=>Array.from({length:B+1},($,N)=>{const J=Math.PI-N*Math.PI/B;return{x:F*Math.cos(J),y:L+P*d*Math.sin(J)}}),"arc"),v=[...w(h/2,g,-1),...w(y/2,m,1).reverse()];return t.intersect=function(F){return tt.polygon(t,v,F)},s}p(Dc,"bucket");var Pn=20,Rn=8,uC=80,Do=8;async function $c(e,t){const{themeVariables:r}=Bt(),i=r.clusterBkg,o=r.clusterBorder,{nodeStyles:s}=at(t),{shapeSvg:a,bbox:n}=await ct(e,t,dt(t)),l=t.padding??8,c=n.height,h=Math.max(n.width+l*2,uC,t?.width??0),d=Math.max(c+Rn+Pn+l*2,t?.height??0),u=-h/2,g=-d/2,m=-28/2,y=a.select(".label");y&&(t.useHtmlLabels??Qt(Bt())?y.attr("transform",`translate(${-n.width/2}, ${-n.height/2+m})`):y.attr("transform",`translate(0, ${-n.height/2+m})`));let C;if(t.look==="handDrawn"){const w=it.svg(a),v=et(t,{fill:i,stroke:o,fillStyle:"solid"}),F=w.path(de(u,g,h,d,Do),v);C=a.insert(()=>F,":first-child"),C.attr("class","basic label-container collapsed-group").attr("style",zt(t.cssStyles))}else C=a.insert("rect",":first-child"),C.attr("class","basic label-container collapsed-group").attr("style",s).attr("rx",Do).attr("ry",Do).attr("x",u).attr("y",g).attr("width",h).attr("height",d).attr("fill",i).attr("stroke",o);const x=g+l+c+Rn;a.append("line").attr("class","collapsed-separator").attr("x1",u+8).attr("y1",x).attr("x2",u+h-8).attr("y2",x).attr("stroke",o).attr("stroke-dasharray","3, 3");const b=x+Pn/2,S=2.5,B=10;for(let w=-1;w<=1;w++)a.append("circle").attr("class","collapsed-indicator").attr("cx",w*B).attr("cy",b).attr("r",S).attr("fill",o);return st(t,C),t.calcIntersect=function(w,v){return tt.rect(w,v)},t.intersect=function(w){return tt.rect(t,w)},a}p($c,"collapsedGroup");function Le(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(o){return o.x+","+o.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(Le,"insertPolygonShape");var gC=["right","left","up","down"],va="point",pC=p(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),fC=p(e=>gC.filter(t=>e.has(t)).join("|")||va,"getDirectionKey"),qn={"right|left|up|down":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:0,y:0},{x:t,y:0},{x:i/2,y:2*r},{x:i-t,y:0},{x:i,y:0},{x:i,y:-e/3},{x:i+2*r,y:-e/2},{x:i,y:-2*e/3},{x:i,y:-e},{x:i-t,y:-e},{x:i/2,y:-e-2*r},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*r,y:-e/2},{x:0,y:-e/3}],"right|left|up|down"),"right|left|up":p(({height:e,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],"right|left|up"),"right|left|down":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-e},{x:r-t,y:-e},{x:r,y:0}],"right|left|down"),"right|up|down":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-e+t},{x:0,y:-e}],"right|up|down"),"left|up|down":p(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:r,y:-e}],"left|up|down"),"right|left":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"right|left"),"up|down":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"up|down"),"right|up":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":p(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":p(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":p(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e+r}],"right"),left:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"left"),up:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r}],"up"),down:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"down"),[va]:()=>[{x:0,y:0}]},mC=p((e,t,r,i)=>{const o=pC(e),s=(r.padding??0)/2,a=t.height+4*s,n=a/2,l=i??t.width+2*n+2*s,c=fC(o);return(qn[c]??qn[va])({height:a,midpoint:n,padding:s,width:l})},"getArrowPoints");async function Pc(e,t){const r=t,{shapeSvg:i,bbox:o}=await ct(e,r,dt(r)),s=r.padding??0,a=o.height+2*s,n=a/2,l=o.width+2*n+s,c=r.width??0,d=r.positioned&&(r.widthInColumns??1)>1&&c>l?c:l,u=mC(r.directions??[],o,r,d),g=Le(i,d,a,u);return g.attr("style",r.style??null),st(r,g),r.intersect=function(m){return tt.polygon(r,u,m)},i}p(Pc,"block_arrow");async function Rc(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=at(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,label:n}=await ct(e,t,dt(t)),l=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,h=18,d=12,u=Math.max(a.width+c*2,t.width??0,90),g=Math.max(a.height+c*2+h,t.height??0),m=-g/2,{cssStyles:y}=t,C=s.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const S=it.svg(s).path(de(-u/2,m,u,g,d),et(t,{}));C.node()?.appendChild(S),y&&C.attr("style",y)}else C.append("rect").attr("x",-u/2).attr("y",m).attr("width",u).attr("height",g).attr("rx",d).attr("ry",d).attr("style",o);C.append("line").attr("x1",-u/2).attr("y1",m+h).attr("x2",u/2).attr("y2",m+h).attr("style",`stroke:${l};stroke-width:1px`);for(let b=0;b<3;b++)C.append("circle").attr("cx",-u/2+12+b*9).attr("cy",m+h/2).attr("r",2.5).attr("style",`fill:${l};stroke:none`);C.append("rect").attr("class","browser-address-bar").attr("x",-u/2+44).attr("y",m+4).attr("width",Math.max(u-56,10)).attr("height",h-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${l};stroke-width:1px;opacity:0.6`),st(t,C);const x=m+h+(g-h)/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${x-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(b){return tt.rect(t,b)},s}p(Rc,"browser");var Ii=12;async function qc(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?28:o,a=t.look==="neo"?24:o,{shapeSvg:n,bbox:l}=await ct(e,t,dt(t)),c=(t?.width??l.width)+(t.look==="neo"?s*2:s+Ii),h=(t?.height??l.height)+(t.look==="neo"?a*2:a),d=0,u=c,g=-h,m=0,y=[{x:d+Ii,y:g},{x:u,y:g},{x:u,y:m},{x:d,y:m},{x:d,y:g+Ii},{x:d+Ii,y:g}];let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const b=it.svg(n),S=et(t,{}),B=Et(y),w=b.path(B,S);C=n.insert(()=>w,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),x&&C.attr("style",x)}else C=Le(n,c,h,y);return i&&C.attr("style",i),st(t,C),t.intersect=function(b){return tt.polygon(t,y,b)},n}p(qc,"card");function Nc(e,t){const{nodeStyles:r}=at(t);t.label="";const i=e.insert("g").attr("class",dt(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,s=Math.max(28,t.width??0),a=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],n=it.svg(i),l=et(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=Et(a),h=n.path(c,l),d=i.insert(()=>h,":first-child");return o&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(u){return tt.polygon(t,a,u)},i}p(Nc,"choice");async function La(e,t,r){const{labelStyles:i,nodeStyles:o}=at(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,halfPadding:n}=await ct(e,t,dt(t)),l=16,c=r?.padding??n,h=t.look==="neo"?a.width/2+l*2:a.width/2+c;let d;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=it.svg(s),m=et(t,{}),y=g.circle(0,0,h*2,m);d=s.insert(()=>y,":first-child"),d.attr("class","basic label-container").attr("style",zt(u))}else d=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",h).attr("cx",0).attr("cy",0);return st(t,d),t.calcIntersect=function(g,m){const y=g.width/2;return tt.circle(g,y,m)},t.intersect=function(g){return M.info("Circle intersect",t,h,g),tt.circle(t,h,g)},s}p(La,"circle");async function Wc(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:o,bbox:s,halfPadding:a}=await ct(e,r,i),n=o.insert("rect",":first-child"),l=r.padding??0,c=r.positioned?r.width??0:s.width+l,h=r.positioned?r.height??0:s.height+l,d=r.positioned?-c/2:-s.width/2-a,u=r.positioned?-h/2:-s.height/2-a;return n.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",d).attr("y",u).attr("width",c).attr("height",h),st(r,n),r.intersect=function(g){return tt.rect(r,g)},o}p(Wc,"composite");async function zc(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=at(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,label:n}=await ct(e,t,dt(t)),l=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,h=20,d=12,u=Math.max(a.width+c*2,t.width??0,90),g=Math.max(a.height+c*2+h,t.height??0),m=-g/2,{cssStyles:y}=t,C=s.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const S=it.svg(s).path(de(-u/2,m,u,g,d),et(t,{}));C.node()?.appendChild(S),y&&C.attr("style",y)}else C.append("rect").attr("x",-u/2).attr("y",m).attr("width",u).attr("height",g).attr("rx",d).attr("ry",d).attr("style",o);C.append("text").attr("x",-u/2+12).attr("y",m+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${l}`).text(">_"),st(t,C);const x=m+h+(g-h)/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${x-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(b){return tt.rect(t,b)},s}p(zc,"consoleWindow");function Hc(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,o={x:i/2*t,y:i/2*r},s={x:-(i/2)*t,y:i/2*r},a={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${s.x},${s.y} L ${n.x},${n.y}
207
+ M ${o.x},${o.y} L ${a.x},${a.y}`}p(Hc,"createLine");function Yc(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r,t.label="";const o=e.insert("g").attr("class",dt(t)).attr("id",t.domId??t.id),s=Math.max(30,t?.width??0),{cssStyles:a}=t,n=it.svg(o),l=et(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,s*2,l),h=Hc(s),d=n.path(h,l),u=o.insert(()=>c,":first-child");return u.insert(()=>d),u.attr("class","outer-path"),a&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",i),st(t,u),t.intersect=function(g){return M.info("crossedCircle intersect",t,{radius:s,point:g}),tt.circle(t,s,g)},o}p(Yc,"crossedCircle");function Ae(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const u=n+d*h,g=e+r*Math.cos(u),m=t+r*Math.sin(u);a.push({x:-g,y:-m})}return a}p(Ae,"generateCirclePoints");async function jc(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await ct(e,t,dt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+n,h=s.height+l,d=Math.max(5,h*.1),{cssStyles:u}=t,g=[...Ae(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...Ae(c/2+d*2,-d,d,20,-180,-270),...Ae(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...Ae(c/2,h/2,d,20,0,90)],m=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...Ae(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...Ae(c/2+c*.1,-d,d,20,-180,-270),...Ae(c/2+c*.1,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...Ae(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2,y:h/2+d}],y=it.svg(o),C=et(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=Et(g).replace("Z",""),S=y.path(b,C),B=Et(m),w=y.path(B,{...C}),v=o.insert("g",":first-child");return v.insert(()=>w,":first-child").attr("stroke-opacity",0),v.insert(()=>S,":first-child"),v.attr("class","text"),u&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${d}, 0)`),a.attr("transform",`translate(${-c/2+d-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),st(t,v),t.intersect=function(F){return tt.polygon(t,m,F)},o}p(jc,"curlyBraceLeft");function _e(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const u=n+d*h,g=e+r*Math.cos(u),m=t+r*Math.sin(u);a.push({x:g,y:m})}return a}p(_e,"generateCirclePoints");async function Xc(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await ct(e,t,dt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+(t.look==="neo"?n*2:n),h=s.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:u}=t,g=[..._e(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},..._e(c/2+d*2,-d,d,20,-180,-270),..._e(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},..._e(c/2,h/2,d,20,0,90)],m=[{x:-c/2,y:-h/2-d},{x:c/2,y:-h/2-d},..._e(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},..._e(c/2+d*2,-d,d,20,-180,-270),..._e(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},..._e(c/2,h/2,d,20,0,90),{x:c/2,y:h/2+d},{x:-c/2,y:h/2+d}],y=it.svg(o),C=et(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=Et(g).replace("Z",""),S=y.path(b,C),B=Et(m),w=y.path(B,{...C}),v=o.insert("g",":first-child");return v.insert(()=>w,":first-child").attr("stroke-opacity",0),v.insert(()=>S,":first-child"),v.attr("class","text"),u&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${-d}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),st(t,v),t.intersect=function(F){return tt.polygon(t,m,F)},o}p(Xc,"curlyBraceRight");function Xt(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const u=n+d*h,g=e+r*Math.cos(u),m=t+r*Math.sin(u);a.push({x:-g,y:-m})}return a}p(Xt,"generateCirclePoints");async function Gc(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await ct(e,t,dt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+(t.look==="neo"?n*2:n),h=s.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:u}=t,g=[...Xt(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...Xt(c/2+d*2,-d,d,20,-180,-270),...Xt(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...Xt(c/2,h/2,d,20,0,90)],m=[...Xt(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...Xt(-c/2-d/2,-d,d,20,0,90),...Xt(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...Xt(-c/2+d+d/2,h/2,d,30,-180,-270)],y=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...Xt(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...Xt(c/2+d*2,-d,d,20,-180,-270),...Xt(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...Xt(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2-d-d/2,y:h/2+d},...Xt(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...Xt(-c/2-d/2,-d,d,20,0,90),...Xt(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...Xt(-c/2+d+d/2,h/2,d,30,-180,-270)],C=it.svg(o),x=et(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const S=Et(g).replace("Z",""),B=C.path(S,x),v=Et(m).replace("Z",""),F=C.path(v,x),L=Et(y),P=C.path(L,{...x}),$=o.insert("g",":first-child");return $.insert(()=>P,":first-child").attr("stroke-opacity",0),$.insert(()=>B,":first-child"),$.insert(()=>F,":first-child"),$.attr("class","text"),u&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",i),$.attr("transform",`translate(${d-d/4}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),st(t,$),t.intersect=function(N){return tt.polygon(t,y,N)},o}p(Gc,"curlyBraces");async function Uc(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=20,l=5,{shapeSvg:c,bbox:h}=await ct(e,t,dt(t)),d=Math.max(n,(h.width+s*2)*1.25,t?.width??0),u=Math.max(l,h.height+a*2,t?.height??0),g=u/2,{cssStyles:m}=t,y=it.svg(c),C=et(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=d,b=u,S=x-g,B=b/4,w=[{x:S,y:0},{x:B,y:0},{x:0,y:b/2},{x:B,y:b},{x:S,y:b},...Te(-S,-b/2,g,50,270,90)],v=Et(w),F=y.path(v,C),L=c.insert(()=>F,":first-child");return L.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",i),L.attr("transform",`translate(${-d/2}, ${-u/2})`),st(t,L),t.intersect=function(P){return tt.polygon(t,w,P)},c}p(Uc,"curvedTrapezoid");async function Vc(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await ct(e,t,dt(t)),n=t.padding??20,l=Math.max(s.width+n*2,t.width??0,100),c=Math.min(Math.max(l*.23,16),56),h=c*.27,d=Math.max(s.height+n*2,t.height?t.height-(2*c-h):0),u=Math.min(l*.177,d*.45),g=d+2*c-h,m=-g/2,y=m+2*c-h,C=o.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:x}=t;if(t.look==="handDrawn"){const L=it.svg(o),P=et(t,{}),$=L.path(de(-l/2,y,l,d,u),P),N=L.circle(0,m+c,c*2,P);C.insert(()=>N,":first-child"),C.insert(()=>$,":first-child"),x&&C.attr("style",x)}else C.append("rect").attr("x",-l/2).attr("y",y).attr("width",l).attr("height",d).attr("rx",u).attr("ry",u).attr("style",i),C.append("circle").attr("cx",0).attr("cy",m+c).attr("r",c).attr("style",i);st(t,C);const b=y+d/2;a.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${b-s.height/2-(s.y-(s.top??0))})`);const S=m+c,B=Math.asin(Math.min(1,(y-S)/c))*180/Math.PI,F=[...Te(0,-S,c,24,180+B,-B),...Te(-(-l/2+u),-(y+u),u,12,90,0),...Te(-(-l/2+u),-(g/2-u),u,12,360,270),...Te(-(l/2-u),-(g/2-u),u,12,270,180),...Te(-(l/2-u),-(y+u),u,12,180,90)];return t.intersect=function(L){return tt.polygon(t,F,L)},o}p(Vc,"person");var yC=p((e,t,r,i,o,s)=>[`M${e},${t+s}`,`a${o},${s} 0,0,0 ${r},0`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),CC=p((e,t,r,i,o,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),xC=p((e,t,r,i,o,s)=>[`M${e-r/2},${-i/2}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Nn=8,Wn=8;async function Kc(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?24:o,a=t.look==="neo"?24:o,n=t.width??0;if(t.width&&(t.width=t.width-a,t.width<Wn&&(t.width=Wn)),t.height){const b=n/2/(2.5+n/50);t.height=t.height-s-b*3,t.height<Nn&&(t.height=Nn)}const{shapeSvg:l,bbox:c,label:h}=await ct(e,t,dt(t)),d=Math.max(t.width??0,c.width)+a,u=d/2,g=u/(2.5+d/50),m=Math.max(t.height??0,c.height)+s+g;let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=it.svg(l),b=CC(0,0,d,m,u,g),S=xC(0,g,d,m,u,g),B=et(t,{}),w=x.path(b,B),v=x.path(S,et(t,{fill:"none"}));y=l.insert(()=>v,":first-child"),y=l.insert(()=>w,":first-child"),y.attr("class","basic label-container"),C&&y.attr("style",C)}else{const x=yC(0,0,d,m,u,g);y=l.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",zt(C)).attr("style",i)}return y.attr("label-offset-y",g),y.attr("transform",`translate(${-d/2}, ${-(m/2+g)})`),st(t,y),h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(x){const b=tt.rect(t,x),S=b.x-(t.x??0);if(u!=0&&(Math.abs(S)<(t.width??0)/2||Math.abs(S)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-g)){let B=g*g*(1-S*S/(u*u));B>0&&(B=Math.sqrt(B)),B=g-B,x.y-(t.y??0)>0&&(B=-B),b.y+=B}return b},l}p(Kc,"cylinder");async function Dr(e,t,r){const{labelStyles:i,nodeStyles:o}=at(t);t.labelStyle=i;const{shapeSvg:s,bbox:a}=await ct(e,t,dt(t)),n=Math.max(a.width+r.labelPaddingX*2,t?.width||0),l=Math.max(a.height+r.labelPaddingY*2,t?.height||0),c=-n/2,h=-l/2;let d,{rx:u,ry:g}=t;const{cssStyles:m}=t;if(r?.rx&&r.ry&&(u=r.rx,g=r.ry),t.look==="handDrawn"){const y=it.svg(s),C=et(t,{}),x=u||g?y.path(de(c,h,n,l,u||0),C):y.rectangle(c,h,n,l,C);d=s.insert(()=>x,":first-child"),d.attr("class","basic label-container").attr("style",zt(m))}else d=s.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",o).attr("rx",zt(u)).attr("ry",zt(g)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return st(t,d,t.look==="handDrawn"?void 0:{width:n,height:l}),t.calcIntersect=function(y,C){return tt.rect(y,C)},t.intersect=function(y){return tt.rect(t,y)},s}p(Dr,"drawRect");async function Zc(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:o,padding:s,width:a,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(s??0)*2,labelPaddingY:o??s??0},c=await Dr(e,t,l);if(t.look==="handDrawn"){const g=it.svg(c),m=et(t,{}),y=c.select(".basic.label-container > path:nth-child(2)"),C=y.node();if(!C)return c;let x=null;if(C instanceof SVGGraphicsElement)x=C.getBBox();else return c;return c.insert(()=>g.line(x.x,x.y,x.x+x.width,x.y,m),".basic.label-container g.label"),c.insert(()=>g.line(x.x,x.y+x.height,x.x+x.width,x.y+x.height,m),".basic.label-container g.label"),y.remove(),c}const h=c.select(".basic.label-container"),d=(Number(h.attr("width"))||a)??0,u=(Number(h.attr("height"))||n)??0;return d>0&&u>0&&h.attr("stroke-dasharray",`${d} ${u}`),c}p(Zc,"datastore");async function Qc(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?16:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await ct(e,t,dt(t)),c=n.width+o,h=n.height+s,d=h*.2,u=-c/2,g=-h/2-d/2,{cssStyles:m}=t,y=it.svg(a),C=et(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:u,y:g+d},{x:-u,y:g+d},{x:-u,y:-g},{x:u,y:-g},{x:u,y:g},{x:-u,y:g},{x:-u,y:g+d}],b=y.polygon(x.map(B=>[B.x,B.y]),C),S=a.insert(()=>b,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${u+(t.padding??0)/2-(n.x-(n.left??0))}, ${g+d+(t.padding??0)/2-(n.y-(n.top??0))})`),st(t,S),t.intersect=function(B){return tt.rect(t,B)},a}p(Qc,"dividedRectangle");async function Jc(e,t){const{labelStyles:r,nodeStyles:i}=at(t),o=t.look==="neo"?12:5;t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,{shapeSvg:n,bbox:l}=await ct(e,t,dt(t)),c=(t?.width?t?.width/2:l.width/2)+(a??0),h=c-o;let d;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=it.svg(n),m=et(t,{roughness:.2,strokeWidth:2.5}),y=et(t,{roughness:.2,strokeWidth:1.5}),C=g.circle(0,0,c*2,m),x=g.circle(0,0,h*2,y);d=n.insert("g",":first-child"),d.attr("class",zt(t.cssClasses)).attr("style",zt(u)),d.node()?.appendChild(C),d.node()?.appendChild(x)}else{d=n.insert("g",":first-child");const g=d.insert("circle",":first-child"),m=d.insert("circle");d.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return st(t,d),t.intersect=function(g){return M.info("DoubleCircle intersect",t,c,g),tt.circle(t,c,g)},n}p(Jc,"doublecircle");function td(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=at(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",dt(t)).attr("id",t.domId??t.id),a=7,{cssStyles:n}=t,l=it.svg(s),{nodeBorder:c}=r,h=et(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const d=l.circle(0,0,a*2,h),u=s.insert(()=>d,":first-child");return u.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",o),st(t,u),t.intersect=function(g){return M.info("filledCircle intersect",t,{radius:a,point:g}),tt.circle(t,a,g)},s}p(td,"filledCircle");var zn=10,Hn=10;async function ed(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?o*2:o;(t.width||t.height)&&(t.height=t?.height??0,t.height<zn&&(t.height=zn),t.width=(t?.width??0)-s-s/2,t.width<Hn&&(t.width=Hn));const{shapeSvg:a,bbox:n,label:l}=await ct(e,t,dt(t)),c=(t?.width?t?.width:n.width)+(s??0),h=t?.height?t?.height:c+n.height,d=h,u=[{x:0,y:-h},{x:d,y:-h},{x:d/2,y:0}],{cssStyles:g}=t,m=it.svg(a),y=et(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=Et(u),x=m.path(C,y),b=a.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return g&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=c,t.height=h,st(t,b),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-h/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(S){return M.info("Triangle intersect",t,u,S),tt.polygon(t,u,S)},a}p(ed,"flippedTriangle");async function rd(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await ct(e,t,dt(t)),n=t.padding??12,l=Math.max(s.width+n*2,t.width??0,90),c=s.height+n*2,h=Math.max(Math.min(c*.16,14),8),d=Math.max(c+h,t.height??0),u=d-h,g=Math.max(l*.38,28),m=-d/2,y=[{x:-l/2,y:m},{x:-l/2+g,y:m},{x:-l/2+g,y:m+h},{x:l/2,y:m+h},{x:l/2,y:d/2},{x:-l/2,y:d/2}],C=[`M${y[0].x},${y[0].y}`,...y.slice(1).map(B=>`L${B.x},${B.y}`),"Z"].join(" "),{cssStyles:x}=t;let b;if(t.look==="handDrawn"){const w=it.svg(o).path(C,et(t,{}));b=o.insert(()=>w,":first-child").attr("class","basic label-container"),x&&b.attr("style",x)}else b=o.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",i);t.look==="handDrawn"?st(t,b):st(t,b,{width:l,height:d});const S=m+h+u/2;return a.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${S-s.height/2-(s.y-(s.top??0))})`),t.intersect=function(B){return tt.polygon(t,y,B)},o}p(rd,"folder");function id(e,t,{dir:r,config:{state:i,themeVariables:o}}){const{nodeStyles:s}=at(t);t.label="";const a=e.insert("g").attr("class",dt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,d=-1*c/2,u=it.svg(a),g=et(t,{stroke:o.lineColor,fill:o.lineColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=u.rectangle(h,d,l,c,g),y=a.insert(()=>m,":first-child");n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",s),st(t,y);const C=i?.padding??0;return t.width&&t.height&&(t.width+=C/2||0,t.height+=C/2||0),t.intersect=function(x){return tt.rect(t,x)},a}p(id,"forkJoin");async function od(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=15,s=10,a=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-n*2,t.height<s&&(t.height=s),t.width=(t?.width??0)-a*2,t.width<o&&(t.width=o));const{shapeSvg:l,bbox:c}=await ct(e,t,dt(t)),h=(t?.width?t?.width:Math.max(o,c.width))+a*2,d=(t?.height?t?.height:Math.max(s,c.height))+n*2,u=d/2,{cssStyles:g}=t,m=it.svg(l),y=et(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-h/2,y:-d/2},{x:h/2-u,y:-d/2},...Te(-h/2+u,0,u,50,90,270),{x:h/2-u,y:d/2},{x:-h/2,y:d/2}],x=Et(C),b=m.path(x,y),S=l.insert(()=>b,":first-child");return S.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),st(t,S),t.intersect=function(B){return M.info("Pill intersect",t,{radius:u,point:B}),tt.polygon(t,C,B)},l}p(od,"halfRoundedRectangle");var bC=p((e,t,r,i,o)=>[`M${e+o},${t}`,`L${e+r-o},${t}`,`L${e+r},${t-i/2}`,`L${e+r-o},${t-i}`,`L${e+o},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function sd(e,t){const{labelStyles:r,nodeStyles:i}=at(t),o=t.look==="neo"?3.5:4;t.labelStyle=r;const s=t.padding??0,a=70,n=32,l=t.look==="neo"?a:s,c=t.look==="neo"?n:s;if(t.width||t.height){const S=(t.height??0)/o;t.width=(t?.width??0)-2*S-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:d}=await ct(e,t,dt(t)),u=(t?.height?t?.height:d.height)+l,g=u/o,m=(t?.width?t?.width:d.width)+2*g+c,y=[{x:g,y:0},{x:m-g,y:0},{x:m,y:-u/2},{x:m-g,y:-u},{x:g,y:-u},{x:0,y:-u/2}];let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const b=it.svg(h),S=et(t,{}),B=bC(0,0,m,u,g),w=b.path(B,S);C=h.insert(()=>w,":first-child").attr("transform",`translate(${-m/2}, ${u/2})`),x&&C.attr("style",x)}else C=Le(h,m,u,y);return i&&C.attr("style",i),t.width=m,t.height=u,st(t,C),t.intersect=function(b){return tt.polygon(t,y,b)},h}p(sd,"hexagon");async function ad(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.label="",t.labelStyle=r;const{shapeSvg:o}=await ct(e,t,dt(t)),s=Math.max(30,t?.width??0),a=Math.max(30,t?.height??0),{cssStyles:n}=t,l=it.svg(o),c=et(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:s,y:0},{x:0,y:a},{x:s,y:a}],d=Et(h),u=l.path(d,c),g=o.insert(()=>u,":first-child");return g.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",i),g.attr("transform",`translate(${-s/2}, ${-a/2})`),st(t,g),t.intersect=function(m){return M.info("Pill intersect",t,{points:h}),tt.polygon(t,h,m)},o}p(ad,"hourglass");async function nd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=at(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await ct(e,t,"icon-shape default"),u=t.pos==="t",g=n,m=n,{nodeBorder:y}=r,{stylesMap:C}=Or(t),x=-m/2,b=-g/2,S=t.label?8:0,B=it.svg(c),w=et(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=B.rectangle(x,b,m,g,w),F=Math.max(m,h.width),L=g+h.height+S,P=B.rectangle(-F/2,-L/2,F,L,{...w,fill:"transparent",stroke:"none"}),$=c.insert(()=>v,":first-child"),N=c.insert(()=>P);if(t.icon){const J=c.append("g");J.html(`<g>${await Si(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const W=J.node().getBBox(),z=W.width,G=W.height,I=W.x,R=W.y;J.attr("transform",`translate(${-z/2-I},${u?h.height/2+S/2-G/2-R:-h.height/2-S/2-G/2-R})`),J.attr("style",`color: ${C.get("stroke")??y};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${u?-L/2:L/2-h.height})`),$.attr("transform",`translate(0,${u?h.height/2+S/2:-h.height/2-S/2})`),st(t,N),t.intersect=function(J){if(M.info("iconSquare intersect",t,J),!t.label)return tt.rect(t,J);const W=t.x??0,z=t.y??0,G=t.height??0;let I=[];return u?I=[{x:W-h.width/2,y:z-G/2},{x:W+h.width/2,y:z-G/2},{x:W+h.width/2,y:z-G/2+h.height+S},{x:W+m/2,y:z-G/2+h.height+S},{x:W+m/2,y:z+G/2},{x:W-m/2,y:z+G/2},{x:W-m/2,y:z-G/2+h.height+S},{x:W-h.width/2,y:z-G/2+h.height+S}]:I=[{x:W-m/2,y:z-G/2},{x:W+m/2,y:z-G/2},{x:W+m/2,y:z-G/2+g},{x:W+h.width/2,y:z-G/2+g},{x:W+h.width/2/2,y:z+G/2},{x:W-h.width/2,y:z+G/2},{x:W-h.width/2,y:z-G/2+g},{x:W-m/2,y:z-G/2+g}],tt.polygon(t,I,J)},c}p(nd,"icon");async function ld(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=at(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await ct(e,t,"icon-shape default"),u=20,g=t.label?8:0,m=t.pos==="t",{nodeBorder:y,mainBkg:C}=r,{stylesMap:x}=Or(t),b=it.svg(c),S=et(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const B=x.get("fill");S.stroke=B??C;const w=c.append("g");t.icon&&w.html(`<g>${await Si(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const v=w.node().getBBox(),F=v.width,L=v.height,P=v.x,$=v.y,N=Math.max(F,L)*Math.SQRT2+u*2,J=b.circle(0,0,N,S),W=Math.max(N,h.width),z=N+h.height+g,G=b.rectangle(-W/2,-z/2,W,z,{...S,fill:"transparent",stroke:"none"}),I=c.insert(()=>J,":first-child"),R=c.insert(()=>G);return w.attr("transform",`translate(${-F/2-P},${m?h.height/2+g/2-L/2-$:-h.height/2-g/2-L/2-$})`),w.attr("style",`color: ${x.get("stroke")??y};`),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${m?-z/2:z/2-h.height})`),I.attr("transform",`translate(0,${m?h.height/2+g/2:-h.height/2-g/2})`),st(t,R),t.intersect=function(Y){return M.info("iconSquare intersect",t,Y),tt.rect(t,Y)},c}p(ld,"iconCircle");async function hd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=at(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:u}=await ct(e,t,"icon-shape default"),g=t.pos==="t",m=n+d*2,y=n+d*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:b}=Or(t),S=-y/2,B=-m/2,w=t.label?8:0,v=it.svg(c),F=et(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const L=b.get("fill");F.stroke=L??x;const P=v.path(de(S,B,y,m,5),F),$=Math.max(y,h.width),N=m+h.height+w,J=v.rectangle(-$/2,-N/2,$,N,{...F,fill:"transparent",stroke:"none"}),W=c.insert(()=>P,":first-child").attr("class","icon-shape2"),z=c.insert(()=>J);if(t.icon){const G=c.append("g");G.html(`<g>${await Si(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const I=G.node().getBBox(),R=I.width,Y=I.height,lt=I.x,rt=I.y;G.attr("transform",`translate(${-R/2-lt},${g?h.height/2+w/2-Y/2-rt:-h.height/2-w/2-Y/2-rt})`),G.attr("style",`color: ${b.get("stroke")??C};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-N/2:N/2-h.height})`),W.attr("transform",`translate(0,${g?h.height/2+w/2:-h.height/2-w/2})`),st(t,z),t.intersect=function(G){if(M.info("iconSquare intersect",t,G),!t.label)return tt.rect(t,G);const I=t.x??0,R=t.y??0,Y=t.height??0;let lt=[];return g?lt=[{x:I-h.width/2,y:R-Y/2},{x:I+h.width/2,y:R-Y/2},{x:I+h.width/2,y:R-Y/2+h.height+w},{x:I+y/2,y:R-Y/2+h.height+w},{x:I+y/2,y:R+Y/2},{x:I-y/2,y:R+Y/2},{x:I-y/2,y:R-Y/2+h.height+w},{x:I-h.width/2,y:R-Y/2+h.height+w}]:lt=[{x:I-y/2,y:R-Y/2},{x:I+y/2,y:R-Y/2},{x:I+y/2,y:R-Y/2+m},{x:I+h.width/2,y:R-Y/2+m},{x:I+h.width/2/2,y:R+Y/2},{x:I-h.width/2,y:R+Y/2},{x:I-h.width/2,y:R-Y/2+m},{x:I-y/2,y:R-Y/2+m}],tt.polygon(t,lt,G)},c}p(hd,"iconRounded");async function cd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=at(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:u}=await ct(e,t,"icon-shape default"),g=t.pos==="t",m=n+d*2,y=n+d*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:b}=Or(t),S=-y/2,B=-m/2,w=t.label?8:0,v=it.svg(c),F=et(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const L=b.get("fill");F.stroke=L??x;const P=v.path(de(S,B,y,m,.1),F),$=Math.max(y,h.width),N=m+h.height+w,J=v.rectangle(-$/2,-N/2,$,N,{...F,fill:"transparent",stroke:"none"}),W=c.insert(()=>P,":first-child"),z=c.insert(()=>J);if(t.icon){const G=c.append("g");G.html(`<g>${await Si(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const I=G.node().getBBox(),R=I.width,Y=I.height,lt=I.x,rt=I.y;G.attr("transform",`translate(${-R/2-lt},${g?h.height/2+w/2-Y/2-rt:-h.height/2-w/2-Y/2-rt})`),G.attr("style",`color: ${b.get("stroke")??C};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-N/2:N/2-h.height})`),W.attr("transform",`translate(0,${g?h.height/2+w/2:-h.height/2-w/2})`),st(t,z),t.intersect=function(G){if(M.info("iconSquare intersect",t,G),!t.label)return tt.rect(t,G);const I=t.x??0,R=t.y??0,Y=t.height??0;let lt=[];return g?lt=[{x:I-h.width/2,y:R-Y/2},{x:I+h.width/2,y:R-Y/2},{x:I+h.width/2,y:R-Y/2+h.height+w},{x:I+y/2,y:R-Y/2+h.height+w},{x:I+y/2,y:R+Y/2},{x:I-y/2,y:R+Y/2},{x:I-y/2,y:R-Y/2+h.height+w},{x:I-h.width/2,y:R-Y/2+h.height+w}]:lt=[{x:I-y/2,y:R-Y/2},{x:I+y/2,y:R-Y/2},{x:I+y/2,y:R-Y/2+m},{x:I+h.width/2,y:R-Y/2+m},{x:I+h.width/2/2,y:R+Y/2},{x:I-h.width/2,y:R+Y/2},{x:I-h.width/2,y:R-Y/2+m},{x:I-y/2,y:R-Y/2+m}],tt.polygon(t,lt,G)},c}p(cd,"iconSquare");async function dd(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const o=Number(i.naturalWidth.toString().replace("px","")),s=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=o/s;const{labelStyles:a}=at(t);t.labelStyle=a;const n=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?n??0:0,t?.assetWidth??o),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??s;t.width=Math.max(c,n??0);const{shapeSvg:d,bbox:u,label:g}=await ct(e,t,"image-shape default"),m=t.pos==="t",y=-c/2,C=-h/2,x=t.label?8:0,b=it.svg(d),S=et(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const B=b.rectangle(y,C,c,h,S),w=Math.max(c,u.width),v=h+u.height+x,F=b.rectangle(-w/2,-v/2,w,v,{...S,fill:"none",stroke:"none"}),L=d.insert(()=>B,":first-child"),P=d.insert(()=>F);if(t.img){const $=d.append("image");$.attr("href",t.img),$.attr("width",c),$.attr("height",h),$.attr("preserveAspectRatio","none"),$.attr("transform",`translate(${-c/2},${m?v/2-h:-v/2})`)}return g.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${m?-h/2-u.height/2-x/2:h/2-u.height/2+x/2})`),L.attr("transform",`translate(0,${m?u.height/2+x/2:-u.height/2-x/2})`),st(t,P),t.intersect=function($){if(M.info("iconSquare intersect",t,$),!t.label)return tt.rect(t,$);const N=t.x??0,J=t.y??0,W=t.height??0;let z=[];return m?z=[{x:N-u.width/2,y:J-W/2},{x:N+u.width/2,y:J-W/2},{x:N+u.width/2,y:J-W/2+u.height+x},{x:N+c/2,y:J-W/2+u.height+x},{x:N+c/2,y:J+W/2},{x:N-c/2,y:J+W/2},{x:N-c/2,y:J-W/2+u.height+x},{x:N-u.width/2,y:J-W/2+u.height+x}]:z=[{x:N-c/2,y:J-W/2},{x:N+c/2,y:J-W/2},{x:N+c/2,y:J-W/2+h},{x:N+u.width/2,y:J-W/2+h},{x:N+u.width/2/2,y:J+W/2},{x:N-u.width/2,y:J+W/2},{x:N-u.width/2,y:J-W/2+h},{x:N-c/2,y:J-W/2+h}],tt.polygon(t,z,$)},d}p(dd,"imageSquare");async function ud(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.padding??0,s=o,a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:l}=await ct(e,t,dt(t)),c=Math.max(l.height+s*2,t.height??0),h=Math.max(l.width+a*2,(t.width??0)-c),d=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let u;const{cssStyles:g}=t;if(t.look==="handDrawn"){const m=it.svg(n),y=et(t,{}),C=Et(d),x=m.path(C,y);u=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),g&&u.attr("style",g)}else u=Le(n,h,c,d);return i&&u.attr("style",i),t.width=h,t.height=c,st(t,u),t.intersect=function(m){return tt.polygon(t,d,m)},n}p(ud,"inv_trapezoid");async function gd(e,t){const{shapeSvg:r,bbox:i,label:o}=await ct(e,t,"label"),s=r.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),o.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),st(t,s),t.intersect=function(l){return tt.rect(t,l)},r}p(gd,"labelRect");async function pd(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.padding??0,s=o,a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:l}=await ct(e,t,dt(t)),c=Math.max(l.height+s,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),d=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let u;const{cssStyles:g}=t;if(t.look==="handDrawn"){const m=it.svg(n),y=et(t,{}),C=Et(d),x=m.path(C,y);u=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),g&&u.attr("style",g)}else u=Le(n,h,c,d);return i&&u.attr("style",i),t.width=h,t.height=c,st(t,u),t.intersect=function(m){return tt.polygon(t,d,m)},n}p(pd,"lean_left");async function fd(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.padding??0,s=o,a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:l}=await ct(e,t,dt(t)),c=Math.max(l.height+s,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),d=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let u;const{cssStyles:g}=t;if(t.look==="handDrawn"){const m=it.svg(n),y=et(t,{}),C=Et(d),x=m.path(C,y);u=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),g&&u.attr("style",g)}else u=Le(n,h,c,d);return i&&u.attr("style",i),t.width=h,t.height=c,st(t,u),t.intersect=function(m){return tt.polygon(t,d,m)},n}p(fd,"lean_right");function md(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.label="",t.labelStyle=r;const o=e.insert("g").attr("class",dt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(35,t?.width??0),n=Math.max(35,t?.height??0),l=7,c=[{x:a,y:0},{x:0,y:n+l/2},{x:a-2*l,y:n+l/2},{x:0,y:2*n},{x:a,y:n-l/2},{x:2*l,y:n-l/2}],h=it.svg(o),d=et(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const u=Et(c),g=h.path(u,d),m=o.insert(()=>g,":first-child");return m.attr("class","outer-path"),s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${a/2},${-n})`),st(t,m),t.intersect=function(y){return M.info("lightningBolt intersect",t,y),tt.polygon(t,c,y)},o}p(md,"lightningBolt");var kC=p((e,t,r,i,o,s,a)=>[`M${e},${t+s}`,`a${o},${s} 0,0,0 ${r},0`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+a}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),SC=p((e,t,r,i,o,s,a)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+a}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),TC=p((e,t,r,i,o,s)=>[`M${e-r/2},${-i/2}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Yn=10,jn=10;async function yd(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?24:o;if(t.width||t.height){const x=t.width??0;t.width=(t.width??0)-s,t.width<jn&&(t.width=jn);const S=x/2/(2.5+x/50);t.height=(t.height??0)-a-S*3,t.height<Yn&&(t.height=Yn)}const{shapeSvg:n,bbox:l,label:c}=await ct(e,t,dt(t)),h=(t?.width?t?.width:l.width)+s*2,d=h/2,u=d/(2.5+h/50),g=(t?.height?t?.height:l.height)+u+a*2,m=g*.1;let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=it.svg(n),b=SC(0,0,h,g,d,u,m),S=TC(0,u,h,g,d,u),B=et(t,{}),w=x.path(b,B),v=x.path(S,B);n.insert(()=>v,":first-child").attr("class","line"),y=n.insert(()=>w,":first-child"),y.attr("class","basic label-container"),C&&y.attr("style",C)}else{const x=kC(0,0,h,g,d,u,m);y=n.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",zt(C)).attr("style",i)}return y.attr("label-offset-y",u),y.attr("transform",`translate(${-h/2}, ${-(g/2+u)})`),st(t,y),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+u-(l.y-(l.top??0))})`),t.intersect=function(x){const b=tt.rect(t,x),S=b.x-(t.x??0);if(d!=0&&(Math.abs(S)<(t.width??0)/2||Math.abs(S)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-u)){let B=u*u*(1-S*S/(d*d));B>0&&(B=Math.sqrt(B)),B=u-B,x.y-(t.y??0)>0&&(B=-B),b.y+=B}return b},n}p(yd,"linedCylinder");async function Cd(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;if(t.width||t.height){const B=t.width;t.width=(B??0)*10/11-s*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await ct(e,t,dt(t)),h=(t?.width?t?.width:l.width)+(s??0)*2,d=(t?.height?t?.height:l.height)+(a??0)*2,u=t.look==="neo"?d/4:d/8,g=d+u,{cssStyles:m}=t,y=it.svg(n),C=et(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:-h/2-h/2*.1,y:-g/2},{x:-h/2-h/2*.1,y:g/2},...He(-h/2-h/2*.1,g/2,h/2+h/2*.1,g/2,u,.8),{x:h/2+h/2*.1,y:-g/2},{x:-h/2-h/2*.1,y:-g/2},{x:-h/2,y:-g/2},{x:-h/2,y:g/2*1.1},{x:-h/2,y:-g/2}],b=y.polygon(x.map(B=>[B.x,B.y]),C),S=n.insert(()=>b,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(0,${-u/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-d/2+(t.padding??0)-u/2-(l.y-(l.top??0))})`),st(t,S),t.intersect=function(B){return tt.polygon(t,x,B)},n}p(Cd,"linedWaveEdgedRect");async function xd(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2-2*n,10),t.height=Math.max((t?.height??0)-a*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await ct(e,t,dt(t)),d=(t?.width?t?.width:c.width)+s*2+2*n,u=(t?.height?t?.height:c.height)+a*2+2*n,g=d-2*n,m=u-2*n,y=-g/2,C=-m/2,{cssStyles:x}=t,b=it.svg(l),S=et(t,{}),B=[{x:y-n,y:C+n},{x:y-n,y:C+m+n},{x:y+g-n,y:C+m+n},{x:y+g-n,y:C+m},{x:y+g,y:C+m},{x:y+g,y:C+m-n},{x:y+g+n,y:C+m-n},{x:y+g+n,y:C-n},{x:y+n,y:C-n},{x:y+n,y:C},{x:y,y:C},{x:y,y:C+n}],w=[{x:y,y:C+n},{x:y+g-n,y:C+n},{x:y+g-n,y:C+m},{x:y+g,y:C+m},{x:y+g,y:C},{x:y,y:C}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const v=Et(B);let F=b.path(v,S);const L=Et(w);let P=b.path(L,S);t.look!=="handDrawn"&&(F=Os(F),P=Os(P));const $=l.insert("g",":first-child");return $.insert(()=>F),$.insert(()=>P),$.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(c.width/2)-n-(c.x-(c.left??0))}, ${-(c.height/2)+n-(c.y-(c.top??0))})`),st(t,$),t.intersect=function(N){return tt.polygon(t,B,N)},l}p(xd,"multiRect");async function bd(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await ct(e,t,dt(t)),n=t.padding??0,l=t.look==="neo"?16:n,c=t.look==="neo"?12:n;let h=!0;(t.width||t.height)&&(h=!1,t.width=(t?.width??0)-l*2,t.height=(t?.height??0)-c*3);const d=Math.max(s.width,t?.width??0)+l*2,u=Math.max(s.height,t?.height??0)+c*3,g=t.look==="neo"?u/4:u/8,m=u+(h?g/2:-g/2),y=-d/2,C=-m/2,x=10,{cssStyles:b}=t,S=He(y-x,C+m+x,y+d-x,C+m+x,g,.8),B=S?.[S.length-1],w=[{x:y-x,y:C+x},{x:y-x,y:C+m+x},...S,{x:y+d-x,y:B.y-x},{x:y+d,y:B.y-x},{x:y+d,y:B.y-2*x},{x:y+d+x,y:B.y-2*x},{x:y+d+x,y:C-x},{x:y+x,y:C-x},{x:y+x,y:C},{x:y,y:C},{x:y,y:C+x}],v=[{x:y,y:C+x},{x:y+d-x,y:C+x},{x:y+d-x,y:B.y-x},{x:y+d,y:B.y-x},{x:y+d,y:C},{x:y,y:C}],F=it.svg(o),L=et(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const P=Et(w),$=F.path(P,L),N=Et(v),J=F.path(N,L),W=o.insert(()=>$,":first-child");return W.insert(()=>J),W.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",i),W.attr("transform",`translate(0,${-g/2})`),a.attr("transform",`translate(${-(s.width/2)-x-(s.x-(s.left??0))}, ${-(s.height/2)+x-g/2-(s.y-(s.top??0))})`),st(t,W),t.intersect=function(z){return tt.polygon(t,w,z)},o}p(bd,"multiWaveEdgedRectangle");async function kd(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=at(t);t.labelStyle=i,t.useHtmlLabels||Qt($t())||(t.centerLabel=!0);const{shapeSvg:a,bbox:n,label:l}=await ct(e,t,dt(t)),c=Math.max(n.width+(t.padding??0)*2,t?.width??0),h=Math.max(n.height+(t.padding??0)*2,t?.height??0),d=-c/2,u=-h/2,{cssStyles:g}=t,m=it.svg(a),y=et(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=m.rectangle(d,u,c,h,y),x=a.insert(()=>C,":first-child");return x.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),g&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",g),o&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",o),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),st(t,x),t.intersect=function(b){return tt.rect(t,b)},a}p(kd,"note");var wC=p((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Sd(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const{shapeSvg:o,bbox:s}=await ct(e,t,dt(t)),a=s.width+(t.padding??0),n=s.height+(t.padding??0),l=a+n,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let d;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=it.svg(o),m=et(t,{}),y=wC(0,0,l),C=g.path(y,m);d=o.insert(()=>C,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),u&&d.attr("style",u)}else d=Le(o,l,l,h),d.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&d.attr("style",i),st(t,d),t.calcIntersect=function(g,m){const y=g.width,C=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],x=tt.polygon(g,C,m);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(g){return this.calcIntersect(t,g)},o}p(Sd,"question");async function Td(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?21:o??0,a=t.look==="neo"?12:o??0,{shapeSvg:n,bbox:l,label:c}=await ct(e,t,dt(t)),h=l.width+(t.look==="neo"?s*2:s),d=Math.max(l.height+(t.look==="neo"?a*2:a),t.height??0),u=d/4,m=-Math.max(h,(t.width??0)-u)/2,y=-d/2,C=y/2,x=[{x:m+C,y},{x:m,y:0},{x:m+C,y:-y},{x:-m,y:-y},{x:-m,y}],{cssStyles:b}=t,S=it.svg(n),B=et(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const w=Et(x),v=S.path(w,B),F=n.insert(()=>v,":first-child");return F.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${-C/2},0)`),c.attr("transform",`translate(${-C/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),st(t,F),t.intersect=function(L){return tt.polygon(t,x,L)},n}p(Td,"rect_left_inv_arrow");async function wd(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;let o;t.cssClasses?o="node "+t.cssClasses:o="node default";const s=e.insert("g").attr("class",o).attr("id",t.domId||t.id),a=s.insert("g"),n=s.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await qe(n,c,t.labelStyle,!0,!0);let d={width:0,height:0};if(Qt(Bt())){const L=h.children[0],P=mt(h);d=L.getBoundingClientRect(),P.attr("width",d.width),P.attr("height",d.height)}M.info("Text 2",l);const u=l||[],g=h.getBBox(),m=await qe(n,Array.isArray(u)?u.join("<br/>"):u,t.labelStyle,!0,!0),y=m.children[0],C=mt(m);d=y.getBoundingClientRect(),C.attr("width",d.width),C.attr("height",d.height);const x=(t.padding||0)/2;mt(m).attr("transform","translate( "+(d.width>g.width?0:(g.width-d.width)/2)+", "+(g.height+x+5)+")"),mt(h).attr("transform","translate( "+(d.width<g.width?0:-(g.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-x+3)+")");const b=d.width+(t.padding||0),S=d.height+(t.padding||0),B=-d.width/2-x,w=-d.height/2-x;let v,F;if(t.look==="handDrawn"){const L=it.svg(s),P=et(t,{}),$=L.path(de(B,w,b,S,t.rx||0),P),N=L.line(-d.width/2-x,-d.height/2-x+g.height+x,d.width/2+x,-d.height/2-x+g.height+x,P);F=s.insert(()=>(M.debug("Rough node insert CXC",$),N),":first-child"),v=s.insert(()=>(M.debug("Rough node insert CXC",$),$),":first-child")}else v=a.insert("rect",":first-child"),F=a.insert("line"),v.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-x).attr("y",-d.height/2-x).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),F.attr("class","divider").attr("x1",-d.width/2-x).attr("x2",d.width/2+x).attr("y1",-d.height/2-x+g.height+x).attr("y2",-d.height/2-x+g.height+x);return st(t,v),t.intersect=function(L){return tt.rect(t,L)},s}p(wd,"rectWithTitle");async function Bd(e,t,{config:{themeVariables:r}}){const i=r?.radius??5,o={rx:i,ry:i,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return Dr(e,t,o)}p(Bd,"roundedRect");var Xe=8;async function vd(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await ct(e,t,dt(t)),c=(t?.width??n.width)+o*2+(t.look==="neo"?Xe:Xe*2),h=(t?.height??n.height)+s*2,d=c-Xe,u=h,g=Xe-c/2,m=-h/2,{cssStyles:y}=t,C=it.svg(a),x=et(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:g,y:m},{x:g+d,y:m},{x:g+d,y:m+u},{x:g-Xe,y:m+u},{x:g-Xe,y:m},{x:g,y:m},{x:g,y:m+u}],S=C.polygon(b.map(w=>[w.x,w.y]),x),B=a.insert(()=>S,":first-child");return B.attr("class","basic label-container outer-path").attr("style",zt(y)),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),l.attr("transform",`translate(${Xe/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),st(t,B),t.intersect=function(w){return tt.rect(t,w)},a}p(vd,"shadedProcess");async function Ld(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2,10),t.height=Math.max((t?.height??0)/1.5-a*2,10));const{shapeSvg:n,bbox:l,label:c}=await ct(e,t,dt(t)),h=(t?.width?t?.width:l.width)+s*2,d=((t?.height?t?.height:l.height)+a*2)*1.5,u=h,g=d/1.5,m=-u/2,y=-g/2,{cssStyles:C}=t,x=it.svg(n),b=et(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const S=[{x:m,y},{x:m,y:y+g},{x:m+u,y:y+g},{x:m+u,y:y-g/2}],B=Et(S),w=x.path(B,b),v=n.insert(()=>w,":first-child");return v.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",C),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(0, ${g/4})`),c.attr("transform",`translate(${-u/2+(t.padding??0)-(l.x-(l.left??0))}, ${-g/4+(t.padding??0)-(l.y-(l.top??0))})`),st(t,v),t.intersect=function(F){return tt.polygon(t,S,F)},n}p(Ld,"slopedRect");async function Fd(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,o=t.look==="neo"?12:r,s={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:o};return Dr(e,t,s)}p(Fd,"squareRect");async function Ed(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?20:o,a=t.look==="neo"?12:o,{shapeSvg:n,bbox:l}=await ct(e,t,dt(t)),c=l.height+(t.look==="neo"?a*2:a),h=l.width+c/4+(t.look==="neo"?s*2:s),d=c/2,{cssStyles:u}=t,g=it.svg(n),m=et(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2+d,y:-c/2},{x:h/2-d,y:-c/2},...Te(-h/2+d,0,d,50,90,270),{x:h/2-d,y:c/2},...Te(h/2-d,0,d,50,270,450)],C=Et(y),x=g.path(C,m),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),st(t,b),t.intersect=function(S){return tt.polygon(t,y,S)},n}p(Ed,"stadium");async function Ad(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Dr(e,t,r)}p(Ad,"state");function _d(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=at(t);t.labelStyle=i;const{cssStyles:s}=t,{lineColor:a,stateBorder:n,nodeBorder:l,nodeShadow:c}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const h=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),d=it.svg(h),u=et(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const g=d.circle(0,0,t.width,{...u,stroke:a,strokeWidth:2}),m=n??l,y=(t.width??0)*5/14,C=d.circle(0,0,y,{...u,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),x=h.insert(()=>g,":first-child");if(x.insert(()=>C),t.look!=="handDrawn"&&x.attr("class","outer-path"),s&&x.selectAll("path").attr("style",s),o&&x.selectAll("path").attr("style",o),t.width<25&&c&&t.look!=="handDrawn"){const b=e.node()?.ownerSVGElement?.id??"",S=b?`${b}-drop-shadow-small`:"drop-shadow-small";x.attr("style",`filter:url(#${S})`)}return st(t,x),t.intersect=function(b){return tt.circle(t,(t.width??0)/2,b)},h}p(_d,"stateEnd");function Md(e,t,{config:{themeVariables:r}}){const{lineColor:i,nodeShadow:o}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const s=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const l=it.svg(s).circle(0,0,t.width,wm(i));a=s.insert(()=>l),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else a=s.insert("circle",":first-child"),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&o&&t.look!=="handDrawn"){const n=e.node()?.ownerSVGElement?.id??"",l=n?`${n}-drop-shadow-small`:"drop-shadow-small";a.attr("style",`filter:url(#${l})`)}return st(t,a),t.intersect=function(n){return tt.circle(t,(t.width??7)/2,n)},s}p(Md,"stateStart");var xr=8;async function Id(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t?.padding??8,s=t.look==="neo"?28:o,a=t.look==="neo"?12:o,{shapeSvg:n,bbox:l}=await ct(e,t,dt(t)),c=Math.max(l.width+2*xr+s,t.width??0),h=Math.max(l.height+a,t.height??0),d=c-2*xr,u=h,g=-c/2,m=-h/2,y=[{x:0,y:0},{x:d,y:0},{x:d,y:-u},{x:0,y:-u},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-u},{x:-8,y:-u},{x:-8,y:0}];if(t.look==="handDrawn"){const C=it.svg(n),x=et(t,{}),b=C.rectangle(g,m,d+16,u,x),S=C.line(g+xr,m,g+xr,m+u,x),B=C.line(g+xr+d,m,g+xr+d,m+u,x);n.insert(()=>S,":first-child"),n.insert(()=>B,":first-child");const w=n.insert(()=>b,":first-child"),{cssStyles:v}=t;w.attr("class","basic label-container").attr("style",zt(v)),st(t,w)}else{const C=Le(n,d,u,y);i&&C.attr("style",i),st(t,C)}return t.intersect=function(C){return tt.polygon(t,y,C)},n}p(Id,"subroutine");var $o=.2;async function Od(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-a*2,10),t.width=Math.max((t?.width??0)-s*2-$o*(t.height+a*2),10));const{shapeSvg:n,bbox:l}=await ct(e,t,dt(t)),c=(t?.height?t?.height:l.height)+a*2,h=$o*c,d=$o*c,g=(t?.width?t?.width:l.width)+s*2+h-h,m=c,y=-g/2,C=-m/2,{cssStyles:x}=t,b=it.svg(n),S=et(t,{}),B=[{x:y-h/2,y:C},{x:y+g+h/2,y:C},{x:y+g+h/2,y:C+m},{x:y-h/2,y:C+m}],w=[{x:y+g-h/2,y:C+m},{x:y+g+h/2,y:C+m},{x:y+g+h/2,y:C+m-d}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const v=Et(B),F=b.path(v,S),L=Et(w),P=b.path(L,{...S,fillStyle:"solid"}),$=n.insert(()=>P,":first-child");return $.insert(()=>F,":first-child"),$.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",i),st(t,$),t.intersect=function(N){return tt.polygon(t,B,N)},n}p(Od,"taggedRect");async function Dd(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await ct(e,t,dt(t)),n=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/8,h=.2*n,d=.2*l,u=l+c,{cssStyles:g}=t,m=it.svg(o),y=et(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-n/2-n/2*.1,y:u/2},...He(-n/2-n/2*.1,u/2,n/2+n/2*.1,u/2,c,.8),{x:n/2+n/2*.1,y:-u/2},{x:-n/2-n/2*.1,y:-u/2}],x=-n/2+n/2*.1,b=-u/2-d*.4,S=[{x:x+n-h,y:(b+l)*1.3},{x:x+n,y:b+l-d},{x:x+n,y:(b+l)*.9},...He(x+n,(b+l)*1.25,x+n-h,(b+l)*1.3,-l*.02,.5)],B=Et(C),w=m.path(B,y),v=Et(S),F=m.path(v,{...y,fillStyle:"solid"}),L=o.insert(()=>F,":first-child");return L.insert(()=>w,":first-child"),L.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-n/2+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c/2-(s.y-(s.top??0))})`),st(t,L),t.intersect=function(P){return tt.polygon(t,C,P)},o}p(Dd,"taggedWaveEdgedRectangle");async function $d(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const{shapeSvg:o,bbox:s}=await ct(e,t,dt(t)),a=Math.max(s.width+(t.padding??0),t?.width||0),n=Math.max(s.height+(t.padding??0),t?.height||0),l=-a/2,c=-n/2,h=o.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",a).attr("height",n),st(t,h),t.intersect=function(d){return tt.rect(t,d)},o}p($d,"text");var BC=p((e,t,r,i,o,s)=>`M${e},${t}
208
+ a${o},${s} 0,0,1 0,${-i}
209
+ l${r},0
210
+ a${o},${s} 0,0,1 0,${i}
211
+ M${r},${-i}
212
+ a${o},${s} 0,0,0 0,${i}
213
+ l${-r},0`,"createCylinderPathD"),vC=p((e,t,r,i,o,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${o},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${o},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),LC=p((e,t,r,i,o,s)=>[`M${e+r/2},${-i/2}`,`a${o},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Xn=5,Gn=10;async function Pd(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?12:o/2,a=t.height??0;if(t.height&&(t.height=t.height-s,t.height<Xn&&(t.height=Xn)),t.width){const x=a/2/(2.5+a/50);t.width=t.width-s-x*3,t.width<Gn&&(t.width=Gn)}const{shapeSvg:n,bbox:l,label:c}=await ct(e,t,dt(t)),h=Math.max(t.height??0,l.height)+s,d=h/2,u=d/(2.5+h/50),g=Math.max(t.width??0,l.width)+u+s,{cssStyles:m}=t;let y;if(t.look==="handDrawn"){const C=it.svg(n),x=vC(0,0,g,h,u,d),b=LC(0,0,g,h,u,d),S=C.path(x,et(t,{})),B=C.path(b,et(t,{fill:"none"}));y=n.insert(()=>B,":first-child"),y=n.insert(()=>S,":first-child"),y.attr("class","basic label-container"),m&&y.attr("style",m)}else{const C=BC(0,0,g,h,u,d);y=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",zt(m)).attr("style",i),y.attr("class","basic label-container outer-path"),m&&y.selectAll("path").attr("style",m),i&&y.selectAll("path").attr("style",i)}return y.attr("label-offset-x",u),y.attr("transform",`translate(${-g/2}, ${h/2} )`),c.attr("transform",`translate(${-(l.width/2)-u-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),st(t,y),t.intersect=function(C){const x=tt.rect(t,C),b=x.y-(t.y??0);if(d!=0&&(Math.abs(b)<(t.height??0)/2||Math.abs(b)==(t.height??0)/2&&Math.abs(x.x-(t.x??0))>(t.width??0)/2-u)){let S=u*u*(1-b*b/(d*d));S!=0&&(S=Math.sqrt(Math.abs(S))),S=u-S,C.x-(t.x??0)>0&&(S=-S),x.x+=S}return x},n}p(Pd,"tiltedCylinder");async function Rd(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.padding??0,s=(t.look==="neo",o),a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:l}=await ct(e,t,dt(t)),c=Math.max(l.height+s,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),d=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let u;const{cssStyles:g}=t;if(t.look==="handDrawn"){const m=it.svg(n),y=et(t,{}),C=Et(d),x=m.path(C,y);u=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),g&&u.attr("style",g)}else u=Le(n,h,c,d);return i&&u.attr("style",i),t.width=h,t.height=c,st(t,u),t.intersect=function(m){return tt.polygon(t,d,m)},n}p(Rd,"trapezoid");async function qd(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<l&&(t.height=l),t.width=(t.width??0)-s*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await ct(e,t,dt(t)),d=(t?.width?t?.width:h.width)+s*2,u=(t?.height?t?.height:h.height)+a*2,{cssStyles:g}=t,m=it.svg(c),y=et(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-d/2*.8,y:-u/2},{x:d/2*.8,y:-u/2},{x:d/2,y:-u/2*.6},{x:d/2,y:u/2},{x:-d/2,y:u/2},{x:-d/2,y:-u/2*.6}],x=Et(C),b=m.path(x,y),S=c.insert(()=>b,":first-child");return S.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),st(t,S),t.intersect=function(B){return tt.polygon(t,C,B)},c}p(qd,"trapezoidalPentagon");var Un=10,Vn=10;async function Nd(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?o*2:o;(t.width||t.height)&&(t.width=((t?.width??0)-s)/2,t.width<Vn&&(t.width=Vn),t.height=t?.height??0,t.height<Un&&(t.height=Un));const{shapeSvg:a,bbox:n,label:l}=await ct(e,t,dt(t)),c=ve(Bt().flowchart?.htmlLabels),h=(t?.width?t?.width:n.width)+s,d=t?.height?t?.height:h+n.height,u=d,g=[{x:0,y:0},{x:u,y:0},{x:u/2,y:-d}],{cssStyles:m}=t,y=it.svg(a),C=et(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=Et(g),b=y.path(x,C),S=a.insert(()=>b,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),t.width=h,t.height=d,st(t,S),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${d/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(B){return M.info("Triangle intersect",t,g,B),tt.polygon(t,g,B)},a}p(Nd,"triangle");async function Wd(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;let n=!0;(t.width||t.height)&&(n=!1,t.width=(t?.width??0)-s*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await ct(e,t,dt(t)),d=(t?.width?t?.width:c.width)+(s??0)*2,u=(t?.height?t?.height:c.height)+(a??0)*2,g=t.look==="neo"?u/4:u/8,m=u+(n?g:-g),{cssStyles:y}=t,x=14-d,b=x>0?x/2:0,S=it.svg(l),B=et(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const w=[{x:-d/2-b,y:m/2},...He(-d/2-b,m/2,d/2+b,m/2,g,.8),{x:d/2+b,y:-m/2},{x:-d/2-b,y:-m/2}],v=Et(w),F=S.path(v,B),L=l.insert(()=>F,":first-child");return L.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-g/2})`),h.attr("transform",`translate(${-d/2+(t.padding??0)-(c.x-(c.left??0))},${-u/2+(t.padding??0)-g-(c.y-(c.top??0))})`),st(t,L),t.intersect=function(P){return tt.polygon(t,w,P)},l}p(Wd,"waveEdgedRectangle");async function zd(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?20:o;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);const B=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-a-B*(20/9)),t.width=t.width-s*2}const{shapeSvg:n,bbox:l}=await ct(e,t,dt(t)),c=(t?.width?t?.width:l.width)+s*2,h=(t?.height?t?.height:l.height)+a,d=h/8,u=h+d*2,{cssStyles:g}=t,m=it.svg(n),y=et(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-c/2,y:u/2},...He(-c/2,u/2,c/2,u/2,d,1),{x:c/2,y:-u/2},...He(c/2,-u/2,-c/2,-u/2,d,-1)],x=Et(C),b=m.path(x,y),S=n.insert(()=>b,":first-child");return S.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),st(t,S),t.intersect=function(B){return tt.polygon(t,C,B)},n}p(zd,"waveRectangle");var Pt=10;async function Hd(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2-Pt,10),t.height=Math.max((t?.height??0)-s*2-Pt,10));const{shapeSvg:a,bbox:n,label:l}=await ct(e,t,dt(t)),c=(t?.width?t?.width:n.width)+o*2+Pt,h=(t?.height?t?.height:n.height)+s*2+Pt,d=c-Pt,u=h-Pt,g=-d/2,m=-u/2,{cssStyles:y}=t,C=it.svg(a),x=et(t,{}),b=[{x:g-Pt,y:m-Pt},{x:g-Pt,y:m+u},{x:g+d,y:m+u},{x:g+d,y:m-Pt}],S=`M${g-Pt},${m-Pt} L${g+d},${m-Pt} L${g+d},${m+u} L${g-Pt},${m+u} L${g-Pt},${m-Pt}
214
+ M${g-Pt},${m} L${g+d},${m}
215
+ M${g},${m-Pt} L${g},${m+u}`;t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const B=C.path(S,x),w=a.insert(()=>B,":first-child");return w.attr("transform",`translate(${Pt/2}, ${Pt/2})`),w.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+Pt/2-(n.x-(n.left??0))}, ${-(n.height/2)+Pt/2-(n.y-(n.top??0))})`),st(t,w),t.intersect=function(v){return tt.polygon(t,b,v)},a}p(Hd,"windowPane");var Kn=new Set(["redux-color","redux-dark-color"]),FC=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Fa(e,t){const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:o}=$t(),{rowEven:s,rowOdd:a,nodeBorder:n,borderColorArray:l}=o;if(t.look==="handDrawn"){const{themeVariables:ht}=$t(),{background:Ct}=ht,Mt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Ct}`]};await Fa(e,Mt)}const c=$t();t.useHtmlLabels=c.htmlLabels;let h=c.er?.diagramPadding??10,d=c.er?.entityPadding??6;const{cssStyles:u}=t,{labelStyles:g,nodeStyles:m}=at(t);if(r.attributes.length===0&&t.label){const ht={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};Ie(t.label,c)+ht.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const Ct=await Dr(e,t,ht);if(i!=null&&Kn.has(i)){const Mt=r.colorIndex??0;Ct.attr("data-color-id",`color-${Mt%l.length}`)}if(!ve(c.htmlLabels)){const Mt=Ct.select("text"),wt=Mt.node()?.getBBox();Mt.attr("transform",`translate(${-wt.width/2}, 0)`)}return Ct}c.htmlLabels||(h*=1.25,d*=1.25);let y=dt(t);y||(y="node default");const C=e.insert("g").attr("class",y).attr("id",t.domId||t.id),x=await kr(C,t.label??"",c,0,0,["name"],g);x.height+=d;let b=0;const S=[],B=[];let w=0,v=0,F=0,L=0,P=!0,$=!0;for(const ht of r.attributes){const Ct=await kr(C,ht.type,c,0,b,["attribute-type"],g);w=Math.max(w,Ct.width+h);const Mt=await kr(C,ht.name,c,0,b,["attribute-name"],g);v=Math.max(v,Mt.width+h);const wt=await kr(C,ht.keys.join(),c,0,b,["attribute-keys"],g);F=Math.max(F,wt.width+h);const Ut=await kr(C,ht.comment,c,0,b,["attribute-comment"],g);L=Math.max(L,Ut.width+h);const qt=Math.max(Ct.height,Mt.height,wt.height,Ut.height)+d;B.push({yOffset:b,rowHeight:qt}),b+=qt}let N=4;F<=h&&(P=!1,F=0,N--),L<=h&&($=!1,L=0,N--);const J=C.node().getBBox();if(x.width+h*2-(w+v+F+L)>0){const ht=x.width+h*2-(w+v+F+L);w+=ht/N,v+=ht/N,F>0&&(F+=ht/N),L>0&&(L+=ht/N)}const W=w+v+F+L,z=it.svg(C),G=et(t,{});t.look!=="handDrawn"&&(G.roughness=0,G.fillStyle="solid");let I=0;B.length>0&&(I=B.reduce((ht,Ct)=>ht+(Ct?.rowHeight??0),0));const R=Math.max(J.width+h*2,t?.width||0,W),Y=Math.max((I??0)+x.height,t?.height||0),lt=-R/2,rt=-Y/2;if(C.selectAll("g:not(:first-child)").each((ht,Ct,Mt)=>{const wt=mt(Mt[Ct]),Ut=wt.attr("transform");let qt=0,Fe=0;if(Ut){const Ce=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Ut);Ce&&(qt=parseFloat(Ce[1]),Fe=parseFloat(Ce[2]),wt.attr("class").includes("attribute-name")?qt+=w:wt.attr("class").includes("attribute-keys")?qt+=w+v:wt.attr("class").includes("attribute-comment")&&(qt+=w+v+F))}wt.attr("transform",`translate(${lt+h/2+qt}, ${Fe+rt+x.height+d/2})`)}),C.select(".name").attr("transform","translate("+-x.width/2+", "+(rt+d/2)+")"),i!=null&&Kn.has(i)){const ht=r.colorIndex??0;C.attr("data-color-id",`color-${ht%l.length}`)}const St=z.rectangle(lt,rt,R,Y,G),xt=C.insert(()=>St,":first-child").attr("class","outer-path").attr("style",u.join(""));S.push(0);for(const[ht,Ct]of B.entries()){const wt=(ht+1)%2===0&&Ct.yOffset!==0,Ut=z.rectangle(lt,x.height+rt+Ct?.yOffset,R,Ct?.rowHeight,{...G,fill:wt?s:a,stroke:n});C.insert(()=>Ut,"g.label").attr("style",u.join("")).attr("class",`row-rect-${wt?"even":"odd"}`)}const vt=1e-4;let bt=Sr(lt,x.height+rt,R+lt,x.height+rt,vt),Tt=z.polygon(bt.map(ht=>[ht.x,ht.y]),G);if(C.insert(()=>Tt).attr("class","divider"),bt=Sr(w+lt,x.height+rt,w+lt,Y+rt,vt),Tt=z.polygon(bt.map(ht=>[ht.x,ht.y]),G),C.insert(()=>Tt).attr("class","divider"),P){const ht=w+v+lt;bt=Sr(ht,x.height+rt,ht,Y+rt,vt),Tt=z.polygon(bt.map(Ct=>[Ct.x,Ct.y]),G),C.insert(()=>Tt).attr("class","divider")}if($){const ht=w+v+F+lt;bt=Sr(ht,x.height+rt,ht,Y+rt,vt),Tt=z.polygon(bt.map(Ct=>[Ct.x,Ct.y]),G),C.insert(()=>Tt).attr("class","divider")}for(const ht of S){const Ct=x.height+rt+ht;bt=Sr(lt,Ct,R+lt,Ct,vt),Tt=z.polygon(bt.map(Mt=>[Mt.x,Mt.y]),G),C.insert(()=>Tt).attr("class","divider")}if(st(t,xt),m&&t.look!=="handDrawn")if(i!=null&&FC.has(i))C.selectAll("path").attr("style",m);else{const Ct=m.split(";")?.filter(Mt=>Mt.includes("stroke"))?.map(Mt=>`${Mt}`).join("; ");C.selectAll("path").attr("style",Ct??""),C.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(ht){return tt.rect(t,ht)},C}p(Fa,"erBox");async function kr(e,t,r,i=0,o=0,s=[],a=""){const n=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${o})`).attr("style",a);t!==pn(t)&&(t=pn(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await ye(n,t,{width:Ie(t,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let c=l.getBBox();if(ve(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const d=mt(l);c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return c}p(kr,"addText");function Sr(e,t,r,i,o){return e===r?[{x:e-o/2,y:t},{x:e+o/2,y:t},{x:r+o/2,y:i},{x:r-o/2,y:i}]:[{x:e,y:t-o/2},{x:e,y:t+o/2},{x:r,y:i+o/2},{x:r,y:i-o/2}]}p(Sr,"lineToPolygon");async function Yd(e,t,r,i,o=r.class.padding??12){const s=i?0:3,a=e.insert("g").attr("class",dt(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,d=0,u=0,g=0;if(n=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await ri(n,{text:`«${b}»`},0),d=n.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await ri(l,t,0,["font-weight: bolder"]);const m=l.node().getBBox();u=m.height,c=a.insert("g").attr("class","members-group text");let y=0;for(const b of t.members){const S=await ri(c,b,y,[b.parseClassifier()]);y+=S+s}g=c.node().getBBox().height,g<=0&&(g=o/2),h=a.insert("g").attr("class","methods-group text");let C=0;for(const b of t.methods){const S=await ri(h,b,C,[b.parseClassifier()]);C+=S+s}let x=a.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-m.width/2}, ${d})`),x=a.node().getBBox(),c.attr("transform",`translate(0, ${d+u+o*2})`),x=a.node().getBBox(),h.attr("transform",`translate(0, ${d+u+(g?g+o*4:o*2)})`),x=a.node().getBBox(),{shapeSvg:a,bbox:x}}p(Yd,"textHelper");async function ri(e,t,r,i=[]){const o=e.insert("g").attr("class","label").attr("style",i.join("; ")),s=$t();let a="useHtmlLabels"in t?t.useHtmlLabels:ve(s.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!a&&n.startsWith("\\")&&(n=n.substring(1)),pi(n)&&(a=!0);const l=await ye(o,sa(We(n)),{width:Ie(n,s)+50,classes:"markdown-node-label",useHtmlLabels:a},s);let c,h=1;if(a){const d=l.children[0],u=mt(l);h=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(h+=d.innerHTML.split("<mrow>").length-1),await wa(d),c=d.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}else{i.includes("font-weight: bolder")&&mt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const d=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(d.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),c=l.getBBox()}return o.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}p(ri,"addText");async function jd(e,t){const r=Bt(),{themeVariables:i}=r,{useGradient:o}=i,s=r.class.padding??12,a=s,n=t.useHtmlLabels??ve(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await Yd(e,t,r,n,a),{labelStyles:d,nodeStyles:u}=at(t);t.labelStyle=d,t.cssStyles=l.styles||"";const g=l.styles?.join(";")||u||"";t.cssStyles||(t.cssStyles=g.replaceAll("!important","").split(";"));const m=l.members.length===0&&l.methods.length===0&&!r.class?.hideEmptyMembersBox,y=it.svg(c),C=et(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=Math.max(t.width??0,h.width);let b=Math.max(t.height??0,h.height);const S=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?b+=a:l.members.length>0&&l.methods.length===0&&(b+=a*2);const B=-x/2,w=-b/2;let v=m?s*2:l.members.length===0&&l.methods.length===0?-s:0;S&&(v=s*2);const F=y.rectangle(B-s,w-s-(m?s:l.members.length===0&&l.methods.length===0?-s/2:0),x+2*s,b+2*s+v,C),L=c.insert(()=>F,":first-child");L.attr("class","basic label-container outer-path");const P=L.node().getBBox(),$=c.select(".annotation-group").node().getBBox().height-(m?s/2:0)||0,N=c.select(".label-group").node().getBBox().height-(m?s/2:0)||0,J=c.select(".members-group").node().getBBox().height-(m?s/2:0)||0,W=($+N+w+s-(w-s-(m?s:l.members.length===0&&l.methods.length===0?-s/2:0)))/2;if(c.selectAll(".text").each((z,G,I)=>{const R=mt(I[G]),Y=R.attr("transform");let lt=0;if(Y){const vt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Y);vt&&(lt=parseFloat(vt[2]))}let rt=lt+w+s-(m?s:l.members.length===0&&l.methods.length===0?-s/2:0);if(R.attr("class").includes("methods-group")){const xt=Math.max(J,a/2);S?rt=Math.max(W,$+N+xt+w+a*2+s)+a*2:rt=$+N+xt+w+a*4+s}l.members.length===0&&l.methods.length===0&&r.class?.hideEmptyMembersBox&&(l.annotations.length>0?rt=lt-a:rt=lt),n||(rt-=4);let St=B;(R.attr("class").includes("label-group")||R.attr("class").includes("annotation-group"))&&(St=-R.node()?.getBBox().width/2||0,c.selectAll("text").each(function(xt,vt,bt){window.getComputedStyle(bt[vt]).textAnchor==="middle"&&(St=0)})),R.attr("transform",`translate(${St}, ${rt})`)}),l.members.length>0||l.methods.length>0||m){const z=$+N+w+s,G=y.line(P.x,z,P.x+P.width,z+.001,C);c.insert(()=>G).attr("class",`divider${t.look==="neo"&&!o?" neo-line":""}`).attr("style",g)}if(m||l.members.length>0||l.methods.length>0){const z=$+N+J+w+a*2+s,G=y.line(P.x,S?Math.max(W,z):z,P.x+P.width,(S?Math.max(W,z):z)+.001,C);c.insert(()=>G).attr("class",`divider${t.look==="neo"&&!o?" neo-line":""}`).attr("style",g)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",g),L.select(":nth-child(2)").attr("style",g),c.selectAll(".divider").select("path").attr("style",g),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",g),!n){const z=RegExp(/color\s*:\s*([^;]*)/),G=z.exec(g);if(G){const I=G[0].replace("color","fill");c.selectAll("tspan").attr("style",I)}else if(d){const I=z.exec(d);if(I){const R=I[0].replace("color","fill");c.selectAll("tspan").attr("style",R)}}}return st(t,L),t.intersect=function(z){return tt.rect(t,z)},c}p(jd,"classBox");async function Xd(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const o=t,s=t,a=20,n=20,l="verifyMethod"in t,c=dt(t),h=Bt(),{themeVariables:d}=h,{borderColorArray:u,requirementEdgeLabelBackground:g}=d,m=h.layout==="elk"?"start":"center",y=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let C;l?C=await ke(y,`&lt;&lt;${o.type}&gt;&gt;`,0,t.labelStyle):C=await ke(y,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let x=C;const b=await ke(y,o.name,x,t.labelStyle+"; font-weight: bold;");if(x+=b+n,l){const N=await ke(y,`${o.requirementId?`ID: ${o.requirementId}`:""}`,x,t.labelStyle,m);x+=N;const J=await ke(y,`${o.text?`Text: ${o.text}`:""}`,x,t.labelStyle,m);x+=J;const W=await ke(y,`${o.risk?`Risk: ${o.risk}`:""}`,x,t.labelStyle,m);x+=W,await ke(y,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:""}`,x,t.labelStyle,m)}else{const N=await ke(y,`${s.type?`Type: ${s.type}`:""}`,x,t.labelStyle,m);x+=N,await ke(y,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,x,t.labelStyle,m)}const S=(y.node()?.getBBox().width??200)+a,B=(y.node()?.getBBox().height??200)+a,w=-S/2,v=-B/2,F=it.svg(y),L=et(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const P=F.rectangle(w,v,S,B,L),$=y.insert(()=>P,":first-child");if($.attr("class","basic label-container outer-path").attr("style",i),u?.length){const N=t.colorIndex??0;y.attr("data-color-id",`color-${N%u.length}`)}if(y.selectAll(".label").each((N,J,W)=>{const z=mt(W[J]),G=z.attr("transform");let I=0,R=0;if(G){const St=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(G);St&&(I=parseFloat(St[1]),R=parseFloat(St[2]))}const Y=R-B/2;let lt=w+a/2;(J===0||J===1)&&(lt=I),z.attr("transform",`translate(${lt}, ${Y+a})`)}),x>C+b+n){const N=v+C+b+n;let J;if(t.look==="neo"){const G=[[w,N],[w+S,N],[w+S,N+.001],[w,N+.001]];J=F.polygon(G,L)}else J=F.line(w,N,w+S,N,L);y.insert(()=>J).attr("class","divider")}return st(t,$),t.intersect=function(N){return tt.rect(t,N)},i&&t.look!=="handDrawn"&&(g||u?.length)&&y.selectAll("path").attr("style",i),y}p(Xd,"requirementBox");async function ke(e,t,r,i="",o="center"){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),a=Bt(),n=a.htmlLabels??!0,l=await ye(s,sa(We(t)),{width:Ie(t,a)+50,classes:"markdown-node-label",useHtmlLabels:n,style:i},a);let c;if(n){const h=l.children[0],d=mt(l);o==="start"&&mt(h).style("text-align","left"),c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{const h=l.children[0];for(const d of h.children)i&&d.setAttribute("style",i);if(o==="start"){h.setAttribute("text-anchor","start");for(const d of h.children)d.setAttribute("text-anchor","start")}c=l.getBBox(),c.height+=6}return s.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}p(ke,"addText");var EC=p(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function Gd(e,t,{config:r}){const{labelStyles:i,nodeStyles:o}=at(t);t.labelStyle=i||"";const s=10,a=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await ct(e,t,dt(t)),h=t.padding||10;let d="",u;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(d=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),u=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const g={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let m,y;u?{label:m,bbox:y}=await Oo(u,"ticket"in t&&t.ticket||"",g):{label:m,bbox:y}=await Oo(n,"ticket"in t&&t.ticket||"",g);const{label:C,bbox:x}=await Oo(n,"assigned"in t&&t.assigned||"",g);t.width=a;const b=10,S=t?.width||0,B=Math.max(y.height,x.height)/2,w=Math.max(l.height+b*2,t?.height||0)+B,v=-S/2,F=-w/2;c.attr("transform","translate("+(h-S/2)+", "+(-B-l.height/2)+")"),m.attr("transform","translate("+(h-S/2)+", "+(-B+l.height/2)+")"),C.attr("transform","translate("+(h+S/2-x.width-2*s)+", "+(-B+l.height/2)+")");let L;const{rx:P,ry:$}=t,{cssStyles:N}=t;if(t.look==="handDrawn"){const J=it.svg(n),W=et(t,{}),z=P||$?J.path(de(v,F,S,w,P||0),W):J.rectangle(v,F,S,w,W);L=n.insert(()=>z,":first-child"),L.attr("class","basic label-container").attr("style",N||null)}else{L=n.insert("rect",":first-child"),L.attr("class","basic label-container __APA__").attr("style",o).attr("rx",P??5).attr("ry",$??5).attr("x",v).attr("y",F).attr("width",S).attr("height",w);const J="priority"in t&&t.priority;if(J){const W=n.append("line"),z=v+2,G=F+Math.floor((P??0)/2),I=F+w-Math.floor((P??0)/2);W.attr("x1",z).attr("y1",G).attr("x2",z).attr("y2",I).attr("stroke-width","4").attr("stroke",EC(J))}}return st(t,L),t.height=w,t.intersect=function(J){return tt.rect(t,J)},n}p(Gd,"kanbanItem");async function Ud(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:a,label:n}=await ct(e,t,dt(t)),l=s.width+10*a,c=s.height+8*a,h=.15*l,{cssStyles:d}=t,u=s.width+20,g=s.height+20,m=Math.max(l,u),y=Math.max(c,g);n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);let C;const x=`M0 0
216
+ a${h},${h} 1 0,0 ${m*.25},${-1*y*.1}
217
+ a${h},${h} 1 0,0 ${m*.25},0
218
+ a${h},${h} 1 0,0 ${m*.25},0
219
+ a${h},${h} 1 0,0 ${m*.25},${y*.1}
220
+
221
+ a${h},${h} 1 0,0 ${m*.15},${y*.33}
222
+ a${h*.8},${h*.8} 1 0,0 0,${y*.34}
223
+ a${h},${h} 1 0,0 ${-1*m*.15},${y*.33}
224
+
225
+ a${h},${h} 1 0,0 ${-1*m*.25},${y*.15}
226
+ a${h},${h} 1 0,0 ${-1*m*.25},0
227
+ a${h},${h} 1 0,0 ${-1*m*.25},0
228
+ a${h},${h} 1 0,0 ${-1*m*.25},${-1*y*.15}
229
+
230
+ a${h},${h} 1 0,0 ${-1*m*.1},${-1*y*.33}
231
+ a${h*.8},${h*.8} 1 0,0 0,${-1*y*.34}
232
+ a${h},${h} 1 0,0 ${m*.1},${-1*y*.33}
233
+ H0 V0 Z`;if(t.look==="handDrawn"){const b=it.svg(o),S=et(t,{}),B=b.path(x,S);C=o.insert(()=>B,":first-child"),C.attr("class","basic label-container").attr("style",zt(d))}else C=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return C.attr("transform",`translate(${-m/2}, ${-y/2})`),st(t,C),t.calcIntersect=function(b,S){return tt.rect(b,S)},t.intersect=function(b){return M.info("Bang intersect",t,b),tt.rect(t,b)},o}p(Ud,"bang");async function Vd(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:a,label:n}=await ct(e,t,dt(t)),l=s.width+2*a,c=s.height+2*a,h=.15*l,d=.25*l,u=.35*l,g=.2*l,{cssStyles:m}=t;let y;const C=`M0 0
234
+ a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
235
+ a${u},${u} 1 0,1 ${l*.4},${-1*l*.1}
236
+ a${d},${d} 1 0,1 ${l*.35},${l*.2}
237
+
238
+ a${h},${h} 1 0,1 ${l*.15},${c*.35}
239
+ a${g},${g} 1 0,1 ${-1*l*.15},${c*.65}
240
+
241
+ a${d},${h} 1 0,1 ${-1*l*.25},${l*.15}
242
+ a${u},${u} 1 0,1 ${-1*l*.5},0
243
+ a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
244
+
245
+ a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
246
+ a${g},${g} 1 0,1 ${l*.1},${-1*c*.65}
247
+ H0 V0 Z`;if(t.look==="handDrawn"){const x=it.svg(o),b=et(t,{}),S=x.path(C,b);y=o.insert(()=>S,":first-child"),y.attr("class","basic label-container").attr("style",zt(m))}else y=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),y.attr("transform",`translate(${-l/2}, ${-c/2})`),st(t,y),t.calcIntersect=function(x,b){return tt.rect(x,b)},t.intersect=function(x){return M.info("Cloud intersect",t,x),tt.rect(t,x)},o}p(Vd,"cloud");async function Kd(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:a,label:n}=await ct(e,t,dt(t)),l=s.width+8*a,c=s.height+2*a,h=5,d=t.look==="neo"?`
248
+ M${-l/2} ${c/2-h}
249
+ v${-c+2*h}
250
+ q0,-${h} ${h},-${h}
251
+ h${l-2*h}
252
+ q${h},0 ${h},${h}
253
+ v${c-h}
254
+ H${-l/2}
255
+ Z
256
+ `:`
257
+ M${-l/2} ${c/2-h}
258
+ v${-c+2*h}
259
+ q0,-${h} ${h},-${h}
260
+ h${l-2*h}
261
+ q${h},0 ${h},${h}
262
+ v${c-2*h}
263
+ q0,${h} ${-h},${h}
264
+ h${-(l-2*h)}
265
+ q${-h},0 ${-h},${-h}
266
+ Z
267
+ `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const u=o.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);return o.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),o.append(()=>n.node()),st(t,u),t.calcIntersect=function(g,m){return tt.rect(g,m)},t.intersect=function(g){return tt.rect(t,g)},o}p(Kd,"defaultMindmapNode");async function Zd(e,t){const r={padding:t.padding??0};return La(e,t,r)}p(Zd,"mindmapCircle");var AC=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Fd},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Bd},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Ed},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Id},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Kc},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Zc},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:rd},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:Dc},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:zc},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:Rc},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:Vc},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:La},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Ud},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Vd},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Sd},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:sd},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:fd},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:pd},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Rd},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:ud},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Jc},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:$d},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:qc},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:vd},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Md},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:_d},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:id},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:ad},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:jc},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Xc},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Gc},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:md},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Wd},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:od},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Pd},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:yd},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Uc},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Qc},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Nd},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Hd},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:td},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:qd},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:ed},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Ld},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:bd},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:xd},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Oc},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Yc},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Dd},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Od},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:zd},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Td},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Cd}],_C=p(()=>{const t=[...Object.entries({state:Ad,choice:Nc,note:kd,composite:Wc,rectWithTitle:wd,labelRect:gd,block_arrow:Pc,collapsedGroup:$c,iconSquare:cd,iconCircle:ld,icon:nd,iconRounded:hd,imageSquare:dd,anchor:Mc,kanbanItem:Gd,mindmapCircle:Zd,defaultMindmapNode:Kd,classBox:jd,erBox:Fa,requirementBox:Xd}),...AC.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(o=>[o,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Qd=_C();function MC(e){return e in Qd}p(MC,"isValidShape");var xo=p(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),bo=new Map;async function Ea(e,t,r){let i,o;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?Qd[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;r.config.securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),o=await s(i,t,r)}else o=await s(e,t,r),i=o;return i.attr("data-look",zt(t.look)),t.tooltip&&o.attr("title",t.tooltip),bo.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(Ea,"insertNode");var nS=p((e,t)=>{bo.set(t.id,e)},"setNodeElem"),IC=p(()=>{bo.clear()},"clear"),Zn=p(e=>{const t=bo.get(e.id);M.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),OC=p(async(e,t)=>{const r=Bt(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:a}=i,n=a,{labelStyles:l,nodeStyles:c,borderStyles:h,backgroundStyles:d}=at(t),u=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),g=ve(r.flowchart.htmlLabels),m=t.direction==="LR",y=u.insert("g").attr("class","cluster-label swimlane-label"),C=await ye(y,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width});let x=C.getBBox();if(g){const W=C.children[0],z=mt(C);x=W.getBoundingClientRect(),z.attr("width",x.width),z.attr("height",x.height)}const b=t.padding??0,S=t.width<=x.width+b?x.width+b:t.width;t.width<=x.width+b?t.diff=(S-t.width)/2-b:t.diff=-b;const B=t.height,w=t.y-B/2,v=t.y+B/2,F=t.x-S/2,L=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:w+B/3,P=m?4:0,$=x.height+2*P;let N,J;if(m){const W=Math.max($,x.height+2*P),z=F+W,G=Math.max(0,S-W);if(t.look==="handDrawn"){const Y=it.svg(u),lt=et(t,{roughness:.7,fill:s,stroke:n,fillWeight:3,seed:o}),rt=et(t,{roughness:.7,fill:"none",stroke:n,seed:o}),St=Y.rectangle(F,w,W,B,lt);N=u.insert(()=>St,":first-child");const xt=Y.rectangle(z,w,G,B,rt);J=u.insert(()=>xt,":first-child"),N.select("path:nth-child(2)").attr("style",h.join(";")),N.select("path").attr("style",d.join(";").replace("fill","stroke"))}else N=u.insert("rect",":first-child"),J=u.insert("rect",":first-child"),N.attr("class","swimlane-title").attr("style",c).attr("x",F).attr("y",w).attr("width",W).attr("height",B).attr("fill",s).attr("stroke",n),J.attr("class","swimlane-body").attr("style",c).attr("x",z).attr("y",w).attr("width",G).attr("height",B).attr("fill","none").attr("stroke",n);const I=F+W/2,R=t.y;y.attr("transform",`translate(${I}, ${R}) rotate(-90) translate(${-x.width/2}, ${-x.height/2})`)}else{const W=Math.max(0,L-w),z=Math.min($,W),G=w+z,I=Math.max(0,v-G),R=t.x-S/2;if(t.look==="handDrawn"){const rt=it.svg(u),St=et(t,{roughness:.7,fill:s,stroke:n,fillWeight:3,seed:o}),xt=et(t,{roughness:.7,fill:"none",stroke:n,seed:o}),vt=rt.rectangle(R,w,S,z,St);N=u.insert(()=>vt,":first-child");const bt=rt.rectangle(R,G,S,I,xt);J=u.insert(()=>bt,":first-child"),N.select("path:nth-child(2)").attr("style",h.join(";")),N.select("path").attr("style",d.join(";").replace("fill","stroke"))}else N=u.insert("rect",":first-child"),J=u.insert("rect",":first-child"),N.attr("class","swimlane-title").attr("style",c).attr("x",R).attr("y",w).attr("width",S).attr("height",z).attr("fill",s).attr("stroke",n),J.attr("class","swimlane-body").attr("style",c).attr("x",R).attr("y",G).attr("width",S).attr("height",I).attr("fill","none").attr("stroke",n);const Y=t.x-x.width/2,lt=w+(z-x.height)/2;y.attr("transform",`translate(${Y}, ${lt})`)}if(M.trace("Swimlane data ",t,JSON.stringify(t)),l){const W=y.select("span");W&&W.attr("style",l)}return t.offsetX=0,t.width=S,t.height=B,t.offsetY=x.height-b/2,t.intersect=function(W){return lr(t,W)},{cluster:u,labelBBox:x}},"swimlane"),Jd=p(async(e,t)=>{M.info("Creating subgraph rect for ",t.id,t);const r=Bt(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=at(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),u=Qt(r),g=d.insert("g").attr("class","cluster-label ");let m;t.labelType==="markdown"?m=await ye(g,t.label,{style:t.labelStyle,useHtmlLabels:u,isNode:!0,width:t.width}):m=await qe(g,t.label,t.labelStyle||"",!1,!0);let y=m.getBBox();if(Qt(r)){const F=m.children[0],L=mt(m);y=F.getBoundingClientRect(),L.attr("width",y.width),L.attr("height",y.height)}const C=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-C/2,S=t.y-x/2;M.trace("Data ",t,JSON.stringify(t));let B;if(t.look==="handDrawn"){const F=it.svg(d),L=et(t,{roughness:.7,fill:s,stroke:a,fillWeight:3,seed:o}),P=F.path(de(b,S,C,x,0),L);B=d.insert(()=>(M.debug("Rough node insert CXC",P),P),":first-child"),B.select("path:nth-child(2)").attr("style",c.join(";")),B.select("path").attr("style",h.join(";").replace("fill","stroke"))}else B=d.insert("rect",":first-child"),B.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",S).attr("width",C).attr("height",x);const{subGraphTitleTopMargin:w}=xo(r);if(g.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+w})`),n){const F=g.select("span");F&&F.attr("style",n)}const v=B.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=y.height-t.padding/2,t.intersect=function(F){return lr(t,F)},{cluster:d,labelBBox:y}},"rect"),DC=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),o=0*t.padding,s=o/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+o).attr("height",t.height+o).attr("fill","none");const a=i.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(n){return lr(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),$C=p(async(e,t)=>{const r=Bt(),{themeVariables:i,handDrawnSeed:o}=r,{altBackground:s,compositeBackground:a,compositeTitleBackground:n,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),d=c.insert("g").attr("class","cluster-label");let u=c.append("rect");const g=await qe(d,t.label,t.labelStyle,void 0,!0);let m=g.getBBox();if(Qt(r)){const P=g.children[0],$=mt(g);m=P.getBoundingClientRect(),$.attr("width",m.width),$.attr("height",m.height)}const y=0*t.padding,C=y/2,x=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+y;t.width<=m.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+y,S=t.height+y-m.height-6,B=t.x-x/2,w=t.y-b/2;t.width=x;const v=t.y-t.height/2-C+m.height+2;let F;if(t.look==="handDrawn"){const P=t.cssClasses.includes("statediagram-cluster-alt"),$=it.svg(c),N=t.rx||t.ry?$.path(de(B,w,x,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:o}):$.rectangle(B,w,x,b,{seed:o});F=c.insert(()=>N,":first-child");const J=$.rectangle(B,v,x,S,{fill:P?s:a,fillStyle:P?"hachure":"solid",stroke:l,seed:o});F=c.insert(()=>N,":first-child"),u=c.insert(()=>J)}else F=h.insert("rect",":first-child"),F.attr("class","outer").attr("x",B).attr("y",w).attr("width",x).attr("height",b).attr("data-look",t.look),u.attr("class","inner").attr("x",B).attr("y",v).attr("width",x).attr("height",S);d.attr("transform",`translate(${t.x-m.width/2}, ${w+1-(Qt(r)?0:3)})`);const L=F.node().getBBox();return t.height=L.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(P){return lr(t,P)},{cluster:c,labelBBox:m}},"roundedWithTitle"),PC=p(async(e,t)=>{M.info("Creating subgraph rect for ",t.id,t);const r=Bt(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=at(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),u=Qt(r),g=d.insert("g").attr("class","cluster-label "),m=await ye(g,t.label,{style:t.labelStyle,useHtmlLabels:u,isNode:!0,width:t.width});let y=m.getBBox();if(Qt(r)){const F=m.children[0],L=mt(m);y=F.getBoundingClientRect(),L.attr("width",y.width),L.attr("height",y.height)}const C=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-C/2,S=t.y-x/2;M.trace("Data ",t,JSON.stringify(t));let B;if(t.look==="handDrawn"){const F=it.svg(d),L=et(t,{roughness:.7,fill:s,stroke:a,fillWeight:4,seed:o}),P=F.path(de(b,S,C,x,t.rx),L);B=d.insert(()=>(M.debug("Rough node insert CXC",P),P),":first-child"),B.select("path:nth-child(2)").attr("style",c.join(";")),B.select("path").attr("style",h.join(";").replace("fill","stroke"))}else B=d.insert("rect",":first-child"),B.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",S).attr("width",C).attr("height",x);const{subGraphTitleTopMargin:w}=xo(r);if(g.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+w})`),n){const F=g.select("span");F&&F.attr("style",n)}const v=B.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=y.height-t.padding/2,t.intersect=function(F){return lr(t,F)},{cluster:d,labelBBox:y}},"kanbanSection"),RC=p((e,t)=>{const r=Bt(),{themeVariables:i,handDrawnSeed:o}=r,{nodeBorder:s}=i,a=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=a.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,d=t.x-c/2,u=t.y-h/2;t.width=c;let g;if(t.look==="handDrawn"){const C=it.svg(a).rectangle(d,u,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:o});g=a.insert(()=>C,":first-child")}else{g=n.insert("rect",":first-child");let y="outer";t.look,y="divider",g.attr("class",y).attr("x",d).attr("y",u).attr("width",c).attr("height",h).attr("data-look",t.look)}const m=g.node().getBBox();return t.height=m.height,t.offsetX=0,t.offsetY=0,t.intersect=function(y){return lr(t,y)},{cluster:a,labelBBox:{}}},"divider"),qC=Jd,NC={rect:Jd,squareRect:qC,roundedWithTitle:$C,noteGroup:DC,divider:RC,kanbanSection:PC,swimlane:OC},tu=new Map,eu=p(async(e,t)=>{const r=t.shape||"rect",i=await NC[r](e,t);return tu.set(t.id,i),i},"insertCluster"),WC=p(()=>{tu=new Map},"clear"),Zr=p((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Kt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Qn={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function ii(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Dt(e),t=Dt(t);const[r,i]=[e.x,e.y],[o,s]=[t.x,t.y],a=o-r,n=s-i;return{angle:Math.atan(n/a),deltaX:a,deltaY:n}}p(ii,"calculateDeltaAndAngle");var Dt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),zC=p(e=>({x:p(function(t,r,i){let o=0;const s=Dt(i[0]).x<Dt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Kt,e.arrowTypeStart)){const{angle:g,deltaX:m}=ii(i[0],i[1]);o=Kt[e.arrowTypeStart]*Math.cos(g)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Kt,e.arrowTypeEnd)){const{angle:g,deltaX:m}=ii(i[i.length-1],i[i.length-2]);o=Kt[e.arrowTypeEnd]*Math.cos(g)*(m>=0?1:-1)}const a=Math.abs(Dt(t).x-Dt(i[i.length-1]).x),n=Math.abs(Dt(t).y-Dt(i[i.length-1]).y),l=Math.abs(Dt(t).x-Dt(i[0]).x),c=Math.abs(Dt(t).y-Dt(i[0]).y),h=Kt[e.arrowTypeStart],d=Kt[e.arrowTypeEnd],u=1;if(a<d&&a>0&&n<d){let g=d+u-a;g*=s==="right"?-1:1,o-=g}if(l<h&&l>0&&c<h){let g=h+u-l;g*=s==="right"?-1:1,o+=g}return Dt(t).x+o},"x"),y:p(function(t,r,i){let o=0;const s=Dt(i[0]).y<Dt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Kt,e.arrowTypeStart)){const{angle:g,deltaY:m}=ii(i[0],i[1]);o=Kt[e.arrowTypeStart]*Math.abs(Math.sin(g))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Kt,e.arrowTypeEnd)){const{angle:g,deltaY:m}=ii(i[i.length-1],i[i.length-2]);o=Kt[e.arrowTypeEnd]*Math.abs(Math.sin(g))*(m>=0?1:-1)}const a=Math.abs(Dt(t).y-Dt(i[i.length-1]).y),n=Math.abs(Dt(t).x-Dt(i[i.length-1]).x),l=Math.abs(Dt(t).y-Dt(i[0]).y),c=Math.abs(Dt(t).x-Dt(i[0]).x),h=Kt[e.arrowTypeStart],d=Kt[e.arrowTypeEnd],u=1;if(a<d&&a>0&&n<d){let g=d+u-a;g*=s==="up"?-1:1,o-=g}if(l<h&&l>0&&c<h){let g=h+u-l;g*=s==="up"?-1:1,o+=g}return Dt(t).y+o},"y")}),"getLineFunctionsWithOffset"),HC=p((e,t,r,i,o,s=!1,a)=>{t.arrowTypeStart&&Jn(e,"start",t.arrowTypeStart,r,i,o,s,a),t.arrowTypeEnd&&Jn(e,"end",t.arrowTypeEnd,r,i,o,s,a)},"addEdgeMarkers"),YC={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},jC=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Jn=p((e,t,r,i,o,s,a=!1,n)=>{if(!r||r==="none")return;const l=YC[r],c=l&&jC.includes(l.type);if(!l){M.warn(`Unknown arrow type: ${r}`);return}const h=l.type,g=`${o}_${s}-${h}${t==="start"?"Start":"End"}${a&&c?"-margin":""}`;if(n&&n.trim()!==""){const m=n.replace(/[^\dA-Za-z]/g,"_"),y=`${g}_${m}`;if(!document.getElementById(y)){const C=document.getElementById(g);if(C){const x=C.cloneNode(!0);x.id=y,x.querySelectorAll("path, circle, line").forEach(S=>{S.setAttribute("stroke",n),l.fill&&S.setAttribute("fill",n)}),C.parentNode?.appendChild(x)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${g})`)},"addEdgeMarker"),XC=p(e=>typeof e=="string"?e:Bt()?.flowchart?.curve,"resolveEdgeCurveType"),Er=new Map,Rt=new Map,GC=p(()=>{Er.clear(),Rt.clear()},"clear"),ru=p(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),Qr=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),Aa=p(async(e,t)=>{const r=Bt();let i=Qt(r);const{labelStyles:o}=at(t);t.labelStyle=o;const s=e.insert("g").attr("class","edgeLabel"),a=s.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await ye(e,t.label,{style:Qr(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);a.node().appendChild(c),M.info("abc82",t,t.labelType);let h,d;if(i){const g=c.children[0],m=mt(c);h=await or.measure(()=>g.getBoundingClientRect()),d=h,m.attr("width",h.width),m.attr("height",h.height)}else{const g=mt(c).select("text").node();await or.measure(()=>{h=c.getBBox(),g&&typeof g.getBBox=="function"?d=g.getBBox():d=h})}a.attr("transform",Zr(d,i)),Er.set(t.id,s),t.width=h.width,t.height=h.height;let u;if(t.startLabelLeft){const g=e.insert("g").attr("class","edgeTerminals"),m=g.insert("g").attr("class","inner"),y=await qe(m,t.startLabelLeft,Qr(t.labelStyle)||"",!1,!1);u=y;let C=y.getBBox();if(i){const x=y.children[0],b=mt(y);C=x.getBoundingClientRect(),b.attr("width",C.width),b.attr("height",C.height)}m.attr("transform",Zr(C,i)),Rt.get(t.id)||Rt.set(t.id,{}),Rt.get(t.id).startLeft=g,oi(u,t.startLabelLeft)}if(t.startLabelRight){const g=e.insert("g").attr("class","edgeTerminals"),m=g.insert("g").attr("class","inner"),y=await qe(m,t.startLabelRight,Qr(t.labelStyle)||"",!1,!1);u=y;let C=y.getBBox();if(i){const x=y.children[0],b=mt(y);C=x.getBoundingClientRect(),b.attr("width",C.width),b.attr("height",C.height)}m.attr("transform",Zr(C,i)),Rt.get(t.id)||Rt.set(t.id,{}),Rt.get(t.id).startRight=g,oi(u,t.startLabelRight)}if(t.endLabelLeft){const g=e.insert("g").attr("class","edgeTerminals"),m=g.insert("g").attr("class","inner"),y=await qe(g,t.endLabelLeft,Qr(t.labelStyle)||"",!1,!1);u=y;let C=y.getBBox();if(i){const x=y.children[0],b=mt(y);C=x.getBoundingClientRect(),b.attr("width",C.width),b.attr("height",C.height)}m.attr("transform",Zr(C,i)),Rt.get(t.id)||Rt.set(t.id,{}),Rt.get(t.id).endLeft=g,oi(u,t.endLabelLeft)}if(t.endLabelRight){const g=e.insert("g").attr("class","edgeTerminals"),m=g.insert("g").attr("class","inner"),y=await qe(g,t.endLabelRight,Qr(t.labelStyle)||"",!1,!1);u=y;let C=y.getBBox();if(i){const x=y.children[0],b=mt(y);C=x.getBoundingClientRect(),b.attr("width",C.width),b.attr("height",C.height)}m.attr("transform",Zr(C,i)),Rt.get(t.id)||Rt.set(t.id,{}),Rt.get(t.id).endRight=g,oi(u,t.endLabelRight)}return c},"insertEdgeLabel");function oi(e,t){Qt(Bt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(oi,"setTerminalWidth");var UC=p((e,t)=>{M.debug("Moving label abc88 ",e.id,e.label,Er.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=Bt(),{subGraphTitleTotalMargin:o}=xo(i);if(e.label){const s=Er.get(e.id);let a=e.x,n=e.y;if(r){const l=Zt.calcLabelPosition(r);M.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(a=l.x,n=l.y)}s.attr("transform",`translate(${a}, ${n+o/2})`)}if(e.startLabelLeft){const s=Rt.get(e.id).startLeft;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const s=Rt.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const s=Rt.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const s=Rt.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}},"positionEdgeLabel"),VC=p((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith("-to-label")||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,o=Math.abs(i.x-r.x),s=Math.abs(i.y-r.y);return o<.001||s<.001?t:s>=o?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),KC=p((e,t)=>{const r=e.x,i=e.y,o=Math.abs(t.x-r),s=Math.abs(t.y-i),a=e.width/2,n=e.height/2;return o>=a||s>=n},"outsideNode"),ZC=p((e,t,r)=>{M.debug(`intersection calc abc89:
268
+ outsidePoint: ${JSON.stringify(t)}
269
+ insidePoint : ${JSON.stringify(r)}
270
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,o=e.y,s=Math.abs(i-r.x),a=e.width/2;let n=r.x<t.x?a-s:a+s;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(o-t.y)*a>Math.abs(i-t.x)*l){let d=r.y<t.y?t.y-l-o:o-l-t.y;n=h*d/c;const u={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-d:r.y-c+d};return n===0&&(u.x=t.x,u.y=t.y),h===0&&(u.x=t.x),c===0&&(u.y=t.y),M.debug(`abc89 top/bottom calc, Q ${c}, q ${d}, R ${h}, r ${n}`,u),u}else{r.x<t.x?n=t.x-a-i:n=i-a-t.x;let d=c*n/h,u=r.x<t.x?r.x+h-n:r.x-h+n,g=r.y<t.y?r.y+d:r.y-d;return M.debug(`sides calc abc89, Q ${c}, q ${d}, R ${h}, r ${n}`,{_x:u,_y:g}),n===0&&(u=t.x,g=t.y),h===0&&(u=t.x),c===0&&(g=t.y),{x:u,y:g}}},"intersection"),tl=p((e,t)=>{M.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],o=!1;return e.forEach(s=>{if(M.info("abc88 checking point",s,t),!KC(t,s)&&!o){const a=ZC(t,i,s);M.debug("abc88 inside",s,i,a),M.debug("abc88 intersection",a,t);let n=!1;r.forEach(l=>{n=n||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?M.warn("abc88 no intersect",a,r):r.push(a),o=!0}else M.warn("abc88 outside",s,i),i=s,o||r.push(s)}),M.debug("returning points",r),r},"cutPathAtIntersect");function iu(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const o=e[i-1],s=e[i],a=e[i+1];(o.x===s.x&&s.y===a.y&&Math.abs(s.x-a.x)>5&&Math.abs(s.y-o.y)>5||o.y===s.y&&s.x===a.x&&Math.abs(s.x-o.x)>5&&Math.abs(s.y-a.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(iu,"extractCornerPoints");var el=p(function(e,t,r){const i=t.x-e.x,o=t.y-e.y,s=Math.sqrt(i*i+o*o),a=r/s;return{x:t.x-a*i,y:t.y-a*o}},"findAdjacentPoint"),QC=p(function(e){const{cornerPointPositions:t}=iu(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const o=e[i-1],s=e[i+1],a=e[i],n=el(o,a,5),l=el(s,a,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const d=Math.sqrt(2)*2;let u={x:a.x,y:a.y};if(Math.abs(s.x-o.x)>10&&Math.abs(s.y-o.y)>=10){M.debug("Corner point fixing",Math.abs(s.x-o.x),Math.abs(s.y-o.y));const g=5;a.x===n.x?u={x:c<0?n.x-g+d:n.x+g-d,y:h<0?n.y-d:n.y+d}:u={x:c<0?n.x-d:n.x+d,y:h<0?n.y-g+d:n.y+g-d}}else M.debug("Corner point skipping fixing",Math.abs(s.x-o.x),Math.abs(s.y-o.y));r.push(u,l)}else r.push(e[i]);return r},"fixCorners"),JC=p((e,t,r)=>{const i=e-t-r,o=2,s=2,a=o+s,n=Math.floor(i/a),l=Number.isFinite(n)?Math.max(0,n):0,c=Array(l).fill(`${o} ${s}`).join(" ");return`0 ${t} ${c} ${r}`},"generateDashArray"),ou=p(function(e,t,r,i,o,s,a,n=!1){if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=Bt();let h=t.points,d=!1;const u=o;var g=s;const m=[];for(const Y in t.cssCompiledStyles)qh(Y)||m.push(t.cssCompiledStyles[Y]);if(c==="swimlane"){if(g.intersect&&u.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[u.intersect(h[0]),g.intersect(h[1])];else{const Y=h.slice(1,-1),lt=Y[0],rt=Y[Y.length-1],St=.5,xt=Math.abs(h[h.length-1].x-rt.x)<St&&Math.abs(h[h.length-1].y-rt.y)<St,vt=u.intersect(lt),bt=xt?rt:g.intersect(rt),Tt=Math.abs(bt.x-rt.x)<St&&Math.abs(bt.y-rt.y)<St,Ct=Math.abs(vt.x-lt.x)<St&&Math.abs(vt.y-lt.y)<St?[]:[vt],Mt=Tt?[]:[bt];h=[...Ct,...Y,...Mt]}h=VC(t,h)}else g.intersect&&u.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(u.intersect(h[0])),h.push(g.intersect(h[h.length-1])));const y=btoa(JSON.stringify(h));t.toCluster&&(M.info("to cluster abc88",r.get(t.toCluster)),h=tl(t.points,r.get(t.toCluster).node),d=!0),t.fromCluster&&(M.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=tl(h.reverse(),r.get(t.fromCluster).node).reverse(),d=!0);let C=h.filter(Y=>!Number.isNaN(Y.y));const x=XC(t.curve);x!=="rounded"&&(C=QC(C));let b=Ri;switch(x){case"linear":b=Ri;break;case"basis":b=us;break;case"cardinal":b=nh;break;case"bumpX":b=hh;break;case"bumpY":b=lh;break;case"catmullRom":b=ah;break;case"monotoneX":b=sh;break;case"monotoneY":b=oh;break;case"natural":b=ih;break;case"step":b=rh;break;case"stepAfter":b=eh;break;case"stepBefore":b=th;break;case"rounded":b=Ri;break;default:b=us}const{x:S,y:B}=zC(t),w=pp().x(S).y(B).curve(b);let v;switch(t.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-invisible";break;default:v="edge-thickness-normal"}switch(t.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break;default:v+=" edge-pattern-solid"}let F,L=x==="rounded"?su(au(C,t),5):w(C);const P=Array.isArray(t.style)?t.style:[t.style];let $=P.find(Y=>Y?.startsWith("stroke:")),N="";t.animate&&(N="edge-animation-fast"),t.animation&&(N="edge-animation-"+t.animation);let J=!1;if(t.look==="handDrawn"){const Y=it.svg(e);Object.assign([],C);const lt=Y.path(L,{roughness:.3,seed:l});v+=" transition",F=mt(lt).select("path").attr("id",`${a}-${t.id}`).attr("class"," "+v+(t.classes?" "+t.classes:"")+(N?" "+N:"")).attr("style",P?P.reduce((St,xt)=>St+";"+xt,""):"");let rt=F.attr("d");F.attr("d",rt),e.node().appendChild(F.node())}else{const Y=m.join(";"),lt=P?P.reduce((Tt,ht)=>Tt+ht+";",""):"",rt=(Y?Y+";"+lt+";":lt)+";"+(P?P.reduce((Tt,ht)=>Tt+";"+ht,""):"");F=e.append("path").attr("d",L).attr("id",`${a}-${t.id}`).attr("class"," "+v+(t.classes?" "+t.classes:"")+(N?" "+N:"")).attr("style",rt),$=rt.match(/stroke:([^;]+)/)?.[1],J=t.animate===!0||!!t.animation||Y.includes("animation");const St=F.node(),xt=typeof St.getTotalLength=="function"?St.getTotalLength():0,vt=Qn[t.arrowTypeStart]||0,bt=Qn[t.arrowTypeEnd]||0;if(t.look==="neo"&&!J){const ht=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?JC(xt,vt,bt):`0 ${vt} ${xt-vt-bt} ${bt}`}; stroke-dashoffset: 0;`;F.attr("style",ht+F.attr("style"))}}F.attr("data-edge",!0),F.attr("data-et","edge"),F.attr("data-id",t.id),F.attr("data-points",y),F.attr("data-look",zt(t.look)),t.showPoints&&C.forEach(Y=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",Y.x).attr("cy",Y.y)});let W="";(Bt().flowchart.arrowMarkerAbsolute||Bt().state.arrowMarkerAbsolute)&&(W=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,W=W.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),M.info("arrowTypeStart",t.arrowTypeStart),M.info("arrowTypeEnd",t.arrowTypeEnd);const z=!J&&t?.look==="neo";HC(F,t,W,a,i,z,$);const G=Math.floor(h.length/2),I=h[G];Zt.isLabelCoordinateInPath(I,F.attr("d"))||(d=!0);let R={};return d&&(R.updatedPath=h),R.originalPath=t.points,R},"insertEdge");function su(e,t){if(e.length<2)return"";let r="";const i=e.length,o=1e-5;for(let s=0;s<i;s++){const a=e[s],n=e[s-1],l=e[s+1];if(s===0)r+=`M${a.x},${a.y}`;else if(s===i-1)r+=`L${a.x},${a.y}`;else{const c=a.x-n.x,h=a.y-n.y,d=l.x-a.x,u=l.y-a.y,g=Math.hypot(c,h),m=Math.hypot(d,u);if(g<o||m<o){r+=`L${a.x},${a.y}`;continue}const y=c/g,C=h/g,x=d/m,b=u/m,S=y*x+C*b,B=Math.max(-1,Math.min(1,S)),w=Math.acos(B);if(w<o||Math.abs(Math.PI-w)<o){r+=`L${a.x},${a.y}`;continue}const v=Math.min(t/Math.sin(w/2),g/2,m/2),F=a.x-y*v,L=a.y-C*v,P=a.x+x*v,$=a.y+b*v;r+=`L${F},${L}`,r+=`Q${a.x},${a.y} ${P},${$}`}}return r}p(su,"generateRoundedPath");function Ps(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}p(Ps,"calculateDeltaAndAngle");function au(e,t){const r=e.map(o=>({...o}));if(e.length>=2&&Kt[t.arrowTypeStart]){const o=Kt[t.arrowTypeStart],s=e[0],a=e[1],{angle:n}=Ps(s,a),l=o*Math.cos(n),c=o*Math.sin(n);r[0].x=s.x+l,r[0].y=s.y+c}const i=e.length;if(i>=2&&Kt[t.arrowTypeEnd]){const o=Kt[t.arrowTypeEnd],s=e[i-1],a=e[i-2],{angle:n}=Ps(a,s),l=o*Math.cos(n),c=o*Math.sin(n);r[i-1].x=s.x-l,r[i-1].y=s.y-c}return r}p(au,"applyMarkerOffsetsToPoints");var tx=p((e,t,r,i)=>{t.forEach(o=>{Tx[o](e,r,i)})},"insertMarkers"),ex=p((e,t,r)=>{M.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),rx=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),ix=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),ox=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),sx=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),ax=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),nx=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),lx=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),hx=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),cx=p((e,t,r)=>{const i=$t(),{themeVariables:o}=i,{transitionColor:s}=o;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${s}`)},"barbNeo"),dx=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),ux=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const o=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),gx=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),px=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const o=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),fx=p((e,t,r)=>{const i=$t(),{themeVariables:o}=i,{strokeWidth:s}=o;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${s}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${s}`)},"only_one_neo"),mx=p((e,t,r)=>{const i=$t(),{themeVariables:o}=i,{strokeWidth:s,mainBkg:a}=o,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${s}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${s}`)},"zero_or_one_neo"),yx=p((e,t,r)=>{const i=$t(),{themeVariables:o}=i,{strokeWidth:s}=o;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${s}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${s}`)},"one_or_more_neo"),Cx=p((e,t,r)=>{const i=$t(),{themeVariables:o}=i,{strokeWidth:s,mainBkg:a}=o,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${s}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${s}`)},"zero_or_more_neo"),xx=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
271
+ L20,10
272
+ M20,10
273
+ L0,20`)},"requirement_arrow"),bx=p((e,t,r)=>{const i=$t(),{themeVariables:o}=i,{strokeWidth:s}=o;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${s}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
274
+ L20,10
275
+ M20,10
276
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),kx=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Sx=p((e,t,r)=>{const i=$t(),{themeVariables:o}=i,{strokeWidth:s}=o,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),Tx={extension:ex,composition:rx,aggregation:ix,dependency:ox,lollipop:sx,point:ax,circle:nx,cross:lx,barb:hx,barbNeo:cx,only_one:dx,zero_or_one:ux,one_or_more:gx,zero_or_more:px,only_one_neo:fx,zero_or_one_neo:mx,one_or_more_neo:yx,zero_or_more_neo:Cx,requirement_arrow:xx,requirement_contains:kx,requirement_arrow_neo:bx,requirement_contains_neo:Sx},nu=tx,wx="\0",Ge="\0",rl="";class ko{constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=Bi(void 0),this._defaultEdgeLabelFn=Bi(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Ge]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return nn(t)||(t=Bi(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return fr(this._nodes)}sources(){var t=this;return vi(this.nodes(),function(r){return ln(t._in[r])})}sinks(){var t=this;return vi(this.nodes(),function(r){return ln(t._out[r])})}setNodes(t,r){var i=arguments,o=this;return Ye(t,function(s){i.length>1?o.setNode(s,r):o.setNode(s)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=Ge,this._children[t]={},this._children[Ge][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=i=>this.removeEdge(this._edgeObjs[i]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],Ye(this.children(t),i=>{this.setParent(i)}),delete this._children[t]),Ye(fr(this._in[t]),r),delete this._in[t],delete this._preds[t],Ye(fr(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(br(r))r=Ge;else{r+="";for(var i=r;!br(i);i=this.parent(i))if(i===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==Ge)return r}}children(t){if(br(t)&&(t=Ge),this._isCompound){var r=this._children[t];if(r)return fr(r)}else{if(t===Ge)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return fr(r)}successors(t){var r=this._sucs[t];if(r)return fr(r)}neighbors(t){var r=this.predecessors(t);if(r)return fp(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;Ye(this._nodes,function(a,n){t(n)&&r.setNode(n,a)}),Ye(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,i.edge(a))});var o={};function s(a){var n=i.parent(a);return n===void 0||r.hasNode(n)?(o[a]=n,n):n in o?o[n]:s(n)}return this._isCompound&&Ye(r.nodes(),function(a){r.setParent(a,s(a))}),r}setDefaultEdgeLabel(t){return nn(t)||(t=Bi(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return vo(this._edgeObjs)}setPath(t,r){var i=this,o=arguments;return mp(t,function(s,a){return o.length>1?i.setEdge(s,a,r):i.setEdge(s,a),a}),this}setEdge(){var t,r,i,o,s=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,r=a.w,i=a.name,arguments.length===2&&(o=arguments[1],s=!0)):(t=a,r=arguments[1],i=arguments[3],arguments.length>2&&(o=arguments[2],s=!0)),t=""+t,r=""+r,br(i)||(i=""+i);var n=si(this._isDirected,t,r,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n))return s&&(this._edgeLabels[n]=o),this;if(!br(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[n]=s?o:this._defaultEdgeLabelFn(t,r,i);var l=Bx(this._isDirected,t,r,i);return t=l.v,r=l.w,Object.freeze(l),this._edgeObjs[n]=l,il(this._preds[r],t),il(this._sucs[t],r),this._in[r][n]=l,this._out[t][n]=l,this._edgeCount++,this}edge(t,r,i){var o=arguments.length===1?Po(this._isDirected,arguments[0]):si(this._isDirected,t,r,i);return this._edgeLabels[o]}hasEdge(t,r,i){var o=arguments.length===1?Po(this._isDirected,arguments[0]):si(this._isDirected,t,r,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,o)}removeEdge(t,r,i){var o=arguments.length===1?Po(this._isDirected,arguments[0]):si(this._isDirected,t,r,i),s=this._edgeObjs[o];return s&&(t=s.v,r=s.w,delete this._edgeLabels[o],delete this._edgeObjs[o],ol(this._preds[r],t),ol(this._sucs[t],r),delete this._in[r][o],delete this._out[t][o],this._edgeCount--),this}inEdges(t,r){var i=this._in[t];if(i){var o=vo(i);return r?vi(o,function(s){return s.v===r}):o}}outEdges(t,r){var i=this._out[t];if(i){var o=vo(i);return r?vi(o,function(s){return s.w===r}):o}}nodeEdges(t,r){var i=this.inEdges(t,r);if(i)return i.concat(this.outEdges(t,r))}}ko.prototype._nodeCount=0;ko.prototype._edgeCount=0;function il(e,t){e[t]?e[t]++:e[t]=1}function ol(e,t){--e[t]||delete e[t]}function si(e,t,r,i){var o=""+t,s=""+r;if(!e&&o>s){var a=o;o=s,s=a}return o+rl+s+rl+(br(i)?wx:i)}function Bx(e,t,r,i){var o=""+t,s=""+r;if(!e&&o>s){var a=o;o=s,s=a}var n={v:o,w:s};return i&&(n.name=i),n}function Po(e,t){return si(e,t.v,t.w,t.name)}function lu(e,{edgePathsClass:t="edges edgePaths"}={}){const r=e.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),o=r.insert("g").attr("class",t),s=r.insert("g").attr("class","edgeLabels"),a=r.insert("g").attr("class","nodes");return{clusters:i,edgePaths:o,edgeLabels:s,nodes:a,rootGroups:r}}p(lu,"createLayoutElementGroups");async function hu(e,t){if(t.label){const{shapeSvg:r,bbox:i}=await ct(e,t);t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}p(hu,"measureGroupLabel");async function cu(e,t,r){const i=await Ea(e,t,r),o=i.node()?.getBBox()??{width:0,height:0};return t.width=o.width,t.height=o.height,i}p(cu,"insertMeasuredNode");async function du(e,t){const r=new ko({multigraph:!0,compound:!0}),i=[...t.edges],o=Bt(),s=lu(e),{edgeLabels:a,nodes:n}=s,l=new Map,c=e.node()!=null;await Promise.all(t.nodes.map(async h=>{if(h.isGroup)c&&await hu(n,h),r.setNode(h.id,{...h});else{if(c){const d=await cu(n,h,{config:o,dir:h.dir});l.set(h.id,d)}r.setNode(h.id,{...h})}}));for(const h of i)c&&ru(h)&&await Aa(a,h),r.setEdge(h.start,h.end,{...h},h.id),t.edges.some(u=>u.id===h.id)||t.edges.push(h);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:h}=await yt(async()=>{const{captureNodeSizes:d}=await import("./sizeCapture-INFHLROL-8qFOiWrK.js");return{captureNodeSizes:d}},[],import.meta.url);h(e,t)}return{graph:r,groups:s,nodeElements:l}}p(du,"createGraphWithElements");var Ft=new Map,Ve=new Map,uu=new Map,vx=p(()=>{Ve.clear(),uu.clear(),Ft.clear()},"clear"),fi=p((e,t)=>{const r=Ve.get(t)||[];return M.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),Lx=p((e,t)=>{const r=Ve.get(t)||[];return M.info("Descendants of ",t," is ",r),M.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||fi(e.v,t)||fi(e.w,t)||r.includes(e.w):(M.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),gu=p((e,t,r,i)=>{M.debug("Copying children of ",e,"root",i,"data",t.node(e),i);const o=t.children(e)||[];e!==i&&o.push(e),M.debug("Copying (nodes) clusterId",e,"nodes",o),o.forEach(s=>{if(t.children(s).length>0)gu(s,t,r,i);else{const a=t.node(s);M.info("cp ",s," to ",i," with parent ",e),r.setNode(s,a),i!==t.parent(s)&&(M.debug("Setting parent",s,t.parent(s)),r.setParent(s,t.parent(s))),e!==i&&s!==e?(M.debug("Setting parent",s,e),r.setParent(s,e)):(M.info("In copy ",e,"root",i,"data",t.node(e),i),M.debug("Not Setting parent for node=",s,"cluster!==rootId",e!==i,"node!==clusterId",s!==e));const n=t.edges(s);M.debug("Copying Edges",n),n.forEach(l=>{M.info("Edge",l);const c=t.edge(l.v,l.w,l.name);M.info("Edge data",c,i);try{Lx(l,i)?(M.info("Copying as ",l.v,l.w,c,l.name),r.setEdge(l.v,l.w,c,l.name),M.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):M.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",e)}catch(h){M.error(h)}})}M.debug("Removing node",s),t.removeNode(s)})},"copy"),pu=p((e,t)=>{const r=t.children(e);let i=[...r];for(const o of r)uu.set(o,e),i=[...i,...pu(o,t)];return i},"extractDescendants"),Fx=p((e,t,r)=>{const i=e.edges().filter(l=>l.v===t||l.w===t),o=e.edges().filter(l=>l.v===r||l.w===r),s=i.map(l=>({v:l.v===t?r:l.v,w:l.w===t?t:l.w})),a=o.map(l=>({v:l.v,w:l.w}));return s.filter(l=>a.some(c=>l.v===c.v&&l.w===c.w))},"findCommonEdges"),so=p((e,t,r)=>{const i=t.children(e);if(M.trace("Searching children of id ",e,i),i.length<1)return e;let o;for(const s of i){const a=so(s,t,r),n=Fx(t,r,a);if(a)if(n.length>0)o=a;else return a}return o},"findNonClusterChild"),sl=p(e=>!Ft.has(e)||!Ft.get(e).externalConnections?e:Ft.has(e)?Ft.get(e).id:e,"getAnchorId"),lS=p((e,t)=>{if(!e||t>10){M.debug("Opting out, no graph ");return}else M.debug("Opting in, graph ");e.nodes().forEach(function(r){e.children(r).length>0&&(M.debug("Cluster identified",r," Replacement id in edges: ",so(r,e,r)),Ve.set(r,pu(r,e)),Ft.set(r,{id:so(r,e,r),clusterData:e.node(r)}))}),e.nodes().forEach(function(r){const i=e.children(r),o=e.edges();i.length>0?(M.debug("Cluster identified",r,Ve),o.forEach(s=>{const a=fi(s.v,r),n=fi(s.w,r);a^n&&(M.debug("Edge: ",s," leaves cluster ",r),M.debug("Descendants of XXX ",r,": ",Ve.get(r)),Ft.get(r).externalConnections=!0)})):M.debug("Not a cluster ",r,Ve)});for(let r of Ft.keys()){const i=Ft.get(r).id,o=e.parent(i);o!==r&&Ft.has(o)&&!Ft.get(o).externalConnections&&(Ft.get(r).id=o);const s=e.edges().some(a=>a.v===r);if(i&&Ft.get(r)?.externalConnections&&s&&yu(e,i,r)){const a=Ex(e,r,e.parent(i));a&&(Ft.get(r).id=a)}}e.edges().forEach(function(r){const i=e.edge(r);M.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),M.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(e.edge(r)));let o=r.v,s=r.w;if(M.debug("Fix XXX",Ft,"ids:",r.v,r.w,"Translating: ",Ft.get(r.v)," --- ",Ft.get(r.w)),Ft.get(r.v)||Ft.get(r.w)){if(M.debug("Fixing and trying - removing XXX",r.v,r.w,r.name),o=sl(r.v),s=sl(r.w),e.removeEdge(r.v,r.w,r.name),o!==r.v){const a=e.parent(o);Ft.get(a).externalConnections=!0,i.fromCluster=r.v}if(s!==r.w){const a=e.parent(s);Ft.get(a).externalConnections=!0,i.toCluster=r.w}M.debug("Fix Replacing with XXX",o,s,r.name),e.setEdge(o,s,i,r.name)}}),fu(e,0),M.trace(Ft)},"adjustClustersAndEdges"),fu=p((e,t)=>{if(t>10){M.error("Bailing out");return}let r=e.nodes(),i=!1;for(const o of r){const s=e.children(o);i=i||s.length>0}if(!i){M.debug("Done, no node has children",e.nodes());return}M.debug("Nodes = ",r,t);for(const o of r)if(M.debug("Extracting node",o,Ft,Ft.has(o)&&!Ft.get(o).externalConnections,!e.parent(o),e.node(o),e.children("D")," Depth ",t),!Ft.has(o))M.debug("Not a cluster",o,t);else if(!Ft.get(o).externalConnections&&e.children(o)&&e.children(o).length>0){M.debug("Cluster without external connections, without a parent and with children",o,t);let a=e.graph().rankdir==="TB"?"LR":"TB";Ft.get(o)?.clusterData?.dir&&(a=Ft.get(o).clusterData.dir,M.debug("Fixing dir",Ft.get(o).clusterData.dir,a));const n=new ko({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});gu(o,e,n,o),e.setNode(o,{clusterNode:!0,id:o,clusterData:Ft.get(o).clusterData,label:Ft.get(o).label,graph:n})}else M.debug("Cluster ** ",o," **not meeting the criteria !externalConnections:",!Ft.get(o).externalConnections," no parent: ",!e.parent(o)," children ",e.children(o)&&e.children(o).length>0,e.children("D"),t),M.debug(Ft);r=e.nodes(),M.debug("New list of nodes",r);for(const o of r){const s=e.node(o);M.debug(" Now next level",o,s),s?.clusterNode&&fu(s.graph,t+1)}},"extractor"),mu=p((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{const o=e.children(i),s=mu(e,o);r=[...r,...s]}),r},"sorter"),hS=p(e=>mu(e,e.children()),"sortNodesByHierarchy"),yu=p((e,t,r)=>{let i=e.parent(t);for(;i&&i!==r;){const o=Ft.get(i);if(o&&!o.externalConnections)return!0;i=e.parent(i)}return!1},"isNodeInExtractableCluster"),Ex=p((e,t,r)=>{const i=e.children(t)??[];for(const o of i){if(o===r||fi(o,r))continue;const s=so(o,e,t);if(s&&!yu(e,s,t))return s}return null},"findSafeAnchorNode");function Ax({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:i,afterPaint:o,paintOptions:s}){const a=t??xu;return p(async function(l,c,h,d){const u=c.select("g");(h?.insertMarkers??nu)(u,l.markers,l.type,l.diagramId),Cu();const g={element:u,helpers:h,options:d};g.preparedLayout=await e?.(l,g);const m=await a(l,g),y=await r(l,g),C={...g,measure:m};i?await i(l,C,y):await bu(l,C,s),await o?.(l,C,y)},"render")}p(Ax,"createCommonLayoutRenderer");function Cu(){IC(),GC(),WC(),vx()}p(Cu,"clearLayoutRenderState");async function xu(e,{element:t}){return await du(t,e)}p(xu,"defaultMeasureLayout");async function bu(e,t,r={}){const{measure:i}=t,{groups:o}=i;for(const a of r.getNodes?.(e,t)??e.nodes)r.skipNode?.(a,t)||await ku(o,a,t,r);const s=Tu(e.nodes);for(const a of e.edges)wu(a,r)||await Bu(o,a,s,e,r,t)}p(bu,"paintLayoutData");async function ku(e,t,r,i){t.clusterNode?Zn(t):Su(t,r,i)?await eu(e.clusters,t):Zn(t)}p(ku,"paintLayoutNode");function Su(e,t,r){return e.isGroup===!0&&(r.isCluster?.(e,t)??!0)}p(Su,"shouldPaintAsCluster");function Tu(e){const t=new Map;for(const r of e)r?.id&&t.set(r.id,r);return t}p(Tu,"buildNodeLookup");function wu(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}p(wu,"shouldSkipPaintEdge");async function Bu(e,t,r,i,o,s){const a=ou(e.edgePaths,{...t},o.clusterDb??new Map,i.type,Rs(t.start,t,r,s,o),Rs(t.end,t,r,s,o),i.diagramId,vu(t,o));ru(t)&&(Er.has(t.id)||await Aa(e.edgeLabels,t),Lu(t,a))}p(Bu,"paintLayoutEdge");function Rs(e,t,r,i,o){return o.getEdgeNode?.(e,t,i)??(e?r.get(e)??{}:{})}p(Rs,"getRenderedNode");function vu(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}p(vu,"shouldSkipIntersect");function Lu(e,t){const r=t?.updatedPath??t?.originalPath,i=$t(),{subGraphTitleTotalMargin:o}=xo({flowchart:i.flowchart??{}});if(e.label){const s=Er.get(e.id);let a=e.x,n=e.y;if(r){const l=Zt.calcLabelPosition(r);M.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t?.updatedPath&&(a=l.x,n=l.y)}s.attr("transform",`translate(${a}, ${n+o/2})`)}if(e?.startLabelLeft){const s=Rt.get(e.id).startLeft;let a=e?.x,n=e?.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const s=Rt.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const s=Rt.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const s=Rt.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}}p(Lu,"positionRenderedEdgeLabel");function Fu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}p(Fu,"getDefaultExportFromCjs");var Vt={},Oi={},$e={},al;function $r(){if(al)return $e;al=1;function e(a){return typeof a>"u"||a===null}p(e,"isNothing");function t(a){return typeof a=="object"&&a!==null}p(t,"isObject");function r(a){return Array.isArray(a)?a:e(a)?[]:[a]}p(r,"toArray");function i(a,n){if(n){const l=Object.keys(n);for(let c=0,h=l.length;c<h;c+=1){const d=l[c];a[d]=n[d]}}return a}p(i,"extend");function o(a,n){let l="";for(let c=0;c<n;c+=1)l+=a;return l}p(o,"repeat");function s(a){return a===0&&Number.NEGATIVE_INFINITY===1/a}return p(s,"isNegativeZero"),$e.isNothing=e,$e.isObject=t,$e.toArray=r,$e.repeat=o,$e.isNegativeZero=s,$e.extend=i,$e}p($r,"requireCommon");var Ro,nl;function Pr(){if(nl)return Ro;nl=1;function e(r,i){let o="";const s=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(o+='in "'+r.mark.name+'" '),o+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!i&&r.mark.snippet&&(o+=`
277
+
278
+ `+r.mark.snippet),s+" "+o):s}p(e,"formatError");function t(r,i){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=i,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return p(t,"YAMLException2"),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=p(function(i){return this.name+": "+e(this,i)},"toString"),Ro=t,Ro}p(Pr,"requireException");var qo,ll;function Eu(){if(ll)return qo;ll=1;const e=$r();function t(o,s,a,n,l){let c="",h="";const d=Math.floor(l/2)-1;return n-s>d&&(c=" ... ",s=n-d+c.length),a-n>d&&(h=" ...",a=n+d-h.length),{str:c+o.slice(s,a).replace(/\t/g,"→")+h,pos:n-s+c.length}}p(t,"getLine");function r(o,s){return e.repeat(" ",s-o.length)+o}p(r,"padStart");function i(o,s){if(s=Object.create(s||null),!o.buffer)return null;s.maxLength||(s.maxLength=79),typeof s.indent!="number"&&(s.indent=1),typeof s.linesBefore!="number"&&(s.linesBefore=3),typeof s.linesAfter!="number"&&(s.linesAfter=2);const a=/\r?\n|\r|\0/g,n=[0],l=[];let c,h=-1;for(;c=a.exec(o.buffer);)l.push(c.index),n.push(c.index+c[0].length),o.position<=c.index&&h<0&&(h=n.length-2);h<0&&(h=n.length-1);let d="";const u=Math.min(o.line+s.linesAfter,l.length).toString().length,g=s.maxLength-(s.indent+u+3);for(let y=1;y<=s.linesBefore&&!(h-y<0);y++){const C=t(o.buffer,n[h-y],l[h-y],o.position-(n[h]-n[h-y]),g);d=e.repeat(" ",s.indent)+r((o.line-y+1).toString(),u)+" | "+C.str+`
279
+ `+d}const m=t(o.buffer,n[h],l[h],o.position,g);d+=e.repeat(" ",s.indent)+r((o.line+1).toString(),u)+" | "+m.str+`
280
+ `,d+=e.repeat("-",s.indent+u+3+m.pos)+`^
281
+ `;for(let y=1;y<=s.linesAfter&&!(h+y>=l.length);y++){const C=t(o.buffer,n[h+y],l[h+y],o.position-(n[h]-n[h+y]),g);d+=e.repeat(" ",s.indent)+r((o.line+y+1).toString(),u)+" | "+C.str+`
282
+ `}return d.replace(/\n$/,"")}return p(i,"makeSnippet"),qo=i,qo}p(Eu,"requireSnippet");var No,hl;function Jt(){if(hl)return No;hl=1;const e=Pr(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(s){const a={};return s!==null&&Object.keys(s).forEach(function(n){s[n].forEach(function(l){a[String(l)]=n})}),a}p(i,"compileStyleAliases");function o(s,a){if(a=a||{},Object.keys(a).forEach(function(n){if(t.indexOf(n)===-1)throw new e('Unknown option "'+n+'" is met in definition of "'+s+'" YAML type.')}),this.options=a,this.tag=s,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(n){return n},this.instanceOf=a.instanceOf||null,this.predicate=a.predicate||null,this.represent=a.represent||null,this.representName=a.representName||null,this.defaultStyle=a.defaultStyle||null,this.multi=a.multi||!1,this.styleAliases=i(a.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+s+'" YAML type.')}return p(o,"Type2"),No=o,No}p(Jt,"requireType");var Wo,cl;function _a(){if(cl)return Wo;cl=1;const e=Pr(),t=Jt();function r(s,a){const n=[];return s[a].forEach(function(l){let c=n.length;n.forEach(function(h,d){h.tag===l.tag&&h.kind===l.kind&&h.multi===l.multi&&(c=d)}),n[c]=l}),n}p(r,"compileList");function i(){const s={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function a(n){n.multi?(s.multi[n.kind].push(n),s.multi.fallback.push(n)):s[n.kind][n.tag]=s.fallback[n.tag]=n}p(a,"collectType");for(let n=0,l=arguments.length;n<l;n+=1)arguments[n].forEach(a);return s}p(i,"compileMap");function o(s){return this.extend(s)}return p(o,"Schema2"),o.prototype.extend=p(function(a){let n=[],l=[];if(a instanceof t)l.push(a);else if(Array.isArray(a))l=l.concat(a);else if(a&&(Array.isArray(a.implicit)||Array.isArray(a.explicit)))a.implicit&&(n=n.concat(a.implicit)),a.explicit&&(l=l.concat(a.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(h.loadKind&&h.loadKind!=="scalar")throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(h.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const c=Object.create(o.prototype);return c.implicit=(this.implicit||[]).concat(n),c.explicit=(this.explicit||[]).concat(l),c.compiledImplicit=r(c,"implicit"),c.compiledExplicit=r(c,"explicit"),c.compiledTypeMap=i(c.compiledImplicit,c.compiledExplicit),c},"extend"),Wo=o,Wo}p(_a,"requireSchema");var zo,dl;function Ma(){if(dl)return zo;dl=1;const e=Jt();return zo=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(t){return t!==null?t:""},"construct")}),zo}p(Ma,"requireStr");var Ho,ul;function Ia(){if(ul)return Ho;ul=1;const e=Jt();return Ho=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(t){return t!==null?t:[]},"construct")}),Ho}p(Ia,"requireSeq");var Yo,gl;function Oa(){if(gl)return Yo;gl=1;const e=Jt();return Yo=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(t){return t!==null?t:{}},"construct")}),Yo}p(Oa,"requireMap");var jo,pl;function Da(){if(pl)return jo;pl=1;const e=_a();return jo=new e({explicit:[Ma(),Ia(),Oa()]}),jo}p(Da,"requireFailsafe");var Xo,fl;function $a(){if(fl)return Xo;fl=1;const e=Jt();function t(o){if(o===null)return!0;const s=o.length;return s===1&&o==="~"||s===4&&(o==="null"||o==="Null"||o==="NULL")}p(t,"resolveYamlNull");function r(){return null}p(r,"constructYamlNull");function i(o){return o===null}return p(i,"isNull"),Xo=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"}),Xo}p($a,"require_null");var Go,ml;function Pa(){if(ml)return Go;ml=1;const e=Jt();function t(o){if(o===null)return!1;const s=o.length;return s===4&&(o==="true"||o==="True"||o==="TRUE")||s===5&&(o==="false"||o==="False"||o==="FALSE")}p(t,"resolveYamlBoolean");function r(o){return o==="true"||o==="True"||o==="TRUE"}p(r,"constructYamlBoolean");function i(o){return Object.prototype.toString.call(o)==="[object Boolean]"}return p(i,"isBoolean"),Go=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{lowercase:p(function(o){return o?"true":"false"},"lowercase"),uppercase:p(function(o){return o?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(o){return o?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),Go}p(Pa,"requireBool");var Uo,yl;function Ra(){if(yl)return Uo;yl=1;const e=$r(),t=Jt();function r(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}p(r,"isHexCode");function i(c){return c>=48&&c<=55}p(i,"isOctCode");function o(c){return c>=48&&c<=57}p(o,"isDecCode");function s(c){if(c===null)return!1;const h=c.length;let d=0,u=!1;if(!h)return!1;let g=c[d];if((g==="-"||g==="+")&&(g=c[++d]),g==="0"){if(d+1===h)return!0;if(g=c[++d],g==="b"){for(d++;d<h;d++){if(g=c[d],g!=="0"&&g!=="1")return!1;u=!0}return u&&isFinite(a(c))}if(g==="x"){for(d++;d<h;d++){if(!r(c.charCodeAt(d)))return!1;u=!0}return u&&isFinite(a(c))}if(g==="o"){for(d++;d<h;d++){if(!i(c.charCodeAt(d)))return!1;u=!0}return u&&isFinite(a(c))}}for(;d<h;d++){if(!o(c.charCodeAt(d)))return!1;u=!0}return u?isFinite(a(c)):!1}p(s,"resolveYamlInteger");function a(c){let h=c,d=1,u=h[0];if((u==="-"||u==="+")&&(u==="-"&&(d=-1),h=h.slice(1),u=h[0]),h==="0")return 0;if(u==="0"){if(h[1]==="b")return d*parseInt(h.slice(2),2);if(h[1]==="x")return d*parseInt(h.slice(2),16);if(h[1]==="o")return d*parseInt(h.slice(2),8)}return d*parseInt(h,10)}p(a,"parseYamlInteger");function n(c){return a(c)}p(n,"constructYamlInteger");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!e.isNegativeZero(c)}return p(l,"isInteger"),Uo=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:s,construct:n,predicate:l,represent:{binary:p(function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},"binary"),octal:p(function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},"octal"),decimal:p(function(c){return c.toString(10)},"decimal"),hexadecimal:p(function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Uo}p(Ra,"requireInt");var Vo,Cl;function qa(){if(Cl)return Vo;Cl=1;const e=$r(),t=Jt(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function o(c){return c===null||!r.test(c)?!1:isFinite(parseFloat(c,10))?!0:i.test(c)}p(o,"resolveYamlFloat");function s(c){let h=c.toLowerCase();const d=h[0]==="-"?-1:1;return"+-".indexOf(h[0])>=0&&(h=h.slice(1)),h===".inf"?d===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:h===".nan"?NaN:d*parseFloat(h,10)}p(s,"constructYamlFloat");const a=/^[-+]?[0-9]+e/;function n(c,h){if(isNaN(c))switch(h){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(h){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(h){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(c))return"-0.0";const d=c.toString(10);return a.test(d)?d.replace("e",".e"):d}p(n,"representYamlFloat");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||e.isNegativeZero(c))}return p(l,"isFloat"),Vo=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:s,predicate:l,represent:n,defaultStyle:"lowercase"}),Vo}p(qa,"requireFloat");var Ko,xl;function Na(){return xl||(xl=1,Ko=Da().extend({implicit:[$a(),Pa(),Ra(),qa()]})),Ko}p(Na,"requireJson");var Zo,bl;function Wa(){return bl||(bl=1,Zo=Na()),Zo}p(Wa,"requireCore");var Qo,kl;function za(){if(kl)return Qo;kl=1;const e=Jt(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function i(a){return a===null?!1:t.exec(a)!==null||r.exec(a)!==null}p(i,"resolveYamlTimestamp");function o(a){let n=0,l=null,c=t.exec(a);if(c===null&&(c=r.exec(a)),c===null)throw new Error("Date resolve error");const h=+c[1],d=+c[2]-1,u=+c[3];if(!c[4])return new Date(Date.UTC(h,d,u));const g=+c[4],m=+c[5],y=+c[6];if(c[7]){for(n=c[7].slice(0,3);n.length<3;)n+="0";n=+n}if(c[9]){const x=+c[10],b=+(c[11]||0);l=(x*60+b)*6e4,c[9]==="-"&&(l=-l)}const C=new Date(Date.UTC(h,d,u,g,m,y,n));return l&&C.setTime(C.getTime()-l),C}p(o,"constructYamlTimestamp");function s(a){return a.toISOString()}return p(s,"representYamlTimestamp"),Qo=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:o,instanceOf:Date,represent:s}),Qo}p(za,"requireTimestamp");var Jo,Sl;function Ha(){if(Sl)return Jo;Sl=1;const e=Jt();function t(r){return r==="<<"||r===null}return p(t,"resolveYamlMerge"),Jo=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),Jo}p(Ha,"requireMerge");var ts,Tl;function Ya(){if(Tl)return ts;Tl=1;const e=Jt(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
283
+ \r`;function r(a){if(a===null)return!1;let n=0;const l=a.length,c=t;for(let h=0;h<l;h++){const d=c.indexOf(a.charAt(h));if(!(d>64)){if(d<0)return!1;n+=6}}return n%8===0}p(r,"resolveYamlBinary");function i(a){const n=a.replace(/[\r\n=]/g,""),l=n.length,c=t;let h=0;const d=[];for(let g=0;g<l;g++)g%4===0&&g&&(d.push(h>>16&255),d.push(h>>8&255),d.push(h&255)),h=h<<6|c.indexOf(n.charAt(g));const u=l%4*6;return u===0?(d.push(h>>16&255),d.push(h>>8&255),d.push(h&255)):u===18?(d.push(h>>10&255),d.push(h>>2&255)):u===12&&d.push(h>>4&255),new Uint8Array(d)}p(i,"constructYamlBinary");function o(a){let n="",l=0;const c=a.length,h=t;for(let u=0;u<c;u++)u%3===0&&u&&(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]),l=(l<<8)+a[u];const d=c%3;return d===0?(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]):d===2?(n+=h[l>>10&63],n+=h[l>>4&63],n+=h[l<<2&63],n+=h[64]):d===1&&(n+=h[l>>2&63],n+=h[l<<4&63],n+=h[64],n+=h[64]),n}p(o,"representYamlBinary");function s(a){return Object.prototype.toString.call(a)==="[object Uint8Array]"}return p(s,"isBinary"),ts=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:s,represent:o}),ts}p(Ya,"requireBinary");var es,wl;function ja(){if(wl)return es;wl=1;const e=Jt(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(s){if(s===null)return!0;const a=[],n=s;for(let l=0,c=n.length;l<c;l+=1){const h=n[l];let d=!1;if(r.call(h)!=="[object Object]")return!1;let u;for(u in h)if(t.call(h,u))if(!d)d=!0;else return!1;if(!d)return!1;if(a.indexOf(u)===-1)a.push(u);else return!1}return!0}p(i,"resolveYamlOmap");function o(s){return s!==null?s:[]}return p(o,"constructYamlOmap"),es=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:o}),es}p(ja,"requireOmap");var rs,Bl;function Xa(){if(Bl)return rs;Bl=1;const e=Jt(),t=Object.prototype.toString;function r(o){if(o===null)return!0;const s=o,a=new Array(s.length);for(let n=0,l=s.length;n<l;n+=1){const c=s[n];if(t.call(c)!=="[object Object]")return!1;const h=Object.keys(c);if(h.length!==1)return!1;a[n]=[h[0],c[h[0]]]}return!0}p(r,"resolveYamlPairs");function i(o){if(o===null)return[];const s=o,a=new Array(s.length);for(let n=0,l=s.length;n<l;n+=1){const c=s[n],h=Object.keys(c);a[n]=[h[0],c[h[0]]]}return a}return p(i,"constructYamlPairs"),rs=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),rs}p(Xa,"requirePairs");var is,vl;function Ga(){if(vl)return is;vl=1;const e=Jt(),t=Object.prototype.hasOwnProperty;function r(o){if(o===null)return!0;const s=o;for(const a in s)if(t.call(s,a)&&s[a]!==null)return!1;return!0}p(r,"resolveYamlSet");function i(o){return o!==null?o:{}}return p(i,"constructYamlSet"),is=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),is}p(Ga,"requireSet");var os,Ll;function So(){return Ll||(Ll=1,os=Wa().extend({implicit:[za(),Ha()],explicit:[Ya(),ja(),Xa(),Ga()]})),os}p(So,"require_default");var Fl;function Au(){if(Fl)return Oi;Fl=1;const e=$r(),t=Pr(),r=Eu(),i=So(),o=Object.prototype.hasOwnProperty,s=1,a=2,n=3,l=4,c=1,h=2,d=3,u=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,g=/[\x85\u2028\u2029]/,m=/[,\[\]{}]/,y=/^(?:!|!!|![0-9A-Za-z-]+!)$/,C=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function x(f){return Object.prototype.toString.call(f)}p(x,"_class");function b(f){return f===10||f===13}p(b,"isEol");function S(f){return f===9||f===32}p(S,"isWhiteSpace");function B(f){return f===9||f===32||f===10||f===13}p(B,"isWsOrEol");function w(f){return f===44||f===91||f===93||f===123||f===125}p(w,"isFlowIndicator");function v(f){if(f>=48&&f<=57)return f-48;const A=f|32;return A>=97&&A<=102?A-97+10:-1}p(v,"fromHexCode");function F(f){return f===120?2:f===117?4:f===85?8:0}p(F,"escapedHexLen");function L(f){return f>=48&&f<=57?f-48:-1}p(L,"fromDecimalCode");function P(f){switch(f){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
284
+ `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}p(P,"simpleEscapeSequence");function $(f){return f<=65535?String.fromCharCode(f):String.fromCharCode((f-65536>>10)+55296,(f-65536&1023)+56320)}p($,"charFromCodepoint");function N(f,A,H){A==="__proto__"?Object.defineProperty(f,A,{configurable:!0,enumerable:!0,writable:!0,value:H}):f[A]=H}p(N,"setProperty");const J=new Array(256),W=new Array(256);for(let f=0;f<256;f++)J[f]=P(f)?1:0,W[f]=P(f);function z(f,A){this.input=f,this.filename=A.filename||null,this.schema=A.schema||i,this.onWarning=A.onWarning||null,this.legacy=A.legacy||!1,this.json=A.json||!1,this.listener=A.listener||null,this.maxDepth=typeof A.maxDepth=="number"?A.maxDepth:100,this.maxTotalMergeKeys=typeof A.maxTotalMergeKeys=="number"?A.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=f.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}p(z,"State");function G(f,A){const H={name:f.filename,buffer:f.input.slice(0,-1),position:f.position,line:f.line,column:f.position-f.lineStart};return H.snippet=r(H),new t(A,H)}p(G,"generateError");function I(f,A){throw G(f,A)}p(I,"throwError");function R(f,A){f.onWarning&&f.onWarning.call(null,G(f,A))}p(R,"throwWarning");function Y(f,A,H){const U=f.anchorMapTransactions;if(U.length!==0){const q=U[U.length-1];o.call(q,A)||(q[A]={existed:o.call(f.anchorMap,A),value:f.anchorMap[A]})}f.anchorMap[A]=H}p(Y,"storeAnchor");function lt(f){f.anchorMapTransactions.push(Object.create(null))}p(lt,"beginAnchorTransaction");function rt(f){const A=f.anchorMapTransactions.pop(),H=f.anchorMapTransactions;if(H.length===0)return;const U=H[H.length-1],q=Object.keys(A);for(let Q=0,T=q.length;Q<T;Q+=1){const _=q[Q];o.call(U,_)||(U[_]=A[_])}}p(rt,"commitAnchorTransaction");function St(f){const A=f.anchorMapTransactions.pop(),H=Object.keys(A);for(let U=H.length-1;U>=0;U-=1){const q=A[H[U]];q.existed?f.anchorMap[H[U]]=q.value:delete f.anchorMap[H[U]]}}p(St,"rollbackAnchorTransaction");function xt(f){return{position:f.position,line:f.line,lineStart:f.lineStart,lineIndent:f.lineIndent,firstTabInLine:f.firstTabInLine,tag:f.tag,anchor:f.anchor,kind:f.kind,result:f.result}}p(xt,"snapshotState");function vt(f,A){f.position=A.position,f.line=A.line,f.lineStart=A.lineStart,f.lineIndent=A.lineIndent,f.firstTabInLine=A.firstTabInLine,f.tag=A.tag,f.anchor=A.anchor,f.kind=A.kind,f.result=A.result}p(vt,"restoreState");const bt={YAML:p(function(A,H,U){A.version!==null&&I(A,"duplication of %YAML directive"),U.length!==1&&I(A,"YAML directive accepts exactly one argument");const q=/^([0-9]+)\.([0-9]+)$/.exec(U[0]);q===null&&I(A,"ill-formed argument of the YAML directive");const Q=parseInt(q[1],10),T=parseInt(q[2],10);Q!==1&&I(A,"unacceptable YAML version of the document"),A.version=U[0],A.checkLineBreaks=T<2,T!==1&&T!==2&&R(A,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(A,H,U){let q;U.length!==2&&I(A,"TAG directive accepts exactly two arguments");const Q=U[0];q=U[1],y.test(Q)||I(A,"ill-formed tag handle (first argument) of the TAG directive"),o.call(A.tagMap,Q)&&I(A,'there is a previously declared suffix for "'+Q+'" tag handle'),C.test(q)||I(A,"ill-formed tag prefix (second argument) of the TAG directive");try{q=decodeURIComponent(q)}catch{I(A,"tag prefix is malformed: "+q)}A.tagMap[Q]=q},"handleTagDirective")};function Tt(f,A,H,U){if(A<H){const q=f.input.slice(A,H);if(U)for(let Q=0,T=q.length;Q<T;Q+=1){const _=q.charCodeAt(Q);_===9||_>=32&&_<=1114111||I(f,"expected valid JSON character")}else u.test(q)&&I(f,"the stream contains non-printable characters");f.result+=q}}p(Tt,"captureSegment");function ht(f,A,H,U){e.isObject(H)||I(f,"cannot merge mappings; the provided source object is unacceptable");const q=Object.keys(H);for(let Q=0,T=q.length;Q<T;Q+=1){const _=q[Q];f.maxTotalMergeKeys!==-1&&++f.totalMergeKeys>f.maxTotalMergeKeys&&I(f,"merge keys exceeded maxTotalMergeKeys ("+f.maxTotalMergeKeys+")"),o.call(A,_)||(N(A,_,H[_]),U[_]=!0)}}p(ht,"mergeMappings");function Ct(f,A,H,U,q,Q,T,_,K){if(Array.isArray(q)){q=Array.prototype.slice.call(q);for(let j=0,X=q.length;j<X;j+=1)Array.isArray(q[j])&&I(f,"nested arrays are not supported inside keys"),typeof q=="object"&&x(q[j])==="[object Object]"&&(q[j]="[object Object]")}if(typeof q=="object"&&x(q)==="[object Object]"&&(q="[object Object]"),q=String(q),A===null&&(A={}),U==="tag:yaml.org,2002:merge")if(Array.isArray(Q))for(let j=0,X=Q.length;j<X;j+=1)ht(f,A,Q[j],H);else ht(f,A,Q,H);else!f.json&&!o.call(H,q)&&o.call(A,q)&&(f.line=T||f.line,f.lineStart=_||f.lineStart,f.position=K||f.position,I(f,"duplicated mapping key")),N(A,q,Q),delete H[q];return A}p(Ct,"storeMappingPair");function Mt(f){const A=f.input.charCodeAt(f.position);A===10?f.position++:A===13?(f.position++,f.input.charCodeAt(f.position)===10&&f.position++):I(f,"a line break is expected"),f.line+=1,f.lineStart=f.position,f.firstTabInLine=-1}p(Mt,"readLineBreak");function wt(f,A,H){let U=0,q=f.input.charCodeAt(f.position);for(;q!==0;){for(;S(q);)q===9&&f.firstTabInLine===-1&&(f.firstTabInLine=f.position),q=f.input.charCodeAt(++f.position);if(A&&q===35)do q=f.input.charCodeAt(++f.position);while(q!==10&&q!==13&&q!==0);if(b(q))for(Mt(f),q=f.input.charCodeAt(f.position),U++,f.lineIndent=0;q===32;)f.lineIndent++,q=f.input.charCodeAt(++f.position);else break}return H!==-1&&U!==0&&f.lineIndent<H&&R(f,"deficient indentation"),U}p(wt,"skipSeparationSpace");function Ut(f){let A=f.position,H=f.input.charCodeAt(A);return!!((H===45||H===46)&&H===f.input.charCodeAt(A+1)&&H===f.input.charCodeAt(A+2)&&(A+=3,H=f.input.charCodeAt(A),H===0||B(H)))}p(Ut,"testDocumentSeparator");function qt(f,A){A===1?f.result+=" ":A>1&&(f.result+=e.repeat(`
285
+ `,A-1))}p(qt,"writeFoldedLines");function Fe(f,A,H){let U,q,Q,T,_,K;const j=f.kind,X=f.result;let Z=f.input.charCodeAt(f.position);if(B(Z)||w(Z)||Z===35||Z===38||Z===42||Z===33||Z===124||Z===62||Z===39||Z===34||Z===37||Z===64||Z===96)return!1;if(Z===63||Z===45){const V=f.input.charCodeAt(f.position+1);if(B(V)||H&&w(V))return!1}for(f.kind="scalar",f.result="",U=q=f.position,Q=!1;Z!==0;){if(Z===58){const V=f.input.charCodeAt(f.position+1);if(B(V)||H&&w(V))break}else if(Z===35){const V=f.input.charCodeAt(f.position-1);if(B(V))break}else{if(f.position===f.lineStart&&Ut(f)||H&&w(Z))break;if(b(Z))if(T=f.line,_=f.lineStart,K=f.lineIndent,wt(f,!1,-1),f.lineIndent>=A){Q=!0,Z=f.input.charCodeAt(f.position);continue}else{f.position=q,f.line=T,f.lineStart=_,f.lineIndent=K;break}}Q&&(Tt(f,U,q,!1),qt(f,f.line-T),U=q=f.position,Q=!1),S(Z)||(q=f.position+1),Z=f.input.charCodeAt(++f.position)}return Tt(f,U,q,!1),f.result?!0:(f.kind=j,f.result=X,!1)}p(Fe,"readPlainScalar");function hr(f,A){let H,U,q=f.input.charCodeAt(f.position);if(q!==39)return!1;for(f.kind="scalar",f.result="",f.position++,H=U=f.position;(q=f.input.charCodeAt(f.position))!==0;)if(q===39)if(Tt(f,H,f.position,!0),q=f.input.charCodeAt(++f.position),q===39)H=f.position,f.position++,U=f.position;else return!0;else b(q)?(Tt(f,H,U,!0),qt(f,wt(f,!1,A)),H=U=f.position):f.position===f.lineStart&&Ut(f)?I(f,"unexpected end of the document within a single quoted scalar"):(f.position++,S(q)||(U=f.position));I(f,"unexpected end of the stream within a single quoted scalar")}p(hr,"readSingleQuotedScalar");function Ce(f,A){let H,U,q,Q=f.input.charCodeAt(f.position);if(Q!==34)return!1;for(f.kind="scalar",f.result="",f.position++,H=U=f.position;(Q=f.input.charCodeAt(f.position))!==0;){if(Q===34)return Tt(f,H,f.position,!0),f.position++,!0;if(Q===92){if(Tt(f,H,f.position,!0),Q=f.input.charCodeAt(++f.position),b(Q))wt(f,!1,A);else if(Q<256&&J[Q])f.result+=W[Q],f.position++;else if((q=F(Q))>0){let T=q,_=0;for(;T>0;T--)Q=f.input.charCodeAt(++f.position),(q=v(Q))>=0?_=(_<<4)+q:I(f,"expected hexadecimal character");f.result+=$(_),f.position++}else I(f,"unknown escape sequence");H=U=f.position}else b(Q)?(Tt(f,H,U,!0),qt(f,wt(f,!1,A)),H=U=f.position):f.position===f.lineStart&&Ut(f)?I(f,"unexpected end of the document within a double quoted scalar"):(f.position++,S(Q)||(U=f.position))}I(f,"unexpected end of the stream within a double quoted scalar")}p(Ce,"readDoubleQuotedScalar");function qr(f,A){let H=!0,U,q,Q;const T=f.tag;let _;const K=f.anchor;let j,X,Z,V;const nt=Object.create(null);let ot,ut,gt,Lt=f.input.charCodeAt(f.position);if(Lt===91)j=93,V=!1,_=[];else if(Lt===123)j=125,V=!0,_={};else return!1;for(f.anchor!==null&&Y(f,f.anchor,_),Lt=f.input.charCodeAt(++f.position);Lt!==0;){if(wt(f,!0,A),Lt=f.input.charCodeAt(f.position),Lt===j)return f.position++,f.tag=T,f.anchor=K,f.kind=V?"mapping":"sequence",f.result=_,!0;if(H?Lt===44&&I(f,"expected the node content, but found ','"):I(f,"missed comma between flow collection entries"),ut=ot=gt=null,X=Z=!1,Lt===63){const Ot=f.input.charCodeAt(f.position+1);B(Ot)&&(X=Z=!0,f.position++,wt(f,!0,A))}U=f.line,q=f.lineStart,Q=f.position,ue(f,A,s,!1,!0),ut=f.tag,ot=f.result,wt(f,!0,A),Lt=f.input.charCodeAt(f.position),(Z||f.line===U)&&Lt===58&&(X=!0,Lt=f.input.charCodeAt(++f.position),wt(f,!0,A),ue(f,A,s,!1,!0),gt=f.result),V?Ct(f,_,nt,ut,ot,gt,U,q,Q):X?_.push(Ct(f,null,nt,ut,ot,gt,U,q,Q)):_.push(ot),wt(f,!0,A),Lt=f.input.charCodeAt(f.position),Lt===44?(H=!0,Lt=f.input.charCodeAt(++f.position)):H=!1}I(f,"unexpected end of the stream within a flow collection")}p(qr,"readFlowCollection");function Nr(f,A){let H,U=c,q=!1,Q=!1,T=A,_=0,K=!1,j,X=f.input.charCodeAt(f.position);if(X===124)H=!1;else if(X===62)H=!0;else return!1;for(f.kind="scalar",f.result="";X!==0;)if(X=f.input.charCodeAt(++f.position),X===43||X===45)c===U?U=X===43?d:h:I(f,"repeat of a chomping mode identifier");else if((j=L(X))>=0)j===0?I(f,"bad explicit indentation width of a block scalar; it cannot be less than one"):Q?I(f,"repeat of an indentation width identifier"):(T=A+j-1,Q=!0);else break;if(S(X)){do X=f.input.charCodeAt(++f.position);while(S(X));if(X===35)do X=f.input.charCodeAt(++f.position);while(!b(X)&&X!==0)}for(;X!==0;){for(Mt(f),f.lineIndent=0,X=f.input.charCodeAt(f.position);(!Q||f.lineIndent<T)&&X===32;)f.lineIndent++,X=f.input.charCodeAt(++f.position);if(!Q&&f.lineIndent>T&&(T=f.lineIndent),b(X)){_++;continue}if(!Q&&T===0&&I(f,"missing indentation for block scalar"),f.lineIndent<T){U===d?f.result+=e.repeat(`
286
+ `,q?1+_:_):U===c&&q&&(f.result+=`
287
+ `);break}H?S(X)?(K=!0,f.result+=e.repeat(`
288
+ `,q?1+_:_)):K?(K=!1,f.result+=e.repeat(`
289
+ `,_+1)):_===0?q&&(f.result+=" "):f.result+=e.repeat(`
290
+ `,_):f.result+=e.repeat(`
291
+ `,q?1+_:_),q=!0,Q=!0,_=0;const Z=f.position;for(;!b(X)&&X!==0;)X=f.input.charCodeAt(++f.position);Tt(f,Z,f.position,!1)}return!0}p(Nr,"readBlockScalar");function xe(f,A){const H=f.tag,U=f.anchor,q=[];let Q=!1;if(f.firstTabInLine!==-1)return!1;f.anchor!==null&&Y(f,f.anchor,q);let T=f.input.charCodeAt(f.position);for(;T!==0&&(f.firstTabInLine!==-1&&(f.position=f.firstTabInLine,I(f,"tab characters must not be used in indentation")),T===45);){const _=f.input.charCodeAt(f.position+1);if(!B(_))break;if(Q=!0,f.position++,wt(f,!0,-1)&&f.lineIndent<=A){q.push(null),T=f.input.charCodeAt(f.position);continue}const K=f.line;if(ue(f,A,n,!1,!0),q.push(f.result),wt(f,!0,-1),T=f.input.charCodeAt(f.position),(f.line===K||f.lineIndent>A)&&T!==0)I(f,"bad indentation of a sequence entry");else if(f.lineIndent<A)break}return Q?(f.tag=H,f.anchor=U,f.kind="sequence",f.result=q,!0):!1}p(xe,"readBlockSequence");function cr(f,A,H){let U,q,Q,T;const _=f.tag,K=f.anchor,j={},X=Object.create(null);let Z=null,V=null,nt=null,ot=!1,ut=!1;if(f.firstTabInLine!==-1)return!1;f.anchor!==null&&Y(f,f.anchor,j);let gt=f.input.charCodeAt(f.position);for(;gt!==0;){!ot&&f.firstTabInLine!==-1&&(f.position=f.firstTabInLine,I(f,"tab characters must not be used in indentation"));const Lt=f.input.charCodeAt(f.position+1),Ot=f.line;if((gt===63||gt===58)&&B(Lt))gt===63?(ot&&(Ct(f,j,X,Z,V,null,q,Q,T),Z=V=nt=null),ut=!0,ot=!0,U=!0):ot?(ot=!1,U=!0):I(f,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),f.position+=1,gt=Lt;else{if(q=f.line,Q=f.lineStart,T=f.position,!ue(f,H,a,!1,!0))break;if(f.line===Ot){for(gt=f.input.charCodeAt(f.position);S(gt);)gt=f.input.charCodeAt(++f.position);if(gt===58)gt=f.input.charCodeAt(++f.position),B(gt)||I(f,"a whitespace character is expected after the key-value separator within a block mapping"),ot&&(Ct(f,j,X,Z,V,null,q,Q,T),Z=V=nt=null),ut=!0,ot=!1,U=!1,Z=f.tag,V=f.result;else if(ut)I(f,"can not read an implicit mapping pair; a colon is missed");else return f.tag=_,f.anchor=K,!0}else if(ut)I(f,"can not read a block mapping entry; a multiline key may not be an implicit key");else return f.tag=_,f.anchor=K,!0}if((f.line===Ot||f.lineIndent>A)&&(ot&&(q=f.line,Q=f.lineStart,T=f.position),ue(f,A,l,!0,U)&&(ot?V=f.result:nt=f.result),ot||(Ct(f,j,X,Z,V,nt,q,Q,T),Z=V=nt=null),wt(f,!0,-1),gt=f.input.charCodeAt(f.position)),(f.line===Ot||f.lineIndent>A)&&gt!==0)I(f,"bad indentation of a mapping entry");else if(f.lineIndent<A)break}return ot&&Ct(f,j,X,Z,V,null,q,Q,T),ut&&(f.tag=_,f.anchor=K,f.kind="mapping",f.result=j),ut}p(cr,"readBlockMapping");function Wr(f){let A=!1,H=!1,U,q,Q=f.input.charCodeAt(f.position);if(Q!==33)return!1;f.tag!==null&&I(f,"duplication of a tag property"),Q=f.input.charCodeAt(++f.position),Q===60?(A=!0,Q=f.input.charCodeAt(++f.position)):Q===33?(H=!0,U="!!",Q=f.input.charCodeAt(++f.position)):U="!";let T=f.position;if(A){do Q=f.input.charCodeAt(++f.position);while(Q!==0&&Q!==62);f.position<f.length?(q=f.input.slice(T,f.position),Q=f.input.charCodeAt(++f.position)):I(f,"unexpected end of the stream within a verbatim tag")}else{for(;Q!==0&&!B(Q);)Q===33&&(H?I(f,"tag suffix cannot contain exclamation marks"):(U=f.input.slice(T-1,f.position+1),y.test(U)||I(f,"named tag handle cannot contain such characters"),H=!0,T=f.position+1)),Q=f.input.charCodeAt(++f.position);q=f.input.slice(T,f.position),m.test(q)&&I(f,"tag suffix cannot contain flow indicator characters")}q&&!C.test(q)&&I(f,"tag name cannot contain such characters: "+q);try{q=decodeURIComponent(q)}catch{I(f,"tag name is malformed: "+q)}return A?f.tag=q:o.call(f.tagMap,U)?f.tag=f.tagMap[U]+q:U==="!"?f.tag="!"+q:U==="!!"?f.tag="tag:yaml.org,2002:"+q:I(f,'undeclared tag handle "'+U+'"'),!0}p(Wr,"readTagProperty");function dr(f){let A=f.input.charCodeAt(f.position);if(A!==38)return!1;f.anchor!==null&&I(f,"duplication of an anchor property"),A=f.input.charCodeAt(++f.position);const H=f.position;for(;A!==0&&!B(A)&&!w(A);)A=f.input.charCodeAt(++f.position);return f.position===H&&I(f,"name of an anchor node must contain at least one character"),f.anchor=f.input.slice(H,f.position),!0}p(dr,"readAnchorProperty");function ur(f){let A=f.input.charCodeAt(f.position);if(A!==42)return!1;A=f.input.charCodeAt(++f.position);const H=f.position;for(;A!==0&&!B(A)&&!w(A);)A=f.input.charCodeAt(++f.position);f.position===H&&I(f,"name of an alias node must contain at least one character");const U=f.input.slice(H,f.position);return o.call(f.anchorMap,U)||I(f,'unidentified alias "'+U+'"'),f.result=f.anchorMap[U],wt(f,!0,-1),!0}p(ur,"readAlias");function zr(f,A,H,U){const q=xt(f);return lt(f),vt(f,A),f.tag=null,f.anchor=null,f.kind=null,f.result=null,cr(f,H,U)&&f.kind==="mapping"?(rt(f),!0):(St(f),vt(f,q),!1)}p(zr,"tryReadBlockMappingFromProperty");function ue(f,A,H,U,q){let Q,T,_=1,K=!1,j=!1,X=null,Z,V,nt;f.depth>=f.maxDepth&&I(f,"nesting exceeded maxDepth ("+f.maxDepth+")"),f.depth+=1,f.listener!==null&&f.listener("open",f),f.tag=null,f.anchor=null,f.kind=null,f.result=null;const ot=Q=T=l===H||n===H;if(U&&wt(f,!0,-1)&&(K=!0,f.lineIndent>A?_=1:f.lineIndent===A?_=0:f.lineIndent<A&&(_=-1)),_===1)for(;;){const ut=f.input.charCodeAt(f.position),gt=xt(f);if(K&&(ut===33&&f.tag!==null||ut===38&&f.anchor!==null)||!Wr(f)&&!dr(f))break;X===null&&(X=gt),wt(f,!0,-1)?(K=!0,T=ot,f.lineIndent>A?_=1:f.lineIndent===A?_=0:f.lineIndent<A&&(_=-1)):T=!1}if(T&&(T=K||q),_===1||l===H)if(s===H||a===H?V=A:V=A+1,nt=f.position-f.lineStart,_===1)if(T&&(xe(f,nt)||cr(f,nt,V))||qr(f,V))j=!0;else{const ut=f.input.charCodeAt(f.position);X!==null&&ot&&!T&&ut!==124&&ut!==62&&zr(f,X,X.position-X.lineStart,V)||Q&&Nr(f,V)||hr(f,V)||Ce(f,V)?j=!0:ur(f)?(j=!0,(f.tag!==null||f.anchor!==null)&&I(f,"alias node should not have any properties")):Fe(f,V,s===H)&&(j=!0,f.tag===null&&(f.tag="?")),f.anchor!==null&&Y(f,f.anchor,f.result)}else _===0&&(j=T&&xe(f,nt));if(f.tag===null)f.anchor!==null&&Y(f,f.anchor,f.result);else if(f.tag==="?"){f.result!==null&&f.kind!=="scalar"&&I(f,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+f.kind+'"');for(let ut=0,gt=f.implicitTypes.length;ut<gt;ut+=1)if(Z=f.implicitTypes[ut],Z.resolve(f.result)){f.result=Z.construct(f.result),f.tag=Z.tag,f.anchor!==null&&Y(f,f.anchor,f.result);break}}else if(f.tag!=="!"){if(o.call(f.typeMap[f.kind||"fallback"],f.tag))Z=f.typeMap[f.kind||"fallback"][f.tag];else{Z=null;const ut=f.typeMap.multi[f.kind||"fallback"];for(let gt=0,Lt=ut.length;gt<Lt;gt+=1)if(f.tag.slice(0,ut[gt].tag.length)===ut[gt].tag){Z=ut[gt];break}}Z||I(f,"unknown tag !<"+f.tag+">"),f.result!==null&&Z.kind!==f.kind&&I(f,"unacceptable node kind for !<"+f.tag+'> tag; it should be "'+Z.kind+'", not "'+f.kind+'"'),Z.resolve(f.result,f.tag)?(f.result=Z.construct(f.result,f.tag),f.anchor!==null&&Y(f,f.anchor,f.result)):I(f,"cannot resolve a node with !<"+f.tag+"> explicit tag")}return f.listener!==null&&f.listener("close",f),f.depth-=1,f.tag!==null||f.anchor!==null||j}p(ue,"composeNode");function Hr(f){const A=f.position;let H=!1,U;for(f.version=null,f.checkLineBreaks=f.legacy,f.tagMap=Object.create(null),f.anchorMap=Object.create(null);(U=f.input.charCodeAt(f.position))!==0&&(wt(f,!0,-1),U=f.input.charCodeAt(f.position),!(f.lineIndent>0||U!==37));){H=!0,U=f.input.charCodeAt(++f.position);let q=f.position;for(;U!==0&&!B(U);)U=f.input.charCodeAt(++f.position);const Q=f.input.slice(q,f.position),T=[];for(Q.length<1&&I(f,"directive name must not be less than one character in length");U!==0;){for(;S(U);)U=f.input.charCodeAt(++f.position);if(U===35){do U=f.input.charCodeAt(++f.position);while(U!==0&&!b(U));break}if(b(U))break;for(q=f.position;U!==0&&!B(U);)U=f.input.charCodeAt(++f.position);T.push(f.input.slice(q,f.position))}U!==0&&Mt(f),o.call(bt,Q)?bt[Q](f,Q,T):R(f,'unknown document directive "'+Q+'"')}if(wt(f,!0,-1),f.lineIndent===0&&f.input.charCodeAt(f.position)===45&&f.input.charCodeAt(f.position+1)===45&&f.input.charCodeAt(f.position+2)===45?(f.position+=3,wt(f,!0,-1)):H&&I(f,"directives end mark is expected"),ue(f,f.lineIndent-1,l,!1,!0),wt(f,!0,-1),f.checkLineBreaks&&g.test(f.input.slice(A,f.position))&&R(f,"non-ASCII line breaks are interpreted as content"),f.documents.push(f.result),f.position===f.lineStart&&Ut(f)){f.input.charCodeAt(f.position)===46&&(f.position+=3,wt(f,!0,-1));return}f.position<f.length-1&&I(f,"end of the stream or a document separator is expected")}p(Hr,"readDocument");function gr(f,A){f=String(f),A=A||{},f.length!==0&&(f.charCodeAt(f.length-1)!==10&&f.charCodeAt(f.length-1)!==13&&(f+=`
292
+ `),f.charCodeAt(0)===65279&&(f=f.slice(1)));const H=new z(f,A),U=f.indexOf("\0");for(U!==-1&&(H.position=U,I(H,"null byte is not allowed in input")),H.input+="\0";H.input.charCodeAt(H.position)===32;)H.lineIndent+=1,H.position+=1;for(;H.position<H.length-1;)Hr(H);return H.documents}p(gr,"loadDocuments");function pr(f,A,H){A!==null&&typeof A=="object"&&typeof H>"u"&&(H=A,A=null);const U=gr(f,H);if(typeof A!="function")return U;for(let q=0,Q=U.length;q<Q;q+=1)A(U[q])}p(pr,"loadAll2");function Yr(f,A){const H=gr(f,A);if(H.length!==0){if(H.length===1)return H[0];throw new t("expected a single document in the stream, but found more")}}return p(Yr,"load2"),Oi.loadAll=pr,Oi.load=Yr,Oi}p(Au,"requireLoader");var ss={},El;function _u(){if(El)return ss;El=1;const e=$r(),t=Pr(),r=So(),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty,s=65279,a=9,n=10,l=13,c=32,h=33,d=34,u=35,g=37,m=38,y=39,C=42,x=44,b=45,S=58,B=61,w=62,v=63,F=64,L=91,P=93,$=96,N=123,J=124,W=125,z={};z[0]="\\0",z[7]="\\a",z[8]="\\b",z[9]="\\t",z[10]="\\n",z[11]="\\v",z[12]="\\f",z[13]="\\r",z[27]="\\e",z[34]='\\"',z[92]="\\\\",z[133]="\\N",z[160]="\\_",z[8232]="\\L",z[8233]="\\P";const G=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],I=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function R(T,_){if(_===null)return{};const K={},j=Object.keys(_);for(let X=0,Z=j.length;X<Z;X+=1){let V=j[X],nt=String(_[V]);V.slice(0,2)==="!!"&&(V="tag:yaml.org,2002:"+V.slice(2));const ot=T.compiledTypeMap.fallback[V];ot&&o.call(ot.styleAliases,nt)&&(nt=ot.styleAliases[nt]),K[V]=nt}return K}p(R,"compileStyleMap");function Y(T){let _,K;const j=T.toString(16).toUpperCase();if(T<=255)_="x",K=2;else if(T<=65535)_="u",K=4;else if(T<=4294967295)_="U",K=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+_+e.repeat("0",K-j.length)+j}p(Y,"encodeHex");const lt=1,rt=2;function St(T){this.schema=T.schema||r,this.indent=Math.max(1,T.indent||2),this.noArrayIndent=T.noArrayIndent||!1,this.skipInvalid=T.skipInvalid||!1,this.flowLevel=e.isNothing(T.flowLevel)?-1:T.flowLevel,this.styleMap=R(this.schema,T.styles||null),this.sortKeys=T.sortKeys||!1,this.lineWidth=T.lineWidth||80,this.noRefs=T.noRefs||!1,this.noCompatMode=T.noCompatMode||!1,this.condenseFlow=T.condenseFlow||!1,this.quotingType=T.quotingType==='"'?rt:lt,this.forceQuotes=T.forceQuotes||!1,this.replacer=typeof T.replacer=="function"?T.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(St,"State");function xt(T,_){const K=e.repeat(" ",_);let j=0,X="";const Z=T.length;for(;j<Z;){let V;const nt=T.indexOf(`
293
+ `,j);nt===-1?(V=T.slice(j),j=Z):(V=T.slice(j,nt+1),j=nt+1),V.length&&V!==`
294
+ `&&(X+=K),X+=V}return X}p(xt,"indentString");function vt(T,_){return`
295
+ `+e.repeat(" ",T.indent*_)}p(vt,"generateNextLine");function bt(T,_){for(let K=0,j=T.implicitTypes.length;K<j;K+=1)if(T.implicitTypes[K].resolve(_))return!0;return!1}p(bt,"testImplicitResolving");function Tt(T){return T===c||T===a}p(Tt,"isWhitespace");function ht(T){return T>=32&&T<=126||T>=161&&T<=55295&&T!==8232&&T!==8233||T>=57344&&T<=65533&&T!==s||T>=65536&&T<=1114111}p(ht,"isPrintable");function Ct(T){return ht(T)&&T!==s&&T!==l&&T!==n}p(Ct,"isNsCharOrWhitespace");function Mt(T,_,K){const j=Ct(T),X=j&&!Tt(T);return(K?j:j&&T!==x&&T!==L&&T!==P&&T!==N&&T!==W)&&T!==u&&!(_===S&&!X)||Ct(_)&&!Tt(_)&&T===u||_===S&&X}p(Mt,"isPlainSafe");function wt(T){return ht(T)&&T!==s&&!Tt(T)&&T!==b&&T!==v&&T!==S&&T!==x&&T!==L&&T!==P&&T!==N&&T!==W&&T!==u&&T!==m&&T!==C&&T!==h&&T!==J&&T!==B&&T!==w&&T!==y&&T!==d&&T!==g&&T!==F&&T!==$}p(wt,"isPlainSafeFirst");function Ut(T){return!Tt(T)&&T!==S}p(Ut,"isPlainSafeLast");function qt(T,_){const K=T.charCodeAt(_);let j;return K>=55296&&K<=56319&&_+1<T.length&&(j=T.charCodeAt(_+1),j>=56320&&j<=57343)?(K-55296)*1024+j-56320+65536:K}p(qt,"codePointAt");function Fe(T){return/^\n* /.test(T)}p(Fe,"needIndentIndicator");const hr=1,Ce=2,qr=3,Nr=4,xe=5;function cr(T,_,K,j,X,Z,V,nt){let ot,ut=0,gt=null,Lt=!1,Ot=!1;const sn=j!==-1;let jr=-1,Xr=wt(qt(T,0))&&Ut(qt(T,T.length-1));if(_||V)for(ot=0;ot<T.length;ut>=65536?ot+=2:ot++){if(ut=qt(T,ot),!ht(ut))return xe;Xr=Xr&&Mt(ut,gt,nt),gt=ut}else{for(ot=0;ot<T.length;ut>=65536?ot+=2:ot++){if(ut=qt(T,ot),ut===n)Lt=!0,sn&&(Ot=Ot||ot-jr-1>j&&T[jr+1]!==" ",jr=ot);else if(!ht(ut))return xe;Xr=Xr&&Mt(ut,gt,nt),gt=ut}Ot=Ot||sn&&ot-jr-1>j&&T[jr+1]!==" "}return!Lt&&!Ot?Xr&&!V&&!X(T)?hr:Z===rt?xe:Ce:K>9&&Fe(T)?xe:V?Z===rt?xe:Ce:Ot?Nr:qr}p(cr,"chooseScalarStyle");function Wr(T,_,K,j,X){T.dump=(function(){if(_.length===0)return T.quotingType===rt?'""':"''";if(!T.noCompatMode&&(G.indexOf(_)!==-1||I.test(_)))return T.quotingType===rt?'"'+_+'"':"'"+_+"'";const Z=T.indent*Math.max(1,K),V=T.lineWidth===-1?-1:Math.max(Math.min(T.lineWidth,40),T.lineWidth-Z),nt=j||T.flowLevel>-1&&K>=T.flowLevel;function ot(ut){return bt(T,ut)}switch(p(ot,"testAmbiguity"),cr(_,nt,T.indent,V,ot,T.quotingType,T.forceQuotes&&!j,X)){case hr:return _;case Ce:return"'"+_.replace(/'/g,"''")+"'";case qr:return"|"+dr(_,T.indent)+ur(xt(_,Z));case Nr:return">"+dr(_,T.indent)+ur(xt(zr(_,V),Z));case xe:return'"'+Hr(_)+'"';default:throw new t("impossible error: invalid scalar style")}})()}p(Wr,"writeScalar");function dr(T,_){const K=Fe(T)?String(_):"",j=T[T.length-1]===`
296
+ `,Z=j&&(T[T.length-2]===`
297
+ `||T===`
298
+ `)?"+":j?"":"-";return K+Z+`
299
+ `}p(dr,"blockHeader");function ur(T){return T[T.length-1]===`
300
+ `?T.slice(0,-1):T}p(ur,"dropEndingNewline");function zr(T,_){const K=/(\n+)([^\n]*)/g;let j=(function(){let nt=T.indexOf(`
301
+ `);return nt=nt!==-1?nt:T.length,K.lastIndex=nt,ue(T.slice(0,nt),_)})(),X=T[0]===`
302
+ `||T[0]===" ",Z,V;for(;V=K.exec(T);){const nt=V[1],ot=V[2];Z=ot[0]===" ",j+=nt+(!X&&!Z&&ot!==""?`
303
+ `:"")+ue(ot,_),X=Z}return j}p(zr,"foldString");function ue(T,_){if(T===""||T[0]===" ")return T;const K=/ [^ ]/g;let j,X=0,Z,V=0,nt=0,ot="";for(;j=K.exec(T);)nt=j.index,nt-X>_&&(Z=V>X?V:nt,ot+=`
304
+ `+T.slice(X,Z),X=Z+1),V=nt;return ot+=`
305
+ `,T.length-X>_&&V>X?ot+=T.slice(X,V)+`
306
+ `+T.slice(V+1):ot+=T.slice(X),ot.slice(1)}p(ue,"foldLine");function Hr(T){let _="",K=0;for(let j=0;j<T.length;K>=65536?j+=2:j++){K=qt(T,j);const X=z[K];!X&&ht(K)?(_+=T[j],K>=65536&&(_+=T[j+1])):_+=X||Y(K)}return _}p(Hr,"escapeString");function gr(T,_,K){let j="";const X=T.tag;for(let Z=0,V=K.length;Z<V;Z+=1){let nt=K[Z];T.replacer&&(nt=T.replacer.call(K,String(Z),nt)),(H(T,_,nt,!1,!1)||typeof nt>"u"&&H(T,_,null,!1,!1))&&(j!==""&&(j+=","+(T.condenseFlow?"":" ")),j+=T.dump)}T.tag=X,T.dump="["+j+"]"}p(gr,"writeFlowSequence");function pr(T,_,K,j){let X="";const Z=T.tag;for(let V=0,nt=K.length;V<nt;V+=1){let ot=K[V];T.replacer&&(ot=T.replacer.call(K,String(V),ot)),(H(T,_+1,ot,!0,!0,!1,!0)||typeof ot>"u"&&H(T,_+1,null,!0,!0,!1,!0))&&((!j||X!=="")&&(X+=vt(T,_)),T.dump&&n===T.dump.charCodeAt(0)?X+="-":X+="- ",X+=T.dump)}T.tag=Z,T.dump=X||"[]"}p(pr,"writeBlockSequence");function Yr(T,_,K){let j="";const X=T.tag,Z=Object.keys(K);for(let V=0,nt=Z.length;V<nt;V+=1){let ot="";j!==""&&(ot+=", "),T.condenseFlow&&(ot+='"');const ut=Z[V];let gt=K[ut];T.replacer&&(gt=T.replacer.call(K,ut,gt)),H(T,_,ut,!1,!1)&&(T.dump.length>1024&&(ot+="? "),ot+=T.dump+(T.condenseFlow?'"':"")+":"+(T.condenseFlow?"":" "),H(T,_,gt,!1,!1)&&(ot+=T.dump,j+=ot))}T.tag=X,T.dump="{"+j+"}"}p(Yr,"writeFlowMapping");function f(T,_,K,j){let X="";const Z=T.tag,V=Object.keys(K);if(T.sortKeys===!0)V.sort();else if(typeof T.sortKeys=="function")V.sort(T.sortKeys);else if(T.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let nt=0,ot=V.length;nt<ot;nt+=1){let ut="";(!j||X!=="")&&(ut+=vt(T,_));const gt=V[nt];let Lt=K[gt];if(T.replacer&&(Lt=T.replacer.call(K,gt,Lt)),!H(T,_+1,gt,!0,!0,!0))continue;const Ot=T.tag!==null&&T.tag!=="?"||T.dump&&T.dump.length>1024;Ot&&(T.dump&&n===T.dump.charCodeAt(0)?ut+="?":ut+="? "),ut+=T.dump,Ot&&(ut+=vt(T,_)),H(T,_+1,Lt,!0,Ot)&&(T.dump&&n===T.dump.charCodeAt(0)?ut+=":":ut+=": ",ut+=T.dump,X+=ut)}T.tag=Z,T.dump=X||"{}"}p(f,"writeBlockMapping");function A(T,_,K){const j=K?T.explicitTypes:T.implicitTypes;for(let X=0,Z=j.length;X<Z;X+=1){const V=j[X];if((V.instanceOf||V.predicate)&&(!V.instanceOf||typeof _=="object"&&_ instanceof V.instanceOf)&&(!V.predicate||V.predicate(_))){if(K?V.multi&&V.representName?T.tag=V.representName(_):T.tag=V.tag:T.tag="?",V.represent){const nt=T.styleMap[V.tag]||V.defaultStyle;let ot;if(i.call(V.represent)==="[object Function]")ot=V.represent(_,nt);else if(o.call(V.represent,nt))ot=V.represent[nt](_,nt);else throw new t("!<"+V.tag+'> tag resolver accepts not "'+nt+'" style');T.dump=ot}return!0}}return!1}p(A,"detectType");function H(T,_,K,j,X,Z,V){T.tag=null,T.dump=K,A(T,K,!1)||A(T,K,!0);const nt=i.call(T.dump),ot=j;j&&(j=T.flowLevel<0||T.flowLevel>_);const ut=nt==="[object Object]"||nt==="[object Array]";let gt,Lt;if(ut&&(gt=T.duplicates.indexOf(K),Lt=gt!==-1),(T.tag!==null&&T.tag!=="?"||Lt||T.indent!==2&&_>0)&&(X=!1),Lt&&T.usedDuplicates[gt])T.dump="*ref_"+gt;else{if(ut&&Lt&&!T.usedDuplicates[gt]&&(T.usedDuplicates[gt]=!0),nt==="[object Object]")j&&Object.keys(T.dump).length!==0?(f(T,_,T.dump,X),Lt&&(T.dump="&ref_"+gt+T.dump)):(Yr(T,_,T.dump),Lt&&(T.dump="&ref_"+gt+" "+T.dump));else if(nt==="[object Array]")j&&T.dump.length!==0?(T.noArrayIndent&&!V&&_>0?pr(T,_-1,T.dump,X):pr(T,_,T.dump,X),Lt&&(T.dump="&ref_"+gt+T.dump)):(gr(T,_,T.dump),Lt&&(T.dump="&ref_"+gt+" "+T.dump));else if(nt==="[object String]")T.tag!=="?"&&Wr(T,T.dump,_,Z,ot);else{if(nt==="[object Undefined]")return!1;if(T.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+nt)}if(T.tag!==null&&T.tag!=="?"){let Ot=encodeURI(T.tag[0]==="!"?T.tag.slice(1):T.tag).replace(/!/g,"%21");T.tag[0]==="!"?Ot="!"+Ot:Ot.slice(0,18)==="tag:yaml.org,2002:"?Ot="!!"+Ot.slice(18):Ot="!<"+Ot+">",T.dump=Ot+" "+T.dump}}return!0}p(H,"writeNode");function U(T,_){const K=[],j=[];q(T,K,j);const X=j.length;for(let Z=0;Z<X;Z+=1)_.duplicates.push(K[j[Z]]);_.usedDuplicates=new Array(X)}p(U,"getDuplicateReferences");function q(T,_,K){if(T!==null&&typeof T=="object"){const j=_.indexOf(T);if(j!==-1)K.indexOf(j)===-1&&K.push(j);else if(_.push(T),Array.isArray(T))for(let X=0,Z=T.length;X<Z;X+=1)q(T[X],_,K);else{const X=Object.keys(T);for(let Z=0,V=X.length;Z<V;Z+=1)q(T[X[Z]],_,K)}}}p(q,"inspectNode");function Q(T,_){_=_||{};const K=new St(_);K.noRefs||U(T,K);let j=T;return K.replacer&&(j=K.replacer.call({"":j},"",j)),H(K,0,j,!0,!0)?K.dump+`
307
+ `:""}return p(Q,"dump2"),ss.dump=Q,ss}p(_u,"requireDumper");var Al;function Mu(){if(Al)return Vt;Al=1;const e=Au(),t=_u();function r(i,o){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+o+" instead, which is now safe by default.")}}return p(r,"renamed"),Vt.Type=Jt(),Vt.Schema=_a(),Vt.FAILSAFE_SCHEMA=Da(),Vt.JSON_SCHEMA=Na(),Vt.CORE_SCHEMA=Wa(),Vt.DEFAULT_SCHEMA=So(),Vt.load=e.load,Vt.loadAll=e.loadAll,Vt.dump=t.dump,Vt.YAMLException=Pr(),Vt.types={binary:Ya(),float:qa(),map:Oa(),null:$a(),pairs:Xa(),set:Ga(),timestamp:za(),bool:Pa(),int:Ra(),merge:Ha(),omap:ja(),seq:Ia(),str:Ma()},Vt.safeLoad=r("safeLoad","load"),Vt.safeLoadAll=r("safeLoadAll","loadAll"),Vt.safeDump=r("safeDump","dump"),Vt}p(Mu,"requireJsYaml");var _x=Mu(),Mx=Fu(_x),{Type:cS,Schema:dS,FAILSAFE_SCHEMA:uS,JSON_SCHEMA:Ix,CORE_SCHEMA:gS,DEFAULT_SCHEMA:pS,load:Ox,loadAll:fS,dump:mS,YAMLException:yS,types:CS,safeLoad:xS,safeLoadAll:bS,safeDump:kS}=Mx,Dx={common:ki,getConfig:$t,insertCluster:eu,insertEdge:ou,insertEdgeLabel:Aa,insertMarkers:nu,insertNode:Ea,interpolateToCurve:aa,labelHelper:ct,log:M,positionEdgeLabel:UC},mi={},Iu=p(e=>{for(const t of e)mi[t.name]=t},"registerLayoutLoaders"),$x=p(()=>{Iu([{name:"dagre",loader:p(async()=>await yt(()=>import("./dagre-GXQ25YYZ-DauBFK-x.js"),[],import.meta.url),"loader")},{name:"swimlane",loader:p(async()=>await yt(()=>import("./swimlanes-42K2YHIH-B9qJ99nD.js"),[],import.meta.url),"loader")},{name:"cose-bilkent",loader:p(async()=>await yt(()=>import("./cose-bilkent-JH36ORCC-CGF9N16A.js"),[],import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");$x();var SS=p(async(e,t)=>{if(!(e.layoutAlgorithm in mi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const d=h.domId||h.id;h.domId=`${e.diagramId}-${d}`}const r=mi[e.layoutAlgorithm],i=await r.loader(),{theme:o,themeVariables:s}=e.config,{useGradient:a,gradientStart:n,gradientStop:l}=s,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),a){const h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,Dx,{algorithm:r.algorithm})},"render"),TS=p((e="",{fallback:t="dagre"}={})=>{if(e in mi)return e;if(t in mi)return M.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Ua="comm",Ou="rule",Du="decl",Px="@media",Rx="@import",qx="@supports",Nx="@namespace",qs="@keyframes",$u="@layer",Wx="@scope",zx=Math.abs,di=String.fromCharCode;function Pu(e){return e.trim()}function Ns(e,t,r){return e.replace(t,r)}function wr(e,t){return e.charCodeAt(t)|0}function Ar(e,t,r){return e.slice(t,r)}function Se(e){return e.length}function Ru(e){return e.length}function Di(e,t){return t.push(e),e}var To=1,_r=1,qu=0,le=0,Wt=0,Rr="";function Va(e,t,r,i,o,s,a,n){return{value:e,root:t,parent:r,type:i,props:o,children:s,line:To,column:_r,length:a,return:"",siblings:n}}function Hx(){return Wt}function Yx(){return Wt=le>0?wr(Rr,--le):0,_r--,Wt===10&&(_r=1,To--),Wt}function fe(){return Wt=le<qu?wr(Rr,le++):0,_r++,Wt===10&&(_r=1,To++),Wt}function Ne(){return wr(Rr,le)}function zi(){return le}function wo(e,t){return Ar(Rr,e,t)}function yi(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function jx(e){return To=_r=1,qu=Se(Rr=e),le=0,[]}function Xx(e){return Rr="",e}function as(e){return Pu(wo(le-1,Ws(e===91?e+2:e===40?e+1:e)))}function Gx(e){for(;(Wt=Ne())&&Wt<33;)fe();return yi(e)>2||yi(Wt)>3?"":" "}function Ux(e,t){for(;--t&&fe()&&!(Wt<48||Wt>102||Wt>57&&Wt<65||Wt>70&&Wt<97););return wo(e,zi()+(t<6&&Ne()==32&&fe()==32))}function Ws(e){for(;fe();)switch(Wt){case e:return le;case 34:case 39:e!==34&&e!==39&&Ws(Wt);break;case 40:e===41&&Ws(e);break;case 92:fe();break}return le}function Vx(e,t){for(;fe()&&e+Wt!==57;)if(e+Wt===84&&Ne()===47)break;return"/*"+wo(t,le-1)+"*"+di(e===47?e:fe())}function Kx(e){for(;!yi(Ne());)fe();return wo(e,le)}function Zx(e){return Xx(Hi("",null,null,null,[""],e=jx(e),0,[0],e))}function Hi(e,t,r,i,o,s,a,n,l){for(var c=0,h=0,d=a,u=0,g=0,m=0,y=1,C=1,x=1,b=0,S=0,B="",w=o,v=s,F=i,L=B;C;)switch(m=S,S=fe()){case 40:m!=108&&wr(L,d-1)==58?(b++,L+="("):L+=as(S);break;case 41:b--,L+=")";break;case 34:case 39:case 91:L+=as(S);break;case 9:case 10:case 13:case 32:if(b>0){L+=di(S);break}L+=Gx(m);break;case 92:L+=Ux(zi()-1,7);continue;case 47:switch(Ne()){case 42:case 47:Di(Qx(Vx(fe(),zi()),t,r,l),l),(yi(m||1)==5||yi(Ne()||1)==5)&&Se(L)&&Ar(L,-1,void 0)!==" "&&(L+=" ");break;default:L+="/"}break;case 123*y:n[c++]=Se(L)*x;case 125*y:case 59:case 0:if(b>0&&S){L+=di(S);break}switch(S){case 0:case 125:C=0;case 59+h:x==-1&&(L=Ns(L,/\f/g,"")),g>0&&(Se(L)-d||y===0)&&Di(g>32?Ml(L+";",i,r,d-1,l):Ml(Ns(L," ","")+";",i,r,d-2,l),l);break;case 59:L+=";";default:if(Di(F=_l(L,t,r,c,h,o,n,B,w=[],v=[],d,s),s),S===123)if(h===0)Hi(L,t,F,F,w,s,d,n,v);else{switch(u){case 99:if(wr(L,3)===110)break;case 108:if(wr(L,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Hi(e,F,F,i&&Di(_l(e,F,F,0,0,o,n,B,o,w=[],d,v),v),o,v,d,n,i?w:v):Hi(L,F,F,F,[""],v,0,n,v)}}c=h=g=0,y=x=1,B=L="",d=a;break;case 58:d=1+Se(L),g=m;default:if(y<1){if(S==123)--y;else if(S==125&&y++==0&&Yx()==125)continue}switch(L+=di(S),S*y){case 38:x=h>0?1:(L+="\f",-1);break;case 44:if(b>0)break;n[c++]=(Se(L)-1)*x,x=1;break;case 64:Ne()===45&&(L+=as(fe())),u=Ne(),h=d=Se(B=L+=Kx(zi())),S++;break;case 45:m===45&&Se(L)==2&&(y=0)}}return s}function _l(e,t,r,i,o,s,a,n,l,c,h,d){for(var u=o-1,g=o===0?s:[""],m=Ru(g),y=0,C=0,x=0;y<i;++y)for(var b=0,S=Ar(e,u+1,u=zx(C=a[y])),B=e;b<m;++b)(B=Pu(C>0?g[b]+" "+S:Ns(S,/&\f/g,g[b])))&&(l[x++]=B);return Va(e,t,r,o===0?Ou:n,l,c,h,d)}function Qx(e,t,r,i){return Va(e,t,r,Ua,di(Hx()),Ar(e,2,-2),0,i)}function Ml(e,t,r,i,o){return Va(e,t,r,Du,Ar(e,0,i),Ar(e,i+1,-1),i,o)}function zs(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function Jx(e,t,r,i){switch(e.type){case $u:if(e.children.length)break;case Rx:case Nx:case Du:return e.return=e.return||e.value;case Ua:return"";case qs:return e.return=e.value+"{"+zs(e.children,i)+"}";case Ou:if(!Se(e.value=e.props.join(",")))return""}return Se(r=zs(e.children,i))?e.return=e.value+"{"+r+"}":""}function t0(e){var t=Ru(e);return function(r,i,o,s){for(var a="",n=0;n<t;n++)a+=e[n](r,i,o,s)||"";return a}}var Nu="c4",e0=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),r0=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./c4Diagram-7LVT6UL2-B6NHHf7w.js");return{diagram:t}},[],import.meta.url);return{id:Nu,diagram:e}},"loader"),i0={id:Nu,detector:e0,loader:r0},o0=i0,Wu="flowchart",s0=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),a0=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-DpJLPDJS.js").then(r=>r.f);return{diagram:t}},[],import.meta.url);return{id:Wu,diagram:e}},"loader"),n0={id:Wu,detector:s0,loader:a0},l0=n0,zu="flowchart-v2",h0=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),c0=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-DpJLPDJS.js").then(r=>r.f);return{diagram:t}},[],import.meta.url);return{id:zu,diagram:e}},"loader"),d0={id:zu,detector:h0,loader:c0},u0=d0,Hu="swimlane",g0=p(e=>/^\s*swimlane-beta\b/.test(e),"detector"),p0=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-VR7AAH4N-D-2e4UFJ.js");return{diagram:t}},[],import.meta.url);return{id:Hu,diagram:e}},"loader"),f0={id:Hu,detector:g0,loader:p0},m0=f0,Yu="er",y0=p(e=>/^\s*erDiagram/.test(e),"detector"),C0=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./erDiagram-RLTQ6QDP-6YXMuidI.js");return{diagram:t}},[],import.meta.url);return{id:Yu,diagram:e}},"loader"),x0={id:Yu,detector:y0,loader:C0},b0=x0,ju="gitGraph",k0=p(e=>/^\s*gitGraph/.test(e),"detector"),S0=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-WWUBYQGX-CKVR9Ajq.js");return{diagram:t}},[],import.meta.url);return{id:ju,diagram:e}},"loader"),T0={id:ju,detector:k0,loader:S0},w0=T0,Xu="gantt",B0=p(e=>/^\s*gantt/.test(e),"detector"),v0=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./ganttDiagram-EL5Y4UJY-B3ddBLm-.js");return{diagram:t}},[],import.meta.url);return{id:Xu,diagram:e}},"loader"),L0={id:Xu,detector:B0,loader:v0},F0=L0,Gu="info",E0=p(e=>/^\s*info/.test(e),"detector"),A0=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./infoDiagram-27XIBGKW-CrHEoNfn.js");return{diagram:t}},[],import.meta.url);return{id:Gu,diagram:e}},"loader"),_0={id:Gu,detector:E0,loader:A0},Uu="pie",M0=p(e=>/^\s*pie/.test(e),"detector"),I0=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./pieDiagram-E7YTZNPT-GvxNnk0x.js");return{diagram:t}},[],import.meta.url);return{id:Uu,diagram:e}},"loader"),O0={id:Uu,detector:M0,loader:I0},Vu="quadrantChart",D0=p(e=>/^\s*quadrantChart/.test(e),"detector"),$0=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./quadrantDiagram-AXDQQJYC-Yg2WGHWh.js");return{diagram:t}},[],import.meta.url);return{id:Vu,diagram:e}},"loader"),P0={id:Vu,detector:D0,loader:$0},R0=P0,Ku="xychart",q0=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),N0=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./xychartDiagram-S5SC5T6Z-4OhI4XQl.js");return{diagram:t}},[],import.meta.url);return{id:Ku,diagram:e}},"loader"),W0={id:Ku,detector:q0,loader:N0},z0=W0,Zu="requirement",H0=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),Y0=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./requirementDiagram-BXWQKSXE-0AqPqv7a.js");return{diagram:t}},[],import.meta.url);return{id:Zu,diagram:e}},"loader"),j0={id:Zu,detector:H0,loader:Y0},X0=j0,Qu="sequence",G0=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),U0=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./sequenceDiagram-WJ2MYXX4-Br4F1sd7.js");return{diagram:t}},[],import.meta.url);return{id:Qu,diagram:e}},"loader"),V0={id:Qu,detector:G0,loader:U0},K0=V0,Ju="class",Z0=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),Q0=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./classDiagram-ZZMXUADV-BSdRgwsr.js");return{diagram:t}},[],import.meta.url);return{id:Ju,diagram:e}},"loader"),J0={id:Ju,detector:Z0,loader:Q0},tb=J0,tg="classDiagram",eb=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),rb=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./classDiagram-v2-VYDZK3BY-BSdRgwsr.js");return{diagram:t}},[],import.meta.url);return{id:tg,diagram:e}},"loader"),ib={id:tg,detector:eb,loader:rb},ob=ib,eg="state",sb=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),ab=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./stateDiagram-D77RDMKH-XK76naDS.js");return{diagram:t}},[],import.meta.url);return{id:eg,diagram:e}},"loader"),nb={id:eg,detector:sb,loader:ab},lb=nb,rg="stateDiagram",hb=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),cb=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-MP3YSRHH-D3ZN_IoS.js");return{diagram:t}},[],import.meta.url);return{id:rg,diagram:e}},"loader"),db={id:rg,detector:hb,loader:cb},ub=db,ig="journey",gb=p(e=>/^\s*journey/.test(e),"detector"),pb=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./journeyDiagram-3NMN7TZE-BcfZXfHF.js");return{diagram:t}},[],import.meta.url);return{id:ig,diagram:e}},"loader"),fb={id:ig,detector:gb,loader:pb},mb=fb,yb=p((e,t,r)=>{M.debug(`rendering svg for syntax error
308
+ `);const i=Tm(t),o=i.append("g");i.attr("viewBox","0 0 2412 512"),Ph(i,100,512,!0),o.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),o.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),o.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),o.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),o.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),o.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),o.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),og={draw:yb},Cb=og,xb={db:{},renderer:og,parser:{parse:p(()=>{},"parse")}},bb=xb,sg="flowchart-elk",kb=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),Sb=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-DpJLPDJS.js").then(r=>r.f);return{diagram:t}},[],import.meta.url);return{id:sg,diagram:e}},"loader"),Tb={id:sg,detector:kb,loader:Sb},wb=Tb,ag="timeline",Bb=p(e=>/^\s*timeline/.test(e),"detector"),vb=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./timeline-definition-24CTP7MA-CtZZro9U.js");return{diagram:t}},[],import.meta.url);return{id:ag,diagram:e}},"loader"),Lb={id:ag,detector:Bb,loader:vb},Fb=Lb,ng="mindmap",Eb=p(e=>/^\s*mindmap/.test(e),"detector"),Ab=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./mindmap-definition-YA3MSWOX-5wZuXgB8.js");return{diagram:t}},[],import.meta.url);return{id:ng,diagram:e}},"loader"),_b={id:ng,detector:Eb,loader:Ab},Mb=_b,lg="kanban",Ib=p(e=>/^\s*kanban/.test(e),"detector"),Ob=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./kanban-definition-UXKFOSKX-D9d45rsU.js");return{diagram:t}},[],import.meta.url);return{id:lg,diagram:e}},"loader"),Db={id:lg,detector:Ib,loader:Ob},$b=Db,hg="sankey",Pb=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),Rb=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./sankeyDiagram-P5KCCOFB-CqcWOAyy.js");return{diagram:t}},[],import.meta.url);return{id:hg,diagram:e}},"loader"),qb={id:hg,detector:Pb,loader:Rb},Nb=qb,cg="packet",Wb=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),zb=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./diagram-Z3DM3KII-DrILxydN.js");return{diagram:t}},[],import.meta.url);return{id:cg,diagram:e}},"loader"),Hb={id:cg,detector:Wb,loader:zb},dg="radar",Yb=p(e=>/^\s*radar-beta/.test(e),"detector"),jb=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./diagram-UQ7AKVKN-CoIPlGw-.js");return{diagram:t}},[],import.meta.url);return{id:dg,diagram:e}},"loader"),Xb={id:dg,detector:Yb,loader:jb},ug="block",Gb=p(e=>/^\s*block(-beta)?/.test(e),"detector"),Ub=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./blockDiagram-I7D4REHJ-DH6ta7S_.js");return{diagram:t}},[],import.meta.url);return{id:ug,diagram:e}},"loader"),Vb={id:ug,detector:Gb,loader:Ub},Kb=Vb,gg="treeView",Zb=p(e=>/^\s*treeView-beta/.test(e),"detector"),Qb=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./diagram-S7CK7UJ4-cLOCifii.js");return{diagram:t}},[],import.meta.url);return{id:gg,diagram:e}},"loader"),Jb={id:gg,detector:Zb,loader:Qb},tk=Jb,pg="architecture",ek=p(e=>/^\s*architecture/.test(e),"detector"),rk=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./architectureDiagram-5GKGNRK7-C8jjE2mY.js");return{diagram:t}},[],import.meta.url);return{id:pg,diagram:e}},"loader"),ik={id:pg,detector:ek,loader:rk},ok=ik,fg="eventmodeling",sk=p(e=>/^\s*eventmodeling/.test(e),"detector"),ak=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./diagram-VSXAHHWV-DWWQ-Ga9.js");return{diagram:t}},[],import.meta.url);return{id:fg,diagram:e}},"loader"),nk={id:fg,detector:sk,loader:ak},lk=nk,mg="ishikawa",hk=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),ck=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-5VMMS53U-DkW3YLz9.js");return{diagram:t}},[],import.meta.url);return{id:mg,diagram:e}},"loader"),dk={id:mg,detector:hk,loader:ck},yg="venn",uk=p(e=>/^\s*venn-beta/.test(e),"detector"),gk=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./vennDiagram-4TSXK5OY-zaNGkt8b.js");return{diagram:t}},[],import.meta.url);return{id:yg,diagram:e}},"loader"),pk={id:yg,detector:uk,loader:gk},fk=pk,Cg="treemap",mk=p(e=>/^\s*treemap/.test(e),"detector"),yk=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./diagram-VX7I27RA-43SwkivD.js");return{diagram:t}},[],import.meta.url);return{id:Cg,diagram:e}},"loader"),Ck={id:Cg,detector:mk,loader:yk},xg="wardley",xk=p(e=>/^\s*wardley-beta/i.test(e),"detector"),bk=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./wardleyDiagram-VM6X3IG4-D_Q6gtp2.js");return{diagram:t}},[],import.meta.url);return{id:xg,diagram:e}},"loader"),kk={id:xg,detector:xk,loader:bk},Sk=kk,bg="cynefin",Tk=p(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),wk=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./cynefinDiagram-5FMLGOSQ-Cil4cm66.js");return{diagram:t}},[],import.meta.url);return{id:bg,diagram:e}},"loader"),Bk={id:bg,detector:Tk,loader:wk},kg="railroad",vk=p(e=>/^\s*railroad-beta/i.test(e),"detector"),Lk=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./railroadDiagram-O6MQD6OU-Df7m1mT4.js");return{diagram:t}},[],import.meta.url);return{id:kg,diagram:e}},"loader"),Fk={id:kg,detector:vk,loader:Lk},Sg="railroadEbnf",Ek=p(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),Ak=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./ebnfDiagram-PWID7BFC-CwBVaHP2.js");return{diagram:t}},[],import.meta.url);return{id:Sg,diagram:e}},"loader"),_k={id:Sg,detector:Ek,loader:Ak},Tg="railroadAbnf",Mk=p(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),Ik=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./abnfDiagram-VCTEODGH-CHerLzZ0.js");return{diagram:t}},[],import.meta.url);return{id:Tg,diagram:e}},"loader"),Ok={id:Tg,detector:Mk,loader:Ik},wg="railroadPeg",Dk=p(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),$k=p(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./pegDiagram-XKGWAZYB-BjrOX_Ki.js");return{diagram:t}},[],import.meta.url);return{id:wg,diagram:e}},"loader"),Pk={id:wg,detector:Dk,loader:$k},Il=!1,Bo=p(()=>{Il||(Il=!0,Ki("error",bb,e=>e.toLowerCase().trim()==="error"),Ki("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),xs(wb,Mb,ok),xs(o0,$b,ob,tb,b0,F0,_0,O0,X0,K0,m0,u0,l0,Fb,w0,ub,lb,mb,R0,Nb,Hb,z0,Kb,lk,tk,Xb,dk,Ck,Fk,_k,Ok,Pk,fk,Sk,Bk))},"addDiagrams"),Rk=p(async()=>{M.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(rr).map(async([r,{detector:i,loader:o}])=>{if(o)try{Ts(r)}catch{try{const{diagram:s,id:a}=await o();Ki(a,s,i)}catch(s){throw M.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete rr[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){M.error(`Failed to load ${t.length} external diagrams`);for(const r of t)M.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),qk="graphics-document document";function Bg(e,t){e.attr("role",qk),t!==""&&e.attr("aria-roledescription",t)}p(Bg,"setA11yDiagramInfo");function vg(e,t,r,i){if(e.insert!==void 0){if(r){const o=`chart-desc-${i}`;e.attr("aria-describedby",o),e.insert("desc",":first-child").attr("id",o).text(r)}if(t){const o=`chart-title-${i}`;e.attr("aria-labelledby",o),e.insert("title",":first-child").attr("id",o).text(t)}}}p(vg,"addSVGa11yTitleDescription");var Hs=class Lg{constructor(t,r,i,o,s){this.type=t,this.text=r,this.db=i,this.parser=o,this.renderer=s}static{p(this,"Diagram")}static async fromText(t,r={}){const i=$t(),o=ta(t,i);t=Zm(t)+`
309
+ `;try{Ts(o)}catch{const c=Gf(o);if(!c)throw new _h(`Diagram ${o} not found.`);const{id:h,diagram:d}=await c();Ki(h,d)}const{db:s,parser:a,renderer:n,init:l}=Ts(o);return a.parser&&(a.parser.yy=s),s.clear?.(),l?.(i),r.title&&s.setDiagramTitle?.(r.title),await a.parse(t),new Lg(o,t,s,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},Ol=[],Nk=p(()=>{Ol.forEach(e=>{e()}),Ol=[]},"attachFunctions"),Wk=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Fg(e){const t=e.match(Ah);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
310
+ `).map(a=>a.startsWith(r)?a.slice(r.length):a).join(`
311
+ `):t[2];let o=Ox(i,{schema:Ix})??{};o=typeof o=="object"&&!Array.isArray(o)?o:{};const s={};return o.displayMode&&(s.displayMode=o.displayMode.toString()),o.title&&(s.title=o.title.toString()),o.config&&(s.config=o.config),{text:e.slice(t[0].length),metadata:s}}p(Fg,"extractFrontMatter");var zk=p(e=>e.replace(/\r\n?/g,`
312
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Hk=p(e=>{const{text:t,metadata:r}=Fg(e),{displayMode:i,title:o,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:o,config:s,text:t}},"processFrontmatter"),Yk=p(e=>{const t=Zt.detectInit(e)??{},r=Zt.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:Rm(e),directive:t}},"processDirectives");function Ka(e){const t=zk(e),r=Hk(t),i=Yk(r.text),o=da(r.config,i.directive);return e=Wk(i.text),{code:e,title:r.title,config:o}}p(Ka,"preprocessDiagram");function Eg(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Eg,"toBase64");var jk=5e4,Xk="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Gk="sandbox",Uk="loose",Vk="http://www.w3.org/2000/svg",Kk="http://www.w3.org/1999/xlink",Zk="http://www.w3.org/1999/xhtml",Qk="100%",Jk="100%",t1="border:0;margin:0;",e1="margin:0",r1="allow-top-navigation-by-user-activation allow-popups",i1='The "iframe" tag is not supported by your browser.',o1=["foreignobject"],s1=["dominant-baseline"];function Za(e){const t=Ka(e);return Ui(),Hf(t.config??{}),t}p(Za,"processAndSetConfigs");async function Ag(e,t){Bo();try{const{code:r,config:i}=Za(e);return{diagramType:(await Mg(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}p(Ag,"parse");var Dl=p((e,t,r=[])=>{const i=Bh(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),a1=p((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=Qt(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{an(l.styles)||n.forEach(c=>{r.insertRule(Dl(l.id,c,l.styles),r.cssRules.length)}),an(l.textStyles)||r.insertRule(Dl(l.id,"tspan",(l?.textStyles||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const o=new CSSStyleSheet;o.replaceSync(e.themeCSS),i=Ss(o)+`
313
+ `}else i+=`${e.themeCSS}
314
+ `;return i+Ss(r)},"createCssStyles"),n1=p((e,t)=>zs(Zx(`${e}{${t}}`),t0([p(function(i,o,s,a){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===qs)return;i.props=i.props.map(n=>n===e&&Array.isArray(i.children)&&i.children.every(c=>c.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(c.props))||(n.startsWith(`${e} `)||n.startsWith(`${e}>`))&&!n.startsWith(`${e} ||`)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[Px,qx,$u,Wx,"@container","@starting-style"],qs].includes(i.type)||(M.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=Ua))},"addNamespace"),Jx])),"compileCSS"),l1=p((e,t,r,i)=>{const o=a1(e,r),s=dm(t,o,{...e.themeVariables,theme:e.theme,look:e.look},i);return n1(i,s)},"createUserStyles"),h1=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=We(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),c1=p((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":Jk,i=Eg(`<body style="${e1}">${e}</body>`);return`<iframe style="width:${Qk};height:${r};${t1}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${r1}">
315
+ ${i1}
316
+ </iframe>`},"putIntoIFrame"),$l=p((e,t,r,i,o)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const a=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",Vk);return o&&a.attr("xmlns:xlink",o),a.append("g"),e},"appendDivSvgG");function Ys(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(Ys,"sandboxedIframe");var d1=p((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),u1=p(async function(e,t,r){Bo();const i=Za(t);t=i.code;const o=$t();M.debug(o),t.length>(o?.maxTextSize??jk)&&(t=Xk);const s=`#${e}`,a="i"+e,n="#"+a,l="d"+e,c="#"+l,h=p(()=>{const z=mt(u?n:c).node();z&&"remove"in z&&z.remove()},"removeTempElements");let d=mt(document.body);const u=o.securityLevel===Gk,g=o.securityLevel===Uk,m=o.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),u){const W=Ys(mt(r),a);d=mt(W.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=mt(r);$l(d,e,l,`font-family: ${m}`,Kk)}else{if(d1(document,e,l,a),u){const W=Ys(mt(document.body),a);d=mt(W.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=mt("body");$l(d,e,l)}let y,C;try{y=await Hs.fromText(t,{title:i.title})}catch(W){if(o.suppressErrorRendering)throw h(),W;y=await Hs.fromText("error"),C=W}const x=d.select(c).node(),b=y.type,S=x.firstChild,B=S.firstChild,w=y.renderer.getClasses?.(t,y),v=l1(o,b,w,s),F=document.createElement("style");F.innerHTML=v,S.insertBefore(F,B);try{await y.renderer.draw(t,e,"11.17.2",y)}catch(W){throw o.suppressErrorRendering?h():Cb.draw(t,e,"11.17.2"),W}const L=d.select(`${c} svg`),P=y.db.getAccTitle?.(),$=y.db.getAccDescription?.();Ig(b,L,P,$);const J=p(()=>{d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",Zk);let W=d.select(c).node().innerHTML;if(M.debug("config.arrowMarkerAbsolute",o.arrowMarkerAbsolute),W=h1(W,u,ve(o.arrowMarkerAbsolute)),u){const z=d.select(c+" svg").node();W=c1(W,z)}else g||(W=Br.sanitize(W,{ADD_TAGS:o1,ADD_ATTR:s1,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return Nk(),W},"serializeSvg")();if(C)throw C;return h(),{diagramType:b,svg:J,bindFunctions:y.db.bindFunctions}},"render");function _g(e={}){const t=Yt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Wf(t),t?.theme&&t.theme in Me?t.themeVariables=Me[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Me.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Nf(t):vh();Js(r.logLevel),Bo()}p(_g,"initialize");var Mg=p((e,t={})=>{const{code:r}=Ka(e);return Hs.fromText(r,t)},"getDiagramFromText");function Ig(e,t,r,i){Bg(t,e),vg(t,r,i,t.attr("id"))}p(Ig,"addA11yInfo");var sr=Object.freeze({render:u1,parse:Ag,getDiagramFromText:Mg,initialize:_g,getConfig:$t,setConfig:Lh,getSiteConfig:vh,updateSiteConfig:zf,reset:p(()=>{Ui()},"reset"),globalReset:p(()=>{Ui(Fr)},"globalReset"),defaultConfig:Fr});Js($t().logLevel);Ui($t());var g1=p((e,t,r)=>{M.warn(e),ca(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),Og=p(async function(e={querySelector:".mermaid"}){try{await p1(e)}catch(t){if(ca(t)&&M.error(t.str),Oe.parseError&&Oe.parseError(t),!e.suppressErrors)throw M.error("Use the suppressErrors option to suppress these errors"),t}},"run"),p1=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=sr.getConfig();M.debug(`${e?"":"No "}Callback function found`);let o;if(r)o=r;else if(t)o=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");M.debug(`Found ${o.length} diagrams`),i?.startOnLoad!==void 0&&(M.debug("Start On Load: "+i?.startOnLoad),sr.updateSiteConfig({startOnLoad:i?.startOnLoad}));const s=new Zt.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const n=[];for(const l of Array.from(o)){if(M.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${s.next()}`;a=l.innerHTML,a=ch(Zt.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Zt.detectInit(a);h&&M.debug("Detected early reinit: ",h);try{const{svg:d,bindFunctions:u}=await Rg(c,a,l);l.innerHTML=d,e&&await e(c),u&&u(l)}catch(d){g1(d,n,Oe.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),Dg=p(function(e){sr.initialize(e)},"initialize"),f1=p(async function(e,t,r){M.warn("mermaid.init is deprecated. Please use run instead."),e&&Dg(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Og(i)},"init"),m1=p(async(e,{lazyLoad:t=!0}={})=>{Bo(),xs(...e),t===!1&&await Rk()},"registerExternalDiagrams"),$g=p(function(){if(Oe.startOnLoad){const{startOnLoad:e}=sr.getConfig();e&&Oe.run().catch(t=>M.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",$g,!1);var y1=p(function(e){Oe.parseError=e},"setParseErrorHandler"),ao=[],ns=!1,Pg=p(async()=>{if(!ns){for(ns=!0;ao.length>0;){const e=ao.shift();if(e)try{await e()}catch(t){M.error("Error executing queue",t)}}ns=!1}},"executeQueue"),C1=p(async(e,t)=>new Promise((r,i)=>{const o=p(()=>new Promise((s,a)=>{sr.parse(e,t).then(n=>{s(n),r(n)},n=>{M.error("Error parsing",n),Oe.parseError?.(n),a(n),i(n)})}),"performCall");ao.push(o),Pg().catch(i)}),"parse"),Rg=p((e,t,r)=>new Promise((i,o)=>{const s=p(()=>new Promise((a,n)=>{sr.render(e,t,r).then(l=>{a(l),i(l)},l=>{M.error("Error parsing",l),Oe.parseError?.(l),n(l),o(l)})}),"performCall");ao.push(s),Pg().catch(o)}),"render"),x1=p(()=>Object.keys(rr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Oe={startOnLoad:!0,mermaidAPI:sr,parse:C1,render:Rg,init:f1,run:Og,registerExternalDiagrams:m1,registerLayoutLoaders:Iu,initialize:Dg,parseError:void 0,contentLoaded:$g,setParseErrorHandler:y1,detectType:ta,registerIconPacks:Em,getRegisteredDiagramsMetadata:x1},ui=Oe;const b1=/<br\s*\/?>/gi,k1=/\\+n/g,no=(e,t)=>e.replace(k1,r=>{const i=r.length-1,o="\\".repeat(Math.floor(i/2));return i%2?`${o}${t}`:`${o}n`}),S1=e=>no(e.replace(b1,`
317
+ `),`
318
+ `),Gt=e=>Lr(S1(e)),js=e=>e.nodeType===Node.TEXT_NODE?e.nodeValue||"":e.nodeType===Node.ELEMENT_NODE&&e.tagName.toLowerCase()==="br"?`
319
+ `:Array.from(e.childNodes).map(js).join(""),lo=e=>{const t=Array.from(e.querySelectorAll("tspan")),r=t.length?t.map(i=>js(i).trim()).filter(Boolean).join(`
320
+ `):js(e).trim();return Lr(r)},kt=e=>e.replace(/\s*!important\s*$/i,"").trim(),T1=(e,t)=>{let r=t;for(;r<e.length&&/\s/.test(e[r]);)r+=1;const i=r;for(;r<e.length&&/[a-z-]/i.test(e[r]);)r+=1;if(r===i)return!1;for(;r<e.length&&/\s/.test(e[r]);)r+=1;return e[r]===":"},he=e=>{const t=[];let r=0;for(;r<e.length;){for(;r<e.length&&/[\s;,]/.test(e[r]);)r+=1;if(r>=e.length)break;const i=r;for(;r<e.length&&e[r]!==":"&&!(e[r]===";"||e[r]===",");)r+=1;if(r>=e.length||e[r]!==":")break;const o=e.substring(i,r).trim().toLowerCase();r+=1;const s=r;let a=0,n=null;for(;r<e.length;){const c=e[r];if(n){c===n&&e[r-1]!=="\\"&&(n=null),r+=1;continue}if(c==='"'||c==="'"){n=c,r+=1;continue}if(c==="("){a+=1,r+=1;continue}if(c===")"){a=Math.max(0,a-1),r+=1;continue}if(a===0&&(c===";"||c===","||/\s/.test(c)&&T1(e,r)))break;r+=1}const l=kt(e.substring(s,r));o&&l&&t.push({property:o,value:l}),r<e.length&&(e[r]===";"||e[r]===",")&&(r+=1)}return t},ce=e=>{const t=kt(e);if(!t)return!1;if(typeof CSS<"u"&&typeof CSS.supports=="function")return CSS.supports("color",t);if(typeof document<"u"){const r=document.createElement("div");return r.style.color="",r.style.color=t,r.style.color!==""}return!1},Pl=(e,t)=>{const r=e.getAttribute("style");return r&&he(r).find(i=>i.property===t)?.value||""},ls=(...e)=>{for(const t of e){const r=kt(t||"");if(ce(r))return r}},Qa=(e,t)=>{const r=e.querySelector("text, foreignObject, div, span, p")||e,i=ls(r.getAttribute?.("fill"),Pl(r,"fill"),r.style?.fill);if(i)return i;const o=ls(r.getAttribute?.("color"),Pl(r,"color"),r.style?.color);if(o)return o;const s=ls(t);if(s)return s},Ja=(e,t,r)=>{switch(t){case At.FILL:case At.STROKE:ce(r)&&(e[t]=r);break;case At.STROKE_WIDTH:case At.STROKE_DASHARRAY:e[t]=r;break}},ho=(e,t,r)=>{t===te.COLOR&&ce(r)&&(e[te.COLOR]=r)},co=(e,t,r)=>{e&&he(e).forEach(({property:i,value:o})=>{Ja(t,i,o),ho(r,i,o)})},qg=(e,t)=>{e&&he(e).forEach(({property:r,value:i})=>{if(r==="fill"&&ce(i)){t[te.COLOR]=i;return}ho(t,r,i)})},Ng=(e,t)=>{if(!e)return;[[At.FILL,e.getAttribute("fill")],[At.STROKE,e.getAttribute("stroke")],[At.STROKE_WIDTH,e.getAttribute("stroke-width")],[At.STROKE_DASHARRAY,e.getAttribute("stroke-dasharray")]].forEach(([i,o])=>{const s=kt(o||"");s&&Ja(t,i,s)})},Wg=(e,t)=>{if(!e)return;const r=e.getAttribute("fill")||e.getAttribute("color"),i=kt(r||"");ce(i)&&(t[te.COLOR]=i)},Xs=(e,t,r,i)=>{if(!(t instanceof Map))return;const o=t.get(e);o&&(o.styles?.forEach(s=>{he(s).forEach(({property:a,value:n})=>{Ja(r,a,n),ho(i,a,n)})}),o.textStyles?.forEach(s=>{he(s).forEach(({property:a,value:n})=>{ho(i,a,n)})}))},w1=(e,t,r)=>{const i=e.nodes.map(u=>u.startsWith("flowchart-")?u.split("-")[1]:u),o=t.querySelector(`[id=${tr(e.id)}]`);if(!o)throw new Error("SubGraph element not found");const s=tn(o,t),a=o.getBBox(),n={width:a.width,height:a.height},l={},c={},h=o.querySelector(":scope > rect, :scope > path, :scope > polygon, :scope > ellipse")||o.querySelector(".cluster > rect, .cluster > path, .cluster > polygon, .cluster > ellipse")||o.querySelector("rect, path, polygon, ellipse");co(o.getAttribute("style"),l,c),co(h?.getAttribute("style"),l,c),Ng(h,l);const d=o.querySelector(".cluster-label text, .cluster-label tspan")||o.querySelector("text");return qg(d?.getAttribute("style"),c),Wg(d,c),Xs(e.id,r,l,c),e.classes?.forEach(u=>{Xs(u,r,l,c)}),{id:e.id,nodeIds:i,text:Gt(e.title),labelType:"text",...s,...n,containerStyle:l,labelStyle:c}},Rl=(e,t,r)=>{const i=t.querySelector(`[id*=${tr(e.domId)}]`);if(!i)return;let o;i.parentElement?.tagName.toLowerCase()==="a"&&(o=i.parentElement.getAttribute("xlink:href"));const s=tn(o?i.parentElement:i,t),a=i.getBBox(),n={width:a.width,height:a.height},l={},c={};e.classes&&r instanceof Map&&(Array.isArray(e.classes)?e.classes:[e.classes]).forEach(u=>{Xs(u,r,l,c)}),e.styles?.forEach(u=>{co(u,l,c)});const h=i.querySelector(".label-container");return co(h?.getAttribute("style"),l,c),Ng(h,l),Array.from(i.querySelectorAll(".label, .nodeLabel, .label text, .label tspan, .label span, .label div")).forEach(u=>{qg(u.getAttribute("style"),c),Wg(u,c)}),{id:e.id,labelType:e.labelType,text:Gt(e.text||""),type:e.type,link:o||void 0,...s,...n,containerStyle:l,labelStyle:c}},zg=(e,t)=>t?e.querySelector(`path[id*=${tr(t)}]`):null,B1=(e,t,r)=>{const i=zg(r,e.id);if(!i)throw new Error("Edge element not found");const o=tn(i,r),s=bh(i,o);return e.length=void 0,{...e,...s,text:Gt(e.text)}},tn=(e,t)=>{if(!e)throw new Error("Element not found");let r=e.parentElement?.parentElement;const i=e.childNodes[0];let o={x:0,y:0};if(i){const{transformX:l,transformY:c}=Je(i),h=i.getBBox();o={x:Number(i.getAttribute("x"))||l+h.x||0,y:Number(i.getAttribute("y"))||c+h.y||0}}const{transformX:s,transformY:a}=Je(e),n={x:s+o.x,y:a+o.y};for(;r&&r.id!==t.id;){if(r.classList.value==="root"&&r.hasAttribute("transform")){const{transformX:l,transformY:c}=Je(r);n.x+=l,n.y+=c}r=r.parentElement}return n},v1=(e,t)=>{const r=e.getVertices(),i=e.getEdges(),o=e.getSubGraphs(),s=e.getClasses(),a={},n=s instanceof Map?s:{};r instanceof Map?r.forEach((d,u)=>{a[u]=Rl(d,t,n)}):typeof r=="object"&&r!==null&&Object.entries(r).forEach(([d,u])=>{a[d]=Rl(u,t,n)});const l=new Map,c=(Array.isArray(i)?i:[]).map(d=>{if(!zg(t,d.id))return null;const u=`${d.start}-${d.end}`,g=l.get(u)||0;return l.set(u,g+1),B1(d,g,t)}).filter(d=>d!==null&&d.reflectionPoints.length>1);return{type:"flowchart",subGraphs:(Array.isArray(o)?o:[]).map(d=>w1(d,t,n)),vertices:a,edges:c}},L1=(e,t)=>{const r={};t?.label&&(r.label={text:Lr(t.label),fontSize:16});const i=e.tagName;if(i==="line")r.startX=Number(e.getAttribute("x1")),r.startY=Number(e.getAttribute("y1")),r.endX=Number(e.getAttribute("x2")),r.endY=Number(e.getAttribute("y2"));else if(i==="path"){const a=e.getAttribute("d");if(!a)throw new Error('Path element does not contain a "d" attribute');const n=a.split(/(?=[LC])/),l=n[0].substring(1).split(",").map(d=>parseFloat(d)),c=[];n.forEach(d=>{const u=d.substring(1).trim().split(" ").map(g=>{const[m,y]=g.split(",");return[parseFloat(m)-l[0],parseFloat(y)-l[1]]});c.push(...u)});const h=c[c.length-1];r.startX=l[0],r.startY=l[1],r.endX=h[0],r.endY=h[1],r.points=c}if(t?.label){const n=Lr(t.label).split(`
321
+ `).length*16*1.25/2;r.startY=r.startY-n,r.endY=r.endY-n}const o=e.getAttribute("stroke"),s=(o&&o!=="none"?o:"")||getComputedStyle(e).stroke||"";return r.strokeColor=s?kt(s):null,r.strokeWidth=Number(e.getAttribute("stroke-width")),r.type="arrow",r.strokeStyle=t?.strokeStyle||"solid",r.startArrowhead=t?.startArrowhead||null,r.endArrowhead=t?.endArrowhead||null,r},en=(e,t,r,i,o)=>{const s={};return s.type="arrow",s.startX=e,s.startY=t,s.endX=r,s.endY=i,Object.assign(s,{...o}),s},uo=(e,t,r,i)=>({type:"text",x:e,y:t,text:r,width:i?.width||20,height:i?.height||20,fontSize:i?.fontSize||Mr,id:i?.id,color:i?.color,groupId:i?.groupId,metadata:i?.metadata}),Hg=(e,t,r)=>{const i={},o=Number(e.getAttribute("x")),s=Number(e.getAttribute("y"));i.type="text",i.text=Lr(t),r?.id&&(i.id=r.id),r?.groupId&&(i.groupId=r.groupId);const a=e.getBBox();i.width=a.width,i.height=a.height,i.x=o-a.width/2,i.y=s;const n=parseInt(getComputedStyle(e).fontSize);return i.fontSize=n,i.color=Qa(e),i},De=(e,t,r={})=>{const i={};i.type=t;const{label:o,subtype:s,id:a,groupId:n}=r;i.id=a,n&&(i.groupId=n),o&&(i.label={text:Lr(o.text),fontSize:16,textAlign:o?.textAlign,verticalAlign:o?.verticalAlign});const l=e.getBBox();switch(i.x=l.x,i.y=l.y,i.width=l.width,i.height=l.height,i.subtype=s,s){case"highlight":const c=e.getAttribute("fill");c&&(i.bgColor=kt(c));break;case"note":i.strokeStyle="dashed";break}return i},Ci=(e,t,r,i,o,s)=>{const a={};a.startX=t,a.startY=r,a.endX=i,s?.groupId&&(a.groupId=s.groupId),s?.id&&(a.id=s.id),a.endY=o;const n=e.getAttribute("stroke");return a.strokeColor=n?kt(n):null,a.strokeWidth=Number(e.getAttribute("stroke-width")),a.type="line",a},ql={0:"SOLID",1:"DOTTED",3:"SOLID_CROSS",4:"DOTTED_CROSS",5:"SOLID_OPEN",6:"DOTTED_OPEN",24:"SOLID_POINT",25:"DOTTED_POINT"},Nt={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,ALT_START:12,ALT_ELSE:13,OPT_START:15,PAR_START:19,PAR_AND:20,SOLID_POINT:24,DOTTED_POINT:25,CRITICAL_START:27,CRITICAL_OPTION:28,BREAK_START:30,PAR_OVER_START:32},F1=e=>{let t;switch(e){case Nt.SOLID:case Nt.SOLID_CROSS:case Nt.SOLID_OPEN:case Nt.SOLID_POINT:t="solid";break;case Nt.DOTTED:case Nt.DOTTED_CROSS:case Nt.DOTTED_OPEN:case Nt.DOTTED_POINT:t="dotted";break;default:t="solid";break}return t},E1=(e,t)=>{if(!!e.nextElementSibling?.classList.contains("sequenceNumber")){const i=e.nextElementSibling?.textContent;if(!i)throw new Error("sequence number not present");const o=30,s=o/2,n={type:"rectangle",x:t.startX-10,y:t.startY-s,label:{text:i,fontSize:14},bgColor:"#e9ecef",height:o,subtype:"sequence"};Object.assign(t,{sequenceNumber:n})}},Nl=(e,t,r)=>{if(!e)throw"root node not found";const i=ae(),o=Array.from(e.children),s=o.find(n=>n.tagName==="text"),a=[];return o.forEach((n,l)=>{if(n.tagName==="text"&&n!==s)return;const c=`${r?.id}-${l}`;let h;switch(n.tagName){case"line":const d=Number(n.getAttribute("x1")),u=Number(n.getAttribute("y1")),g=Number(n.getAttribute("x2")),m=Number(n.getAttribute("y2"));h=Ci(n,d,u,g,m,{groupId:i,id:c});break;case"text":const y=Hg(n,t,{groupId:i,id:c});if(t.includes(`
322
+ `)){const C=y.x+(y.width||0)/2,x=t.split(`
323
+ `);y.width=Math.max(y.width||0,...x.map(b=>b.length*y.fontSize*.6)),y.height=Math.max(y.height||0,x.length*y.fontSize*1.25),y.x=C-y.width/2}h=y;break;case"circle":h=De(n,"ellipse",{label:n.textContent?{text:n.textContent}:void 0,groupId:i,id:c});default:h=De(n,yp[n.tagName],{label:n.textContent?{text:n.textContent}:void 0,groupId:i,id:c})}a.push(h)}),a},Wl=(e,t)=>{const r=t.getAttribute("fill"),i=t.getAttribute("stroke"),o=t.getAttribute("stroke-width"),s=t.getAttribute("stroke-dasharray");r&&r!=="none"&&(e.bgColor=kt(r)),i&&i!=="none"&&(e.strokeColor=kt(i)),o&&(e.strokeWidth=Number(o)),s&&s.trim()&&(e.strokeStyle="dashed")},A1=(e,t)=>{const r=Array.from(t.querySelectorAll(".actor-top")),i=Array.from(t.querySelectorAll(".actor-bottom")),o=[],s=[],a={},n=e instanceof Map?Array.from(e.values()):Object.values(e),l=Array.from(t.querySelectorAll(".actor-line")),c=(h,d)=>{const u=h.name,g=l.find(y=>y.getAttribute("name")===u);if(g)return g;const m=h.type==="participant"?d.parentElement?.previousElementSibling:d.previousElementSibling;return m?m.tagName==="line"?m:m.querySelector("line"):null};return n.forEach(h=>{const d=r.find(m=>m.getAttribute("name")===h.name),u=i.find(m=>m.getAttribute("name")===h.name);if(!d||!u)throw"root not found";const g=Gt(h.description);if(h.type==="participant"){const m=De(d,"rectangle",{id:`${h.name}-top`,label:{text:g},subtype:"actor"});if(Wl(m,d),!m)throw"Top Node element not found!";o.push([m]);const y=De(u,"rectangle",{id:`${h.name}-bottom`,label:{text:g},subtype:"actor"});a[h.name]={topId:`${h.name}-top`,bottomId:`${h.name}-bottom`,bindType:"rectangle"},Wl(y,u),o.push([y]);const C=c(h,d);if(C?.tagName!=="line")throw"Line not found";const x=Number(C.getAttribute("x1"));if(!m.height)throw"Top node element height is null";const b=m.y+m.height,S=y.y,B=Number(C.getAttribute("x2")),w=Ci(C,x,b,B,S);s.push(w)}else if(h.type==="actor"){const m=Nl(d,g,{id:`${h.name}-top`});o.push(m);const y=Nl(u,g,{id:`${h.name}-bottom`});o.push(y);const C=c(h,d);if(C?.tagName!=="line")throw"Line not found";const x=Number(C.getAttribute("x1")),b=Number(C.getAttribute("y1")),S=Number(C.getAttribute("x2")),B=y.find(F=>F.type==="ellipse");if(B){const F=B.y,L=Ci(C,x,b,S,F);s.push(L)}const w=m.find(F=>F.type==="ellipse"),v=y.find(F=>F.type==="ellipse");w?.id&&v?.id&&(a[h.name]={topId:w.id,bottomId:v.id,bindType:"ellipse"})}}),{nodes:o,lines:s,actorMap:a}},_1=(e,t,r)=>{const i=[],o=Array.from(t.querySelectorAll('[class*="messageLine"]')),s=Object.keys(ql),a=e.filter(n=>s.includes(n.type.toString()));return o.forEach((n,l)=>{const c=a[l],h=ql[c.type],d=L1(n,{label:c?.message,strokeStyle:F1(c.type),endArrowhead:h==="SOLID_OPEN"||h==="DOTTED_OPEN"?null:"arrow"}),u=r[c.from],g=r[c.to];u?.topId&&g?.topId&&(d.start={type:u.bindType||"rectangle",id:u.topId},d.end={type:g.bindType||"rectangle",id:g.topId}),E1(n,d),i.push(d)}),i},M1=(e,t)=>{const r=Array.from(t.querySelectorAll(".note")).map(s=>s.parentElement),i=e.filter(s=>s.type===Nt.NOTE),o=[];return r.forEach((s,a)=>{if(!s)return;const n=s.firstChild,l=i[a].message,c=De(n,"rectangle",{label:{text:l},subtype:"note"}),h=n.getAttribute("fill"),d=n.getAttribute("stroke"),u=n.getAttribute("stroke-width"),g=n.getAttribute("stroke-dasharray");h&&h!=="none"&&(c.bgColor=kt(h)),d&&d!=="none"&&(c.strokeColor=kt(d)),u&&(c.strokeWidth=Number(u)),g&&g.trim()&&(c.strokeStyle="dashed"),o.push(c)}),o},I1=e=>{const t=Array.from(e.querySelectorAll("[class*=activation]")),r=[];return t.forEach(i=>{const o=De(i,"rectangle",{label:{text:""},subtype:"activation"});(()=>{const a=i.getAttribute("fill"),n=i.getAttribute("stroke"),l=i.getAttribute("stroke-width"),c=i.getAttribute("stroke-dasharray");a&&a!=="none"&&(o.bgColor=kt(a)),n&&n!=="none"&&(o.strokeColor=kt(n)),l&&(o.strokeWidth=Number(l)),c&&c.trim()&&(o.strokeStyle="dashed")})(),r.push(o)}),r},O1=(e,t)=>{const r=Array.from(t.querySelectorAll(".loopLine")),i=[],o=[],s=[];r.forEach(C=>{const x=Number(C.getAttribute("x1")),b=Number(C.getAttribute("y1")),S=Number(C.getAttribute("x2")),B=Number(C.getAttribute("y2")),w=Ci(C,x,b,S,B);w.strokeStyle="dotted",w.strokeColor="#adb5bd",w.strokeWidth=2,i.push(w)});const a=Array.from(t.querySelectorAll(".loopText")),n=new Set([Nt.LOOP_START,Nt.ALT_START,Nt.ALT_ELSE,Nt.OPT_START,Nt.PAR_START,Nt.PAR_AND,Nt.CRITICAL_START,Nt.CRITICAL_OPTION,Nt.BREAK_START,Nt.PAR_OVER_START]),l=e.filter(C=>n.has(C.type)).map(C=>C.message),c=e.filter(C=>C.type===Nt.CRITICAL_START).map(C=>C.message),h=[];a.forEach(C=>{const x=h[h.length-1],b=x?.[x.length-1],S=C.getBBox().y,B=b?.getBBox().y,w=parseFloat(getComputedStyle(C).fontSize)||20;b?.parentElement===C.parentElement&&B!==void 0&&Math.abs(S-B)<=w*1.5?x.push(C):h.push([C])});const d=new Set(l.map((C,x)=>x)),u=C=>C.replace(/\s+/g," ").trim(),g=C=>{const x=u(C.match(/^\[([\s\S]*)\]$/)?.[1]??C),b=Array.from(d).find(S=>u(l[S])===x);if(b!==void 0)return d.delete(b),l[b]};h.forEach(C=>{const x=C[0],b=C.map(v=>lo(v)).join(`
324
+ `),S=g(b),B=Hg(x,b);if(C.length>1){const v=C.map($=>$.getBBox()),F=Number(x.getAttribute("x")),L=Math.min(...v.map($=>$.y)),P=Math.max(...v.map($=>$.y+$.height));B.width=Math.max(...v.map($=>$.width)),B.height=Math.max(P-L,b.split(`
325
+ `).length*B.fontSize*1.25),B.x=F,B.textAlign="center"}S!==void 0&&c.includes(S)&&(B.x+=16),o.push(B)});const m=Array.from(t?.querySelectorAll(".labelBox")),y=Array.from(t?.querySelectorAll(".labelText"));return m.forEach((C,x)=>{const b=y[x]?lo(y[x]):"",S=De(C,"rectangle",{label:{text:b}});S.strokeColor="#adb5bd",S.bgColor="#e9ecef",S.width=void 0,s.push(S)}),{lines:i,texts:o,nodes:s}},D1=e=>{const t=Array.from(e.querySelectorAll(".rect")).filter(i=>i.parentElement?.tagName!=="g"),r=[];return t.forEach(i=>{const o=De(i,"rectangle",{label:{text:""},subtype:"highlight"});r.push(o)}),r},$1=(e,t,r,i,o,s,a)=>{const n=e.flat(),l=n.filter(u=>u.type==="rectangle"&&u.subtype==="actor"&&!!u.id?.endsWith("-top")),c=n.filter(u=>u.type==="rectangle"&&u.subtype==="actor"&&!!u.id?.endsWith("-bottom")),h=Math.max(0,...l.map(u=>{const g=u.label?.text?.split(`
326
+ `).length||1,m=u.label?.fontSize||16;return g*m*1.25+10-(u.height||0)})),d=Math.max(h,...n.filter(u=>u.type==="text"&&!!u.id?.includes("-top-")&&u.text.includes(`
327
+ `)).map(u=>{const g=Math.min(...t.map(m=>m.startY));return u.y+(u.height||0)+5-g}));d<=0||(l.forEach(u=>{u.height=(u.height||0)+h}),c.forEach(u=>{u.y+=d,u.height=(u.height||0)+h}),n.forEach(u=>{u.id?.includes("-bottom-")&&(u.type==="line"||u.type==="arrow"?(u.startY+=d,u.endY+=d):u.y+=d)}),t.forEach(u=>{u.startY+=h,u.endY+=d}),r.forEach(u=>{u.startY+=d,u.endY+=d,u.sequenceNumber&&(u.sequenceNumber.y+=d)}),[...i,...o,...s].forEach(u=>{u.y+=d}),a?.lines.forEach(u=>{u.startY+=d,u.endY+=d}),a?.texts.forEach(u=>{u.y+=d}),a?.nodes.forEach(u=>{u.y+=d}))},P1=(e,t)=>{const r=e.db,i=[],s=r.getBoxes().map(C=>({...C,name:typeof C.name=="string"?Gt(C.name):C.name,fill:kt(C.fill||"")})),a=D1(t),n=r.getActors(),{nodes:l,lines:c,actorMap:h}=A1(n,t),d=r.getMessages().map(C=>({...C,message:typeof C.message=="string"?Gt(C.message):C.message})),u=_1(d,t,h),g=M1(d,t),m=I1(t),y=O1(d,t);return $1(l,c,u,a,g,m,y),i.push(a),i.push(...l),i.push(g),i.push(m),{type:"sequence",lines:c,arrows:u,nodes:i,loops:y,groups:s}},R1=e=>{const t={};return e&&e.forEach(r=>{he(r).forEach(({property:i,value:o})=>{i&&o&&(t[i]=kt(o))})}),t},$i={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},zl={LINE:0,DOTTED_LINE:1},Hl=16,q1=e=>{let t;switch(e){case zl.LINE:t="solid";break;case zl.DOTTED_LINE:t="dotted";break;default:t="solid"}return t},Yl=e=>{let t;switch(e){case $i.AGGREGATION:t="diamond_outline";break;case $i.COMPOSITION:t="diamond";break;case $i.EXTENSION:t="triangle_outline";break;case"none":t=null;break;case $i.DEPENDENCY:default:t="arrow";break}return t},hs=(e,t)=>{let r=0,i=0,o=e;for(;o&&o!==t;){const{transformX:s,transformY:a}=Je(o);r+=s,i+=a,o=o.parentElement}return{tx:r,ty:i}},jl=new Set(["triangle_outline","diamond","diamond_outline"]),Yg=(e,t=.5)=>{if(e.length<=2)return[...e];const r=[e[0]];for(let i=1;i<e.length-1;i++){const o=r[r.length-1],s=e[i],a=e[i+1],n=a.x-o.x,l=a.y-o.y,c=Math.hypot(n,l);if(!c)continue;const d=Math.abs(n*(s.y-o.y)-l*(s.x-o.x))/c,u=((s.x-o.x)*n+(s.y-o.y)*l)/(c*c);d<=t&&u>=-t&&u<=1+t||r.push(s)}return r.push(e[e.length-1]),r},jg=e=>{const t=Zs(xh(e).map(i=>[i.x,i.y])).map(([i,o])=>({x:i,y:o})),r=Qs(e);return r&&t.length>=2&&(t[0]={x:r.startX,y:r.startY},t[t.length-1]={x:r.endX,y:r.endY}),Yg(t)},Xl=(e,t,r)=>{const i=e.x-t.x,o=e.y-t.y,s=Math.hypot(i,o);return s?{x:e.x+i/s*r,y:e.y+o/s*r}:e},N1=(e,t)=>{const r=Zs(t.map(s=>[s.x,s.y])).map(([s,a])=>({x:s,y:a}));if(r.length<2)throw new Error("Arrow route must contain at least two points");const i=r[0],o=r[r.length-1];e.startX=i.x,e.startY=i.y,e.endX=o.x,e.endY=o.y,e.points=r.map(s=>[s.x-i.x,s.y-i.y])},W1=e=>{const t=e.points?.map(([s,a])=>({x:e.startX+s,y:e.startY+a})).filter(s=>Number.isFinite(s.x)&&Number.isFinite(s.y));if(!t||t.length<2)return e;const r=[...t],i=!!e.startArrowhead&&jl.has(e.startArrowhead),o=!!e.endArrowhead&&jl.has(e.endArrowhead);if(!i&&!o)return e;if(i&&(r[0]=Xl(r[0],r[1],Hl)),o){const s=r.length-1;r[s]=Xl(r[s],r[s-1],Hl)}return N1(e,r),e},z1=(e,t)=>{const r=kt(e.getAttribute("stroke")||getComputedStyle(e).stroke||""),i=parseFloat(e.getAttribute("stroke-width")||getComputedStyle(e).strokeWidth||"1");ce(r)&&r!=="none"&&(t.strokeColor=r),Number.isFinite(i)&&i>0&&(t.strokeWidth=i)},H1=e=>{const t=[];return e.forEach(r=>{jg(r).forEach(i=>{const o=t[t.length-1];o&&o.x===i.x&&o.y===i.y||t.push(i)})}),Yg(t)},Xg=(e,t,r)=>{if(e.length<2)throw new Error(`Class diagram edge ${t?.id||"<unknown>"} is missing usable path points`);const i=e[0],o=e[e.length-1],s=en(i.x,i.y,o.x,o.y,{id:t?.getAttribute("data-id")||t?.id||void 0,...r,points:e.map(a=>[a.x-i.x,a.y-i.y])});return t&&z1(t,s),W1(s)},Gg=(e,t)=>Xg(H1(e),e[0],t),Y1=(e,t)=>{const r=jg(e);return Xg([r[0],r[r.length-1]],e,t)},j1=(e,t)=>Gg([e],t),X1=(e,t)=>[`${e}-cyclic-special-1`,`${e}-cyclic-special-mid`,`${e}-cyclic-special-2`].map(i=>t.querySelector(`path[id="${i}"][data-edge="true"]`)).filter(i=>i!==null),G1=e=>e.points?.map(([t,r])=>({x:e.startX+t,y:e.startY+r})).filter(t=>Number.isFinite(t.x)&&Number.isFinite(t.y))||[],Gl=(e,t)=>{const r=G1(e);if(r.length<2)return null;const i=t==="start",o=i?r[0]:r[r.length-1],s=i?r[1]:r[r.length-2],a=s.x===o.x?i?-1:1:Math.sign(s.x-o.x),n=s.y===o.y?1:Math.sign(s.y-o.y);return{x:o.x+a*20,y:o.y+(n>=0?12:-28)}},U1=(e,t)=>{let r=e;for(;r&&r!==t;){if(r.classList.contains("annotation-group")||r.classList.contains("label-group"))return"header";if(r.classList.contains("members-group"))return"members";if(r.classList.contains("methods-group"))return"methods";r=r.parentElement}return"other"},V1=(e,t,r)=>{const i=[],o=[],s=[];return Object.values(e).forEach(a=>{const{domId:n,id:l}=a,c=ae(),h=R1(a.styles||a.cssStyles);let d;try{d=r?r(l):void 0}catch{d=void 0}const u=R=>{const Y=new RegExp(`^classId-${R}(?:-|$)`);return Array.from(t.querySelectorAll("[id]")).filter(rt=>Y.test(rt.id))[0]},g=d&&t.querySelector(`#${d}`)||t.querySelector(`#${n}`)||t.querySelector(`[data-id='${l}']`)||u(l);if(!g)throw Error(`DOM Node with id ${n} not found`);const m=g.querySelector("rect")||g,y=m.getBBox(),{tx:C,ty:x}=hs(m,t),b={type:"rectangle",id:l,groupId:c,x:y.x+C,y:y.y+x,width:y.width,height:y.height,metadata:{classId:l}},S=m.getAttribute("fill"),B=m.getAttribute("stroke"),w=m.getAttribute("stroke-width"),v=m.getAttribute("stroke-dasharray"),F=getComputedStyle(m),L=kt(S||h.fill||(S?F.fill:"")),P=kt(B||h.stroke||(B?F.stroke:"")),$=w||h["stroke-width"]||(w?F.strokeWidth:""),N=v||h["stroke-dasharray"]||(v?F.strokeDasharray==="none"?"":F.strokeDasharray:""),J=R=>{if(!R||!ce(R))return!1;const Y=R.toLowerCase();return!(Y==="none"||Y==="transparent"||Y==="rgba(0, 0, 0, 0)"||Y==="black"||Y==="#000"||Y==="#000000"||Y==="rgb(0, 0, 0)"||Y==="rgba(0, 0, 0, 1)")};J(L)?b.bgColor=L:b.bgColor=void 0,J(P)?b.strokeColor=P:b.strokeColor=void 0,$?b.strokeWidth=Number($):b.strokeWidth=void 0,N&&N.trim().length>0?b.strokeStyle="dashed":b.strokeStyle=void 0,i.push(b),[...Array.from(g.querySelectorAll("line")),...Array.from(g.querySelectorAll("g.divider path"))].forEach(R=>{const{tx:Y,ty:lt}=hs(R,t);let rt,St,xt,vt;if(R.tagName.toLowerCase()==="line")rt=Number(R.getAttribute("x1"))+Y,St=Number(R.getAttribute("y1"))+lt,xt=Number(R.getAttribute("x2"))+Y,vt=Number(R.getAttribute("y2"))+lt;else{const Tt=R.getBBox();rt=Tt.x+Y,xt=Tt.x+Tt.width+Y;const ht=Tt.y+Tt.height/2+lt;St=ht,vt=ht}if(rt===xt&&St===vt)return;const bt=Ci(R,rt,St,xt,vt,{groupId:c,id:ae()});b.strokeColor?bt.strokeColor=b.strokeColor:bt.strokeColor=void 0,b.strokeWidth!==void 0?bt.strokeWidth=b.strokeWidth:bt.strokeWidth=void 0,b.strokeStyle?bt.strokeStyle=b.strokeStyle:bt.strokeStyle=void 0,bt.metadata={classId:l},o.push(bt)});const z=Array.from(g.querySelectorAll("text, foreignObject")),G=[];z.forEach(R=>{const Y=R.tagName.toLowerCase()==="foreignobject",lt=lo(R);if(!lt)return;const rt=R.getBBox(),{ty:St}=hs(R,t);let xt=parseFloat(getComputedStyle(R).fontSize||"");if(Y&&(!Number.isFinite(xt)||!xt)){const bt=R.querySelector("div, span, p");bt&&(xt=parseFloat(getComputedStyle(bt).fontSize||""))}(!Number.isFinite(xt)||xt<=0)&&(xt=Math.max(12,rt.height*.6)),xt=xt*.9;const vt=Qa(R,h.color);G.push({section:U1(R,g),text:lt,x:rt.x,y:rt.y+St,width:b&&b.width?Math.max(b.width-8,rt.width):rt.width,height:rt.height,fontSize:xt,color:vt})});const I=G.filter(R=>R.section==="header").sort((R,Y)=>R.y-Y.y||R.x-Y.x);if(!b.label){const R=I.length===0&&G.length===1?G:I;R.length>0&&(b.label={text:R.map(Y=>Y.text).join(`
328
+ `),fontSize:Math.max(...R.map(Y=>Y.fontSize)),color:R.find(Y=>Y.color)?.color,verticalAlign:"top"})}G.filter(R=>I.length>0?R.section!=="header":!(b.label&&G.length===1)).forEach(R=>{const Y=uo((b?.x||0)+4,R.y,R.text,{width:R.width,height:R.height,fontSize:R.fontSize,color:R.color,id:ae(),groupId:c,metadata:{classId:l}});s.push(Y)})}),{nodes:i,lines:o,text:s}},K1=(e,t,r,i)=>{const o=Array.from(r.querySelectorAll('.edgePaths path[data-edge="true"]:not([id^="edgeNote"]):not([id*="-cyclic-special-"])'));if(e.length===0)return{arrows:[],text:[]};const s=[],a=[];let n=0;return e.forEach(l=>{const{id1:c,id2:h,relation:d}=l,u=t.find($=>$.id===c),g=t.find($=>$.id===h);if(!u)throw new Error(`parseRelations: Cannot find node with id ${c}`);if(!g)throw new Error(`parseRelations: Cannot find node with id ${h}`);const m=q1(d.lineType),y=Yl(d.type1),C=Yl(d.type2);let x;if(c===h){const $=X1(c,r);if(!$.length)throw new Error(`parseRelations: Cannot find rendered SVG edge for relation ${c} -> ${h}`);x=Gg($,{strokeStyle:m,startArrowhead:y,endArrowhead:C,label:l.title?{text:Gt(l.title)}:void 0,start:{type:"rectangle",id:u.id},end:{type:"rectangle",id:g.id}})}else{const $=o[n];if(!$)throw new Error(`parseRelations: Cannot find rendered SVG edge for relation ${c} -> ${h}`);n+=1,x=Y1($,{strokeStyle:m,startArrowhead:y,endArrowhead:C,label:l.title?{text:Gt(l.title)}:void 0,start:{type:"rectangle",id:u.id},end:{type:"rectangle",id:g.id}})}s.push(x);const{relationTitle1:b,relationTitle2:S}=l,B=c===h,w=20,v=15,F=15;let L,P;if(b&&b!=="none"){if(B){const N=Gl(x,"start");N&&(L=N.x,P=N.y)}else switch(i){case"TB":L=x.startX-w,x.endX<x.startX&&(L-=F),P=x.startY+v;break;case"BT":L=x.startX+w,x.endX>x.startX&&(L+=F),P=x.startY-v;break;case"LR":L=x.startX+w,P=x.startY+v,x.endY>x.startY&&(P+=F);break;case"RL":L=x.startX-w,P=x.startY-v,x.startY>x.endY&&(P-=F);break;default:L=x.startX-w,P=x.startY+v}L??=x.startX-w,P??=x.startY+v;const $=uo(L,P,Gt(b),{fontSize:16});a.push($)}if(S&&S!=="none"){if(B){const N=Gl(x,"end");N&&(L=N.x,P=N.y)}else switch(i){case"TB":L=x.endX+w,x.endX<x.startX&&(L+=F),P=x.endY-v;break;case"BT":L=x.endX-w,x.endX>x.startX&&(L-=F),P=x.endY+v;break;case"LR":L=x.endX-w,P=x.endY-v,x.endY>x.startY&&(P-=F);break;case"RL":L=x.endX+w,P=x.endY+v,x.startY>x.endY&&(P+=F);break;default:L=x.endX+w,P=x.endY-v}L??=x.endX+w,P??=x.endY+v;const $=uo(L,P,Gt(S),{fontSize:16});a.push($)}}),{arrows:s,text:a}},Z1=(e,t,r)=>{const i=[],o=[];return e.forEach((s,a)=>{const{id:n,text:l,class:c}=s,h=t.querySelector(`#${n}`);if(!h)throw new Error(`Node with id ${n} not found!`);const{transformX:d,transformY:u}=Je(h),g=h.firstChild,m=De(g,"rectangle",{id:n,subtype:"note",label:{text:Gt(l)}});if(Object.assign(m,{x:m.x+d,y:m.y+u}),i.push(m),c){const y=r.find(v=>v.id===c);if(!y)throw new Error(`class node with id ${c} not found!`);const C=t.querySelector(`path[id="edgeNote${a+1}"][data-edge="true"]`);if(C){o.push(j1(C,{strokeStyle:"dotted",startArrowhead:null,endArrowhead:null,start:{id:m.id,type:"rectangle"},end:{id:y.id,type:"rectangle"}}));return}const x=m.x+(m.width||0)/2,b=m.y+(m.height||0),S=x,B=y.y,w=en(x,b,S,B,{strokeStyle:"dotted",startArrowhead:null,endArrowhead:null,start:{id:m.id,type:"rectangle"},end:{id:y.id,type:"rectangle"}});o.push(w)}}),{notes:i,connectors:o}},Q1=(e,t)=>{const r=e.db,i=r.getDirection?.()||"TB",o=[],s=[],a=[],n=[],l=r.getNamespaces?.()||[],c=r.getClasses?.()||{},h=c instanceof Map?Object.fromEntries(c):c;if(h&&Object.keys(h).length){const x=typeof r.lookUpDomId=="function"?r.lookUpDomId.bind(r):void 0,b=V1(h,t,x);o.push(b.nodes),s.push(...b.lines),a.push(...b.text),n.push(...b.nodes)}const d=r.getRelations?.()||[],{arrows:u,text:g}=K1(d,n,t,i),m=r.getNotes?.()||[],{notes:y,connectors:C}=Z1(m,t,n);return o.push(y),u.push(...C),a.push(...g),{type:"class",nodes:o,lines:s,arrows:u,text:a,namespaces:l}},Ul=18,J1=e=>{const t={};return e&&e.forEach(r=>{he(r).forEach(({property:i,value:o})=>{i&&o&&(t[i]=kt(o))})}),t},t2=e=>{if(e==null||e==="")return;const t=typeof e=="number"?e:parseFloat(kt(e));if(!(!Number.isFinite(t)||t<=0))return t},rn=(e,t)=>{let r=0,i=0,o=e;for(;o&&o!==t;){const{transformX:s,transformY:a}=Je(o);r+=s,i+=a,o=o.parentElement}return{tx:r,ty:i}},e2=e=>lo(e),r2=e=>{const t=e.querySelector("text, foreignObject, div, span, p")||e;let r=parseFloat(getComputedStyle(t).fontSize||"");return(!Number.isFinite(r)||r<=0)&&(r=Math.max(12,e.getBBox().height*.75)),r},i2=(e,t,r)=>{const i=e2(e);if(!i)return null;const o=e.getBBox(),{tx:s,ty:a}=rn(e,t);return{className:e.getAttribute("class")||"",text:i,x:o.x+s,y:o.y+a,width:o.width,height:o.height,fontSize:r2(e),color:Qa(e,r)}},o2=(e,t,r,i,o,s,a)=>{const{tx:n,ty:l}=rn(e,t);let c=0,h=0,d=0,u=0;if(e.tagName.toLowerCase()==="line")c=Number(e.getAttribute("x1"))+n,h=Number(e.getAttribute("y1"))+l,d=Number(e.getAttribute("x2"))+n,u=Number(e.getAttribute("y2"))+l;else{const m=Qs(e);if(!m)return null;c=m.startX+n,h=m.startY+l,d=m.endX+n,u=m.endY+l}const g={type:"line",id:ae(),groupId:r,startX:c,startY:h,endX:d,endY:u,metadata:{entityId:i}};return o&&ce(o)&&o!=="none"&&(g.strokeColor=o),s!==void 0&&(g.strokeWidth=s),a&&(g.strokeStyle=a),g},Vl=e=>{switch(e?.toLowerCase()){case"one":return"cardinality_one";case"many":return"cardinality_many";case"only_one":return"cardinality_exactly_one";case"one_or_more":return"cardinality_one_or_many";case"zero_or_one":return"cardinality_zero_or_one";case"zero_or_more":return"cardinality_zero_or_many";default:return null}},s2=e=>{switch(e){case"dotted":return"dotted";case"dashed":return"dashed";default:return"solid"}},a2=(e,t)=>{const r=t.querySelector(`path[id="${e.id}"][data-edge="true"]`);return r?[r]:e.start!==e.end?[]:[`${e.start}-cyclic-special-1`,`${e.start}-cyclic-special-mid`,`${e.start}-cyclic-special-2`].map(o=>t.querySelector(`path[id="${o}"][data-edge="true"]`)).filter(o=>o!==null)},n2=e=>{const t=[];return e.forEach(r=>{xh(r).forEach(i=>{const o=t[t.length-1];o&&o.x===i.x&&o.y===i.y||t.push(i)})}),t},l2=(e,t)=>{const r=t.querySelector(`[id="${e.id}"]`);if(!r)throw new Error(`ER entity ${e.id} not found in rendered SVG`);const i=e.attributes.length?ae():void 0,o=r.getBBox(),{tx:s,ty:a}=rn(r,t),n=J1([...e.cssStyles||[],...e.cssCompiledStyles||[]]),l=kt(n.fill||""),c=kt(n.stroke||""),h=t2(n["stroke-width"]),d=kt(n["stroke-dasharray"]||""),u=Array.from(r.querySelectorAll("g.label")).map(S=>i2(S,t,n.color)).filter(S=>S!==null),g=u.find(S=>S.className.includes("name"))||u[0],m=u.filter(S=>S!==g),y=g?.text||Gt(e.alias||e.label||""),C={type:"rectangle",id:e.id,groupId:i,x:o.x+s,y:o.y+a,width:o.width,height:o.height,label:{text:y,fontSize:e.attributes.length?Ul:g?.fontSize||16,color:g?.color,textAlign:"center",verticalAlign:e.attributes.length?"top":"middle"},metadata:{entityId:e.id,entityLabel:e.label,entityAlias:e.alias}};ce(l)&&l!=="none"&&(C.bgColor=l),ce(c)&&c!=="none"&&(C.strokeColor=c),h&&Number.isFinite(h)&&h>0&&(C.strokeWidth=h),d&&d!=="none"&&(C.strokeStyle="dashed");const x=Array.from(r.querySelectorAll(".divider path, path.divider, line.divider")).map(S=>o2(S,t,i,e.id,C.strokeColor,C.strokeWidth,C.strokeStyle)).filter(S=>S!==null),b=m.map(S=>uo(S.x,S.y,S.text,{id:ae(),groupId:i,width:S.width,height:S.height,fontSize:Ul,color:S.color,metadata:{entityId:e.id}}));return{container:C,lines:x,text:b}},h2=(e,t)=>{const r=a2(e,t);if(!r.length)throw new Error(`ER relationship ${e.id} not found in rendered SVG`);const i=n2(r);if(i.length<2)throw new Error(`ER relationship ${e.id} is missing usable path points`);const o=i[0],s=i[i.length-1],a=r[0],n=kt(a.getAttribute("stroke")||getComputedStyle(a).stroke||""),l=Number(a.getAttribute("stroke-width")||getComputedStyle(a).strokeWidth||1),c=en(o.x,o.y,s.x,s.y,{id:e.id,label:e.label?{text:Gt(e.label),fontSize:16,textAlign:"center"}:void 0,strokeStyle:s2(e.pattern),startArrowhead:Vl(e.arrowTypeStart),endArrowhead:Vl(e.arrowTypeEnd),start:{type:"rectangle",id:e.start},end:{type:"rectangle",id:e.end},points:i.map(h=>[h.x-o.x,h.y-o.y])});return ce(n)&&n!=="none"&&(c.strokeColor=n),Number.isFinite(l)&&l>0&&(c.strokeWidth=l),c},c2=(e,t)=>{const r=e.getData(),i=r.nodes,o=r.edges,s=[],a=[],n=[];i.forEach(c=>{const h=l2(c,t);s.push(h.container),a.push(...h.lines),n.push(...h.text)});const l=o.map(c=>h2(c,t));return{type:"erd",nodes:[s],lines:a,arrows:l,text:n}},ar=e=>{const t=kt(e||"");return!t||t==="none"||t==="transparent"||t==="rgba(0, 0, 0, 0)"||t==="rgba(0,0,0,0)"?!1:ce(t)},Ug=(e,t,r)=>{switch(t){case At.FILL:case At.STROKE:ar(r)&&(e[t]=kt(r));break;case At.STROKE_WIDTH:case At.STROKE_DASHARRAY:kt(r)&&(e[t]=kt(r));break}},Vg=(e,t,r)=>{t===te.COLOR&&ar(r)&&(e[te.COLOR]=kt(r))},d2=(e,t,r)=>{e&&he(e).forEach(({property:i,value:o})=>{Ug(t,i,o),Vg(r,i,o)})},u2=(e,t)=>{e&&he(e).forEach(({property:r,value:i})=>{if(r===At.FILL&&ar(i)){t[te.COLOR]=kt(i);return}Vg(t,r,i)})},g2=e=>{const t=new Set;return e.filter(Boolean).forEach(r=>{he(r||"").forEach(({property:i})=>{t.add(i)})}),t},p2=(e,t,r)=>{if(!e)return;[[At.FILL,e.getAttribute("fill")],[At.STROKE,e.getAttribute("stroke")],[At.STROKE_WIDTH,e.getAttribute("stroke-width")],[At.STROKE_DASHARRAY,e.getAttribute("stroke-dasharray")]].forEach(([o,s])=>{if(!r.has(o)||t[o])return;const a=kt(s||"");a&&Ug(t,o,a)})},f2=(e,t,r)=>{if(!e)return;const i=[e,...Array.from(e.querySelectorAll("text, foreignObject, div, span, p"))];for(const o of i){if(t[te.COLOR]||(r.has(te.COLOR)||r.has(At.FILL))&&(u2(o.getAttribute("style"),t),t[te.COLOR]))break;const s=kt(o.getAttribute("fill")||o.getAttribute("color")||"");(r.has(te.COLOR)||r.has(At.FILL))&&ar(s)&&(t[te.COLOR]=s)}},on=(e,t)=>{let r=0,i=0,o=e;for(;o&&o!==t;){const{transformX:s,transformY:a}=Je(o);r+=s,i+=a,o=o.parentElement}return{tx:r,ty:i}},m2=(e,t)=>{const r=e.getBBox(),{tx:i,ty:o}=on(e,t);return{x:r.x+i,y:r.y+o,width:r.width,height:r.height}},y2=(e,t)=>{const r=e.querySelector("line.divider");if(!r)return;const{tx:i,ty:o}=on(r,t);return{startX:Number(r.getAttribute("x1"))+i,startY:Number(r.getAttribute("y1"))+o,endX:Number(r.getAttribute("x2"))+i,endY:Number(r.getAttribute("y2"))+o}},C2=e=>{const t=e.getBBox();return Math.abs(t.width*t.height)},Kl=(e,t)=>{const r=e.getAttribute("style");if(!r)return;const i=he(r).find(o=>o.property===t);if(i)return kt(i.value)},Gs=(e,t)=>{const r=e.map(o=>({element:o,area:C2(o)})).filter(({area:o})=>Number.isFinite(o)&&o>0);return r.length===0?null:r.sort((o,s)=>t==="largest"?s.area-o.area:o.area-s.area)[0].element},x2=(e,t)=>{if(!e||!t.has(At.FILL)&&!t.has(At.STROKE))return;const r=kt(e.getAttribute("fill")||Kl(e,At.FILL)||""),i=kt(e.getAttribute("stroke")||Kl(e,At.STROKE)||"");if(ar(r))return r;if(ar(i))return i},b2=(e,t)=>{const r=Array.from(e.querySelectorAll("circle, ellipse, path")),i=Gs(r,"smallest");return x2(i,t)},k2=e=>{if(e.length<2)return e;const t=e.slice(1),r=t.filter(i=>i.trim().length>0).reduce((i,o)=>{const s=o.match(/^\s*/)?.[0].length??0;return Math.min(i,s)},Number.POSITIVE_INFINITY);return!Number.isFinite(r)||r<=0?e.map(i=>i.trimEnd()):[e[0].trimEnd(),...t.map(i=>i.replace(new RegExp(`^\\s{0,${r}}`),"").trimEnd())]},S2=e=>{const t=Array.isArray(e.label)?e.label.map(i=>Gt(i)):Gt(e.label||"").split(`
329
+ `);return k2(t).join(`
330
+ `)},T2=e=>e.description?(Array.isArray(e.description)?e.description:[e.description]).map(r=>Gt(r)).filter(r=>r.length>0):[],w2=e=>{const t=new Set,r=o=>(o&&t.add(o),o),i=o=>{const s=o.find(a=>!t.has(a));return r(s||null)};return o=>{const s=e.querySelector([...o.domId?[`[id=${tr(o.domId)}]`]:[],`[id=${tr(o.id)}]`,`[data-id=${tr(o.id)}]`].join(", "));if(s)return r(s);switch(o.shape){case"divider":return i(Array.from(e.querySelectorAll("g.statediagram-cluster-alt")));case"stateStart":return i(Array.from(e.querySelectorAll("g.node.default")).filter(a=>a.querySelector("circle.state-start")));case"stateEnd":return i(Array.from(e.querySelectorAll("g.node.default")).filter(a=>!a.querySelector("circle.state-start")));default:return null}}},B2=(e,t)=>{switch(t){case"roundedWithTitle":return e.querySelector("rect.outer")||e.querySelector("rect")||e;case"divider":return e.querySelector("rect.divider")||e.querySelector("rect")||e;case"rectWithTitle":return e.querySelector("rect.outer")||e.querySelector("rect")||e;case"stateStart":return Gs(Array.from(e.querySelectorAll("circle, ellipse, path")),"largest")||e;case"stateEnd":return Gs(Array.from(e.querySelectorAll("circle, ellipse, path")),"largest")||e;default:return e.querySelector("rect, path, circle, ellipse, polygon")||e}},v2=(e,t,r)=>{const i=r(e);if(!i)throw new Error(`State node element not found for "${e.id}"`);const o=B2(i,e.shape),s={},a={},n=[e.labelStyle,...e.cssCompiledStyles||[],...e.cssStyles||[]],l=g2(n);n.filter(Boolean).forEach(h=>{d2(h,s,a)}),p2(o,s,l),f2(i,a,l);const c=m2(o,t);return{id:e.id,shape:e.shape,text:S2(e),description:T2(e),x:c.x,y:c.y,width:c.width,height:c.height,parentId:e.parentId,position:e.position,containerStyle:s,labelStyle:a,dividerLine:e.shape==="rectWithTitle"?y2(i,t):void 0,endInnerColor:e.shape==="stateEnd"?b2(i,l):void 0,isRenderable:e.shape!=="noteGroup"}},L2=(e,t)=>{const r=t.querySelector(`path[id=${tr(e.id)}]`);if(!r)return null;const{tx:i,ty:o}=on(r,t),s=bh(r,{x:i,y:o},"MCL");if(s.reflectionPoints.length<2)return null;const a={},n=(c,h)=>{switch(c){case At.STROKE:ar(h)&&(a.strokeColor=kt(h));break;case At.STROKE_WIDTH:{const d=parseFloat(kt(h));Number.isFinite(d)&&d>0&&(a.strokeWidth=d);break}case At.STROKE_DASHARRAY:kt(h)&&(a.strokeStyle="dashed");break}};[e.style].filter(Boolean).forEach(c=>{he(c||"").forEach(({property:h,value:d})=>{n(h,d)})});const l=e.arrowhead==="none"||e.classes?.includes("note-edge");return{id:e.id,start:e.start,end:e.end,text:Gt(e.label||""),...s,strokeColor:a.strokeColor,strokeWidth:a.strokeWidth,strokeStyle:l?"dashed":a.strokeStyle,isNoteEdge:l}},F2=(e,t)=>{const{nodes:r,edges:i}=e.getData(),o=w2(t);return{type:"state",nodes:r.map(s=>v2(s,t,o)),edges:i.map(s=>L2(s,t)).filter(s=>s!==null)}};let Zl=Promise.resolve();const E2=e=>{const t=Zl.then(e,e);return Zl=t.then(()=>{},()=>{}),t},Yi=e=>Array.isArray(e)?e.map(t=>no(t,"<br/>")):typeof e=="string"?no(e,"<br/>"):e,A2=e=>no(e.replace(/&lt;br\s*\/?&gt;/gi,`
331
+ `),`
332
+ `),cs=(e,t)=>{t.forEach(r=>{e[r]!==void 0&&(e[r]=Yi(e[r]))})},Pi=({nodes:e,edges:t})=>{e.forEach(r=>{cs(r,["label","text","description"]),[...r.members??[],...r.methods??[]].forEach(i=>{i.text=A2(i.text)}),r.attributes?.forEach(i=>{cs(i,["comment"])})}),t.forEach(r=>{cs(r,["label","startLabelRight","endLabelLeft"])})},_2={flowchart:{stub:`flowchart TD
333
+ A --> B`,hooks:[["getData",Pi]]},state:{stub:`stateDiagram-v2
334
+ [*] --> A`,hooks:[["getData",Pi]]},class:{stub:`classDiagram
335
+ class A`,hooks:[["getData",Pi]]},er:{stub:`erDiagram
336
+ A ||--o{ B : has`,hooks:[["getData",Pi]]},sequence:{stub:`sequenceDiagram
337
+ A->>B: message`,hooks:[["getActors",e=>e.forEach(t=>{t.description=Yi(t.description)})],["getMessages",e=>e.forEach(t=>{t.message=Yi(t.message)})],["getBoxes",e=>e.forEach(t=>{t.name=Yi(t.name)})]]}},M2={"flowchart-v2":"flowchart",flowchart:"flowchart","flowchart-elk":"flowchart",stateDiagram:"state",state:"state",classDiagram:"class",class:"class",er:"er",sequence:"sequence"};let Us=!1;const ds=new Map,I2=async e=>{const{stub:t,hooks:r}=_2[e],{db:i}=await ui.mermaidAPI.getDiagramFromText(t),o=Object.getPrototypeOf(i);if(r.some(([s])=>typeof o[s]!="function")){console.error(`Line break support unavailable for ${e}`);return}r.forEach(([s,a])=>{const n=o[s];o[s]=function(...l){const c=n.apply(this,l);return Us&&a(c),c}})},O2=async e=>{let t;try{t=M2[ui.detectType(e)]}catch{}if(!t)return;let r=ds.get(t);r||(r=I2(t),ds.set(t,r),r.catch(()=>ds.delete(t))),await r.catch(()=>{})},D2=async(e,t)=>{await O2(e),Us=!0;try{return await t()}finally{Us=!1}},$2=/<br\s*\/?>/gi,P2=async(e,t)=>{try{return await t(e)}catch(r){const i=e.replace($2,"\\n");if(i===e)throw r;try{return await t(i)}catch{throw r}}};let Ql=null,R2=0;const q2=e=>JSON.stringify(e),Jl=e=>{const t=e.querySelector("svg");if(!t)throw new Error("SVG element not found");const r=t.getBoundingClientRect(),i=r.width,o=r.height;t.setAttribute("width",`${i}`),t.setAttribute("height",`${o}`);const s="image/svg+xml",a=unescape(encodeURIComponent(t.outerHTML)),l=`data:image/svg+xml;base64,${btoa(a)}`;return{type:"graphImage",mimeType:s,dataURL:l,width:i,height:o}},N2=(e=Jr)=>{const t=e.themeVariables?.fontSize??Jr.themeVariables.fontSize;return{...Jr,...e,fontSize:t,themeVariables:{...Jr.themeVariables,...e.themeVariables,fontSize:t}}},W2=async(e,t=Jr)=>E2(async()=>{const r=N2(t),i=q2(r);i!==Ql&&(ui.initialize(r),Ql=i);const{parsedDefinition:o,diagram:s}=await P2(e,async c=>({parsedDefinition:c,diagram:await ui.mermaidAPI.getDiagramFromText(hf(c))})),a=`mermaid-to-excalidraw-${R2++}`,n=document.createElement("div");n.setAttribute("style","opacity: 0; position: fixed; z-index: -1; left: -99999px; top: -99999px;");const l=`${a}-container`;n.id=l,document.getElementById(l)?.remove(),document.body.appendChild(n);try{const{svg:c}=await D2(o,()=>ui.render(a,o,n));n.innerHTML=c;let h;try{switch(s.type){case"flowchart-v2":case"graph":{h=v1(s.db,n);break}case"sequence":{h=P1(s,n);break}case"class":case"classDiagram":{h=Q1(s,n);break}case"er":{h=c2(s.db,n);break}case"state":case"stateDiagram":{h=F2(s.db,n);break}default:h=Jl(n)}}catch(d){console.error("Error processing Mermaid diagram:",d),h=Jl(n)}return h}finally{n.remove()}}),z2=async(e,t)=>{const r=t||{},i=parseInt(r.themeVariables?.fontSize??"")||Mr,o=await W2(e,{...r,themeVariables:{...r.themeVariables}});return gf(o,{fontSize:i})},wS=Object.freeze(Object.defineProperty({__proto__:null,parseMermaidToExcalidraw:z2},Symbol.toStringTag,{value:"Module"}));export{ou as $,da as A,wh as B,Hm as C,Tm as D,go as E,bf as F,qy as G,J2 as H,Ox as I,Ix as J,pi as K,Q2 as L,tm as M,$h as N,pn as O,ko as P,zm as Q,lm as R,Rh as S,Z2 as T,eu as U,Ea as V,Zn as W,tS as X,nu as Y,Om as Z,p as _,pm as a,Aa as a0,UC as a1,Gh as a2,Si as a3,Em as a4,ye as a5,Fm as a6,ha as a7,it as a8,at as a9,qh as aa,hS as ab,lS as ac,Ax as ad,Ft as ae,lu as af,st as ag,nS as ah,so as ai,cu as aj,xo as ak,Kt as al,MC as am,wS as an,gm as b,Bt as c,Ph as d,Yt as e,Ie as f,mm as g,Qd as h,ne as i,ki as j,Vh as k,M as l,bi as m,Im as n,ym as o,Cm as p,um as q,eS as r,fm as s,pf as t,TS as u,SS as v,Xm as w,Zt as x,$t as y,bm as z};