@aiquants/markdown 1.2.0 → 1.2.1

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 (238) hide show
  1. package/dist/{_basePickBy-DGJ-oAbP.js → _basePickBy-BAf9TBeP.js} +3 -3
  2. package/dist/{_basePickBy-DGJ-oAbP.js.map → _basePickBy-BAf9TBeP.js.map} +1 -1
  3. package/dist/{_basePickBy-CJeGUXFc.cjs → _basePickBy-DJNTCiEl.cjs} +2 -2
  4. package/dist/{_basePickBy-CJeGUXFc.cjs.map → _basePickBy-DJNTCiEl.cjs.map} +1 -1
  5. package/dist/{_baseUniq-DmmwqgFi.cjs → _baseUniq-oBgpBLxN.cjs} +2 -2
  6. package/dist/{_baseUniq-DmmwqgFi.cjs.map → _baseUniq-oBgpBLxN.cjs.map} +1 -1
  7. package/dist/{_baseUniq-zkWo_1rp.js → _baseUniq-xpz62V3M.js} +2 -2
  8. package/dist/{_baseUniq-zkWo_1rp.js.map → _baseUniq-xpz62V3M.js.map} +1 -1
  9. package/dist/{arc-Do8CANbr.js → arc-Cdp6A92J.js} +2 -2
  10. package/dist/{arc-Do8CANbr.js.map → arc-Cdp6A92J.js.map} +1 -1
  11. package/dist/{arc-DAUA8YnG.cjs → arc-Df6554Se.cjs} +2 -2
  12. package/dist/{arc-DAUA8YnG.cjs.map → arc-Df6554Se.cjs.map} +1 -1
  13. package/dist/architecture-U656AL7Q-BFneEPaI.js +6 -0
  14. package/dist/architecture-U656AL7Q-BFneEPaI.js.map +1 -0
  15. package/dist/{architecture-U656AL7Q-Bk_BCN3G.cjs → architecture-U656AL7Q-DXWeTGXD.cjs} +2 -2
  16. package/dist/architecture-U656AL7Q-DXWeTGXD.cjs.map +1 -0
  17. package/dist/{architectureDiagram-VXUJARFQ-C3_AqxrC.js → architectureDiagram-VXUJARFQ-DrV8Y7rq.js} +4 -4
  18. package/dist/{architectureDiagram-VXUJARFQ-C3_AqxrC.js.map → architectureDiagram-VXUJARFQ-DrV8Y7rq.js.map} +1 -1
  19. package/dist/{architectureDiagram-VXUJARFQ-eU-3tnCG.cjs → architectureDiagram-VXUJARFQ-fEGjFbVc.cjs} +2 -2
  20. package/dist/{architectureDiagram-VXUJARFQ-eU-3tnCG.cjs.map → architectureDiagram-VXUJARFQ-fEGjFbVc.cjs.map} +1 -1
  21. package/dist/{blockDiagram-VD42YOAC-DI0rOR-X.js → blockDiagram-VD42YOAC-Dj9PGaUA.js} +6 -6
  22. package/dist/{blockDiagram-VD42YOAC-DI0rOR-X.js.map → blockDiagram-VD42YOAC-Dj9PGaUA.js.map} +1 -1
  23. package/dist/{blockDiagram-VD42YOAC-CnsJKAH7.cjs → blockDiagram-VD42YOAC-DnIarP1n.cjs} +2 -2
  24. package/dist/{blockDiagram-VD42YOAC-CnsJKAH7.cjs.map → blockDiagram-VD42YOAC-DnIarP1n.cjs.map} +1 -1
  25. package/dist/{c4Diagram-YG6GDRKO-CCs9MC7P.cjs → c4Diagram-YG6GDRKO-B1rWXPSq.cjs} +2 -2
  26. package/dist/{c4Diagram-YG6GDRKO-CCs9MC7P.cjs.map → c4Diagram-YG6GDRKO-B1rWXPSq.cjs.map} +1 -1
  27. package/dist/{c4Diagram-YG6GDRKO-D51PeXS6.js → c4Diagram-YG6GDRKO-DT2-syeR.js} +3 -3
  28. package/dist/{c4Diagram-YG6GDRKO-D51PeXS6.js.map → c4Diagram-YG6GDRKO-DT2-syeR.js.map} +1 -1
  29. package/dist/channel-BIIdftI1.js +6 -0
  30. package/dist/{channel-KAvJVFiL.js.map → channel-BIIdftI1.js.map} +1 -1
  31. package/dist/channel-BOYh8w_6.cjs +2 -0
  32. package/dist/{channel-BaCsO_0A.cjs.map → channel-BOYh8w_6.cjs.map} +1 -1
  33. package/dist/{chunk-4BX2VUAB-RTUYNJ4N.js → chunk-4BX2VUAB-3m-kTV7c.js} +2 -2
  34. package/dist/{chunk-4BX2VUAB-RTUYNJ4N.js.map → chunk-4BX2VUAB-3m-kTV7c.js.map} +1 -1
  35. package/dist/{chunk-4BX2VUAB-CNm_p9u2.cjs → chunk-4BX2VUAB-Ccl0XCCb.cjs} +2 -2
  36. package/dist/{chunk-4BX2VUAB-CNm_p9u2.cjs.map → chunk-4BX2VUAB-Ccl0XCCb.cjs.map} +1 -1
  37. package/dist/{chunk-55IACEB6-Dw6JfE_R.js → chunk-55IACEB6-DFPiIUqS.js} +2 -2
  38. package/dist/{chunk-55IACEB6-Dw6JfE_R.js.map → chunk-55IACEB6-DFPiIUqS.js.map} +1 -1
  39. package/dist/{chunk-55IACEB6-yuqRdS6I.cjs → chunk-55IACEB6-DF_nOrnG.cjs} +2 -2
  40. package/dist/{chunk-55IACEB6-yuqRdS6I.cjs.map → chunk-55IACEB6-DF_nOrnG.cjs.map} +1 -1
  41. package/dist/{chunk-B4BG7PRW-Cu2KwVXL.js → chunk-B4BG7PRW--ytg5kTi.js} +5 -5
  42. package/dist/{chunk-B4BG7PRW-Cu2KwVXL.js.map → chunk-B4BG7PRW--ytg5kTi.js.map} +1 -1
  43. package/dist/{chunk-B4BG7PRW-5i9HWRdu.cjs → chunk-B4BG7PRW-YJstgnSU.cjs} +2 -2
  44. package/dist/{chunk-B4BG7PRW-5i9HWRdu.cjs.map → chunk-B4BG7PRW-YJstgnSU.cjs.map} +1 -1
  45. package/dist/{chunk-DI55MBZ5-D9r0NVIn.js → chunk-DI55MBZ5-BmCH9GqB.js} +4 -4
  46. package/dist/{chunk-DI55MBZ5-D9r0NVIn.js.map → chunk-DI55MBZ5-BmCH9GqB.js.map} +1 -1
  47. package/dist/{chunk-DI55MBZ5-RM4QxlLs.cjs → chunk-DI55MBZ5-Caqpkdhr.cjs} +2 -2
  48. package/dist/{chunk-DI55MBZ5-RM4QxlLs.cjs.map → chunk-DI55MBZ5-Caqpkdhr.cjs.map} +1 -1
  49. package/dist/{chunk-FMBD7UC4-BF1L4E3r.cjs → chunk-FMBD7UC4-BzNDH5v8.cjs} +2 -2
  50. package/dist/{chunk-FMBD7UC4-BF1L4E3r.cjs.map → chunk-FMBD7UC4-BzNDH5v8.cjs.map} +1 -1
  51. package/dist/{chunk-FMBD7UC4-DCOkUt8T.js → chunk-FMBD7UC4-C-LfOPnM.js} +2 -2
  52. package/dist/{chunk-FMBD7UC4-DCOkUt8T.js.map → chunk-FMBD7UC4-C-LfOPnM.js.map} +1 -1
  53. package/dist/{chunk-QN33PNHL-D02O-uMO.cjs → chunk-QN33PNHL-CTPfHl1X.cjs} +2 -2
  54. package/dist/{chunk-QN33PNHL-D02O-uMO.cjs.map → chunk-QN33PNHL-CTPfHl1X.cjs.map} +1 -1
  55. package/dist/{chunk-QN33PNHL-hzQ0yPiA.js → chunk-QN33PNHL-DusPZf-g.js} +2 -2
  56. package/dist/{chunk-QN33PNHL-hzQ0yPiA.js.map → chunk-QN33PNHL-DusPZf-g.js.map} +1 -1
  57. package/dist/{chunk-QZHKN3VN-BmkTtKro.cjs → chunk-QZHKN3VN-CmkPBu4c.cjs} +2 -2
  58. package/dist/{chunk-QZHKN3VN-BmkTtKro.cjs.map → chunk-QZHKN3VN-CmkPBu4c.cjs.map} +1 -1
  59. package/dist/{chunk-QZHKN3VN-B6f2M6cP.js → chunk-QZHKN3VN-rE0ieZJm.js} +2 -2
  60. package/dist/{chunk-QZHKN3VN-B6f2M6cP.js.map → chunk-QZHKN3VN-rE0ieZJm.js.map} +1 -1
  61. package/dist/{chunk-TZMSLE5B-kcQjV4u6.cjs → chunk-TZMSLE5B-BTD_Ddmh.cjs} +2 -2
  62. package/dist/{chunk-TZMSLE5B-kcQjV4u6.cjs.map → chunk-TZMSLE5B-BTD_Ddmh.cjs.map} +1 -1
  63. package/dist/{chunk-TZMSLE5B-CMgHccah.js → chunk-TZMSLE5B-J8F8d3GW.js} +2 -2
  64. package/dist/{chunk-TZMSLE5B-CMgHccah.js.map → chunk-TZMSLE5B-J8F8d3GW.js.map} +1 -1
  65. package/dist/{classDiagram-2ON5EDUG-Cr5EKsK5.js → classDiagram-2ON5EDUG-Br3OQG53.js} +3 -3
  66. package/dist/{classDiagram-2ON5EDUG-Cr5EKsK5.js.map → classDiagram-2ON5EDUG-Br3OQG53.js.map} +1 -1
  67. package/dist/{classDiagram-2ON5EDUG-D8v286nZ.cjs → classDiagram-2ON5EDUG-Ce7MrBcE.cjs} +2 -2
  68. package/dist/{classDiagram-2ON5EDUG-D8v286nZ.cjs.map → classDiagram-2ON5EDUG-Ce7MrBcE.cjs.map} +1 -1
  69. package/dist/{classDiagram-v2-WZHVMYZB-Cr5EKsK5.js → classDiagram-v2-WZHVMYZB-Br3OQG53.js} +3 -3
  70. package/dist/{classDiagram-v2-WZHVMYZB-Cr5EKsK5.js.map → classDiagram-v2-WZHVMYZB-Br3OQG53.js.map} +1 -1
  71. package/dist/{classDiagram-v2-WZHVMYZB-D8v286nZ.cjs → classDiagram-v2-WZHVMYZB-Ce7MrBcE.cjs} +2 -2
  72. package/dist/{classDiagram-v2-WZHVMYZB-D8v286nZ.cjs.map → classDiagram-v2-WZHVMYZB-Ce7MrBcE.cjs.map} +1 -1
  73. package/dist/clone-CCIqcM5Y.js +9 -0
  74. package/dist/{clone-BxPvQEOl.js.map → clone-CCIqcM5Y.js.map} +1 -1
  75. package/dist/clone-CvQKcI6r.cjs +2 -0
  76. package/dist/{clone-Qa8ZMMKU.cjs.map → clone-CvQKcI6r.cjs.map} +1 -1
  77. package/dist/{cose-bilkent-S5V4N54A-BJ3wg7KS.cjs → cose-bilkent-S5V4N54A-CYDFYlZ6.cjs} +2 -2
  78. package/dist/{cose-bilkent-S5V4N54A-BJ3wg7KS.cjs.map → cose-bilkent-S5V4N54A-CYDFYlZ6.cjs.map} +1 -1
  79. package/dist/{cose-bilkent-S5V4N54A-B0RvLg-Z.js → cose-bilkent-S5V4N54A-fU3j-gz-.js} +2 -2
  80. package/dist/{cose-bilkent-S5V4N54A-B0RvLg-Z.js.map → cose-bilkent-S5V4N54A-fU3j-gz-.js.map} +1 -1
  81. package/dist/{dagre-6UL2VRFP--PuHyvOJ.js → dagre-6UL2VRFP-BkkuZmWn.js} +7 -7
  82. package/dist/{dagre-6UL2VRFP--PuHyvOJ.js.map → dagre-6UL2VRFP-BkkuZmWn.js.map} +1 -1
  83. package/dist/{dagre-6UL2VRFP-BDyQ7zKw.cjs → dagre-6UL2VRFP-CrTlcO8O.cjs} +2 -2
  84. package/dist/{dagre-6UL2VRFP-BDyQ7zKw.cjs.map → dagre-6UL2VRFP-CrTlcO8O.cjs.map} +1 -1
  85. package/dist/{diagram-PSM6KHXK-u5RdYoub.cjs → diagram-PSM6KHXK-9wHp_OsU.cjs} +2 -2
  86. package/dist/{diagram-PSM6KHXK-u5RdYoub.cjs.map → diagram-PSM6KHXK-9wHp_OsU.cjs.map} +1 -1
  87. package/dist/{diagram-PSM6KHXK-B57QodqD.js → diagram-PSM6KHXK-CumMPbYj.js} +5 -5
  88. package/dist/{diagram-PSM6KHXK-B57QodqD.js.map → diagram-PSM6KHXK-CumMPbYj.js.map} +1 -1
  89. package/dist/{diagram-QEK2KX5R-Da-pT7Ux.js → diagram-QEK2KX5R-BX73KNSg.js} +4 -4
  90. package/dist/{diagram-QEK2KX5R-Da-pT7Ux.js.map → diagram-QEK2KX5R-BX73KNSg.js.map} +1 -1
  91. package/dist/{diagram-QEK2KX5R-D1cueJAA.cjs → diagram-QEK2KX5R-BYqdFTnq.cjs} +2 -2
  92. package/dist/{diagram-QEK2KX5R-D1cueJAA.cjs.map → diagram-QEK2KX5R-BYqdFTnq.cjs.map} +1 -1
  93. package/dist/{diagram-S2PKOQOG-BvfG2rAS.js → diagram-S2PKOQOG-DJ-724qx.js} +4 -4
  94. package/dist/{diagram-S2PKOQOG-BvfG2rAS.js.map → diagram-S2PKOQOG-DJ-724qx.js.map} +1 -1
  95. package/dist/{diagram-S2PKOQOG-DpAD-cB_.cjs → diagram-S2PKOQOG-DonScLpF.cjs} +2 -2
  96. package/dist/{diagram-S2PKOQOG-DpAD-cB_.cjs.map → diagram-S2PKOQOG-DonScLpF.cjs.map} +1 -1
  97. package/dist/{erDiagram-Q2GNP2WA-WM-jEF2o.js → erDiagram-Q2GNP2WA-C4m3Pm5f.js} +5 -5
  98. package/dist/{erDiagram-Q2GNP2WA-WM-jEF2o.js.map → erDiagram-Q2GNP2WA-C4m3Pm5f.js.map} +1 -1
  99. package/dist/{erDiagram-Q2GNP2WA-ohQILmdi.cjs → erDiagram-Q2GNP2WA-DC-tMGdk.cjs} +2 -2
  100. package/dist/{erDiagram-Q2GNP2WA-ohQILmdi.cjs.map → erDiagram-Q2GNP2WA-DC-tMGdk.cjs.map} +1 -1
  101. package/dist/{flowDiagram-NV44I4VS-C_bxgg0e.cjs → flowDiagram-NV44I4VS-9k1QiKz5.cjs} +2 -2
  102. package/dist/{flowDiagram-NV44I4VS-C_bxgg0e.cjs.map → flowDiagram-NV44I4VS-9k1QiKz5.cjs.map} +1 -1
  103. package/dist/{flowDiagram-NV44I4VS-BCumxy_A.js → flowDiagram-NV44I4VS-DkG0D9cg.js} +6 -6
  104. package/dist/{flowDiagram-NV44I4VS-BCumxy_A.js.map → flowDiagram-NV44I4VS-DkG0D9cg.js.map} +1 -1
  105. package/dist/{ganttDiagram-JELNMOA3-Geq6x747.cjs → ganttDiagram-JELNMOA3-C1nojL1z.cjs} +2 -2
  106. package/dist/{ganttDiagram-JELNMOA3-Geq6x747.cjs.map → ganttDiagram-JELNMOA3-C1nojL1z.cjs.map} +1 -1
  107. package/dist/{ganttDiagram-JELNMOA3-Dr1NLren.js → ganttDiagram-JELNMOA3-gKhAoiqV.js} +3 -3
  108. package/dist/{ganttDiagram-JELNMOA3-Dr1NLren.js.map → ganttDiagram-JELNMOA3-gKhAoiqV.js.map} +1 -1
  109. package/dist/{gitGraph-F6HP7TQM-BeOJ-IAj.cjs → gitGraph-F6HP7TQM-Bo0E-pHW.cjs} +2 -2
  110. package/dist/gitGraph-F6HP7TQM-Bo0E-pHW.cjs.map +1 -0
  111. package/dist/gitGraph-F6HP7TQM-CHoN29cY.js +6 -0
  112. package/dist/gitGraph-F6HP7TQM-CHoN29cY.js.map +1 -0
  113. package/dist/{gitGraphDiagram-NY62KEGX-BLjyc1Wj.js → gitGraphDiagram-NY62KEGX-D3XBs94x.js} +5 -5
  114. package/dist/{gitGraphDiagram-NY62KEGX-BLjyc1Wj.js.map → gitGraphDiagram-NY62KEGX-D3XBs94x.js.map} +1 -1
  115. package/dist/{gitGraphDiagram-NY62KEGX-DzsNlXbq.cjs → gitGraphDiagram-NY62KEGX-YDRakP-_.cjs} +2 -2
  116. package/dist/{gitGraphDiagram-NY62KEGX-DzsNlXbq.cjs.map → gitGraphDiagram-NY62KEGX-YDRakP-_.cjs.map} +1 -1
  117. package/dist/{graph-BlkDovJY.js → graph-BasevfV_.js} +3 -3
  118. package/dist/{graph-BlkDovJY.js.map → graph-BasevfV_.js.map} +1 -1
  119. package/dist/{graph-afCf5ZM1.cjs → graph-rSA-aI4s.cjs} +2 -2
  120. package/dist/{graph-afCf5ZM1.cjs.map → graph-rSA-aI4s.cjs.map} +1 -1
  121. package/dist/{index-CPFTnxie.cjs → index-BDajGLDt.cjs} +50 -50
  122. package/dist/index-BDajGLDt.cjs.map +1 -0
  123. package/dist/{index-DBVR6GYe.js → index-caKpab-1.js} +2423 -2408
  124. package/dist/index-caKpab-1.js.map +1 -0
  125. package/dist/index.cjs +1 -1
  126. package/dist/index.js +1 -1
  127. package/dist/{info-NVLQJR56-zgrtE1eV.cjs → info-NVLQJR56-C-3b-i8R.cjs} +2 -2
  128. package/dist/info-NVLQJR56-C-3b-i8R.cjs.map +1 -0
  129. package/dist/info-NVLQJR56-Ce9da4xt.js +6 -0
  130. package/dist/info-NVLQJR56-Ce9da4xt.js.map +1 -0
  131. package/dist/{infoDiagram-WHAUD3N6-e_6Fu7A3.cjs → infoDiagram-WHAUD3N6-BfyHsG_R.cjs} +2 -2
  132. package/dist/{infoDiagram-WHAUD3N6-e_6Fu7A3.cjs.map → infoDiagram-WHAUD3N6-BfyHsG_R.cjs.map} +1 -1
  133. package/dist/{infoDiagram-WHAUD3N6-DZlGk8Eu.js → infoDiagram-WHAUD3N6-DVElQ6XQ.js} +3 -3
  134. package/dist/{infoDiagram-WHAUD3N6-DZlGk8Eu.js.map → infoDiagram-WHAUD3N6-DVElQ6XQ.js.map} +1 -1
  135. package/dist/{journeyDiagram-XKPGCS4Q-FOnZHY81.js → journeyDiagram-XKPGCS4Q-BEyBxLEE.js} +5 -5
  136. package/dist/{journeyDiagram-XKPGCS4Q-FOnZHY81.js.map → journeyDiagram-XKPGCS4Q-BEyBxLEE.js.map} +1 -1
  137. package/dist/{journeyDiagram-XKPGCS4Q-DWNhUx2B.cjs → journeyDiagram-XKPGCS4Q-DfM_UFvc.cjs} +2 -2
  138. package/dist/{journeyDiagram-XKPGCS4Q-DWNhUx2B.cjs.map → journeyDiagram-XKPGCS4Q-DfM_UFvc.cjs.map} +1 -1
  139. package/dist/{kanban-definition-3W4ZIXB7-BKCGrp4d.js → kanban-definition-3W4ZIXB7-C1c6hUl-.js} +3 -3
  140. package/dist/{kanban-definition-3W4ZIXB7-BKCGrp4d.js.map → kanban-definition-3W4ZIXB7-C1c6hUl-.js.map} +1 -1
  141. package/dist/{kanban-definition-3W4ZIXB7-DmXZ76_s.cjs → kanban-definition-3W4ZIXB7-mqwusAZJ.cjs} +2 -2
  142. package/dist/{kanban-definition-3W4ZIXB7-DmXZ76_s.cjs.map → kanban-definition-3W4ZIXB7-mqwusAZJ.cjs.map} +1 -1
  143. package/dist/{layout-CQ55vGEs.cjs → layout-C9eO5Nxr.cjs} +2 -2
  144. package/dist/{layout-CQ55vGEs.cjs.map → layout-C9eO5Nxr.cjs.map} +1 -1
  145. package/dist/{layout-BM8fgH_I.js → layout-DR8dbrKj.js} +5 -5
  146. package/dist/{layout-BM8fgH_I.js.map → layout-DR8dbrKj.js.map} +1 -1
  147. package/dist/{linear-rySziqxM.js → linear-DKLfd3Ph.js} +2 -2
  148. package/dist/{linear-rySziqxM.js.map → linear-DKLfd3Ph.js.map} +1 -1
  149. package/dist/{linear-Ck5hTmin.cjs → linear-jbmUvWu5.cjs} +2 -2
  150. package/dist/{linear-Ck5hTmin.cjs.map → linear-jbmUvWu5.cjs.map} +1 -1
  151. package/dist/{mermaid-parser.core-DdgAu_8I.js → mermaid-parser.core-CJwfr-Rn.js} +12 -12
  152. package/dist/{mermaid-parser.core-DdgAu_8I.js.map → mermaid-parser.core-CJwfr-Rn.js.map} +1 -1
  153. package/dist/{mermaid-parser.core-5P84tW26.cjs → mermaid-parser.core-vI3z9vjp.cjs} +3 -3
  154. package/dist/{mermaid-parser.core-5P84tW26.cjs.map → mermaid-parser.core-vI3z9vjp.cjs.map} +1 -1
  155. package/dist/{mindmap-definition-VGOIOE7T-DRqIC1aB.cjs → mindmap-definition-VGOIOE7T-BqeRBDHB.cjs} +2 -2
  156. package/dist/{mindmap-definition-VGOIOE7T-DRqIC1aB.cjs.map → mindmap-definition-VGOIOE7T-BqeRBDHB.cjs.map} +1 -1
  157. package/dist/{mindmap-definition-VGOIOE7T-DUR7ZFmn.js → mindmap-definition-VGOIOE7T-Bxh4mvAa.js} +4 -4
  158. package/dist/{mindmap-definition-VGOIOE7T-DUR7ZFmn.js.map → mindmap-definition-VGOIOE7T-Bxh4mvAa.js.map} +1 -1
  159. package/dist/packet-BFZMPI3H-DTLQ86Yd.js +6 -0
  160. package/dist/packet-BFZMPI3H-DTLQ86Yd.js.map +1 -0
  161. package/dist/{packet-BFZMPI3H--8xo99vs.cjs → packet-BFZMPI3H-UUkqxMwx.cjs} +2 -2
  162. package/dist/packet-BFZMPI3H-UUkqxMwx.cjs.map +1 -0
  163. package/dist/{pie-7BOR55EZ-DMvSDGfH.cjs → pie-7BOR55EZ-6cd-l72R.cjs} +2 -2
  164. package/dist/pie-7BOR55EZ-6cd-l72R.cjs.map +1 -0
  165. package/dist/pie-7BOR55EZ-BPhniwXQ.js +6 -0
  166. package/dist/pie-7BOR55EZ-BPhniwXQ.js.map +1 -0
  167. package/dist/{pieDiagram-ADFJNKIX-BHrTl2Ns.js → pieDiagram-ADFJNKIX-E7NP2mWM.js} +5 -5
  168. package/dist/{pieDiagram-ADFJNKIX-BHrTl2Ns.js.map → pieDiagram-ADFJNKIX-E7NP2mWM.js.map} +1 -1
  169. package/dist/{pieDiagram-ADFJNKIX-D3u8fH01.cjs → pieDiagram-ADFJNKIX-oBQctDBF.cjs} +2 -2
  170. package/dist/{pieDiagram-ADFJNKIX-D3u8fH01.cjs.map → pieDiagram-ADFJNKIX-oBQctDBF.cjs.map} +1 -1
  171. package/dist/{quadrantDiagram-AYHSOK5B-Dbi7OKEt.js → quadrantDiagram-AYHSOK5B-BI6EBqf1.js} +3 -3
  172. package/dist/{quadrantDiagram-AYHSOK5B-Dbi7OKEt.js.map → quadrantDiagram-AYHSOK5B-BI6EBqf1.js.map} +1 -1
  173. package/dist/{quadrantDiagram-AYHSOK5B-C2Bzy_90.cjs → quadrantDiagram-AYHSOK5B-BdynjtBz.cjs} +2 -2
  174. package/dist/{quadrantDiagram-AYHSOK5B-C2Bzy_90.cjs.map → quadrantDiagram-AYHSOK5B-BdynjtBz.cjs.map} +1 -1
  175. package/dist/{radar-NHE76QYJ-Cc5Nvs_h.cjs → radar-NHE76QYJ-BEdxIU3J.cjs} +2 -2
  176. package/dist/radar-NHE76QYJ-BEdxIU3J.cjs.map +1 -0
  177. package/dist/radar-NHE76QYJ-BGiQ-836.js +6 -0
  178. package/dist/radar-NHE76QYJ-BGiQ-836.js.map +1 -0
  179. package/dist/{requirementDiagram-UZGBJVZJ-B7DlOlwl.js → requirementDiagram-UZGBJVZJ-BaCeaYOD.js} +4 -4
  180. package/dist/{requirementDiagram-UZGBJVZJ-B7DlOlwl.js.map → requirementDiagram-UZGBJVZJ-BaCeaYOD.js.map} +1 -1
  181. package/dist/{requirementDiagram-UZGBJVZJ-CC6A_LQI.cjs → requirementDiagram-UZGBJVZJ-DRt-Beuk.cjs} +2 -2
  182. package/dist/{requirementDiagram-UZGBJVZJ-CC6A_LQI.cjs.map → requirementDiagram-UZGBJVZJ-DRt-Beuk.cjs.map} +1 -1
  183. package/dist/{sankeyDiagram-TZEHDZUN-BnHCo-Mn.cjs → sankeyDiagram-TZEHDZUN-BRlPGxPq.cjs} +2 -2
  184. package/dist/{sankeyDiagram-TZEHDZUN-BnHCo-Mn.cjs.map → sankeyDiagram-TZEHDZUN-BRlPGxPq.cjs.map} +1 -1
  185. package/dist/{sankeyDiagram-TZEHDZUN-DpEUf9Vo.js → sankeyDiagram-TZEHDZUN-adBXJ70i.js} +2 -2
  186. package/dist/{sankeyDiagram-TZEHDZUN-DpEUf9Vo.js.map → sankeyDiagram-TZEHDZUN-adBXJ70i.js.map} +1 -1
  187. package/dist/{sequenceDiagram-WL72ISMW-CjEh0r36.js → sequenceDiagram-WL72ISMW-BjjmX7GP.js} +4 -4
  188. package/dist/{sequenceDiagram-WL72ISMW-CjEh0r36.js.map → sequenceDiagram-WL72ISMW-BjjmX7GP.js.map} +1 -1
  189. package/dist/{sequenceDiagram-WL72ISMW-Bl6_BUzR.cjs → sequenceDiagram-WL72ISMW-Dc4K__VG.cjs} +2 -2
  190. package/dist/{sequenceDiagram-WL72ISMW-Bl6_BUzR.cjs.map → sequenceDiagram-WL72ISMW-Dc4K__VG.cjs.map} +1 -1
  191. package/dist/{stateDiagram-FKZM4ZOC-DSb4cefI.js → stateDiagram-FKZM4ZOC-Dvbcwtvr.js} +5 -5
  192. package/dist/{stateDiagram-FKZM4ZOC-DSb4cefI.js.map → stateDiagram-FKZM4ZOC-Dvbcwtvr.js.map} +1 -1
  193. package/dist/{stateDiagram-FKZM4ZOC-DKdLEfTU.cjs → stateDiagram-FKZM4ZOC-Er8_CIvC.cjs} +2 -2
  194. package/dist/{stateDiagram-FKZM4ZOC-DKdLEfTU.cjs.map → stateDiagram-FKZM4ZOC-Er8_CIvC.cjs.map} +1 -1
  195. package/dist/{stateDiagram-v2-4FDKWEC3-BYtBH478.cjs → stateDiagram-v2-4FDKWEC3-BYc_jC0C.cjs} +2 -2
  196. package/dist/{stateDiagram-v2-4FDKWEC3-BYtBH478.cjs.map → stateDiagram-v2-4FDKWEC3-BYc_jC0C.cjs.map} +1 -1
  197. package/dist/{stateDiagram-v2-4FDKWEC3-ByfhcH6w.js → stateDiagram-v2-4FDKWEC3-Cpy_Ydpw.js} +3 -3
  198. package/dist/{stateDiagram-v2-4FDKWEC3-ByfhcH6w.js.map → stateDiagram-v2-4FDKWEC3-Cpy_Ydpw.js.map} +1 -1
  199. package/dist/{timeline-definition-IT6M3QCI-D_WhTqG-.js → timeline-definition-IT6M3QCI-4iCfKsS1.js} +3 -3
  200. package/dist/{timeline-definition-IT6M3QCI-D_WhTqG-.js.map → timeline-definition-IT6M3QCI-4iCfKsS1.js.map} +1 -1
  201. package/dist/{timeline-definition-IT6M3QCI-B1leptlP.cjs → timeline-definition-IT6M3QCI-DE5g5JfV.cjs} +2 -2
  202. package/dist/{timeline-definition-IT6M3QCI-B1leptlP.cjs.map → timeline-definition-IT6M3QCI-DE5g5JfV.cjs.map} +1 -1
  203. package/dist/{treemap-KMMF4GRG-C3kLUDBv.cjs → treemap-KMMF4GRG-YLlgu5sk.cjs} +2 -2
  204. package/dist/treemap-KMMF4GRG-YLlgu5sk.cjs.map +1 -0
  205. package/dist/treemap-KMMF4GRG-xH3W-9YM.js +6 -0
  206. package/dist/treemap-KMMF4GRG-xH3W-9YM.js.map +1 -0
  207. package/dist/{xychartDiagram-PRI3JC2R-ClYujusC.cjs → xychartDiagram-PRI3JC2R-B83XR1RX.cjs} +2 -2
  208. package/dist/{xychartDiagram-PRI3JC2R-ClYujusC.cjs.map → xychartDiagram-PRI3JC2R-B83XR1RX.cjs.map} +1 -1
  209. package/dist/{xychartDiagram-PRI3JC2R-DavmnzBp.js → xychartDiagram-PRI3JC2R-By_sU7ew.js} +3 -3
  210. package/dist/{xychartDiagram-PRI3JC2R-DavmnzBp.js.map → xychartDiagram-PRI3JC2R-By_sU7ew.js.map} +1 -1
  211. package/package.json +26 -27
  212. package/dist/architecture-U656AL7Q-Bk_BCN3G.cjs.map +0 -1
  213. package/dist/architecture-U656AL7Q-Brw03iK0.js +0 -6
  214. package/dist/architecture-U656AL7Q-Brw03iK0.js.map +0 -1
  215. package/dist/channel-BaCsO_0A.cjs +0 -2
  216. package/dist/channel-KAvJVFiL.js +0 -6
  217. package/dist/clone-BxPvQEOl.js +0 -9
  218. package/dist/clone-Qa8ZMMKU.cjs +0 -2
  219. package/dist/gitGraph-F6HP7TQM-BeOJ-IAj.cjs.map +0 -1
  220. package/dist/gitGraph-F6HP7TQM-CxoMWXoZ.js +0 -6
  221. package/dist/gitGraph-F6HP7TQM-CxoMWXoZ.js.map +0 -1
  222. package/dist/index-CPFTnxie.cjs.map +0 -1
  223. package/dist/index-DBVR6GYe.js.map +0 -1
  224. package/dist/info-NVLQJR56-BkEWtnrf.js +0 -6
  225. package/dist/info-NVLQJR56-BkEWtnrf.js.map +0 -1
  226. package/dist/info-NVLQJR56-zgrtE1eV.cjs.map +0 -1
  227. package/dist/packet-BFZMPI3H--8xo99vs.cjs.map +0 -1
  228. package/dist/packet-BFZMPI3H-BiLhYuSA.js +0 -6
  229. package/dist/packet-BFZMPI3H-BiLhYuSA.js.map +0 -1
  230. package/dist/pie-7BOR55EZ-DMvSDGfH.cjs.map +0 -1
  231. package/dist/pie-7BOR55EZ-Dsi8HblZ.js +0 -6
  232. package/dist/pie-7BOR55EZ-Dsi8HblZ.js.map +0 -1
  233. package/dist/radar-NHE76QYJ-Cc5Nvs_h.cjs.map +0 -1
  234. package/dist/radar-NHE76QYJ-tUFyopn8.js +0 -6
  235. package/dist/radar-NHE76QYJ-tUFyopn8.js.map +0 -1
  236. package/dist/treemap-KMMF4GRG-C3kLUDBv.cjs.map +0 -1
  237. package/dist/treemap-KMMF4GRG-Dp0HUz7N.js +0 -6
  238. package/dist/treemap-KMMF4GRG-Dp0HUz7N.js.map +0 -1
@@ -1,10 +1,10 @@
1
- "use strict";var W0=Object.create;var ul=Object.defineProperty;var H0=Object.getOwnPropertyDescriptor;var Y0=Object.getOwnPropertyNames;var U0=Object.getPrototypeOf,G0=Object.prototype.hasOwnProperty;var X0=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Y0(t))!G0.call(e,n)&&n!==r&&ul(e,n,{get:()=>t[n],enumerable:!(i=H0(t,n))||i.enumerable});return e};var V0=(e,t,r)=>(r=e!=null?W0(U0(e)):{},X0(t||!e||!e.__esModule?ul(r,"default",{value:e,enumerable:!0}):r,e));const J=require("react"),La=require("html-react-parser"),Z0=require("shiki"),Ge=require("dompurify"),K0=require("github-slugger"),zc=require("katex"),Q0=require("cheerio"),St=require("unist-util-visit"),qc=require("node:fs/promises"),ur=require("node:path"),J0=require("url-join"),ty=require("remark"),ey=require("remark-breaks"),ry=require("remark-frontmatter"),iy=require("remark-gfm"),ny=require("remark-math");function jc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ni={exports:{}},Wr={};var dl;function ay(){if(dl)return Wr;dl=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(i,n,a){var s=null;if(a!==void 0&&(s=""+a),n.key!==void 0&&(s=""+n.key),"key"in n){a={};for(var o in n)o!=="key"&&(a[o]=n[o])}else a=n;return n=a.ref,{$$typeof:e,type:i,key:s,ref:n!==void 0?n:null,props:a}}return Wr.Fragment=t,Wr.jsx=r,Wr.jsxs=r,Wr}var Hr={};var fl;function sy(){return fl||(fl=1,process.env.NODE_ENV!=="production"&&(function(){function e(k){if(k==null)return null;if(typeof k=="function")return k.$$typeof===O?null:k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){case y:return"Fragment";case b:return"Profiler";case x:return"StrictMode";case L:return"Suspense";case T:return"SuspenseList";case q:return"Activity"}if(typeof k=="object")switch(typeof k.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),k.$$typeof){case m:return"Portal";case C:return k.displayName||"Context";case w:return(k._context.displayName||"Context")+".Consumer";case v:var F=k.render;return k=k.displayName,k||(k=F.displayName||F.name||"",k=k!==""?"ForwardRef("+k+")":"ForwardRef"),k;case D:return F=k.displayName||null,F!==null?F:e(k.type)||"Memo";case z:F=k._payload,k=k._init;try{return e(k(F))}catch{}}return null}function t(k){return""+k}function r(k){try{t(k);var F=!1}catch{F=!0}if(F){F=console;var R=F.error,H=typeof Symbol=="function"&&Symbol.toStringTag&&k[Symbol.toStringTag]||k.constructor.name||"Object";return R.call(F,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",H),t(k)}}function i(k){if(k===y)return"<>";if(typeof k=="object"&&k!==null&&k.$$typeof===z)return"<...>";try{var F=e(k);return F?"<"+F+">":"<...>"}catch{return"<...>"}}function n(){var k=W.A;return k===null?null:k.getOwner()}function a(){return Error("react-stack-top-frame")}function s(k){if(j.call(k,"key")){var F=Object.getOwnPropertyDescriptor(k,"key").get;if(F&&F.isReactWarning)return!1}return k.key!==void 0}function o(k,F){function R(){B||(B=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",F))}R.isReactWarning=!0,Object.defineProperty(k,"key",{get:R,configurable:!0})}function l(){var k=e(this.type);return P[k]||(P[k]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),k=this.props.ref,k!==void 0?k:null}function c(k,F,R,H,U,ct){var st=R.ref;return k={$$typeof:g,type:k,key:F,props:R,_owner:H},(st!==void 0?st:null)!==null?Object.defineProperty(k,"ref",{enumerable:!1,get:l}):Object.defineProperty(k,"ref",{enumerable:!1,value:null}),k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(k,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(k,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:U}),Object.defineProperty(k,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ct}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k}function h(k,F,R,H,U,ct){var st=F.children;if(st!==void 0)if(H)if($(st)){for(H=0;H<st.length;H++)u(st[H]);Object.freeze&&Object.freeze(st)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else u(st);if(j.call(F,"key")){st=e(k);var mt=Object.keys(F).filter(function(ft){return ft!=="key"});H=0<mt.length?"{key: someKey, "+mt.join(": ..., ")+": ...}":"{key: someKey}",N[st+H]||(mt=0<mt.length?"{"+mt.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
1
+ "use strict";var H0=Object.create;var ul=Object.defineProperty;var Y0=Object.getOwnPropertyDescriptor;var U0=Object.getOwnPropertyNames;var G0=Object.getPrototypeOf,X0=Object.prototype.hasOwnProperty;var V0=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of U0(t))!X0.call(e,n)&&n!==r&&ul(e,n,{get:()=>t[n],enumerable:!(i=Y0(t,n))||i.enumerable});return e};var Z0=(e,t,r)=>(r=e!=null?H0(G0(e)):{},V0(t||!e||!e.__esModule?ul(r,"default",{value:e,enumerable:!0}):r,e));const J=require("react"),La=require("html-react-parser"),K0=require("shiki"),Ge=require("dompurify"),Q0=require("github-slugger"),qc=require("katex"),J0=require("cheerio"),St=require("unist-util-visit"),jc=require("node:fs/promises"),ur=require("node:path"),ty=require("url-join"),ey=require("remark"),ry=require("remark-breaks"),iy=require("remark-frontmatter"),ny=require("remark-gfm"),ay=require("remark-math");function Wc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ni={exports:{}},Wr={};var dl;function sy(){if(dl)return Wr;dl=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(i,n,a){var s=null;if(a!==void 0&&(s=""+a),n.key!==void 0&&(s=""+n.key),"key"in n){a={};for(var o in n)o!=="key"&&(a[o]=n[o])}else a=n;return n=a.ref,{$$typeof:e,type:i,key:s,ref:n!==void 0?n:null,props:a}}return Wr.Fragment=t,Wr.jsx=r,Wr.jsxs=r,Wr}var Hr={};var fl;function oy(){return fl||(fl=1,process.env.NODE_ENV!=="production"&&(function(){function e(k){if(k==null)return null;if(typeof k=="function")return k.$$typeof===D?null:k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){case y:return"Fragment";case b:return"Profiler";case x:return"StrictMode";case L:return"Suspense";case T:return"SuspenseList";case q:return"Activity"}if(typeof k=="object")switch(typeof k.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),k.$$typeof){case m:return"Portal";case C:return k.displayName||"Context";case w:return(k._context.displayName||"Context")+".Consumer";case v:var F=k.render;return k=k.displayName,k||(k=F.displayName||F.name||"",k=k!==""?"ForwardRef("+k+")":"ForwardRef"),k;case O:return F=k.displayName||null,F!==null?F:e(k.type)||"Memo";case z:F=k._payload,k=k._init;try{return e(k(F))}catch{}}return null}function t(k){return""+k}function r(k){try{t(k);var F=!1}catch{F=!0}if(F){F=console;var R=F.error,H=typeof Symbol=="function"&&Symbol.toStringTag&&k[Symbol.toStringTag]||k.constructor.name||"Object";return R.call(F,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",H),t(k)}}function i(k){if(k===y)return"<>";if(typeof k=="object"&&k!==null&&k.$$typeof===z)return"<...>";try{var F=e(k);return F?"<"+F+">":"<...>"}catch{return"<...>"}}function n(){var k=W.A;return k===null?null:k.getOwner()}function a(){return Error("react-stack-top-frame")}function s(k){if(j.call(k,"key")){var F=Object.getOwnPropertyDescriptor(k,"key").get;if(F&&F.isReactWarning)return!1}return k.key!==void 0}function o(k,F){function R(){B||(B=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",F))}R.isReactWarning=!0,Object.defineProperty(k,"key",{get:R,configurable:!0})}function l(){var k=e(this.type);return P[k]||(P[k]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),k=this.props.ref,k!==void 0?k:null}function c(k,F,R,H,U,ct){var st=R.ref;return k={$$typeof:g,type:k,key:F,props:R,_owner:H},(st!==void 0?st:null)!==null?Object.defineProperty(k,"ref",{enumerable:!1,get:l}):Object.defineProperty(k,"ref",{enumerable:!1,value:null}),k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(k,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(k,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:U}),Object.defineProperty(k,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ct}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k}function h(k,F,R,H,U,ct){var st=F.children;if(st!==void 0)if(H)if($(st)){for(H=0;H<st.length;H++)u(st[H]);Object.freeze&&Object.freeze(st)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else u(st);if(j.call(F,"key")){st=e(k);var mt=Object.keys(F).filter(function(ft){return ft!=="key"});H=0<mt.length?"{key: someKey, "+mt.join(": ..., ")+": ...}":"{key: someKey}",N[st+H]||(mt=0<mt.length?"{"+mt.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
2
  let props = %s;
3
3
  <%s {...props} />
4
4
  React keys must be passed directly to JSX without using spread:
5
5
  let props = %s;
6
- <%s key={someKey} {...props} />`,H,st,mt,st),N[st+H]=!0)}if(st=null,R!==void 0&&(r(R),st=""+R),s(F)&&(r(F.key),st=""+F.key),"key"in F){R={};for(var _t in F)_t!=="key"&&(R[_t]=F[_t])}else R=F;return st&&o(R,typeof k=="function"?k.displayName||k.name||"Unknown":k),c(k,st,R,n(),U,ct)}function u(k){d(k)?k._store&&(k._store.validated=1):typeof k=="object"&&k!==null&&k.$$typeof===z&&(k._payload.status==="fulfilled"?d(k._payload.value)&&k._payload.value._store&&(k._payload.value._store.validated=1):k._store&&(k._store.validated=1))}function d(k){return typeof k=="object"&&k!==null&&k.$$typeof===g}var f=J,g=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),C=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),O=Symbol.for("react.client.reference"),W=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=Object.prototype.hasOwnProperty,$=Array.isArray,M=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(k){return k()}};var B,P={},E=f.react_stack_bottom_frame.bind(f,a)(),A=M(i(a)),N={};Hr.Fragment=y,Hr.jsx=function(k,F,R){var H=1e4>W.recentlyCreatedOwnerStacks++;return h(k,F,R,!1,H?Error("react-stack-top-frame"):E,H?M(i(k)):A)},Hr.jsxs=function(k,F,R){var H=1e4>W.recentlyCreatedOwnerStacks++;return h(k,F,R,!0,H?Error("react-stack-top-frame"):E,H?M(i(k)):A)}})()),Hr}var pl;function oy(){return pl||(pl=1,process.env.NODE_ENV==="production"?Ni.exports=ay():Ni.exports=sy()),Ni.exports}var S=oy();const Wc=(e,t=64)=>`https://www.google.com/s2/favicons?domain=${encodeURIComponent(e)}&size=${t}`,Hc=({href:e,isExternal:t,metadata:r})=>{const i=J.useMemo(()=>Promise.resolve(r||null),[r]);return S.jsx(J.Suspense,{fallback:S.jsx(cy,{}),children:S.jsx(ly,{metadataPromise:i,href:e,isExternal:t})})},ly=({metadataPromise:e,href:t})=>{const r=J.use(e);if(r===null)return S.jsx(gl,{href:t});const i=new URL(t);return r===null?S.jsx(gl,{href:t}):S.jsxs("a",{className:"flex h-36 w-full gap-2 overflow-hidden rounded-lg border border-gray-300 bg-transparent transition-colors duration-200 hover:border-gray-600 hover:bg-gray-50 dark:border-neutral-600 dark:hover:border-neutral-200 dark:hover:bg-neutral-950",href:r.url||t,target:"_blank",rel:"noreferrer",children:[S.jsxs("div",{className:"flex flex-1 flex-col p-2 px-4",children:[S.jsx("div",{className:"break-words font-medium text-gray-900 dark:text-gray-100",children:r.title||r.site_name||t}),S.jsx("div",{className:"mt-2 flex-1",children:S.jsx("div",{className:"break-words text-gray-600 text-sm dark:text-gray-400",children:r.description})}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("img",{src:Wc(t,16),alt:"",width:16,height:16}),S.jsx("span",{className:"line-clamp-1 text-gray-600 text-sm dark:text-gray-400",children:r.site_name||i.hostname})]})]}),S.jsx("div",{className:"h-36 max-w-[40%]",children:r.image?S.jsx("img",{className:"h-full w-full object-cover",src:r.image,alt:""}):S.jsx("div",{className:"h-full w-full bg-gray-200 object-cover dark:bg-neutral-800"})})]})},gl=({href:e})=>S.jsx("a",{className:"flex gap-2 rounded-lg border border-gray-200 bg-transparent p-4 text-gray-900 transition-colors duration-200 hover:border-gray-300 hover:bg-gray-100 dark:border-neutral-800 dark:text-gray-100 dark:hover:border-neutral-700",href:e,target:"_blank",rel:"noreferrer",children:S.jsx("div",{className:"text-gray-600 text-sm dark:text-gray-400",children:e})}),cy=()=>S.jsxs("div",{className:"flex h-36 w-full gap-2 overflow-hidden rounded-lg border border-gray-200 dark:border-neutral-800",children:[S.jsxs("div",{className:"flex flex-1 flex-col p-2 px-4",children:[S.jsxs("div",{className:"flex flex-col gap-2",children:[S.jsx("div",{className:"h-4 w-full animate-pulse rounded bg-gray-300 dark:bg-neutral-700"}),S.jsx("div",{className:"h-4 w-4/5 animate-pulse rounded bg-gray-300 dark:bg-neutral-700"})]}),S.jsxs("div",{className:"mt-6 flex flex-1 flex-col gap-2",children:[S.jsx("div",{className:"h-4 w-full animate-pulse rounded bg-gray-300 dark:bg-neutral-700"}),S.jsx("div",{className:"h-4 w-4/5 animate-pulse rounded bg-gray-300 dark:bg-neutral-700"})]}),S.jsx("div",{className:"mt-auto h-4 w-4 animate-pulse rounded-sm bg-gray-300 dark:bg-neutral-700"})]}),S.jsx("div",{className:"h-full w-64 max-w-[40%] animate-pulse bg-gray-300 dark:bg-neutral-700"})]}),Yc=({node:e})=>{const r=e.data?.siteMetadata;return S.jsx("div",{className:"mt-6 mb-6",children:S.jsx(Hc,{href:e.url,isExternal:!0,metadata:r})})},Uc=({node:e})=>S.jsx("blockquote",{className:"my-4 border-gray-300 border-l-4 bg-gray-50 p-4 italic dark:border-gray-500 dark:bg-gray-800 dark:text-gray-300",children:S.jsx(Lt,{nodes:e.children})});var kt=function(){return kt=Object.assign||function(t){for(var r,i=1,n=arguments.length;i<n;i++){r=arguments[i];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},kt.apply(this,arguments)};typeof window<"u"&&(window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),typeof window.CustomEvent!="function"&&(window.CustomEvent=function(t,r){r=r||{bubbles:!1,cancelable:!1,detail:null};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,r.bubbles,r.cancelable,r.detail),i}));var hy=typeof document<"u"&&!!document.documentMode,Ma;function uy(){return Ma||(Ma=document.createElement("div").style)}var ml=["webkit","moz","ms"],Ii={};function eo(e){if(Ii[e])return Ii[e];var t=uy();if(e in t)return Ii[e]=e;for(var r=e[0].toUpperCase()+e.slice(1),i=ml.length;i--;){var n="".concat(ml[i]).concat(r);if(n in t)return Ii[e]=n}}function zi(e,t){return parseFloat(t[eo(e)])||0}function qi(e,t,r){r===void 0&&(r=window.getComputedStyle(e));var i=t==="border"?"Width":"";return{left:zi("".concat(t,"Left").concat(i),r),right:zi("".concat(t,"Right").concat(i),r),top:zi("".concat(t,"Top").concat(i),r),bottom:zi("".concat(t,"Bottom").concat(i),r)}}function dr(e,t,r){e.style[eo(t)]=r}function dy(e,t){var r=eo("transform");dr(e,"transition","".concat(r," ").concat(t.duration,"ms ").concat(t.easing))}function fy(e,t,r){var i=t.x,n=t.y,a=t.scale,s=t.isSVG;if(dr(e,"transform","scale(".concat(a,") translate(").concat(i,"px, ").concat(n,"px)")),s&&hy){var o=window.getComputedStyle(e).getPropertyValue("transform");e.setAttribute("transform",o)}}function Aa(e){var t=e.parentNode,r=window.getComputedStyle(e),i=window.getComputedStyle(t),n=e.getBoundingClientRect(),a=t.getBoundingClientRect();return{elem:{style:r,width:n.width,height:n.height,top:n.top,bottom:n.bottom,left:n.left,right:n.right,margin:qi(e,"margin",r),border:qi(e,"border",r)},parent:{style:i,width:a.width,height:a.height,top:a.top,bottom:a.bottom,left:a.left,right:a.right,padding:qi(t,"padding",i),border:qi(t,"border",i)}}}var pi={down:"mousedown",move:"mousemove",up:"mouseup mouseleave"};typeof window<"u"&&(typeof window.PointerEvent=="function"?pi={down:"pointerdown",move:"pointermove",up:"pointerup pointerleave pointercancel"}:typeof window.TouchEvent=="function"&&(pi={down:"touchstart",move:"touchmove",up:"touchend touchcancel"}));function Ea(e,t,r,i){pi[e].split(" ").forEach(function(n){t.addEventListener(n,r,i)})}function Fa(e,t,r){pi[e].split(" ").forEach(function(i){t.removeEventListener(i,r)})}function Gc(e,t){for(var r=e.length;r--;)if(e[r].pointerId===t.pointerId)return r;return-1}function Za(e,t){var r;if(t.touches){r=0;for(var i=0,n=t.touches;i<n.length;i++){var a=n[i];a.pointerId=r++,Za(e,a)}return}r=Gc(e,t),r>-1&&e.splice(r,1),e.push(t)}function py(e,t){if(t.touches){for(;e.length;)e.pop();return}var r=Gc(e,t);r>-1&&e.splice(r,1)}function yl(e){e=e.slice(0);for(var t=e.pop(),r;r=e.pop();)t={clientX:(r.clientX-t.clientX)/2+t.clientX,clientY:(r.clientY-t.clientY)/2+t.clientY};return t}function Pa(e){if(e.length<2)return 0;var t=e[0],r=e[1];return Math.sqrt(Math.pow(Math.abs(r.clientX-t.clientX),2)+Math.pow(Math.abs(r.clientY-t.clientY),2))}function gy(e){for(var t=e;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1}function my(e){return(e.getAttribute("class")||"").trim()}function yy(e,t){return e.nodeType===1&&" ".concat(my(e)," ").indexOf(" ".concat(t," "))>-1}function xy(e,t){for(var r=e;r!=null;r=r.parentNode)if(yy(r,t.excludeClass)||t.exclude.indexOf(r)>-1)return!0;return!1}var by=/^http:[\w\.\/]+svg$/;function wy(e){return by.test(e.namespaceURI)&&e.nodeName.toLowerCase()!=="svg"}function vy(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}var Xc={animate:!1,canvas:!1,cursor:"move",disablePan:!1,disableZoom:!1,disableXAxis:!1,disableYAxis:!1,duration:200,easing:"ease-in-out",exclude:[],excludeClass:"panzoom-exclude",handleStartEvent:function(e){e.preventDefault(),e.stopPropagation()},maxScale:4,minScale:.125,overflow:"hidden",panOnlyWhenZoomed:!1,pinchAndPan:!1,relative:!1,setTransform:fy,startX:0,startY:0,startScale:1,step:.3,touchAction:"none"};function Vc(e,t){if(!e)throw new Error("Panzoom requires an element as an argument");if(e.nodeType!==1)throw new Error("Panzoom requires an element with a nodeType of 1");if(!gy(e))throw new Error("Panzoom should be called on elements that have been attached to the DOM");t=kt(kt({},Xc),t);var r=wy(e),i=e.parentNode;i.style.overflow=t.overflow,i.style.userSelect="none",i.style.touchAction=t.touchAction,(t.canvas?i:e).style.cursor=t.cursor,e.style.userSelect="none",e.style.touchAction=t.touchAction,dr(e,"transformOrigin",typeof t.origin=="string"?t.origin:r?"0 0":"50% 50%");function n(){i.style.overflow="",i.style.userSelect="",i.style.touchAction="",i.style.cursor="",e.style.cursor="",e.style.userSelect="",e.style.touchAction="",dr(e,"transformOrigin","")}function a(A){A===void 0&&(A={});for(var N in A)A.hasOwnProperty(N)&&(t[N]=A[N]);(A.hasOwnProperty("cursor")||A.hasOwnProperty("canvas"))&&(i.style.cursor=e.style.cursor="",(t.canvas?i:e).style.cursor=t.cursor),A.hasOwnProperty("overflow")&&(i.style.overflow=A.overflow),A.hasOwnProperty("touchAction")&&(i.style.touchAction=A.touchAction,e.style.touchAction=A.touchAction)}var s=0,o=0,l=1,c=!1;m(t.startScale,{animate:!1,force:!0}),setTimeout(function(){g(t.startX,t.startY,{animate:!1,force:!0})});function h(A,N,k){if(!k.silent){var F=new CustomEvent(A,{detail:N});e.dispatchEvent(F)}}function u(A,N,k){var F={x:s,y:o,scale:l,isSVG:r,originalEvent:k};return requestAnimationFrame(function(){typeof N.animate=="boolean"&&(N.animate?dy(e,N):dr(e,"transition","none")),N.setTransform(e,F,N),h(A,F,N),h("panzoomchange",F,N)}),F}function d(A,N,k,F){var R=kt(kt({},t),F),H={x:s,y:o,opts:R};if(!F?.force&&(R.disablePan||R.panOnlyWhenZoomed&&l===R.startScale))return H;if(A=parseFloat(A),N=parseFloat(N),R.disableXAxis||(H.x=(R.relative?s:0)+A),R.disableYAxis||(H.y=(R.relative?o:0)+N),R.contain){var U=Aa(e),ct=U.elem.width/l,st=U.elem.height/l,mt=ct*k,_t=st*k,ft=(mt-ct)/2,Mt=(_t-st)/2;if(R.contain==="inside"){var ue=(-U.elem.margin.left-U.parent.padding.left+ft)/k,_e=(U.parent.width-mt-U.parent.padding.left-U.elem.margin.left-U.parent.border.left-U.parent.border.right+ft)/k;H.x=Math.max(Math.min(H.x,_e),ue);var Ba=(-U.elem.margin.top-U.parent.padding.top+Mt)/k,$a=(U.parent.height-_t-U.parent.padding.top-U.elem.margin.top-U.parent.border.top-U.parent.border.bottom+Mt)/k;H.y=Math.max(Math.min(H.y,$a),Ba)}else if(R.contain==="outside"){var ue=(-(mt-U.parent.width)-U.parent.padding.left-U.parent.border.left-U.parent.border.right+ft)/k,_e=(ft-U.parent.padding.left)/k;H.x=Math.max(Math.min(H.x,_e),ue);var Ba=(-(_t-U.parent.height)-U.parent.padding.top-U.parent.border.top-U.parent.border.bottom+Mt)/k,$a=(Mt-U.parent.padding.top)/k;H.y=Math.max(Math.min(H.y,$a),Ba)}}return R.roundPixels&&(H.x=Math.round(H.x),H.y=Math.round(H.y)),H}function f(A,N){var k=kt(kt({},t),N),F={scale:l,opts:k};if(!N?.force&&k.disableZoom)return F;var R=t.minScale,H=t.maxScale;if(k.contain){var U=Aa(e),ct=U.elem.width/l,st=U.elem.height/l;if(ct>1&&st>1){var mt=U.parent.width-U.parent.border.left-U.parent.border.right,_t=U.parent.height-U.parent.border.top-U.parent.border.bottom,ft=mt/ct,Mt=_t/st;t.contain==="inside"?H=Math.min(H,ft,Mt):t.contain==="outside"&&(R=Math.max(R,ft,Mt))}}return F.scale=Math.min(Math.max(A,R),H),F}function g(A,N,k,F){var R=d(A,N,l,k);return s!==R.x||o!==R.y?(s=R.x,o=R.y,u("panzoompan",R.opts,F)):{x:s,y:o,scale:l,isSVG:r,originalEvent:F}}function m(A,N,k){var F=f(A,N),R=F.opts;if(!(!N?.force&&R.disableZoom)){A=F.scale;var H=s,U=o;if(R.focal){var ct=R.focal;H=(ct.x/A-ct.x/l+s*A)/A,U=(ct.y/A-ct.y/l+o*A)/A}var st=d(H,U,A,{relative:!1,force:!0});return s=st.x,o=st.y,l=A,u("panzoomzoom",R,k)}}function y(A,N){var k=kt(kt(kt({},t),{animate:!0}),N);return m(l*Math.exp((A?1:-1)*k.step),k)}function x(A){return y(!0,A)}function b(A){return y(!1,A)}function w(A,N,k,F){var R=Aa(e),H={width:R.parent.width-R.parent.padding.left-R.parent.padding.right-R.parent.border.left-R.parent.border.right,height:R.parent.height-R.parent.padding.top-R.parent.padding.bottom-R.parent.border.top-R.parent.border.bottom},U=N.clientX-R.parent.left-R.parent.padding.left-R.parent.border.left-R.elem.margin.left,ct=N.clientY-R.parent.top-R.parent.padding.top-R.parent.border.top-R.elem.margin.top;r||(U-=R.elem.width/l/2,ct-=R.elem.height/l/2);var st={x:U/H.width*(H.width*A),y:ct/H.height*(H.height*A)};return m(A,kt(kt({},k),{animate:!1,focal:st}),F)}function C(A,N){A.preventDefault();var k=kt(kt(kt({},t),N),{animate:!1}),F=A.deltaY===0&&A.deltaX?A.deltaX:A.deltaY,R=F<0?1:-1,H=f(l*Math.exp(R*k.step/3),k).scale;return w(H,A,k,A)}function v(A){var N=kt(kt(kt({},t),{animate:!0,force:!0}),A);l=f(N.startScale,N).scale;var k=d(N.startX,N.startY,l,N);return s=k.x,o=k.y,u("panzoomreset",N)}var L,T,D,z,q,O,W=[];function j(A){if(!xy(A.target,t)){Za(W,A),c=!0,t.handleStartEvent(A),L=s,T=o,h("panzoomstart",{x:s,y:o,scale:l,isSVG:r,originalEvent:A},t);var N=yl(W);D=N.clientX,z=N.clientY,q=l,O=Pa(W)}}function $(A){if(!(!c||L===void 0||T===void 0||D===void 0||z===void 0)){Za(W,A);var N=yl(W),k=W.length>1,F=l;if(k){O===0&&(O=Pa(W));var R=Pa(W)-O;F=f(R*t.step/80+q).scale,w(F,N,{animate:!1},A)}(!k||t.pinchAndPan)&&g(L+(N.clientX-D)/F,T+(N.clientY-z)/F,{animate:!1},A)}}function M(A){W.length===1&&h("panzoomend",{x:s,y:o,scale:l,isSVG:r,originalEvent:A},t),py(W,A),c&&(c=!1,L=T=D=z=void 0)}var B=!1;function P(){B||(B=!0,Ea("down",t.canvas?i:e,j),Ea("move",document,$,{passive:!0}),Ea("up",document,M,{passive:!0}))}function E(){B=!1,Fa("down",t.canvas?i:e,j),Fa("move",document,$),Fa("up",document,M)}return t.noBind||P(),{bind:P,destroy:E,eventNames:pi,getPan:function(){return{x:s,y:o}},getScale:function(){return l},getOptions:function(){return vy(t)},handleDown:j,handleMove:$,handleUp:M,pan:g,reset:v,resetStyle:n,setOptions:a,setStyle:function(A,N){return dr(e,A,N)},zoom:m,zoomIn:x,zoomOut:b,zoomToPoint:w,zoomWithWheel:C}}Vc.defaultOptions=Xc;const ky=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Zc=(...e)=>e.filter((t,r,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===r).join(" ").trim();var Cy={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const _y=J.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:n="",children:a,iconNode:s,...o},l)=>J.createElement("svg",{ref:l,...Cy,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:Zc("lucide",n),...o},[...s.map(([c,h])=>J.createElement(c,h)),...Array.isArray(a)?a:[a]]));const ro=(e,t)=>{const r=J.forwardRef(({className:i,...n},a)=>J.createElement(_y,{ref:a,iconNode:t,className:Zc(`lucide-${ky(e)}`,i),...n}));return r.displayName=`${e}`,r};const Sy=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Ty=ro("RefreshCw",Sy);const By=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],$y=ro("ZoomIn",By);const Ly=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],My=ro("ZoomOut",Ly);var Ka={name:"mermaid",version:"11.12.2",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},Ji={exports:{}},Ay=Ji.exports,xl;function Ey(){return xl||(xl=1,(function(e,t){(function(r,i){e.exports=i()})(Ay,(function(){var r=1e3,i=6e4,n=36e5,a="millisecond",s="second",o="minute",l="hour",c="day",h="week",u="month",d="quarter",f="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function($){var M=["th","st","nd","rd"],B=$%100;return"["+$+(M[(B-20)%10]||M[B]||M[0])+"]"}},w=function($,M,B){var P=String($);return!P||P.length>=M?$:""+Array(M+1-P.length).join(B)+$},C={s:w,z:function($){var M=-$.utcOffset(),B=Math.abs(M),P=Math.floor(B/60),E=B%60;return(M<=0?"+":"-")+w(P,2,"0")+":"+w(E,2,"0")},m:function $(M,B){if(M.date()<B.date())return-$(B,M);var P=12*(B.year()-M.year())+(B.month()-M.month()),E=M.clone().add(P,u),A=B-E<0,N=M.clone().add(P+(A?-1:1),u);return+(-(P+(B-E)/(A?E-N:N-E))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:u,y:f,w:h,d:c,D:g,h:l,m:o,s,ms:a,Q:d}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},v="en",L={};L[v]=b;var T="$isDayjsObject",D=function($){return $ instanceof W||!(!$||!$[T])},z=function $(M,B,P){var E;if(!M)return v;if(typeof M=="string"){var A=M.toLowerCase();L[A]&&(E=A),B&&(L[A]=B,E=A);var N=M.split("-");if(!E&&N.length>1)return $(N[0])}else{var k=M.name;L[k]=M,E=k}return!P&&E&&(v=E),E||!P&&v},q=function($,M){if(D($))return $.clone();var B=typeof M=="object"?M:{};return B.date=$,B.args=arguments,new W(B)},O=C;O.l=z,O.i=D,O.w=function($,M){return q($,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var W=(function(){function $(B){this.$L=z(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[T]=!0}var M=$.prototype;return M.parse=function(B){this.$d=(function(P){var E=P.date,A=P.utc;if(E===null)return new Date(NaN);if(O.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var N=E.match(y);if(N){var k=N[2]-1||0,F=(N[7]||"0").substring(0,3);return A?new Date(Date.UTC(N[1],k,N[3]||1,N[4]||0,N[5]||0,N[6]||0,F)):new Date(N[1],k,N[3]||1,N[4]||0,N[5]||0,N[6]||0,F)}}return new Date(E)})(B),this.init()},M.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},M.$utils=function(){return O},M.isValid=function(){return this.$d.toString()!==m},M.isSame=function(B,P){var E=q(B);return this.startOf(P)<=E&&E<=this.endOf(P)},M.isAfter=function(B,P){return q(B)<this.startOf(P)},M.isBefore=function(B,P){return this.endOf(P)<q(B)},M.$g=function(B,P,E){return O.u(B)?this[P]:this.set(E,B)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(B,P){var E=this,A=!!O.u(P)||P,N=O.p(B),k=function(_t,ft){var Mt=O.w(E.$u?Date.UTC(E.$y,ft,_t):new Date(E.$y,ft,_t),E);return A?Mt:Mt.endOf(c)},F=function(_t,ft){return O.w(E.toDate()[_t].apply(E.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(ft)),E)},R=this.$W,H=this.$M,U=this.$D,ct="set"+(this.$u?"UTC":"");switch(N){case f:return A?k(1,0):k(31,11);case u:return A?k(1,H):k(0,H+1);case h:var st=this.$locale().weekStart||0,mt=(R<st?R+7:R)-st;return k(A?U-mt:U+(6-mt),H);case c:case g:return F(ct+"Hours",0);case l:return F(ct+"Minutes",1);case o:return F(ct+"Seconds",2);case s:return F(ct+"Milliseconds",3);default:return this.clone()}},M.endOf=function(B){return this.startOf(B,!1)},M.$set=function(B,P){var E,A=O.p(B),N="set"+(this.$u?"UTC":""),k=(E={},E[c]=N+"Date",E[g]=N+"Date",E[u]=N+"Month",E[f]=N+"FullYear",E[l]=N+"Hours",E[o]=N+"Minutes",E[s]=N+"Seconds",E[a]=N+"Milliseconds",E)[A],F=A===c?this.$D+(P-this.$W):P;if(A===u||A===f){var R=this.clone().set(g,1);R.$d[k](F),R.init(),this.$d=R.set(g,Math.min(this.$D,R.daysInMonth())).$d}else k&&this.$d[k](F);return this.init(),this},M.set=function(B,P){return this.clone().$set(B,P)},M.get=function(B){return this[O.p(B)]()},M.add=function(B,P){var E,A=this;B=Number(B);var N=O.p(P),k=function(H){var U=q(A);return O.w(U.date(U.date()+Math.round(H*B)),A)};if(N===u)return this.set(u,this.$M+B);if(N===f)return this.set(f,this.$y+B);if(N===c)return k(1);if(N===h)return k(7);var F=(E={},E[o]=i,E[l]=n,E[s]=r,E)[N]||1,R=this.$d.getTime()+B*F;return O.w(R,this)},M.subtract=function(B,P){return this.add(-1*B,P)},M.format=function(B){var P=this,E=this.$locale();if(!this.isValid())return E.invalidDate||m;var A=B||"YYYY-MM-DDTHH:mm:ssZ",N=O.z(this),k=this.$H,F=this.$m,R=this.$M,H=E.weekdays,U=E.months,ct=E.meridiem,st=function(ft,Mt,ue,_e){return ft&&(ft[Mt]||ft(P,A))||ue[Mt].slice(0,_e)},mt=function(ft){return O.s(k%12||12,ft,"0")},_t=ct||function(ft,Mt,ue){var _e=ft<12?"AM":"PM";return ue?_e.toLowerCase():_e};return A.replace(x,(function(ft,Mt){return Mt||(function(ue){switch(ue){case"YY":return String(P.$y).slice(-2);case"YYYY":return O.s(P.$y,4,"0");case"M":return R+1;case"MM":return O.s(R+1,2,"0");case"MMM":return st(E.monthsShort,R,U,3);case"MMMM":return st(U,R);case"D":return P.$D;case"DD":return O.s(P.$D,2,"0");case"d":return String(P.$W);case"dd":return st(E.weekdaysMin,P.$W,H,2);case"ddd":return st(E.weekdaysShort,P.$W,H,3);case"dddd":return H[P.$W];case"H":return String(k);case"HH":return O.s(k,2,"0");case"h":return mt(1);case"hh":return mt(2);case"a":return _t(k,F,!0);case"A":return _t(k,F,!1);case"m":return String(F);case"mm":return O.s(F,2,"0");case"s":return String(P.$s);case"ss":return O.s(P.$s,2,"0");case"SSS":return O.s(P.$ms,3,"0");case"Z":return N}return null})(ft)||N.replace(":","")}))},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(B,P,E){var A,N=this,k=O.p(P),F=q(B),R=(F.utcOffset()-this.utcOffset())*i,H=this-F,U=function(){return O.m(N,F)};switch(k){case f:A=U()/12;break;case u:A=U();break;case d:A=U()/3;break;case h:A=(H-R)/6048e5;break;case c:A=(H-R)/864e5;break;case l:A=H/n;break;case o:A=H/i;break;case s:A=H/r;break;default:A=H}return E?A:O.a(A)},M.daysInMonth=function(){return this.endOf(u).$D},M.$locale=function(){return L[this.$L]},M.locale=function(B,P){if(!B)return this.$L;var E=this.clone(),A=z(B,P,!0);return A&&(E.$L=A),E},M.clone=function(){return O.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},$})(),j=W.prototype;return q.prototype=j,[["$ms",a],["$s",s],["$m",o],["$H",l],["$W",c],["$M",u],["$y",f],["$D",g]].forEach((function($){j[$[1]]=function(M){return this.$g(M,$[0],$[1])}})),q.extend=function($,M){return $.$i||($(M,W,q),$.$i=!0),q},q.locale=z,q.isDayjs=D,q.unix=function($){return q(1e3*$)},q.en=L[v],q.Ls=L,q.p={},q}))})(Ji)),Ji.exports}var Fy=Ey();const Kc=jc(Fy);var Qc=Object.defineProperty,p=(e,t)=>Qc(e,"name",{value:t,configurable:!0}),Jc=(e,t)=>{for(var r in t)Qc(e,r,{get:t[r],enumerable:!0})},de={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},I={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},io=p(function(e="fatal"){let t=de.fatal;typeof e=="string"?e.toLowerCase()in de&&(t=de[e]):typeof e=="number"&&(t=e),I.trace=()=>{},I.debug=()=>{},I.info=()=>{},I.warn=()=>{},I.error=()=>{},I.fatal=()=>{},t<=de.fatal&&(I.fatal=console.error?console.error.bind(console,Ut("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Ut("FATAL"))),t<=de.error&&(I.error=console.error?console.error.bind(console,Ut("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Ut("ERROR"))),t<=de.warn&&(I.warn=console.warn?console.warn.bind(console,Ut("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Ut("WARN"))),t<=de.info&&(I.info=console.info?console.info.bind(console,Ut("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Ut("INFO"))),t<=de.debug&&(I.debug=console.debug?console.debug.bind(console,Ut("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ut("DEBUG"))),t<=de.trace&&(I.trace=console.debug?console.debug.bind(console,Ut("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ut("TRACE")))},"setLogLevel"),Ut=p(e=>`%c${Kc().format("ss.SSS")} : ${e} : `,"format");const tn={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const n=r<.5?r*(1+t):r+t-r*t,a=2*r-n;switch(i){case"r":return tn.hue2rgb(a,n,e+1/3)*255;case"g":return tn.hue2rgb(a,n,e)*255;case"b":return tn.hue2rgb(a,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),a=Math.min(e,t,r),s=(n+a)/2;if(i==="l")return s*100;if(n===a)return 0;const o=n-a,l=s>.5?o/(2-n-a):o/(n+a);if(i==="s")return l*100;switch(n){case e:return((t-r)/o+(t<r?6:0))*60;case t:return((r-e)/o+2)*60;case r:return((e-t)/o+4)*60;default:return-1}}},Py={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Ry={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},at={channel:tn,lang:Py,unit:Ry},Se={};for(let e=0;e<=255;e++)Se[e]=at.unit.dec2hex(e);const At={ALL:0,RGB:1,HSL:2};class Oy{constructor(){this.type=At.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=At.ALL}is(t){return this.type===t}}class Dy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Oy}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=At.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=at.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=at.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=at.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=at.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=at.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=at.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(At.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(At.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(At.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(At.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(At.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(At.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(At.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(At.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(At.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(At.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(At.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(At.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Xn=new Dy({r:0,g:0,b:0,a:0},"transparent"),pr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(pr.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,a=n%4===0,s=n>4,o=s?1:17,l=s?8:4,c=a?0:-1,h=s?255:15;return Xn.set({r:(i>>l*(c+3)&h)*o,g:(i>>l*(c+2)&h)*o,b:(i>>l*(c+1)&h)*o,a:a?(i&h)*o/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${Se[Math.round(t)]}${Se[Math.round(r)]}${Se[Math.round(i)]}${Se[Math.round(n*255)]}`:`#${Se[Math.round(t)]}${Se[Math.round(r)]}${Se[Math.round(i)]}`}},ze={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(ze.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return at.channel.clamp.h(parseFloat(r)*.9);case"rad":return at.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return at.channel.clamp.h(parseFloat(r)*360)}}return at.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(ze.re);if(!r)return;const[,i,n,a,s,o]=r;return Xn.set({h:ze._hue2deg(i),s:at.channel.clamp.s(parseFloat(n)),l:at.channel.clamp.l(parseFloat(a)),a:s?at.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%, ${n})`:`hsl(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%)`}},li={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=li.colors[e];if(t)return pr.parse(t)},stringify:e=>{const t=pr.stringify(e);for(const r in li.colors)if(li.colors[r]===t)return r}},Jr={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Jr.re);if(!r)return;const[,i,n,a,s,o,l,c,h]=r;return Xn.set({r:at.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:at.channel.clamp.g(s?parseFloat(a)*2.55:parseFloat(a)),b:at.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:c?at.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)}, ${at.lang.round(n)})`:`rgb(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)})`}},te={format:{keyword:li,hex:pr,rgb:Jr,rgba:Jr,hsl:ze,hsla:ze},parse:e=>{if(typeof e!="string")return e;const t=pr.parse(e)||Jr.parse(e)||ze.parse(e)||li.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(At.HSL)||e.data.r===void 0?ze.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Jr.stringify(e):pr.stringify(e)},th=(e,t)=>{const r=te.parse(e);for(const i in t)r[i]=at.channel.clamp[i](t[i]);return te.stringify(r)},gr=(e,t,r=0,i=1)=>{if(typeof e!="number")return th(e,{a:t});const n=Xn.set({r:at.channel.clamp.r(e),g:at.channel.clamp.g(t),b:at.channel.clamp.b(r),a:at.channel.clamp.a(i)});return te.stringify(n)},Ny=e=>{const{r:t,g:r,b:i}=te.parse(e),n=.2126*at.channel.toLinear(t)+.7152*at.channel.toLinear(r)+.0722*at.channel.toLinear(i);return at.lang.round(n)},Iy=e=>Ny(e)>=.5,Pr=e=>!Iy(e),eh=(e,t,r)=>{const i=te.parse(e),n=i[t],a=at.channel.clamp[t](n+r);return n!==a&&(i[t]=a),te.stringify(i)},X=(e,t)=>eh(e,"l",t),et=(e,t)=>eh(e,"l",-t),_=(e,t)=>{const r=te.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return th(e,i)},zy=(e,t,r=50)=>{const{r:i,g:n,b:a,a:s}=te.parse(e),{r:o,g:l,b:c,a:h}=te.parse(t),u=r/100,d=u*2-1,f=s-h,m=((d*f===-1?d:(d+f)/(1+d*f))+1)/2,y=1-m,x=i*m+o*y,b=n*m+l*y,w=a*m+c*y,C=s*u+h*(1-u);return gr(x,b,w,C)},Y=(e,t=100)=>{const r=te.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,zy(r,e,t)};var rh=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,ci=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,qy=/\s*%%.*\n/gm,xr,ih=(xr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(xr,"UnknownDiagramError"),xr),Xe={},no=p(function(e,t){e=e.replace(rh,"").replace(ci,"").replace(qy,`
7
- `);for(const[r,{detector:i}]of Object.entries(Xe))if(i(e,t))return r;throw new ih(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Qa=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)nh(t,r,i)},"registerLazyLoadedDiagrams"),nh=p((e,t,r)=>{Xe[e]&&I.warn(`Detector with key ${e} already exists. Overwriting.`),Xe[e]={detector:t,loader:r},I.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),jy=p(e=>Xe[e].loader,"getDiagramLoader"),Ja=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>Ja(e,a,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=Ja(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),bt=Ja,Vn="#ffffff",Zn="#f2f2f2",Ot=p((e,t)=>t?_(e,{s:-40,l:10}):_(e,{s:-40,l:-10}),"mkBorder"),br,Wy=(br=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||_(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||_(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Y(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Y(this.tertiaryColor),this.lineColor=this.lineColor||Y(this.background),this.arrowheadColor=this.arrowheadColor||Y(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?et(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||et(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Y(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||X(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.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||et(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||et(this.mainBkg,10)):(this.rowOdd=this.rowOdd||X(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||X(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||_(this.primaryColor,{h:30}),this.cScale4=this.cScale4||_(this.primaryColor,{h:60}),this.cScale5=this.cScale5||_(this.primaryColor,{h:90}),this.cScale6=this.cScale6||_(this.primaryColor,{h:120}),this.cScale7=this.cScale7||_(this.primaryColor,{h:150}),this.cScale8=this.cScale8||_(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||_(this.primaryColor,{h:270}),this.cScale10=this.cScale10||_(this.primaryColor,{h:300}),this.cScale11=this.cScale11||_(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=et(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=et(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||Y(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||X(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||et(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||_(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||_(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||_(this.primaryColor,{h:64}),this.fillType3=this.fillType3||_(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||_(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||_(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||_(this.primaryColor,{h:128}),this.fillType7=this.fillType7||_(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||_(this.primaryColor,{l:-10}),this.pie5=this.pie5||_(this.secondaryColor,{l:-10}),this.pie6=this.pie6||_(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||_(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||_(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||_(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||_(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||_(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||_(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.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.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||_(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||_(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||_(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||_(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||_(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||_(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Pr(this.quadrant1Fill)?X(this.quadrant1Fill):et(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?et(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||_(this.primaryColor,{h:-30}),this.git4=this.git4||_(this.primaryColor,{h:-60}),this.git5=this.git5||_(this.primaryColor,{h:-90}),this.git6=this.git6||_(this.primaryColor,{h:60}),this.git7=this.git7||_(this.primaryColor,{h:120}),this.darkMode?(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)):(this.git0=et(this.git0,25),this.git1=et(this.git1,25),this.git2=et(this.git2,25),this.git3=et(this.git3,25),this.git4=et(this.git4,25),this.git5=et(this.git5,25),this.git6=et(this.git6,25),this.git7=et(this.git7,25)),this.gitInv0=this.gitInv0||Y(this.git0),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(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||Vn,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Zn}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(br,"Theme"),br),Hy=p(e=>{const t=new Wy;return t.calculate(e),t},"getThemeVariables"),wr,Yy=(wr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=X(this.primaryColor,16),this.tertiaryColor=_(this.primaryColor,{h:-160}),this.primaryBorderColor=Y(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=Y(this.primaryColor),this.secondaryTextColor=Y(this.secondaryColor),this.tertiaryTextColor=Y(this.tertiaryColor),this.lineColor=Y(this.background),this.textColor=Y(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=X(Y("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=gr(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.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.sectionBkgColor=et("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=et(this.sectionBkgColor,10),this.taskBorderColor=gr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=gr(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||X(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||et(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=X(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=X(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=X(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=this.darkTextColor,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=_(this.primaryColor,{h:64}),this.fillType3=_(this.secondaryColor,{h:64}),this.fillType4=_(this.primaryColor,{h:-64}),this.fillType5=_(this.secondaryColor,{h:-64}),this.fillType6=_(this.primaryColor,{h:128}),this.fillType7=_(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||_(this.primaryColor,{h:30}),this.cScale4=this.cScale4||_(this.primaryColor,{h:60}),this.cScale5=this.cScale5||_(this.primaryColor,{h:90}),this.cScale6=this.cScale6||_(this.primaryColor,{h:120}),this.cScale7=this.cScale7||_(this.primaryColor,{h:150}),this.cScale8=this.cScale8||_(this.primaryColor,{h:210}),this.cScale9=this.cScale9||_(this.primaryColor,{h:270}),this.cScale10=this.cScale10||_(this.primaryColor,{h:300}),this.cScale11=this.cScale11||_(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Y(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||X(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||_(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||_(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||_(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||_(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||_(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||_(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||_(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||_(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Pr(this.quadrant1Fill)?X(this.quadrant1Fill):et(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#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.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?et(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=X(this.secondaryColor,20),this.git1=X(this.pie2||this.secondaryColor,20),this.git2=X(this.pie3||this.tertiaryColor,20),this.git3=X(this.pie4||_(this.primaryColor,{h:-30}),20),this.git4=X(this.pie5||_(this.primaryColor,{h:-60}),20),this.git5=X(this.pie6||_(this.primaryColor,{h:-90}),10),this.git6=X(this.pie7||_(this.primaryColor,{h:60}),10),this.git7=X(this.pie8||_(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Y(this.git0),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Y(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Y(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||X(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||X(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(wr,"Theme"),wr),Uy=p(e=>{const t=new Yy;return t.calculate(e),t},"getThemeVariables"),vr,Gy=(vr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=_(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=_(this.primaryColor,{h:-160}),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=Y(this.primaryColor),this.secondaryTextColor=Y(this.secondaryColor),this.tertiaryTextColor=Y(this.tertiaryColor),this.lineColor=Y(this.background),this.textColor=Y(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",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.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.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=gr(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.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.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||_(this.primaryColor,{h:30}),this.cScale4=this.cScale4||_(this.primaryColor,{h:60}),this.cScale5=this.cScale5||_(this.primaryColor,{h:90}),this.cScale6=this.cScale6||_(this.primaryColor,{h:120}),this.cScale7=this.cScale7||_(this.primaryColor,{h:150}),this.cScale8=this.cScale8||_(this.primaryColor,{h:210}),this.cScale9=this.cScale9||_(this.primaryColor,{h:270}),this.cScale10=this.cScale10||_(this.primaryColor,{h:300}),this.cScale11=this.cScale11||_(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||et(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||et(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=et(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||et(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||_(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||_(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||_(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||Y(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Y(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=X(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||X(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||X(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=_(this.primaryColor,{h:64}),this.fillType3=_(this.secondaryColor,{h:64}),this.fillType4=_(this.primaryColor,{h:-64}),this.fillType5=_(this.secondaryColor,{h:-64}),this.fillType6=_(this.primaryColor,{h:128}),this.fillType7=_(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||_(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||_(this.primaryColor,{l:-10}),this.pie5=this.pie5||_(this.secondaryColor,{l:-30}),this.pie6=this.pie6||_(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||_(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||_(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||_(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||_(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||_(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||_(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||_(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||_(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||_(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||_(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||_(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||_(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Pr(this.quadrant1Fill)?X(this.quadrant1Fill):et(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.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#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||_(this.primaryColor,{h:-30}),this.git4=this.git4||_(this.primaryColor,{h:-60}),this.git5=this.git5||_(this.primaryColor,{h:-90}),this.git6=this.git6||_(this.primaryColor,{h:60}),this.git7=this.git7||_(this.primaryColor,{h:120}),this.darkMode?(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)):(this.git0=et(this.git0,25),this.git1=et(this.git1,25),this.git2=et(this.git2,25),this.git3=et(this.git3,25),this.git4=et(this.git4,25),this.git5=et(this.git5,25),this.git6=et(this.git6,25),this.git7=et(this.git7,25)),this.gitInv0=this.gitInv0||et(Y(this.git0),25),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Y(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Y(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Vn,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Zn}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(vr,"Theme"),vr),ah=p(e=>{const t=new Gy;return t.calculate(e),t},"getThemeVariables"),kr,Xy=(kr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=X("#cde498",10),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=Y(this.primaryColor),this.secondaryTextColor=Y(this.secondaryColor),this.tertiaryTextColor=Y(this.primaryColor),this.lineColor=Y(this.background),this.textColor=Y(this.background),this.THEME_COLOR_LIMIT=12,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.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=et(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||_(this.primaryColor,{h:30}),this.cScale4=this.cScale4||_(this.primaryColor,{h:60}),this.cScale5=this.cScale5||_(this.primaryColor,{h:90}),this.cScale6=this.cScale6||_(this.primaryColor,{h:120}),this.cScale7=this.cScale7||_(this.primaryColor,{h:150}),this.cScale8=this.cScale8||_(this.primaryColor,{h:210}),this.cScale9=this.cScale9||_(this.primaryColor,{h:270}),this.cScale10=this.cScale10||_(this.primaryColor,{h:300}),this.cScale11=this.cScale11||_(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||et(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||et(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=et(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||et(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||_(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||_(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||_(this.mainBkg,{h:30,s:-30,l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||X(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||X(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=_(this.primaryColor,{h:64}),this.fillType3=_(this.secondaryColor,{h:64}),this.fillType4=_(this.primaryColor,{h:-64}),this.fillType5=_(this.secondaryColor,{h:-64}),this.fillType6=_(this.primaryColor,{h:128}),this.fillType7=_(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||_(this.primaryColor,{l:-30}),this.pie5=this.pie5||_(this.secondaryColor,{l:-30}),this.pie6=this.pie6||_(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||_(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||_(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||_(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||_(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||_(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||_(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||_(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||_(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||_(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||_(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||_(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||_(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Pr(this.quadrant1Fill)?X(this.quadrant1Fill):et(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.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#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||_(this.primaryColor,{h:-30}),this.git4=this.git4||_(this.primaryColor,{h:-60}),this.git5=this.git5||_(this.primaryColor,{h:-90}),this.git6=this.git6||_(this.primaryColor,{h:60}),this.git7=this.git7||_(this.primaryColor,{h:120}),this.darkMode?(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)):(this.git0=et(this.git0,25),this.git1=et(this.git1,25),this.git2=et(this.git2,25),this.git3=et(this.git3,25),this.git4=et(this.git4,25),this.git5=et(this.git5,25),this.git6=et(this.git6,25),this.git7=et(this.git7,25)),this.gitInv0=this.gitInv0||Y(this.git0),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Y(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Y(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Vn,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Zn}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(kr,"Theme"),kr),Vy=p(e=>{const t=new Xy;return t.calculate(e),t},"getThemeVariables"),Cr,Zy=(Cr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=X(this.contrast,55),this.background="#ffffff",this.tertiaryColor=_(this.primaryColor,{h:-160}),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=Y(this.primaryColor),this.secondaryTextColor=Y(this.secondaryColor),this.tertiaryTextColor=Y(this.tertiaryColor),this.lineColor=Y(this.background),this.textColor=Y(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.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.rowOdd=this.rowOdd||X(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=X(this.contrast,55),this.border2=this.contrast,this.actorBorder=X(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Y(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||X(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||et(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||_(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||_(this.mainBkg,{l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=X(this.contrast,30),this.sectionBkgColor2=X(this.contrast,30),this.taskBorderColor=et(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=X(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=et(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=_(this.primaryColor,{h:64}),this.fillType3=_(this.secondaryColor,{h:64}),this.fillType4=_(this.primaryColor,{h:-64}),this.fillType5=_(this.secondaryColor,{h:-64}),this.fillType6=_(this.primaryColor,{h:128}),this.fillType7=_(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||_(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||_(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||_(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||_(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||_(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||_(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Pr(this.quadrant1Fill)?X(this.quadrant1Fill):et(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#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.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=et(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||_(this.primaryColor,{h:-30}),this.git4=this.pie5||_(this.primaryColor,{h:-60}),this.git5=this.pie6||_(this.primaryColor,{h:-90}),this.git6=this.pie7||_(this.primaryColor,{h:60}),this.git7=this.pie8||_(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Y(this.git0),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Vn,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Zn}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Cr,"Theme"),Cr),Ky=p(e=>{const t=new Zy;return t.calculate(e),t},"getThemeVariables"),ye={base:{getThemeVariables:Hy},dark:{getThemeVariables:Uy},default:{getThemeVariables:ah},forest:{getThemeVariables:Vy},neutral:{getThemeVariables:Ky}},re={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},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:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},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={...re,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:ye.default.getThemeVariables(),sequence:{...re.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...re.gantt,tickInterval:void 0,useWidth:void 0},c4:{...re.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...re.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:{...re.pie,useWidth:984},xyChart:{...re.xyChart,useWidth:void 0},requirement:{...re.requirement,useWidth:void 0},packet:{...re.packet},radar:{...re.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},oh=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...oh(e[i],"")]:[...r,t+i],[]),"keyify"),Qy=new Set(oh(sh,"")),ao=sh,pn=p(e=>{if(I.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>pn(t));return}for(const t of Object.keys(e)){if(I.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Qy.has(t)||e[t]==null){I.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){I.debug("sanitizing object",t),pn(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(I.debug("sanitizing css option",t),e[t]=Jy(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]="")}I.debug("After sanitization",e)}},"sanitizeDirective"),Jy=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Tr=Object.freeze(ao),qt=bt({},Tr),gn,Ve=[],hi=bt({},Tr),Kn=p((e,t)=>{let r=bt({},e),i={};for(const n of t)hh(n),i=bt(i,n);if(r=bt(r,i),i.theme&&i.theme in ye){const n=bt({},gn),a=bt(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in ye&&(r.themeVariables=ye[r.theme].getThemeVariables(a))}return hi=r,uh(hi),hi},"updateCurrentConfig"),tx=p(e=>(qt=bt({},Tr),qt=bt(qt,e),e.theme&&ye[e.theme]&&(qt.themeVariables=ye[e.theme].getThemeVariables(e.themeVariables)),Kn(qt,Ve),qt),"setSiteConfig"),ex=p(e=>{gn=bt({},e)},"saveConfigFromInitialize"),rx=p(e=>(qt=bt(qt,e),Kn(qt,Ve),qt),"updateSiteConfig"),lh=p(()=>bt({},qt),"getSiteConfig"),ch=p(e=>(uh(e),bt(hi,e),$t()),"setConfig"),$t=p(()=>bt({},hi),"getConfig"),hh=p(e=>{e&&(["secure",...qt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(I.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"&&hh(e[t])}))},"sanitize"),ix=p(e=>{pn(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Ve.push(e),Kn(qt,Ve)},"addDirective"),mn=p((e=qt)=>{Ve=[],Kn(e,Ve)},"reset"),nx={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},bl={},ax=p(e=>{bl[e]||(I.warn(nx[e]),bl[e]=!0)},"issueWarning"),uh=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&ax("LAZY_LOAD_DEPRECATED")},"checkConfig"),sx=p(()=>{let e={};gn&&(e=bt(e,gn));for(const t of Ve)e=bt(e,t);return e},"getUserDefinedConfig"),Rr=/<br\s*\/?>/gi,ox=p(e=>e?ph(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),lx=(()=>{let e=!1;return()=>{e||(dh(),e=!0)}})();function dh(){const e="data-temp-href-target";Ge.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Ge.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(dh,"setupDompurifyHooks");var fh=p(e=>(lx(),Ge.sanitize(e)),"removeScript"),wl=p((e,t)=>{if(t.flowchart?.htmlLabels!==!1){const r=t.securityLevel;r==="antiscript"||r==="strict"?e=fh(e):r!=="loose"&&(e=ph(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=dx(e))}return e},"sanitizeMore"),Ht=p((e,t)=>e&&(t.dompurifyConfig?e=Ge.sanitize(wl(e,t),t.dompurifyConfig).toString():e=Ge.sanitize(wl(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),cx=p((e,t)=>typeof e=="string"?Ht(e,t):e.flat().map(r=>Ht(r,t)),"sanitizeTextOrArray"),hx=p(e=>Rr.test(e),"hasBreaks"),ux=p(e=>e.split(Rr),"splitBreaks"),dx=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),ph=p(e=>e.replace(Rr,"#br#"),"breakToPlaceholder"),gh=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"),wt=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),fx=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),px=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),ts=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let n=t[i];if(n===","&&i>0&&i+1<t.length){const a=t[i-1],s=t[i+1];gx(a,s)&&(n=a+","+s,i++,r.pop())}r.push(mx(n))}return r.join("")},"parseGenericTypes"),es=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),gx=p((e,t)=>{const r=es(e,"~"),i=es(t,"~");return r===1&&i===1},"shouldCombineSets"),mx=p(e=>{const t=es(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let n=i.indexOf("~"),a=i.lastIndexOf("~");for(;n!==-1&&a!==-1&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),vl=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),rs=/\$\$(.*)\$\$/g,Ze=p(e=>(e.match(rs)?.length??0)>0,"hasKatex"),yx=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Qn(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 n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),xx=p(async(e,t)=>{if(!Ze(e))return e;if(!(vl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(rs,"MathML is unsupported in this environment.");{const{default:r}=await import("katex"),i=t.forceLegacyMathML||!vl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Rr).map(n=>Ze(n)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${n}</div>`:`<div>${n}</div>`).join("").replace(rs,(n,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Qn=p(async(e,t)=>Ht(await xx(e,t),t),"renderKatexSanitized"),rr={getRows:ox,sanitizeText:Ht,sanitizeTextOrArray:cx,hasBreaks:hx,splitBreaks:ux,lineBreakRegex:Rr,removeScript:fh,getUrl:gh,evaluate:wt,getMax:fx,getMin:px},bx=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),wx=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"),so=p(function(e,t,r,i){const n=wx(t,r,i);bx(e,n)},"configureSvgSize"),mh=p(function(e,t,r,i){const n=t.node().getBBox(),a=n.width,s=n.height;I.info(`SVG bounds: ${a}x${s}`,n);let o=0,l=0;I.info(`Graph bounds: ${o}x${l}`,e),o=a+r*2,l=s+r*2,I.info(`Calculated bounds: ${o}x${l}`),so(t,l,o,i);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),en={},vx=p((e,t,r)=>{let i="";return e in en&&en[e]?i=en[e](r):I.warn(`No theme found for ${e}`),` & {
6
+ <%s key={someKey} {...props} />`,H,st,mt,st),N[st+H]=!0)}if(st=null,R!==void 0&&(r(R),st=""+R),s(F)&&(r(F.key),st=""+F.key),"key"in F){R={};for(var _t in F)_t!=="key"&&(R[_t]=F[_t])}else R=F;return st&&o(R,typeof k=="function"?k.displayName||k.name||"Unknown":k),c(k,st,R,n(),U,ct)}function u(k){d(k)?k._store&&(k._store.validated=1):typeof k=="object"&&k!==null&&k.$$typeof===z&&(k._payload.status==="fulfilled"?d(k._payload.value)&&k._payload.value._store&&(k._payload.value._store.validated=1):k._store&&(k._store.validated=1))}function d(k){return typeof k=="object"&&k!==null&&k.$$typeof===g}var f=J,g=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),C=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),D=Symbol.for("react.client.reference"),W=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=Object.prototype.hasOwnProperty,$=Array.isArray,M=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(k){return k()}};var B,P={},E=f.react_stack_bottom_frame.bind(f,a)(),A=M(i(a)),N={};Hr.Fragment=y,Hr.jsx=function(k,F,R){var H=1e4>W.recentlyCreatedOwnerStacks++;return h(k,F,R,!1,H?Error("react-stack-top-frame"):E,H?M(i(k)):A)},Hr.jsxs=function(k,F,R){var H=1e4>W.recentlyCreatedOwnerStacks++;return h(k,F,R,!0,H?Error("react-stack-top-frame"):E,H?M(i(k)):A)}})()),Hr}var pl;function ly(){return pl||(pl=1,process.env.NODE_ENV==="production"?Ni.exports=sy():Ni.exports=oy()),Ni.exports}var S=ly();const Hc=(e,t=64)=>`https://www.google.com/s2/favicons?domain=${encodeURIComponent(e)}&size=${t}`,Yc=({href:e,isExternal:t,metadata:r})=>{const i=J.useMemo(()=>Promise.resolve(r||null),[r]);return S.jsx(J.Suspense,{fallback:S.jsx(hy,{}),children:S.jsx(cy,{metadataPromise:i,href:e,isExternal:t})})},cy=({metadataPromise:e,href:t})=>{const r=J.use(e);if(r===null)return S.jsx(gl,{href:t});const i=new URL(t);return r===null?S.jsx(gl,{href:t}):S.jsxs("a",{className:"flex h-36 w-full gap-2 overflow-hidden rounded-lg border border-gray-300 bg-transparent transition-colors duration-200 hover:border-gray-600 hover:bg-gray-50 dark:border-neutral-600 dark:hover:border-neutral-200 dark:hover:bg-neutral-950",href:r.url||t,target:"_blank",rel:"noreferrer",children:[S.jsxs("div",{className:"flex flex-1 flex-col p-2 px-4",children:[S.jsx("div",{className:"break-words font-medium text-gray-900 dark:text-gray-100",children:r.title||r.site_name||t}),S.jsx("div",{className:"mt-2 flex-1",children:S.jsx("div",{className:"break-words text-gray-600 text-sm dark:text-gray-400",children:r.description})}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("img",{src:Hc(t,16),alt:"",width:16,height:16}),S.jsx("span",{className:"line-clamp-1 text-gray-600 text-sm dark:text-gray-400",children:r.site_name||i.hostname})]})]}),S.jsx("div",{className:"h-36 max-w-[40%]",children:r.image?S.jsx("img",{className:"h-full w-full object-cover",src:r.image,alt:""}):S.jsx("div",{className:"h-full w-full bg-gray-200 object-cover dark:bg-neutral-800"})})]})},gl=({href:e})=>S.jsx("a",{className:"flex gap-2 rounded-lg border border-gray-200 bg-transparent p-4 text-gray-900 transition-colors duration-200 hover:border-gray-300 hover:bg-gray-100 dark:border-neutral-800 dark:text-gray-100 dark:hover:border-neutral-700",href:e,target:"_blank",rel:"noreferrer",children:S.jsx("div",{className:"text-gray-600 text-sm dark:text-gray-400",children:e})}),hy=()=>S.jsxs("div",{className:"flex h-36 w-full gap-2 overflow-hidden rounded-lg border border-gray-200 dark:border-neutral-800",children:[S.jsxs("div",{className:"flex flex-1 flex-col p-2 px-4",children:[S.jsxs("div",{className:"flex flex-col gap-2",children:[S.jsx("div",{className:"h-4 w-full animate-pulse rounded bg-gray-300 dark:bg-neutral-700"}),S.jsx("div",{className:"h-4 w-4/5 animate-pulse rounded bg-gray-300 dark:bg-neutral-700"})]}),S.jsxs("div",{className:"mt-6 flex flex-1 flex-col gap-2",children:[S.jsx("div",{className:"h-4 w-full animate-pulse rounded bg-gray-300 dark:bg-neutral-700"}),S.jsx("div",{className:"h-4 w-4/5 animate-pulse rounded bg-gray-300 dark:bg-neutral-700"})]}),S.jsx("div",{className:"mt-auto h-4 w-4 animate-pulse rounded-sm bg-gray-300 dark:bg-neutral-700"})]}),S.jsx("div",{className:"h-full w-64 max-w-[40%] animate-pulse bg-gray-300 dark:bg-neutral-700"})]}),Uc=({node:e})=>{const r=e.data?.siteMetadata;return S.jsx("div",{className:"mt-6 mb-6",children:S.jsx(Yc,{href:e.url,isExternal:!0,metadata:r})})},Gc=({node:e})=>S.jsx("blockquote",{className:"my-4 border-gray-300 border-l-4 bg-gray-50 p-4 italic dark:border-gray-500 dark:bg-gray-800 dark:text-gray-300",children:S.jsx(Lt,{nodes:e.children})});var kt=function(){return kt=Object.assign||function(t){for(var r,i=1,n=arguments.length;i<n;i++){r=arguments[i];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},kt.apply(this,arguments)};typeof window<"u"&&(window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),typeof window.CustomEvent!="function"&&(window.CustomEvent=function(t,r){r=r||{bubbles:!1,cancelable:!1,detail:null};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,r.bubbles,r.cancelable,r.detail),i}));var uy=typeof document<"u"&&!!document.documentMode,Ma;function dy(){return Ma||(Ma=document.createElement("div").style)}var ml=["webkit","moz","ms"],Ii={};function eo(e){if(Ii[e])return Ii[e];var t=dy();if(e in t)return Ii[e]=e;for(var r=e[0].toUpperCase()+e.slice(1),i=ml.length;i--;){var n="".concat(ml[i]).concat(r);if(n in t)return Ii[e]=n}}function zi(e,t){return parseFloat(t[eo(e)])||0}function qi(e,t,r){r===void 0&&(r=window.getComputedStyle(e));var i=t==="border"?"Width":"";return{left:zi("".concat(t,"Left").concat(i),r),right:zi("".concat(t,"Right").concat(i),r),top:zi("".concat(t,"Top").concat(i),r),bottom:zi("".concat(t,"Bottom").concat(i),r)}}function dr(e,t,r){e.style[eo(t)]=r}function fy(e,t){var r=eo("transform");dr(e,"transition","".concat(r," ").concat(t.duration,"ms ").concat(t.easing))}function py(e,t,r){var i=t.x,n=t.y,a=t.scale,s=t.isSVG;if(dr(e,"transform","scale(".concat(a,") translate(").concat(i,"px, ").concat(n,"px)")),s&&uy){var o=window.getComputedStyle(e).getPropertyValue("transform");e.setAttribute("transform",o)}}function Aa(e){var t=e.parentNode,r=window.getComputedStyle(e),i=window.getComputedStyle(t),n=e.getBoundingClientRect(),a=t.getBoundingClientRect();return{elem:{style:r,width:n.width,height:n.height,top:n.top,bottom:n.bottom,left:n.left,right:n.right,margin:qi(e,"margin",r),border:qi(e,"border",r)},parent:{style:i,width:a.width,height:a.height,top:a.top,bottom:a.bottom,left:a.left,right:a.right,padding:qi(t,"padding",i),border:qi(t,"border",i)}}}var pi={down:"mousedown",move:"mousemove",up:"mouseup mouseleave"};typeof window<"u"&&(typeof window.PointerEvent=="function"?pi={down:"pointerdown",move:"pointermove",up:"pointerup pointerleave pointercancel"}:typeof window.TouchEvent=="function"&&(pi={down:"touchstart",move:"touchmove",up:"touchend touchcancel"}));function Ea(e,t,r,i){pi[e].split(" ").forEach(function(n){t.addEventListener(n,r,i)})}function Fa(e,t,r){pi[e].split(" ").forEach(function(i){t.removeEventListener(i,r)})}function Xc(e,t){for(var r=e.length;r--;)if(e[r].pointerId===t.pointerId)return r;return-1}function Za(e,t){var r;if(t.touches){r=0;for(var i=0,n=t.touches;i<n.length;i++){var a=n[i];a.pointerId=r++,Za(e,a)}return}r=Xc(e,t),r>-1&&e.splice(r,1),e.push(t)}function gy(e,t){if(t.touches){for(;e.length;)e.pop();return}var r=Xc(e,t);r>-1&&e.splice(r,1)}function yl(e){e=e.slice(0);for(var t=e.pop(),r;r=e.pop();)t={clientX:(r.clientX-t.clientX)/2+t.clientX,clientY:(r.clientY-t.clientY)/2+t.clientY};return t}function Pa(e){if(e.length<2)return 0;var t=e[0],r=e[1];return Math.sqrt(Math.pow(Math.abs(r.clientX-t.clientX),2)+Math.pow(Math.abs(r.clientY-t.clientY),2))}function my(e){for(var t=e;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1}function yy(e){return(e.getAttribute("class")||"").trim()}function xy(e,t){return e.nodeType===1&&" ".concat(yy(e)," ").indexOf(" ".concat(t," "))>-1}function by(e,t){for(var r=e;r!=null;r=r.parentNode)if(xy(r,t.excludeClass)||t.exclude.indexOf(r)>-1)return!0;return!1}var wy=/^http:[\w\.\/]+svg$/;function vy(e){return wy.test(e.namespaceURI)&&e.nodeName.toLowerCase()!=="svg"}function ky(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}var Vc={animate:!1,canvas:!1,cursor:"move",disablePan:!1,disableZoom:!1,disableXAxis:!1,disableYAxis:!1,duration:200,easing:"ease-in-out",exclude:[],excludeClass:"panzoom-exclude",handleStartEvent:function(e){e.preventDefault(),e.stopPropagation()},maxScale:4,minScale:.125,overflow:"hidden",panOnlyWhenZoomed:!1,pinchAndPan:!1,relative:!1,setTransform:py,startX:0,startY:0,startScale:1,step:.3,touchAction:"none"};function Zc(e,t){if(!e)throw new Error("Panzoom requires an element as an argument");if(e.nodeType!==1)throw new Error("Panzoom requires an element with a nodeType of 1");if(!my(e))throw new Error("Panzoom should be called on elements that have been attached to the DOM");t=kt(kt({},Vc),t);var r=vy(e),i=e.parentNode;i.style.overflow=t.overflow,i.style.userSelect="none",i.style.touchAction=t.touchAction,(t.canvas?i:e).style.cursor=t.cursor,e.style.userSelect="none",e.style.touchAction=t.touchAction,dr(e,"transformOrigin",typeof t.origin=="string"?t.origin:r?"0 0":"50% 50%");function n(){i.style.overflow="",i.style.userSelect="",i.style.touchAction="",i.style.cursor="",e.style.cursor="",e.style.userSelect="",e.style.touchAction="",dr(e,"transformOrigin","")}function a(A){A===void 0&&(A={});for(var N in A)A.hasOwnProperty(N)&&(t[N]=A[N]);(A.hasOwnProperty("cursor")||A.hasOwnProperty("canvas"))&&(i.style.cursor=e.style.cursor="",(t.canvas?i:e).style.cursor=t.cursor),A.hasOwnProperty("overflow")&&(i.style.overflow=A.overflow),A.hasOwnProperty("touchAction")&&(i.style.touchAction=A.touchAction,e.style.touchAction=A.touchAction)}var s=0,o=0,l=1,c=!1;m(t.startScale,{animate:!1,force:!0}),setTimeout(function(){g(t.startX,t.startY,{animate:!1,force:!0})});function h(A,N,k){if(!k.silent){var F=new CustomEvent(A,{detail:N});e.dispatchEvent(F)}}function u(A,N,k){var F={x:s,y:o,scale:l,isSVG:r,originalEvent:k};return requestAnimationFrame(function(){typeof N.animate=="boolean"&&(N.animate?fy(e,N):dr(e,"transition","none")),N.setTransform(e,F,N),h(A,F,N),h("panzoomchange",F,N)}),F}function d(A,N,k,F){var R=kt(kt({},t),F),H={x:s,y:o,opts:R};if(!F?.force&&(R.disablePan||R.panOnlyWhenZoomed&&l===R.startScale))return H;if(A=parseFloat(A),N=parseFloat(N),R.disableXAxis||(H.x=(R.relative?s:0)+A),R.disableYAxis||(H.y=(R.relative?o:0)+N),R.contain){var U=Aa(e),ct=U.elem.width/l,st=U.elem.height/l,mt=ct*k,_t=st*k,ft=(mt-ct)/2,Mt=(_t-st)/2;if(R.contain==="inside"){var ue=(-U.elem.margin.left-U.parent.padding.left+ft)/k,_e=(U.parent.width-mt-U.parent.padding.left-U.elem.margin.left-U.parent.border.left-U.parent.border.right+ft)/k;H.x=Math.max(Math.min(H.x,_e),ue);var Ba=(-U.elem.margin.top-U.parent.padding.top+Mt)/k,$a=(U.parent.height-_t-U.parent.padding.top-U.elem.margin.top-U.parent.border.top-U.parent.border.bottom+Mt)/k;H.y=Math.max(Math.min(H.y,$a),Ba)}else if(R.contain==="outside"){var ue=(-(mt-U.parent.width)-U.parent.padding.left-U.parent.border.left-U.parent.border.right+ft)/k,_e=(ft-U.parent.padding.left)/k;H.x=Math.max(Math.min(H.x,_e),ue);var Ba=(-(_t-U.parent.height)-U.parent.padding.top-U.parent.border.top-U.parent.border.bottom+Mt)/k,$a=(Mt-U.parent.padding.top)/k;H.y=Math.max(Math.min(H.y,$a),Ba)}}return R.roundPixels&&(H.x=Math.round(H.x),H.y=Math.round(H.y)),H}function f(A,N){var k=kt(kt({},t),N),F={scale:l,opts:k};if(!N?.force&&k.disableZoom)return F;var R=t.minScale,H=t.maxScale;if(k.contain){var U=Aa(e),ct=U.elem.width/l,st=U.elem.height/l;if(ct>1&&st>1){var mt=U.parent.width-U.parent.border.left-U.parent.border.right,_t=U.parent.height-U.parent.border.top-U.parent.border.bottom,ft=mt/ct,Mt=_t/st;t.contain==="inside"?H=Math.min(H,ft,Mt):t.contain==="outside"&&(R=Math.max(R,ft,Mt))}}return F.scale=Math.min(Math.max(A,R),H),F}function g(A,N,k,F){var R=d(A,N,l,k);return s!==R.x||o!==R.y?(s=R.x,o=R.y,u("panzoompan",R.opts,F)):{x:s,y:o,scale:l,isSVG:r,originalEvent:F}}function m(A,N,k){var F=f(A,N),R=F.opts;if(!(!N?.force&&R.disableZoom)){A=F.scale;var H=s,U=o;if(R.focal){var ct=R.focal;H=(ct.x/A-ct.x/l+s*A)/A,U=(ct.y/A-ct.y/l+o*A)/A}var st=d(H,U,A,{relative:!1,force:!0});return s=st.x,o=st.y,l=A,u("panzoomzoom",R,k)}}function y(A,N){var k=kt(kt(kt({},t),{animate:!0}),N);return m(l*Math.exp((A?1:-1)*k.step),k)}function x(A){return y(!0,A)}function b(A){return y(!1,A)}function w(A,N,k,F){var R=Aa(e),H={width:R.parent.width-R.parent.padding.left-R.parent.padding.right-R.parent.border.left-R.parent.border.right,height:R.parent.height-R.parent.padding.top-R.parent.padding.bottom-R.parent.border.top-R.parent.border.bottom},U=N.clientX-R.parent.left-R.parent.padding.left-R.parent.border.left-R.elem.margin.left,ct=N.clientY-R.parent.top-R.parent.padding.top-R.parent.border.top-R.elem.margin.top;r||(U-=R.elem.width/l/2,ct-=R.elem.height/l/2);var st={x:U/H.width*(H.width*A),y:ct/H.height*(H.height*A)};return m(A,kt(kt({},k),{animate:!1,focal:st}),F)}function C(A,N){A.preventDefault();var k=kt(kt(kt({},t),N),{animate:!1}),F=A.deltaY===0&&A.deltaX?A.deltaX:A.deltaY,R=F<0?1:-1,H=f(l*Math.exp(R*k.step/3),k).scale;return w(H,A,k,A)}function v(A){var N=kt(kt(kt({},t),{animate:!0,force:!0}),A);l=f(N.startScale,N).scale;var k=d(N.startX,N.startY,l,N);return s=k.x,o=k.y,u("panzoomreset",N)}var L,T,O,z,q,D,W=[];function j(A){if(!by(A.target,t)){Za(W,A),c=!0,t.handleStartEvent(A),L=s,T=o,h("panzoomstart",{x:s,y:o,scale:l,isSVG:r,originalEvent:A},t);var N=yl(W);O=N.clientX,z=N.clientY,q=l,D=Pa(W)}}function $(A){if(!(!c||L===void 0||T===void 0||O===void 0||z===void 0)){Za(W,A);var N=yl(W),k=W.length>1,F=l;if(k){D===0&&(D=Pa(W));var R=Pa(W)-D;F=f(R*t.step/80+q).scale,w(F,N,{animate:!1},A)}(!k||t.pinchAndPan)&&g(L+(N.clientX-O)/F,T+(N.clientY-z)/F,{animate:!1},A)}}function M(A){W.length===1&&h("panzoomend",{x:s,y:o,scale:l,isSVG:r,originalEvent:A},t),gy(W,A),c&&(c=!1,L=T=O=z=void 0)}var B=!1;function P(){B||(B=!0,Ea("down",t.canvas?i:e,j),Ea("move",document,$,{passive:!0}),Ea("up",document,M,{passive:!0}))}function E(){B=!1,Fa("down",t.canvas?i:e,j),Fa("move",document,$),Fa("up",document,M)}return t.noBind||P(),{bind:P,destroy:E,eventNames:pi,getPan:function(){return{x:s,y:o}},getScale:function(){return l},getOptions:function(){return ky(t)},handleDown:j,handleMove:$,handleUp:M,pan:g,reset:v,resetStyle:n,setOptions:a,setStyle:function(A,N){return dr(e,A,N)},zoom:m,zoomIn:x,zoomOut:b,zoomToPoint:w,zoomWithWheel:C}}Zc.defaultOptions=Vc;const Cy=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_y=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,i)=>i?i.toUpperCase():r.toLowerCase()),xl=e=>{const t=_y(e);return t.charAt(0).toUpperCase()+t.slice(1)},Kc=(...e)=>e.filter((t,r,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===r).join(" ").trim(),Sy=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Ty={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const By=J.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:n="",children:a,iconNode:s,...o},l)=>J.createElement("svg",{ref:l,...Ty,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:Kc("lucide",n),...!a&&!Sy(o)&&{"aria-hidden":"true"},...o},[...s.map(([c,h])=>J.createElement(c,h)),...Array.isArray(a)?a:[a]]));const ro=(e,t)=>{const r=J.forwardRef(({className:i,...n},a)=>J.createElement(By,{ref:a,iconNode:t,className:Kc(`lucide-${Cy(xl(e))}`,`lucide-${e}`,i),...n}));return r.displayName=xl(e),r};const $y=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Ly=ro("refresh-cw",$y);const My=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],Ay=ro("zoom-in",My);const Ey=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],Fy=ro("zoom-out",Ey);var Ka={name:"mermaid",version:"11.12.2",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},Ji={exports:{}},Py=Ji.exports,bl;function Ry(){return bl||(bl=1,(function(e,t){(function(r,i){e.exports=i()})(Py,(function(){var r=1e3,i=6e4,n=36e5,a="millisecond",s="second",o="minute",l="hour",c="day",h="week",u="month",d="quarter",f="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function($){var M=["th","st","nd","rd"],B=$%100;return"["+$+(M[(B-20)%10]||M[B]||M[0])+"]"}},w=function($,M,B){var P=String($);return!P||P.length>=M?$:""+Array(M+1-P.length).join(B)+$},C={s:w,z:function($){var M=-$.utcOffset(),B=Math.abs(M),P=Math.floor(B/60),E=B%60;return(M<=0?"+":"-")+w(P,2,"0")+":"+w(E,2,"0")},m:function $(M,B){if(M.date()<B.date())return-$(B,M);var P=12*(B.year()-M.year())+(B.month()-M.month()),E=M.clone().add(P,u),A=B-E<0,N=M.clone().add(P+(A?-1:1),u);return+(-(P+(B-E)/(A?E-N:N-E))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:u,y:f,w:h,d:c,D:g,h:l,m:o,s,ms:a,Q:d}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},v="en",L={};L[v]=b;var T="$isDayjsObject",O=function($){return $ instanceof W||!(!$||!$[T])},z=function $(M,B,P){var E;if(!M)return v;if(typeof M=="string"){var A=M.toLowerCase();L[A]&&(E=A),B&&(L[A]=B,E=A);var N=M.split("-");if(!E&&N.length>1)return $(N[0])}else{var k=M.name;L[k]=M,E=k}return!P&&E&&(v=E),E||!P&&v},q=function($,M){if(O($))return $.clone();var B=typeof M=="object"?M:{};return B.date=$,B.args=arguments,new W(B)},D=C;D.l=z,D.i=O,D.w=function($,M){return q($,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var W=(function(){function $(B){this.$L=z(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[T]=!0}var M=$.prototype;return M.parse=function(B){this.$d=(function(P){var E=P.date,A=P.utc;if(E===null)return new Date(NaN);if(D.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var N=E.match(y);if(N){var k=N[2]-1||0,F=(N[7]||"0").substring(0,3);return A?new Date(Date.UTC(N[1],k,N[3]||1,N[4]||0,N[5]||0,N[6]||0,F)):new Date(N[1],k,N[3]||1,N[4]||0,N[5]||0,N[6]||0,F)}}return new Date(E)})(B),this.init()},M.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},M.$utils=function(){return D},M.isValid=function(){return this.$d.toString()!==m},M.isSame=function(B,P){var E=q(B);return this.startOf(P)<=E&&E<=this.endOf(P)},M.isAfter=function(B,P){return q(B)<this.startOf(P)},M.isBefore=function(B,P){return this.endOf(P)<q(B)},M.$g=function(B,P,E){return D.u(B)?this[P]:this.set(E,B)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(B,P){var E=this,A=!!D.u(P)||P,N=D.p(B),k=function(_t,ft){var Mt=D.w(E.$u?Date.UTC(E.$y,ft,_t):new Date(E.$y,ft,_t),E);return A?Mt:Mt.endOf(c)},F=function(_t,ft){return D.w(E.toDate()[_t].apply(E.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(ft)),E)},R=this.$W,H=this.$M,U=this.$D,ct="set"+(this.$u?"UTC":"");switch(N){case f:return A?k(1,0):k(31,11);case u:return A?k(1,H):k(0,H+1);case h:var st=this.$locale().weekStart||0,mt=(R<st?R+7:R)-st;return k(A?U-mt:U+(6-mt),H);case c:case g:return F(ct+"Hours",0);case l:return F(ct+"Minutes",1);case o:return F(ct+"Seconds",2);case s:return F(ct+"Milliseconds",3);default:return this.clone()}},M.endOf=function(B){return this.startOf(B,!1)},M.$set=function(B,P){var E,A=D.p(B),N="set"+(this.$u?"UTC":""),k=(E={},E[c]=N+"Date",E[g]=N+"Date",E[u]=N+"Month",E[f]=N+"FullYear",E[l]=N+"Hours",E[o]=N+"Minutes",E[s]=N+"Seconds",E[a]=N+"Milliseconds",E)[A],F=A===c?this.$D+(P-this.$W):P;if(A===u||A===f){var R=this.clone().set(g,1);R.$d[k](F),R.init(),this.$d=R.set(g,Math.min(this.$D,R.daysInMonth())).$d}else k&&this.$d[k](F);return this.init(),this},M.set=function(B,P){return this.clone().$set(B,P)},M.get=function(B){return this[D.p(B)]()},M.add=function(B,P){var E,A=this;B=Number(B);var N=D.p(P),k=function(H){var U=q(A);return D.w(U.date(U.date()+Math.round(H*B)),A)};if(N===u)return this.set(u,this.$M+B);if(N===f)return this.set(f,this.$y+B);if(N===c)return k(1);if(N===h)return k(7);var F=(E={},E[o]=i,E[l]=n,E[s]=r,E)[N]||1,R=this.$d.getTime()+B*F;return D.w(R,this)},M.subtract=function(B,P){return this.add(-1*B,P)},M.format=function(B){var P=this,E=this.$locale();if(!this.isValid())return E.invalidDate||m;var A=B||"YYYY-MM-DDTHH:mm:ssZ",N=D.z(this),k=this.$H,F=this.$m,R=this.$M,H=E.weekdays,U=E.months,ct=E.meridiem,st=function(ft,Mt,ue,_e){return ft&&(ft[Mt]||ft(P,A))||ue[Mt].slice(0,_e)},mt=function(ft){return D.s(k%12||12,ft,"0")},_t=ct||function(ft,Mt,ue){var _e=ft<12?"AM":"PM";return ue?_e.toLowerCase():_e};return A.replace(x,(function(ft,Mt){return Mt||(function(ue){switch(ue){case"YY":return String(P.$y).slice(-2);case"YYYY":return D.s(P.$y,4,"0");case"M":return R+1;case"MM":return D.s(R+1,2,"0");case"MMM":return st(E.monthsShort,R,U,3);case"MMMM":return st(U,R);case"D":return P.$D;case"DD":return D.s(P.$D,2,"0");case"d":return String(P.$W);case"dd":return st(E.weekdaysMin,P.$W,H,2);case"ddd":return st(E.weekdaysShort,P.$W,H,3);case"dddd":return H[P.$W];case"H":return String(k);case"HH":return D.s(k,2,"0");case"h":return mt(1);case"hh":return mt(2);case"a":return _t(k,F,!0);case"A":return _t(k,F,!1);case"m":return String(F);case"mm":return D.s(F,2,"0");case"s":return String(P.$s);case"ss":return D.s(P.$s,2,"0");case"SSS":return D.s(P.$ms,3,"0");case"Z":return N}return null})(ft)||N.replace(":","")}))},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(B,P,E){var A,N=this,k=D.p(P),F=q(B),R=(F.utcOffset()-this.utcOffset())*i,H=this-F,U=function(){return D.m(N,F)};switch(k){case f:A=U()/12;break;case u:A=U();break;case d:A=U()/3;break;case h:A=(H-R)/6048e5;break;case c:A=(H-R)/864e5;break;case l:A=H/n;break;case o:A=H/i;break;case s:A=H/r;break;default:A=H}return E?A:D.a(A)},M.daysInMonth=function(){return this.endOf(u).$D},M.$locale=function(){return L[this.$L]},M.locale=function(B,P){if(!B)return this.$L;var E=this.clone(),A=z(B,P,!0);return A&&(E.$L=A),E},M.clone=function(){return D.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},$})(),j=W.prototype;return q.prototype=j,[["$ms",a],["$s",s],["$m",o],["$H",l],["$W",c],["$M",u],["$y",f],["$D",g]].forEach((function($){j[$[1]]=function(M){return this.$g(M,$[0],$[1])}})),q.extend=function($,M){return $.$i||($(M,W,q),$.$i=!0),q},q.locale=z,q.isDayjs=O,q.unix=function($){return q(1e3*$)},q.en=L[v],q.Ls=L,q.p={},q}))})(Ji)),Ji.exports}var Dy=Ry();const Qc=Wc(Dy);var Jc=Object.defineProperty,p=(e,t)=>Jc(e,"name",{value:t,configurable:!0}),th=(e,t)=>{for(var r in t)Jc(e,r,{get:t[r],enumerable:!0})},de={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},I={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},io=p(function(e="fatal"){let t=de.fatal;typeof e=="string"?e.toLowerCase()in de&&(t=de[e]):typeof e=="number"&&(t=e),I.trace=()=>{},I.debug=()=>{},I.info=()=>{},I.warn=()=>{},I.error=()=>{},I.fatal=()=>{},t<=de.fatal&&(I.fatal=console.error?console.error.bind(console,Ut("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Ut("FATAL"))),t<=de.error&&(I.error=console.error?console.error.bind(console,Ut("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Ut("ERROR"))),t<=de.warn&&(I.warn=console.warn?console.warn.bind(console,Ut("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Ut("WARN"))),t<=de.info&&(I.info=console.info?console.info.bind(console,Ut("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Ut("INFO"))),t<=de.debug&&(I.debug=console.debug?console.debug.bind(console,Ut("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ut("DEBUG"))),t<=de.trace&&(I.trace=console.debug?console.debug.bind(console,Ut("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ut("TRACE")))},"setLogLevel"),Ut=p(e=>`%c${Qc().format("ss.SSS")} : ${e} : `,"format");const tn={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const n=r<.5?r*(1+t):r+t-r*t,a=2*r-n;switch(i){case"r":return tn.hue2rgb(a,n,e+1/3)*255;case"g":return tn.hue2rgb(a,n,e)*255;case"b":return tn.hue2rgb(a,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),a=Math.min(e,t,r),s=(n+a)/2;if(i==="l")return s*100;if(n===a)return 0;const o=n-a,l=s>.5?o/(2-n-a):o/(n+a);if(i==="s")return l*100;switch(n){case e:return((t-r)/o+(t<r?6:0))*60;case t:return((r-e)/o+2)*60;case r:return((e-t)/o+4)*60;default:return-1}}},Oy={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Ny={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},at={channel:tn,lang:Oy,unit:Ny},Se={};for(let e=0;e<=255;e++)Se[e]=at.unit.dec2hex(e);const At={ALL:0,RGB:1,HSL:2};class Iy{constructor(){this.type=At.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=At.ALL}is(t){return this.type===t}}class zy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Iy}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=At.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=at.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=at.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=at.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=at.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=at.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=at.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(At.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(At.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(At.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(At.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(At.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(At.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(At.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(At.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(At.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(At.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(At.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(At.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Xn=new zy({r:0,g:0,b:0,a:0},"transparent"),pr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(pr.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,a=n%4===0,s=n>4,o=s?1:17,l=s?8:4,c=a?0:-1,h=s?255:15;return Xn.set({r:(i>>l*(c+3)&h)*o,g:(i>>l*(c+2)&h)*o,b:(i>>l*(c+1)&h)*o,a:a?(i&h)*o/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${Se[Math.round(t)]}${Se[Math.round(r)]}${Se[Math.round(i)]}${Se[Math.round(n*255)]}`:`#${Se[Math.round(t)]}${Se[Math.round(r)]}${Se[Math.round(i)]}`}},ze={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(ze.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return at.channel.clamp.h(parseFloat(r)*.9);case"rad":return at.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return at.channel.clamp.h(parseFloat(r)*360)}}return at.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(ze.re);if(!r)return;const[,i,n,a,s,o]=r;return Xn.set({h:ze._hue2deg(i),s:at.channel.clamp.s(parseFloat(n)),l:at.channel.clamp.l(parseFloat(a)),a:s?at.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%, ${n})`:`hsl(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%)`}},li={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=li.colors[e];if(t)return pr.parse(t)},stringify:e=>{const t=pr.stringify(e);for(const r in li.colors)if(li.colors[r]===t)return r}},Jr={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Jr.re);if(!r)return;const[,i,n,a,s,o,l,c,h]=r;return Xn.set({r:at.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:at.channel.clamp.g(s?parseFloat(a)*2.55:parseFloat(a)),b:at.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:c?at.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)}, ${at.lang.round(n)})`:`rgb(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)})`}},te={format:{keyword:li,hex:pr,rgb:Jr,rgba:Jr,hsl:ze,hsla:ze},parse:e=>{if(typeof e!="string")return e;const t=pr.parse(e)||Jr.parse(e)||ze.parse(e)||li.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(At.HSL)||e.data.r===void 0?ze.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Jr.stringify(e):pr.stringify(e)},eh=(e,t)=>{const r=te.parse(e);for(const i in t)r[i]=at.channel.clamp[i](t[i]);return te.stringify(r)},gr=(e,t,r=0,i=1)=>{if(typeof e!="number")return eh(e,{a:t});const n=Xn.set({r:at.channel.clamp.r(e),g:at.channel.clamp.g(t),b:at.channel.clamp.b(r),a:at.channel.clamp.a(i)});return te.stringify(n)},qy=e=>{const{r:t,g:r,b:i}=te.parse(e),n=.2126*at.channel.toLinear(t)+.7152*at.channel.toLinear(r)+.0722*at.channel.toLinear(i);return at.lang.round(n)},jy=e=>qy(e)>=.5,Pr=e=>!jy(e),rh=(e,t,r)=>{const i=te.parse(e),n=i[t],a=at.channel.clamp[t](n+r);return n!==a&&(i[t]=a),te.stringify(i)},X=(e,t)=>rh(e,"l",t),et=(e,t)=>rh(e,"l",-t),_=(e,t)=>{const r=te.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return eh(e,i)},Wy=(e,t,r=50)=>{const{r:i,g:n,b:a,a:s}=te.parse(e),{r:o,g:l,b:c,a:h}=te.parse(t),u=r/100,d=u*2-1,f=s-h,m=((d*f===-1?d:(d+f)/(1+d*f))+1)/2,y=1-m,x=i*m+o*y,b=n*m+l*y,w=a*m+c*y,C=s*u+h*(1-u);return gr(x,b,w,C)},Y=(e,t=100)=>{const r=te.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Wy(r,e,t)};var ih=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,ci=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Hy=/\s*%%.*\n/gm,xr,nh=(xr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(xr,"UnknownDiagramError"),xr),Xe={},no=p(function(e,t){e=e.replace(ih,"").replace(ci,"").replace(Hy,`
7
+ `);for(const[r,{detector:i}]of Object.entries(Xe))if(i(e,t))return r;throw new nh(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Qa=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)ah(t,r,i)},"registerLazyLoadedDiagrams"),ah=p((e,t,r)=>{Xe[e]&&I.warn(`Detector with key ${e} already exists. Overwriting.`),Xe[e]={detector:t,loader:r},I.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Yy=p(e=>Xe[e].loader,"getDiagramLoader"),Ja=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>Ja(e,a,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=Ja(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),bt=Ja,Vn="#ffffff",Zn="#f2f2f2",Dt=p((e,t)=>t?_(e,{s:-40,l:10}):_(e,{s:-40,l:-10}),"mkBorder"),br,Uy=(br=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||_(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||_(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Dt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Dt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Dt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Y(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Y(this.tertiaryColor),this.lineColor=this.lineColor||Y(this.background),this.arrowheadColor=this.arrowheadColor||Y(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?et(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||et(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Y(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||X(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.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||et(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||et(this.mainBkg,10)):(this.rowOdd=this.rowOdd||X(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||X(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||_(this.primaryColor,{h:30}),this.cScale4=this.cScale4||_(this.primaryColor,{h:60}),this.cScale5=this.cScale5||_(this.primaryColor,{h:90}),this.cScale6=this.cScale6||_(this.primaryColor,{h:120}),this.cScale7=this.cScale7||_(this.primaryColor,{h:150}),this.cScale8=this.cScale8||_(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||_(this.primaryColor,{h:270}),this.cScale10=this.cScale10||_(this.primaryColor,{h:300}),this.cScale11=this.cScale11||_(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=et(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=et(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||Y(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||X(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||et(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||_(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||_(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||_(this.primaryColor,{h:64}),this.fillType3=this.fillType3||_(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||_(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||_(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||_(this.primaryColor,{h:128}),this.fillType7=this.fillType7||_(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||_(this.primaryColor,{l:-10}),this.pie5=this.pie5||_(this.secondaryColor,{l:-10}),this.pie6=this.pie6||_(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||_(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||_(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||_(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||_(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||_(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||_(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.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.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||_(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||_(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||_(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||_(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||_(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||_(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Pr(this.quadrant1Fill)?X(this.quadrant1Fill):et(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?et(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||_(this.primaryColor,{h:-30}),this.git4=this.git4||_(this.primaryColor,{h:-60}),this.git5=this.git5||_(this.primaryColor,{h:-90}),this.git6=this.git6||_(this.primaryColor,{h:60}),this.git7=this.git7||_(this.primaryColor,{h:120}),this.darkMode?(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)):(this.git0=et(this.git0,25),this.git1=et(this.git1,25),this.git2=et(this.git2,25),this.git3=et(this.git3,25),this.git4=et(this.git4,25),this.git5=et(this.git5,25),this.git6=et(this.git6,25),this.git7=et(this.git7,25)),this.gitInv0=this.gitInv0||Y(this.git0),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(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||Vn,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Zn}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(br,"Theme"),br),Gy=p(e=>{const t=new Uy;return t.calculate(e),t},"getThemeVariables"),wr,Xy=(wr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=X(this.primaryColor,16),this.tertiaryColor=_(this.primaryColor,{h:-160}),this.primaryBorderColor=Y(this.background),this.secondaryBorderColor=Dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Dt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Y(this.primaryColor),this.secondaryTextColor=Y(this.secondaryColor),this.tertiaryTextColor=Y(this.tertiaryColor),this.lineColor=Y(this.background),this.textColor=Y(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=X(Y("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=gr(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.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.sectionBkgColor=et("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=et(this.sectionBkgColor,10),this.taskBorderColor=gr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=gr(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||X(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||et(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=X(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=X(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=X(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=this.darkTextColor,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=_(this.primaryColor,{h:64}),this.fillType3=_(this.secondaryColor,{h:64}),this.fillType4=_(this.primaryColor,{h:-64}),this.fillType5=_(this.secondaryColor,{h:-64}),this.fillType6=_(this.primaryColor,{h:128}),this.fillType7=_(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||_(this.primaryColor,{h:30}),this.cScale4=this.cScale4||_(this.primaryColor,{h:60}),this.cScale5=this.cScale5||_(this.primaryColor,{h:90}),this.cScale6=this.cScale6||_(this.primaryColor,{h:120}),this.cScale7=this.cScale7||_(this.primaryColor,{h:150}),this.cScale8=this.cScale8||_(this.primaryColor,{h:210}),this.cScale9=this.cScale9||_(this.primaryColor,{h:270}),this.cScale10=this.cScale10||_(this.primaryColor,{h:300}),this.cScale11=this.cScale11||_(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Y(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||X(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||_(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||_(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||_(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||_(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||_(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||_(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||_(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||_(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Pr(this.quadrant1Fill)?X(this.quadrant1Fill):et(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#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.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?et(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=X(this.secondaryColor,20),this.git1=X(this.pie2||this.secondaryColor,20),this.git2=X(this.pie3||this.tertiaryColor,20),this.git3=X(this.pie4||_(this.primaryColor,{h:-30}),20),this.git4=X(this.pie5||_(this.primaryColor,{h:-60}),20),this.git5=X(this.pie6||_(this.primaryColor,{h:-90}),10),this.git6=X(this.pie7||_(this.primaryColor,{h:60}),10),this.git7=X(this.pie8||_(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Y(this.git0),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Y(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Y(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||X(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||X(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(wr,"Theme"),wr),Vy=p(e=>{const t=new Xy;return t.calculate(e),t},"getThemeVariables"),vr,Zy=(vr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=_(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=_(this.primaryColor,{h:-160}),this.primaryBorderColor=Dt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Dt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Y(this.primaryColor),this.secondaryTextColor=Y(this.secondaryColor),this.tertiaryTextColor=Y(this.tertiaryColor),this.lineColor=Y(this.background),this.textColor=Y(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",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.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.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=gr(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.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.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||_(this.primaryColor,{h:30}),this.cScale4=this.cScale4||_(this.primaryColor,{h:60}),this.cScale5=this.cScale5||_(this.primaryColor,{h:90}),this.cScale6=this.cScale6||_(this.primaryColor,{h:120}),this.cScale7=this.cScale7||_(this.primaryColor,{h:150}),this.cScale8=this.cScale8||_(this.primaryColor,{h:210}),this.cScale9=this.cScale9||_(this.primaryColor,{h:270}),this.cScale10=this.cScale10||_(this.primaryColor,{h:300}),this.cScale11=this.cScale11||_(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||et(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||et(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=et(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||et(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||_(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||_(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||_(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||Y(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Y(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=X(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||X(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||X(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=_(this.primaryColor,{h:64}),this.fillType3=_(this.secondaryColor,{h:64}),this.fillType4=_(this.primaryColor,{h:-64}),this.fillType5=_(this.secondaryColor,{h:-64}),this.fillType6=_(this.primaryColor,{h:128}),this.fillType7=_(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||_(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||_(this.primaryColor,{l:-10}),this.pie5=this.pie5||_(this.secondaryColor,{l:-30}),this.pie6=this.pie6||_(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||_(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||_(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||_(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||_(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||_(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||_(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||_(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||_(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||_(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||_(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||_(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||_(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Pr(this.quadrant1Fill)?X(this.quadrant1Fill):et(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.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#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||_(this.primaryColor,{h:-30}),this.git4=this.git4||_(this.primaryColor,{h:-60}),this.git5=this.git5||_(this.primaryColor,{h:-90}),this.git6=this.git6||_(this.primaryColor,{h:60}),this.git7=this.git7||_(this.primaryColor,{h:120}),this.darkMode?(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)):(this.git0=et(this.git0,25),this.git1=et(this.git1,25),this.git2=et(this.git2,25),this.git3=et(this.git3,25),this.git4=et(this.git4,25),this.git5=et(this.git5,25),this.git6=et(this.git6,25),this.git7=et(this.git7,25)),this.gitInv0=this.gitInv0||et(Y(this.git0),25),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Y(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Y(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Vn,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Zn}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(vr,"Theme"),vr),sh=p(e=>{const t=new Zy;return t.calculate(e),t},"getThemeVariables"),kr,Ky=(kr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=X("#cde498",10),this.primaryBorderColor=Dt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Dt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Y(this.primaryColor),this.secondaryTextColor=Y(this.secondaryColor),this.tertiaryTextColor=Y(this.primaryColor),this.lineColor=Y(this.background),this.textColor=Y(this.background),this.THEME_COLOR_LIMIT=12,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.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=et(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||_(this.primaryColor,{h:30}),this.cScale4=this.cScale4||_(this.primaryColor,{h:60}),this.cScale5=this.cScale5||_(this.primaryColor,{h:90}),this.cScale6=this.cScale6||_(this.primaryColor,{h:120}),this.cScale7=this.cScale7||_(this.primaryColor,{h:150}),this.cScale8=this.cScale8||_(this.primaryColor,{h:210}),this.cScale9=this.cScale9||_(this.primaryColor,{h:270}),this.cScale10=this.cScale10||_(this.primaryColor,{h:300}),this.cScale11=this.cScale11||_(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||et(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||et(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=et(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||et(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||_(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||_(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||_(this.mainBkg,{h:30,s:-30,l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||X(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||X(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=_(this.primaryColor,{h:64}),this.fillType3=_(this.secondaryColor,{h:64}),this.fillType4=_(this.primaryColor,{h:-64}),this.fillType5=_(this.secondaryColor,{h:-64}),this.fillType6=_(this.primaryColor,{h:128}),this.fillType7=_(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||_(this.primaryColor,{l:-30}),this.pie5=this.pie5||_(this.secondaryColor,{l:-30}),this.pie6=this.pie6||_(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||_(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||_(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||_(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||_(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||_(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||_(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||_(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||_(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||_(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||_(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||_(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||_(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Pr(this.quadrant1Fill)?X(this.quadrant1Fill):et(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.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#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||_(this.primaryColor,{h:-30}),this.git4=this.git4||_(this.primaryColor,{h:-60}),this.git5=this.git5||_(this.primaryColor,{h:-90}),this.git6=this.git6||_(this.primaryColor,{h:60}),this.git7=this.git7||_(this.primaryColor,{h:120}),this.darkMode?(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)):(this.git0=et(this.git0,25),this.git1=et(this.git1,25),this.git2=et(this.git2,25),this.git3=et(this.git3,25),this.git4=et(this.git4,25),this.git5=et(this.git5,25),this.git6=et(this.git6,25),this.git7=et(this.git7,25)),this.gitInv0=this.gitInv0||Y(this.git0),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Y(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Y(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Vn,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Zn}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(kr,"Theme"),kr),Qy=p(e=>{const t=new Ky;return t.calculate(e),t},"getThemeVariables"),Cr,Jy=(Cr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=X(this.contrast,55),this.background="#ffffff",this.tertiaryColor=_(this.primaryColor,{h:-160}),this.primaryBorderColor=Dt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Dt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Y(this.primaryColor),this.secondaryTextColor=Y(this.secondaryColor),this.tertiaryTextColor=Y(this.tertiaryColor),this.lineColor=Y(this.background),this.textColor=Y(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.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.rowOdd=this.rowOdd||X(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=X(this.contrast,55),this.border2=this.contrast,this.actorBorder=X(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Y(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||X(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||et(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||_(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||_(this.mainBkg,{l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=X(this.contrast,30),this.sectionBkgColor2=X(this.contrast,30),this.taskBorderColor=et(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=X(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=et(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=_(this.primaryColor,{h:64}),this.fillType3=_(this.secondaryColor,{h:64}),this.fillType4=_(this.primaryColor,{h:-64}),this.fillType5=_(this.secondaryColor,{h:-64}),this.fillType6=_(this.primaryColor,{h:128}),this.fillType7=_(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||_(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||_(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||_(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||_(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||_(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||_(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Pr(this.quadrant1Fill)?X(this.quadrant1Fill):et(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#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.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=et(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||_(this.primaryColor,{h:-30}),this.git4=this.pie5||_(this.primaryColor,{h:-60}),this.git5=this.pie6||_(this.primaryColor,{h:-90}),this.git6=this.pie7||_(this.primaryColor,{h:60}),this.git7=this.pie8||_(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Y(this.git0),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Vn,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Zn}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Cr,"Theme"),Cr),tx=p(e=>{const t=new Jy;return t.calculate(e),t},"getThemeVariables"),ye={base:{getThemeVariables:Gy},dark:{getThemeVariables:Vy},default:{getThemeVariables:sh},forest:{getThemeVariables:Qy},neutral:{getThemeVariables:tx}},re={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},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:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},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},oh={...re,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:ye.default.getThemeVariables(),sequence:{...re.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...re.gantt,tickInterval:void 0,useWidth:void 0},c4:{...re.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...re.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:{...re.pie,useWidth:984},xyChart:{...re.xyChart,useWidth:void 0},requirement:{...re.requirement,useWidth:void 0},packet:{...re.packet},radar:{...re.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},lh=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...lh(e[i],"")]:[...r,t+i],[]),"keyify"),ex=new Set(lh(oh,"")),ao=oh,pn=p(e=>{if(I.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>pn(t));return}for(const t of Object.keys(e)){if(I.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!ex.has(t)||e[t]==null){I.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){I.debug("sanitizing object",t),pn(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(I.debug("sanitizing css option",t),e[t]=rx(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]="")}I.debug("After sanitization",e)}},"sanitizeDirective"),rx=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Tr=Object.freeze(ao),qt=bt({},Tr),gn,Ve=[],hi=bt({},Tr),Kn=p((e,t)=>{let r=bt({},e),i={};for(const n of t)uh(n),i=bt(i,n);if(r=bt(r,i),i.theme&&i.theme in ye){const n=bt({},gn),a=bt(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in ye&&(r.themeVariables=ye[r.theme].getThemeVariables(a))}return hi=r,dh(hi),hi},"updateCurrentConfig"),ix=p(e=>(qt=bt({},Tr),qt=bt(qt,e),e.theme&&ye[e.theme]&&(qt.themeVariables=ye[e.theme].getThemeVariables(e.themeVariables)),Kn(qt,Ve),qt),"setSiteConfig"),nx=p(e=>{gn=bt({},e)},"saveConfigFromInitialize"),ax=p(e=>(qt=bt(qt,e),Kn(qt,Ve),qt),"updateSiteConfig"),ch=p(()=>bt({},qt),"getSiteConfig"),hh=p(e=>(dh(e),bt(hi,e),$t()),"setConfig"),$t=p(()=>bt({},hi),"getConfig"),uh=p(e=>{e&&(["secure",...qt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(I.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"&&uh(e[t])}))},"sanitize"),sx=p(e=>{pn(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Ve.push(e),Kn(qt,Ve)},"addDirective"),mn=p((e=qt)=>{Ve=[],Kn(e,Ve)},"reset"),ox={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},wl={},lx=p(e=>{wl[e]||(I.warn(ox[e]),wl[e]=!0)},"issueWarning"),dh=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&lx("LAZY_LOAD_DEPRECATED")},"checkConfig"),cx=p(()=>{let e={};gn&&(e=bt(e,gn));for(const t of Ve)e=bt(e,t);return e},"getUserDefinedConfig"),Rr=/<br\s*\/?>/gi,hx=p(e=>e?gh(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),ux=(()=>{let e=!1;return()=>{e||(fh(),e=!0)}})();function fh(){const e="data-temp-href-target";Ge.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Ge.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(fh,"setupDompurifyHooks");var ph=p(e=>(ux(),Ge.sanitize(e)),"removeScript"),vl=p((e,t)=>{if(t.flowchart?.htmlLabels!==!1){const r=t.securityLevel;r==="antiscript"||r==="strict"?e=ph(e):r!=="loose"&&(e=gh(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=gx(e))}return e},"sanitizeMore"),Ht=p((e,t)=>e&&(t.dompurifyConfig?e=Ge.sanitize(vl(e,t),t.dompurifyConfig).toString():e=Ge.sanitize(vl(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),dx=p((e,t)=>typeof e=="string"?Ht(e,t):e.flat().map(r=>Ht(r,t)),"sanitizeTextOrArray"),fx=p(e=>Rr.test(e),"hasBreaks"),px=p(e=>e.split(Rr),"splitBreaks"),gx=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),gh=p(e=>e.replace(Rr,"#br#"),"breakToPlaceholder"),mh=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"),wt=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),mx=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),yx=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),ts=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let n=t[i];if(n===","&&i>0&&i+1<t.length){const a=t[i-1],s=t[i+1];xx(a,s)&&(n=a+","+s,i++,r.pop())}r.push(bx(n))}return r.join("")},"parseGenericTypes"),es=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),xx=p((e,t)=>{const r=es(e,"~"),i=es(t,"~");return r===1&&i===1},"shouldCombineSets"),bx=p(e=>{const t=es(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let n=i.indexOf("~"),a=i.lastIndexOf("~");for(;n!==-1&&a!==-1&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),kl=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),rs=/\$\$(.*)\$\$/g,Ze=p(e=>(e.match(rs)?.length??0)>0,"hasKatex"),wx=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Qn(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 n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),vx=p(async(e,t)=>{if(!Ze(e))return e;if(!(kl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(rs,"MathML is unsupported in this environment.");{const{default:r}=await import("katex"),i=t.forceLegacyMathML||!kl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Rr).map(n=>Ze(n)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${n}</div>`:`<div>${n}</div>`).join("").replace(rs,(n,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Qn=p(async(e,t)=>Ht(await vx(e,t),t),"renderKatexSanitized"),rr={getRows:hx,sanitizeText:Ht,sanitizeTextOrArray:dx,hasBreaks:fx,splitBreaks:px,lineBreakRegex:Rr,removeScript:ph,getUrl:mh,evaluate:wt,getMax:mx,getMin:yx},kx=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Cx=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"),so=p(function(e,t,r,i){const n=Cx(t,r,i);kx(e,n)},"configureSvgSize"),yh=p(function(e,t,r,i){const n=t.node().getBBox(),a=n.width,s=n.height;I.info(`SVG bounds: ${a}x${s}`,n);let o=0,l=0;I.info(`Graph bounds: ${o}x${l}`,e),o=a+r*2,l=s+r*2,I.info(`Calculated bounds: ${o}x${l}`),so(t,l,o,i);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),en={},_x=p((e,t,r)=>{let i="";return e in en&&en[e]?i=en[e](r):I.warn(`No theme found for ${e}`),` & {
8
8
  font-family: ${r.fontFamily};
9
9
  font-size: ${r.fontSize};
10
10
  fill: ${r.textColor}
@@ -80,44 +80,44 @@ React keys must be passed directly to JSX without using spread:
80
80
  ${i}
81
81
 
82
82
  ${t}
83
- `},"getStyles"),kx=p((e,t)=>{t!==void 0&&(en[e]=t)},"addStylesForDiagram"),Cx=vx,oo={};Jc(oo,{clear:()=>yh,getAccDescription:()=>vh,getAccTitle:()=>bh,getDiagramTitle:()=>Ch,setAccDescription:()=>wh,setAccTitle:()=>xh,setDiagramTitle:()=>kh});var lo="",co="",ho="",uo=p(e=>Ht(e,$t()),"sanitizeText"),yh=p(()=>{lo="",ho="",co=""},"clear"),xh=p(e=>{lo=uo(e).replace(/^\s+/g,"")},"setAccTitle"),bh=p(()=>lo,"getAccTitle"),wh=p(e=>{ho=uo(e).replace(/\n\s+/g,`
84
- `)},"setAccDescription"),vh=p(()=>ho,"getAccDescription"),kh=p(e=>{co=uo(e)},"setDiagramTitle"),Ch=p(()=>co,"getDiagramTitle"),kl=I,_x=io,ut=$t,Sx=ch,Tx=Tr,fo=p(e=>Ht(e,ut()),"sanitizeText"),_h=mh,Bx=p(()=>oo,"getCommonDb"),yn={},xn=p((e,t,r)=>{yn[e]&&kl.warn(`Diagram with id ${e} already registered. Overwriting.`),yn[e]=t,r&&nh(e,r),kx(e,t.styles),t.injectUtils?.(kl,_x,ut,fo,_h,Bx(),()=>{})},"registerDiagram"),is=p(e=>{if(e in yn)return yn[e];throw new $x(e)},"getDiagram"),_r,$x=(_r=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(_r,"DiagramNotFoundError"),_r),Lx={value:()=>{}};function Sh(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new rn(r)}function rn(e){this._=e}function Mx(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}rn.prototype=Sh.prototype={constructor:rn,on:function(e,t){var r=this._,i=Mx(e+"",r),n,a=-1,s=i.length;if(arguments.length<2){for(;++a<s;)if((n=(e=i[a]).type)&&(n=Ax(r[n],e.name)))return n;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<s;)if(n=(e=i[a]).type)r[n]=Cl(r[n],e.name,t);else if(t==null)for(n in r)r[n]=Cl(r[n],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new rn(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,a;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,n=a.length;i<n;++i)a[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,a=i.length;n<a;++n)i[n].value.apply(t,r)}};function Ax(e,t){for(var r=0,i=e.length,n;r<i;++r)if((n=e[r]).name===t)return n.value}function Cl(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=Lx,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var ns="http://www.w3.org/1999/xhtml";const _l={svg:"http://www.w3.org/2000/svg",xhtml:ns,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Jn(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),_l.hasOwnProperty(t)?{space:_l[t],local:e}:e}function Ex(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===ns&&t.documentElement.namespaceURI===ns?t.createElement(e):t.createElementNS(r,e)}}function Fx(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Th(e){var t=Jn(e);return(t.local?Fx:Ex)(t)}function Px(){}function po(e){return e==null?Px:function(){return this.querySelector(e)}}function Rx(e){typeof e!="function"&&(e=po(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],s=a.length,o=i[n]=new Array(s),l,c,h=0;h<s;++h)(l=a[h])&&(c=e.call(l,l.__data__,h,a))&&("__data__"in l&&(c.__data__=l.__data__),o[h]=c);return new Yt(i,this._parents)}function Ox(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Dx(){return[]}function Bh(e){return e==null?Dx:function(){return this.querySelectorAll(e)}}function Nx(e){return function(){return Ox(e.apply(this,arguments))}}function Ix(e){typeof e=="function"?e=Nx(e):e=Bh(e);for(var t=this._groups,r=t.length,i=[],n=[],a=0;a<r;++a)for(var s=t[a],o=s.length,l,c=0;c<o;++c)(l=s[c])&&(i.push(e.call(l,l.__data__,c,s)),n.push(l));return new Yt(i,n)}function $h(e){return function(){return this.matches(e)}}function Lh(e){return function(t){return t.matches(e)}}var zx=Array.prototype.find;function qx(e){return function(){return zx.call(this.children,e)}}function jx(){return this.firstElementChild}function Wx(e){return this.select(e==null?jx:qx(typeof e=="function"?e:Lh(e)))}var Hx=Array.prototype.filter;function Yx(){return Array.from(this.children)}function Ux(e){return function(){return Hx.call(this.children,e)}}function Gx(e){return this.selectAll(e==null?Yx:Ux(typeof e=="function"?e:Lh(e)))}function Xx(e){typeof e!="function"&&(e=$h(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],s=a.length,o=i[n]=[],l,c=0;c<s;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&o.push(l);return new Yt(i,this._parents)}function Mh(e){return new Array(e.length)}function Vx(){return new Yt(this._enter||this._groups.map(Mh),this._parents)}function bn(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}bn.prototype={constructor:bn,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Zx(e){return function(){return e}}function Kx(e,t,r,i,n,a){for(var s=0,o,l=t.length,c=a.length;s<c;++s)(o=t[s])?(o.__data__=a[s],i[s]=o):r[s]=new bn(e,a[s]);for(;s<l;++s)(o=t[s])&&(n[s]=o)}function Qx(e,t,r,i,n,a,s){var o,l,c=new Map,h=t.length,u=a.length,d=new Array(h),f;for(o=0;o<h;++o)(l=t[o])&&(d[o]=f=s.call(l,l.__data__,o,t)+"",c.has(f)?n[o]=l:c.set(f,l));for(o=0;o<u;++o)f=s.call(e,a[o],o,a)+"",(l=c.get(f))?(i[o]=l,l.__data__=a[o],c.delete(f)):r[o]=new bn(e,a[o]);for(o=0;o<h;++o)(l=t[o])&&c.get(d[o])===l&&(n[o]=l)}function Jx(e){return e.__data__}function tb(e,t){if(!arguments.length)return Array.from(this,Jx);var r=t?Qx:Kx,i=this._parents,n=this._groups;typeof e!="function"&&(e=Zx(e));for(var a=n.length,s=new Array(a),o=new Array(a),l=new Array(a),c=0;c<a;++c){var h=i[c],u=n[c],d=u.length,f=eb(e.call(h,h&&h.__data__,c,i)),g=f.length,m=o[c]=new Array(g),y=s[c]=new Array(g),x=l[c]=new Array(d);r(h,u,m,y,x,f,t);for(var b=0,w=0,C,v;b<g;++b)if(C=m[b]){for(b>=w&&(w=b+1);!(v=y[w])&&++w<g;);C._next=v||null}}return s=new Yt(s,i),s._enter=o,s._exit=l,s}function eb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function rb(){return new Yt(this._exit||this._groups.map(Mh),this._parents)}function ib(e,t,r){var i=this.enter(),n=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(n=t(n),n&&(n=n.selection())),r==null?a.remove():r(a),i&&n?i.merge(n).order():n}function nb(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,n=r.length,a=i.length,s=Math.min(n,a),o=new Array(n),l=0;l<s;++l)for(var c=r[l],h=i[l],u=c.length,d=o[l]=new Array(u),f,g=0;g<u;++g)(f=c[g]||h[g])&&(d[g]=f);for(;l<n;++l)o[l]=r[l];return new Yt(o,this._parents)}function ab(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],n=i.length-1,a=i[n],s;--n>=0;)(s=i[n])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function sb(e){e||(e=ob);function t(u,d){return u&&d?e(u.__data__,d.__data__):!u-!d}for(var r=this._groups,i=r.length,n=new Array(i),a=0;a<i;++a){for(var s=r[a],o=s.length,l=n[a]=new Array(o),c,h=0;h<o;++h)(c=s[h])&&(l[h]=c);l.sort(t)}return new Yt(n,this._parents).order()}function ob(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function lb(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function cb(){return Array.from(this)}function hb(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length;n<a;++n){var s=i[n];if(s)return s}return null}function ub(){let e=0;for(const t of this)++e;return e}function db(){return!this.node()}function fb(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var n=t[r],a=0,s=n.length,o;a<s;++a)(o=n[a])&&e.call(o,o.__data__,a,n);return this}function pb(e){return function(){this.removeAttribute(e)}}function gb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function mb(e,t){return function(){this.setAttribute(e,t)}}function yb(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function xb(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function bb(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function wb(e,t){var r=Jn(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?gb:pb:typeof t=="function"?r.local?bb:xb:r.local?yb:mb)(r,t))}function Ah(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function vb(e){return function(){this.style.removeProperty(e)}}function kb(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Cb(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function _b(e,t,r){return arguments.length>1?this.each((t==null?vb:typeof t=="function"?Cb:kb)(e,t,r??"")):Br(this.node(),e)}function Br(e,t){return e.style.getPropertyValue(t)||Ah(e).getComputedStyle(e,null).getPropertyValue(t)}function Sb(e){return function(){delete this[e]}}function Tb(e,t){return function(){this[e]=t}}function Bb(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function $b(e,t){return arguments.length>1?this.each((t==null?Sb:typeof t=="function"?Bb:Tb)(e,t)):this.node()[e]}function Eh(e){return e.trim().split(/^|\s+/)}function go(e){return e.classList||new Fh(e)}function Fh(e){this._node=e,this._names=Eh(e.getAttribute("class")||"")}Fh.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Ph(e,t){for(var r=go(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function Rh(e,t){for(var r=go(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function Lb(e){return function(){Ph(this,e)}}function Mb(e){return function(){Rh(this,e)}}function Ab(e,t){return function(){(t.apply(this,arguments)?Ph:Rh)(this,e)}}function Eb(e,t){var r=Eh(e+"");if(arguments.length<2){for(var i=go(this.node()),n=-1,a=r.length;++n<a;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof t=="function"?Ab:t?Lb:Mb)(r,t))}function Fb(){this.textContent=""}function Pb(e){return function(){this.textContent=e}}function Rb(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Ob(e){return arguments.length?this.each(e==null?Fb:(typeof e=="function"?Rb:Pb)(e)):this.node().textContent}function Db(){this.innerHTML=""}function Nb(e){return function(){this.innerHTML=e}}function Ib(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function zb(e){return arguments.length?this.each(e==null?Db:(typeof e=="function"?Ib:Nb)(e)):this.node().innerHTML}function qb(){this.nextSibling&&this.parentNode.appendChild(this)}function jb(){return this.each(qb)}function Wb(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Hb(){return this.each(Wb)}function Yb(e){var t=typeof e=="function"?e:Th(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Ub(){return null}function Gb(e,t){var r=typeof e=="function"?e:Th(e),i=t==null?Ub:typeof t=="function"?t:po(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Xb(){var e=this.parentNode;e&&e.removeChild(this)}function Vb(){return this.each(Xb)}function Zb(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Kb(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Qb(e){return this.select(e?Kb:Zb)}function Jb(e){return arguments.length?this.property("__data__",e):this.node().__data__}function t1(e){return function(t){e.call(this,t,this.__data__)}}function e1(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function r1(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,a;r<n;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function i1(e,t,r){return function(){var i=this.__on,n,a=t1(t);if(i){for(var s=0,o=i.length;s<o;++s)if((n=i[s]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=a,n.options=r),n.value=t;return}}this.addEventListener(e.type,a,r),n={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(n):this.__on=[n]}}function n1(e,t,r){var i=e1(e+""),n,a=i.length,s;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,c=o.length,h;l<c;++l)for(n=0,h=o[l];n<a;++n)if((s=i[n]).type===h.type&&s.name===h.name)return h.value}return}for(o=t?i1:r1,n=0;n<a;++n)this.each(o(i[n],t,r));return this}function Oh(e,t,r){var i=Ah(e),n=i.CustomEvent;typeof n=="function"?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function a1(e,t){return function(){return Oh(this,e,t)}}function s1(e,t){return function(){return Oh(this,e,t.apply(this,arguments))}}function o1(e,t){return this.each((typeof t=="function"?s1:a1)(e,t))}function*l1(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length,s;n<a;++n)(s=i[n])&&(yield s)}var Dh=[null];function Yt(e,t){this._groups=e,this._parents=t}function Mi(){return new Yt([[document.documentElement]],Dh)}function c1(){return this}Yt.prototype=Mi.prototype={constructor:Yt,select:Rx,selectAll:Ix,selectChild:Wx,selectChildren:Gx,filter:Xx,data:tb,enter:Vx,exit:rb,join:ib,merge:nb,selection:c1,order:ab,sort:sb,call:lb,nodes:cb,node:hb,size:ub,empty:db,each:fb,attr:wb,style:_b,property:$b,classed:Eb,text:Ob,html:zb,raise:jb,lower:Hb,append:Yb,insert:Gb,remove:Vb,clone:Qb,datum:Jb,on:n1,dispatch:o1,[Symbol.iterator]:l1};function lt(e){return typeof e=="string"?new Yt([[document.querySelector(e)]],[document.documentElement]):new Yt([[e]],Dh)}function ta(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function mo(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function Or(){}var gi=.7,wn=1/gi,mr="\\s*([+-]?\\d+)\\s*",mi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",se="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",h1=/^#([0-9a-f]{3,8})$/,u1=new RegExp(`^rgb\\(${mr},${mr},${mr}\\)$`),d1=new RegExp(`^rgb\\(${se},${se},${se}\\)$`),f1=new RegExp(`^rgba\\(${mr},${mr},${mr},${mi}\\)$`),p1=new RegExp(`^rgba\\(${se},${se},${se},${mi}\\)$`),g1=new RegExp(`^hsl\\(${mi},${se},${se}\\)$`),m1=new RegExp(`^hsla\\(${mi},${se},${se},${mi}\\)$`),Sl={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ta(Or,$r,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Tl,formatHex:Tl,formatHex8:y1,formatHsl:x1,formatRgb:Bl,toString:Bl});function Tl(){return this.rgb().formatHex()}function y1(){return this.rgb().formatHex8()}function x1(){return Ih(this).formatHsl()}function Bl(){return this.rgb().formatRgb()}function $r(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=h1.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?$l(t):r===3?new Dt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?ji(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?ji(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=u1.exec(e))?new Dt(t[1],t[2],t[3],1):(t=d1.exec(e))?new Dt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=f1.exec(e))?ji(t[1],t[2],t[3],t[4]):(t=p1.exec(e))?ji(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=g1.exec(e))?Al(t[1],t[2]/100,t[3]/100,1):(t=m1.exec(e))?Al(t[1],t[2]/100,t[3]/100,t[4]):Sl.hasOwnProperty(e)?$l(Sl[e]):e==="transparent"?new Dt(NaN,NaN,NaN,0):null}function $l(e){return new Dt(e>>16&255,e>>8&255,e&255,1)}function ji(e,t,r,i){return i<=0&&(e=t=r=NaN),new Dt(e,t,r,i)}function Nh(e){return e instanceof Or||(e=$r(e)),e?(e=e.rgb(),new Dt(e.r,e.g,e.b,e.opacity)):new Dt}function as(e,t,r,i){return arguments.length===1?Nh(e):new Dt(e,t,r,i??1)}function Dt(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}ta(Dt,as,mo(Or,{brighter(e){return e=e==null?wn:Math.pow(wn,e),new Dt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?gi:Math.pow(gi,e),new Dt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Dt(Ye(this.r),Ye(this.g),Ye(this.b),vn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ll,formatHex:Ll,formatHex8:b1,formatRgb:Ml,toString:Ml}));function Ll(){return`#${qe(this.r)}${qe(this.g)}${qe(this.b)}`}function b1(){return`#${qe(this.r)}${qe(this.g)}${qe(this.b)}${qe((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ml(){const e=vn(this.opacity);return`${e===1?"rgb(":"rgba("}${Ye(this.r)}, ${Ye(this.g)}, ${Ye(this.b)}${e===1?")":`, ${e})`}`}function vn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ye(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function qe(e){return e=Ye(e),(e<16?"0":"")+e.toString(16)}function Al(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Kt(e,t,r,i)}function Ih(e){if(e instanceof Kt)return new Kt(e.h,e.s,e.l,e.opacity);if(e instanceof Or||(e=$r(e)),!e)return new Kt;if(e instanceof Kt)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),a=Math.max(t,r,i),s=NaN,o=a-n,l=(a+n)/2;return o?(t===a?s=(r-i)/o+(r<i)*6:r===a?s=(i-t)/o+2:s=(t-r)/o+4,o/=l<.5?a+n:2-a-n,s*=60):o=l>0&&l<1?0:s,new Kt(s,o,l,e.opacity)}function w1(e,t,r,i){return arguments.length===1?Ih(e):new Kt(e,t,r,i??1)}function Kt(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}ta(Kt,w1,mo(Or,{brighter(e){return e=e==null?wn:Math.pow(wn,e),new Kt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?gi:Math.pow(gi,e),new Kt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new Dt(Ra(e>=240?e-240:e+120,n,i),Ra(e,n,i),Ra(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new Kt(El(this.h),Wi(this.s),Wi(this.l),vn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=vn(this.opacity);return`${e===1?"hsl(":"hsla("}${El(this.h)}, ${Wi(this.s)*100}%, ${Wi(this.l)*100}%${e===1?")":`, ${e})`}`}}));function El(e){return e=(e||0)%360,e<0?e+360:e}function Wi(e){return Math.max(0,Math.min(1,e||0))}function Ra(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const ea=e=>()=>e;function zh(e,t){return function(r){return e+r*t}}function v1(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function k1(e,t){var r=t-e;return r?zh(e,r>180||r<-180?r-360*Math.round(r/360):r):ea(isNaN(e)?t:e)}function C1(e){return(e=+e)==1?yo:function(t,r){return r-t?v1(t,r,e):ea(isNaN(t)?r:t)}}function yo(e,t){var r=t-e;return r?zh(e,r):ea(isNaN(e)?t:e)}const ss=(function e(t){var r=C1(t);function i(n,a){var s=r((n=as(n)).r,(a=as(a)).r),o=r(n.g,a.g),l=r(n.b,a.b),c=yo(n.opacity,a.opacity);return function(h){return n.r=s(h),n.g=o(h),n.b=l(h),n.opacity=c(h),n+""}}return i.gamma=e,i})(1);function me(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var os=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Oa=new RegExp(os.source,"g");function _1(e){return function(){return e}}function S1(e){return function(t){return e(t)+""}}function qh(e,t){var r=os.lastIndex=Oa.lastIndex=0,i,n,a,s=-1,o=[],l=[];for(e=e+"",t=t+"";(i=os.exec(e))&&(n=Oa.exec(t));)(a=n.index)>r&&(a=t.slice(r,a),o[s]?o[s]+=a:o[++s]=a),(i=i[0])===(n=n[0])?o[s]?o[s]+=n:o[++s]=n:(o[++s]=null,l.push({i:s,x:me(i,n)})),r=Oa.lastIndex;return r<t.length&&(a=t.slice(r),o[s]?o[s]+=a:o[++s]=a),o.length<2?l[0]?S1(l[0].x):_1(t):(t=l.length,function(c){for(var h=0,u;h<t;++h)o[(u=l[h]).i]=u.x(c);return o.join("")})}var Fl=180/Math.PI,ls={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function jh(e,t,r,i,n,a){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,l/=o),e*i<t*r&&(e=-e,t=-t,l=-l,s=-s),{translateX:n,translateY:a,rotate:Math.atan2(t,e)*Fl,skewX:Math.atan(l)*Fl,scaleX:s,scaleY:o}}var Hi;function T1(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ls:jh(t.a,t.b,t.c,t.d,t.e,t.f)}function B1(e){return e==null||(Hi||(Hi=document.createElementNS("http://www.w3.org/2000/svg","g")),Hi.setAttribute("transform",e),!(e=Hi.transform.baseVal.consolidate()))?ls:(e=e.matrix,jh(e.a,e.b,e.c,e.d,e.e,e.f))}function Wh(e,t,r,i){function n(c){return c.length?c.pop()+" ":""}function a(c,h,u,d,f,g){if(c!==u||h!==d){var m=f.push("translate(",null,t,null,r);g.push({i:m-4,x:me(c,u)},{i:m-2,x:me(h,d)})}else(u||d)&&f.push("translate("+u+t+d+r)}function s(c,h,u,d){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),d.push({i:u.push(n(u)+"rotate(",null,i)-2,x:me(c,h)})):h&&u.push(n(u)+"rotate("+h+i)}function o(c,h,u,d){c!==h?d.push({i:u.push(n(u)+"skewX(",null,i)-2,x:me(c,h)}):h&&u.push(n(u)+"skewX("+h+i)}function l(c,h,u,d,f,g){if(c!==u||h!==d){var m=f.push(n(f)+"scale(",null,",",null,")");g.push({i:m-4,x:me(c,u)},{i:m-2,x:me(h,d)})}else(u!==1||d!==1)&&f.push(n(f)+"scale("+u+","+d+")")}return function(c,h){var u=[],d=[];return c=e(c),h=e(h),a(c.translateX,c.translateY,h.translateX,h.translateY,u,d),s(c.rotate,h.rotate,u,d),o(c.skewX,h.skewX,u,d),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,d),c=h=null,function(f){for(var g=-1,m=d.length,y;++g<m;)u[(y=d[g]).i]=y.x(f);return u.join("")}}}var $1=Wh(T1,"px, ","px)","deg)"),L1=Wh(B1,", ",")",")"),Lr=0,ti=0,Yr=0,Hh=1e3,kn,ei,Cn=0,Ke=0,ra=0,yi=typeof performance=="object"&&performance.now?performance:Date,Yh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function xo(){return Ke||(Yh(M1),Ke=yi.now()+ra)}function M1(){Ke=0}function _n(){this._call=this._time=this._next=null}_n.prototype=Uh.prototype={constructor:_n,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?xo():+r)+(t==null?0:+t),!this._next&&ei!==this&&(ei?ei._next=this:kn=this,ei=this),this._call=e,this._time=r,cs()},stop:function(){this._call&&(this._call=null,this._time=1/0,cs())}};function Uh(e,t,r){var i=new _n;return i.restart(e,t,r),i}function A1(){xo(),++Lr;for(var e=kn,t;e;)(t=Ke-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Lr}function Pl(){Ke=(Cn=yi.now())+ra,Lr=ti=0;try{A1()}finally{Lr=0,F1(),Ke=0}}function E1(){var e=yi.now(),t=e-Cn;t>Hh&&(ra-=t,Cn=e)}function F1(){for(var e,t=kn,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:kn=r);ei=e,cs(i)}function cs(e){if(!Lr){ti&&(ti=clearTimeout(ti));var t=e-Ke;t>24?(e<1/0&&(ti=setTimeout(Pl,e-yi.now()-ra)),Yr&&(Yr=clearInterval(Yr))):(Yr||(Cn=yi.now(),Yr=setInterval(E1,Hh)),Lr=1,Yh(Pl))}}function Rl(e,t,r){var i=new _n;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var P1=Sh("start","end","cancel","interrupt"),R1=[],Gh=0,Ol=1,hs=2,nn=3,Dl=4,us=5,an=6;function ia(e,t,r,i,n,a){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;O1(e,r,{name:t,index:i,group:n,on:P1,tween:R1,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Gh})}function bo(e,t){var r=ee(e,t);if(r.state>Gh)throw new Error("too late; already scheduled");return r}function ce(e,t){var r=ee(e,t);if(r.state>nn)throw new Error("too late; already running");return r}function ee(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function O1(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=Uh(a,0,r.time);function a(c){r.state=Ol,r.timer.restart(s,r.delay,r.time),r.delay<=c&&s(c-r.delay)}function s(c){var h,u,d,f;if(r.state!==Ol)return l();for(h in i)if(f=i[h],f.name===r.name){if(f.state===nn)return Rl(s);f.state===Dl?(f.state=an,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete i[h]):+h<t&&(f.state=an,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete i[h])}if(Rl(function(){r.state===nn&&(r.state=Dl,r.timer.restart(o,r.delay,r.time),o(c))}),r.state=hs,r.on.call("start",e,e.__data__,r.index,r.group),r.state===hs){for(r.state=nn,n=new Array(d=r.tween.length),h=0,u=-1;h<d;++h)(f=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(n[++u]=f);n.length=u+1}}function o(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=us,1),u=-1,d=n.length;++u<d;)n[u].call(e,h);r.state===us&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=an,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function D1(e,t){var r=e.__transition,i,n,a=!0,s;if(r){t=t==null?null:t+"";for(s in r){if((i=r[s]).name!==t){a=!1;continue}n=i.state>hs&&i.state<us,i.state=an,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[s]}a&&delete e.__transition}}function N1(e){return this.each(function(){D1(this,e)})}function I1(e,t){var r,i;return function(){var n=ce(this,e),a=n.tween;if(a!==r){i=r=a;for(var s=0,o=i.length;s<o;++s)if(i[s].name===t){i=i.slice(),i.splice(s,1);break}}n.tween=i}}function z1(e,t,r){var i,n;if(typeof r!="function")throw new Error;return function(){var a=ce(this,e),s=a.tween;if(s!==i){n=(i=s).slice();for(var o={name:t,value:r},l=0,c=n.length;l<c;++l)if(n[l].name===t){n[l]=o;break}l===c&&n.push(o)}a.tween=n}}function q1(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=ee(this.node(),r).tween,n=0,a=i.length,s;n<a;++n)if((s=i[n]).name===e)return s.value;return null}return this.each((t==null?I1:z1)(r,e,t))}function wo(e,t,r){var i=e._id;return e.each(function(){var n=ce(this,i);(n.value||(n.value={}))[t]=r.apply(this,arguments)}),function(n){return ee(n,i).value[t]}}function Xh(e,t){var r;return(typeof t=="number"?me:t instanceof $r?ss:(r=$r(t))?(t=r,ss):qh)(e,t)}function j1(e){return function(){this.removeAttribute(e)}}function W1(e){return function(){this.removeAttributeNS(e.space,e.local)}}function H1(e,t,r){var i,n=r+"",a;return function(){var s=this.getAttribute(e);return s===n?null:s===i?a:a=t(i=s,r)}}function Y1(e,t,r){var i,n=r+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===n?null:s===i?a:a=t(i=s,r)}}function U1(e,t,r){var i,n,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=o+"",s===l?null:s===i&&l===n?a:(n=l,a=t(i=s,o)))}}function G1(e,t,r){var i,n,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=o+"",s===l?null:s===i&&l===n?a:(n=l,a=t(i=s,o)))}}function X1(e,t){var r=Jn(e),i=r==="transform"?L1:Xh;return this.attrTween(e,typeof t=="function"?(r.local?G1:U1)(r,i,wo(this,"attr."+e,t)):t==null?(r.local?W1:j1)(r):(r.local?Y1:H1)(r,i,t))}function V1(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Z1(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function K1(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Z1(e,a)),r}return n._value=t,n}function Q1(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&V1(e,a)),r}return n._value=t,n}function J1(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Jn(e);return this.tween(r,(i.local?K1:Q1)(i,t))}function t2(e,t){return function(){bo(this,e).delay=+t.apply(this,arguments)}}function e2(e,t){return t=+t,function(){bo(this,e).delay=t}}function r2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?t2:e2)(t,e)):ee(this.node(),t).delay}function i2(e,t){return function(){ce(this,e).duration=+t.apply(this,arguments)}}function n2(e,t){return t=+t,function(){ce(this,e).duration=t}}function a2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?i2:n2)(t,e)):ee(this.node(),t).duration}function s2(e,t){if(typeof t!="function")throw new Error;return function(){ce(this,e).ease=t}}function o2(e){var t=this._id;return arguments.length?this.each(s2(t,e)):ee(this.node(),t).ease}function l2(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;ce(this,e).ease=r}}function c2(e){if(typeof e!="function")throw new Error;return this.each(l2(this._id,e))}function h2(e){typeof e!="function"&&(e=$h(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],s=a.length,o=i[n]=[],l,c=0;c<s;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&o.push(l);return new be(i,this._parents,this._name,this._id)}function u2(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,n=r.length,a=Math.min(i,n),s=new Array(i),o=0;o<a;++o)for(var l=t[o],c=r[o],h=l.length,u=s[o]=new Array(h),d,f=0;f<h;++f)(d=l[f]||c[f])&&(u[f]=d);for(;o<i;++o)s[o]=t[o];return new be(s,this._parents,this._name,this._id)}function d2(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function f2(e,t,r){var i,n,a=d2(t)?bo:ce;return function(){var s=a(this,e),o=s.on;o!==i&&(n=(i=o).copy()).on(t,r),s.on=n}}function p2(e,t){var r=this._id;return arguments.length<2?ee(this.node(),r).on.on(e):this.each(f2(r,e,t))}function g2(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function m2(){return this.on("end.remove",g2(this._id))}function y2(e){var t=this._name,r=this._id;typeof e!="function"&&(e=po(e));for(var i=this._groups,n=i.length,a=new Array(n),s=0;s<n;++s)for(var o=i[s],l=o.length,c=a[s]=new Array(l),h,u,d=0;d<l;++d)(h=o[d])&&(u=e.call(h,h.__data__,d,o))&&("__data__"in h&&(u.__data__=h.__data__),c[d]=u,ia(c[d],t,r,d,c,ee(h,r)));return new be(a,this._parents,t,r)}function x2(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Bh(e));for(var i=this._groups,n=i.length,a=[],s=[],o=0;o<n;++o)for(var l=i[o],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var d=e.call(h,h.__data__,u,l),f,g=ee(h,r),m=0,y=d.length;m<y;++m)(f=d[m])&&ia(f,t,r,m,d,g);a.push(d),s.push(h)}return new be(a,s,t,r)}var b2=Mi.prototype.constructor;function w2(){return new b2(this._groups,this._parents)}function v2(e,t){var r,i,n;return function(){var a=Br(this,e),s=(this.style.removeProperty(e),Br(this,e));return a===s?null:a===r&&s===i?n:n=t(r=a,i=s)}}function Vh(e){return function(){this.style.removeProperty(e)}}function k2(e,t,r){var i,n=r+"",a;return function(){var s=Br(this,e);return s===n?null:s===i?a:a=t(i=s,r)}}function C2(e,t,r){var i,n,a;return function(){var s=Br(this,e),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),Br(this,e))),s===l?null:s===i&&l===n?a:(n=l,a=t(i=s,o))}}function _2(e,t){var r,i,n,a="style."+t,s="end."+a,o;return function(){var l=ce(this,e),c=l.on,h=l.value[a]==null?o||(o=Vh(t)):void 0;(c!==r||n!==h)&&(i=(r=c).copy()).on(s,n=h),l.on=i}}function S2(e,t,r){var i=(e+="")=="transform"?$1:Xh;return t==null?this.styleTween(e,v2(e,i)).on("end.style."+e,Vh(e)):typeof t=="function"?this.styleTween(e,C2(e,i,wo(this,"style."+e,t))).each(_2(this._id,e)):this.styleTween(e,k2(e,i,t),r).on("end.style."+e,null)}function T2(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function B2(e,t,r){var i,n;function a(){var s=t.apply(this,arguments);return s!==n&&(i=(n=s)&&T2(e,s,r)),i}return a._value=t,a}function $2(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,B2(e,t,r??""))}function L2(e){return function(){this.textContent=e}}function M2(e){return function(){var t=e(this);this.textContent=t??""}}function A2(e){return this.tween("text",typeof e=="function"?M2(wo(this,"text",e)):L2(e==null?"":e+""))}function E2(e){return function(t){this.textContent=e.call(this,t)}}function F2(e){var t,r;function i(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&E2(n)),t}return i._value=e,i}function P2(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,F2(e))}function R2(){for(var e=this._name,t=this._id,r=Zh(),i=this._groups,n=i.length,a=0;a<n;++a)for(var s=i[a],o=s.length,l,c=0;c<o;++c)if(l=s[c]){var h=ee(l,t);ia(l,e,r,c,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new be(i,this._parents,e,r)}function O2(){var e,t,r=this,i=r._id,n=r.size();return new Promise(function(a,s){var o={value:s},l={value:function(){--n===0&&a()}};r.each(function(){var c=ce(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),c.on=t}),n===0&&a()})}var D2=0;function be(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Zh(){return++D2}var fe=Mi.prototype;be.prototype={constructor:be,select:y2,selectAll:x2,selectChild:fe.selectChild,selectChildren:fe.selectChildren,filter:h2,merge:u2,selection:w2,transition:R2,call:fe.call,nodes:fe.nodes,node:fe.node,size:fe.size,empty:fe.empty,each:fe.each,on:p2,attr:X1,attrTween:J1,style:S2,styleTween:$2,text:A2,textTween:P2,remove:m2,tween:q1,delay:r2,duration:a2,ease:o2,easeVarying:c2,end:O2,[Symbol.iterator]:fe[Symbol.iterator]};function N2(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var I2={time:null,delay:0,duration:250,ease:N2};function z2(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function q2(e){var t,r;e instanceof be?(t=e._id,e=e._name):(t=Zh(),(r=I2).time=xo(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,a=0;a<n;++a)for(var s=i[a],o=s.length,l,c=0;c<o;++c)(l=s[c])&&ia(l,e,t,c,s,r||z2(l,t));return new be(i,this._parents,e,t)}Mi.prototype.interrupt=N1;Mi.prototype.transition=q2;const ds=Math.PI,fs=2*ds,De=1e-6,j2=fs-De;function Kh(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function W2(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Kh;const r=10**t;return function(i){this._+=i[0];for(let n=1,a=i.length;n<a;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}class H2{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Kh:W2(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,n){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(t,r,i,n,a,s){this._append`C${+t},${+r},${+i},${+n},${this._x1=+a},${this._y1=+s}`}arcTo(t,r,i,n,a){if(t=+t,r=+r,i=+i,n=+n,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,o=this._y1,l=i-t,c=n-r,h=s-t,u=o-r,d=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>De)if(!(Math.abs(u*l-c*h)>De)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let f=i-s,g=n-o,m=l*l+c*c,y=f*f+g*g,x=Math.sqrt(m),b=Math.sqrt(d),w=a*Math.tan((ds-Math.acos((m+d-y)/(2*x*b)))/2),C=w/b,v=w/x;Math.abs(C-1)>De&&this._append`L${t+C*h},${r+C*u}`,this._append`A${a},${a},0,0,${+(u*f>h*g)},${this._x1=t+v*l},${this._y1=r+v*c}`}}arc(t,r,i,n,a,s){if(t=+t,r=+r,i=+i,s=!!s,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(n),l=i*Math.sin(n),c=t+o,h=r+l,u=1^s,d=s?n-a:a-n;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>De||Math.abs(this._y1-h)>De)&&this._append`L${c},${h}`,i&&(d<0&&(d=d%fs+fs),d>j2?this._append`A${i},${i},0,1,${u},${t-o},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:d>De&&this._append`A${i},${i},0,${+(d>=ds)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function Ne(e){return function(){return e}}const Y2=Math.abs,U2=Math.atan2,G2=Math.cos,X2=Math.max,V2=Math.min,Z2=Math.sin,K2=Math.sqrt,ps=1e-12,na=Math.PI,gs=na/2,Q2=2*na;function J2(e){return e>1?0:e<-1?na:Math.acos(e)}function tw(e){return e>=1?gs:e<=-1?-gs:Math.asin(e)}function Qh(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new H2(t)}function Jh(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function tu(e){this._context=e}tu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Sn(e){return new tu(e)}function ew(e){return e[0]}function rw(e){return e[1]}function eu(e,t){var r=Ne(!0),i=null,n=Sn,a=null,s=Qh(o);e=typeof e=="function"?e:e===void 0?ew:Ne(e),t=typeof t=="function"?t:t===void 0?rw:Ne(t);function o(l){var c,h=(l=Jh(l)).length,u,d=!1,f;for(i==null&&(a=n(f=s())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,l),+t(u,c,l));if(f)return a=null,f+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:Ne(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:Ne(+l),o):t},o.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Ne(!!l),o):r},o.curve=function(l){return arguments.length?(n=l,i!=null&&(a=n(i)),o):n},o.context=function(l){return arguments.length?(l==null?i=a=null:a=n(i=l),o):i},o}class ru{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function iu(e){return new ru(e,!0)}function nu(e){return new ru(e,!1)}function $e(){}function Tn(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function aa(e){this._context=e}aa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Tn(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Tn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ui(e){return new aa(e)}function au(e){this._context=e}au.prototype={areaStart:$e,areaEnd:$e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Tn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function iw(e){return new au(e)}function su(e){this._context=e}su.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Tn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function nw(e){return new su(e)}function ou(e,t){this._basis=new aa(e),this._beta=t}ou.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],n=t[0],a=e[r]-i,s=t[r]-n,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*e[o]+(1-this._beta)*(i+l*a),this._beta*t[o]+(1-this._beta)*(n+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const aw=(function e(t){function r(i){return t===1?new aa(i):new ou(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Bn(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function vo(e,t){this._context=e,this._k=(1-t)/6}vo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Bn(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Bn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const lu=(function e(t){function r(i){return new vo(i,t)}return r.tension=function(i){return e(+i)},r})(0);function ko(e,t){this._context=e,this._k=(1-t)/6}ko.prototype={areaStart:$e,areaEnd:$e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Bn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const sw=(function e(t){function r(i){return new ko(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Co(e,t){this._context=e,this._k=(1-t)/6}Co.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Bn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const ow=(function e(t){function r(i){return new Co(i,t)}return r.tension=function(i){return e(+i)},r})(0);function _o(e,t,r){var i=e._x1,n=e._y1,a=e._x2,s=e._y2;if(e._l01_a>ps){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,n=(n*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>ps){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/h,s=(s*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,n,a,s,e._x2,e._y2)}function cu(e,t){this._context=e,this._alpha=t}cu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:_o(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const hu=(function e(t){function r(i){return t?new cu(i,t):new vo(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function uu(e,t){this._context=e,this._alpha=t}uu.prototype={areaStart:$e,areaEnd:$e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:_o(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const lw=(function e(t){function r(i){return t?new uu(i,t):new ko(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function du(e,t){this._context=e,this._alpha=t}du.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:_o(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const cw=(function e(t){function r(i){return t?new du(i,t):new Co(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function fu(e){this._context=e}fu.prototype={areaStart:$e,areaEnd:$e,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function hw(e){return new fu(e)}function Nl(e){return e<0?-1:1}function Il(e,t,r){var i=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(i||n<0&&-0),s=(r-e._y1)/(n||i<0&&-0),o=(a*n+s*i)/(i+n);return(Nl(a)+Nl(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function zl(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Da(e,t,r){var i=e._x0,n=e._y0,a=e._x1,s=e._y1,o=(a-i)/3;e._context.bezierCurveTo(i+o,n+o*t,a-o,s-o*r,a,s)}function $n(e){this._context=e}$n.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Da(this,this._t0,zl(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Da(this,zl(this,r=Il(this,e,t)),r);break;default:Da(this,this._t0,r=Il(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function pu(e){this._context=new gu(e)}(pu.prototype=Object.create($n.prototype)).point=function(e,t){$n.prototype.point.call(this,t,e)};function gu(e){this._context=e}gu.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,n,a){this._context.bezierCurveTo(t,e,i,r,a,n)}};function mu(e){return new $n(e)}function yu(e){return new pu(e)}function xu(e){this._context=e}xu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=ql(e),n=ql(t),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(i[0][a],n[0][a],i[1][a],n[1][a],e[s],t[s]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function ql(e){var t,r=e.length-1,i,n=new Array(r),a=new Array(r),s=new Array(r);for(n[0]=0,a[0]=2,s[0]=e[0]+2*e[1],t=1;t<r-1;++t)n[t]=1,a[t]=4,s[t]=4*e[t]+2*e[t+1];for(n[r-1]=2,a[r-1]=7,s[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=n[t]/a[t-1],a[t]-=i,s[t]-=i*s[t-1];for(n[r-1]=s[r-1]/a[r-1],t=r-2;t>=0;--t)n[t]=(s[t]-n[t+1])/a[t];for(a[r-1]=(e[r]+n[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-n[t+1];return[n,a]}function bu(e){return new xu(e)}function sa(e,t){this._context=e,this._t=t}sa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function wu(e){return new sa(e,.5)}function vu(e){return new sa(e,0)}function ku(e){return new sa(e,1)}function ri(e,t,r){this.k=e,this.x=t,this.y=r}ri.prototype={constructor:ri,scale:function(e){return e===1?this:new ri(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ri(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};ri.prototype;var Cu=p(e=>{const{securityLevel:t}=ut();let r=lt("body");if(t==="sandbox"){const a=lt(`#i${e}`).node()?.contentDocument??document;r=lt(a.body)}return r.select(`#${e}`)},"selectSvgElement");function So(e){return typeof e>"u"||e===null}p(So,"isNothing");function _u(e){return typeof e=="object"&&e!==null}p(_u,"isObject");function Su(e){return Array.isArray(e)?e:So(e)?[]:[e]}p(Su,"toArray");function Tu(e,t){var r,i,n,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)n=a[r],e[n]=t[n];return e}p(Tu,"extend");function Bu(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(Bu,"repeat");function $u(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p($u,"isNegativeZero");var uw=So,dw=_u,fw=Su,pw=Bu,gw=$u,mw=Tu,Ct={isNothing:uw,isObject:dw,toArray:fw,repeat:pw,isNegativeZero:gw,extend:mw};function To(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
83
+ `},"getStyles"),Sx=p((e,t)=>{t!==void 0&&(en[e]=t)},"addStylesForDiagram"),Tx=_x,oo={};th(oo,{clear:()=>xh,getAccDescription:()=>kh,getAccTitle:()=>wh,getDiagramTitle:()=>_h,setAccDescription:()=>vh,setAccTitle:()=>bh,setDiagramTitle:()=>Ch});var lo="",co="",ho="",uo=p(e=>Ht(e,$t()),"sanitizeText"),xh=p(()=>{lo="",ho="",co=""},"clear"),bh=p(e=>{lo=uo(e).replace(/^\s+/g,"")},"setAccTitle"),wh=p(()=>lo,"getAccTitle"),vh=p(e=>{ho=uo(e).replace(/\n\s+/g,`
84
+ `)},"setAccDescription"),kh=p(()=>ho,"getAccDescription"),Ch=p(e=>{co=uo(e)},"setDiagramTitle"),_h=p(()=>co,"getDiagramTitle"),Cl=I,Bx=io,ut=$t,$x=hh,Lx=Tr,fo=p(e=>Ht(e,ut()),"sanitizeText"),Sh=yh,Mx=p(()=>oo,"getCommonDb"),yn={},xn=p((e,t,r)=>{yn[e]&&Cl.warn(`Diagram with id ${e} already registered. Overwriting.`),yn[e]=t,r&&ah(e,r),Sx(e,t.styles),t.injectUtils?.(Cl,Bx,ut,fo,Sh,Mx(),()=>{})},"registerDiagram"),is=p(e=>{if(e in yn)return yn[e];throw new Ax(e)},"getDiagram"),_r,Ax=(_r=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(_r,"DiagramNotFoundError"),_r),Ex={value:()=>{}};function Th(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new rn(r)}function rn(e){this._=e}function Fx(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}rn.prototype=Th.prototype={constructor:rn,on:function(e,t){var r=this._,i=Fx(e+"",r),n,a=-1,s=i.length;if(arguments.length<2){for(;++a<s;)if((n=(e=i[a]).type)&&(n=Px(r[n],e.name)))return n;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<s;)if(n=(e=i[a]).type)r[n]=_l(r[n],e.name,t);else if(t==null)for(n in r)r[n]=_l(r[n],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new rn(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,a;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,n=a.length;i<n;++i)a[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,a=i.length;n<a;++n)i[n].value.apply(t,r)}};function Px(e,t){for(var r=0,i=e.length,n;r<i;++r)if((n=e[r]).name===t)return n.value}function _l(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=Ex,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var ns="http://www.w3.org/1999/xhtml";const Sl={svg:"http://www.w3.org/2000/svg",xhtml:ns,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Jn(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Sl.hasOwnProperty(t)?{space:Sl[t],local:e}:e}function Rx(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===ns&&t.documentElement.namespaceURI===ns?t.createElement(e):t.createElementNS(r,e)}}function Dx(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Bh(e){var t=Jn(e);return(t.local?Dx:Rx)(t)}function Ox(){}function po(e){return e==null?Ox:function(){return this.querySelector(e)}}function Nx(e){typeof e!="function"&&(e=po(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],s=a.length,o=i[n]=new Array(s),l,c,h=0;h<s;++h)(l=a[h])&&(c=e.call(l,l.__data__,h,a))&&("__data__"in l&&(c.__data__=l.__data__),o[h]=c);return new Yt(i,this._parents)}function Ix(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function zx(){return[]}function $h(e){return e==null?zx:function(){return this.querySelectorAll(e)}}function qx(e){return function(){return Ix(e.apply(this,arguments))}}function jx(e){typeof e=="function"?e=qx(e):e=$h(e);for(var t=this._groups,r=t.length,i=[],n=[],a=0;a<r;++a)for(var s=t[a],o=s.length,l,c=0;c<o;++c)(l=s[c])&&(i.push(e.call(l,l.__data__,c,s)),n.push(l));return new Yt(i,n)}function Lh(e){return function(){return this.matches(e)}}function Mh(e){return function(t){return t.matches(e)}}var Wx=Array.prototype.find;function Hx(e){return function(){return Wx.call(this.children,e)}}function Yx(){return this.firstElementChild}function Ux(e){return this.select(e==null?Yx:Hx(typeof e=="function"?e:Mh(e)))}var Gx=Array.prototype.filter;function Xx(){return Array.from(this.children)}function Vx(e){return function(){return Gx.call(this.children,e)}}function Zx(e){return this.selectAll(e==null?Xx:Vx(typeof e=="function"?e:Mh(e)))}function Kx(e){typeof e!="function"&&(e=Lh(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],s=a.length,o=i[n]=[],l,c=0;c<s;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&o.push(l);return new Yt(i,this._parents)}function Ah(e){return new Array(e.length)}function Qx(){return new Yt(this._enter||this._groups.map(Ah),this._parents)}function bn(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}bn.prototype={constructor:bn,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Jx(e){return function(){return e}}function tb(e,t,r,i,n,a){for(var s=0,o,l=t.length,c=a.length;s<c;++s)(o=t[s])?(o.__data__=a[s],i[s]=o):r[s]=new bn(e,a[s]);for(;s<l;++s)(o=t[s])&&(n[s]=o)}function eb(e,t,r,i,n,a,s){var o,l,c=new Map,h=t.length,u=a.length,d=new Array(h),f;for(o=0;o<h;++o)(l=t[o])&&(d[o]=f=s.call(l,l.__data__,o,t)+"",c.has(f)?n[o]=l:c.set(f,l));for(o=0;o<u;++o)f=s.call(e,a[o],o,a)+"",(l=c.get(f))?(i[o]=l,l.__data__=a[o],c.delete(f)):r[o]=new bn(e,a[o]);for(o=0;o<h;++o)(l=t[o])&&c.get(d[o])===l&&(n[o]=l)}function rb(e){return e.__data__}function ib(e,t){if(!arguments.length)return Array.from(this,rb);var r=t?eb:tb,i=this._parents,n=this._groups;typeof e!="function"&&(e=Jx(e));for(var a=n.length,s=new Array(a),o=new Array(a),l=new Array(a),c=0;c<a;++c){var h=i[c],u=n[c],d=u.length,f=nb(e.call(h,h&&h.__data__,c,i)),g=f.length,m=o[c]=new Array(g),y=s[c]=new Array(g),x=l[c]=new Array(d);r(h,u,m,y,x,f,t);for(var b=0,w=0,C,v;b<g;++b)if(C=m[b]){for(b>=w&&(w=b+1);!(v=y[w])&&++w<g;);C._next=v||null}}return s=new Yt(s,i),s._enter=o,s._exit=l,s}function nb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ab(){return new Yt(this._exit||this._groups.map(Ah),this._parents)}function sb(e,t,r){var i=this.enter(),n=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(n=t(n),n&&(n=n.selection())),r==null?a.remove():r(a),i&&n?i.merge(n).order():n}function ob(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,n=r.length,a=i.length,s=Math.min(n,a),o=new Array(n),l=0;l<s;++l)for(var c=r[l],h=i[l],u=c.length,d=o[l]=new Array(u),f,g=0;g<u;++g)(f=c[g]||h[g])&&(d[g]=f);for(;l<n;++l)o[l]=r[l];return new Yt(o,this._parents)}function lb(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],n=i.length-1,a=i[n],s;--n>=0;)(s=i[n])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function cb(e){e||(e=hb);function t(u,d){return u&&d?e(u.__data__,d.__data__):!u-!d}for(var r=this._groups,i=r.length,n=new Array(i),a=0;a<i;++a){for(var s=r[a],o=s.length,l=n[a]=new Array(o),c,h=0;h<o;++h)(c=s[h])&&(l[h]=c);l.sort(t)}return new Yt(n,this._parents).order()}function hb(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ub(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function db(){return Array.from(this)}function fb(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length;n<a;++n){var s=i[n];if(s)return s}return null}function pb(){let e=0;for(const t of this)++e;return e}function gb(){return!this.node()}function mb(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var n=t[r],a=0,s=n.length,o;a<s;++a)(o=n[a])&&e.call(o,o.__data__,a,n);return this}function yb(e){return function(){this.removeAttribute(e)}}function xb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function bb(e,t){return function(){this.setAttribute(e,t)}}function wb(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function vb(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function kb(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function Cb(e,t){var r=Jn(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?xb:yb:typeof t=="function"?r.local?kb:vb:r.local?wb:bb)(r,t))}function Eh(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function _b(e){return function(){this.style.removeProperty(e)}}function Sb(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Tb(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function Bb(e,t,r){return arguments.length>1?this.each((t==null?_b:typeof t=="function"?Tb:Sb)(e,t,r??"")):Br(this.node(),e)}function Br(e,t){return e.style.getPropertyValue(t)||Eh(e).getComputedStyle(e,null).getPropertyValue(t)}function $b(e){return function(){delete this[e]}}function Lb(e,t){return function(){this[e]=t}}function Mb(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Ab(e,t){return arguments.length>1?this.each((t==null?$b:typeof t=="function"?Mb:Lb)(e,t)):this.node()[e]}function Fh(e){return e.trim().split(/^|\s+/)}function go(e){return e.classList||new Ph(e)}function Ph(e){this._node=e,this._names=Fh(e.getAttribute("class")||"")}Ph.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Rh(e,t){for(var r=go(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function Dh(e,t){for(var r=go(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function Eb(e){return function(){Rh(this,e)}}function Fb(e){return function(){Dh(this,e)}}function Pb(e,t){return function(){(t.apply(this,arguments)?Rh:Dh)(this,e)}}function Rb(e,t){var r=Fh(e+"");if(arguments.length<2){for(var i=go(this.node()),n=-1,a=r.length;++n<a;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof t=="function"?Pb:t?Eb:Fb)(r,t))}function Db(){this.textContent=""}function Ob(e){return function(){this.textContent=e}}function Nb(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Ib(e){return arguments.length?this.each(e==null?Db:(typeof e=="function"?Nb:Ob)(e)):this.node().textContent}function zb(){this.innerHTML=""}function qb(e){return function(){this.innerHTML=e}}function jb(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Wb(e){return arguments.length?this.each(e==null?zb:(typeof e=="function"?jb:qb)(e)):this.node().innerHTML}function Hb(){this.nextSibling&&this.parentNode.appendChild(this)}function Yb(){return this.each(Hb)}function Ub(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Gb(){return this.each(Ub)}function Xb(e){var t=typeof e=="function"?e:Bh(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Vb(){return null}function Zb(e,t){var r=typeof e=="function"?e:Bh(e),i=t==null?Vb:typeof t=="function"?t:po(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Kb(){var e=this.parentNode;e&&e.removeChild(this)}function Qb(){return this.each(Kb)}function Jb(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function t1(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function e1(e){return this.select(e?t1:Jb)}function r1(e){return arguments.length?this.property("__data__",e):this.node().__data__}function i1(e){return function(t){e.call(this,t,this.__data__)}}function n1(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function a1(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,a;r<n;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function s1(e,t,r){return function(){var i=this.__on,n,a=i1(t);if(i){for(var s=0,o=i.length;s<o;++s)if((n=i[s]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=a,n.options=r),n.value=t;return}}this.addEventListener(e.type,a,r),n={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(n):this.__on=[n]}}function o1(e,t,r){var i=n1(e+""),n,a=i.length,s;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,c=o.length,h;l<c;++l)for(n=0,h=o[l];n<a;++n)if((s=i[n]).type===h.type&&s.name===h.name)return h.value}return}for(o=t?s1:a1,n=0;n<a;++n)this.each(o(i[n],t,r));return this}function Oh(e,t,r){var i=Eh(e),n=i.CustomEvent;typeof n=="function"?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function l1(e,t){return function(){return Oh(this,e,t)}}function c1(e,t){return function(){return Oh(this,e,t.apply(this,arguments))}}function h1(e,t){return this.each((typeof t=="function"?c1:l1)(e,t))}function*u1(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length,s;n<a;++n)(s=i[n])&&(yield s)}var Nh=[null];function Yt(e,t){this._groups=e,this._parents=t}function Mi(){return new Yt([[document.documentElement]],Nh)}function d1(){return this}Yt.prototype=Mi.prototype={constructor:Yt,select:Nx,selectAll:jx,selectChild:Ux,selectChildren:Zx,filter:Kx,data:ib,enter:Qx,exit:ab,join:sb,merge:ob,selection:d1,order:lb,sort:cb,call:ub,nodes:db,node:fb,size:pb,empty:gb,each:mb,attr:Cb,style:Bb,property:Ab,classed:Rb,text:Ib,html:Wb,raise:Yb,lower:Gb,append:Xb,insert:Zb,remove:Qb,clone:e1,datum:r1,on:o1,dispatch:h1,[Symbol.iterator]:u1};function lt(e){return typeof e=="string"?new Yt([[document.querySelector(e)]],[document.documentElement]):new Yt([[e]],Nh)}function ta(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function mo(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function Dr(){}var gi=.7,wn=1/gi,mr="\\s*([+-]?\\d+)\\s*",mi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",se="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",f1=/^#([0-9a-f]{3,8})$/,p1=new RegExp(`^rgb\\(${mr},${mr},${mr}\\)$`),g1=new RegExp(`^rgb\\(${se},${se},${se}\\)$`),m1=new RegExp(`^rgba\\(${mr},${mr},${mr},${mi}\\)$`),y1=new RegExp(`^rgba\\(${se},${se},${se},${mi}\\)$`),x1=new RegExp(`^hsl\\(${mi},${se},${se}\\)$`),b1=new RegExp(`^hsla\\(${mi},${se},${se},${mi}\\)$`),Tl={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ta(Dr,$r,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Bl,formatHex:Bl,formatHex8:w1,formatHsl:v1,formatRgb:$l,toString:$l});function Bl(){return this.rgb().formatHex()}function w1(){return this.rgb().formatHex8()}function v1(){return zh(this).formatHsl()}function $l(){return this.rgb().formatRgb()}function $r(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=f1.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Ll(t):r===3?new Ot(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?ji(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?ji(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=p1.exec(e))?new Ot(t[1],t[2],t[3],1):(t=g1.exec(e))?new Ot(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=m1.exec(e))?ji(t[1],t[2],t[3],t[4]):(t=y1.exec(e))?ji(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=x1.exec(e))?El(t[1],t[2]/100,t[3]/100,1):(t=b1.exec(e))?El(t[1],t[2]/100,t[3]/100,t[4]):Tl.hasOwnProperty(e)?Ll(Tl[e]):e==="transparent"?new Ot(NaN,NaN,NaN,0):null}function Ll(e){return new Ot(e>>16&255,e>>8&255,e&255,1)}function ji(e,t,r,i){return i<=0&&(e=t=r=NaN),new Ot(e,t,r,i)}function Ih(e){return e instanceof Dr||(e=$r(e)),e?(e=e.rgb(),new Ot(e.r,e.g,e.b,e.opacity)):new Ot}function as(e,t,r,i){return arguments.length===1?Ih(e):new Ot(e,t,r,i??1)}function Ot(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}ta(Ot,as,mo(Dr,{brighter(e){return e=e==null?wn:Math.pow(wn,e),new Ot(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?gi:Math.pow(gi,e),new Ot(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ot(Ye(this.r),Ye(this.g),Ye(this.b),vn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ml,formatHex:Ml,formatHex8:k1,formatRgb:Al,toString:Al}));function Ml(){return`#${qe(this.r)}${qe(this.g)}${qe(this.b)}`}function k1(){return`#${qe(this.r)}${qe(this.g)}${qe(this.b)}${qe((isNaN(this.opacity)?1:this.opacity)*255)}`}function Al(){const e=vn(this.opacity);return`${e===1?"rgb(":"rgba("}${Ye(this.r)}, ${Ye(this.g)}, ${Ye(this.b)}${e===1?")":`, ${e})`}`}function vn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ye(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function qe(e){return e=Ye(e),(e<16?"0":"")+e.toString(16)}function El(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Kt(e,t,r,i)}function zh(e){if(e instanceof Kt)return new Kt(e.h,e.s,e.l,e.opacity);if(e instanceof Dr||(e=$r(e)),!e)return new Kt;if(e instanceof Kt)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),a=Math.max(t,r,i),s=NaN,o=a-n,l=(a+n)/2;return o?(t===a?s=(r-i)/o+(r<i)*6:r===a?s=(i-t)/o+2:s=(t-r)/o+4,o/=l<.5?a+n:2-a-n,s*=60):o=l>0&&l<1?0:s,new Kt(s,o,l,e.opacity)}function C1(e,t,r,i){return arguments.length===1?zh(e):new Kt(e,t,r,i??1)}function Kt(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}ta(Kt,C1,mo(Dr,{brighter(e){return e=e==null?wn:Math.pow(wn,e),new Kt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?gi:Math.pow(gi,e),new Kt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new Ot(Ra(e>=240?e-240:e+120,n,i),Ra(e,n,i),Ra(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new Kt(Fl(this.h),Wi(this.s),Wi(this.l),vn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=vn(this.opacity);return`${e===1?"hsl(":"hsla("}${Fl(this.h)}, ${Wi(this.s)*100}%, ${Wi(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Fl(e){return e=(e||0)%360,e<0?e+360:e}function Wi(e){return Math.max(0,Math.min(1,e||0))}function Ra(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const ea=e=>()=>e;function qh(e,t){return function(r){return e+r*t}}function _1(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function S1(e,t){var r=t-e;return r?qh(e,r>180||r<-180?r-360*Math.round(r/360):r):ea(isNaN(e)?t:e)}function T1(e){return(e=+e)==1?yo:function(t,r){return r-t?_1(t,r,e):ea(isNaN(t)?r:t)}}function yo(e,t){var r=t-e;return r?qh(e,r):ea(isNaN(e)?t:e)}const ss=(function e(t){var r=T1(t);function i(n,a){var s=r((n=as(n)).r,(a=as(a)).r),o=r(n.g,a.g),l=r(n.b,a.b),c=yo(n.opacity,a.opacity);return function(h){return n.r=s(h),n.g=o(h),n.b=l(h),n.opacity=c(h),n+""}}return i.gamma=e,i})(1);function me(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var os=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Da=new RegExp(os.source,"g");function B1(e){return function(){return e}}function $1(e){return function(t){return e(t)+""}}function jh(e,t){var r=os.lastIndex=Da.lastIndex=0,i,n,a,s=-1,o=[],l=[];for(e=e+"",t=t+"";(i=os.exec(e))&&(n=Da.exec(t));)(a=n.index)>r&&(a=t.slice(r,a),o[s]?o[s]+=a:o[++s]=a),(i=i[0])===(n=n[0])?o[s]?o[s]+=n:o[++s]=n:(o[++s]=null,l.push({i:s,x:me(i,n)})),r=Da.lastIndex;return r<t.length&&(a=t.slice(r),o[s]?o[s]+=a:o[++s]=a),o.length<2?l[0]?$1(l[0].x):B1(t):(t=l.length,function(c){for(var h=0,u;h<t;++h)o[(u=l[h]).i]=u.x(c);return o.join("")})}var Pl=180/Math.PI,ls={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Wh(e,t,r,i,n,a){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,l/=o),e*i<t*r&&(e=-e,t=-t,l=-l,s=-s),{translateX:n,translateY:a,rotate:Math.atan2(t,e)*Pl,skewX:Math.atan(l)*Pl,scaleX:s,scaleY:o}}var Hi;function L1(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ls:Wh(t.a,t.b,t.c,t.d,t.e,t.f)}function M1(e){return e==null||(Hi||(Hi=document.createElementNS("http://www.w3.org/2000/svg","g")),Hi.setAttribute("transform",e),!(e=Hi.transform.baseVal.consolidate()))?ls:(e=e.matrix,Wh(e.a,e.b,e.c,e.d,e.e,e.f))}function Hh(e,t,r,i){function n(c){return c.length?c.pop()+" ":""}function a(c,h,u,d,f,g){if(c!==u||h!==d){var m=f.push("translate(",null,t,null,r);g.push({i:m-4,x:me(c,u)},{i:m-2,x:me(h,d)})}else(u||d)&&f.push("translate("+u+t+d+r)}function s(c,h,u,d){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),d.push({i:u.push(n(u)+"rotate(",null,i)-2,x:me(c,h)})):h&&u.push(n(u)+"rotate("+h+i)}function o(c,h,u,d){c!==h?d.push({i:u.push(n(u)+"skewX(",null,i)-2,x:me(c,h)}):h&&u.push(n(u)+"skewX("+h+i)}function l(c,h,u,d,f,g){if(c!==u||h!==d){var m=f.push(n(f)+"scale(",null,",",null,")");g.push({i:m-4,x:me(c,u)},{i:m-2,x:me(h,d)})}else(u!==1||d!==1)&&f.push(n(f)+"scale("+u+","+d+")")}return function(c,h){var u=[],d=[];return c=e(c),h=e(h),a(c.translateX,c.translateY,h.translateX,h.translateY,u,d),s(c.rotate,h.rotate,u,d),o(c.skewX,h.skewX,u,d),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,d),c=h=null,function(f){for(var g=-1,m=d.length,y;++g<m;)u[(y=d[g]).i]=y.x(f);return u.join("")}}}var A1=Hh(L1,"px, ","px)","deg)"),E1=Hh(M1,", ",")",")"),Lr=0,ti=0,Yr=0,Yh=1e3,kn,ei,Cn=0,Ke=0,ra=0,yi=typeof performance=="object"&&performance.now?performance:Date,Uh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function xo(){return Ke||(Uh(F1),Ke=yi.now()+ra)}function F1(){Ke=0}function _n(){this._call=this._time=this._next=null}_n.prototype=Gh.prototype={constructor:_n,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?xo():+r)+(t==null?0:+t),!this._next&&ei!==this&&(ei?ei._next=this:kn=this,ei=this),this._call=e,this._time=r,cs()},stop:function(){this._call&&(this._call=null,this._time=1/0,cs())}};function Gh(e,t,r){var i=new _n;return i.restart(e,t,r),i}function P1(){xo(),++Lr;for(var e=kn,t;e;)(t=Ke-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Lr}function Rl(){Ke=(Cn=yi.now())+ra,Lr=ti=0;try{P1()}finally{Lr=0,D1(),Ke=0}}function R1(){var e=yi.now(),t=e-Cn;t>Yh&&(ra-=t,Cn=e)}function D1(){for(var e,t=kn,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:kn=r);ei=e,cs(i)}function cs(e){if(!Lr){ti&&(ti=clearTimeout(ti));var t=e-Ke;t>24?(e<1/0&&(ti=setTimeout(Rl,e-yi.now()-ra)),Yr&&(Yr=clearInterval(Yr))):(Yr||(Cn=yi.now(),Yr=setInterval(R1,Yh)),Lr=1,Uh(Rl))}}function Dl(e,t,r){var i=new _n;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var O1=Th("start","end","cancel","interrupt"),N1=[],Xh=0,Ol=1,hs=2,nn=3,Nl=4,us=5,an=6;function ia(e,t,r,i,n,a){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;I1(e,r,{name:t,index:i,group:n,on:O1,tween:N1,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Xh})}function bo(e,t){var r=ee(e,t);if(r.state>Xh)throw new Error("too late; already scheduled");return r}function ce(e,t){var r=ee(e,t);if(r.state>nn)throw new Error("too late; already running");return r}function ee(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function I1(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=Gh(a,0,r.time);function a(c){r.state=Ol,r.timer.restart(s,r.delay,r.time),r.delay<=c&&s(c-r.delay)}function s(c){var h,u,d,f;if(r.state!==Ol)return l();for(h in i)if(f=i[h],f.name===r.name){if(f.state===nn)return Dl(s);f.state===Nl?(f.state=an,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete i[h]):+h<t&&(f.state=an,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete i[h])}if(Dl(function(){r.state===nn&&(r.state=Nl,r.timer.restart(o,r.delay,r.time),o(c))}),r.state=hs,r.on.call("start",e,e.__data__,r.index,r.group),r.state===hs){for(r.state=nn,n=new Array(d=r.tween.length),h=0,u=-1;h<d;++h)(f=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(n[++u]=f);n.length=u+1}}function o(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=us,1),u=-1,d=n.length;++u<d;)n[u].call(e,h);r.state===us&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=an,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function z1(e,t){var r=e.__transition,i,n,a=!0,s;if(r){t=t==null?null:t+"";for(s in r){if((i=r[s]).name!==t){a=!1;continue}n=i.state>hs&&i.state<us,i.state=an,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[s]}a&&delete e.__transition}}function q1(e){return this.each(function(){z1(this,e)})}function j1(e,t){var r,i;return function(){var n=ce(this,e),a=n.tween;if(a!==r){i=r=a;for(var s=0,o=i.length;s<o;++s)if(i[s].name===t){i=i.slice(),i.splice(s,1);break}}n.tween=i}}function W1(e,t,r){var i,n;if(typeof r!="function")throw new Error;return function(){var a=ce(this,e),s=a.tween;if(s!==i){n=(i=s).slice();for(var o={name:t,value:r},l=0,c=n.length;l<c;++l)if(n[l].name===t){n[l]=o;break}l===c&&n.push(o)}a.tween=n}}function H1(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=ee(this.node(),r).tween,n=0,a=i.length,s;n<a;++n)if((s=i[n]).name===e)return s.value;return null}return this.each((t==null?j1:W1)(r,e,t))}function wo(e,t,r){var i=e._id;return e.each(function(){var n=ce(this,i);(n.value||(n.value={}))[t]=r.apply(this,arguments)}),function(n){return ee(n,i).value[t]}}function Vh(e,t){var r;return(typeof t=="number"?me:t instanceof $r?ss:(r=$r(t))?(t=r,ss):jh)(e,t)}function Y1(e){return function(){this.removeAttribute(e)}}function U1(e){return function(){this.removeAttributeNS(e.space,e.local)}}function G1(e,t,r){var i,n=r+"",a;return function(){var s=this.getAttribute(e);return s===n?null:s===i?a:a=t(i=s,r)}}function X1(e,t,r){var i,n=r+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===n?null:s===i?a:a=t(i=s,r)}}function V1(e,t,r){var i,n,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=o+"",s===l?null:s===i&&l===n?a:(n=l,a=t(i=s,o)))}}function Z1(e,t,r){var i,n,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=o+"",s===l?null:s===i&&l===n?a:(n=l,a=t(i=s,o)))}}function K1(e,t){var r=Jn(e),i=r==="transform"?E1:Vh;return this.attrTween(e,typeof t=="function"?(r.local?Z1:V1)(r,i,wo(this,"attr."+e,t)):t==null?(r.local?U1:Y1)(r):(r.local?X1:G1)(r,i,t))}function Q1(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function J1(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function t2(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&J1(e,a)),r}return n._value=t,n}function e2(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Q1(e,a)),r}return n._value=t,n}function r2(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Jn(e);return this.tween(r,(i.local?t2:e2)(i,t))}function i2(e,t){return function(){bo(this,e).delay=+t.apply(this,arguments)}}function n2(e,t){return t=+t,function(){bo(this,e).delay=t}}function a2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?i2:n2)(t,e)):ee(this.node(),t).delay}function s2(e,t){return function(){ce(this,e).duration=+t.apply(this,arguments)}}function o2(e,t){return t=+t,function(){ce(this,e).duration=t}}function l2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?s2:o2)(t,e)):ee(this.node(),t).duration}function c2(e,t){if(typeof t!="function")throw new Error;return function(){ce(this,e).ease=t}}function h2(e){var t=this._id;return arguments.length?this.each(c2(t,e)):ee(this.node(),t).ease}function u2(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;ce(this,e).ease=r}}function d2(e){if(typeof e!="function")throw new Error;return this.each(u2(this._id,e))}function f2(e){typeof e!="function"&&(e=Lh(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],s=a.length,o=i[n]=[],l,c=0;c<s;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&o.push(l);return new be(i,this._parents,this._name,this._id)}function p2(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,n=r.length,a=Math.min(i,n),s=new Array(i),o=0;o<a;++o)for(var l=t[o],c=r[o],h=l.length,u=s[o]=new Array(h),d,f=0;f<h;++f)(d=l[f]||c[f])&&(u[f]=d);for(;o<i;++o)s[o]=t[o];return new be(s,this._parents,this._name,this._id)}function g2(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function m2(e,t,r){var i,n,a=g2(t)?bo:ce;return function(){var s=a(this,e),o=s.on;o!==i&&(n=(i=o).copy()).on(t,r),s.on=n}}function y2(e,t){var r=this._id;return arguments.length<2?ee(this.node(),r).on.on(e):this.each(m2(r,e,t))}function x2(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function b2(){return this.on("end.remove",x2(this._id))}function w2(e){var t=this._name,r=this._id;typeof e!="function"&&(e=po(e));for(var i=this._groups,n=i.length,a=new Array(n),s=0;s<n;++s)for(var o=i[s],l=o.length,c=a[s]=new Array(l),h,u,d=0;d<l;++d)(h=o[d])&&(u=e.call(h,h.__data__,d,o))&&("__data__"in h&&(u.__data__=h.__data__),c[d]=u,ia(c[d],t,r,d,c,ee(h,r)));return new be(a,this._parents,t,r)}function v2(e){var t=this._name,r=this._id;typeof e!="function"&&(e=$h(e));for(var i=this._groups,n=i.length,a=[],s=[],o=0;o<n;++o)for(var l=i[o],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var d=e.call(h,h.__data__,u,l),f,g=ee(h,r),m=0,y=d.length;m<y;++m)(f=d[m])&&ia(f,t,r,m,d,g);a.push(d),s.push(h)}return new be(a,s,t,r)}var k2=Mi.prototype.constructor;function C2(){return new k2(this._groups,this._parents)}function _2(e,t){var r,i,n;return function(){var a=Br(this,e),s=(this.style.removeProperty(e),Br(this,e));return a===s?null:a===r&&s===i?n:n=t(r=a,i=s)}}function Zh(e){return function(){this.style.removeProperty(e)}}function S2(e,t,r){var i,n=r+"",a;return function(){var s=Br(this,e);return s===n?null:s===i?a:a=t(i=s,r)}}function T2(e,t,r){var i,n,a;return function(){var s=Br(this,e),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),Br(this,e))),s===l?null:s===i&&l===n?a:(n=l,a=t(i=s,o))}}function B2(e,t){var r,i,n,a="style."+t,s="end."+a,o;return function(){var l=ce(this,e),c=l.on,h=l.value[a]==null?o||(o=Zh(t)):void 0;(c!==r||n!==h)&&(i=(r=c).copy()).on(s,n=h),l.on=i}}function $2(e,t,r){var i=(e+="")=="transform"?A1:Vh;return t==null?this.styleTween(e,_2(e,i)).on("end.style."+e,Zh(e)):typeof t=="function"?this.styleTween(e,T2(e,i,wo(this,"style."+e,t))).each(B2(this._id,e)):this.styleTween(e,S2(e,i,t),r).on("end.style."+e,null)}function L2(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function M2(e,t,r){var i,n;function a(){var s=t.apply(this,arguments);return s!==n&&(i=(n=s)&&L2(e,s,r)),i}return a._value=t,a}function A2(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,M2(e,t,r??""))}function E2(e){return function(){this.textContent=e}}function F2(e){return function(){var t=e(this);this.textContent=t??""}}function P2(e){return this.tween("text",typeof e=="function"?F2(wo(this,"text",e)):E2(e==null?"":e+""))}function R2(e){return function(t){this.textContent=e.call(this,t)}}function D2(e){var t,r;function i(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&R2(n)),t}return i._value=e,i}function O2(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,D2(e))}function N2(){for(var e=this._name,t=this._id,r=Kh(),i=this._groups,n=i.length,a=0;a<n;++a)for(var s=i[a],o=s.length,l,c=0;c<o;++c)if(l=s[c]){var h=ee(l,t);ia(l,e,r,c,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new be(i,this._parents,e,r)}function I2(){var e,t,r=this,i=r._id,n=r.size();return new Promise(function(a,s){var o={value:s},l={value:function(){--n===0&&a()}};r.each(function(){var c=ce(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),c.on=t}),n===0&&a()})}var z2=0;function be(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Kh(){return++z2}var fe=Mi.prototype;be.prototype={constructor:be,select:w2,selectAll:v2,selectChild:fe.selectChild,selectChildren:fe.selectChildren,filter:f2,merge:p2,selection:C2,transition:N2,call:fe.call,nodes:fe.nodes,node:fe.node,size:fe.size,empty:fe.empty,each:fe.each,on:y2,attr:K1,attrTween:r2,style:$2,styleTween:A2,text:P2,textTween:O2,remove:b2,tween:H1,delay:a2,duration:l2,ease:h2,easeVarying:d2,end:I2,[Symbol.iterator]:fe[Symbol.iterator]};function q2(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var j2={time:null,delay:0,duration:250,ease:q2};function W2(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function H2(e){var t,r;e instanceof be?(t=e._id,e=e._name):(t=Kh(),(r=j2).time=xo(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,a=0;a<n;++a)for(var s=i[a],o=s.length,l,c=0;c<o;++c)(l=s[c])&&ia(l,e,t,c,s,r||W2(l,t));return new be(i,this._parents,e,t)}Mi.prototype.interrupt=q1;Mi.prototype.transition=H2;const ds=Math.PI,fs=2*ds,Oe=1e-6,Y2=fs-Oe;function Qh(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function U2(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Qh;const r=10**t;return function(i){this._+=i[0];for(let n=1,a=i.length;n<a;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}class G2{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Qh:U2(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,n){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(t,r,i,n,a,s){this._append`C${+t},${+r},${+i},${+n},${this._x1=+a},${this._y1=+s}`}arcTo(t,r,i,n,a){if(t=+t,r=+r,i=+i,n=+n,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,o=this._y1,l=i-t,c=n-r,h=s-t,u=o-r,d=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>Oe)if(!(Math.abs(u*l-c*h)>Oe)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let f=i-s,g=n-o,m=l*l+c*c,y=f*f+g*g,x=Math.sqrt(m),b=Math.sqrt(d),w=a*Math.tan((ds-Math.acos((m+d-y)/(2*x*b)))/2),C=w/b,v=w/x;Math.abs(C-1)>Oe&&this._append`L${t+C*h},${r+C*u}`,this._append`A${a},${a},0,0,${+(u*f>h*g)},${this._x1=t+v*l},${this._y1=r+v*c}`}}arc(t,r,i,n,a,s){if(t=+t,r=+r,i=+i,s=!!s,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(n),l=i*Math.sin(n),c=t+o,h=r+l,u=1^s,d=s?n-a:a-n;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>Oe||Math.abs(this._y1-h)>Oe)&&this._append`L${c},${h}`,i&&(d<0&&(d=d%fs+fs),d>Y2?this._append`A${i},${i},0,1,${u},${t-o},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:d>Oe&&this._append`A${i},${i},0,${+(d>=ds)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function Ne(e){return function(){return e}}const X2=Math.abs,V2=Math.atan2,Z2=Math.cos,K2=Math.max,Q2=Math.min,J2=Math.sin,tw=Math.sqrt,ps=1e-12,na=Math.PI,gs=na/2,ew=2*na;function rw(e){return e>1?0:e<-1?na:Math.acos(e)}function iw(e){return e>=1?gs:e<=-1?-gs:Math.asin(e)}function Jh(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new G2(t)}function tu(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function eu(e){this._context=e}eu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Sn(e){return new eu(e)}function nw(e){return e[0]}function aw(e){return e[1]}function ru(e,t){var r=Ne(!0),i=null,n=Sn,a=null,s=Jh(o);e=typeof e=="function"?e:e===void 0?nw:Ne(e),t=typeof t=="function"?t:t===void 0?aw:Ne(t);function o(l){var c,h=(l=tu(l)).length,u,d=!1,f;for(i==null&&(a=n(f=s())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,l),+t(u,c,l));if(f)return a=null,f+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:Ne(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:Ne(+l),o):t},o.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Ne(!!l),o):r},o.curve=function(l){return arguments.length?(n=l,i!=null&&(a=n(i)),o):n},o.context=function(l){return arguments.length?(l==null?i=a=null:a=n(i=l),o):i},o}class iu{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function nu(e){return new iu(e,!0)}function au(e){return new iu(e,!1)}function $e(){}function Tn(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function aa(e){this._context=e}aa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Tn(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Tn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ui(e){return new aa(e)}function su(e){this._context=e}su.prototype={areaStart:$e,areaEnd:$e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Tn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sw(e){return new su(e)}function ou(e){this._context=e}ou.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Tn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ow(e){return new ou(e)}function lu(e,t){this._basis=new aa(e),this._beta=t}lu.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],n=t[0],a=e[r]-i,s=t[r]-n,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*e[o]+(1-this._beta)*(i+l*a),this._beta*t[o]+(1-this._beta)*(n+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const lw=(function e(t){function r(i){return t===1?new aa(i):new lu(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Bn(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function vo(e,t){this._context=e,this._k=(1-t)/6}vo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Bn(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Bn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const cu=(function e(t){function r(i){return new vo(i,t)}return r.tension=function(i){return e(+i)},r})(0);function ko(e,t){this._context=e,this._k=(1-t)/6}ko.prototype={areaStart:$e,areaEnd:$e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Bn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const cw=(function e(t){function r(i){return new ko(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Co(e,t){this._context=e,this._k=(1-t)/6}Co.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Bn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const hw=(function e(t){function r(i){return new Co(i,t)}return r.tension=function(i){return e(+i)},r})(0);function _o(e,t,r){var i=e._x1,n=e._y1,a=e._x2,s=e._y2;if(e._l01_a>ps){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,n=(n*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>ps){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/h,s=(s*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,n,a,s,e._x2,e._y2)}function hu(e,t){this._context=e,this._alpha=t}hu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:_o(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const uu=(function e(t){function r(i){return t?new hu(i,t):new vo(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function du(e,t){this._context=e,this._alpha=t}du.prototype={areaStart:$e,areaEnd:$e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:_o(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const uw=(function e(t){function r(i){return t?new du(i,t):new ko(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function fu(e,t){this._context=e,this._alpha=t}fu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:_o(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const dw=(function e(t){function r(i){return t?new fu(i,t):new Co(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function pu(e){this._context=e}pu.prototype={areaStart:$e,areaEnd:$e,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function fw(e){return new pu(e)}function Il(e){return e<0?-1:1}function zl(e,t,r){var i=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(i||n<0&&-0),s=(r-e._y1)/(n||i<0&&-0),o=(a*n+s*i)/(i+n);return(Il(a)+Il(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function ql(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Oa(e,t,r){var i=e._x0,n=e._y0,a=e._x1,s=e._y1,o=(a-i)/3;e._context.bezierCurveTo(i+o,n+o*t,a-o,s-o*r,a,s)}function $n(e){this._context=e}$n.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Oa(this,this._t0,ql(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Oa(this,ql(this,r=zl(this,e,t)),r);break;default:Oa(this,this._t0,r=zl(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function gu(e){this._context=new mu(e)}(gu.prototype=Object.create($n.prototype)).point=function(e,t){$n.prototype.point.call(this,t,e)};function mu(e){this._context=e}mu.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,n,a){this._context.bezierCurveTo(t,e,i,r,a,n)}};function yu(e){return new $n(e)}function xu(e){return new gu(e)}function bu(e){this._context=e}bu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=jl(e),n=jl(t),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(i[0][a],n[0][a],i[1][a],n[1][a],e[s],t[s]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function jl(e){var t,r=e.length-1,i,n=new Array(r),a=new Array(r),s=new Array(r);for(n[0]=0,a[0]=2,s[0]=e[0]+2*e[1],t=1;t<r-1;++t)n[t]=1,a[t]=4,s[t]=4*e[t]+2*e[t+1];for(n[r-1]=2,a[r-1]=7,s[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=n[t]/a[t-1],a[t]-=i,s[t]-=i*s[t-1];for(n[r-1]=s[r-1]/a[r-1],t=r-2;t>=0;--t)n[t]=(s[t]-n[t+1])/a[t];for(a[r-1]=(e[r]+n[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-n[t+1];return[n,a]}function wu(e){return new bu(e)}function sa(e,t){this._context=e,this._t=t}sa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function vu(e){return new sa(e,.5)}function ku(e){return new sa(e,0)}function Cu(e){return new sa(e,1)}function ri(e,t,r){this.k=e,this.x=t,this.y=r}ri.prototype={constructor:ri,scale:function(e){return e===1?this:new ri(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ri(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};ri.prototype;var _u=p(e=>{const{securityLevel:t}=ut();let r=lt("body");if(t==="sandbox"){const a=lt(`#i${e}`).node()?.contentDocument??document;r=lt(a.body)}return r.select(`#${e}`)},"selectSvgElement");function So(e){return typeof e>"u"||e===null}p(So,"isNothing");function Su(e){return typeof e=="object"&&e!==null}p(Su,"isObject");function Tu(e){return Array.isArray(e)?e:So(e)?[]:[e]}p(Tu,"toArray");function Bu(e,t){var r,i,n,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)n=a[r],e[n]=t[n];return e}p(Bu,"extend");function $u(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p($u,"repeat");function Lu(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(Lu,"isNegativeZero");var pw=So,gw=Su,mw=Tu,yw=$u,xw=Lu,bw=Bu,Ct={isNothing:pw,isObject:gw,toArray:mw,repeat:yw,isNegativeZero:xw,extend:bw};function To(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
85
85
 
86
- `+e.mark.snippet),i+" "+r):i}p(To,"formatError");function Mr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=To(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(Mr,"YAMLException$1");Mr.prototype=Object.create(Error.prototype);Mr.prototype.constructor=Mr;Mr.prototype.toString=p(function(t){return this.name+": "+To(this,t)},"toString");var jt=Mr;function sn(e,t,r,i,n){var a="",s="",o=Math.floor(n/2)-1;return i-t>o&&(a=" ... ",t=i-o+a.length),r-i>o&&(s=" ...",r=i+o-s.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+s,pos:i-t+a.length}}p(sn,"getLine");function on(e,t){return Ct.repeat(" ",t-e.length)+e}p(on,"padStart");function Lu(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],a,s=-1;a=r.exec(e.buffer);)n.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);var o="",l,c,h=Math.min(e.line+t.linesAfter,n.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(s-l<0);l++)c=sn(e.buffer,i[s-l],n[s-l],e.position-(i[s]-i[s-l]),u),o=Ct.repeat(" ",t.indent)+on((e.line-l+1).toString(),h)+" | "+c.str+`
86
+ `+e.mark.snippet),i+" "+r):i}p(To,"formatError");function Mr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=To(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(Mr,"YAMLException$1");Mr.prototype=Object.create(Error.prototype);Mr.prototype.constructor=Mr;Mr.prototype.toString=p(function(t){return this.name+": "+To(this,t)},"toString");var jt=Mr;function sn(e,t,r,i,n){var a="",s="",o=Math.floor(n/2)-1;return i-t>o&&(a=" ... ",t=i-o+a.length),r-i>o&&(s=" ...",r=i+o-s.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+s,pos:i-t+a.length}}p(sn,"getLine");function on(e,t){return Ct.repeat(" ",t-e.length)+e}p(on,"padStart");function Mu(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],a,s=-1;a=r.exec(e.buffer);)n.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);var o="",l,c,h=Math.min(e.line+t.linesAfter,n.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(s-l<0);l++)c=sn(e.buffer,i[s-l],n[s-l],e.position-(i[s]-i[s-l]),u),o=Ct.repeat(" ",t.indent)+on((e.line-l+1).toString(),h)+" | "+c.str+`
87
87
  `+o;for(c=sn(e.buffer,i[s],n[s],e.position,u),o+=Ct.repeat(" ",t.indent)+on((e.line+1).toString(),h)+" | "+c.str+`
88
88
  `,o+=Ct.repeat("-",t.indent+h+3+c.pos)+`^
89
89
  `,l=1;l<=t.linesAfter&&!(s+l>=n.length);l++)c=sn(e.buffer,i[s+l],n[s+l],e.position-(i[s]-i[s+l]),u),o+=Ct.repeat(" ",t.indent)+on((e.line+l+1).toString(),h)+" | "+c.str+`
90
- `;return o.replace(/\n$/,"")}p(Lu,"makeSnippet");var yw=Lu,xw=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],bw=["scalar","sequence","mapping"];function Mu(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(Mu,"compileStyleAliases");function Au(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(xw.indexOf(r)===-1)throw new jt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Mu(t.styleAliases||null),bw.indexOf(this.kind)===-1)throw new jt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(Au,"Type$1");var Ft=Au;function ms(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(a,s){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(n=s)}),r[n]=i}),r}p(ms,"compileList");function Eu(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(Eu,"compileMap");function Ln(e){return this.extend(e)}p(Ln,"Schema$1");Ln.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof Ft)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new jt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Ft))throw new jt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new jt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new jt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof Ft))throw new jt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(Ln.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=ms(n,"implicit"),n.compiledExplicit=ms(n,"explicit"),n.compiledTypeMap=Eu(n.compiledImplicit,n.compiledExplicit),n},"extend");var ww=Ln,vw=new Ft("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),kw=new Ft("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),Cw=new Ft("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),_w=new ww({explicit:[vw,kw,Cw]});function Fu(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(Fu,"resolveYamlNull");function Pu(){return null}p(Pu,"constructYamlNull");function Ru(e){return e===null}p(Ru,"isNull");var Sw=new Ft("tag:yaml.org,2002:null",{kind:"scalar",resolve:Fu,construct:Pu,predicate:Ru,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"});function Ou(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}p(Ou,"resolveYamlBoolean");function Du(e){return e==="true"||e==="True"||e==="TRUE"}p(Du,"constructYamlBoolean");function Nu(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(Nu,"isBoolean");var Tw=new Ft("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Ou,construct:Du,predicate:Nu,represent:{lowercase:p(function(e){return e?"true":"false"},"lowercase"),uppercase:p(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Iu(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(Iu,"isHexCode");function zu(e){return 48<=e&&e<=55}p(zu,"isOctCode");function qu(e){return 48<=e&&e<=57}p(qu,"isDecCode");function ju(e){if(e===null)return!1;var t=e.length,r=0,i=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!Iu(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!zu(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!qu(e.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}p(ju,"resolveYamlInteger");function Wu(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}p(Wu,"constructYamlInteger");function Hu(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Ct.isNegativeZero(e)}p(Hu,"isInteger");var Bw=new Ft("tag:yaml.org,2002:int",{kind:"scalar",resolve:ju,construct:Wu,predicate:Hu,represent:{binary:p(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:p(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:p(function(e){return e.toString(10)},"decimal"),hexadecimal:p(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),$w=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Yu(e){return!(e===null||!$w.test(e)||e[e.length-1]==="_")}p(Yu,"resolveYamlFloat");function Uu(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}p(Uu,"constructYamlFloat");var Lw=/^[-+]?[0-9]+e/;function Gu(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ct.isNegativeZero(e))return"-0.0";return r=e.toString(10),Lw.test(r)?r.replace("e",".e"):r}p(Gu,"representYamlFloat");function Xu(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Ct.isNegativeZero(e))}p(Xu,"isFloat");var Mw=new Ft("tag:yaml.org,2002:float",{kind:"scalar",resolve:Yu,construct:Uu,predicate:Xu,represent:Gu,defaultStyle:"lowercase"}),Vu=_w.extend({implicit:[Sw,Tw,Bw,Mw]}),Aw=Vu,Zu=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ku=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 Qu(e){return e===null?!1:Zu.exec(e)!==null||Ku.exec(e)!==null}p(Qu,"resolveYamlTimestamp");function Ju(e){var t,r,i,n,a,s,o,l=0,c=null,h,u,d;if(t=Zu.exec(e),t===null&&(t=Ku.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(a=+t[4],s=+t[5],o=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],u=+(t[11]||0),c=(h*60+u)*6e4,t[9]==="-"&&(c=-c)),d=new Date(Date.UTC(r,i,n,a,s,o,l)),c&&d.setTime(d.getTime()-c),d}p(Ju,"constructYamlTimestamp");function td(e){return e.toISOString()}p(td,"representYamlTimestamp");var Ew=new Ft("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Qu,construct:Ju,instanceOf:Date,represent:td});function ed(e){return e==="<<"||e===null}p(ed,"resolveYamlMerge");var Fw=new Ft("tag:yaml.org,2002:merge",{kind:"scalar",resolve:ed}),Bo=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
91
- \r`;function rd(e){if(e===null)return!1;var t,r,i=0,n=e.length,a=Bo;for(r=0;r<n;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(rd,"resolveYamlBinary");function id(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,a=Bo,s=0,o=[];for(t=0;t<n;t++)t%4===0&&t&&(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)),s=s<<6|a.indexOf(i.charAt(t));return r=n%4*6,r===0?(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)):r===18?(o.push(s>>10&255),o.push(s>>2&255)):r===12&&o.push(s>>4&255),new Uint8Array(o)}p(id,"constructYamlBinary");function nd(e){var t="",r=0,i,n,a=e.length,s=Bo;for(i=0;i<a;i++)i%3===0&&i&&(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[i];return n=a%3,n===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):n===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):n===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}p(nd,"representYamlBinary");function ad(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(ad,"isBinary");var Pw=new Ft("tag:yaml.org,2002:binary",{kind:"scalar",resolve:rd,construct:id,predicate:ad,represent:nd}),Rw=Object.prototype.hasOwnProperty,Ow=Object.prototype.toString;function sd(e){if(e===null)return!0;var t=[],r,i,n,a,s,o=e;for(r=0,i=o.length;r<i;r+=1){if(n=o[r],s=!1,Ow.call(n)!=="[object Object]")return!1;for(a in n)if(Rw.call(n,a))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}p(sd,"resolveYamlOmap");function od(e){return e!==null?e:[]}p(od,"constructYamlOmap");var Dw=new Ft("tag:yaml.org,2002:omap",{kind:"sequence",resolve:sd,construct:od}),Nw=Object.prototype.toString;function ld(e){if(e===null)return!0;var t,r,i,n,a,s=e;for(a=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(i=s[t],Nw.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;a[t]=[n[0],i[n[0]]]}return!0}p(ld,"resolveYamlPairs");function cd(e){if(e===null)return[];var t,r,i,n,a,s=e;for(a=new Array(s.length),t=0,r=s.length;t<r;t+=1)i=s[t],n=Object.keys(i),a[t]=[n[0],i[n[0]]];return a}p(cd,"constructYamlPairs");var Iw=new Ft("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:ld,construct:cd}),zw=Object.prototype.hasOwnProperty;function hd(e){if(e===null)return!0;var t,r=e;for(t in r)if(zw.call(r,t)&&r[t]!==null)return!1;return!0}p(hd,"resolveYamlSet");function ud(e){return e!==null?e:{}}p(ud,"constructYamlSet");var qw=new Ft("tag:yaml.org,2002:set",{kind:"mapping",resolve:hd,construct:ud}),dd=Aw.extend({implicit:[Ew,Fw],explicit:[Pw,Dw,Iw,qw]}),Le=Object.prototype.hasOwnProperty,Mn=1,fd=2,pd=3,An=4,Na=1,jw=2,jl=3,Ww=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Hw=/[\x85\u2028\u2029]/,Yw=/[,\[\]\{\}]/,gd=/^(?:!|!!|![a-z\-]+!)$/i,md=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function ys(e){return Object.prototype.toString.call(e)}p(ys,"_class");function Qt(e){return e===10||e===13}p(Qt,"is_EOL");function Be(e){return e===9||e===32}p(Be,"is_WHITE_SPACE");function Nt(e){return e===9||e===32||e===10||e===13}p(Nt,"is_WS_OR_EOL");function je(e){return e===44||e===91||e===93||e===123||e===125}p(je,"is_FLOW_INDICATOR");function yd(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(yd,"fromHexCode");function xd(e){return e===120?2:e===117?4:e===85?8:0}p(xd,"escapedHexLen");function bd(e){return 48<=e&&e<=57?e-48:-1}p(bd,"fromDecimalCode");function xs(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
92
- `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}p(xs,"simpleEscapeSequence");function wd(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(wd,"charFromCodepoint");var vd=new Array(256),kd=new Array(256);for(Oe=0;Oe<256;Oe++)vd[Oe]=xs(Oe)?1:0,kd[Oe]=xs(Oe);var Oe;function Cd(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||dd,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}p(Cd,"State$1");function $o(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=yw(r),new jt(t,r)}p($o,"generateError");function tt(e,t){throw $o(e,t)}p(tt,"throwError");function xi(e,t){e.onWarning&&e.onWarning.call(null,$o(e,t))}p(xi,"throwWarning");var Wl={YAML:p(function(t,r,i){var n,a,s;t.version!==null&&tt(t,"duplication of %YAML directive"),i.length!==1&&tt(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&tt(t,"ill-formed argument of the YAML directive"),a=parseInt(n[1],10),s=parseInt(n[2],10),a!==1&&tt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&xi(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var n,a;i.length!==2&&tt(t,"TAG directive accepts exactly two arguments"),n=i[0],a=i[1],gd.test(n)||tt(t,"ill-formed tag handle (first argument) of the TAG directive"),Le.call(t.tagMap,n)&&tt(t,'there is a previously declared suffix for "'+n+'" tag handle'),md.test(a)||tt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{tt(t,"tag prefix is malformed: "+a)}t.tagMap[n]=a},"handleTagDirective")};function xe(e,t,r,i){var n,a,s,o;if(t<r){if(o=e.input.slice(t,r),i)for(n=0,a=o.length;n<a;n+=1)s=o.charCodeAt(n),s===9||32<=s&&s<=1114111||tt(e,"expected valid JSON character");else Ww.test(o)&&tt(e,"the stream contains non-printable characters");e.result+=o}}p(xe,"captureSegment");function bs(e,t,r,i){var n,a,s,o;for(Ct.isObject(r)||tt(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),s=0,o=n.length;s<o;s+=1)a=n[s],Le.call(t,a)||(t[a]=r[a],i[a]=!0)}p(bs,"mergeMappings");function We(e,t,r,i,n,a,s,o,l){var c,h;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),c=0,h=n.length;c<h;c+=1)Array.isArray(n[c])&&tt(e,"nested arrays are not supported inside keys"),typeof n=="object"&&ys(n[c])==="[object Object]"&&(n[c]="[object Object]");if(typeof n=="object"&&ys(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)bs(e,t,a[c],r);else bs(e,t,a,r);else!e.json&&!Le.call(r,n)&&Le.call(t,n)&&(e.line=s||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,tt(e,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(t,n,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[n]=a,delete r[n];return t}p(We,"storeMappingPair");function oa(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):tt(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(oa,"readLineBreak");function yt(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;Be(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(Qt(n))for(oa(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&xi(e,"deficient indentation"),i}p(yt,"skipSeparationSpace");function Ai(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Nt(r)))}p(Ai,"testDocumentSeparator");function la(e,t){t===1?e.result+=" ":t>1&&(e.result+=Ct.repeat(`
93
- `,t-1))}p(la,"writeFoldedLines");function _d(e,t,r){var i,n,a,s,o,l,c,h,u=e.kind,d=e.result,f;if(f=e.input.charCodeAt(e.position),Nt(f)||je(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(n=e.input.charCodeAt(e.position+1),Nt(n)||r&&je(n)))return!1;for(e.kind="scalar",e.result="",a=s=e.position,o=!1;f!==0;){if(f===58){if(n=e.input.charCodeAt(e.position+1),Nt(n)||r&&je(n))break}else if(f===35){if(i=e.input.charCodeAt(e.position-1),Nt(i))break}else{if(e.position===e.lineStart&&Ai(e)||r&&je(f))break;if(Qt(f))if(l=e.line,c=e.lineStart,h=e.lineIndent,yt(e,!1,-1),e.lineIndent>=t){o=!0,f=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=c,e.lineIndent=h;break}}o&&(xe(e,a,s,!1),la(e,e.line-l),a=s=e.position,o=!1),Be(f)||(s=e.position+1),f=e.input.charCodeAt(++e.position)}return xe(e,a,s,!1),e.result?!0:(e.kind=u,e.result=d,!1)}p(_d,"readPlainScalar");function Sd(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(xe(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else Qt(r)?(xe(e,i,n,!0),la(e,yt(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Ai(e)?tt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);tt(e,"unexpected end of the stream within a single quoted scalar")}p(Sd,"readSingleQuotedScalar");function Td(e,t){var r,i,n,a,s,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return xe(e,r,e.position,!0),e.position++,!0;if(o===92){if(xe(e,r,e.position,!0),o=e.input.charCodeAt(++e.position),Qt(o))yt(e,!1,t);else if(o<256&&vd[o])e.result+=kd[o],e.position++;else if((s=xd(o))>0){for(n=s,a=0;n>0;n--)o=e.input.charCodeAt(++e.position),(s=yd(o))>=0?a=(a<<4)+s:tt(e,"expected hexadecimal character");e.result+=wd(a),e.position++}else tt(e,"unknown escape sequence");r=i=e.position}else Qt(o)?(xe(e,r,i,!0),la(e,yt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ai(e)?tt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}tt(e,"unexpected end of the stream within a double quoted scalar")}p(Td,"readDoubleQuotedScalar");function Bd(e,t){var r=!0,i,n,a,s=e.tag,o,l=e.anchor,c,h,u,d,f,g=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,f=!1,o=[];else if(b===123)h=125,f=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),b=e.input.charCodeAt(++e.position);b!==0;){if(yt(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=s,e.anchor=l,e.kind=f?"mapping":"sequence",e.result=o,!0;r?b===44&&tt(e,"expected the node content, but found ','"):tt(e,"missed comma between flow collection entries"),y=m=x=null,u=d=!1,b===63&&(c=e.input.charCodeAt(e.position+1),Nt(c)&&(u=d=!0,e.position++,yt(e,!0,t))),i=e.line,n=e.lineStart,a=e.position,Qe(e,t,Mn,!1,!0),y=e.tag,m=e.result,yt(e,!0,t),b=e.input.charCodeAt(e.position),(d||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),yt(e,!0,t),Qe(e,t,Mn,!1,!0),x=e.result),f?We(e,o,g,y,m,x,i,n,a):u?o.push(We(e,null,g,y,m,x,i,n,a)):o.push(m),yt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}tt(e,"unexpected end of the stream within a flow collection")}p(Bd,"readFlowCollection");function $d(e,t){var r,i,n=Na,a=!1,s=!1,o=t,l=0,c=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)Na===n?n=u===43?jl:jw:tt(e,"repeat of a chomping mode identifier");else if((h=bd(u))>=0)h===0?tt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?tt(e,"repeat of an indentation width identifier"):(o=t+h-1,s=!0);else break;if(Be(u)){do u=e.input.charCodeAt(++e.position);while(Be(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!Qt(u)&&u!==0)}for(;u!==0;){for(oa(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!s||e.lineIndent<o)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>o&&(o=e.lineIndent),Qt(u)){l++;continue}if(e.lineIndent<o){n===jl?e.result+=Ct.repeat(`
90
+ `;return o.replace(/\n$/,"")}p(Mu,"makeSnippet");var ww=Mu,vw=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],kw=["scalar","sequence","mapping"];function Au(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(Au,"compileStyleAliases");function Eu(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(vw.indexOf(r)===-1)throw new jt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Au(t.styleAliases||null),kw.indexOf(this.kind)===-1)throw new jt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(Eu,"Type$1");var Ft=Eu;function ms(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(a,s){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(n=s)}),r[n]=i}),r}p(ms,"compileList");function Fu(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(Fu,"compileMap");function Ln(e){return this.extend(e)}p(Ln,"Schema$1");Ln.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof Ft)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new jt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Ft))throw new jt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new jt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new jt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof Ft))throw new jt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(Ln.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=ms(n,"implicit"),n.compiledExplicit=ms(n,"explicit"),n.compiledTypeMap=Fu(n.compiledImplicit,n.compiledExplicit),n},"extend");var Cw=Ln,_w=new Ft("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),Sw=new Ft("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),Tw=new Ft("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),Bw=new Cw({explicit:[_w,Sw,Tw]});function Pu(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(Pu,"resolveYamlNull");function Ru(){return null}p(Ru,"constructYamlNull");function Du(e){return e===null}p(Du,"isNull");var $w=new Ft("tag:yaml.org,2002:null",{kind:"scalar",resolve:Pu,construct:Ru,predicate:Du,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"});function Ou(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}p(Ou,"resolveYamlBoolean");function Nu(e){return e==="true"||e==="True"||e==="TRUE"}p(Nu,"constructYamlBoolean");function Iu(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(Iu,"isBoolean");var Lw=new Ft("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Ou,construct:Nu,predicate:Iu,represent:{lowercase:p(function(e){return e?"true":"false"},"lowercase"),uppercase:p(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function zu(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(zu,"isHexCode");function qu(e){return 48<=e&&e<=55}p(qu,"isOctCode");function ju(e){return 48<=e&&e<=57}p(ju,"isDecCode");function Wu(e){if(e===null)return!1;var t=e.length,r=0,i=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!zu(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!qu(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!ju(e.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}p(Wu,"resolveYamlInteger");function Hu(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}p(Hu,"constructYamlInteger");function Yu(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Ct.isNegativeZero(e)}p(Yu,"isInteger");var Mw=new Ft("tag:yaml.org,2002:int",{kind:"scalar",resolve:Wu,construct:Hu,predicate:Yu,represent:{binary:p(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:p(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:p(function(e){return e.toString(10)},"decimal"),hexadecimal:p(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Aw=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Uu(e){return!(e===null||!Aw.test(e)||e[e.length-1]==="_")}p(Uu,"resolveYamlFloat");function Gu(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}p(Gu,"constructYamlFloat");var Ew=/^[-+]?[0-9]+e/;function Xu(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ct.isNegativeZero(e))return"-0.0";return r=e.toString(10),Ew.test(r)?r.replace("e",".e"):r}p(Xu,"representYamlFloat");function Vu(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Ct.isNegativeZero(e))}p(Vu,"isFloat");var Fw=new Ft("tag:yaml.org,2002:float",{kind:"scalar",resolve:Uu,construct:Gu,predicate:Vu,represent:Xu,defaultStyle:"lowercase"}),Zu=Bw.extend({implicit:[$w,Lw,Mw,Fw]}),Pw=Zu,Ku=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Qu=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 Ju(e){return e===null?!1:Ku.exec(e)!==null||Qu.exec(e)!==null}p(Ju,"resolveYamlTimestamp");function td(e){var t,r,i,n,a,s,o,l=0,c=null,h,u,d;if(t=Ku.exec(e),t===null&&(t=Qu.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(a=+t[4],s=+t[5],o=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],u=+(t[11]||0),c=(h*60+u)*6e4,t[9]==="-"&&(c=-c)),d=new Date(Date.UTC(r,i,n,a,s,o,l)),c&&d.setTime(d.getTime()-c),d}p(td,"constructYamlTimestamp");function ed(e){return e.toISOString()}p(ed,"representYamlTimestamp");var Rw=new Ft("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Ju,construct:td,instanceOf:Date,represent:ed});function rd(e){return e==="<<"||e===null}p(rd,"resolveYamlMerge");var Dw=new Ft("tag:yaml.org,2002:merge",{kind:"scalar",resolve:rd}),Bo=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
91
+ \r`;function id(e){if(e===null)return!1;var t,r,i=0,n=e.length,a=Bo;for(r=0;r<n;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(id,"resolveYamlBinary");function nd(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,a=Bo,s=0,o=[];for(t=0;t<n;t++)t%4===0&&t&&(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)),s=s<<6|a.indexOf(i.charAt(t));return r=n%4*6,r===0?(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)):r===18?(o.push(s>>10&255),o.push(s>>2&255)):r===12&&o.push(s>>4&255),new Uint8Array(o)}p(nd,"constructYamlBinary");function ad(e){var t="",r=0,i,n,a=e.length,s=Bo;for(i=0;i<a;i++)i%3===0&&i&&(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[i];return n=a%3,n===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):n===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):n===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}p(ad,"representYamlBinary");function sd(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(sd,"isBinary");var Ow=new Ft("tag:yaml.org,2002:binary",{kind:"scalar",resolve:id,construct:nd,predicate:sd,represent:ad}),Nw=Object.prototype.hasOwnProperty,Iw=Object.prototype.toString;function od(e){if(e===null)return!0;var t=[],r,i,n,a,s,o=e;for(r=0,i=o.length;r<i;r+=1){if(n=o[r],s=!1,Iw.call(n)!=="[object Object]")return!1;for(a in n)if(Nw.call(n,a))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}p(od,"resolveYamlOmap");function ld(e){return e!==null?e:[]}p(ld,"constructYamlOmap");var zw=new Ft("tag:yaml.org,2002:omap",{kind:"sequence",resolve:od,construct:ld}),qw=Object.prototype.toString;function cd(e){if(e===null)return!0;var t,r,i,n,a,s=e;for(a=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(i=s[t],qw.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;a[t]=[n[0],i[n[0]]]}return!0}p(cd,"resolveYamlPairs");function hd(e){if(e===null)return[];var t,r,i,n,a,s=e;for(a=new Array(s.length),t=0,r=s.length;t<r;t+=1)i=s[t],n=Object.keys(i),a[t]=[n[0],i[n[0]]];return a}p(hd,"constructYamlPairs");var jw=new Ft("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:cd,construct:hd}),Ww=Object.prototype.hasOwnProperty;function ud(e){if(e===null)return!0;var t,r=e;for(t in r)if(Ww.call(r,t)&&r[t]!==null)return!1;return!0}p(ud,"resolveYamlSet");function dd(e){return e!==null?e:{}}p(dd,"constructYamlSet");var Hw=new Ft("tag:yaml.org,2002:set",{kind:"mapping",resolve:ud,construct:dd}),fd=Pw.extend({implicit:[Rw,Dw],explicit:[Ow,zw,jw,Hw]}),Le=Object.prototype.hasOwnProperty,Mn=1,pd=2,gd=3,An=4,Na=1,Yw=2,Wl=3,Uw=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Gw=/[\x85\u2028\u2029]/,Xw=/[,\[\]\{\}]/,md=/^(?:!|!!|![a-z\-]+!)$/i,yd=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function ys(e){return Object.prototype.toString.call(e)}p(ys,"_class");function Qt(e){return e===10||e===13}p(Qt,"is_EOL");function Be(e){return e===9||e===32}p(Be,"is_WHITE_SPACE");function Nt(e){return e===9||e===32||e===10||e===13}p(Nt,"is_WS_OR_EOL");function je(e){return e===44||e===91||e===93||e===123||e===125}p(je,"is_FLOW_INDICATOR");function xd(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(xd,"fromHexCode");function bd(e){return e===120?2:e===117?4:e===85?8:0}p(bd,"escapedHexLen");function wd(e){return 48<=e&&e<=57?e-48:-1}p(wd,"fromDecimalCode");function xs(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
92
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}p(xs,"simpleEscapeSequence");function vd(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(vd,"charFromCodepoint");var kd=new Array(256),Cd=new Array(256);for(De=0;De<256;De++)kd[De]=xs(De)?1:0,Cd[De]=xs(De);var De;function _d(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||fd,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}p(_d,"State$1");function $o(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=ww(r),new jt(t,r)}p($o,"generateError");function tt(e,t){throw $o(e,t)}p(tt,"throwError");function xi(e,t){e.onWarning&&e.onWarning.call(null,$o(e,t))}p(xi,"throwWarning");var Hl={YAML:p(function(t,r,i){var n,a,s;t.version!==null&&tt(t,"duplication of %YAML directive"),i.length!==1&&tt(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&tt(t,"ill-formed argument of the YAML directive"),a=parseInt(n[1],10),s=parseInt(n[2],10),a!==1&&tt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&xi(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var n,a;i.length!==2&&tt(t,"TAG directive accepts exactly two arguments"),n=i[0],a=i[1],md.test(n)||tt(t,"ill-formed tag handle (first argument) of the TAG directive"),Le.call(t.tagMap,n)&&tt(t,'there is a previously declared suffix for "'+n+'" tag handle'),yd.test(a)||tt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{tt(t,"tag prefix is malformed: "+a)}t.tagMap[n]=a},"handleTagDirective")};function xe(e,t,r,i){var n,a,s,o;if(t<r){if(o=e.input.slice(t,r),i)for(n=0,a=o.length;n<a;n+=1)s=o.charCodeAt(n),s===9||32<=s&&s<=1114111||tt(e,"expected valid JSON character");else Uw.test(o)&&tt(e,"the stream contains non-printable characters");e.result+=o}}p(xe,"captureSegment");function bs(e,t,r,i){var n,a,s,o;for(Ct.isObject(r)||tt(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),s=0,o=n.length;s<o;s+=1)a=n[s],Le.call(t,a)||(t[a]=r[a],i[a]=!0)}p(bs,"mergeMappings");function We(e,t,r,i,n,a,s,o,l){var c,h;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),c=0,h=n.length;c<h;c+=1)Array.isArray(n[c])&&tt(e,"nested arrays are not supported inside keys"),typeof n=="object"&&ys(n[c])==="[object Object]"&&(n[c]="[object Object]");if(typeof n=="object"&&ys(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)bs(e,t,a[c],r);else bs(e,t,a,r);else!e.json&&!Le.call(r,n)&&Le.call(t,n)&&(e.line=s||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,tt(e,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(t,n,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[n]=a,delete r[n];return t}p(We,"storeMappingPair");function oa(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):tt(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(oa,"readLineBreak");function yt(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;Be(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(Qt(n))for(oa(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&xi(e,"deficient indentation"),i}p(yt,"skipSeparationSpace");function Ai(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Nt(r)))}p(Ai,"testDocumentSeparator");function la(e,t){t===1?e.result+=" ":t>1&&(e.result+=Ct.repeat(`
93
+ `,t-1))}p(la,"writeFoldedLines");function Sd(e,t,r){var i,n,a,s,o,l,c,h,u=e.kind,d=e.result,f;if(f=e.input.charCodeAt(e.position),Nt(f)||je(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(n=e.input.charCodeAt(e.position+1),Nt(n)||r&&je(n)))return!1;for(e.kind="scalar",e.result="",a=s=e.position,o=!1;f!==0;){if(f===58){if(n=e.input.charCodeAt(e.position+1),Nt(n)||r&&je(n))break}else if(f===35){if(i=e.input.charCodeAt(e.position-1),Nt(i))break}else{if(e.position===e.lineStart&&Ai(e)||r&&je(f))break;if(Qt(f))if(l=e.line,c=e.lineStart,h=e.lineIndent,yt(e,!1,-1),e.lineIndent>=t){o=!0,f=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=c,e.lineIndent=h;break}}o&&(xe(e,a,s,!1),la(e,e.line-l),a=s=e.position,o=!1),Be(f)||(s=e.position+1),f=e.input.charCodeAt(++e.position)}return xe(e,a,s,!1),e.result?!0:(e.kind=u,e.result=d,!1)}p(Sd,"readPlainScalar");function Td(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(xe(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else Qt(r)?(xe(e,i,n,!0),la(e,yt(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Ai(e)?tt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);tt(e,"unexpected end of the stream within a single quoted scalar")}p(Td,"readSingleQuotedScalar");function Bd(e,t){var r,i,n,a,s,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return xe(e,r,e.position,!0),e.position++,!0;if(o===92){if(xe(e,r,e.position,!0),o=e.input.charCodeAt(++e.position),Qt(o))yt(e,!1,t);else if(o<256&&kd[o])e.result+=Cd[o],e.position++;else if((s=bd(o))>0){for(n=s,a=0;n>0;n--)o=e.input.charCodeAt(++e.position),(s=xd(o))>=0?a=(a<<4)+s:tt(e,"expected hexadecimal character");e.result+=vd(a),e.position++}else tt(e,"unknown escape sequence");r=i=e.position}else Qt(o)?(xe(e,r,i,!0),la(e,yt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ai(e)?tt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}tt(e,"unexpected end of the stream within a double quoted scalar")}p(Bd,"readDoubleQuotedScalar");function $d(e,t){var r=!0,i,n,a,s=e.tag,o,l=e.anchor,c,h,u,d,f,g=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,f=!1,o=[];else if(b===123)h=125,f=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),b=e.input.charCodeAt(++e.position);b!==0;){if(yt(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=s,e.anchor=l,e.kind=f?"mapping":"sequence",e.result=o,!0;r?b===44&&tt(e,"expected the node content, but found ','"):tt(e,"missed comma between flow collection entries"),y=m=x=null,u=d=!1,b===63&&(c=e.input.charCodeAt(e.position+1),Nt(c)&&(u=d=!0,e.position++,yt(e,!0,t))),i=e.line,n=e.lineStart,a=e.position,Qe(e,t,Mn,!1,!0),y=e.tag,m=e.result,yt(e,!0,t),b=e.input.charCodeAt(e.position),(d||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),yt(e,!0,t),Qe(e,t,Mn,!1,!0),x=e.result),f?We(e,o,g,y,m,x,i,n,a):u?o.push(We(e,null,g,y,m,x,i,n,a)):o.push(m),yt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}tt(e,"unexpected end of the stream within a flow collection")}p($d,"readFlowCollection");function Ld(e,t){var r,i,n=Na,a=!1,s=!1,o=t,l=0,c=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)Na===n?n=u===43?Wl:Yw:tt(e,"repeat of a chomping mode identifier");else if((h=wd(u))>=0)h===0?tt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?tt(e,"repeat of an indentation width identifier"):(o=t+h-1,s=!0);else break;if(Be(u)){do u=e.input.charCodeAt(++e.position);while(Be(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!Qt(u)&&u!==0)}for(;u!==0;){for(oa(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!s||e.lineIndent<o)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>o&&(o=e.lineIndent),Qt(u)){l++;continue}if(e.lineIndent<o){n===Wl?e.result+=Ct.repeat(`
94
94
  `,a?1+l:l):n===Na&&a&&(e.result+=`
95
95
  `);break}for(i?Be(u)?(c=!0,e.result+=Ct.repeat(`
96
96
  `,a?1+l:l)):c?(c=!1,e.result+=Ct.repeat(`
97
97
  `,l+1)):l===0?a&&(e.result+=" "):e.result+=Ct.repeat(`
98
98
  `,l):e.result+=Ct.repeat(`
99
- `,a?1+l:l),a=!0,s=!0,l=0,r=e.position;!Qt(u)&&u!==0;)u=e.input.charCodeAt(++e.position);xe(e,r,e.position,!1)}return!0}p($d,"readBlockScalar");function ws(e,t){var r,i=e.tag,n=e.anchor,a=[],s,o=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,tt(e,"tab characters must not be used in indentation")),!(l!==45||(s=e.input.charCodeAt(e.position+1),!Nt(s))));){if(o=!0,e.position++,yt(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Qe(e,t,pd,!1,!0),a.push(e.result),yt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)tt(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=a,!0):!1}p(ws,"readBlockSequence");function Ld(e,t,r){var i,n,a,s,o,l,c=e.tag,h=e.anchor,u={},d=Object.create(null),f=null,g=null,m=null,y=!1,x=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,tt(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&Nt(i))b===63?(y&&(We(e,u,d,f,g,null,s,o,l),f=g=m=null),x=!0,y=!0,n=!0):y?(y=!1,n=!0):tt(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(s=e.line,o=e.lineStart,l=e.position,!Qe(e,r,fd,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);Be(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Nt(b)||tt(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(We(e,u,d,f,g,null,s,o,l),f=g=m=null),x=!0,y=!1,n=!1,f=e.tag,g=e.result;else if(x)tt(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(x)tt(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===a||e.lineIndent>t)&&(y&&(s=e.line,o=e.lineStart,l=e.position),Qe(e,t,An,!0,n)&&(y?g=e.result:m=e.result),y||(We(e,u,d,f,g,m,s,o,l),f=g=m=null),yt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)tt(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&We(e,u,d,f,g,null,s,o,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),x}p(Ld,"readBlockMapping");function Md(e){var t,r=!1,i=!1,n,a,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&tt(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(r=!0,s=e.input.charCodeAt(++e.position)):s===33?(i=!0,n="!!",s=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(a=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):tt(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Nt(s);)s===33&&(i?tt(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),gd.test(n)||tt(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),Yw.test(a)&&tt(e,"tag suffix cannot contain flow indicator characters")}a&&!md.test(a)&&tt(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{tt(e,"tag name is malformed: "+a)}return r?e.tag=a:Le.call(e.tagMap,n)?e.tag=e.tagMap[n]+a:n==="!"?e.tag="!"+a:n==="!!"?e.tag="tag:yaml.org,2002:"+a:tt(e,'undeclared tag handle "'+n+'"'),!0}p(Md,"readTagProperty");function Ad(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&tt(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Nt(r)&&!je(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&tt(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}p(Ad,"readAnchorProperty");function Ed(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Nt(i)&&!je(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&tt(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Le.call(e.anchorMap,r)||tt(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],yt(e,!0,-1),!0}p(Ed,"readAlias");function Qe(e,t,r,i,n){var a,s,o,l=1,c=!1,h=!1,u,d,f,g,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=s=o=An===r||pd===r,i&&yt(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Md(e)||Ad(e);)yt(e,!0,-1)?(c=!0,o=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):o=!1;if(o&&(o=c||n),(l===1||An===r)&&(Mn===r||fd===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?o&&(ws(e,y)||Ld(e,y,m))||Bd(e,m)?h=!0:(s&&$d(e,m)||Sd(e,m)||Td(e,m)?h=!0:Ed(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&tt(e,"alias node should not have any properties")):_d(e,m,Mn===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=o&&ws(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&tt(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,d=e.implicitTypes.length;u<d;u+=1)if(g=e.implicitTypes[u],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Le.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,f=e.typeMap.multi[e.kind||"fallback"],u=0,d=f.length;u<d;u+=1)if(e.tag.slice(0,f[u].tag.length)===f[u].tag){g=f[u];break}g||tt(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&tt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):tt(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}p(Qe,"composeNode");function Fd(e){var t=e.position,r,i,n,a=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(s=e.input.charCodeAt(e.position))!==0&&(yt(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(a=!0,s=e.input.charCodeAt(++e.position),r=e.position;s!==0&&!Nt(s);)s=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&tt(e,"directive name must not be less than one character in length");s!==0;){for(;Be(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!Qt(s));break}if(Qt(s))break;for(r=e.position;s!==0&&!Nt(s);)s=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}s!==0&&oa(e),Le.call(Wl,i)?Wl[i](e,i,n):xi(e,'unknown document directive "'+i+'"')}if(yt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,yt(e,!0,-1)):a&&tt(e,"directives end mark is expected"),Qe(e,e.lineIndent-1,An,!1,!0),yt(e,!0,-1),e.checkLineBreaks&&Hw.test(e.input.slice(t,e.position))&&xi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ai(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,yt(e,!0,-1));return}if(e.position<e.length-1)tt(e,"end of the stream or a document separator is expected");else return}p(Fd,"readDocument");function Lo(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
100
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Cd(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,tt(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Fd(r);return r.documents}p(Lo,"loadDocuments");function Uw(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Lo(e,r);if(typeof t!="function")return i;for(var n=0,a=i.length;n<a;n+=1)t(i[n])}p(Uw,"loadAll$1");function Pd(e,t){var r=Lo(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new jt("expected a single document in the stream, but found more")}}p(Pd,"load$1");var Gw=Pd,Xw={load:Gw},Rd=Object.prototype.toString,Od=Object.prototype.hasOwnProperty,Mo=65279,Vw=9,bi=10,Zw=13,Kw=32,Qw=33,Jw=34,vs=35,tv=37,ev=38,rv=39,iv=42,Dd=44,nv=45,En=58,av=61,sv=62,ov=63,lv=64,Nd=91,Id=93,cv=96,zd=123,hv=124,qd=125,Rt={};Rt[0]="\\0";Rt[7]="\\a";Rt[8]="\\b";Rt[9]="\\t";Rt[10]="\\n";Rt[11]="\\v";Rt[12]="\\f";Rt[13]="\\r";Rt[27]="\\e";Rt[34]='\\"';Rt[92]="\\\\";Rt[133]="\\N";Rt[160]="\\_";Rt[8232]="\\L";Rt[8233]="\\P";var uv=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],dv=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function jd(e,t){var r,i,n,a,s,o,l;if(t===null)return{};for(r={},i=Object.keys(t),n=0,a=i.length;n<a;n+=1)s=i[n],o=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=e.compiledTypeMap.fallback[s],l&&Od.call(l.styleAliases,o)&&(o=l.styleAliases[o]),r[s]=o;return r}p(jd,"compileStyleMap");function Wd(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new jt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Ct.repeat("0",i-t.length)+t}p(Wd,"encodeHex");var fv=1,wi=2;function Hd(e){this.schema=e.schema||dd,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ct.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=jd(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?wi:fv,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(Hd,"State");function ks(e,t){for(var r=Ct.repeat(" ",t),i=0,n=-1,a="",s,o=e.length;i<o;)n=e.indexOf(`
99
+ `,a?1+l:l),a=!0,s=!0,l=0,r=e.position;!Qt(u)&&u!==0;)u=e.input.charCodeAt(++e.position);xe(e,r,e.position,!1)}return!0}p(Ld,"readBlockScalar");function ws(e,t){var r,i=e.tag,n=e.anchor,a=[],s,o=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,tt(e,"tab characters must not be used in indentation")),!(l!==45||(s=e.input.charCodeAt(e.position+1),!Nt(s))));){if(o=!0,e.position++,yt(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Qe(e,t,gd,!1,!0),a.push(e.result),yt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)tt(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=a,!0):!1}p(ws,"readBlockSequence");function Md(e,t,r){var i,n,a,s,o,l,c=e.tag,h=e.anchor,u={},d=Object.create(null),f=null,g=null,m=null,y=!1,x=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,tt(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&Nt(i))b===63?(y&&(We(e,u,d,f,g,null,s,o,l),f=g=m=null),x=!0,y=!0,n=!0):y?(y=!1,n=!0):tt(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(s=e.line,o=e.lineStart,l=e.position,!Qe(e,r,pd,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);Be(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Nt(b)||tt(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(We(e,u,d,f,g,null,s,o,l),f=g=m=null),x=!0,y=!1,n=!1,f=e.tag,g=e.result;else if(x)tt(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(x)tt(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===a||e.lineIndent>t)&&(y&&(s=e.line,o=e.lineStart,l=e.position),Qe(e,t,An,!0,n)&&(y?g=e.result:m=e.result),y||(We(e,u,d,f,g,m,s,o,l),f=g=m=null),yt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)tt(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&We(e,u,d,f,g,null,s,o,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),x}p(Md,"readBlockMapping");function Ad(e){var t,r=!1,i=!1,n,a,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&tt(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(r=!0,s=e.input.charCodeAt(++e.position)):s===33?(i=!0,n="!!",s=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(a=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):tt(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Nt(s);)s===33&&(i?tt(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),md.test(n)||tt(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),Xw.test(a)&&tt(e,"tag suffix cannot contain flow indicator characters")}a&&!yd.test(a)&&tt(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{tt(e,"tag name is malformed: "+a)}return r?e.tag=a:Le.call(e.tagMap,n)?e.tag=e.tagMap[n]+a:n==="!"?e.tag="!"+a:n==="!!"?e.tag="tag:yaml.org,2002:"+a:tt(e,'undeclared tag handle "'+n+'"'),!0}p(Ad,"readTagProperty");function Ed(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&tt(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Nt(r)&&!je(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&tt(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}p(Ed,"readAnchorProperty");function Fd(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Nt(i)&&!je(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&tt(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Le.call(e.anchorMap,r)||tt(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],yt(e,!0,-1),!0}p(Fd,"readAlias");function Qe(e,t,r,i,n){var a,s,o,l=1,c=!1,h=!1,u,d,f,g,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=s=o=An===r||gd===r,i&&yt(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Ad(e)||Ed(e);)yt(e,!0,-1)?(c=!0,o=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):o=!1;if(o&&(o=c||n),(l===1||An===r)&&(Mn===r||pd===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?o&&(ws(e,y)||Md(e,y,m))||$d(e,m)?h=!0:(s&&Ld(e,m)||Td(e,m)||Bd(e,m)?h=!0:Fd(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&tt(e,"alias node should not have any properties")):Sd(e,m,Mn===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=o&&ws(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&tt(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,d=e.implicitTypes.length;u<d;u+=1)if(g=e.implicitTypes[u],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Le.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,f=e.typeMap.multi[e.kind||"fallback"],u=0,d=f.length;u<d;u+=1)if(e.tag.slice(0,f[u].tag.length)===f[u].tag){g=f[u];break}g||tt(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&tt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):tt(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}p(Qe,"composeNode");function Pd(e){var t=e.position,r,i,n,a=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(s=e.input.charCodeAt(e.position))!==0&&(yt(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(a=!0,s=e.input.charCodeAt(++e.position),r=e.position;s!==0&&!Nt(s);)s=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&tt(e,"directive name must not be less than one character in length");s!==0;){for(;Be(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!Qt(s));break}if(Qt(s))break;for(r=e.position;s!==0&&!Nt(s);)s=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}s!==0&&oa(e),Le.call(Hl,i)?Hl[i](e,i,n):xi(e,'unknown document directive "'+i+'"')}if(yt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,yt(e,!0,-1)):a&&tt(e,"directives end mark is expected"),Qe(e,e.lineIndent-1,An,!1,!0),yt(e,!0,-1),e.checkLineBreaks&&Gw.test(e.input.slice(t,e.position))&&xi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ai(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,yt(e,!0,-1));return}if(e.position<e.length-1)tt(e,"end of the stream or a document separator is expected");else return}p(Pd,"readDocument");function Lo(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
100
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new _d(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,tt(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Pd(r);return r.documents}p(Lo,"loadDocuments");function Vw(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Lo(e,r);if(typeof t!="function")return i;for(var n=0,a=i.length;n<a;n+=1)t(i[n])}p(Vw,"loadAll$1");function Rd(e,t){var r=Lo(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new jt("expected a single document in the stream, but found more")}}p(Rd,"load$1");var Zw=Rd,Kw={load:Zw},Dd=Object.prototype.toString,Od=Object.prototype.hasOwnProperty,Mo=65279,Qw=9,bi=10,Jw=13,tv=32,ev=33,rv=34,vs=35,iv=37,nv=38,av=39,sv=42,Nd=44,ov=45,En=58,lv=61,cv=62,hv=63,uv=64,Id=91,zd=93,dv=96,qd=123,fv=124,jd=125,Rt={};Rt[0]="\\0";Rt[7]="\\a";Rt[8]="\\b";Rt[9]="\\t";Rt[10]="\\n";Rt[11]="\\v";Rt[12]="\\f";Rt[13]="\\r";Rt[27]="\\e";Rt[34]='\\"';Rt[92]="\\\\";Rt[133]="\\N";Rt[160]="\\_";Rt[8232]="\\L";Rt[8233]="\\P";var pv=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],gv=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Wd(e,t){var r,i,n,a,s,o,l;if(t===null)return{};for(r={},i=Object.keys(t),n=0,a=i.length;n<a;n+=1)s=i[n],o=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=e.compiledTypeMap.fallback[s],l&&Od.call(l.styleAliases,o)&&(o=l.styleAliases[o]),r[s]=o;return r}p(Wd,"compileStyleMap");function Hd(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new jt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Ct.repeat("0",i-t.length)+t}p(Hd,"encodeHex");var mv=1,wi=2;function Yd(e){this.schema=e.schema||fd,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ct.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Wd(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?wi:mv,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(Yd,"State");function ks(e,t){for(var r=Ct.repeat(" ",t),i=0,n=-1,a="",s,o=e.length;i<o;)n=e.indexOf(`
101
101
  `,i),n===-1?(s=e.slice(i),i=o):(s=e.slice(i,n+1),i=n+1),s.length&&s!==`
102
102
  `&&(a+=r),a+=s;return a}p(ks,"indentString");function Fn(e,t){return`
103
- `+Ct.repeat(" ",e.indent*t)}p(Fn,"generateNextLine");function Yd(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}p(Yd,"testImplicitResolving");function vi(e){return e===Kw||e===Vw}p(vi,"isWhitespace");function Ar(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Mo||65536<=e&&e<=1114111}p(Ar,"isPrintable");function Cs(e){return Ar(e)&&e!==Mo&&e!==Zw&&e!==bi}p(Cs,"isNsCharOrWhitespace");function _s(e,t,r){var i=Cs(e),n=i&&!vi(e);return(r?i:i&&e!==Dd&&e!==Nd&&e!==Id&&e!==zd&&e!==qd)&&e!==vs&&!(t===En&&!n)||Cs(t)&&!vi(t)&&e===vs||t===En&&n}p(_s,"isPlainSafe");function Ud(e){return Ar(e)&&e!==Mo&&!vi(e)&&e!==nv&&e!==ov&&e!==En&&e!==Dd&&e!==Nd&&e!==Id&&e!==zd&&e!==qd&&e!==vs&&e!==ev&&e!==iv&&e!==Qw&&e!==hv&&e!==av&&e!==sv&&e!==rv&&e!==Jw&&e!==tv&&e!==lv&&e!==cv}p(Ud,"isPlainSafeFirst");function Gd(e){return!vi(e)&&e!==En}p(Gd,"isPlainSafeLast");function fr(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}p(fr,"codePointAt");function Ao(e){var t=/^\n* /;return t.test(e)}p(Ao,"needIndentIndicator");var Xd=1,Ss=2,Vd=3,Zd=4,cr=5;function Kd(e,t,r,i,n,a,s,o){var l,c=0,h=null,u=!1,d=!1,f=i!==-1,g=-1,m=Ud(fr(e,0))&&Gd(fr(e,e.length-1));if(t||s)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=fr(e,l),!Ar(c))return cr;m=m&&_s(c,h,o),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=fr(e,l),c===bi)u=!0,f&&(d=d||l-g-1>i&&e[g+1]!==" ",g=l);else if(!Ar(c))return cr;m=m&&_s(c,h,o),h=c}d=d||f&&l-g-1>i&&e[g+1]!==" "}return!u&&!d?m&&!s&&!n(e)?Xd:a===wi?cr:Ss:r>9&&Ao(e)?cr:s?a===wi?cr:Ss:d?Zd:Vd}p(Kd,"chooseScalarStyle");function Qd(e,t,r,i,n){e.dump=(function(){if(t.length===0)return e.quotingType===wi?'""':"''";if(!e.noCompatMode&&(uv.indexOf(t)!==-1||dv.test(t)))return e.quotingType===wi?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),o=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return Yd(e,c)}switch(p(l,"testAmbiguity"),Kd(t,o,e.indent,s,l,e.quotingType,e.forceQuotes&&!i,n)){case Xd:return t;case Ss:return"'"+t.replace(/'/g,"''")+"'";case Vd:return"|"+Ts(t,e.indent)+Bs(ks(t,a));case Zd:return">"+Ts(t,e.indent)+Bs(ks(Jd(t,s),a));case cr:return'"'+tf(t)+'"';default:throw new jt("impossible error: invalid scalar style")}})()}p(Qd,"writeScalar");function Ts(e,t){var r=Ao(e)?String(t):"",i=e[e.length-1]===`
103
+ `+Ct.repeat(" ",e.indent*t)}p(Fn,"generateNextLine");function Ud(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}p(Ud,"testImplicitResolving");function vi(e){return e===tv||e===Qw}p(vi,"isWhitespace");function Ar(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Mo||65536<=e&&e<=1114111}p(Ar,"isPrintable");function Cs(e){return Ar(e)&&e!==Mo&&e!==Jw&&e!==bi}p(Cs,"isNsCharOrWhitespace");function _s(e,t,r){var i=Cs(e),n=i&&!vi(e);return(r?i:i&&e!==Nd&&e!==Id&&e!==zd&&e!==qd&&e!==jd)&&e!==vs&&!(t===En&&!n)||Cs(t)&&!vi(t)&&e===vs||t===En&&n}p(_s,"isPlainSafe");function Gd(e){return Ar(e)&&e!==Mo&&!vi(e)&&e!==ov&&e!==hv&&e!==En&&e!==Nd&&e!==Id&&e!==zd&&e!==qd&&e!==jd&&e!==vs&&e!==nv&&e!==sv&&e!==ev&&e!==fv&&e!==lv&&e!==cv&&e!==av&&e!==rv&&e!==iv&&e!==uv&&e!==dv}p(Gd,"isPlainSafeFirst");function Xd(e){return!vi(e)&&e!==En}p(Xd,"isPlainSafeLast");function fr(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}p(fr,"codePointAt");function Ao(e){var t=/^\n* /;return t.test(e)}p(Ao,"needIndentIndicator");var Vd=1,Ss=2,Zd=3,Kd=4,cr=5;function Qd(e,t,r,i,n,a,s,o){var l,c=0,h=null,u=!1,d=!1,f=i!==-1,g=-1,m=Gd(fr(e,0))&&Xd(fr(e,e.length-1));if(t||s)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=fr(e,l),!Ar(c))return cr;m=m&&_s(c,h,o),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=fr(e,l),c===bi)u=!0,f&&(d=d||l-g-1>i&&e[g+1]!==" ",g=l);else if(!Ar(c))return cr;m=m&&_s(c,h,o),h=c}d=d||f&&l-g-1>i&&e[g+1]!==" "}return!u&&!d?m&&!s&&!n(e)?Vd:a===wi?cr:Ss:r>9&&Ao(e)?cr:s?a===wi?cr:Ss:d?Kd:Zd}p(Qd,"chooseScalarStyle");function Jd(e,t,r,i,n){e.dump=(function(){if(t.length===0)return e.quotingType===wi?'""':"''";if(!e.noCompatMode&&(pv.indexOf(t)!==-1||gv.test(t)))return e.quotingType===wi?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),o=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return Ud(e,c)}switch(p(l,"testAmbiguity"),Qd(t,o,e.indent,s,l,e.quotingType,e.forceQuotes&&!i,n)){case Vd:return t;case Ss:return"'"+t.replace(/'/g,"''")+"'";case Zd:return"|"+Ts(t,e.indent)+Bs(ks(t,a));case Kd:return">"+Ts(t,e.indent)+Bs(ks(tf(t,s),a));case cr:return'"'+ef(t)+'"';default:throw new jt("impossible error: invalid scalar style")}})()}p(Jd,"writeScalar");function Ts(e,t){var r=Ao(e)?String(t):"",i=e[e.length-1]===`
104
104
  `,n=i&&(e[e.length-2]===`
105
105
  `||e===`
106
106
  `),a=n?"+":i?"":"-";return r+a+`
107
107
  `}p(Ts,"blockHeader");function Bs(e){return e[e.length-1]===`
108
- `?e.slice(0,-1):e}p(Bs,"dropEndingNewline");function Jd(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(`
108
+ `?e.slice(0,-1):e}p(Bs,"dropEndingNewline");function tf(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(`
109
109
  `);return c=c!==-1?c:e.length,r.lastIndex=c,$s(e.slice(0,c),t)})(),n=e[0]===`
110
110
  `||e[0]===" ",a,s;s=r.exec(e);){var o=s[1],l=s[2];a=l[0]===" ",i+=o+(!n&&!a&&l!==""?`
111
- `:"")+$s(l,t),n=a}return i}p(Jd,"foldString");function $s(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,a,s=0,o=0,l="";i=r.exec(e);)o=i.index,o-n>t&&(a=s>n?s:o,l+=`
111
+ `:"")+$s(l,t),n=a}return i}p(tf,"foldString");function $s(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,a,s=0,o=0,l="";i=r.exec(e);)o=i.index,o-n>t&&(a=s>n?s:o,l+=`
112
112
  `+e.slice(n,a),n=a+1),s=o;return l+=`
113
113
  `,e.length-n>t&&s>n?l+=e.slice(n,s)+`
114
- `+e.slice(s+1):l+=e.slice(n),l.slice(1)}p($s,"foldLine");function tf(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=fr(e,n),i=Rt[r],!i&&Ar(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||Wd(r);return t}p(tf,"escapeString");function ef(e,t,r){var i="",n=e.tag,a,s,o;for(a=0,s=r.length;a<s;a+=1)o=r[a],e.replacer&&(o=e.replacer.call(r,String(a),o)),(oe(e,t,o,!1,!1)||typeof o>"u"&&oe(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}p(ef,"writeFlowSequence");function Ls(e,t,r,i){var n="",a=e.tag,s,o,l;for(s=0,o=r.length;s<o;s+=1)l=r[s],e.replacer&&(l=e.replacer.call(r,String(s),l)),(oe(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&oe(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=Fn(e,t)),e.dump&&bi===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=a,e.dump=n||"[]"}p(Ls,"writeBlockSequence");function rf(e,t,r){var i="",n=e.tag,a=Object.keys(r),s,o,l,c,h;for(s=0,o=a.length;s<o;s+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=a[s],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),oe(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),oe(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=n,e.dump="{"+i+"}"}p(rf,"writeFlowMapping");function nf(e,t,r,i){var n="",a=e.tag,s=Object.keys(r),o,l,c,h,u,d;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new jt("sortKeys must be a boolean or a function");for(o=0,l=s.length;o<l;o+=1)d="",(!i||n!=="")&&(d+=Fn(e,t)),c=s[o],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),oe(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&bi===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,u&&(d+=Fn(e,t)),oe(e,t+1,h,!0,u)&&(e.dump&&bi===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,n+=d));e.tag=a,e.dump=n||"{}"}p(nf,"writeBlockMapping");function Ms(e,t,r){var i,n,a,s,o,l;for(n=r?e.explicitTypes:e.implicitTypes,a=0,s=n.length;a<s;a+=1)if(o=n[a],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof t=="object"&&t instanceof o.instanceOf)&&(!o.predicate||o.predicate(t))){if(r?o.multi&&o.representName?e.tag=o.representName(t):e.tag=o.tag:e.tag="?",o.represent){if(l=e.styleMap[o.tag]||o.defaultStyle,Rd.call(o.represent)==="[object Function]")i=o.represent(t,l);else if(Od.call(o.represent,l))i=o.represent[l](t,l);else throw new jt("!<"+o.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(Ms,"detectType");function oe(e,t,r,i,n,a,s){e.tag=null,e.dump=r,Ms(e,r,!1)||Ms(e,r,!0);var o=Rd.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=o==="[object Object]"||o==="[object Array]",u,d;if(h&&(u=e.duplicates.indexOf(r),d=u!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(n=!1),d&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&d&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),o==="[object Object]")i&&Object.keys(e.dump).length!==0?(nf(e,t,e.dump,n),d&&(e.dump="&ref_"+u+e.dump)):(rf(e,t,e.dump),d&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?Ls(e,t-1,e.dump,n):Ls(e,t,e.dump,n),d&&(e.dump="&ref_"+u+e.dump)):(ef(e,t,e.dump),d&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&Qd(e,e.dump,t,a,l);else{if(o==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new jt("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}p(oe,"writeNode");function af(e,t){var r=[],i=[],n,a;for(Pn(e,r,i),n=0,a=i.length;n<a;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(a)}p(af,"getDuplicateReferences");function Pn(e,t,r){var i,n,a;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,a=e.length;n<a;n+=1)Pn(e[n],t,r);else for(i=Object.keys(e),n=0,a=i.length;n<a;n+=1)Pn(e[i[n]],t,r)}p(Pn,"inspectNode");function pv(e,t){t=t||{};var r=new Hd(t);r.noRefs||af(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),oe(r,0,i,!0,!0)?r.dump+`
115
- `:""}p(pv,"dump$1");function gv(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}p(gv,"renamed");var sf=Vu,of=Xw.load;var Et={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},Hl={arrow_point:9,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=gt(e),t=gt(t);const[r,i]=[e.x,e.y],[n,a]=[t.x,t.y],s=n-r,o=a-i;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}p(ii,"calculateDeltaAndAngle");var gt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),lf=p(e=>({x:p(function(t,r,i){let n=0;const a=gt(i[0]).x<gt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Et,e.arrowTypeStart)){const{angle:f,deltaX:g}=ii(i[0],i[1]);n=Et[e.arrowTypeStart]*Math.cos(f)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Et,e.arrowTypeEnd)){const{angle:f,deltaX:g}=ii(i[i.length-1],i[i.length-2]);n=Et[e.arrowTypeEnd]*Math.cos(f)*(g>=0?1:-1)}const s=Math.abs(gt(t).x-gt(i[i.length-1]).x),o=Math.abs(gt(t).y-gt(i[i.length-1]).y),l=Math.abs(gt(t).x-gt(i[0]).x),c=Math.abs(gt(t).y-gt(i[0]).y),h=Et[e.arrowTypeStart],u=Et[e.arrowTypeEnd],d=1;if(s<u&&s>0&&o<u){let f=u+d-s;f*=a==="right"?-1:1,n-=f}if(l<h&&l>0&&c<h){let f=h+d-l;f*=a==="right"?-1:1,n+=f}return gt(t).x+n},"x"),y:p(function(t,r,i){let n=0;const a=gt(i[0]).y<gt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Et,e.arrowTypeStart)){const{angle:f,deltaY:g}=ii(i[0],i[1]);n=Et[e.arrowTypeStart]*Math.abs(Math.sin(f))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Et,e.arrowTypeEnd)){const{angle:f,deltaY:g}=ii(i[i.length-1],i[i.length-2]);n=Et[e.arrowTypeEnd]*Math.abs(Math.sin(f))*(g>=0?1:-1)}const s=Math.abs(gt(t).y-gt(i[i.length-1]).y),o=Math.abs(gt(t).x-gt(i[i.length-1]).x),l=Math.abs(gt(t).y-gt(i[0]).y),c=Math.abs(gt(t).x-gt(i[0]).x),h=Et[e.arrowTypeStart],u=Et[e.arrowTypeEnd],d=1;if(s<u&&s>0&&o<u){let f=u+d-s;f*=a==="up"?-1:1,n-=f}if(l<h&&l>0&&c<h){let f=h+d-l;f*=a==="up"?-1:1,n+=f}return gt(t).y+n},"y")}),"getLineFunctionsWithOffset"),ca=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"),mv=p(e=>{const{handDrawnSeed:t}=ut();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Dr=p(e=>{const t=yv([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),yv=p(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n?.trim())}),t},"styles2Map"),Eo=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"),V=p(e=>{const{stylesArray:t}=Dr(e),r=[],i=[],n=[],a=[];return t.forEach(s=>{const o=s[0];Eo(o)?r.push(s.join(":")+" !important"):(i.push(s.join(":")+" !important"),o.includes("stroke")&&n.push(s.join(":")+" !important"),o==="fill"&&a.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:a}},"styles2String"),K=p((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=ut(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:s}=Dr(e);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||n,seed:i,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:xv(s.get("stroke-dasharray"))},t)},"userNodeOverrides"),xv=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const n=isNaN(t[0])?0:t[0];return[n,n]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),Ur={},vt={},Yl;function bv(){return Yl||(Yl=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.BLANK_URL=vt.relativeFirstCharacters=vt.whitespaceEscapeCharsRegex=vt.urlSchemeRegex=vt.ctrlCharactersRegex=vt.htmlCtrlEntityRegex=vt.htmlEntitiesRegex=vt.invalidProtocolRegex=void 0,vt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,vt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,vt.htmlCtrlEntityRegex=/&(newline|tab);/gi,vt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,vt.urlSchemeRegex=/^.+(:|&colon;)/gim,vt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,vt.relativeFirstCharacters=[".","/"],vt.BLANK_URL="about:blank"),vt}var Ul;function wv(){if(Ul)return Ur;Ul=1,Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.sanitizeUrl=void 0;var e=bv();function t(s){return e.relativeFirstCharacters.indexOf(s[0])>-1}function r(s){var o=s.replace(e.ctrlCharactersRegex,"");return o.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(s){return URL.canParse(s)}function n(s){try{return decodeURIComponent(s)}catch{return s}}function a(s){if(!s)return e.BLANK_URL;var o,l=n(s.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=n(l),o=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(o&&o.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var d=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(d))return e.BLANK_URL;var f=h.replace(/\\/g,"/");if(d==="mailto:"||d.includes("://"))return f;if(d==="http:"||d==="https:"){if(!i(f))return e.BLANK_URL;var g=new URL(f);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return f}return Ur.sanitizeUrl=a,Ur}var cf=wv(),hf=typeof global=="object"&&global&&global.Object===Object&&global,vv=typeof self=="object"&&self&&self.Object===Object&&self,he=hf||vv||Function("return this")(),ki=he.Symbol,uf=Object.prototype,kv=uf.hasOwnProperty,Cv=uf.toString,Gr=ki?ki.toStringTag:void 0;function _v(e){var t=kv.call(e,Gr),r=e[Gr];try{e[Gr]=void 0;var i=!0}catch{}var n=Cv.call(e);return i&&(t?e[Gr]=r:delete e[Gr]),n}var Sv=Object.prototype,Tv=Sv.toString;function Bv(e){return Tv.call(e)}var $v="[object Null]",Lv="[object Undefined]",Gl=ki?ki.toStringTag:void 0;function ir(e){return e==null?e===void 0?Lv:$v:Gl&&Gl in Object(e)?_v(e):Bv(e)}function Ee(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Mv="[object AsyncFunction]",Av="[object Function]",Ev="[object GeneratorFunction]",Fv="[object Proxy]";function ha(e){if(!Ee(e))return!1;var t=ir(e);return t==Av||t==Ev||t==Mv||t==Fv}var Ia=he["__core-js_shared__"],Xl=(function(){var e=/[^.]+$/.exec(Ia&&Ia.keys&&Ia.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Pv(e){return!!Xl&&Xl in e}var Rv=Function.prototype,Ov=Rv.toString;function nr(e){if(e!=null){try{return Ov.call(e)}catch{}try{return e+""}catch{}}return""}var Dv=/[\\^$.*+?()[\]{}|]/g,Nv=/^\[object .+?Constructor\]$/,Iv=Function.prototype,zv=Object.prototype,qv=Iv.toString,jv=zv.hasOwnProperty,Wv=RegExp("^"+qv.call(jv).replace(Dv,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Hv(e){if(!Ee(e)||Pv(e))return!1;var t=ha(e)?Wv:Nv;return t.test(nr(e))}function Yv(e,t){return e?.[t]}function ar(e,t){var r=Yv(e,t);return Hv(r)?r:void 0}var Ci=ar(Object,"create");function Uv(){this.__data__=Ci?Ci(null):{},this.size=0}function Gv(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Xv="__lodash_hash_undefined__",Vv=Object.prototype,Zv=Vv.hasOwnProperty;function Kv(e){var t=this.__data__;if(Ci){var r=t[e];return r===Xv?void 0:r}return Zv.call(t,e)?t[e]:void 0}var Qv=Object.prototype,Jv=Qv.hasOwnProperty;function tk(e){var t=this.__data__;return Ci?t[e]!==void 0:Jv.call(t,e)}var ek="__lodash_hash_undefined__";function rk(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ci&&t===void 0?ek:t,this}function Je(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Je.prototype.clear=Uv;Je.prototype.delete=Gv;Je.prototype.get=Kv;Je.prototype.has=tk;Je.prototype.set=rk;function ik(){this.__data__=[],this.size=0}function Ei(e,t){return e===t||e!==e&&t!==t}function ua(e,t){for(var r=e.length;r--;)if(Ei(e[r][0],t))return r;return-1}var nk=Array.prototype,ak=nk.splice;function sk(e){var t=this.__data__,r=ua(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():ak.call(t,r,1),--this.size,!0}function ok(e){var t=this.__data__,r=ua(t,e);return r<0?void 0:t[r][1]}function lk(e){return ua(this.__data__,e)>-1}function ck(e,t){var r=this.__data__,i=ua(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function ve(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}ve.prototype.clear=ik;ve.prototype.delete=sk;ve.prototype.get=ok;ve.prototype.has=lk;ve.prototype.set=ck;var _i=ar(he,"Map");function hk(){this.size=0,this.__data__={hash:new Je,map:new(_i||ve),string:new Je}}function uk(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function da(e,t){var r=e.__data__;return uk(t)?r[typeof t=="string"?"string":"hash"]:r.map}function dk(e){var t=da(this,e).delete(e);return this.size-=t?1:0,t}function fk(e){return da(this,e).get(e)}function pk(e){return da(this,e).has(e)}function gk(e,t){var r=da(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function ke(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}ke.prototype.clear=hk;ke.prototype.delete=dk;ke.prototype.get=fk;ke.prototype.has=pk;ke.prototype.set=gk;var mk="Expected a function";function Nr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(mk);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],a=r.cache;if(a.has(n))return a.get(n);var s=e.apply(this,i);return r.cache=a.set(n,s)||a,s};return r.cache=new(Nr.Cache||ke),r}Nr.Cache=ke;function yk(){this.__data__=new ve,this.size=0}function xk(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function bk(e){return this.__data__.get(e)}function wk(e){return this.__data__.has(e)}var vk=200;function kk(e,t){var r=this.__data__;if(r instanceof ve){var i=r.__data__;if(!_i||i.length<vk-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new ke(i)}return r.set(e,t),this.size=r.size,this}function sr(e){var t=this.__data__=new ve(e);this.size=t.size}sr.prototype.clear=yk;sr.prototype.delete=xk;sr.prototype.get=bk;sr.prototype.has=wk;sr.prototype.set=kk;var Rn=(function(){try{var e=ar(Object,"defineProperty");return e({},"",{}),e}catch{}})();function fa(e,t,r){t=="__proto__"&&Rn?Rn(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function As(e,t,r){(r!==void 0&&!Ei(e[t],r)||r===void 0&&!(t in e))&&fa(e,t,r)}function Ck(e){return function(t,r,i){for(var n=-1,a=Object(t),s=i(t),o=s.length;o--;){var l=s[++n];if(r(a[l],l,a)===!1)break}return t}}var df=Ck(),ff=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vl=ff&&typeof module=="object"&&module&&!module.nodeType&&module,_k=Vl&&Vl.exports===ff,Zl=_k?he.Buffer:void 0,Kl=Zl?Zl.allocUnsafe:void 0;function pf(e,t){if(t)return e.slice();var r=e.length,i=Kl?Kl(r):new e.constructor(r);return e.copy(i),i}var Es=he.Uint8Array;function gf(e){var t=new e.constructor(e.byteLength);return new Es(t).set(new Es(e)),t}function mf(e,t){var r=t?gf(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function yf(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var Ql=Object.create,Sk=(function(){function e(){}return function(t){if(!Ee(t))return{};if(Ql)return Ql(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function xf(e,t){return function(r){return e(t(r))}}var Fo=xf(Object.getPrototypeOf,Object),Tk=Object.prototype;function Fi(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Tk;return e===r}function bf(e){return typeof e.constructor=="function"&&!Fi(e)?Sk(Fo(e)):{}}function Ir(e){return e!=null&&typeof e=="object"}var Bk="[object Arguments]";function Jl(e){return Ir(e)&&ir(e)==Bk}var wf=Object.prototype,$k=wf.hasOwnProperty,Lk=wf.propertyIsEnumerable,Si=Jl((function(){return arguments})())?Jl:function(e){return Ir(e)&&$k.call(e,"callee")&&!Lk.call(e,"callee")},Ti=Array.isArray,Mk=9007199254740991;function Po(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Mk}function Pi(e){return e!=null&&Po(e.length)&&!ha(e)}function vf(e){return Ir(e)&&Pi(e)}function Ak(){return!1}var kf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,tc=kf&&typeof module=="object"&&module&&!module.nodeType&&module,Ek=tc&&tc.exports===kf,ec=Ek?he.Buffer:void 0,Fk=ec?ec.isBuffer:void 0,pa=Fk||Ak,Pk="[object Object]",Rk=Function.prototype,Ok=Object.prototype,Cf=Rk.toString,Dk=Ok.hasOwnProperty,Nk=Cf.call(Object);function Ik(e){if(!Ir(e)||ir(e)!=Pk)return!1;var t=Fo(e);if(t===null)return!0;var r=Dk.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Cf.call(r)==Nk}var zk="[object Arguments]",qk="[object Array]",jk="[object Boolean]",Wk="[object Date]",Hk="[object Error]",Yk="[object Function]",Uk="[object Map]",Gk="[object Number]",Xk="[object Object]",Vk="[object RegExp]",Zk="[object Set]",Kk="[object String]",Qk="[object WeakMap]",Jk="[object ArrayBuffer]",tC="[object DataView]",eC="[object Float32Array]",rC="[object Float64Array]",iC="[object Int8Array]",nC="[object Int16Array]",aC="[object Int32Array]",sC="[object Uint8Array]",oC="[object Uint8ClampedArray]",lC="[object Uint16Array]",cC="[object Uint32Array]",pt={};pt[eC]=pt[rC]=pt[iC]=pt[nC]=pt[aC]=pt[sC]=pt[oC]=pt[lC]=pt[cC]=!0;pt[zk]=pt[qk]=pt[Jk]=pt[jk]=pt[tC]=pt[Wk]=pt[Hk]=pt[Yk]=pt[Uk]=pt[Gk]=pt[Xk]=pt[Vk]=pt[Zk]=pt[Kk]=pt[Qk]=!1;function hC(e){return Ir(e)&&Po(e.length)&&!!pt[ir(e)]}function _f(e){return function(t){return e(t)}}var Sf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,di=Sf&&typeof module=="object"&&module&&!module.nodeType&&module,uC=di&&di.exports===Sf,za=uC&&hf.process,Fs=(function(){try{var e=di&&di.require&&di.require("util").types;return e||za&&za.binding&&za.binding("util")}catch{}})(),rc=Fs&&Fs.isTypedArray,ga=rc?_f(rc):hC;function Ps(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var dC=Object.prototype,fC=dC.hasOwnProperty;function Tf(e,t,r){var i=e[t];(!(fC.call(e,t)&&Ei(i,r))||r===void 0&&!(t in e))&&fa(e,t,r)}function Bf(e,t,r,i){var n=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var o=t[a],l=void 0;l===void 0&&(l=e[o]),n?fa(r,o,l):Tf(r,o,l)}return r}function pC(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var gC=9007199254740991,mC=/^(?:0|[1-9]\d*)$/;function Ro(e,t){var r=typeof e;return t=t??gC,!!t&&(r=="number"||r!="symbol"&&mC.test(e))&&e>-1&&e%1==0&&e<t}var yC=Object.prototype,xC=yC.hasOwnProperty;function $f(e,t){var r=Ti(e),i=!r&&Si(e),n=!r&&!i&&pa(e),a=!r&&!i&&!n&&ga(e),s=r||i||n||a,o=s?pC(e.length,String):[],l=o.length;for(var c in e)(t||xC.call(e,c))&&!(s&&(c=="length"||n&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Ro(c,l)))&&o.push(c);return o}function bC(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var wC=Object.prototype,vC=wC.hasOwnProperty;function kC(e){if(!Ee(e))return bC(e);var t=Fi(e),r=[];for(var i in e)i=="constructor"&&(t||!vC.call(e,i))||r.push(i);return r}function Oo(e){return Pi(e)?$f(e,!0):kC(e)}function CC(e){return Bf(e,Oo(e))}function _C(e,t,r,i,n,a,s){var o=Ps(e,r),l=Ps(t,r),c=s.get(l);if(c){As(e,r,c);return}var h=a?a(o,l,r+"",e,t,s):void 0,u=h===void 0;if(u){var d=Ti(l),f=!d&&pa(l),g=!d&&!f&&ga(l);h=l,d||f||g?Ti(o)?h=o:vf(o)?h=yf(o):f?(u=!1,h=pf(l,!0)):g?(u=!1,h=mf(l,!0)):h=[]:Ik(l)||Si(l)?(h=o,Si(o)?h=CC(o):(!Ee(o)||ha(o))&&(h=bf(l))):u=!1}u&&(s.set(l,h),n(h,l,i,a,s),s.delete(l)),As(e,r,h)}function Lf(e,t,r,i,n){e!==t&&df(t,function(a,s){if(n||(n=new sr),Ee(a))_C(e,t,s,r,Lf,i,n);else{var o=i?i(Ps(e,s),a,s+"",e,t,n):void 0;o===void 0&&(o=a),As(e,s,o)}},Oo)}function Do(e){return e}function SC(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var ic=Math.max;function Mf(e,t,r){return t=ic(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,a=ic(i.length-t,0),s=Array(a);++n<a;)s[n]=i[t+n];n=-1;for(var o=Array(t+1);++n<t;)o[n]=i[n];return o[t]=r(s),SC(e,this,o)}}function Af(e){return function(){return e}}var TC=Rn?function(e,t){return Rn(e,"toString",{configurable:!0,enumerable:!1,value:Af(t),writable:!0})}:Do,BC=800,$C=16,LC=Date.now;function MC(e){var t=0,r=0;return function(){var i=LC(),n=$C-(i-r);if(r=i,n>0){if(++t>=BC)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Ef=MC(TC);function Ff(e,t){return Ef(Mf(e,t,Do),e+"")}function Pf(e,t,r){if(!Ee(r))return!1;var i=typeof t;return(i=="number"?Pi(r)&&Ro(t,r.length):i=="string"&&t in r)?Ei(r[t],e):!1}function Rf(e){return Ff(function(t,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,s=n>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(n--,a):void 0,s&&Pf(r[0],r[1],s)&&(a=n<3?void 0:a,n=1),t=Object(t);++i<n;){var o=r[i];o&&e(t,o,i,a)}return t})}var Of=Rf(function(e,t,r){Lf(e,t,r)}),Df="​",AC={curveBasis:ui,curveBasisClosed:iw,curveBasisOpen:nw,curveBumpX:iu,curveBumpY:nu,curveBundle:aw,curveCardinalClosed:sw,curveCardinalOpen:ow,curveCardinal:lu,curveCatmullRomClosed:lw,curveCatmullRomOpen:cw,curveCatmullRom:hu,curveLinear:Sn,curveLinearClosed:hw,curveMonotoneX:mu,curveMonotoneY:yu,curveNatural:bu,curveStep:wu,curveStepAfter:ku,curveStepBefore:vu},EC=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,FC=p(function(e,t){const r=Nf(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const s=r.map(o=>o.args);pn(s),i=bt(i,[...s])}else i=r.args;if(!i)return;let n=no(e,t);const a="config";return i[a]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[a],delete i[a]),i},"detectInit"),Nf=p(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${EC.source})(?=[}][%]{2}).*
116
- `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),I.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const n=[];for(;(i=ci.exec(e))!==null;)if(i.index===ci.lastIndex&&ci.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const a=i[1]?i[1]:i[2],s=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;n.push({type:a,args:s})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(r){return I.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),PC=p(function(e){return e.replace(ci,"")},"removeDirectives"),RC=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function No(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return AC[r]??t}p(No,"interpolateToCurve");function If(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?cf.sanitizeUrl(r):r}p(If,"formatUrl");var OC=p((e,...t)=>{const r=e.split("."),i=r.length-1,n=r[i];let a=window;for(let s=0;s<i;s++)if(a=a[r[s]],!a){I.error(`Function name: ${e} not found in window`);return}a[n](...t)},"runFunc");function Io(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(Io,"distance");function zf(e){let t,r=0;e.forEach(n=>{r+=Io(n,t),t=n});const i=r/2;return zo(e,i)}p(zf,"traverseEdge");function qf(e){return e.length===1?e[0]:zf(e)}p(qf,"calcLabelPosition");var nc=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),zo=p((e,t)=>{let r,i=t;for(const n of e){if(r){const a=Io(n,r);if(a===0)return r;if(a<i)i-=a;else{const s=i/a;if(s<=0)return r;if(s>=1)return{x:n.x,y:n.y};if(s>0&&s<1)return{x:nc((1-s)*r.x+s*n.x,5),y:nc((1-s)*r.y+s*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),DC=p((e,t,r)=>{I.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=zo(t,25),a=e?10:5,s=Math.atan2(t[0].y-n.y,t[0].x-n.x),o={x:0,y:0};return o.x=Math.sin(s)*a+(t[0].x+n.x)/2,o.y=-Math.cos(s)*a+(t[0].y+n.y)/2,o},"calcCardinalityPosition");function jf(e,t,r){const i=structuredClone(r);I.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,a=zo(i,n),s=10+e*.5,o=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(o+Math.PI)*s+(i[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*s+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(o-Math.PI)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*s+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(o)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(o)*s+(i[0].y+a.y)/2-5):(l.x=Math.sin(o)*s+(i[0].x+a.x)/2,l.y=-Math.cos(o)*s+(i[0].y+a.y)/2),l}p(jf,"calcTerminalLabelPosition");function qo(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(qo,"getStylesFromArray");var ac=0,Wf=p(()=>(ac++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ac),"generateId");function Hf(e){let t="";const r="0123456789abcdef",i=r.length;for(let n=0;n<e;n++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(Hf,"makeRandomHex");var Yf=p(e=>Hf(e.length),"random"),NC=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"),IC=p(function(e,t){const r=t.text.replace(rr.lineBreakRegex," "),[,i]=Ri(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);const a=n.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),n},"drawSimpleText"),Uf=Nr((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),rr.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let a="";return i.forEach((s,o)=>{const l=le(`${s} `,r),c=le(a,r);if(l>t){const{hyphenatedStrings:d,remainingWord:f}=zC(s,t,"-",r);n.push(a,...d),a=f}else c+l>=t?(n.push(a),a=s):a=[a,s].filter(Boolean).join(" ");o+1===i.length&&n.push(a)}),n.filter(s=>s!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),zC=Nr((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...e],a=[];let s="";return n.forEach((o,l)=>{const c=`${s}${o}`;if(le(c,i)>=t){const u=l+1,d=n.length===u,f=`${c}${r}`;a.push(d?c:f),s=""}else s=c}),{hyphenatedStrings:a,remainingWord:s}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function jo(e,t){return Wo(e,t).height}p(jo,"calculateTextHeight");function le(e,t){return Wo(e,t).width}p(le,"calculateTextWidth");var Wo=Nr((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,a]=Ri(r),s=["sans-serif",i],o=e.split(rr.lineBreakRegex),l=[],c=lt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const d of s){let f=0;const g={width:0,height:0,lineHeight:0};for(const m of o){const y=NC();y.text=m||Df;const x=IC(h,y).style("font-size",a).style("font-weight",n).style("font-family",d),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),f=Math.round(b.height),g.height+=f,g.lineHeight=Math.round(Math.max(g.lineHeight,f))}l.push(g)}h.remove();const u=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[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Sr,qC=(Sr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(Sr,"InitIDGenerator"),Sr),Yi,jC=p(function(e){return Yi=Yi||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Yi.innerHTML=e,unescape(Yi.textContent)},"entityDecode");function Ho(e){return"str"in e}p(Ho,"isDetailedError");var WC=p((e,t,r,i)=>{if(!i)return;const n=e.node()?.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Ri=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 ma(e,t){return Of({},e,t)}p(ma,"cleanAndMerge");var Gt={assignWithDepth:bt,wrapLabel:Uf,calculateTextHeight:jo,calculateTextWidth:le,calculateTextDimensions:Wo,cleanAndMerge:ma,detectInit:FC,detectDirective:Nf,isSubstringInArray:RC,interpolateToCurve:No,calcLabelPosition:qf,calcCardinalityPosition:DC,calcTerminalLabelPosition:jf,formatUrl:If,getStylesFromArray:qo,generateId:Wf,random:Yf,runFunc:OC,entityDecode:jC,insertTitle:WC,isLabelCoordinateInPath:Gf,parseFontSize:Ri,InitIDGenerator:qC},HC=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"),Fe=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),YC=p((e,t,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function Pt(e){return e??null}p(Pt,"handleUndefinedAttr");function Gf(e,t){const r=Math.round(e.x),i=Math.round(e.y),n=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return n.includes(r.toString())||n.includes(i.toString())}p(Gf,"isLabelCoordinateInPath");const UC=Object.freeze({left:0,top:0,width:16,height:16}),On=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Xf=Object.freeze({...UC,...On}),GC=Object.freeze({...Xf,body:"",hidden:!1}),XC=Object.freeze({width:null,height:null}),VC=Object.freeze({...XC,...On}),ZC=(e,t,r,i="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const o=n.pop(),l=n.pop(),c={provider:n.length>0?n[0]:i,prefix:l,name:o};return qa(c)?c:null}const a=n[0],s=a.split("-");if(s.length>1){const o={provider:i,prefix:s.shift(),name:s.join("-")};return qa(o)?o:null}if(r&&i===""){const o={provider:i,prefix:"",name:a};return qa(o,r)?o:null}return null},qa=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function KC(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function sc(e,t){const r=KC(e,t);for(const i in GC)i in On?i in e&&!(i in r)&&(r[i]=On[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function QC(e,t){const r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function a(s){if(r[s])return n[s]=[];if(!(s in n)){n[s]=null;const o=i[s]&&i[s].parent,l=o&&a(o);l&&(n[s]=[o].concat(l))}return n[s]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),n}function oc(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let a={};function s(o){a=sc(i[o]||n[o],a)}return s(t),r.forEach(s),sc(e,a)}function JC(e,t){if(e.icons[t])return oc(e,t,[]);const r=QC(e,[t])[t];return r?oc(e,t,r):null}const t_=/(-?[0-9.]*[0-9]+[0-9.]*)/g,e_=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function lc(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(t_);if(i===null||!i.length)return e;const n=[];let a=i.shift(),s=e_.test(a);for(;;){if(s){const o=parseFloat(a);isNaN(o)?n.push(a):n.push(Math.ceil(o*t*r)/r)}else n.push(a);if(a=i.shift(),a===void 0)return n.join("");s=!s}}function r_(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),a=e.indexOf("</"+t);if(n===-1||a===-1)break;const s=e.indexOf(">",a);if(s===-1)break;r+=e.slice(n+1,a).trim(),e=e.slice(0,i).trim()+e.slice(s+1)}return{defs:r,content:e}}function i_(e,t){return e?"<defs>"+e+"</defs>"+t:t}function n_(e,t,r){const i=r_(e);return i_(i.defs,t+i.content+r)}const a_=e=>e==="unset"||e==="undefined"||e==="none";function s_(e,t){const r={...Xf,...e},i={...VC,...t},n={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let w=m.rotate;x?b?w+=2:(y.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),y.push("scale(-1 1)"),n.top=n.left=0):b&&(y.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),y.push("scale(1 -1)"),n.top=n.left=0);let C;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:C=n.height/2+n.top,y.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:y.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:C=n.width/2+n.left,y.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}w%2===1&&(n.left!==n.top&&(C=n.left,n.left=n.top,n.top=C),n.width!==n.height&&(C=n.width,n.width=n.height,n.height=C)),y.length&&(a=n_(a,'<g transform="'+y.join(" ")+'">',"</g>"))});const s=i.width,o=i.height,l=n.width,c=n.height;let h,u;s===null?(u=o===null?"1em":o==="auto"?c:o,h=lc(u,l/c)):(h=s==="auto"?l:s,u=o===null?lc(h,c/l):o==="auto"?c:o);const d={},f=(m,y)=>{a_(y)||(d[m]=y.toString())};f("width",h),f("height",u);const g=[n.left,n.top,l,c];return d.viewBox=g.join(" "),{attributes:d,viewBox:g,body:a}}const o_=/\sid="(\S+)"/g,cc=new Map;function l_(e){e=e.replace(/[0-9]+$/,"")||"a";const t=cc.get(e)||0;return cc.set(e,t+1),t?`${e}${t}`:e}function c_(e){const t=[];let r;for(;r=o_.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(n=>{const a=l_(n),s=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function h_(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function Yo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var or=Yo();function Vf(e){or=e}var fi={exec:()=>null};function ht(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(n,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(It.caret,"$1"),r=r.replace(n,s),i},getRegex:()=>new RegExp(r,t)};return i}var u_=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),It={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")},d_=/^(?:[ \t]*(?:\n|$))+/,f_=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,p_=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Oi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,g_=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Uo=/(?:[*+-]|\d{1,9}[.)])/,Zf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Kf=ht(Zf).replace(/bull/g,Uo).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(),m_=ht(Zf).replace(/bull/g,Uo).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(),Go=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,y_=/^[^\n]+/,Xo=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,x_=ht(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Xo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),b_=ht(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Uo).getRegex(),ya="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",Vo=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,w_=ht("^ {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",Vo).replace("tag",ya).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Qf=ht(Go).replace("hr",Oi).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",ya).getRegex(),v_=ht(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Qf).getRegex(),Zo={blockquote:v_,code:f_,def:x_,fences:p_,heading:g_,hr:Oi,html:w_,lheading:Kf,list:b_,newline:d_,paragraph:Qf,table:fi,text:y_},hc=ht("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Oi).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",ya).getRegex(),k_={...Zo,lheading:m_,table:hc,paragraph:ht(Go).replace("hr",Oi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",hc).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",ya).getRegex()},C_={...Zo,html:ht(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Vo).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:fi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ht(Go).replace("hr",Oi).replace("heading",` *#{1,6} *[^
117
- ]`).replace("lheading",Kf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},__=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,S_=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Jf=/^( {2,}|\\)\n(?!\s*$)/,T_=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,xa=/[\p{P}\p{S}]/u,Ko=/[\s\p{P}\p{S}]/u,tp=/[^\s\p{P}\p{S}]/u,B_=ht(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ko).getRegex(),ep=/(?!~)[\p{P}\p{S}]/u,$_=/(?!~)[\s\p{P}\p{S}]/u,L_=/(?:[^\s\p{P}\p{S}]|~)/u,M_=ht(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",u_?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),rp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,A_=ht(rp,"u").replace(/punct/g,xa).getRegex(),E_=ht(rp,"u").replace(/punct/g,ep).getRegex(),ip="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",F_=ht(ip,"gu").replace(/notPunctSpace/g,tp).replace(/punctSpace/g,Ko).replace(/punct/g,xa).getRegex(),P_=ht(ip,"gu").replace(/notPunctSpace/g,L_).replace(/punctSpace/g,$_).replace(/punct/g,ep).getRegex(),R_=ht("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,tp).replace(/punctSpace/g,Ko).replace(/punct/g,xa).getRegex(),O_=ht(/\\(punct)/,"gu").replace(/punct/g,xa).getRegex(),D_=ht(/^<(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(),N_=ht(Vo).replace("(?:-->|$)","-->").getRegex(),I_=ht("^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",N_).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Dn=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,z_=ht(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Dn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),np=ht(/^!?\[(label)\]\[(ref)\]/).replace("label",Dn).replace("ref",Xo).getRegex(),ap=ht(/^!?\[(ref)\](?:\[\])?/).replace("ref",Xo).getRegex(),q_=ht("reflink|nolink(?!\\()","g").replace("reflink",np).replace("nolink",ap).getRegex(),uc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Qo={_backpedal:fi,anyPunctuation:O_,autolink:D_,blockSkip:M_,br:Jf,code:S_,del:fi,emStrongLDelim:A_,emStrongRDelimAst:F_,emStrongRDelimUnd:R_,escape:__,link:z_,nolink:ap,punctuation:B_,reflink:np,reflinkSearch:q_,tag:I_,text:T_,url:fi},j_={...Qo,link:ht(/^!?\[(label)\]\((.*?)\)/).replace("label",Dn).getRegex(),reflink:ht(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Dn).getRegex()},Rs={...Qo,emStrongRDelimAst:P_,emStrongLDelim:E_,url:ht(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",uc).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:ht(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",uc).getRegex()},W_={...Rs,br:ht(Jf).replace("{2,}","*").getRegex(),text:ht(Rs.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ui={normal:Zo,gfm:k_,pedantic:C_},Xr={normal:Qo,gfm:Rs,breaks:W_,pedantic:j_},H_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},dc=e=>H_[e];function ie(e,t){if(t){if(It.escapeTest.test(e))return e.replace(It.escapeReplace,dc)}else if(It.escapeTestNoEncode.test(e))return e.replace(It.escapeReplaceNoEncode,dc);return e}function fc(e){try{e=encodeURI(e).replace(It.percentDecode,"%")}catch{return null}return e}function pc(e,t){let r=e.replace(It.findPipe,(a,s,o)=>{let l=!1,c=s;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(It.splitPipe),n=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(;n<i.length;n++)i[n]=i[n].trim().replace(It.slashPipe,"|");return i}function Vr(e,t,r){let i=e.length;if(i===0)return"";let n=0;for(;n<i&&e.charAt(i-n-1)===t;)n++;return e.slice(0,i-n)}function Y_(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 gc(e,t,r,i,n){let a=t.href,s=t.title||null,o=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:s,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,l}function U_(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let n=i[1];return t.split(`
114
+ `+e.slice(s+1):l+=e.slice(n),l.slice(1)}p($s,"foldLine");function ef(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=fr(e,n),i=Rt[r],!i&&Ar(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||Hd(r);return t}p(ef,"escapeString");function rf(e,t,r){var i="",n=e.tag,a,s,o;for(a=0,s=r.length;a<s;a+=1)o=r[a],e.replacer&&(o=e.replacer.call(r,String(a),o)),(oe(e,t,o,!1,!1)||typeof o>"u"&&oe(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}p(rf,"writeFlowSequence");function Ls(e,t,r,i){var n="",a=e.tag,s,o,l;for(s=0,o=r.length;s<o;s+=1)l=r[s],e.replacer&&(l=e.replacer.call(r,String(s),l)),(oe(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&oe(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=Fn(e,t)),e.dump&&bi===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=a,e.dump=n||"[]"}p(Ls,"writeBlockSequence");function nf(e,t,r){var i="",n=e.tag,a=Object.keys(r),s,o,l,c,h;for(s=0,o=a.length;s<o;s+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=a[s],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),oe(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),oe(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=n,e.dump="{"+i+"}"}p(nf,"writeFlowMapping");function af(e,t,r,i){var n="",a=e.tag,s=Object.keys(r),o,l,c,h,u,d;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new jt("sortKeys must be a boolean or a function");for(o=0,l=s.length;o<l;o+=1)d="",(!i||n!=="")&&(d+=Fn(e,t)),c=s[o],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),oe(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&bi===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,u&&(d+=Fn(e,t)),oe(e,t+1,h,!0,u)&&(e.dump&&bi===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,n+=d));e.tag=a,e.dump=n||"{}"}p(af,"writeBlockMapping");function Ms(e,t,r){var i,n,a,s,o,l;for(n=r?e.explicitTypes:e.implicitTypes,a=0,s=n.length;a<s;a+=1)if(o=n[a],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof t=="object"&&t instanceof o.instanceOf)&&(!o.predicate||o.predicate(t))){if(r?o.multi&&o.representName?e.tag=o.representName(t):e.tag=o.tag:e.tag="?",o.represent){if(l=e.styleMap[o.tag]||o.defaultStyle,Dd.call(o.represent)==="[object Function]")i=o.represent(t,l);else if(Od.call(o.represent,l))i=o.represent[l](t,l);else throw new jt("!<"+o.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(Ms,"detectType");function oe(e,t,r,i,n,a,s){e.tag=null,e.dump=r,Ms(e,r,!1)||Ms(e,r,!0);var o=Dd.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=o==="[object Object]"||o==="[object Array]",u,d;if(h&&(u=e.duplicates.indexOf(r),d=u!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(n=!1),d&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&d&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),o==="[object Object]")i&&Object.keys(e.dump).length!==0?(af(e,t,e.dump,n),d&&(e.dump="&ref_"+u+e.dump)):(nf(e,t,e.dump),d&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?Ls(e,t-1,e.dump,n):Ls(e,t,e.dump,n),d&&(e.dump="&ref_"+u+e.dump)):(rf(e,t,e.dump),d&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&Jd(e,e.dump,t,a,l);else{if(o==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new jt("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}p(oe,"writeNode");function sf(e,t){var r=[],i=[],n,a;for(Pn(e,r,i),n=0,a=i.length;n<a;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(a)}p(sf,"getDuplicateReferences");function Pn(e,t,r){var i,n,a;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,a=e.length;n<a;n+=1)Pn(e[n],t,r);else for(i=Object.keys(e),n=0,a=i.length;n<a;n+=1)Pn(e[i[n]],t,r)}p(Pn,"inspectNode");function yv(e,t){t=t||{};var r=new Yd(t);r.noRefs||sf(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),oe(r,0,i,!0,!0)?r.dump+`
115
+ `:""}p(yv,"dump$1");function xv(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}p(xv,"renamed");var of=Zu,lf=Kw.load;var Et={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},Yl={arrow_point:9,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=gt(e),t=gt(t);const[r,i]=[e.x,e.y],[n,a]=[t.x,t.y],s=n-r,o=a-i;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}p(ii,"calculateDeltaAndAngle");var gt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),cf=p(e=>({x:p(function(t,r,i){let n=0;const a=gt(i[0]).x<gt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Et,e.arrowTypeStart)){const{angle:f,deltaX:g}=ii(i[0],i[1]);n=Et[e.arrowTypeStart]*Math.cos(f)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Et,e.arrowTypeEnd)){const{angle:f,deltaX:g}=ii(i[i.length-1],i[i.length-2]);n=Et[e.arrowTypeEnd]*Math.cos(f)*(g>=0?1:-1)}const s=Math.abs(gt(t).x-gt(i[i.length-1]).x),o=Math.abs(gt(t).y-gt(i[i.length-1]).y),l=Math.abs(gt(t).x-gt(i[0]).x),c=Math.abs(gt(t).y-gt(i[0]).y),h=Et[e.arrowTypeStart],u=Et[e.arrowTypeEnd],d=1;if(s<u&&s>0&&o<u){let f=u+d-s;f*=a==="right"?-1:1,n-=f}if(l<h&&l>0&&c<h){let f=h+d-l;f*=a==="right"?-1:1,n+=f}return gt(t).x+n},"x"),y:p(function(t,r,i){let n=0;const a=gt(i[0]).y<gt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Et,e.arrowTypeStart)){const{angle:f,deltaY:g}=ii(i[0],i[1]);n=Et[e.arrowTypeStart]*Math.abs(Math.sin(f))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Et,e.arrowTypeEnd)){const{angle:f,deltaY:g}=ii(i[i.length-1],i[i.length-2]);n=Et[e.arrowTypeEnd]*Math.abs(Math.sin(f))*(g>=0?1:-1)}const s=Math.abs(gt(t).y-gt(i[i.length-1]).y),o=Math.abs(gt(t).x-gt(i[i.length-1]).x),l=Math.abs(gt(t).y-gt(i[0]).y),c=Math.abs(gt(t).x-gt(i[0]).x),h=Et[e.arrowTypeStart],u=Et[e.arrowTypeEnd],d=1;if(s<u&&s>0&&o<u){let f=u+d-s;f*=a==="up"?-1:1,n-=f}if(l<h&&l>0&&c<h){let f=h+d-l;f*=a==="up"?-1:1,n+=f}return gt(t).y+n},"y")}),"getLineFunctionsWithOffset"),ca=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"),bv=p(e=>{const{handDrawnSeed:t}=ut();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Or=p(e=>{const t=wv([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),wv=p(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n?.trim())}),t},"styles2Map"),Eo=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"),V=p(e=>{const{stylesArray:t}=Or(e),r=[],i=[],n=[],a=[];return t.forEach(s=>{const o=s[0];Eo(o)?r.push(s.join(":")+" !important"):(i.push(s.join(":")+" !important"),o.includes("stroke")&&n.push(s.join(":")+" !important"),o==="fill"&&a.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:a}},"styles2String"),K=p((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=ut(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:s}=Or(e);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||n,seed:i,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:vv(s.get("stroke-dasharray"))},t)},"userNodeOverrides"),vv=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const n=isNaN(t[0])?0:t[0];return[n,n]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),Ur={},vt={},Ul;function kv(){return Ul||(Ul=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.BLANK_URL=vt.relativeFirstCharacters=vt.whitespaceEscapeCharsRegex=vt.urlSchemeRegex=vt.ctrlCharactersRegex=vt.htmlCtrlEntityRegex=vt.htmlEntitiesRegex=vt.invalidProtocolRegex=void 0,vt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,vt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,vt.htmlCtrlEntityRegex=/&(newline|tab);/gi,vt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,vt.urlSchemeRegex=/^.+(:|&colon;)/gim,vt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,vt.relativeFirstCharacters=[".","/"],vt.BLANK_URL="about:blank"),vt}var Gl;function Cv(){if(Gl)return Ur;Gl=1,Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.sanitizeUrl=void 0;var e=kv();function t(s){return e.relativeFirstCharacters.indexOf(s[0])>-1}function r(s){var o=s.replace(e.ctrlCharactersRegex,"");return o.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(s){return URL.canParse(s)}function n(s){try{return decodeURIComponent(s)}catch{return s}}function a(s){if(!s)return e.BLANK_URL;var o,l=n(s.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=n(l),o=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(o&&o.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var d=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(d))return e.BLANK_URL;var f=h.replace(/\\/g,"/");if(d==="mailto:"||d.includes("://"))return f;if(d==="http:"||d==="https:"){if(!i(f))return e.BLANK_URL;var g=new URL(f);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return f}return Ur.sanitizeUrl=a,Ur}var hf=Cv(),uf=typeof global=="object"&&global&&global.Object===Object&&global,_v=typeof self=="object"&&self&&self.Object===Object&&self,he=uf||_v||Function("return this")(),ki=he.Symbol,df=Object.prototype,Sv=df.hasOwnProperty,Tv=df.toString,Gr=ki?ki.toStringTag:void 0;function Bv(e){var t=Sv.call(e,Gr),r=e[Gr];try{e[Gr]=void 0;var i=!0}catch{}var n=Tv.call(e);return i&&(t?e[Gr]=r:delete e[Gr]),n}var $v=Object.prototype,Lv=$v.toString;function Mv(e){return Lv.call(e)}var Av="[object Null]",Ev="[object Undefined]",Xl=ki?ki.toStringTag:void 0;function ir(e){return e==null?e===void 0?Ev:Av:Xl&&Xl in Object(e)?Bv(e):Mv(e)}function Ee(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Fv="[object AsyncFunction]",Pv="[object Function]",Rv="[object GeneratorFunction]",Dv="[object Proxy]";function ha(e){if(!Ee(e))return!1;var t=ir(e);return t==Pv||t==Rv||t==Fv||t==Dv}var Ia=he["__core-js_shared__"],Vl=(function(){var e=/[^.]+$/.exec(Ia&&Ia.keys&&Ia.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Ov(e){return!!Vl&&Vl in e}var Nv=Function.prototype,Iv=Nv.toString;function nr(e){if(e!=null){try{return Iv.call(e)}catch{}try{return e+""}catch{}}return""}var zv=/[\\^$.*+?()[\]{}|]/g,qv=/^\[object .+?Constructor\]$/,jv=Function.prototype,Wv=Object.prototype,Hv=jv.toString,Yv=Wv.hasOwnProperty,Uv=RegExp("^"+Hv.call(Yv).replace(zv,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Gv(e){if(!Ee(e)||Ov(e))return!1;var t=ha(e)?Uv:qv;return t.test(nr(e))}function Xv(e,t){return e?.[t]}function ar(e,t){var r=Xv(e,t);return Gv(r)?r:void 0}var Ci=ar(Object,"create");function Vv(){this.__data__=Ci?Ci(null):{},this.size=0}function Zv(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Kv="__lodash_hash_undefined__",Qv=Object.prototype,Jv=Qv.hasOwnProperty;function tk(e){var t=this.__data__;if(Ci){var r=t[e];return r===Kv?void 0:r}return Jv.call(t,e)?t[e]:void 0}var ek=Object.prototype,rk=ek.hasOwnProperty;function ik(e){var t=this.__data__;return Ci?t[e]!==void 0:rk.call(t,e)}var nk="__lodash_hash_undefined__";function ak(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ci&&t===void 0?nk:t,this}function Je(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Je.prototype.clear=Vv;Je.prototype.delete=Zv;Je.prototype.get=tk;Je.prototype.has=ik;Je.prototype.set=ak;function sk(){this.__data__=[],this.size=0}function Ei(e,t){return e===t||e!==e&&t!==t}function ua(e,t){for(var r=e.length;r--;)if(Ei(e[r][0],t))return r;return-1}var ok=Array.prototype,lk=ok.splice;function ck(e){var t=this.__data__,r=ua(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():lk.call(t,r,1),--this.size,!0}function hk(e){var t=this.__data__,r=ua(t,e);return r<0?void 0:t[r][1]}function uk(e){return ua(this.__data__,e)>-1}function dk(e,t){var r=this.__data__,i=ua(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function ve(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}ve.prototype.clear=sk;ve.prototype.delete=ck;ve.prototype.get=hk;ve.prototype.has=uk;ve.prototype.set=dk;var _i=ar(he,"Map");function fk(){this.size=0,this.__data__={hash:new Je,map:new(_i||ve),string:new Je}}function pk(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function da(e,t){var r=e.__data__;return pk(t)?r[typeof t=="string"?"string":"hash"]:r.map}function gk(e){var t=da(this,e).delete(e);return this.size-=t?1:0,t}function mk(e){return da(this,e).get(e)}function yk(e){return da(this,e).has(e)}function xk(e,t){var r=da(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function ke(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}ke.prototype.clear=fk;ke.prototype.delete=gk;ke.prototype.get=mk;ke.prototype.has=yk;ke.prototype.set=xk;var bk="Expected a function";function Nr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(bk);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],a=r.cache;if(a.has(n))return a.get(n);var s=e.apply(this,i);return r.cache=a.set(n,s)||a,s};return r.cache=new(Nr.Cache||ke),r}Nr.Cache=ke;function wk(){this.__data__=new ve,this.size=0}function vk(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function kk(e){return this.__data__.get(e)}function Ck(e){return this.__data__.has(e)}var _k=200;function Sk(e,t){var r=this.__data__;if(r instanceof ve){var i=r.__data__;if(!_i||i.length<_k-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new ke(i)}return r.set(e,t),this.size=r.size,this}function sr(e){var t=this.__data__=new ve(e);this.size=t.size}sr.prototype.clear=wk;sr.prototype.delete=vk;sr.prototype.get=kk;sr.prototype.has=Ck;sr.prototype.set=Sk;var Rn=(function(){try{var e=ar(Object,"defineProperty");return e({},"",{}),e}catch{}})();function fa(e,t,r){t=="__proto__"&&Rn?Rn(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function As(e,t,r){(r!==void 0&&!Ei(e[t],r)||r===void 0&&!(t in e))&&fa(e,t,r)}function Tk(e){return function(t,r,i){for(var n=-1,a=Object(t),s=i(t),o=s.length;o--;){var l=s[++n];if(r(a[l],l,a)===!1)break}return t}}var ff=Tk(),pf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Zl=pf&&typeof module=="object"&&module&&!module.nodeType&&module,Bk=Zl&&Zl.exports===pf,Kl=Bk?he.Buffer:void 0,Ql=Kl?Kl.allocUnsafe:void 0;function gf(e,t){if(t)return e.slice();var r=e.length,i=Ql?Ql(r):new e.constructor(r);return e.copy(i),i}var Es=he.Uint8Array;function mf(e){var t=new e.constructor(e.byteLength);return new Es(t).set(new Es(e)),t}function yf(e,t){var r=t?mf(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function xf(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var Jl=Object.create,$k=(function(){function e(){}return function(t){if(!Ee(t))return{};if(Jl)return Jl(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function bf(e,t){return function(r){return e(t(r))}}var Fo=bf(Object.getPrototypeOf,Object),Lk=Object.prototype;function Fi(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Lk;return e===r}function wf(e){return typeof e.constructor=="function"&&!Fi(e)?$k(Fo(e)):{}}function Ir(e){return e!=null&&typeof e=="object"}var Mk="[object Arguments]";function tc(e){return Ir(e)&&ir(e)==Mk}var vf=Object.prototype,Ak=vf.hasOwnProperty,Ek=vf.propertyIsEnumerable,Si=tc((function(){return arguments})())?tc:function(e){return Ir(e)&&Ak.call(e,"callee")&&!Ek.call(e,"callee")},Ti=Array.isArray,Fk=9007199254740991;function Po(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Fk}function Pi(e){return e!=null&&Po(e.length)&&!ha(e)}function kf(e){return Ir(e)&&Pi(e)}function Pk(){return!1}var Cf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ec=Cf&&typeof module=="object"&&module&&!module.nodeType&&module,Rk=ec&&ec.exports===Cf,rc=Rk?he.Buffer:void 0,Dk=rc?rc.isBuffer:void 0,pa=Dk||Pk,Ok="[object Object]",Nk=Function.prototype,Ik=Object.prototype,_f=Nk.toString,zk=Ik.hasOwnProperty,qk=_f.call(Object);function jk(e){if(!Ir(e)||ir(e)!=Ok)return!1;var t=Fo(e);if(t===null)return!0;var r=zk.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&_f.call(r)==qk}var Wk="[object Arguments]",Hk="[object Array]",Yk="[object Boolean]",Uk="[object Date]",Gk="[object Error]",Xk="[object Function]",Vk="[object Map]",Zk="[object Number]",Kk="[object Object]",Qk="[object RegExp]",Jk="[object Set]",tC="[object String]",eC="[object WeakMap]",rC="[object ArrayBuffer]",iC="[object DataView]",nC="[object Float32Array]",aC="[object Float64Array]",sC="[object Int8Array]",oC="[object Int16Array]",lC="[object Int32Array]",cC="[object Uint8Array]",hC="[object Uint8ClampedArray]",uC="[object Uint16Array]",dC="[object Uint32Array]",pt={};pt[nC]=pt[aC]=pt[sC]=pt[oC]=pt[lC]=pt[cC]=pt[hC]=pt[uC]=pt[dC]=!0;pt[Wk]=pt[Hk]=pt[rC]=pt[Yk]=pt[iC]=pt[Uk]=pt[Gk]=pt[Xk]=pt[Vk]=pt[Zk]=pt[Kk]=pt[Qk]=pt[Jk]=pt[tC]=pt[eC]=!1;function fC(e){return Ir(e)&&Po(e.length)&&!!pt[ir(e)]}function Sf(e){return function(t){return e(t)}}var Tf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,di=Tf&&typeof module=="object"&&module&&!module.nodeType&&module,pC=di&&di.exports===Tf,za=pC&&uf.process,Fs=(function(){try{var e=di&&di.require&&di.require("util").types;return e||za&&za.binding&&za.binding("util")}catch{}})(),ic=Fs&&Fs.isTypedArray,ga=ic?Sf(ic):fC;function Ps(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var gC=Object.prototype,mC=gC.hasOwnProperty;function Bf(e,t,r){var i=e[t];(!(mC.call(e,t)&&Ei(i,r))||r===void 0&&!(t in e))&&fa(e,t,r)}function $f(e,t,r,i){var n=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var o=t[a],l=void 0;l===void 0&&(l=e[o]),n?fa(r,o,l):Bf(r,o,l)}return r}function yC(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var xC=9007199254740991,bC=/^(?:0|[1-9]\d*)$/;function Ro(e,t){var r=typeof e;return t=t??xC,!!t&&(r=="number"||r!="symbol"&&bC.test(e))&&e>-1&&e%1==0&&e<t}var wC=Object.prototype,vC=wC.hasOwnProperty;function Lf(e,t){var r=Ti(e),i=!r&&Si(e),n=!r&&!i&&pa(e),a=!r&&!i&&!n&&ga(e),s=r||i||n||a,o=s?yC(e.length,String):[],l=o.length;for(var c in e)(t||vC.call(e,c))&&!(s&&(c=="length"||n&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Ro(c,l)))&&o.push(c);return o}function kC(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var CC=Object.prototype,_C=CC.hasOwnProperty;function SC(e){if(!Ee(e))return kC(e);var t=Fi(e),r=[];for(var i in e)i=="constructor"&&(t||!_C.call(e,i))||r.push(i);return r}function Do(e){return Pi(e)?Lf(e,!0):SC(e)}function TC(e){return $f(e,Do(e))}function BC(e,t,r,i,n,a,s){var o=Ps(e,r),l=Ps(t,r),c=s.get(l);if(c){As(e,r,c);return}var h=a?a(o,l,r+"",e,t,s):void 0,u=h===void 0;if(u){var d=Ti(l),f=!d&&pa(l),g=!d&&!f&&ga(l);h=l,d||f||g?Ti(o)?h=o:kf(o)?h=xf(o):f?(u=!1,h=gf(l,!0)):g?(u=!1,h=yf(l,!0)):h=[]:jk(l)||Si(l)?(h=o,Si(o)?h=TC(o):(!Ee(o)||ha(o))&&(h=wf(l))):u=!1}u&&(s.set(l,h),n(h,l,i,a,s),s.delete(l)),As(e,r,h)}function Mf(e,t,r,i,n){e!==t&&ff(t,function(a,s){if(n||(n=new sr),Ee(a))BC(e,t,s,r,Mf,i,n);else{var o=i?i(Ps(e,s),a,s+"",e,t,n):void 0;o===void 0&&(o=a),As(e,s,o)}},Do)}function Oo(e){return e}function $C(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var nc=Math.max;function Af(e,t,r){return t=nc(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,a=nc(i.length-t,0),s=Array(a);++n<a;)s[n]=i[t+n];n=-1;for(var o=Array(t+1);++n<t;)o[n]=i[n];return o[t]=r(s),$C(e,this,o)}}function Ef(e){return function(){return e}}var LC=Rn?function(e,t){return Rn(e,"toString",{configurable:!0,enumerable:!1,value:Ef(t),writable:!0})}:Oo,MC=800,AC=16,EC=Date.now;function FC(e){var t=0,r=0;return function(){var i=EC(),n=AC-(i-r);if(r=i,n>0){if(++t>=MC)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Ff=FC(LC);function Pf(e,t){return Ff(Af(e,t,Oo),e+"")}function Rf(e,t,r){if(!Ee(r))return!1;var i=typeof t;return(i=="number"?Pi(r)&&Ro(t,r.length):i=="string"&&t in r)?Ei(r[t],e):!1}function Df(e){return Pf(function(t,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,s=n>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(n--,a):void 0,s&&Rf(r[0],r[1],s)&&(a=n<3?void 0:a,n=1),t=Object(t);++i<n;){var o=r[i];o&&e(t,o,i,a)}return t})}var Of=Df(function(e,t,r){Mf(e,t,r)}),Nf="​",PC={curveBasis:ui,curveBasisClosed:sw,curveBasisOpen:ow,curveBumpX:nu,curveBumpY:au,curveBundle:lw,curveCardinalClosed:cw,curveCardinalOpen:hw,curveCardinal:cu,curveCatmullRomClosed:uw,curveCatmullRomOpen:dw,curveCatmullRom:uu,curveLinear:Sn,curveLinearClosed:fw,curveMonotoneX:yu,curveMonotoneY:xu,curveNatural:wu,curveStep:vu,curveStepAfter:Cu,curveStepBefore:ku},RC=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,DC=p(function(e,t){const r=If(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const s=r.map(o=>o.args);pn(s),i=bt(i,[...s])}else i=r.args;if(!i)return;let n=no(e,t);const a="config";return i[a]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[a],delete i[a]),i},"detectInit"),If=p(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${RC.source})(?=[}][%]{2}).*
116
+ `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),I.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const n=[];for(;(i=ci.exec(e))!==null;)if(i.index===ci.lastIndex&&ci.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const a=i[1]?i[1]:i[2],s=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;n.push({type:a,args:s})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(r){return I.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),OC=p(function(e){return e.replace(ci,"")},"removeDirectives"),NC=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function No(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return PC[r]??t}p(No,"interpolateToCurve");function zf(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?hf.sanitizeUrl(r):r}p(zf,"formatUrl");var IC=p((e,...t)=>{const r=e.split("."),i=r.length-1,n=r[i];let a=window;for(let s=0;s<i;s++)if(a=a[r[s]],!a){I.error(`Function name: ${e} not found in window`);return}a[n](...t)},"runFunc");function Io(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(Io,"distance");function qf(e){let t,r=0;e.forEach(n=>{r+=Io(n,t),t=n});const i=r/2;return zo(e,i)}p(qf,"traverseEdge");function jf(e){return e.length===1?e[0]:qf(e)}p(jf,"calcLabelPosition");var ac=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),zo=p((e,t)=>{let r,i=t;for(const n of e){if(r){const a=Io(n,r);if(a===0)return r;if(a<i)i-=a;else{const s=i/a;if(s<=0)return r;if(s>=1)return{x:n.x,y:n.y};if(s>0&&s<1)return{x:ac((1-s)*r.x+s*n.x,5),y:ac((1-s)*r.y+s*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),zC=p((e,t,r)=>{I.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=zo(t,25),a=e?10:5,s=Math.atan2(t[0].y-n.y,t[0].x-n.x),o={x:0,y:0};return o.x=Math.sin(s)*a+(t[0].x+n.x)/2,o.y=-Math.cos(s)*a+(t[0].y+n.y)/2,o},"calcCardinalityPosition");function Wf(e,t,r){const i=structuredClone(r);I.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,a=zo(i,n),s=10+e*.5,o=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(o+Math.PI)*s+(i[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*s+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(o-Math.PI)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*s+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(o)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(o)*s+(i[0].y+a.y)/2-5):(l.x=Math.sin(o)*s+(i[0].x+a.x)/2,l.y=-Math.cos(o)*s+(i[0].y+a.y)/2),l}p(Wf,"calcTerminalLabelPosition");function qo(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(qo,"getStylesFromArray");var sc=0,Hf=p(()=>(sc++,"id-"+Math.random().toString(36).substr(2,12)+"-"+sc),"generateId");function Yf(e){let t="";const r="0123456789abcdef",i=r.length;for(let n=0;n<e;n++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(Yf,"makeRandomHex");var Uf=p(e=>Yf(e.length),"random"),qC=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"),jC=p(function(e,t){const r=t.text.replace(rr.lineBreakRegex," "),[,i]=Ri(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);const a=n.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),n},"drawSimpleText"),Gf=Nr((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),rr.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let a="";return i.forEach((s,o)=>{const l=le(`${s} `,r),c=le(a,r);if(l>t){const{hyphenatedStrings:d,remainingWord:f}=WC(s,t,"-",r);n.push(a,...d),a=f}else c+l>=t?(n.push(a),a=s):a=[a,s].filter(Boolean).join(" ");o+1===i.length&&n.push(a)}),n.filter(s=>s!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),WC=Nr((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...e],a=[];let s="";return n.forEach((o,l)=>{const c=`${s}${o}`;if(le(c,i)>=t){const u=l+1,d=n.length===u,f=`${c}${r}`;a.push(d?c:f),s=""}else s=c}),{hyphenatedStrings:a,remainingWord:s}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function jo(e,t){return Wo(e,t).height}p(jo,"calculateTextHeight");function le(e,t){return Wo(e,t).width}p(le,"calculateTextWidth");var Wo=Nr((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,a]=Ri(r),s=["sans-serif",i],o=e.split(rr.lineBreakRegex),l=[],c=lt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const d of s){let f=0;const g={width:0,height:0,lineHeight:0};for(const m of o){const y=qC();y.text=m||Nf;const x=jC(h,y).style("font-size",a).style("font-weight",n).style("font-family",d),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),f=Math.round(b.height),g.height+=f,g.lineHeight=Math.round(Math.max(g.lineHeight,f))}l.push(g)}h.remove();const u=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[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Sr,HC=(Sr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(Sr,"InitIDGenerator"),Sr),Yi,YC=p(function(e){return Yi=Yi||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Yi.innerHTML=e,unescape(Yi.textContent)},"entityDecode");function Ho(e){return"str"in e}p(Ho,"isDetailedError");var UC=p((e,t,r,i)=>{if(!i)return;const n=e.node()?.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Ri=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 ma(e,t){return Of({},e,t)}p(ma,"cleanAndMerge");var Gt={assignWithDepth:bt,wrapLabel:Gf,calculateTextHeight:jo,calculateTextWidth:le,calculateTextDimensions:Wo,cleanAndMerge:ma,detectInit:DC,detectDirective:If,isSubstringInArray:NC,interpolateToCurve:No,calcLabelPosition:jf,calcCardinalityPosition:zC,calcTerminalLabelPosition:Wf,formatUrl:zf,getStylesFromArray:qo,generateId:Hf,random:Uf,runFunc:IC,entityDecode:YC,insertTitle:UC,isLabelCoordinateInPath:Xf,parseFontSize:Ri,InitIDGenerator:HC},GC=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"),Fe=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),XC=p((e,t,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function Pt(e){return e??null}p(Pt,"handleUndefinedAttr");function Xf(e,t){const r=Math.round(e.x),i=Math.round(e.y),n=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return n.includes(r.toString())||n.includes(i.toString())}p(Xf,"isLabelCoordinateInPath");const VC=Object.freeze({left:0,top:0,width:16,height:16}),Dn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Vf=Object.freeze({...VC,...Dn}),ZC=Object.freeze({...Vf,body:"",hidden:!1}),KC=Object.freeze({width:null,height:null}),QC=Object.freeze({...KC,...Dn}),JC=(e,t,r,i="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const o=n.pop(),l=n.pop(),c={provider:n.length>0?n[0]:i,prefix:l,name:o};return qa(c)?c:null}const a=n[0],s=a.split("-");if(s.length>1){const o={provider:i,prefix:s.shift(),name:s.join("-")};return qa(o)?o:null}if(r&&i===""){const o={provider:i,prefix:"",name:a};return qa(o,r)?o:null}return null},qa=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function t_(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function oc(e,t){const r=t_(e,t);for(const i in ZC)i in Dn?i in e&&!(i in r)&&(r[i]=Dn[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function e_(e,t){const r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function a(s){if(r[s])return n[s]=[];if(!(s in n)){n[s]=null;const o=i[s]&&i[s].parent,l=o&&a(o);l&&(n[s]=[o].concat(l))}return n[s]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),n}function lc(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let a={};function s(o){a=oc(i[o]||n[o],a)}return s(t),r.forEach(s),oc(e,a)}function r_(e,t){if(e.icons[t])return lc(e,t,[]);const r=e_(e,[t])[t];return r?lc(e,t,r):null}const i_=/(-?[0-9.]*[0-9]+[0-9.]*)/g,n_=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function cc(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(i_);if(i===null||!i.length)return e;const n=[];let a=i.shift(),s=n_.test(a);for(;;){if(s){const o=parseFloat(a);isNaN(o)?n.push(a):n.push(Math.ceil(o*t*r)/r)}else n.push(a);if(a=i.shift(),a===void 0)return n.join("");s=!s}}function a_(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),a=e.indexOf("</"+t);if(n===-1||a===-1)break;const s=e.indexOf(">",a);if(s===-1)break;r+=e.slice(n+1,a).trim(),e=e.slice(0,i).trim()+e.slice(s+1)}return{defs:r,content:e}}function s_(e,t){return e?"<defs>"+e+"</defs>"+t:t}function o_(e,t,r){const i=a_(e);return s_(i.defs,t+i.content+r)}const l_=e=>e==="unset"||e==="undefined"||e==="none";function c_(e,t){const r={...Vf,...e},i={...QC,...t},n={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let w=m.rotate;x?b?w+=2:(y.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),y.push("scale(-1 1)"),n.top=n.left=0):b&&(y.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),y.push("scale(1 -1)"),n.top=n.left=0);let C;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:C=n.height/2+n.top,y.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:y.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:C=n.width/2+n.left,y.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}w%2===1&&(n.left!==n.top&&(C=n.left,n.left=n.top,n.top=C),n.width!==n.height&&(C=n.width,n.width=n.height,n.height=C)),y.length&&(a=o_(a,'<g transform="'+y.join(" ")+'">',"</g>"))});const s=i.width,o=i.height,l=n.width,c=n.height;let h,u;s===null?(u=o===null?"1em":o==="auto"?c:o,h=cc(u,l/c)):(h=s==="auto"?l:s,u=o===null?cc(h,c/l):o==="auto"?c:o);const d={},f=(m,y)=>{l_(y)||(d[m]=y.toString())};f("width",h),f("height",u);const g=[n.left,n.top,l,c];return d.viewBox=g.join(" "),{attributes:d,viewBox:g,body:a}}const h_=/\sid="(\S+)"/g,hc=new Map;function u_(e){e=e.replace(/[0-9]+$/,"")||"a";const t=hc.get(e)||0;return hc.set(e,t+1),t?`${e}${t}`:e}function d_(e){const t=[];let r;for(;r=h_.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(n=>{const a=u_(n),s=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function f_(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function Yo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var or=Yo();function Zf(e){or=e}var fi={exec:()=>null};function ht(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(n,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(It.caret,"$1"),r=r.replace(n,s),i},getRegex:()=>new RegExp(r,t)};return i}var p_=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),It={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")},g_=/^(?:[ \t]*(?:\n|$))+/,m_=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,y_=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Di=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,x_=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Uo=/(?:[*+-]|\d{1,9}[.)])/,Kf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Qf=ht(Kf).replace(/bull/g,Uo).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(),b_=ht(Kf).replace(/bull/g,Uo).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(),Go=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,w_=/^[^\n]+/,Xo=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,v_=ht(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Xo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),k_=ht(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Uo).getRegex(),ya="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",Vo=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,C_=ht("^ {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",Vo).replace("tag",ya).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Jf=ht(Go).replace("hr",Di).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",ya).getRegex(),__=ht(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Jf).getRegex(),Zo={blockquote:__,code:m_,def:v_,fences:y_,heading:x_,hr:Di,html:C_,lheading:Qf,list:k_,newline:g_,paragraph:Jf,table:fi,text:w_},uc=ht("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Di).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",ya).getRegex(),S_={...Zo,lheading:b_,table:uc,paragraph:ht(Go).replace("hr",Di).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",uc).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",ya).getRegex()},T_={...Zo,html:ht(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Vo).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:fi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ht(Go).replace("hr",Di).replace("heading",` *#{1,6} *[^
117
+ ]`).replace("lheading",Qf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},B_=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,$_=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,tp=/^( {2,}|\\)\n(?!\s*$)/,L_=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,xa=/[\p{P}\p{S}]/u,Ko=/[\s\p{P}\p{S}]/u,ep=/[^\s\p{P}\p{S}]/u,M_=ht(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ko).getRegex(),rp=/(?!~)[\p{P}\p{S}]/u,A_=/(?!~)[\s\p{P}\p{S}]/u,E_=/(?:[^\s\p{P}\p{S}]|~)/u,F_=ht(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",p_?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ip=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,P_=ht(ip,"u").replace(/punct/g,xa).getRegex(),R_=ht(ip,"u").replace(/punct/g,rp).getRegex(),np="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",D_=ht(np,"gu").replace(/notPunctSpace/g,ep).replace(/punctSpace/g,Ko).replace(/punct/g,xa).getRegex(),O_=ht(np,"gu").replace(/notPunctSpace/g,E_).replace(/punctSpace/g,A_).replace(/punct/g,rp).getRegex(),N_=ht("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ep).replace(/punctSpace/g,Ko).replace(/punct/g,xa).getRegex(),I_=ht(/\\(punct)/,"gu").replace(/punct/g,xa).getRegex(),z_=ht(/^<(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(),q_=ht(Vo).replace("(?:-->|$)","-->").getRegex(),j_=ht("^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",q_).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),On=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,W_=ht(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",On).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ap=ht(/^!?\[(label)\]\[(ref)\]/).replace("label",On).replace("ref",Xo).getRegex(),sp=ht(/^!?\[(ref)\](?:\[\])?/).replace("ref",Xo).getRegex(),H_=ht("reflink|nolink(?!\\()","g").replace("reflink",ap).replace("nolink",sp).getRegex(),dc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Qo={_backpedal:fi,anyPunctuation:I_,autolink:z_,blockSkip:F_,br:tp,code:$_,del:fi,emStrongLDelim:P_,emStrongRDelimAst:D_,emStrongRDelimUnd:N_,escape:B_,link:W_,nolink:sp,punctuation:M_,reflink:ap,reflinkSearch:H_,tag:j_,text:L_,url:fi},Y_={...Qo,link:ht(/^!?\[(label)\]\((.*?)\)/).replace("label",On).getRegex(),reflink:ht(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",On).getRegex()},Rs={...Qo,emStrongRDelimAst:O_,emStrongLDelim:R_,url:ht(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",dc).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:ht(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",dc).getRegex()},U_={...Rs,br:ht(tp).replace("{2,}","*").getRegex(),text:ht(Rs.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ui={normal:Zo,gfm:S_,pedantic:T_},Xr={normal:Qo,gfm:Rs,breaks:U_,pedantic:Y_},G_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},fc=e=>G_[e];function ie(e,t){if(t){if(It.escapeTest.test(e))return e.replace(It.escapeReplace,fc)}else if(It.escapeTestNoEncode.test(e))return e.replace(It.escapeReplaceNoEncode,fc);return e}function pc(e){try{e=encodeURI(e).replace(It.percentDecode,"%")}catch{return null}return e}function gc(e,t){let r=e.replace(It.findPipe,(a,s,o)=>{let l=!1,c=s;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(It.splitPipe),n=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(;n<i.length;n++)i[n]=i[n].trim().replace(It.slashPipe,"|");return i}function Vr(e,t,r){let i=e.length;if(i===0)return"";let n=0;for(;n<i&&e.charAt(i-n-1)===t;)n++;return e.slice(0,i-n)}function X_(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 mc(e,t,r,i,n){let a=t.href,s=t.title||null,o=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:s,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,l}function V_(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let n=i[1];return t.split(`
118
118
  `).map(a=>{let s=a.match(r.other.beginningSpace);if(s===null)return a;let[o]=s;return o.length>=n.length?a.slice(n.length):a}).join(`
119
119
  `)}var Nn=class{options;rules;lexer;constructor(t){this.options=t||or}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:Vr(i,`
120
- `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],n=U_(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:n}}}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 n=Vr(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.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:Vr(r[0],`
120
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],n=V_(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:n}}}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 n=Vr(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.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:Vr(r[0],`
121
121
  `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Vr(r[0],`
122
122
  `).split(`
123
123
  `),n="",a="",s=[];for(;i.length>0;){let o=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),o=!0;else if(!o)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
@@ -133,12 +133,12 @@ ${u}`:u;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
133
133
  `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),f=t.split(`
134
134
  `,1)[0],g=!d.trim(),m=0;if(this.options.pedantic?(m=2,u=d.trimStart()):g?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,u=d.slice(m),m+=r[1].length),g&&this.rules.other.blankLine.test(f)&&(h+=f+`
135
135
  `,t=t.substring(f.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(m),w=this.rules.other.hrRegex(m),C=this.rules.other.fencesBeginRegex(m),v=this.rules.other.headingBeginRegex(m),L=this.rules.other.htmlBeginRegex(m);for(;t;){let T=t.split(`
136
- `,1)[0],D;if(f=T,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),D=f):D=f.replace(this.rules.other.tabCharGlobal," "),C.test(f)||v.test(f)||L.test(f)||b.test(f)||w.test(f))break;if(D.search(this.rules.other.nonSpaceChar)>=m||!f.trim())u+=`
137
- `+D.slice(m);else{if(g||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||C.test(d)||v.test(d)||w.test(d))break;u+=`
136
+ `,1)[0],O;if(f=T,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),O=f):O=f.replace(this.rules.other.tabCharGlobal," "),C.test(f)||v.test(f)||L.test(f)||b.test(f)||w.test(f))break;if(O.search(this.rules.other.nonSpaceChar)>=m||!f.trim())u+=`
137
+ `+O.slice(m);else{if(g||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||C.test(d)||v.test(d)||w.test(d))break;u+=`
138
138
  `+f}!g&&!f.trim()&&(g=!0),h+=T+`
139
- `,t=t.substring(T.length+1),d=D.slice(m)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(o=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(x=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:h,task:!!y,checked:x,loose:!1,text:u,tokens:[]}),a.raw+=h}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c=0;c<a.items.length;c++)if(this.lexer.state.top=!1,a.items[c].tokens=this.lexer.blockTokens(a.items[c].text,[]),!a.loose){let h=a.items[c].tokens.filter(d=>d.type==="space"),u=h.length>0&&h.some(d=>this.rules.other.anyLine.test(d.raw));a.loose=u}if(a.loose)for(let c=0;c<a.items.length;c++)a.items[c].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:n,title:a}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=pc(r[1]),n=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
140
- `):[],s={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===n.length){for(let o of n)this.rules.other.tableAlignRight.test(o)?s.align.push("right"):this.rules.other.tableAlignCenter.test(o)?s.align.push("center"):this.rules.other.tableAlignLeft.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<i.length;o++)s.header.push({text:i[o],tokens:this.lexer.inline(i[o]),header:!0,align:s.align[o]});for(let o of a)s.rows.push(pc(o,s.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[c]})));return s}}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)===`
141
- `?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 s=Vr(i.slice(0,-1),"\\");if((i.length-s.length)%2===0)return}else{let s=Y_(r[2],"()");if(s===-2)return;if(s>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let n=r[2],a="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(n);s&&(n=s[1],a=s[3])}else a=r[3]?r[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),gc(r,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[n.toLowerCase()];if(!a){let s=i[0].charAt(0);return{type:"text",raw:s,text:s}}return gc(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...n[0]].length-1,s,o,l=a,c=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+a);(n=h.exec(r))!=null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(o=[...s].length,n[3]||n[4]){l+=o;continue}else if((n[5]||n[6])&&a%3&&!((a+o)%3)){c+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+c);let u=[...n[0]][0].length,d=t.slice(0,a+n.index+u+o);if(Math.min(a,o)%2){let g=d.slice(1,-1);return{type:"em",raw:d,text:g,tokens:this.lexer.inlineTokens(g)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,n;return r[2]==="@"?(i=r[1],n="mailto:"+i):(i=r[1],n=i),{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,n;if(r[2]==="@")i=r[0],n="mailto:"+i;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);i=r[0],r[1]==="www."?n="http://"+r[0]:n=r[0]}return{type:"link",raw:r[0],text:i,href:n,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}}}},Vt=class Os{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||or,this.options.tokenizer=this.options.tokenizer||new Nn,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:It,block:Ui.normal,inline:Xr.normal};this.options.pedantic?(r.block=Ui.pedantic,r.inline=Xr.pedantic):this.options.gfm&&(r.block=Ui.gfm,this.options.breaks?r.inline=Xr.breaks:r.inline=Xr.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ui,inline:Xr}}static lex(t,r){return new Os(r).lex(t)}static lexInline(t,r){return new Os(r).inlineTokens(t)}lex(t){t=t.replace(It.carriageReturn,`
139
+ `,t=t.substring(T.length+1),d=O.slice(m)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(o=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(x=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:h,task:!!y,checked:x,loose:!1,text:u,tokens:[]}),a.raw+=h}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c=0;c<a.items.length;c++)if(this.lexer.state.top=!1,a.items[c].tokens=this.lexer.blockTokens(a.items[c].text,[]),!a.loose){let h=a.items[c].tokens.filter(d=>d.type==="space"),u=h.length>0&&h.some(d=>this.rules.other.anyLine.test(d.raw));a.loose=u}if(a.loose)for(let c=0;c<a.items.length;c++)a.items[c].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:n,title:a}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=gc(r[1]),n=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
140
+ `):[],s={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===n.length){for(let o of n)this.rules.other.tableAlignRight.test(o)?s.align.push("right"):this.rules.other.tableAlignCenter.test(o)?s.align.push("center"):this.rules.other.tableAlignLeft.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<i.length;o++)s.header.push({text:i[o],tokens:this.lexer.inline(i[o]),header:!0,align:s.align[o]});for(let o of a)s.rows.push(gc(o,s.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[c]})));return s}}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)===`
141
+ `?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 s=Vr(i.slice(0,-1),"\\");if((i.length-s.length)%2===0)return}else{let s=X_(r[2],"()");if(s===-2)return;if(s>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let n=r[2],a="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(n);s&&(n=s[1],a=s[3])}else a=r[3]?r[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),mc(r,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[n.toLowerCase()];if(!a){let s=i[0].charAt(0);return{type:"text",raw:s,text:s}}return mc(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...n[0]].length-1,s,o,l=a,c=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+a);(n=h.exec(r))!=null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(o=[...s].length,n[3]||n[4]){l+=o;continue}else if((n[5]||n[6])&&a%3&&!((a+o)%3)){c+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+c);let u=[...n[0]][0].length,d=t.slice(0,a+n.index+u+o);if(Math.min(a,o)%2){let g=d.slice(1,-1);return{type:"em",raw:d,text:g,tokens:this.lexer.inlineTokens(g)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,n;return r[2]==="@"?(i=r[1],n="mailto:"+i):(i=r[1],n=i),{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,n;if(r[2]==="@")i=r[0],n="mailto:"+i;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);i=r[0],r[1]==="www."?n="http://"+r[0]:n=r[0]}return{type:"link",raw:r[0],text:i,href:n,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}}}},Vt=class Ds{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||or,this.options.tokenizer=this.options.tokenizer||new Nn,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:It,block:Ui.normal,inline:Xr.normal};this.options.pedantic?(r.block=Ui.pedantic,r.inline=Xr.pedantic):this.options.gfm&&(r.block=Ui.gfm,this.options.breaks?r.inline=Xr.breaks:r.inline=Xr.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ui,inline:Xr}}static lex(t,r){return new Ds(r).lex(t)}static lexInline(t,r){return new Ds(r).inlineTokens(t)}lex(t){t=t.replace(It.carriageReturn,`
142
142
  `),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(It.tabCharGlobal," ").replace(It.spaceLine,""));t;){let n;if(this.options.extensions?.block?.some(s=>(n=s.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let s=r.at(-1);n.raw.length===1&&s!==void 0?s.raw+=`
143
143
  `:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
144
144
  `)?"":`
@@ -170,29 +170,29 @@ ${this.parser.parse(t)}</blockquote>
170
170
  `}tablerow({text:t}){return`<tr>
171
171
  ${t}</tr>
172
172
  `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
173
- `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${ie(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let n=this.parser.parseInline(i),a=fc(t);if(a===null)return n;t=a;let s='<a href="'+t+'"';return r&&(s+=' title="'+ie(r)+'"'),s+=">"+n+"</a>",s}image({href:t,title:r,text:i,tokens:n}){n&&(i=this.parser.parseInline(n,this.parser.textRenderer));let a=fc(t);if(a===null)return ie(i);t=a;let s=`<img src="${t}" alt="${i}"`;return r&&(s+=` title="${ie(r)}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ie(t.text)}},Jo=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""}},Zt=class Ds{options;renderer;textRenderer;constructor(t){this.options=t||or,this.options.renderer=this.options.renderer||new In,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Jo}static parse(t,r){return new Ds(r).parse(t)}static parseInline(t,r){return new Ds(r).parseInline(t)}parse(t,r=!0){let i="";for(let n=0;n<t.length;n++){let a=t[n];if(this.options.extensions?.renderers?.[a.type]){let o=a,l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){i+=l||"";continue}}let s=a;switch(s.type){case"space":{i+=this.renderer.space(s);continue}case"hr":{i+=this.renderer.hr(s);continue}case"heading":{i+=this.renderer.heading(s);continue}case"code":{i+=this.renderer.code(s);continue}case"table":{i+=this.renderer.table(s);continue}case"blockquote":{i+=this.renderer.blockquote(s);continue}case"list":{i+=this.renderer.list(s);continue}case"html":{i+=this.renderer.html(s);continue}case"def":{i+=this.renderer.def(s);continue}case"paragraph":{i+=this.renderer.paragraph(s);continue}case"text":{let o=s,l=this.renderer.text(o);for(;n+1<t.length&&t[n+1].type==="text";)o=t[++n],l+=`
174
- `+this.renderer.text(o);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 o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return i}parseInline(t,r=this.renderer){let i="";for(let n=0;n<t.length;n++){let a=t[n];if(this.options.extensions?.renderers?.[a.type]){let o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=o||"";continue}}let s=a;switch(s.type){case"escape":{i+=r.text(s);break}case"html":{i+=r.html(s);break}case"link":{i+=r.link(s);break}case"image":{i+=r.image(s);break}case"strong":{i+=r.strong(s);break}case"em":{i+=r.em(s);break}case"codespan":{i+=r.codespan(s);break}case"br":{i+=r.br(s);break}case"del":{i+=r.del(s);break}case"text":{i+=r.text(s);break}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return i}},ni=class{options;block;constructor(t){this.options=t||or}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?Vt.lex:Vt.lexInline}provideParser(){return this.block?Zt.parse:Zt.parseInline}},G_=class{defaults=Yo();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Zt;Renderer=In;TextRenderer=Jo;Lexer=Vt;Tokenizer=Nn;Hooks=ni;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let n of t)switch(i=i.concat(r.call(this,n)),n.type){case"table":{let a=n;for(let s of a.header)i=i.concat(this.walkTokens(s.tokens,r));for(let s of a.rows)for(let o of s)i=i.concat(this.walkTokens(o.tokens,r));break}case"list":{let a=n;i=i.concat(this.walkTokens(a.items,r));break}default:{let a=n;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(s=>{let o=a[s].flat(1/0);i=i.concat(this.walkTokens(o,r))}):a.tokens&&(i=i.concat(this.walkTokens(a.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let s=r.renderers[a.name];s?r.renderers[a.name]=function(...o){let l=a.renderer.apply(this,o);return l===!1&&(l=s.apply(this,o)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=r[a.level];s?s.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),n.extensions=r),i.renderer){let a=this.defaults.renderer||new In(this.defaults);for(let s in i.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let o=s,l=i.renderer[o],c=a[o];a[o]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u||""}}n.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new Nn(this.defaults);for(let s in i.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,l=i.tokenizer[o],c=a[o];a[o]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new ni;for(let s in i.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let o=s,l=i.hooks[o],c=a[o];ni.passThroughHooks.has(s)?a[o]=h=>{if(this.defaults.async&&ni.passThroughHooksRespectAsync.has(s))return(async()=>{let d=await l.call(a,h);return c.call(a,d)})();let u=l.call(a,h);return c.call(a,u)}:a[o]=(...h)=>{if(this.defaults.async)return(async()=>{let d=await l.apply(a,h);return d===!1&&(d=await c.apply(a,h)),d})();let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,s=i.walkTokens;n.walkTokens=function(o){let l=[];return l.push(s.call(this,o)),a&&(l=l.concat(a.call(this,o))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Vt.lex(t,r??this.defaults)}parser(t,r){return Zt.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let n={...i},a={...this.defaults,...n},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&n.async===!1)return s(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 s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let o=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?Vt.lex:Vt.lexInline)(o,a),c=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let h=await(a.hooks?await a.hooks.provideParser():t?Zt.parse:Zt.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(h):h})().catch(s);try{a.hooks&&(r=a.hooks.preprocess(r));let o=(a.hooks?a.hooks.provideLexer():t?Vt.lex:Vt.lexInline)(r,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&this.walkTokens(o,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?Zt.parse:Zt.parseInline)(o,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(o){return s(o)}}}onError(t,r){return i=>{if(i.message+=`
175
- Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+ie(i.message+"",!0)+"</pre>";return r?Promise.resolve(n):n}if(r)return Promise.reject(i);throw i}}},tr=new G_;function dt(e,t){return tr.parse(e,t)}dt.options=dt.setOptions=function(e){return tr.setOptions(e),dt.defaults=tr.defaults,Vf(dt.defaults),dt};dt.getDefaults=Yo;dt.defaults=or;dt.use=function(...e){return tr.use(...e),dt.defaults=tr.defaults,Vf(dt.defaults),dt};dt.walkTokens=function(e,t){return tr.walkTokens(e,t)};dt.parseInline=tr.parseInline;dt.Parser=Zt;dt.parser=Zt.parse;dt.Renderer=In;dt.TextRenderer=Jo;dt.Lexer=Vt;dt.lexer=Vt.lex;dt.Tokenizer=Nn;dt.Hooks=ni;dt.parse=dt;dt.options;dt.setOptions;dt.use;dt.walkTokens;dt.parseInline;Zt.parse;Vt.lex;function sp(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var n=i.reduce(function(o,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?o.concat(c.map(function(h){var u,d;return(d=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&d!==void 0?d:0})):o},[]);if(n.length){var a=new RegExp(`
173
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${ie(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let n=this.parser.parseInline(i),a=pc(t);if(a===null)return n;t=a;let s='<a href="'+t+'"';return r&&(s+=' title="'+ie(r)+'"'),s+=">"+n+"</a>",s}image({href:t,title:r,text:i,tokens:n}){n&&(i=this.parser.parseInline(n,this.parser.textRenderer));let a=pc(t);if(a===null)return ie(i);t=a;let s=`<img src="${t}" alt="${i}"`;return r&&(s+=` title="${ie(r)}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ie(t.text)}},Jo=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""}},Zt=class Os{options;renderer;textRenderer;constructor(t){this.options=t||or,this.options.renderer=this.options.renderer||new In,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Jo}static parse(t,r){return new Os(r).parse(t)}static parseInline(t,r){return new Os(r).parseInline(t)}parse(t,r=!0){let i="";for(let n=0;n<t.length;n++){let a=t[n];if(this.options.extensions?.renderers?.[a.type]){let o=a,l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){i+=l||"";continue}}let s=a;switch(s.type){case"space":{i+=this.renderer.space(s);continue}case"hr":{i+=this.renderer.hr(s);continue}case"heading":{i+=this.renderer.heading(s);continue}case"code":{i+=this.renderer.code(s);continue}case"table":{i+=this.renderer.table(s);continue}case"blockquote":{i+=this.renderer.blockquote(s);continue}case"list":{i+=this.renderer.list(s);continue}case"html":{i+=this.renderer.html(s);continue}case"def":{i+=this.renderer.def(s);continue}case"paragraph":{i+=this.renderer.paragraph(s);continue}case"text":{let o=s,l=this.renderer.text(o);for(;n+1<t.length&&t[n+1].type==="text";)o=t[++n],l+=`
174
+ `+this.renderer.text(o);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 o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return i}parseInline(t,r=this.renderer){let i="";for(let n=0;n<t.length;n++){let a=t[n];if(this.options.extensions?.renderers?.[a.type]){let o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=o||"";continue}}let s=a;switch(s.type){case"escape":{i+=r.text(s);break}case"html":{i+=r.html(s);break}case"link":{i+=r.link(s);break}case"image":{i+=r.image(s);break}case"strong":{i+=r.strong(s);break}case"em":{i+=r.em(s);break}case"codespan":{i+=r.codespan(s);break}case"br":{i+=r.br(s);break}case"del":{i+=r.del(s);break}case"text":{i+=r.text(s);break}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return i}},ni=class{options;block;constructor(t){this.options=t||or}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?Vt.lex:Vt.lexInline}provideParser(){return this.block?Zt.parse:Zt.parseInline}},Z_=class{defaults=Yo();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Zt;Renderer=In;TextRenderer=Jo;Lexer=Vt;Tokenizer=Nn;Hooks=ni;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let n of t)switch(i=i.concat(r.call(this,n)),n.type){case"table":{let a=n;for(let s of a.header)i=i.concat(this.walkTokens(s.tokens,r));for(let s of a.rows)for(let o of s)i=i.concat(this.walkTokens(o.tokens,r));break}case"list":{let a=n;i=i.concat(this.walkTokens(a.items,r));break}default:{let a=n;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(s=>{let o=a[s].flat(1/0);i=i.concat(this.walkTokens(o,r))}):a.tokens&&(i=i.concat(this.walkTokens(a.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let s=r.renderers[a.name];s?r.renderers[a.name]=function(...o){let l=a.renderer.apply(this,o);return l===!1&&(l=s.apply(this,o)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=r[a.level];s?s.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),n.extensions=r),i.renderer){let a=this.defaults.renderer||new In(this.defaults);for(let s in i.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let o=s,l=i.renderer[o],c=a[o];a[o]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u||""}}n.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new Nn(this.defaults);for(let s in i.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,l=i.tokenizer[o],c=a[o];a[o]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new ni;for(let s in i.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let o=s,l=i.hooks[o],c=a[o];ni.passThroughHooks.has(s)?a[o]=h=>{if(this.defaults.async&&ni.passThroughHooksRespectAsync.has(s))return(async()=>{let d=await l.call(a,h);return c.call(a,d)})();let u=l.call(a,h);return c.call(a,u)}:a[o]=(...h)=>{if(this.defaults.async)return(async()=>{let d=await l.apply(a,h);return d===!1&&(d=await c.apply(a,h)),d})();let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,s=i.walkTokens;n.walkTokens=function(o){let l=[];return l.push(s.call(this,o)),a&&(l=l.concat(a.call(this,o))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Vt.lex(t,r??this.defaults)}parser(t,r){return Zt.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let n={...i},a={...this.defaults,...n},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&n.async===!1)return s(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 s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let o=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?Vt.lex:Vt.lexInline)(o,a),c=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let h=await(a.hooks?await a.hooks.provideParser():t?Zt.parse:Zt.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(h):h})().catch(s);try{a.hooks&&(r=a.hooks.preprocess(r));let o=(a.hooks?a.hooks.provideLexer():t?Vt.lex:Vt.lexInline)(r,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&this.walkTokens(o,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?Zt.parse:Zt.parseInline)(o,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(o){return s(o)}}}onError(t,r){return i=>{if(i.message+=`
175
+ Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+ie(i.message+"",!0)+"</pre>";return r?Promise.resolve(n):n}if(r)return Promise.reject(i);throw i}}},tr=new Z_;function dt(e,t){return tr.parse(e,t)}dt.options=dt.setOptions=function(e){return tr.setOptions(e),dt.defaults=tr.defaults,Zf(dt.defaults),dt};dt.getDefaults=Yo;dt.defaults=or;dt.use=function(...e){return tr.use(...e),dt.defaults=tr.defaults,Zf(dt.defaults),dt};dt.walkTokens=function(e,t){return tr.walkTokens(e,t)};dt.parseInline=tr.parseInline;dt.Parser=Zt;dt.parser=Zt.parse;dt.Renderer=In;dt.TextRenderer=Jo;dt.Lexer=Vt;dt.lexer=Vt.lex;dt.Tokenizer=Nn;dt.Hooks=ni;dt.parse=dt;dt.options;dt.setOptions;dt.use;dt.walkTokens;dt.parseInline;Zt.parse;Vt.lex;function op(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var n=i.reduce(function(o,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?o.concat(c.map(function(h){var u,d;return(d=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&d!==void 0?d:0})):o},[]);if(n.length){var a=new RegExp(`
176
176
  [ ]{`+Math.min.apply(Math,n)+"}","g");i=i.map(function(o){return o.replace(a,`
177
177
  `)})}i[0]=i[0].replace(/^\r?\n/,"");var s=i[0];return t.forEach(function(o,l){var c=s.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=o;typeof o=="string"&&o.includes(`
178
178
  `)&&(u=String(o).split(`
179
179
  `).map(function(d,f){return f===0?d:""+h+d}).join(`
180
- `)),s+=u+i[l+1]}),s}var op={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},Ns=new Map,lp=new Map,cp=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(I.debug("Registering icon pack:",t.name),"loader"in t)lp.set(t.name,t.loader);else if("icons"in t)Ns.set(t.name,t.icons);else throw I.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),hp=p(async(e,t)=>{const r=ZC(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 n=Ns.get(i);if(!n){const s=lp.get(i);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await s(),prefix:i},Ns.set(i,n)}catch(o){throw I.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=JC(n,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),X_=p(async e=>{try{return await hp(e),!0}catch{return!1}},"isIconAvailable"),zr=p(async(e,t,r)=>{let i;try{i=await hp(e,t?.fallbackPrefix)}catch(s){I.error(s),i=op}const n=s_(i,t),a=h_(c_(n.body),{...n.attributes,...r});return Ht(a,$t())},"getIconSVG");function up(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
180
+ `)),s+=u+i[l+1]}),s}var lp={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},Ns=new Map,cp=new Map,hp=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(I.debug("Registering icon pack:",t.name),"loader"in t)cp.set(t.name,t.loader);else if("icons"in t)Ns.set(t.name,t.icons);else throw I.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),up=p(async(e,t)=>{const r=JC(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 n=Ns.get(i);if(!n){const s=cp.get(i);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await s(),prefix:i},Ns.set(i,n)}catch(o){throw I.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=r_(n,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),K_=p(async e=>{try{return await up(e),!0}catch{return!1}},"isIconAvailable"),zr=p(async(e,t,r)=>{let i;try{i=await up(e,t?.fallbackPrefix)}catch(s){I.error(s),i=lp}const n=c_(i,t),a=f_(d_(n.body),{...n.attributes,...r});return Ht(a,$t())},"getIconSVG");function dp(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
181
181
  `).replace(/\n{2,}/g,`
182
- `),n=sp(i);return t===!1?n.replace(/ /g,"&nbsp;"):n}p(up,"preprocessMarkdown");function dp(e,t={}){const r=up(e,t),i=dt.lexer(r),n=[[]];let a=0;function s(o,l="normal"){o.type==="text"?o.text.split(`
183
- `).forEach((h,u)=>{u!==0&&(a++,n.push([])),h.split(" ").forEach(d=>{d=d.replace(/&#39;/g,"'"),d&&n[a].push({content:d,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(c=>{s(c,o.type)}):o.type==="html"&&n[a].push({content:o.text,type:"normal"})}return p(s,"processNode"),i.forEach(o=>{o.type==="paragraph"?o.tokens?.forEach(l=>{s(l)}):o.type==="html"?n[a].push({content:o.text,type:"normal"}):n[a].push({content:o.raw,type:"normal"})}),n}p(dp,"markdownToLines");function fp(e,{markdownAutoWrap:t}={}){const r=dt.lexer(e);function i(n){return n.type==="text"?t===!1?n.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):n.text.replace(/\n */g,"<br/>"):n.type==="strong"?`<strong>${n.tokens?.map(i).join("")}</strong>`:n.type==="em"?`<em>${n.tokens?.map(i).join("")}</em>`:n.type==="paragraph"?`<p>${n.tokens?.map(i).join("")}</p>`:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:(I.warn(`Unsupported markdown: ${n.type}`),n.raw)}return p(i,"output"),r.map(i).join("")}p(fp,"markdownToHTML");function pp(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(pp,"splitTextToChars");function gp(e,t){const r=pp(t.content);return tl(e,[],r,t.type)}p(gp,"splitWordToFitWidth");function tl(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...a]=r,s=[...t,n];return e([{content:s.join(""),type:i}])?tl(e,s,a,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(tl,"splitWordToFitWidthRecursion");function mp(e,t){if(e.some(({content:r})=>r.includes(`
184
- `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return zn(e,t)}p(mp,"splitLineToFitWidth");function zn(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},s=[...i];if(n!==""&&s.push({content:n,type:"normal"}),s.push(a),t(s))return zn(e,t,r,s);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[o,l]=gp(t,a);r.push([o]),l.content&&e.unshift(l)}return zn(e,t,r)}p(zn,"splitLineToFitWidthRecursion");function Is(e,t){t&&e.attr("style",t)}p(Is,"applyStyle");async function yp(e,t,r,i,n=!1,a=$t()){const s=e.append("foreignObject");s.attr("width",`${10*r}px`),s.attr("height",`${10*r}px`);const o=s.append("xhtml:div"),l=Ze(t.label)?await Qn(t.label.replace(rr.lineBreakRegex,`
185
- `),a):Ht(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",h=o.append("span");h.html(l),Is(h,t.labelStyle),h.attr("class",`${c} ${i}`),Is(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&o.attr("class","labelBkg");let u=o.node().getBoundingClientRect();return u.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),u=o.node().getBoundingClientRect()),s.node()}p(yp,"addHtmlSpan");function ba(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}p(ba,"createTspan");function xp(e,t,r){const i=e.append("text"),n=ba(i,1,t);wa(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}p(xp,"computeWidthOfText");function bp(e,t,r){const i=e.append("text"),n=ba(i,1,t);wa(n,[{content:r,type:"normal"}]);const a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}p(bp,"computeDimensionOfText");function wp(e,t,r,i=!1){const a=t.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),o=a.append("text").attr("y","-10.1");let l=0;for(const c of r){const h=p(d=>xp(a,1.1,d)<=e,"checkWidth"),u=h(c)?[c]:mp(c,h);for(const d of u){const f=ba(o,l,1.1);wa(f,d),l++}}if(i){const c=o.node().getBBox(),h=2;return s.attr("x",c.x-h).attr("y",c.y-h).attr("width",c.width+2*h).attr("height",c.height+2*h),a.node()}else return o.node()}p(wp,"createFormattedText");function wa(e,t){e.text(""),t.forEach((r,i)=>{const n=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?n.text(r.content):n.text(" "+r.content)})}p(wa,"updateTextContentAndStyles");async function el(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(n,a,s)=>(r.push((async()=>{const o=`${a}:${s}`;return await X_(o)?await zr(o,void 0,{class:"label-icon"}):`<i class='${Ht(n,t).replace(":"," ")}'></i>`})()),n));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(el,"replaceIconSubstring");var Ce=p(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},c)=>{if(I.debug("XYZ createText",t,r,i,n,a,s,"addSvgBackground: ",l),a){const h=fp(t,c),u=await el(Fe(h),c),d=t.replace(/\\\\/g,"\\"),f={isNode:s,label:Ze(t)?d:u,labelStyle:r.replace("fill:","color:")};return await yp(e,f,o,n,l,c)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=dp(h.replace("<br>","<br/>"),c),d=wp(o,e,u,t?l:!1);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");lt(d).attr("style",f)}else{const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");lt(d).select("rect").attr("style",f.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");lt(d).select("text").attr("style",g)}return d}},"createText");function ja(e,t,r){if(e&&e.length){const[i,n]=t,a=Math.PI/180*r,s=Math.cos(a),o=Math.sin(a);for(const l of e){const[c,h]=l;l[0]=(c-i)*s-(h-n)*o+i,l[1]=(c-i)*o+(h-n)*s+n}}}function V_(e,t){return e[0]===t[0]&&e[1]===t[1]}function Z_(e,t,r,i=1){const n=r,a=Math.max(t,.1),s=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(n)for(const c of s)ja(c,o,n);const l=(function(c,h,u){const d=[];for(const b of c){const w=[...b];V_(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&d.push(w)}const f=[];h=Math.max(h,.1);const g=[];for(const b of d)for(let w=0;w<b.length-1;w++){const C=b[w],v=b[w+1];if(C[1]!==v[1]){const L=Math.min(C[1],v[1]);g.push({ymin:L,ymax:Math.max(C[1],v[1]),x:L===C[1]?C[0]:v[0],islope:(v[0]-C[0])/(v[1]-C[1])})}}if(g.sort(((b,w)=>b.ymin<w.ymin?-1:b.ymin>w.ymin?1:b.x<w.x?-1:b.x>w.x?1:b.ymax===w.ymax?0:(b.ymax-w.ymax)/Math.abs(b.ymax-w.ymax))),!g.length)return f;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let w=0;w<g.length&&!(g[w].ymin>y);w++)b=w;g.splice(0,b+1).forEach((w=>{m.push({s:y,edge:w})}))}if(m=m.filter((b=>!(b.edge.ymax<=y))),m.sort(((b,w)=>b.edge.x===w.edge.x?0:(b.edge.x-w.edge.x)/Math.abs(b.edge.x-w.edge.x))),(u!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const w=b+1;if(w>=m.length)break;const C=m[b].edge,v=m[w].edge;f.push([[Math.round(C.x),y],[Math.round(v.x),y]])}y+=u,m.forEach((b=>{b.edge.x=b.edge.x+u*b.edge.islope})),x++}return f})(s,a,i);if(n){for(const c of s)ja(c,o,-n);(function(c,h,u){const d=[];c.forEach((f=>d.push(...f))),ja(d,h,u)})(l,o,-n)}return l}function Di(e,t){var r;const i=t.hachureAngle+90;let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=n),Z_(e,n,i,a||1)}class rl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Di(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function va(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 K_ extends rl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=Di(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,s=[],o=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[c,h]of n)va([c,h])&&s.push([[c[0]-o,c[1]+l],[...h]],[[c[0]+o,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}}class Q_ extends rl{fillPolygons(t,r){const i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,n);return i.ops=i.ops.concat(a.ops),i}}class J_{constructor(t){this.helper=t}fillPolygons(t,r){const i=Di(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const s=n/4;for(const o of t){const l=va(o),c=l/n,h=Math.ceil(c)-1,u=l-h*n,d=(o[0][0]+o[1][0])/2-n/4,f=Math.min(o[0][1],o[1][1]);for(let g=0;g<h;g++){const m=f+u+g*n,y=d-s+2*Math.random()*s,x=m-s+2*Math.random()*s,b=this.helper.ellipse(y,x,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class tS{constructor(t){this.helper=t}fillPolygons(t,r){const i=Di(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,n=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((s=>{const o=va(s),l=Math.floor(o/(i+n)),c=(o+n-l*(i+n))/2;let h=s[0],u=s[1];h[0]>u[0]&&(h=s[1],u=s[0]);const d=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let f=0;f<l;f++){const g=f*(i+n),m=g+i,y=[h[0]+g*Math.cos(d)+c*Math.cos(d),h[1]+g*Math.sin(d)+c*Math.sin(d)],x=[h[0]+m*Math.cos(d)+c*Math.cos(d),h[1]+m*Math.sin(d)+c*Math.sin(d)];a.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}})),a}}class eS{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,n=r.zigzagOffset<0?i:r.zigzagOffset,a=Di(t,r=Object.assign({},r,{hachureGap:i+n}));return{type:"fillSketch",ops:this.zigzagLines(a,n,r)}}zigzagLines(t,r,i){const n=[];return t.forEach((a=>{const s=va(a),o=Math.round(s/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<o;u++){const d=2*u*r,f=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],y=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],x=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];n.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}})),n}}const zt={};class rS{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const iS=0,Wa=1,mc=2,Gi={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 Ha(e,t){return e.type===t}function il(e){const t=[],r=(function(s){const o=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:iS,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:Wa,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return o[o.length]={type:mc,text:""},o})(e);let i="BOD",n=0,a=r[n];for(;!Ha(a,mc);){let s=0;const o=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return il("M0,0"+e);n++,s=Gi[a.text],i=a.text}else Ha(a,Wa)?s=Gi[i]:(n++,s=Gi[a.text],i=a.text);if(!(n+s<r.length))throw new Error("Path data ended short");for(let l=n;l<n+s;l++){const c=r[l];if(!Ha(c,Wa))throw new Error("Param not a number: "+i+","+c.text);o[o.length]=+c.text}if(typeof Gi[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:o};t.push(l),n+=s,a=r[n],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function vp(e){let t=0,r=0,i=0,n=0;const a=[];for(const{key:s,data:o}of e)switch(s){case"M":a.push({key:"M",data:[...o]}),[t,r]=o,[i,n]=o;break;case"m":t+=o[0],r+=o[1],a.push({key:"M",data:[t,r]}),i=t,n=r;break;case"L":a.push({key:"L",data:[...o]}),[t,r]=o;break;case"l":t+=o[0],r+=o[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...o]}),t=o[4],r=o[5];break;case"c":{const l=o.map(((c,h)=>h%2?c+r:c+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...o]}),t=o[2],r=o[3];break;case"q":{const l=o.map(((c,h)=>h%2?c+r:c+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...o]}),t=o[5],r=o[6];break;case"a":t+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],t,r]});break;case"H":a.push({key:"H",data:[...o]}),t=o[0];break;case"h":t+=o[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),t=o[2],r=o[3];break;case"s":{const l=o.map(((c,h)=>h%2?c+r:c+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...o]}),t=o[0],r=o[1];break;case"t":t+=o[0],r+=o[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=n}return a}function kp(e){const t=[];let r="",i=0,n=0,a=0,s=0,o=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,n]=h,[a,s]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],n=h[5],o=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,n]});break;case"V":n=h[0],t.push({key:"L",data:[i,n]});break;case"S":{let u=0,d=0;r==="C"||r==="S"?(u=i+(i-o),d=n+(n-l)):(u=i,d=n),t.push({key:"C",data:[u,d,...h]}),o=h[0],l=h[1],i=h[2],n=h[3];break}case"T":{const[u,d]=h;let f=0,g=0;r==="Q"||r==="T"?(f=i+(i-o),g=n+(n-l)):(f=i,g=n);const m=i+2*(f-i)/3,y=n+2*(g-n)/3,x=u+2*(f-u)/3,b=d+2*(g-d)/3;t.push({key:"C",data:[m,y,x,b,u,d]}),o=f,l=g,i=u,n=d;break}case"Q":{const[u,d,f,g]=h,m=i+2*(u-i)/3,y=n+2*(d-n)/3,x=f+2*(u-f)/3,b=g+2*(d-g)/3;t.push({key:"C",data:[m,y,x,b,f,g]}),o=u,l=d,i=f,n=g;break}case"A":{const u=Math.abs(h[0]),d=Math.abs(h[1]),f=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||d===0?(t.push({key:"C",data:[i,n,y,x,y,x]}),i=y,n=x):(i!==y||n!==x)&&(Cp(i,n,y,x,u,d,f,g,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,n=x);break}case"Z":t.push({key:"Z",data:[]}),i=a,n=s}r=c}return t}function Zr(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Cp(e,t,r,i,n,a,s,o,l,c){const h=(u=s,Math.PI*u/180);var u;let d=[],f=0,g=0,m=0,y=0;if(c)[f,g,m,y]=c;else{[e,t]=Zr(e,t,-h),[r,i]=Zr(r,i,-h);const j=(e-r)/2,$=(t-i)/2;let M=j*j/(n*n)+$*$/(a*a);M>1&&(M=Math.sqrt(M),n*=M,a*=M);const B=n*n,P=a*a,E=B*P-B*$*$-P*j*j,A=B*$*$+P*j*j,N=(o===l?-1:1)*Math.sqrt(Math.abs(E/A));m=N*n*$/a+(e+r)/2,y=N*-a*j/n+(t+i)/2,f=Math.asin(parseFloat(((t-y)/a).toFixed(9))),g=Math.asin(parseFloat(((i-y)/a).toFixed(9))),e<m&&(f=Math.PI-f),r<m&&(g=Math.PI-g),f<0&&(f=2*Math.PI+f),g<0&&(g=2*Math.PI+g),l&&f>g&&(f-=2*Math.PI),!l&&g>f&&(g-=2*Math.PI)}let x=g-f;if(Math.abs(x)>120*Math.PI/180){const j=g,$=r,M=i;g=l&&g>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,d=Cp(r=m+n*Math.cos(g),i=y+a*Math.sin(g),$,M,n,a,s,0,l,[g,j,m,y])}x=g-f;const b=Math.cos(f),w=Math.sin(f),C=Math.cos(g),v=Math.sin(g),L=Math.tan(x/4),T=4/3*n*L,D=4/3*a*L,z=[e,t],q=[e+T*w,t-D*b],O=[r+T*v,i-D*C],W=[r,i];if(q[0]=2*z[0]-q[0],q[1]=2*z[1]-q[1],c)return[q,O,W].concat(d);{d=[q,O,W].concat(d);const j=[];for(let $=0;$<d.length;$+=3){const M=Zr(d[$][0],d[$][1],h),B=Zr(d[$+1][0],d[$+1][1],h),P=Zr(d[$+2][0],d[$+2][1],h);j.push([M[0],M[1],B[0],B[1],P[0],P[1]])}return j}}const nS={randOffset:function(e,t){return nt(e,t)},randOffsetWithRange:function(e,t,r){return qn(e,t,r)},ellipse:function(e,t,r,i,n){const a=Sp(r,i,n);return zs(e,t,n,a).opset},doubleLineOps:function(e,t,r,i,n){return Me(e,t,r,i,n,!0)}};function _p(e,t,r,i,n){return{type:"path",ops:Me(e,t,r,i,n)}}function ln(e,t,r){const i=(e||[]).length;if(i>2){const n=[];for(let a=0;a<i-1;a++)n.push(...Me(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&n.push(...Me(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:n}}return i===2?_p(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function aS(e,t,r,i,n){return(function(a,s){return ln(a,!0,s)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],n)}function yc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Xi(r[0],1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:Xi(r[0],1.5*(1+.22*t.roughness),wc(t));for(let a=1;a<r.length;a++){const s=r[a];if(s.length){const o=Xi(s,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Xi(s,1.5*(1+.22*t.roughness),wc(t));for(const c of o)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&n.push(c)}}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function Sp(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/n;let s=Math.abs(e/2),o=Math.abs(t/2);const l=1-r.curveFitting;return s+=nt(s*l,r),o+=nt(o*l,r),{increment:a,rx:s,ry:o}}function zs(e,t,r,i){const[n,a]=vc(i.increment,e,t,i.rx,i.ry,1,i.increment*qn(.1,qn(.4,1,r),r),r);let s=jn(n,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[o]=vc(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=jn(o,null,r);s=s.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:s}}}function xc(e,t,r,i,n,a,s,o,l){const c=e,h=t;let u=Math.abs(r/2),d=Math.abs(i/2);u+=nt(.01*u,l),d+=nt(.01*d,l);let f=n,g=a;for(;f<0;)f+=2*Math.PI,g+=2*Math.PI;g-f>2*Math.PI&&(f=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-f)/2),x=kc(y,c,h,u,d,f,g,1,l);if(!l.disableMultiStroke){const b=kc(y,c,h,u,d,f,g,1.5,l);x.push(...b)}return s&&(o?x.push(...Me(c,h,c+u*Math.cos(f),h+d*Math.sin(f),l),...Me(c,h,c+u*Math.cos(g),h+d*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(f),h+d*Math.sin(f)]})),{type:"path",ops:x}}function bc(e,t){const r=kp(vp(il(e))),i=[];let n=[0,0],a=[0,0];for(const{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],n=[o[0],o[1]];break;case"L":i.push(...Me(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case"C":{const[l,c,h,u,d,f]=o;i.push(...sS(l,c,h,u,d,f,a,t)),a=[d,f];break}case"Z":i.push(...Me(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function Ya(e,t){const r=[];for(const i of e)if(i.length){const n=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+nt(n,t),i[0][1]+nt(n,t)]});for(let s=1;s<a;s++)r.push({op:"lineTo",data:[i[s][0]+nt(n,t),i[s][1]+nt(n,t)]})}}return{type:"fillPath",ops:r}}function lr(e,t){return(function(r,i){let n=r.fillStyle||"hachure";if(!zt[n])switch(n){case"zigzag":zt[n]||(zt[n]=new K_(i));break;case"cross-hatch":zt[n]||(zt[n]=new Q_(i));break;case"dots":zt[n]||(zt[n]=new J_(i));break;case"dashed":zt[n]||(zt[n]=new tS(i));break;case"zigzag-line":zt[n]||(zt[n]=new eS(i));break;default:n="hachure",zt[n]||(zt[n]=new rl(i))}return zt[n]})(t,nS).fillPolygons(e,t)}function wc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Tp(e){return e.randomizer||(e.randomizer=new rS(e.seed||0)),e.randomizer.next()}function qn(e,t,r,i=1){return r.roughness*i*(Tp(r)*(t-e)+e)}function nt(e,t,r=1){return qn(-e,e,t,r)}function Me(e,t,r,i,n,a=!1){const s=a?n.disableMultiStrokeFill:n.disableMultiStroke,o=qs(e,t,r,i,n,!0,!1);if(s)return o;const l=qs(e,t,r,i,n,!0,!0);return o.concat(l)}function qs(e,t,r,i,n,a,s){const o=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(o);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>o&&(h=l/10);const u=h/2,d=.2+.2*Tp(n);let f=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;f=nt(f,n,c),g=nt(g,n,c);const m=[],y=()=>nt(u,n,c),x=()=>nt(h,n,c),b=n.preserveVertices;return s?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:nt(h,n,c)),t+(b?0:nt(h,n,c))]}),s?m.push({op:"bcurveTo",data:[f+e+(r-e)*d+y(),g+t+(i-t)*d+y(),f+e+2*(r-e)*d+y(),g+t+2*(i-t)*d+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[f+e+(r-e)*d+x(),g+t+(i-t)*d+x(),f+e+2*(r-e)*d+x(),g+t+2*(i-t)*d+x(),r+(b?0:x()),i+(b?0:x())]}),m}function Xi(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+nt(t,r),e[0][1]+nt(t,r)]),i.push([e[0][0]+nt(t,r),e[0][1]+nt(t,r)]);for(let n=1;n<e.length;n++)i.push([e[n][0]+nt(t,r),e[n][1]+nt(t,r)]),n===e.length-1&&i.push([e[n][0]+nt(t,r),e[n][1]+nt(t,r)]);return jn(i,null,r)}function jn(e,t,r){const i=e.length,n=[];if(i>3){const a=[],s=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let o=1;o+2<i;o++){const l=e[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(s*e[o+1][0]-s*e[o-1][0])/6,l[1]+(s*e[o+1][1]-s*e[o-1][1])/6],a[2]=[e[o+1][0]+(s*e[o][0]-s*e[o+2][0])/6,e[o+1][1]+(s*e[o][1]-s*e[o+2][1])/6],a[3]=[e[o+1][0],e[o+1][1]],n.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(n.push({op:"move",data:[e[1][0],e[1][1]]}),n.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&n.push(...qs(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return n}function vc(e,t,r,i,n,a,s,o){const l=[],c=[];if(o.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+n*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+n*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+n*Math.sin(0)]),c.push([t+i*Math.cos(e),r+n*Math.sin(e)])}else{const h=nt(.5,o)-Math.PI/2;c.push([nt(a,o)+t+.9*i*Math.cos(h-e),nt(a,o)+r+.9*n*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let d=h;d<u;d+=e){const f=[nt(a,o)+t+i*Math.cos(d),nt(a,o)+r+n*Math.sin(d)];l.push(f),c.push(f)}c.push([nt(a,o)+t+i*Math.cos(h+2*Math.PI+.5*s),nt(a,o)+r+n*Math.sin(h+2*Math.PI+.5*s)]),c.push([nt(a,o)+t+.98*i*Math.cos(h+s),nt(a,o)+r+.98*n*Math.sin(h+s)]),c.push([nt(a,o)+t+.9*i*Math.cos(h+.5*s),nt(a,o)+r+.9*n*Math.sin(h+.5*s)])}return[c,l]}function kc(e,t,r,i,n,a,s,o,l){const c=a+nt(.1,l),h=[];h.push([nt(o,l)+t+.9*i*Math.cos(c-e),nt(o,l)+r+.9*n*Math.sin(c-e)]);for(let u=c;u<=s;u+=e)h.push([nt(o,l)+t+i*Math.cos(u),nt(o,l)+r+n*Math.sin(u)]);return h.push([t+i*Math.cos(s),r+n*Math.sin(s)]),h.push([t+i*Math.cos(s),r+n*Math.sin(s)]),jn(h,null,l)}function sS(e,t,r,i,n,a,s,o){const l=[],c=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3];let h=[0,0];const u=o.disableMultiStroke?1:2,d=o.preserveVertices;for(let f=0;f<u;f++)f===0?l.push({op:"move",data:[s[0],s[1]]}):l.push({op:"move",data:[s[0]+(d?0:nt(c[0],o)),s[1]+(d?0:nt(c[0],o))]}),h=d?[n,a]:[n+nt(c[f],o),a+nt(c[f],o)],l.push({op:"bcurveTo",data:[e+nt(c[f],o),t+nt(c[f],o),r+nt(c[f],o),i+nt(c[f],o),h[0],h[1]]});return l}function Kr(e){return[...e]}function Cc(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 n=[];n.push(e[0],e[0]);for(let o=1;o<e.length;o++)n.push(e[o]),o===e.length-1&&n.push(e[o]);const a=[],s=1-t;i.push(Kr(n[0]));for(let o=1;o+2<n.length;o++){const l=n[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(s*n[o+1][0]-s*n[o-1][0])/6,l[1]+(s*n[o+1][1]-s*n[o-1][1])/6],a[2]=[n[o+1][0]+(s*n[o][0]-s*n[o+2][0])/6,n[o+1][1]+(s*n[o][1]-s*n[o+2][1])/6],a[3]=[n[o+1][0],n[o+1][1]],i.push(a[1],a[2],a[3])}}return i}function cn(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function oS(e,t,r){const i=cn(t,r);if(i===0)return cn(e,t);let n=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return n=Math.max(0,Math.min(1,n)),cn(e,Ie(t,r,n))}function Ie(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function js(e,t,r,i){const n=i||[];if((function(o,l){const c=o[l+0],h=o[l+1],u=o[l+2],d=o[l+3];let f=3*h[0]-2*c[0]-d[0];f*=f;let g=3*h[1]-2*c[1]-d[1];g*=g;let m=3*u[0]-2*d[0]-c[0];m*=m;let y=3*u[1]-2*d[1]-c[1];return y*=y,f<m&&(f=m),g<y&&(g=y),f+g})(e,t)<r){const o=e[t+0];n.length?(a=n[n.length-1],s=o,Math.sqrt(cn(a,s))>1&&n.push(o)):n.push(o),n.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],d=Ie(l,c,.5),f=Ie(c,h,.5),g=Ie(h,u,.5),m=Ie(d,f,.5),y=Ie(f,g,.5),x=Ie(m,y,.5);js([l,d,m,x],0,r,n),js([x,y,g,u],0,r,n)}var a,s;return n}function lS(e,t){return Wn(e,0,e.length,t)}function Wn(e,t,r,i,n){const a=n||[],s=e[t],o=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=oS(e[h],s,o);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(Wn(e,t,c+1,i,a),Wn(e,c,r,i,a)):(a.length||a.push(s),a.push(o)),a}function Ua(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let a=0;a<n;a++)js(e,3*a,t,i);return r&&r>0?Wn(i,0,i.length,r):i}const Wt="none";class Hn{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,n,a){const s=this._o(a);return this._d("line",[_p(t,r,i,n,s)],s)}rectangle(t,r,i,n,a){const s=this._o(a),o=[],l=aS(t,r,i,n,s);if(s.fill){const c=[[t,r],[t+i,r],[t+i,r+n],[t,r+n]];s.fillStyle==="solid"?o.push(Ya([c],s)):o.push(lr([c],s))}return s.stroke!==Wt&&o.push(l),this._d("rectangle",o,s)}ellipse(t,r,i,n,a){const s=this._o(a),o=[],l=Sp(i,n,s),c=zs(t,r,s,l);if(s.fill)if(s.fillStyle==="solid"){const h=zs(t,r,s,l).opset;h.type="fillPath",o.push(h)}else o.push(lr([c.estimatedPoints],s));return s.stroke!==Wt&&o.push(c.opset),this._d("ellipse",o,s)}circle(t,r,i,n){const a=this.ellipse(t,r,i,i,n);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[ln(t,!1,i)],i)}arc(t,r,i,n,a,s,o=!1,l){const c=this._o(l),h=[],u=xc(t,r,i,n,a,s,o,!0,c);if(o&&c.fill)if(c.fillStyle==="solid"){const d=Object.assign({},c);d.disableMultiStroke=!0;const f=xc(t,r,i,n,a,s,!0,!1,d);f.type="fillPath",h.push(f)}else h.push((function(d,f,g,m,y,x,b){const w=d,C=f;let v=Math.abs(g/2),L=Math.abs(m/2);v+=nt(.01*v,b),L+=nt(.01*L,b);let T=y,D=x;for(;T<0;)T+=2*Math.PI,D+=2*Math.PI;D-T>2*Math.PI&&(T=0,D=2*Math.PI);const z=(D-T)/b.curveStepCount,q=[];for(let O=T;O<=D;O+=z)q.push([w+v*Math.cos(O),C+L*Math.sin(O)]);return q.push([w+v*Math.cos(D),C+L*Math.sin(D)]),q.push([w,C]),lr([q],b)})(t,r,i,n,a,s,c));return c.stroke!==Wt&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),n=[],a=yc(t,i);if(i.fill&&i.fill!==Wt)if(i.fillStyle==="solid"){const s=yc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{const s=[],o=t;if(o.length){const l=typeof o[0][0]=="number"?[o]:o;for(const c of l)c.length<3?s.push(...c):c.length===3?s.push(...Ua(Cc([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):s.push(...Ua(Cc(c),10,(1+i.roughness)/2))}s.length&&n.push(lr([s],i))}return i.stroke!==Wt&&n.push(a),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],a=ln(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(Ya([t],i)):n.push(lr([t],i))),i.stroke!==Wt&&n.push(a),this._d("polygon",n,i)}path(t,r){const i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==Wt,s=i.stroke!==Wt,o=!!(i.simplification&&i.simplification<1),l=(function(h,u,d){const f=kp(vp(il(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...Ua(x,u)),x=[]},w=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:v,data:L}of f)switch(v){case"M":w(),y=[L[0],L[1]],m.push(y);break;case"L":b(),m.push([L[0],L[1]]);break;case"C":if(!x.length){const T=m.length?m[m.length-1]:y;x.push([T[0],T[1]])}x.push([L[0],L[1]]),x.push([L[2],L[3]]),x.push([L[4],L[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(w(),!d)return g;const C=[];for(const v of g){const L=lS(v,d);L.length&&C.push(L)}return C})(t,1,o?4-4*(i.simplification||1):(1+i.roughness)/2),c=bc(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=bc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push(Ya(l,i));else n.push(lr(l,i));return s&&(o?l.forEach((h=>{n.push(ln(h,!1,i))})):n.push(c)),this._d("path",n,i)}opsToPath(t,r){let i="";for(const n of t.ops){const a=typeof r=="number"&&r>=0?n.data.map((s=>+s.toFixed(r))):n.data;switch(n.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(const a of r){let s=null;switch(a.type){case"path":s={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Wt};break;case"fillPath":s={d:this.opsToPath(a),stroke:Wt,strokeWidth:0,fill:i.fill||Wt};break;case"fillSketch":s=this.fillSketch(a,i)}s&&n.push(s)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Wt,strokeWidth:i,fill:Wt}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class cS{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Hn(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const s of r)switch(s.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,s,a),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const o=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,s,a,o),n.restore();break}case"fillSketch":this.fillSketch(n,s,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(const a of r.ops){const s=typeof i=="number"&&i>=0?a.data.map((o=>+o.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(s[0],s[1]);break;case"bcurveTo":t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":t.lineTo(s[0],s[1])}}r.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,a){const s=this.gen.line(t,r,i,n,a);return this.draw(s),s}rectangle(t,r,i,n,a){const s=this.gen.rectangle(t,r,i,n,a);return this.draw(s),s}ellipse(t,r,i,n,a){const s=this.gen.ellipse(t,r,i,n,a);return this.draw(s),s}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,n,a,s,o=!1,l){const c=this.gen.arc(t,r,i,n,a,s,o,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 Vi="http://www.w3.org/2000/svg";class hS{constructor(t,r){this.svg=t,this.gen=new Hn(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(Vi,"g"),s=t.options.fixedDecimalPlaceDigits;for(const o of r){let l=null;switch(o.type){case"path":l=n.createElementNS(Vi,"path"),l.setAttribute("d",this.opsToPath(o,s)),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=n.createElementNS(Vi,"path"),l.setAttribute("d",this.opsToPath(o,s)),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(n,o,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const a=t.createElementNS(Vi,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",n+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,a){const s=this.gen.line(t,r,i,n,a);return this.draw(s)}rectangle(t,r,i,n,a){const s=this.gen.rectangle(t,r,i,n,a);return this.draw(s)}ellipse(t,r,i,n,a){const s=this.gen.ellipse(t,r,i,n,a);return this.draw(s)}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,n,a,s,o=!1,l){const c=this.gen.arc(t,r,i,n,a,s,o,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 Z={canvas:(e,t)=>new cS(e,t),svg:(e,t)=>new hS(e,t),generator:e=>new Hn(e),newSeed:()=>Hn.newSeed()},it=p(async(e,t,r)=>{let i;const n=t.useHtmlLabels||wt(ut()?.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),s=a.insert("g").attr("class","label").attr("style",Pt(t.labelStyle));let o;t.label===void 0?o="":o=typeof t.label=="string"?t.label:t.label[0];const l=await Ce(s,Ht(Fe(o),ut()),{useHtmlLabels:n,width:t.width||ut().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let c=l.getBBox();const h=(t?.padding??0)/2;if(n){const u=l.children[0],d=lt(l),f=u.getElementsByTagName("img");if(f){const g=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...f].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=ut().fontSize?ut().fontSize:window.getComputedStyle(document.body).fontSize,w=5,[C=ao.fontSize]=Ri(b),v=C*w+"px";m.style.minWidth=v,m.style.maxWidth=v}else m.style.width="100%";y(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return n?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:c,halfPadding:h,label:s}},"labelHelper"),Ga=p(async(e,t,r)=>{const i=r.useHtmlLabels||wt(ut()?.flowchart?.htmlLabels),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Ce(n,Ht(Fe(t),ut()),{useHtmlLabels:i,width:r.width||ut()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let s=a.getBBox();const o=r.padding/2;if(wt(ut()?.flowchart?.htmlLabels)){const l=a.children[0],c=lt(a);s=l.getBoundingClientRect(),c.attr("width",s.width),c.attr("height",s.height)}return i?n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):n.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:s,halfPadding:o,label:n}},"insertLabel"),Q=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),rt=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ot(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(ot,"createPathFromPoints");function Ae(e,t,r,i,n,a){const s=[],l=r-e,c=i-t,h=l/a,u=2*Math.PI/h,d=t+c/2;for(let f=0;f<=50;f++){const g=f/50,m=e+g*l,y=d+n*Math.sin(u*(m-e));s.push({x:m,y})}return s}p(Ae,"generateFullSineWavePoints");function Bi(e,t,r,i,n,a){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);s.push({x:-f,y:-g})}return s}p(Bi,"generateCirclePoints");var uS=p((e,t)=>{var r=e.x,i=e.y,n=t.x-r,a=t.y-i,s=e.width/2,o=e.height/2,l,c;return Math.abs(a)*s>Math.abs(n)*o?(a<0&&(o=-o),l=a===0?0:o*n/a,c=o):(n<0&&(s=-s),l=s,c=n===0?0:s*a/n),{x:r+l,y:i+c}},"intersectRect"),qr=uS;function Bp(e,t){t&&e.attr("style",t)}p(Bp,"applyStyle");async function $p(e){const t=lt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=ut();let n=e.label;e.label&&Ze(e.label)&&(n=await Qn(e.label.replace(rr.lineBreakRegex,`
186
- `),i));const s='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+n+"</span>";return r.html(Ht(s,i)),Bp(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}p($p,"addHtmlLabel");var dS=p(async(e,t,r,i)=>{let n=e||"";if(typeof n=="object"&&(n=n[0]),wt(ut().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),I.info("vertexText"+n);const a={isNode:i,label:Fe(n).replace(/fa[blrs]?:fa-[\w-]+/g,o=>`<i class='${o.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await $p(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",t.replace("color:","fill:"));let s=[];typeof n=="string"?s=n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?s=n:s=[];for(const o of s){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),a.appendChild(l)}return a}},"createLabel"),He=dS,Pe=p((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),Lp=p(async(e,t)=>{I.info("Creating subgraph rect for ",t.id,t);const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=V(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=wt(r.flowchart.htmlLabels),f=u.insert("g").attr("class","cluster-label "),g=await Ce(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0});let m=g.getBBox();if(wt(r.flowchart.htmlLabels)){const T=g.children[0],D=lt(g);m=T.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,w=t.y-x/2;I.trace("Data ",t,JSON.stringify(t));let C;if(t.look==="handDrawn"){const T=Z.svg(u),D=K(t,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:n}),z=T.path(Pe(b,w,y,x,0),D);C=u.insert(()=>(I.debug("Rough node insert CXC",z),z),":first-child"),C.select("path:nth-child(2)").attr("style",c.join(";")),C.select("path").attr("style",h.join(";").replace("fill","stroke"))}else C=u.insert("rect",":first-child"),C.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",w).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:v}=ca(r);if(f.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),o){const T=f.select("span");T&&T.attr("style",o)}const L=C.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=m.height-t.padding/2,t.intersect=function(T){return qr(t,T)},{cluster:u,labelBBox:m}},"rect"),fS=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),n=0*t.padding,a=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");const s=i.node().getBBox();return t.width=s.width,t.height=s.height,t.intersect=function(o){return qr(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),pS=p(async(e,t)=>{const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:o,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let d=c.append("rect");const f=u.node().appendChild(await He(t.label,t.labelStyle,void 0,!0));let g=f.getBBox();if(wt(r.flowchart.htmlLabels)){const z=f.children[0],q=lt(f);g=z.getBoundingClientRect(),q.attr("width",g.width),q.attr("height",g.height)}const m=0*t.padding,y=m/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,w=t.height+m-g.height-6,C=t.x-x/2,v=t.y-b/2;t.width=x;const L=t.y-t.height/2-y+g.height+2;let T;if(t.look==="handDrawn"){const z=t.cssClasses.includes("statediagram-cluster-alt"),q=Z.svg(c),O=t.rx||t.ry?q.path(Pe(C,v,x,b,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:n}):q.rectangle(C,v,x,b,{seed:n});T=c.insert(()=>O,":first-child");const W=q.rectangle(C,L,x,w,{fill:z?a:s,fillStyle:z?"hachure":"solid",stroke:l,seed:n});T=c.insert(()=>O,":first-child"),d=c.insert(()=>W)}else T=h.insert("rect",":first-child"),T.attr("class","outer").attr("x",C).attr("y",v).attr("width",x).attr("height",b).attr("data-look",t.look),d.attr("class","inner").attr("x",C).attr("y",L).attr("width",x).attr("height",w);u.attr("transform",`translate(${t.x-g.width/2}, ${v+1-(wt(r.flowchart.htmlLabels)?0:3)})`);const D=T.node().getBBox();return t.height=D.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(z){return qr(t,z)},{cluster:c,labelBBox:g}},"roundedWithTitle"),gS=p(async(e,t)=>{I.info("Creating subgraph rect for ",t.id,t);const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=V(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=wt(r.flowchart.htmlLabels),f=u.insert("g").attr("class","cluster-label "),g=await Ce(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let m=g.getBBox();if(wt(r.flowchart.htmlLabels)){const T=g.children[0],D=lt(g);m=T.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,w=t.y-x/2;I.trace("Data ",t,JSON.stringify(t));let C;if(t.look==="handDrawn"){const T=Z.svg(u),D=K(t,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:n}),z=T.path(Pe(b,w,y,x,t.rx),D);C=u.insert(()=>(I.debug("Rough node insert CXC",z),z),":first-child"),C.select("path:nth-child(2)").attr("style",c.join(";")),C.select("path").attr("style",h.join(";").replace("fill","stroke"))}else C=u.insert("rect",":first-child"),C.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",w).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:v}=ca(r);if(f.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),o){const T=f.select("span");T&&T.attr("style",o)}const L=C.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=m.height-t.padding/2,t.intersect=function(T){return qr(t,T)},{cluster:u,labelBBox:m}},"kanbanSection"),mS=p((e,t)=>{const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,s=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),o=s.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,d=t.y-h/2;t.width=c;let f;if(t.look==="handDrawn"){const y=Z.svg(s).rectangle(u,d,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});f=s.insert(()=>y,":first-child")}else f=o.insert("rect",":first-child"),f.attr("class","divider").attr("x",u).attr("y",d).attr("width",c).attr("height",h).attr("data-look",t.look);const g=f.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return qr(t,m)},{cluster:s,labelBBox:{}}},"divider"),yS=Lp,xS={rect:Lp,squareRect:yS,roundedWithTitle:pS,noteGroup:fS,divider:mS,kanbanSection:gS},Mp=new Map,Ap=p(async(e,t)=>{const r=t.shape||"rect",i=await xS[r](e,t);return Mp.set(t.id,i),i},"insertCluster"),bS=p(()=>{Mp=new Map},"clear");function Ep(e,t){return e.intersect(t)}p(Ep,"intersectNode");var wS=Ep;function Fp(e,t,r,i){var n=e.x,a=e.y,s=n-i.x,o=a-i.y,l=Math.sqrt(t*t*o*o+r*r*s*s),c=Math.abs(t*r*s/l);i.x<n&&(c=-c);var h=Math.abs(t*r*o/l);return i.y<a&&(h=-h),{x:n+c,y:a+h}}p(Fp,"intersectEllipse");var Pp=Fp;function Rp(e,t,r){return Pp(e,t,t,r)}p(Rp,"intersectCircle");var vS=Rp;function Op(e,t,r,i){{const n=t.y-e.y,a=e.x-t.x,s=t.x*e.y-e.x*t.y,o=n*r.x+a*r.y+s,l=n*i.x+a*i.y+s,c=1e-6;if(o!==0&&l!==0&&Ws(o,l))return;const h=i.y-r.y,u=r.x-i.x,d=i.x*r.y-r.x*i.y,f=h*e.x+u*e.y+d,g=h*t.x+u*t.y+d;if(Math.abs(f)<c&&Math.abs(g)<c&&Ws(f,g))return;const m=n*u-h*a;if(m===0)return;const y=Math.abs(m/2);let x=a*d-u*s;const b=x<0?(x-y)/m:(x+y)/m;x=h*s-n*d;const w=x<0?(x-y)/m:(x+y)/m;return{x:b,y:w}}}p(Op,"intersectLine");function Ws(e,t){return e*t>0}p(Ws,"sameSign");var kS=Op;function Dp(e,t,r){let i=e.x,n=e.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){s=Math.min(s,h.x),o=Math.min(o,h.y)}):(s=Math.min(s,t.x),o=Math.min(o,t.y));let l=i-e.width/2-s,c=n-e.height/2-o;for(let h=0;h<t.length;h++){let u=t[h],d=t[h<t.length-1?h+1:0],f=kS(e,r,{x:l+u.x,y:c+u.y},{x:l+d.x,y:c+d.y});f&&a.push(f)}return a.length?(a.length>1&&a.sort(function(h,u){let d=h.x-r.x,f=h.y-r.y,g=Math.sqrt(d*d+f*f),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return g<x?-1:g===x?0:1}),a[0]):e}p(Dp,"intersectPolygon");var CS=Dp,G={node:wS,circle:vS,ellipse:Pp,polygon:CS,rect:qr};function Np(e,t){const{labelStyles:r}=V(t);t.labelStyle=r;const i=rt(t);let n=i;i||(n="anchor");const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),s=1,{cssStyles:o}=t,l=Z.svg(a),c=K(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,s*2,c),u=a.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",Pt(o)),Q(t,u),t.intersect=function(d){return I.info("Circle intersect",t,s,d),G.circle(t,s,d)},a}p(Np,"anchor");function Hs(e,t,r,i,n,a,s){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,f=u/n,g=d/a,m=Math.sqrt(f**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*a*Math.sin(h)*(s?-1:1),b=c-y*n*Math.cos(h)*(s?-1:1),w=Math.atan2((t-b)/a,(e-x)/n);let v=Math.atan2((i-b)/a,(r-x)/n)-w;s&&v<0&&(v+=2*Math.PI),!s&&v>0&&(v-=2*Math.PI);const L=[];for(let T=0;T<20;T++){const D=T/19,z=w+D*v,q=x+n*Math.cos(z),O=b+a*Math.sin(z);L.push({x:q,y:O})}return L}p(Hs,"generateArcPoints");async function Ip(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=a.width+t.padding+20,o=a.height+t.padding,l=o/2,c=l/(2.5+o/50),{cssStyles:h}=t,u=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...Hs(-s/2,-o/2,-s/2,o/2,c,l,!1),{x:s/2,y:o/2},...Hs(s/2,o/2,s/2,-o/2,c,l,!0)],d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=ot(u),m=d.path(g,f),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${c/2}, 0)`),Q(t,y),t.intersect=function(x){return G.polygon(t,u,x)},n}p(Ip,"bowTieRect");function Re(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(Re,"insertPolygonShape");async function zp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=a.height+t.padding,o=12,l=a.width+t.padding+o,c=0,h=l,u=-s,d=0,f=[{x:c+o,y:u},{x:h,y:u},{x:h,y:d},{x:c,y:d},{x:c,y:u+o},{x:c+o,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=Z.svg(n),x=K(t,{}),b=ot(f),w=y.path(b,x);g=n.insert(()=>w,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),m&&g.attr("style",m)}else g=Re(n,l,s,f);return i&&g.attr("style",i),Q(t,g),t.intersect=function(y){return G.polygon(t,f,y)},n}p(zp,"card");function qp(e,t){const{nodeStyles:r}=V(t);t.label="";const i=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,a=Math.max(28,t.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=Z.svg(i),l=K(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=ot(s),h=o.path(c,l),u=i.insert(()=>h,":first-child");return n&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(d){return G.polygon(t,s,d)},i}p(qp,"choice");async function nl(e,t,r){const{labelStyles:i,nodeStyles:n}=V(t);t.labelStyle=i;const{shapeSvg:a,bbox:s,halfPadding:o}=await it(e,t,rt(t)),l=r?.padding??o,c=s.width/2+l;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const d=Z.svg(a),f=K(t,{}),g=d.circle(0,0,c*2,f);h=a.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",Pt(u))}else h=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0);return Q(t,h),t.calcIntersect=function(d,f){const g=d.width/2;return G.circle(d,g,f)},t.intersect=function(d){return I.info("Circle intersect",t,c,d),G.circle(t,c,d)},a}p(nl,"circle");function jp(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},s={x:-(i/2)*t,y:-(i/2)*r},o={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${o.x},${o.y}
187
- M ${n.x},${n.y} L ${s.x},${s.y}`}p(jp,"createLine");function Wp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:s}=t,o=Z.svg(n),l=K(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=o.circle(0,0,a*2,l),h=jp(a),u=o.path(h,l),d=n.insert(()=>c,":first-child");return d.insert(()=>u),s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",i),Q(t,d),t.intersect=function(f){return I.info("crossedCircle intersect",t,{radius:a,point:f}),G.circle(t,a,f)},n}p(Wp,"crossedCircle");function pe(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);s.push({x:-f,y:-g})}return s}p(pe,"generateCirclePoints");async function Hp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...pe(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...pe(o/2+c*2,-c,c,20,-180,-270),...pe(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...pe(o/2,l/2,c,20,0,90)],d=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...pe(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...pe(o/2+o*.1,-c,c,20,-180,-270),...pe(o/2+o*.1,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...pe(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2,y:l/2+c}],f=Z.svg(n),g=K(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=ot(u).replace("Z",""),x=f.path(y,g),b=ot(d),w=f.path(b,{...g}),C=n.insert("g",":first-child");return C.insert(()=>w,":first-child").attr("stroke-opacity",0),C.insert(()=>x,":first-child"),C.attr("class","text"),h&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${c}, 0)`),s.attr("transform",`translate(${-o/2+c-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,C),t.intersect=function(v){return G.polygon(t,d,v)},n}p(Hp,"curlyBraceLeft");function ge(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);s.push({x:f,y:g})}return s}p(ge,"generateCirclePoints");async function Yp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...ge(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...ge(o/2+c*2,-c,c,20,-180,-270),...ge(o/2+c*2,c,c,20,-90,-180),{x:o/2+c,y:l/2},...ge(o/2,l/2,c,20,0,90)],d=[{x:-o/2,y:-l/2-c},{x:o/2,y:-l/2-c},...ge(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...ge(o/2+c*2,-c,c,20,-180,-270),...ge(o/2+c*2,c,c,20,-90,-180),{x:o/2+c,y:l/2},...ge(o/2,l/2,c,20,0,90),{x:o/2,y:l/2+c},{x:-o/2,y:l/2+c}],f=Z.svg(n),g=K(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=ot(u).replace("Z",""),x=f.path(y,g),b=ot(d),w=f.path(b,{...g}),C=n.insert("g",":first-child");return C.insert(()=>w,":first-child").attr("stroke-opacity",0),C.insert(()=>x,":first-child"),C.attr("class","text"),h&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${-c}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,C),t.intersect=function(v){return G.polygon(t,d,v)},n}p(Yp,"curlyBraceRight");function Tt(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);s.push({x:-f,y:-g})}return s}p(Tt,"generateCirclePoints");async function Up(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Tt(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...Tt(o/2+c*2,-c,c,20,-180,-270),...Tt(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...Tt(o/2,l/2,c,20,0,90)],d=[...Tt(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...Tt(-o/2-c/2,-c,c,20,0,90),...Tt(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...Tt(-o/2+c+c/2,l/2,c,30,-180,-270)],f=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...Tt(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...Tt(o/2+c*2,-c,c,20,-180,-270),...Tt(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...Tt(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2-c-c/2,y:l/2+c},...Tt(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...Tt(-o/2-c/2,-c,c,20,0,90),...Tt(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...Tt(-o/2+c+c/2,l/2,c,30,-180,-270)],g=Z.svg(n),m=K(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=ot(u).replace("Z",""),b=g.path(x,m),C=ot(d).replace("Z",""),v=g.path(C,m),L=ot(f),T=g.path(L,{...m}),D=n.insert("g",":first-child");return D.insert(()=>T,":first-child").attr("stroke-opacity",0),D.insert(()=>b,":first-child"),D.insert(()=>v,":first-child"),D.attr("class","text"),h&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${c-c/4}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,D),t.intersect=function(z){return G.polygon(t,f,z)},n}p(Up,"curlyBraces");async function Gp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=80,o=20,l=Math.max(s,(a.width+(t.padding??0)*2)*1.25,t?.width??0),c=Math.max(o,a.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=l,m=c,y=g-h,x=m/4,b=[{x:y,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:y,y:m},...Bi(-y,-m/2,h,50,270,90)],w=ot(b),C=d.path(w,f),v=n.insert(()=>C,":first-child");return v.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-l/2}, ${-c/2})`),Q(t,v),t.intersect=function(L){return G.polygon(t,b,L)},n}p(Gp,"curvedTrapezoid");var _S=p((e,t,r,i,n,a)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),SS=p((e,t,r,i,n,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),TS=p((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Xp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+t.padding,t.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(a.height+c+t.padding,t.height??0);let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=Z.svg(n),g=SS(0,0,o,h,l,c),m=TS(0,c,o,h,l,c),y=f.path(g,K(t,{})),x=f.path(m,K(t,{fill:"none"}));u=n.insert(()=>x,":first-child"),u=n.insert(()=>y,":first-child"),u.attr("class","basic label-container"),d&&u.attr("style",d)}else{const f=_S(0,0,o,h,l,c);u=n.insert("path",":first-child").attr("d",f).attr("class","basic label-container").attr("style",Pt(d)).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),Q(t,u),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(t.padding??0)/1.5-(a.y-(a.top??0))})`),t.intersect=function(f){const g=G.rect(t,f),m=g.x-(t.x??0);if(l!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(g.y-(t.y??0))>(t.height??0)/2-c)){let y=c*c*(1-m*m/(l*l));y>0&&(y=Math.sqrt(y)),y=c-y,f.y-(t.y??0)>0&&(y=-y),g.y+=y}return g},n}p(Xp,"cylinder");async function Vp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=a.width+t.padding,l=a.height+t.padding,c=l*.2,h=-o/2,u=-l/2-c/2,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],y=f.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),s.attr("transform",`translate(${h+(t.padding??0)/2-(a.x-(a.left??0))}, ${u+c+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,x),t.intersect=function(b){return G.rect(t,b)},n}p(Vp,"dividedRectangle");async function Zp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s}=await it(e,t,rt(t)),l=a.width/2+s+5,c=a.width/2+s;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const d=Z.svg(n),f=K(t,{roughness:.2,strokeWidth:2.5}),g=K(t,{roughness:.2,strokeWidth:1.5}),m=d.circle(0,0,l*2,f),y=d.circle(0,0,c*2,g);h=n.insert("g",":first-child"),h.attr("class",Pt(t.cssClasses)).attr("style",Pt(u)),h.node()?.appendChild(m),h.node()?.appendChild(y)}else{h=n.insert("g",":first-child");const d=h.insert("circle",":first-child"),f=h.insert("circle");h.attr("class","basic label-container").attr("style",i),d.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),f.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return Q(t,h),t.intersect=function(d){return I.info("DoubleCircle intersect",t,l,d),G.circle(t,l,d)},n}p(Zp,"doublecircle");function Kp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=V(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),s=7,{cssStyles:o}=t,l=Z.svg(a),{nodeBorder:c}=r,h=K(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,s*2,h),d=a.insert(()=>u,":first-child");return d.selectAll("path").attr("style",`fill: ${c} !important;`),o&&o.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),n&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",n),Q(t,d),t.intersect=function(f){return I.info("filledCircle intersect",t,{radius:s,point:f}),G.circle(t,s,f)},a}p(Kp,"filledCircle");async function Qp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=a.width+(t.padding??0),l=o+a.height,c=o+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=t,d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=ot(h),m=d.path(g,f),y=n.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=o,t.height=l,Q(t,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(t.padding??0)/2+(a.y-(a.top??0))})`),t.intersect=function(x){return I.info("Triangle intersect",t,h,x),G.polygon(t,h,x)},n}p(Qp,"flippedTriangle");function Jp(e,t,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:a}=V(t);t.label="";const s=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:o}=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,u=-1*c/2,d=Z.svg(s),f=K(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=d.rectangle(h,u,l,c,f),m=s.insert(()=>g,":first-child");o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),Q(t,m);const y=i?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return G.rect(t,x)},s}p(Jp,"forkJoin");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const n=80,a=50,{shapeSvg:s,bbox:o}=await it(e,t,rt(t)),l=Math.max(n,o.width+(t.padding??0)*2,t?.width??0),c=Math.max(a,o.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,d=Z.svg(s),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},...Bi(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],m=ot(g),y=d.path(m,f),x=s.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),Q(t,x),t.intersect=function(b){return I.info("Pill intersect",t,{radius:h,point:b}),G.polygon(t,g,b)},s}p(tg,"halfRoundedRectangle");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=a.height+(t.padding??0),o=a.width+(t.padding??0)*2.5,{cssStyles:l}=t,c=Z.svg(n),h=K(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let u=o/2;const d=u/6;u=u+d;const f=s/2,g=f/2,m=u-g,y=[{x:-m,y:-f},{x:0,y:-f},{x:m,y:-f},{x:u,y:0},{x:m,y:f},{x:0,y:f},{x:-m,y:f},{x:-u,y:0}],x=ot(y),b=c.path(x,h),w=n.insert(()=>b,":first-child");return w.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),t.width=o,t.height=s,Q(t,w),t.intersect=function(C){return G.polygon(t,y,C)},n}p(eg,"hexagon");async function rg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.label="",t.labelStyle=r;const{shapeSvg:n}=await it(e,t,rt(t)),a=Math.max(30,t?.width??0),s=Math.max(30,t?.height??0),{cssStyles:o}=t,l=Z.svg(n),c=K(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],u=ot(h),d=l.path(u,c),f=n.insert(()=>d,":first-child");return f.attr("class","basic label-container"),o&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(${-a/2}, ${-s/2})`),Q(t,f),t.intersect=function(g){return I.info("Pill intersect",t,{points:h}),G.polygon(t,h,g)},n}p(rg,"hourglass");async function ig(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=V(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await it(e,t,"icon-shape default"),d=t.pos==="t",f=o,g=o,{nodeBorder:m}=r,{stylesMap:y}=Dr(t),x=-g/2,b=-f/2,w=t.label?8:0,C=Z.svg(c),v=K(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const L=C.rectangle(x,b,g,f,v),T=Math.max(g,h.width),D=f+h.height+w,z=C.rectangle(-T/2,-D/2,T,D,{...v,fill:"transparent",stroke:"none"}),q=c.insert(()=>L,":first-child"),O=c.insert(()=>z);if(t.icon){const W=c.append("g");W.html(`<g>${await zr(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const j=W.node().getBBox(),$=j.width,M=j.height,B=j.x,P=j.y;W.attr("transform",`translate(${-$/2-B},${d?h.height/2+w/2-M/2-P:-h.height/2-w/2-M/2-P})`),W.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-D/2:D/2-h.height})`),q.attr("transform",`translate(0,${d?h.height/2+w/2:-h.height/2-w/2})`),Q(t,O),t.intersect=function(W){if(I.info("iconSquare intersect",t,W),!t.label)return G.rect(t,W);const j=t.x??0,$=t.y??0,M=t.height??0;let B=[];return d?B=[{x:j-h.width/2,y:$-M/2},{x:j+h.width/2,y:$-M/2},{x:j+h.width/2,y:$-M/2+h.height+w},{x:j+g/2,y:$-M/2+h.height+w},{x:j+g/2,y:$+M/2},{x:j-g/2,y:$+M/2},{x:j-g/2,y:$-M/2+h.height+w},{x:j-h.width/2,y:$-M/2+h.height+w}]:B=[{x:j-g/2,y:$-M/2},{x:j+g/2,y:$-M/2},{x:j+g/2,y:$-M/2+f},{x:j+h.width/2,y:$-M/2+f},{x:j+h.width/2/2,y:$+M/2},{x:j-h.width/2,y:$+M/2},{x:j-h.width/2,y:$-M/2+f},{x:j-g/2,y:$-M/2+f}],G.polygon(t,B,W)},c}p(ig,"icon");async function ng(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=V(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await it(e,t,"icon-shape default"),d=20,f=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=Dr(t),b=Z.svg(c),w=K(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const C=x.get("fill");w.stroke=C??y;const v=c.append("g");t.icon&&v.html(`<g>${await zr(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const L=v.node().getBBox(),T=L.width,D=L.height,z=L.x,q=L.y,O=Math.max(T,D)*Math.SQRT2+d*2,W=b.circle(0,0,O,w),j=Math.max(O,h.width),$=O+h.height+f,M=b.rectangle(-j/2,-$/2,j,$,{...w,fill:"transparent",stroke:"none"}),B=c.insert(()=>W,":first-child"),P=c.insert(()=>M);return v.attr("transform",`translate(${-T/2-z},${g?h.height/2+f/2-D/2-q:-h.height/2-f/2-D/2-q})`),v.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-$/2:$/2-h.height})`),B.attr("transform",`translate(0,${g?h.height/2+f/2:-h.height/2-f/2})`),Q(t,P),t.intersect=function(E){return I.info("iconSquare intersect",t,E),G.rect(t,E)},c}p(ng,"iconCircle");async function ag(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=V(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await it(e,t,"icon-shape default"),f=t.pos==="t",g=o+u*2,m=o+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Dr(t),w=-m/2,C=-g/2,v=t.label?8:0,L=Z.svg(c),T=K(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const D=b.get("fill");T.stroke=D??x;const z=L.path(Pe(w,C,m,g,5),T),q=Math.max(m,h.width),O=g+h.height+v,W=L.rectangle(-q/2,-O/2,q,O,{...T,fill:"transparent",stroke:"none"}),j=c.insert(()=>z,":first-child").attr("class","icon-shape2"),$=c.insert(()=>W);if(t.icon){const M=c.append("g");M.html(`<g>${await zr(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const B=M.node().getBBox(),P=B.width,E=B.height,A=B.x,N=B.y;M.attr("transform",`translate(${-P/2-A},${f?h.height/2+v/2-E/2-N:-h.height/2-v/2-E/2-N})`),M.attr("style",`color: ${b.get("stroke")??y};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-O/2:O/2-h.height})`),j.attr("transform",`translate(0,${f?h.height/2+v/2:-h.height/2-v/2})`),Q(t,$),t.intersect=function(M){if(I.info("iconSquare intersect",t,M),!t.label)return G.rect(t,M);const B=t.x??0,P=t.y??0,E=t.height??0;let A=[];return f?A=[{x:B-h.width/2,y:P-E/2},{x:B+h.width/2,y:P-E/2},{x:B+h.width/2,y:P-E/2+h.height+v},{x:B+m/2,y:P-E/2+h.height+v},{x:B+m/2,y:P+E/2},{x:B-m/2,y:P+E/2},{x:B-m/2,y:P-E/2+h.height+v},{x:B-h.width/2,y:P-E/2+h.height+v}]:A=[{x:B-m/2,y:P-E/2},{x:B+m/2,y:P-E/2},{x:B+m/2,y:P-E/2+g},{x:B+h.width/2,y:P-E/2+g},{x:B+h.width/2/2,y:P+E/2},{x:B-h.width/2,y:P+E/2},{x:B-h.width/2,y:P-E/2+g},{x:B-m/2,y:P-E/2+g}],G.polygon(t,A,M)},c}p(ag,"iconRounded");async function sg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=V(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await it(e,t,"icon-shape default"),f=t.pos==="t",g=o+u*2,m=o+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Dr(t),w=-m/2,C=-g/2,v=t.label?8:0,L=Z.svg(c),T=K(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const D=b.get("fill");T.stroke=D??x;const z=L.path(Pe(w,C,m,g,.1),T),q=Math.max(m,h.width),O=g+h.height+v,W=L.rectangle(-q/2,-O/2,q,O,{...T,fill:"transparent",stroke:"none"}),j=c.insert(()=>z,":first-child"),$=c.insert(()=>W);if(t.icon){const M=c.append("g");M.html(`<g>${await zr(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const B=M.node().getBBox(),P=B.width,E=B.height,A=B.x,N=B.y;M.attr("transform",`translate(${-P/2-A},${f?h.height/2+v/2-E/2-N:-h.height/2-v/2-E/2-N})`),M.attr("style",`color: ${b.get("stroke")??y};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-O/2:O/2-h.height})`),j.attr("transform",`translate(0,${f?h.height/2+v/2:-h.height/2-v/2})`),Q(t,$),t.intersect=function(M){if(I.info("iconSquare intersect",t,M),!t.label)return G.rect(t,M);const B=t.x??0,P=t.y??0,E=t.height??0;let A=[];return f?A=[{x:B-h.width/2,y:P-E/2},{x:B+h.width/2,y:P-E/2},{x:B+h.width/2,y:P-E/2+h.height+v},{x:B+m/2,y:P-E/2+h.height+v},{x:B+m/2,y:P+E/2},{x:B-m/2,y:P+E/2},{x:B-m/2,y:P-E/2+h.height+v},{x:B-h.width/2,y:P-E/2+h.height+v}]:A=[{x:B-m/2,y:P-E/2},{x:B+m/2,y:P-E/2},{x:B+m/2,y:P-E/2+g},{x:B+h.width/2,y:P-E/2+g},{x:B+h.width/2/2,y:P+E/2},{x:B-h.width/2,y:P+E/2},{x:B-h.width/2,y:P-E/2+g},{x:B-m/2,y:P-E/2+g}],G.polygon(t,A,M)},c}p(sg,"iconSquare");async function og(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/a;const{labelStyles:s}=V(t);t.labelStyle=s;const o=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?o??0:0,t?.assetWidth??n),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(c,o??0);const{shapeSvg:u,bbox:d,label:f}=await it(e,t,"image-shape default"),g=t.pos==="t",m=-c/2,y=-h/2,x=t.label?8:0,b=Z.svg(u),w=K(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const C=b.rectangle(m,y,c,h,w),v=Math.max(c,d.width),L=h+d.height+x,T=b.rectangle(-v/2,-L/2,v,L,{...w,fill:"none",stroke:"none"}),D=u.insert(()=>C,":first-child"),z=u.insert(()=>T);if(t.img){const q=u.append("image");q.attr("href",t.img),q.attr("width",c),q.attr("height",h),q.attr("preserveAspectRatio","none"),q.attr("transform",`translate(${-c/2},${g?L/2-h:-L/2})`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-h/2-d.height/2-x/2:h/2-d.height/2+x/2})`),D.attr("transform",`translate(0,${g?d.height/2+x/2:-d.height/2-x/2})`),Q(t,z),t.intersect=function(q){if(I.info("iconSquare intersect",t,q),!t.label)return G.rect(t,q);const O=t.x??0,W=t.y??0,j=t.height??0;let $=[];return g?$=[{x:O-d.width/2,y:W-j/2},{x:O+d.width/2,y:W-j/2},{x:O+d.width/2,y:W-j/2+d.height+x},{x:O+c/2,y:W-j/2+d.height+x},{x:O+c/2,y:W+j/2},{x:O-c/2,y:W+j/2},{x:O-c/2,y:W-j/2+d.height+x},{x:O-d.width/2,y:W-j/2+d.height+x}]:$=[{x:O-c/2,y:W-j/2},{x:O+c/2,y:W-j/2},{x:O+c/2,y:W-j/2+h},{x:O+d.width/2,y:W-j/2+h},{x:O+d.width/2/2,y:W+j/2},{x:O-d.width/2,y:W+j/2},{x:O-d.width/2,y:W-j/2+h},{x:O-c/2,y:W-j/2+h}],G.polygon(t,$,q)},u}p(og,"imageSquare");async function lg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),o=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Z.svg(n),d=K(t,{}),f=ot(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=Re(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,Q(t,c),t.intersect=function(u){return G.polygon(t,l,u)},n}p(lg,"inv_trapezoid");async function ka(e,t,r){const{labelStyles:i,nodeStyles:n}=V(t);t.labelStyle=i;const{shapeSvg:a,bbox:s}=await it(e,t,rt(t)),o=Math.max(s.width+r.labelPaddingX*2,t?.width||0),l=Math.max(s.height+r.labelPaddingY*2,t?.height||0),c=-o/2,h=-l/2;let u,{rx:d,ry:f}=t;const{cssStyles:g}=t;if(r?.rx&&r.ry&&(d=r.rx,f=r.ry),t.look==="handDrawn"){const m=Z.svg(a),y=K(t,{}),x=d||f?m.path(Pe(c,h,o,l,d||0),y):m.rectangle(c,h,o,l,y);u=a.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",Pt(g))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",Pt(d)).attr("ry",Pt(f)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return Q(t,u),t.calcIntersect=function(m,y){return G.rect(m,y)},t.intersect=function(m){return G.rect(t,m)},a}p(ka,"drawRect");async function cg(e,t){const{shapeSvg:r,bbox:i,label:n}=await it(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Q(t,a),t.intersect=function(l){return G.rect(t,l)},r}p(cg,"labelRect");async function hg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0),t?.width??0),o=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-(3*o)/6,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Z.svg(n),d=K(t,{}),f=ot(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=Re(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,Q(t,c),t.intersect=function(u){return G.polygon(t,l,u)},n}p(hg,"lean_left");async function ug(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0),t?.width??0),o=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Z.svg(n),d=K(t,{}),f=ot(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=Re(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,Q(t,c),t.intersect=function(u){return G.polygon(t,l,u)},n}p(ug,"lean_right");function dg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.label="",t.labelStyle=r;const n=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=Math.max(35,t?.width??0),o=Math.max(35,t?.height??0),l=7,c=[{x:s,y:0},{x:0,y:o+l/2},{x:s-2*l,y:o+l/2},{x:0,y:2*o},{x:s,y:o-l/2},{x:2*l,y:o-l/2}],h=Z.svg(n),u=K(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=ot(c),f=h.path(d,u),g=n.insert(()=>f,":first-child");return a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${s/2},${-o})`),Q(t,g),t.intersect=function(m){return I.info("lightningBolt intersect",t,m),G.polygon(t,c,m)},n}p(dg,"lightningBolt");var BS=p((e,t,r,i,n,a,s)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+s}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),$S=p((e,t,r,i,n,a,s)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+s}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),LS=p((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function fg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0),t.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(a.height+c+(t.padding??0),t.height??0),u=h*.1;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=Z.svg(n),m=$S(0,0,o,h,l,c,u),y=LS(0,c,o,h,l,c),x=K(t,{}),b=g.path(m,x),w=g.path(y,x);n.insert(()=>w,":first-child").attr("class","line"),d=n.insert(()=>b,":first-child"),d.attr("class","basic label-container"),f&&d.attr("style",f)}else{const g=BS(0,0,o,h,l,c,u);d=n.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Pt(f)).attr("style",i)}return d.attr("label-offset-y",c),d.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),Q(t,d),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),t.intersect=function(g){const m=G.rect(t,g),y=m.x-(t.x??0);if(l!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-c)){let x=c*c*(1-y*y/(l*l));x>0&&(x=Math.sqrt(x)),x=c-x,g.y-(t.y??0)>0&&(x=-x),m.y+=x}return m},n}p(fg,"linedCylinder");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,{cssStyles:u}=t,d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=[{x:-o/2-o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:h/2},...Ae(-o/2-o/2*.1,h/2,o/2+o/2*.1,h/2,c,.8),{x:o/2+o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:-h/2},{x:-o/2,y:-h/2},{x:-o/2,y:h/2*1.1},{x:-o/2,y:-h/2}],m=d.polygon(g.map(x=>[x.x,x.y]),f),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)+o/2*.1/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),Q(t,y),t.intersect=function(x){return G.polygon(t,g,x)},n}p(pg,"linedWaveEdgedRect");async function gg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,h=-o/2,u=-l/2,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{}),m=[{x:h-c,y:u+c},{x:h-c,y:u+l+c},{x:h+o-c,y:u+l+c},{x:h+o-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u+l-c},{x:h+o+c,y:u+l-c},{x:h+o+c,y:u-c},{x:h+c,y:u-c},{x:h+c,y:u},{x:h,y:u},{x:h,y:u+c}],y=[{x:h,y:u+c},{x:h+o-c,y:u+c},{x:h+o-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ot(m),b=f.path(x,g),w=ot(y),C=f.path(w,{...g,fill:"none"}),v=n.insert(()=>C,":first-child");return v.insert(()=>b,":first-child"),v.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),s.attr("transform",`translate(${-(a.width/2)-c-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),Q(t,v),t.intersect=function(L){return G.polygon(t,m,L)},n}p(gg,"multiRect");async function mg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,u=-o/2,d=-h/2,f=5,{cssStyles:g}=t,m=Ae(u-f,d+h+f,u+o-f,d+h+f,c,.8),y=m?.[m.length-1],x=[{x:u-f,y:d+f},{x:u-f,y:d+h+f},...m,{x:u+o-f,y:y.y-f},{x:u+o,y:y.y-f},{x:u+o,y:y.y-2*f},{x:u+o+f,y:y.y-2*f},{x:u+o+f,y:d-f},{x:u+f,y:d-f},{x:u+f,y:d},{x:u,y:d},{x:u,y:d+f}],b=[{x:u,y:d+f},{x:u+o-f,y:d+f},{x:u+o-f,y:y.y-f},{x:u+o,y:y.y-f},{x:u+o,y:d},{x:u,y:d}],w=Z.svg(n),C=K(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const v=ot(x),L=w.path(v,C),T=ot(b),D=w.path(T,C),z=n.insert(()=>L,":first-child");return z.insert(()=>D),z.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",i),z.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-(a.width/2)-f-(a.x-(a.left??0))}, ${-(a.height/2)+f-c/2-(a.y-(a.top??0))})`),Q(t,z),t.intersect=function(q){return G.polygon(t,x,q)},n}p(mg,"multiWaveEdgedRectangle");async function yg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=V(t);t.labelStyle=i,t.useHtmlLabels||$t().flowchart?.htmlLabels!==!1||(t.centerLabel=!0);const{shapeSvg:s,bbox:o,label:l}=await it(e,t,rt(t)),c=Math.max(o.width+(t.padding??0)*2,t?.width??0),h=Math.max(o.height+(t.padding??0)*2,t?.height??0),u=-c/2,d=-h/2,{cssStyles:f}=t,g=Z.svg(s),m=K(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=g.rectangle(u,d,c,h,m),x=s.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),n&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",n),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Q(t,x),t.intersect=function(b){return G.rect(t,b)},s}p(yg,"note");var MS=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 xg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=a.width+t.padding,o=a.height+t.padding,l=s+o,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=Z.svg(n),g=K(t,{}),m=MS(0,0,l),y=f.path(m,g);u=n.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),d&&u.attr("style",d)}else u=Re(n,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),Q(t,u),t.calcIntersect=function(f,g){const m=f.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=G.polygon(f,y,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(f){return this.calcIntersect(t,f)},n}p(xg,"question");async function bg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),l=Math.max(a.height+(t.padding??0),t?.height??0),c=-o/2,h=-l/2,u=h/2,d=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],{cssStyles:f}=t,g=Z.svg(n),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=ot(d),x=g.path(y,m),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-u/2},0)`),s.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Q(t,b),t.intersect=function(w){return G.polygon(t,d,w)},n}p(bg,"rect_left_inv_arrow");async function wg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),s=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=o.node().appendChild(await He(c,t.labelStyle,!0,!0));let u={width:0,height:0};if(wt(ut()?.flowchart?.htmlLabels)){const D=h.children[0],z=lt(h);u=D.getBoundingClientRect(),z.attr("width",u.width),z.attr("height",u.height)}I.info("Text 2",l);const d=l||[],f=h.getBBox(),g=o.node().appendChild(await He(d.join?d.join("<br/>"):d,t.labelStyle,!0,!0)),m=g.children[0],y=lt(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;lt(g).attr("transform","translate( "+(u.width>f.width?0:(f.width-u.width)/2)+", "+(f.height+x+5)+")"),lt(h).attr("transform","translate( "+(u.width<f.width?0:-(f.width-u.width)/2)+", 0)"),u=o.node().getBBox(),o.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const b=u.width+(t.padding||0),w=u.height+(t.padding||0),C=-u.width/2-x,v=-u.height/2-x;let L,T;if(t.look==="handDrawn"){const D=Z.svg(a),z=K(t,{}),q=D.path(Pe(C,v,b,w,t.rx||0),z),O=D.line(-u.width/2-x,-u.height/2-x+f.height+x,u.width/2+x,-u.height/2-x+f.height+x,z);T=a.insert(()=>(I.debug("Rough node insert CXC",q),O),":first-child"),L=a.insert(()=>(I.debug("Rough node insert CXC",q),q),":first-child")}else L=s.insert("rect",":first-child"),T=s.insert("line"),L.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),T.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+f.height+x).attr("y2",-u.height/2-x+f.height+x);return Q(t,L),t.intersect=function(D){return G.rect(t,D)},a}p(wg,"rectWithTitle");function ai(e,t,r,i,n,a,s){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,f=u/n,g=d/a,m=Math.sqrt(f**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*a*Math.sin(h)*(s?-1:1),b=c-y*n*Math.cos(h)*(s?-1:1),w=Math.atan2((t-b)/a,(e-x)/n);let v=Math.atan2((i-b)/a,(r-x)/n)-w;s&&v<0&&(v+=2*Math.PI),!s&&v>0&&(v-=2*Math.PI);const L=[];for(let T=0;T<20;T++){const D=T/19,z=w+D*v,q=x+n*Math.cos(z),O=b+a*Math.sin(z);L.push({x:q,y:O})}return L}p(ai,"generateArcPoints");async function vg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=t?.padding??0,o=t?.padding??0,l=(t?.width?t?.width:a.width)+s*2,c=(t?.height?t?.height:a.height)+o*2,h=t.radius||5,u=t.taper||5,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{});t.stroke&&(g.stroke=t.stroke),t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-l/2+u,y:-c/2},{x:l/2-u,y:-c/2},...ai(l/2-u,-c/2,l/2,-c/2+u,h,h,!0),{x:l/2,y:-c/2+u},{x:l/2,y:c/2-u},...ai(l/2,c/2-u,l/2-u,c/2,h,h,!0),{x:l/2-u,y:c/2},{x:-l/2+u,y:c/2},...ai(-l/2+u,c/2,-l/2,c/2-u,h,h,!0),{x:-l/2,y:c/2-u},{x:-l/2,y:-c/2+u},...ai(-l/2,-c/2+u,-l/2+u,-c/2,h,h,!0)],y=ot(m),x=f.path(y,g),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),Q(t,b),t.intersect=function(w){return G.polygon(t,m,w)},n}p(vg,"roundedRect");async function kg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=t?.padding??0,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=-a.width/2-o,u=-a.height/2-o,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],y=f.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",Pt(d)),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),s.attr("transform",`translate(${-l/2+4+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-(a.y-(a.top??0))})`),Q(t,x),t.intersect=function(b){return G.rect(t,b)},n}p(kg,"shadedProcess");async function Cg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=-o/2,h=-l/2,{cssStyles:u}=t,d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=[{x:c,y:h},{x:c,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h-l/2}],m=ot(g),y=d.path(m,f),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${l/4})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))}, ${-l/4+(t.padding??0)-(a.y-(a.top??0))})`),Q(t,x),t.intersect=function(b){return G.polygon(t,g,b)},n}p(Cg,"slopedRect");async function _g(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1};return ka(e,t,r)}p(_g,"squareRect");async function Sg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=a.height+t.padding,o=a.width+s/4+t.padding,l=s/2,{cssStyles:c}=t,h=Z.svg(n),u=K(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=[{x:-o/2+l,y:-s/2},{x:o/2-l,y:-s/2},...Bi(-o/2+l,0,l,50,90,270),{x:o/2-l,y:s/2},...Bi(o/2-l,0,l,50,270,450)],f=ot(d),g=h.path(f,u),m=n.insert(()=>g,":first-child");return m.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),Q(t,m),t.intersect=function(y){return G.polygon(t,d,y)},n}p(Sg,"stadium");async function Tg(e,t){return ka(e,t,{rx:5,ry:5})}p(Tg,"state");function Bg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=V(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:s,stateBorder:o,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=Z.svg(c),u=K(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=h.circle(0,0,14,{...u,stroke:s,strokeWidth:2}),f=o??l,g=h.circle(0,0,5,{...u,fill:f,stroke:f,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>d,":first-child");return m.insert(()=>g),a&&m.selectAll("path").attr("style",a),n&&m.selectAll("path").attr("style",n),Q(t,m),t.intersect=function(y){return G.circle(t,7,y)},c}p(Bg,"stateEnd");function $g(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const o=Z.svg(n).circle(0,0,14,mv(i));a=n.insert(()=>o),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=n.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Q(t,a),t.intersect=function(s){return G.circle(t,7,s)},n}p($g,"stateStart");async function Lg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=(t?.padding||0)/2,o=a.width+t.padding,l=a.height+t.padding,c=-a.width/2-s,h=-a.height/2-s,u=[{x:0,y:0},{x:o,y:0},{x:o,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(t.look==="handDrawn"){const d=Z.svg(n),f=K(t,{}),g=d.rectangle(c-8,h,o+16,l,f),m=d.line(c,h,c,h+l,f),y=d.line(c+o,h,c+o,h+l,f);n.insert(()=>m,":first-child"),n.insert(()=>y,":first-child");const x=n.insert(()=>g,":first-child"),{cssStyles:b}=t;x.attr("class","basic label-container").attr("style",Pt(b)),Q(t,x)}else{const d=Re(n,o,l,u);i&&d.attr("style",i),Q(t,d)}return t.intersect=function(d){return G.polygon(t,u,d)},n}p(Lg,"subroutine");async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),o=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=-s/2,c=-o/2,h=.2*o,u=.2*o,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{}),m=[{x:l-h/2,y:c},{x:l+s+h/2,y:c},{x:l+s+h/2,y:c+o},{x:l-h/2,y:c+o}],y=[{x:l+s-h/2,y:c+o},{x:l+s+h/2,y:c+o},{x:l+s+h/2,y:c+o-u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ot(m),b=f.path(x,g),w=ot(y),C=f.path(w,{...g,fillStyle:"solid"}),v=n.insert(()=>C,":first-child");return v.insert(()=>b,":first-child"),v.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),Q(t,v),t.intersect=function(L){return G.polygon(t,m,L)},n}p(Mg,"taggedRect");async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=.2*o,u=.2*l,d=l+c,{cssStyles:f}=t,g=Z.svg(n),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-o/2-o/2*.1,y:d/2},...Ae(-o/2-o/2*.1,d/2,o/2+o/2*.1,d/2,c,.8),{x:o/2+o/2*.1,y:-d/2},{x:-o/2-o/2*.1,y:-d/2}],x=-o/2+o/2*.1,b=-d/2-u*.4,w=[{x:x+o-h,y:(b+l)*1.4},{x:x+o,y:b+l-u},{x:x+o,y:(b+l)*.9},...Ae(x+o,(b+l)*1.3,x+o-h,(b+l)*1.5,-l*.03,.5)],C=ot(y),v=g.path(C,m),L=ot(w),T=g.path(L,{...m,fillStyle:"solid"}),D=n.insert(()=>T,":first-child");return D.insert(()=>v,":first-child"),D.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),Q(t,D),t.intersect=function(z){return G.polygon(t,y,z)},n}p(Ag,"taggedWaveEdgedRectangle");async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=Math.max(a.width+t.padding,t?.width||0),o=Math.max(a.height+t.padding,t?.height||0),l=-s/2,c=-o/2,h=n.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",s).attr("height",o),Q(t,h),t.intersect=function(u){return G.rect(t,u)},n}p(Eg,"text");var AS=p((e,t,r,i,n,a)=>`M${e},${t}
182
+ `),n=op(i);return t===!1?n.replace(/ /g,"&nbsp;"):n}p(dp,"preprocessMarkdown");function fp(e,t={}){const r=dp(e,t),i=dt.lexer(r),n=[[]];let a=0;function s(o,l="normal"){o.type==="text"?o.text.split(`
183
+ `).forEach((h,u)=>{u!==0&&(a++,n.push([])),h.split(" ").forEach(d=>{d=d.replace(/&#39;/g,"'"),d&&n[a].push({content:d,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(c=>{s(c,o.type)}):o.type==="html"&&n[a].push({content:o.text,type:"normal"})}return p(s,"processNode"),i.forEach(o=>{o.type==="paragraph"?o.tokens?.forEach(l=>{s(l)}):o.type==="html"?n[a].push({content:o.text,type:"normal"}):n[a].push({content:o.raw,type:"normal"})}),n}p(fp,"markdownToLines");function pp(e,{markdownAutoWrap:t}={}){const r=dt.lexer(e);function i(n){return n.type==="text"?t===!1?n.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):n.text.replace(/\n */g,"<br/>"):n.type==="strong"?`<strong>${n.tokens?.map(i).join("")}</strong>`:n.type==="em"?`<em>${n.tokens?.map(i).join("")}</em>`:n.type==="paragraph"?`<p>${n.tokens?.map(i).join("")}</p>`:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:(I.warn(`Unsupported markdown: ${n.type}`),n.raw)}return p(i,"output"),r.map(i).join("")}p(pp,"markdownToHTML");function gp(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(gp,"splitTextToChars");function mp(e,t){const r=gp(t.content);return tl(e,[],r,t.type)}p(mp,"splitWordToFitWidth");function tl(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...a]=r,s=[...t,n];return e([{content:s.join(""),type:i}])?tl(e,s,a,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(tl,"splitWordToFitWidthRecursion");function yp(e,t){if(e.some(({content:r})=>r.includes(`
184
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return zn(e,t)}p(yp,"splitLineToFitWidth");function zn(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},s=[...i];if(n!==""&&s.push({content:n,type:"normal"}),s.push(a),t(s))return zn(e,t,r,s);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[o,l]=mp(t,a);r.push([o]),l.content&&e.unshift(l)}return zn(e,t,r)}p(zn,"splitLineToFitWidthRecursion");function Is(e,t){t&&e.attr("style",t)}p(Is,"applyStyle");async function xp(e,t,r,i,n=!1,a=$t()){const s=e.append("foreignObject");s.attr("width",`${10*r}px`),s.attr("height",`${10*r}px`);const o=s.append("xhtml:div"),l=Ze(t.label)?await Qn(t.label.replace(rr.lineBreakRegex,`
185
+ `),a):Ht(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",h=o.append("span");h.html(l),Is(h,t.labelStyle),h.attr("class",`${c} ${i}`),Is(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&o.attr("class","labelBkg");let u=o.node().getBoundingClientRect();return u.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),u=o.node().getBoundingClientRect()),s.node()}p(xp,"addHtmlSpan");function ba(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}p(ba,"createTspan");function bp(e,t,r){const i=e.append("text"),n=ba(i,1,t);wa(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}p(bp,"computeWidthOfText");function wp(e,t,r){const i=e.append("text"),n=ba(i,1,t);wa(n,[{content:r,type:"normal"}]);const a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}p(wp,"computeDimensionOfText");function vp(e,t,r,i=!1){const a=t.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),o=a.append("text").attr("y","-10.1");let l=0;for(const c of r){const h=p(d=>bp(a,1.1,d)<=e,"checkWidth"),u=h(c)?[c]:yp(c,h);for(const d of u){const f=ba(o,l,1.1);wa(f,d),l++}}if(i){const c=o.node().getBBox(),h=2;return s.attr("x",c.x-h).attr("y",c.y-h).attr("width",c.width+2*h).attr("height",c.height+2*h),a.node()}else return o.node()}p(vp,"createFormattedText");function wa(e,t){e.text(""),t.forEach((r,i)=>{const n=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?n.text(r.content):n.text(" "+r.content)})}p(wa,"updateTextContentAndStyles");async function el(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(n,a,s)=>(r.push((async()=>{const o=`${a}:${s}`;return await K_(o)?await zr(o,void 0,{class:"label-icon"}):`<i class='${Ht(n,t).replace(":"," ")}'></i>`})()),n));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(el,"replaceIconSubstring");var Ce=p(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},c)=>{if(I.debug("XYZ createText",t,r,i,n,a,s,"addSvgBackground: ",l),a){const h=pp(t,c),u=await el(Fe(h),c),d=t.replace(/\\\\/g,"\\"),f={isNode:s,label:Ze(t)?d:u,labelStyle:r.replace("fill:","color:")};return await xp(e,f,o,n,l,c)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=fp(h.replace("<br>","<br/>"),c),d=vp(o,e,u,t?l:!1);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");lt(d).attr("style",f)}else{const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");lt(d).select("rect").attr("style",f.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");lt(d).select("text").attr("style",g)}return d}},"createText");function ja(e,t,r){if(e&&e.length){const[i,n]=t,a=Math.PI/180*r,s=Math.cos(a),o=Math.sin(a);for(const l of e){const[c,h]=l;l[0]=(c-i)*s-(h-n)*o+i,l[1]=(c-i)*o+(h-n)*s+n}}}function Q_(e,t){return e[0]===t[0]&&e[1]===t[1]}function J_(e,t,r,i=1){const n=r,a=Math.max(t,.1),s=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(n)for(const c of s)ja(c,o,n);const l=(function(c,h,u){const d=[];for(const b of c){const w=[...b];Q_(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&d.push(w)}const f=[];h=Math.max(h,.1);const g=[];for(const b of d)for(let w=0;w<b.length-1;w++){const C=b[w],v=b[w+1];if(C[1]!==v[1]){const L=Math.min(C[1],v[1]);g.push({ymin:L,ymax:Math.max(C[1],v[1]),x:L===C[1]?C[0]:v[0],islope:(v[0]-C[0])/(v[1]-C[1])})}}if(g.sort(((b,w)=>b.ymin<w.ymin?-1:b.ymin>w.ymin?1:b.x<w.x?-1:b.x>w.x?1:b.ymax===w.ymax?0:(b.ymax-w.ymax)/Math.abs(b.ymax-w.ymax))),!g.length)return f;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let w=0;w<g.length&&!(g[w].ymin>y);w++)b=w;g.splice(0,b+1).forEach((w=>{m.push({s:y,edge:w})}))}if(m=m.filter((b=>!(b.edge.ymax<=y))),m.sort(((b,w)=>b.edge.x===w.edge.x?0:(b.edge.x-w.edge.x)/Math.abs(b.edge.x-w.edge.x))),(u!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const w=b+1;if(w>=m.length)break;const C=m[b].edge,v=m[w].edge;f.push([[Math.round(C.x),y],[Math.round(v.x),y]])}y+=u,m.forEach((b=>{b.edge.x=b.edge.x+u*b.edge.islope})),x++}return f})(s,a,i);if(n){for(const c of s)ja(c,o,-n);(function(c,h,u){const d=[];c.forEach((f=>d.push(...f))),ja(d,h,u)})(l,o,-n)}return l}function Oi(e,t){var r;const i=t.hachureAngle+90;let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=n),J_(e,n,i,a||1)}class rl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Oi(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function va(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 tS extends rl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=Oi(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,s=[],o=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[c,h]of n)va([c,h])&&s.push([[c[0]-o,c[1]+l],[...h]],[[c[0]+o,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}}class eS extends rl{fillPolygons(t,r){const i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,n);return i.ops=i.ops.concat(a.ops),i}}class rS{constructor(t){this.helper=t}fillPolygons(t,r){const i=Oi(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const s=n/4;for(const o of t){const l=va(o),c=l/n,h=Math.ceil(c)-1,u=l-h*n,d=(o[0][0]+o[1][0])/2-n/4,f=Math.min(o[0][1],o[1][1]);for(let g=0;g<h;g++){const m=f+u+g*n,y=d-s+2*Math.random()*s,x=m-s+2*Math.random()*s,b=this.helper.ellipse(y,x,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class iS{constructor(t){this.helper=t}fillPolygons(t,r){const i=Oi(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,n=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((s=>{const o=va(s),l=Math.floor(o/(i+n)),c=(o+n-l*(i+n))/2;let h=s[0],u=s[1];h[0]>u[0]&&(h=s[1],u=s[0]);const d=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let f=0;f<l;f++){const g=f*(i+n),m=g+i,y=[h[0]+g*Math.cos(d)+c*Math.cos(d),h[1]+g*Math.sin(d)+c*Math.sin(d)],x=[h[0]+m*Math.cos(d)+c*Math.cos(d),h[1]+m*Math.sin(d)+c*Math.sin(d)];a.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}})),a}}class nS{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,n=r.zigzagOffset<0?i:r.zigzagOffset,a=Oi(t,r=Object.assign({},r,{hachureGap:i+n}));return{type:"fillSketch",ops:this.zigzagLines(a,n,r)}}zigzagLines(t,r,i){const n=[];return t.forEach((a=>{const s=va(a),o=Math.round(s/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<o;u++){const d=2*u*r,f=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],y=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],x=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];n.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}})),n}}const zt={};class aS{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const sS=0,Wa=1,yc=2,Gi={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 Ha(e,t){return e.type===t}function il(e){const t=[],r=(function(s){const o=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:sS,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:Wa,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return o[o.length]={type:yc,text:""},o})(e);let i="BOD",n=0,a=r[n];for(;!Ha(a,yc);){let s=0;const o=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return il("M0,0"+e);n++,s=Gi[a.text],i=a.text}else Ha(a,Wa)?s=Gi[i]:(n++,s=Gi[a.text],i=a.text);if(!(n+s<r.length))throw new Error("Path data ended short");for(let l=n;l<n+s;l++){const c=r[l];if(!Ha(c,Wa))throw new Error("Param not a number: "+i+","+c.text);o[o.length]=+c.text}if(typeof Gi[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:o};t.push(l),n+=s,a=r[n],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function kp(e){let t=0,r=0,i=0,n=0;const a=[];for(const{key:s,data:o}of e)switch(s){case"M":a.push({key:"M",data:[...o]}),[t,r]=o,[i,n]=o;break;case"m":t+=o[0],r+=o[1],a.push({key:"M",data:[t,r]}),i=t,n=r;break;case"L":a.push({key:"L",data:[...o]}),[t,r]=o;break;case"l":t+=o[0],r+=o[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...o]}),t=o[4],r=o[5];break;case"c":{const l=o.map(((c,h)=>h%2?c+r:c+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...o]}),t=o[2],r=o[3];break;case"q":{const l=o.map(((c,h)=>h%2?c+r:c+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...o]}),t=o[5],r=o[6];break;case"a":t+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],t,r]});break;case"H":a.push({key:"H",data:[...o]}),t=o[0];break;case"h":t+=o[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),t=o[2],r=o[3];break;case"s":{const l=o.map(((c,h)=>h%2?c+r:c+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...o]}),t=o[0],r=o[1];break;case"t":t+=o[0],r+=o[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=n}return a}function Cp(e){const t=[];let r="",i=0,n=0,a=0,s=0,o=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,n]=h,[a,s]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],n=h[5],o=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,n]});break;case"V":n=h[0],t.push({key:"L",data:[i,n]});break;case"S":{let u=0,d=0;r==="C"||r==="S"?(u=i+(i-o),d=n+(n-l)):(u=i,d=n),t.push({key:"C",data:[u,d,...h]}),o=h[0],l=h[1],i=h[2],n=h[3];break}case"T":{const[u,d]=h;let f=0,g=0;r==="Q"||r==="T"?(f=i+(i-o),g=n+(n-l)):(f=i,g=n);const m=i+2*(f-i)/3,y=n+2*(g-n)/3,x=u+2*(f-u)/3,b=d+2*(g-d)/3;t.push({key:"C",data:[m,y,x,b,u,d]}),o=f,l=g,i=u,n=d;break}case"Q":{const[u,d,f,g]=h,m=i+2*(u-i)/3,y=n+2*(d-n)/3,x=f+2*(u-f)/3,b=g+2*(d-g)/3;t.push({key:"C",data:[m,y,x,b,f,g]}),o=u,l=d,i=f,n=g;break}case"A":{const u=Math.abs(h[0]),d=Math.abs(h[1]),f=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||d===0?(t.push({key:"C",data:[i,n,y,x,y,x]}),i=y,n=x):(i!==y||n!==x)&&(_p(i,n,y,x,u,d,f,g,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,n=x);break}case"Z":t.push({key:"Z",data:[]}),i=a,n=s}r=c}return t}function Zr(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function _p(e,t,r,i,n,a,s,o,l,c){const h=(u=s,Math.PI*u/180);var u;let d=[],f=0,g=0,m=0,y=0;if(c)[f,g,m,y]=c;else{[e,t]=Zr(e,t,-h),[r,i]=Zr(r,i,-h);const j=(e-r)/2,$=(t-i)/2;let M=j*j/(n*n)+$*$/(a*a);M>1&&(M=Math.sqrt(M),n*=M,a*=M);const B=n*n,P=a*a,E=B*P-B*$*$-P*j*j,A=B*$*$+P*j*j,N=(o===l?-1:1)*Math.sqrt(Math.abs(E/A));m=N*n*$/a+(e+r)/2,y=N*-a*j/n+(t+i)/2,f=Math.asin(parseFloat(((t-y)/a).toFixed(9))),g=Math.asin(parseFloat(((i-y)/a).toFixed(9))),e<m&&(f=Math.PI-f),r<m&&(g=Math.PI-g),f<0&&(f=2*Math.PI+f),g<0&&(g=2*Math.PI+g),l&&f>g&&(f-=2*Math.PI),!l&&g>f&&(g-=2*Math.PI)}let x=g-f;if(Math.abs(x)>120*Math.PI/180){const j=g,$=r,M=i;g=l&&g>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,d=_p(r=m+n*Math.cos(g),i=y+a*Math.sin(g),$,M,n,a,s,0,l,[g,j,m,y])}x=g-f;const b=Math.cos(f),w=Math.sin(f),C=Math.cos(g),v=Math.sin(g),L=Math.tan(x/4),T=4/3*n*L,O=4/3*a*L,z=[e,t],q=[e+T*w,t-O*b],D=[r+T*v,i-O*C],W=[r,i];if(q[0]=2*z[0]-q[0],q[1]=2*z[1]-q[1],c)return[q,D,W].concat(d);{d=[q,D,W].concat(d);const j=[];for(let $=0;$<d.length;$+=3){const M=Zr(d[$][0],d[$][1],h),B=Zr(d[$+1][0],d[$+1][1],h),P=Zr(d[$+2][0],d[$+2][1],h);j.push([M[0],M[1],B[0],B[1],P[0],P[1]])}return j}}const oS={randOffset:function(e,t){return nt(e,t)},randOffsetWithRange:function(e,t,r){return qn(e,t,r)},ellipse:function(e,t,r,i,n){const a=Tp(r,i,n);return zs(e,t,n,a).opset},doubleLineOps:function(e,t,r,i,n){return Me(e,t,r,i,n,!0)}};function Sp(e,t,r,i,n){return{type:"path",ops:Me(e,t,r,i,n)}}function ln(e,t,r){const i=(e||[]).length;if(i>2){const n=[];for(let a=0;a<i-1;a++)n.push(...Me(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&n.push(...Me(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:n}}return i===2?Sp(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function lS(e,t,r,i,n){return(function(a,s){return ln(a,!0,s)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],n)}function xc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Xi(r[0],1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:Xi(r[0],1.5*(1+.22*t.roughness),vc(t));for(let a=1;a<r.length;a++){const s=r[a];if(s.length){const o=Xi(s,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Xi(s,1.5*(1+.22*t.roughness),vc(t));for(const c of o)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&n.push(c)}}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function Tp(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/n;let s=Math.abs(e/2),o=Math.abs(t/2);const l=1-r.curveFitting;return s+=nt(s*l,r),o+=nt(o*l,r),{increment:a,rx:s,ry:o}}function zs(e,t,r,i){const[n,a]=kc(i.increment,e,t,i.rx,i.ry,1,i.increment*qn(.1,qn(.4,1,r),r),r);let s=jn(n,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[o]=kc(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=jn(o,null,r);s=s.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:s}}}function bc(e,t,r,i,n,a,s,o,l){const c=e,h=t;let u=Math.abs(r/2),d=Math.abs(i/2);u+=nt(.01*u,l),d+=nt(.01*d,l);let f=n,g=a;for(;f<0;)f+=2*Math.PI,g+=2*Math.PI;g-f>2*Math.PI&&(f=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-f)/2),x=Cc(y,c,h,u,d,f,g,1,l);if(!l.disableMultiStroke){const b=Cc(y,c,h,u,d,f,g,1.5,l);x.push(...b)}return s&&(o?x.push(...Me(c,h,c+u*Math.cos(f),h+d*Math.sin(f),l),...Me(c,h,c+u*Math.cos(g),h+d*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(f),h+d*Math.sin(f)]})),{type:"path",ops:x}}function wc(e,t){const r=Cp(kp(il(e))),i=[];let n=[0,0],a=[0,0];for(const{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],n=[o[0],o[1]];break;case"L":i.push(...Me(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case"C":{const[l,c,h,u,d,f]=o;i.push(...cS(l,c,h,u,d,f,a,t)),a=[d,f];break}case"Z":i.push(...Me(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function Ya(e,t){const r=[];for(const i of e)if(i.length){const n=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+nt(n,t),i[0][1]+nt(n,t)]});for(let s=1;s<a;s++)r.push({op:"lineTo",data:[i[s][0]+nt(n,t),i[s][1]+nt(n,t)]})}}return{type:"fillPath",ops:r}}function lr(e,t){return(function(r,i){let n=r.fillStyle||"hachure";if(!zt[n])switch(n){case"zigzag":zt[n]||(zt[n]=new tS(i));break;case"cross-hatch":zt[n]||(zt[n]=new eS(i));break;case"dots":zt[n]||(zt[n]=new rS(i));break;case"dashed":zt[n]||(zt[n]=new iS(i));break;case"zigzag-line":zt[n]||(zt[n]=new nS(i));break;default:n="hachure",zt[n]||(zt[n]=new rl(i))}return zt[n]})(t,oS).fillPolygons(e,t)}function vc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Bp(e){return e.randomizer||(e.randomizer=new aS(e.seed||0)),e.randomizer.next()}function qn(e,t,r,i=1){return r.roughness*i*(Bp(r)*(t-e)+e)}function nt(e,t,r=1){return qn(-e,e,t,r)}function Me(e,t,r,i,n,a=!1){const s=a?n.disableMultiStrokeFill:n.disableMultiStroke,o=qs(e,t,r,i,n,!0,!1);if(s)return o;const l=qs(e,t,r,i,n,!0,!0);return o.concat(l)}function qs(e,t,r,i,n,a,s){const o=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(o);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>o&&(h=l/10);const u=h/2,d=.2+.2*Bp(n);let f=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;f=nt(f,n,c),g=nt(g,n,c);const m=[],y=()=>nt(u,n,c),x=()=>nt(h,n,c),b=n.preserveVertices;return s?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:nt(h,n,c)),t+(b?0:nt(h,n,c))]}),s?m.push({op:"bcurveTo",data:[f+e+(r-e)*d+y(),g+t+(i-t)*d+y(),f+e+2*(r-e)*d+y(),g+t+2*(i-t)*d+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[f+e+(r-e)*d+x(),g+t+(i-t)*d+x(),f+e+2*(r-e)*d+x(),g+t+2*(i-t)*d+x(),r+(b?0:x()),i+(b?0:x())]}),m}function Xi(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+nt(t,r),e[0][1]+nt(t,r)]),i.push([e[0][0]+nt(t,r),e[0][1]+nt(t,r)]);for(let n=1;n<e.length;n++)i.push([e[n][0]+nt(t,r),e[n][1]+nt(t,r)]),n===e.length-1&&i.push([e[n][0]+nt(t,r),e[n][1]+nt(t,r)]);return jn(i,null,r)}function jn(e,t,r){const i=e.length,n=[];if(i>3){const a=[],s=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let o=1;o+2<i;o++){const l=e[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(s*e[o+1][0]-s*e[o-1][0])/6,l[1]+(s*e[o+1][1]-s*e[o-1][1])/6],a[2]=[e[o+1][0]+(s*e[o][0]-s*e[o+2][0])/6,e[o+1][1]+(s*e[o][1]-s*e[o+2][1])/6],a[3]=[e[o+1][0],e[o+1][1]],n.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(n.push({op:"move",data:[e[1][0],e[1][1]]}),n.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&n.push(...qs(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return n}function kc(e,t,r,i,n,a,s,o){const l=[],c=[];if(o.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+n*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+n*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+n*Math.sin(0)]),c.push([t+i*Math.cos(e),r+n*Math.sin(e)])}else{const h=nt(.5,o)-Math.PI/2;c.push([nt(a,o)+t+.9*i*Math.cos(h-e),nt(a,o)+r+.9*n*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let d=h;d<u;d+=e){const f=[nt(a,o)+t+i*Math.cos(d),nt(a,o)+r+n*Math.sin(d)];l.push(f),c.push(f)}c.push([nt(a,o)+t+i*Math.cos(h+2*Math.PI+.5*s),nt(a,o)+r+n*Math.sin(h+2*Math.PI+.5*s)]),c.push([nt(a,o)+t+.98*i*Math.cos(h+s),nt(a,o)+r+.98*n*Math.sin(h+s)]),c.push([nt(a,o)+t+.9*i*Math.cos(h+.5*s),nt(a,o)+r+.9*n*Math.sin(h+.5*s)])}return[c,l]}function Cc(e,t,r,i,n,a,s,o,l){const c=a+nt(.1,l),h=[];h.push([nt(o,l)+t+.9*i*Math.cos(c-e),nt(o,l)+r+.9*n*Math.sin(c-e)]);for(let u=c;u<=s;u+=e)h.push([nt(o,l)+t+i*Math.cos(u),nt(o,l)+r+n*Math.sin(u)]);return h.push([t+i*Math.cos(s),r+n*Math.sin(s)]),h.push([t+i*Math.cos(s),r+n*Math.sin(s)]),jn(h,null,l)}function cS(e,t,r,i,n,a,s,o){const l=[],c=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3];let h=[0,0];const u=o.disableMultiStroke?1:2,d=o.preserveVertices;for(let f=0;f<u;f++)f===0?l.push({op:"move",data:[s[0],s[1]]}):l.push({op:"move",data:[s[0]+(d?0:nt(c[0],o)),s[1]+(d?0:nt(c[0],o))]}),h=d?[n,a]:[n+nt(c[f],o),a+nt(c[f],o)],l.push({op:"bcurveTo",data:[e+nt(c[f],o),t+nt(c[f],o),r+nt(c[f],o),i+nt(c[f],o),h[0],h[1]]});return l}function Kr(e){return[...e]}function _c(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 n=[];n.push(e[0],e[0]);for(let o=1;o<e.length;o++)n.push(e[o]),o===e.length-1&&n.push(e[o]);const a=[],s=1-t;i.push(Kr(n[0]));for(let o=1;o+2<n.length;o++){const l=n[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(s*n[o+1][0]-s*n[o-1][0])/6,l[1]+(s*n[o+1][1]-s*n[o-1][1])/6],a[2]=[n[o+1][0]+(s*n[o][0]-s*n[o+2][0])/6,n[o+1][1]+(s*n[o][1]-s*n[o+2][1])/6],a[3]=[n[o+1][0],n[o+1][1]],i.push(a[1],a[2],a[3])}}return i}function cn(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function hS(e,t,r){const i=cn(t,r);if(i===0)return cn(e,t);let n=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return n=Math.max(0,Math.min(1,n)),cn(e,Ie(t,r,n))}function Ie(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function js(e,t,r,i){const n=i||[];if((function(o,l){const c=o[l+0],h=o[l+1],u=o[l+2],d=o[l+3];let f=3*h[0]-2*c[0]-d[0];f*=f;let g=3*h[1]-2*c[1]-d[1];g*=g;let m=3*u[0]-2*d[0]-c[0];m*=m;let y=3*u[1]-2*d[1]-c[1];return y*=y,f<m&&(f=m),g<y&&(g=y),f+g})(e,t)<r){const o=e[t+0];n.length?(a=n[n.length-1],s=o,Math.sqrt(cn(a,s))>1&&n.push(o)):n.push(o),n.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],d=Ie(l,c,.5),f=Ie(c,h,.5),g=Ie(h,u,.5),m=Ie(d,f,.5),y=Ie(f,g,.5),x=Ie(m,y,.5);js([l,d,m,x],0,r,n),js([x,y,g,u],0,r,n)}var a,s;return n}function uS(e,t){return Wn(e,0,e.length,t)}function Wn(e,t,r,i,n){const a=n||[],s=e[t],o=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=hS(e[h],s,o);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(Wn(e,t,c+1,i,a),Wn(e,c,r,i,a)):(a.length||a.push(s),a.push(o)),a}function Ua(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let a=0;a<n;a++)js(e,3*a,t,i);return r&&r>0?Wn(i,0,i.length,r):i}const Wt="none";class Hn{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,n,a){const s=this._o(a);return this._d("line",[Sp(t,r,i,n,s)],s)}rectangle(t,r,i,n,a){const s=this._o(a),o=[],l=lS(t,r,i,n,s);if(s.fill){const c=[[t,r],[t+i,r],[t+i,r+n],[t,r+n]];s.fillStyle==="solid"?o.push(Ya([c],s)):o.push(lr([c],s))}return s.stroke!==Wt&&o.push(l),this._d("rectangle",o,s)}ellipse(t,r,i,n,a){const s=this._o(a),o=[],l=Tp(i,n,s),c=zs(t,r,s,l);if(s.fill)if(s.fillStyle==="solid"){const h=zs(t,r,s,l).opset;h.type="fillPath",o.push(h)}else o.push(lr([c.estimatedPoints],s));return s.stroke!==Wt&&o.push(c.opset),this._d("ellipse",o,s)}circle(t,r,i,n){const a=this.ellipse(t,r,i,i,n);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[ln(t,!1,i)],i)}arc(t,r,i,n,a,s,o=!1,l){const c=this._o(l),h=[],u=bc(t,r,i,n,a,s,o,!0,c);if(o&&c.fill)if(c.fillStyle==="solid"){const d=Object.assign({},c);d.disableMultiStroke=!0;const f=bc(t,r,i,n,a,s,!0,!1,d);f.type="fillPath",h.push(f)}else h.push((function(d,f,g,m,y,x,b){const w=d,C=f;let v=Math.abs(g/2),L=Math.abs(m/2);v+=nt(.01*v,b),L+=nt(.01*L,b);let T=y,O=x;for(;T<0;)T+=2*Math.PI,O+=2*Math.PI;O-T>2*Math.PI&&(T=0,O=2*Math.PI);const z=(O-T)/b.curveStepCount,q=[];for(let D=T;D<=O;D+=z)q.push([w+v*Math.cos(D),C+L*Math.sin(D)]);return q.push([w+v*Math.cos(O),C+L*Math.sin(O)]),q.push([w,C]),lr([q],b)})(t,r,i,n,a,s,c));return c.stroke!==Wt&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),n=[],a=xc(t,i);if(i.fill&&i.fill!==Wt)if(i.fillStyle==="solid"){const s=xc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{const s=[],o=t;if(o.length){const l=typeof o[0][0]=="number"?[o]:o;for(const c of l)c.length<3?s.push(...c):c.length===3?s.push(...Ua(_c([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):s.push(...Ua(_c(c),10,(1+i.roughness)/2))}s.length&&n.push(lr([s],i))}return i.stroke!==Wt&&n.push(a),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],a=ln(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(Ya([t],i)):n.push(lr([t],i))),i.stroke!==Wt&&n.push(a),this._d("polygon",n,i)}path(t,r){const i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==Wt,s=i.stroke!==Wt,o=!!(i.simplification&&i.simplification<1),l=(function(h,u,d){const f=Cp(kp(il(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...Ua(x,u)),x=[]},w=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:v,data:L}of f)switch(v){case"M":w(),y=[L[0],L[1]],m.push(y);break;case"L":b(),m.push([L[0],L[1]]);break;case"C":if(!x.length){const T=m.length?m[m.length-1]:y;x.push([T[0],T[1]])}x.push([L[0],L[1]]),x.push([L[2],L[3]]),x.push([L[4],L[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(w(),!d)return g;const C=[];for(const v of g){const L=uS(v,d);L.length&&C.push(L)}return C})(t,1,o?4-4*(i.simplification||1):(1+i.roughness)/2),c=wc(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=wc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push(Ya(l,i));else n.push(lr(l,i));return s&&(o?l.forEach((h=>{n.push(ln(h,!1,i))})):n.push(c)),this._d("path",n,i)}opsToPath(t,r){let i="";for(const n of t.ops){const a=typeof r=="number"&&r>=0?n.data.map((s=>+s.toFixed(r))):n.data;switch(n.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(const a of r){let s=null;switch(a.type){case"path":s={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Wt};break;case"fillPath":s={d:this.opsToPath(a),stroke:Wt,strokeWidth:0,fill:i.fill||Wt};break;case"fillSketch":s=this.fillSketch(a,i)}s&&n.push(s)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Wt,strokeWidth:i,fill:Wt}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class dS{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Hn(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const s of r)switch(s.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,s,a),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const o=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,s,a,o),n.restore();break}case"fillSketch":this.fillSketch(n,s,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(const a of r.ops){const s=typeof i=="number"&&i>=0?a.data.map((o=>+o.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(s[0],s[1]);break;case"bcurveTo":t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":t.lineTo(s[0],s[1])}}r.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,a){const s=this.gen.line(t,r,i,n,a);return this.draw(s),s}rectangle(t,r,i,n,a){const s=this.gen.rectangle(t,r,i,n,a);return this.draw(s),s}ellipse(t,r,i,n,a){const s=this.gen.ellipse(t,r,i,n,a);return this.draw(s),s}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,n,a,s,o=!1,l){const c=this.gen.arc(t,r,i,n,a,s,o,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 Vi="http://www.w3.org/2000/svg";class fS{constructor(t,r){this.svg=t,this.gen=new Hn(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(Vi,"g"),s=t.options.fixedDecimalPlaceDigits;for(const o of r){let l=null;switch(o.type){case"path":l=n.createElementNS(Vi,"path"),l.setAttribute("d",this.opsToPath(o,s)),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=n.createElementNS(Vi,"path"),l.setAttribute("d",this.opsToPath(o,s)),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(n,o,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const a=t.createElementNS(Vi,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",n+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,a){const s=this.gen.line(t,r,i,n,a);return this.draw(s)}rectangle(t,r,i,n,a){const s=this.gen.rectangle(t,r,i,n,a);return this.draw(s)}ellipse(t,r,i,n,a){const s=this.gen.ellipse(t,r,i,n,a);return this.draw(s)}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,n,a,s,o=!1,l){const c=this.gen.arc(t,r,i,n,a,s,o,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 Z={canvas:(e,t)=>new dS(e,t),svg:(e,t)=>new fS(e,t),generator:e=>new Hn(e),newSeed:()=>Hn.newSeed()},it=p(async(e,t,r)=>{let i;const n=t.useHtmlLabels||wt(ut()?.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),s=a.insert("g").attr("class","label").attr("style",Pt(t.labelStyle));let o;t.label===void 0?o="":o=typeof t.label=="string"?t.label:t.label[0];const l=await Ce(s,Ht(Fe(o),ut()),{useHtmlLabels:n,width:t.width||ut().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let c=l.getBBox();const h=(t?.padding??0)/2;if(n){const u=l.children[0],d=lt(l),f=u.getElementsByTagName("img");if(f){const g=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...f].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=ut().fontSize?ut().fontSize:window.getComputedStyle(document.body).fontSize,w=5,[C=ao.fontSize]=Ri(b),v=C*w+"px";m.style.minWidth=v,m.style.maxWidth=v}else m.style.width="100%";y(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return n?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:c,halfPadding:h,label:s}},"labelHelper"),Ga=p(async(e,t,r)=>{const i=r.useHtmlLabels||wt(ut()?.flowchart?.htmlLabels),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Ce(n,Ht(Fe(t),ut()),{useHtmlLabels:i,width:r.width||ut()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let s=a.getBBox();const o=r.padding/2;if(wt(ut()?.flowchart?.htmlLabels)){const l=a.children[0],c=lt(a);s=l.getBoundingClientRect(),c.attr("width",s.width),c.attr("height",s.height)}return i?n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):n.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:s,halfPadding:o,label:n}},"insertLabel"),Q=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),rt=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ot(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(ot,"createPathFromPoints");function Ae(e,t,r,i,n,a){const s=[],l=r-e,c=i-t,h=l/a,u=2*Math.PI/h,d=t+c/2;for(let f=0;f<=50;f++){const g=f/50,m=e+g*l,y=d+n*Math.sin(u*(m-e));s.push({x:m,y})}return s}p(Ae,"generateFullSineWavePoints");function Bi(e,t,r,i,n,a){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);s.push({x:-f,y:-g})}return s}p(Bi,"generateCirclePoints");var pS=p((e,t)=>{var r=e.x,i=e.y,n=t.x-r,a=t.y-i,s=e.width/2,o=e.height/2,l,c;return Math.abs(a)*s>Math.abs(n)*o?(a<0&&(o=-o),l=a===0?0:o*n/a,c=o):(n<0&&(s=-s),l=s,c=n===0?0:s*a/n),{x:r+l,y:i+c}},"intersectRect"),qr=pS;function $p(e,t){t&&e.attr("style",t)}p($p,"applyStyle");async function Lp(e){const t=lt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=ut();let n=e.label;e.label&&Ze(e.label)&&(n=await Qn(e.label.replace(rr.lineBreakRegex,`
186
+ `),i));const s='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+n+"</span>";return r.html(Ht(s,i)),$p(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}p(Lp,"addHtmlLabel");var gS=p(async(e,t,r,i)=>{let n=e||"";if(typeof n=="object"&&(n=n[0]),wt(ut().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),I.info("vertexText"+n);const a={isNode:i,label:Fe(n).replace(/fa[blrs]?:fa-[\w-]+/g,o=>`<i class='${o.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await Lp(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",t.replace("color:","fill:"));let s=[];typeof n=="string"?s=n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?s=n:s=[];for(const o of s){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),a.appendChild(l)}return a}},"createLabel"),He=gS,Pe=p((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),Mp=p(async(e,t)=>{I.info("Creating subgraph rect for ",t.id,t);const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=V(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=wt(r.flowchart.htmlLabels),f=u.insert("g").attr("class","cluster-label "),g=await Ce(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0});let m=g.getBBox();if(wt(r.flowchart.htmlLabels)){const T=g.children[0],O=lt(g);m=T.getBoundingClientRect(),O.attr("width",m.width),O.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,w=t.y-x/2;I.trace("Data ",t,JSON.stringify(t));let C;if(t.look==="handDrawn"){const T=Z.svg(u),O=K(t,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:n}),z=T.path(Pe(b,w,y,x,0),O);C=u.insert(()=>(I.debug("Rough node insert CXC",z),z),":first-child"),C.select("path:nth-child(2)").attr("style",c.join(";")),C.select("path").attr("style",h.join(";").replace("fill","stroke"))}else C=u.insert("rect",":first-child"),C.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",w).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:v}=ca(r);if(f.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),o){const T=f.select("span");T&&T.attr("style",o)}const L=C.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=m.height-t.padding/2,t.intersect=function(T){return qr(t,T)},{cluster:u,labelBBox:m}},"rect"),mS=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),n=0*t.padding,a=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");const s=i.node().getBBox();return t.width=s.width,t.height=s.height,t.intersect=function(o){return qr(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),yS=p(async(e,t)=>{const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:o,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let d=c.append("rect");const f=u.node().appendChild(await He(t.label,t.labelStyle,void 0,!0));let g=f.getBBox();if(wt(r.flowchart.htmlLabels)){const z=f.children[0],q=lt(f);g=z.getBoundingClientRect(),q.attr("width",g.width),q.attr("height",g.height)}const m=0*t.padding,y=m/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,w=t.height+m-g.height-6,C=t.x-x/2,v=t.y-b/2;t.width=x;const L=t.y-t.height/2-y+g.height+2;let T;if(t.look==="handDrawn"){const z=t.cssClasses.includes("statediagram-cluster-alt"),q=Z.svg(c),D=t.rx||t.ry?q.path(Pe(C,v,x,b,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:n}):q.rectangle(C,v,x,b,{seed:n});T=c.insert(()=>D,":first-child");const W=q.rectangle(C,L,x,w,{fill:z?a:s,fillStyle:z?"hachure":"solid",stroke:l,seed:n});T=c.insert(()=>D,":first-child"),d=c.insert(()=>W)}else T=h.insert("rect",":first-child"),T.attr("class","outer").attr("x",C).attr("y",v).attr("width",x).attr("height",b).attr("data-look",t.look),d.attr("class","inner").attr("x",C).attr("y",L).attr("width",x).attr("height",w);u.attr("transform",`translate(${t.x-g.width/2}, ${v+1-(wt(r.flowchart.htmlLabels)?0:3)})`);const O=T.node().getBBox();return t.height=O.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(z){return qr(t,z)},{cluster:c,labelBBox:g}},"roundedWithTitle"),xS=p(async(e,t)=>{I.info("Creating subgraph rect for ",t.id,t);const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=V(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=wt(r.flowchart.htmlLabels),f=u.insert("g").attr("class","cluster-label "),g=await Ce(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let m=g.getBBox();if(wt(r.flowchart.htmlLabels)){const T=g.children[0],O=lt(g);m=T.getBoundingClientRect(),O.attr("width",m.width),O.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,w=t.y-x/2;I.trace("Data ",t,JSON.stringify(t));let C;if(t.look==="handDrawn"){const T=Z.svg(u),O=K(t,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:n}),z=T.path(Pe(b,w,y,x,t.rx),O);C=u.insert(()=>(I.debug("Rough node insert CXC",z),z),":first-child"),C.select("path:nth-child(2)").attr("style",c.join(";")),C.select("path").attr("style",h.join(";").replace("fill","stroke"))}else C=u.insert("rect",":first-child"),C.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",w).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:v}=ca(r);if(f.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),o){const T=f.select("span");T&&T.attr("style",o)}const L=C.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=m.height-t.padding/2,t.intersect=function(T){return qr(t,T)},{cluster:u,labelBBox:m}},"kanbanSection"),bS=p((e,t)=>{const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,s=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),o=s.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,d=t.y-h/2;t.width=c;let f;if(t.look==="handDrawn"){const y=Z.svg(s).rectangle(u,d,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});f=s.insert(()=>y,":first-child")}else f=o.insert("rect",":first-child"),f.attr("class","divider").attr("x",u).attr("y",d).attr("width",c).attr("height",h).attr("data-look",t.look);const g=f.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return qr(t,m)},{cluster:s,labelBBox:{}}},"divider"),wS=Mp,vS={rect:Mp,squareRect:wS,roundedWithTitle:yS,noteGroup:mS,divider:bS,kanbanSection:xS},Ap=new Map,Ep=p(async(e,t)=>{const r=t.shape||"rect",i=await vS[r](e,t);return Ap.set(t.id,i),i},"insertCluster"),kS=p(()=>{Ap=new Map},"clear");function Fp(e,t){return e.intersect(t)}p(Fp,"intersectNode");var CS=Fp;function Pp(e,t,r,i){var n=e.x,a=e.y,s=n-i.x,o=a-i.y,l=Math.sqrt(t*t*o*o+r*r*s*s),c=Math.abs(t*r*s/l);i.x<n&&(c=-c);var h=Math.abs(t*r*o/l);return i.y<a&&(h=-h),{x:n+c,y:a+h}}p(Pp,"intersectEllipse");var Rp=Pp;function Dp(e,t,r){return Rp(e,t,t,r)}p(Dp,"intersectCircle");var _S=Dp;function Op(e,t,r,i){{const n=t.y-e.y,a=e.x-t.x,s=t.x*e.y-e.x*t.y,o=n*r.x+a*r.y+s,l=n*i.x+a*i.y+s,c=1e-6;if(o!==0&&l!==0&&Ws(o,l))return;const h=i.y-r.y,u=r.x-i.x,d=i.x*r.y-r.x*i.y,f=h*e.x+u*e.y+d,g=h*t.x+u*t.y+d;if(Math.abs(f)<c&&Math.abs(g)<c&&Ws(f,g))return;const m=n*u-h*a;if(m===0)return;const y=Math.abs(m/2);let x=a*d-u*s;const b=x<0?(x-y)/m:(x+y)/m;x=h*s-n*d;const w=x<0?(x-y)/m:(x+y)/m;return{x:b,y:w}}}p(Op,"intersectLine");function Ws(e,t){return e*t>0}p(Ws,"sameSign");var SS=Op;function Np(e,t,r){let i=e.x,n=e.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){s=Math.min(s,h.x),o=Math.min(o,h.y)}):(s=Math.min(s,t.x),o=Math.min(o,t.y));let l=i-e.width/2-s,c=n-e.height/2-o;for(let h=0;h<t.length;h++){let u=t[h],d=t[h<t.length-1?h+1:0],f=SS(e,r,{x:l+u.x,y:c+u.y},{x:l+d.x,y:c+d.y});f&&a.push(f)}return a.length?(a.length>1&&a.sort(function(h,u){let d=h.x-r.x,f=h.y-r.y,g=Math.sqrt(d*d+f*f),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return g<x?-1:g===x?0:1}),a[0]):e}p(Np,"intersectPolygon");var TS=Np,G={node:CS,circle:_S,ellipse:Rp,polygon:TS,rect:qr};function Ip(e,t){const{labelStyles:r}=V(t);t.labelStyle=r;const i=rt(t);let n=i;i||(n="anchor");const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),s=1,{cssStyles:o}=t,l=Z.svg(a),c=K(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,s*2,c),u=a.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",Pt(o)),Q(t,u),t.intersect=function(d){return I.info("Circle intersect",t,s,d),G.circle(t,s,d)},a}p(Ip,"anchor");function Hs(e,t,r,i,n,a,s){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,f=u/n,g=d/a,m=Math.sqrt(f**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*a*Math.sin(h)*(s?-1:1),b=c-y*n*Math.cos(h)*(s?-1:1),w=Math.atan2((t-b)/a,(e-x)/n);let v=Math.atan2((i-b)/a,(r-x)/n)-w;s&&v<0&&(v+=2*Math.PI),!s&&v>0&&(v-=2*Math.PI);const L=[];for(let T=0;T<20;T++){const O=T/19,z=w+O*v,q=x+n*Math.cos(z),D=b+a*Math.sin(z);L.push({x:q,y:D})}return L}p(Hs,"generateArcPoints");async function zp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=a.width+t.padding+20,o=a.height+t.padding,l=o/2,c=l/(2.5+o/50),{cssStyles:h}=t,u=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...Hs(-s/2,-o/2,-s/2,o/2,c,l,!1),{x:s/2,y:o/2},...Hs(s/2,o/2,s/2,-o/2,c,l,!0)],d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=ot(u),m=d.path(g,f),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${c/2}, 0)`),Q(t,y),t.intersect=function(x){return G.polygon(t,u,x)},n}p(zp,"bowTieRect");function Re(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(Re,"insertPolygonShape");async function qp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=a.height+t.padding,o=12,l=a.width+t.padding+o,c=0,h=l,u=-s,d=0,f=[{x:c+o,y:u},{x:h,y:u},{x:h,y:d},{x:c,y:d},{x:c,y:u+o},{x:c+o,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=Z.svg(n),x=K(t,{}),b=ot(f),w=y.path(b,x);g=n.insert(()=>w,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),m&&g.attr("style",m)}else g=Re(n,l,s,f);return i&&g.attr("style",i),Q(t,g),t.intersect=function(y){return G.polygon(t,f,y)},n}p(qp,"card");function jp(e,t){const{nodeStyles:r}=V(t);t.label="";const i=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,a=Math.max(28,t.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=Z.svg(i),l=K(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=ot(s),h=o.path(c,l),u=i.insert(()=>h,":first-child");return n&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(d){return G.polygon(t,s,d)},i}p(jp,"choice");async function nl(e,t,r){const{labelStyles:i,nodeStyles:n}=V(t);t.labelStyle=i;const{shapeSvg:a,bbox:s,halfPadding:o}=await it(e,t,rt(t)),l=r?.padding??o,c=s.width/2+l;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const d=Z.svg(a),f=K(t,{}),g=d.circle(0,0,c*2,f);h=a.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",Pt(u))}else h=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0);return Q(t,h),t.calcIntersect=function(d,f){const g=d.width/2;return G.circle(d,g,f)},t.intersect=function(d){return I.info("Circle intersect",t,c,d),G.circle(t,c,d)},a}p(nl,"circle");function Wp(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},s={x:-(i/2)*t,y:-(i/2)*r},o={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${o.x},${o.y}
187
+ M ${n.x},${n.y} L ${s.x},${s.y}`}p(Wp,"createLine");function Hp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:s}=t,o=Z.svg(n),l=K(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=o.circle(0,0,a*2,l),h=Wp(a),u=o.path(h,l),d=n.insert(()=>c,":first-child");return d.insert(()=>u),s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",i),Q(t,d),t.intersect=function(f){return I.info("crossedCircle intersect",t,{radius:a,point:f}),G.circle(t,a,f)},n}p(Hp,"crossedCircle");function pe(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);s.push({x:-f,y:-g})}return s}p(pe,"generateCirclePoints");async function Yp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...pe(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...pe(o/2+c*2,-c,c,20,-180,-270),...pe(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...pe(o/2,l/2,c,20,0,90)],d=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...pe(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...pe(o/2+o*.1,-c,c,20,-180,-270),...pe(o/2+o*.1,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...pe(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2,y:l/2+c}],f=Z.svg(n),g=K(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=ot(u).replace("Z",""),x=f.path(y,g),b=ot(d),w=f.path(b,{...g}),C=n.insert("g",":first-child");return C.insert(()=>w,":first-child").attr("stroke-opacity",0),C.insert(()=>x,":first-child"),C.attr("class","text"),h&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${c}, 0)`),s.attr("transform",`translate(${-o/2+c-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,C),t.intersect=function(v){return G.polygon(t,d,v)},n}p(Yp,"curlyBraceLeft");function ge(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);s.push({x:f,y:g})}return s}p(ge,"generateCirclePoints");async function Up(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...ge(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...ge(o/2+c*2,-c,c,20,-180,-270),...ge(o/2+c*2,c,c,20,-90,-180),{x:o/2+c,y:l/2},...ge(o/2,l/2,c,20,0,90)],d=[{x:-o/2,y:-l/2-c},{x:o/2,y:-l/2-c},...ge(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...ge(o/2+c*2,-c,c,20,-180,-270),...ge(o/2+c*2,c,c,20,-90,-180),{x:o/2+c,y:l/2},...ge(o/2,l/2,c,20,0,90),{x:o/2,y:l/2+c},{x:-o/2,y:l/2+c}],f=Z.svg(n),g=K(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=ot(u).replace("Z",""),x=f.path(y,g),b=ot(d),w=f.path(b,{...g}),C=n.insert("g",":first-child");return C.insert(()=>w,":first-child").attr("stroke-opacity",0),C.insert(()=>x,":first-child"),C.attr("class","text"),h&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${-c}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,C),t.intersect=function(v){return G.polygon(t,d,v)},n}p(Up,"curlyBraceRight");function Tt(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);s.push({x:-f,y:-g})}return s}p(Tt,"generateCirclePoints");async function Gp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Tt(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...Tt(o/2+c*2,-c,c,20,-180,-270),...Tt(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...Tt(o/2,l/2,c,20,0,90)],d=[...Tt(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...Tt(-o/2-c/2,-c,c,20,0,90),...Tt(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...Tt(-o/2+c+c/2,l/2,c,30,-180,-270)],f=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...Tt(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...Tt(o/2+c*2,-c,c,20,-180,-270),...Tt(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...Tt(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2-c-c/2,y:l/2+c},...Tt(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...Tt(-o/2-c/2,-c,c,20,0,90),...Tt(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...Tt(-o/2+c+c/2,l/2,c,30,-180,-270)],g=Z.svg(n),m=K(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=ot(u).replace("Z",""),b=g.path(x,m),C=ot(d).replace("Z",""),v=g.path(C,m),L=ot(f),T=g.path(L,{...m}),O=n.insert("g",":first-child");return O.insert(()=>T,":first-child").attr("stroke-opacity",0),O.insert(()=>b,":first-child"),O.insert(()=>v,":first-child"),O.attr("class","text"),h&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",i),O.attr("transform",`translate(${c-c/4}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,O),t.intersect=function(z){return G.polygon(t,f,z)},n}p(Gp,"curlyBraces");async function Xp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=80,o=20,l=Math.max(s,(a.width+(t.padding??0)*2)*1.25,t?.width??0),c=Math.max(o,a.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=l,m=c,y=g-h,x=m/4,b=[{x:y,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:y,y:m},...Bi(-y,-m/2,h,50,270,90)],w=ot(b),C=d.path(w,f),v=n.insert(()=>C,":first-child");return v.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-l/2}, ${-c/2})`),Q(t,v),t.intersect=function(L){return G.polygon(t,b,L)},n}p(Xp,"curvedTrapezoid");var BS=p((e,t,r,i,n,a)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),$S=p((e,t,r,i,n,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),LS=p((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Vp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+t.padding,t.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(a.height+c+t.padding,t.height??0);let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=Z.svg(n),g=$S(0,0,o,h,l,c),m=LS(0,c,o,h,l,c),y=f.path(g,K(t,{})),x=f.path(m,K(t,{fill:"none"}));u=n.insert(()=>x,":first-child"),u=n.insert(()=>y,":first-child"),u.attr("class","basic label-container"),d&&u.attr("style",d)}else{const f=BS(0,0,o,h,l,c);u=n.insert("path",":first-child").attr("d",f).attr("class","basic label-container").attr("style",Pt(d)).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),Q(t,u),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(t.padding??0)/1.5-(a.y-(a.top??0))})`),t.intersect=function(f){const g=G.rect(t,f),m=g.x-(t.x??0);if(l!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(g.y-(t.y??0))>(t.height??0)/2-c)){let y=c*c*(1-m*m/(l*l));y>0&&(y=Math.sqrt(y)),y=c-y,f.y-(t.y??0)>0&&(y=-y),g.y+=y}return g},n}p(Vp,"cylinder");async function Zp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=a.width+t.padding,l=a.height+t.padding,c=l*.2,h=-o/2,u=-l/2-c/2,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],y=f.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),s.attr("transform",`translate(${h+(t.padding??0)/2-(a.x-(a.left??0))}, ${u+c+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,x),t.intersect=function(b){return G.rect(t,b)},n}p(Zp,"dividedRectangle");async function Kp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s}=await it(e,t,rt(t)),l=a.width/2+s+5,c=a.width/2+s;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const d=Z.svg(n),f=K(t,{roughness:.2,strokeWidth:2.5}),g=K(t,{roughness:.2,strokeWidth:1.5}),m=d.circle(0,0,l*2,f),y=d.circle(0,0,c*2,g);h=n.insert("g",":first-child"),h.attr("class",Pt(t.cssClasses)).attr("style",Pt(u)),h.node()?.appendChild(m),h.node()?.appendChild(y)}else{h=n.insert("g",":first-child");const d=h.insert("circle",":first-child"),f=h.insert("circle");h.attr("class","basic label-container").attr("style",i),d.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),f.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return Q(t,h),t.intersect=function(d){return I.info("DoubleCircle intersect",t,l,d),G.circle(t,l,d)},n}p(Kp,"doublecircle");function Qp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=V(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),s=7,{cssStyles:o}=t,l=Z.svg(a),{nodeBorder:c}=r,h=K(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,s*2,h),d=a.insert(()=>u,":first-child");return d.selectAll("path").attr("style",`fill: ${c} !important;`),o&&o.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),n&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",n),Q(t,d),t.intersect=function(f){return I.info("filledCircle intersect",t,{radius:s,point:f}),G.circle(t,s,f)},a}p(Qp,"filledCircle");async function Jp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=a.width+(t.padding??0),l=o+a.height,c=o+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=t,d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=ot(h),m=d.path(g,f),y=n.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=o,t.height=l,Q(t,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(t.padding??0)/2+(a.y-(a.top??0))})`),t.intersect=function(x){return I.info("Triangle intersect",t,h,x),G.polygon(t,h,x)},n}p(Jp,"flippedTriangle");function tg(e,t,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:a}=V(t);t.label="";const s=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:o}=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,u=-1*c/2,d=Z.svg(s),f=K(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=d.rectangle(h,u,l,c,f),m=s.insert(()=>g,":first-child");o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),Q(t,m);const y=i?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return G.rect(t,x)},s}p(tg,"forkJoin");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const n=80,a=50,{shapeSvg:s,bbox:o}=await it(e,t,rt(t)),l=Math.max(n,o.width+(t.padding??0)*2,t?.width??0),c=Math.max(a,o.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,d=Z.svg(s),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},...Bi(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],m=ot(g),y=d.path(m,f),x=s.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),Q(t,x),t.intersect=function(b){return I.info("Pill intersect",t,{radius:h,point:b}),G.polygon(t,g,b)},s}p(eg,"halfRoundedRectangle");async function rg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=a.height+(t.padding??0),o=a.width+(t.padding??0)*2.5,{cssStyles:l}=t,c=Z.svg(n),h=K(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let u=o/2;const d=u/6;u=u+d;const f=s/2,g=f/2,m=u-g,y=[{x:-m,y:-f},{x:0,y:-f},{x:m,y:-f},{x:u,y:0},{x:m,y:f},{x:0,y:f},{x:-m,y:f},{x:-u,y:0}],x=ot(y),b=c.path(x,h),w=n.insert(()=>b,":first-child");return w.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),t.width=o,t.height=s,Q(t,w),t.intersect=function(C){return G.polygon(t,y,C)},n}p(rg,"hexagon");async function ig(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.label="",t.labelStyle=r;const{shapeSvg:n}=await it(e,t,rt(t)),a=Math.max(30,t?.width??0),s=Math.max(30,t?.height??0),{cssStyles:o}=t,l=Z.svg(n),c=K(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],u=ot(h),d=l.path(u,c),f=n.insert(()=>d,":first-child");return f.attr("class","basic label-container"),o&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(${-a/2}, ${-s/2})`),Q(t,f),t.intersect=function(g){return I.info("Pill intersect",t,{points:h}),G.polygon(t,h,g)},n}p(ig,"hourglass");async function ng(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=V(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await it(e,t,"icon-shape default"),d=t.pos==="t",f=o,g=o,{nodeBorder:m}=r,{stylesMap:y}=Or(t),x=-g/2,b=-f/2,w=t.label?8:0,C=Z.svg(c),v=K(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const L=C.rectangle(x,b,g,f,v),T=Math.max(g,h.width),O=f+h.height+w,z=C.rectangle(-T/2,-O/2,T,O,{...v,fill:"transparent",stroke:"none"}),q=c.insert(()=>L,":first-child"),D=c.insert(()=>z);if(t.icon){const W=c.append("g");W.html(`<g>${await zr(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const j=W.node().getBBox(),$=j.width,M=j.height,B=j.x,P=j.y;W.attr("transform",`translate(${-$/2-B},${d?h.height/2+w/2-M/2-P:-h.height/2-w/2-M/2-P})`),W.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-O/2:O/2-h.height})`),q.attr("transform",`translate(0,${d?h.height/2+w/2:-h.height/2-w/2})`),Q(t,D),t.intersect=function(W){if(I.info("iconSquare intersect",t,W),!t.label)return G.rect(t,W);const j=t.x??0,$=t.y??0,M=t.height??0;let B=[];return d?B=[{x:j-h.width/2,y:$-M/2},{x:j+h.width/2,y:$-M/2},{x:j+h.width/2,y:$-M/2+h.height+w},{x:j+g/2,y:$-M/2+h.height+w},{x:j+g/2,y:$+M/2},{x:j-g/2,y:$+M/2},{x:j-g/2,y:$-M/2+h.height+w},{x:j-h.width/2,y:$-M/2+h.height+w}]:B=[{x:j-g/2,y:$-M/2},{x:j+g/2,y:$-M/2},{x:j+g/2,y:$-M/2+f},{x:j+h.width/2,y:$-M/2+f},{x:j+h.width/2/2,y:$+M/2},{x:j-h.width/2,y:$+M/2},{x:j-h.width/2,y:$-M/2+f},{x:j-g/2,y:$-M/2+f}],G.polygon(t,B,W)},c}p(ng,"icon");async function ag(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=V(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await it(e,t,"icon-shape default"),d=20,f=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=Or(t),b=Z.svg(c),w=K(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const C=x.get("fill");w.stroke=C??y;const v=c.append("g");t.icon&&v.html(`<g>${await zr(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const L=v.node().getBBox(),T=L.width,O=L.height,z=L.x,q=L.y,D=Math.max(T,O)*Math.SQRT2+d*2,W=b.circle(0,0,D,w),j=Math.max(D,h.width),$=D+h.height+f,M=b.rectangle(-j/2,-$/2,j,$,{...w,fill:"transparent",stroke:"none"}),B=c.insert(()=>W,":first-child"),P=c.insert(()=>M);return v.attr("transform",`translate(${-T/2-z},${g?h.height/2+f/2-O/2-q:-h.height/2-f/2-O/2-q})`),v.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-$/2:$/2-h.height})`),B.attr("transform",`translate(0,${g?h.height/2+f/2:-h.height/2-f/2})`),Q(t,P),t.intersect=function(E){return I.info("iconSquare intersect",t,E),G.rect(t,E)},c}p(ag,"iconCircle");async function sg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=V(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await it(e,t,"icon-shape default"),f=t.pos==="t",g=o+u*2,m=o+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Or(t),w=-m/2,C=-g/2,v=t.label?8:0,L=Z.svg(c),T=K(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const O=b.get("fill");T.stroke=O??x;const z=L.path(Pe(w,C,m,g,5),T),q=Math.max(m,h.width),D=g+h.height+v,W=L.rectangle(-q/2,-D/2,q,D,{...T,fill:"transparent",stroke:"none"}),j=c.insert(()=>z,":first-child").attr("class","icon-shape2"),$=c.insert(()=>W);if(t.icon){const M=c.append("g");M.html(`<g>${await zr(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const B=M.node().getBBox(),P=B.width,E=B.height,A=B.x,N=B.y;M.attr("transform",`translate(${-P/2-A},${f?h.height/2+v/2-E/2-N:-h.height/2-v/2-E/2-N})`),M.attr("style",`color: ${b.get("stroke")??y};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-D/2:D/2-h.height})`),j.attr("transform",`translate(0,${f?h.height/2+v/2:-h.height/2-v/2})`),Q(t,$),t.intersect=function(M){if(I.info("iconSquare intersect",t,M),!t.label)return G.rect(t,M);const B=t.x??0,P=t.y??0,E=t.height??0;let A=[];return f?A=[{x:B-h.width/2,y:P-E/2},{x:B+h.width/2,y:P-E/2},{x:B+h.width/2,y:P-E/2+h.height+v},{x:B+m/2,y:P-E/2+h.height+v},{x:B+m/2,y:P+E/2},{x:B-m/2,y:P+E/2},{x:B-m/2,y:P-E/2+h.height+v},{x:B-h.width/2,y:P-E/2+h.height+v}]:A=[{x:B-m/2,y:P-E/2},{x:B+m/2,y:P-E/2},{x:B+m/2,y:P-E/2+g},{x:B+h.width/2,y:P-E/2+g},{x:B+h.width/2/2,y:P+E/2},{x:B-h.width/2,y:P+E/2},{x:B-h.width/2,y:P-E/2+g},{x:B-m/2,y:P-E/2+g}],G.polygon(t,A,M)},c}p(sg,"iconRounded");async function og(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=V(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await it(e,t,"icon-shape default"),f=t.pos==="t",g=o+u*2,m=o+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Or(t),w=-m/2,C=-g/2,v=t.label?8:0,L=Z.svg(c),T=K(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const O=b.get("fill");T.stroke=O??x;const z=L.path(Pe(w,C,m,g,.1),T),q=Math.max(m,h.width),D=g+h.height+v,W=L.rectangle(-q/2,-D/2,q,D,{...T,fill:"transparent",stroke:"none"}),j=c.insert(()=>z,":first-child"),$=c.insert(()=>W);if(t.icon){const M=c.append("g");M.html(`<g>${await zr(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const B=M.node().getBBox(),P=B.width,E=B.height,A=B.x,N=B.y;M.attr("transform",`translate(${-P/2-A},${f?h.height/2+v/2-E/2-N:-h.height/2-v/2-E/2-N})`),M.attr("style",`color: ${b.get("stroke")??y};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-D/2:D/2-h.height})`),j.attr("transform",`translate(0,${f?h.height/2+v/2:-h.height/2-v/2})`),Q(t,$),t.intersect=function(M){if(I.info("iconSquare intersect",t,M),!t.label)return G.rect(t,M);const B=t.x??0,P=t.y??0,E=t.height??0;let A=[];return f?A=[{x:B-h.width/2,y:P-E/2},{x:B+h.width/2,y:P-E/2},{x:B+h.width/2,y:P-E/2+h.height+v},{x:B+m/2,y:P-E/2+h.height+v},{x:B+m/2,y:P+E/2},{x:B-m/2,y:P+E/2},{x:B-m/2,y:P-E/2+h.height+v},{x:B-h.width/2,y:P-E/2+h.height+v}]:A=[{x:B-m/2,y:P-E/2},{x:B+m/2,y:P-E/2},{x:B+m/2,y:P-E/2+g},{x:B+h.width/2,y:P-E/2+g},{x:B+h.width/2/2,y:P+E/2},{x:B-h.width/2,y:P+E/2},{x:B-h.width/2,y:P-E/2+g},{x:B-m/2,y:P-E/2+g}],G.polygon(t,A,M)},c}p(og,"iconSquare");async function lg(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/a;const{labelStyles:s}=V(t);t.labelStyle=s;const o=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?o??0:0,t?.assetWidth??n),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(c,o??0);const{shapeSvg:u,bbox:d,label:f}=await it(e,t,"image-shape default"),g=t.pos==="t",m=-c/2,y=-h/2,x=t.label?8:0,b=Z.svg(u),w=K(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const C=b.rectangle(m,y,c,h,w),v=Math.max(c,d.width),L=h+d.height+x,T=b.rectangle(-v/2,-L/2,v,L,{...w,fill:"none",stroke:"none"}),O=u.insert(()=>C,":first-child"),z=u.insert(()=>T);if(t.img){const q=u.append("image");q.attr("href",t.img),q.attr("width",c),q.attr("height",h),q.attr("preserveAspectRatio","none"),q.attr("transform",`translate(${-c/2},${g?L/2-h:-L/2})`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-h/2-d.height/2-x/2:h/2-d.height/2+x/2})`),O.attr("transform",`translate(0,${g?d.height/2+x/2:-d.height/2-x/2})`),Q(t,z),t.intersect=function(q){if(I.info("iconSquare intersect",t,q),!t.label)return G.rect(t,q);const D=t.x??0,W=t.y??0,j=t.height??0;let $=[];return g?$=[{x:D-d.width/2,y:W-j/2},{x:D+d.width/2,y:W-j/2},{x:D+d.width/2,y:W-j/2+d.height+x},{x:D+c/2,y:W-j/2+d.height+x},{x:D+c/2,y:W+j/2},{x:D-c/2,y:W+j/2},{x:D-c/2,y:W-j/2+d.height+x},{x:D-d.width/2,y:W-j/2+d.height+x}]:$=[{x:D-c/2,y:W-j/2},{x:D+c/2,y:W-j/2},{x:D+c/2,y:W-j/2+h},{x:D+d.width/2,y:W-j/2+h},{x:D+d.width/2/2,y:W+j/2},{x:D-d.width/2,y:W+j/2},{x:D-d.width/2,y:W-j/2+h},{x:D-c/2,y:W-j/2+h}],G.polygon(t,$,q)},u}p(lg,"imageSquare");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),o=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Z.svg(n),d=K(t,{}),f=ot(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=Re(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,Q(t,c),t.intersect=function(u){return G.polygon(t,l,u)},n}p(cg,"inv_trapezoid");async function ka(e,t,r){const{labelStyles:i,nodeStyles:n}=V(t);t.labelStyle=i;const{shapeSvg:a,bbox:s}=await it(e,t,rt(t)),o=Math.max(s.width+r.labelPaddingX*2,t?.width||0),l=Math.max(s.height+r.labelPaddingY*2,t?.height||0),c=-o/2,h=-l/2;let u,{rx:d,ry:f}=t;const{cssStyles:g}=t;if(r?.rx&&r.ry&&(d=r.rx,f=r.ry),t.look==="handDrawn"){const m=Z.svg(a),y=K(t,{}),x=d||f?m.path(Pe(c,h,o,l,d||0),y):m.rectangle(c,h,o,l,y);u=a.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",Pt(g))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",Pt(d)).attr("ry",Pt(f)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return Q(t,u),t.calcIntersect=function(m,y){return G.rect(m,y)},t.intersect=function(m){return G.rect(t,m)},a}p(ka,"drawRect");async function hg(e,t){const{shapeSvg:r,bbox:i,label:n}=await it(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Q(t,a),t.intersect=function(l){return G.rect(t,l)},r}p(hg,"labelRect");async function ug(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0),t?.width??0),o=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-(3*o)/6,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Z.svg(n),d=K(t,{}),f=ot(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=Re(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,Q(t,c),t.intersect=function(u){return G.polygon(t,l,u)},n}p(ug,"lean_left");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0),t?.width??0),o=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Z.svg(n),d=K(t,{}),f=ot(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=Re(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,Q(t,c),t.intersect=function(u){return G.polygon(t,l,u)},n}p(dg,"lean_right");function fg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.label="",t.labelStyle=r;const n=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=Math.max(35,t?.width??0),o=Math.max(35,t?.height??0),l=7,c=[{x:s,y:0},{x:0,y:o+l/2},{x:s-2*l,y:o+l/2},{x:0,y:2*o},{x:s,y:o-l/2},{x:2*l,y:o-l/2}],h=Z.svg(n),u=K(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=ot(c),f=h.path(d,u),g=n.insert(()=>f,":first-child");return a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${s/2},${-o})`),Q(t,g),t.intersect=function(m){return I.info("lightningBolt intersect",t,m),G.polygon(t,c,m)},n}p(fg,"lightningBolt");var MS=p((e,t,r,i,n,a,s)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+s}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),AS=p((e,t,r,i,n,a,s)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+s}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),ES=p((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0),t.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(a.height+c+(t.padding??0),t.height??0),u=h*.1;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=Z.svg(n),m=AS(0,0,o,h,l,c,u),y=ES(0,c,o,h,l,c),x=K(t,{}),b=g.path(m,x),w=g.path(y,x);n.insert(()=>w,":first-child").attr("class","line"),d=n.insert(()=>b,":first-child"),d.attr("class","basic label-container"),f&&d.attr("style",f)}else{const g=MS(0,0,o,h,l,c,u);d=n.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Pt(f)).attr("style",i)}return d.attr("label-offset-y",c),d.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),Q(t,d),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),t.intersect=function(g){const m=G.rect(t,g),y=m.x-(t.x??0);if(l!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-c)){let x=c*c*(1-y*y/(l*l));x>0&&(x=Math.sqrt(x)),x=c-x,g.y-(t.y??0)>0&&(x=-x),m.y+=x}return m},n}p(pg,"linedCylinder");async function gg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,{cssStyles:u}=t,d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=[{x:-o/2-o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:h/2},...Ae(-o/2-o/2*.1,h/2,o/2+o/2*.1,h/2,c,.8),{x:o/2+o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:-h/2},{x:-o/2,y:-h/2},{x:-o/2,y:h/2*1.1},{x:-o/2,y:-h/2}],m=d.polygon(g.map(x=>[x.x,x.y]),f),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)+o/2*.1/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),Q(t,y),t.intersect=function(x){return G.polygon(t,g,x)},n}p(gg,"linedWaveEdgedRect");async function mg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,h=-o/2,u=-l/2,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{}),m=[{x:h-c,y:u+c},{x:h-c,y:u+l+c},{x:h+o-c,y:u+l+c},{x:h+o-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u+l-c},{x:h+o+c,y:u+l-c},{x:h+o+c,y:u-c},{x:h+c,y:u-c},{x:h+c,y:u},{x:h,y:u},{x:h,y:u+c}],y=[{x:h,y:u+c},{x:h+o-c,y:u+c},{x:h+o-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ot(m),b=f.path(x,g),w=ot(y),C=f.path(w,{...g,fill:"none"}),v=n.insert(()=>C,":first-child");return v.insert(()=>b,":first-child"),v.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),s.attr("transform",`translate(${-(a.width/2)-c-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),Q(t,v),t.intersect=function(L){return G.polygon(t,m,L)},n}p(mg,"multiRect");async function yg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,u=-o/2,d=-h/2,f=5,{cssStyles:g}=t,m=Ae(u-f,d+h+f,u+o-f,d+h+f,c,.8),y=m?.[m.length-1],x=[{x:u-f,y:d+f},{x:u-f,y:d+h+f},...m,{x:u+o-f,y:y.y-f},{x:u+o,y:y.y-f},{x:u+o,y:y.y-2*f},{x:u+o+f,y:y.y-2*f},{x:u+o+f,y:d-f},{x:u+f,y:d-f},{x:u+f,y:d},{x:u,y:d},{x:u,y:d+f}],b=[{x:u,y:d+f},{x:u+o-f,y:d+f},{x:u+o-f,y:y.y-f},{x:u+o,y:y.y-f},{x:u+o,y:d},{x:u,y:d}],w=Z.svg(n),C=K(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const v=ot(x),L=w.path(v,C),T=ot(b),O=w.path(T,C),z=n.insert(()=>L,":first-child");return z.insert(()=>O),z.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",i),z.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-(a.width/2)-f-(a.x-(a.left??0))}, ${-(a.height/2)+f-c/2-(a.y-(a.top??0))})`),Q(t,z),t.intersect=function(q){return G.polygon(t,x,q)},n}p(yg,"multiWaveEdgedRectangle");async function xg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=V(t);t.labelStyle=i,t.useHtmlLabels||$t().flowchart?.htmlLabels!==!1||(t.centerLabel=!0);const{shapeSvg:s,bbox:o,label:l}=await it(e,t,rt(t)),c=Math.max(o.width+(t.padding??0)*2,t?.width??0),h=Math.max(o.height+(t.padding??0)*2,t?.height??0),u=-c/2,d=-h/2,{cssStyles:f}=t,g=Z.svg(s),m=K(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=g.rectangle(u,d,c,h,m),x=s.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),n&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",n),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Q(t,x),t.intersect=function(b){return G.rect(t,b)},s}p(xg,"note");var FS=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 bg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=a.width+t.padding,o=a.height+t.padding,l=s+o,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=Z.svg(n),g=K(t,{}),m=FS(0,0,l),y=f.path(m,g);u=n.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),d&&u.attr("style",d)}else u=Re(n,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),Q(t,u),t.calcIntersect=function(f,g){const m=f.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=G.polygon(f,y,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(f){return this.calcIntersect(t,f)},n}p(bg,"question");async function wg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),l=Math.max(a.height+(t.padding??0),t?.height??0),c=-o/2,h=-l/2,u=h/2,d=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],{cssStyles:f}=t,g=Z.svg(n),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=ot(d),x=g.path(y,m),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-u/2},0)`),s.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Q(t,b),t.intersect=function(w){return G.polygon(t,d,w)},n}p(wg,"rect_left_inv_arrow");async function vg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),s=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=o.node().appendChild(await He(c,t.labelStyle,!0,!0));let u={width:0,height:0};if(wt(ut()?.flowchart?.htmlLabels)){const O=h.children[0],z=lt(h);u=O.getBoundingClientRect(),z.attr("width",u.width),z.attr("height",u.height)}I.info("Text 2",l);const d=l||[],f=h.getBBox(),g=o.node().appendChild(await He(d.join?d.join("<br/>"):d,t.labelStyle,!0,!0)),m=g.children[0],y=lt(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;lt(g).attr("transform","translate( "+(u.width>f.width?0:(f.width-u.width)/2)+", "+(f.height+x+5)+")"),lt(h).attr("transform","translate( "+(u.width<f.width?0:-(f.width-u.width)/2)+", 0)"),u=o.node().getBBox(),o.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const b=u.width+(t.padding||0),w=u.height+(t.padding||0),C=-u.width/2-x,v=-u.height/2-x;let L,T;if(t.look==="handDrawn"){const O=Z.svg(a),z=K(t,{}),q=O.path(Pe(C,v,b,w,t.rx||0),z),D=O.line(-u.width/2-x,-u.height/2-x+f.height+x,u.width/2+x,-u.height/2-x+f.height+x,z);T=a.insert(()=>(I.debug("Rough node insert CXC",q),D),":first-child"),L=a.insert(()=>(I.debug("Rough node insert CXC",q),q),":first-child")}else L=s.insert("rect",":first-child"),T=s.insert("line"),L.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),T.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+f.height+x).attr("y2",-u.height/2-x+f.height+x);return Q(t,L),t.intersect=function(O){return G.rect(t,O)},a}p(vg,"rectWithTitle");function ai(e,t,r,i,n,a,s){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,f=u/n,g=d/a,m=Math.sqrt(f**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*a*Math.sin(h)*(s?-1:1),b=c-y*n*Math.cos(h)*(s?-1:1),w=Math.atan2((t-b)/a,(e-x)/n);let v=Math.atan2((i-b)/a,(r-x)/n)-w;s&&v<0&&(v+=2*Math.PI),!s&&v>0&&(v-=2*Math.PI);const L=[];for(let T=0;T<20;T++){const O=T/19,z=w+O*v,q=x+n*Math.cos(z),D=b+a*Math.sin(z);L.push({x:q,y:D})}return L}p(ai,"generateArcPoints");async function kg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=t?.padding??0,o=t?.padding??0,l=(t?.width?t?.width:a.width)+s*2,c=(t?.height?t?.height:a.height)+o*2,h=t.radius||5,u=t.taper||5,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{});t.stroke&&(g.stroke=t.stroke),t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-l/2+u,y:-c/2},{x:l/2-u,y:-c/2},...ai(l/2-u,-c/2,l/2,-c/2+u,h,h,!0),{x:l/2,y:-c/2+u},{x:l/2,y:c/2-u},...ai(l/2,c/2-u,l/2-u,c/2,h,h,!0),{x:l/2-u,y:c/2},{x:-l/2+u,y:c/2},...ai(-l/2+u,c/2,-l/2,c/2-u,h,h,!0),{x:-l/2,y:c/2-u},{x:-l/2,y:-c/2+u},...ai(-l/2,-c/2+u,-l/2+u,-c/2,h,h,!0)],y=ot(m),x=f.path(y,g),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),Q(t,b),t.intersect=function(w){return G.polygon(t,m,w)},n}p(kg,"roundedRect");async function Cg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=t?.padding??0,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=-a.width/2-o,u=-a.height/2-o,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],y=f.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",Pt(d)),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),s.attr("transform",`translate(${-l/2+4+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-(a.y-(a.top??0))})`),Q(t,x),t.intersect=function(b){return G.rect(t,b)},n}p(Cg,"shadedProcess");async function _g(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=-o/2,h=-l/2,{cssStyles:u}=t,d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=[{x:c,y:h},{x:c,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h-l/2}],m=ot(g),y=d.path(m,f),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${l/4})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))}, ${-l/4+(t.padding??0)-(a.y-(a.top??0))})`),Q(t,x),t.intersect=function(b){return G.polygon(t,g,b)},n}p(_g,"slopedRect");async function Sg(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1};return ka(e,t,r)}p(Sg,"squareRect");async function Tg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=a.height+t.padding,o=a.width+s/4+t.padding,l=s/2,{cssStyles:c}=t,h=Z.svg(n),u=K(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=[{x:-o/2+l,y:-s/2},{x:o/2-l,y:-s/2},...Bi(-o/2+l,0,l,50,90,270),{x:o/2-l,y:s/2},...Bi(o/2-l,0,l,50,270,450)],f=ot(d),g=h.path(f,u),m=n.insert(()=>g,":first-child");return m.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),Q(t,m),t.intersect=function(y){return G.polygon(t,d,y)},n}p(Tg,"stadium");async function Bg(e,t){return ka(e,t,{rx:5,ry:5})}p(Bg,"state");function $g(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=V(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:s,stateBorder:o,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=Z.svg(c),u=K(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=h.circle(0,0,14,{...u,stroke:s,strokeWidth:2}),f=o??l,g=h.circle(0,0,5,{...u,fill:f,stroke:f,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>d,":first-child");return m.insert(()=>g),a&&m.selectAll("path").attr("style",a),n&&m.selectAll("path").attr("style",n),Q(t,m),t.intersect=function(y){return G.circle(t,7,y)},c}p($g,"stateEnd");function Lg(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const o=Z.svg(n).circle(0,0,14,bv(i));a=n.insert(()=>o),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=n.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Q(t,a),t.intersect=function(s){return G.circle(t,7,s)},n}p(Lg,"stateStart");async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=(t?.padding||0)/2,o=a.width+t.padding,l=a.height+t.padding,c=-a.width/2-s,h=-a.height/2-s,u=[{x:0,y:0},{x:o,y:0},{x:o,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(t.look==="handDrawn"){const d=Z.svg(n),f=K(t,{}),g=d.rectangle(c-8,h,o+16,l,f),m=d.line(c,h,c,h+l,f),y=d.line(c+o,h,c+o,h+l,f);n.insert(()=>m,":first-child"),n.insert(()=>y,":first-child");const x=n.insert(()=>g,":first-child"),{cssStyles:b}=t;x.attr("class","basic label-container").attr("style",Pt(b)),Q(t,x)}else{const d=Re(n,o,l,u);i&&d.attr("style",i),Q(t,d)}return t.intersect=function(d){return G.polygon(t,u,d)},n}p(Mg,"subroutine");async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),o=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=-s/2,c=-o/2,h=.2*o,u=.2*o,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{}),m=[{x:l-h/2,y:c},{x:l+s+h/2,y:c},{x:l+s+h/2,y:c+o},{x:l-h/2,y:c+o}],y=[{x:l+s-h/2,y:c+o},{x:l+s+h/2,y:c+o},{x:l+s+h/2,y:c+o-u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ot(m),b=f.path(x,g),w=ot(y),C=f.path(w,{...g,fillStyle:"solid"}),v=n.insert(()=>C,":first-child");return v.insert(()=>b,":first-child"),v.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),Q(t,v),t.intersect=function(L){return G.polygon(t,m,L)},n}p(Ag,"taggedRect");async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=.2*o,u=.2*l,d=l+c,{cssStyles:f}=t,g=Z.svg(n),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-o/2-o/2*.1,y:d/2},...Ae(-o/2-o/2*.1,d/2,o/2+o/2*.1,d/2,c,.8),{x:o/2+o/2*.1,y:-d/2},{x:-o/2-o/2*.1,y:-d/2}],x=-o/2+o/2*.1,b=-d/2-u*.4,w=[{x:x+o-h,y:(b+l)*1.4},{x:x+o,y:b+l-u},{x:x+o,y:(b+l)*.9},...Ae(x+o,(b+l)*1.3,x+o-h,(b+l)*1.5,-l*.03,.5)],C=ot(y),v=g.path(C,m),L=ot(w),T=g.path(L,{...m,fillStyle:"solid"}),O=n.insert(()=>T,":first-child");return O.insert(()=>v,":first-child"),O.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",i),O.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),Q(t,O),t.intersect=function(z){return G.polygon(t,y,z)},n}p(Eg,"taggedWaveEdgedRectangle");async function Fg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=Math.max(a.width+t.padding,t?.width||0),o=Math.max(a.height+t.padding,t?.height||0),l=-s/2,c=-o/2,h=n.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",s).attr("height",o),Q(t,h),t.intersect=function(u){return G.rect(t,u)},n}p(Fg,"text");var PS=p((e,t,r,i,n,a)=>`M${e},${t}
188
188
  a${n},${a} 0,0,1 0,${-i}
189
189
  l${r},0
190
190
  a${n},${a} 0,0,1 0,${i}
191
191
  M${r},${-i}
192
192
  a${n},${a} 0,0,0 0,${i}
193
- l${-r},0`,"createCylinderPathD"),ES=p((e,t,r,i,n,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),FS=p((e,t,r,i,n,a)=>[`M${e+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function Fg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s,halfPadding:o}=await it(e,t,rt(t)),l=t.look==="neo"?o*2:o,c=a.height+l,h=c/2,u=h/(2.5+c/50),d=a.width+u+l,{cssStyles:f}=t;let g;if(t.look==="handDrawn"){const m=Z.svg(n),y=ES(0,0,d,c,u,h),x=FS(0,0,d,c,u,h),b=m.path(y,K(t,{})),w=m.path(x,K(t,{fill:"none"}));g=n.insert(()=>w,":first-child"),g=n.insert(()=>b,":first-child"),g.attr("class","basic label-container"),f&&g.attr("style",f)}else{const m=AS(0,0,d,c,u,h);g=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Pt(f)).attr("style",i),g.attr("class","basic label-container"),f&&g.selectAll("path").attr("style",f),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-d/2}, ${c/2} )`),s.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Q(t,g),t.intersect=function(m){const y=G.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},n}p(Fg,"tiltedCylinder");async function Pg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=a.width+t.padding,o=a.height+t.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Z.svg(n),d=K(t,{}),f=ot(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=Re(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,Q(t,c),t.intersect=function(u){return G.polygon(t,l,u)},n}p(Pg,"trapezoid");async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=60,o=20,l=Math.max(s,a.width+(t.padding??0)*2,t?.width??0),c=Math.max(o,a.height+(t.padding??0)*2,t?.height??0),{cssStyles:h}=t,u=Z.svg(n),d=K(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],g=ot(f),m=u.path(g,d),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),Q(t,y),t.intersect=function(x){return G.polygon(t,f,x)},n}p(Rg,"trapezoidalPentagon");async function Og(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=wt(ut().flowchart?.htmlLabels),l=a.width+(t.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:d}=t,f=Z.svg(n),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=ot(u),y=f.path(m,g),x=n.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=l,t.height=c,Q(t,x),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(t.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(b){return I.info("Triangle intersect",t,u,b),G.polygon(t,u,b)},n}p(Og,"triangle");async function Dg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/8,h=l+c,{cssStyles:u}=t,f=70-o,g=f>0?f/2:0,m=Z.svg(n),y=K(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-o/2-g,y:h/2},...Ae(-o/2-g,h/2,o/2+g,h/2,c,.8),{x:o/2+g,y:-h/2},{x:-o/2-g,y:-h/2}],b=ot(x),w=m.path(b,y),C=n.insert(()=>w,":first-child");return C.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c-(a.y-(a.top??0))})`),Q(t,C),t.intersect=function(v){return G.polygon(t,x,v)},n}p(Dg,"waveEdgedRectangle");async function Ng(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=100,o=50,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=l/c;let u=l,d=c;u>d*h?d=u/h:u=d*h,u=Math.max(u,s),d=Math.max(d,o);const f=Math.min(d*.2,d/4),g=d+f*2,{cssStyles:m}=t,y=Z.svg(n),x=K(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:g/2},...Ae(-u/2,g/2,u/2,g/2,f,1),{x:u/2,y:-g/2},...Ae(u/2,-g/2,-u/2,-g/2,f,-1)],w=ot(b),C=y.path(w,x),v=n.insert(()=>C,":first-child");return v.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),Q(t,v),t.intersect=function(L){return G.polygon(t,b,L)},n}p(Ng,"waveRectangle");async function Ig(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,h=-o/2,u=-l/2,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{}),m=[{x:h-c,y:u-c},{x:h-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u-c}],y=`M${h-c},${u-c} L${h+o},${u-c} L${h+o},${u+l} L${h-c},${u+l} L${h-c},${u-c}
193
+ l${-r},0`,"createCylinderPathD"),RS=p((e,t,r,i,n,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),DS=p((e,t,r,i,n,a)=>[`M${e+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function Pg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s,halfPadding:o}=await it(e,t,rt(t)),l=t.look==="neo"?o*2:o,c=a.height+l,h=c/2,u=h/(2.5+c/50),d=a.width+u+l,{cssStyles:f}=t;let g;if(t.look==="handDrawn"){const m=Z.svg(n),y=RS(0,0,d,c,u,h),x=DS(0,0,d,c,u,h),b=m.path(y,K(t,{})),w=m.path(x,K(t,{fill:"none"}));g=n.insert(()=>w,":first-child"),g=n.insert(()=>b,":first-child"),g.attr("class","basic label-container"),f&&g.attr("style",f)}else{const m=PS(0,0,d,c,u,h);g=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Pt(f)).attr("style",i),g.attr("class","basic label-container"),f&&g.selectAll("path").attr("style",f),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-d/2}, ${c/2} )`),s.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Q(t,g),t.intersect=function(m){const y=G.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},n}p(Pg,"tiltedCylinder");async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=a.width+t.padding,o=a.height+t.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Z.svg(n),d=K(t,{}),f=ot(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=Re(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,Q(t,c),t.intersect=function(u){return G.polygon(t,l,u)},n}p(Rg,"trapezoid");async function Dg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=60,o=20,l=Math.max(s,a.width+(t.padding??0)*2,t?.width??0),c=Math.max(o,a.height+(t.padding??0)*2,t?.height??0),{cssStyles:h}=t,u=Z.svg(n),d=K(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],g=ot(f),m=u.path(g,d),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),Q(t,y),t.intersect=function(x){return G.polygon(t,f,x)},n}p(Dg,"trapezoidalPentagon");async function Og(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=wt(ut().flowchart?.htmlLabels),l=a.width+(t.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:d}=t,f=Z.svg(n),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=ot(u),y=f.path(m,g),x=n.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=l,t.height=c,Q(t,x),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(t.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(b){return I.info("Triangle intersect",t,u,b),G.polygon(t,u,b)},n}p(Og,"triangle");async function Ng(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/8,h=l+c,{cssStyles:u}=t,f=70-o,g=f>0?f/2:0,m=Z.svg(n),y=K(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-o/2-g,y:h/2},...Ae(-o/2-g,h/2,o/2+g,h/2,c,.8),{x:o/2+g,y:-h/2},{x:-o/2-g,y:-h/2}],b=ot(x),w=m.path(b,y),C=n.insert(()=>w,":first-child");return C.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c-(a.y-(a.top??0))})`),Q(t,C),t.intersect=function(v){return G.polygon(t,x,v)},n}p(Ng,"waveEdgedRectangle");async function Ig(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=100,o=50,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=l/c;let u=l,d=c;u>d*h?d=u/h:u=d*h,u=Math.max(u,s),d=Math.max(d,o);const f=Math.min(d*.2,d/4),g=d+f*2,{cssStyles:m}=t,y=Z.svg(n),x=K(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:g/2},...Ae(-u/2,g/2,u/2,g/2,f,1),{x:u/2,y:-g/2},...Ae(u/2,-g/2,-u/2,-g/2,f,-1)],w=ot(b),C=y.path(w,x),v=n.insert(()=>C,":first-child");return v.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),Q(t,v),t.intersect=function(L){return G.polygon(t,b,L)},n}p(Ig,"waveRectangle");async function zg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,h=-o/2,u=-l/2,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{}),m=[{x:h-c,y:u-c},{x:h-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u-c}],y=`M${h-c},${u-c} L${h+o},${u-c} L${h+o},${u+l} L${h-c},${u+l} L${h-c},${u-c}
194
194
  M${h-c},${u} L${h+o},${u}
195
- M${h},${u-c} L${h},${u+l}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=f.path(y,g),b=n.insert(()=>x,":first-child");return b.attr("transform",`translate(${c/2}, ${c/2})`),b.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),s.attr("transform",`translate(${-(a.width/2)+c/2-(a.x-(a.left??0))}, ${-(a.height/2)+c/2-(a.y-(a.top??0))})`),Q(t,b),t.intersect=function(w){return G.polygon(t,m,w)},n}p(Ig,"windowPane");async function al(e,t){const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:F}=$t(),{background:R}=F,H={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${R}`]};await al(e,H)}const i=$t();t.useHtmlLabels=i.htmlLabels;let n=i.er?.diagramPadding??10,a=i.er?.entityPadding??6;const{cssStyles:s}=t,{labelStyles:o,nodeStyles:l}=V(t);if(r.attributes.length===0&&t.label){const F={rx:0,ry:0,labelPaddingX:n,labelPaddingY:n*1.5};le(t.label,i)+F.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const R=await ka(e,t,F);if(!wt(i.htmlLabels)){const H=R.select("text"),U=H.node()?.getBBox();H.attr("transform",`translate(${-U.width/2}, 0)`)}return R}i.htmlLabels||(n*=1.25,a*=1.25);let c=rt(t);c||(c="node default");const h=e.insert("g").attr("class",c).attr("id",t.domId||t.id),u=await hr(h,t.label??"",i,0,0,["name"],o);u.height+=a;let d=0;const f=[],g=[];let m=0,y=0,x=0,b=0,w=!0,C=!0;for(const F of r.attributes){const R=await hr(h,F.type,i,0,d,["attribute-type"],o);m=Math.max(m,R.width+n);const H=await hr(h,F.name,i,0,d,["attribute-name"],o);y=Math.max(y,H.width+n);const U=await hr(h,F.keys.join(),i,0,d,["attribute-keys"],o);x=Math.max(x,U.width+n);const ct=await hr(h,F.comment,i,0,d,["attribute-comment"],o);b=Math.max(b,ct.width+n);const st=Math.max(R.height,H.height,U.height,ct.height)+a;g.push({yOffset:d,rowHeight:st}),d+=st}let v=4;x<=n&&(w=!1,x=0,v--),b<=n&&(C=!1,b=0,v--);const L=h.node().getBBox();if(u.width+n*2-(m+y+x+b)>0){const F=u.width+n*2-(m+y+x+b);m+=F/v,y+=F/v,x>0&&(x+=F/v),b>0&&(b+=F/v)}const T=m+y+x+b,D=Z.svg(h),z=K(t,{});t.look!=="handDrawn"&&(z.roughness=0,z.fillStyle="solid");let q=0;g.length>0&&(q=g.reduce((F,R)=>F+(R?.rowHeight??0),0));const O=Math.max(L.width+n*2,t?.width||0,T),W=Math.max((q??0)+u.height,t?.height||0),j=-O/2,$=-W/2;h.selectAll("g:not(:first-child)").each((F,R,H)=>{const U=lt(H[R]),ct=U.attr("transform");let st=0,mt=0;if(ct){const ft=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(ct);ft&&(st=parseFloat(ft[1]),mt=parseFloat(ft[2]),U.attr("class").includes("attribute-name")?st+=m:U.attr("class").includes("attribute-keys")?st+=m+y:U.attr("class").includes("attribute-comment")&&(st+=m+y+x))}U.attr("transform",`translate(${j+n/2+st}, ${mt+$+u.height+a/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+($+a/2)+")");const M=D.rectangle(j,$,O,W,z),B=h.insert(()=>M,":first-child").attr("style",s.join("")),{themeVariables:P}=$t(),{rowEven:E,rowOdd:A,nodeBorder:N}=P;f.push(0);for(const[F,R]of g.entries()){const U=(F+1)%2===0&&R.yOffset!==0,ct=D.rectangle(j,u.height+$+R?.yOffset,O,R?.rowHeight,{...z,fill:U?E:A,stroke:N});h.insert(()=>ct,"g.label").attr("style",s.join("")).attr("class",`row-rect-${U?"even":"odd"}`)}let k=D.line(j,u.height+$,O+j,u.height+$,z);h.insert(()=>k).attr("class","divider"),k=D.line(m+j,u.height+$,m+j,W+$,z),h.insert(()=>k).attr("class","divider"),w&&(k=D.line(m+y+j,u.height+$,m+y+j,W+$,z),h.insert(()=>k).attr("class","divider")),C&&(k=D.line(m+y+x+j,u.height+$,m+y+x+j,W+$,z),h.insert(()=>k).attr("class","divider"));for(const F of f)k=D.line(j,u.height+$+F,O+j,u.height+$+F,z),h.insert(()=>k).attr("class","divider");if(Q(t,B),l&&t.look!=="handDrawn"){const R=l.split(";")?.filter(H=>H.includes("stroke"))?.map(H=>`${H}`).join("; ");h.selectAll("path").attr("style",R??""),h.selectAll(".row-rect-even path").attr("style",l)}return t.intersect=function(F){return G.rect(t,F)},h}p(al,"erBox");async function hr(e,t,r,i=0,n=0,a=[],s=""){const o=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",s);t!==ts(t)&&(t=ts(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=o.node().appendChild(await Ce(o,t,{width:le(t,r)+100,style:s,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(wt(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=lt(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}p(hr,"addText");async function zg(e,t,r,i,n=r.class.padding??12){const a=i?0:3,s=e.insert("g").attr("class",rt(t)).attr("id",t.domId||t.id);let o=null,l=null,c=null,h=null,u=0,d=0,f=0;if(o=s.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await si(o,{text:`«${b}»`},0),u=o.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await si(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();d=g.height,c=s.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const w=await si(c,b,m,[b.parseClassifier()]);m+=w+a}f=c.node().getBBox().height,f<=0&&(f=n/2),h=s.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const w=await si(h,b,y,[b.parseClassifier()]);y+=w+a}let x=s.node().getBBox();if(o!==null){const b=o.node().getBBox();o.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=s.node().getBBox(),c.attr("transform",`translate(0, ${u+d+n*2})`),x=s.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(f?f+n*4:n*2)})`),x=s.node().getBBox(),{shapeSvg:s,bbox:x}}p(zg,"textHelper");async function si(e,t,r,i=[]){const n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=$t();let s="useHtmlLabels"in t?t.useHtmlLabels:wt(a.htmlLabels)??!0,o="";"text"in t?o=t.text:o=t.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),Ze(o)&&(s=!0);const l=await Ce(n,fo(Fe(o)),{width:le(o,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a);let c,h=1;if(s){const u=l.children[0],d=lt(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const f=u.getElementsByTagName("img");if(f){const g=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...f].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,C=parseInt(b,10)*5+"px";m.style.minWidth=C,m.style.maxWidth=C}else m.style.width="100%";y(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{i.includes("font-weight: bolder")&&lt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(u.textContent=o[0]+o.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),o[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return n.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}p(si,"addText");async function qg(e,t){const r=ut(),i=r.class.padding??12,n=i,a=t.useHtmlLabels??wt(r.htmlLabels)??!0,s=t;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];const{shapeSvg:o,bbox:l}=await zg(e,t,r,a,n),{labelStyles:c,nodeStyles:h}=V(t);t.labelStyle=c,t.cssStyles=s.styles||"";const u=s.styles?.join(";")||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const d=s.members.length===0&&s.methods.length===0&&!r.class?.hideEmptyMembersBox,f=Z.svg(o),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=l.width;let y=l.height;s.members.length===0&&s.methods.length===0?y+=n:s.members.length>0&&s.methods.length===0&&(y+=n*2);const x=-m/2,b=-y/2,w=f.rectangle(x-i,b-i-(d?i:s.members.length===0&&s.methods.length===0?-i/2:0),m+2*i,y+2*i+(d?i*2:s.members.length===0&&s.methods.length===0?-i:0),g),C=o.insert(()=>w,":first-child");C.attr("class","basic label-container");const v=C.node().getBBox();o.selectAll(".text").each((z,q,O)=>{const W=lt(O[q]),j=W.attr("transform");let $=0;if(j){const E=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(j);E&&($=parseFloat(E[2]))}let M=$+b+i-(d?i:s.members.length===0&&s.methods.length===0?-i/2:0);a||(M-=4);let B=x;(W.attr("class").includes("label-group")||W.attr("class").includes("annotation-group"))&&(B=-W.node()?.getBBox().width/2||0,o.selectAll("text").each(function(P,E,A){window.getComputedStyle(A[E]).textAnchor==="middle"&&(B=0)})),W.attr("transform",`translate(${B}, ${M})`)});const L=o.select(".annotation-group").node().getBBox().height-(d?i/2:0)||0,T=o.select(".label-group").node().getBBox().height-(d?i/2:0)||0,D=o.select(".members-group").node().getBBox().height-(d?i/2:0)||0;if(s.members.length>0||s.methods.length>0||d){const z=f.line(v.x,L+T+b+i,v.x+v.width,L+T+b+i,g);o.insert(()=>z).attr("class","divider").attr("style",u)}if(d||s.members.length>0||s.methods.length>0){const z=f.line(v.x,L+T+D+b+n*2+i,v.x+v.width,L+T+D+b+i+n*2,g);o.insert(()=>z).attr("class","divider").attr("style",u)}if(s.look!=="handDrawn"&&o.selectAll("path").attr("style",u),C.select(":nth-child(2)").attr("style",u),o.selectAll(".divider").select("path").attr("style",u),t.labelStyle?o.selectAll("span").attr("style",t.labelStyle):o.selectAll("span").attr("style",u),!a){const z=RegExp(/color\s*:\s*([^;]*)/),q=z.exec(u);if(q){const O=q[0].replace("color","fill");o.selectAll("tspan").attr("style",O)}else if(c){const O=z.exec(c);if(O){const W=O[0].replace("color","fill");o.selectAll("tspan").attr("style",W)}}}return Q(t,C),t.intersect=function(z){return G.rect(t,z)},o}p(qg,"classBox");async function jg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const n=t,a=t,s=20,o=20,l="verifyMethod"in t,c=rt(t),h=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let u;l?u=await ne(h,`&lt;&lt;${n.type}&gt;&gt;`,0,t.labelStyle):u=await ne(h,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let d=u;const f=await ne(h,n.name,d,t.labelStyle+"; font-weight: bold;");if(d+=f+o,l){const L=await ne(h,`${n.requirementId?`ID: ${n.requirementId}`:""}`,d,t.labelStyle);d+=L;const T=await ne(h,`${n.text?`Text: ${n.text}`:""}`,d,t.labelStyle);d+=T;const D=await ne(h,`${n.risk?`Risk: ${n.risk}`:""}`,d,t.labelStyle);d+=D,await ne(h,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,d,t.labelStyle)}else{const L=await ne(h,`${a.type?`Type: ${a.type}`:""}`,d,t.labelStyle);d+=L,await ne(h,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,d,t.labelStyle)}const g=(h.node()?.getBBox().width??200)+s,m=(h.node()?.getBBox().height??200)+s,y=-g/2,x=-m/2,b=Z.svg(h),w=K(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const C=b.rectangle(y,x,g,m,w),v=h.insert(()=>C,":first-child");if(v.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((L,T,D)=>{const z=lt(D[T]),q=z.attr("transform");let O=0,W=0;if(q){const B=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(q);B&&(O=parseFloat(B[1]),W=parseFloat(B[2]))}const j=W-m/2;let $=y+s/2;(T===0||T===1)&&($=O),z.attr("transform",`translate(${$}, ${j+s})`)}),d>u+f+o){const L=b.line(y,x+u+f+o,y+g,x+u+f+o,w);h.insert(()=>L).attr("style",i)}return Q(t,v),t.intersect=function(L){return G.rect(t,L)},h}p(jg,"requirementBox");async function ne(e,t,r,i=""){if(t==="")return 0;const n=e.insert("g").attr("class","label").attr("style",i),a=ut(),s=a.htmlLabels??!0,o=await Ce(n,fo(Fe(t)),{width:le(t,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},a);let l;if(s){const c=o.children[0],h=lt(o);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=o.children[0];for(const h of c.children)h.textContent=h.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),i&&h.setAttribute("style",i);l=o.getBBox(),l.height+=6}return n.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}p(ne,"addText");var PS=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 Wg(e,t,{config:r}){const{labelStyles:i,nodeStyles:n}=V(t);t.labelStyle=i||"";const a=10,s=t.width;t.width=(t.width??200)-10;const{shapeSvg:o,bbox:l,label:c}=await it(e,t,rt(t)),h=t.padding||10;let u="",d;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(u=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),d=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,m;d?{label:g,bbox:m}=await Ga(d,"ticket"in t&&t.ticket||"",f):{label:g,bbox:m}=await Ga(o,"ticket"in t&&t.ticket||"",f);const{label:y,bbox:x}=await Ga(o,"assigned"in t&&t.assigned||"",f);t.width=s;const b=10,w=t?.width||0,C=Math.max(m.height,x.height)/2,v=Math.max(l.height+b*2,t?.height||0)+C,L=-w/2,T=-v/2;c.attr("transform","translate("+(h-w/2)+", "+(-C-l.height/2)+")"),g.attr("transform","translate("+(h-w/2)+", "+(-C+l.height/2)+")"),y.attr("transform","translate("+(h+w/2-x.width-2*a)+", "+(-C+l.height/2)+")");let D;const{rx:z,ry:q}=t,{cssStyles:O}=t;if(t.look==="handDrawn"){const W=Z.svg(o),j=K(t,{}),$=z||q?W.path(Pe(L,T,w,v,z||0),j):W.rectangle(L,T,w,v,j);D=o.insert(()=>$,":first-child"),D.attr("class","basic label-container").attr("style",O||null)}else{D=o.insert("rect",":first-child"),D.attr("class","basic label-container __APA__").attr("style",n).attr("rx",z??5).attr("ry",q??5).attr("x",L).attr("y",T).attr("width",w).attr("height",v);const W="priority"in t&&t.priority;if(W){const j=o.append("line"),$=L+2,M=T+Math.floor((z??0)/2),B=T+v-Math.floor((z??0)/2);j.attr("x1",$).attr("y1",M).attr("x2",$).attr("y2",B).attr("stroke-width","4").attr("stroke",PS(W))}}return Q(t,D),t.height=v,t.intersect=function(W){return G.rect(t,W)},o}p(Wg,"kanbanItem");async function Hg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await it(e,t,rt(t)),l=a.width+10*s,c=a.height+8*s,h=.15*l,{cssStyles:u}=t,d=a.width+20,f=a.height+20,g=Math.max(l,d),m=Math.max(c,f);o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let y;const x=`M0 0
195
+ M${h},${u-c} L${h},${u+l}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=f.path(y,g),b=n.insert(()=>x,":first-child");return b.attr("transform",`translate(${c/2}, ${c/2})`),b.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),s.attr("transform",`translate(${-(a.width/2)+c/2-(a.x-(a.left??0))}, ${-(a.height/2)+c/2-(a.y-(a.top??0))})`),Q(t,b),t.intersect=function(w){return G.polygon(t,m,w)},n}p(zg,"windowPane");async function al(e,t){const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:F}=$t(),{background:R}=F,H={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${R}`]};await al(e,H)}const i=$t();t.useHtmlLabels=i.htmlLabels;let n=i.er?.diagramPadding??10,a=i.er?.entityPadding??6;const{cssStyles:s}=t,{labelStyles:o,nodeStyles:l}=V(t);if(r.attributes.length===0&&t.label){const F={rx:0,ry:0,labelPaddingX:n,labelPaddingY:n*1.5};le(t.label,i)+F.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const R=await ka(e,t,F);if(!wt(i.htmlLabels)){const H=R.select("text"),U=H.node()?.getBBox();H.attr("transform",`translate(${-U.width/2}, 0)`)}return R}i.htmlLabels||(n*=1.25,a*=1.25);let c=rt(t);c||(c="node default");const h=e.insert("g").attr("class",c).attr("id",t.domId||t.id),u=await hr(h,t.label??"",i,0,0,["name"],o);u.height+=a;let d=0;const f=[],g=[];let m=0,y=0,x=0,b=0,w=!0,C=!0;for(const F of r.attributes){const R=await hr(h,F.type,i,0,d,["attribute-type"],o);m=Math.max(m,R.width+n);const H=await hr(h,F.name,i,0,d,["attribute-name"],o);y=Math.max(y,H.width+n);const U=await hr(h,F.keys.join(),i,0,d,["attribute-keys"],o);x=Math.max(x,U.width+n);const ct=await hr(h,F.comment,i,0,d,["attribute-comment"],o);b=Math.max(b,ct.width+n);const st=Math.max(R.height,H.height,U.height,ct.height)+a;g.push({yOffset:d,rowHeight:st}),d+=st}let v=4;x<=n&&(w=!1,x=0,v--),b<=n&&(C=!1,b=0,v--);const L=h.node().getBBox();if(u.width+n*2-(m+y+x+b)>0){const F=u.width+n*2-(m+y+x+b);m+=F/v,y+=F/v,x>0&&(x+=F/v),b>0&&(b+=F/v)}const T=m+y+x+b,O=Z.svg(h),z=K(t,{});t.look!=="handDrawn"&&(z.roughness=0,z.fillStyle="solid");let q=0;g.length>0&&(q=g.reduce((F,R)=>F+(R?.rowHeight??0),0));const D=Math.max(L.width+n*2,t?.width||0,T),W=Math.max((q??0)+u.height,t?.height||0),j=-D/2,$=-W/2;h.selectAll("g:not(:first-child)").each((F,R,H)=>{const U=lt(H[R]),ct=U.attr("transform");let st=0,mt=0;if(ct){const ft=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(ct);ft&&(st=parseFloat(ft[1]),mt=parseFloat(ft[2]),U.attr("class").includes("attribute-name")?st+=m:U.attr("class").includes("attribute-keys")?st+=m+y:U.attr("class").includes("attribute-comment")&&(st+=m+y+x))}U.attr("transform",`translate(${j+n/2+st}, ${mt+$+u.height+a/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+($+a/2)+")");const M=O.rectangle(j,$,D,W,z),B=h.insert(()=>M,":first-child").attr("style",s.join("")),{themeVariables:P}=$t(),{rowEven:E,rowOdd:A,nodeBorder:N}=P;f.push(0);for(const[F,R]of g.entries()){const U=(F+1)%2===0&&R.yOffset!==0,ct=O.rectangle(j,u.height+$+R?.yOffset,D,R?.rowHeight,{...z,fill:U?E:A,stroke:N});h.insert(()=>ct,"g.label").attr("style",s.join("")).attr("class",`row-rect-${U?"even":"odd"}`)}let k=O.line(j,u.height+$,D+j,u.height+$,z);h.insert(()=>k).attr("class","divider"),k=O.line(m+j,u.height+$,m+j,W+$,z),h.insert(()=>k).attr("class","divider"),w&&(k=O.line(m+y+j,u.height+$,m+y+j,W+$,z),h.insert(()=>k).attr("class","divider")),C&&(k=O.line(m+y+x+j,u.height+$,m+y+x+j,W+$,z),h.insert(()=>k).attr("class","divider"));for(const F of f)k=O.line(j,u.height+$+F,D+j,u.height+$+F,z),h.insert(()=>k).attr("class","divider");if(Q(t,B),l&&t.look!=="handDrawn"){const R=l.split(";")?.filter(H=>H.includes("stroke"))?.map(H=>`${H}`).join("; ");h.selectAll("path").attr("style",R??""),h.selectAll(".row-rect-even path").attr("style",l)}return t.intersect=function(F){return G.rect(t,F)},h}p(al,"erBox");async function hr(e,t,r,i=0,n=0,a=[],s=""){const o=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",s);t!==ts(t)&&(t=ts(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=o.node().appendChild(await Ce(o,t,{width:le(t,r)+100,style:s,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(wt(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=lt(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}p(hr,"addText");async function qg(e,t,r,i,n=r.class.padding??12){const a=i?0:3,s=e.insert("g").attr("class",rt(t)).attr("id",t.domId||t.id);let o=null,l=null,c=null,h=null,u=0,d=0,f=0;if(o=s.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await si(o,{text:`«${b}»`},0),u=o.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await si(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();d=g.height,c=s.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const w=await si(c,b,m,[b.parseClassifier()]);m+=w+a}f=c.node().getBBox().height,f<=0&&(f=n/2),h=s.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const w=await si(h,b,y,[b.parseClassifier()]);y+=w+a}let x=s.node().getBBox();if(o!==null){const b=o.node().getBBox();o.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=s.node().getBBox(),c.attr("transform",`translate(0, ${u+d+n*2})`),x=s.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(f?f+n*4:n*2)})`),x=s.node().getBBox(),{shapeSvg:s,bbox:x}}p(qg,"textHelper");async function si(e,t,r,i=[]){const n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=$t();let s="useHtmlLabels"in t?t.useHtmlLabels:wt(a.htmlLabels)??!0,o="";"text"in t?o=t.text:o=t.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),Ze(o)&&(s=!0);const l=await Ce(n,fo(Fe(o)),{width:le(o,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a);let c,h=1;if(s){const u=l.children[0],d=lt(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const f=u.getElementsByTagName("img");if(f){const g=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...f].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,C=parseInt(b,10)*5+"px";m.style.minWidth=C,m.style.maxWidth=C}else m.style.width="100%";y(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{i.includes("font-weight: bolder")&&lt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(u.textContent=o[0]+o.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),o[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return n.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}p(si,"addText");async function jg(e,t){const r=ut(),i=r.class.padding??12,n=i,a=t.useHtmlLabels??wt(r.htmlLabels)??!0,s=t;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];const{shapeSvg:o,bbox:l}=await qg(e,t,r,a,n),{labelStyles:c,nodeStyles:h}=V(t);t.labelStyle=c,t.cssStyles=s.styles||"";const u=s.styles?.join(";")||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const d=s.members.length===0&&s.methods.length===0&&!r.class?.hideEmptyMembersBox,f=Z.svg(o),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=l.width;let y=l.height;s.members.length===0&&s.methods.length===0?y+=n:s.members.length>0&&s.methods.length===0&&(y+=n*2);const x=-m/2,b=-y/2,w=f.rectangle(x-i,b-i-(d?i:s.members.length===0&&s.methods.length===0?-i/2:0),m+2*i,y+2*i+(d?i*2:s.members.length===0&&s.methods.length===0?-i:0),g),C=o.insert(()=>w,":first-child");C.attr("class","basic label-container");const v=C.node().getBBox();o.selectAll(".text").each((z,q,D)=>{const W=lt(D[q]),j=W.attr("transform");let $=0;if(j){const E=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(j);E&&($=parseFloat(E[2]))}let M=$+b+i-(d?i:s.members.length===0&&s.methods.length===0?-i/2:0);a||(M-=4);let B=x;(W.attr("class").includes("label-group")||W.attr("class").includes("annotation-group"))&&(B=-W.node()?.getBBox().width/2||0,o.selectAll("text").each(function(P,E,A){window.getComputedStyle(A[E]).textAnchor==="middle"&&(B=0)})),W.attr("transform",`translate(${B}, ${M})`)});const L=o.select(".annotation-group").node().getBBox().height-(d?i/2:0)||0,T=o.select(".label-group").node().getBBox().height-(d?i/2:0)||0,O=o.select(".members-group").node().getBBox().height-(d?i/2:0)||0;if(s.members.length>0||s.methods.length>0||d){const z=f.line(v.x,L+T+b+i,v.x+v.width,L+T+b+i,g);o.insert(()=>z).attr("class","divider").attr("style",u)}if(d||s.members.length>0||s.methods.length>0){const z=f.line(v.x,L+T+O+b+n*2+i,v.x+v.width,L+T+O+b+i+n*2,g);o.insert(()=>z).attr("class","divider").attr("style",u)}if(s.look!=="handDrawn"&&o.selectAll("path").attr("style",u),C.select(":nth-child(2)").attr("style",u),o.selectAll(".divider").select("path").attr("style",u),t.labelStyle?o.selectAll("span").attr("style",t.labelStyle):o.selectAll("span").attr("style",u),!a){const z=RegExp(/color\s*:\s*([^;]*)/),q=z.exec(u);if(q){const D=q[0].replace("color","fill");o.selectAll("tspan").attr("style",D)}else if(c){const D=z.exec(c);if(D){const W=D[0].replace("color","fill");o.selectAll("tspan").attr("style",W)}}}return Q(t,C),t.intersect=function(z){return G.rect(t,z)},o}p(jg,"classBox");async function Wg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const n=t,a=t,s=20,o=20,l="verifyMethod"in t,c=rt(t),h=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let u;l?u=await ne(h,`&lt;&lt;${n.type}&gt;&gt;`,0,t.labelStyle):u=await ne(h,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let d=u;const f=await ne(h,n.name,d,t.labelStyle+"; font-weight: bold;");if(d+=f+o,l){const L=await ne(h,`${n.requirementId?`ID: ${n.requirementId}`:""}`,d,t.labelStyle);d+=L;const T=await ne(h,`${n.text?`Text: ${n.text}`:""}`,d,t.labelStyle);d+=T;const O=await ne(h,`${n.risk?`Risk: ${n.risk}`:""}`,d,t.labelStyle);d+=O,await ne(h,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,d,t.labelStyle)}else{const L=await ne(h,`${a.type?`Type: ${a.type}`:""}`,d,t.labelStyle);d+=L,await ne(h,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,d,t.labelStyle)}const g=(h.node()?.getBBox().width??200)+s,m=(h.node()?.getBBox().height??200)+s,y=-g/2,x=-m/2,b=Z.svg(h),w=K(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const C=b.rectangle(y,x,g,m,w),v=h.insert(()=>C,":first-child");if(v.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((L,T,O)=>{const z=lt(O[T]),q=z.attr("transform");let D=0,W=0;if(q){const B=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(q);B&&(D=parseFloat(B[1]),W=parseFloat(B[2]))}const j=W-m/2;let $=y+s/2;(T===0||T===1)&&($=D),z.attr("transform",`translate(${$}, ${j+s})`)}),d>u+f+o){const L=b.line(y,x+u+f+o,y+g,x+u+f+o,w);h.insert(()=>L).attr("style",i)}return Q(t,v),t.intersect=function(L){return G.rect(t,L)},h}p(Wg,"requirementBox");async function ne(e,t,r,i=""){if(t==="")return 0;const n=e.insert("g").attr("class","label").attr("style",i),a=ut(),s=a.htmlLabels??!0,o=await Ce(n,fo(Fe(t)),{width:le(t,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},a);let l;if(s){const c=o.children[0],h=lt(o);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=o.children[0];for(const h of c.children)h.textContent=h.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),i&&h.setAttribute("style",i);l=o.getBBox(),l.height+=6}return n.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}p(ne,"addText");var OS=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 Hg(e,t,{config:r}){const{labelStyles:i,nodeStyles:n}=V(t);t.labelStyle=i||"";const a=10,s=t.width;t.width=(t.width??200)-10;const{shapeSvg:o,bbox:l,label:c}=await it(e,t,rt(t)),h=t.padding||10;let u="",d;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(u=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),d=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,m;d?{label:g,bbox:m}=await Ga(d,"ticket"in t&&t.ticket||"",f):{label:g,bbox:m}=await Ga(o,"ticket"in t&&t.ticket||"",f);const{label:y,bbox:x}=await Ga(o,"assigned"in t&&t.assigned||"",f);t.width=s;const b=10,w=t?.width||0,C=Math.max(m.height,x.height)/2,v=Math.max(l.height+b*2,t?.height||0)+C,L=-w/2,T=-v/2;c.attr("transform","translate("+(h-w/2)+", "+(-C-l.height/2)+")"),g.attr("transform","translate("+(h-w/2)+", "+(-C+l.height/2)+")"),y.attr("transform","translate("+(h+w/2-x.width-2*a)+", "+(-C+l.height/2)+")");let O;const{rx:z,ry:q}=t,{cssStyles:D}=t;if(t.look==="handDrawn"){const W=Z.svg(o),j=K(t,{}),$=z||q?W.path(Pe(L,T,w,v,z||0),j):W.rectangle(L,T,w,v,j);O=o.insert(()=>$,":first-child"),O.attr("class","basic label-container").attr("style",D||null)}else{O=o.insert("rect",":first-child"),O.attr("class","basic label-container __APA__").attr("style",n).attr("rx",z??5).attr("ry",q??5).attr("x",L).attr("y",T).attr("width",w).attr("height",v);const W="priority"in t&&t.priority;if(W){const j=o.append("line"),$=L+2,M=T+Math.floor((z??0)/2),B=T+v-Math.floor((z??0)/2);j.attr("x1",$).attr("y1",M).attr("x2",$).attr("y2",B).attr("stroke-width","4").attr("stroke",OS(W))}}return Q(t,O),t.height=v,t.intersect=function(W){return G.rect(t,W)},o}p(Hg,"kanbanItem");async function Yg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await it(e,t,rt(t)),l=a.width+10*s,c=a.height+8*s,h=.15*l,{cssStyles:u}=t,d=a.width+20,f=a.height+20,g=Math.max(l,d),m=Math.max(c,f);o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let y;const x=`M0 0
196
196
  a${h},${h} 1 0,0 ${g*.25},${-1*m*.1}
197
197
  a${h},${h} 1 0,0 ${g*.25},0
198
198
  a${h},${h} 1 0,0 ${g*.25},0
@@ -210,7 +210,7 @@ Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error
210
210
  a${h},${h} 1 0,0 ${-1*g*.1},${-1*m*.33}
211
211
  a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
212
212
  a${h},${h} 1 0,0 ${g*.1},${-1*m*.33}
213
- H0 V0 Z`;if(t.look==="handDrawn"){const b=Z.svg(n),w=K(t,{}),C=b.path(x,w);y=n.insert(()=>C,":first-child"),y.attr("class","basic label-container").attr("style",Pt(u))}else y=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),Q(t,y),t.calcIntersect=function(b,w){return G.rect(b,w)},t.intersect=function(b){return I.info("Bang intersect",t,b),G.rect(t,b)},n}p(Hg,"bang");async function Yg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await it(e,t,rt(t)),l=a.width+2*s,c=a.height+2*s,h=.15*l,u=.25*l,d=.35*l,f=.2*l,{cssStyles:g}=t;let m;const y=`M0 0
213
+ H0 V0 Z`;if(t.look==="handDrawn"){const b=Z.svg(n),w=K(t,{}),C=b.path(x,w);y=n.insert(()=>C,":first-child"),y.attr("class","basic label-container").attr("style",Pt(u))}else y=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),Q(t,y),t.calcIntersect=function(b,w){return G.rect(b,w)},t.intersect=function(b){return I.info("Bang intersect",t,b),G.rect(t,b)},n}p(Yg,"bang");async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await it(e,t,rt(t)),l=a.width+2*s,c=a.height+2*s,h=.15*l,u=.25*l,d=.35*l,f=.2*l,{cssStyles:g}=t;let m;const y=`M0 0
214
214
  a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
215
215
  a${d},${d} 1 0,1 ${l*.4},${-1*l*.1}
216
216
  a${u},${u} 1 0,1 ${l*.35},${l*.2}
@@ -224,7 +224,7 @@ Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error
224
224
 
225
225
  a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
226
226
  a${f},${f} 1 0,1 ${l*.1},${-1*c*.65}
227
- H0 V0 Z`;if(t.look==="handDrawn"){const x=Z.svg(n),b=K(t,{}),w=x.path(y,b);m=n.insert(()=>w,":first-child"),m.attr("class","basic label-container").attr("style",Pt(g))}else m=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),Q(t,m),t.calcIntersect=function(x,b){return G.rect(x,b)},t.intersect=function(x){return I.info("Cloud intersect",t,x),G.rect(t,x)},n}p(Yg,"cloud");async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await it(e,t,rt(t)),l=a.width+8*s,c=a.height+2*s,h=5,u=`
227
+ H0 V0 Z`;if(t.look==="handDrawn"){const x=Z.svg(n),b=K(t,{}),w=x.path(y,b);m=n.insert(()=>w,":first-child"),m.attr("class","basic label-container").attr("style",Pt(g))}else m=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),Q(t,m),t.calcIntersect=function(x,b){return G.rect(x,b)},t.intersect=function(x){return I.info("Cloud intersect",t,x),G.rect(t,x)},n}p(Ug,"cloud");async function Gg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await it(e,t,rt(t)),l=a.width+8*s,c=a.height+2*s,h=5,u=`
228
228
  M${-l/2} ${c/2-h}
229
229
  v${-c+2*h}
230
230
  q0,-${h} ${h},-${h}
@@ -235,20 +235,20 @@ Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error
235
235
  h${-l+2*h}
236
236
  q-${h},0 -${h},-${h}
237
237
  Z
238
- `,d=n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return n.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),n.append(()=>o.node()),Q(t,d),t.calcIntersect=function(f,g){return G.rect(f,g)},t.intersect=function(f){return G.rect(t,f)},n}p(Ug,"defaultMindmapNode");async function Gg(e,t){const r={padding:t.padding??0};return nl(e,t,r)}p(Gg,"mindmapCircle");var RS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:_g},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:vg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Sg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Lg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Xp},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:nl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Hg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Yg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:xg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:eg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:ug},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:hg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Pg},{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:lg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Zp},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Eg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:zp},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:kg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:$g},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Bg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Jp},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:rg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Hp},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Yp},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Up},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:dg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Dg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:tg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Fg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:fg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Gp},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Vp},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Og},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Ig},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Kp},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Rg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Qp},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Cg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:mg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:gg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Ip},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Wp},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Ag},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Mg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Ng},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:bg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:pg}],OS=p(()=>{const t=[...Object.entries({state:Tg,choice:qp,note:yg,rectWithTitle:wg,labelRect:cg,iconSquare:sg,iconCircle:ng,icon:ig,iconRounded:ag,imageSquare:og,anchor:Np,kanbanItem:Wg,mindmapCircle:Gg,defaultMindmapNode:Ug,classBox:qg,erBox:al,requirementBox:jg}),...RS.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Xg=OS();function Vg(e){return e in Xg}p(Vg,"isValidShape");var Ca=new Map;async function sl(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?Xg[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let s;r.config.securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",s??null),n=await a(i,t,r)}else n=await a(e,t,r),i=n;return t.tooltip&&n.attr("title",t.tooltip),Ca.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(sl,"insertNode");var DS=p((e,t)=>{Ca.set(t.id,e)},"setNodeElem"),NS=p(()=>{Ca.clear()},"clear"),IS=p(e=>{const t=Ca.get(e.id);I.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"),zS=p((e,t,r,i,n,a)=>{t.arrowTypeStart&&_c(e,"start",t.arrowTypeStart,r,i,n,a),t.arrowTypeEnd&&_c(e,"end",t.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),qS={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{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}},_c=p((e,t,r,i,n,a,s)=>{const o=qS[r];if(!o){I.warn(`Unknown arrow type: ${r}`);return}const l=o.type,h=`${n}_${a}-${l}${t==="start"?"Start":"End"}`;if(s&&s.trim()!==""){const u=s.replace(/[^\dA-Za-z]/g,"_"),d=`${h}_${u}`;if(!document.getElementById(d)){const f=document.getElementById(h);if(f){const g=f.cloneNode(!0);g.id=d,g.querySelectorAll("path, circle, line").forEach(y=>{y.setAttribute("stroke",s),o.fill&&y.setAttribute("fill",s)}),f.parentNode?.appendChild(g)}}e.attr(`marker-${t}`,`url(${i}#${d})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),Yn=new Map,Bt=new Map,jS=p(()=>{Yn.clear(),Bt.clear()},"clear"),Zi=p(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),Zg=p(async(e,t)=>{let r=wt(ut().flowchart.htmlLabels);const{labelStyles:i}=V(t);t.labelStyle=i;const n=await Ce(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});I.info("abc82",t,t.labelType);const a=e.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label").attr("data-id",t.id);s.node().appendChild(n);let o=n.getBBox();if(r){const c=n.children[0],h=lt(n);o=c.getBoundingClientRect(),h.attr("width",o.width),h.attr("height",o.height)}s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),Yn.set(t.id,a),t.width=o.width,t.height=o.height;let l;if(t.startLabelLeft){const c=await He(t.startLabelLeft,Zi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Bt.get(t.id)||Bt.set(t.id,{}),Bt.get(t.id).startLeft=h,oi(l,t.startLabelLeft)}if(t.startLabelRight){const c=await He(t.startLabelRight,Zi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=h.node().appendChild(c),u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Bt.get(t.id)||Bt.set(t.id,{}),Bt.get(t.id).startRight=h,oi(l,t.startLabelRight)}if(t.endLabelLeft){const c=await He(t.endLabelLeft,Zi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(c),Bt.get(t.id)||Bt.set(t.id,{}),Bt.get(t.id).endLeft=h,oi(l,t.endLabelLeft)}if(t.endLabelRight){const c=await He(t.endLabelRight,Zi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(c),Bt.get(t.id)||Bt.set(t.id,{}),Bt.get(t.id).endRight=h,oi(l,t.endLabelRight)}return n},"insertEdgeLabel");function oi(e,t){ut().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(oi,"setTerminalWidth");var Kg=p((e,t)=>{I.debug("Moving label abc88 ",e.id,e.label,Yn.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=ut(),{subGraphTitleTotalMargin:n}=ca(i);if(e.label){const a=Yn.get(e.id);let s=e.x,o=e.y;if(r){const l=Gt.calcLabelPosition(r);I.debug("Moving label "+e.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(s=l.x,o=l.y)}a.attr("transform",`translate(${s}, ${o+n/2})`)}if(e.startLabelLeft){const a=Bt.get(e.id).startLeft;let s=e.x,o=e.y;if(r){const l=Gt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.startLabelRight){const a=Bt.get(e.id).startRight;let s=e.x,o=e.y;if(r){const l=Gt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelLeft){const a=Bt.get(e.id).endLeft;let s=e.x,o=e.y;if(r){const l=Gt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelRight){const a=Bt.get(e.id).endRight;let s=e.x,o=e.y;if(r){const l=Gt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),WS=p((e,t)=>{const r=e.x,i=e.y,n=Math.abs(t.x-r),a=Math.abs(t.y-i),s=e.width/2,o=e.height/2;return n>=s||a>=o},"outsideNode"),HS=p((e,t,r)=>{I.debug(`intersection calc abc89:
238
+ `,d=n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return n.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),n.append(()=>o.node()),Q(t,d),t.calcIntersect=function(f,g){return G.rect(f,g)},t.intersect=function(f){return G.rect(t,f)},n}p(Gg,"defaultMindmapNode");async function Xg(e,t){const r={padding:t.padding??0};return nl(e,t,r)}p(Xg,"mindmapCircle");var NS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Sg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:kg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Tg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Mg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Vp},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:nl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Yg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Ug},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:bg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:rg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:dg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:ug},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Rg},{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:cg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Kp},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Fg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:qp},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Cg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Lg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:$g},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:tg},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:ig},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Yp},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Up},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Gp},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:fg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Ng},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:eg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Pg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:pg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Xp},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Zp},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Og},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:zg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Qp},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Dg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Jp},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:_g},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:yg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:mg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:zp},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Hp},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Eg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Ag},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Ig},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:wg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:gg}],IS=p(()=>{const t=[...Object.entries({state:Bg,choice:jp,note:xg,rectWithTitle:vg,labelRect:hg,iconSquare:og,iconCircle:ag,icon:ng,iconRounded:sg,imageSquare:lg,anchor:Ip,kanbanItem:Hg,mindmapCircle:Xg,defaultMindmapNode:Gg,classBox:jg,erBox:al,requirementBox:Wg}),...NS.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Vg=IS();function Zg(e){return e in Vg}p(Zg,"isValidShape");var Ca=new Map;async function sl(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?Vg[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let s;r.config.securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",s??null),n=await a(i,t,r)}else n=await a(e,t,r),i=n;return t.tooltip&&n.attr("title",t.tooltip),Ca.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(sl,"insertNode");var zS=p((e,t)=>{Ca.set(t.id,e)},"setNodeElem"),qS=p(()=>{Ca.clear()},"clear"),jS=p(e=>{const t=Ca.get(e.id);I.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"),WS=p((e,t,r,i,n,a)=>{t.arrowTypeStart&&Sc(e,"start",t.arrowTypeStart,r,i,n,a),t.arrowTypeEnd&&Sc(e,"end",t.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),HS={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{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}},Sc=p((e,t,r,i,n,a,s)=>{const o=HS[r];if(!o){I.warn(`Unknown arrow type: ${r}`);return}const l=o.type,h=`${n}_${a}-${l}${t==="start"?"Start":"End"}`;if(s&&s.trim()!==""){const u=s.replace(/[^\dA-Za-z]/g,"_"),d=`${h}_${u}`;if(!document.getElementById(d)){const f=document.getElementById(h);if(f){const g=f.cloneNode(!0);g.id=d,g.querySelectorAll("path, circle, line").forEach(y=>{y.setAttribute("stroke",s),o.fill&&y.setAttribute("fill",s)}),f.parentNode?.appendChild(g)}}e.attr(`marker-${t}`,`url(${i}#${d})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),Yn=new Map,Bt=new Map,YS=p(()=>{Yn.clear(),Bt.clear()},"clear"),Zi=p(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),Kg=p(async(e,t)=>{let r=wt(ut().flowchart.htmlLabels);const{labelStyles:i}=V(t);t.labelStyle=i;const n=await Ce(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});I.info("abc82",t,t.labelType);const a=e.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label").attr("data-id",t.id);s.node().appendChild(n);let o=n.getBBox();if(r){const c=n.children[0],h=lt(n);o=c.getBoundingClientRect(),h.attr("width",o.width),h.attr("height",o.height)}s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),Yn.set(t.id,a),t.width=o.width,t.height=o.height;let l;if(t.startLabelLeft){const c=await He(t.startLabelLeft,Zi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Bt.get(t.id)||Bt.set(t.id,{}),Bt.get(t.id).startLeft=h,oi(l,t.startLabelLeft)}if(t.startLabelRight){const c=await He(t.startLabelRight,Zi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=h.node().appendChild(c),u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Bt.get(t.id)||Bt.set(t.id,{}),Bt.get(t.id).startRight=h,oi(l,t.startLabelRight)}if(t.endLabelLeft){const c=await He(t.endLabelLeft,Zi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(c),Bt.get(t.id)||Bt.set(t.id,{}),Bt.get(t.id).endLeft=h,oi(l,t.endLabelLeft)}if(t.endLabelRight){const c=await He(t.endLabelRight,Zi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(c),Bt.get(t.id)||Bt.set(t.id,{}),Bt.get(t.id).endRight=h,oi(l,t.endLabelRight)}return n},"insertEdgeLabel");function oi(e,t){ut().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(oi,"setTerminalWidth");var Qg=p((e,t)=>{I.debug("Moving label abc88 ",e.id,e.label,Yn.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=ut(),{subGraphTitleTotalMargin:n}=ca(i);if(e.label){const a=Yn.get(e.id);let s=e.x,o=e.y;if(r){const l=Gt.calcLabelPosition(r);I.debug("Moving label "+e.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(s=l.x,o=l.y)}a.attr("transform",`translate(${s}, ${o+n/2})`)}if(e.startLabelLeft){const a=Bt.get(e.id).startLeft;let s=e.x,o=e.y;if(r){const l=Gt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.startLabelRight){const a=Bt.get(e.id).startRight;let s=e.x,o=e.y;if(r){const l=Gt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelLeft){const a=Bt.get(e.id).endLeft;let s=e.x,o=e.y;if(r){const l=Gt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelRight){const a=Bt.get(e.id).endRight;let s=e.x,o=e.y;if(r){const l=Gt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),US=p((e,t)=>{const r=e.x,i=e.y,n=Math.abs(t.x-r),a=Math.abs(t.y-i),s=e.width/2,o=e.height/2;return n>=s||a>=o},"outsideNode"),GS=p((e,t,r)=>{I.debug(`intersection calc abc89:
239
239
  outsidePoint: ${JSON.stringify(t)}
240
240
  insidePoint : ${JSON.stringify(r)}
241
- node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,n=e.y,a=Math.abs(i-r.x),s=e.width/2;let o=r.x<t.x?s-a:s+a;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(n-t.y)*s>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-n:n-l-t.y;o=h*u/c;const d={x:r.x<t.x?r.x+o:r.x-h+o,y:r.y<t.y?r.y+c-u:r.y-c+u};return o===0&&(d.x=t.x,d.y=t.y),h===0&&(d.x=t.x),c===0&&(d.y=t.y),I.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${o}`,d),d}else{r.x<t.x?o=t.x-s-i:o=i-s-t.x;let u=c*o/h,d=r.x<t.x?r.x+h-o:r.x-h+o,f=r.y<t.y?r.y+u:r.y-u;return I.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${o}`,{_x:d,_y:f}),o===0&&(d=t.x,f=t.y),h===0&&(d=t.x),c===0&&(f=t.y),{x:d,y:f}}},"intersection"),Sc=p((e,t)=>{I.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(I.info("abc88 checking point",a,t),!WS(t,a)&&!n){const s=HS(t,i,a);I.debug("abc88 inside",a,i,s),I.debug("abc88 intersection",s,t);let o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)?I.warn("abc88 no intersect",s,r):r.push(s),n=!0}else I.warn("abc88 outside",a,i),i=a,n||r.push(a)}),I.debug("returning points",r),r},"cutPathAtIntersect");function Qg(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const n=e[i-1],a=e[i],s=e[i+1];(n.x===a.x&&a.y===s.y&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===s.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-s.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(Qg,"extractCornerPoints");var Tc=p(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,a=Math.sqrt(i*i+n*n),s=r/a;return{x:t.x-s*i,y:t.y-s*n}},"findAdjacentPoint"),YS=p(function(e){const{cornerPointPositions:t}=Qg(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const n=e[i-1],a=e[i+1],s=e[i],o=Tc(n,s,5),l=Tc(a,s,5),c=l.x-o.x,h=l.y-o.y;r.push(o);const u=Math.sqrt(2)*2;let d={x:s.x,y:s.y};if(Math.abs(a.x-n.x)>10&&Math.abs(a.y-n.y)>=10){I.debug("Corner point fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));const f=5;s.x===o.x?d={x:c<0?o.x-f+u:o.x+f-u,y:h<0?o.y-u:o.y+u}:d={x:c<0?o.x-u:o.x+u,y:h<0?o.y-f+u:o.y+f-u}}else I.debug("Corner point skipping fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));r.push(d,l)}else r.push(e[i]);return r},"fixCorners"),US=p((e,t,r)=>{const i=e-t-r,n=2,a=2,s=n+a,o=Math.floor(i/s),l=Array(o).fill(`${n} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),Jg=p(function(e,t,r,i,n,a,s,o=!1){const{handDrawnSeed:l}=ut();let c=t.points,h=!1;const u=n;var d=a;const f=[];for(const $ in t.cssCompiledStyles)Eo($)||f.push(t.cssCompiledStyles[$]);I.debug("UIO intersect check",t.points,d.x,u.x),d.intersect&&u.intersect&&!o&&(c=c.slice(1,t.points.length-1),c.unshift(u.intersect(c[0])),I.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],d,d.intersect(c[c.length-1])),c.push(d.intersect(c[c.length-1])));const g=btoa(JSON.stringify(c));t.toCluster&&(I.info("to cluster abc88",r.get(t.toCluster)),c=Sc(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(I.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=Sc(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=c.filter($=>!Number.isNaN($.y));m=YS(m);let y=ui;switch(y=Sn,t.curve){case"linear":y=Sn;break;case"basis":y=ui;break;case"cardinal":y=lu;break;case"bumpX":y=iu;break;case"bumpY":y=nu;break;case"catmullRom":y=hu;break;case"monotoneX":y=mu;break;case"monotoneY":y=yu;break;case"natural":y=bu;break;case"step":y=wu;break;case"stepAfter":y=ku;break;case"stepBefore":y=vu;break;default:y=ui}const{x,y:b}=lf(t),w=eu().x(x).y(b).curve(y);let C;switch(t.thickness){case"normal":C="edge-thickness-normal";break;case"thick":C="edge-thickness-thick";break;case"invisible":C="edge-thickness-invisible";break;default:C="edge-thickness-normal"}switch(t.pattern){case"solid":C+=" edge-pattern-solid";break;case"dotted":C+=" edge-pattern-dotted";break;case"dashed":C+=" edge-pattern-dashed";break;default:C+=" edge-pattern-solid"}let v,L=t.curve==="rounded"?tm(em(m,t),5):w(m);const T=Array.isArray(t.style)?t.style:[t.style];let D=T.find($=>$?.startsWith("stroke:")),z=!1;if(t.look==="handDrawn"){const $=Z.svg(e);Object.assign([],m);const M=$.path(L,{roughness:.3,seed:l});C+=" transition",v=lt(M).select("path").attr("id",t.id).attr("class"," "+C+(t.classes?" "+t.classes:"")).attr("style",T?T.reduce((P,E)=>P+";"+E,""):"");let B=v.attr("d");v.attr("d",B),e.node().appendChild(v.node())}else{const $=f.join(";"),M=T?T.reduce((F,R)=>F+R+";",""):"";let B="";t.animate&&(B=" edge-animation-fast"),t.animation&&(B=" edge-animation-"+t.animation);const P=($?$+";"+M+";":M)+";"+(T?T.reduce((F,R)=>F+";"+R,""):"");v=e.append("path").attr("d",L).attr("id",t.id).attr("class"," "+C+(t.classes?" "+t.classes:"")+(B??"")).attr("style",P),D=P.match(/stroke:([^;]+)/)?.[1],z=t.animate===!0||!!t.animation||$.includes("animation");const E=v.node(),A=typeof E.getTotalLength=="function"?E.getTotalLength():0,N=Hl[t.arrowTypeStart]||0,k=Hl[t.arrowTypeEnd]||0;if(t.look==="neo"&&!z){const R=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?US(A,N,k):`0 ${N} ${A-N-k} ${k}`}; stroke-dashoffset: 0;`;v.attr("style",R+v.attr("style"))}}v.attr("data-edge",!0),v.attr("data-et","edge"),v.attr("data-id",t.id),v.attr("data-points",g),t.showPoints&&m.forEach($=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",$.x).attr("cy",$.y)});let q="";(ut().flowchart.arrowMarkerAbsolute||ut().state.arrowMarkerAbsolute)&&(q=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,q=q.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),I.info("arrowTypeStart",t.arrowTypeStart),I.info("arrowTypeEnd",t.arrowTypeEnd),zS(v,t,q,s,i,D);const O=Math.floor(c.length/2),W=c[O];Gt.isLabelCoordinateInPath(W,v.attr("d"))||(h=!0);let j={};return h&&(j.updatedPath=c),j.originalPath=t.points,j},"insertEdge");function tm(e,t){if(e.length<2)return"";let r="";const i=e.length,n=1e-5;for(let a=0;a<i;a++){const s=e[a],o=e[a-1],l=e[a+1];if(a===0)r+=`M${s.x},${s.y}`;else if(a===i-1)r+=`L${s.x},${s.y}`;else{const c=s.x-o.x,h=s.y-o.y,u=l.x-s.x,d=l.y-s.y,f=Math.hypot(c,h),g=Math.hypot(u,d);if(f<n||g<n){r+=`L${s.x},${s.y}`;continue}const m=c/f,y=h/f,x=u/g,b=d/g,w=m*x+y*b,C=Math.max(-1,Math.min(1,w)),v=Math.acos(C);if(v<n||Math.abs(Math.PI-v)<n){r+=`L${s.x},${s.y}`;continue}const L=Math.min(t/Math.sin(v/2),f/2,g/2),T=s.x-m*L,D=s.y-y*L,z=s.x+x*L,q=s.y+b*L;r+=`L${T},${D}`,r+=`Q${s.x},${s.y} ${z},${q}`}}return r}p(tm,"generateRoundedPath");function Ys(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(Ys,"calculateDeltaAndAngle");function em(e,t){const r=e.map(n=>({...n}));if(e.length>=2&&Et[t.arrowTypeStart]){const n=Et[t.arrowTypeStart],a=e[0],s=e[1],{angle:o}=Ys(a,s),l=n*Math.cos(o),c=n*Math.sin(o);r[0].x=a.x+l,r[0].y=a.y+c}const i=e.length;if(i>=2&&Et[t.arrowTypeEnd]){const n=Et[t.arrowTypeEnd],a=e[i-1],s=e[i-2],{angle:o}=Ys(s,a),l=n*Math.cos(o),c=n*Math.sin(o);r[i-1].x=a.x-l,r[i-1].y=a.y-c}return r}p(em,"applyMarkerOffsetsToPoints");var GS=p((e,t,r,i)=>{t.forEach(n=>{cT[n](e,r,i)})},"insertMarkers"),XS=p((e,t,r)=>{I.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",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),VS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),ZS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),KS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),QS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),JS=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")},"point"),tT=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")},"circle"),eT=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")},"cross"),rT=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"),iT=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"),nT=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 n=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");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),aT=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"),sT=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 n=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");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),oT=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
241
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,n=e.y,a=Math.abs(i-r.x),s=e.width/2;let o=r.x<t.x?s-a:s+a;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(n-t.y)*s>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-n:n-l-t.y;o=h*u/c;const d={x:r.x<t.x?r.x+o:r.x-h+o,y:r.y<t.y?r.y+c-u:r.y-c+u};return o===0&&(d.x=t.x,d.y=t.y),h===0&&(d.x=t.x),c===0&&(d.y=t.y),I.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${o}`,d),d}else{r.x<t.x?o=t.x-s-i:o=i-s-t.x;let u=c*o/h,d=r.x<t.x?r.x+h-o:r.x-h+o,f=r.y<t.y?r.y+u:r.y-u;return I.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${o}`,{_x:d,_y:f}),o===0&&(d=t.x,f=t.y),h===0&&(d=t.x),c===0&&(f=t.y),{x:d,y:f}}},"intersection"),Tc=p((e,t)=>{I.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(I.info("abc88 checking point",a,t),!US(t,a)&&!n){const s=GS(t,i,a);I.debug("abc88 inside",a,i,s),I.debug("abc88 intersection",s,t);let o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)?I.warn("abc88 no intersect",s,r):r.push(s),n=!0}else I.warn("abc88 outside",a,i),i=a,n||r.push(a)}),I.debug("returning points",r),r},"cutPathAtIntersect");function Jg(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const n=e[i-1],a=e[i],s=e[i+1];(n.x===a.x&&a.y===s.y&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===s.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-s.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(Jg,"extractCornerPoints");var Bc=p(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,a=Math.sqrt(i*i+n*n),s=r/a;return{x:t.x-s*i,y:t.y-s*n}},"findAdjacentPoint"),XS=p(function(e){const{cornerPointPositions:t}=Jg(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const n=e[i-1],a=e[i+1],s=e[i],o=Bc(n,s,5),l=Bc(a,s,5),c=l.x-o.x,h=l.y-o.y;r.push(o);const u=Math.sqrt(2)*2;let d={x:s.x,y:s.y};if(Math.abs(a.x-n.x)>10&&Math.abs(a.y-n.y)>=10){I.debug("Corner point fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));const f=5;s.x===o.x?d={x:c<0?o.x-f+u:o.x+f-u,y:h<0?o.y-u:o.y+u}:d={x:c<0?o.x-u:o.x+u,y:h<0?o.y-f+u:o.y+f-u}}else I.debug("Corner point skipping fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));r.push(d,l)}else r.push(e[i]);return r},"fixCorners"),VS=p((e,t,r)=>{const i=e-t-r,n=2,a=2,s=n+a,o=Math.floor(i/s),l=Array(o).fill(`${n} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),tm=p(function(e,t,r,i,n,a,s,o=!1){const{handDrawnSeed:l}=ut();let c=t.points,h=!1;const u=n;var d=a;const f=[];for(const $ in t.cssCompiledStyles)Eo($)||f.push(t.cssCompiledStyles[$]);I.debug("UIO intersect check",t.points,d.x,u.x),d.intersect&&u.intersect&&!o&&(c=c.slice(1,t.points.length-1),c.unshift(u.intersect(c[0])),I.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],d,d.intersect(c[c.length-1])),c.push(d.intersect(c[c.length-1])));const g=btoa(JSON.stringify(c));t.toCluster&&(I.info("to cluster abc88",r.get(t.toCluster)),c=Tc(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(I.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=Tc(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=c.filter($=>!Number.isNaN($.y));m=XS(m);let y=ui;switch(y=Sn,t.curve){case"linear":y=Sn;break;case"basis":y=ui;break;case"cardinal":y=cu;break;case"bumpX":y=nu;break;case"bumpY":y=au;break;case"catmullRom":y=uu;break;case"monotoneX":y=yu;break;case"monotoneY":y=xu;break;case"natural":y=wu;break;case"step":y=vu;break;case"stepAfter":y=Cu;break;case"stepBefore":y=ku;break;default:y=ui}const{x,y:b}=cf(t),w=ru().x(x).y(b).curve(y);let C;switch(t.thickness){case"normal":C="edge-thickness-normal";break;case"thick":C="edge-thickness-thick";break;case"invisible":C="edge-thickness-invisible";break;default:C="edge-thickness-normal"}switch(t.pattern){case"solid":C+=" edge-pattern-solid";break;case"dotted":C+=" edge-pattern-dotted";break;case"dashed":C+=" edge-pattern-dashed";break;default:C+=" edge-pattern-solid"}let v,L=t.curve==="rounded"?em(rm(m,t),5):w(m);const T=Array.isArray(t.style)?t.style:[t.style];let O=T.find($=>$?.startsWith("stroke:")),z=!1;if(t.look==="handDrawn"){const $=Z.svg(e);Object.assign([],m);const M=$.path(L,{roughness:.3,seed:l});C+=" transition",v=lt(M).select("path").attr("id",t.id).attr("class"," "+C+(t.classes?" "+t.classes:"")).attr("style",T?T.reduce((P,E)=>P+";"+E,""):"");let B=v.attr("d");v.attr("d",B),e.node().appendChild(v.node())}else{const $=f.join(";"),M=T?T.reduce((F,R)=>F+R+";",""):"";let B="";t.animate&&(B=" edge-animation-fast"),t.animation&&(B=" edge-animation-"+t.animation);const P=($?$+";"+M+";":M)+";"+(T?T.reduce((F,R)=>F+";"+R,""):"");v=e.append("path").attr("d",L).attr("id",t.id).attr("class"," "+C+(t.classes?" "+t.classes:"")+(B??"")).attr("style",P),O=P.match(/stroke:([^;]+)/)?.[1],z=t.animate===!0||!!t.animation||$.includes("animation");const E=v.node(),A=typeof E.getTotalLength=="function"?E.getTotalLength():0,N=Yl[t.arrowTypeStart]||0,k=Yl[t.arrowTypeEnd]||0;if(t.look==="neo"&&!z){const R=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?VS(A,N,k):`0 ${N} ${A-N-k} ${k}`}; stroke-dashoffset: 0;`;v.attr("style",R+v.attr("style"))}}v.attr("data-edge",!0),v.attr("data-et","edge"),v.attr("data-id",t.id),v.attr("data-points",g),t.showPoints&&m.forEach($=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",$.x).attr("cy",$.y)});let q="";(ut().flowchart.arrowMarkerAbsolute||ut().state.arrowMarkerAbsolute)&&(q=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,q=q.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),I.info("arrowTypeStart",t.arrowTypeStart),I.info("arrowTypeEnd",t.arrowTypeEnd),WS(v,t,q,s,i,O);const D=Math.floor(c.length/2),W=c[D];Gt.isLabelCoordinateInPath(W,v.attr("d"))||(h=!0);let j={};return h&&(j.updatedPath=c),j.originalPath=t.points,j},"insertEdge");function em(e,t){if(e.length<2)return"";let r="";const i=e.length,n=1e-5;for(let a=0;a<i;a++){const s=e[a],o=e[a-1],l=e[a+1];if(a===0)r+=`M${s.x},${s.y}`;else if(a===i-1)r+=`L${s.x},${s.y}`;else{const c=s.x-o.x,h=s.y-o.y,u=l.x-s.x,d=l.y-s.y,f=Math.hypot(c,h),g=Math.hypot(u,d);if(f<n||g<n){r+=`L${s.x},${s.y}`;continue}const m=c/f,y=h/f,x=u/g,b=d/g,w=m*x+y*b,C=Math.max(-1,Math.min(1,w)),v=Math.acos(C);if(v<n||Math.abs(Math.PI-v)<n){r+=`L${s.x},${s.y}`;continue}const L=Math.min(t/Math.sin(v/2),f/2,g/2),T=s.x-m*L,O=s.y-y*L,z=s.x+x*L,q=s.y+b*L;r+=`L${T},${O}`,r+=`Q${s.x},${s.y} ${z},${q}`}}return r}p(em,"generateRoundedPath");function Ys(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(Ys,"calculateDeltaAndAngle");function rm(e,t){const r=e.map(n=>({...n}));if(e.length>=2&&Et[t.arrowTypeStart]){const n=Et[t.arrowTypeStart],a=e[0],s=e[1],{angle:o}=Ys(a,s),l=n*Math.cos(o),c=n*Math.sin(o);r[0].x=a.x+l,r[0].y=a.y+c}const i=e.length;if(i>=2&&Et[t.arrowTypeEnd]){const n=Et[t.arrowTypeEnd],a=e[i-1],s=e[i-2],{angle:o}=Ys(s,a),l=n*Math.cos(o),c=n*Math.sin(o);r[i-1].x=a.x-l,r[i-1].y=a.y-c}return r}p(rm,"applyMarkerOffsetsToPoints");var ZS=p((e,t,r,i)=>{t.forEach(n=>{dT[n](e,r,i)})},"insertMarkers"),KS=p((e,t,r)=>{I.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",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),QS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),JS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),tT=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),eT=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),rT=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")},"point"),iT=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")},"circle"),nT=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")},"cross"),aT=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"),sT=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"),oT=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 n=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");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),lT=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"),cT=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 n=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");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),hT=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
242
242
  L20,10
243
243
  M20,10
244
- L0,20`)},"requirement_arrow"),lT=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"),cT={extension:XS,composition:VS,aggregation:ZS,dependency:KS,lollipop:QS,point:JS,circle:tT,cross:eT,barb:rT,only_one:iT,zero_or_one:nT,one_or_more:aT,zero_or_more:sT,requirement_arrow:oT,requirement_contains:lT},rm=GS,hT={common:rr,getConfig:$t,insertCluster:Ap,insertEdge:Jg,insertEdgeLabel:Zg,insertMarkers:rm,insertNode:sl,interpolateToCurve:No,labelHelper:it,log:I,positionEdgeLabel:Kg},$i={},im=p(e=>{for(const t of e)$i[t.name]=t},"registerLayoutLoaders"),uT=p(()=>{im([{name:"dagre",loader:p(async()=>await Promise.resolve().then(()=>require("./dagre-6UL2VRFP-BDyQ7zKw.cjs")),"loader")},{name:"cose-bilkent",loader:p(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-S5V4N54A-BJ3wg7KS.cjs")),"loader")}])},"registerDefaultLayoutLoaders");uT();var dT=p(async(e,t)=>{if(!(e.layoutAlgorithm in $i))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=$i[e.layoutAlgorithm];return(await r.loader()).render(e,t,hT,{algorithm:r.algorithm})},"render"),fT=p((e="",{fallback:t="dagre"}={})=>{if(e in $i)return e;if(t in $i)return I.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"),nm="comm",am="rule",sm="decl",pT="@import",gT="@namespace",mT="@keyframes",yT="@layer",om=Math.abs,ol=String.fromCharCode;function lm(e){return e.trim()}function hn(e,t,r){return e.replace(t,r)}function xT(e,t,r){return e.indexOf(t,r)}function yr(e,t){return e.charCodeAt(t)|0}function Er(e,t,r){return e.slice(t,r)}function ae(e){return e.length}function bT(e){return e.length}function Ki(e,t){return t.push(e),e}var _a=1,Fr=1,cm=0,Xt=0,xt=0,jr="";function ll(e,t,r,i,n,a,s,o){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:_a,column:Fr,length:s,return:"",siblings:o}}function wT(){return xt}function vT(){return xt=Xt>0?yr(jr,--Xt):0,Fr--,xt===10&&(Fr=1,_a--),xt}function Jt(){return xt=Xt<cm?yr(jr,Xt++):0,Fr++,xt===10&&(Fr=1,_a++),xt}function Te(){return yr(jr,Xt)}function un(){return Xt}function Sa(e,t){return Er(jr,e,t)}function Li(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 kT(e){return _a=Fr=1,cm=ae(jr=e),Xt=0,[]}function CT(e){return jr="",e}function Xa(e){return lm(Sa(Xt-1,Us(e===91?e+2:e===40?e+1:e)))}function _T(e){for(;(xt=Te())&&xt<33;)Jt();return Li(e)>2||Li(xt)>3?"":" "}function ST(e,t){for(;--t&&Jt()&&!(xt<48||xt>102||xt>57&&xt<65||xt>70&&xt<97););return Sa(e,un()+(t<6&&Te()==32&&Jt()==32))}function Us(e){for(;Jt();)switch(xt){case e:return Xt;case 34:case 39:e!==34&&e!==39&&Us(xt);break;case 40:e===41&&Us(e);break;case 92:Jt();break}return Xt}function TT(e,t){for(;Jt()&&e+xt!==57;)if(e+xt===84&&Te()===47)break;return"/*"+Sa(t,Xt-1)+"*"+ol(e===47?e:Jt())}function BT(e){for(;!Li(Te());)Jt();return Sa(e,Xt)}function $T(e){return CT(dn("",null,null,null,[""],e=kT(e),0,[0],e))}function dn(e,t,r,i,n,a,s,o,l){for(var c=0,h=0,u=s,d=0,f=0,g=0,m=1,y=1,x=1,b=0,w="",C=n,v=a,L=i,T=w;y;)switch(g=b,b=Jt()){case 40:if(g!=108&&yr(T,u-1)==58){xT(T+=hn(Xa(b),"&","&\f"),"&\f",om(c?o[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:T+=Xa(b);break;case 9:case 10:case 13:case 32:T+=_T(g);break;case 92:T+=ST(un()-1,7);continue;case 47:switch(Te()){case 42:case 47:Ki(LT(TT(Jt(),un()),t,r,l),l),(Li(g||1)==5||Li(Te()||1)==5)&&ae(T)&&Er(T,-1,void 0)!==" "&&(T+=" ");break;default:T+="/"}break;case 123*m:o[c++]=ae(T)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(T=hn(T,/\f/g,"")),f>0&&(ae(T)-u||m===0&&g===47)&&Ki(f>32?$c(T+";",i,r,u-1,l):$c(hn(T," ","")+";",i,r,u-2,l),l);break;case 59:T+=";";default:if(Ki(L=Bc(T,t,r,c,h,n,o,w,C=[],v=[],u,a),a),b===123)if(h===0)dn(T,t,L,L,C,a,u,o,v);else{switch(d){case 99:if(yr(T,3)===110)break;case 108:if(yr(T,2)===97)break;default:h=0;case 100:case 109:case 115:}h?dn(e,L,L,i&&Ki(Bc(e,L,L,0,0,n,o,w,n,C=[],u,v),v),n,v,u,o,i?C:v):dn(T,L,L,L,[""],v,0,o,v)}}c=h=f=0,m=x=1,w=T="",u=s;break;case 58:u=1+ae(T),f=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&vT()==125)continue}switch(T+=ol(b),b*m){case 38:x=h>0?1:(T+="\f",-1);break;case 44:o[c++]=(ae(T)-1)*x,x=1;break;case 64:Te()===45&&(T+=Xa(Jt())),d=Te(),h=u=ae(w=T+=BT(un())),b++;break;case 45:g===45&&ae(T)==2&&(m=0)}}return a}function Bc(e,t,r,i,n,a,s,o,l,c,h,u){for(var d=n-1,f=n===0?a:[""],g=bT(f),m=0,y=0,x=0;m<i;++m)for(var b=0,w=Er(e,d+1,d=om(y=s[m])),C=e;b<g;++b)(C=lm(y>0?f[b]+" "+w:hn(w,/&\f/g,f[b])))&&(l[x++]=C);return ll(e,t,r,n===0?am:o,l,c,h,u)}function LT(e,t,r,i){return ll(e,t,r,nm,ol(wT()),Er(e,2,-2),0,i)}function $c(e,t,r,i,n){return ll(e,t,r,sm,Er(e,0,i),Er(e,i+1,-1),i,n)}function Gs(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function MT(e,t,r,i){switch(e.type){case yT:if(e.children.length)break;case pT:case gT:case sm:return e.return=e.return||e.value;case nm:return"";case mT:return e.return=e.value+"{"+Gs(e.children,i)+"}";case am:if(!ae(e.value=e.props.join(",")))return""}return ae(r=Gs(e.children,i))?e.return=e.value+"{"+r+"}":""}var AT=xf(Object.keys,Object),ET=Object.prototype,FT=ET.hasOwnProperty;function hm(e){if(!Fi(e))return AT(e);var t=[];for(var r in Object(e))FT.call(e,r)&&r!="constructor"&&t.push(r);return t}var Xs=ar(he,"DataView"),Vs=ar(he,"Promise"),Un=ar(he,"Set"),Zs=ar(he,"WeakMap"),Lc="[object Map]",PT="[object Object]",Mc="[object Promise]",Ac="[object Set]",Ec="[object WeakMap]",Fc="[object DataView]",RT=nr(Xs),OT=nr(_i),DT=nr(Vs),NT=nr(Un),IT=nr(Zs);exports.getTag=ir;(Xs&&exports.getTag(new Xs(new ArrayBuffer(1)))!=Fc||_i&&exports.getTag(new _i)!=Lc||Vs&&exports.getTag(Vs.resolve())!=Mc||Un&&exports.getTag(new Un)!=Ac||Zs&&exports.getTag(new Zs)!=Ec)&&(exports.getTag=function(e){var t=ir(e),r=t==PT?e.constructor:void 0,i=r?nr(r):"";if(i)switch(i){case RT:return Fc;case OT:return Lc;case DT:return Mc;case NT:return Ac;case IT:return Ec}return t});var zT="[object Map]",qT="[object Set]",jT=Object.prototype,WT=jT.hasOwnProperty;function Ks(e){if(e==null)return!0;if(Pi(e)&&(Ti(e)||typeof e=="string"||typeof e.splice=="function"||pa(e)||ga(e)||Si(e)))return!e.length;var t=exports.getTag(e);if(t==zT||t==qT)return!e.size;if(Fi(e))return!hm(e).length;for(var r in e)if(WT.call(e,r))return!1;return!0}var um="c4",HT=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),YT=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./c4Diagram-YG6GDRKO-CCs9MC7P.cjs"));return{id:um,diagram:e}},"loader"),UT={id:um,detector:HT,loader:YT},GT=UT,dm="flowchart",XT=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),VT=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-C_bxgg0e.cjs"));return{id:dm,diagram:e}},"loader"),ZT={id:dm,detector:XT,loader:VT},KT=ZT,fm="flowchart-v2",QT=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"),JT=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-C_bxgg0e.cjs"));return{id:fm,diagram:e}},"loader"),tB={id:fm,detector:QT,loader:JT},eB=tB,pm="er",rB=p(e=>/^\s*erDiagram/.test(e),"detector"),iB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./erDiagram-Q2GNP2WA-ohQILmdi.cjs"));return{id:pm,diagram:e}},"loader"),nB={id:pm,detector:rB,loader:iB},aB=nB,gm="gitGraph",sB=p(e=>/^\s*gitGraph/.test(e),"detector"),oB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./gitGraphDiagram-NY62KEGX-DzsNlXbq.cjs"));return{id:gm,diagram:e}},"loader"),lB={id:gm,detector:sB,loader:oB},cB=lB,mm="gantt",hB=p(e=>/^\s*gantt/.test(e),"detector"),uB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ganttDiagram-JELNMOA3-Geq6x747.cjs"));return{id:mm,diagram:e}},"loader"),dB={id:mm,detector:hB,loader:uB},fB=dB,ym="info",pB=p(e=>/^\s*info/.test(e),"detector"),gB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./infoDiagram-WHAUD3N6-e_6Fu7A3.cjs"));return{id:ym,diagram:e}},"loader"),mB={id:ym,detector:pB,loader:gB},xm="pie",yB=p(e=>/^\s*pie/.test(e),"detector"),xB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pieDiagram-ADFJNKIX-D3u8fH01.cjs"));return{id:xm,diagram:e}},"loader"),bB={id:xm,detector:yB,loader:xB},bm="quadrantChart",wB=p(e=>/^\s*quadrantChart/.test(e),"detector"),vB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./quadrantDiagram-AYHSOK5B-C2Bzy_90.cjs"));return{id:bm,diagram:e}},"loader"),kB={id:bm,detector:wB,loader:vB},CB=kB,wm="xychart",_B=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),SB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./xychartDiagram-PRI3JC2R-ClYujusC.cjs"));return{id:wm,diagram:e}},"loader"),TB={id:wm,detector:_B,loader:SB},BB=TB,vm="requirement",$B=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),LB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./requirementDiagram-UZGBJVZJ-CC6A_LQI.cjs"));return{id:vm,diagram:e}},"loader"),MB={id:vm,detector:$B,loader:LB},AB=MB,km="sequence",EB=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),FB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sequenceDiagram-WL72ISMW-Bl6_BUzR.cjs"));return{id:km,diagram:e}},"loader"),PB={id:km,detector:EB,loader:FB},RB=PB,Cm="class",OB=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),DB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-2ON5EDUG-D8v286nZ.cjs"));return{id:Cm,diagram:e}},"loader"),NB={id:Cm,detector:OB,loader:DB},IB=NB,_m="classDiagram",zB=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),qB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-v2-WZHVMYZB-D8v286nZ.cjs"));return{id:_m,diagram:e}},"loader"),jB={id:_m,detector:zB,loader:qB},WB=jB,Sm="state",HB=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),YB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-FKZM4ZOC-DKdLEfTU.cjs"));return{id:Sm,diagram:e}},"loader"),UB={id:Sm,detector:HB,loader:YB},GB=UB,Tm="stateDiagram",XB=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),VB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-v2-4FDKWEC3-BYtBH478.cjs"));return{id:Tm,diagram:e}},"loader"),ZB={id:Tm,detector:XB,loader:VB},KB=ZB,Bm="journey",QB=p(e=>/^\s*journey/.test(e),"detector"),JB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./journeyDiagram-XKPGCS4Q-DWNhUx2B.cjs"));return{id:Bm,diagram:e}},"loader"),t$={id:Bm,detector:QB,loader:JB},e$=t$,r$=p((e,t,r)=>{I.debug(`rendering svg for syntax error
245
- `);const i=Cu(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),so(i,100,512,!0),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),$m={draw:r$},i$=$m,n$={db:{},renderer:$m,parser:{parse:p(()=>{},"parse")}},a$=n$,Lm="flowchart-elk",s$=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),o$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-C_bxgg0e.cjs"));return{id:Lm,diagram:e}},"loader"),l$={id:Lm,detector:s$,loader:o$},c$=l$,Mm="timeline",h$=p(e=>/^\s*timeline/.test(e),"detector"),u$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./timeline-definition-IT6M3QCI-B1leptlP.cjs"));return{id:Mm,diagram:e}},"loader"),d$={id:Mm,detector:h$,loader:u$},f$=d$,Am="mindmap",p$=p(e=>/^\s*mindmap/.test(e),"detector"),g$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./mindmap-definition-VGOIOE7T-DRqIC1aB.cjs"));return{id:Am,diagram:e}},"loader"),m$={id:Am,detector:p$,loader:g$},y$=m$,Em="kanban",x$=p(e=>/^\s*kanban/.test(e),"detector"),b$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./kanban-definition-3W4ZIXB7-DmXZ76_s.cjs"));return{id:Em,diagram:e}},"loader"),w$={id:Em,detector:x$,loader:b$},v$=w$,Fm="sankey",k$=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),C$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sankeyDiagram-TZEHDZUN-BnHCo-Mn.cjs"));return{id:Fm,diagram:e}},"loader"),_$={id:Fm,detector:k$,loader:C$},S$=_$,Pm="packet",T$=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),B$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-S2PKOQOG-DpAD-cB_.cjs"));return{id:Pm,diagram:e}},"loader"),$$={id:Pm,detector:T$,loader:B$},Rm="radar",L$=p(e=>/^\s*radar-beta/.test(e),"detector"),M$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-QEK2KX5R-D1cueJAA.cjs"));return{id:Rm,diagram:e}},"loader"),A$={id:Rm,detector:L$,loader:M$},Om="block",E$=p(e=>/^\s*block(-beta)?/.test(e),"detector"),F$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./blockDiagram-VD42YOAC-CnsJKAH7.cjs"));return{id:Om,diagram:e}},"loader"),P$={id:Om,detector:E$,loader:F$},R$=P$,Dm="architecture",O$=p(e=>/^\s*architecture/.test(e),"detector"),D$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./architectureDiagram-VXUJARFQ-eU-3tnCG.cjs"));return{id:Dm,diagram:e}},"loader"),N$={id:Dm,detector:O$,loader:D$},I$=N$,Nm="treemap",z$=p(e=>/^\s*treemap/.test(e),"detector"),q$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-PSM6KHXK-u5RdYoub.cjs"));return{id:Nm,diagram:e}},"loader"),j$={id:Nm,detector:z$,loader:q$},Pc=!1,Ta=p(()=>{Pc||(Pc=!0,xn("error",a$,e=>e.toLowerCase().trim()==="error"),xn("---",{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("---")),Qa(c$,y$,I$),Qa(GT,v$,WB,IB,aB,fB,mB,bB,AB,RB,eB,KT,f$,cB,KB,GB,e$,CB,S$,$$,BB,R$,A$,j$))},"addDiagrams"),W$=p(async()=>{I.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Xe).map(async([r,{detector:i,loader:n}])=>{if(n)try{is(r)}catch{try{const{diagram:a,id:s}=await n();xn(s,a,i)}catch(a){throw I.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Xe[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){I.error(`Failed to load ${t.length} external diagrams`);for(const r of t)I.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),H$="graphics-document document";function Im(e,t){e.attr("role",H$),t!==""&&e.attr("aria-roledescription",t)}p(Im,"setA11yDiagramInfo");function zm(e,t,r,i){if(e.insert!==void 0){if(r){const n=`chart-desc-${i}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){const n=`chart-title-${i}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}p(zm,"addSVGa11yTitleDescription");var Ue,Qs=(Ue=class{constructor(t,r,i,n,a){this.type=t,this.text=r,this.db=i,this.parser=n,this.renderer=a}static async fromText(t,r={}){const i=$t(),n=no(t,i);t=HC(t)+`
246
- `;try{is(n)}catch{const c=jy(n);if(!c)throw new ih(`Diagram ${n} not found.`);const{id:h,diagram:u}=await c();xn(h,u)}const{db:a,parser:s,renderer:o,init:l}=is(n);return s.parser&&(s.parser.yy=a),a.clear?.(),l?.(i),r.title&&a.setDiagramTitle?.(r.title),await s.parse(t),new Ue(n,t,a,s,o)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(Ue,"Diagram"),Ue),Rc=[],Y$=p(()=>{Rc.forEach(e=>{e()}),Rc=[]},"attachFunctions"),U$=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function qm(e){const t=e.match(rh);if(!t)return{text:e,metadata:{}};let r=of(t[1],{schema:sf})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}p(qm,"extractFrontMatter");var G$=p(e=>e.replace(/\r\n?/g,`
247
- `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),X$=p(e=>{const{text:t,metadata:r}=qm(e),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:t}},"processFrontmatter"),V$=p(e=>{const t=Gt.detectInit(e)??{},r=Gt.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:PC(e),directive:t}},"processDirectives");function cl(e){const t=G$(e),r=X$(t),i=V$(r.text),n=ma(r.config,i.directive);return e=U$(i.text),{code:e,title:r.title,config:n}}p(cl,"preprocessDiagram");function jm(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(jm,"toBase64");var Z$=5e4,K$="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Q$="sandbox",J$="loose",tL="http://www.w3.org/2000/svg",eL="http://www.w3.org/1999/xlink",rL="http://www.w3.org/1999/xhtml",iL="100%",nL="100%",aL="border:0;margin:0;",sL="margin:0",oL="allow-top-navigation-by-user-activation allow-popups",lL='The "iframe" tag is not supported by your browser.',cL=["foreignobject"],hL=["dominant-baseline"];function hl(e){const t=cl(e);return mn(),ix(t.config??{}),t}p(hl,"processAndSetConfigs");async function Wm(e,t){Ta();try{const{code:r,config:i}=hl(e);return{diagramType:(await Ym(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}p(Wm,"parse");var Oc=p((e,t,r=[])=>`
248
- .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),uL=p((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
244
+ L0,20`)},"requirement_arrow"),uT=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"),dT={extension:KS,composition:QS,aggregation:JS,dependency:tT,lollipop:eT,point:rT,circle:iT,cross:nT,barb:aT,only_one:sT,zero_or_one:oT,one_or_more:lT,zero_or_more:cT,requirement_arrow:hT,requirement_contains:uT},im=ZS,fT={common:rr,getConfig:$t,insertCluster:Ep,insertEdge:tm,insertEdgeLabel:Kg,insertMarkers:im,insertNode:sl,interpolateToCurve:No,labelHelper:it,log:I,positionEdgeLabel:Qg},$i={},nm=p(e=>{for(const t of e)$i[t.name]=t},"registerLayoutLoaders"),pT=p(()=>{nm([{name:"dagre",loader:p(async()=>await Promise.resolve().then(()=>require("./dagre-6UL2VRFP-CrTlcO8O.cjs")),"loader")},{name:"cose-bilkent",loader:p(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-S5V4N54A-CYDFYlZ6.cjs")),"loader")}])},"registerDefaultLayoutLoaders");pT();var gT=p(async(e,t)=>{if(!(e.layoutAlgorithm in $i))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=$i[e.layoutAlgorithm];return(await r.loader()).render(e,t,fT,{algorithm:r.algorithm})},"render"),mT=p((e="",{fallback:t="dagre"}={})=>{if(e in $i)return e;if(t in $i)return I.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"),am="comm",sm="rule",om="decl",yT="@import",xT="@namespace",bT="@keyframes",wT="@layer",lm=Math.abs,ol=String.fromCharCode;function cm(e){return e.trim()}function hn(e,t,r){return e.replace(t,r)}function vT(e,t,r){return e.indexOf(t,r)}function yr(e,t){return e.charCodeAt(t)|0}function Er(e,t,r){return e.slice(t,r)}function ae(e){return e.length}function kT(e){return e.length}function Ki(e,t){return t.push(e),e}var _a=1,Fr=1,hm=0,Xt=0,xt=0,jr="";function ll(e,t,r,i,n,a,s,o){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:_a,column:Fr,length:s,return:"",siblings:o}}function CT(){return xt}function _T(){return xt=Xt>0?yr(jr,--Xt):0,Fr--,xt===10&&(Fr=1,_a--),xt}function Jt(){return xt=Xt<hm?yr(jr,Xt++):0,Fr++,xt===10&&(Fr=1,_a++),xt}function Te(){return yr(jr,Xt)}function un(){return Xt}function Sa(e,t){return Er(jr,e,t)}function Li(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 ST(e){return _a=Fr=1,hm=ae(jr=e),Xt=0,[]}function TT(e){return jr="",e}function Xa(e){return cm(Sa(Xt-1,Us(e===91?e+2:e===40?e+1:e)))}function BT(e){for(;(xt=Te())&&xt<33;)Jt();return Li(e)>2||Li(xt)>3?"":" "}function $T(e,t){for(;--t&&Jt()&&!(xt<48||xt>102||xt>57&&xt<65||xt>70&&xt<97););return Sa(e,un()+(t<6&&Te()==32&&Jt()==32))}function Us(e){for(;Jt();)switch(xt){case e:return Xt;case 34:case 39:e!==34&&e!==39&&Us(xt);break;case 40:e===41&&Us(e);break;case 92:Jt();break}return Xt}function LT(e,t){for(;Jt()&&e+xt!==57;)if(e+xt===84&&Te()===47)break;return"/*"+Sa(t,Xt-1)+"*"+ol(e===47?e:Jt())}function MT(e){for(;!Li(Te());)Jt();return Sa(e,Xt)}function AT(e){return TT(dn("",null,null,null,[""],e=ST(e),0,[0],e))}function dn(e,t,r,i,n,a,s,o,l){for(var c=0,h=0,u=s,d=0,f=0,g=0,m=1,y=1,x=1,b=0,w="",C=n,v=a,L=i,T=w;y;)switch(g=b,b=Jt()){case 40:if(g!=108&&yr(T,u-1)==58){vT(T+=hn(Xa(b),"&","&\f"),"&\f",lm(c?o[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:T+=Xa(b);break;case 9:case 10:case 13:case 32:T+=BT(g);break;case 92:T+=$T(un()-1,7);continue;case 47:switch(Te()){case 42:case 47:Ki(ET(LT(Jt(),un()),t,r,l),l),(Li(g||1)==5||Li(Te()||1)==5)&&ae(T)&&Er(T,-1,void 0)!==" "&&(T+=" ");break;default:T+="/"}break;case 123*m:o[c++]=ae(T)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(T=hn(T,/\f/g,"")),f>0&&(ae(T)-u||m===0&&g===47)&&Ki(f>32?Lc(T+";",i,r,u-1,l):Lc(hn(T," ","")+";",i,r,u-2,l),l);break;case 59:T+=";";default:if(Ki(L=$c(T,t,r,c,h,n,o,w,C=[],v=[],u,a),a),b===123)if(h===0)dn(T,t,L,L,C,a,u,o,v);else{switch(d){case 99:if(yr(T,3)===110)break;case 108:if(yr(T,2)===97)break;default:h=0;case 100:case 109:case 115:}h?dn(e,L,L,i&&Ki($c(e,L,L,0,0,n,o,w,n,C=[],u,v),v),n,v,u,o,i?C:v):dn(T,L,L,L,[""],v,0,o,v)}}c=h=f=0,m=x=1,w=T="",u=s;break;case 58:u=1+ae(T),f=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&_T()==125)continue}switch(T+=ol(b),b*m){case 38:x=h>0?1:(T+="\f",-1);break;case 44:o[c++]=(ae(T)-1)*x,x=1;break;case 64:Te()===45&&(T+=Xa(Jt())),d=Te(),h=u=ae(w=T+=MT(un())),b++;break;case 45:g===45&&ae(T)==2&&(m=0)}}return a}function $c(e,t,r,i,n,a,s,o,l,c,h,u){for(var d=n-1,f=n===0?a:[""],g=kT(f),m=0,y=0,x=0;m<i;++m)for(var b=0,w=Er(e,d+1,d=lm(y=s[m])),C=e;b<g;++b)(C=cm(y>0?f[b]+" "+w:hn(w,/&\f/g,f[b])))&&(l[x++]=C);return ll(e,t,r,n===0?sm:o,l,c,h,u)}function ET(e,t,r,i){return ll(e,t,r,am,ol(CT()),Er(e,2,-2),0,i)}function Lc(e,t,r,i,n){return ll(e,t,r,om,Er(e,0,i),Er(e,i+1,-1),i,n)}function Gs(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function FT(e,t,r,i){switch(e.type){case wT:if(e.children.length)break;case yT:case xT:case om:return e.return=e.return||e.value;case am:return"";case bT:return e.return=e.value+"{"+Gs(e.children,i)+"}";case sm:if(!ae(e.value=e.props.join(",")))return""}return ae(r=Gs(e.children,i))?e.return=e.value+"{"+r+"}":""}var PT=bf(Object.keys,Object),RT=Object.prototype,DT=RT.hasOwnProperty;function um(e){if(!Fi(e))return PT(e);var t=[];for(var r in Object(e))DT.call(e,r)&&r!="constructor"&&t.push(r);return t}var Xs=ar(he,"DataView"),Vs=ar(he,"Promise"),Un=ar(he,"Set"),Zs=ar(he,"WeakMap"),Mc="[object Map]",OT="[object Object]",Ac="[object Promise]",Ec="[object Set]",Fc="[object WeakMap]",Pc="[object DataView]",NT=nr(Xs),IT=nr(_i),zT=nr(Vs),qT=nr(Un),jT=nr(Zs);exports.getTag=ir;(Xs&&exports.getTag(new Xs(new ArrayBuffer(1)))!=Pc||_i&&exports.getTag(new _i)!=Mc||Vs&&exports.getTag(Vs.resolve())!=Ac||Un&&exports.getTag(new Un)!=Ec||Zs&&exports.getTag(new Zs)!=Fc)&&(exports.getTag=function(e){var t=ir(e),r=t==OT?e.constructor:void 0,i=r?nr(r):"";if(i)switch(i){case NT:return Pc;case IT:return Mc;case zT:return Ac;case qT:return Ec;case jT:return Fc}return t});var WT="[object Map]",HT="[object Set]",YT=Object.prototype,UT=YT.hasOwnProperty;function Ks(e){if(e==null)return!0;if(Pi(e)&&(Ti(e)||typeof e=="string"||typeof e.splice=="function"||pa(e)||ga(e)||Si(e)))return!e.length;var t=exports.getTag(e);if(t==WT||t==HT)return!e.size;if(Fi(e))return!um(e).length;for(var r in e)if(UT.call(e,r))return!1;return!0}var dm="c4",GT=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),XT=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./c4Diagram-YG6GDRKO-B1rWXPSq.cjs"));return{id:dm,diagram:e}},"loader"),VT={id:dm,detector:GT,loader:XT},ZT=VT,fm="flowchart",KT=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),QT=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-9k1QiKz5.cjs"));return{id:fm,diagram:e}},"loader"),JT={id:fm,detector:KT,loader:QT},tB=JT,pm="flowchart-v2",eB=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"),rB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-9k1QiKz5.cjs"));return{id:pm,diagram:e}},"loader"),iB={id:pm,detector:eB,loader:rB},nB=iB,gm="er",aB=p(e=>/^\s*erDiagram/.test(e),"detector"),sB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./erDiagram-Q2GNP2WA-DC-tMGdk.cjs"));return{id:gm,diagram:e}},"loader"),oB={id:gm,detector:aB,loader:sB},lB=oB,mm="gitGraph",cB=p(e=>/^\s*gitGraph/.test(e),"detector"),hB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./gitGraphDiagram-NY62KEGX-YDRakP-_.cjs"));return{id:mm,diagram:e}},"loader"),uB={id:mm,detector:cB,loader:hB},dB=uB,ym="gantt",fB=p(e=>/^\s*gantt/.test(e),"detector"),pB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ganttDiagram-JELNMOA3-C1nojL1z.cjs"));return{id:ym,diagram:e}},"loader"),gB={id:ym,detector:fB,loader:pB},mB=gB,xm="info",yB=p(e=>/^\s*info/.test(e),"detector"),xB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./infoDiagram-WHAUD3N6-BfyHsG_R.cjs"));return{id:xm,diagram:e}},"loader"),bB={id:xm,detector:yB,loader:xB},bm="pie",wB=p(e=>/^\s*pie/.test(e),"detector"),vB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pieDiagram-ADFJNKIX-oBQctDBF.cjs"));return{id:bm,diagram:e}},"loader"),kB={id:bm,detector:wB,loader:vB},wm="quadrantChart",CB=p(e=>/^\s*quadrantChart/.test(e),"detector"),_B=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./quadrantDiagram-AYHSOK5B-BdynjtBz.cjs"));return{id:wm,diagram:e}},"loader"),SB={id:wm,detector:CB,loader:_B},TB=SB,vm="xychart",BB=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),$B=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./xychartDiagram-PRI3JC2R-B83XR1RX.cjs"));return{id:vm,diagram:e}},"loader"),LB={id:vm,detector:BB,loader:$B},MB=LB,km="requirement",AB=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),EB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./requirementDiagram-UZGBJVZJ-DRt-Beuk.cjs"));return{id:km,diagram:e}},"loader"),FB={id:km,detector:AB,loader:EB},PB=FB,Cm="sequence",RB=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),DB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sequenceDiagram-WL72ISMW-Dc4K__VG.cjs"));return{id:Cm,diagram:e}},"loader"),OB={id:Cm,detector:RB,loader:DB},NB=OB,_m="class",IB=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),zB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-2ON5EDUG-Ce7MrBcE.cjs"));return{id:_m,diagram:e}},"loader"),qB={id:_m,detector:IB,loader:zB},jB=qB,Sm="classDiagram",WB=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),HB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-v2-WZHVMYZB-Ce7MrBcE.cjs"));return{id:Sm,diagram:e}},"loader"),YB={id:Sm,detector:WB,loader:HB},UB=YB,Tm="state",GB=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),XB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-FKZM4ZOC-Er8_CIvC.cjs"));return{id:Tm,diagram:e}},"loader"),VB={id:Tm,detector:GB,loader:XB},ZB=VB,Bm="stateDiagram",KB=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),QB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-v2-4FDKWEC3-BYc_jC0C.cjs"));return{id:Bm,diagram:e}},"loader"),JB={id:Bm,detector:KB,loader:QB},t$=JB,$m="journey",e$=p(e=>/^\s*journey/.test(e),"detector"),r$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./journeyDiagram-XKPGCS4Q-DfM_UFvc.cjs"));return{id:$m,diagram:e}},"loader"),i$={id:$m,detector:e$,loader:r$},n$=i$,a$=p((e,t,r)=>{I.debug(`rendering svg for syntax error
245
+ `);const i=_u(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),so(i,100,512,!0),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),Lm={draw:a$},s$=Lm,o$={db:{},renderer:Lm,parser:{parse:p(()=>{},"parse")}},l$=o$,Mm="flowchart-elk",c$=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),h$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-9k1QiKz5.cjs"));return{id:Mm,diagram:e}},"loader"),u$={id:Mm,detector:c$,loader:h$},d$=u$,Am="timeline",f$=p(e=>/^\s*timeline/.test(e),"detector"),p$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./timeline-definition-IT6M3QCI-DE5g5JfV.cjs"));return{id:Am,diagram:e}},"loader"),g$={id:Am,detector:f$,loader:p$},m$=g$,Em="mindmap",y$=p(e=>/^\s*mindmap/.test(e),"detector"),x$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./mindmap-definition-VGOIOE7T-BqeRBDHB.cjs"));return{id:Em,diagram:e}},"loader"),b$={id:Em,detector:y$,loader:x$},w$=b$,Fm="kanban",v$=p(e=>/^\s*kanban/.test(e),"detector"),k$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./kanban-definition-3W4ZIXB7-mqwusAZJ.cjs"));return{id:Fm,diagram:e}},"loader"),C$={id:Fm,detector:v$,loader:k$},_$=C$,Pm="sankey",S$=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),T$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sankeyDiagram-TZEHDZUN-BRlPGxPq.cjs"));return{id:Pm,diagram:e}},"loader"),B$={id:Pm,detector:S$,loader:T$},$$=B$,Rm="packet",L$=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),M$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-S2PKOQOG-DonScLpF.cjs"));return{id:Rm,diagram:e}},"loader"),A$={id:Rm,detector:L$,loader:M$},Dm="radar",E$=p(e=>/^\s*radar-beta/.test(e),"detector"),F$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-QEK2KX5R-BYqdFTnq.cjs"));return{id:Dm,diagram:e}},"loader"),P$={id:Dm,detector:E$,loader:F$},Om="block",R$=p(e=>/^\s*block(-beta)?/.test(e),"detector"),D$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./blockDiagram-VD42YOAC-DnIarP1n.cjs"));return{id:Om,diagram:e}},"loader"),O$={id:Om,detector:R$,loader:D$},N$=O$,Nm="architecture",I$=p(e=>/^\s*architecture/.test(e),"detector"),z$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./architectureDiagram-VXUJARFQ-fEGjFbVc.cjs"));return{id:Nm,diagram:e}},"loader"),q$={id:Nm,detector:I$,loader:z$},j$=q$,Im="treemap",W$=p(e=>/^\s*treemap/.test(e),"detector"),H$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-PSM6KHXK-9wHp_OsU.cjs"));return{id:Im,diagram:e}},"loader"),Y$={id:Im,detector:W$,loader:H$},Rc=!1,Ta=p(()=>{Rc||(Rc=!0,xn("error",l$,e=>e.toLowerCase().trim()==="error"),xn("---",{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("---")),Qa(d$,w$,j$),Qa(ZT,_$,UB,jB,lB,mB,bB,kB,PB,NB,nB,tB,m$,dB,t$,ZB,n$,TB,$$,A$,MB,N$,P$,Y$))},"addDiagrams"),U$=p(async()=>{I.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Xe).map(async([r,{detector:i,loader:n}])=>{if(n)try{is(r)}catch{try{const{diagram:a,id:s}=await n();xn(s,a,i)}catch(a){throw I.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Xe[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){I.error(`Failed to load ${t.length} external diagrams`);for(const r of t)I.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),G$="graphics-document document";function zm(e,t){e.attr("role",G$),t!==""&&e.attr("aria-roledescription",t)}p(zm,"setA11yDiagramInfo");function qm(e,t,r,i){if(e.insert!==void 0){if(r){const n=`chart-desc-${i}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){const n=`chart-title-${i}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}p(qm,"addSVGa11yTitleDescription");var Ue,Qs=(Ue=class{constructor(t,r,i,n,a){this.type=t,this.text=r,this.db=i,this.parser=n,this.renderer=a}static async fromText(t,r={}){const i=$t(),n=no(t,i);t=GC(t)+`
246
+ `;try{is(n)}catch{const c=Yy(n);if(!c)throw new nh(`Diagram ${n} not found.`);const{id:h,diagram:u}=await c();xn(h,u)}const{db:a,parser:s,renderer:o,init:l}=is(n);return s.parser&&(s.parser.yy=a),a.clear?.(),l?.(i),r.title&&a.setDiagramTitle?.(r.title),await s.parse(t),new Ue(n,t,a,s,o)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(Ue,"Diagram"),Ue),Dc=[],X$=p(()=>{Dc.forEach(e=>{e()}),Dc=[]},"attachFunctions"),V$=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function jm(e){const t=e.match(ih);if(!t)return{text:e,metadata:{}};let r=lf(t[1],{schema:of})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}p(jm,"extractFrontMatter");var Z$=p(e=>e.replace(/\r\n?/g,`
247
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),K$=p(e=>{const{text:t,metadata:r}=jm(e),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:t}},"processFrontmatter"),Q$=p(e=>{const t=Gt.detectInit(e)??{},r=Gt.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:OC(e),directive:t}},"processDirectives");function cl(e){const t=Z$(e),r=K$(t),i=Q$(r.text),n=ma(r.config,i.directive);return e=V$(i.text),{code:e,title:r.title,config:n}}p(cl,"preprocessDiagram");function Wm(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Wm,"toBase64");var J$=5e4,tL="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",eL="sandbox",rL="loose",iL="http://www.w3.org/2000/svg",nL="http://www.w3.org/1999/xlink",aL="http://www.w3.org/1999/xhtml",sL="100%",oL="100%",lL="border:0;margin:0;",cL="margin:0",hL="allow-top-navigation-by-user-activation allow-popups",uL='The "iframe" tag is not supported by your browser.',dL=["foreignobject"],fL=["dominant-baseline"];function hl(e){const t=cl(e);return mn(),sx(t.config??{}),t}p(hl,"processAndSetConfigs");async function Hm(e,t){Ta();try{const{code:r,config:i}=hl(e);return{diagramType:(await Um(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}p(Hm,"parse");var Oc=p((e,t,r=[])=>`
248
+ .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),pL=p((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
249
249
  ${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
250
250
  :root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
251
- :root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const s=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(o=>{Ks(o.styles)||s.forEach(l=>{r+=Oc(o.id,l,o.styles)}),Ks(o.textStyles)||(r+=Oc(o.id,"tspan",(o?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),dL=p((e,t,r,i)=>{const n=uL(e,r),a=Cx(t,n,e.themeVariables);return Gs($T(`${i}{${a}}`),MT)},"createUserStyles"),fL=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=Fe(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),pL=p((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":nL,i=jm(`<body style="${sL}">${e}</body>`);return`<iframe style="width:${iL};height:${r};${aL}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${oL}">
252
- ${lL}
253
- </iframe>`},"putIntoIFrame"),Dc=p((e,t,r,i,n)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const s=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",tL);return n&&s.attr("xmlns:xlink",n),s.append("g"),e},"appendDivSvgG");function Js(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(Js,"sandboxedIframe");var gL=p((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),mL=p(async function(e,t,r){Ta();const i=hl(t);t=i.code;const n=$t();I.debug(n),t.length>(n?.maxTextSize??Z$)&&(t=K$);const a="#"+e,s="i"+e,o="#"+s,l="d"+e,c="#"+l,h=p(()=>{const j=lt(d?o:c).node();j&&"remove"in j&&j.remove()},"removeTempElements");let u=lt("body");const d=n.securityLevel===Q$,f=n.securityLevel===J$,g=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){const W=Js(lt(r),s);u=lt(W.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=lt(r);Dc(u,e,l,`font-family: ${g}`,eL)}else{if(gL(document,e,l,s),d){const W=Js(lt("body"),s);u=lt(W.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=lt("body");Dc(u,e,l)}let m,y;try{m=await Qs.fromText(t,{title:i.title})}catch(W){if(n.suppressErrorRendering)throw h(),W;m=await Qs.fromText("error"),y=W}const x=u.select(c).node(),b=m.type,w=x.firstChild,C=w.firstChild,v=m.renderer.getClasses?.(t,m),L=dL(n,b,v,a),T=document.createElement("style");T.innerHTML=L,w.insertBefore(T,C);try{await m.renderer.draw(t,e,Ka.version,m)}catch(W){throw n.suppressErrorRendering?h():i$.draw(t,e,Ka.version),W}const D=u.select(`${c} svg`),z=m.db.getAccTitle?.(),q=m.db.getAccDescription?.();Um(b,D,z,q),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",rL);let O=u.select(c).node().innerHTML;if(I.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),O=fL(O,d,wt(n.arrowMarkerAbsolute)),d){const W=u.select(c+" svg").node();O=pL(O,W)}else f||(O=Ge.sanitize(O,{ADD_TAGS:cL,ADD_ATTR:hL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Y$(),y)throw y;return h(),{diagramType:b,svg:O,bindFunctions:m.db.bindFunctions}},"render");function Hm(e={}){const t=bt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),ex(t),t?.theme&&t.theme in ye?t.themeVariables=ye[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ye.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?tx(t):lh();io(r.logLevel),Ta()}p(Hm,"initialize");var Ym=p((e,t={})=>{const{code:r}=cl(e);return Qs.fromText(r,t)},"getDiagramFromText");function Um(e,t,r,i){Im(t,e),zm(t,r,i,t.attr("id"))}p(Um,"addA11yInfo");var er=Object.freeze({render:mL,parse:Wm,getDiagramFromText:Ym,initialize:Hm,getConfig:$t,setConfig:ch,getSiteConfig:lh,updateSiteConfig:rx,reset:p(()=>{mn()},"reset"),globalReset:p(()=>{mn(Tr)},"globalReset"),defaultConfig:Tr});io($t().logLevel);mn($t());var yL=p((e,t,r)=>{I.warn(e),Ho(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"),Gm=p(async function(e={querySelector:".mermaid"}){try{await xL(e)}catch(t){if(Ho(t)&&I.error(t.str),we.parseError&&we.parseError(t),!e.suppressErrors)throw I.error("Use the suppressErrors option to suppress these errors"),t}},"run"),xL=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=er.getConfig();I.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");I.debug(`Found ${n.length} diagrams`),i?.startOnLoad!==void 0&&(I.debug("Start On Load: "+i?.startOnLoad),er.updateSiteConfig({startOnLoad:i?.startOnLoad}));const a=new Gt.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let s;const o=[];for(const l of Array.from(n)){if(I.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;s=l.innerHTML,s=sp(Gt.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Gt.detectInit(s);h&&I.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:d}=await Km(c,s,l);l.innerHTML=u,e&&await e(c),d&&d(l)}catch(u){yL(u,o,we.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),Xm=p(function(e){er.initialize(e)},"initialize"),bL=p(async function(e,t,r){I.warn("mermaid.init is deprecated. Please use run instead."),e&&Xm(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Gm(i)},"init"),wL=p(async(e,{lazyLoad:t=!0}={})=>{Ta(),Qa(...e),t===!1&&await W$()},"registerExternalDiagrams"),Vm=p(function(){if(we.startOnLoad){const{startOnLoad:e}=er.getConfig();e&&we.run().catch(t=>I.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Vm,!1);var vL=p(function(e){we.parseError=e},"setParseErrorHandler"),Gn=[],Va=!1,Zm=p(async()=>{if(!Va){for(Va=!0;Gn.length>0;){const e=Gn.shift();if(e)try{await e()}catch(t){I.error("Error executing queue",t)}}Va=!1}},"executeQueue"),kL=p(async(e,t)=>new Promise((r,i)=>{const n=p(()=>new Promise((a,s)=>{er.parse(e,t).then(o=>{a(o),r(o)},o=>{I.error("Error parsing",o),we.parseError?.(o),s(o),i(o)})}),"performCall");Gn.push(n),Zm().catch(i)}),"parse"),Km=p((e,t,r)=>new Promise((i,n)=>{const a=p(()=>new Promise((s,o)=>{er.render(e,t,r).then(l=>{s(l),i(l)},l=>{I.error("Error parsing",l),we.parseError?.(l),o(l),n(l)})}),"performCall");Gn.push(a),Zm().catch(n)}),"render"),CL=p(()=>Object.keys(Xe).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),we={startOnLoad:!0,mermaidAPI:er,parse:kL,render:Km,init:bL,run:Gm,registerExternalDiagrams:wL,registerLayoutLoaders:im,initialize:Xm,parseError:void 0,contentLoaded:Vm,setParseErrorHandler:vL,detectType:no,registerIconPacks:cp,getRegisteredDiagramsMetadata:CL},fn=we;let Qm=!1,to=null;if(typeof fn<"u"&&fn.initialize)try{fn.initialize({startOnLoad:!1}),Qm=!0}catch(e){to=e instanceof Error?e:new Error(String(e))}else to=new Error("Mermaid library or mermaid.initialize is not available.");const Jm=({chartContent:e})=>{const t=J.useRef(`mermaid-chart-${Math.random().toString(36).substring(2,15)}`),r=J.useRef(null),i=J.useRef(null),[n,a]=J.useState(!0),[s,o]=J.useState(null),[l,c]=J.useState(null),[h,u]=J.useState(null),[d,f]=J.useState(!1);return J.useEffect(()=>{if(u(null),a(!0),o(null),f(!1),!Qm){o(to?.message||"Mermaid failed to initialize globally."),a(!1);return}if(!e||e.trim()===""){a(!1),r.current&&(r.current.innerHTML=""),c(null);return}(async()=>{try{const m=e.trim();if(!m){a(!1),r.current&&(r.current.innerHTML=""),c(null);return}const y=`${t.current}-render`,x=await fn.render(y,m);x&&typeof x.svg=="string"&&x.svg.length>0?(c(x.svg),typeof x.bindFunctions=="function"?u(()=>x.bindFunctions):u(null)):(o("Failed to render Mermaid diagram: SVG content is empty or invalid."),c(null))}catch(m){console.error(`[MermaidDiagram ${t.current}] Error rendering Mermaid diagram:`,m),o(m instanceof Error?m.message:"An unknown error occurred while rendering the diagram."),c(null)}finally{a(!1)}})().catch(m=>{console.error(`[MermaidDiagram ${t.current}] Unhandled error in renderMermaid:`,m),o(m instanceof Error?m.message:"An unexpected error occurred."),a(!1)})},[e]),J.useEffect(()=>{const g=r.current;if(!g)return;const m=()=>{i.current&&(i.current.destroy(),i.current=null),f(!1)};if(!l){g.innerHTML="",m();return}g.innerHTML=l;const y=g.querySelector("svg");if(y){const x=()=>{const b=y.getBBox();if(!b||b.width===0||b.height===0){setTimeout(x,100);return}i.current&&i.current.destroy();const w=Vc(y,{startScale:1,minScale:.5,maxScale:10,origin:"0 0",animate:!0});i.current=w,g.addEventListener("wheel",C=>{C.shiftKey&&(C.preventDefault(),w.zoomWithWheel(C))},{passive:!1}),f(!0)};x()}return h&&h(g),m},[l,h]),J.useEffect(()=>{d&&r.current&&(r.current.style.overflow="visible")},[d]),n?S.jsx("div",{className:"flex h-32 items-center justify-center bg-white dark:bg-gray-800 dark:text-white",children:"🌀 Loading diagram..."}):s?S.jsxs("div",{className:"rounded border border-red-400 bg-red-100 p-4 text-red-600 dark:border-red-700 dark:bg-red-900/50 dark:text-red-300",children:["Error: ",s]}):S.jsxs("div",{className:"relative",children:[S.jsx("div",{ref:r,className:"mermaid mermaid-diagram-container bg-white dark:bg-gray-400",style:{overflow:"visible"}}),d&&S.jsxs("div",{className:"absolute top-2 right-2 z-10 flex gap-1",children:[S.jsx("button",{type:"button",onClick:()=>i.current?.zoomIn(),className:"flex h-8 w-8 items-center justify-center rounded border border-gray-200 bg-white p-1 text-gray-700 text-lg shadow hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700","aria-label":"Zoom In",children:S.jsx($y,{size:20})}),S.jsx("button",{type:"button",onClick:()=>i.current?.zoomOut(),className:"flex h-8 w-8 items-center justify-center rounded border border-gray-200 bg-white p-1 text-gray-700 text-lg shadow hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700","aria-label":"Zoom Out",children:S.jsx(My,{size:20})}),S.jsx("button",{type:"button",onClick:()=>i.current?.reset(),className:"flex h-8 items-center justify-center rounded border border-gray-200 bg-white px-2 py-1 text-gray-700 text-sm shadow hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700","aria-label":"Reset View",children:S.jsx(Ty,{size:18})})]})]})};Jm.displayName="MermaidDiagramInternal";const t0=J.memo(Jm);function _L(e){const t={};for(const r in e){const i=e[r];switch(r){case"class":t.className=i;break;case"style":{const n={};for(const a of i.split(";")){const[s,o]=a.split(":");if(s&&o){const l=s.trim().replace(/-(\w)/g,(c,h)=>h.toUpperCase());l.startsWith("-")?n[l.substring(1)]=o.trim():n[l]=o.trim()}}t.style=n;break}case"tabindex":t.tabIndex=Number(i);break;default:t[r]=i}}return t}const SL=({code:e})=>{const[t,r]=J.useState(!1),i=()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)},n=>{console.error("Failed to copy: ",n)})};return S.jsx("button",{type:"button",className:"absolute top-2 right-2 z-10 rounded-md bg-gray-200 px-2 py-1 text-gray-800 text-sm transition-colors hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-100 dark:hover:bg-gray-600",onClick:i,children:t?"COPIED!":"Copy"})},TL=({htmlPromise:e,filename:t,code:r})=>{const i=J.use(e),n={replace:a=>{if(a instanceof La.Element&&a.name==="pre"){const s=_L(a.attribs);if(typeof s.style=="object"){const{backgroundColor:o,...l}=s.style;s.style={...l,margin:"1rem 0",padding:"0.8rem 0"}}else s.style={margin:"1rem 0",padding:"0.8rem 0"};return s.className=`${s.className||""} bg-gray-900 dark:bg-gray-900`,S.jsxs("div",{className:"relative",children:[t&&S.jsx("div",{className:"code-filename -top-4 absolute left-0 z-0 rounded-md bg-gray-200 px-2 py-0.5 text-gray-800 text-sm dark:bg-gray-700 dark:text-gray-100",children:t}),S.jsx(SL,{code:r}),S.jsx("pre",{...s,children:La.domToReact(a.children,n)})]})}},htmlparser2:{lowerCaseTags:!0}};return S.jsx(S.Fragment,{children:La(i,n)})},BL=/^(diff)?:?(\w+):?([\w.-]*)?/,$L=()=>({code(e){for(const t of e.children){if(t.type!=="element")continue;const r=t.children[0];if(r?.type!=="element")continue;const i=r.children[0];if(i?.type!=="text")continue;const n=i.value;let a,s="",o="";if(n.startsWith("+")?(a="+",s="background-color: rgba(16, 185, 129, 0.2);",o="bg-green-200 dark:bg-green-400/90 text-green-700"):n.startsWith("-")&&(a="-",s="background-color: rgba(239, 68, 68, 0.2);",o="bg-red-200 dark:bg-red-400/90 text-red-700"),a){t.properties.style=s,i.value=n.substring(1).trimStart();const l={type:"element",tagName:"span",properties:{className:`inline-flex items-center justify-center w-4 h-4 rounded-full select-none font-bold text-[0.5rem] mr-2 ${o}`},children:[{type:"text",value:a==="+"?"➕":"➖"}]};t.children.unshift(l)}}}}),LL=e=>{const t=BL.exec(e??"");return{isDiff:t?.[1]==="diff",lang:t?.[2]||"text",filename:t?.[3]||void 0}},e0=({node:e})=>{const{isDiff:t,lang:r,filename:i}=LL(e.lang??void 0),n=J.useMemo(async()=>{const a=[];return t&&a.push($L()),await Z0.codeToHtml(e.value,{lang:r,themes:{light:"dark-plus",dark:"light-plus"},transformers:a})},[e.value,r,t]);return r==="mermaid"?S.jsx(t0,{chartContent:e.value}):S.jsx(J.Suspense,{fallback:S.jsx("div",{className:"dark:text-white",children:"🌀 Loading code..."}),children:S.jsx(TL,{htmlPromise:n,filename:i,code:e.value})})},r0=({node:e})=>S.jsx("del",{children:S.jsx(Lt,{nodes:e.children})}),i0=({node:e})=>S.jsx("em",{children:S.jsx(Lt,{nodes:e.children})}),ML=e=>{switch(e){case 1:return"border-b-2 border-gray-300 pb-2 text-3xl font-bold dark:border-gray-600 dark:text-gray-100";case 2:return"border-b border-gray-300 pb-2 text-2xl font-semibold dark:border-gray-600 dark:text-gray-200";case 3:return"text-xl font-semibold dark:text-gray-300";default:return"text-lg font-medium dark:text-gray-400"}},n0=e=>{let t="";for(const r of e)"value"in r&&typeof r.value=="string"?t+=r.value:"children"in r&&Array.isArray(r.children)&&(t+=n0(r.children));return t},a0=({node:e})=>{const t=new K0,r=`h${e.depth}`,i=e.data?.hProperties?.id,n=t.slug(n0(e.children));return S.jsx(r,{id:i||n,className:ML(e.depth),children:S.jsx(Lt,{nodes:e.children})})},AL=({iframeHtml:e,iFrameAllowedDomains:t=[]})=>{const[r,i]=J.useState(!0),[n,a]=J.useState(!1),s=J.useRef(null),o=J.useRef(null),c=J.useCallback(g=>g.match(/src\s*=\s*["']([^"']*)["']/i)?.[1]||"",[])(e),h=J.useCallback(g=>{try{const m=new URL(g);return t.includes(m.hostname)}catch{return!1}},[t]),u=J.useCallback(g=>{if(!h(g.origin))return;const{type:m}=g.data;m==="dify-chatbot-iframe-ready"&&(console.log("Dify chatbot iframe is ready"),i(y=>y&&(a(!1),s.current&&(clearTimeout(s.current),s.current=null),o.current&&(clearTimeout(o.current),o.current=null),!1)))},[h]),d=J.useCallback(()=>{const g=document.querySelector(`iframe[src="${c}"]`);if(g)try{if(!g.contentDocument)throw new Error("Cannot access iframe content");i(y=>y&&(a(!1),!1))}catch{console.log("Crossorigin error detected, showing auth prompt"),a(y=>y||(i(!1),!0))}},[c]),f=J.useCallback(g=>{const m=window.open(g,"dify-oauth","width=500,height=600,scrollbars=yes,resizable=yes");if(!m){console.error("ポップアップがブロックされました");return}const y=setInterval(()=>{if(m.closed){clearInterval(y),console.log("ポップアップが閉じられました");try{console.log("ポップアップURL:",m.location.href)}catch(b){console.log("クロスオリジンのためURLにアクセスできません:",b)}const x=document.querySelector(`iframe[src="${g}"]`);if(x?.src){const b=x.src;i(w=>w||!0),a(w=>w&&!1),x.src="",setTimeout(()=>{x.src=b,s.current=setTimeout(()=>{console.log("認証後タイムアウト: dify-chatbot-iframe-ready not received after auth"),d()},5e3)},100)}}},1e3);console.log("ポップアップを開きました:"),console.log("- 初期URL:",g),console.log("- ウィンドウ名:","dify-oauth"),console.log("- ウィンドウサイズ: 500x600")},[d]);return J.useEffect(()=>(window.addEventListener("message",u),()=>{window.removeEventListener("message",u)}),[u]),J.useEffect(()=>{const g=setTimeout(()=>{console.log("Timeout: dify-chatbot-iframe-ready not received, checking iframe access"),d()},5e3);return o.current=g,()=>{o.current&&(clearTimeout(o.current),o.current=null)}},[d]),J.useEffect(()=>()=>{s.current&&(clearTimeout(s.current),s.current=null)},[]),h(c)?S.jsxs("div",{className:"dify-iframe-container",children:[r&&!n&&S.jsxs("div",{className:"flex items-center justify-center rounded-lg bg-gray-50 p-8",children:[S.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-blue-600 border-b-2"}),S.jsx("span",{className:"ml-3 text-gray-600",children:"Dify チャットボットを読み込み中..."})]}),n&&S.jsxs("div",{className:"mb-4 rounded-lg border border-blue-200 bg-blue-50 p-6",children:[S.jsx("div",{className:"flex items-center",children:S.jsxs("div",{className:"text-blue-800",children:[S.jsx("h3",{className:"font-medium",children:"認証が必要です"}),S.jsx("p",{className:"mt-1 text-sm",children:"Dify チャットボットにアクセスするには OAuth 認証が必要です。 ポップアップウィンドウで認証を完了してください。"})]})}),S.jsx("div",{className:"mt-4",children:S.jsx("button",{type:"button",onClick:()=>f(c),className:"rounded-md border border-gray-700 bg-gray-900 px-4 py-2 font-medium text-sm text-white shadow-lg transition-colors hover:bg-gray-800",children:"OAuth 認証を開始"})})]}),S.jsx("div",{className:`${r||n?"hidden":"block"}`,dangerouslySetInnerHTML:{__html:e}})]}):(console.warn("DifyIFramePlugin: Invalid domain for iframe:",c),null)},EL={dify:AL},FL=e=>EL[e]||null,PL=/^[a-z][a-z0-9+.-]*:/,s0=({node:e,iFrameAllowedDomains:t=[]})=>{const[r,i]=J.useState(""),[n,a]=J.useState(!1),[s,o]=J.useState(null);if(J.useEffect(()=>{if(a(!0),typeof window<"u"){const l=Ge(window);let c=null;l.addHook("afterSanitizeAttributes",u=>{const d=u.tagName.toLowerCase();if(d==="iframe"){const f=u.getAttribute("src"),g=u.getAttribute("data-plugin-type");if(f)try{const m=new URL(f);t.includes(m.hostname)?g&&(c={type:g,iframeHtml:u.outerHTML}):u.removeAttribute("src")}catch{u.removeAttribute("src")}}if(d==="a"){u.classList.add("inline-block","w-fit","text-link","underline","visited:text-link-visited");const f=u.getAttribute("href");f&&PL.test(f)&&(u.setAttribute("target","_blank"),u.setAttribute("rel","noreferrer"))}});const h=l.sanitize(e.value,{ADD_TAGS:["iframe"],ADD_ATTR:["src","frameborder","allow","allowfullscreen","target","rel","data-plugin-type","width","height","title","class"]});c?o(c):i(h)}},[e.value,t]),!n)return null;if(s){const{type:l,iframeHtml:c}=s,h=FL(l);if(h)return S.jsx(h,{iframeHtml:c,iFrameAllowedDomains:t});console.warn(`Unknown or unregistered plugin type: ${l}`)}return S.jsx(S.Fragment,{children:r===""?null:S.jsx("div",{dangerouslySetInnerHTML:{__html:r}})})},o0=({node:e})=>{if(!e.url)return null;const t=e.title??"",r=e.data?.hProperties?.width,i=e.data?.hProperties?.height;return S.jsxs("span",{style:{width:r,height:i},className:"mt-4 mb-4 block w-fit max-w-full",children:[S.jsx("img",{src:e.url,alt:e.alt??"",className:"mx-auto h-full w-full",width:r,height:i}),t&&S.jsx("em",{className:"block text-center text-gray-400 text-xs",children:t})]})},l0=({node:e})=>S.jsx("code",{className:"rounded-md bg-gray-200 px-1.5 py-1 font-mono text-gray-800 text-sm dark:bg-gray-700 dark:text-gray-200",children:e.value}),c0=({node:e})=>{const t=J.useRef(null);return J.useLayoutEffect(()=>{try{t.current&&zc.render(e.value,t.current)}catch(r){console.error("An error occurred while rendering KaTeX:",r),t.current&&(t.current.innerText=`Math rendering error: ${r instanceof Error?r.message:String(r)}`)}},[e.value]),S.jsx("span",{ref:t,className:"rounded-md px-1.5 py-1 font-mono text-gray-800 text-sm dark:text-gray-200"})},RL=/^[a-z][a-z0-9+.-]*:/,h0=({node:e})=>{const t=RL.test(e.url);return S.jsx("a",{className:"inline-block w-fit text-link underline visited:text-link-visited",href:e.url,target:t?"_blank":void 0,rel:t?"noreferrer":void 0,children:S.jsx(Lt,{nodes:e.children})})},u0=({node:e})=>e.children.length===1&&e.children[0].type==="paragraph"?S.jsx("li",{children:S.jsx(Lt,{nodes:e.children[0].children})}):S.jsx("li",{children:S.jsx(Lt,{nodes:e.children})}),d0=({node:e})=>{const t=e.ordered?"ol":"ul";return S.jsx(t,{children:S.jsx(Lt,{nodes:e.children})})},OL=({code:e})=>{const[t,r]=J.useState(!1),i=()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)},n=>{console.error("Failed to copy: ",n)})};return S.jsx("button",{type:"button",className:"absolute right-2 z-10 rounded-md bg-gray-200 px-2 py-1 text-gray-800 text-xs transition-colors hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-100 dark:hover:bg-gray-600",onClick:i,children:t?"COPIED!":"Copy"})},f0=({node:e})=>{const t=J.useRef(null);return J.useLayoutEffect(()=>{try{t.current&&zc.render(e.value,t.current)}catch(r){console.error("An error occurred while rendering KaTeX:",r),t.current&&(t.current.innerText=`Math rendering error: ${r instanceof Error?r.message:String(r)}`)}},[e.value]),S.jsxs("div",{className:"relative",children:[S.jsx(OL,{code:e.value}),S.jsx("article",{ref:t,className:"rounded-md px-1.5 py-1 font-mono text-gray-800 text-sm dark:text-gray-200"})]})},p0=({node:e})=>S.jsx("p",{children:S.jsx(Lt,{nodes:e.children})}),g0=({node:e})=>S.jsx("strong",{children:S.jsx(Lt,{nodes:e.children})}),m0=({node:e})=>{const[t,...r]=e.children;return S.jsx("div",{className:"overflow-x-auto",children:S.jsxs("table",{className:"w-full border-collapse border-none",children:[S.jsx("thead",{className:"bg-gray-100 dark:bg-gray-800",children:S.jsx("tr",{children:t.children.map((i,n)=>S.jsx("th",{style:{textAlign:e.align?.[n]??void 0},className:"border border-gray-300 px-4 py-2 text-left font-semibold dark:border-gray-600 dark:text-gray-200",children:S.jsx(Lt,{nodes:i.children})},`mdast-table-node-${e.type}-${n}`))})}),S.jsx("tbody",{children:r.map((i,n)=>S.jsx("tr",{className:"border-gray-200 border-t bg-white dark:border-gray-700 dark:bg-gray-900",children:i.children.map((a,s)=>S.jsx("td",{style:{textAlign:e.align?.[s]??void 0},className:"border border-gray-300 px-4 py-2 dark:border-gray-600 dark:text-gray-300",children:S.jsx(Lt,{nodes:a.children})},`mdast-table-node-${e.type}-${s}`))},`mdast-table-node-${e.type}-${n}`))})]})})},y0=({node:e})=>S.jsx(S.Fragment,{children:e.value}),x0=()=>S.jsx("hr",{className:"border-gray-300 dark:border-gray-600"});let Qi=null;const DL=()=>typeof window>"u"||typeof document>"u"?Promise.resolve(null):Qi||(Qi=new Promise((e,t)=>{if(window.twttr?.widgets)return e(window.twttr.widgets);const r="twitter-wjs",i=()=>{window.twttr?.widgets?e(window.twttr.widgets):t(new Error("Twitter widget script loaded, but `window.twttr.widgets` not found."))},n=document.getElementById(r);if(n){n.addEventListener("load",i),n.addEventListener("error",()=>t(new Error("Failed to load Twitter script.")));return}const a=document.createElement("script");a.id=r,a.src="https://platform.twitter.com/widgets.js",a.async=!0,a.charset="utf-8",a.onload=i,a.onerror=()=>t(new Error("Failed to load Twitter script.")),document.body.appendChild(a)}),Qi),NL=({promise:e})=>(J.use(e),null),IL=({setPromise:e,createPromise:t})=>{const r=J.useRef(null);return J.useEffect(()=>{const i=r.current;if(!i){console.warn("Mount point for Twitter widget not found.");return}const n=t(i).then(a=>{if(!a){console.warn("createPromise から要素が返されませんでした。");return}return a}).catch(a=>{console.error("ツイートウィジェットの作成中にエラーが発生しました:",a),i.innerText=`ツイートの読み込みエラー: ${a.message}`});return e(n),()=>{i.innerHTML=""}},[t,e]),S.jsx("div",{ref:r,className:"twitter-embed min-h-24"})},zL=({node:e,loadWidgetsPromise:t,theme:r})=>{const i=J.use(t),n=J.useRef(null),a=J.useRef(null),[s,o]=J.useState(null),[l,c]=J.useState(null),h=J.useCallback(d=>{let f;return d&&i?new Promise((g,m)=>{n.current=g,a.current=m;const y=new MutationObserver(()=>{d?.querySelector(".twitter-tweet > iframe:last-of-type")?.addEventListener("load",()=>{f&&clearTimeout(f),y?.disconnect(),n.current=null,a.current=null,g(d)},{once:!0,passive:!0,capture:!0})});f=setTimeout(()=>{y.disconnect(),n.current=null,a.current=null,m(new Error("ツイートの作成が 10 秒後にタイムアウトしました。"))},1e4),y.observe(d,{childList:!0,subtree:!0,attributes:!1,characterData:!1}),i?.createTweet(e.tweetId,d,{cards:e.cards,conversation:e.conversation,theme:e.theme||r,width:e.width,align:e.align,lang:e.lang||"ja",dnt:e.dnt}).catch(x=>{f&&clearTimeout(f),y.disconnect(),n.current=null,a.current=null,m(x),console.error("ツイートウィジェットの作成中にエラーが発生しました:",x)})}):new Promise((g,m)=>{console.warn("TweetEmbed: No targetNode or twitterWidgetsJS available."),m(new Error("No targetNode or twitterWidgetsJS available."))})},[i,e.tweetId,e.cards,e.conversation,e.theme,e.width,e.align,e.lang,e.dnt,r]),u=J.useMemo(()=>S.jsx(IL,{setPromise:c,createPromise:h}),[h]);return J.useEffect(()=>(o(u),()=>{n.current&&(n.current(void 0),n.current=null,a.current=null)}),[u]),i?S.jsxs(J.Suspense,{fallback:S.jsx("div",{className:"min-h-24",children:"🌀 Loading Tweet..."}),children:[s,l&&S.jsx(NL,{promise:l})]}):S.jsx("div",{className:"min-h-24",children:"🌀 Loading Twitter renderer..."})},b0=({node:e,theme:t})=>{const r=J.useMemo(()=>DL(),[]);return S.jsx(J.Suspense,{fallback:S.jsx("div",{className:"min-h-24",children:"🌀 Loading Twitter widget..."}),children:S.jsx(zL,{node:e,loadWidgetsPromise:r,theme:t})})},w0=({node:e})=>{const{videoId:t,params:r}=e,i={...r,rel:"0"},n=new URLSearchParams(i).toString();return S.jsx("iframe",{className:"aspect-video w-full max-w-[560px] rounded-lg",src:`https://www.youtube.com/embed/${t}${n?`?${n}`:""}`,title:"YouTube video player",allow:"accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerPolicy:"strict-origin-when-cross-origin",allowFullScreen:!0})},v0=({node:e})=>{const t=e.data?.title||"";return S.jsxs("details",{className:"markdown-details",children:[S.jsx("summary",{children:t}),S.jsx("div",{className:"markdown-details-content",children:S.jsx(Lt,{nodes:e.children})})]})},k0=({node:e})=>{const r=["message",e.data?.messageType||"message"].filter(Boolean).join(" ");return S.jsxs("aside",{className:r,children:[S.jsx("span",{className:"message-symbol",style:{userSelect:"none"},children:"!"}),S.jsx("div",{className:"message-content",children:S.jsx(Lt,{nodes:e.children})})]})},Lt=({nodes:e,theme:t="light",iFrameAllowedDomains:r=[]})=>e.map((i,n)=>{switch(i.type){case"block-link":return S.jsx(Yc,{node:i},`mdast-node-${i.type}-${n}`);case"blockquote":return S.jsx(Uc,{node:i},`mdast-node-${i.type}-${n}`);case"break":return S.jsx("br",{},`mdast-node-${i.type}-${n}`);case"code":return S.jsx(e0,{node:i},`mdast-node-${i.type}-${n}`);case"delete":return S.jsx(r0,{node:i},`mdast-node-${i.type}-${n}`);case"details":return S.jsx(v0,{node:i},`mdast-node-${i.type}-${n}`);case"emphasis":return S.jsx(i0,{node:i},`mdast-node-${i.type}-${n}`);case"footnoteReference":return S.jsx(C0,{node:i},`mdast-node-${i.type}-${n}`);case"footnoteDefinition":return null;case"footnote-back-link":return S.jsx(S0,{node:i},`mdast-node-${i.type}-${n}`);case"heading":return S.jsx(a0,{node:i},`mdast-node-${i.type}-${n}`);case"html":return S.jsx(s0,{node:i,iFrameAllowedDomains:r},`mdast-node-${i.type}-${n}`);case"image":return S.jsx(o0,{node:i},`mdast-node-${i.type}-${n}`);case"inlineCode":return S.jsx(l0,{node:i},`mdast-node-${i.type}-${n}`);case"inlineMath":return S.jsx(c0,{node:i},`mdast-node-${i.type}-${n}`);case"link":return S.jsx(h0,{node:i},`mdast-node-${i.type}-${n}`);case"listItem":return S.jsx(u0,{node:i},`mdast-node-${i.type}-${n}`);case"list":return S.jsx(d0,{node:i},`mdast-node-${i.type}-${n}`);case"math":return S.jsx(f0,{node:i},`mdast-node-${i.type}-${n}`);case"message":return S.jsx(k0,{node:i},`mdast-node-${i.type}-${n}`);case"paragraph":return S.jsx(p0,{node:i},`mdast-node-${i.type}-${n}`);case"strong":return S.jsx(g0,{node:i},`mdast-node-${i.type}-${n}`);case"table":return S.jsx(m0,{node:i},`mdast-node-${i.type}-${n}`);case"text":return S.jsx(y0,{node:i},`mdast-node-${i.type}-${n}`);case"thematicBreak":return S.jsx(x0,{},`mdast-node-${i.type}-${n}`);case"yaml":return null;case"twitter-embed":return S.jsx(b0,{node:i,theme:t},`mdast-node-${i.type}-${i.tweetId}-${n}`);case"youtube-embed":return S.jsx(w0,{node:i},`mdast-node-${i.type}-${n}`);default:{if(process.env.NODE_ENV==="development")return S.jsxs("div",{children:[S.jsxs("p",{style:{color:"red"},children:["Unknown node type: ",i.type]}),S.jsx("pre",{children:JSON.stringify(i,null,2)})]},`mdast-node-${i.type}-${n}`);throw new Error(`Unknown node type: ${i.type}`)}}}),C0=({node:e})=>S.jsx("sup",{children:S.jsxs("a",{id:`fnref-${e.identifier}`,className:"text-[#316dce] underline visited:text-[#6b46c1] dark:text-[#3182ce] dark:visited:text-[#805ad5]",href:`#fn-${e.identifier}`,children:["[",e.identifier,"]"]})}),_0=({nodes:e,theme:t="light"})=>e.length===0?null:S.jsx("section",{className:"border-[#171717] border-t pt-4 dark:border-[#464646]",children:S.jsx("ol",{className:"pl-6 text-[#686868] text-sm dark:text-[#a4a5a9]",children:e.map((r,i)=>S.jsx("li",{id:`fn-${r.identifier}`,className:i===0?"":"mt-4",children:S.jsx(Lt,{nodes:r.children,theme:t})},`mdast-node-fn-${r.identifier}-${i}`))})}),S0=({node:e})=>S.jsx("a",{href:e.url,className:"text-[#316dce] underline visited:text-[#6b46c1] dark:text-[#3182ce] dark:visited:text-[#805ad5]",children:"↩"}),T0=e=>{const t=[];for(const r of e)r.type==="footnoteDefinition"?t.push(r):"children"in r&&t.push(...T0(r.children));return t},qL=({rootNode:e,theme:t="light",iFrameAllowedDomains:r=[]})=>{const i=T0(e.children);return S.jsxs(S.Fragment,{children:[S.jsx(Lt,{nodes:e.children,theme:t,iFrameAllowedDomains:r}),S.jsx(_0,{nodes:i,theme:t})]})};function jL({text:e,url:t,hashtags:r,via:i,related:n,in_reply_to:a}){const s=new URL("https://twitter.com/intent/tweet");return e!==void 0&&s.searchParams.set("text",e),t!==void 0&&s.searchParams.set("url",t),r!==void 0&&s.searchParams.set("hashtags",r.join(",")),i!==void 0&&s.searchParams.set("via",i),n!==void 0&&s.searchParams.set("related",n.join(",")),a!==void 0&&s.searchParams.set("in_reply_to",a),s.toString()}const B0=e=>{try{const t=new URL(e),r=Object.fromEntries(t.searchParams.entries());let i=null;if(t.hostname==="youtu.be"?i=t.pathname.substring(1):t.hostname.endsWith("youtube.com")&&(t.pathname==="/watch"?i=t.searchParams.get("v"):t.pathname.startsWith("/embed/")&&(i=t.pathname.split("/")[2])),i){const{v:n,...a}=r;return{videoId:i,params:a}}return null}catch{return null}},$0=async e=>{try{const t=new AbortController,r=setTimeout(()=>t.abort(),1e4),i=await fetch(e,{signal:t.signal});if(clearTimeout(r),!i.ok)return null;const n=await i.text(),a={url:e},s=Q0.load(n),o=s("title").text().trim();a.title=o;const l=s("meta");for(const c of l){const h=c.attribs.property;h==="og:site_name"&&(a.site_name=c.attribs.content||void 0),h==="og:title"&&(a.title=c.attribs.content||o),h==="og:description"&&(a.description=c.attribs.content||void 0),h==="og:image"&&(a.image=c.attribs.content||void 0),h==="og:type"&&(a.type=c.attribs.content||void 0),c.attribs.name==="description"&&(a.description=c.attribs.content||void 0)}return a}catch(t){return console.error("Error fetching site metadata:",t),null}},L0=()=>e=>{St.visit(e,"paragraph",(t,r,i)=>{const n=t.children[0];t.children.length!==1||n.type!=="link"||n.children.length!==1||!(n.children[0].type==="text"&&n.url===n.children[0].value)||!i||r===void 0||(i.children[r]={type:"block-link",url:n.url})})},Qr=new Map,WL=(e,t)=>t.fetchAll?!0:t.urlPatterns&&t.urlPatterns.length>0?t.urlPatterns.some(r=>r.test(e)):/^https?:\/\//.test(e)&&!e.includes("localhost")&&!e.includes("127.0.0.1"),M0=(e={})=>{const{enableCache:t=!0}=e;return async r=>{const i=[];St.visit(r,"block-link",a=>{WL(a.url,e)&&i.push(a)});const n=i.map(async a=>{const s=a.url;if(t&&Qr.has(s)){const o=Qr.get(s);o&&(a.data=a.data||{},a.data.siteMetadata=o);return}try{const o=await $0(s);o?(a.data=a.data||{},a.data.siteMetadata=o,t&&Qr.set(s,o)):t&&Qr.set(s,null)}catch(o){console.warn(`Failed to fetch metadata for ${s}:`,o),t&&Qr.set(s,null)}});await Promise.all(n)}},HL=/\s*\{#(.+?)\}\s*$/,A0=()=>e=>{St.visit(e,"heading",t=>{if(t.children.length===0)return;const r=t.children[t.children.length-1];if(r?.type!=="text")return;const i=r,n=i.value.match(HL);if(n){const a=n[1];t.data||(t.data={});const s=t.data,o=s.hProperties||{};o.id=a,s.hProperties=o,i.value=i.value.substring(0,n.index).trimEnd(),i.value===""&&t.children.pop()}})},E0=()=>e=>{St.visit(e,"footnoteDefinition",t=>{St.visit(t,"paragraph",r=>{r.children.push({type:"footnote-back-link",url:`#fnref-${t.identifier}`})})})},F0=()=>e=>{St.visit(e,"html",(t,r,i)=>{if(typeof r!="number"||!i)return;const a=t.value.trim().match(/^<a\s+href="([^"]+)"[^>]*>(.*?)<\/a>$/i);if(a){const[,s,o]=a,l={type:"link",url:s,children:[{type:"text",value:o}]};i.children.splice(r,1,l)}})},P0=()=>e=>{const t=r=>{const i=r.children;if(!i)return;let n=0;for(;n<i.length;){const a=i[n];if(a.type==="html"&&a.value.startsWith("<")&&!a.value.startsWith("</")&&a.value.match(/<([a-zA-Z0-9]+)/)){let o="",l=0;const c=[];let h=!1;for(let u=n;u<i.length;u++){const d=i[u];if(d.type==="html"){o+=d.value;const f=d.value.match(/<\/?([a-zA-Z0-9]+)/g)||[];for(const g of f){const m=g.match(/<\/?([a-zA-Z0-9]+)/);if(!m)continue;const y=m[1];g.startsWith("</")?c.length>0&&c[c.length-1]===y&&c.pop():g.startsWith("<")&&c.push(y)}}else if(d.type==="text")o+=d.value;else{c.length===0&&(h=!0);break}if(l++,c.length===0){h=!0;break}}h&&i.splice(n,l,{type:"html",value:o})}n++}};St.visit(e,"paragraph",t),St.visit(e,"tableCell",t),St.visit(e,"heading",t),St.visit(e,"emphasis",t),St.visit(e,"strong",t),St.visit(e,"delete",t)},Nc=/\s*=\s*(\d+)(w|h|x|y)\s*/g,R0=()=>e=>{St.visit(e,"image",t=>{const r=l=>{if(!l)return{updatedText:l,matches:[]};const c=[...l.matchAll(Nc)];return{updatedText:l.replaceAll(Nc,"").trim(),matches:c}},{updatedText:i,matches:n}=r(t.alt);t.alt=i;const{updatedText:a,matches:s}=r(t.title);t.title=a||null;const o=[...n,...s];if(o.length>0){t.data||(t.data={}),t.data.hProperties||(t.data.hProperties={});for(const l of o){const c=Number.parseInt(l[1],10),h=l[2];h==="w"||h==="x"?t.data.hProperties.width=c:(h==="h"||h==="y")&&(t.data.hProperties.height=c)}}})},YL=/<!--\s+@import\s+"(.+?)"\s+-->/;function O0(e){return async t=>{const{markdownFilePath:r}=e,i=ur.dirname(r),n=[];if(St.visit(t,"html",(s,o,l)=>{if(!l||typeof o!="number")return;const c=s.value.match(YL);if(!c)return;const h=c[1],u=ur.resolve(i,h);n.push({parent:l,index:o,absolutePath:u})}),n.length===0)return;const a=await Promise.all(n.map(async({absolutePath:s})=>{try{const o=await qc.readFile(s,"utf-8");return this.parse(o)}catch(o){return o&&o.code==="ENOENT"?console.warn(`[remark-import-directive] Import file not found: ${s}`):console.error(`[remark-import-directive] Error processing import: ${s}`,o),null}}));for(let s=n.length-1;s>=0;s--){const{parent:o,index:l}=n[s],c=a[s];c?.children&&Array.isArray(c.children)&&o.children.splice(l,1,...c.children)}}}const D0=()=>e=>{St.visit(e,(t,r,i)=>{i&&Object.defineProperty(t,"parent",{value:i,writable:!0,configurable:!0,enumerable:!1})})},UL=/^[a-z][a-z0-9+.-]*:/,N0=async(e,t,r,i,n=!1)=>{if(!e)return"";if(UL.test(e)){const c=e.substring(0,e.indexOf(":")).toLowerCase();if(["http","https","mailto","tel","file"].includes(c))return e}if(e.startsWith("#")||e.startsWith("/"))return e;const a=ur.dirname(r),s=ur.normalize(ur.join(a,e)),o=ur.resolve(i,s);if(!o.startsWith(i)||s.startsWith(".."))return console.error(`Security Alert: Attempt to access file outside project root: ${o}`),"";if(n)try{await qc.access(o)}catch{return console.warn(`File not found: ${o}`),""}const l=s.replace(/\\/g,"/");return t?J0("/assets/",l):`?filePath=${encodeURIComponent(l)}`};function I0(e){return async t=>{if(!(e?.markdownFilePath&&e?.workspaceRoot)){console.warn("remark-resolve-uri-async: markdownFilePath and workspaceRoot are required. Skipping URI resolution.");return}const r=[];St.visit(t,n=>{(n.type==="image"||n.type==="link")&&n.url&&r.push({node:n,isImage:n.type==="image"})});const i=r.map(async({node:n,isImage:a})=>{const s=await N0(n.url,a,e.markdownFilePath,e.workspaceRoot,e.validateExistence);n.url=s});await Promise.all(i)}}const GL=/https?:\/\/(?:www\.|mobile\.)?(?:twitter|x)\.com\/[^/]+\/status\/(\d+)/,z0=()=>e=>{St.visit(e,"paragraph",(t,r,i)=>{const n=t.children[0];if(t.children.length!==1||n.type!=="link"||!n.children.every(l=>l.type==="text")||!i||r===void 0)return;const s=n.url.match(GL);if(!s)return;const o=s[1];o&&(i.children[r]={type:"twitter-embed",tweetId:o})})},q0=()=>e=>{St.visit(e,"paragraph",(t,r,i)=>{const n=t.children[0];if(t.children.length!==1||n.type!=="link"||!n.children.every(o=>o.type==="text")||!i||r===void 0)return;const s=B0(n.url);s&&(i.children[r]={type:"youtube-embed",videoId:s.videoId,params:s.params})})},Ic=/^:::(message|details)\s*(.*)/,j0=()=>e=>{function t(r){const i=[];let n=0;for(;n<r.length;){const a=r[n];if(a.type==="paragraph"&&a.children[0]?.type==="text"&&a.children[0].value.trim().startsWith(":::")){const l=a.children[0].value.trim().match(Ic);if(l){const c=n;let h=-1,u=1;const d=a.children.at(-1);if(a.children.length>1&&d?.type==="text"&&d.value.trim()===":::")h=c;else for(let f=c+1;f<r.length;f++){const g=r[f];if(g.type==="paragraph"&&g.children[0]?.type==="text"){const m=g.children[0].value.trim();Ic.test(m)?u++:m===":::"&&u--}if(u===0){h=f;break}}if(h!==-1){const f=l[1],g=l[2];let m;if(h===c){const b=a.children.slice(1,-1);b[0]?.type==="break"&&b.shift(),b.at(-1)?.type==="break"&&b.pop(),m=b.length>0?[{type:"paragraph",children:b}]:[]}else{const b=a.children.slice(1);b[0]?.type==="break"&&b.shift();const w={type:"paragraph",children:b},v=r[h].children.slice(0,-1);v.at(-1)?.type==="break"&&v.pop();const L={type:"paragraph",children:v},T=r.slice(c+1,h);m=[w,...T,L].filter(D=>!(D.type==="paragraph"&&D.children.length===0))}const y=t(m);let x;if(f==="message"?x={type:"message",data:{messageType:g.trim()},children:y}:f==="details"&&(x={type:"details",data:{title:g.trim()},children:y}),x){i.push(x),n=h+1;continue}}}}const s={...a};"children"in s&&Array.isArray(s.children)&&(s.type==="blockquote"||s.type==="footnoteDefinition"||s.type==="message"||s.type==="details"?s.children=t(s.children):s.type==="list"&&(s.children=s.children.map(o=>({...o,children:t(o.children)})))),i.push(s),n++}return i}e.children=t(e.children)},XL=async(e,t,r)=>{const i=ty.remark().use(P0).use(F0).use(D0).use(E0).use(ry).use(ey).use(R0).use(j0).use(ny).use(O0,{markdownFilePath:t}).use(z0).use(q0).use(L0).use(M0).use(A0).use(iy).use(I0,{markdownFilePath:t,workspaceRoot:r,validateExistence:!0}),n=i.parse(e);return await i.run(n)};exports.BlockLinkNode=Yc;exports.BlockquoteNode=Uc;exports.CodeNode=e0;exports.Color=te;exports.Color$1=Or;exports.DeleteNode=r0;exports.EmphasisNode=i0;exports.FootnoteBackLinkNode=S0;exports.FootnoteReferenceNode=C0;exports.FootnotesSection=_0;exports.HTMLNode=s0;exports.HeadingNode=a0;exports.ImageNode=o0;exports.InlineCodeNode=l0;exports.InlineMathNode=c0;exports.JSON_SCHEMA=sf;exports.LinkNode=h0;exports.ListItemNode=u0;exports.ListNode=d0;exports.MapCache=ke;exports.MarkdownRenderer=qL;exports.MathNode=f0;exports.MermaidDiagram=t0;exports.NodesRenderer=Lt;exports.ParagraphNode=p0;exports.Rgb=Dt;exports.RichLinkCard=Hc;exports.Set=Un;exports.Stack=sr;exports.StrongNode=g0;exports.Symbol=ki;exports.TableNode=m0;exports.TextNode=y0;exports.ThematicBreakNode=x0;exports.TwitterEmbedNode=b0;exports.Uint8Array=Es;exports.Utils=at;exports.YouTubeEmbedNode=w0;exports.ZERO_WIDTH_SPACE=Df;exports.ZennDetailsNode=v0;exports.ZennMessageNode=k0;exports.__export=Jc;exports.__name=p;exports.abs=Y2;exports.acos=J2;exports.array=Jh;exports.arrayLikeKeys=$f;exports.asin=tw;exports.assignValue=Tf;exports.assignWithDepth_default=bt;exports.atan2=U2;exports.baseAssignValue=fa;exports.baseFor=df;exports.baseGetTag=ir;exports.baseKeys=hm;exports.baseRest=Ff;exports.baseUnary=_f;exports.calculateMathMLDimensions=yx;exports.calculateTextHeight=jo;exports.calculateTextWidth=le;exports.cleanAndMerge=ma;exports.clear=yh;exports.clear$1=jS;exports.clear$2=bS;exports.clear2=NS;exports.cloneArrayBuffer=gf;exports.cloneBuffer=pf;exports.cloneTypedArray=mf;exports.color=$r;exports.commonDb_exports=oo;exports.common_default=rr;exports.computeDimensionOfText=bp;exports.configureSvgSize=so;exports.constant=Ne;exports.constant$1=Af;exports.constant$2=ea;exports.copyArray=yf;exports.copyObject=Bf;exports.cos=G2;exports.createAssigner=Rf;exports.createIntentTweetLink=jL;exports.createText=Ce;exports.curveBasis=ui;exports.darken=et;exports.dayjs2=Kc;exports.decodeEntities=Fe;exports.defaultConfig2=Tx;exports.defaultConfig_default=ao;exports.define=ta;exports.distExports=cf;exports.epsilon=ps;exports.eq=Ei;exports.evaluate=wt;exports.extend=mo;exports.extractYouTubeVideoId=B0;exports.fetchSiteMetadata=$0;exports.generateId=Wf;exports.getAccDescription=vh;exports.getAccTitle=bh;exports.getConfig=$t;exports.getConfig2=ut;exports.getDefaultExportFromCjs=jc;exports.getDiagramTitle=Ch;exports.getEdgeId=YC;exports.getFaviconUrl=Wc;exports.getIconSVG=zr;exports.getLineFunctionsWithOffset=lf;exports.getPrototype=Fo;exports.getRegisteredLayoutAlgorithm=fT;exports.getStylesFromArray=qo;exports.getSubGraphTitleMargins=ca;exports.getThemeVariables3=ah;exports.getUrl=gh;exports.getUserDefinedConfig=sx;exports.halfPi=gs;exports.hasKatex=Ze;exports.hue=k1;exports.identity=Do;exports.initCloneObject=bf;exports.insertCluster=Ap;exports.insertEdge=Jg;exports.insertEdgeLabel=Zg;exports.insertNode=sl;exports.interpolateNumber=me;exports.interpolateRgb=ss;exports.interpolateString=qh;exports.isArguments=Si;exports.isArray=Ti;exports.isArrayLike=Pi;exports.isArrayLikeObject=vf;exports.isBuffer=pa;exports.isDark=Pr;exports.isEmpty=Ks;exports.isFunction=ha;exports.isIndex=Ro;exports.isIterateeCall=Pf;exports.isLabelStyle=Eo;exports.isLength=Po;exports.isObject=Ee;exports.isObjectLike=Ir;exports.isPrototype=Fi;exports.isTypedArray=ga;exports.isValidShape=Vg;exports.keysIn=Oo;exports.lighten=X;exports.line=eu;exports.lineBreakRegex=Rr;exports.load=of;exports.log=I;exports.markers_default=rm;exports.max=X2;exports.memoize=Nr;exports.merge=Of;exports.min=V2;exports.nodeUtil=Fs;exports.nogamma=yo;exports.overRest=Mf;exports.package_default=Ka;exports.parseFontSize=Ri;exports.parseGenericTypes=ts;exports.parseMarkdown=XL;exports.pi=na;exports.positionEdgeLabel=Kg;exports.positionNode=IS;exports.random=Yf;exports.registerIconPacks=cp;exports.remarkBlockLink=L0;exports.remarkBlockLinkMetadata=M0;exports.remarkCustomHeadingId=A0;exports.remarkFootnoteBackLink=E0;exports.remarkHtmlAnchorToLink=F0;exports.remarkHtmlInHtml=P0;exports.remarkImageSize=R0;exports.remarkImportDirective=O0;exports.remarkParentNode=D0;exports.remarkResolveUriAsync=I0;exports.remarkTwitterEmbed=z0;exports.remarkYouTubeEmbed=q0;exports.remarkZennMessage=j0;exports.render=dT;exports.renderKatexSanitized=Qn;exports.replaceIconSubstring=el;exports.rgbConvert=Nh;exports.rgba=gr;exports.sanitizeText=Ht;exports.select=lt;exports.selectSvgElement=Cu;exports.setAccDescription=wh;exports.setAccTitle=xh;exports.setConfig2=Sx;exports.setDiagramTitle=kh;exports.setNodeElem=DS;exports.setToString=Ef;exports.setupGraphViewbox=mh;exports.setupGraphViewbox2=_h;exports.sin=Z2;exports.sqrt=K2;exports.styles2String=V;exports.tau=Q2;exports.transformUriAsync=N0;exports.unknownIcon=op;exports.updateNodeBounds=Q;exports.utils_default=Gt;exports.withPath=Qh;exports.wrapLabel=Uf;
254
- //# sourceMappingURL=index-CPFTnxie.cjs.map
251
+ :root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const s=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(o=>{Ks(o.styles)||s.forEach(l=>{r+=Oc(o.id,l,o.styles)}),Ks(o.textStyles)||(r+=Oc(o.id,"tspan",(o?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),gL=p((e,t,r,i)=>{const n=pL(e,r),a=Tx(t,n,e.themeVariables);return Gs(AT(`${i}{${a}}`),FT)},"createUserStyles"),mL=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=Fe(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),yL=p((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":oL,i=Wm(`<body style="${cL}">${e}</body>`);return`<iframe style="width:${sL};height:${r};${lL}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${hL}">
252
+ ${uL}
253
+ </iframe>`},"putIntoIFrame"),Nc=p((e,t,r,i,n)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const s=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",iL);return n&&s.attr("xmlns:xlink",n),s.append("g"),e},"appendDivSvgG");function Js(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(Js,"sandboxedIframe");var xL=p((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),bL=p(async function(e,t,r){Ta();const i=hl(t);t=i.code;const n=$t();I.debug(n),t.length>(n?.maxTextSize??J$)&&(t=tL);const a="#"+e,s="i"+e,o="#"+s,l="d"+e,c="#"+l,h=p(()=>{const j=lt(d?o:c).node();j&&"remove"in j&&j.remove()},"removeTempElements");let u=lt("body");const d=n.securityLevel===eL,f=n.securityLevel===rL,g=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){const W=Js(lt(r),s);u=lt(W.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=lt(r);Nc(u,e,l,`font-family: ${g}`,nL)}else{if(xL(document,e,l,s),d){const W=Js(lt("body"),s);u=lt(W.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=lt("body");Nc(u,e,l)}let m,y;try{m=await Qs.fromText(t,{title:i.title})}catch(W){if(n.suppressErrorRendering)throw h(),W;m=await Qs.fromText("error"),y=W}const x=u.select(c).node(),b=m.type,w=x.firstChild,C=w.firstChild,v=m.renderer.getClasses?.(t,m),L=gL(n,b,v,a),T=document.createElement("style");T.innerHTML=L,w.insertBefore(T,C);try{await m.renderer.draw(t,e,Ka.version,m)}catch(W){throw n.suppressErrorRendering?h():s$.draw(t,e,Ka.version),W}const O=u.select(`${c} svg`),z=m.db.getAccTitle?.(),q=m.db.getAccDescription?.();Gm(b,O,z,q),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",aL);let D=u.select(c).node().innerHTML;if(I.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),D=mL(D,d,wt(n.arrowMarkerAbsolute)),d){const W=u.select(c+" svg").node();D=yL(D,W)}else f||(D=Ge.sanitize(D,{ADD_TAGS:dL,ADD_ATTR:fL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(X$(),y)throw y;return h(),{diagramType:b,svg:D,bindFunctions:m.db.bindFunctions}},"render");function Ym(e={}){const t=bt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),nx(t),t?.theme&&t.theme in ye?t.themeVariables=ye[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ye.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?ix(t):ch();io(r.logLevel),Ta()}p(Ym,"initialize");var Um=p((e,t={})=>{const{code:r}=cl(e);return Qs.fromText(r,t)},"getDiagramFromText");function Gm(e,t,r,i){zm(t,e),qm(t,r,i,t.attr("id"))}p(Gm,"addA11yInfo");var er=Object.freeze({render:bL,parse:Hm,getDiagramFromText:Um,initialize:Ym,getConfig:$t,setConfig:hh,getSiteConfig:ch,updateSiteConfig:ax,reset:p(()=>{mn()},"reset"),globalReset:p(()=>{mn(Tr)},"globalReset"),defaultConfig:Tr});io($t().logLevel);mn($t());var wL=p((e,t,r)=>{I.warn(e),Ho(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"),Xm=p(async function(e={querySelector:".mermaid"}){try{await vL(e)}catch(t){if(Ho(t)&&I.error(t.str),we.parseError&&we.parseError(t),!e.suppressErrors)throw I.error("Use the suppressErrors option to suppress these errors"),t}},"run"),vL=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=er.getConfig();I.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");I.debug(`Found ${n.length} diagrams`),i?.startOnLoad!==void 0&&(I.debug("Start On Load: "+i?.startOnLoad),er.updateSiteConfig({startOnLoad:i?.startOnLoad}));const a=new Gt.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let s;const o=[];for(const l of Array.from(n)){if(I.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;s=l.innerHTML,s=op(Gt.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Gt.detectInit(s);h&&I.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:d}=await Qm(c,s,l);l.innerHTML=u,e&&await e(c),d&&d(l)}catch(u){wL(u,o,we.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),Vm=p(function(e){er.initialize(e)},"initialize"),kL=p(async function(e,t,r){I.warn("mermaid.init is deprecated. Please use run instead."),e&&Vm(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Xm(i)},"init"),CL=p(async(e,{lazyLoad:t=!0}={})=>{Ta(),Qa(...e),t===!1&&await U$()},"registerExternalDiagrams"),Zm=p(function(){if(we.startOnLoad){const{startOnLoad:e}=er.getConfig();e&&we.run().catch(t=>I.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Zm,!1);var _L=p(function(e){we.parseError=e},"setParseErrorHandler"),Gn=[],Va=!1,Km=p(async()=>{if(!Va){for(Va=!0;Gn.length>0;){const e=Gn.shift();if(e)try{await e()}catch(t){I.error("Error executing queue",t)}}Va=!1}},"executeQueue"),SL=p(async(e,t)=>new Promise((r,i)=>{const n=p(()=>new Promise((a,s)=>{er.parse(e,t).then(o=>{a(o),r(o)},o=>{I.error("Error parsing",o),we.parseError?.(o),s(o),i(o)})}),"performCall");Gn.push(n),Km().catch(i)}),"parse"),Qm=p((e,t,r)=>new Promise((i,n)=>{const a=p(()=>new Promise((s,o)=>{er.render(e,t,r).then(l=>{s(l),i(l)},l=>{I.error("Error parsing",l),we.parseError?.(l),o(l),n(l)})}),"performCall");Gn.push(a),Km().catch(n)}),"render"),TL=p(()=>Object.keys(Xe).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),we={startOnLoad:!0,mermaidAPI:er,parse:SL,render:Qm,init:kL,run:Xm,registerExternalDiagrams:CL,registerLayoutLoaders:nm,initialize:Vm,parseError:void 0,contentLoaded:Zm,setParseErrorHandler:_L,detectType:no,registerIconPacks:hp,getRegisteredDiagramsMetadata:TL},fn=we;let Jm=!1,to=null;if(typeof fn<"u"&&fn.initialize)try{fn.initialize({startOnLoad:!1}),Jm=!0}catch(e){to=e instanceof Error?e:new Error(String(e))}else to=new Error("Mermaid library or mermaid.initialize is not available.");const t0=({chartContent:e})=>{const t=J.useRef(`mermaid-chart-${Math.random().toString(36).substring(2,15)}`),r=J.useRef(null),i=J.useRef(null),[n,a]=J.useState(!0),[s,o]=J.useState(null),[l,c]=J.useState(null),[h,u]=J.useState(null),[d,f]=J.useState(!1);return J.useEffect(()=>{if(u(null),a(!0),o(null),f(!1),!Jm){o(to?.message||"Mermaid failed to initialize globally."),a(!1);return}if(!e||e.trim()===""){a(!1),r.current&&(r.current.innerHTML=""),c(null);return}(async()=>{try{const m=e.trim();if(!m){a(!1),r.current&&(r.current.innerHTML=""),c(null);return}const y=`${t.current}-render`,x=await fn.render(y,m);x&&typeof x.svg=="string"&&x.svg.length>0?(c(x.svg),typeof x.bindFunctions=="function"?u(()=>x.bindFunctions):u(null)):(o("Failed to render Mermaid diagram: SVG content is empty or invalid."),c(null))}catch(m){console.error(`[MermaidDiagram ${t.current}] Error rendering Mermaid diagram:`,m),o(m instanceof Error?m.message:"An unknown error occurred while rendering the diagram."),c(null)}finally{a(!1)}})().catch(m=>{console.error(`[MermaidDiagram ${t.current}] Unhandled error in renderMermaid:`,m),o(m instanceof Error?m.message:"An unexpected error occurred."),a(!1)})},[e]),J.useEffect(()=>{const g=r.current;if(!g)return;const m=()=>{i.current&&(i.current.destroy(),i.current=null),f(!1)};if(!l){g.innerHTML="",m();return}g.innerHTML=l;const y=g.querySelector("svg");if(y){const x=()=>{const b=y.getBBox();if(!b||b.width===0||b.height===0){setTimeout(x,100);return}i.current&&i.current.destroy();const w=Zc(y,{startScale:1,minScale:.5,maxScale:10,origin:"0 0",animate:!0});i.current=w,g.addEventListener("wheel",C=>{C.shiftKey&&(C.preventDefault(),w.zoomWithWheel(C))},{passive:!1}),f(!0)};x()}return h&&h(g),m},[l,h]),J.useEffect(()=>{d&&r.current&&(r.current.style.overflow="visible")},[d]),n?S.jsx("div",{className:"flex h-32 items-center justify-center bg-white dark:bg-gray-800 dark:text-white",children:"🌀 Loading diagram..."}):s?S.jsxs("div",{className:"rounded border border-red-400 bg-red-100 p-4 text-red-600 dark:border-red-700 dark:bg-red-900/50 dark:text-red-300",children:["Error: ",s]}):S.jsxs("div",{className:"relative",children:[S.jsx("div",{ref:r,className:"mermaid mermaid-diagram-container bg-white dark:bg-gray-400",style:{overflow:"visible"}}),d&&S.jsxs("div",{className:"absolute top-2 right-2 z-10 flex gap-1",children:[S.jsx("button",{type:"button",onClick:()=>i.current?.zoomIn(),className:"flex h-8 w-8 items-center justify-center rounded border border-gray-200 bg-white p-1 text-gray-700 text-lg shadow hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700","aria-label":"Zoom In",children:S.jsx(Ay,{size:20})}),S.jsx("button",{type:"button",onClick:()=>i.current?.zoomOut(),className:"flex h-8 w-8 items-center justify-center rounded border border-gray-200 bg-white p-1 text-gray-700 text-lg shadow hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700","aria-label":"Zoom Out",children:S.jsx(Fy,{size:20})}),S.jsx("button",{type:"button",onClick:()=>i.current?.reset(),className:"flex h-8 items-center justify-center rounded border border-gray-200 bg-white px-2 py-1 text-gray-700 text-sm shadow hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700","aria-label":"Reset View",children:S.jsx(Ly,{size:18})})]})]})};t0.displayName="MermaidDiagramInternal";const e0=J.memo(t0);function BL(e){const t={};for(const r in e){const i=e[r];switch(r){case"class":t.className=i;break;case"style":{const n={};for(const a of i.split(";")){const[s,o]=a.split(":");if(s&&o){const l=s.trim().replace(/-(\w)/g,(c,h)=>h.toUpperCase());l.startsWith("-")?n[l.substring(1)]=o.trim():n[l]=o.trim()}}t.style=n;break}case"tabindex":t.tabIndex=Number(i);break;default:t[r]=i}}return t}const $L=({code:e})=>{const[t,r]=J.useState(!1),i=()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)},n=>{console.error("Failed to copy: ",n)})};return S.jsx("button",{type:"button",className:"absolute top-2 right-2 z-10 rounded-md bg-gray-200 px-2 py-1 text-gray-800 text-sm transition-colors hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-100 dark:hover:bg-gray-600",onClick:i,children:t?"COPIED!":"Copy"})},LL=({htmlPromise:e,filename:t,code:r})=>{const i=J.use(e),n={replace:a=>{if(a instanceof La.Element&&a.name==="pre"){const s=BL(a.attribs);if(typeof s.style=="object"){const{backgroundColor:o,...l}=s.style;s.style={...l,margin:"1rem 0",padding:"0.8rem 0"}}else s.style={margin:"1rem 0",padding:"0.8rem 0"};return s.className=`${s.className||""} bg-gray-900 dark:bg-gray-900`,S.jsxs("div",{className:"relative",children:[t&&S.jsx("div",{className:"code-filename -top-4 absolute left-0 z-0 rounded-md bg-gray-200 px-2 py-0.5 text-gray-800 text-sm dark:bg-gray-700 dark:text-gray-100",children:t}),S.jsx($L,{code:r}),S.jsx("pre",{...s,children:La.domToReact(a.children,n)})]})}},htmlparser2:{lowerCaseTags:!0}};return S.jsx(S.Fragment,{children:La(i,n)})},ML=/^(diff)?:?(\w+):?([\w.-]*)?/,AL=()=>({code(e){for(const t of e.children){if(t.type!=="element")continue;const r=t.children[0];if(r?.type!=="element")continue;const i=r.children[0];if(i?.type!=="text")continue;const n=i.value;let a,s="",o="";if(n.startsWith("+")?(a="+",s="background-color: rgba(16, 185, 129, 0.2);",o="bg-green-200 dark:bg-green-400/90 text-green-700"):n.startsWith("-")&&(a="-",s="background-color: rgba(239, 68, 68, 0.2);",o="bg-red-200 dark:bg-red-400/90 text-red-700"),a){t.properties.style=s,i.value=n.substring(1).trimStart();const l={type:"element",tagName:"span",properties:{className:`inline-flex items-center justify-center w-4 h-4 rounded-full select-none font-bold text-[0.5rem] mr-2 ${o}`},children:[{type:"text",value:a==="+"?"➕":"➖"}]};t.children.unshift(l)}}}}),EL=e=>{const t=ML.exec(e??"");return{isDiff:t?.[1]==="diff",lang:t?.[2]||"text",filename:t?.[3]||void 0}},r0=({node:e})=>{const{isDiff:t,lang:r,filename:i}=EL(e.lang??void 0),n=J.useMemo(async()=>{const a=[];return t&&a.push(AL()),await K0.codeToHtml(e.value,{lang:r,themes:{light:"dark-plus",dark:"light-plus"},transformers:a})},[e.value,r,t]);return r==="mermaid"?S.jsx(e0,{chartContent:e.value}):S.jsx(J.Suspense,{fallback:S.jsx("div",{className:"dark:text-white",children:"🌀 Loading code..."}),children:S.jsx(LL,{htmlPromise:n,filename:i,code:e.value})})},i0=({node:e})=>S.jsx("del",{children:S.jsx(Lt,{nodes:e.children})}),n0=({node:e})=>S.jsx("em",{children:S.jsx(Lt,{nodes:e.children})}),FL=e=>{switch(e){case 1:return"border-b-2 border-gray-300 pb-2 text-3xl font-bold dark:border-gray-600 dark:text-gray-100";case 2:return"border-b border-gray-300 pb-2 text-2xl font-semibold dark:border-gray-600 dark:text-gray-200";case 3:return"text-xl font-semibold dark:text-gray-300";default:return"text-lg font-medium dark:text-gray-400"}},a0=e=>{let t="";for(const r of e)"value"in r&&typeof r.value=="string"?t+=r.value:"children"in r&&Array.isArray(r.children)&&(t+=a0(r.children));return t},s0=({node:e})=>{const t=new Q0,r=`h${e.depth}`,i=e.data?.hProperties?.id,n=t.slug(a0(e.children));return S.jsx(r,{id:i||n,className:FL(e.depth),children:S.jsx(Lt,{nodes:e.children})})},PL=({iframeHtml:e,iFrameAllowedDomains:t=[]})=>{const[r,i]=J.useState(!0),[n,a]=J.useState(!1),s=J.useRef(null),o=J.useRef(null),c=J.useCallback(g=>g.match(/src\s*=\s*["']([^"']*)["']/i)?.[1]||"",[])(e),h=J.useCallback(g=>{try{const m=new URL(g);return t.includes(m.hostname)}catch{return!1}},[t]),u=J.useCallback(g=>{if(!h(g.origin))return;const{type:m}=g.data;m==="dify-chatbot-iframe-ready"&&(console.log("Dify chatbot iframe is ready"),i(y=>y&&(a(!1),s.current&&(clearTimeout(s.current),s.current=null),o.current&&(clearTimeout(o.current),o.current=null),!1)))},[h]),d=J.useCallback(()=>{const g=document.querySelector(`iframe[src="${c}"]`);if(g)try{if(!g.contentDocument)throw new Error("Cannot access iframe content");i(y=>y&&(a(!1),!1))}catch{console.log("Crossorigin error detected, showing auth prompt"),a(y=>y||(i(!1),!0))}},[c]),f=J.useCallback(g=>{const m=window.open(g,"dify-oauth","width=500,height=600,scrollbars=yes,resizable=yes");if(!m){console.error("ポップアップがブロックされました");return}const y=setInterval(()=>{if(m.closed){clearInterval(y),console.log("ポップアップが閉じられました");try{console.log("ポップアップURL:",m.location.href)}catch(b){console.log("クロスオリジンのためURLにアクセスできません:",b)}const x=document.querySelector(`iframe[src="${g}"]`);if(x?.src){const b=x.src;i(w=>w||!0),a(w=>w&&!1),x.src="",setTimeout(()=>{x.src=b,s.current=setTimeout(()=>{console.log("認証後タイムアウト: dify-chatbot-iframe-ready not received after auth"),d()},5e3)},100)}}},1e3);console.log("ポップアップを開きました:"),console.log("- 初期URL:",g),console.log("- ウィンドウ名:","dify-oauth"),console.log("- ウィンドウサイズ: 500x600")},[d]);return J.useEffect(()=>(window.addEventListener("message",u),()=>{window.removeEventListener("message",u)}),[u]),J.useEffect(()=>{const g=setTimeout(()=>{console.log("Timeout: dify-chatbot-iframe-ready not received, checking iframe access"),d()},5e3);return o.current=g,()=>{o.current&&(clearTimeout(o.current),o.current=null)}},[d]),J.useEffect(()=>()=>{s.current&&(clearTimeout(s.current),s.current=null)},[]),h(c)?S.jsxs("div",{className:"dify-iframe-container",children:[r&&!n&&S.jsxs("div",{className:"flex items-center justify-center rounded-lg bg-gray-50 p-8",children:[S.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-blue-600 border-b-2"}),S.jsx("span",{className:"ml-3 text-gray-600",children:"Dify チャットボットを読み込み中..."})]}),n&&S.jsxs("div",{className:"mb-4 rounded-lg border border-blue-200 bg-blue-50 p-6",children:[S.jsx("div",{className:"flex items-center",children:S.jsxs("div",{className:"text-blue-800",children:[S.jsx("h3",{className:"font-medium",children:"認証が必要です"}),S.jsx("p",{className:"mt-1 text-sm",children:"Dify チャットボットにアクセスするには OAuth 認証が必要です。 ポップアップウィンドウで認証を完了してください。"})]})}),S.jsx("div",{className:"mt-4",children:S.jsx("button",{type:"button",onClick:()=>f(c),className:"rounded-md border border-gray-700 bg-gray-900 px-4 py-2 font-medium text-sm text-white shadow-lg transition-colors hover:bg-gray-800",children:"OAuth 認証を開始"})})]}),S.jsx("div",{className:`${r||n?"hidden":"block"}`,dangerouslySetInnerHTML:{__html:e}})]}):(console.warn("DifyIFramePlugin: Invalid domain for iframe:",c),null)},RL={dify:PL},DL=e=>RL[e]||null,OL=/^[a-z][a-z0-9+.-]*:/,o0=({node:e,iFrameAllowedDomains:t=[]})=>{const[r,i]=J.useState(""),[n,a]=J.useState(!1),[s,o]=J.useState(null);if(J.useEffect(()=>{if(a(!0),typeof window<"u"){const l=Ge(window);let c=null;l.addHook("afterSanitizeAttributes",u=>{const d=u.tagName.toLowerCase();if(d==="iframe"){const f=u.getAttribute("src"),g=u.getAttribute("data-plugin-type");if(f)try{const m=new URL(f);t.includes(m.hostname)?g&&(c={type:g,iframeHtml:u.outerHTML}):u.removeAttribute("src")}catch{u.removeAttribute("src")}}if(d==="a"){u.classList.add("inline-block","w-fit","text-link","underline","visited:text-link-visited");const f=u.getAttribute("href");f&&OL.test(f)&&(u.setAttribute("target","_blank"),u.setAttribute("rel","noreferrer"))}});const h=l.sanitize(e.value,{ADD_TAGS:["iframe"],ADD_ATTR:["src","frameborder","allow","allowfullscreen","target","rel","data-plugin-type","width","height","title","class"]});c?o(c):i(h)}},[e.value,t]),!n)return null;if(s){const{type:l,iframeHtml:c}=s,h=DL(l);if(h)return S.jsx(h,{iframeHtml:c,iFrameAllowedDomains:t});console.warn(`Unknown or unregistered plugin type: ${l}`)}return S.jsx(S.Fragment,{children:r===""?null:S.jsx("div",{dangerouslySetInnerHTML:{__html:r}})})},l0=({node:e})=>{if(!e.url)return null;const t=e.title??"",r=e.data?.hProperties?.width,i=e.data?.hProperties?.height;return S.jsxs("span",{style:{width:r,height:i},className:"mt-4 mb-4 block w-fit max-w-full",children:[S.jsx("img",{src:e.url,alt:e.alt??"",className:"mx-auto h-full w-full",width:r,height:i}),t&&S.jsx("em",{className:"block text-center text-gray-400 text-xs",children:t})]})},c0=({node:e})=>S.jsx("code",{className:"rounded-md bg-gray-200 px-1.5 py-1 font-mono text-gray-800 text-sm dark:bg-gray-700 dark:text-gray-200",children:e.value}),h0=({node:e})=>{const t=J.useRef(null);return J.useLayoutEffect(()=>{try{t.current&&qc.render(e.value,t.current)}catch(r){console.error("An error occurred while rendering KaTeX:",r),t.current&&(t.current.innerText=`Math rendering error: ${r instanceof Error?r.message:String(r)}`)}},[e.value]),S.jsx("span",{ref:t,className:"rounded-md px-1.5 py-1 font-mono text-gray-800 text-sm dark:text-gray-200"})},NL=/^[a-z][a-z0-9+.-]*:/,u0=({node:e})=>{const t=NL.test(e.url);return S.jsx("a",{className:"inline-block w-fit text-link underline visited:text-link-visited",href:e.url,target:t?"_blank":void 0,rel:t?"noreferrer":void 0,children:S.jsx(Lt,{nodes:e.children})})},d0=({node:e})=>e.children.length===1&&e.children[0].type==="paragraph"?S.jsx("li",{children:S.jsx(Lt,{nodes:e.children[0].children})}):S.jsx("li",{children:S.jsx(Lt,{nodes:e.children})}),f0=({node:e})=>{const t=e.ordered?"ol":"ul";return S.jsx(t,{children:S.jsx(Lt,{nodes:e.children})})},IL=({code:e})=>{const[t,r]=J.useState(!1),i=()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)},n=>{console.error("Failed to copy: ",n)})};return S.jsx("button",{type:"button",className:"absolute right-2 z-10 rounded-md bg-gray-200 px-2 py-1 text-gray-800 text-xs transition-colors hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-100 dark:hover:bg-gray-600",onClick:i,children:t?"COPIED!":"Copy"})},p0=({node:e})=>{const t=J.useRef(null);return J.useLayoutEffect(()=>{try{t.current&&qc.render(e.value,t.current)}catch(r){console.error("An error occurred while rendering KaTeX:",r),t.current&&(t.current.innerText=`Math rendering error: ${r instanceof Error?r.message:String(r)}`)}},[e.value]),S.jsxs("div",{className:"relative",children:[S.jsx(IL,{code:e.value}),S.jsx("article",{ref:t,className:"rounded-md px-1.5 py-1 font-mono text-gray-800 text-sm dark:text-gray-200"})]})},g0=({node:e})=>S.jsx("p",{children:S.jsx(Lt,{nodes:e.children})}),m0=({node:e})=>S.jsx("strong",{children:S.jsx(Lt,{nodes:e.children})}),y0=({node:e})=>{const[t,...r]=e.children;return S.jsx("div",{className:"overflow-x-auto",children:S.jsxs("table",{className:"w-full border-collapse border-none",children:[S.jsx("thead",{className:"bg-gray-100 dark:bg-gray-800",children:S.jsx("tr",{children:t.children.map((i,n)=>S.jsx("th",{style:{textAlign:e.align?.[n]??void 0},className:"border border-gray-300 px-4 py-2 text-left font-semibold dark:border-gray-600 dark:text-gray-200",children:S.jsx(Lt,{nodes:i.children})},`mdast-table-node-${e.type}-${n}`))})}),S.jsx("tbody",{children:r.map((i,n)=>S.jsx("tr",{className:"border-gray-200 border-t bg-white dark:border-gray-700 dark:bg-gray-900",children:i.children.map((a,s)=>S.jsx("td",{style:{textAlign:e.align?.[s]??void 0},className:"border border-gray-300 px-4 py-2 dark:border-gray-600 dark:text-gray-300",children:S.jsx(Lt,{nodes:a.children})},`mdast-table-node-${e.type}-${s}`))},`mdast-table-node-${e.type}-${n}`))})]})})},x0=({node:e})=>S.jsx(S.Fragment,{children:e.value}),b0=()=>S.jsx("hr",{className:"border-gray-300 dark:border-gray-600"});let Qi=null;const zL=()=>typeof window>"u"||typeof document>"u"?Promise.resolve(null):Qi||(Qi=new Promise((e,t)=>{if(window.twttr?.widgets)return e(window.twttr.widgets);const r="twitter-wjs",i=()=>{window.twttr?.widgets?e(window.twttr.widgets):t(new Error("Twitter widget script loaded, but `window.twttr.widgets` not found."))},n=document.getElementById(r);if(n){n.addEventListener("load",i),n.addEventListener("error",()=>t(new Error("Failed to load Twitter script.")));return}const a=document.createElement("script");a.id=r,a.src="https://platform.twitter.com/widgets.js",a.async=!0,a.charset="utf-8",a.onload=i,a.onerror=()=>t(new Error("Failed to load Twitter script.")),document.body.appendChild(a)}),Qi),qL=({promise:e})=>(J.use(e),null),jL=({setPromise:e,createPromise:t})=>{const r=J.useRef(null);return J.useEffect(()=>{const i=r.current;if(!i){console.warn("Mount point for Twitter widget not found.");return}const n=t(i).then(a=>{if(!a){console.warn("createPromise から要素が返されませんでした。");return}return a}).catch(a=>{console.error("ツイートウィジェットの作成中にエラーが発生しました:",a),i.innerText=`ツイートの読み込みエラー: ${a.message}`});return e(n),()=>{i.innerHTML=""}},[t,e]),S.jsx("div",{ref:r,className:"twitter-embed min-h-24"})},WL=({node:e,loadWidgetsPromise:t,theme:r})=>{const i=J.use(t),n=J.useRef(null),a=J.useRef(null),[s,o]=J.useState(null),[l,c]=J.useState(null),h=J.useCallback(d=>{let f;return d&&i?new Promise((g,m)=>{n.current=g,a.current=m;const y=new MutationObserver(()=>{d?.querySelector(".twitter-tweet > iframe:last-of-type")?.addEventListener("load",()=>{f&&clearTimeout(f),y?.disconnect(),n.current=null,a.current=null,g(d)},{once:!0,passive:!0,capture:!0})});f=setTimeout(()=>{y.disconnect(),n.current=null,a.current=null,m(new Error("ツイートの作成が 10 秒後にタイムアウトしました。"))},1e4),y.observe(d,{childList:!0,subtree:!0,attributes:!1,characterData:!1}),i?.createTweet(e.tweetId,d,{cards:e.cards,conversation:e.conversation,theme:e.theme||r,width:e.width,align:e.align,lang:e.lang||"ja",dnt:e.dnt}).catch(x=>{f&&clearTimeout(f),y.disconnect(),n.current=null,a.current=null,m(x),console.error("ツイートウィジェットの作成中にエラーが発生しました:",x)})}):new Promise((g,m)=>{console.warn("TweetEmbed: No targetNode or twitterWidgetsJS available."),m(new Error("No targetNode or twitterWidgetsJS available."))})},[i,e.tweetId,e.cards,e.conversation,e.theme,e.width,e.align,e.lang,e.dnt,r]),u=J.useMemo(()=>S.jsx(jL,{setPromise:c,createPromise:h}),[h]);return J.useEffect(()=>(o(u),()=>{n.current&&(n.current(void 0),n.current=null,a.current=null)}),[u]),i?S.jsxs(J.Suspense,{fallback:S.jsx("div",{className:"min-h-24",children:"🌀 Loading Tweet..."}),children:[s,l&&S.jsx(qL,{promise:l})]}):S.jsx("div",{className:"min-h-24",children:"🌀 Loading Twitter renderer..."})},w0=({node:e,theme:t})=>{const r=J.useMemo(()=>zL(),[]);return S.jsx(J.Suspense,{fallback:S.jsx("div",{className:"min-h-24",children:"🌀 Loading Twitter widget..."}),children:S.jsx(WL,{node:e,loadWidgetsPromise:r,theme:t})})},v0=({node:e})=>{const{videoId:t,params:r}=e,i={...r,rel:"0"},n=new URLSearchParams(i).toString();return S.jsx("iframe",{className:"aspect-video w-full max-w-[560px] rounded-lg",src:`https://www.youtube.com/embed/${t}${n?`?${n}`:""}`,title:"YouTube video player",allow:"accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerPolicy:"strict-origin-when-cross-origin",allowFullScreen:!0})},k0=({node:e})=>{const t=e.data?.title||"";return S.jsxs("details",{className:"markdown-details",children:[S.jsx("summary",{children:t}),S.jsx("div",{className:"markdown-details-content",children:S.jsx(Lt,{nodes:e.children})})]})},C0=({node:e})=>{const r=["message",e.data?.messageType||"message"].filter(Boolean).join(" ");return S.jsxs("aside",{className:r,children:[S.jsx("span",{className:"message-symbol",style:{userSelect:"none"},children:"!"}),S.jsx("div",{className:"message-content",children:S.jsx(Lt,{nodes:e.children})})]})},Lt=({nodes:e,theme:t="light",iFrameAllowedDomains:r=[]})=>e.map((i,n)=>{switch(i.type){case"block-link":return S.jsx(Uc,{node:i},`mdast-node-${i.type}-${n}`);case"blockquote":return S.jsx(Gc,{node:i},`mdast-node-${i.type}-${n}`);case"break":return S.jsx("br",{},`mdast-node-${i.type}-${n}`);case"code":return S.jsx(r0,{node:i},`mdast-node-${i.type}-${n}`);case"delete":return S.jsx(i0,{node:i},`mdast-node-${i.type}-${n}`);case"details":return S.jsx(k0,{node:i},`mdast-node-${i.type}-${n}`);case"emphasis":return S.jsx(n0,{node:i},`mdast-node-${i.type}-${n}`);case"footnoteReference":return S.jsx(_0,{node:i},`mdast-node-${i.type}-${n}`);case"footnoteDefinition":return null;case"footnote-back-link":return S.jsx(T0,{node:i},`mdast-node-${i.type}-${n}`);case"heading":return S.jsx(s0,{node:i},`mdast-node-${i.type}-${n}`);case"html":return S.jsx(o0,{node:i,iFrameAllowedDomains:r},`mdast-node-${i.type}-${n}`);case"image":return S.jsx(l0,{node:i},`mdast-node-${i.type}-${n}`);case"inlineCode":return S.jsx(c0,{node:i},`mdast-node-${i.type}-${n}`);case"inlineMath":return S.jsx(h0,{node:i},`mdast-node-${i.type}-${n}`);case"link":return S.jsx(u0,{node:i},`mdast-node-${i.type}-${n}`);case"listItem":return S.jsx(d0,{node:i},`mdast-node-${i.type}-${n}`);case"list":return S.jsx(f0,{node:i},`mdast-node-${i.type}-${n}`);case"math":return S.jsx(p0,{node:i},`mdast-node-${i.type}-${n}`);case"message":return S.jsx(C0,{node:i},`mdast-node-${i.type}-${n}`);case"paragraph":return S.jsx(g0,{node:i},`mdast-node-${i.type}-${n}`);case"strong":return S.jsx(m0,{node:i},`mdast-node-${i.type}-${n}`);case"table":return S.jsx(y0,{node:i},`mdast-node-${i.type}-${n}`);case"text":return S.jsx(x0,{node:i},`mdast-node-${i.type}-${n}`);case"thematicBreak":return S.jsx(b0,{},`mdast-node-${i.type}-${n}`);case"yaml":return null;case"twitter-embed":return S.jsx(w0,{node:i,theme:t},`mdast-node-${i.type}-${i.tweetId}-${n}`);case"youtube-embed":return S.jsx(v0,{node:i},`mdast-node-${i.type}-${n}`);default:{if(process.env.NODE_ENV==="development")return S.jsxs("div",{children:[S.jsxs("p",{style:{color:"red"},children:["Unknown node type: ",i.type]}),S.jsx("pre",{children:JSON.stringify(i,null,2)})]},`mdast-node-${i.type}-${n}`);throw new Error(`Unknown node type: ${i.type}`)}}}),_0=({node:e})=>S.jsx("sup",{children:S.jsxs("a",{id:`fnref-${e.identifier}`,className:"text-[#316dce] underline visited:text-[#6b46c1] dark:text-[#3182ce] dark:visited:text-[#805ad5]",href:`#fn-${e.identifier}`,children:["[",e.identifier,"]"]})}),S0=({nodes:e,theme:t="light"})=>e.length===0?null:S.jsx("section",{className:"border-[#171717] border-t pt-4 dark:border-[#464646]",children:S.jsx("ol",{className:"pl-6 text-[#686868] text-sm dark:text-[#a4a5a9]",children:e.map((r,i)=>S.jsx("li",{id:`fn-${r.identifier}`,className:i===0?"":"mt-4",children:S.jsx(Lt,{nodes:r.children,theme:t})},`mdast-node-fn-${r.identifier}-${i}`))})}),T0=({node:e})=>S.jsx("a",{href:e.url,className:"text-[#316dce] underline visited:text-[#6b46c1] dark:text-[#3182ce] dark:visited:text-[#805ad5]",children:"↩"}),B0=e=>{const t=[];for(const r of e)r.type==="footnoteDefinition"?t.push(r):"children"in r&&t.push(...B0(r.children));return t},HL=({rootNode:e,theme:t="light",iFrameAllowedDomains:r=[]})=>{const i=B0(e.children);return S.jsxs(S.Fragment,{children:[S.jsx(Lt,{nodes:e.children,theme:t,iFrameAllowedDomains:r}),S.jsx(S0,{nodes:i,theme:t})]})};function YL({text:e,url:t,hashtags:r,via:i,related:n,in_reply_to:a}){const s=new URL("https://twitter.com/intent/tweet");return e!==void 0&&s.searchParams.set("text",e),t!==void 0&&s.searchParams.set("url",t),r!==void 0&&s.searchParams.set("hashtags",r.join(",")),i!==void 0&&s.searchParams.set("via",i),n!==void 0&&s.searchParams.set("related",n.join(",")),a!==void 0&&s.searchParams.set("in_reply_to",a),s.toString()}const $0=e=>{try{const t=new URL(e),r=Object.fromEntries(t.searchParams.entries());let i=null;if(t.hostname==="youtu.be"?i=t.pathname.substring(1):t.hostname.endsWith("youtube.com")&&(t.pathname==="/watch"?i=t.searchParams.get("v"):t.pathname.startsWith("/embed/")&&(i=t.pathname.split("/")[2])),i){const{v:n,...a}=r;return{videoId:i,params:a}}return null}catch{return null}},L0=async e=>{try{const t=new AbortController,r=setTimeout(()=>t.abort(),1e4),i=await fetch(e,{signal:t.signal});if(clearTimeout(r),!i.ok)return null;const n=await i.text(),a={url:e},s=J0.load(n),o=s("title").text().trim();a.title=o;const l=s("meta");for(const c of l){const h=c.attribs.property;h==="og:site_name"&&(a.site_name=c.attribs.content||void 0),h==="og:title"&&(a.title=c.attribs.content||o),h==="og:description"&&(a.description=c.attribs.content||void 0),h==="og:image"&&(a.image=c.attribs.content||void 0),h==="og:type"&&(a.type=c.attribs.content||void 0),c.attribs.name==="description"&&(a.description=c.attribs.content||void 0)}return a}catch(t){return console.error("Error fetching site metadata:",t),null}},M0=()=>e=>{St.visit(e,"paragraph",(t,r,i)=>{const n=t.children[0];t.children.length!==1||n.type!=="link"||n.children.length!==1||!(n.children[0].type==="text"&&n.url===n.children[0].value)||!i||r===void 0||(i.children[r]={type:"block-link",url:n.url})})},Qr=new Map,UL=(e,t)=>t.fetchAll?!0:t.urlPatterns&&t.urlPatterns.length>0?t.urlPatterns.some(r=>r.test(e)):/^https?:\/\//.test(e)&&!e.includes("localhost")&&!e.includes("127.0.0.1"),A0=(e={})=>{const{enableCache:t=!0}=e;return async r=>{const i=[];St.visit(r,"block-link",a=>{UL(a.url,e)&&i.push(a)});const n=i.map(async a=>{const s=a.url;if(t&&Qr.has(s)){const o=Qr.get(s);o&&(a.data=a.data||{},a.data.siteMetadata=o);return}try{const o=await L0(s);o?(a.data=a.data||{},a.data.siteMetadata=o,t&&Qr.set(s,o)):t&&Qr.set(s,null)}catch(o){console.warn(`Failed to fetch metadata for ${s}:`,o),t&&Qr.set(s,null)}});await Promise.all(n)}},GL=/\s*\{#(.+?)\}\s*$/,E0=()=>e=>{St.visit(e,"heading",t=>{if(t.children.length===0)return;const r=t.children[t.children.length-1];if(r?.type!=="text")return;const i=r,n=i.value.match(GL);if(n){const a=n[1];t.data||(t.data={});const s=t.data,o=s.hProperties||{};o.id=a,s.hProperties=o,i.value=i.value.substring(0,n.index).trimEnd(),i.value===""&&t.children.pop()}})},F0=()=>e=>{St.visit(e,"footnoteDefinition",t=>{St.visit(t,"paragraph",r=>{r.children.push({type:"footnote-back-link",url:`#fnref-${t.identifier}`})})})},P0=()=>e=>{St.visit(e,"html",(t,r,i)=>{if(typeof r!="number"||!i)return;const a=t.value.trim().match(/^<a\s+href="([^"]+)"[^>]*>(.*?)<\/a>$/i);if(a){const[,s,o]=a,l={type:"link",url:s,children:[{type:"text",value:o}]};i.children.splice(r,1,l)}})},R0=()=>e=>{const t=r=>{const i=r.children;if(!i)return;let n=0;for(;n<i.length;){const a=i[n];if(a.type==="html"&&a.value.startsWith("<")&&!a.value.startsWith("</")&&a.value.match(/<([a-zA-Z0-9]+)/)){let o="",l=0;const c=[];let h=!1;for(let u=n;u<i.length;u++){const d=i[u];if(d.type==="html"){o+=d.value;const f=d.value.match(/<\/?([a-zA-Z0-9]+)/g)||[];for(const g of f){const m=g.match(/<\/?([a-zA-Z0-9]+)/);if(!m)continue;const y=m[1];g.startsWith("</")?c.length>0&&c[c.length-1]===y&&c.pop():g.startsWith("<")&&c.push(y)}}else if(d.type==="text")o+=d.value;else{c.length===0&&(h=!0);break}if(l++,c.length===0){h=!0;break}}h&&i.splice(n,l,{type:"html",value:o})}n++}};St.visit(e,"paragraph",t),St.visit(e,"tableCell",t),St.visit(e,"heading",t),St.visit(e,"emphasis",t),St.visit(e,"strong",t),St.visit(e,"delete",t)},Ic=/\s*=\s*(\d+)(w|h|x|y)\s*/g,D0=()=>e=>{St.visit(e,"image",t=>{const r=l=>{if(!l)return{updatedText:l,matches:[]};const c=[...l.matchAll(Ic)];return{updatedText:l.replaceAll(Ic,"").trim(),matches:c}},{updatedText:i,matches:n}=r(t.alt);t.alt=i;const{updatedText:a,matches:s}=r(t.title);t.title=a||null;const o=[...n,...s];if(o.length>0){t.data||(t.data={}),t.data.hProperties||(t.data.hProperties={});for(const l of o){const c=Number.parseInt(l[1],10),h=l[2];h==="w"||h==="x"?t.data.hProperties.width=c:(h==="h"||h==="y")&&(t.data.hProperties.height=c)}}})},XL=/<!--\s+@import\s+"(.+?)"\s+-->/;function O0(e){return async t=>{const{markdownFilePath:r}=e,i=ur.dirname(r),n=[];if(St.visit(t,"html",(s,o,l)=>{if(!l||typeof o!="number")return;const c=s.value.match(XL);if(!c)return;const h=c[1],u=ur.resolve(i,h);n.push({parent:l,index:o,absolutePath:u})}),n.length===0)return;const a=await Promise.all(n.map(async({absolutePath:s})=>{try{const o=await jc.readFile(s,"utf-8");return this.parse(o)}catch(o){return o&&o.code==="ENOENT"?console.warn(`[remark-import-directive] Import file not found: ${s}`):console.error(`[remark-import-directive] Error processing import: ${s}`,o),null}}));for(let s=n.length-1;s>=0;s--){const{parent:o,index:l}=n[s],c=a[s];c?.children&&Array.isArray(c.children)&&o.children.splice(l,1,...c.children)}}}const N0=()=>e=>{St.visit(e,(t,r,i)=>{i&&Object.defineProperty(t,"parent",{value:i,writable:!0,configurable:!0,enumerable:!1})})},VL=/^[a-z][a-z0-9+.-]*:/,I0=async(e,t,r,i,n=!1)=>{if(!e)return"";if(VL.test(e)){const c=e.substring(0,e.indexOf(":")).toLowerCase();if(["http","https","mailto","tel","file"].includes(c))return e}if(e.startsWith("#")||e.startsWith("/"))return e;const a=ur.dirname(r),s=ur.normalize(ur.join(a,e)),o=ur.resolve(i,s);if(!o.startsWith(i)||s.startsWith(".."))return console.error(`Security Alert: Attempt to access file outside project root: ${o}`),"";if(n)try{await jc.access(o)}catch{return console.warn(`File not found: ${o}`),""}const l=s.replace(/\\/g,"/");return t?ty("/assets/",l):`?filePath=${encodeURIComponent(l)}`};function z0(e){return async t=>{if(!(e?.markdownFilePath&&e?.workspaceRoot)){console.warn("remark-resolve-uri-async: markdownFilePath and workspaceRoot are required. Skipping URI resolution.");return}const r=[];St.visit(t,n=>{(n.type==="image"||n.type==="link")&&n.url&&r.push({node:n,isImage:n.type==="image"})});const i=r.map(async({node:n,isImage:a})=>{const s=await I0(n.url,a,e.markdownFilePath,e.workspaceRoot,e.validateExistence);n.url=s});await Promise.all(i)}}const ZL=/https?:\/\/(?:www\.|mobile\.)?(?:twitter|x)\.com\/[^/]+\/status\/(\d+)/,q0=()=>e=>{St.visit(e,"paragraph",(t,r,i)=>{const n=t.children[0];if(t.children.length!==1||n.type!=="link"||!n.children.every(l=>l.type==="text")||!i||r===void 0)return;const s=n.url.match(ZL);if(!s)return;const o=s[1];o&&(i.children[r]={type:"twitter-embed",tweetId:o})})},j0=()=>e=>{St.visit(e,"paragraph",(t,r,i)=>{const n=t.children[0];if(t.children.length!==1||n.type!=="link"||!n.children.every(o=>o.type==="text")||!i||r===void 0)return;const s=$0(n.url);s&&(i.children[r]={type:"youtube-embed",videoId:s.videoId,params:s.params})})},zc=/^:::(message|details)\s*(.*)/,W0=()=>e=>{function t(r){const i=[];let n=0;for(;n<r.length;){const a=r[n];if(a.type==="paragraph"&&a.children[0]?.type==="text"&&a.children[0].value.trim().startsWith(":::")){const l=a.children[0].value.trim().match(zc);if(l){const c=n;let h=-1,u=1;const d=a.children.at(-1);if(a.children.length>1&&d?.type==="text"&&d.value.trim()===":::")h=c;else for(let f=c+1;f<r.length;f++){const g=r[f];if(g.type==="paragraph"&&g.children[0]?.type==="text"){const m=g.children[0].value.trim();zc.test(m)?u++:m===":::"&&u--}if(u===0){h=f;break}}if(h!==-1){const f=l[1],g=l[2];let m;if(h===c){const b=a.children.slice(1,-1);b[0]?.type==="break"&&b.shift(),b.at(-1)?.type==="break"&&b.pop(),m=b.length>0?[{type:"paragraph",children:b}]:[]}else{const b=a.children.slice(1);b[0]?.type==="break"&&b.shift();const w={type:"paragraph",children:b},v=r[h].children.slice(0,-1);v.at(-1)?.type==="break"&&v.pop();const L={type:"paragraph",children:v},T=r.slice(c+1,h);m=[w,...T,L].filter(O=>!(O.type==="paragraph"&&O.children.length===0))}const y=t(m);let x;if(f==="message"?x={type:"message",data:{messageType:g.trim()},children:y}:f==="details"&&(x={type:"details",data:{title:g.trim()},children:y}),x){i.push(x),n=h+1;continue}}}}const s={...a};"children"in s&&Array.isArray(s.children)&&(s.type==="blockquote"||s.type==="footnoteDefinition"||s.type==="message"||s.type==="details"?s.children=t(s.children):s.type==="list"&&(s.children=s.children.map(o=>({...o,children:t(o.children)})))),i.push(s),n++}return i}e.children=t(e.children)},KL=async(e,t,r)=>{const i=ey.remark().use(R0).use(P0).use(N0).use(F0).use(iy).use(ry).use(D0).use(W0).use(ay).use(O0,{markdownFilePath:t}).use(q0).use(j0).use(M0).use(A0).use(E0).use(ny).use(z0,{markdownFilePath:t,workspaceRoot:r,validateExistence:!0}),n=i.parse(e);return await i.run(n)};exports.BlockLinkNode=Uc;exports.BlockquoteNode=Gc;exports.CodeNode=r0;exports.Color=te;exports.Color$1=Dr;exports.DeleteNode=i0;exports.EmphasisNode=n0;exports.FootnoteBackLinkNode=T0;exports.FootnoteReferenceNode=_0;exports.FootnotesSection=S0;exports.HTMLNode=o0;exports.HeadingNode=s0;exports.ImageNode=l0;exports.InlineCodeNode=c0;exports.InlineMathNode=h0;exports.JSON_SCHEMA=of;exports.LinkNode=u0;exports.ListItemNode=d0;exports.ListNode=f0;exports.MapCache=ke;exports.MarkdownRenderer=HL;exports.MathNode=p0;exports.MermaidDiagram=e0;exports.NodesRenderer=Lt;exports.ParagraphNode=g0;exports.Rgb=Ot;exports.RichLinkCard=Yc;exports.Set=Un;exports.Stack=sr;exports.StrongNode=m0;exports.Symbol=ki;exports.TableNode=y0;exports.TextNode=x0;exports.ThematicBreakNode=b0;exports.TwitterEmbedNode=w0;exports.Uint8Array=Es;exports.Utils=at;exports.YouTubeEmbedNode=v0;exports.ZERO_WIDTH_SPACE=Nf;exports.ZennDetailsNode=k0;exports.ZennMessageNode=C0;exports.__export=th;exports.__name=p;exports.abs=X2;exports.acos=rw;exports.array=tu;exports.arrayLikeKeys=Lf;exports.asin=iw;exports.assignValue=Bf;exports.assignWithDepth_default=bt;exports.atan2=V2;exports.baseAssignValue=fa;exports.baseFor=ff;exports.baseGetTag=ir;exports.baseKeys=um;exports.baseRest=Pf;exports.baseUnary=Sf;exports.calculateMathMLDimensions=wx;exports.calculateTextHeight=jo;exports.calculateTextWidth=le;exports.cleanAndMerge=ma;exports.clear=xh;exports.clear$1=YS;exports.clear$2=kS;exports.clear2=qS;exports.cloneArrayBuffer=mf;exports.cloneBuffer=gf;exports.cloneTypedArray=yf;exports.color=$r;exports.commonDb_exports=oo;exports.common_default=rr;exports.computeDimensionOfText=wp;exports.configureSvgSize=so;exports.constant=Ne;exports.constant$1=Ef;exports.constant$2=ea;exports.copyArray=xf;exports.copyObject=$f;exports.cos=Z2;exports.createAssigner=Df;exports.createIntentTweetLink=YL;exports.createText=Ce;exports.curveBasis=ui;exports.darken=et;exports.dayjs2=Qc;exports.decodeEntities=Fe;exports.defaultConfig2=Lx;exports.defaultConfig_default=ao;exports.define=ta;exports.distExports=hf;exports.epsilon=ps;exports.eq=Ei;exports.evaluate=wt;exports.extend=mo;exports.extractYouTubeVideoId=$0;exports.fetchSiteMetadata=L0;exports.generateId=Hf;exports.getAccDescription=kh;exports.getAccTitle=wh;exports.getConfig=$t;exports.getConfig2=ut;exports.getDefaultExportFromCjs=Wc;exports.getDiagramTitle=_h;exports.getEdgeId=XC;exports.getFaviconUrl=Hc;exports.getIconSVG=zr;exports.getLineFunctionsWithOffset=cf;exports.getPrototype=Fo;exports.getRegisteredLayoutAlgorithm=mT;exports.getStylesFromArray=qo;exports.getSubGraphTitleMargins=ca;exports.getThemeVariables3=sh;exports.getUrl=mh;exports.getUserDefinedConfig=cx;exports.halfPi=gs;exports.hasKatex=Ze;exports.hue=S1;exports.identity=Oo;exports.initCloneObject=wf;exports.insertCluster=Ep;exports.insertEdge=tm;exports.insertEdgeLabel=Kg;exports.insertNode=sl;exports.interpolateNumber=me;exports.interpolateRgb=ss;exports.interpolateString=jh;exports.isArguments=Si;exports.isArray=Ti;exports.isArrayLike=Pi;exports.isArrayLikeObject=kf;exports.isBuffer=pa;exports.isDark=Pr;exports.isEmpty=Ks;exports.isFunction=ha;exports.isIndex=Ro;exports.isIterateeCall=Rf;exports.isLabelStyle=Eo;exports.isLength=Po;exports.isObject=Ee;exports.isObjectLike=Ir;exports.isPrototype=Fi;exports.isTypedArray=ga;exports.isValidShape=Zg;exports.keysIn=Do;exports.lighten=X;exports.line=ru;exports.lineBreakRegex=Rr;exports.load=lf;exports.log=I;exports.markers_default=im;exports.max=K2;exports.memoize=Nr;exports.merge=Of;exports.min=Q2;exports.nodeUtil=Fs;exports.nogamma=yo;exports.overRest=Af;exports.package_default=Ka;exports.parseFontSize=Ri;exports.parseGenericTypes=ts;exports.parseMarkdown=KL;exports.pi=na;exports.positionEdgeLabel=Qg;exports.positionNode=jS;exports.random=Uf;exports.registerIconPacks=hp;exports.remarkBlockLink=M0;exports.remarkBlockLinkMetadata=A0;exports.remarkCustomHeadingId=E0;exports.remarkFootnoteBackLink=F0;exports.remarkHtmlAnchorToLink=P0;exports.remarkHtmlInHtml=R0;exports.remarkImageSize=D0;exports.remarkImportDirective=O0;exports.remarkParentNode=N0;exports.remarkResolveUriAsync=z0;exports.remarkTwitterEmbed=q0;exports.remarkYouTubeEmbed=j0;exports.remarkZennMessage=W0;exports.render=gT;exports.renderKatexSanitized=Qn;exports.replaceIconSubstring=el;exports.rgbConvert=Ih;exports.rgba=gr;exports.sanitizeText=Ht;exports.select=lt;exports.selectSvgElement=_u;exports.setAccDescription=vh;exports.setAccTitle=bh;exports.setConfig2=$x;exports.setDiagramTitle=Ch;exports.setNodeElem=zS;exports.setToString=Ff;exports.setupGraphViewbox=yh;exports.setupGraphViewbox2=Sh;exports.sin=J2;exports.sqrt=tw;exports.styles2String=V;exports.tau=ew;exports.transformUriAsync=I0;exports.unknownIcon=lp;exports.updateNodeBounds=Q;exports.utils_default=Gt;exports.withPath=Jh;exports.wrapLabel=Gf;
254
+ //# sourceMappingURL=index-BDajGLDt.cjs.map