uigraph 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (323) hide show
  1. package/README.md +30 -51
  2. package/dist/bin.mjs +1608 -59037
  3. package/dist/viewer/assets/abnfDiagram-VCTEODGH-D7zWJuPJ.js +1 -0
  4. package/dist/viewer/assets/actor-avatar-Bu-mKKXB.js +1 -0
  5. package/dist/viewer/assets/{api-adapters-CnQpLiWI.js → api-adapters-tfr51BsS.js} +1 -1
  6. package/dist/viewer/assets/{api-endpoints-DCA5GNpC.js → api-endpoints-D-Whnnwd.js} +9 -9
  7. package/dist/viewer/assets/{api-group-endpoints-page-Di42W69y.js → api-group-endpoints-page-B9R1EI4i.js} +9 -9
  8. package/dist/viewer/assets/{arc-Cn8owoDw.js → arc-DauzQXFu.js} +1 -1
  9. package/dist/viewer/assets/architectureDiagram-5GKGNRK7-CXzgHd-c.js +36 -0
  10. package/dist/viewer/assets/{arrow-left-DWcMgM2U.js → arrow-left-DpQqmf17.js} +1 -1
  11. package/dist/viewer/assets/avatar-DAFUyk1i.js +43 -0
  12. package/dist/viewer/assets/badge-hR3QvPWv.js +1 -0
  13. package/dist/viewer/assets/better-delete-confirmation-modal-CGEQ5O4X.js +1 -0
  14. package/dist/viewer/assets/better-dialog-DcIxFWwk.js +1 -0
  15. package/dist/viewer/assets/{blockDiagram-I7D4REHJ-CbYzOsL_.js → blockDiagram-I7D4REHJ-CFHWUw4z.js} +2 -2
  16. package/dist/viewer/assets/{brands-Bd4RklRx.js → brands-DtmA1AhP.js} +1 -1
  17. package/dist/viewer/assets/button-DZj74qS7.js +1 -0
  18. package/dist/viewer/assets/{c4Diagram-7LVT6UL2-CLkVbphC.js → c4Diagram-7LVT6UL2-BHSggPKI.js} +6 -6
  19. package/dist/viewer/assets/{calendar-C0xdI_ag.js → calendar-Bolgc8E5.js} +1 -1
  20. package/dist/viewer/assets/channel-CNRSofFP.js +1 -0
  21. package/dist/viewer/assets/{check-XjanpAFg.js → check-BpmCQNbj.js} +1 -1
  22. package/dist/viewer/assets/checkbox-CFJfXL6R.js +1 -0
  23. package/dist/viewer/assets/{chevron-down-R7pQzyLD.js → chevron-down-DDsUE_xz.js} +1 -1
  24. package/dist/viewer/assets/{chevron-up-CRPypfOs.js → chevron-up-DVznKMGv.js} +1 -1
  25. package/dist/viewer/assets/{chunk-2Q5K7J3B-CcvtugCu.js → chunk-2Q5K7J3B-CNfz5YDQ.js} +1 -1
  26. package/dist/viewer/assets/{chunk-5VM5RSS4-CpZHHr12.js → chunk-5VM5RSS4-CwIhjvMe.js} +1 -1
  27. package/dist/viewer/assets/{chunk-F27PBJKO-DeAl4iOc.js → chunk-F27PBJKO-YFexFJof.js} +1 -1
  28. package/dist/viewer/assets/{chunk-IMKFNOWR-BfrPe7pS.js → chunk-IMKFNOWR-GY2yrvuo.js} +1 -1
  29. package/dist/viewer/assets/{chunk-JWPE2WC7-DDjyvUmZ.js → chunk-JWPE2WC7-xd0JGvne.js} +1 -1
  30. package/dist/viewer/assets/chunk-OB3PAWPO-DJIP1M4r.js +12 -0
  31. package/dist/viewer/assets/{chunk-POPQ4Y6H-DkDb0mzz.js → chunk-POPQ4Y6H-Bh6rizEy.js} +1 -1
  32. package/dist/viewer/assets/{chunk-SVP7TREG-D-K2XIGs.js → chunk-SVP7TREG-DtNrjvpq.js} +1 -1
  33. package/dist/viewer/assets/{chunk-TICWLB2K-DWMQQx6z.js → chunk-TICWLB2K-DrERwtw8.js} +1 -1
  34. package/dist/viewer/assets/{chunk-XXDRQBXY-DfkljAyM.js → chunk-XXDRQBXY-fYo04iwY.js} +1 -1
  35. package/dist/viewer/assets/{circle-alert-pm13M-Ef.js → circle-alert-Bl7DXYD_.js} +1 -1
  36. package/dist/viewer/assets/classDiagram-ZZMXUADV-D7PO-ME9.js +1 -0
  37. package/dist/viewer/assets/classDiagram-v2-VYDZK3BY-D7PO-ME9.js +1 -0
  38. package/dist/viewer/assets/color-input-ClkkG_kZ.js +11 -0
  39. package/dist/viewer/assets/{common-Y7ySZBdh.js → common-DLCsGQ-t.js} +1 -1
  40. package/dist/viewer/assets/{component-icons-D1BDAuEt.js → component-icons-MJ61E9nt.js} +2 -2
  41. package/dist/viewer/assets/{copy-CN4K2f_R.js → copy-DMJJonQF.js} +1 -1
  42. package/dist/viewer/assets/cose-bilkent-JH36ORCC-Dplz8nVT.js +1 -0
  43. package/dist/viewer/assets/cross-button-D5qst1tj.js +1 -0
  44. package/dist/viewer/assets/{cynefin-OW5HDTMX-yz-uw9Kz.js → cynefin-OW5HDTMX-DiBs4CI8.js} +1 -1
  45. package/dist/viewer/assets/cynefinDiagram-5FMLGOSQ-COXS8-dI.js +62 -0
  46. package/dist/viewer/assets/{dagre-GXQ25YYZ-zjZDwXOe.js → dagre-GXQ25YYZ-K8qvfG8D.js} +2 -2
  47. package/dist/viewer/assets/dashboard-diagrams-page-Cb0xNr4W.js +2 -0
  48. package/dist/viewer/assets/dashboard-diagrams-page-inner-CD--zr5q.js +1 -0
  49. package/dist/viewer/assets/dashboard-docs-page-BfWR9Ai9.js +2 -0
  50. package/dist/viewer/assets/dashboard-docs-page-inner-BLbX-YwF.js +67 -0
  51. package/dist/viewer/assets/dashboard-layout-sTeeHNsZ.js +1 -0
  52. package/dist/viewer/assets/dashboard-lens-layout-D-tu_4kn.js +1 -0
  53. package/dist/viewer/assets/dashboard-map-frame-page-7pDmbTSe.js +1 -0
  54. package/dist/viewer/assets/dashboard-plans-page-CfwOZ34A.js +1 -0
  55. package/dist/viewer/assets/dashboard-service-apis-k93fjW51.js +1 -0
  56. package/dist/viewer/assets/{dashboard-service-diagrams-CIjk95Jk.js → dashboard-service-diagrams-BIWUxX-Y.js} +3 -3
  57. package/dist/viewer/assets/dashboard-service-docs-CnniTD6Q.js +1 -0
  58. package/dist/viewer/assets/{dashboard-service-overview-CzePVPjl.js → dashboard-service-overview-CGBu4omY.js} +5 -5
  59. package/dist/viewer/assets/dashboard-services-DEscIO2O.js +1 -0
  60. package/dist/viewer/assets/{db-type-badge-DOgu1Pyc.js → db-type-badge-UbPgpwQf.js} +2 -2
  61. package/dist/viewer/assets/debounce-Cp8eREM4-D7o-Pzb-.js +2 -0
  62. package/dist/viewer/assets/{dependencies-CYdEztHw.js → dependencies-DK2GDlhQ.js} +1 -1
  63. package/dist/viewer/assets/{dependency-graph-DbyfN-rC.js → dependency-graph-xBEnCS0J.js} +3 -3
  64. package/dist/viewer/assets/{diagram-S7CK7UJ4-q-NHkUCx.js → diagram-S7CK7UJ4-D-liadVe.js} +2 -2
  65. package/dist/viewer/assets/diagram-UQ7AKVKN-CnA8mgXp.js +41 -0
  66. package/dist/viewer/assets/{diagram-VSXAHHWV-DZc1kHGx.js → diagram-VSXAHHWV-Ck7dgRFR.js} +2 -2
  67. package/dist/viewer/assets/diagram-VX7I27RA-Cm1LHbu3.js +24 -0
  68. package/dist/viewer/assets/diagram-Z3DM3KII-DV3yBUCB.js +24 -0
  69. package/dist/viewer/assets/diagram-live-preview-DzJ7Nxp1.js +2 -0
  70. package/dist/viewer/assets/{diagram-portal-page-CWxuok9E.js → diagram-portal-page-gguGLULH.js} +24 -24
  71. package/dist/viewer/assets/{diagrams-C1xkRPqT.js → diagrams-BqBSv2eb.js} +4 -4
  72. package/dist/viewer/assets/dialog-D7wzTt0L.js +6 -0
  73. package/dist/viewer/assets/{doc-file-content-B06roi8L.js → doc-file-content-Be0au9Vo.js} +4 -4
  74. package/dist/viewer/assets/{download-CLdCXVsO.js → download-DhyZ3g4F.js} +1 -1
  75. package/dist/viewer/assets/ebnfDiagram-PWID7BFC-BXbHVQvG.js +1 -0
  76. package/dist/viewer/assets/{editor-vqK4qAnB.js → editor-F9o4zoeB.js} +2 -2
  77. package/dist/viewer/assets/{erDiagram-RLTQ6QDP-BWuA-aqV.js → erDiagram-RLTQ6QDP-DMfiWput.js} +2 -2
  78. package/dist/viewer/assets/{file-text-BvszilVL.js → file-text-BFqJQ67P.js} +1 -1
  79. package/dist/viewer/assets/flow-diagram-preview-B83UU1n_.js +1 -0
  80. package/dist/viewer/assets/{flowDiagram-HODETNUW-Db0QtNj4.js → flowDiagram-HODETNUW-BNFS2Mkr.js} +1 -1
  81. package/dist/viewer/assets/ganttDiagram-EL5Y4UJY-DFDsYJNp.js +292 -0
  82. package/dist/viewer/assets/gitGraphDiagram-WWUBYQGX-BVHabPDp.js +106 -0
  83. package/dist/viewer/assets/global-loader-XJO9_e0l.js +1 -0
  84. package/dist/viewer/assets/{globe-Jl6eIZmG.js → globe-CJ35KsQW.js} +1 -1
  85. package/dist/viewer/assets/gql-FFIj8zdp.js +1 -0
  86. package/dist/viewer/assets/{grid-scroll-body-CPqSxU6-.js → grid-scroll-body-DC5pYDPJ.js} +2 -2
  87. package/dist/viewer/assets/iconBase-DtqdW2XR.js +1 -0
  88. package/dist/viewer/assets/index-B6MxYIzs.js +1 -0
  89. package/dist/viewer/assets/index-BC5xdBQU.js +48 -0
  90. package/dist/viewer/assets/index-BIrx3oY4.js +1 -0
  91. package/dist/viewer/assets/{index-jm22RWpY.js → index-BZGsDmUx.js} +5 -5
  92. package/dist/viewer/assets/{index-Poftp9f1.js → index-BZXhpoWr.js} +4 -4
  93. package/dist/viewer/assets/index-Bn2bqqMd.js +1 -0
  94. package/dist/viewer/assets/{index-HU5pz3kj.js → index-BpCVYTvP.js} +36 -36
  95. package/dist/viewer/assets/{index-Bt2YHgxl.js → index-CBOYhBKJ.js} +1 -1
  96. package/dist/viewer/assets/index-CH7cEAxj.js +17 -0
  97. package/dist/viewer/assets/index-CIf0GId3.js +74 -0
  98. package/dist/viewer/assets/{index-D7MEHpJf.js → index-Ck66Ic_p.js} +4 -4
  99. package/dist/viewer/assets/index-Cp9mIQ8F.js +1 -0
  100. package/dist/viewer/assets/{index-c6Bxcoqm.js → index-DDmBuMKI.js} +1 -1
  101. package/dist/viewer/assets/{index-BSyJbFDG.js → index-DY3BFyb6.js} +1 -1
  102. package/dist/viewer/assets/{index-BS94XVnd.js → index-DkzZ-ZvR.js} +1 -1
  103. package/dist/viewer/assets/{index-C_43VC19.js → index-PglMbhys.js} +1 -1
  104. package/dist/viewer/assets/infoDiagram-27XIBGKW-CG-wwxBf.js +2 -0
  105. package/dist/viewer/assets/input--C59pq6j.js +1 -0
  106. package/dist/viewer/assets/{ishikawaDiagram-5VMMS53U-C4PzFnZ4.js → ishikawaDiagram-5VMMS53U-BlgV7ceJ.js} +2 -2
  107. package/dist/viewer/assets/{journeyDiagram-3NMN7TZE-Dpn3bBNo.js → journeyDiagram-3NMN7TZE-Cn03_Xl6.js} +2 -2
  108. package/dist/viewer/assets/{kanban-definition-UXKFOSKX-CJ99H4G6.js → kanban-definition-UXKFOSKX-CJogvDPY.js} +6 -6
  109. package/dist/viewer/assets/{layout-Bfvxt_D5.js → layout-B26eC4yQ.js} +1 -1
  110. package/dist/viewer/assets/{lens-run-page-DZneics-.js → lens-run-page-Ba1ppzJt.js} +3 -3
  111. package/dist/viewer/assets/lens-runs-page-BnUS57LM.js +1 -0
  112. package/dist/viewer/assets/{link-2-C75goIOt.js → link-2-D1e0xznG.js} +1 -1
  113. package/dist/viewer/assets/linked-project-dot-BY1gEES9.js +543 -0
  114. package/dist/viewer/assets/{loader-circle-C5jZoM7X.js → loader-circle-CiqyoJF7.js} +1 -1
  115. package/dist/viewer/assets/{merge-Cy7YkrN7.js → merge-BhOMvhW1.js} +1 -1
  116. package/dist/viewer/assets/mermaid.core-BDgZg3kW.js +312 -0
  117. package/dist/viewer/assets/method-badge-DErZP7y5.js +1 -0
  118. package/dist/viewer/assets/{mindmap-definition-YA3MSWOX-yQCKA-K4.js → mindmap-definition-YA3MSWOX-DFkLu0ac.js} +2 -2
  119. package/dist/viewer/assets/nav-links-DZWMpwMR.js +61 -0
  120. package/dist/viewer/assets/{network-COWNXGMM.js → network-B1apzT1s.js} +1 -1
  121. package/dist/viewer/assets/{nosql-editor-modal-DTiWkc_r.js → nosql-editor-modal-CvH0SWAi.js} +5 -5
  122. package/dist/viewer/assets/not-found-page-C-fn8QeM.js +1 -0
  123. package/dist/viewer/assets/organization-dependency-graph-page-BryP-iJL.js +1 -0
  124. package/dist/viewer/assets/pegDiagram-XKGWAZYB-g1cM14-L.js +1 -0
  125. package/dist/viewer/assets/{pieDiagram-E7YTZNPT-DqnkpCX4.js → pieDiagram-E7YTZNPT-WEnDsMY3.js} +2 -2
  126. package/dist/viewer/assets/{plus-DQakmTjA.js → plus-DbyuOgKB.js} +1 -1
  127. package/dist/viewer/assets/popover-476u3TN0.js +1 -0
  128. package/dist/viewer/assets/preload-helper-BlTxHScW.js +1 -0
  129. package/dist/viewer/assets/{quadrantDiagram-AXDQQJYC-iQjJfars.js → quadrantDiagram-AXDQQJYC-NdfQCpzF.js} +2 -2
  130. package/dist/viewer/assets/query-D9oj6LGx.js +50 -0
  131. package/dist/viewer/assets/{quill-rCHj4fCw.js → quill-Cde5JMRD.js} +1 -1
  132. package/dist/viewer/assets/railroadDiagram-O6MQD6OU-BYhlXlMY.js +1 -0
  133. package/dist/viewer/assets/{react-BNzYaZuG.js → react-Bx48XWN4.js} +1 -1
  134. package/dist/viewer/assets/react-flow-wrapper-BcbvHgxz.js +277 -0
  135. package/dist/viewer/assets/{requirementDiagram-BXWQKSXE-Bv-Vh1dW.js → requirementDiagram-BXWQKSXE-C25Bcm2L.js} +2 -2
  136. package/dist/viewer/assets/{sankeyDiagram-P5KCCOFB-C__uD07f.js → sankeyDiagram-P5KCCOFB-h8LiCsgk.js} +2 -2
  137. package/dist/viewer/assets/scroll-area-RagrStGj.js +6 -0
  138. package/dist/viewer/assets/{search-DW-qhXLk.js → search-vw7ucoOs.js} +1 -1
  139. package/dist/viewer/assets/section-loader-C4hOfhQS.js +1 -0
  140. package/dist/viewer/assets/section-not-found-BnrXiPog.js +1 -0
  141. package/dist/viewer/assets/select-D9fbrr7O.js +1 -0
  142. package/dist/viewer/assets/{sequenceDiagram-WJ2MYXX4-1RbvcHwO.js → sequenceDiagram-WJ2MYXX4-CDRVvD30.js} +2 -2
  143. package/dist/viewer/assets/{service-context-C17u_Fw9.js → service-context-D5nBtU18.js} +1 -1
  144. package/dist/viewer/assets/{service-database-list-page-cYuDHIls.js → service-database-list-page-DBjaDLVy.js} +2 -2
  145. package/dist/viewer/assets/service-database-page-CenNCgwf.js +2 -0
  146. package/dist/viewer/assets/service-database-page-inner-gS51TQTZ.js +85 -0
  147. package/dist/viewer/assets/{service-doc-Dir8g83J.js → service-doc-C-jHqT1U.js} +4 -4
  148. package/dist/viewer/assets/{service-doc-preview-modal-bJ6tJ5YR.js → service-doc-preview-modal-5sX6FOu1.js} +2 -2
  149. package/dist/viewer/assets/service-layout-Bf0vZBCH.js +1 -0
  150. package/dist/viewer/assets/service-pages-CFikvX4t.js +1 -0
  151. package/dist/viewer/assets/{services-Crqkffr5.js → services-Ivav34WC.js} +4 -4
  152. package/dist/viewer/assets/{share-2-BmYmqN4k.js → share-2-CQEaWbfH.js} +1 -1
  153. package/dist/viewer/assets/sizeCapture-INFHLROL-BJ6ndnPM.js +1 -0
  154. package/dist/viewer/assets/stateDiagram-D77RDMKH-B_tNCX3o.js +1 -0
  155. package/dist/viewer/assets/stateDiagram-v2-MP3YSRHH-Dl9wqdli.js +1 -0
  156. package/dist/viewer/assets/{style-DgSU0bQl.js → style-BPesJvJr.js} +8 -8
  157. package/dist/viewer/assets/super-circle-loader-DSkos6uP.js +1 -0
  158. package/dist/viewer/assets/super-logo-loader-Cxlbn6MB.js +1 -0
  159. package/dist/viewer/assets/swimlanes-42K2YHIH-CzURzYwf.js +1 -0
  160. package/dist/viewer/assets/swimlanesDiagram-VR7AAH4N-DrIlwFtk.js +8 -0
  161. package/dist/viewer/assets/table-B4pFND-o.js +1 -0
  162. package/dist/viewer/assets/textarea-Clgdv3Oi.js +1 -0
  163. package/dist/viewer/assets/{timeline-definition-24CTP7MA-C4yuLwUH.js → timeline-definition-24CTP7MA-D0YXQE1U.js} +2 -2
  164. package/dist/viewer/assets/ui-graph-logo-gHowu5gP.js +1 -0
  165. package/dist/viewer/assets/{upload-CRsS43j9.js → upload-CYb3nN_5.js} +1 -1
  166. package/dist/viewer/assets/{uploads-BOQHX9l4.js → uploads-CX2kdXbM.js} +8 -8
  167. package/dist/viewer/assets/{use-debounced-value-Ba-kkCUY.js → use-debounced-value-BpNFJd3C.js} +1 -1
  168. package/dist/viewer/assets/{use-localstorage-DIisTx-J.js → use-localstorage-D233xVb0.js} +1 -1
  169. package/dist/viewer/assets/use-permissions-BvmxJJ5r.js +1 -0
  170. package/dist/viewer/assets/{use-scoped-storage-C4RzED-E.js → use-scoped-storage-DL1XVp1j.js} +1 -1
  171. package/dist/viewer/assets/useMutation-D5ZHwHsx.js +1 -0
  172. package/dist/viewer/assets/useQuery-Dhe6uxrL.js +1 -0
  173. package/dist/viewer/assets/{vennDiagram-4TSXK5OY-BCtqXZqe.js → vennDiagram-4TSXK5OY-SSjHlqCQ.js} +2 -2
  174. package/dist/viewer/assets/{wardleyDiagram-VM6X3IG4-D3OtZJoT.js → wardleyDiagram-VM6X3IG4-CZWNdQxH.js} +2 -2
  175. package/dist/viewer/assets/{xychartDiagram-S5SC5T6Z-DxLL2CHH.js → xychartDiagram-S5SC5T6Z-B2qAGeb0.js} +2 -2
  176. package/dist/viewer/assets/zod-BMU4UTQt.js +1 -0
  177. package/dist/viewer/index.html +10 -1
  178. package/package.json +57 -57
  179. package/dist/abort-signals-B4fc3ahg.mjs +0 -34
  180. package/dist/agents.md +0 -28
  181. package/dist/anthropic-messages-KPxCHqBN.mjs +0 -14327
  182. package/dist/auth-storage-BvNH97p9.mjs +0 -2180
  183. package/dist/azure-openai-config-BbeCSg4y.mjs +0 -55
  184. package/dist/azure-openai-responses-BRzy8RfL.mjs +0 -182
  185. package/dist/classifier-shared-DBUHiTGw.mjs +0 -105
  186. package/dist/cli-2R6QQFp1.mjs +0 -451
  187. package/dist/cloudflare-workers-ai-system-one-BfqwmRQf.mjs +0 -44
  188. package/dist/config-D8DMGzIq.mjs +0 -647
  189. package/dist/cross-spawn-B2jIQPlu.mjs +0 -404
  190. package/dist/diagnostics-xdSgQR8t.mjs +0 -131
  191. package/dist/dist-BRyghrKX.mjs +0 -404
  192. package/dist/dist-D0EzrblG.mjs +0 -12161
  193. package/dist/dist-EKhnHWHG.mjs +0 -140221
  194. package/dist/dist-pQtuusFv.mjs +0 -1243
  195. package/dist/easter-egg-3d-C9_btlWn.mjs +0 -1225
  196. package/dist/env-api-keys-uytNub6O.mjs +0 -122
  197. package/dist/error-body-FhmCtR7m.mjs +0 -101
  198. package/dist/esm-D5isprgl.mjs +0 -1533
  199. package/dist/esm-DnqE4pfM.mjs +0 -104876
  200. package/dist/execute-BoTKl80U.mjs +0 -1715
  201. package/dist/github-copilot-headers-DWcTgoXr.mjs +0 -22
  202. package/dist/google-generative-ai-Brs5YpJo.mjs +0 -332
  203. package/dist/google-shared-2CyYa4VE.mjs +0 -33438
  204. package/dist/google-vertex-DZDUQPKa.mjs +0 -378
  205. package/dist/hash-DN7ukSfd.mjs +0 -16
  206. package/dist/headers-GhQHLk-3.mjs +0 -17
  207. package/dist/jiti-9kWALm4Y.mjs +0 -5439
  208. package/dist/jiti-loader-f21DrY1K.mjs +0 -27
  209. package/dist/jiti-static-loader-BI_w28l7.mjs +0 -41704
  210. package/dist/json-parse-B2mHg7o7.mjs +0 -381
  211. package/dist/keybinding-hints-D0nLU3ZH.mjs +0 -17899
  212. package/dist/lib-Dj1gKQJc.mjs +0 -24379
  213. package/dist/llama-cpp-classify-C73BoMYd.mjs +0 -344
  214. package/dist/mistral-conversations-DXVR7znL.mjs +0 -698
  215. package/dist/models-DBdii9gQ.mjs +0 -1255
  216. package/dist/multipart-parser-DLw9Z0uJ.mjs +0 -298
  217. package/dist/node-B0NU8X55.mjs +0 -2479
  218. package/dist/node-B8gaKm9g.mjs +0 -23
  219. package/dist/openai-I3_AqKDX.mjs +0 -17357
  220. package/dist/openai-codex-responses-PcZHDuBD.mjs +0 -1198
  221. package/dist/openai-completions-a_mH01ii.mjs +0 -994
  222. package/dist/openai-decisions-Du8y4mQG.mjs +0 -142
  223. package/dist/openai-prompt-cache-Bc6qNWt0.mjs +0 -8
  224. package/dist/openai-responses-a9lV_U7O.mjs +0 -270
  225. package/dist/openai-responses-shared-CDs_PBiH.mjs +0 -598
  226. package/dist/openrouter-images-D0Zc8Cjs.mjs +0 -125
  227. package/dist/photon_rs-DCvMOMu0.mjs +0 -4252
  228. package/dist/pi-messages-B5ietIBq.mjs +0 -306
  229. package/dist/plan-prompt.md +0 -56
  230. package/dist/prompt.md +0 -44
  231. package/dist/provider-env-BJhgA66g.mjs +0 -37
  232. package/dist/provider-retry-DXYM7rVE.mjs +0 -79
  233. package/dist/runtime-DTkBxiaM.mjs +0 -2822
  234. package/dist/sanitize-unicode-CqChtoM6.mjs +0 -26
  235. package/dist/shell-836_JFnI.mjs +0 -162
  236. package/dist/source-CKPndhKl.mjs +0 -478
  237. package/dist/src-DNm2QRm3.mjs +0 -5028
  238. package/dist/system-one-shared-DUAFtNa8.mjs +0 -75
  239. package/dist/token-DEUkymby.mjs +0 -56
  240. package/dist/token-util-Cx5S4eKt.mjs +0 -3
  241. package/dist/tool-DHDYqsyG.mjs +0 -6673
  242. package/dist/transform-messages-BClk99Vn.mjs +0 -477
  243. package/dist/typesafe-system-one-D2d8j8hZ.mjs +0 -24
  244. package/dist/typescript-Br-vsRJV.mjs +0 -6737
  245. package/dist/uuid-CNCZqNBb.mjs +0 -49
  246. package/dist/v2-1z8ijsD3.mjs +0 -6120
  247. package/dist/viewer/assets/abnfDiagram-VCTEODGH-j5YaKnl9.js +0 -1
  248. package/dist/viewer/assets/actor-avatar-DqmoY8Xc.js +0 -1
  249. package/dist/viewer/assets/architectureDiagram-5GKGNRK7-D80cJKz_.js +0 -36
  250. package/dist/viewer/assets/avatar-BI7D-Aia.js +0 -43
  251. package/dist/viewer/assets/badge-870-A4Y6.js +0 -1
  252. package/dist/viewer/assets/better-delete-confirmation-modal-Dib31LVb.js +0 -1
  253. package/dist/viewer/assets/better-dialog-D3AAiahr.js +0 -1
  254. package/dist/viewer/assets/button-DadqadpO.js +0 -1
  255. package/dist/viewer/assets/channel-DRkt3LIn.js +0 -1
  256. package/dist/viewer/assets/checkbox-BXpR079x.js +0 -1
  257. package/dist/viewer/assets/classDiagram-ZZMXUADV-G5CebNaC.js +0 -1
  258. package/dist/viewer/assets/classDiagram-v2-VYDZK3BY-G5CebNaC.js +0 -1
  259. package/dist/viewer/assets/color-input-Efm-lxDy.js +0 -11
  260. package/dist/viewer/assets/cose-bilkent-JH36ORCC-CrSHFmnp.js +0 -1
  261. package/dist/viewer/assets/cross-button-5Sr5rWVP.js +0 -1
  262. package/dist/viewer/assets/cynefinDiagram-5FMLGOSQ-Bdl_eBdu.js +0 -62
  263. package/dist/viewer/assets/dashboard-diagrams-page-DMupOe1m.js +0 -2
  264. package/dist/viewer/assets/dashboard-diagrams-page-inner-Dh0yKh2A.js +0 -1
  265. package/dist/viewer/assets/dashboard-docs-page-DWJ1qOQz.js +0 -2
  266. package/dist/viewer/assets/dashboard-docs-page-inner-Fs6G3oGo.js +0 -67
  267. package/dist/viewer/assets/dashboard-layout-D36InAaB.js +0 -1
  268. package/dist/viewer/assets/dashboard-lens-layout-Cv1Xx3hY.js +0 -1
  269. package/dist/viewer/assets/dashboard-map-frame-page-CTn61NUO.js +0 -1
  270. package/dist/viewer/assets/dashboard-plans-page-DxFJkrgK.js +0 -1
  271. package/dist/viewer/assets/dashboard-service-apis-BHtD9s5z.js +0 -1
  272. package/dist/viewer/assets/dashboard-service-docs-Uv_1uxxO.js +0 -1
  273. package/dist/viewer/assets/dashboard-services-CUP-L4Jg.js +0 -1
  274. package/dist/viewer/assets/diagram-UQ7AKVKN-DhFcurW6.js +0 -41
  275. package/dist/viewer/assets/diagram-VX7I27RA-DE1nREE8.js +0 -24
  276. package/dist/viewer/assets/diagram-Z3DM3KII-CSrYcCbc.js +0 -24
  277. package/dist/viewer/assets/diagram-live-preview-i5doxXLH.js +0 -2
  278. package/dist/viewer/assets/dialog-D_HtNS17.js +0 -6
  279. package/dist/viewer/assets/ebnfDiagram-PWID7BFC-BfL8m_sf.js +0 -1
  280. package/dist/viewer/assets/flow-diagram-preview-T0Z4iMVU.js +0 -1
  281. package/dist/viewer/assets/ganttDiagram-EL5Y4UJY-CsITpniw.js +0 -292
  282. package/dist/viewer/assets/gitGraphDiagram-WWUBYQGX-B4eCBGoe.js +0 -106
  283. package/dist/viewer/assets/iconBase-BoDZfJgC.js +0 -1
  284. package/dist/viewer/assets/index-5E1tJ7yK.js +0 -125
  285. package/dist/viewer/assets/index-7XpV2DRw.js +0 -1
  286. package/dist/viewer/assets/index-C0Rs3s9Z.js +0 -1
  287. package/dist/viewer/assets/index-CzHjJWeV.js +0 -1
  288. package/dist/viewer/assets/index-DcEA6SIV.js +0 -74
  289. package/dist/viewer/assets/infoDiagram-27XIBGKW-lTebN5Ix.js +0 -2
  290. package/dist/viewer/assets/input-YvHTVS0E.js +0 -1
  291. package/dist/viewer/assets/lens-runs-page-DoAOObxx.js +0 -1
  292. package/dist/viewer/assets/linked-project-dot-Ds2uEmJ9.js +0 -543
  293. package/dist/viewer/assets/mermaid.core-BCRBv8Us.js +0 -312
  294. package/dist/viewer/assets/method-badge-DMYDKdDZ.js +0 -1
  295. package/dist/viewer/assets/nav-links-8vT2ixiI.js +0 -61
  296. package/dist/viewer/assets/not-found-page-CnfLlhS4.js +0 -1
  297. package/dist/viewer/assets/organization-dependency-graph-page-3xqIxjNx.js +0 -1
  298. package/dist/viewer/assets/pegDiagram-XKGWAZYB-CMXqeAum.js +0 -1
  299. package/dist/viewer/assets/popover-CN9ni1N3.js +0 -1
  300. package/dist/viewer/assets/railroadDiagram-O6MQD6OU-CfqToX3W.js +0 -1
  301. package/dist/viewer/assets/react-flow-wrapper-BPlRstyO.js +0 -276
  302. package/dist/viewer/assets/scroll-area-BodE-n7W.js +0 -6
  303. package/dist/viewer/assets/section-loader-BzpYM_Nx.js +0 -1
  304. package/dist/viewer/assets/select-DDtnmSET.js +0 -1
  305. package/dist/viewer/assets/service-database-page-CMi1wF4h.js +0 -2
  306. package/dist/viewer/assets/service-database-page-inner-CoqAj93L.js +0 -85
  307. package/dist/viewer/assets/service-layout-0NMm_bKG.js +0 -1
  308. package/dist/viewer/assets/service-pages-dfnc91SU.js +0 -1
  309. package/dist/viewer/assets/sizeCapture-INFHLROL-BRJi3gCg.js +0 -1
  310. package/dist/viewer/assets/stateDiagram-D77RDMKH-DdLsfxgy.js +0 -1
  311. package/dist/viewer/assets/stateDiagram-v2-MP3YSRHH-DFwg8Qki.js +0 -1
  312. package/dist/viewer/assets/super-circle-loader-D8MElOMh.js +0 -1
  313. package/dist/viewer/assets/super-logo-loader-DJYiRbCS.js +0 -1
  314. package/dist/viewer/assets/swimlanes-42K2YHIH-AuYjrPqh.js +0 -1
  315. package/dist/viewer/assets/swimlanesDiagram-VR7AAH4N-0nIGA8_4.js +0 -8
  316. package/dist/viewer/assets/table-Bi4Auk9Z.js +0 -1
  317. package/dist/viewer/assets/textarea-MgxZ5x6-.js +0 -1
  318. package/dist/viewer/assets/ui-graph-logo-D4jRhd4z.js +0 -1
  319. package/dist/viewer/assets/use-permissions-6JVET753.js +0 -1
  320. package/dist/viewer/assets/useMutation-CmVaR9zz.js +0 -1
  321. package/dist/viewer/assets/useQuery-B8yYhO0c.js +0 -1
  322. package/dist/viewer/assets/zod-Dc4H6VVJ.js +0 -1
  323. package/dist/virtual-modules-DnCx0Gdx.mjs +0 -340
@@ -1,312 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sizeCapture-INFHLROL-BRJi3gCg.js","assets/index-5E1tJ7yK.js","assets/index-m8s6_jQi.css","assets/transform-BqqRT-Iy.js","assets/dagre-GXQ25YYZ-zjZDwXOe.js","assets/layout-Bfvxt_D5.js","assets/merge-Cy7YkrN7.js","assets/last-DXTTfs9a.js","assets/swimlanes-42K2YHIH-AuYjrPqh.js","assets/cose-bilkent-JH36ORCC-CrSHFmnp.js","assets/cytoscape.esm-CtNdOvlO.js","assets/c4Diagram-7LVT6UL2-CLkVbphC.js","assets/chunk-F27PBJKO-DeAl4iOc.js","assets/flowDiagram-HODETNUW-Db0QtNj4.js","assets/chunk-5VM5RSS4-CpZHHr12.js","assets/chunk-XXDRQBXY-DfkljAyM.js","assets/chunk-POPQ4Y6H-DkDb0mzz.js","assets/channel-DRkt3LIn.js","assets/swimlanesDiagram-VR7AAH4N-0nIGA8_4.js","assets/erDiagram-RLTQ6QDP-BWuA-aqV.js","assets/gitGraphDiagram-WWUBYQGX-B4eCBGoe.js","assets/chunk-2Q5K7J3B-CcvtugCu.js","assets/chunk-JWPE2WC7-DDjyvUmZ.js","assets/cynefin-OW5HDTMX-yz-uw9Kz.js","assets/ganttDiagram-EL5Y4UJY-CsITpniw.js","assets/linear-BT-xgETh.js","assets/value-wA6veExk.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-27XIBGKW-lTebN5Ix.js","assets/pieDiagram-E7YTZNPT-DqnkpCX4.js","assets/arc-Cn8owoDw.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-AXDQQJYC-iQjJfars.js","assets/xychartDiagram-S5SC5T6Z-DxLL2CHH.js","assets/requirementDiagram-BXWQKSXE-Bv-Vh1dW.js","assets/sequenceDiagram-WJ2MYXX4-1RbvcHwO.js","assets/classDiagram-ZZMXUADV-G5CebNaC.js","assets/chunk-TICWLB2K-DWMQQx6z.js","assets/classDiagram-v2-VYDZK3BY-G5CebNaC.js","assets/stateDiagram-D77RDMKH-DdLsfxgy.js","assets/chunk-IMKFNOWR-BfrPe7pS.js","assets/stateDiagram-v2-MP3YSRHH-DFwg8Qki.js","assets/journeyDiagram-3NMN7TZE-Dpn3bBNo.js","assets/timeline-definition-24CTP7MA-C4yuLwUH.js","assets/mindmap-definition-YA3MSWOX-yQCKA-K4.js","assets/kanban-definition-UXKFOSKX-CJ99H4G6.js","assets/sankeyDiagram-P5KCCOFB-C__uD07f.js","assets/diagram-Z3DM3KII-CSrYcCbc.js","assets/diagram-UQ7AKVKN-DhFcurW6.js","assets/blockDiagram-I7D4REHJ-CbYzOsL_.js","assets/diagram-S7CK7UJ4-q-NHkUCx.js","assets/architectureDiagram-5GKGNRK7-D80cJKz_.js","assets/diagram-VSXAHHWV-DZc1kHGx.js","assets/ishikawaDiagram-5VMMS53U-C4PzFnZ4.js","assets/vennDiagram-4TSXK5OY-BCtqXZqe.js","assets/diagram-VX7I27RA-DE1nREE8.js","assets/wardleyDiagram-VM6X3IG4-D3OtZJoT.js","assets/cynefinDiagram-5FMLGOSQ-Bdl_eBdu.js","assets/railroadDiagram-O6MQD6OU-CfqToX3W.js","assets/chunk-SVP7TREG-D-K2XIGs.js","assets/ebnfDiagram-PWID7BFC-BfL8m_sf.js","assets/abnfDiagram-VCTEODGH-j5YaKnl9.js","assets/pegDiagram-XKGWAZYB-CMXqeAum.js"])))=>i.map(i=>d[i]);
2
- import{J as Sn,_ as At}from"./index-5E1tJ7yK.js";import{s as Et}from"./transform-BqqRT-Iy.js";var Ed=Object.defineProperty,u=(e,t)=>Ed(e,"name",{value:t,configurable:!0}),py=(e,t)=>{for(var r in t)Ed(e,r,{get:t[r],enumerable:!0})},Is={exports:{}},gy=Is.exports,rh;function my(){return rh||(rh=1,(function(e,t){(function(r,i){e.exports=i()})(gy,(function(){var r=1e3,i=6e4,s=36e5,o="millisecond",a="second",n="minute",l="hour",c="day",h="week",d="month",f="quarter",g="year",m="date",y="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={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(O){var D=["th","st","nd","rd"],v=O%100;return"["+O+(D[(v-20)%10]||D[v]||D[0])+"]"}},S=function(O,D,v){var N=String(O);return!N||N.length>=D?O:""+Array(D+1-N.length).join(v)+O},_={s:S,z:function(O){var D=-O.utcOffset(),v=Math.abs(D),N=Math.floor(v/60),P=v%60;return(D<=0?"+":"-")+S(N,2,"0")+":"+S(P,2,"0")},m:function O(D,v){if(D.date()<v.date())return-O(v,D);var N=12*(v.year()-D.year())+(v.month()-D.month()),P=D.clone().add(N,d),it=v-P<0,Q=D.clone().add(N+(it?-1:1),d);return+(-(N+(v-P)/(it?P-Q:Q-P))||0)},a:function(O){return O<0?Math.ceil(O)||0:Math.floor(O)},p:function(O){return{M:d,y:g,w:h,d:c,D:m,h:l,m:n,s:a,ms:o,Q:f}[O]||String(O||"").toLowerCase().replace(/s$/,"")},u:function(O){return O===void 0}},B="en",L={};L[B]=k;var E="$isDayjsObject",F=function(O){return O instanceof st||!(!O||!O[E])},G=function O(D,v,N){var P;if(!D)return B;if(typeof D=="string"){var it=D.toLowerCase();L[it]&&(P=it),v&&(L[it]=v,P=it);var Q=D.split("-");if(!P&&Q.length>1)return O(Q[0])}else{var mt=D.name;L[mt]=D,P=mt}return!N&&P&&(B=P),P||!N&&B},j=function(O,D){if(F(O))return O.clone();var v=typeof D=="object"?D:{};return v.date=O,v.args=arguments,new st(v)},q=_;q.l=G,q.i=F,q.w=function(O,D){return j(O,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var st=(function(){function O(v){this.$L=G(v.locale,null,!0),this.parse(v),this.$x=this.$x||v.x||{},this[E]=!0}var D=O.prototype;return D.parse=function(v){this.$d=(function(N){var P=N.date,it=N.utc;if(P===null)return new Date(NaN);if(q.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var Q=P.match(C);if(Q){var mt=Q[2]-1||0,wt=(Q[7]||"0").substring(0,3);return it?new Date(Date.UTC(Q[1],mt,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,wt)):new Date(Q[1],mt,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,wt)}}return new Date(P)})(v),this.init()},D.init=function(){var v=this.$d;this.$y=v.getFullYear(),this.$M=v.getMonth(),this.$D=v.getDate(),this.$W=v.getDay(),this.$H=v.getHours(),this.$m=v.getMinutes(),this.$s=v.getSeconds(),this.$ms=v.getMilliseconds()},D.$utils=function(){return q},D.isValid=function(){return this.$d.toString()!==y},D.isSame=function(v,N){var P=j(v);return this.startOf(N)<=P&&P<=this.endOf(N)},D.isAfter=function(v,N){return j(v)<this.startOf(N)},D.isBefore=function(v,N){return this.endOf(N)<j(v)},D.$g=function(v,N,P){return q.u(v)?this[N]:this.set(P,v)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(v,N){var P=this,it=!!q.u(N)||N,Q=q.p(v),mt=function(vt,Nt){var Wt=q.w(P.$u?Date.UTC(P.$y,Nt,vt):new Date(P.$y,Nt,vt),P);return it?Wt:Wt.endOf(c)},wt=function(vt,Nt){return q.w(P.toDate()[vt].apply(P.toDate("s"),(it?[0,0,0,0]:[23,59,59,999]).slice(Nt)),P)},St=this.$W,ft=this.$M,Lt=this.$D,gt="set"+(this.$u?"UTC":"");switch(Q){case g:return it?mt(1,0):mt(31,11);case d:return it?mt(1,ft):mt(0,ft+1);case h:var Tt=this.$locale().weekStart||0,Mt=(St<Tt?St+7:St)-Tt;return mt(it?Lt-Mt:Lt+(6-Mt),ft);case c:case m:return wt(gt+"Hours",0);case l:return wt(gt+"Minutes",1);case n:return wt(gt+"Seconds",2);case a:return wt(gt+"Milliseconds",3);default:return this.clone()}},D.endOf=function(v){return this.startOf(v,!1)},D.$set=function(v,N){var P,it=q.p(v),Q="set"+(this.$u?"UTC":""),mt=(P={},P[c]=Q+"Date",P[m]=Q+"Date",P[d]=Q+"Month",P[g]=Q+"FullYear",P[l]=Q+"Hours",P[n]=Q+"Minutes",P[a]=Q+"Seconds",P[o]=Q+"Milliseconds",P)[it],wt=it===c?this.$D+(N-this.$W):N;if(it===d||it===g){var St=this.clone().set(m,1);St.$d[mt](wt),St.init(),this.$d=St.set(m,Math.min(this.$D,St.daysInMonth())).$d}else mt&&this.$d[mt](wt);return this.init(),this},D.set=function(v,N){return this.clone().$set(v,N)},D.get=function(v){return this[q.p(v)]()},D.add=function(v,N){var P,it=this;v=Number(v);var Q=q.p(N),mt=function(ft){var Lt=j(it);return q.w(Lt.date(Lt.date()+Math.round(ft*v)),it)};if(Q===d)return this.set(d,this.$M+v);if(Q===g)return this.set(g,this.$y+v);if(Q===c)return mt(1);if(Q===h)return mt(7);var wt=(P={},P[n]=i,P[l]=s,P[a]=r,P)[Q]||1,St=this.$d.getTime()+v*wt;return q.w(St,this)},D.subtract=function(v,N){return this.add(-1*v,N)},D.format=function(v){var N=this,P=this.$locale();if(!this.isValid())return P.invalidDate||y;var it=v||"YYYY-MM-DDTHH:mm:ssZ",Q=q.z(this),mt=this.$H,wt=this.$m,St=this.$M,ft=P.weekdays,Lt=P.months,gt=P.meridiem,Tt=function(Nt,Wt,ne,Se){return Nt&&(Nt[Wt]||Nt(N,it))||ne[Wt].slice(0,Se)},Mt=function(Nt){return q.s(mt%12||12,Nt,"0")},vt=gt||function(Nt,Wt,ne){var Se=Nt<12?"AM":"PM";return ne?Se.toLowerCase():Se};return it.replace(x,(function(Nt,Wt){return Wt||(function(ne){switch(ne){case"YY":return String(N.$y).slice(-2);case"YYYY":return q.s(N.$y,4,"0");case"M":return St+1;case"MM":return q.s(St+1,2,"0");case"MMM":return Tt(P.monthsShort,St,Lt,3);case"MMMM":return Tt(Lt,St);case"D":return N.$D;case"DD":return q.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return Tt(P.weekdaysMin,N.$W,ft,2);case"ddd":return Tt(P.weekdaysShort,N.$W,ft,3);case"dddd":return ft[N.$W];case"H":return String(mt);case"HH":return q.s(mt,2,"0");case"h":return Mt(1);case"hh":return Mt(2);case"a":return vt(mt,wt,!0);case"A":return vt(mt,wt,!1);case"m":return String(wt);case"mm":return q.s(wt,2,"0");case"s":return String(N.$s);case"ss":return q.s(N.$s,2,"0");case"SSS":return q.s(N.$ms,3,"0");case"Z":return Q}return null})(Nt)||Q.replace(":","")}))},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(v,N,P){var it,Q=this,mt=q.p(N),wt=j(v),St=(wt.utcOffset()-this.utcOffset())*i,ft=this-wt,Lt=function(){return q.m(Q,wt)};switch(mt){case g:it=Lt()/12;break;case d:it=Lt();break;case f:it=Lt()/3;break;case h:it=(ft-St)/6048e5;break;case c:it=(ft-St)/864e5;break;case l:it=ft/s;break;case n:it=ft/i;break;case a:it=ft/r;break;default:it=ft}return P?it:q.a(it)},D.daysInMonth=function(){return this.endOf(d).$D},D.$locale=function(){return L[this.$L]},D.locale=function(v,N){if(!v)return this.$L;var P=this.clone(),it=G(v,N,!0);return it&&(P.$L=it),P},D.clone=function(){return q.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},O})(),Y=st.prototype;return j.prototype=Y,[["$ms",o],["$s",a],["$m",n],["$H",l],["$W",c],["$M",d],["$y",g],["$D",m]].forEach((function(O){Y[O[1]]=function(D){return this.$g(D,O[0],O[1])}})),j.extend=function(O,D){return O.$i||(O(D,st,j),O.$i=!0),j},j.locale=G,j.isDayjs=F,j.unix=function(O){return j(1e3*O)},j.en=L[B],j.Ls=L,j.p={},j}))})(Is)),Is.exports}var yy=my();const Cy=Sn(yy);var dr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},R={trace:u((...e)=>{},"trace"),debug:u((...e)=>{},"debug"),info:u((...e)=>{},"info"),warn:u((...e)=>{},"warn"),error:u((...e)=>{},"error"),fatal:u((...e)=>{},"fatal")},wn=u(function(e="fatal"){let t=dr.fatal;typeof e=="string"?e.toLowerCase()in dr&&(t=dr[e]):typeof e=="number"&&(t=e),R.trace=()=>{},R.debug=()=>{},R.info=()=>{},R.warn=()=>{},R.error=()=>{},R.fatal=()=>{},t<=dr.fatal&&(R.fatal=console.error?console.error.bind(console,De("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",De("FATAL"))),t<=dr.error&&(R.error=console.error?console.error.bind(console,De("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",De("ERROR"))),t<=dr.warn&&(R.warn=console.warn?console.warn.bind(console,De("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",De("WARN"))),t<=dr.info&&(R.info=console.info?console.info.bind(console,De("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",De("INFO"))),t<=dr.debug&&(R.debug=console.debug?console.debug.bind(console,De("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",De("DEBUG"))),t<=dr.trace&&(R.trace=console.debug?console.debug.bind(console,De("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",De("TRACE")))},"setLogLevel"),De=u(e=>`%c${Cy().format("ss.SSS")} : ${e} : `,"format");const Rs={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,o=2*r-s;switch(i){case"r":return Rs.hue2rgb(o,s,e+1/3)*255;case"g":return Rs.hue2rgb(o,s,e)*255;case"b":return Rs.hue2rgb(o,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),o=Math.min(e,t,r),a=(s+o)/2;if(i==="l")return a*100;if(s===o)return 0;const n=s-o,l=a>.5?n/(2-s-o):n/(s+o);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},xy={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},by={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},Ft={channel:Rs,lang:xy,unit:by},Lr={};for(let e=0;e<=255;e++)Lr[e]=Ft.unit.dec2hex(e);const fe={ALL:0,RGB:1,HSL:2};let ky=class{constructor(){this.type=fe.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=fe.ALL}is(t){return this.type===t}};class Ty{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new ky}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=fe.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=Ft.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=Ft.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=Ft.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=Ft.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=Ft.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=Ft.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(fe.HSL)&&r!==void 0?r:(this._ensureHSL(),Ft.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(fe.HSL)&&r!==void 0?r:(this._ensureHSL(),Ft.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(fe.HSL)&&r!==void 0?r:(this._ensureHSL(),Ft.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(fe.RGB)&&r!==void 0?r:(this._ensureRGB(),Ft.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(fe.RGB)&&r!==void 0?r:(this._ensureRGB(),Ft.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(fe.RGB)&&r!==void 0?r:(this._ensureRGB(),Ft.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(fe.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(fe.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(fe.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(fe.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(fe.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(fe.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const go=new Ty({r:0,g:0,b:0,a:0},"transparent"),mi={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(mi.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,o=s%4===0,a=s>4,n=a?1:17,l=a?8:4,c=o?0:-1,h=a?255:15;return go.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:o?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${Lr[Math.round(t)]}${Lr[Math.round(r)]}${Lr[Math.round(i)]}${Lr[Math.round(s*255)]}`:`#${Lr[Math.round(t)]}${Lr[Math.round(r)]}${Lr[Math.round(i)]}`}},Hr={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(Hr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return Ft.channel.clamp.h(parseFloat(r)*.9);case"rad":return Ft.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Ft.channel.clamp.h(parseFloat(r)*360)}}return Ft.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Hr.re);if(!r)return;const[,i,s,o,a,n]=r;return go.set({h:Hr._hue2deg(i),s:Ft.channel.clamp.s(parseFloat(s)),l:Ft.channel.clamp.l(parseFloat(o)),a:a?Ft.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${Ft.lang.round(t)}, ${Ft.lang.round(r)}%, ${Ft.lang.round(i)}%, ${s})`:`hsl(${Ft.lang.round(t)}, ${Ft.lang.round(r)}%, ${Ft.lang.round(i)}%)`}},Qi={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=Qi.colors[e];if(t)return mi.parse(t)},stringify:e=>{const t=mi.stringify(e);for(const r in Qi.colors)if(Qi.colors[r]===t)return r}},ji={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(ji.re);if(!r)return;const[,i,s,o,a,n,l,c,h]=r;return go.set({r:Ft.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:Ft.channel.clamp.g(a?parseFloat(o)*2.55:parseFloat(o)),b:Ft.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?Ft.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${Ft.lang.round(t)}, ${Ft.lang.round(r)}, ${Ft.lang.round(i)}, ${Ft.lang.round(s)})`:`rgb(${Ft.lang.round(t)}, ${Ft.lang.round(r)}, ${Ft.lang.round(i)})`}},rr={format:{keyword:Qi,hex:mi,rgb:ji,rgba:ji,hsl:Hr,hsla:Hr},parse:e=>{if(typeof e!="string")return e;const t=mi.parse(e)||ji.parse(e)||Hr.parse(e)||Qi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(fe.HSL)||e.data.r===void 0?Hr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?ji.stringify(e):mi.stringify(e)},Ad=(e,t)=>{const r=rr.parse(e);for(const i in t)r[i]=Ft.channel.clamp[i](t[i]);return rr.stringify(r)},Ar=(e,t,r=0,i=1)=>{if(typeof e!="number")return Ad(e,{a:t});const s=go.set({r:Ft.channel.clamp.r(e),g:Ft.channel.clamp.g(t),b:Ft.channel.clamp.b(r),a:Ft.channel.clamp.a(i)});return rr.stringify(s)},Sy=e=>{const{r:t,g:r,b:i}=rr.parse(e),s=.2126*Ft.channel.toLinear(t)+.7152*Ft.channel.toLinear(r)+.0722*Ft.channel.toLinear(i);return Ft.lang.round(s)},wy=e=>Sy(e)>=.5,Ye=e=>!wy(e),Md=(e,t,r)=>{const i=rr.parse(e),s=i[t],o=Ft.channel.clamp[t](s+r);return s!==o&&(i[t]=o),rr.stringify(i)},z=(e,t)=>Md(e,"l",t),W=(e,t)=>Md(e,"l",-t),b=(e,t)=>{const r=rr.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return Ad(e,i)},_y=(e,t,r=50)=>{const{r:i,g:s,b:o,a}=rr.parse(e),{r:n,g:l,b:c,a:h}=rr.parse(t),d=r/100,f=d*2-1,g=a-h,y=((f*g===-1?f:(f+g)/(1+f*g))+1)/2,C=1-y,x=i*y+n*C,k=s*y+l*C,S=o*y+c*C,_=a*d+h*(1-d);return Ar(x,k,S,_)},A=(e,t=100)=>{const r=rr.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,_y(r,e,t)};/*! @license DOMPurify 3.4.16 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.16/LICENSE */function ih(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function By(e){if(Array.isArray(e))return e}function vy(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,o,a,n=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(l=(i=o.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(h){c=!0,s=h}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw s}}return n}}function Ly(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function Fy(e,t){return By(e)||vy(e,t)||Ey(e,t)||Ly()}function Ey(e,t){if(e){if(typeof e=="string")return ih(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ih(e,t):void 0}}const $d=Object.entries,sh=Object.setPrototypeOf,Ay=Object.isFrozen,My=Object.getPrototypeOf,$y=Object.getOwnPropertyDescriptor;let se=Object.freeze,ae=Object.seal,di=Object.create,Od=typeof Reflect<"u"&&Reflect,qa=Od.apply,Na=Od.construct;se||(se=function(t){return t});ae||(ae=function(t){return t});qa||(qa=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),o=2;o<i;o++)s[o-2]=arguments[o];return t.apply(r,s)});Na||(Na=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return new t(...i)});const Nr=re(Array.prototype.forEach),Oy=re(Array.prototype.lastIndexOf),oh=re(Array.prototype.pop),Oi=re(Array.prototype.push),Dy=re(Array.prototype.splice),yi=Array.isArray,Yi=re(String.prototype.toLowerCase),Yo=re(String.prototype.toString),ah=re(String.prototype.match),Di=re(String.prototype.replace),nh=re(String.prototype.indexOf),Py=re(String.prototype.trim),Iy=re(Number.prototype.toString),Ry=re(Boolean.prototype.toString),lh=typeof BigInt>"u"?null:re(BigInt.prototype.toString),hh=typeof Symbol>"u"?null:re(Symbol.prototype.toString),Be=re(Object.prototype.hasOwnProperty),Pi=re(Object.prototype.toString),ue=re(RegExp.prototype.test),_r=qy(TypeError);function re(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return qa(e,t,i)}}function qy(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Na(e,r)}}function zt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Yi;if(sh&&sh(e,null),!yi(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const o=r(s);o!==s&&(Ay(t)||(t[i]=o),s=o)}e[s]=!0}return e}function Ny(e){for(let t=0;t<e.length;t++)Be(e,t)||(e[t]=null);return e}function $e(e){const t=di(null);for(const i of $d(e)){var r=Fy(i,2);const s=r[0],o=r[1];Be(e,s)&&(yi(o)?t[s]=Ny(o):o&&typeof o=="object"&&o.constructor===Object?t[s]=$e(o):t[s]=o)}return t}function zy(e){switch(typeof e){case"string":return e;case"number":return Iy(e);case"boolean":return Ry(e);case"bigint":return lh?lh(e):"0";case"symbol":return hh?hh(e):"Symbol()";case"undefined":return Pi(e);case"function":case"object":{if(e===null)return Pi(e);const t=e,r=Pe(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:Pi(i)}return Pi(e)}default:return Pi(e)}}function Pe(e,t){for(;e!==null;){const i=$y(e,t);if(i){if(i.get)return re(i.get);if(typeof i.value=="function")return re(i.value)}e=My(e)}function r(){return null}return r}function Wy(e){try{return ue(e,""),!0}catch{return!1}}const ch=se(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Uo=se(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Go=se(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Hy=se(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Xo=se(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),jy=se(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dh=se(["#text"]),uh=se(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Vo=se(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),fh=se(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),_s=se(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Yy=ae(/{{[\w\W]*|^[\w\W]*}}/g),Uy=ae(/<%[\w\W]*|^[\w\W]*%>/g),Gy=ae(/\${[\w\W]*/g),Xy=ae(/^data-[\-\w.\u00B7-\uFFFF]+$/),Vy=ae(/^aria-[\-\w]+$/),ph=ae(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Zy=ae(/^(?:\w+script|data):/i),Ky=ae(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Qy=ae(/^html$/i),Jy=ae(/^[a-z][.\w]*(-[.\w]+)+$/i),gh=ae(/<[/\w!]/g),mh=ae(/<[/\w]/g),tC=ae(/<\/no(script|embed|frames)/i),eC=ae(/\/>/i),Ae={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Dd=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],rC=se(zt({},Dd)),iC=(function(){const e={};return Nr(Dd,t=>{e[t]=ae(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),se(e)})(),sC=function(){return typeof window>"u"?null:window},oC=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(i=r.getAttribute(s));const o="dompurify"+(i?"#"+i:"");try{return t.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},yh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Br=function(t,r,i,s){return Be(t,r)&&yi(t[r])?zt(s.base?$e(s.base):{},t[r],s.transform):i},Zo=function(t,r,i){const s=Be(t,r)?t[r]:void 0;return s&&typeof s=="object"?$e(s):i()};function Pd(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:sC();const t=ot=>Pd(ot);if(t.version="3.4.16",t.removed=[],!e||!e.document||e.document.nodeType!==Ae.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript;e.DocumentFragment;const o=e.HTMLTemplateElement,a=e.Node,n=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,h=e.trustedTypes,d=n.prototype,f=Pe(d,"cloneNode"),g=Pe(d,"remove"),m=Pe(d,"removeAttributeNode"),y=Pe(d,"nextSibling"),C=Pe(d,"childNodes"),x=Pe(d,"parentNode"),k=Pe(d,"shadowRoot"),S=Pe(d,"attributes"),_=a&&a.prototype?Pe(a.prototype,"nodeType"):null,B=a&&a.prototype?Pe(a.prototype,"nodeName"):null,L=a&&a.prototype?Pe(a.prototype,"ownerDocument"):null,E=function(w){return _?_(w):w.nodeType},F=function(w){return B?B(w):w.nodeName};if(typeof o=="function"){const ot=r.createElement("template");ot.content&&ot.content.ownerDocument&&(r=ot.content.ownerDocument)}let G,j="",q,st=!1,Y=0;const O=function(){if(Y>0)throw _r('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},D=function(w){O(),Y++;try{return G.createHTML(w)}finally{Y--}},v=function(w){O(),Y++;try{return G.createScriptURL(w)}finally{Y--}},N=function(){return st||(q=oC(h,s),st=!0),q},P=r,it=P.implementation,Q=P.createNodeIterator,mt=P.createDocumentFragment,wt=P.getElementsByTagName,St=i.importNode;let ft=yh();t.isSupported=typeof $d=="function"&&typeof x=="function"&&it&&it.createHTMLDocument!==void 0;const Lt=Yy,gt=Uy,Tt=Gy,Mt=Xy,vt=Vy,Nt=Zy,Wt=Ky,ne=Jy;let Se=ph,Pt=null;const lr=zt({},[...ch,...Uo,...Go,...Xo,...dh]);let jt=null;const we=zt({},[...uh,...Vo,...fh,..._s]);let le=Object.seal(di(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ne=null,hr=null;const Ce=Object.seal(di(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Tr=!0,xe=!0,Sr=!1,cr=!0,be=!1,Fe=!0,p=!1,M=!1,U=null,V=null,H=!1,et=!1,T=!1,I=!1,J=!0,X=!1;const Z="user-content-";let tt=!0,K=!1,ht={},lt=null;const yt=zt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let bt=null;const $t=zt({},["audio","video","img","source","image","track"]);let Ut=null;const Ai=zt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ge="http://www.w3.org/1998/Math/MathML",Xe="http://www.w3.org/2000/svg",Ve="http://www.w3.org/1999/xhtml";let ri=Ve,Io=!1,Ro=null;const Qm=zt({},[Ge,Xe,Ve],Yo),zl=se(["mi","mo","mn","ms","mtext"]);let qo=zt({},zl);const Wl=se(["annotation-xml"]);let No=zt({},Wl);const Jm=zt({},["title","style","font","a","script"]);let Mi=null;const ty=["application/xhtml+xml","text/html"],ey="text/html";let Qt=null,ii=null;const ry=r.createElement("form"),Hl=function(w){return w instanceof RegExp||w instanceof Function},zo=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ii&&ii===w)return;(!w||typeof w!="object")&&(w={}),w=$e(w),Mi=ty.indexOf(w.PARSER_MEDIA_TYPE)===-1?ey:w.PARSER_MEDIA_TYPE,Qt=Mi==="application/xhtml+xml"?Yo:Yi,Pt=Br(w,"ALLOWED_TAGS",lr,{transform:Qt}),jt=Br(w,"ALLOWED_ATTR",we,{transform:Qt}),Ro=Br(w,"ALLOWED_NAMESPACES",Qm,{transform:Yo}),Ut=Br(w,"ADD_URI_SAFE_ATTR",Ai,{transform:Qt,base:Ai}),bt=Br(w,"ADD_DATA_URI_TAGS",$t,{transform:Qt,base:$t}),lt=Br(w,"FORBID_CONTENTS",yt,{transform:Qt}),Ne=Br(w,"FORBID_TAGS",$e({}),{transform:Qt}),hr=Br(w,"FORBID_ATTR",$e({}),{transform:Qt}),ht=Be(w,"USE_PROFILES")?w.USE_PROFILES&&typeof w.USE_PROFILES=="object"?$e(w.USE_PROFILES):w.USE_PROFILES:!1,Tr=w.ALLOW_ARIA_ATTR!==!1,xe=w.ALLOW_DATA_ATTR!==!1,Sr=w.ALLOW_UNKNOWN_PROTOCOLS||!1,cr=w.ALLOW_SELF_CLOSE_IN_ATTR!==!1,be=w.SAFE_FOR_TEMPLATES||!1,Fe=w.SAFE_FOR_XML!==!1,p=w.WHOLE_DOCUMENT||!1,et=w.RETURN_DOM||!1,T=w.RETURN_DOM_FRAGMENT||!1,I=w.RETURN_TRUSTED_TYPE||!1,H=w.FORCE_BODY||!1,J=w.SANITIZE_DOM!==!1,X=w.SANITIZE_NAMED_PROPS||!1,tt=w.KEEP_CONTENT!==!1,K=w.IN_PLACE||!1,Se=Wy(w.ALLOWED_URI_REGEXP)?w.ALLOWED_URI_REGEXP:ph,ri=typeof w.NAMESPACE=="string"?w.NAMESPACE:Ve,qo=Zo(w,"MATHML_TEXT_INTEGRATION_POINTS",()=>zt({},zl)),No=Zo(w,"HTML_INTEGRATION_POINTS",()=>zt({},Wl));const $=Zo(w,"CUSTOM_ELEMENT_HANDLING",()=>di(null));if(le=di(null),Be($,"tagNameCheck")&&Hl($.tagNameCheck)&&(le.tagNameCheck=$.tagNameCheck),Be($,"attributeNameCheck")&&Hl($.attributeNameCheck)&&(le.attributeNameCheck=$.attributeNameCheck),Be($,"allowCustomizedBuiltInElements")&&typeof $.allowCustomizedBuiltInElements=="boolean"&&(le.allowCustomizedBuiltInElements=$.allowCustomizedBuiltInElements),ae(le),be&&(xe=!1),T&&(et=!0),ht&&(Pt=zt({},dh),jt=di(null),ht.html===!0&&(zt(Pt,ch),zt(jt,uh)),ht.svg===!0&&(zt(Pt,Uo),zt(jt,Vo),zt(jt,_s)),ht.svgFilters===!0&&(zt(Pt,Go),zt(jt,Vo),zt(jt,_s)),ht.mathMl===!0&&(zt(Pt,Xo),zt(jt,fh),zt(jt,_s))),Ce.tagCheck=null,Ce.attributeCheck=null,Be(w,"ADD_TAGS")&&(typeof w.ADD_TAGS=="function"?Ce.tagCheck=w.ADD_TAGS:yi(w.ADD_TAGS)&&(Pt===lr&&(Pt=$e(Pt)),zt(Pt,w.ADD_TAGS,Qt))),Be(w,"ADD_ATTR")&&(typeof w.ADD_ATTR=="function"?Ce.attributeCheck=w.ADD_ATTR:yi(w.ADD_ATTR)&&(jt===we&&(jt=$e(jt)),zt(jt,w.ADD_ATTR,Qt))),Be(w,"ADD_FORBID_CONTENTS")&&yi(w.ADD_FORBID_CONTENTS)&&(lt===yt&&(lt=$e(lt)),zt(lt,w.ADD_FORBID_CONTENTS,Qt)),tt&&(Pt["#text"]=!0),p&&zt(Pt,["html","head","body"]),Pt.table&&(zt(Pt,["tbody"]),delete Ne.tbody),w.TRUSTED_TYPES_POLICY){if(typeof w.TRUSTED_TYPES_POLICY.createHTML!="function")throw _r('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof w.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw _r('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const rt=G;G=w.TRUSTED_TYPES_POLICY;try{j=D("")}catch(at){throw G=rt,at}}else w.TRUSTED_TYPES_POLICY===null?(G=void 0,j=""):(G===void 0&&(G=N()),G&&typeof j=="string"&&(j=D("")));se&&se(w),ii=w},jl=zt({},[...Uo,...Go,...Hy]),Yl=zt({},[...Xo,...jy]),iy=function(w,$,rt){return $.namespaceURI===Ve?w==="svg":$.namespaceURI===Ge?w==="svg"&&(rt==="annotation-xml"||qo[rt]):!!jl[w]},sy=function(w,$,rt){return $.namespaceURI===Ve?w==="math":$.namespaceURI===Xe?w==="math"&&No[rt]:!!Yl[w]},oy=function(w,$,rt){return $.namespaceURI===Xe&&!No[rt]||$.namespaceURI===Ge&&!qo[rt]?!1:!Yl[w]&&(Jm[w]||!jl[w])},ay=function(w){let $=x(w);(!$||!$.tagName)&&($={namespaceURI:ri,tagName:"template"});const rt=Yi(w.tagName),at=Yi($.tagName);return Ro[w.namespaceURI]?w.namespaceURI===Xe?iy(rt,$,at):w.namespaceURI===Ge?sy(rt,$,at):w.namespaceURI===Ve?oy(rt,$,at):!!(Mi==="application/xhtml+xml"&&Ro[w.namespaceURI]):!1},wr=function(w){Oi(t.removed,{element:w});try{x(w).removeChild(w)}catch{if(g(w),!x(w))throw _r("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Ul=function(w,$,rt){try{m(w,$)}catch{try{w.removeAttribute(rt)}catch{}}},xs=function(w){bs(w);const $=C(w);if($){const at=[];Nr($,kt=>{Oi(at,kt)}),Nr(at,kt=>{try{g(kt)}catch{}})}const rt=S(w);if(rt)for(let at=rt.length-1;at>=0;--at){const kt=rt[at],Dt=kt&&kt.name;typeof Dt=="string"&&Ul(w,kt,Dt)}},Pr=function(w,$,rt){if(!rt)try{rt=$.getAttributeNode(w)}catch{rt=null}Oi(t.removed,{attribute:rt||null,from:$});try{rt?m($,rt):$.removeAttribute(w)}catch{try{$.removeAttribute(w)}catch{}}if(w==="is")if(et||T)try{wr($)}catch{}else try{$.setAttribute(w,"")}catch{}},ny=function(w){const $=S(w);if($)for(let rt=$.length-1;rt>=0;--rt){const at=$[rt],kt=at&&at.name;typeof kt!="string"||jt[Qt(kt)]||Ul(w,at,kt)}},bs=function(w){const $=[w];for(;$.length>0;){const rt=$.pop();E(rt)===Ae.element&&ny(rt);const at=C(rt);if(at)for(let kt=at.length-1;kt>=0;--kt)$.push(at[kt])}},Gl=function(w,$){return Fe?w==="patchsrc"?!0:w==="for"&&$!=="label"&&$!=="output":!1},ly=function(w){if(!Fe)return;const $=[w];for(;$.length>0;){const rt=$.pop(),at=E(rt);if(at===Ae.processingInstruction||at===Ae.comment&&ue(mh,rt.data)){try{g(rt)}catch{}continue}if(at===Ae.element){const Dt=rt,qt=Qt(F(rt));try{Dt.hasAttribute&&Dt.hasAttribute("patchsrc")&&Dt.removeAttribute("patchsrc"),Dt.hasAttribute&&Dt.hasAttribute("for")&&Gl("for",qt)&&Dt.removeAttribute("for")}catch{}}const kt=C(rt);if(kt)for(let Dt=kt.length-1;Dt>=0;--Dt)$.push(kt[Dt])}},Xl=function(w){let $=null,rt=null;if(H)w="<remove></remove>"+w;else{const Dt=ah(w,/^[\r\n\t ]+/);rt=Dt&&Dt[0]}Mi==="application/xhtml+xml"&&ri===Ve&&(w='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+w+"</body></html>");const at=G?D(w):w;if(ri===Ve)try{$=new c().parseFromString(at,Mi)}catch{}if(!$||!$.documentElement){$=it.createDocument(ri,"template",null);try{$.documentElement.innerHTML=Io?j:at}catch{}}const kt=$.body||$.documentElement;return w&&rt&&kt.insertBefore(r.createTextNode(rt),kt.childNodes[0]||null),ri===Ve?wt.call($,p?"html":"body")[0]:p?$.documentElement:kt},Vl=function(w){const $=L?L(w):w.ownerDocument;return Q.call($||w,w,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},ks=function(w){return w=Di(w,Lt," "),w=Di(w,gt," "),w=Di(w,Tt," "),w},Wo=function(w){var $;w.normalize();const rt=L?L(w):w.ownerDocument,at=Q.call(rt||w,w,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let kt=at.nextNode();for(;kt;)kt.data=ks(kt.data),kt=at.nextNode();const Dt=($=w.querySelectorAll)===null||$===void 0?void 0:$.call(w,"template");Dt&&Nr(Dt,qt=>{si(qt.content)&&Wo(qt.content)})},Ts=function(w){const $=B?B(w):null;return typeof $!="string"||Qt($)!=="form"?!1:typeof w.nodeName!="string"||typeof w.textContent!="string"||typeof w.removeChild!="function"||w.attributes!==S(w)||typeof w.removeAttribute!="function"||typeof w.removeAttributeNode!="function"||typeof w.getAttributeNode!="function"||typeof w.setAttribute!="function"||typeof w.namespaceURI!="string"||typeof w.insertBefore!="function"||typeof w.hasChildNodes!="function"||w.nodeType!==_(w)||w.childNodes!==C(w)},si=function(w){if(!_||typeof w!="object"||w===null)return!1;try{return _(w)===Ae.documentFragment}catch{return!1}},$i=function(w){if(!_||typeof w!="object"||w===null)return!1;try{return typeof _(w)=="number"}catch{return!1}};function Ze(ot,w,$){ot.length!==0&&Nr(ot,rt=>{rt.call(t,w,$,ii)})}const hy=function(w,$){return!!(Fe&&w.hasChildNodes()&&!$i(w.firstElementChild)&&ue(gh,w.textContent)&&ue(gh,w.innerHTML)||Fe&&w.namespaceURI===Ve&&rC[$]&&($i(w.firstElementChild)||typeof w.textContent=="string"&&ue(iC[$],w.textContent))||w.nodeType===Ae.processingInstruction||Fe&&w.nodeType===Ae.comment&&ue(mh,w.data))},Ss=function(w,$){if(w instanceof RegExp)return ue(w,$);if(w instanceof Function){for(var rt=arguments.length,at=new Array(rt>2?rt-2:0),kt=2;kt<rt;kt++)at[kt-2]=arguments[kt];return!!w($,...at)}return!1},cy=function(w,$,rt){if(!Ne[$]&&Jl($)&&Ss(le.tagNameCheck,$))return!1;if(tt&&!lt[$]){const at=x(w),kt=C(w);if(kt&&at){const Dt=kt.length;for(let qt=Dt-1;qt>=0;--qt){const Zt=w===rt?f(kt[qt],!0):kt[qt];at.insertBefore(Zt,y(w))}}}return wr(w),!0},Zl=function(w,$,rt,at){return w.length===0?$:$===rt||$===at?$e($):$},oi=function(w,$){return w===$||x(w)!==null?!1:(K&&bs(w),!0)},Kl=function(w,$){if(Ze(ft.beforeSanitizeElements,w,null),oi(w,$))return!0;if(Ts(w))return wr(w),!0;const rt=Qt(F(w));if(Pt=Zl(ft.uponSanitizeElement,Pt,lr,U),Ze(ft.uponSanitizeElement,w,{tagName:rt,allowedTags:Pt}),oi(w,$))return!0;if(hy(w,rt))return wr(w),!0;if(Ne[rt]||!(Ce.tagCheck instanceof Function&&Ce.tagCheck(rt))&&!Pt[rt]){const at=cy(w,rt,$);return at===!1&&(Ze(ft.afterSanitizeElements,w,null),oi(w,$))?!0:at}if(E(w)===Ae.element&&!ay(w)||(rt==="noscript"||rt==="noembed"||rt==="noframes")&&ue(tC,w.innerHTML))return wr(w),!0;if(be&&w.nodeType===Ae.text){const at=ks(w.textContent);w.textContent!==at&&(Oi(t.removed,{element:w.cloneNode()}),w.textContent=at)}return Ze(ft.afterSanitizeElements,w,null),oi(w,$)},Ql=function(w,$,rt){if(hr[$]||Gl($,w)||J&&($==="id"||$==="name")&&(rt in r||rt in ry))return!1;const at=jt[$]||Ce.attributeCheck instanceof Function&&Ce.attributeCheck($,w);return xe&&ue(Mt,$)||Tr&&ue(vt,$)?!0:at?Ut[$]||ue(Se,Di(rt,Wt,""))||($==="src"||$==="xlink:href"||$==="href")&&w!=="script"&&nh(rt,"data:")===0&&bt[w]||Sr&&!ue(Nt,Di(rt,Wt,""))?!0:!rt:Jl(w)&&Ss(le.tagNameCheck,w)&&Ss(le.attributeNameCheck,$,w)||$==="is"&&le.allowCustomizedBuiltInElements&&Ss(le.tagNameCheck,rt)},dy=zt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Jl=function(w){return!dy[Yi(w)]&&ue(ne,w)},uy=function(w,$,rt,at){if(G&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!rt)switch(h.getAttributeType(w,$)){case"TrustedHTML":return D(at);case"TrustedScriptURL":return v(at)}return at},fy=function(w,$,rt,at){try{return rt?w.setAttributeNS(rt,$,at):w.setAttribute($,at),Ts(w)?(wr(w),!1):!0}catch{return Pr($,w),!1}},th=function(w,$){if(Ze(ft.beforeSanitizeAttributes,w,null),oi(w,$))return;const rt=w.attributes;if(!rt||Ts(w))return;jt=Zl(ft.uponSanitizeAttribute,jt,we,V);const at={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:jt,forceKeepAttr:void 0};let kt=rt.length;const Dt=Qt(w.nodeName);for(;kt--;){const qt=rt[kt],Zt=qt.name,Oe=qt.namespaceURI,Ee=qt.value,ai=Qt(Zt),jo=Ee;let ke=Zt==="value"?jo:Py(jo),eh=!1;if(at.attrName=ai,at.attrValue=ke,at.keepAttr=!0,at.forceKeepAttr=void 0,Ze(ft.uponSanitizeAttribute,w,at),ke=at.attrValue,X&&(ai==="id"||ai==="name")&&nh(ke,Z)!==0&&(Pr(Zt,w,qt),ke=Z+ke,eh=!0),Fe&&ue(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ke)){Pr(Zt,w,qt);continue}if(ai==="attributename"&&ah(ke,"href")){Pr(Zt,w,qt);continue}if(!at.forceKeepAttr){if(!at.keepAttr){Pr(Zt,w,qt);continue}if(!cr&&ue(eC,ke)){Pr(Zt,w,qt);continue}if(be&&(ke=ks(ke)),!Ql(Dt,ai,ke)){Pr(Zt,w,qt);continue}ke=uy(Dt,ai,Oe,ke),ke!==jo&&fy(w,Zt,Oe,ke)&&eh&&oh(t.removed)}}Ze(ft.afterSanitizeAttributes,w,null),oi(w,$)},ws=function(w){let $=null;const rt=Vl(w);for(Ze(ft.beforeSanitizeShadowDOM,w,null);$=rt.nextNode();)if(Ze(ft.uponSanitizeShadowNode,$,null),Kl($,w),th($,w),si($.content)&&ws($.content),E($)===Ae.element){const at=k($);si(at)&&(Ho(at),ws(at))}Ze(ft.afterSanitizeShadowDOM,w,null)},Ho=function(w){const $=[{node:w,shadow:null}];for(;$.length>0;){const rt=$.pop();if(rt.shadow){ws(rt.shadow);continue}const at=rt.node,kt=E(at)===Ae.element,Dt=C(at);if(Dt)for(let qt=Dt.length-1;qt>=0;--qt)$.push({node:Dt[qt],shadow:null});if(kt){const qt=B?B(at):null;if(typeof qt=="string"&&Qt(qt)==="template"){const Zt=at.content;si(Zt)&&$.push({node:Zt,shadow:null})}}if(kt){const qt=k(at);si(qt)&&$.push({node:null,shadow:qt},{node:qt,shadow:null})}}};return t.sanitize=function(ot){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$=null,rt=null,at=null,kt=null;if(Io=!ot,Io&&(ot="<!-->"),typeof ot!="string"&&!$i(ot)&&(ot=zy(ot),typeof ot!="string"))throw _r("dirty is not a string, aborting");if(!t.isSupported)return ot;M?(Pt=U,jt=V):zo(w),(ft.uponSanitizeElement.length>0||ft.uponSanitizeAttribute.length>0)&&(Pt=$e(Pt)),ft.uponSanitizeAttribute.length>0&&(jt=$e(jt)),t.removed=[];const Dt=K&&typeof ot!="string"&&$i(ot);if(Dt){ly(ot);const Oe=F(ot);if(typeof Oe=="string"){const Ee=Qt(Oe);if(!Pt[Ee]||Ne[Ee])throw xs(ot),_r("root node is forbidden and cannot be sanitized in-place")}if(Ts(ot))throw xs(ot),_r("root node is clobbered and cannot be sanitized in-place");try{Ho(ot)}catch(Ee){throw xs(ot),Ee}}else if($i(ot))$=Xl("<!---->"),rt=$.ownerDocument.importNode(ot,!0),rt.nodeType===Ae.element&&rt.nodeName==="BODY"||rt.nodeName==="HTML"?$=rt:$.appendChild(rt),Ho($);else{if(!et&&!be&&!p&&ot.indexOf("<")===-1)return G&&I?D(ot):ot;if($=Xl(ot),!$)return et?null:I?j:""}$&&H&&wr($.firstChild);const qt=Dt?ot:$;try{const Oe=Vl(qt);for(;at=Oe.nextNode();)Kl(at,qt),th(at,qt),si(at.content)&&ws(at.content)}catch(Oe){throw Dt&&(xs(ot),Nr(t.removed,Ee=>{Ee.element&&bs(Ee.element)})),Oe}if(Dt){let Oe=!1;if(Nr(t.removed,Ee=>{Ee.element&&(Ee.element===ot&&(Oe=!0),bs(Ee.element))}),Oe)throw _r("a node selected for removal could not be safely returned; refusing to sanitize in place");return be&&Wo(ot),ot}if(et){if(be&&Wo($),T)for(kt=mt.call($.ownerDocument);$.firstChild;)kt.appendChild($.firstChild);else kt=$;return(jt.shadowroot||jt.shadowrootmode)&&(kt=St.call(i,kt,!0)),kt}let Zt=p?$.outerHTML:$.innerHTML;return p&&Pt["!doctype"]&&$.ownerDocument&&$.ownerDocument.doctype&&$.ownerDocument.doctype.name&&ue(Qy,$.ownerDocument.doctype.name)&&(Zt="<!DOCTYPE "+$.ownerDocument.doctype.name+`>
4
- `+Zt),be&&(Zt=ks(Zt)),G&&I?D(Zt):Zt},t.setConfig=function(){let ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};zo(ot),M=!0,U=Pt,V=jt},t.clearConfig=function(){ii=null,M=!1,U=null,V=null,G=q,j=""},t.isValidAttribute=function(ot,w,$){ii||zo({});const rt=Qt(ot),at=Qt(w);return Ql(rt,at,$)},t.addHook=function(ot,w){typeof w=="function"&&Be(ft,ot)&&Oi(ft[ot],w)},t.removeHook=function(ot,w){if(Be(ft,ot)){if(w!==void 0){const $=Oy(ft[ot],w);return $===-1?void 0:Dy(ft[ot],$,1)[0]}return oh(ft[ot])}},t.removeHooks=function(ot){Be(ft,ot)&&(ft[ot]=[])},t.removeAllHooks=function(){ft=yh()},t}var bi=Pd(),za=u((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>za(e,s,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(s=>{e.includes(s)||e.push(s)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const s=e;Object.entries(t).forEach(([o,a])=>{if(typeof a=="object"){if(a===null)return;Object.hasOwn(e,o)||Object.defineProperty(e,o,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[o]===void 0&&(s[o]=Array.isArray(a)?[]:{}),typeof s[o]=="object"&&(s[o]=za(s[o],a,{depth:r-1}))}else typeof s[o]!="object"&&(Object.hasOwn(e,o)?s[o]=a:Object.defineProperty(e,o,{value:a,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),oe=za,sr="#ffffff",or="#f2f2f2",Bt=u((e,t)=>t?b(e,{s:-40,l:10}):b(e,{s:-40,l:-10}),"mkBorder"),aC=class{static{u(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Bt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Bt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||A(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||A(this.tertiaryColor),this.lineColor=this.lineColor||A(this.background),this.arrowheadColor=this.arrowheadColor||A(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?W(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||W(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||A(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||z(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||W(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||W(this.mainBkg,10)):(this.rowOdd=this.rowOdd||z(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||z(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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=W(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=W(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||A(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||W(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ye(this.quadrant1Fill)?z(this.quadrant1Fill):W(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?W(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||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)),this.gitInv0=this.gitInv0||A(this.git0),this.gitInv1=this.gitInv1||A(this.git1),this.gitInv2=this.gitInv2||A(this.git2),this.gitInv3=this.gitInv3||A(this.git3),this.gitInv4=this.gitInv4||A(this.git4),this.gitInv5=this.gitInv5||A(this.git5),this.gitInv6=this.gitInv6||A(this.git6),this.gitInv7=this.gitInv7||A(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||or,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},nC=u(e=>{const t=new aC;return t.calculate(e),t},"getThemeVariables"),lC=class{static{u(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=A(this.background),this.secondaryBorderColor=Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=A(this.primaryColor),this.secondaryTextColor=A(this.secondaryColor),this.tertiaryTextColor=A(this.tertiaryColor),this.lineColor=A(this.background),this.textColor=A(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(A("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ar(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=W("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=W(this.sectionBkgColor,10),this.taskBorderColor=Ar(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ar(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||z(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||W(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=z(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=z(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=z(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=A(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||A(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||z(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||b(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this["surfacePeer"+e]=this["surfacePeer"+e]||b(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let e=0;e<8;e++)this["venn"+(e+1)]=this["venn"+(e+1)]??z(this["cScale"+e],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ye(this.quadrant1Fill)?z(this.quadrant1Fill):W(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?W(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=z(this.secondaryColor,20),this.git1=z(this.pie2||this.secondaryColor,20),this.git2=z(this.pie3||this.tertiaryColor,20),this.git3=z(this.pie4||b(this.primaryColor,{h:-30}),20),this.git4=z(this.pie5||b(this.primaryColor,{h:-60}),20),this.git5=z(this.pie6||b(this.primaryColor,{h:-90}),10),this.git6=z(this.pie7||b(this.primaryColor,{h:60}),10),this.git7=z(this.pie8||b(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||A(this.git0),this.gitInv1=this.gitInv1||A(this.git1),this.gitInv2=this.gitInv2||A(this.git2),this.gitInv3=this.gitInv3||A(this.git3),this.gitInv4=this.gitInv4||A(this.git4),this.gitInv5=this.gitInv5||A(this.git5),this.gitInv6=this.gitInv6||A(this.git6),this.gitInv7=this.gitInv7||A(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||A(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||A(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||z("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||z("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||z("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||z("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||z(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||z(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||z(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||z(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},hC=u(e=>{const t=new lC;return t.calculate(e),t},"getThemeVariables"),cC=class{static{u(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=b(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=A(this.primaryColor),this.secondaryTextColor=A(this.secondaryColor),this.tertiaryTextColor=A(this.tertiaryColor),this.lineColor=A(this.background),this.textColor=A(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Bt(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Ar(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||W(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||W(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=W(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||W(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||b(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||b(this.mainBkg,{h:30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||b(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||A(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||A(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||z(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||z(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=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||b(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||b(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ye(this.quadrant1Fill)?z(this.quadrant1Fill):W(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)),this.gitInv0=this.gitInv0||W(A(this.git0),25),this.gitInv1=this.gitInv1||A(this.git1),this.gitInv2=this.gitInv2||A(this.git2),this.gitInv3=this.gitInv3||A(this.git3),this.gitInv4=this.gitInv4||A(this.git4),this.gitInv5=this.gitInv5||A(this.git5),this.gitInv6=this.gitInv6||A(this.git6),this.gitInv7=this.gitInv7||A(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||A(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||A(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||or}calculate(e){if(Object.keys(this).forEach(r=>{this[r]==="calculated"&&(this[r]=void 0)}),typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},dC=u(e=>{const t=new cC;return t.calculate(e),t},"getThemeVariables"),uC=class{static{u(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=z("#cde498",10),this.primaryBorderColor=Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=A(this.primaryColor),this.secondaryTextColor=A(this.secondaryColor),this.tertiaryTextColor=A(this.primaryColor),this.lineColor=A(this.background),this.textColor=A(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=W(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||W(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||W(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=W(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||W(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||b(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||b(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||b(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||z(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||z(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=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(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||b(this.primaryColor,{l:-30}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ye(this.quadrant1Fill)?z(this.quadrant1Fill):W(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)),this.gitInv0=this.gitInv0||A(this.git0),this.gitInv1=this.gitInv1||A(this.git1),this.gitInv2=this.gitInv2||A(this.git2),this.gitInv3=this.gitInv3||A(this.git3),this.gitInv4=this.gitInv4||A(this.git4),this.gitInv5=this.gitInv5||A(this.git5),this.gitInv6=this.gitInv6||A(this.git6),this.gitInv7=this.gitInv7||A(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||A(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||A(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||or}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},fC=u(e=>{const t=new uC;return t.calculate(e),t},"getThemeVariables"),pC=class{static{u(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=z(this.contrast,55),this.background="#ffffff",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=A(this.primaryColor),this.secondaryTextColor=A(this.secondaryColor),this.tertiaryTextColor=A(this.tertiaryColor),this.lineColor=A(this.background),this.textColor=A(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||z(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=z(this.contrast,55),this.border2=this.contrast,this.actorBorder=z(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||A(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||z(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||W(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||b(this.mainBkg,{l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||b(this.mainBkg,{l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=z(this.contrast,30),this.sectionBkgColor2=z(this.contrast,30),this.taskBorderColor=W(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=z(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=W(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=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let e=0;e<8;e++)this["venn"+(e+1)]=this["venn"+(e+1)]??this["cScale"+e];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ye(this.quadrant1Fill)?z(this.quadrant1Fill):W(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=W(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||b(this.primaryColor,{h:-30}),this.git4=this.pie5||b(this.primaryColor,{h:-60}),this.git5=this.pie6||b(this.primaryColor,{h:-90}),this.git6=this.pie7||b(this.primaryColor,{h:60}),this.git7=this.pie8||b(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||A(this.git0),this.gitInv1=this.gitInv1||A(this.git1),this.gitInv2=this.gitInv2||A(this.git2),this.gitInv3=this.gitInv3||A(this.git3),this.gitInv4=this.gitInv4||A(this.git4),this.gitInv5=this.gitInv5||A(this.git5),this.gitInv6=this.gitInv6||A(this.git6),this.gitInv7=this.gitInv7||A(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||or}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},gC=u(e=>{const t=new pC;return t.calculate(e),t},"getThemeVariables"),mC=class{static{u(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=Bt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Bt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Bt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||A(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||A(this.tertiaryColor),this.lineColor=this.lineColor||A(this.background),this.arrowheadColor=this.arrowheadColor||A(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?W(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||W(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||A(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=b(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||z(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||b(e,{h:30}),this.cScale4=this.cScale4||b(e,{h:60}),this.cScale5=this.cScale5||b(e,{h:90}),this.cScale6=this.cScale6||b(e,{h:120}),this.cScale7=this.cScale7||b(e,{h:150}),this.cScale8=this.cScale8||b(e,{h:210,l:150}),this.cScale9=this.cScale9||b(e,{h:270}),this.cScale10=this.cScale10||b(e,{h:300}),this.cScale11=this.cScale11||b(e,{h:330}),this.darkMode)for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=W(this["cScale"+s],75);else for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=W(this["cScale"+s],25);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||A(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||z(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||W(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||b(this.mainBkg,{h:180,s:-15,l:i*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||b(this.mainBkg,{h:180,s:-15,l:i*(8+s*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||b(e,{h:64}),this.fillType3=this.fillType3||b(t,{h:64}),this.fillType4=this.fillType4||b(e,{h:-64}),this.fillType5=this.fillType5||b(t,{h:-64}),this.fillType6=this.fillType6||b(e,{h:128}),this.fillType7=this.fillType7||b(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||r,this.pie4=this.pie4||b(e,{l:-10}),this.pie5=this.pie5||b(t,{l:-10}),this.pie6=this.pie6||b(r,{l:-10}),this.pie7=this.pie7||b(e,{h:60,l:-10}),this.pie8=this.pie8||b(e,{h:-60,l:-10}),this.pie9=this.pie9||b(e,{h:120,l:0}),this.pie10=this.pie10||b(e,{h:60,l:-20}),this.pie11=this.pie11||b(e,{h:-60,l:-20}),this.pie12=this.pie12||b(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||b(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ye(this.quadrant1Fill)?z(this.quadrant1Fill):W(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?W(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||b(e,{h:-30}),this.git4=this.git4||b(e,{h:-60}),this.git5=this.git5||b(e,{h:-90}),this.git6=this.git6||b(e,{h:60}),this.git7=this.git7||b(e,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)),this.gitInv0=this.gitInv0||A(this.git0),this.gitInv1=this.gitInv1||A(this.git1),this.gitInv2=this.gitInv2||A(this.git2),this.gitInv3=this.gitInv3||A(this.git3),this.gitInv4=this.gitInv4||A(this.git4),this.gitInv5=this.gitInv5||A(this.git5),this.gitInv6=this.gitInv6||A(this.git6),this.gitInv7=this.gitInv7||A(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||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||or}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},yC=u(e=>{const t=new mC;return t.calculate(e),t},"getThemeVariables"),CC=class{static{u(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=A(this.background),this.secondaryBorderColor=Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=A(this.primaryColor),this.secondaryTextColor=A(this.secondaryColor),this.tertiaryTextColor=A(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(A("#323D47"),10),this.border1="#ccc",this.border2=Ar(255,255,255,.25),this.arrowheadColor=A(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Bt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Bt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||A(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||A(this.tertiaryColor),this.lineColor=this.lineColor||A(this.background),this.arrowheadColor=this.arrowheadColor||A(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?W(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||W(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||A(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||z(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=W(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=W(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||A(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||W(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ye(this.quadrant1Fill)?z(this.quadrant1Fill):W(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?W(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)),this.gitInv0=this.gitInv0||A(this.git0),this.gitInv1=this.gitInv1||A(this.git1),this.gitInv2=this.gitInv2||A(this.git2),this.gitInv3=this.gitInv3||A(this.git3),this.gitInv4=this.gitInv4||A(this.git4),this.gitInv5=this.gitInv5||A(this.git5),this.gitInv6=this.gitInv6||A(this.git6),this.gitInv7=this.gitInv7||A(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||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||or}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},xC=u(e=>{const t=new CC;return t.calculate(e),t},"getThemeVariables"),bC=class{static{u(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Bt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Bt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Bt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||A(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||A(this.tertiaryColor),this.lineColor=this.lineColor||A(this.background),this.arrowheadColor=this.arrowheadColor||A(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?W(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||W(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||A(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=b(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||z(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=this.mainBkg;if(this.darkMode)for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=W(this["cScale"+s],75);else for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=W(this["cScale"+s],25);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||A(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||z(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||W(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||b(this.mainBkg,{h:180,s:-15,l:i*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||b(this.mainBkg,{h:180,s:-15,l:i*(8+s*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||b(e,{h:64}),this.fillType3=this.fillType3||b(t,{h:64}),this.fillType4=this.fillType4||b(e,{h:-64}),this.fillType5=this.fillType5||b(t,{h:-64}),this.fillType6=this.fillType6||b(e,{h:128}),this.fillType7=this.fillType7||b(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||r,this.pie4=this.pie4||b(e,{l:-10}),this.pie5=this.pie5||b(t,{l:-10}),this.pie6=this.pie6||b(r,{l:-10}),this.pie7=this.pie7||b(e,{h:60,l:-10}),this.pie8=this.pie8||b(e,{h:-60,l:-10}),this.pie9=this.pie9||b(e,{h:120,l:0}),this.pie10=this.pie10||b(e,{h:60,l:-20}),this.pie11=this.pie11||b(e,{h:-60,l:-20}),this.pie12=this.pie12||b(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||b(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ye(this.quadrant1Fill)?z(this.quadrant1Fill):W(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?W(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||b(e,{h:-30}),this.git4=this.git4||b(e,{h:-60}),this.git5=this.git5||b(e,{h:-90}),this.git6=this.git6||b(e,{h:60}),this.git7=this.git7||b(e,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)),this.gitInv0=this.gitInv0||A(this.git0),this.gitInv1=this.gitInv1||A(this.git1),this.gitInv2=this.gitInv2||A(this.git2),this.gitInv3=this.gitInv3||A(this.git3),this.gitInv4=this.gitInv4||A(this.git4),this.gitInv5=this.gitInv5||A(this.git5),this.gitInv6=this.gitInv6||A(this.git6),this.gitInv7=this.gitInv7||A(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||or}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},kC=u(e=>{const t=new bC;return t.calculate(e),t},"getThemeVariables"),TC=class{static{u(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=A(this.background),this.secondaryBorderColor=Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=A(this.primaryColor),this.secondaryTextColor=A(this.secondaryColor),this.tertiaryTextColor=A(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(A("#323D47"),10),this.border1="#ccc",this.border2=Ar(255,255,255,.25),this.arrowheadColor=A(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Bt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Bt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||A(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||A(this.tertiaryColor),this.lineColor=this.lineColor||A(this.background),this.arrowheadColor=this.arrowheadColor||A(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?W(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||W(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||A(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||z(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=W(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=W(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||A(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||W(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ye(this.quadrant1Fill)?z(this.quadrant1Fill):W(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?W(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)),this.gitInv0=this.gitInv0||A(this.git0),this.gitInv1=this.gitInv1||A(this.git1),this.gitInv2=this.gitInv2||A(this.git2),this.gitInv3=this.gitInv3||A(this.git3),this.gitInv4=this.gitInv4||A(this.git4),this.gitInv5=this.gitInv5||A(this.git5),this.gitInv6=this.gitInv6||A(this.git6),this.gitInv7=this.gitInv7||A(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||or}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},SC=u(e=>{const t=new TC;return t.calculate(e),t},"getThemeVariables"),wC=class{static{u(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Bt(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Bt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Bt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||A(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||A(this.tertiaryColor),this.lineColor=this.lineColor||A(this.background),this.arrowheadColor=this.arrowheadColor||A(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?W(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||W(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||A(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=b(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||z(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||A(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||z(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||W(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||b(this.mainBkg,{h:180,s:-15,l:i*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||b(this.mainBkg,{h:180,s:-15,l:i*(8+s*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||b(e,{h:64}),this.fillType3=this.fillType3||b(t,{h:64}),this.fillType4=this.fillType4||b(e,{h:-64}),this.fillType5=this.fillType5||b(t,{h:-64}),this.fillType6=this.fillType6||b(e,{h:128}),this.fillType7=this.fillType7||b(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||r,this.pie4=this.pie4||b(e,{l:-10}),this.pie5=this.pie5||b(t,{l:-10}),this.pie6=this.pie6||b(r,{l:-10}),this.pie7=this.pie7||b(e,{h:60,l:-10}),this.pie8=this.pie8||b(e,{h:-60,l:-10}),this.pie9=this.pie9||b(e,{h:120,l:0}),this.pie10=this.pie10||b(e,{h:60,l:-20}),this.pie11=this.pie11||b(e,{h:-60,l:-20}),this.pie12=this.pie12||b(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||b(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ye(this.quadrant1Fill)?z(this.quadrant1Fill):W(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?W(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||b(e,{h:-30}),this.git4=this.git4||b(e,{h:-60}),this.git5=this.git5||b(e,{h:-90}),this.git6=this.git6||b(e,{h:60}),this.git7=this.git7||b(e,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)),this.gitInv0=this.gitInv0||A(this.git0),this.gitInv1=this.gitInv1||A(this.git1),this.gitInv2=this.gitInv2||A(this.git2),this.gitInv3=this.gitInv3||A(this.git3),this.gitInv4=this.gitInv4||A(this.git4),this.gitInv5=this.gitInv5||A(this.git5),this.gitInv6=this.gitInv6||A(this.git6),this.gitInv7=this.gitInv7||A(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||or}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},_C=u(e=>{const t=new wC;return t.calculate(e),t},"getThemeVariables"),BC=class{static{u(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=A(this.background),this.secondaryBorderColor=Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=A(this.primaryColor),this.secondaryTextColor=A(this.secondaryColor),this.tertiaryTextColor=A(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(A("#323D47"),10),this.border1="#ccc",this.border2=Ar(255,255,255,.25),this.arrowheadColor=A(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Bt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Bt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||A(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||A(this.tertiaryColor),this.lineColor=this.lineColor||A(this.background),this.arrowheadColor=this.arrowheadColor||A(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?W(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||W(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||A(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||z(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||A(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||W(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=W(this["cScale"+t],75);const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ye(this.quadrant1Fill)?z(this.quadrant1Fill):W(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?W(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||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)),this.gitInv0=this.gitInv0||A(this.git0),this.gitInv1=this.gitInv1||A(this.git1),this.gitInv2=this.gitInv2||A(this.git2),this.gitInv3=this.gitInv3||A(this.git3),this.gitInv4=this.gitInv4||A(this.git4),this.gitInv5=this.gitInv5||A(this.git5),this.gitInv6=this.gitInv6||A(this.git6),this.gitInv7=this.gitInv7||A(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||or}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},vC=u(e=>{const t=new BC;return t.calculate(e),t},"getThemeVariables"),gr={base:{getThemeVariables:nC},dark:{getThemeVariables:hC},default:{getThemeVariables:dC},forest:{getThemeVariables:fC},neutral:{getThemeVariables:gC},neo:{getThemeVariables:yC},"neo-dark":{getThemeVariables:xC},redux:{getThemeVariables:kC},"redux-dark":{getThemeVariables:SC},"redux-color":{getThemeVariables:_C},"redux-dark-color":{getThemeVariables:vC}},he={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Id={...he,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:gr.default.getThemeVariables(),sequence:{...he.sequence,messageFont:u(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:u(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:u(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...he.gantt,tickInterval:void 0,useWidth:void 0},c4:{...he.c4,useWidth:void 0,personFont:u(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...he.flowchart,inheritDir:!1},external_personFont:u(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:u(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:u(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:u(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:u(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:u(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:u(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:u(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:u(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:u(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:u(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:u(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:u(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:u(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:u(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:u(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:u(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:u(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:u(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:u(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:u(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...he.pie,useWidth:984},xyChart:{...he.xyChart,useWidth:void 0},requirement:{...he.requirement,useWidth:void 0},packet:{...he.packet},eventmodeling:{...he.eventmodeling},treeView:{...he.treeView,useWidth:void 0},radar:{...he.radar},railroad:{...he.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...he.ishikawa},sankey:{...he.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...he.venn},cynefin:{...he.cynefin}},Rd=u((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Rd(e[i],"")]:[...r,t+i],[]),"keyify"),LC=new Set(Rd(Id,"")),qd=Id,FC={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},EC=u((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(R.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),Gs=u(e=>{if(R.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Gs(t));return}for(const t of Object.keys(e)){if(R.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!LC.has(t)||e[t]==null){R.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=FC[t];i?EC(e[t],i):(R.debug("sanitizing object",t),Gs(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(R.debug("sanitizing css option",t),e[t]=Nd(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]="")}R.debug("After sanitization",e)}},"sanitizeDirective"),Nd=u(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"),ki=Object.freeze(qd),ar=u(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),ve=oe({},ki),Xs,Yr=[],Ji=oe({},ki),us=u((e,t)=>{let r=oe({},e),i={};for(const s of t)Hd(s),i=oe(i,s);if(r=oe(r,i),i.theme&&i.theme in gr){const s=oe({},Xs),o=oe(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in gr&&(r.themeVariables=gr[r.theme].getThemeVariables(o))}return Ji=r,PC(Ji),Ji},"updateCurrentConfig"),AC=u(e=>(ve=oe({},ki),ve=oe(ve,e),e.theme&&gr[e.theme]&&(ve.themeVariables=gr[e.theme].getThemeVariables(e.themeVariables)),us(ve,Yr),ve),"setSiteConfig"),MC=u(e=>{Xs=oe({},e)},"saveConfigFromInitialize"),$C=u(e=>(ve=oe(ve,e),us(ve,Yr),ve),"updateSiteConfig"),zd=u(()=>oe({},ve),"getSiteConfig"),Wd=u(e=>(us(Ji,[e]),Vt()),"setConfig"),Vt=u(()=>oe({},Ji),"getConfig"),Hd=u(e=>{e&&(["secure",...ve.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(R.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"&&Hd(e[t])}))},"sanitize"),OC=u(e=>{Gs(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Yr.push(e),us(ve,Yr)},"addDirective"),Vs=u((e=ve)=>{Yr=[],us(e,Yr)},"reset"),DC={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},Ch={},jd=u(e=>{Ch[e]||(R.warn(DC[e]),Ch[e]=!0)},"issueWarning"),PC=u(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&jd("LAZY_LOAD_DEPRECATED")},"checkConfig"),mL=u(()=>{let e={};Xs&&(e=oe(e,Xs));for(const t of Yr)e=oe(e,t);return e},"getUserDefinedConfig"),me=u(e=>(e.flowchart?.htmlLabels!=null&&jd("FLOWCHART_HTML_LABELS_DEPRECATED"),ar(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),Yd=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,ts=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,IC=/\s*%%.*\n/gm,Ud=class extends Error{static{u(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}},Ur={},_n=u(function(e,t){e=e.replace(Yd,"").replace(ts,"").replace(IC,`
5
- `);for(const[r,{detector:i}]of Object.entries(Ur))if(i(e,t))return r;throw new Ud(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Wa=u((...e)=>{for(const{id:t,detector:r,loader:i}of e)Gd(t,r,i)},"registerLazyLoadedDiagrams"),Gd=u((e,t,r)=>{Ur[e]&&R.warn(`Detector with key ${e} already exists. Overwriting.`),Ur[e]={detector:t,loader:r},R.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),RC=u(e=>Ur[e].loader,"getDiagramLoader"),fs=/<br\s*\/?>/gi,qC=u(e=>e?Zd(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),NC=(()=>{let e=!1;return()=>{e||(Xd(),e=!0)}})();function Xd(){const e="data-temp-href-target";bi.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),bi.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"))})}u(Xd,"setupDompurifyHooks");var Vd=u(e=>(NC(),bi.sanitize(e)),"removeScript"),xh=u((e,t)=>{if(me(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Vd(e):r!=="loose"&&(e=Zd(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=jC(e))}return e},"sanitizeMore"),Ie=u((e,t)=>e&&(t.dompurifyConfig?e=bi.sanitize(xh(e,t),t.dompurifyConfig).toString():e=bi.sanitize(xh(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),zC=u((e,t)=>typeof e=="string"?Ie(e,t):e.flat().map(r=>Ie(r,t)),"sanitizeTextOrArray"),WC=u(e=>fs.test(e),"hasBreaks"),HC=u(e=>e.split(fs),"splitBreaks"),jC=u(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Zd=u(e=>e.replace(fs,"#br#"),"breakToPlaceholder"),YC=u(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),UC=u(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),GC=u(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),bh=u(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const o=t[i-1],a=t[i+1];XC(o,a)&&(s=o+","+a,i++,r.pop())}r.push(VC(s))}return r.join("")},"parseGenericTypes"),Ha=u((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),XC=u((e,t)=>{const r=Ha(e,"~"),i=Ha(t,"~");return r===1&&i===1},"shouldCombineSets"),VC=u(e=>{const t=Ha(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),o=i.lastIndexOf("~");for(;s!==-1&&o!==-1&&s!==o;)i[s]="<",i[o]=">",s=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),kh=u(()=>window.MathMLElement!==void 0,"isMathMLSupported"),ja=/\$\$(.*?)\$\$/g,os=u(e=>(e.match(ja)?.length??0)>0,"hasKatex"),yL=u(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Kd(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 s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),ZC=u(async(e,t)=>{if(!os(e))return e;if(!(kh()||t.legacyMathML||t.forceLegacyMathML))return e.replace(ja,"MathML is unsupported in this environment.");{const{default:r}=await At(async()=>{const{default:s}=await import("./katex-HP8lGamR.js");return{default:s}},[]),i=t.forceLegacyMathML||!kh()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(fs).map(s=>os(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(ja,(s,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Kd=u(async(e,t)=>Ie(await ZC(e,t),t),"renderKatexSanitized"),ps={getRows:qC,sanitizeText:Ie,sanitizeTextOrArray:zC,hasBreaks:WC,splitBreaks:HC,lineBreakRegex:fs,removeScript:Vd,getUrl:YC,evaluate:ar,getMax:UC,getMin:GC},KC=u(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),QC=u(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"),Qd=u(function(e,t,r,i){const s=QC(t,r,i);KC(e,s)},"configureSvgSize"),JC=u(function(e,t,r,i){const s=t.node().getBBox(),o=s.width,a=s.height;R.info(`SVG bounds: ${o}x${a}`,s);let n=0,l=0;R.info(`Graph bounds: ${n}x${l}`,e),n=o+r*2,l=a+r*2,R.info(`Calculated bounds: ${n}x${l}`),Qd(t,l,n,i);const c=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),qs={};function Ya(e){return[...e.cssRules].map(t=>t.cssText).join(`
6
- `)}u(Ya,"cssStyleSheetToString");var t0=u((e,t,r,i)=>{let s="";return e in qs&&qs[e]?s=qs[e]({...r,svgId:i}):R.warn(`No theme found for ${e}`),`& {
7
- font-family: ${r.fontFamily};
8
- font-size: ${r.fontSize};
9
- fill: ${r.textColor}
10
- }
11
- @keyframes edge-animation-frame {
12
- from {
13
- stroke-dashoffset: 0;
14
- }
15
- }
16
- @keyframes dash {
17
- to {
18
- stroke-dashoffset: 0;
19
- }
20
- }
21
- & .edge-animation-slow {
22
- stroke-dasharray: 9,5 !important;
23
- stroke-dashoffset: 900;
24
- animation: dash 50s linear infinite;
25
- stroke-linecap: round;
26
- }
27
- & .edge-animation-fast {
28
- stroke-dasharray: 9,5 !important;
29
- stroke-dashoffset: 900;
30
- animation: dash 20s linear infinite;
31
- stroke-linecap: round;
32
- }
33
- /* Classes common for multiple diagrams */
34
-
35
- & .error-icon {
36
- fill: ${r.errorBkgColor};
37
- }
38
- & .error-text {
39
- fill: ${r.errorTextColor};
40
- stroke: ${r.errorTextColor};
41
- }
42
-
43
- & .edge-thickness-normal {
44
- stroke-width: ${r.strokeWidth??1}px;
45
- }
46
- & .edge-thickness-thick {
47
- stroke-width: 3.5px
48
- }
49
- & .edge-pattern-solid {
50
- stroke-dasharray: 0;
51
- }
52
- & .edge-thickness-invisible {
53
- stroke-width: 0;
54
- fill: none;
55
- }
56
- & .edge-pattern-dashed{
57
- stroke-dasharray: 3;
58
- }
59
- .edge-pattern-dotted {
60
- stroke-dasharray: 2;
61
- }
62
-
63
- & .marker {
64
- fill: ${r.lineColor};
65
- stroke: ${r.lineColor};
66
- }
67
- & .marker.cross {
68
- stroke: ${r.lineColor};
69
- }
70
-
71
- & svg {
72
- font-family: ${r.fontFamily};
73
- font-size: ${r.fontSize};
74
- }
75
- & p {
76
- margin: 0
77
- }
78
-
79
- ${s}
80
- .node .neo-node {
81
- stroke: ${r.nodeBorder};
82
- }
83
-
84
- [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
85
- stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
86
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
87
- }
88
- [data-look="neo"].swimlane.cluster rect {
89
- filter: none;
90
- }
91
-
92
-
93
- [data-look="neo"].node path {
94
- stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
95
- stroke-width: ${r.strokeWidth??1}px;
96
- }
97
-
98
- [data-look="neo"].node .outer-path {
99
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
100
- }
101
-
102
- [data-look="neo"].node .neo-line path {
103
- stroke: ${r.nodeBorder};
104
- filter: none;
105
- }
106
-
107
- [data-look="neo"].node circle{
108
- stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
109
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
110
- }
111
-
112
- [data-look="neo"].node circle .state-start{
113
- fill: #000000;
114
- }
115
-
116
- [data-look="neo"].icon-shape .icon {
117
- fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
118
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
119
- }
120
-
121
- [data-look="neo"].icon-shape .icon-neo path {
122
- stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
123
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
124
- }
125
-
126
- ${t}
127
- `},"getStyles"),e0=u((e,t)=>{t!==void 0&&(qs[e]=t)},"addStylesForDiagram"),r0=t0,Jd={};py(Jd,{clear:()=>i0,getAccDescription:()=>n0,getAccTitle:()=>o0,getDiagramTitle:()=>h0,setAccDescription:()=>a0,setAccTitle:()=>s0,setDiagramTitle:()=>l0});var Bn="",vn="",Ln="",Fn=u(e=>Ie(e,Vt()),"sanitizeText"),i0=u(()=>{Bn="",Ln="",vn=""},"clear"),s0=u(e=>{Bn=Fn(e).replace(/^\s+/g,"")},"setAccTitle"),o0=u(()=>Bn,"getAccTitle"),a0=u(e=>{Ln=Fn(e).replace(/\n\s+/g,`
128
- `)},"setAccDescription"),n0=u(()=>Ln,"getAccDescription"),l0=u(e=>{vn=Fn(e)},"setDiagramTitle"),h0=u(()=>vn,"getDiagramTitle"),Th=R,c0=wn,Ot=Vt,CL=Wd,xL=ki,En=u(e=>Ie(e,Ot()),"sanitizeText"),d0=JC,u0=u(()=>Jd,"getCommonDb"),Zs={},Ks=u((e,t,r)=>{Zs[e]&&Th.warn(`Diagram with id ${e} already registered. Overwriting.`),Zs[e]=t,r&&Gd(e,r),e0(e,t.styles),t.injectUtils?.(Th,c0,Ot,En,d0,u0(),()=>{})},"registerDiagram"),Ua=u(e=>{if(e in Zs)return Zs[e];throw new f0(e)},"getDiagram"),f0=class extends Error{static{u(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}};const Ga=Math.PI,Xa=2*Ga,zr=1e-6,p0=Xa-zr;function tu(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function g0(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return tu;const r=10**t;return function(i){this._+=i[0];for(let s=1,o=i.length;s<o;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class m0{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?tu:g0(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,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,o,a){this._append`C${+t},${+r},${+i},${+s},${this._x1=+o},${this._y1=+a}`}arcTo(t,r,i,s,o){if(t=+t,r=+r,i=+i,s=+s,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,n=this._y1,l=i-t,c=s-r,h=a-t,d=n-r,f=h*h+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>zr)if(!(Math.abs(d*l-c*h)>zr)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let g=i-a,m=s-n,y=l*l+c*c,C=g*g+m*m,x=Math.sqrt(y),k=Math.sqrt(f),S=o*Math.tan((Ga-Math.acos((y+f-C)/(2*x*k)))/2),_=S/k,B=S/x;Math.abs(_-1)>zr&&this._append`L${t+_*h},${r+_*d}`,this._append`A${o},${o},0,0,${+(d*g>h*m)},${this._x1=t+B*l},${this._y1=r+B*c}`}}arc(t,r,i,s,o,a){if(t=+t,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),l=i*Math.sin(s),c=t+n,h=r+l,d=1^a,f=a?s-o:o-s;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>zr||Math.abs(this._y1-h)>zr)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%Xa+Xa),f>p0?this._append`A${i},${i},0,1,${d},${t-n},${r-l}A${i},${i},0,1,${d},${this._x1=c},${this._y1=h}`:f>zr&&this._append`A${i},${i},0,${+(f>=Ga)},${d},${this._x1=t+i*Math.cos(o)},${this._y1=r+i*Math.sin(o)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function ni(e){return function(){return e}}const bL=Math.abs,kL=Math.atan2,TL=Math.cos,SL=Math.max,wL=Math.min,_L=Math.sin,BL=Math.sqrt,Sh=1e-12,An=Math.PI,wh=An/2,vL=2*An;function LL(e){return e>1?0:e<-1?An:Math.acos(e)}function FL(e){return e>=1?wh:e<=-1?-wh:Math.asin(e)}function y0(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 m0(t)}function C0(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 es(e){return new eu(e)}function x0(e){return e[0]}function b0(e){return e[1]}function k0(e,t){var r=ni(!0),i=null,s=es,o=null,a=y0(n);e=typeof e=="function"?e:e===void 0?x0:ni(e),t=typeof t=="function"?t:t===void 0?b0:ni(t);function n(l){var c,h=(l=C0(l)).length,d,f=!1,g;for(i==null&&(o=s(g=a())),c=0;c<=h;++c)!(c<h&&r(d=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(d,c,l),+t(d,c,l));if(g)return o=null,g+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:ni(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:ni(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:ni(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(o=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=o=null:o=s(i=l),n):i},n}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 su(e){return new ru(e,!1)}function Mr(){}function Qs(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 mo(e){this._context=e}mo.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:Qs(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:Qs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Va(e){return new mo(e)}function ou(e){this._context=e}ou.prototype={areaStart:Mr,areaEnd:Mr,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:Qs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function T0(e){return new ou(e)}function au(e){this._context=e}au.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:Qs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function S0(e){return new au(e)}function nu(e,t){this._basis=new mo(e),this._beta=t}nu.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],s=t[0],o=e[r]-i,a=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*o),this._beta*t[n]+(1-this._beta)*(s+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const w0=(function e(t){function r(i){return t===1?new mo(i):new nu(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Js(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 Mn(e,t){this._context=e,this._k=(1-t)/6}Mn.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:Js(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:Js(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 Mn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function $n(e,t){this._context=e,this._k=(1-t)/6}$n.prototype={areaStart:Mr,areaEnd:Mr,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:Js(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 _0=(function e(t){function r(i){return new $n(i,t)}return r.tension=function(i){return e(+i)},r})(0);function On(e,t){this._context=e,this._k=(1-t)/6}On.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:Js(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 B0=(function e(t){function r(i){return new On(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Dn(e,t,r){var i=e._x1,s=e._y1,o=e._x2,a=e._y2;if(e._l01_a>Sh){var n=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*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Sh){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);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/h,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,s,o,a,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:Dn(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 cu=(function e(t){function r(i){return t?new hu(i,t):new Mn(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:Mr,areaEnd:Mr,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:Dn(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 v0=(function e(t){function r(i){return t?new du(i,t):new $n(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: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:Dn(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 L0=(function e(t){function r(i){return t?new uu(i,t):new On(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function fu(e){this._context=e}fu.prototype={areaStart:Mr,areaEnd:Mr,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 F0(e){return new fu(e)}function _h(e){return e<0?-1:1}function Bh(e,t,r){var i=e._x1-e._x0,s=t-e._x1,o=(e._y1-e._y0)/(i||s<0&&-0),a=(r-e._y1)/(s||i<0&&-0),n=(o*s+a*i)/(i+s);return(_h(o)+_h(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(n))||0}function vh(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Ko(e,t,r){var i=e._x0,s=e._y0,o=e._x1,a=e._y1,n=(o-i)/3;e._context.bezierCurveTo(i+n,s+n*t,o-n,a-n*r,o,a)}function to(e){this._context=e}to.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:Ko(this,this._t0,vh(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,Ko(this,vh(this,r=Bh(this,e,t)),r);break;default:Ko(this,this._t0,r=Bh(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(to.prototype)).point=function(e,t){to.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,s,o){this._context.bezierCurveTo(t,e,i,r,o,s)}};function mu(e){return new to(e)}function yu(e){return new pu(e)}function Cu(e){this._context=e}Cu.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=Lh(e),s=Lh(t),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(i[0][o],s[0][o],i[1][o],s[1][o],e[a],t[a]);(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 Lh(e){var t,r=e.length-1,i,s=new Array(r),o=new Array(r),a=new Array(r);for(s[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/o[t-1],o[t]-=i,a[t]-=i*a[t-1];for(s[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)s[t]=(a[t]-s[t+1])/o[t];for(o[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-s[t+1];return[s,o]}function xu(e){return new Cu(e)}function yo(e,t){this._context=e,this._t=t}yo.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 bu(e){return new yo(e,.5)}function ku(e){return new yo(e,0)}function Tu(e){return new yo(e,1)}var E0=u(e=>{const{securityLevel:t}=Ot();let r=Et("body");if(t==="sandbox"){const o=Et(`#i${e}`).node()?.contentDocument??document;r=Et(o.body)}return r.select(`#${e}`)},"selectSvgElement"),A0=u(e=>{const{handDrawnSeed:t}=Ot();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),M0=u(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),_i=u(e=>{const t=$0([...e.cssCompiledStyles||[],...e.cssStyles||[],...M0(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),$0=u(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s?.trim())}),t},"styles2Map"),Su=u(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"),pt=u(e=>{const{stylesArray:t}=_i(e),r=[],i=[],s=[],o=[];return t.forEach(a=>{const n=a[0];Su(n)?r.push(a.join(":")+" !important"):(i.push(a.join(":")+" !important"),n.includes("stroke")&&s.push(a.join(":")+" !important"),n==="fill"&&o.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:o}},"styles2String"),ct=u((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=Ot(),{nodeBorder:s,mainBkg:o}=r,{stylesMap:a}=_i(e);return Object.assign({roughness:.7,fill:a.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||s,seed:i,strokeWidth:a.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:O0(a.get("stroke-dasharray"))},t)},"userNodeOverrides"),O0=u(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const D0=Object.freeze({left:0,top:0,width:16,height:16}),eo=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),wu=Object.freeze({...D0,...eo}),P0=Object.freeze({...wu,body:"",hidden:!1}),I0=Object.freeze({width:null,height:null}),R0=Object.freeze({...I0,...eo}),q0=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),l=s.pop(),c={provider:s.length>0?s[0]:i,prefix:l,name:n};return Qo(c)?c:null}const o=s[0],a=o.split("-");if(a.length>1){const n={provider:i,prefix:a.shift(),name:a.join("-")};return Qo(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:o};return Qo(n,r)?n:null}return null},Qo=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function N0(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 Fh(e,t){const r=N0(e,t);for(const i in P0)i in eo?i in e&&!(i in r)&&(r[i]=eo[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function z0(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function o(a){if(r[a])return s[a]=[];if(!(a in s)){s[a]=null;const n=i[a]&&i[a].parent,l=n&&o(n);l&&(s[a]=[n].concat(l))}return s[a]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(o),s}function Eh(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let o={};function a(n){o=Fh(i[n]||s[n],o)}return a(t),r.forEach(a),Fh(e,o)}function W0(e,t){if(e.icons[t])return Eh(e,t,[]);const r=z0(e,[t])[t];return r?Eh(e,t,r):null}const H0=/(-?[0-9.]*[0-9]+[0-9.]*)/g,j0=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ah(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(H0);if(i===null||!i.length)return e;const s=[];let o=i.shift(),a=j0.test(o);for(;;){if(a){const n=parseFloat(o);isNaN(n)?s.push(o):s.push(Math.ceil(n*t*r)/r)}else s.push(o);if(o=i.shift(),o===void 0)return s.join("");a=!a}}function Y0(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),o=e.indexOf("</"+t);if(s===-1||o===-1)break;const a=e.indexOf(">",o);if(a===-1)break;r+=e.slice(s+1,o).trim(),e=e.slice(0,i).trim()+e.slice(a+1)}return{defs:r,content:e}}function U0(e,t){return e?"<defs>"+e+"</defs>"+t:t}function G0(e,t,r){const i=Y0(e);return U0(i.defs,t+i.content+r)}const X0=e=>e==="unset"||e==="undefined"||e==="none";function V0(e,t){const r={...wu,...e},i={...R0,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,i].forEach(y=>{const C=[],x=y.hFlip,k=y.vFlip;let S=y.rotate;x?k?S+=2:(C.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),C.push("scale(-1 1)"),s.top=s.left=0):k&&(C.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),C.push("scale(1 -1)"),s.top=s.left=0);let _;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:_=s.height/2+s.top,C.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:C.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:_=s.width/2+s.left,C.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")")}S%2===1&&(s.left!==s.top&&(_=s.left,s.left=s.top,s.top=_),s.width!==s.height&&(_=s.width,s.width=s.height,s.height=_)),C.length&&(o=G0(o,'<g transform="'+C.join(" ")+'">',"</g>"))});const a=i.width,n=i.height,l=s.width,c=s.height;let h,d;a===null?(d=n===null?"1em":n==="auto"?c:n,h=Ah(d,l/c)):(h=a==="auto"?l:a,d=n===null?Ah(h,c/l):n==="auto"?c:n);const f={},g=(y,C)=>{X0(C)||(f[y]=C.toString())};g("width",h),g("height",d);const m=[s.left,s.top,l,c];return f.viewBox=m.join(" "),{attributes:f,viewBox:m,body:o}}const Z0=/\sid="(\S+)"/g,Mh=new Map;function K0(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Mh.get(e)||0;return Mh.set(e,t+1),t?`${e}${t}`:e}function Q0(e){const t=[];let r;for(;r=Z0.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const o=K0(s),a=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+o+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function J0(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>"}var tx={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},Za=new Map,_u=new Map,ex=u(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(R.debug("Registering icon pack:",t.name),"loader"in t)_u.set(t.name,t.loader);else if("icons"in t)Za.set(t.name,t.icons);else throw R.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Bu=u(async(e,t)=>{const r=q0(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let s=Za.get(i);if(!s){const a=_u.get(i);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await a(),prefix:i},Za.set(i,s)}catch(n){throw R.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=W0(s,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),rx=u(async e=>{try{return await Bu(e),!0}catch{return!1}},"isIconAvailable"),gs=u(async(e,t,r)=>{let i;try{i=await Bu(e,t?.fallbackPrefix)}catch(a){R.error(a),i=tx}const s=V0(i,t),o=J0(Q0(s.body),{...s.attributes,...r});return Ie(o,Vt())},"getIconSVG"),Bs={},ie={},$h;function ix(){return $h||($h=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.BLANK_URL=ie.relativeFirstCharacters=ie.whitespaceEscapeCharsRegex=ie.urlSchemeRegex=ie.ctrlCharactersRegex=ie.htmlCtrlEntityRegex=ie.htmlEntitiesRegex=ie.invalidProtocolRegex=void 0,ie.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,ie.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,ie.htmlCtrlEntityRegex=/&(newline|tab);/gi,ie.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,ie.urlSchemeRegex=/^.+(:|&colon;)/gim,ie.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,ie.relativeFirstCharacters=[".","/"],ie.BLANK_URL="about:blank"),ie}var Oh;function sx(){if(Oh)return Bs;Oh=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.sanitizeUrl=o;var e=ix();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function r(a){var n=a.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(a){return URL.canParse(a)}function s(a){try{return decodeURIComponent(a)}catch{return a}}function o(a){if(!a)return e.BLANK_URL;var n,l=s(a.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=s(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),d=h.match(e.urlSchemeRegex);if(!d)return c;var f=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var g=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return g;if(f==="http:"||f==="https:"){if(!i(g))return e.BLANK_URL;var m=new URL(g);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return g}return Bs}var ox=sx();function Jo(e){if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const r=e[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${r}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ax(){}function vu(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Pn(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const nx="[object RegExp]",Lu="[object String]",Fu="[object Number]",Eu="[object Boolean]",Au="[object Arguments]",lx="[object Symbol]",hx="[object Date]",cx="[object Map]",dx="[object Set]",ux="[object Array]",fx="[object ArrayBuffer]",px="[object Object]",gx="[object DataView]",mx="[object Uint8Array]",yx="[object Uint8ClampedArray]",Cx="[object Uint16Array]",xx="[object Uint32Array]",bx="[object Int8Array]",kx="[object Int16Array]",Tx="[object Int32Array]",Sx="[object Float32Array]",wx="[object Float64Array]",Dh=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function In(e){return typeof Dh.Buffer<"u"&&Dh.Buffer.isBuffer(e)}function _x(e){return Number.isSafeInteger(e)&&e>=0}function Mu(e){return e!=null&&typeof e!="function"&&_x(e.length)}function Bx(e){return e==="__proto__"}function Rn(e){return e==null||typeof e!="object"&&typeof e!="function"}function qn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function vx(e,t){return gi(e,void 0,e,new Map,t)}function gi(e,t,r,i=new Map,s=void 0){const o=s?.(e,t,r,i);if(o!==void 0)return o;if(Rn(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const a=new Array(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=gi(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(a.index=e.index),Object.hasOwn(e,"input")&&(a.input=e.input),a}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const a=new RegExp(e.source,e.flags);return a.lastIndex=e.lastIndex,a}if(e instanceof Map){const a=new Map;i.set(e,a);for(const[n,l]of e)a.set(n,gi(l,n,r,i,s));return a}if(e instanceof Set){const a=new Set;i.set(e,a);for(const n of e)a.add(gi(n,void 0,r,i,s));return a}if(In(e))return e.subarray();if(qn(e)){const a=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=gi(e[n],n,r,i,s);return a}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const a=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,a),ze(a,e,r,i,s),a}if(typeof File<"u"&&e instanceof File){const a=new File([e],e.name,{type:e.type});return i.set(e,a),ze(a,e,r,i,s),a}if(typeof Blob<"u"&&e instanceof Blob){const a=new Blob([e],{type:e.type});return i.set(e,a),ze(a,e,r,i,s),a}if(e instanceof Error){const a=structuredClone(e);return i.set(e,a),a.message=e.message,a.name=e.name,a.stack=e.stack,a.cause=e.cause,a.constructor=e.constructor,ze(a,e,r,i,s),a}if(e instanceof Boolean){const a=new Boolean(e.valueOf());return i.set(e,a),ze(a,e,r,i,s),a}if(e instanceof Number){const a=new Number(e.valueOf());return i.set(e,a),ze(a,e,r,i,s),a}if(e instanceof String){const a=new String(e.valueOf());return i.set(e,a),ze(a,e,r,i,s),a}if(typeof e=="object"&&Lx(e)){const a=Object.create(Object.getPrototypeOf(e));return i.set(e,a),ze(a,e,r,i,s),a}return e}function ze(e,t,r=e,i,s){const o=[...Object.keys(t),...vu(t)];for(let a=0;a<o.length;a++){const n=o[a],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=gi(t[n],n,r,i,s))}}function Lx(e){switch(Pn(e)){case Au:case ux:case fx:case gx:case Eu:case hx:case Sx:case wx:case bx:case kx:case Tx:case cx:case Fu:case px:case nx:case dx:case Lu:case lx:case mx:case yx:case Cx:case xx:return!0;default:return!1}}function Fx(e,t){return vx(e,(r,i,s,o)=>{if(typeof e=="object"){if(Pn(e)==="[object Object]"&&typeof e.constructor!="function"){const a={};return o.set(e,a),ze(a,e,s,o),a}switch(Object.prototype.toString.call(e)){case Fu:case Lu:case Eu:{const a=new e.constructor(e?.valueOf());return ze(a,e),a}case Au:{const a={};return ze(a,e),a.length=e.length,a[Symbol.iterator]=e[Symbol.iterator],a}default:return}}})}function Ph(e){return Fx(e)}function Ka(e){return e!==null&&typeof e=="object"&&Pn(e)==="[object Arguments]"}function Qa(e){return typeof e=="object"&&e!==null}function Ex(e){return Qa(e)&&Mu(e)}function Ns(e){return qn(e)}function Ax(e){const t=e?.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function ms(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],o=r.cache;if(o.has(s))return o.get(s);const a=e.apply(this,i);return r.cache=o.set(s,a)||o,a};return r.cache=new(ms.Cache||Map),r}ms.Cache=Map;function Mx(e){if(Rn(e))return e;if(Array.isArray(e)||qn(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function $x(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let o=0;o<r.length;o++){const a=r[o];s=zs(s,a,i,new Map)}return s}function zs(e,t,r,i){if(Rn(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return Mx(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let o=0;o<t.length;o++)o in t||(t[o]=void 0)}const s=[...Object.keys(t),...vu(t)];for(let o=0;o<s.length;o++){const a=s[o];if(Bx(a))continue;let n=t[a],l=e[a];if(Ka(n)&&(n={...n}),Ka(l)&&(l={...l}),In(n)&&(n=Ph(n)),Array.isArray(n))if(Array.isArray(l)){const h=[],d=Reflect.ownKeys(l);for(let f=0;f<d.length;f++){const g=d[f];h[g]=l[g]}l=h}else if(Ex(l)){const h=[];for(let d=0;d<l.length;d++)h[d]=l[d];l=h}else l=[];const c=r(l,n,a,e,t,i);c!==void 0?e[a]=c:Array.isArray(n)||Qa(l)&&Qa(n)&&(Jo(l)||Jo(n)||Ns(l)||Ns(n))?e[a]=zs(l,n,r,i):l==null&&Jo(n)?e[a]=zs({},n,r,i):l==null&&Ns(n)?e[a]=Ph(n):(l===void 0||n!==void 0)&&(e[a]=n)}return e}function Ox(e,...t){return $x(e,...t,ax)}function Ih(e){if(e==null)return!0;if(Mu(e))return typeof e.splice!="function"&&typeof e!="string"&&!In(e)&&!Ns(e)&&!Ka(e)?!1:e.length===0;if(typeof e=="object"||typeof e=="function"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return Ax(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var Dx="​",Px={curveBasis:Va,curveBasisClosed:T0,curveBasisOpen:S0,curveBumpX:iu,curveBumpY:su,curveBundle:w0,curveCardinalClosed:_0,curveCardinalOpen:B0,curveCardinal:lu,curveCatmullRomClosed:v0,curveCatmullRomOpen:L0,curveCatmullRom:cu,curveLinear:es,curveLinearClosed:F0,curveMonotoneX:mu,curveMonotoneY:yu,curveNatural:xu,curveStep:bu,curveStepAfter:Tu,curveStepBefore:ku},Ix=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Rx=u(function(e,t){const r=$u(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const a=r.map(n=>n.args);Gs(a),i=oe(i,[...a])}else i=r.args;if(!i)return;let s=_n(e,t);const o="config";return i[o]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[o],delete i[o]),i},"detectInit"),$u=u(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${Ix.source})(?=[}][%]{2}).*
129
- `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),R.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const s=[];for(;(i=ts.exec(e))!==null;)if(i.index===ts.lastIndex&&ts.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const o=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;s.push({type:o,args:a})}return s.length===0?{type:e,args:null}:s.length===1?s[0]:s}catch(r){return R.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),qx=u(function(e){return e.replace(ts,"")},"removeDirectives"),Nx=u(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Nn(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Px[r]??t}u(Nn,"interpolateToCurve");function Ou(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?ox.sanitizeUrl(r):r}u(Ou,"formatUrl");var zx=u((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let o=window;for(let a=0;a<i;a++)if(o=o[r[a]],!o){R.error(`Function name: ${e} not found in window`);return}o[s](...t)},"runFunc");function zn(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}u(zn,"distance");function Du(e){let t,r=0;e.forEach(s=>{r+=zn(s,t),t=s});const i=r/2;return Wn(e,i)}u(Du,"traverseEdge");function Pu(e){return e.length===1?e[0]:Du(e)}u(Pu,"calcLabelPosition");var Rh=u((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Wn=u((e,t)=>{let r,i=t;for(const s of e){if(r){const o=zn(s,r);if(o===0)return r;if(o<i)i-=o;else{const a=i/o;if(a<=0)return r;if(a>=1)return{x:s.x,y:s.y};if(a>0&&a<1)return{x:Rh((1-a)*r.x+a*s.x,5),y:Rh((1-a)*r.y+a*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Wx=u((e,t,r)=>{R.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=Wn(t,25),o=e?10:5,a=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(a)*o+(t[0].x+s.x)/2,n.y=-Math.cos(a)*o+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function Iu(e,t,r){const i=structuredClone(r);R.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,o=Wn(i,s),a=10+e*.5,n=Math.atan2(i[0].y-o.y,i[0].x-o.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n+Math.PI)*a+(i[0].y+o.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(n-Math.PI)*a+(i[0].y+o.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(n)*a+(i[0].y+o.y)/2-5):(l.x=Math.sin(n)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n)*a+(i[0].y+o.y)/2),l}u(Iu,"calcTerminalLabelPosition");function Ru(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}}u(Ru,"getStylesFromArray");var qh=0,Hx=u(()=>(qh++,"id-"+Math.random().toString(36).substr(2,12)+"-"+qh),"generateId");function qu(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}u(qu,"makeRandomHex");var jx=u(e=>qu(e.length),"random"),Yx=u(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"),Ux=u(function(e,t){const r=t.text.replace(ps.lineBreakRegex," "),[,i]=Co(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const o=s.append("tspan");return o.attr("x",t.x+t.textMargin*2),o.attr("fill",t.fill),o.text(r),s},"drawSimpleText"),Gx=ms((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),ps.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let o="";return i.forEach((a,n)=>{const l=yr(`${a} `,r),c=yr(o,r);if(l>t){const{hyphenatedStrings:f,remainingWord:g}=Xx(a,t,"-",r);s.push(o,...f),o=g}else c+l>=t?(s.push(o),o=a):o=[o,a].filter(Boolean).join(" ");n+1===i.length&&s.push(o)}),s.filter(a=>a!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Xx=ms((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],o=[];let a="";return s.forEach((n,l)=>{const c=`${a}${n}`;if(yr(c,i)>=t){const d=l+1,f=s.length===d,g=`${c}${r}`;o.push(f?c:g),a=""}else a=c}),{hyphenatedStrings:o,remainingWord:a}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Nu(e,t){return Hn(e,t).height}u(Nu,"calculateTextHeight");function yr(e,t){return Hn(e,t).width}u(yr,"calculateTextWidth");var Hn=ms((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,o]=Co(r),a=["sans-serif",i],n=e.split(ps.lineBreakRegex),l=[],c=Et("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of a){let g=0;const m={width:0,height:0,lineHeight:0};for(const y of n){const C=Yx();C.text=y||Dx;const x=Ux(h,C).style("font-size",o).style("font-weight",s).style("font-family",f),k=(x._groups||x)[0][0].getBBox();if(k.width===0&&k.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,k.width)),g=Math.round(k.height),m.height+=g,m.lineHeight=Math.round(Math.max(m.lineHeight,g))}l.push(m)}h.remove();const d=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[d]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Vx=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{u(this,"InitIDGenerator")}},vs,Zx=u(function(e){return vs=vs||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),vs.innerHTML=e,unescape(vs.textContent)},"entityDecode");function jn(e){return"str"in e}u(jn,"isDetailedError");var Kx=u((e,t,r,i)=>{if(!i)return;const s=e.node()?.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Co=u(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 Yn(e,t){return Ox({},e,t)}u(Yn,"cleanAndMerge");var ge={assignWithDepth:oe,wrapLabel:Gx,calculateTextHeight:Nu,calculateTextWidth:yr,calculateTextDimensions:Hn,cleanAndMerge:Yn,detectInit:Rx,detectDirective:$u,isSubstringInArray:Nx,interpolateToCurve:Nn,calcLabelPosition:Pu,calcCardinalityPosition:Wx,calcTerminalLabelPosition:Iu,formatUrl:Ou,getStylesFromArray:Ru,generateId:Hx,random:jx,runFunc:zx,entityDecode:Zx,insertTitle:Kx,isLabelCoordinateInPath:zu,parseFontSize:Co,InitIDGenerator:Vx},Qx=u(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"),$r=u(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),EL=u((e,t,{counter:r=0,prefix:i,suffix:s},o)=>o||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function ee(e){return e??null}u(ee,"handleUndefinedAttr");function zu(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return s.includes(r.toString())||s.includes(i.toString())}u(zu,"isLabelCoordinateInPath");var Ws={exports:{}},Nh=Ws.exports,zh;function Jx(){return zh||(zh=1,(function(e){(function(t){var r=function(){},i=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(h){return setTimeout(h,16)};function s(){var h=this;h.reads=[],h.writes=[],h.raf=i.bind(t)}s.prototype={constructor:s,runTasks:function(h){for(var d;d=h.shift();)d()},measure:function(h,d){var f=d?h.bind(d):h;return this.reads.push(f),o(this),f},mutate:function(h,d){var f=d?h.bind(d):h;return this.writes.push(f),o(this),f},clear:function(h){return n(this.reads,h)||n(this.writes,h)},extend:function(h){if(typeof h!="object")throw new Error("expected object");var d=Object.create(this);return l(d,h),d.fastdom=this,d.initialize&&d.initialize(),d},catch:null};function o(h){h.scheduled||(h.scheduled=!0,h.raf(a.bind(null,h)))}function a(h){var d=h.writes,f=h.reads,g;try{r("flushing reads",f.length),h.runTasks(f),r("flushing writes",d.length),h.runTasks(d)}catch(m){g=m}if(h.scheduled=!1,(f.length||d.length)&&o(h),g)if(r("task errored",g.message),h.catch)h.catch(g);else throw g}function n(h,d){var f=h.indexOf(d);return!!~f&&!!h.splice(f,1)}function l(h,d){for(var f in d)d.hasOwnProperty(f)&&(h[f]=d[f])}var c=t.fastdom=t.fastdom||new s;e.exports=c})(typeof window<"u"?window:typeof Nh<"u"?Nh:globalThis)})(Ws)),Ws.exports}var tb=Jx();const eb=Sn(tb);var ta={exports:{}},Wh;function rb(){return Wh||(Wh=1,(function(e){(function(){var t={initialize:function(){this._tasks=new Map},mutate:function(i,s){return r(this,"mutate",i,s)},measure:function(i,s){return r(this,"measure",i,s)},clear:function(i){var s=this._tasks,o=s.get(i);this.fastdom.clear(o),s.delete(i)}};function r(i,s,o,a){var n=i._tasks,l=i.fastdom,c,h=new Promise(function(d,f){c=l[s](function(){n.delete(h);try{d(a?o.call(a):o())}catch(g){f(g)}},a)});return n.set(h,c),h}e.exports=t})()})(ta)),ta.exports}var ib=rb();const sb=Sn(ib);function Un(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Qr=Un();function Wu(e){Qr=e}var rs={exec:()=>null};function Ht(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(Te.caret,"$1"),r=r.replace(s,a),i},getRegex:()=>new RegExp(r,t)};return i}var ob=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Te={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")},ab=/^(?:[ \t]*(?:\n|$))+/,nb=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,lb=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ys=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,hb=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Gn=/(?:[*+-]|\d{1,9}[.)])/,Hu=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ju=Ht(Hu).replace(/bull/g,Gn).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(),cb=Ht(Hu).replace(/bull/g,Gn).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(),Xn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,db=/^[^\n]+/,Vn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ub=Ht(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Vn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fb=Ht(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Gn).getRegex(),xo="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",Zn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,pb=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",Zn).replace("tag",xo).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Yu=Ht(Xn).replace("hr",ys).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",xo).getRegex(),gb=Ht(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Yu).getRegex(),Kn={blockquote:gb,code:nb,def:ub,fences:lb,heading:hb,hr:ys,html:pb,lheading:ju,list:fb,newline:ab,paragraph:Yu,table:rs,text:db},Hh=Ht("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ys).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",xo).getRegex(),mb={...Kn,lheading:cb,table:Hh,paragraph:Ht(Xn).replace("hr",ys).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Hh).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",xo).getRegex()},yb={...Kn,html:Ht(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Zn).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:rs,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ht(Xn).replace("hr",ys).replace("heading",` *#{1,6} *[^
130
- ]`).replace("lheading",ju).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Cb=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,xb=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Uu=/^( {2,}|\\)\n(?!\s*$)/,bb=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,bo=/[\p{P}\p{S}]/u,Qn=/[\s\p{P}\p{S}]/u,Gu=/[^\s\p{P}\p{S}]/u,kb=Ht(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Qn).getRegex(),Xu=/(?!~)[\p{P}\p{S}]/u,Tb=/(?!~)[\s\p{P}\p{S}]/u,Sb=/(?:[^\s\p{P}\p{S}]|~)/u,wb=Ht(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",ob?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Vu=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,_b=Ht(Vu,"u").replace(/punct/g,bo).getRegex(),Bb=Ht(Vu,"u").replace(/punct/g,Xu).getRegex(),Zu="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",vb=Ht(Zu,"gu").replace(/notPunctSpace/g,Gu).replace(/punctSpace/g,Qn).replace(/punct/g,bo).getRegex(),Lb=Ht(Zu,"gu").replace(/notPunctSpace/g,Sb).replace(/punctSpace/g,Tb).replace(/punct/g,Xu).getRegex(),Fb=Ht("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Gu).replace(/punctSpace/g,Qn).replace(/punct/g,bo).getRegex(),Eb=Ht(/\\(punct)/,"gu").replace(/punct/g,bo).getRegex(),Ab=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(),Mb=Ht(Zn).replace("(?:-->|$)","-->").getRegex(),$b=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",Mb).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ro=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Ob=Ht(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ro).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ku=Ht(/^!?\[(label)\]\[(ref)\]/).replace("label",ro).replace("ref",Vn).getRegex(),Qu=Ht(/^!?\[(ref)\](?:\[\])?/).replace("ref",Vn).getRegex(),Db=Ht("reflink|nolink(?!\\()","g").replace("reflink",Ku).replace("nolink",Qu).getRegex(),jh=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Jn={_backpedal:rs,anyPunctuation:Eb,autolink:Ab,blockSkip:wb,br:Uu,code:xb,del:rs,emStrongLDelim:_b,emStrongRDelimAst:vb,emStrongRDelimUnd:Fb,escape:Cb,link:Ob,nolink:Qu,punctuation:kb,reflink:Ku,reflinkSearch:Db,tag:$b,text:bb,url:rs},Pb={...Jn,link:Ht(/^!?\[(label)\]\((.*?)\)/).replace("label",ro).getRegex(),reflink:Ht(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ro).getRegex()},Ja={...Jn,emStrongRDelimAst:Lb,emStrongLDelim:Bb,url:Ht(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",jh).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",jh).getRegex()},Ib={...Ja,br:Ht(Uu).replace("{2,}","*").getRegex(),text:Ht(Ja.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ls={normal:Kn,gfm:mb,pedantic:yb},Ii={normal:Jn,gfm:Ja,breaks:Ib,pedantic:Pb},Rb={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Yh=e=>Rb[e];function Ke(e,t){if(t){if(Te.escapeTest.test(e))return e.replace(Te.escapeReplace,Yh)}else if(Te.escapeTestNoEncode.test(e))return e.replace(Te.escapeReplaceNoEncode,Yh);return e}function Uh(e){try{e=encodeURI(e).replace(Te.percentDecode,"%")}catch{return null}return e}function Gh(e,t){let r=e.replace(Te.findPipe,(o,a,n)=>{let l=!1,c=a;for(;--c>=0&&n[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(Te.splitPipe),s=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(;s<i.length;s++)i[s]=i[s].trim().replace(Te.slashPipe,"|");return i}function Ri(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function qb(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 Xh(e,t,r,i,s){let o=t.href,a=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:a,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function Nb(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
131
- `).map(o=>{let a=o.match(r.other.beginningSpace);if(a===null)return o;let[n]=a;return n.length>=s.length?o.slice(s.length):o}).join(`
132
- `)}var io=class{options;rules;lexer;constructor(t){this.options=t||Qr}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:Ri(i,`
133
- `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=Nb(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:s}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let s=Ri(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:Ri(r[0],`
134
- `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Ri(r[0],`
135
- `).split(`
136
- `),s="",o="",a=[];for(;i.length>0;){let n=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),n=!0;else if(!n)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
137
- `),d=h.replace(this.rules.other.blockquoteSetextReplace,`
138
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
139
- ${h}`:h,o=o?`${o}
140
- ${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=f,i.length===0)break;let g=a.at(-1);if(g?.type==="code")break;if(g?.type==="blockquote"){let m=g,y=m.raw+`
141
- `+i.join(`
142
- `),C=this.blockquote(y);a[a.length-1]=C,s=s.substring(0,s.length-m.raw.length)+C.raw,o=o.substring(0,o.length-m.text.length)+C.text;break}else if(g?.type==="list"){let m=g,y=m.raw+`
143
- `+i.join(`
144
- `),C=this.list(y);a[a.length-1]=C,s=s.substring(0,s.length-g.raw.length)+C.raw,o=o.substring(0,o.length-m.raw.length)+C.raw,i=y.substring(a.at(-1).raw.length).split(`
145
- `);continue}}return{type:"blockquote",raw:s,tokens:a,text:o}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,o={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let a=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",d="";if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let f=r[2].split(`
146
- `,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),g=t.split(`
147
- `,1)[0],m=!f.trim(),y=0;if(this.options.pedantic?(y=2,d=f.trimStart()):m?y=r[1].length+1:(y=r[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,d=f.slice(y),y+=r[1].length),m&&this.rules.other.blankLine.test(g)&&(h+=g+`
148
- `,t=t.substring(g.length+1),c=!0),!c){let k=this.rules.other.nextBulletRegex(y),S=this.rules.other.hrRegex(y),_=this.rules.other.fencesBeginRegex(y),B=this.rules.other.headingBeginRegex(y),L=this.rules.other.htmlBeginRegex(y);for(;t;){let E=t.split(`
149
- `,1)[0],F;if(g=E,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),F=g):F=g.replace(this.rules.other.tabCharGlobal," "),_.test(g)||B.test(g)||L.test(g)||k.test(g)||S.test(g))break;if(F.search(this.rules.other.nonSpaceChar)>=y||!g.trim())d+=`
150
- `+F.slice(y);else{if(m||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(f)||B.test(f)||S.test(f))break;d+=`
151
- `+g}!m&&!g.trim()&&(m=!0),h+=E+`
152
- `,t=t.substring(E.length+1),f=F.slice(y)}}o.loose||(n?o.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let C=null,x;this.options.gfm&&(C=this.rules.other.listIsTask.exec(d),C&&(x=C[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:h,task:!!C,checked:x,loose:!1,text:d,tokens:[]}),o.raw+=h}let l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let c=0;c<o.items.length;c++)if(this.lexer.state.top=!1,o.items[c].tokens=this.lexer.blockTokens(o.items[c].text,[]),!o.loose){let h=o.items[c].tokens.filter(f=>f.type==="space"),d=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));o.loose=d}if(o.loose)for(let c=0;c<o.items.length;c++)o.items[c].loose=!0;return o}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:o}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Gh(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
153
- `):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let n of s)this.rules.other.tableAlignRight.test(n)?a.align.push("right"):this.rules.other.tableAlignCenter.test(n)?a.align.push("center"):this.rules.other.tableAlignLeft.test(n)?a.align.push("left"):a.align.push(null);for(let n=0;n<i.length;n++)a.header.push({text:i[n],tokens:this.lexer.inline(i[n]),header:!0,align:a.align[n]});for(let n of o)a.rows.push(Gh(n,a.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[c]})));return a}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
154
- `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=Ri(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=qb(r[2],"()");if(a===-2)return;if(a>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(s);a&&(s=a[1],o=a[3])}else o=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),Xh(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=r[s.toLowerCase()];if(!o){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return Xh(i,o,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let o=[...s[0]].length-1,a,n,l=o,c=0,h=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+o);(s=h.exec(r))!=null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(n=[...a].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&o%3&&!((o+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let d=[...s[0]][0].length,f=t.slice(0,o+s.index+d+n);if(Math.min(o,n)%2){let m=f.slice(1,-1);return{type:"em",raw:f,text:m,tokens:this.lexer.inlineTokens(m)}}let g=f.slice(2,-2);return{type:"strong",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,s;if(r[2]==="@")i=r[0],s="mailto:"+i;else{let o;do o=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(o!==r[0]);i=r[0],r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:i,href:s,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}}}},We=class tn{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Qr,this.options.tokenizer=this.options.tokenizer||new io,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:Te,block:Ls.normal,inline:Ii.normal};this.options.pedantic?(r.block=Ls.pedantic,r.inline=Ii.pedantic):this.options.gfm&&(r.block=Ls.gfm,this.options.breaks?r.inline=Ii.breaks:r.inline=Ii.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ls,inline:Ii}}static lex(t,r){return new tn(r).lex(t)}static lexInline(t,r){return new tn(r).inlineTokens(t)}lex(t){t=t.replace(Te.carriageReturn,`
155
- `),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(Te.tabCharGlobal," ").replace(Te.spaceLine,""));t;){let s;if(this.options.extensions?.block?.some(a=>(s=a.call({lexer:this},t,r))?(t=t.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let a=r.at(-1);s.raw.length===1&&a!==void 0?a.raw+=`
156
- `:r.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
157
- `)?"":`
158
- `)+s.raw,a.text+=`
159
- `+s.text,this.inlineQueue.at(-1).src=a.text):r.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
160
- `)?"":`
161
- `)+s.raw,a.text+=`
162
- `+s.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},r.push(s));continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),r.push(s);continue}let o=t;if(this.options.extensions?.startBlock){let a=1/0,n=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},n),typeof l=="number"&&l>=0&&(a=Math.min(a,l))}),a<1/0&&a>=0&&(o=t.substring(0,a+1))}if(this.state.top&&(s=this.tokenizer.paragraph(o))){let a=r.at(-1);i&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
163
- `)?"":`
164
- `)+s.raw,a.text+=`
165
- `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(s),i=o.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let a=r.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
166
- `)?"":`
167
- `)+s.raw,a.text+=`
168
- `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(s);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,s=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)o=s[2]?s[2].length:0,i=i.slice(0,s.index+o)+"["+"a".repeat(s[0].length-o-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,n="";for(;t;){a||(n=""),a=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,n)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(g=>{f=g.call({lexer:this},d),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(n=l.raw.slice(-1)),a=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},so=class{options;parser;constructor(t){this.options=t||Qr}space(t){return""}code({text:t,lang:r,escaped:i}){let s=(r||"").match(Te.notSpaceStart)?.[0],o=t.replace(Te.endingNewline,"")+`
169
- `;return s?'<pre><code class="language-'+Ke(s)+'">'+(i?o:Ke(o,!0))+`</code></pre>
170
- `:"<pre><code>"+(i?o:Ke(o,!0))+`</code></pre>
171
- `}blockquote({tokens:t}){return`<blockquote>
172
- ${this.parser.parse(t)}</blockquote>
173
- `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
174
- `}hr(t){return`<hr>
175
- `}list(t){let r=t.ordered,i=t.start,s="";for(let n=0;n<t.items.length;n++){let l=t.items[n];s+=this.listitem(l)}let o=r?"ol":"ul",a=r&&i!==1?' start="'+i+'"':"";return"<"+o+a+`>
176
- `+s+"</"+o+`>
177
- `}listitem(t){let r="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+Ke(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
178
- `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
179
- `}table(t){let r="",i="";for(let o=0;o<t.header.length;o++)i+=this.tablecell(t.header[o]);r+=this.tablerow({text:i});let s="";for(let o=0;o<t.rows.length;o++){let a=t.rows[o];i="";for(let n=0;n<a.length;n++)i+=this.tablecell(a[n]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
180
- <thead>
181
- `+r+`</thead>
182
- `+s+`</table>
183
- `}tablerow({text:t}){return`<tr>
184
- ${t}</tr>
185
- `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
186
- `}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>${Ke(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),o=Uh(t);if(o===null)return s;t=o;let a='<a href="'+t+'"';return r&&(a+=' title="'+Ke(r)+'"'),a+=">"+s+"</a>",a}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=Uh(t);if(o===null)return Ke(i);t=o;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${Ke(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Ke(t.text)}},tl=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""}},He=class en{options;renderer;textRenderer;constructor(t){this.options=t||Qr,this.options.renderer=this.options.renderer||new so,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new tl}static parse(t,r){return new en(r).parse(t)}static parseInline(t,r){return new en(r).parseInline(t)}parse(t,r=!0){let i="";for(let s=0;s<t.length;s++){let o=t[s];if(this.options.extensions?.renderers?.[o.type]){let n=o,l=this.options.extensions.renderers[n.type].call({parser:this},n);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){i+=l||"";continue}}let a=o;switch(a.type){case"space":{i+=this.renderer.space(a);continue}case"hr":{i+=this.renderer.hr(a);continue}case"heading":{i+=this.renderer.heading(a);continue}case"code":{i+=this.renderer.code(a);continue}case"table":{i+=this.renderer.table(a);continue}case"blockquote":{i+=this.renderer.blockquote(a);continue}case"list":{i+=this.renderer.list(a);continue}case"html":{i+=this.renderer.html(a);continue}case"def":{i+=this.renderer.def(a);continue}case"paragraph":{i+=this.renderer.paragraph(a);continue}case"text":{let n=a,l=this.renderer.text(n);for(;s+1<t.length&&t[s+1].type==="text";)n=t[++s],l+=`
187
- `+this.renderer.text(n);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}parseInline(t,r=this.renderer){let i="";for(let s=0;s<t.length;s++){let o=t[s];if(this.options.extensions?.renderers?.[o.type]){let n=this.options.extensions.renderers[o.type].call({parser:this},o);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=n||"";continue}}let a=o;switch(a.type){case"escape":{i+=r.text(a);break}case"html":{i+=r.html(a);break}case"link":{i+=r.link(a);break}case"image":{i+=r.image(a);break}case"strong":{i+=r.strong(a);break}case"em":{i+=r.em(a);break}case"codespan":{i+=r.codespan(a);break}case"br":{i+=r.br(a);break}case"del":{i+=r.del(a);break}case"text":{i+=r.text(a);break}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}},Ui=class{options;block;constructor(t){this.options=t||Qr}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?We.lex:We.lexInline}provideParser(){return this.block?He.parse:He.parseInline}},zb=class{defaults=Un();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=He;Renderer=so;TextRenderer=tl;Lexer=We;Tokenizer=io;Hooks=Ui;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let s of t)switch(i=i.concat(r.call(this,s)),s.type){case"table":{let o=s;for(let a of o.header)i=i.concat(this.walkTokens(a.tokens,r));for(let a of o.rows)for(let n of a)i=i.concat(this.walkTokens(n.tokens,r));break}case"list":{let o=s;i=i.concat(this.walkTokens(o.items,r));break}default:{let o=s;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(a=>{let n=o[a].flat(1/0);i=i.concat(this.walkTokens(n,r))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let a=r.renderers[o.name];a?r.renderers[o.name]=function(...n){let l=o.renderer.apply(this,n);return l===!1&&(l=a.apply(this,n)),l}:r.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[o.level];a?a.unshift(o.tokenizer):r[o.level]=[o.tokenizer],o.start&&(o.level==="block"?r.startBlock?r.startBlock.push(o.start):r.startBlock=[o.start]:o.level==="inline"&&(r.startInline?r.startInline.push(o.start):r.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(r.childTokens[o.name]=o.childTokens)}),s.extensions=r),i.renderer){let o=this.defaults.renderer||new so(this.defaults);for(let a in i.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let n=a,l=i.renderer[n],c=o[n];o[n]=(...h)=>{let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new io(this.defaults);for(let a in i.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let n=a,l=i.tokenizer[n],c=o[n];o[n]=(...h)=>{let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new Ui;for(let a in i.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let n=a,l=i.hooks[n],c=o[n];Ui.passThroughHooks.has(a)?o[n]=h=>{if(this.defaults.async&&Ui.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await l.call(o,h);return c.call(o,f)})();let d=l.call(o,h);return c.call(o,d)}:o[n]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(o,h);return f===!1&&(f=await c.apply(o,h)),f})();let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,a=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(a.call(this,n)),o&&(l=l.concat(o.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return We.lex(t,r??this.defaults)}parser(t,r){return He.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let n=o.hooks?await o.hooks.preprocess(r):r,l=await(o.hooks?await o.hooks.provideLexer():t?We.lex:We.lexInline)(n,o),c=o.hooks?await o.hooks.processAllTokens(l):l;o.walkTokens&&await Promise.all(this.walkTokens(c,o.walkTokens));let h=await(o.hooks?await o.hooks.provideParser():t?He.parse:He.parseInline)(c,o);return o.hooks?await o.hooks.postprocess(h):h})().catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));let n=(o.hooks?o.hooks.provideLexer():t?We.lex:We.lexInline)(r,o);o.hooks&&(n=o.hooks.processAllTokens(n)),o.walkTokens&&this.walkTokens(n,o.walkTokens);let l=(o.hooks?o.hooks.provideParser():t?He.parse:He.parseInline)(n,o);return o.hooks&&(l=o.hooks.postprocess(l)),l}catch(n){return a(n)}}}onError(t,r){return i=>{if(i.message+=`
188
- Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Ke(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},Gr=new zb;function Yt(e,t){return Gr.parse(e,t)}Yt.options=Yt.setOptions=function(e){return Gr.setOptions(e),Yt.defaults=Gr.defaults,Wu(Yt.defaults),Yt};Yt.getDefaults=Un;Yt.defaults=Qr;Yt.use=function(...e){return Gr.use(...e),Yt.defaults=Gr.defaults,Wu(Yt.defaults),Yt};Yt.walkTokens=function(e,t){return Gr.walkTokens(e,t)};Yt.parseInline=Gr.parseInline;Yt.Parser=He;Yt.parser=He.parse;Yt.Renderer=so;Yt.TextRenderer=tl;Yt.Lexer=We;Yt.lexer=We.lex;Yt.Tokenizer=io;Yt.Hooks=Ui;Yt.parse=Yt;Yt.options;Yt.setOptions;Yt.use;Yt.walkTokens;Yt.parseInline;He.parse;We.lex;function Ju(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var s=i.reduce(function(n,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?n.concat(c.map(function(h){var d,f;return(f=(d=h.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&f!==void 0?f:0})):n},[]);if(s.length){var o=new RegExp(`
189
- [ ]{`.concat(Math.min.apply(Math,s),"}"),"g");i=i.map(function(n){return n.replace(o,`
190
- `)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return t.forEach(function(n,l){var c=a.match(/(?:^|\n)( *)$/),h=c?c[1]:"",d=n;typeof n=="string"&&n.includes(`
191
- `)&&(d=String(n).split(`
192
- `).map(function(f,g){return g===0?f:"".concat(h).concat(f)}).join(`
193
- `)),a+=d+i[l+1]}),a}var rn=typeof performance<"u"&&typeof performance.now=="function",li=u(()=>rn?performance.now():0,"now"),ea="🧜 ",Wb="Mermaid render",Hb="Mermaid",jb={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"};(class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}static{u(this,"Profiler")}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(e){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(e))}tickSync(e,t){if(!this.enabled)return t();const r=li();try{return t()}finally{this.buckets[e]=(this.buckets[e]??0)+(li()-r)}}async tick(e,t){if(!this.enabled)return t();const r=li();try{return await t()}finally{this.buckets[e]=(this.buckets[e]??0)+(li()-r)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const e=this.roots.at(-1),t=this.runLabel??e?.name;return e&&(this.records.push({label:t??e.name,tree:e,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(e,t)),this.runLabel=void 0,e}begin(e){if(!this.enabled)return;const t={name:e,start:li(),duration:-1,children:[]},r=this.stack.at(-1);if(r?r.children.push(t):this.roots.push(t),this.stack.push(t),rn&&typeof performance.mark=="function")try{performance.mark(`${ea}${e} ▶`)}catch{}}end(){if(!this.enabled)return;const e=this.stack.pop();if(!e)return;const t=li();if(e.duration=t-e.start,rn&&typeof performance.measure=="function")try{performance.measure(`${ea}${e.name}`,{start:e.start,end:t,detail:{devtools:{dataType:"track-entry",track:Wb,trackGroup:Hb,color:jb[e.name]??"primary",tooltipText:`${e.name} — ${e.duration.toFixed(1)} ms`}}})}catch{}}async span(e,t){if(!this.enabled)return t();this.begin(e);try{return await t()}finally{this.end()}}report(){return this.records.at(-1)?.tree??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(e=this.report(),t){if(!e)return;const r=e.duration,i=t&&t!==e.name?`${e.name} [${t}]`:e.name,s=["ms % phase"],o=u((n,l)=>{const c=" ".repeat(l),h=n.duration.toFixed(1).padStart(8),d=r>0?`${(n.duration/r*100).toFixed(0).padStart(3)}%`:" -";s.push(`${h} ${d} ${c}${n.name}`);for(const f of n.children)o(f,l+1);if(n.children.length>0){const f=n.children.reduce((m,y)=>m+y.duration,0),g=n.duration-f;if(g>.5){const m=g.toFixed(1).padStart(8);s.push(`${m} ${c} (self)`)}}},"walk");o(e,0);const a=Object.keys(this.buckets);if(a.length>0){s.push("—— buckets (summed) ——");for(const n of a)s.push(`${this.buckets[n].toFixed(1).padStart(8)} ${n}`)}console.log(`${ea}mermaid render profile · ${i}
194
- ${s.join(`
195
- `)}`)}});globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"};var Yb=eb.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend(sb),Xr=Yb;function tf(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
196
- `).replace(/\n{2,}/g,`
197
- `);return Ju(i)}u(tf,"preprocessMarkdown");function ef(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}u(ef,"nonMarkdownToLines");function rf(e,t={}){const r=tf(e,t),i=Yt.lexer(r),s=[[]];let o=0;function a(n,l="normal"){n.type==="text"?n.text.split(`
198
- `).forEach((h,d)=>{d!==0&&(o++,s.push([])),h.split(" ").forEach(f=>{f=f.replace(/&#39;/g,"'"),f&&s[o].push({content:f,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{a(c,n.type)}):n.type==="html"&&s[o].push({content:n.text,type:"normal"})}return u(a,"processNode"),i.forEach(n=>{n.type==="paragraph"?n.tokens?.forEach(l=>{a(l)}):n.type==="html"?s[o].push({content:n.text,type:"normal"}):s[o].push({content:n.raw,type:"normal"})}),s}u(rf,"markdownToLines");function sf(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}u(sf,"nonMarkdownToHTML");function of(e,{markdownAutoWrap:t}={}){const r=Yt.lexer(e);function i(s){return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${s.tokens?.map(i).join("")}</strong>`:s.type==="em"?`<em>${s.tokens?.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${s.tokens?.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(R.warn(`Unsupported markdown: ${s.type}`),s.raw)}return u(i,"output"),r.map(i).join("")}u(of,"markdownToHTML");function af(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}u(af,"splitTextToChars");function nf(e,t){const r=af(t.content);return el(e,[],r,t.type)}u(nf,"splitWordToFitWidth");function el(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...o]=r,a=[...t,s];return e([{content:a.join(""),type:i}])?el(e,a,o,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}u(el,"splitWordToFitWidthRecursion");function lf(e,t){if(e.some(({content:r})=>r.includes(`
199
- `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return oo(e,t)}u(lf,"splitLineToFitWidth");function oo(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const o=e.shift()??{content:" ",type:"normal"},a=[...i];if(s!==""&&a.push({content:s,type:"normal"}),a.push(o),t(a))return oo(e,t,r,a);if(i.length>0)r.push(i),e.unshift(o);else if(o.content){const[n,l]=nf(t,o);r.push([n]),l.content&&e.unshift(l)}return oo(e,t,r)}u(oo,"splitLineToFitWidthRecursion");function sn(e,t){t&&e.attr("style",t)}u(sn,"applyStyle");var Vh=16384;async function hf(e,t,r,i,s=!1,o=Vt()){const a=e.append("foreignObject");a.attr("width",`${Math.min(10*r,Vh)}px`),a.attr("height",`${Math.min(10*r,Vh)}px`);const n=a.append("xhtml:div"),l=os(t.label)?await Kd(t.label.replace(ps.lineBreakRegex,`
200
- `),o):Ie(t.label,o),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");return h.html(l),sn(h,t.labelStyle),h.attr("class",`${c} ${i}`),sn(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&n.attr("class","labelBkg"),(await Xr.measure(()=>n.node().getBoundingClientRect())).width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px")),a.node()}u(hf,"addHtmlSpan");function ko(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}u(ko,"createTspan");function cf(e,t,r){const i=e.append("text"),s=ko(i,1,t);To(s,r);const o=s.node().getComputedTextLength();return i.remove(),o}u(cf,"computeWidthOfText");function Ub(e,t,r){const i=e.append("text"),s=ko(i,1,t);To(s,[{content:r,type:"normal"}]);const o=s.node()?.getBoundingClientRect();return o&&i.remove(),o}u(Ub,"computeDimensionOfText");function df(e,t,r,i=!1,s=!1){const a=t.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let c=0;for(const h of r){const d=u(g=>cf(a,1.1,g)<=e,"checkWidth"),f=d(h)?[h]:lf(h,d);for(const g of f){const m=ko(l,c,1.1,s);To(m,g),c++}}if(i){const h=l.node().getBBox(),d=2;return n.attr("x",h.x-d).attr("y",h.y-d).attr("width",h.width+2*d).attr("height",h.height+2*d),a.node()}else return l.node()}u(df,"createFormattedText");function on(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}u(on,"decodeHTMLEntities");function To(e,t){e.text(""),t.forEach((r,i)=>{const s=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?s.text(on(r.content)):s.text(" "+on(r.content))})}u(To,"updateTextContentAndStyles");async function uf(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,o,a)=>(r.push((async()=>{const n=`${o}:${a}`;return await rx(n)?await gs(n,void 0,{class:"label-icon"}):`<i class='${Ie(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}u(uf,"replaceIconSubstring");var Ue=u(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:o=!0,markdown:a=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(R.debug("XYZ createText",t,r,i,s,o,n,"addSvgBackground: ",c),o){const d=a?of(t,h):sf(t),f=await uf($r(d),h),g=t.replace(/\\\\/g,"\\"),m={isNode:n,label:os(t)?g:f,labelStyle:r.replace("fill:","color:")};return await hf(e,m,l,s,c,h)}else{const d=$r(t.replace(/<br\s*\/?>/g,"<br/>")),f=a?rf(d.replace("<br>","<br/>"),h):ef(d),g=df(l,e,f,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Et(g).attr("style",m)}else{const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Et(g).select("rect").attr("style",m.replace(/background:/g,"fill:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Et(g).select("text").attr("style",y)}return i?Et(g).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Et(g).selectAll("tspan.text-outer-tspan").classed("row",!0),g}},"createText");function ra(e,t,r){if(e&&e.length){const[i,s]=t,o=Math.PI/180*r,a=Math.cos(o),n=Math.sin(o);for(const l of e){const[c,h]=l;l[0]=(c-i)*a-(h-s)*n+i,l[1]=(c-i)*n+(h-s)*a+s}}}function Gb(e,t){return e[0]===t[0]&&e[1]===t[1]}function Xb(e,t,r,i=1){const s=r,o=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const c of a)ra(c,n,s);const l=(function(c,h,d){const f=[];for(const k of c){const S=[...k];Gb(S[0],S[S.length-1])||S.push([S[0][0],S[0][1]]),S.length>2&&f.push(S)}const g=[];h=Math.max(h,.1);const m=[];for(const k of f)for(let S=0;S<k.length-1;S++){const _=k[S],B=k[S+1];if(_[1]!==B[1]){const L=Math.min(_[1],B[1]);m.push({ymin:L,ymax:Math.max(_[1],B[1]),x:L===_[1]?_[0]:B[0],islope:(B[0]-_[0])/(B[1]-_[1])})}}if(m.sort(((k,S)=>k.ymin<S.ymin?-1:k.ymin>S.ymin?1:k.x<S.x?-1:k.x>S.x?1:k.ymax===S.ymax?0:(k.ymax-S.ymax)/Math.abs(k.ymax-S.ymax))),!m.length)return g;let y=[],C=m[0].ymin,x=0;for(;y.length||m.length;){if(m.length){let k=-1;for(let S=0;S<m.length&&!(m[S].ymin>C);S++)k=S;m.splice(0,k+1).forEach((S=>{y.push({s:C,edge:S})}))}if(y=y.filter((k=>!(k.edge.ymax<=C))),y.sort(((k,S)=>k.edge.x===S.edge.x?0:(k.edge.x-S.edge.x)/Math.abs(k.edge.x-S.edge.x))),(d!==1||x%h==0)&&y.length>1)for(let k=0;k<y.length;k+=2){const S=k+1;if(S>=y.length)break;const _=y[k].edge,B=y[S].edge;g.push([[Math.round(_.x),C],[Math.round(B.x),C]])}C+=d,y.forEach((k=>{k.edge.x=k.edge.x+d*k.edge.islope})),x++}return g})(a,o,i);if(s){for(const c of a)ra(c,n,-s);(function(c,h,d){const f=[];c.forEach((g=>f.push(...g))),ra(f,h,d)})(l,n,-s)}return l}function Cs(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let o=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=s),Xb(e,s,i,o||1)}class rl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Cs(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function So(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 Vb extends rl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=Cs(t,Object.assign({},r,{hachureGap:i})),o=Math.PI/180*r.hachureAngle,a=[],n=.5*i*Math.cos(o),l=.5*i*Math.sin(o);for(const[c,h]of s)So([c,h])&&a.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,r)}}}class Zb extends rl{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(t,s);return i.ops=i.ops.concat(o.ops),i}}class Kb{constructor(t){this.helper=t}fillPolygons(t,r){const i=Cs(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const a=s/4;for(const n of t){const l=So(n),c=l/s,h=Math.ceil(c)-1,d=l-h*s,f=(n[0][0]+n[1][0])/2-s/4,g=Math.min(n[0][1],n[1][1]);for(let m=0;m<h;m++){const y=g+d+m*s,C=f-a+2*Math.random()*a,x=y-a+2*Math.random()*a,k=this.helper.ellipse(C,x,o,o,r);i.push(...k.ops)}}return{type:"fillSketch",ops:i}}}class Qb{constructor(t){this.helper=t}fillPolygons(t,r){const i=Cs(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,o=[];return t.forEach((a=>{const n=So(a),l=Math.floor(n/(i+s)),c=(n+s-l*(i+s))/2;let h=a[0],d=a[1];h[0]>d[0]&&(h=a[1],d=a[0]);const f=Math.atan((d[1]-h[1])/(d[0]-h[0]));for(let g=0;g<l;g++){const m=g*(i+s),y=m+i,C=[h[0]+m*Math.cos(f)+c*Math.cos(f),h[1]+m*Math.sin(f)+c*Math.sin(f)],x=[h[0]+y*Math.cos(f)+c*Math.cos(f),h[1]+y*Math.sin(f)+c*Math.sin(f)];o.push(...this.helper.doubleLineOps(C[0],C[1],x[0],x[1],r))}})),o}}class Jb{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,o=Cs(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((o=>{const a=So(o),n=Math.round(a/(2*r));let l=o[0],c=o[1];l[0]>c[0]&&(l=o[1],c=o[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let d=0;d<n;d++){const f=2*d*r,g=2*(d+1)*r,m=Math.sqrt(2*Math.pow(r,2)),y=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],C=[l[0]+g*Math.cos(h),l[1]+g*Math.sin(h)],x=[y[0]+m*Math.cos(h+Math.PI/4),y[1]+m*Math.sin(h+Math.PI/4)];s.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],C[0],C[1],i))}})),s}}const _e={};class t1{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const e1=0,ia=1,Zh=2,Fs={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 sa(e,t){return e.type===t}function il(e){const t=[],r=(function(a){const n=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:e1,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:ia,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return n[n.length]={type:Zh,text:""},n})(e);let i="BOD",s=0,o=r[s];for(;!sa(o,Zh);){let a=0;const n=[];if(i==="BOD"){if(o.text!=="M"&&o.text!=="m")return il("M0,0"+e);s++,a=Fs[o.text],i=o.text}else sa(o,ia)?a=Fs[i]:(s++,a=Fs[o.text],i=o.text);if(!(s+a<r.length))throw new Error("Path data ended short");for(let l=s;l<s+a;l++){const c=r[l];if(!sa(c,ia))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof Fs[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=a,o=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function ff(e){let t=0,r=0,i=0,s=0;const o=[];for(const{key:a,data:n}of e)switch(a){case"M":o.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],o.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":o.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],o.push({key:"L",data:[t,r]});break;case"C":o.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":o.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":o.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],o.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":o.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":o.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],o.push({key:"T",data:[t,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=i,r=s}return o}function pf(e){const t=[];let r="",i=0,s=0,o=0,a=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,s]=h,[o,a]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],s=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,s]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,s]});break;case"V":s=h[0],t.push({key:"L",data:[i,s]});break;case"S":{let d=0,f=0;r==="C"||r==="S"?(d=i+(i-n),f=s+(s-l)):(d=i,f=s),t.push({key:"C",data:[d,f,...h]}),n=h[0],l=h[1],i=h[2],s=h[3];break}case"T":{const[d,f]=h;let g=0,m=0;r==="Q"||r==="T"?(g=i+(i-n),m=s+(s-l)):(g=i,m=s);const y=i+2*(g-i)/3,C=s+2*(m-s)/3,x=d+2*(g-d)/3,k=f+2*(m-f)/3;t.push({key:"C",data:[y,C,x,k,d,f]}),n=g,l=m,i=d,s=f;break}case"Q":{const[d,f,g,m]=h,y=i+2*(d-i)/3,C=s+2*(f-s)/3,x=g+2*(d-g)/3,k=m+2*(f-m)/3;t.push({key:"C",data:[y,C,x,k,g,m]}),n=d,l=f,i=g,s=m;break}case"A":{const d=Math.abs(h[0]),f=Math.abs(h[1]),g=h[2],m=h[3],y=h[4],C=h[5],x=h[6];d===0||f===0?(t.push({key:"C",data:[i,s,C,x,C,x]}),i=C,s=x):(i!==C||s!==x)&&(gf(i,s,C,x,d,f,g,m,y).forEach((function(k){t.push({key:"C",data:k})})),i=C,s=x);break}case"Z":t.push({key:"Z",data:[]}),i=o,s=a}r=c}return t}function qi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function gf(e,t,r,i,s,o,a,n,l,c){const h=(d=a,Math.PI*d/180);var d;let f=[],g=0,m=0,y=0,C=0;if(c)[g,m,y,C]=c;else{[e,t]=qi(e,t,-h),[r,i]=qi(r,i,-h);const Y=(e-r)/2,O=(t-i)/2;let D=Y*Y/(s*s)+O*O/(o*o);D>1&&(D=Math.sqrt(D),s*=D,o*=D);const v=s*s,N=o*o,P=v*N-v*O*O-N*Y*Y,it=v*O*O+N*Y*Y,Q=(n===l?-1:1)*Math.sqrt(Math.abs(P/it));y=Q*s*O/o+(e+r)/2,C=Q*-o*Y/s+(t+i)/2,g=Math.asin(parseFloat(((t-C)/o).toFixed(9))),m=Math.asin(parseFloat(((i-C)/o).toFixed(9))),e<y&&(g=Math.PI-g),r<y&&(m=Math.PI-m),g<0&&(g=2*Math.PI+g),m<0&&(m=2*Math.PI+m),l&&g>m&&(g-=2*Math.PI),!l&&m>g&&(m-=2*Math.PI)}let x=m-g;if(Math.abs(x)>120*Math.PI/180){const Y=m,O=r,D=i;m=l&&m>g?g+120*Math.PI/180*1:g+120*Math.PI/180*-1,f=gf(r=y+s*Math.cos(m),i=C+o*Math.sin(m),O,D,s,o,a,0,l,[m,Y,y,C])}x=m-g;const k=Math.cos(g),S=Math.sin(g),_=Math.cos(m),B=Math.sin(m),L=Math.tan(x/4),E=4/3*s*L,F=4/3*o*L,G=[e,t],j=[e+E*S,t-F*k],q=[r+E*B,i-F*_],st=[r,i];if(j[0]=2*G[0]-j[0],j[1]=2*G[1]-j[1],c)return[j,q,st].concat(f);{f=[j,q,st].concat(f);const Y=[];for(let O=0;O<f.length;O+=3){const D=qi(f[O][0],f[O][1],h),v=qi(f[O+1][0],f[O+1][1],h),N=qi(f[O+2][0],f[O+2][1],h);Y.push([D[0],D[1],v[0],v[1],N[0],N[1]])}return Y}}const r1={randOffset:function(e,t){return _t(e,t)},randOffsetWithRange:function(e,t,r){return ao(e,t,r)},ellipse:function(e,t,r,i,s){const o=yf(r,i,s);return an(e,t,s,o).opset},doubleLineOps:function(e,t,r,i,s){return Or(e,t,r,i,s,!0)}};function mf(e,t,r,i,s){return{type:"path",ops:Or(e,t,r,i,s)}}function Hs(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let o=0;o<i-1;o++)s.push(...Or(e[o][0],e[o][1],e[o+1][0],e[o+1][1],r));return t&&s.push(...Or(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?mf(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function i1(e,t,r,i,s){return(function(o,a){return Hs(o,!0,a)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function Kh(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Es(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Es(r[0],1.5*(1+.22*t.roughness),tc(t));for(let o=1;o<r.length;o++){const a=r[o];if(a.length){const n=Es(a,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Es(a,1.5*(1+.22*t.roughness),tc(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&s.push(c)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function yf(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),o=2*Math.PI/s;let a=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return a+=_t(a*l,r),n+=_t(n*l,r),{increment:o,rx:a,ry:n}}function an(e,t,r,i){const[s,o]=ec(i.increment,e,t,i.rx,i.ry,1,i.increment*ao(.1,ao(.4,1,r),r),r);let a=no(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=ec(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=no(n,null,r);a=a.concat(l)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function Qh(e,t,r,i,s,o,a,n,l){const c=e,h=t;let d=Math.abs(r/2),f=Math.abs(i/2);d+=_t(.01*d,l),f+=_t(.01*f,l);let g=s,m=o;for(;g<0;)g+=2*Math.PI,m+=2*Math.PI;m-g>2*Math.PI&&(g=0,m=2*Math.PI);const y=2*Math.PI/l.curveStepCount,C=Math.min(y/2,(m-g)/2),x=rc(C,c,h,d,f,g,m,1,l);if(!l.disableMultiStroke){const k=rc(C,c,h,d,f,g,m,1.5,l);x.push(...k)}return a&&(n?x.push(...Or(c,h,c+d*Math.cos(g),h+f*Math.sin(g),l),...Or(c,h,c+d*Math.cos(m),h+f*Math.sin(m),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+d*Math.cos(g),h+f*Math.sin(g)]})),{type:"path",ops:x}}function Jh(e,t){const r=pf(ff(il(e))),i=[];let s=[0,0],o=[0,0];for(const{key:a,data:n}of r)switch(a){case"M":o=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...Or(o[0],o[1],n[0],n[1],t)),o=[n[0],n[1]];break;case"C":{const[l,c,h,d,f,g]=n;i.push(...s1(l,c,h,d,f,g,o,t)),o=[f,g];break}case"Z":i.push(...Or(o[0],o[1],s[0],s[1],t)),o=[s[0],s[1]]}return{type:"path",ops:i}}function oa(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+_t(s,t),i[0][1]+_t(s,t)]});for(let a=1;a<o;a++)r.push({op:"lineTo",data:[i[a][0]+_t(s,t),i[a][1]+_t(s,t)]})}}return{type:"fillPath",ops:r}}function hi(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!_e[s])switch(s){case"zigzag":_e[s]||(_e[s]=new Vb(i));break;case"cross-hatch":_e[s]||(_e[s]=new Zb(i));break;case"dots":_e[s]||(_e[s]=new Kb(i));break;case"dashed":_e[s]||(_e[s]=new Qb(i));break;case"zigzag-line":_e[s]||(_e[s]=new Jb(i));break;default:s="hachure",_e[s]||(_e[s]=new rl(i))}return _e[s]})(t,r1).fillPolygons(e,t)}function tc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Cf(e){return e.randomizer||(e.randomizer=new t1(e.seed||0)),e.randomizer.next()}function ao(e,t,r,i=1){return r.roughness*i*(Cf(r)*(t-e)+e)}function _t(e,t,r=1){return ao(-e,e,t,r)}function Or(e,t,r,i,s,o=!1){const a=o?s.disableMultiStrokeFill:s.disableMultiStroke,n=nn(e,t,r,i,s,!0,!1);if(a)return n;const l=nn(e,t,r,i,s,!0,!0);return n.concat(l)}function nn(e,t,r,i,s,o,a){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=s.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const d=h/2,f=.2+.2*Cf(s);let g=s.bowing*s.maxRandomnessOffset*(i-t)/200,m=s.bowing*s.maxRandomnessOffset*(e-r)/200;g=_t(g,s,c),m=_t(m,s,c);const y=[],C=()=>_t(d,s,c),x=()=>_t(h,s,c),k=s.preserveVertices;return a?y.push({op:"move",data:[e+(k?0:C()),t+(k?0:C())]}):y.push({op:"move",data:[e+(k?0:_t(h,s,c)),t+(k?0:_t(h,s,c))]}),a?y.push({op:"bcurveTo",data:[g+e+(r-e)*f+C(),m+t+(i-t)*f+C(),g+e+2*(r-e)*f+C(),m+t+2*(i-t)*f+C(),r+(k?0:C()),i+(k?0:C())]}):y.push({op:"bcurveTo",data:[g+e+(r-e)*f+x(),m+t+(i-t)*f+x(),g+e+2*(r-e)*f+x(),m+t+2*(i-t)*f+x(),r+(k?0:x()),i+(k?0:x())]}),y}function Es(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+_t(t,r),e[0][1]+_t(t,r)]),i.push([e[0][0]+_t(t,r),e[0][1]+_t(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+_t(t,r),e[s][1]+_t(t,r)]),s===e.length-1&&i.push([e[s][0]+_t(t,r),e[s][1]+_t(t,r)]);return no(i,null,r)}function no(e,t,r){const i=e.length,s=[];if(i>3){const o=[],a=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*e[n+1][0]-a*e[n-1][0])/6,l[1]+(a*e[n+1][1]-a*e[n-1][1])/6],o[2]=[e[n+1][0]+(a*e[n][0]-a*e[n+2][0])/6,e[n+1][1]+(a*e[n][1]-a*e[n+2][1])/6],o[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...nn(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function ec(e,t,r,i,s,o,a,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const d=[t+i*Math.cos(h),r+s*Math.sin(h)];l.push(d),c.push(d)}c.push([t+i*Math.cos(0),r+s*Math.sin(0)]),c.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const h=_t(.5,n)-Math.PI/2;c.push([_t(o,n)+t+.9*i*Math.cos(h-e),_t(o,n)+r+.9*s*Math.sin(h-e)]);const d=2*Math.PI+h-.01;for(let f=h;f<d;f+=e){const g=[_t(o,n)+t+i*Math.cos(f),_t(o,n)+r+s*Math.sin(f)];l.push(g),c.push(g)}c.push([_t(o,n)+t+i*Math.cos(h+2*Math.PI+.5*a),_t(o,n)+r+s*Math.sin(h+2*Math.PI+.5*a)]),c.push([_t(o,n)+t+.98*i*Math.cos(h+a),_t(o,n)+r+.98*s*Math.sin(h+a)]),c.push([_t(o,n)+t+.9*i*Math.cos(h+.5*a),_t(o,n)+r+.9*s*Math.sin(h+.5*a)])}return[c,l]}function rc(e,t,r,i,s,o,a,n,l){const c=o+_t(.1,l),h=[];h.push([_t(n,l)+t+.9*i*Math.cos(c-e),_t(n,l)+r+.9*s*Math.sin(c-e)]);for(let d=c;d<=a;d+=e)h.push([_t(n,l)+t+i*Math.cos(d),_t(n,l)+r+s*Math.sin(d)]);return h.push([t+i*Math.cos(a),r+s*Math.sin(a)]),h.push([t+i*Math.cos(a),r+s*Math.sin(a)]),no(h,null,l)}function s1(e,t,r,i,s,o,a,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const d=n.disableMultiStroke?1:2,f=n.preserveVertices;for(let g=0;g<d;g++)g===0?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(f?0:_t(c[0],n)),a[1]+(f?0:_t(c[0],n))]}),h=f?[s,o]:[s+_t(c[g],n),o+_t(c[g],n)],l.push({op:"bcurveTo",data:[e+_t(c[g],n),t+_t(c[g],n),r+_t(c[g],n),i+_t(c[g],n),h[0],h[1]]});return l}function Ni(e){return[...e]}function ic(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(Ni(e[0]),Ni(e[1]),Ni(e[2]),Ni(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const o=[],a=1-t;i.push(Ni(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*s[n+1][0]-a*s[n-1][0])/6,l[1]+(a*s[n+1][1]-a*s[n-1][1])/6],o[2]=[s[n+1][0]+(a*s[n][0]-a*s[n+2][0])/6,s[n+1][1]+(a*s[n][1]-a*s[n+2][1])/6],o[3]=[s[n+1][0],s[n+1][1]],i.push(o[1],o[2],o[3])}}return i}function js(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function o1(e,t,r){const i=js(t,r);if(i===0)return js(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),js(e,Wr(t,r,s))}function Wr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function ln(e,t,r,i){const s=i||[];if((function(n,l){const c=n[l+0],h=n[l+1],d=n[l+2],f=n[l+3];let g=3*h[0]-2*c[0]-f[0];g*=g;let m=3*h[1]-2*c[1]-f[1];m*=m;let y=3*d[0]-2*f[0]-c[0];y*=y;let C=3*d[1]-2*f[1]-c[1];return C*=C,g<y&&(g=y),m<C&&(m=C),g+m})(e,t)<r){const n=e[t+0];s.length?(o=s[s.length-1],a=n,Math.sqrt(js(o,a))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],d=e[t+3],f=Wr(l,c,.5),g=Wr(c,h,.5),m=Wr(h,d,.5),y=Wr(f,g,.5),C=Wr(g,m,.5),x=Wr(y,C,.5);ln([l,f,y,x],0,r,s),ln([x,C,m,d],0,r,s)}var o,a;return s}function a1(e,t){return lo(e,0,e.length,t)}function lo(e,t,r,i,s){const o=s||[],a=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const d=o1(e[h],a,n);d>l&&(l=d,c=h)}return Math.sqrt(l)>i?(lo(e,t,c+1,i,o),lo(e,c,r,i,o)):(o.length||o.push(a),o.push(n)),o}function aa(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let o=0;o<s;o++)ln(e,3*o,t,i);return r&&r>0?lo(i,0,i.length,r):i}const Me="none";class ho{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,o){const a=this._o(o);return this._d("line",[mf(t,r,i,s,a)],a)}rectangle(t,r,i,s,o){const a=this._o(o),n=[],l=i1(t,r,i,s,a);if(a.fill){const c=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];a.fillStyle==="solid"?n.push(oa([c],a)):n.push(hi([c],a))}return a.stroke!==Me&&n.push(l),this._d("rectangle",n,a)}ellipse(t,r,i,s,o){const a=this._o(o),n=[],l=yf(i,s,a),c=an(t,r,a,l);if(a.fill)if(a.fillStyle==="solid"){const h=an(t,r,a,l).opset;h.type="fillPath",n.push(h)}else n.push(hi([c.estimatedPoints],a));return a.stroke!==Me&&n.push(c.opset),this._d("ellipse",n,a)}circle(t,r,i,s){const o=this.ellipse(t,r,i,i,s);return o.shape="circle",o}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Hs(t,!1,i)],i)}arc(t,r,i,s,o,a,n=!1,l){const c=this._o(l),h=[],d=Qh(t,r,i,s,o,a,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const g=Qh(t,r,i,s,o,a,!0,!1,f);g.type="fillPath",h.push(g)}else h.push((function(f,g,m,y,C,x,k){const S=f,_=g;let B=Math.abs(m/2),L=Math.abs(y/2);B+=_t(.01*B,k),L+=_t(.01*L,k);let E=C,F=x;for(;E<0;)E+=2*Math.PI,F+=2*Math.PI;F-E>2*Math.PI&&(E=0,F=2*Math.PI);const G=(F-E)/k.curveStepCount,j=[];for(let q=E;q<=F;q+=G)j.push([S+B*Math.cos(q),_+L*Math.sin(q)]);return j.push([S+B*Math.cos(F),_+L*Math.sin(F)]),j.push([S,_]),hi([j],k)})(t,r,i,s,o,a,c));return c.stroke!==Me&&h.push(d),this._d("arc",h,c)}curve(t,r){const i=this._o(r),s=[],o=Kh(t,i);if(i.fill&&i.fill!==Me)if(i.fillStyle==="solid"){const a=Kh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?a.push(...c):c.length===3?a.push(...aa(ic([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):a.push(...aa(ic(c),10,(1+i.roughness)/2))}a.length&&s.push(hi([a],i))}return i.stroke!==Me&&s.push(o),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],o=Hs(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(oa([t],i)):s.push(hi([t],i))),i.stroke!==Me&&s.push(o),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=i.fill&&i.fill!=="transparent"&&i.fill!==Me,a=i.stroke!==Me,n=!!(i.simplification&&i.simplification<1),l=(function(h,d,f){const g=pf(ff(il(h))),m=[];let y=[],C=[0,0],x=[];const k=()=>{x.length>=4&&y.push(...aa(x,d)),x=[]},S=()=>{k(),y.length&&(m.push(y),y=[])};for(const{key:B,data:L}of g)switch(B){case"M":S(),C=[L[0],L[1]],y.push(C);break;case"L":k(),y.push([L[0],L[1]]);break;case"C":if(!x.length){const E=y.length?y[y.length-1]:C;x.push([E[0],E[1]])}x.push([L[0],L[1]]),x.push([L[2],L[3]]),x.push([L[4],L[5]]);break;case"Z":k(),y.push([C[0],C[1]])}if(S(),!f)return m;const _=[];for(const B of m){const L=a1(B,f);L.length&&_.push(L)}return _})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=Jh(t,i);if(o)if(i.fillStyle==="solid")if(l.length===1){const h=Jh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else s.push(oa(l,i));else s.push(hi(l,i));return a&&(n?l.forEach((h=>{s.push(Hs(h,!1,i))})):s.push(c)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const o=typeof r=="number"&&r>=0?s.data.map((a=>+a.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const o of r){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Me};break;case"fillPath":a={d:this.opsToPath(o),stroke:Me,strokeWidth:0,fill:i.fill||Me};break;case"fillSketch":a=this.fillSketch(o,i)}a&&s.push(a)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Me,strokeWidth:i,fill:Me}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class n1{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new ho(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of r)switch(a.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,a,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,a,o,n),s.restore();break}case"fillSketch":this.fillSketch(s,a,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const o of r.ops){const a=typeof i=="number"&&i>=0?o.data.map((n=>+n.toFixed(i))):o.data;switch(o.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a),a}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a),a}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a),a}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o),o}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,o,a,n=!1,l){const c=this.gen.arc(t,r,i,s,o,a,n,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const As="http://www.w3.org/2000/svg";class l1{constructor(t,r){this.svg=t,this.gen=new ho(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(As,"g"),a=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(As,"path"),l.setAttribute("d",this.opsToPath(n,a)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(As,"path"),l.setAttribute("d",this.opsToPath(n,a)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,n,i)}l&&o.appendChild(l)}return o}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const o=t.createElementNS(As,"path");return o.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a)}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a)}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a)}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,o,a,n=!1,l){const c=this.gen.arc(t,r,i,s,o,a,n,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var dt={canvas:(e,t)=>new n1(e,t),svg:(e,t)=>new l1(e,t),generator:e=>new ho(e),newSeed:()=>ho.newSeed()},h1=1,c1=3;async function sl(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!ol(e);await Promise.all([...t].map(i=>new Promise(s=>{function o(){if(i.style.display="flex",i.style.flexDirection="column",r){const a=Ot().fontSize?Ot().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[l=qd.fontSize]=Co(a),c=l*n+"px";i.style.minWidth=c,i.style.maxWidth=c}else i.style.width="100%";s(i)}u(o,"setupImage"),setTimeout(()=>{i.complete&&o()}),i.addEventListener("error",o),i.addEventListener("load",o)})))}u(sl,"configureLabelImages");function ol(e){return e.nodeType===c1?e.textContent?.trim()!=="":e.nodeType!==h1||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(ol)}u(ol,"hasTextBesidesImages");var sc=3,d1=32,u1=u(async(e,t,r)=>{const i=Ot(),s=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),o=s.insert("g").attr("class","label").attr("style",ee(t.labelStyle)),n=[{text:typeof t.label=="string"?t.label:t.label?.[0]??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(x=>({text:x,cssClass:"c4-descr"}))].filter(x=>x.text),l=t.width?Math.max(t.width-2*(t.padding??0),d1):Ot().flowchart?.wrappingWidth??200,h=i.c4?.wrap??!0?l:Number.POSITIVE_INFINITY,d=await Promise.all(n.map(async x=>{const k=o.append("g").attr("class",x.cssClass),S=await Ue(k,Ie($r(x.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:h,style:t.labelStyle},i);return Et(S).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),Et(S).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:k,box:k.node().getBBox()}})),f=Math.max(...d.map(({box:x})=>x.width),0);let g=0;for(const{el:x,box:k}of d)x.attr("transform",`translate(${f/2-k.x-k.width/2}, ${g-k.y})`),g+=k.height+sc;const m=d.length>0?g-sc:0;o.insert("rect",":first-child"),o.attr("transform",`translate(${-f/2}, ${-m/2})`);const y=o.node().getBBox(),C=(t.padding??0)/2;return{shapeSvg:s,bbox:y,halfPadding:C,label:o}},"c4LabelHelper"),Ct=u(async(e,t,r)=>{if(t.stereotype!==void 0)return u1(e,t,r);let i;const s=t.useHtmlLabels||ar(Ot()?.htmlLabels);r?i=r:i="node default";const o=e.insert("g").attr("class",i).attr("id",t.domId||t.id),a=o.insert("g").attr("class","label").attr("style",ee(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",h=await Ue(a,Ie($r(n),Ot()),{useHtmlLabels:s,width:t.width||t.wrappingWidth||Ot().flowchart?.wrappingWidth,classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},Ot()),d=(t?.padding??0)/2;let f;if(s){const g=h.children[0],m=Et(h);await sl(g),f=await Xr.measure(()=>g.getBoundingClientRect()),m.attr("width",f.width),m.attr("height",f.height)}else f=await Xr.measure(()=>h.getBBox());return s?a.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):a.attr("transform","translate(0, "+-f.height/2+")"),t.centerLabel&&a.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:o,bbox:f,halfPadding:d,label:a}},"labelHelper"),na=u(async(e,t,r)=>{const i=r.useHtmlLabels??me(Ot()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await Ue(s,Ie($r(t),Ot()),{useHtmlLabels:i,width:r.width||Ot()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),a=r.padding/2;let n;if(me(Ot())){const l=o.children[0],c=Et(o);n=await Xr.measure(()=>l.getBoundingClientRect()),c.attr("width",n.width),c.attr("height",n.height)}else n=await Xr.measure(()=>o.getBBox());return i?s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):s.attr("transform","translate(0, "+-n.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:n,halfPadding:a,label:s}},"insertLabel"),ut=u((e,t,r)=>{if(r){e.width=r.width,e.height=r.height;return}const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),xt=u((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function Rt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}u(Rt,"createPathFromPoints");function Dr(e,t,r,i,s,o){const a=[],l=r-e,c=i-t,h=l/o,d=2*Math.PI/h,f=t+c/2;for(let g=0;g<=50;g++){const m=g/50,y=e+m*l,C=f+s*Math.sin(d*(y-e));a.push({x:y,y:C})}return a}u(Dr,"generateFullSineWavePoints");function er(e,t,r,i,s,o){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,g=e+r*Math.cos(f),m=t+r*Math.sin(f);a.push({x:-g,y:-m})}return a}u(er,"generateCirclePoints");function hn(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),o=t.find(l=>l.getAttribute("stroke")!=="none"),a=u((l,c)=>l?.getAttribute(c)??void 0,"getAttr");if(s){const l={fill:a(s,"fill"),"fill-opacity":a(s,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(o){const l={stroke:a(o,"stroke"),"stroke-width":a(o,"stroke-width")??"1","stroke-opacity":a(o,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}u(hn,"mergePaths");var f1=u((e,t)=>{var r=e.x,i=e.y,s=t.x-r,o=t.y-i,a=e.width/2,n=e.height/2,l,c;return Math.abs(o)*a>Math.abs(s)*n?(o<0&&(n=-n),l=o===0?0:n*s/o,c=n):(s<0&&(a=-a),l=a,c=s===0?0:a*o/s),{x:r+l,y:i+c}},"intersectRect"),Jr=f1,qe=u((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),p1=u(async(e,t,r,i=!1,s=!1)=>{let o=t||"";typeof o=="object"&&(o=o[0]);const a=Ot(),n=me(a);return await Ue(e,o,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},a)},"createLabel"),Fr=p1;function xf(e,t){return e.intersect(t)}u(xf,"intersectNode");var g1=xf;function bf(e,t,r,i){var s=e.x,o=e.y,a=s-i.x,n=o-i.y,l=Math.sqrt(t*t*n*n+r*r*a*a),c=Math.abs(t*r*a/l);i.x<s&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<o&&(h=-h),{x:s+c,y:o+h}}u(bf,"intersectEllipse");var kf=bf;function Tf(e,t,r){return kf(e,t,t,r)}u(Tf,"intersectCircle");var m1=Tf;function Sf(e,t,r,i){{const s=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,n=s*r.x+o*r.y+a,l=s*i.x+o*i.y+a,c=1e-6;if(n!==0&&l!==0&&cn(n,l))return;const h=i.y-r.y,d=r.x-i.x,f=i.x*r.y-r.x*i.y,g=h*e.x+d*e.y+f,m=h*t.x+d*t.y+f;if(Math.abs(g)<c&&Math.abs(m)<c&&cn(g,m))return;const y=s*d-h*o;if(y===0)return;const C=Math.abs(y/2);let x=o*f-d*a;const k=x<0?(x-C)/y:(x+C)/y;x=h*a-s*f;const S=x<0?(x-C)/y:(x+C)/y;return{x:k,y:S}}}u(Sf,"intersectLine");function cn(e,t){return e*t>0}u(cn,"sameSign");var y1=Sf;function wf(e,t,r){let i=e.x,s=e.y,o=[],a=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){a=Math.min(a,h.x),n=Math.min(n,h.y)}):(a=Math.min(a,t.x),n=Math.min(n,t.y));let l=i-e.width/2-a,c=s-e.height/2-n;for(let h=0;h<t.length;h++){let d=t[h],f=t[h<t.length-1?h+1:0],g=y1(e,r,{x:l+d.x,y:c+d.y},{x:l+f.x,y:c+f.y});g&&o.push(g)}return o.length?(o.length>1&&o.sort(function(h,d){let f=h.x-r.x,g=h.y-r.y,m=Math.sqrt(f*f+g*g),y=d.x-r.x,C=d.y-r.y,x=Math.sqrt(y*y+C*C);return m<x?-1:m===x?0:1}),o[0]):e}u(wf,"intersectPolygon");var C1=wf,nt={node:g1,circle:m1,ellipse:kf,polygon:C1,rect:Jr};function _f(e,t){const{labelStyles:r}=pt(t);t.labelStyle=r;const i=xt(t);let s=i;i||(s="anchor");const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=1,{cssStyles:n}=t,l=dt.svg(o),c=ct(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,a*2,c),d=o.insert(()=>h,":first-child");return d.attr("class","anchor").attr("style",ee(n)),ut(t,d),t.intersect=function(f){return R.info("Circle intersect",t,a,f),nt.circle(t,a,f)},o}u(_f,"anchor");function dn(e,t,r,i,s,o,a){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),d=(r-e)/2,f=(i-t)/2,g=d/s,m=f/o,y=Math.sqrt(g**2+m**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");const C=Math.sqrt(1-y**2),x=l+C*o*Math.sin(h)*(a?-1:1),k=c-C*s*Math.cos(h)*(a?-1:1),S=Math.atan2((t-k)/o,(e-x)/s);let B=Math.atan2((i-k)/o,(r-x)/s)-S;a&&B<0&&(B+=2*Math.PI),!a&&B>0&&(B-=2*Math.PI);const L=[];for(let E=0;E<20;E++){const F=E/19,G=S+F*B,j=x+s*Math.cos(G),q=k+o*Math.sin(G);L.push({x:j,y:q})}return L}u(dn,"generateArcPoints");function Bf(e,t,r){const[i,s]=[t,r].sort((o,a)=>a-o);return s*(1-Math.sqrt(1-(e/i/2)**2))}u(Bf,"calculateArcSagitta");async function vf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=u(G=>G+a,"calcTotalHeight"),l=u(G=>{const j=G/2;return[j/(2.5+G/50),j]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await Ct(e,t,xt(t)),d=n(t?.height?t?.height:h.height),[f,g]=l(d),m=Bf(d,f,g),C=(t?.width?t?.width:h.width)+o*2+m-m,x=d,{cssStyles:k}=t,S=[{x:C/2,y:-x/2},{x:-C/2,y:-x/2},...dn(-C/2,-x/2,-C/2,x/2,f,g,!1),{x:C/2,y:x/2},...dn(C/2,x/2,C/2,-x/2,f,g,!0)],_=dt.svg(c),B=ct(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const L=Rt(S),E=_.path(L,B),F=c.insert(()=>E,":first-child");return F.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${f/2}, 0)`),ut(t,F),t.intersect=function(G){return nt.polygon(t,S,G)},c}u(vf,"bowTieRect");async function Lf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=pt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,label:n}=await Ct(e,t,xt(t)),l=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,h=Math.max(a.width+c*2,t.width??0,80),d=Math.max(Math.min(h*.08,12),5),f=Math.max(a.height+c*2+d,t.height??0),g=-f/2+d,m=f/2,y=h*.72,C=[`M${-h/2},${g}`,`L${-y/2},${m}`,`A${y/2},${d} 0 0 0 ${y/2},${m}`,`L${h/2},${g}`,`A${h/2},${d} 0 0 0 ${-h/2},${g}`,"Z"].join(" "),{cssStyles:x}=t,k=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const F=dt.svg(o).path(C,ct(t,{}));k.node()?.appendChild(F),x&&k.attr("style",x)}else k.append("path").attr("d",C).attr("style",s);k.append("ellipse").attr("cx",0).attr("cy",g).attr("rx",h/2).attr("ry",d).attr("style",`fill:none;stroke:${l};stroke-width:1px`),ut(t,k);const S=g+(m-g)/2;n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${S-a.height/2-(a.y-(a.top??0))})`);const _=12,B=u((E,F,G)=>Array.from({length:_+1},(j,q)=>{const st=Math.PI-q*Math.PI/_;return{x:E*Math.cos(st),y:F+G*d*Math.sin(st)}}),"arc"),L=[...B(h/2,g,-1),...B(y/2,m,1).reverse()];return t.intersect=function(E){return nt.polygon(t,L,E)},o}u(Lf,"bucket");var oc=20,ac=8,x1=80,la=8;async function Ff(e,t){const{themeVariables:r}=Ot(),i=r.clusterBkg,s=r.clusterBorder,{nodeStyles:o}=pt(t),{shapeSvg:a,bbox:n}=await Ct(e,t,xt(t)),l=t.padding??8,c=n.height,h=Math.max(n.width+l*2,x1,t?.width??0),d=Math.max(c+ac+oc+l*2,t?.height??0),f=-h/2,g=-d/2,m=-28/2,y=a.select(".label");y&&(t.useHtmlLabels??me(Ot())?y.attr("transform",`translate(${-n.width/2}, ${-n.height/2+m})`):y.attr("transform",`translate(0, ${-n.height/2+m})`));let C;if(t.look==="handDrawn"){const B=dt.svg(a),L=ct(t,{fill:i,stroke:s,fillStyle:"solid"}),E=B.path(qe(f,g,h,d,la),L);C=a.insert(()=>E,":first-child"),C.attr("class","basic label-container collapsed-group").attr("style",ee(t.cssStyles))}else C=a.insert("rect",":first-child"),C.attr("class","basic label-container collapsed-group").attr("style",o).attr("rx",la).attr("ry",la).attr("x",f).attr("y",g).attr("width",h).attr("height",d).attr("fill",i).attr("stroke",s);const x=g+l+c+ac;a.append("line").attr("class","collapsed-separator").attr("x1",f+8).attr("y1",x).attr("x2",f+h-8).attr("y2",x).attr("stroke",s).attr("stroke-dasharray","3, 3");const k=x+oc/2,S=2.5,_=10;for(let B=-1;B<=1;B++)a.append("circle").attr("class","collapsed-indicator").attr("cx",B*_).attr("cy",k).attr("r",S).attr("fill",s);return ut(t,C),t.calcIntersect=function(B,L){return nt.rect(B,L)},t.intersect=function(B){return nt.rect(t,B)},a}u(Ff,"collapsedGroup");function nr(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}u(nr,"insertPolygonShape");var b1=["right","left","up","down"],al="point",k1=u(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),T1=u(e=>b1.filter(t=>e.has(t)).join("|")||al,"getDirectionKey"),nc={"right|left|up|down":u(({height:e,midpoint:t,padding:r,width:i})=>[{x:0,y:0},{x:t,y:0},{x:i/2,y:2*r},{x:i-t,y:0},{x:i,y:0},{x:i,y:-e/3},{x:i+2*r,y:-e/2},{x:i,y:-2*e/3},{x:i,y:-e},{x:i-t,y:-e},{x:i/2,y:-e-2*r},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*r,y:-e/2},{x:0,y:-e/3}],"right|left|up|down"),"right|left|up":u(({height:e,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],"right|left|up"),"right|left|down":u(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-e},{x:r-t,y:-e},{x:r,y:0}],"right|left|down"),"right|up|down":u(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-e+t},{x:0,y:-e}],"right|up|down"),"left|up|down":u(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:r,y:-e}],"left|up|down"),"right|left":u(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"right|left"),"up|down":u(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"up|down"),"right|up":u(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":u(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":u(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":u(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:u(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e+r}],"right"),left:u(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"left"),up:u(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r}],"up"),down:u(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"down"),[al]:()=>[{x:0,y:0}]},S1=u((e,t,r,i)=>{const s=k1(e),o=(r.padding??0)/2,a=t.height+4*o,n=a/2,l=i??t.width+2*n+2*o,c=T1(s);return(nc[c]??nc[al])({height:a,midpoint:n,padding:o,width:l})},"getArrowPoints");async function Ef(e,t){const r=t,{shapeSvg:i,bbox:s}=await Ct(e,r,xt(r)),o=r.padding??0,a=s.height+2*o,n=a/2,l=s.width+2*n+o,c=r.width??0,d=r.positioned&&(r.widthInColumns??1)>1&&c>l?c:l,f=S1(r.directions??[],s,r,d),g=nr(i,d,a,f);return g.attr("style",r.style??null),ut(r,g),r.intersect=function(m){return nt.polygon(r,f,m)},i}u(Ef,"block_arrow");async function Af(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=pt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,label:n}=await Ct(e,t,xt(t)),l=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,h=18,d=12,f=Math.max(a.width+c*2,t.width??0,90),g=Math.max(a.height+c*2+h,t.height??0),m=-g/2,{cssStyles:y}=t,C=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const S=dt.svg(o).path(qe(-f/2,m,f,g,d),ct(t,{}));C.node()?.appendChild(S),y&&C.attr("style",y)}else C.append("rect").attr("x",-f/2).attr("y",m).attr("width",f).attr("height",g).attr("rx",d).attr("ry",d).attr("style",s);C.append("line").attr("x1",-f/2).attr("y1",m+h).attr("x2",f/2).attr("y2",m+h).attr("style",`stroke:${l};stroke-width:1px`);for(let k=0;k<3;k++)C.append("circle").attr("cx",-f/2+12+k*9).attr("cy",m+h/2).attr("r",2.5).attr("style",`fill:${l};stroke:none`);C.append("rect").attr("class","browser-address-bar").attr("x",-f/2+44).attr("y",m+4).attr("width",Math.max(f-56,10)).attr("height",h-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${l};stroke-width:1px;opacity:0.6`),ut(t,C);const x=m+h+(g-h)/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${x-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(k){return nt.rect(t,k)},o}u(Af,"browser");var Ms=12;async function Mf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?28:s,a=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await Ct(e,t,xt(t)),c=(t?.width??l.width)+(t.look==="neo"?o*2:o+Ms),h=(t?.height??l.height)+(t.look==="neo"?a*2:a),d=0,f=c,g=-h,m=0,y=[{x:d+Ms,y:g},{x:f,y:g},{x:f,y:m},{x:d,y:m},{x:d,y:g+Ms},{x:d+Ms,y:g}];let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const k=dt.svg(n),S=ct(t,{}),_=Rt(y),B=k.path(_,S);C=n.insert(()=>B,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),x&&C.attr("style",x)}else C=nr(n,c,h,y);return i&&C.attr("style",i),ut(t,C),t.intersect=function(k){return nt.polygon(t,y,k)},n}u(Mf,"card");function $f(e,t){const{nodeStyles:r}=pt(t);t.label="";const i=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(28,t.width??0),a=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],n=dt.svg(i),l=ct(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=Rt(a),h=n.path(c,l),d=i.insert(()=>h,":first-child");return s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return nt.polygon(t,a,f)},i}u($f,"choice");async function nl(e,t,r){const{labelStyles:i,nodeStyles:s}=pt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,halfPadding:n}=await Ct(e,t,xt(t)),l=16,c=r?.padding??n,h=t.look==="neo"?a.width/2+l*2:a.width/2+c;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=dt.svg(o),m=ct(t,{}),y=g.circle(0,0,h*2,m);d=o.insert(()=>y,":first-child"),d.attr("class","basic label-container").attr("style",ee(f))}else d=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",h).attr("cx",0).attr("cy",0);return ut(t,d),t.calcIntersect=function(g,m){const y=g.width/2;return nt.circle(g,y,m)},t.intersect=function(g){return R.info("Circle intersect",t,h,g),nt.circle(t,h,g)},o}u(nl,"circle");async function Of(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:s,bbox:o,halfPadding:a}=await Ct(e,r,i),n=s.insert("rect",":first-child"),l=r.padding??0,c=r.positioned?r.width??0:o.width+l,h=r.positioned?r.height??0:o.height+l,d=r.positioned?-c/2:-o.width/2-a,f=r.positioned?-h/2:-o.height/2-a;return n.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",d).attr("y",f).attr("width",c).attr("height",h),ut(r,n),r.intersect=function(g){return nt.rect(r,g)},s}u(Of,"composite");async function Df(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=pt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,label:n}=await Ct(e,t,xt(t)),l=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,h=20,d=12,f=Math.max(a.width+c*2,t.width??0,90),g=Math.max(a.height+c*2+h,t.height??0),m=-g/2,{cssStyles:y}=t,C=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const S=dt.svg(o).path(qe(-f/2,m,f,g,d),ct(t,{}));C.node()?.appendChild(S),y&&C.attr("style",y)}else C.append("rect").attr("x",-f/2).attr("y",m).attr("width",f).attr("height",g).attr("rx",d).attr("ry",d).attr("style",s);C.append("text").attr("x",-f/2+12).attr("y",m+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${l}`).text(">_"),ut(t,C);const x=m+h+(g-h)/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${x-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(k){return nt.rect(t,k)},o}u(Df,"consoleWindow");function Pf(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},o={x:-(i/2)*t,y:i/2*r},a={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${o.x},${o.y} L ${n.x},${n.y}
201
- M ${s.x},${s.y} L ${a.x},${a.y}`}u(Pf,"createLine");function If(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),o=Math.max(30,t?.width??0),{cssStyles:a}=t,n=dt.svg(s),l=ct(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,o*2,l),h=Pf(o),d=n.path(h,l),f=s.insert(()=>c,":first-child");return f.insert(()=>d),f.attr("class","outer-path"),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),ut(t,f),t.intersect=function(g){return R.info("crossedCircle intersect",t,{radius:o,point:g}),nt.circle(t,o,g)},s}u(If,"crossedCircle");function ur(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,g=e+r*Math.cos(f),m=t+r*Math.sin(f);a.push({x:-g,y:-m})}return a}u(ur,"generateCirclePoints");async function Rf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await Ct(e,t,xt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+n,h=o.height+l,d=Math.max(5,h*.1),{cssStyles:f}=t,g=[...ur(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...ur(c/2+d*2,-d,d,20,-180,-270),...ur(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...ur(c/2,h/2,d,20,0,90)],m=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...ur(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...ur(c/2+c*.1,-d,d,20,-180,-270),...ur(c/2+c*.1,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...ur(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2,y:h/2+d}],y=dt.svg(s),C=ct(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=Rt(g).replace("Z",""),S=y.path(k,C),_=Rt(m),B=y.path(_,{...C}),L=s.insert("g",":first-child");return L.insert(()=>B,":first-child").attr("stroke-opacity",0),L.insert(()=>S,":first-child"),L.attr("class","text"),f&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${d}, 0)`),a.attr("transform",`translate(${-c/2+d-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),ut(t,L),t.intersect=function(E){return nt.polygon(t,m,E)},s}u(Rf,"curlyBraceLeft");function fr(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,g=e+r*Math.cos(f),m=t+r*Math.sin(f);a.push({x:g,y:m})}return a}u(fr,"generateCirclePoints");async function qf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await Ct(e,t,xt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),h=o.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:f}=t,g=[...fr(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...fr(c/2+d*2,-d,d,20,-180,-270),...fr(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...fr(c/2,h/2,d,20,0,90)],m=[{x:-c/2,y:-h/2-d},{x:c/2,y:-h/2-d},...fr(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...fr(c/2+d*2,-d,d,20,-180,-270),...fr(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...fr(c/2,h/2,d,20,0,90),{x:c/2,y:h/2+d},{x:-c/2,y:h/2+d}],y=dt.svg(s),C=ct(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=Rt(g).replace("Z",""),S=y.path(k,C),_=Rt(m),B=y.path(_,{...C}),L=s.insert("g",":first-child");return L.insert(()=>B,":first-child").attr("stroke-opacity",0),L.insert(()=>S,":first-child"),L.attr("class","text"),f&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${-d}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),ut(t,L),t.intersect=function(E){return nt.polygon(t,m,E)},s}u(qf,"curlyBraceRight");function ce(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,g=e+r*Math.cos(f),m=t+r*Math.sin(f);a.push({x:-g,y:-m})}return a}u(ce,"generateCirclePoints");async function Nf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await Ct(e,t,xt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),h=o.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:f}=t,g=[...ce(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...ce(c/2+d*2,-d,d,20,-180,-270),...ce(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...ce(c/2,h/2,d,20,0,90)],m=[...ce(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...ce(-c/2-d/2,-d,d,20,0,90),...ce(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...ce(-c/2+d+d/2,h/2,d,30,-180,-270)],y=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...ce(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...ce(c/2+d*2,-d,d,20,-180,-270),...ce(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...ce(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2-d-d/2,y:h/2+d},...ce(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...ce(-c/2-d/2,-d,d,20,0,90),...ce(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...ce(-c/2+d+d/2,h/2,d,30,-180,-270)],C=dt.svg(s),x=ct(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const S=Rt(g).replace("Z",""),_=C.path(S,x),L=Rt(m).replace("Z",""),E=C.path(L,x),F=Rt(y),G=C.path(F,{...x}),j=s.insert("g",":first-child");return j.insert(()=>G,":first-child").attr("stroke-opacity",0),j.insert(()=>_,":first-child"),j.insert(()=>E,":first-child"),j.attr("class","text"),f&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",i),j.attr("transform",`translate(${d-d/4}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),ut(t,j),t.intersect=function(q){return nt.polygon(t,y,q)},s}u(Nf,"curlyBraces");async function zf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:c,bbox:h}=await Ct(e,t,xt(t)),d=Math.max(n,(h.width+o*2)*1.25,t?.width??0),f=Math.max(l,h.height+a*2,t?.height??0),g=f/2,{cssStyles:m}=t,y=dt.svg(c),C=ct(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=d,k=f,S=x-g,_=k/4,B=[{x:S,y:0},{x:_,y:0},{x:0,y:k/2},{x:_,y:k},{x:S,y:k},...er(-S,-k/2,g,50,270,90)],L=Rt(B),E=y.path(L,C),F=c.insert(()=>E,":first-child");return F.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&F.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&F.selectChildren("path").attr("style",i),F.attr("transform",`translate(${-d/2}, ${-f/2})`),ut(t,F),t.intersect=function(G){return nt.polygon(t,B,G)},c}u(zf,"curvedTrapezoid");async function Wf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await Ct(e,t,xt(t)),n=t.padding??20,l=Math.max(o.width+n*2,t.width??0,100),c=Math.min(Math.max(l*.23,16),56),h=c*.27,d=Math.max(o.height+n*2,t.height?t.height-(2*c-h):0),f=Math.min(l*.177,d*.45),g=d+2*c-h,m=-g/2,y=m+2*c-h,C=s.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:x}=t;if(t.look==="handDrawn"){const F=dt.svg(s),G=ct(t,{}),j=F.path(qe(-l/2,y,l,d,f),G),q=F.circle(0,m+c,c*2,G);C.insert(()=>q,":first-child"),C.insert(()=>j,":first-child"),x&&C.attr("style",x)}else C.append("rect").attr("x",-l/2).attr("y",y).attr("width",l).attr("height",d).attr("rx",f).attr("ry",f).attr("style",i),C.append("circle").attr("cx",0).attr("cy",m+c).attr("r",c).attr("style",i);ut(t,C);const k=y+d/2;a.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${k-o.height/2-(o.y-(o.top??0))})`);const S=m+c,_=Math.asin(Math.min(1,(y-S)/c))*180/Math.PI,E=[...er(0,-S,c,24,180+_,-_),...er(-(-l/2+f),-(y+f),f,12,90,0),...er(-(-l/2+f),-(g/2-f),f,12,360,270),...er(-(l/2-f),-(g/2-f),f,12,270,180),...er(-(l/2-f),-(y+f),f,12,180,90)];return t.intersect=function(F){return nt.polygon(t,E,F)},s}u(Wf,"person");var w1=u((e,t,r,i,s,o)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),_1=u((e,t,r,i,s,o)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),B1=u((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),lc=8,hc=8;async function Hf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?24:s,a=t.look==="neo"?24:s,n=t.width??0;if(t.width&&(t.width=t.width-a,t.width<hc&&(t.width=hc)),t.height){const k=n/2/(2.5+n/50);t.height=t.height-o-k*3,t.height<lc&&(t.height=lc)}const{shapeSvg:l,bbox:c,label:h}=await Ct(e,t,xt(t)),d=Math.max(t.width??0,c.width)+a,f=d/2,g=f/(2.5+d/50),m=Math.max(t.height??0,c.height)+o+g;let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=dt.svg(l),k=_1(0,0,d,m,f,g),S=B1(0,g,d,m,f,g),_=ct(t,{}),B=x.path(k,_),L=x.path(S,ct(t,{fill:"none"}));y=l.insert(()=>L,":first-child"),y=l.insert(()=>B,":first-child"),y.attr("class","basic label-container"),C&&y.attr("style",C)}else{const x=w1(0,0,d,m,f,g);y=l.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",ee(C)).attr("style",i)}return y.attr("label-offset-y",g),y.attr("transform",`translate(${-d/2}, ${-(m/2+g)})`),ut(t,y),h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(x){const k=nt.rect(t,x),S=k.x-(t.x??0);if(f!=0&&(Math.abs(S)<(t.width??0)/2||Math.abs(S)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-g)){let _=g*g*(1-S*S/(f*f));_>0&&(_=Math.sqrt(_)),_=g-_,x.y-(t.y??0)>0&&(_=-_),k.y+=_}return k},l}u(Hf,"cylinder");async function Bi(e,t,r){const{labelStyles:i,nodeStyles:s}=pt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a}=await Ct(e,t,xt(t)),n=Math.max(a.width+r.labelPaddingX*2,t?.width||0),l=Math.max(a.height+r.labelPaddingY*2,t?.height||0),c=-n/2,h=-l/2;let d,{rx:f,ry:g}=t;const{cssStyles:m}=t;if(r?.rx&&r.ry&&(f=r.rx,g=r.ry),t.look==="handDrawn"){const y=dt.svg(o),C=ct(t,{}),x=f||g?y.path(qe(c,h,n,l,f||0),C):y.rectangle(c,h,n,l,C);d=o.insert(()=>x,":first-child"),d.attr("class","basic label-container").attr("style",ee(m))}else d=o.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",s).attr("rx",ee(f)).attr("ry",ee(g)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return ut(t,d,t.look==="handDrawn"?void 0:{width:n,height:l}),t.calcIntersect=function(y,C){return nt.rect(y,C)},t.intersect=function(y){return nt.rect(t,y)},o}u(Bi,"drawRect");async function jf(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:o,width:a,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(o??0)*2,labelPaddingY:s??o??0},c=await Bi(e,t,l);if(t.look==="handDrawn"){const g=dt.svg(c),m=ct(t,{}),y=c.select(".basic.label-container > path:nth-child(2)"),C=y.node();if(!C)return c;let x=null;if(C instanceof SVGGraphicsElement)x=C.getBBox();else return c;return c.insert(()=>g.line(x.x,x.y,x.x+x.width,x.y,m),".basic.label-container g.label"),c.insert(()=>g.line(x.x,x.y+x.height,x.x+x.width,x.y+x.height,m),".basic.label-container g.label"),y.remove(),c}const h=c.select(".basic.label-container"),d=(Number(h.attr("width"))||a)??0,f=(Number(h.attr("height"))||n)??0;return d>0&&f>0&&h.attr("stroke-dasharray",`${d} ${f}`),c}u(jf,"datastore");async function Yf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?16:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await Ct(e,t,xt(t)),c=n.width+s,h=n.height+o,d=h*.2,f=-c/2,g=-h/2-d/2,{cssStyles:m}=t,y=dt.svg(a),C=ct(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:f,y:g+d},{x:-f,y:g+d},{x:-f,y:-g},{x:f,y:-g},{x:f,y:g},{x:-f,y:g},{x:-f,y:g+d}],k=y.polygon(x.map(_=>[_.x,_.y]),C),S=a.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${f+(t.padding??0)/2-(n.x-(n.left??0))}, ${g+d+(t.padding??0)/2-(n.y-(n.top??0))})`),ut(t,S),t.intersect=function(_){return nt.rect(t,_)},a}u(Yf,"dividedRectangle");async function Uf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t),s=t.look==="neo"?12:5;t.labelStyle=r;const o=t.padding??0,a=t.look==="neo"?16:o,{shapeSvg:n,bbox:l}=await Ct(e,t,xt(t)),c=(t?.width?t?.width/2:l.width/2)+(a??0),h=c-s;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=dt.svg(n),m=ct(t,{roughness:.2,strokeWidth:2.5}),y=ct(t,{roughness:.2,strokeWidth:1.5}),C=g.circle(0,0,c*2,m),x=g.circle(0,0,h*2,y);d=n.insert("g",":first-child"),d.attr("class",ee(t.cssClasses)).attr("style",ee(f)),d.node()?.appendChild(C),d.node()?.appendChild(x)}else{d=n.insert("g",":first-child");const g=d.insert("circle",":first-child"),m=d.insert("circle");d.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return ut(t,d),t.intersect=function(g){return R.info("DoubleCircle intersect",t,c,g),nt.circle(t,c,g)},n}u(Uf,"doublecircle");function Gf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=pt(t);t.label="",t.labelStyle=i;const o=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),a=7,{cssStyles:n}=t,l=dt.svg(o),{nodeBorder:c}=r,h=ct(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const d=l.circle(0,0,a*2,h),f=o.insert(()=>d,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),ut(t,f),t.intersect=function(g){return R.info("filledCircle intersect",t,{radius:a,point:g}),nt.circle(t,a,g)},o}u(Gf,"filledCircle");var cc=10,dc=10;async function Xf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=t?.height??0,t.height<cc&&(t.height=cc),t.width=(t?.width??0)-o-o/2,t.width<dc&&(t.width=dc));const{shapeSvg:a,bbox:n,label:l}=await Ct(e,t,xt(t)),c=(t?.width?t?.width:n.width)+(o??0),h=t?.height?t?.height:c+n.height,d=h,f=[{x:0,y:-h},{x:d,y:-h},{x:d/2,y:0}],{cssStyles:g}=t,m=dt.svg(a),y=ct(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=Rt(f),x=m.path(C,y),k=a.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return g&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=h,ut(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-h/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(S){return R.info("Triangle intersect",t,f,S),nt.polygon(t,f,S)},a}u(Xf,"flippedTriangle");async function Vf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await Ct(e,t,xt(t)),n=t.padding??12,l=Math.max(o.width+n*2,t.width??0,90),c=o.height+n*2,h=Math.max(Math.min(c*.16,14),8),d=Math.max(c+h,t.height??0),f=d-h,g=Math.max(l*.38,28),m=-d/2,y=[{x:-l/2,y:m},{x:-l/2+g,y:m},{x:-l/2+g,y:m+h},{x:l/2,y:m+h},{x:l/2,y:d/2},{x:-l/2,y:d/2}],C=[`M${y[0].x},${y[0].y}`,...y.slice(1).map(_=>`L${_.x},${_.y}`),"Z"].join(" "),{cssStyles:x}=t;let k;if(t.look==="handDrawn"){const B=dt.svg(s).path(C,ct(t,{}));k=s.insert(()=>B,":first-child").attr("class","basic label-container"),x&&k.attr("style",x)}else k=s.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",i);t.look==="handDrawn"?ut(t,k):ut(t,k,{width:l,height:d});const S=m+h+f/2;return a.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${S-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(_){return nt.polygon(t,y,_)},s}u(Vf,"folder");function Zf(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:o}=pt(t);t.label="";const a=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,d=-1*c/2,f=dt.svg(a),g=ct(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=f.rectangle(h,d,l,c,g),y=a.insert(()=>m,":first-child");n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",o),ut(t,y);const C=i?.padding??0;return t.width&&t.height&&(t.width+=C/2||0,t.height+=C/2||0),t.intersect=function(x){return nt.rect(t,x)},a}u(Zf,"forkJoin");async function Kf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=15,o=10,a=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-n*2,t.height<o&&(t.height=o),t.width=(t?.width??0)-a*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:c}=await Ct(e,t,xt(t)),h=(t?.width?t?.width:Math.max(s,c.width))+a*2,d=(t?.height?t?.height:Math.max(o,c.height))+n*2,f=d/2,{cssStyles:g}=t,m=dt.svg(l),y=ct(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-h/2,y:-d/2},{x:h/2-f,y:-d/2},...er(-h/2+f,0,f,50,90,270),{x:h/2-f,y:d/2},{x:-h/2,y:d/2}],x=Rt(C),k=m.path(x,y),S=l.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),ut(t,S),t.intersect=function(_){return R.info("Pill intersect",t,{radius:f,point:_}),nt.polygon(t,C,_)},l}u(Kf,"halfRoundedRectangle");var v1=u((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Qf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const o=t.padding??0,a=70,n=32,l=t.look==="neo"?a:o,c=t.look==="neo"?n:o;if(t.width||t.height){const S=(t.height??0)/s;t.width=(t?.width??0)-2*S-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:d}=await Ct(e,t,xt(t)),f=(t?.height?t?.height:d.height)+l,g=f/s,m=(t?.width?t?.width:d.width)+2*g+c,y=[{x:g,y:0},{x:m-g,y:0},{x:m,y:-f/2},{x:m-g,y:-f},{x:g,y:-f},{x:0,y:-f/2}];let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const k=dt.svg(h),S=ct(t,{}),_=v1(0,0,m,f,g),B=k.path(_,S);C=h.insert(()=>B,":first-child").attr("transform",`translate(${-m/2}, ${f/2})`),x&&C.attr("style",x)}else C=nr(h,m,f,y);return i&&C.attr("style",i),t.width=m,t.height=f,ut(t,C),t.intersect=function(k){return nt.polygon(t,y,k)},h}u(Qf,"hexagon");async function Jf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await Ct(e,t,xt(t)),o=Math.max(30,t?.width??0),a=Math.max(30,t?.height??0),{cssStyles:n}=t,l=dt.svg(s),c=ct(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:o,y:0},{x:0,y:a},{x:o,y:a}],d=Rt(h),f=l.path(d,c),g=s.insert(()=>f,":first-child");return g.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",i),g.attr("transform",`translate(${-o/2}, ${-a/2})`),ut(t,g),t.intersect=function(m){return R.info("Pill intersect",t,{points:h}),nt.polygon(t,h,m)},s}u(Jf,"hourglass");async function tp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=pt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await Ct(e,t,"icon-shape default"),f=t.pos==="t",g=n,m=n,{nodeBorder:y}=r,{stylesMap:C}=_i(t),x=-m/2,k=-g/2,S=t.label?8:0,_=dt.svg(c),B=ct(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const L=_.rectangle(x,k,m,g,B),E=Math.max(m,h.width),F=g+h.height+S,G=_.rectangle(-E/2,-F/2,E,F,{...B,fill:"transparent",stroke:"none"}),j=c.insert(()=>L,":first-child"),q=c.insert(()=>G);if(t.icon){const st=c.append("g");st.html(`<g>${await gs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const Y=st.node().getBBox(),O=Y.width,D=Y.height,v=Y.x,N=Y.y;st.attr("transform",`translate(${-O/2-v},${f?h.height/2+S/2-D/2-N:-h.height/2-S/2-D/2-N})`),st.attr("style",`color: ${C.get("stroke")??y};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-F/2:F/2-h.height})`),j.attr("transform",`translate(0,${f?h.height/2+S/2:-h.height/2-S/2})`),ut(t,q),t.intersect=function(st){if(R.info("iconSquare intersect",t,st),!t.label)return nt.rect(t,st);const Y=t.x??0,O=t.y??0,D=t.height??0;let v=[];return f?v=[{x:Y-h.width/2,y:O-D/2},{x:Y+h.width/2,y:O-D/2},{x:Y+h.width/2,y:O-D/2+h.height+S},{x:Y+m/2,y:O-D/2+h.height+S},{x:Y+m/2,y:O+D/2},{x:Y-m/2,y:O+D/2},{x:Y-m/2,y:O-D/2+h.height+S},{x:Y-h.width/2,y:O-D/2+h.height+S}]:v=[{x:Y-m/2,y:O-D/2},{x:Y+m/2,y:O-D/2},{x:Y+m/2,y:O-D/2+g},{x:Y+h.width/2,y:O-D/2+g},{x:Y+h.width/2/2,y:O+D/2},{x:Y-h.width/2,y:O+D/2},{x:Y-h.width/2,y:O-D/2+g},{x:Y-m/2,y:O-D/2+g}],nt.polygon(t,v,st)},c}u(tp,"icon");async function ep(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=pt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await Ct(e,t,"icon-shape default"),f=20,g=t.label?8:0,m=t.pos==="t",{nodeBorder:y,mainBkg:C}=r,{stylesMap:x}=_i(t),k=dt.svg(c),S=ct(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=x.get("fill");S.stroke=_??C;const B=c.append("g");t.icon&&B.html(`<g>${await gs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=B.node().getBBox(),E=L.width,F=L.height,G=L.x,j=L.y,q=Math.max(E,F)*Math.SQRT2+f*2,st=k.circle(0,0,q,S),Y=Math.max(q,h.width),O=q+h.height+g,D=k.rectangle(-Y/2,-O/2,Y,O,{...S,fill:"transparent",stroke:"none"}),v=c.insert(()=>st,":first-child"),N=c.insert(()=>D);return B.attr("transform",`translate(${-E/2-G},${m?h.height/2+g/2-F/2-j:-h.height/2-g/2-F/2-j})`),B.attr("style",`color: ${x.get("stroke")??y};`),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${m?-O/2:O/2-h.height})`),v.attr("transform",`translate(0,${m?h.height/2+g/2:-h.height/2-g/2})`),ut(t,N),t.intersect=function(P){return R.info("iconSquare intersect",t,P),nt.rect(t,P)},c}u(ep,"iconCircle");async function rp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=pt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:f}=await Ct(e,t,"icon-shape default"),g=t.pos==="t",m=n+d*2,y=n+d*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:k}=_i(t),S=-y/2,_=-m/2,B=t.label?8:0,L=dt.svg(c),E=ct(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const F=k.get("fill");E.stroke=F??x;const G=L.path(qe(S,_,y,m,5),E),j=Math.max(y,h.width),q=m+h.height+B,st=L.rectangle(-j/2,-q/2,j,q,{...E,fill:"transparent",stroke:"none"}),Y=c.insert(()=>G,":first-child").attr("class","icon-shape2"),O=c.insert(()=>st);if(t.icon){const D=c.append("g");D.html(`<g>${await gs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const v=D.node().getBBox(),N=v.width,P=v.height,it=v.x,Q=v.y;D.attr("transform",`translate(${-N/2-it},${g?h.height/2+B/2-P/2-Q:-h.height/2-B/2-P/2-Q})`),D.attr("style",`color: ${k.get("stroke")??C};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-q/2:q/2-h.height})`),Y.attr("transform",`translate(0,${g?h.height/2+B/2:-h.height/2-B/2})`),ut(t,O),t.intersect=function(D){if(R.info("iconSquare intersect",t,D),!t.label)return nt.rect(t,D);const v=t.x??0,N=t.y??0,P=t.height??0;let it=[];return g?it=[{x:v-h.width/2,y:N-P/2},{x:v+h.width/2,y:N-P/2},{x:v+h.width/2,y:N-P/2+h.height+B},{x:v+y/2,y:N-P/2+h.height+B},{x:v+y/2,y:N+P/2},{x:v-y/2,y:N+P/2},{x:v-y/2,y:N-P/2+h.height+B},{x:v-h.width/2,y:N-P/2+h.height+B}]:it=[{x:v-y/2,y:N-P/2},{x:v+y/2,y:N-P/2},{x:v+y/2,y:N-P/2+m},{x:v+h.width/2,y:N-P/2+m},{x:v+h.width/2/2,y:N+P/2},{x:v-h.width/2,y:N+P/2},{x:v-h.width/2,y:N-P/2+m},{x:v-y/2,y:N-P/2+m}],nt.polygon(t,it,D)},c}u(rp,"iconRounded");async function ip(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=pt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:f}=await Ct(e,t,"icon-shape default"),g=t.pos==="t",m=n+d*2,y=n+d*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:k}=_i(t),S=-y/2,_=-m/2,B=t.label?8:0,L=dt.svg(c),E=ct(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const F=k.get("fill");E.stroke=F??x;const G=L.path(qe(S,_,y,m,.1),E),j=Math.max(y,h.width),q=m+h.height+B,st=L.rectangle(-j/2,-q/2,j,q,{...E,fill:"transparent",stroke:"none"}),Y=c.insert(()=>G,":first-child"),O=c.insert(()=>st);if(t.icon){const D=c.append("g");D.html(`<g>${await gs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const v=D.node().getBBox(),N=v.width,P=v.height,it=v.x,Q=v.y;D.attr("transform",`translate(${-N/2-it},${g?h.height/2+B/2-P/2-Q:-h.height/2-B/2-P/2-Q})`),D.attr("style",`color: ${k.get("stroke")??C};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-q/2:q/2-h.height})`),Y.attr("transform",`translate(0,${g?h.height/2+B/2:-h.height/2-B/2})`),ut(t,O),t.intersect=function(D){if(R.info("iconSquare intersect",t,D),!t.label)return nt.rect(t,D);const v=t.x??0,N=t.y??0,P=t.height??0;let it=[];return g?it=[{x:v-h.width/2,y:N-P/2},{x:v+h.width/2,y:N-P/2},{x:v+h.width/2,y:N-P/2+h.height+B},{x:v+y/2,y:N-P/2+h.height+B},{x:v+y/2,y:N+P/2},{x:v-y/2,y:N+P/2},{x:v-y/2,y:N-P/2+h.height+B},{x:v-h.width/2,y:N-P/2+h.height+B}]:it=[{x:v-y/2,y:N-P/2},{x:v+y/2,y:N-P/2},{x:v+y/2,y:N-P/2+m},{x:v+h.width/2,y:N-P/2+m},{x:v+h.width/2/2,y:N+P/2},{x:v-h.width/2,y:N+P/2},{x:v-h.width/2,y:N-P/2+m},{x:v-y/2,y:N-P/2+m}],nt.polygon(t,it,D)},c}u(ip,"iconSquare");async function sp(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),o=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/o;const{labelStyles:a}=pt(t);t.labelStyle=a;const n=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?n??0:0,t?.assetWidth??s),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??o;t.width=Math.max(c,n??0);const{shapeSvg:d,bbox:f,label:g}=await Ct(e,t,"image-shape default"),m=t.pos==="t",y=-c/2,C=-h/2,x=t.label?8:0,k=dt.svg(d),S=ct(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=k.rectangle(y,C,c,h,S),B=Math.max(c,f.width),L=h+f.height+x,E=k.rectangle(-B/2,-L/2,B,L,{...S,fill:"none",stroke:"none"}),F=d.insert(()=>_,":first-child"),G=d.insert(()=>E);if(t.img){const j=d.append("image");j.attr("href",t.img),j.attr("width",c),j.attr("height",h),j.attr("preserveAspectRatio","none"),j.attr("transform",`translate(${-c/2},${m?L/2-h:-L/2})`)}return g.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-h/2-f.height/2-x/2:h/2-f.height/2+x/2})`),F.attr("transform",`translate(0,${m?f.height/2+x/2:-f.height/2-x/2})`),ut(t,G),t.intersect=function(j){if(R.info("iconSquare intersect",t,j),!t.label)return nt.rect(t,j);const q=t.x??0,st=t.y??0,Y=t.height??0;let O=[];return m?O=[{x:q-f.width/2,y:st-Y/2},{x:q+f.width/2,y:st-Y/2},{x:q+f.width/2,y:st-Y/2+f.height+x},{x:q+c/2,y:st-Y/2+f.height+x},{x:q+c/2,y:st+Y/2},{x:q-c/2,y:st+Y/2},{x:q-c/2,y:st-Y/2+f.height+x},{x:q-f.width/2,y:st-Y/2+f.height+x}]:O=[{x:q-c/2,y:st-Y/2},{x:q+c/2,y:st-Y/2},{x:q+c/2,y:st-Y/2+h},{x:q+f.width/2,y:st-Y/2+h},{x:q+f.width/2/2,y:st+Y/2},{x:q-f.width/2,y:st+Y/2},{x:q-f.width/2,y:st-Y/2+h},{x:q-c/2,y:st-Y/2+h}],nt.polygon(t,O,j)},d}u(sp,"imageSquare");async function op(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await Ct(e,t,xt(t)),c=Math.max(l.height+o*2,t.height??0),h=Math.max(l.width+a*2,(t.width??0)-c),d=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let f;const{cssStyles:g}=t;if(t.look==="handDrawn"){const m=dt.svg(n),y=ct(t,{}),C=Rt(d),x=m.path(C,y);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),g&&f.attr("style",g)}else f=nr(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,ut(t,f),t.intersect=function(m){return nt.polygon(t,d,m)},n}u(op,"inv_trapezoid");async function ap(e,t){const{shapeSvg:r,bbox:i,label:s}=await Ct(e,t,"label"),o=r.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),ut(t,o),t.intersect=function(l){return nt.rect(t,l)},r}u(ap,"labelRect");async function np(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await Ct(e,t,xt(t)),c=Math.max(l.height+o,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),d=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let f;const{cssStyles:g}=t;if(t.look==="handDrawn"){const m=dt.svg(n),y=ct(t,{}),C=Rt(d),x=m.path(C,y);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),g&&f.attr("style",g)}else f=nr(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,ut(t,f),t.intersect=function(m){return nt.polygon(t,d,m)},n}u(np,"lean_left");async function lp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await Ct(e,t,xt(t)),c=Math.max(l.height+o,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),d=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let f;const{cssStyles:g}=t;if(t.look==="handDrawn"){const m=dt.svg(n),y=ct(t,{}),C=Rt(d),x=m.path(C,y);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),g&&f.attr("style",g)}else f=nr(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,ut(t,f),t.intersect=function(m){return nt.polygon(t,d,m)},n}u(lp,"lean_right");function hp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,a=Math.max(35,t?.width??0),n=Math.max(35,t?.height??0),l=7,c=[{x:a,y:0},{x:0,y:n+l/2},{x:a-2*l,y:n+l/2},{x:0,y:2*n},{x:a,y:n-l/2},{x:2*l,y:n-l/2}],h=dt.svg(s),d=ct(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=Rt(c),g=h.path(f,d),m=s.insert(()=>g,":first-child");return m.attr("class","outer-path"),o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${a/2},${-n})`),ut(t,m),t.intersect=function(y){return R.info("lightningBolt intersect",t,y),nt.polygon(t,c,y)},s}u(hp,"lightningBolt");var L1=u((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),F1=u((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),E1=u((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),uc=10,fc=10;async function cp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?24:s;if(t.width||t.height){const x=t.width??0;t.width=(t.width??0)-o,t.width<fc&&(t.width=fc);const S=x/2/(2.5+x/50);t.height=(t.height??0)-a-S*3,t.height<uc&&(t.height=uc)}const{shapeSvg:n,bbox:l,label:c}=await Ct(e,t,xt(t)),h=(t?.width?t?.width:l.width)+o*2,d=h/2,f=d/(2.5+h/50),g=(t?.height?t?.height:l.height)+f+a*2,m=g*.1;let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=dt.svg(n),k=F1(0,0,h,g,d,f,m),S=E1(0,f,h,g,d,f),_=ct(t,{}),B=x.path(k,_),L=x.path(S,_);n.insert(()=>L,":first-child").attr("class","line"),y=n.insert(()=>B,":first-child"),y.attr("class","basic label-container"),C&&y.attr("style",C)}else{const x=L1(0,0,h,g,d,f,m);y=n.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",ee(C)).attr("style",i)}return y.attr("label-offset-y",f),y.attr("transform",`translate(${-h/2}, ${-(g/2+f)})`),ut(t,y),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+f-(l.y-(l.top??0))})`),t.intersect=function(x){const k=nt.rect(t,x),S=k.x-(t.x??0);if(d!=0&&(Math.abs(S)<(t.width??0)/2||Math.abs(S)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-f)){let _=f*f*(1-S*S/(d*d));_>0&&(_=Math.sqrt(_)),_=f-_,x.y-(t.y??0)>0&&(_=-_),k.y+=_}return k},n}u(cp,"linedCylinder");async function dp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;if(t.width||t.height){const _=t.width;t.width=(_??0)*10/11-o*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await Ct(e,t,xt(t)),h=(t?.width?t?.width:l.width)+(o??0)*2,d=(t?.height?t?.height:l.height)+(a??0)*2,f=t.look==="neo"?d/4:d/8,g=d+f,{cssStyles:m}=t,y=dt.svg(n),C=ct(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:-h/2-h/2*.1,y:-g/2},{x:-h/2-h/2*.1,y:g/2},...Dr(-h/2-h/2*.1,g/2,h/2+h/2*.1,g/2,f,.8),{x:h/2+h/2*.1,y:-g/2},{x:-h/2-h/2*.1,y:-g/2},{x:-h/2,y:-g/2},{x:-h/2,y:g/2*1.1},{x:-h/2,y:-g/2}],k=y.polygon(x.map(_=>[_.x,_.y]),C),S=n.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-d/2+(t.padding??0)-f/2-(l.y-(l.top??0))})`),ut(t,S),t.intersect=function(_){return nt.polygon(t,x,_)},n}u(dp,"linedWaveEdgedRect");async function up(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2-2*n,10),t.height=Math.max((t?.height??0)-a*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await Ct(e,t,xt(t)),d=(t?.width?t?.width:c.width)+o*2+2*n,f=(t?.height?t?.height:c.height)+a*2+2*n,g=d-2*n,m=f-2*n,y=-g/2,C=-m/2,{cssStyles:x}=t,k=dt.svg(l),S=ct(t,{}),_=[{x:y-n,y:C+n},{x:y-n,y:C+m+n},{x:y+g-n,y:C+m+n},{x:y+g-n,y:C+m},{x:y+g,y:C+m},{x:y+g,y:C+m-n},{x:y+g+n,y:C+m-n},{x:y+g+n,y:C-n},{x:y+n,y:C-n},{x:y+n,y:C},{x:y,y:C},{x:y,y:C+n}],B=[{x:y,y:C+n},{x:y+g-n,y:C+n},{x:y+g-n,y:C+m},{x:y+g,y:C+m},{x:y+g,y:C},{x:y,y:C}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const L=Rt(_);let E=k.path(L,S);const F=Rt(B);let G=k.path(F,S);t.look!=="handDrawn"&&(E=hn(E),G=hn(G));const j=l.insert("g",":first-child");return j.insert(()=>E),j.insert(()=>G),j.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(c.width/2)-n-(c.x-(c.left??0))}, ${-(c.height/2)+n-(c.y-(c.top??0))})`),ut(t,j),t.intersect=function(q){return nt.polygon(t,_,q)},l}u(up,"multiRect");async function fp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await Ct(e,t,xt(t)),n=t.padding??0,l=t.look==="neo"?16:n,c=t.look==="neo"?12:n;let h=!0;(t.width||t.height)&&(h=!1,t.width=(t?.width??0)-l*2,t.height=(t?.height??0)-c*3);const d=Math.max(o.width,t?.width??0)+l*2,f=Math.max(o.height,t?.height??0)+c*3,g=t.look==="neo"?f/4:f/8,m=f+(h?g/2:-g/2),y=-d/2,C=-m/2,x=10,{cssStyles:k}=t,S=Dr(y-x,C+m+x,y+d-x,C+m+x,g,.8),_=S?.[S.length-1],B=[{x:y-x,y:C+x},{x:y-x,y:C+m+x},...S,{x:y+d-x,y:_.y-x},{x:y+d,y:_.y-x},{x:y+d,y:_.y-2*x},{x:y+d+x,y:_.y-2*x},{x:y+d+x,y:C-x},{x:y+x,y:C-x},{x:y+x,y:C},{x:y,y:C},{x:y,y:C+x}],L=[{x:y,y:C+x},{x:y+d-x,y:C+x},{x:y+d-x,y:_.y-x},{x:y+d,y:_.y-x},{x:y+d,y:C},{x:y,y:C}],E=dt.svg(s),F=ct(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const G=Rt(B),j=E.path(G,F),q=Rt(L),st=E.path(q,F),Y=s.insert(()=>j,":first-child");return Y.insert(()=>st),Y.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",i),Y.attr("transform",`translate(0,${-g/2})`),a.attr("transform",`translate(${-(o.width/2)-x-(o.x-(o.left??0))}, ${-(o.height/2)+x-g/2-(o.y-(o.top??0))})`),ut(t,Y),t.intersect=function(O){return nt.polygon(t,B,O)},s}u(fp,"multiWaveEdgedRectangle");async function pp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=pt(t);t.labelStyle=i,t.useHtmlLabels||me(Vt())||(t.centerLabel=!0);const{shapeSvg:a,bbox:n,label:l}=await Ct(e,t,xt(t)),c=Math.max(n.width+(t.padding??0)*2,t?.width??0),h=Math.max(n.height+(t.padding??0)*2,t?.height??0),d=-c/2,f=-h/2,{cssStyles:g}=t,m=dt.svg(a),y=ct(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=m.rectangle(d,f,c,h,y),x=a.insert(()=>C,":first-child");return x.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),g&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",g),s&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),ut(t,x),t.intersect=function(k){return nt.rect(t,k)},a}u(pp,"note");var A1=u((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 gp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await Ct(e,t,xt(t)),a=o.width+(t.padding??0),n=o.height+(t.padding??0),l=a+n,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=dt.svg(s),m=ct(t,{}),y=A1(0,0,l),C=g.path(y,m);d=s.insert(()=>C,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),f&&d.attr("style",f)}else d=nr(s,l,l,h),d.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&d.attr("style",i),ut(t,d),t.calcIntersect=function(g,m){const y=g.width,C=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],x=nt.polygon(g,C,m);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(g){return this.calcIntersect(t,g)},s}u(gp,"question");async function mp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?21:s??0,a=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:c}=await Ct(e,t,xt(t)),h=l.width+(t.look==="neo"?o*2:o),d=Math.max(l.height+(t.look==="neo"?a*2:a),t.height??0),f=d/4,m=-Math.max(h,(t.width??0)-f)/2,y=-d/2,C=y/2,x=[{x:m+C,y},{x:m,y:0},{x:m+C,y:-y},{x:-m,y:-y},{x:-m,y}],{cssStyles:k}=t,S=dt.svg(n),_=ct(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const B=Rt(x),L=S.path(B,_),E=n.insert(()=>L,":first-child");return E.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(${-C/2},0)`),c.attr("transform",`translate(${-C/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),ut(t,E),t.intersect=function(F){return nt.polygon(t,x,F)},n}u(mp,"rect_left_inv_arrow");async function yp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=o.insert("g"),n=o.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await Fr(n,c,t.labelStyle,!0,!0);let d={width:0,height:0};if(me(Ot())){const F=h.children[0],G=Et(h);d=F.getBoundingClientRect(),G.attr("width",d.width),G.attr("height",d.height)}R.info("Text 2",l);const f=l||[],g=h.getBBox(),m=await Fr(n,Array.isArray(f)?f.join("<br/>"):f,t.labelStyle,!0,!0),y=m.children[0],C=Et(m);d=y.getBoundingClientRect(),C.attr("width",d.width),C.attr("height",d.height);const x=(t.padding||0)/2;Et(m).attr("transform","translate( "+(d.width>g.width?0:(g.width-d.width)/2)+", "+(g.height+x+5)+")"),Et(h).attr("transform","translate( "+(d.width<g.width?0:-(g.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-x+3)+")");const k=d.width+(t.padding||0),S=d.height+(t.padding||0),_=-d.width/2-x,B=-d.height/2-x;let L,E;if(t.look==="handDrawn"){const F=dt.svg(o),G=ct(t,{}),j=F.path(qe(_,B,k,S,t.rx||0),G),q=F.line(-d.width/2-x,-d.height/2-x+g.height+x,d.width/2+x,-d.height/2-x+g.height+x,G);E=o.insert(()=>(R.debug("Rough node insert CXC",j),q),":first-child"),L=o.insert(()=>(R.debug("Rough node insert CXC",j),j),":first-child")}else L=a.insert("rect",":first-child"),E=a.insert("line"),L.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-x).attr("y",-d.height/2-x).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),E.attr("class","divider").attr("x1",-d.width/2-x).attr("x2",d.width/2+x).attr("y1",-d.height/2-x+g.height+x).attr("y2",-d.height/2-x+g.height+x);return ut(t,L),t.intersect=function(F){return nt.rect(t,F)},o}u(yp,"rectWithTitle");async function Cp(e,t,{config:{themeVariables:r}}){const i=r?.radius??5,s={rx:i,ry:i,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return Bi(e,t,s)}u(Cp,"roundedRect");var Ir=8;async function xp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await Ct(e,t,xt(t)),c=(t?.width??n.width)+s*2+(t.look==="neo"?Ir:Ir*2),h=(t?.height??n.height)+o*2,d=c-Ir,f=h,g=Ir-c/2,m=-h/2,{cssStyles:y}=t,C=dt.svg(a),x=ct(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=[{x:g,y:m},{x:g+d,y:m},{x:g+d,y:m+f},{x:g-Ir,y:m+f},{x:g-Ir,y:m},{x:g,y:m},{x:g,y:m+f}],S=C.polygon(k.map(B=>[B.x,B.y]),x),_=a.insert(()=>S,":first-child");return _.attr("class","basic label-container outer-path").attr("style",ee(y)),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),l.attr("transform",`translate(${Ir/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),ut(t,_),t.intersect=function(B){return nt.rect(t,B)},a}u(xp,"shadedProcess");async function bp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2,10),t.height=Math.max((t?.height??0)/1.5-a*2,10));const{shapeSvg:n,bbox:l,label:c}=await Ct(e,t,xt(t)),h=(t?.width?t?.width:l.width)+o*2,d=((t?.height?t?.height:l.height)+a*2)*1.5,f=h,g=d/1.5,m=-f/2,y=-g/2,{cssStyles:C}=t,x=dt.svg(n),k=ct(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=[{x:m,y},{x:m,y:y+g},{x:m+f,y:y+g},{x:m+f,y:y-g/2}],_=Rt(S),B=x.path(_,k),L=n.insert(()=>B,":first-child");return L.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",C),i&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",i),L.attr("transform",`translate(0, ${g/4})`),c.attr("transform",`translate(${-f/2+(t.padding??0)-(l.x-(l.left??0))}, ${-g/4+(t.padding??0)-(l.y-(l.top??0))})`),ut(t,L),t.intersect=function(E){return nt.polygon(t,S,E)},n}u(bp,"slopedRect");async function kp(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,o={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return Bi(e,t,o)}u(kp,"squareRect");async function Tp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?20:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await Ct(e,t,xt(t)),c=l.height+(t.look==="neo"?a*2:a),h=l.width+c/4+(t.look==="neo"?o*2:o),d=c/2,{cssStyles:f}=t,g=dt.svg(n),m=ct(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2+d,y:-c/2},{x:h/2-d,y:-c/2},...er(-h/2+d,0,d,50,90,270),{x:h/2-d,y:c/2},...er(h/2-d,0,d,50,270,450)],C=Rt(y),x=g.path(C,m),k=n.insert(()=>x,":first-child");return k.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),ut(t,k),t.intersect=function(S){return nt.polygon(t,y,S)},n}u(Tp,"stadium");async function Sp(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Bi(e,t,r)}u(Sp,"state");function wp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=pt(t);t.labelStyle=i;const{cssStyles:o}=t,{lineColor:a,stateBorder:n,nodeBorder:l,nodeShadow:c}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const h=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),d=dt.svg(h),f=ct(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=d.circle(0,0,t.width,{...f,stroke:a,strokeWidth:2}),m=n??l,y=(t.width??0)*5/14,C=d.circle(0,0,y,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),x=h.insert(()=>g,":first-child");if(x.insert(()=>C),t.look!=="handDrawn"&&x.attr("class","outer-path"),o&&x.selectAll("path").attr("style",o),s&&x.selectAll("path").attr("style",s),t.width<25&&c&&t.look!=="handDrawn"){const k=e.node()?.ownerSVGElement?.id??"",S=k?`${k}-drop-shadow-small`:"drop-shadow-small";x.attr("style",`filter:url(#${S})`)}return ut(t,x),t.intersect=function(k){return nt.circle(t,(t.width??0)/2,k)},h}u(wp,"stateEnd");function _p(e,t,{config:{themeVariables:r}}){const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const o=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const l=dt.svg(o).circle(0,0,t.width,A0(i));a=o.insert(()=>l),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else a=o.insert("circle",":first-child"),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const n=e.node()?.ownerSVGElement?.id??"",l=n?`${n}-drop-shadow-small`:"drop-shadow-small";a.attr("style",`filter:url(#${l})`)}return ut(t,a),t.intersect=function(n){return nt.circle(t,(t.width??7)/2,n)},o}u(_p,"stateStart");var ci=8;async function Bp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t?.padding??8,o=t.look==="neo"?28:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await Ct(e,t,xt(t)),c=Math.max(l.width+2*ci+o,t.width??0),h=Math.max(l.height+a,t.height??0),d=c-2*ci,f=h,g=-c/2,m=-h/2,y=[{x:0,y:0},{x:d,y:0},{x:d,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look==="handDrawn"){const C=dt.svg(n),x=ct(t,{}),k=C.rectangle(g,m,d+16,f,x),S=C.line(g+ci,m,g+ci,m+f,x),_=C.line(g+ci+d,m,g+ci+d,m+f,x);n.insert(()=>S,":first-child"),n.insert(()=>_,":first-child");const B=n.insert(()=>k,":first-child"),{cssStyles:L}=t;B.attr("class","basic label-container").attr("style",ee(L)),ut(t,B)}else{const C=nr(n,d,f,y);i&&C.attr("style",i),ut(t,C)}return t.intersect=function(C){return nt.polygon(t,y,C)},n}u(Bp,"subroutine");var ha=.2;async function vp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-a*2,10),t.width=Math.max((t?.width??0)-o*2-ha*(t.height+a*2),10));const{shapeSvg:n,bbox:l}=await Ct(e,t,xt(t)),c=(t?.height?t?.height:l.height)+a*2,h=ha*c,d=ha*c,g=(t?.width?t?.width:l.width)+o*2+h-h,m=c,y=-g/2,C=-m/2,{cssStyles:x}=t,k=dt.svg(n),S=ct(t,{}),_=[{x:y-h/2,y:C},{x:y+g+h/2,y:C},{x:y+g+h/2,y:C+m},{x:y-h/2,y:C+m}],B=[{x:y+g-h/2,y:C+m},{x:y+g+h/2,y:C+m},{x:y+g+h/2,y:C+m-d}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const L=Rt(_),E=k.path(L,S),F=Rt(B),G=k.path(F,{...S,fillStyle:"solid"}),j=n.insert(()=>G,":first-child");return j.insert(()=>E,":first-child"),j.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",i),ut(t,j),t.intersect=function(q){return nt.polygon(t,_,q)},n}u(vp,"taggedRect");async function Lp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await Ct(e,t,xt(t)),n=Math.max(o.width+(t.padding??0)*2,t?.width??0),l=Math.max(o.height+(t.padding??0)*2,t?.height??0),c=l/8,h=.2*n,d=.2*l,f=l+c,{cssStyles:g}=t,m=dt.svg(s),y=ct(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-n/2-n/2*.1,y:f/2},...Dr(-n/2-n/2*.1,f/2,n/2+n/2*.1,f/2,c,.8),{x:n/2+n/2*.1,y:-f/2},{x:-n/2-n/2*.1,y:-f/2}],x=-n/2+n/2*.1,k=-f/2-d*.4,S=[{x:x+n-h,y:(k+l)*1.3},{x:x+n,y:k+l-d},{x:x+n,y:(k+l)*.9},...Dr(x+n,(k+l)*1.25,x+n-h,(k+l)*1.3,-l*.02,.5)],_=Rt(C),B=m.path(_,y),L=Rt(S),E=m.path(L,{...y,fillStyle:"solid"}),F=s.insert(()=>E,":first-child");return F.insert(()=>B,":first-child"),F.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-n/2+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-c/2-(o.y-(o.top??0))})`),ut(t,F),t.intersect=function(G){return nt.polygon(t,C,G)},s}u(Lp,"taggedWaveEdgedRectangle");async function Fp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await Ct(e,t,xt(t)),a=Math.max(o.width+(t.padding??0),t?.width||0),n=Math.max(o.height+(t.padding??0),t?.height||0),l=-a/2,c=-n/2,h=s.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",a).attr("height",n),ut(t,h),t.intersect=function(d){return nt.rect(t,d)},s}u(Fp,"text");var M1=u((e,t,r,i,s,o)=>`M${e},${t}
202
- a${s},${o} 0,0,1 0,${-i}
203
- l${r},0
204
- a${s},${o} 0,0,1 0,${i}
205
- M${r},${-i}
206
- a${s},${o} 0,0,0 0,${i}
207
- l${-r},0`,"createCylinderPathD"),$1=u((e,t,r,i,s,o)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${o} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${o} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),O1=u((e,t,r,i,s,o)=>[`M${e+r/2},${-i/2}`,`a${s},${o} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),pc=5,gc=10;async function Ep(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?12:s/2,a=t.height??0;if(t.height&&(t.height=t.height-o,t.height<pc&&(t.height=pc)),t.width){const x=a/2/(2.5+a/50);t.width=t.width-o-x*3,t.width<gc&&(t.width=gc)}const{shapeSvg:n,bbox:l,label:c}=await Ct(e,t,xt(t)),h=Math.max(t.height??0,l.height)+o,d=h/2,f=d/(2.5+h/50),g=Math.max(t.width??0,l.width)+f+o,{cssStyles:m}=t;let y;if(t.look==="handDrawn"){const C=dt.svg(n),x=$1(0,0,g,h,f,d),k=O1(0,0,g,h,f,d),S=C.path(x,ct(t,{})),_=C.path(k,ct(t,{fill:"none"}));y=n.insert(()=>_,":first-child"),y=n.insert(()=>S,":first-child"),y.attr("class","basic label-container"),m&&y.attr("style",m)}else{const C=M1(0,0,g,h,f,d);y=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",ee(m)).attr("style",i),y.attr("class","basic label-container outer-path"),m&&y.selectAll("path").attr("style",m),i&&y.selectAll("path").attr("style",i)}return y.attr("label-offset-x",f),y.attr("transform",`translate(${-g/2}, ${h/2} )`),c.attr("transform",`translate(${-(l.width/2)-f-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),ut(t,y),t.intersect=function(C){const x=nt.rect(t,C),k=x.y-(t.y??0);if(d!=0&&(Math.abs(k)<(t.height??0)/2||Math.abs(k)==(t.height??0)/2&&Math.abs(x.x-(t.x??0))>(t.width??0)/2-f)){let S=f*f*(1-k*k/(d*d));S!=0&&(S=Math.sqrt(Math.abs(S))),S=f-S,C.x-(t.x??0)>0&&(S=-S),x.x+=S}return x},n}u(Ep,"tiltedCylinder");async function Ap(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,o=(t.look==="neo",s),a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await Ct(e,t,xt(t)),c=Math.max(l.height+o,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),d=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let f;const{cssStyles:g}=t;if(t.look==="handDrawn"){const m=dt.svg(n),y=ct(t,{}),C=Rt(d),x=m.path(C,y);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),g&&f.attr("style",g)}else f=nr(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,ut(t,f),t.intersect=function(m){return nt.polygon(t,d,m)},n}u(Ap,"trapezoid");async function Mp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<l&&(t.height=l),t.width=(t.width??0)-o*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await Ct(e,t,xt(t)),d=(t?.width?t?.width:h.width)+o*2,f=(t?.height?t?.height:h.height)+a*2,{cssStyles:g}=t,m=dt.svg(c),y=ct(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-d/2*.8,y:-f/2},{x:d/2*.8,y:-f/2},{x:d/2,y:-f/2*.6},{x:d/2,y:f/2},{x:-d/2,y:f/2},{x:-d/2,y:-f/2*.6}],x=Rt(C),k=m.path(x,y),S=c.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),ut(t,S),t.intersect=function(_){return nt.polygon(t,C,_)},c}u(Mp,"trapezoidalPentagon");var mc=10,yc=10;async function $p(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=((t?.width??0)-o)/2,t.width<yc&&(t.width=yc),t.height=t?.height??0,t.height<mc&&(t.height=mc));const{shapeSvg:a,bbox:n,label:l}=await Ct(e,t,xt(t)),c=ar(Ot().flowchart?.htmlLabels),h=(t?.width?t?.width:n.width)+o,d=t?.height?t?.height:h+n.height,f=d,g=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-d}],{cssStyles:m}=t,y=dt.svg(a),C=ct(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=Rt(g),k=y.path(x,C),S=a.insert(()=>k,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),t.width=h,t.height=d,ut(t,S),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${d/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(_){return R.info("Triangle intersect",t,g,_),nt.polygon(t,g,_)},a}u($p,"triangle");async function Op(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=(t?.width??0)-o*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await Ct(e,t,xt(t)),d=(t?.width?t?.width:c.width)+(o??0)*2,f=(t?.height?t?.height:c.height)+(a??0)*2,g=t.look==="neo"?f/4:f/8,m=f+(n?g:-g),{cssStyles:y}=t,x=14-d,k=x>0?x/2:0,S=dt.svg(l),_=ct(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const B=[{x:-d/2-k,y:m/2},...Dr(-d/2-k,m/2,d/2+k,m/2,g,.8),{x:d/2+k,y:-m/2},{x:-d/2-k,y:-m/2}],L=Rt(B),E=S.path(L,_),F=l.insert(()=>E,":first-child");return F.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-g/2})`),h.attr("transform",`translate(${-d/2+(t.padding??0)-(c.x-(c.left??0))},${-f/2+(t.padding??0)-g-(c.y-(c.top??0))})`),ut(t,F),t.intersect=function(G){return nt.polygon(t,B,G)},l}u(Op,"waveEdgedRectangle");async function Dp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?20:s;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);const _=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-a-_*(20/9)),t.width=t.width-o*2}const{shapeSvg:n,bbox:l}=await Ct(e,t,xt(t)),c=(t?.width?t?.width:l.width)+o*2,h=(t?.height?t?.height:l.height)+a,d=h/8,f=h+d*2,{cssStyles:g}=t,m=dt.svg(n),y=ct(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-c/2,y:f/2},...Dr(-c/2,f/2,c/2,f/2,d,1),{x:c/2,y:-f/2},...Dr(c/2,-f/2,-c/2,-f/2,d,-1)],x=Rt(C),k=m.path(x,y),S=n.insert(()=>k,":first-child");return S.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),ut(t,S),t.intersect=function(_){return nt.polygon(t,C,_)},n}u(Dp,"waveRectangle");var Kt=10;async function Pp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2-Kt,10),t.height=Math.max((t?.height??0)-o*2-Kt,10));const{shapeSvg:a,bbox:n,label:l}=await Ct(e,t,xt(t)),c=(t?.width?t?.width:n.width)+s*2+Kt,h=(t?.height?t?.height:n.height)+o*2+Kt,d=c-Kt,f=h-Kt,g=-d/2,m=-f/2,{cssStyles:y}=t,C=dt.svg(a),x=ct(t,{}),k=[{x:g-Kt,y:m-Kt},{x:g-Kt,y:m+f},{x:g+d,y:m+f},{x:g+d,y:m-Kt}],S=`M${g-Kt},${m-Kt} L${g+d},${m-Kt} L${g+d},${m+f} L${g-Kt},${m+f} L${g-Kt},${m-Kt}
208
- M${g-Kt},${m} L${g+d},${m}
209
- M${g},${m-Kt} L${g},${m+f}`;t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const _=C.path(S,x),B=a.insert(()=>_,":first-child");return B.attr("transform",`translate(${Kt/2}, ${Kt/2})`),B.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+Kt/2-(n.x-(n.left??0))}, ${-(n.height/2)+Kt/2-(n.y-(n.top??0))})`),ut(t,B),t.intersect=function(L){return nt.polygon(t,k,L)},a}u(Pp,"windowPane");var Cc=new Set(["redux-color","redux-dark-color"]),D1=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function ll(e,t){const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Vt(),{rowEven:o,rowOdd:a,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:gt}=Vt(),{background:Tt}=gt,Mt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Tt}`]};await ll(e,Mt)}const c=Vt();t.useHtmlLabels=c.htmlLabels;let h=c.er?.diagramPadding??10,d=c.er?.entityPadding??6;const{cssStyles:f}=t,{labelStyles:g,nodeStyles:m}=pt(t);if(r.attributes.length===0&&t.label){const gt={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};yr(t.label,c)+gt.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const Tt=await Bi(e,t,gt);if(i!=null&&Cc.has(i)){const Mt=r.colorIndex??0;Tt.attr("data-color-id",`color-${Mt%l.length}`)}if(!ar(c.htmlLabels)){const Mt=Tt.select("text"),vt=Mt.node()?.getBBox();Mt.attr("transform",`translate(${-vt.width/2}, 0)`)}return Tt}c.htmlLabels||(h*=1.25,d*=1.25);let y=xt(t);y||(y="node default");const C=e.insert("g").attr("class",y).attr("id",t.domId||t.id),x=await ui(C,t.label??"",c,0,0,["name"],g);x.height+=d;let k=0;const S=[],_=[];let B=0,L=0,E=0,F=0,G=!0,j=!0;for(const gt of r.attributes){const Tt=await ui(C,gt.type,c,0,k,["attribute-type"],g);B=Math.max(B,Tt.width+h);const Mt=await ui(C,gt.name,c,0,k,["attribute-name"],g);L=Math.max(L,Mt.width+h);const vt=await ui(C,gt.keys.join(),c,0,k,["attribute-keys"],g);E=Math.max(E,vt.width+h);const Nt=await ui(C,gt.comment,c,0,k,["attribute-comment"],g);F=Math.max(F,Nt.width+h);const Wt=Math.max(Tt.height,Mt.height,vt.height,Nt.height)+d;_.push({yOffset:k,rowHeight:Wt}),k+=Wt}let q=4;E<=h&&(G=!1,E=0,q--),F<=h&&(j=!1,F=0,q--);const st=C.node().getBBox();if(x.width+h*2-(B+L+E+F)>0){const gt=x.width+h*2-(B+L+E+F);B+=gt/q,L+=gt/q,E>0&&(E+=gt/q),F>0&&(F+=gt/q)}const Y=B+L+E+F,O=dt.svg(C),D=ct(t,{});t.look!=="handDrawn"&&(D.roughness=0,D.fillStyle="solid");let v=0;_.length>0&&(v=_.reduce((gt,Tt)=>gt+(Tt?.rowHeight??0),0));const N=Math.max(st.width+h*2,t?.width||0,Y),P=Math.max((v??0)+x.height,t?.height||0),it=-N/2,Q=-P/2;if(C.selectAll("g:not(:first-child)").each((gt,Tt,Mt)=>{const vt=Et(Mt[Tt]),Nt=vt.attr("transform");let Wt=0,ne=0;if(Nt){const Pt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Nt);Pt&&(Wt=parseFloat(Pt[1]),ne=parseFloat(Pt[2]),vt.attr("class").includes("attribute-name")?Wt+=B:vt.attr("class").includes("attribute-keys")?Wt+=B+L:vt.attr("class").includes("attribute-comment")&&(Wt+=B+L+E))}vt.attr("transform",`translate(${it+h/2+Wt}, ${ne+Q+x.height+d/2})`)}),C.select(".name").attr("transform","translate("+-x.width/2+", "+(Q+d/2)+")"),i!=null&&Cc.has(i)){const gt=r.colorIndex??0;C.attr("data-color-id",`color-${gt%l.length}`)}const mt=O.rectangle(it,Q,N,P,D),wt=C.insert(()=>mt,":first-child").attr("class","outer-path").attr("style",f.join(""));S.push(0);for(const[gt,Tt]of _.entries()){const vt=(gt+1)%2===0&&Tt.yOffset!==0,Nt=O.rectangle(it,x.height+Q+Tt?.yOffset,N,Tt?.rowHeight,{...D,fill:vt?o:a,stroke:n});C.insert(()=>Nt,"g.label").attr("style",f.join("")).attr("class",`row-rect-${vt?"even":"odd"}`)}const St=1e-4;let ft=fi(it,x.height+Q,N+it,x.height+Q,St),Lt=O.polygon(ft.map(gt=>[gt.x,gt.y]),D);if(C.insert(()=>Lt).attr("class","divider"),ft=fi(B+it,x.height+Q,B+it,P+Q,St),Lt=O.polygon(ft.map(gt=>[gt.x,gt.y]),D),C.insert(()=>Lt).attr("class","divider"),G){const gt=B+L+it;ft=fi(gt,x.height+Q,gt,P+Q,St),Lt=O.polygon(ft.map(Tt=>[Tt.x,Tt.y]),D),C.insert(()=>Lt).attr("class","divider")}if(j){const gt=B+L+E+it;ft=fi(gt,x.height+Q,gt,P+Q,St),Lt=O.polygon(ft.map(Tt=>[Tt.x,Tt.y]),D),C.insert(()=>Lt).attr("class","divider")}for(const gt of S){const Tt=x.height+Q+gt;ft=fi(it,Tt,N+it,Tt,St),Lt=O.polygon(ft.map(Mt=>[Mt.x,Mt.y]),D),C.insert(()=>Lt).attr("class","divider")}if(ut(t,wt),m&&t.look!=="handDrawn")if(i!=null&&D1.has(i))C.selectAll("path").attr("style",m);else{const Tt=m.split(";")?.filter(Mt=>Mt.includes("stroke"))?.map(Mt=>`${Mt}`).join("; ");C.selectAll("path").attr("style",Tt??""),C.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(gt){return nt.rect(t,gt)},C}u(ll,"erBox");async function ui(e,t,r,i=0,s=0,o=[],a=""){const n=e.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",a);t!==bh(t)&&(t=bh(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await Ue(n,t,{width:yr(t,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let c=l.getBBox();if(ar(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const d=Et(l);c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return c}u(ui,"addText");function fi(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}u(fi,"lineToPolygon");async function Ip(e,t,r,i,s=r.class.padding??12){const o=i?0:3,a=e.insert("g").attr("class",xt(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,d=0,f=0,g=0;if(n=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const k=t.annotations[0];await Gi(n,{text:`«${k}»`},0),d=n.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await Gi(l,t,0,["font-weight: bolder"]);const m=l.node().getBBox();f=m.height,c=a.insert("g").attr("class","members-group text");let y=0;for(const k of t.members){const S=await Gi(c,k,y,[k.parseClassifier()]);y+=S+o}g=c.node().getBBox().height,g<=0&&(g=s/2),h=a.insert("g").attr("class","methods-group text");let C=0;for(const k of t.methods){const S=await Gi(h,k,C,[k.parseClassifier()]);C+=S+o}let x=a.node().getBBox();if(n!==null){const k=n.node().getBBox();n.attr("transform",`translate(${-k.width/2})`)}return l.attr("transform",`translate(${-m.width/2}, ${d})`),x=a.node().getBBox(),c.attr("transform",`translate(0, ${d+f+s*2})`),x=a.node().getBBox(),h.attr("transform",`translate(0, ${d+f+(g?g+s*4:s*2)})`),x=a.node().getBBox(),{shapeSvg:a,bbox:x}}u(Ip,"textHelper");async function Gi(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),o=Vt();let a="useHtmlLabels"in t?t.useHtmlLabels:ar(o.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!a&&n.startsWith("\\")&&(n=n.substring(1)),os(n)&&(a=!0);const l=await Ue(s,En($r(n)),{width:yr(n,o)+50,classes:"markdown-node-label",useHtmlLabels:a},o);let c,h=1;if(a){const d=l.children[0],f=Et(l);h=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(h+=d.innerHTML.split("<mrow>").length-1),await sl(d),c=d.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{i.includes("font-weight: bolder")&&Et(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const d=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(d.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),c=l.getBBox()}return s.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}u(Gi,"addText");async function Rp(e,t){const r=Ot(),{themeVariables:i}=r,{useGradient:s}=i,o=r.class.padding??12,a=o,n=t.useHtmlLabels??ar(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await Ip(e,t,r,n,a),{labelStyles:d,nodeStyles:f}=pt(t);t.labelStyle=d,t.cssStyles=l.styles||"";const g=l.styles?.join(";")||f||"";t.cssStyles||(t.cssStyles=g.replaceAll("!important","").split(";"));const m=l.members.length===0&&l.methods.length===0&&!r.class?.hideEmptyMembersBox,y=dt.svg(c),C=ct(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=Math.max(t.width??0,h.width);let k=Math.max(t.height??0,h.height);const S=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?k+=a:l.members.length>0&&l.methods.length===0&&(k+=a*2);const _=-x/2,B=-k/2;let L=m?o*2:l.members.length===0&&l.methods.length===0?-o:0;S&&(L=o*2);const E=y.rectangle(_-o,B-o-(m?o:l.members.length===0&&l.methods.length===0?-o/2:0),x+2*o,k+2*o+L,C),F=c.insert(()=>E,":first-child");F.attr("class","basic label-container outer-path");const G=F.node().getBBox(),j=c.select(".annotation-group").node().getBBox().height-(m?o/2:0)||0,q=c.select(".label-group").node().getBBox().height-(m?o/2:0)||0,st=c.select(".members-group").node().getBBox().height-(m?o/2:0)||0,Y=(j+q+B+o-(B-o-(m?o:l.members.length===0&&l.methods.length===0?-o/2:0)))/2;if(c.selectAll(".text").each((O,D,v)=>{const N=Et(v[D]),P=N.attr("transform");let it=0;if(P){const St=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(P);St&&(it=parseFloat(St[2]))}let Q=it+B+o-(m?o:l.members.length===0&&l.methods.length===0?-o/2:0);if(N.attr("class").includes("methods-group")){const wt=Math.max(st,a/2);S?Q=Math.max(Y,j+q+wt+B+a*2+o)+a*2:Q=j+q+wt+B+a*4+o}l.members.length===0&&l.methods.length===0&&r.class?.hideEmptyMembersBox&&(l.annotations.length>0?Q=it-a:Q=it),n||(Q-=4);let mt=_;(N.attr("class").includes("label-group")||N.attr("class").includes("annotation-group"))&&(mt=-N.node()?.getBBox().width/2||0,c.selectAll("text").each(function(wt,St,ft){window.getComputedStyle(ft[St]).textAnchor==="middle"&&(mt=0)})),N.attr("transform",`translate(${mt}, ${Q})`)}),l.members.length>0||l.methods.length>0||m){const O=j+q+B+o,D=y.line(G.x,O,G.x+G.width,O+.001,C);c.insert(()=>D).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",g)}if(m||l.members.length>0||l.methods.length>0){const O=j+q+st+B+a*2+o,D=y.line(G.x,S?Math.max(Y,O):O,G.x+G.width,(S?Math.max(Y,O):O)+.001,C);c.insert(()=>D).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",g)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",g),F.select(":nth-child(2)").attr("style",g),c.selectAll(".divider").select("path").attr("style",g),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",g),!n){const O=RegExp(/color\s*:\s*([^;]*)/),D=O.exec(g);if(D){const v=D[0].replace("color","fill");c.selectAll("tspan").attr("style",v)}else if(d){const v=O.exec(d);if(v){const N=v[0].replace("color","fill");c.selectAll("tspan").attr("style",N)}}}return ut(t,F),t.intersect=function(O){return nt.rect(t,O)},c}u(Rp,"classBox");async function qp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t,o=t,a=20,n=20,l="verifyMethod"in t,c=xt(t),h=Ot(),{themeVariables:d}=h,{borderColorArray:f,requirementEdgeLabelBackground:g}=d,m=h.layout==="elk"?"start":"center",y=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let C;l?C=await Qe(y,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):C=await Qe(y,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let x=C;const k=await Qe(y,s.name,x,t.labelStyle+"; font-weight: bold;");if(x+=k+n,l){const q=await Qe(y,`${s.requirementId?`ID: ${s.requirementId}`:""}`,x,t.labelStyle,m);x+=q;const st=await Qe(y,`${s.text?`Text: ${s.text}`:""}`,x,t.labelStyle,m);x+=st;const Y=await Qe(y,`${s.risk?`Risk: ${s.risk}`:""}`,x,t.labelStyle,m);x+=Y,await Qe(y,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,x,t.labelStyle,m)}else{const q=await Qe(y,`${o.type?`Type: ${o.type}`:""}`,x,t.labelStyle,m);x+=q,await Qe(y,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,x,t.labelStyle,m)}const S=(y.node()?.getBBox().width??200)+a,_=(y.node()?.getBBox().height??200)+a,B=-S/2,L=-_/2,E=dt.svg(y),F=ct(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const G=E.rectangle(B,L,S,_,F),j=y.insert(()=>G,":first-child");if(j.attr("class","basic label-container outer-path").attr("style",i),f?.length){const q=t.colorIndex??0;y.attr("data-color-id",`color-${q%f.length}`)}if(y.selectAll(".label").each((q,st,Y)=>{const O=Et(Y[st]),D=O.attr("transform");let v=0,N=0;if(D){const mt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(D);mt&&(v=parseFloat(mt[1]),N=parseFloat(mt[2]))}const P=N-_/2;let it=B+a/2;(st===0||st===1)&&(it=v),O.attr("transform",`translate(${it}, ${P+a})`)}),x>C+k+n){const q=L+C+k+n;let st;if(t.look==="neo"){const D=[[B,q],[B+S,q],[B+S,q+.001],[B,q+.001]];st=E.polygon(D,F)}else st=E.line(B,q,B+S,q,F);y.insert(()=>st).attr("class","divider")}return ut(t,j),t.intersect=function(q){return nt.rect(t,q)},i&&t.look!=="handDrawn"&&(g||f?.length)&&y.selectAll("path").attr("style",i),y}u(qp,"requirementBox");async function Qe(e,t,r,i="",s="center"){if(t==="")return 0;const o=e.insert("g").attr("class","label").attr("style",i),a=Ot(),n=a.htmlLabels??!0,l=await Ue(o,En($r(t)),{width:yr(t,a)+50,classes:"markdown-node-label",useHtmlLabels:n,style:i},a);let c;if(n){const h=l.children[0],d=Et(l);s==="start"&&Et(h).style("text-align","left"),c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{const h=l.children[0];for(const d of h.children)i&&d.setAttribute("style",i);if(s==="start"){h.setAttribute("text-anchor","start");for(const d of h.children)d.setAttribute("text-anchor","start")}c=l.getBBox(),c.height+=6}return o.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}u(Qe,"addText");var P1=u(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 Np(e,t,{config:r}){const{labelStyles:i,nodeStyles:s}=pt(t);t.labelStyle=i||"";const o=10,a=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await Ct(e,t,xt(t)),h=t.padding||10;let d="",f;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(d=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),f=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const g={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let m,y;f?{label:m,bbox:y}=await na(f,"ticket"in t&&t.ticket||"",g):{label:m,bbox:y}=await na(n,"ticket"in t&&t.ticket||"",g);const{label:C,bbox:x}=await na(n,"assigned"in t&&t.assigned||"",g);t.width=a;const k=10,S=t?.width||0,_=Math.max(y.height,x.height)/2,B=Math.max(l.height+k*2,t?.height||0)+_,L=-S/2,E=-B/2;c.attr("transform","translate("+(h-S/2)+", "+(-_-l.height/2)+")"),m.attr("transform","translate("+(h-S/2)+", "+(-_+l.height/2)+")"),C.attr("transform","translate("+(h+S/2-x.width-2*o)+", "+(-_+l.height/2)+")");let F;const{rx:G,ry:j}=t,{cssStyles:q}=t;if(t.look==="handDrawn"){const st=dt.svg(n),Y=ct(t,{}),O=G||j?st.path(qe(L,E,S,B,G||0),Y):st.rectangle(L,E,S,B,Y);F=n.insert(()=>O,":first-child"),F.attr("class","basic label-container").attr("style",q||null)}else{F=n.insert("rect",":first-child"),F.attr("class","basic label-container __APA__").attr("style",s).attr("rx",G??5).attr("ry",j??5).attr("x",L).attr("y",E).attr("width",S).attr("height",B);const st="priority"in t&&t.priority;if(st){const Y=n.append("line"),O=L+2,D=E+Math.floor((G??0)/2),v=E+B-Math.floor((G??0)/2);Y.attr("x1",O).attr("y1",D).attr("x2",O).attr("y2",v).attr("stroke-width","4").attr("stroke",P1(st))}}return ut(t,F),t.height=B,t.intersect=function(st){return nt.rect(t,st)},n}u(Np,"kanbanItem");async function zp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await Ct(e,t,xt(t)),l=o.width+10*a,c=o.height+8*a,h=.15*l,{cssStyles:d}=t,f=o.width+20,g=o.height+20,m=Math.max(l,f),y=Math.max(c,g);n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let C;const x=`M0 0
210
- a${h},${h} 1 0,0 ${m*.25},${-1*y*.1}
211
- a${h},${h} 1 0,0 ${m*.25},0
212
- a${h},${h} 1 0,0 ${m*.25},0
213
- a${h},${h} 1 0,0 ${m*.25},${y*.1}
214
-
215
- a${h},${h} 1 0,0 ${m*.15},${y*.33}
216
- a${h*.8},${h*.8} 1 0,0 0,${y*.34}
217
- a${h},${h} 1 0,0 ${-1*m*.15},${y*.33}
218
-
219
- a${h},${h} 1 0,0 ${-1*m*.25},${y*.15}
220
- a${h},${h} 1 0,0 ${-1*m*.25},0
221
- a${h},${h} 1 0,0 ${-1*m*.25},0
222
- a${h},${h} 1 0,0 ${-1*m*.25},${-1*y*.15}
223
-
224
- a${h},${h} 1 0,0 ${-1*m*.1},${-1*y*.33}
225
- a${h*.8},${h*.8} 1 0,0 0,${-1*y*.34}
226
- a${h},${h} 1 0,0 ${m*.1},${-1*y*.33}
227
- H0 V0 Z`;if(t.look==="handDrawn"){const k=dt.svg(s),S=ct(t,{}),_=k.path(x,S);C=s.insert(()=>_,":first-child"),C.attr("class","basic label-container").attr("style",ee(d))}else C=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return C.attr("transform",`translate(${-m/2}, ${-y/2})`),ut(t,C),t.calcIntersect=function(k,S){return nt.rect(k,S)},t.intersect=function(k){return R.info("Bang intersect",t,k),nt.rect(t,k)},s}u(zp,"bang");async function Wp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await Ct(e,t,xt(t)),l=o.width+2*a,c=o.height+2*a,h=.15*l,d=.25*l,f=.35*l,g=.2*l,{cssStyles:m}=t;let y;const C=`M0 0
228
- a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
229
- a${f},${f} 1 0,1 ${l*.4},${-1*l*.1}
230
- a${d},${d} 1 0,1 ${l*.35},${l*.2}
231
-
232
- a${h},${h} 1 0,1 ${l*.15},${c*.35}
233
- a${g},${g} 1 0,1 ${-1*l*.15},${c*.65}
234
-
235
- a${d},${h} 1 0,1 ${-1*l*.25},${l*.15}
236
- a${f},${f} 1 0,1 ${-1*l*.5},0
237
- a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
238
-
239
- a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
240
- a${g},${g} 1 0,1 ${l*.1},${-1*c*.65}
241
- H0 V0 Z`;if(t.look==="handDrawn"){const x=dt.svg(s),k=ct(t,{}),S=x.path(C,k);y=s.insert(()=>S,":first-child"),y.attr("class","basic label-container").attr("style",ee(m))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),y.attr("transform",`translate(${-l/2}, ${-c/2})`),ut(t,y),t.calcIntersect=function(x,k){return nt.rect(x,k)},t.intersect=function(x){return R.info("Cloud intersect",t,x),nt.rect(t,x)},s}u(Wp,"cloud");async function Hp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await Ct(e,t,xt(t)),l=o.width+8*a,c=o.height+2*a,h=5,d=t.look==="neo"?`
242
- M${-l/2} ${c/2-h}
243
- v${-c+2*h}
244
- q0,-${h} ${h},-${h}
245
- h${l-2*h}
246
- q${h},0 ${h},${h}
247
- v${c-h}
248
- H${-l/2}
249
- Z
250
- `:`
251
- M${-l/2} ${c/2-h}
252
- v${-c+2*h}
253
- q0,-${h} ${h},-${h}
254
- h${l-2*h}
255
- q${h},0 ${h},${h}
256
- v${c-2*h}
257
- q0,${h} ${-h},${h}
258
- h${-(l-2*h)}
259
- q${-h},0 ${-h},${-h}
260
- Z
261
- `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const f=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),s.append(()=>n.node()),ut(t,f),t.calcIntersect=function(g,m){return nt.rect(g,m)},t.intersect=function(g){return nt.rect(t,g)},s}u(Hp,"defaultMindmapNode");async function jp(e,t){const r={padding:t.padding??0};return nl(e,t,r)}u(jp,"mindmapCircle");var I1=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:kp},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Cp},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Tp},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Bp},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Hf},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:jf},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:Vf},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:Lf},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:Df},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:Af},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:Wf},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:nl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:zp},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Wp},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:gp},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Qf},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:lp},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:np},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Ap},{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:op},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Uf},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Fp},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Mf},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:xp},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:_p},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:wp},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Zf},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Jf},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Rf},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:qf},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Nf},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:hp},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Op},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Kf},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Ep},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:cp},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:zf},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Yf},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:$p},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Pp},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Gf},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Mp},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Xf},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:bp},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:fp},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:up},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:vf},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:If},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Lp},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:vp},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Dp},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:mp},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:dp}],R1=u(()=>{const t=[...Object.entries({state:Sp,choice:$f,note:pp,composite:Of,rectWithTitle:yp,labelRect:ap,block_arrow:Ef,collapsedGroup:Ff,iconSquare:ip,iconCircle:ep,icon:tp,iconRounded:rp,imageSquare:sp,anchor:_f,kanbanItem:Np,mindmapCircle:jp,defaultMindmapNode:Hp,classBox:Rp,erBox:ll,requirementBox:qp}),...I1.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Yp=R1();function q1(e){return e in Yp}u(q1,"isValidShape");var wo=u(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),_o=new Map;async function hl(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?Yp[t.shape]:void 0;if(!o)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;r.config.securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),s=await o(i,t,r)}else s=await o(e,t,r),i=s;return i.attr("data-look",ee(t.look)),t.tooltip&&s.attr("title",t.tooltip),_o.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}u(hl,"insertNode");var PL=u((e,t)=>{_o.set(t.id,e)},"setNodeElem"),N1=u(()=>{_o.clear()},"clear"),xc=u(e=>{const t=_o.get(e.id);R.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"),z1=u(async(e,t)=>{const r=Ot(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,n=a,{labelStyles:l,nodeStyles:c,borderStyles:h,backgroundStyles:d}=pt(t),f=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),g=ar(r.flowchart.htmlLabels),m=t.direction==="LR",y=f.insert("g").attr("class","cluster-label swimlane-label"),C=await Ue(y,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width});let x=C.getBBox();if(g){const Y=C.children[0],O=Et(C);x=Y.getBoundingClientRect(),O.attr("width",x.width),O.attr("height",x.height)}const k=t.padding??0,S=t.width<=x.width+k?x.width+k:t.width;t.width<=x.width+k?t.diff=(S-t.width)/2-k:t.diff=-k;const _=t.height,B=t.y-_/2,L=t.y+_/2,E=t.x-S/2,F=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:B+_/3,G=m?4:0,j=x.height+2*G;let q,st;if(m){const Y=Math.max(j,x.height+2*G),O=E+Y,D=Math.max(0,S-Y);if(t.look==="handDrawn"){const P=dt.svg(f),it=ct(t,{roughness:.7,fill:o,stroke:n,fillWeight:3,seed:s}),Q=ct(t,{roughness:.7,fill:"none",stroke:n,seed:s}),mt=P.rectangle(E,B,Y,_,it);q=f.insert(()=>mt,":first-child");const wt=P.rectangle(O,B,D,_,Q);st=f.insert(()=>wt,":first-child"),q.select("path:nth-child(2)").attr("style",h.join(";")),q.select("path").attr("style",d.join(";").replace("fill","stroke"))}else q=f.insert("rect",":first-child"),st=f.insert("rect",":first-child"),q.attr("class","swimlane-title").attr("style",c).attr("x",E).attr("y",B).attr("width",Y).attr("height",_).attr("fill",o).attr("stroke",n),st.attr("class","swimlane-body").attr("style",c).attr("x",O).attr("y",B).attr("width",D).attr("height",_).attr("fill","none").attr("stroke",n);const v=E+Y/2,N=t.y;y.attr("transform",`translate(${v}, ${N}) rotate(-90) translate(${-x.width/2}, ${-x.height/2})`)}else{const Y=Math.max(0,F-B),O=Math.min(j,Y),D=B+O,v=Math.max(0,L-D),N=t.x-S/2;if(t.look==="handDrawn"){const Q=dt.svg(f),mt=ct(t,{roughness:.7,fill:o,stroke:n,fillWeight:3,seed:s}),wt=ct(t,{roughness:.7,fill:"none",stroke:n,seed:s}),St=Q.rectangle(N,B,S,O,mt);q=f.insert(()=>St,":first-child");const ft=Q.rectangle(N,D,S,v,wt);st=f.insert(()=>ft,":first-child"),q.select("path:nth-child(2)").attr("style",h.join(";")),q.select("path").attr("style",d.join(";").replace("fill","stroke"))}else q=f.insert("rect",":first-child"),st=f.insert("rect",":first-child"),q.attr("class","swimlane-title").attr("style",c).attr("x",N).attr("y",B).attr("width",S).attr("height",O).attr("fill",o).attr("stroke",n),st.attr("class","swimlane-body").attr("style",c).attr("x",N).attr("y",D).attr("width",S).attr("height",v).attr("fill","none").attr("stroke",n);const P=t.x-x.width/2,it=B+(O-x.height)/2;y.attr("transform",`translate(${P}, ${it})`)}if(R.trace("Swimlane data ",t,JSON.stringify(t)),l){const Y=y.select("span");Y&&Y.attr("style",l)}return t.offsetX=0,t.width=S,t.height=_,t.offsetY=x.height-k/2,t.intersect=function(Y){return Jr(t,Y)},{cluster:f,labelBBox:x}},"swimlane"),Up=u(async(e,t)=>{R.info("Creating subgraph rect for ",t.id,t);const r=Ot(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=pt(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=me(r),g=d.insert("g").attr("class","cluster-label ");let m;t.labelType==="markdown"?m=await Ue(g,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width}):m=await Fr(g,t.label,t.labelStyle||"",!1,!0);let y=m.getBBox();if(me(r)){const E=m.children[0],F=Et(m);y=E.getBoundingClientRect(),F.attr("width",y.width),F.attr("height",y.height)}const C=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,k=t.x-C/2,S=t.y-x/2;R.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const E=dt.svg(d),F=ct(t,{roughness:.7,fill:o,stroke:a,fillWeight:3,seed:s}),G=E.path(qe(k,S,C,x,0),F);_=d.insert(()=>(R.debug("Rough node insert CXC",G),G),":first-child"),_.select("path:nth-child(2)").attr("style",c.join(";")),_.select("path").attr("style",h.join(";").replace("fill","stroke"))}else _=d.insert("rect",":first-child"),_.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",S).attr("width",C).attr("height",x);const{subGraphTitleTopMargin:B}=wo(r);if(g.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+B})`),n){const E=g.select("span");E&&E.attr("style",n)}const L=_.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=y.height-t.padding/2,t.intersect=function(E){return Jr(t,E)},{cluster:d,labelBBox:y}},"rect"),W1=u((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,o=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const a=i.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(n){return Jr(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),H1=u(async(e,t)=>{const r=Ot(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:o,compositeBackground:a,compositeTitleBackground:n,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),d=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const g=await Fr(d,t.label,t.labelStyle,void 0,!0);let m=g.getBBox();if(me(r)){const G=g.children[0],j=Et(g);m=G.getBoundingClientRect(),j.attr("width",m.width),j.attr("height",m.height)}const y=0*t.padding,C=y/2,x=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+y;t.width<=m.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const k=t.height+y,S=t.height+y-m.height-6,_=t.x-x/2,B=t.y-k/2;t.width=x;const L=t.y-t.height/2-C+m.height+2;let E;if(t.look==="handDrawn"){const G=t.cssClasses.includes("statediagram-cluster-alt"),j=dt.svg(c),q=t.rx||t.ry?j.path(qe(_,B,x,k,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):j.rectangle(_,B,x,k,{seed:s});E=c.insert(()=>q,":first-child");const st=j.rectangle(_,L,x,S,{fill:G?o:a,fillStyle:G?"hachure":"solid",stroke:l,seed:s});E=c.insert(()=>q,":first-child"),f=c.insert(()=>st)}else E=h.insert("rect",":first-child"),E.attr("class","outer").attr("x",_).attr("y",B).attr("width",x).attr("height",k).attr("data-look",t.look),f.attr("class","inner").attr("x",_).attr("y",L).attr("width",x).attr("height",S);d.attr("transform",`translate(${t.x-m.width/2}, ${B+1-(me(r)?0:3)})`);const F=E.node().getBBox();return t.height=F.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(G){return Jr(t,G)},{cluster:c,labelBBox:m}},"roundedWithTitle"),j1=u(async(e,t)=>{R.info("Creating subgraph rect for ",t.id,t);const r=Ot(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=pt(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=me(r),g=d.insert("g").attr("class","cluster-label "),m=await Ue(g,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let y=m.getBBox();if(me(r)){const E=m.children[0],F=Et(m);y=E.getBoundingClientRect(),F.attr("width",y.width),F.attr("height",y.height)}const C=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,k=t.x-C/2,S=t.y-x/2;R.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const E=dt.svg(d),F=ct(t,{roughness:.7,fill:o,stroke:a,fillWeight:4,seed:s}),G=E.path(qe(k,S,C,x,t.rx),F);_=d.insert(()=>(R.debug("Rough node insert CXC",G),G),":first-child"),_.select("path:nth-child(2)").attr("style",c.join(";")),_.select("path").attr("style",h.join(";").replace("fill","stroke"))}else _=d.insert("rect",":first-child"),_.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",S).attr("width",C).attr("height",x);const{subGraphTitleTopMargin:B}=wo(r);if(g.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+B})`),n){const E=g.select("span");E&&E.attr("style",n)}const L=_.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=y.height-t.padding/2,t.intersect=function(E){return Jr(t,E)},{cluster:d,labelBBox:y}},"kanbanSection"),Y1=u((e,t)=>{const r=Ot(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:o}=i,a=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=a.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,d=t.x-c/2,f=t.y-h/2;t.width=c;let g;if(t.look==="handDrawn"){const C=dt.svg(a).rectangle(d,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:s});g=a.insert(()=>C,":first-child")}else{g=n.insert("rect",":first-child");let y="outer";t.look,y="divider",g.attr("class",y).attr("x",d).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look)}const m=g.node().getBBox();return t.height=m.height,t.offsetX=0,t.offsetY=0,t.intersect=function(y){return Jr(t,y)},{cluster:a,labelBBox:{}}},"divider"),U1=Up,G1={rect:Up,squareRect:U1,roundedWithTitle:H1,noteGroup:W1,divider:Y1,kanbanSection:j1,swimlane:z1},Gp=new Map,Xp=u(async(e,t)=>{const r=t.shape||"rect",i=await G1[r](e,t);return Gp.set(t.id,i),i},"insertCluster"),X1=u(()=>{Gp=new Map},"clear"),zi=u((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),pe={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},bc={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Xi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Xt(e),t=Xt(t);const[r,i]=[e.x,e.y],[s,o]=[t.x,t.y],a=s-r,n=o-i;return{angle:Math.atan(n/a),deltaX:a,deltaY:n}}u(Xi,"calculateDeltaAndAngle");var Xt=u(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),V1=u(e=>({x:u(function(t,r,i){let s=0;const o=Xt(i[0]).x<Xt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(pe,e.arrowTypeStart)){const{angle:g,deltaX:m}=Xi(i[0],i[1]);s=pe[e.arrowTypeStart]*Math.cos(g)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(pe,e.arrowTypeEnd)){const{angle:g,deltaX:m}=Xi(i[i.length-1],i[i.length-2]);s=pe[e.arrowTypeEnd]*Math.cos(g)*(m>=0?1:-1)}const a=Math.abs(Xt(t).x-Xt(i[i.length-1]).x),n=Math.abs(Xt(t).y-Xt(i[i.length-1]).y),l=Math.abs(Xt(t).x-Xt(i[0]).x),c=Math.abs(Xt(t).y-Xt(i[0]).y),h=pe[e.arrowTypeStart],d=pe[e.arrowTypeEnd],f=1;if(a<d&&a>0&&n<d){let g=d+f-a;g*=o==="right"?-1:1,s-=g}if(l<h&&l>0&&c<h){let g=h+f-l;g*=o==="right"?-1:1,s+=g}return Xt(t).x+s},"x"),y:u(function(t,r,i){let s=0;const o=Xt(i[0]).y<Xt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(pe,e.arrowTypeStart)){const{angle:g,deltaY:m}=Xi(i[0],i[1]);s=pe[e.arrowTypeStart]*Math.abs(Math.sin(g))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(pe,e.arrowTypeEnd)){const{angle:g,deltaY:m}=Xi(i[i.length-1],i[i.length-2]);s=pe[e.arrowTypeEnd]*Math.abs(Math.sin(g))*(m>=0?1:-1)}const a=Math.abs(Xt(t).y-Xt(i[i.length-1]).y),n=Math.abs(Xt(t).x-Xt(i[i.length-1]).x),l=Math.abs(Xt(t).y-Xt(i[0]).y),c=Math.abs(Xt(t).x-Xt(i[0]).x),h=pe[e.arrowTypeStart],d=pe[e.arrowTypeEnd],f=1;if(a<d&&a>0&&n<d){let g=d+f-a;g*=o==="up"?-1:1,s-=g}if(l<h&&l>0&&c<h){let g=h+f-l;g*=o==="up"?-1:1,s+=g}return Xt(t).y+s},"y")}),"getLineFunctionsWithOffset"),Z1=u((e,t,r,i,s,o=!1,a)=>{t.arrowTypeStart&&kc(e,"start",t.arrowTypeStart,r,i,s,o,a),t.arrowTypeEnd&&kc(e,"end",t.arrowTypeEnd,r,i,s,o,a)},"addEdgeMarkers"),K1={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},Q1=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],kc=u((e,t,r,i,s,o,a=!1,n)=>{if(!r||r==="none")return;const l=K1[r],c=l&&Q1.includes(l.type);if(!l){R.warn(`Unknown arrow type: ${r}`);return}const h=l.type,g=`${s}_${o}-${h}${t==="start"?"Start":"End"}${a&&c?"-margin":""}`;if(n&&n.trim()!==""){const m=n.replace(/[^\dA-Za-z]/g,"_"),y=`${g}_${m}`;if(!document.getElementById(y)){const C=document.getElementById(g);if(C){const x=C.cloneNode(!0);x.id=y,x.querySelectorAll("path, circle, line").forEach(S=>{S.setAttribute("stroke",n),l.fill&&S.setAttribute("fill",n)}),C.parentNode?.appendChild(x)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${g})`)},"addEdgeMarker"),J1=u(e=>typeof e=="string"?e:Ot()?.flowchart?.curve,"resolveEdgeCurveType"),Ti=new Map,Jt=new Map,tk=u(()=>{Ti.clear(),Jt.clear()},"clear"),Vp=u(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),Wi=u(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),cl=u(async(e,t)=>{const r=Ot();let i=me(r);const{labelStyles:s}=pt(t);t.labelStyle=s;const o=e.insert("g").attr("class","edgeLabel"),a=o.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await Ue(e,t.label,{style:Wi(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);a.node().appendChild(c),R.info("abc82",t,t.labelType);let h,d;if(i){const g=c.children[0],m=Et(c);h=await Xr.measure(()=>g.getBoundingClientRect()),d=h,m.attr("width",h.width),m.attr("height",h.height)}else{const g=Et(c).select("text").node();await Xr.measure(()=>{h=c.getBBox(),g&&typeof g.getBBox=="function"?d=g.getBBox():d=h})}a.attr("transform",zi(d,i)),Ti.set(t.id,o),t.width=h.width,t.height=h.height;let f;if(t.startLabelLeft){const g=e.insert("g").attr("class","edgeTerminals"),m=g.insert("g").attr("class","inner"),y=await Fr(m,t.startLabelLeft,Wi(t.labelStyle)||"",!1,!1);f=y;let C=y.getBBox();if(i){const x=y.children[0],k=Et(y);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}m.attr("transform",zi(C,i)),Jt.get(t.id)||Jt.set(t.id,{}),Jt.get(t.id).startLeft=g,Vi(f,t.startLabelLeft)}if(t.startLabelRight){const g=e.insert("g").attr("class","edgeTerminals"),m=g.insert("g").attr("class","inner"),y=await Fr(m,t.startLabelRight,Wi(t.labelStyle)||"",!1,!1);f=y;let C=y.getBBox();if(i){const x=y.children[0],k=Et(y);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}m.attr("transform",zi(C,i)),Jt.get(t.id)||Jt.set(t.id,{}),Jt.get(t.id).startRight=g,Vi(f,t.startLabelRight)}if(t.endLabelLeft){const g=e.insert("g").attr("class","edgeTerminals"),m=g.insert("g").attr("class","inner"),y=await Fr(g,t.endLabelLeft,Wi(t.labelStyle)||"",!1,!1);f=y;let C=y.getBBox();if(i){const x=y.children[0],k=Et(y);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}m.attr("transform",zi(C,i)),Jt.get(t.id)||Jt.set(t.id,{}),Jt.get(t.id).endLeft=g,Vi(f,t.endLabelLeft)}if(t.endLabelRight){const g=e.insert("g").attr("class","edgeTerminals"),m=g.insert("g").attr("class","inner"),y=await Fr(g,t.endLabelRight,Wi(t.labelStyle)||"",!1,!1);f=y;let C=y.getBBox();if(i){const x=y.children[0],k=Et(y);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}m.attr("transform",zi(C,i)),Jt.get(t.id)||Jt.set(t.id,{}),Jt.get(t.id).endRight=g,Vi(f,t.endLabelRight)}return c},"insertEdgeLabel");function Vi(e,t){me(Ot())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}u(Vi,"setTerminalWidth");var ek=u((e,t)=>{R.debug("Moving label abc88 ",e.id,e.label,Ti.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=Ot(),{subGraphTitleTotalMargin:s}=wo(i);if(e.label){const o=Ti.get(e.id);let a=e.x,n=e.y;if(r){const l=ge.calcLabelPosition(r);R.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(a=l.x,n=l.y)}o.attr("transform",`translate(${a}, ${n+s/2})`)}if(e.startLabelLeft){const o=Jt.get(e.id).startLeft;let a=e.x,n=e.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const o=Jt.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const o=Jt.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const o=Jt.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}},"positionEdgeLabel"),rk=u((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith("-to-label")||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),o=Math.abs(i.y-r.y);return s<.001||o<.001?t:o>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),ik=u((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),o=Math.abs(t.y-i),a=e.width/2,n=e.height/2;return s>=a||o>=n},"outsideNode"),sk=u((e,t,r)=>{R.debug(`intersection calc abc89:
262
- outsidePoint: ${JSON.stringify(t)}
263
- insidePoint : ${JSON.stringify(r)}
264
- node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,o=Math.abs(i-r.x),a=e.width/2;let n=r.x<t.x?a-o:a+o;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*a>Math.abs(i-t.x)*l){let d=r.y<t.y?t.y-l-s:s-l-t.y;n=h*d/c;const f={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-d:r.y-c+d};return n===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),R.debug(`abc89 top/bottom calc, Q ${c}, q ${d}, R ${h}, r ${n}`,f),f}else{r.x<t.x?n=t.x-a-i:n=i-a-t.x;let d=c*n/h,f=r.x<t.x?r.x+h-n:r.x-h+n,g=r.y<t.y?r.y+d:r.y-d;return R.debug(`sides calc abc89, Q ${c}, q ${d}, R ${h}, r ${n}`,{_x:f,_y:g}),n===0&&(f=t.x,g=t.y),h===0&&(f=t.x),c===0&&(g=t.y),{x:f,y:g}}},"intersection"),Tc=u((e,t)=>{R.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(o=>{if(R.info("abc88 checking point",o,t),!ik(t,o)&&!s){const a=sk(t,i,o);R.debug("abc88 inside",o,i,a),R.debug("abc88 intersection",a,t);let n=!1;r.forEach(l=>{n=n||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?R.warn("abc88 no intersect",a,r):r.push(a),s=!0}else R.warn("abc88 outside",o,i),i=o,s||r.push(o)}),R.debug("returning points",r),r},"cutPathAtIntersect");function Zp(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],o=e[i],a=e[i+1];(s.x===o.x&&o.y===a.y&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-s.y)>5||s.y===o.y&&o.x===a.x&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-a.y)>5)&&(t.push(o),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}u(Zp,"extractCornerPoints");var Sc=u(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,o=Math.sqrt(i*i+s*s),a=r/o;return{x:t.x-a*i,y:t.y-a*s}},"findAdjacentPoint"),ok=u(function(e){const{cornerPointPositions:t}=Zp(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],o=e[i+1],a=e[i],n=Sc(s,a,5),l=Sc(o,a,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const d=Math.sqrt(2)*2;let f={x:a.x,y:a.y};if(Math.abs(o.x-s.x)>10&&Math.abs(o.y-s.y)>=10){R.debug("Corner point fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));const g=5;a.x===n.x?f={x:c<0?n.x-g+d:n.x+g-d,y:h<0?n.y-d:n.y+d}:f={x:c<0?n.x-d:n.x+d,y:h<0?n.y-g+d:n.y+g-d}}else R.debug("Corner point skipping fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),ak=u((e,t,r)=>{const i=e-t-r,s=2,o=2,a=s+o,n=Math.floor(i/a),l=Number.isFinite(n)?Math.max(0,n):0,c=Array(l).fill(`${s} ${o}`).join(" ");return`0 ${t} ${c} ${r}`},"generateDashArray"),Kp=u(function(e,t,r,i,s,o,a,n=!1){if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=Ot();let h=t.points,d=!1;const f=s;var g=o;const m=[];for(const P in t.cssCompiledStyles)Su(P)||m.push(t.cssCompiledStyles[P]);if(c==="swimlane"){if(g.intersect&&f.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[f.intersect(h[0]),g.intersect(h[1])];else{const P=h.slice(1,-1),it=P[0],Q=P[P.length-1],mt=.5,wt=Math.abs(h[h.length-1].x-Q.x)<mt&&Math.abs(h[h.length-1].y-Q.y)<mt,St=f.intersect(it),ft=wt?Q:g.intersect(Q),Lt=Math.abs(ft.x-Q.x)<mt&&Math.abs(ft.y-Q.y)<mt,Tt=Math.abs(St.x-it.x)<mt&&Math.abs(St.y-it.y)<mt?[]:[St],Mt=Lt?[]:[ft];h=[...Tt,...P,...Mt]}h=rk(t,h)}else g.intersect&&f.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(f.intersect(h[0])),h.push(g.intersect(h[h.length-1])));const y=btoa(JSON.stringify(h));t.toCluster&&(R.info("to cluster abc88",r.get(t.toCluster)),h=Tc(t.points,r.get(t.toCluster).node),d=!0),t.fromCluster&&(R.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=Tc(h.reverse(),r.get(t.fromCluster).node).reverse(),d=!0);let C=h.filter(P=>!Number.isNaN(P.y));const x=J1(t.curve);x!=="rounded"&&(C=ok(C));let k=es;switch(x){case"linear":k=es;break;case"basis":k=Va;break;case"cardinal":k=lu;break;case"bumpX":k=iu;break;case"bumpY":k=su;break;case"catmullRom":k=cu;break;case"monotoneX":k=mu;break;case"monotoneY":k=yu;break;case"natural":k=xu;break;case"step":k=bu;break;case"stepAfter":k=Tu;break;case"stepBefore":k=ku;break;case"rounded":k=es;break;default:k=Va}const{x:S,y:_}=V1(t),B=k0().x(S).y(_).curve(k);let L;switch(t.thickness){case"normal":L="edge-thickness-normal";break;case"thick":L="edge-thickness-thick";break;case"invisible":L="edge-thickness-invisible";break;default:L="edge-thickness-normal"}switch(t.pattern){case"solid":L+=" edge-pattern-solid";break;case"dotted":L+=" edge-pattern-dotted";break;case"dashed":L+=" edge-pattern-dashed";break;default:L+=" edge-pattern-solid"}let E,F=x==="rounded"?Qp(Jp(C,t),5):B(C);const G=Array.isArray(t.style)?t.style:[t.style];let j=G.find(P=>P?.startsWith("stroke:")),q="";t.animate&&(q="edge-animation-fast"),t.animation&&(q="edge-animation-"+t.animation);let st=!1;if(t.look==="handDrawn"){const P=dt.svg(e);Object.assign([],C);const it=P.path(F,{roughness:.3,seed:l});L+=" transition",E=Et(it).select("path").attr("id",`${a}-${t.id}`).attr("class"," "+L+(t.classes?" "+t.classes:"")+(q?" "+q:"")).attr("style",G?G.reduce((mt,wt)=>mt+";"+wt,""):"");let Q=E.attr("d");E.attr("d",Q),e.node().appendChild(E.node())}else{const P=m.join(";"),it=G?G.reduce((Lt,gt)=>Lt+gt+";",""):"",Q=(P?P+";"+it+";":it)+";"+(G?G.reduce((Lt,gt)=>Lt+";"+gt,""):"");E=e.append("path").attr("d",F).attr("id",`${a}-${t.id}`).attr("class"," "+L+(t.classes?" "+t.classes:"")+(q?" "+q:"")).attr("style",Q),j=Q.match(/stroke:([^;]+)/)?.[1],st=t.animate===!0||!!t.animation||P.includes("animation");const mt=E.node(),wt=typeof mt.getTotalLength=="function"?mt.getTotalLength():0,St=bc[t.arrowTypeStart]||0,ft=bc[t.arrowTypeEnd]||0;if(t.look==="neo"&&!st){const gt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?ak(wt,St,ft):`0 ${St} ${wt-St-ft} ${ft}`}; stroke-dashoffset: 0;`;E.attr("style",gt+E.attr("style"))}}E.attr("data-edge",!0),E.attr("data-et","edge"),E.attr("data-id",t.id),E.attr("data-points",y),E.attr("data-look",ee(t.look)),t.showPoints&&C.forEach(P=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",P.x).attr("cy",P.y)});let Y="";(Ot().flowchart.arrowMarkerAbsolute||Ot().state.arrowMarkerAbsolute)&&(Y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,Y=Y.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),R.info("arrowTypeStart",t.arrowTypeStart),R.info("arrowTypeEnd",t.arrowTypeEnd);const O=!st&&t?.look==="neo";Z1(E,t,Y,a,i,O,j);const D=Math.floor(h.length/2),v=h[D];ge.isLabelCoordinateInPath(v,E.attr("d"))||(d=!0);let N={};return d&&(N.updatedPath=h),N.originalPath=t.points,N},"insertEdge");function Qp(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let o=0;o<i;o++){const a=e[o],n=e[o-1],l=e[o+1];if(o===0)r+=`M${a.x},${a.y}`;else if(o===i-1)r+=`L${a.x},${a.y}`;else{const c=a.x-n.x,h=a.y-n.y,d=l.x-a.x,f=l.y-a.y,g=Math.hypot(c,h),m=Math.hypot(d,f);if(g<s||m<s){r+=`L${a.x},${a.y}`;continue}const y=c/g,C=h/g,x=d/m,k=f/m,S=y*x+C*k,_=Math.max(-1,Math.min(1,S)),B=Math.acos(_);if(B<s||Math.abs(Math.PI-B)<s){r+=`L${a.x},${a.y}`;continue}const L=Math.min(t/Math.sin(B/2),g/2,m/2),E=a.x-y*L,F=a.y-C*L,G=a.x+x*L,j=a.y+k*L;r+=`L${E},${F}`,r+=`Q${a.x},${a.y} ${G},${j}`}}return r}u(Qp,"generateRoundedPath");function un(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}}u(un,"calculateDeltaAndAngle");function Jp(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&pe[t.arrowTypeStart]){const s=pe[t.arrowTypeStart],o=e[0],a=e[1],{angle:n}=un(o,a),l=s*Math.cos(n),c=s*Math.sin(n);r[0].x=o.x+l,r[0].y=o.y+c}const i=e.length;if(i>=2&&pe[t.arrowTypeEnd]){const s=pe[t.arrowTypeEnd],o=e[i-1],a=e[i-2],{angle:n}=un(a,o),l=s*Math.cos(n),c=s*Math.sin(n);r[i-1].x=o.x-l,r[i-1].y=o.y-c}return r}u(Jp,"applyMarkerOffsetsToPoints");var nk=u((e,t,r,i)=>{t.forEach(s=>{Ek[s](e,r,i)})},"insertMarkers"),lk=u((e,t,r)=>{R.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),hk=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),ck=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),dk=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),uk=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),fk=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),pk=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),gk=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),mk=u((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"),yk=u((e,t,r)=>{const i=Vt(),{themeVariables:s}=i,{transitionColor:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${o}`)},"barbNeo"),Ck=u((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"),xk=u((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),bk=u((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"),kk=u((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Tk=u((e,t,r)=>{const i=Vt(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${o}`)},"only_one_neo"),Sk=u((e,t,r)=>{const i=Vt(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),wk=u((e,t,r)=>{const i=Vt(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${o}`)},"one_or_more_neo"),_k=u((e,t,r)=>{const i=Vt(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),Bk=u((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
265
- L20,10
266
- M20,10
267
- L0,20`)},"requirement_arrow"),vk=u((e,t,r)=>{const i=Vt(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
268
- L20,10
269
- M20,10
270
- L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),Lk=u((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"),Fk=u((e,t,r)=>{const i=Vt(),{themeVariables:s}=i,{strokeWidth:o}=s,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo"),Ek={extension:lk,composition:hk,aggregation:ck,dependency:dk,lollipop:uk,point:fk,circle:pk,cross:gk,barb:mk,barbNeo:yk,only_one:Ck,zero_or_one:xk,one_or_more:bk,zero_or_more:kk,only_one_neo:Tk,zero_or_one_neo:Sk,one_or_more_neo:wk,zero_or_more_neo:_k,requirement_arrow:Bk,requirement_contains:Lk,requirement_arrow_neo:vk,requirement_contains_neo:Fk},tg=nk,eg=typeof global=="object"&&global&&global.Object===Object&&global,Ak=typeof self=="object"&&self&&self.Object===Object&&self,xr=eg||Ak||Function("return this")(),ir=xr.Symbol,rg=Object.prototype,Mk=rg.hasOwnProperty,$k=rg.toString,Hi=ir?ir.toStringTag:void 0;function Ok(e){var t=Mk.call(e,Hi),r=e[Hi];try{e[Hi]=void 0;var i=!0}catch{}var s=$k.call(e);return i&&(t?e[Hi]=r:delete e[Hi]),s}var Dk=Object.prototype,Pk=Dk.toString;function Ik(e){return Pk.call(e)}var Rk="[object Null]",qk="[object Undefined]",wc=ir?ir.toStringTag:void 0;function vi(e){return e==null?e===void 0?qk:Rk:wc&&wc in Object(e)?Ok(e):Ik(e)}function Vr(e){return e!=null&&typeof e=="object"}var Nk="[object Symbol]";function dl(e){return typeof e=="symbol"||Vr(e)&&vi(e)==Nk}function ig(e,t){for(var r=-1,i=e==null?0:e.length,s=Array(i);++r<i;)s[r]=t(e[r],r,e);return s}var Le=Array.isArray,_c=ir?ir.prototype:void 0,Bc=_c?_c.toString:void 0;function sg(e){if(typeof e=="string")return e;if(Le(e))return ig(e,sg)+"";if(dl(e))return Bc?Bc.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function ul(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Bo(e){return e}var zk="[object AsyncFunction]",Wk="[object Function]",Hk="[object GeneratorFunction]",jk="[object Proxy]";function co(e){if(!ul(e))return!1;var t=vi(e);return t==Wk||t==Hk||t==zk||t==jk}var ca=xr["__core-js_shared__"],vc=(function(){var e=/[^.]+$/.exec(ca&&ca.keys&&ca.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Yk(e){return!!vc&&vc in e}var Uk=Function.prototype,Gk=Uk.toString;function ti(e){if(e!=null){try{return Gk.call(e)}catch{}try{return e+""}catch{}}return""}var Xk=/[\\^$.*+?()[\]{}|]/g,Vk=/^\[object .+?Constructor\]$/,Zk=Function.prototype,Kk=Object.prototype,Qk=Zk.toString,Jk=Kk.hasOwnProperty,t2=RegExp("^"+Qk.call(Jk).replace(Xk,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function e2(e){if(!ul(e)||Yk(e))return!1;var t=co(e)?t2:Vk;return t.test(ti(e))}function r2(e,t){return e?.[t]}function ei(e,t){var r=r2(e,t);return e2(r)?r:void 0}var fn=ei(xr,"WeakMap");function i2(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)}function s2(){}var o2=800,a2=16,n2=Date.now;function l2(e){var t=0,r=0;return function(){var i=n2(),s=a2-(i-r);if(r=i,s>0){if(++t>=o2)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Zi(e){return function(){return e}}var Lc=(function(){try{var e=ei(Object,"defineProperty");return e({},"",{}),e}catch{}})(),h2=Lc?function(e,t){return Lc(e,"toString",{configurable:!0,enumerable:!1,value:Zi(t),writable:!0})}:Bo,c2=l2(h2);function d2(e,t){for(var r=-1,i=e==null?0:e.length;++r<i&&t(e[r],r,e)!==!1;);return e}function u2(e,t,r,i){for(var s=e.length,o=r+-1;++o<s;)if(t(e[o],o,e))return o;return-1}function f2(e){return e!==e}function p2(e,t,r){for(var i=r-1,s=e.length;++i<s;)if(e[i]===t)return i;return-1}function g2(e,t,r){return t===t?p2(e,t,r):u2(e,f2,r)}function m2(e,t){var r=e==null?0:e.length;return!!r&&g2(e,t,0)>-1}var y2=9007199254740991,C2=/^(?:0|[1-9]\d*)$/;function og(e,t){var r=typeof e;return t=t??y2,!!t&&(r=="number"||r!="symbol"&&C2.test(e))&&e>-1&&e%1==0&&e<t}function ag(e,t){return e===t||e!==e&&t!==t}var Fc=Math.max;function x2(e,t,r){return t=Fc(t===void 0?e.length-1:t,0),function(){for(var i=arguments,s=-1,o=Fc(i.length-t,0),a=Array(o);++s<o;)a[s]=i[t+s];s=-1;for(var n=Array(t+1);++s<t;)n[s]=i[s];return n[t]=r(a),i2(e,this,n)}}function b2(e,t){return c2(x2(e,t,Bo),e+"")}var k2=9007199254740991;function fl(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=k2}function vo(e){return e!=null&&fl(e.length)&&!co(e)}var T2=Object.prototype;function ng(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||T2;return e===r}function S2(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var w2="[object Arguments]";function Ec(e){return Vr(e)&&vi(e)==w2}var lg=Object.prototype,_2=lg.hasOwnProperty,B2=lg.propertyIsEnumerable,Lo=Ec((function(){return arguments})())?Ec:function(e){return Vr(e)&&_2.call(e,"callee")&&!B2.call(e,"callee")};function v2(){return!1}var hg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ac=hg&&typeof module=="object"&&module&&!module.nodeType&&module,L2=Ac&&Ac.exports===hg,Mc=L2?xr.Buffer:void 0,F2=Mc?Mc.isBuffer:void 0,uo=F2||v2,E2="[object Arguments]",A2="[object Array]",M2="[object Boolean]",$2="[object Date]",O2="[object Error]",D2="[object Function]",P2="[object Map]",I2="[object Number]",R2="[object Object]",q2="[object RegExp]",N2="[object Set]",z2="[object String]",W2="[object WeakMap]",H2="[object ArrayBuffer]",j2="[object DataView]",Y2="[object Float32Array]",U2="[object Float64Array]",G2="[object Int8Array]",X2="[object Int16Array]",V2="[object Int32Array]",Z2="[object Uint8Array]",K2="[object Uint8ClampedArray]",Q2="[object Uint16Array]",J2="[object Uint32Array]",Gt={};Gt[Y2]=Gt[U2]=Gt[G2]=Gt[X2]=Gt[V2]=Gt[Z2]=Gt[K2]=Gt[Q2]=Gt[J2]=!0;Gt[E2]=Gt[A2]=Gt[H2]=Gt[M2]=Gt[j2]=Gt[$2]=Gt[O2]=Gt[D2]=Gt[P2]=Gt[I2]=Gt[R2]=Gt[q2]=Gt[N2]=Gt[z2]=Gt[W2]=!1;function tT(e){return Vr(e)&&fl(e.length)&&!!Gt[vi(e)]}function eT(e){return function(t){return e(t)}}var cg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,is=cg&&typeof module=="object"&&module&&!module.nodeType&&module,rT=is&&is.exports===cg,da=rT&&eg.process,$c=(function(){try{var e=is&&is.require&&is.require("util").types;return e||da&&da.binding&&da.binding("util")}catch{}})(),Oc=$c&&$c.isTypedArray,pl=Oc?eT(Oc):tT,iT=Object.prototype,sT=iT.hasOwnProperty;function oT(e,t){var r=Le(e),i=!r&&Lo(e),s=!r&&!i&&uo(e),o=!r&&!i&&!s&&pl(e),a=r||i||s||o,n=a?S2(e.length,String):[],l=n.length;for(var c in e)(t||sT.call(e,c))&&!(a&&(c=="length"||s&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||og(c,l)))&&n.push(c);return n}function aT(e,t){return function(r){return e(t(r))}}var nT=aT(Object.keys,Object),lT=Object.prototype,hT=lT.hasOwnProperty;function dg(e){if(!ng(e))return nT(e);var t=[];for(var r in Object(e))hT.call(e,r)&&r!="constructor"&&t.push(r);return t}function tr(e){return vo(e)?oT(e):dg(e)}var cT=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dT=/^\w*$/;function gl(e,t){if(Le(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||dl(e)?!0:dT.test(e)||!cT.test(e)||t!=null&&e in Object(t)}var as=ei(Object,"create");function uT(){this.__data__=as?as(null):{},this.size=0}function fT(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var pT="__lodash_hash_undefined__",gT=Object.prototype,mT=gT.hasOwnProperty;function yT(e){var t=this.__data__;if(as){var r=t[e];return r===pT?void 0:r}return mT.call(t,e)?t[e]:void 0}var CT=Object.prototype,xT=CT.hasOwnProperty;function bT(e){var t=this.__data__;return as?t[e]!==void 0:xT.call(t,e)}var kT="__lodash_hash_undefined__";function TT(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=as&&t===void 0?kT:t,this}function Zr(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])}}Zr.prototype.clear=uT;Zr.prototype.delete=fT;Zr.prototype.get=yT;Zr.prototype.has=bT;Zr.prototype.set=TT;function ST(){this.__data__=[],this.size=0}function Fo(e,t){for(var r=e.length;r--;)if(ag(e[r][0],t))return r;return-1}var wT=Array.prototype,_T=wT.splice;function BT(e){var t=this.__data__,r=Fo(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():_T.call(t,r,1),--this.size,!0}function vT(e){var t=this.__data__,r=Fo(t,e);return r<0?void 0:t[r][1]}function LT(e){return Fo(this.__data__,e)>-1}function FT(e,t){var r=this.__data__,i=Fo(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function br(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])}}br.prototype.clear=ST;br.prototype.delete=BT;br.prototype.get=vT;br.prototype.has=LT;br.prototype.set=FT;var ns=ei(xr,"Map");function ET(){this.size=0,this.__data__={hash:new Zr,map:new(ns||br),string:new Zr}}function AT(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Eo(e,t){var r=e.__data__;return AT(t)?r[typeof t=="string"?"string":"hash"]:r.map}function MT(e){var t=Eo(this,e).delete(e);return this.size-=t?1:0,t}function $T(e){return Eo(this,e).get(e)}function OT(e){return Eo(this,e).has(e)}function DT(e,t){var r=Eo(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function kr(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])}}kr.prototype.clear=ET;kr.prototype.delete=MT;kr.prototype.get=$T;kr.prototype.has=OT;kr.prototype.set=DT;var PT="Expected a function";function ml(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(PT);var r=function(){var i=arguments,s=t?t.apply(this,i):i[0],o=r.cache;if(o.has(s))return o.get(s);var a=e.apply(this,i);return r.cache=o.set(s,a)||o,a};return r.cache=new(ml.Cache||kr),r}ml.Cache=kr;var IT=500;function RT(e){var t=ml(e,function(i){return r.size===IT&&r.clear(),i}),r=t.cache;return t}var qT=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,NT=/\\(\\)?/g,zT=RT(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(qT,function(r,i,s,o){t.push(s?o.replace(NT,"$1"):i||r)}),t});function WT(e){return e==null?"":sg(e)}function ug(e,t){return Le(e)?e:gl(e,t)?[e]:zT(WT(e))}function Ao(e){if(typeof e=="string"||dl(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function fg(e,t){t=ug(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[Ao(t[r++])];return r&&r==i?e:void 0}function HT(e,t,r){var i=e==null?void 0:fg(e,t);return i===void 0?r:i}function pg(e,t){for(var r=-1,i=t.length,s=e.length;++r<i;)e[s+r]=t[r];return e}var Dc=ir?ir.isConcatSpreadable:void 0;function jT(e){return Le(e)||Lo(e)||!!(Dc&&e&&e[Dc])}function YT(e,t,r,i,s){var o=-1,a=e.length;for(r||(r=jT),s||(s=[]);++o<a;){var n=e[o];r(n)?pg(s,n):i||(s[s.length]=n)}return s}function UT(e,t,r,i){var s=-1,o=e==null?0:e.length;for(i&&o&&(r=e[++s]);++s<o;)r=t(r,e[s],s,e);return r}function GT(){this.__data__=new br,this.size=0}function XT(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function VT(e){return this.__data__.get(e)}function ZT(e){return this.__data__.has(e)}var KT=200;function QT(e,t){var r=this.__data__;if(r instanceof br){var i=r.__data__;if(!ns||i.length<KT-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new kr(i)}return r.set(e,t),this.size=r.size,this}function mr(e){var t=this.__data__=new br(e);this.size=t.size}mr.prototype.clear=GT;mr.prototype.delete=XT;mr.prototype.get=VT;mr.prototype.has=ZT;mr.prototype.set=QT;function gg(e,t){for(var r=-1,i=e==null?0:e.length,s=0,o=[];++r<i;){var a=e[r];t(a,r,e)&&(o[s++]=a)}return o}function JT(){return[]}var tS=Object.prototype,eS=tS.propertyIsEnumerable,Pc=Object.getOwnPropertySymbols,rS=Pc?function(e){return e==null?[]:(e=Object(e),gg(Pc(e),function(t){return eS.call(e,t)}))}:JT;function iS(e,t,r){var i=t(e);return Le(e)?i:pg(i,r(e))}function Ic(e){return iS(e,tr,rS)}var pn=ei(xr,"DataView"),gn=ei(xr,"Promise"),Ci=ei(xr,"Set"),Rc="[object Map]",sS="[object Object]",qc="[object Promise]",Nc="[object Set]",zc="[object WeakMap]",Wc="[object DataView]",oS=ti(pn),aS=ti(ns),nS=ti(gn),lS=ti(Ci),hS=ti(fn),pr=vi;(pn&&pr(new pn(new ArrayBuffer(1)))!=Wc||ns&&pr(new ns)!=Rc||gn&&pr(gn.resolve())!=qc||Ci&&pr(new Ci)!=Nc||fn&&pr(new fn)!=zc)&&(pr=function(e){var t=vi(e),r=t==sS?e.constructor:void 0,i=r?ti(r):"";if(i)switch(i){case oS:return Wc;case aS:return Rc;case nS:return qc;case lS:return Nc;case hS:return zc}return t});var Hc=xr.Uint8Array,cS="__lodash_hash_undefined__";function dS(e){return this.__data__.set(e,cS),this}function uS(e){return this.__data__.has(e)}function ls(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new kr;++t<r;)this.add(e[t])}ls.prototype.add=ls.prototype.push=dS;ls.prototype.has=uS;function fS(e,t){for(var r=-1,i=e==null?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}function mg(e,t){return e.has(t)}var pS=1,gS=2;function yg(e,t,r,i,s,o){var a=r&pS,n=e.length,l=t.length;if(n!=l&&!(a&&l>n))return!1;var c=o.get(e),h=o.get(t);if(c&&h)return c==t&&h==e;var d=-1,f=!0,g=r&gS?new ls:void 0;for(o.set(e,t),o.set(t,e);++d<n;){var m=e[d],y=t[d];if(i)var C=a?i(y,m,d,t,e,o):i(m,y,d,e,t,o);if(C!==void 0){if(C)continue;f=!1;break}if(g){if(!fS(t,function(x,k){if(!mg(g,k)&&(m===x||s(m,x,r,i,o)))return g.push(k)})){f=!1;break}}else if(!(m===y||s(m,y,r,i,o))){f=!1;break}}return o.delete(e),o.delete(t),f}function mS(e){var t=-1,r=Array(e.size);return e.forEach(function(i,s){r[++t]=[s,i]}),r}function yl(e){var t=-1,r=Array(e.size);return e.forEach(function(i){r[++t]=i}),r}var yS=1,CS=2,xS="[object Boolean]",bS="[object Date]",kS="[object Error]",TS="[object Map]",SS="[object Number]",wS="[object RegExp]",_S="[object Set]",BS="[object String]",vS="[object Symbol]",LS="[object ArrayBuffer]",FS="[object DataView]",jc=ir?ir.prototype:void 0,ua=jc?jc.valueOf:void 0;function ES(e,t,r,i,s,o,a){switch(r){case FS:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case LS:return!(e.byteLength!=t.byteLength||!o(new Hc(e),new Hc(t)));case xS:case bS:case SS:return ag(+e,+t);case kS:return e.name==t.name&&e.message==t.message;case wS:case BS:return e==t+"";case TS:var n=mS;case _S:var l=i&yS;if(n||(n=yl),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;i|=CS,a.set(e,t);var h=yg(n(e),n(t),i,s,o,a);return a.delete(e),h;case vS:if(ua)return ua.call(e)==ua.call(t)}return!1}var AS=1,MS=Object.prototype,$S=MS.hasOwnProperty;function OS(e,t,r,i,s,o){var a=r&AS,n=Ic(e),l=n.length,c=Ic(t),h=c.length;if(l!=h&&!a)return!1;for(var d=l;d--;){var f=n[d];if(!(a?f in t:$S.call(t,f)))return!1}var g=o.get(e),m=o.get(t);if(g&&m)return g==t&&m==e;var y=!0;o.set(e,t),o.set(t,e);for(var C=a;++d<l;){f=n[d];var x=e[f],k=t[f];if(i)var S=a?i(k,x,f,t,e,o):i(x,k,f,e,t,o);if(!(S===void 0?x===k||s(x,k,r,i,o):S)){y=!1;break}C||(C=f=="constructor")}if(y&&!C){var _=e.constructor,B=t.constructor;_!=B&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof B=="function"&&B instanceof B)&&(y=!1)}return o.delete(e),o.delete(t),y}var DS=1,Yc="[object Arguments]",Uc="[object Array]",$s="[object Object]",PS=Object.prototype,Gc=PS.hasOwnProperty;function IS(e,t,r,i,s,o){var a=Le(e),n=Le(t),l=a?Uc:pr(e),c=n?Uc:pr(t);l=l==Yc?$s:l,c=c==Yc?$s:c;var h=l==$s,d=c==$s,f=l==c;if(f&&uo(e)){if(!uo(t))return!1;a=!0,h=!1}if(f&&!h)return o||(o=new mr),a||pl(e)?yg(e,t,r,i,s,o):ES(e,t,l,r,i,s,o);if(!(r&DS)){var g=h&&Gc.call(e,"__wrapped__"),m=d&&Gc.call(t,"__wrapped__");if(g||m){var y=g?e.value():e,C=m?t.value():t;return o||(o=new mr),s(y,C,r,i,o)}}return f?(o||(o=new mr),OS(e,t,r,i,s,o)):!1}function Cl(e,t,r,i,s){return e===t?!0:e==null||t==null||!Vr(e)&&!Vr(t)?e!==e&&t!==t:IS(e,t,r,i,Cl,s)}var RS=1,qS=2;function NS(e,t,r,i){var s=r.length,o=s;if(e==null)return!o;for(e=Object(e);s--;){var a=r[s];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++s<o;){a=r[s];var n=a[0],l=e[n],c=a[1];if(a[2]){if(l===void 0&&!(n in e))return!1}else{var h=new mr,d;if(!(d===void 0?Cl(c,l,RS|qS,i,h):d))return!1}}return!0}function Cg(e){return e===e&&!ul(e)}function zS(e){for(var t=tr(e),r=t.length;r--;){var i=t[r],s=e[i];t[r]=[i,s,Cg(s)]}return t}function xg(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function WS(e){var t=zS(e);return t.length==1&&t[0][2]?xg(t[0][0],t[0][1]):function(r){return r===e||NS(r,e,t)}}function HS(e,t){return e!=null&&t in Object(e)}function jS(e,t,r){t=ug(t,e);for(var i=-1,s=t.length,o=!1;++i<s;){var a=Ao(t[i]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}return o||++i!=s?o:(s=e==null?0:e.length,!!s&&fl(s)&&og(a,s)&&(Le(e)||Lo(e)))}function YS(e,t){return e!=null&&jS(e,t,HS)}var US=1,GS=2;function XS(e,t){return gl(e)&&Cg(t)?xg(Ao(e),t):function(r){var i=HT(r,e);return i===void 0&&i===t?YS(r,e):Cl(t,i,US|GS)}}function VS(e){return function(t){return t?.[e]}}function ZS(e){return function(t){return fg(t,e)}}function KS(e){return gl(e)?VS(Ao(e)):ZS(e)}function bg(e){return typeof e=="function"?e:e==null?Bo:typeof e=="object"?Le(e)?XS(e[0],e[1]):WS(e):KS(e)}function QS(e){return function(t,r,i){for(var s=-1,o=Object(t),a=i(t),n=a.length;n--;){var l=a[++s];if(r(o[l],l,o)===!1)break}return t}}var JS=QS();function tw(e,t){return e&&JS(e,t,tr)}function ew(e,t){return function(r,i){if(r==null)return r;if(!vo(r))return e(r,i);for(var s=r.length,o=-1,a=Object(r);++o<s&&i(a[o],o,a)!==!1;);return r}}var xl=ew(tw);function rw(e){return Vr(e)&&vo(e)}function iw(e){return typeof e=="function"?e:Bo}function Rr(e,t){var r=Le(e)?d2:xl;return r(e,iw(t))}function sw(e,t){var r=[];return xl(e,function(i,s,o){t(i,s,o)&&r.push(i)}),r}function Os(e,t){var r=Le(e)?gg:sw;return r(e,bg(t))}function ow(e,t){return ig(t,function(r){return e[r]})}function fa(e){return e==null?[]:ow(e,tr(e))}var aw="[object Map]",nw="[object Set]",lw=Object.prototype,hw=lw.hasOwnProperty;function Xc(e){if(e==null)return!0;if(vo(e)&&(Le(e)||typeof e=="string"||typeof e.splice=="function"||uo(e)||pl(e)||Lo(e)))return!e.length;var t=pr(e);if(t==aw||t==nw)return!e.size;if(ng(e))return!dg(e).length;for(var r in e)if(hw.call(e,r))return!1;return!0}function pi(e){return e===void 0}function cw(e,t,r,i,s){return s(e,function(o,a,n){r=i?(i=!1,o):t(r,o,a,n)}),r}function dw(e,t,r){var i=Le(e)?UT:cw,s=arguments.length<3;return i(e,bg(t),r,s,xl)}var uw=1/0,fw=Ci&&1/yl(new Ci([,-0]))[1]==uw?function(e){return new Ci(e)}:s2,pw=200;function gw(e,t,r){var i=-1,s=m2,o=e.length,a=!0,n=[],l=n;if(o>=pw){var c=fw(e);if(c)return yl(c);a=!1,s=mg,l=new ls}else l=n;t:for(;++i<o;){var h=e[i],d=h;if(h=h!==0?h:0,a&&d===d){for(var f=l.length;f--;)if(l[f]===d)continue t;n.push(h)}else s(l,d,r)||(l!==n&&l.push(d),n.push(h))}return n}var mw=b2(function(e){return gw(YT(e,1,rw,!0))}),yw="\0",qr="\0",Vc="";class Mo{constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=Zi(void 0),this._defaultEdgeLabelFn=Zi(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[qr]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return co(t)||(t=Zi(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return tr(this._nodes)}sources(){var t=this;return Os(this.nodes(),function(r){return Xc(t._in[r])})}sinks(){var t=this;return Os(this.nodes(),function(r){return Xc(t._out[r])})}setNodes(t,r){var i=arguments,s=this;return Rr(t,function(o){i.length>1?s.setNode(o,r):s.setNode(o)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=qr,this._children[t]={},this._children[qr][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=i=>this.removeEdge(this._edgeObjs[i]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],Rr(this.children(t),i=>{this.setParent(i)}),delete this._children[t]),Rr(tr(this._in[t]),r),delete this._in[t],delete this._preds[t],Rr(tr(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(pi(r))r=qr;else{r+="";for(var i=r;!pi(i);i=this.parent(i))if(i===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==qr)return r}}children(t){if(pi(t)&&(t=qr),this._isCompound){var r=this._children[t];if(r)return tr(r)}else{if(t===qr)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return tr(r)}successors(t){var r=this._sucs[t];if(r)return tr(r)}neighbors(t){var r=this.predecessors(t);if(r)return mw(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;Rr(this._nodes,function(a,n){t(n)&&r.setNode(n,a)}),Rr(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,i.edge(a))});var s={};function o(a){var n=i.parent(a);return n===void 0||r.hasNode(n)?(s[a]=n,n):n in s?s[n]:o(n)}return this._isCompound&&Rr(r.nodes(),function(a){r.setParent(a,o(a))}),r}setDefaultEdgeLabel(t){return co(t)||(t=Zi(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return fa(this._edgeObjs)}setPath(t,r){var i=this,s=arguments;return dw(t,function(o,a){return s.length>1?i.setEdge(o,a,r):i.setEdge(o,a),a}),this}setEdge(){var t,r,i,s,o=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,r=a.w,i=a.name,arguments.length===2&&(s=arguments[1],o=!0)):(t=a,r=arguments[1],i=arguments[3],arguments.length>2&&(s=arguments[2],o=!0)),t=""+t,r=""+r,pi(i)||(i=""+i);var n=Ki(this._isDirected,t,r,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n))return o&&(this._edgeLabels[n]=s),this;if(!pi(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[n]=o?s:this._defaultEdgeLabelFn(t,r,i);var l=Cw(this._isDirected,t,r,i);return t=l.v,r=l.w,Object.freeze(l),this._edgeObjs[n]=l,Zc(this._preds[r],t),Zc(this._sucs[t],r),this._in[r][n]=l,this._out[t][n]=l,this._edgeCount++,this}edge(t,r,i){var s=arguments.length===1?pa(this._isDirected,arguments[0]):Ki(this._isDirected,t,r,i);return this._edgeLabels[s]}hasEdge(t,r,i){var s=arguments.length===1?pa(this._isDirected,arguments[0]):Ki(this._isDirected,t,r,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,s)}removeEdge(t,r,i){var s=arguments.length===1?pa(this._isDirected,arguments[0]):Ki(this._isDirected,t,r,i),o=this._edgeObjs[s];return o&&(t=o.v,r=o.w,delete this._edgeLabels[s],delete this._edgeObjs[s],Kc(this._preds[r],t),Kc(this._sucs[t],r),delete this._in[r][s],delete this._out[t][s],this._edgeCount--),this}inEdges(t,r){var i=this._in[t];if(i){var s=fa(i);return r?Os(s,function(o){return o.v===r}):s}}outEdges(t,r){var i=this._out[t];if(i){var s=fa(i);return r?Os(s,function(o){return o.w===r}):s}}nodeEdges(t,r){var i=this.inEdges(t,r);if(i)return i.concat(this.outEdges(t,r))}}Mo.prototype._nodeCount=0;Mo.prototype._edgeCount=0;function Zc(e,t){e[t]?e[t]++:e[t]=1}function Kc(e,t){--e[t]||delete e[t]}function Ki(e,t,r,i){var s=""+t,o=""+r;if(!e&&s>o){var a=s;s=o,o=a}return s+Vc+o+Vc+(pi(i)?yw:i)}function Cw(e,t,r,i){var s=""+t,o=""+r;if(!e&&s>o){var a=s;s=o,o=a}var n={v:s,w:o};return i&&(n.name=i),n}function pa(e,t){return Ki(e,t.v,t.w,t.name)}function kg(e,{edgePathsClass:t="edges edgePaths"}={}){const r=e.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),s=r.insert("g").attr("class",t),o=r.insert("g").attr("class","edgeLabels"),a=r.insert("g").attr("class","nodes");return{clusters:i,edgePaths:s,edgeLabels:o,nodes:a,rootGroups:r}}u(kg,"createLayoutElementGroups");async function Tg(e,t){if(t.label){const{shapeSvg:r,bbox:i}=await Ct(e,t);t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}u(Tg,"measureGroupLabel");async function Sg(e,t,r){const i=await hl(e,t,r),s=i.node()?.getBBox()??{width:0,height:0};return t.width=s.width,t.height=s.height,i}u(Sg,"insertMeasuredNode");async function wg(e,t){const r=new Mo({multigraph:!0,compound:!0}),i=[...t.edges],s=Ot(),o=kg(e),{edgeLabels:a,nodes:n}=o,l=new Map,c=e.node()!=null;await Promise.all(t.nodes.map(async h=>{if(h.isGroup)c&&await Tg(n,h),r.setNode(h.id,{...h});else{if(c){const d=await Sg(n,h,{config:s,dir:h.dir});l.set(h.id,d)}r.setNode(h.id,{...h})}}));for(const h of i)c&&Vp(h)&&await cl(a,h),r.setEdge(h.start,h.end,{...h},h.id),t.edges.some(f=>f.id===h.id)||t.edges.push(h);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:h}=await At(async()=>{const{captureNodeSizes:d}=await import("./sizeCapture-INFHLROL-BRJi3gCg.js");return{captureNodeSizes:d}},__vite__mapDeps([0,1,2,3]));h(e,t)}return{graph:r,groups:o,nodeElements:l}}u(wg,"createGraphWithElements");var It=new Map,jr=new Map,_g=new Map,xw=u(()=>{jr.clear(),_g.clear(),It.clear()},"clear"),hs=u((e,t)=>{const r=jr.get(t)||[];return R.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),bw=u((e,t)=>{const r=jr.get(t)||[];return R.info("Descendants of ",t," is ",r),R.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||hs(e.v,t)||hs(e.w,t)||r.includes(e.w):(R.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),Bg=u((e,t,r,i)=>{R.debug("Copying children of ",e,"root",i,"data",t.node(e),i);const s=t.children(e)||[];e!==i&&s.push(e),R.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(o=>{if(t.children(o).length>0)Bg(o,t,r,i);else{const a=t.node(o);R.info("cp ",o," to ",i," with parent ",e),r.setNode(o,a),i!==t.parent(o)&&(R.debug("Setting parent",o,t.parent(o)),r.setParent(o,t.parent(o))),e!==i&&o!==e?(R.debug("Setting parent",o,e),r.setParent(o,e)):(R.info("In copy ",e,"root",i,"data",t.node(e),i),R.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==i,"node!==clusterId",o!==e));const n=t.edges(o);R.debug("Copying Edges",n),n.forEach(l=>{R.info("Edge",l);const c=t.edge(l.v,l.w,l.name);R.info("Edge data",c,i);try{bw(l,i)?(R.info("Copying as ",l.v,l.w,c,l.name),r.setEdge(l.v,l.w,c,l.name),R.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):R.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",e)}catch(h){R.error(h)}})}R.debug("Removing node",o),t.removeNode(o)})},"copy"),vg=u((e,t)=>{const r=t.children(e);let i=[...r];for(const s of r)_g.set(s,e),i=[...i,...vg(s,t)];return i},"extractDescendants"),kw=u((e,t,r)=>{const i=e.edges().filter(l=>l.v===t||l.w===t),s=e.edges().filter(l=>l.v===r||l.w===r),o=i.map(l=>({v:l.v===t?r:l.v,w:l.w===t?t:l.w})),a=s.map(l=>({v:l.v,w:l.w}));return o.filter(l=>a.some(c=>l.v===c.v&&l.w===c.w))},"findCommonEdges"),fo=u((e,t,r)=>{const i=t.children(e);if(R.trace("Searching children of id ",e,i),i.length<1)return e;let s;for(const o of i){const a=fo(o,t,r),n=kw(t,r,a);if(a)if(n.length>0)s=a;else return a}return s},"findNonClusterChild"),Qc=u(e=>!It.has(e)||!It.get(e).externalConnections?e:It.has(e)?It.get(e).id:e,"getAnchorId"),IL=u((e,t)=>{if(!e||t>10){R.debug("Opting out, no graph ");return}else R.debug("Opting in, graph ");e.nodes().forEach(function(r){e.children(r).length>0&&(R.debug("Cluster identified",r," Replacement id in edges: ",fo(r,e,r)),jr.set(r,vg(r,e)),It.set(r,{id:fo(r,e,r),clusterData:e.node(r)}))}),e.nodes().forEach(function(r){const i=e.children(r),s=e.edges();i.length>0?(R.debug("Cluster identified",r,jr),s.forEach(o=>{const a=hs(o.v,r),n=hs(o.w,r);a^n&&(R.debug("Edge: ",o," leaves cluster ",r),R.debug("Descendants of XXX ",r,": ",jr.get(r)),It.get(r).externalConnections=!0)})):R.debug("Not a cluster ",r,jr)});for(let r of It.keys()){const i=It.get(r).id,s=e.parent(i);s!==r&&It.has(s)&&!It.get(s).externalConnections&&(It.get(r).id=s);const o=e.edges().some(a=>a.v===r);if(i&&It.get(r)?.externalConnections&&o&&Eg(e,i,r)){const a=Tw(e,r,e.parent(i));a&&(It.get(r).id=a)}}e.edges().forEach(function(r){const i=e.edge(r);R.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),R.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(e.edge(r)));let s=r.v,o=r.w;if(R.debug("Fix XXX",It,"ids:",r.v,r.w,"Translating: ",It.get(r.v)," --- ",It.get(r.w)),It.get(r.v)||It.get(r.w)){if(R.debug("Fixing and trying - removing XXX",r.v,r.w,r.name),s=Qc(r.v),o=Qc(r.w),e.removeEdge(r.v,r.w,r.name),s!==r.v){const a=e.parent(s);It.get(a).externalConnections=!0,i.fromCluster=r.v}if(o!==r.w){const a=e.parent(o);It.get(a).externalConnections=!0,i.toCluster=r.w}R.debug("Fix Replacing with XXX",s,o,r.name),e.setEdge(s,o,i,r.name)}}),Lg(e,0),R.trace(It)},"adjustClustersAndEdges"),Lg=u((e,t)=>{if(t>10){R.error("Bailing out");return}let r=e.nodes(),i=!1;for(const s of r){const o=e.children(s);i=i||o.length>0}if(!i){R.debug("Done, no node has children",e.nodes());return}R.debug("Nodes = ",r,t);for(const s of r)if(R.debug("Extracting node",s,It,It.has(s)&&!It.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",t),!It.has(s))R.debug("Not a cluster",s,t);else if(!It.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){R.debug("Cluster without external connections, without a parent and with children",s,t);let a=e.graph().rankdir==="TB"?"LR":"TB";It.get(s)?.clusterData?.dir&&(a=It.get(s).clusterData.dir,R.debug("Fixing dir",It.get(s).clusterData.dir,a));const n=new Mo({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Bg(s,e,n,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:It.get(s).clusterData,label:It.get(s).label,graph:n})}else R.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!It.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),t),R.debug(It);r=e.nodes(),R.debug("New list of nodes",r);for(const s of r){const o=e.node(s);R.debug(" Now next level",s,o),o?.clusterNode&&Lg(o.graph,t+1)}},"extractor"),Fg=u((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{const s=e.children(i),o=Fg(e,s);r=[...r,...o]}),r},"sorter"),RL=u(e=>Fg(e,e.children()),"sortNodesByHierarchy"),Eg=u((e,t,r)=>{let i=e.parent(t);for(;i&&i!==r;){const s=It.get(i);if(s&&!s.externalConnections)return!0;i=e.parent(i)}return!1},"isNodeInExtractableCluster"),Tw=u((e,t,r)=>{const i=e.children(t)??[];for(const s of i){if(s===r||hs(s,r))continue;const o=fo(s,e,t);if(o&&!Eg(e,o,t))return o}return null},"findSafeAnchorNode");function Sw({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:i,afterPaint:s,paintOptions:o}){const a=t??Mg;return u(async function(l,c,h,d){const f=c.select("g");(h?.insertMarkers??tg)(f,l.markers,l.type,l.diagramId),Ag();const g={element:f,helpers:h,options:d};g.preparedLayout=await e?.(l,g);const m=await a(l,g),y=await r(l,g),C={...g,measure:m};i?await i(l,C,y):await $g(l,C,o),await s?.(l,C,y)},"render")}u(Sw,"createCommonLayoutRenderer");function Ag(){N1(),tk(),X1(),xw()}u(Ag,"clearLayoutRenderState");async function Mg(e,{element:t}){return await wg(t,e)}u(Mg,"defaultMeasureLayout");async function $g(e,t,r={}){const{measure:i}=t,{groups:s}=i;for(const a of r.getNodes?.(e,t)??e.nodes)r.skipNode?.(a,t)||await Og(s,a,t,r);const o=Pg(e.nodes);for(const a of e.edges)Ig(a,r)||await Rg(s,a,o,e,r,t)}u($g,"paintLayoutData");async function Og(e,t,r,i){t.clusterNode?xc(t):Dg(t,r,i)?await Xp(e.clusters,t):xc(t)}u(Og,"paintLayoutNode");function Dg(e,t,r){return e.isGroup===!0&&(r.isCluster?.(e,t)??!0)}u(Dg,"shouldPaintAsCluster");function Pg(e){const t=new Map;for(const r of e)r?.id&&t.set(r.id,r);return t}u(Pg,"buildNodeLookup");function Ig(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}u(Ig,"shouldSkipPaintEdge");async function Rg(e,t,r,i,s,o){const a=Kp(e.edgePaths,{...t},s.clusterDb??new Map,i.type,mn(t.start,t,r,o,s),mn(t.end,t,r,o,s),i.diagramId,qg(t,s));Vp(t)&&(Ti.has(t.id)||await cl(e.edgeLabels,t),Ng(t,a))}u(Rg,"paintLayoutEdge");function mn(e,t,r,i,s){return s.getEdgeNode?.(e,t,i)??(e?r.get(e)??{}:{})}u(mn,"getRenderedNode");function qg(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}u(qg,"shouldSkipIntersect");function Ng(e,t){const r=t?.updatedPath??t?.originalPath,i=Vt(),{subGraphTitleTotalMargin:s}=wo({flowchart:i.flowchart??{}});if(e.label){const o=Ti.get(e.id);let a=e.x,n=e.y;if(r){const l=ge.calcLabelPosition(r);R.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t?.updatedPath&&(a=l.x,n=l.y)}o.attr("transform",`translate(${a}, ${n+s/2})`)}if(e?.startLabelLeft){const o=Jt.get(e.id).startLeft;let a=e?.x,n=e?.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const o=Jt.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const o=Jt.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const o=Jt.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}}u(Ng,"positionRenderedEdgeLabel");function zg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}u(zg,"getDefaultExportFromCjs");var de={},Ds={},vr={},Jc;function Li(){if(Jc)return vr;Jc=1;function e(a){return typeof a>"u"||a===null}u(e,"isNothing");function t(a){return typeof a=="object"&&a!==null}u(t,"isObject");function r(a){return Array.isArray(a)?a:e(a)?[]:[a]}u(r,"toArray");function i(a,n){if(n){const l=Object.keys(n);for(let c=0,h=l.length;c<h;c+=1){const d=l[c];a[d]=n[d]}}return a}u(i,"extend");function s(a,n){let l="";for(let c=0;c<n;c+=1)l+=a;return l}u(s,"repeat");function o(a){return a===0&&Number.NEGATIVE_INFINITY===1/a}return u(o,"isNegativeZero"),vr.isNothing=e,vr.isObject=t,vr.toArray=r,vr.repeat=s,vr.isNegativeZero=o,vr.extend=i,vr}u(Li,"requireCommon");var ga,td;function Fi(){if(td)return ga;td=1;function e(r,i){let s="";const o=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(s+='in "'+r.mark.name+'" '),s+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!i&&r.mark.snippet&&(s+=`
271
-
272
- `+r.mark.snippet),o+" "+s):o}u(e,"formatError");function t(r,i){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=i,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return u(t,"YAMLException2"),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=u(function(i){return this.name+": "+e(this,i)},"toString"),ga=t,ga}u(Fi,"requireException");var ma,ed;function Wg(){if(ed)return ma;ed=1;const e=Li();function t(s,o,a,n,l){let c="",h="";const d=Math.floor(l/2)-1;return n-o>d&&(c=" ... ",o=n-d+c.length),a-n>d&&(h=" ...",a=n+d-h.length),{str:c+s.slice(o,a).replace(/\t/g,"→")+h,pos:n-o+c.length}}u(t,"getLine");function r(s,o){return e.repeat(" ",o-s.length)+s}u(r,"padStart");function i(s,o){if(o=Object.create(o||null),!s.buffer)return null;o.maxLength||(o.maxLength=79),typeof o.indent!="number"&&(o.indent=1),typeof o.linesBefore!="number"&&(o.linesBefore=3),typeof o.linesAfter!="number"&&(o.linesAfter=2);const a=/\r?\n|\r|\0/g,n=[0],l=[];let c,h=-1;for(;c=a.exec(s.buffer);)l.push(c.index),n.push(c.index+c[0].length),s.position<=c.index&&h<0&&(h=n.length-2);h<0&&(h=n.length-1);let d="";const f=Math.min(s.line+o.linesAfter,l.length).toString().length,g=o.maxLength-(o.indent+f+3);for(let y=1;y<=o.linesBefore&&!(h-y<0);y++){const C=t(s.buffer,n[h-y],l[h-y],s.position-(n[h]-n[h-y]),g);d=e.repeat(" ",o.indent)+r((s.line-y+1).toString(),f)+" | "+C.str+`
273
- `+d}const m=t(s.buffer,n[h],l[h],s.position,g);d+=e.repeat(" ",o.indent)+r((s.line+1).toString(),f)+" | "+m.str+`
274
- `,d+=e.repeat("-",o.indent+f+3+m.pos)+`^
275
- `;for(let y=1;y<=o.linesAfter&&!(h+y>=l.length);y++){const C=t(s.buffer,n[h+y],l[h+y],s.position-(n[h]-n[h+y]),g);d+=e.repeat(" ",o.indent)+r((s.line+y+1).toString(),f)+" | "+C.str+`
276
- `}return d.replace(/\n$/,"")}return u(i,"makeSnippet"),ma=i,ma}u(Wg,"requireSnippet");var ya,rd;function ye(){if(rd)return ya;rd=1;const e=Fi(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(o){const a={};return o!==null&&Object.keys(o).forEach(function(n){o[n].forEach(function(l){a[String(l)]=n})}),a}u(i,"compileStyleAliases");function s(o,a){if(a=a||{},Object.keys(a).forEach(function(n){if(t.indexOf(n)===-1)throw new e('Unknown option "'+n+'" is met in definition of "'+o+'" YAML type.')}),this.options=a,this.tag=o,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(n){return n},this.instanceOf=a.instanceOf||null,this.predicate=a.predicate||null,this.represent=a.represent||null,this.representName=a.representName||null,this.defaultStyle=a.defaultStyle||null,this.multi=a.multi||!1,this.styleAliases=i(a.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+o+'" YAML type.')}return u(s,"Type2"),ya=s,ya}u(ye,"requireType");var Ca,id;function bl(){if(id)return Ca;id=1;const e=Fi(),t=ye();function r(o,a){const n=[];return o[a].forEach(function(l){let c=n.length;n.forEach(function(h,d){h.tag===l.tag&&h.kind===l.kind&&h.multi===l.multi&&(c=d)}),n[c]=l}),n}u(r,"compileList");function i(){const o={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function a(n){n.multi?(o.multi[n.kind].push(n),o.multi.fallback.push(n)):o[n.kind][n.tag]=o.fallback[n.tag]=n}u(a,"collectType");for(let n=0,l=arguments.length;n<l;n+=1)arguments[n].forEach(a);return o}u(i,"compileMap");function s(o){return this.extend(o)}return u(s,"Schema2"),s.prototype.extend=u(function(a){let n=[],l=[];if(a instanceof t)l.push(a);else if(Array.isArray(a))l=l.concat(a);else if(a&&(Array.isArray(a.implicit)||Array.isArray(a.explicit)))a.implicit&&(n=n.concat(a.implicit)),a.explicit&&(l=l.concat(a.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(h.loadKind&&h.loadKind!=="scalar")throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(h.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const c=Object.create(s.prototype);return c.implicit=(this.implicit||[]).concat(n),c.explicit=(this.explicit||[]).concat(l),c.compiledImplicit=r(c,"implicit"),c.compiledExplicit=r(c,"explicit"),c.compiledTypeMap=i(c.compiledImplicit,c.compiledExplicit),c},"extend"),Ca=s,Ca}u(bl,"requireSchema");var xa,sd;function kl(){if(sd)return xa;sd=1;const e=ye();return xa=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:u(function(t){return t!==null?t:""},"construct")}),xa}u(kl,"requireStr");var ba,od;function Tl(){if(od)return ba;od=1;const e=ye();return ba=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:u(function(t){return t!==null?t:[]},"construct")}),ba}u(Tl,"requireSeq");var ka,ad;function Sl(){if(ad)return ka;ad=1;const e=ye();return ka=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:u(function(t){return t!==null?t:{}},"construct")}),ka}u(Sl,"requireMap");var Ta,nd;function wl(){if(nd)return Ta;nd=1;const e=bl();return Ta=new e({explicit:[kl(),Tl(),Sl()]}),Ta}u(wl,"requireFailsafe");var Sa,ld;function _l(){if(ld)return Sa;ld=1;const e=ye();function t(s){if(s===null)return!0;const o=s.length;return o===1&&s==="~"||o===4&&(s==="null"||s==="Null"||s==="NULL")}u(t,"resolveYamlNull");function r(){return null}u(r,"constructYamlNull");function i(s){return s===null}return u(i,"isNull"),Sa=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{canonical:u(function(){return"~"},"canonical"),lowercase:u(function(){return"null"},"lowercase"),uppercase:u(function(){return"NULL"},"uppercase"),camelcase:u(function(){return"Null"},"camelcase"),empty:u(function(){return""},"empty")},defaultStyle:"lowercase"}),Sa}u(_l,"require_null");var wa,hd;function Bl(){if(hd)return wa;hd=1;const e=ye();function t(s){if(s===null)return!1;const o=s.length;return o===4&&(s==="true"||s==="True"||s==="TRUE")||o===5&&(s==="false"||s==="False"||s==="FALSE")}u(t,"resolveYamlBoolean");function r(s){return s==="true"||s==="True"||s==="TRUE"}u(r,"constructYamlBoolean");function i(s){return Object.prototype.toString.call(s)==="[object Boolean]"}return u(i,"isBoolean"),wa=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{lowercase:u(function(s){return s?"true":"false"},"lowercase"),uppercase:u(function(s){return s?"TRUE":"FALSE"},"uppercase"),camelcase:u(function(s){return s?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),wa}u(Bl,"requireBool");var _a,cd;function vl(){if(cd)return _a;cd=1;const e=Li(),t=ye();function r(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}u(r,"isHexCode");function i(c){return c>=48&&c<=55}u(i,"isOctCode");function s(c){return c>=48&&c<=57}u(s,"isDecCode");function o(c){if(c===null)return!1;const h=c.length;let d=0,f=!1;if(!h)return!1;let g=c[d];if((g==="-"||g==="+")&&(g=c[++d]),g==="0"){if(d+1===h)return!0;if(g=c[++d],g==="b"){for(d++;d<h;d++){if(g=c[d],g!=="0"&&g!=="1")return!1;f=!0}return f&&isFinite(a(c))}if(g==="x"){for(d++;d<h;d++){if(!r(c.charCodeAt(d)))return!1;f=!0}return f&&isFinite(a(c))}if(g==="o"){for(d++;d<h;d++){if(!i(c.charCodeAt(d)))return!1;f=!0}return f&&isFinite(a(c))}}for(;d<h;d++){if(!s(c.charCodeAt(d)))return!1;f=!0}return f?isFinite(a(c)):!1}u(o,"resolveYamlInteger");function a(c){let h=c,d=1,f=h[0];if((f==="-"||f==="+")&&(f==="-"&&(d=-1),h=h.slice(1),f=h[0]),h==="0")return 0;if(f==="0"){if(h[1]==="b")return d*parseInt(h.slice(2),2);if(h[1]==="x")return d*parseInt(h.slice(2),16);if(h[1]==="o")return d*parseInt(h.slice(2),8)}return d*parseInt(h,10)}u(a,"parseYamlInteger");function n(c){return a(c)}u(n,"constructYamlInteger");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!e.isNegativeZero(c)}return u(l,"isInteger"),_a=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:n,predicate:l,represent:{binary:u(function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},"binary"),octal:u(function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},"octal"),decimal:u(function(c){return c.toString(10)},"decimal"),hexadecimal:u(function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),_a}u(vl,"requireInt");var Ba,dd;function Ll(){if(dd)return Ba;dd=1;const e=Li(),t=ye(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function s(c){return c===null||!r.test(c)?!1:isFinite(parseFloat(c,10))?!0:i.test(c)}u(s,"resolveYamlFloat");function o(c){let h=c.toLowerCase();const d=h[0]==="-"?-1:1;return"+-".indexOf(h[0])>=0&&(h=h.slice(1)),h===".inf"?d===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:h===".nan"?NaN:d*parseFloat(h,10)}u(o,"constructYamlFloat");const a=/^[-+]?[0-9]+e/;function n(c,h){if(isNaN(c))switch(h){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(h){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(h){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(c))return"-0.0";const d=c.toString(10);return a.test(d)?d.replace("e",".e"):d}u(n,"representYamlFloat");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||e.isNegativeZero(c))}return u(l,"isFloat"),Ba=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:o,predicate:l,represent:n,defaultStyle:"lowercase"}),Ba}u(Ll,"requireFloat");var va,ud;function Fl(){return ud||(ud=1,va=wl().extend({implicit:[_l(),Bl(),vl(),Ll()]})),va}u(Fl,"requireJson");var La,fd;function El(){return fd||(fd=1,La=Fl()),La}u(El,"requireCore");var Fa,pd;function Al(){if(pd)return Fa;pd=1;const e=ye(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function i(a){return a===null?!1:t.exec(a)!==null||r.exec(a)!==null}u(i,"resolveYamlTimestamp");function s(a){let n=0,l=null,c=t.exec(a);if(c===null&&(c=r.exec(a)),c===null)throw new Error("Date resolve error");const h=+c[1],d=+c[2]-1,f=+c[3];if(!c[4])return new Date(Date.UTC(h,d,f));const g=+c[4],m=+c[5],y=+c[6];if(c[7]){for(n=c[7].slice(0,3);n.length<3;)n+="0";n=+n}if(c[9]){const x=+c[10],k=+(c[11]||0);l=(x*60+k)*6e4,c[9]==="-"&&(l=-l)}const C=new Date(Date.UTC(h,d,f,g,m,y,n));return l&&C.setTime(C.getTime()-l),C}u(s,"constructYamlTimestamp");function o(a){return a.toISOString()}return u(o,"representYamlTimestamp"),Fa=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:s,instanceOf:Date,represent:o}),Fa}u(Al,"requireTimestamp");var Ea,gd;function Ml(){if(gd)return Ea;gd=1;const e=ye();function t(r){return r==="<<"||r===null}return u(t,"resolveYamlMerge"),Ea=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),Ea}u(Ml,"requireMerge");var Aa,md;function $l(){if(md)return Aa;md=1;const e=ye(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
277
- \r`;function r(a){if(a===null)return!1;let n=0;const l=a.length,c=t;for(let h=0;h<l;h++){const d=c.indexOf(a.charAt(h));if(!(d>64)){if(d<0)return!1;n+=6}}return n%8===0}u(r,"resolveYamlBinary");function i(a){const n=a.replace(/[\r\n=]/g,""),l=n.length,c=t;let h=0;const d=[];for(let g=0;g<l;g++)g%4===0&&g&&(d.push(h>>16&255),d.push(h>>8&255),d.push(h&255)),h=h<<6|c.indexOf(n.charAt(g));const f=l%4*6;return f===0?(d.push(h>>16&255),d.push(h>>8&255),d.push(h&255)):f===18?(d.push(h>>10&255),d.push(h>>2&255)):f===12&&d.push(h>>4&255),new Uint8Array(d)}u(i,"constructYamlBinary");function s(a){let n="",l=0;const c=a.length,h=t;for(let f=0;f<c;f++)f%3===0&&f&&(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]),l=(l<<8)+a[f];const d=c%3;return d===0?(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]):d===2?(n+=h[l>>10&63],n+=h[l>>4&63],n+=h[l<<2&63],n+=h[64]):d===1&&(n+=h[l>>2&63],n+=h[l<<4&63],n+=h[64],n+=h[64]),n}u(s,"representYamlBinary");function o(a){return Object.prototype.toString.call(a)==="[object Uint8Array]"}return u(o,"isBinary"),Aa=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:s}),Aa}u($l,"requireBinary");var Ma,yd;function Ol(){if(yd)return Ma;yd=1;const e=ye(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(o){if(o===null)return!0;const a=[],n=o;for(let l=0,c=n.length;l<c;l+=1){const h=n[l];let d=!1;if(r.call(h)!=="[object Object]")return!1;let f;for(f in h)if(t.call(h,f))if(!d)d=!0;else return!1;if(!d)return!1;if(a.indexOf(f)===-1)a.push(f);else return!1}return!0}u(i,"resolveYamlOmap");function s(o){return o!==null?o:[]}return u(s,"constructYamlOmap"),Ma=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:s}),Ma}u(Ol,"requireOmap");var $a,Cd;function Dl(){if(Cd)return $a;Cd=1;const e=ye(),t=Object.prototype.toString;function r(s){if(s===null)return!0;const o=s,a=new Array(o.length);for(let n=0,l=o.length;n<l;n+=1){const c=o[n];if(t.call(c)!=="[object Object]")return!1;const h=Object.keys(c);if(h.length!==1)return!1;a[n]=[h[0],c[h[0]]]}return!0}u(r,"resolveYamlPairs");function i(s){if(s===null)return[];const o=s,a=new Array(o.length);for(let n=0,l=o.length;n<l;n+=1){const c=o[n],h=Object.keys(c);a[n]=[h[0],c[h[0]]]}return a}return u(i,"constructYamlPairs"),$a=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),$a}u(Dl,"requirePairs");var Oa,xd;function Pl(){if(xd)return Oa;xd=1;const e=ye(),t=Object.prototype.hasOwnProperty;function r(s){if(s===null)return!0;const o=s;for(const a in o)if(t.call(o,a)&&o[a]!==null)return!1;return!0}u(r,"resolveYamlSet");function i(s){return s!==null?s:{}}return u(i,"constructYamlSet"),Oa=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),Oa}u(Pl,"requireSet");var Da,bd;function $o(){return bd||(bd=1,Da=El().extend({implicit:[Al(),Ml()],explicit:[$l(),Ol(),Dl(),Pl()]})),Da}u($o,"require_default");var kd;function Hg(){if(kd)return Ds;kd=1;const e=Li(),t=Fi(),r=Wg(),i=$o(),s=Object.prototype.hasOwnProperty,o=1,a=2,n=3,l=4,c=1,h=2,d=3,f=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,g=/[\x85\u2028\u2029]/,m=/[,\[\]{}]/,y=/^(?:!|!!|![0-9A-Za-z-]+!)$/,C=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function x(p){return Object.prototype.toString.call(p)}u(x,"_class");function k(p){return p===10||p===13}u(k,"isEol");function S(p){return p===9||p===32}u(S,"isWhiteSpace");function _(p){return p===9||p===32||p===10||p===13}u(_,"isWsOrEol");function B(p){return p===44||p===91||p===93||p===123||p===125}u(B,"isFlowIndicator");function L(p){if(p>=48&&p<=57)return p-48;const M=p|32;return M>=97&&M<=102?M-97+10:-1}u(L,"fromHexCode");function E(p){return p===120?2:p===117?4:p===85?8:0}u(E,"escapedHexLen");function F(p){return p>=48&&p<=57?p-48:-1}u(F,"fromDecimalCode");function G(p){switch(p){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
278
- `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}u(G,"simpleEscapeSequence");function j(p){return p<=65535?String.fromCharCode(p):String.fromCharCode((p-65536>>10)+55296,(p-65536&1023)+56320)}u(j,"charFromCodepoint");function q(p,M,U){M==="__proto__"?Object.defineProperty(p,M,{configurable:!0,enumerable:!0,writable:!0,value:U}):p[M]=U}u(q,"setProperty");const st=new Array(256),Y=new Array(256);for(let p=0;p<256;p++)st[p]=G(p)?1:0,Y[p]=G(p);function O(p,M){this.input=p,this.filename=M.filename||null,this.schema=M.schema||i,this.onWarning=M.onWarning||null,this.legacy=M.legacy||!1,this.json=M.json||!1,this.listener=M.listener||null,this.maxDepth=typeof M.maxDepth=="number"?M.maxDepth:100,this.maxTotalMergeKeys=typeof M.maxTotalMergeKeys=="number"?M.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=p.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}u(O,"State");function D(p,M){const U={name:p.filename,buffer:p.input.slice(0,-1),position:p.position,line:p.line,column:p.position-p.lineStart};return U.snippet=r(U),new t(M,U)}u(D,"generateError");function v(p,M){throw D(p,M)}u(v,"throwError");function N(p,M){p.onWarning&&p.onWarning.call(null,D(p,M))}u(N,"throwWarning");function P(p,M,U){const V=p.anchorMapTransactions;if(V.length!==0){const H=V[V.length-1];s.call(H,M)||(H[M]={existed:s.call(p.anchorMap,M),value:p.anchorMap[M]})}p.anchorMap[M]=U}u(P,"storeAnchor");function it(p){p.anchorMapTransactions.push(Object.create(null))}u(it,"beginAnchorTransaction");function Q(p){const M=p.anchorMapTransactions.pop(),U=p.anchorMapTransactions;if(U.length===0)return;const V=U[U.length-1],H=Object.keys(M);for(let et=0,T=H.length;et<T;et+=1){const I=H[et];s.call(V,I)||(V[I]=M[I])}}u(Q,"commitAnchorTransaction");function mt(p){const M=p.anchorMapTransactions.pop(),U=Object.keys(M);for(let V=U.length-1;V>=0;V-=1){const H=M[U[V]];H.existed?p.anchorMap[U[V]]=H.value:delete p.anchorMap[U[V]]}}u(mt,"rollbackAnchorTransaction");function wt(p){return{position:p.position,line:p.line,lineStart:p.lineStart,lineIndent:p.lineIndent,firstTabInLine:p.firstTabInLine,tag:p.tag,anchor:p.anchor,kind:p.kind,result:p.result}}u(wt,"snapshotState");function St(p,M){p.position=M.position,p.line=M.line,p.lineStart=M.lineStart,p.lineIndent=M.lineIndent,p.firstTabInLine=M.firstTabInLine,p.tag=M.tag,p.anchor=M.anchor,p.kind=M.kind,p.result=M.result}u(St,"restoreState");const ft={YAML:u(function(M,U,V){M.version!==null&&v(M,"duplication of %YAML directive"),V.length!==1&&v(M,"YAML directive accepts exactly one argument");const H=/^([0-9]+)\.([0-9]+)$/.exec(V[0]);H===null&&v(M,"ill-formed argument of the YAML directive");const et=parseInt(H[1],10),T=parseInt(H[2],10);et!==1&&v(M,"unacceptable YAML version of the document"),M.version=V[0],M.checkLineBreaks=T<2,T!==1&&T!==2&&N(M,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:u(function(M,U,V){let H;V.length!==2&&v(M,"TAG directive accepts exactly two arguments");const et=V[0];H=V[1],y.test(et)||v(M,"ill-formed tag handle (first argument) of the TAG directive"),s.call(M.tagMap,et)&&v(M,'there is a previously declared suffix for "'+et+'" tag handle'),C.test(H)||v(M,"ill-formed tag prefix (second argument) of the TAG directive");try{H=decodeURIComponent(H)}catch{v(M,"tag prefix is malformed: "+H)}M.tagMap[et]=H},"handleTagDirective")};function Lt(p,M,U,V){if(M<U){const H=p.input.slice(M,U);if(V)for(let et=0,T=H.length;et<T;et+=1){const I=H.charCodeAt(et);I===9||I>=32&&I<=1114111||v(p,"expected valid JSON character")}else f.test(H)&&v(p,"the stream contains non-printable characters");p.result+=H}}u(Lt,"captureSegment");function gt(p,M,U,V){e.isObject(U)||v(p,"cannot merge mappings; the provided source object is unacceptable");const H=Object.keys(U);for(let et=0,T=H.length;et<T;et+=1){const I=H[et];p.maxTotalMergeKeys!==-1&&++p.totalMergeKeys>p.maxTotalMergeKeys&&v(p,"merge keys exceeded maxTotalMergeKeys ("+p.maxTotalMergeKeys+")"),s.call(M,I)||(q(M,I,U[I]),V[I]=!0)}}u(gt,"mergeMappings");function Tt(p,M,U,V,H,et,T,I,J){if(Array.isArray(H)){H=Array.prototype.slice.call(H);for(let X=0,Z=H.length;X<Z;X+=1)Array.isArray(H[X])&&v(p,"nested arrays are not supported inside keys"),typeof H=="object"&&x(H[X])==="[object Object]"&&(H[X]="[object Object]")}if(typeof H=="object"&&x(H)==="[object Object]"&&(H="[object Object]"),H=String(H),M===null&&(M={}),V==="tag:yaml.org,2002:merge")if(Array.isArray(et))for(let X=0,Z=et.length;X<Z;X+=1)gt(p,M,et[X],U);else gt(p,M,et,U);else!p.json&&!s.call(U,H)&&s.call(M,H)&&(p.line=T||p.line,p.lineStart=I||p.lineStart,p.position=J||p.position,v(p,"duplicated mapping key")),q(M,H,et),delete U[H];return M}u(Tt,"storeMappingPair");function Mt(p){const M=p.input.charCodeAt(p.position);M===10?p.position++:M===13?(p.position++,p.input.charCodeAt(p.position)===10&&p.position++):v(p,"a line break is expected"),p.line+=1,p.lineStart=p.position,p.firstTabInLine=-1}u(Mt,"readLineBreak");function vt(p,M,U){let V=0,H=p.input.charCodeAt(p.position);for(;H!==0;){for(;S(H);)H===9&&p.firstTabInLine===-1&&(p.firstTabInLine=p.position),H=p.input.charCodeAt(++p.position);if(M&&H===35)do H=p.input.charCodeAt(++p.position);while(H!==10&&H!==13&&H!==0);if(k(H))for(Mt(p),H=p.input.charCodeAt(p.position),V++,p.lineIndent=0;H===32;)p.lineIndent++,H=p.input.charCodeAt(++p.position);else break}return U!==-1&&V!==0&&p.lineIndent<U&&N(p,"deficient indentation"),V}u(vt,"skipSeparationSpace");function Nt(p){let M=p.position,U=p.input.charCodeAt(M);return!!((U===45||U===46)&&U===p.input.charCodeAt(M+1)&&U===p.input.charCodeAt(M+2)&&(M+=3,U=p.input.charCodeAt(M),U===0||_(U)))}u(Nt,"testDocumentSeparator");function Wt(p,M){M===1?p.result+=" ":M>1&&(p.result+=e.repeat(`
279
- `,M-1))}u(Wt,"writeFoldedLines");function ne(p,M,U){let V,H,et,T,I,J;const X=p.kind,Z=p.result;let tt=p.input.charCodeAt(p.position);if(_(tt)||B(tt)||tt===35||tt===38||tt===42||tt===33||tt===124||tt===62||tt===39||tt===34||tt===37||tt===64||tt===96)return!1;if(tt===63||tt===45){const K=p.input.charCodeAt(p.position+1);if(_(K)||U&&B(K))return!1}for(p.kind="scalar",p.result="",V=H=p.position,et=!1;tt!==0;){if(tt===58){const K=p.input.charCodeAt(p.position+1);if(_(K)||U&&B(K))break}else if(tt===35){const K=p.input.charCodeAt(p.position-1);if(_(K))break}else{if(p.position===p.lineStart&&Nt(p)||U&&B(tt))break;if(k(tt))if(T=p.line,I=p.lineStart,J=p.lineIndent,vt(p,!1,-1),p.lineIndent>=M){et=!0,tt=p.input.charCodeAt(p.position);continue}else{p.position=H,p.line=T,p.lineStart=I,p.lineIndent=J;break}}et&&(Lt(p,V,H,!1),Wt(p,p.line-T),V=H=p.position,et=!1),S(tt)||(H=p.position+1),tt=p.input.charCodeAt(++p.position)}return Lt(p,V,H,!1),p.result?!0:(p.kind=X,p.result=Z,!1)}u(ne,"readPlainScalar");function Se(p,M){let U,V,H=p.input.charCodeAt(p.position);if(H!==39)return!1;for(p.kind="scalar",p.result="",p.position++,U=V=p.position;(H=p.input.charCodeAt(p.position))!==0;)if(H===39)if(Lt(p,U,p.position,!0),H=p.input.charCodeAt(++p.position),H===39)U=p.position,p.position++,V=p.position;else return!0;else k(H)?(Lt(p,U,V,!0),Wt(p,vt(p,!1,M)),U=V=p.position):p.position===p.lineStart&&Nt(p)?v(p,"unexpected end of the document within a single quoted scalar"):(p.position++,S(H)||(V=p.position));v(p,"unexpected end of the stream within a single quoted scalar")}u(Se,"readSingleQuotedScalar");function Pt(p,M){let U,V,H,et=p.input.charCodeAt(p.position);if(et!==34)return!1;for(p.kind="scalar",p.result="",p.position++,U=V=p.position;(et=p.input.charCodeAt(p.position))!==0;){if(et===34)return Lt(p,U,p.position,!0),p.position++,!0;if(et===92){if(Lt(p,U,p.position,!0),et=p.input.charCodeAt(++p.position),k(et))vt(p,!1,M);else if(et<256&&st[et])p.result+=Y[et],p.position++;else if((H=E(et))>0){let T=H,I=0;for(;T>0;T--)et=p.input.charCodeAt(++p.position),(H=L(et))>=0?I=(I<<4)+H:v(p,"expected hexadecimal character");p.result+=j(I),p.position++}else v(p,"unknown escape sequence");U=V=p.position}else k(et)?(Lt(p,U,V,!0),Wt(p,vt(p,!1,M)),U=V=p.position):p.position===p.lineStart&&Nt(p)?v(p,"unexpected end of the document within a double quoted scalar"):(p.position++,S(et)||(V=p.position))}v(p,"unexpected end of the stream within a double quoted scalar")}u(Pt,"readDoubleQuotedScalar");function lr(p,M){let U=!0,V,H,et;const T=p.tag;let I;const J=p.anchor;let X,Z,tt,K;const ht=Object.create(null);let lt,yt,bt,$t=p.input.charCodeAt(p.position);if($t===91)X=93,K=!1,I=[];else if($t===123)X=125,K=!0,I={};else return!1;for(p.anchor!==null&&P(p,p.anchor,I),$t=p.input.charCodeAt(++p.position);$t!==0;){if(vt(p,!0,M),$t=p.input.charCodeAt(p.position),$t===X)return p.position++,p.tag=T,p.anchor=J,p.kind=K?"mapping":"sequence",p.result=I,!0;if(U?$t===44&&v(p,"expected the node content, but found ','"):v(p,"missed comma between flow collection entries"),yt=lt=bt=null,Z=tt=!1,$t===63){const Ut=p.input.charCodeAt(p.position+1);_(Ut)&&(Z=tt=!0,p.position++,vt(p,!0,M))}V=p.line,H=p.lineStart,et=p.position,xe(p,M,o,!1,!0),yt=p.tag,lt=p.result,vt(p,!0,M),$t=p.input.charCodeAt(p.position),(tt||p.line===V)&&$t===58&&(Z=!0,$t=p.input.charCodeAt(++p.position),vt(p,!0,M),xe(p,M,o,!1,!0),bt=p.result),K?Tt(p,I,ht,yt,lt,bt,V,H,et):Z?I.push(Tt(p,null,ht,yt,lt,bt,V,H,et)):I.push(lt),vt(p,!0,M),$t=p.input.charCodeAt(p.position),$t===44?(U=!0,$t=p.input.charCodeAt(++p.position)):U=!1}v(p,"unexpected end of the stream within a flow collection")}u(lr,"readFlowCollection");function jt(p,M){let U,V=c,H=!1,et=!1,T=M,I=0,J=!1,X,Z=p.input.charCodeAt(p.position);if(Z===124)U=!1;else if(Z===62)U=!0;else return!1;for(p.kind="scalar",p.result="";Z!==0;)if(Z=p.input.charCodeAt(++p.position),Z===43||Z===45)c===V?V=Z===43?d:h:v(p,"repeat of a chomping mode identifier");else if((X=F(Z))>=0)X===0?v(p,"bad explicit indentation width of a block scalar; it cannot be less than one"):et?v(p,"repeat of an indentation width identifier"):(T=M+X-1,et=!0);else break;if(S(Z)){do Z=p.input.charCodeAt(++p.position);while(S(Z));if(Z===35)do Z=p.input.charCodeAt(++p.position);while(!k(Z)&&Z!==0)}for(;Z!==0;){for(Mt(p),p.lineIndent=0,Z=p.input.charCodeAt(p.position);(!et||p.lineIndent<T)&&Z===32;)p.lineIndent++,Z=p.input.charCodeAt(++p.position);if(!et&&p.lineIndent>T&&(T=p.lineIndent),k(Z)){I++;continue}if(!et&&T===0&&v(p,"missing indentation for block scalar"),p.lineIndent<T){V===d?p.result+=e.repeat(`
280
- `,H?1+I:I):V===c&&H&&(p.result+=`
281
- `);break}U?S(Z)?(J=!0,p.result+=e.repeat(`
282
- `,H?1+I:I)):J?(J=!1,p.result+=e.repeat(`
283
- `,I+1)):I===0?H&&(p.result+=" "):p.result+=e.repeat(`
284
- `,I):p.result+=e.repeat(`
285
- `,H?1+I:I),H=!0,et=!0,I=0;const tt=p.position;for(;!k(Z)&&Z!==0;)Z=p.input.charCodeAt(++p.position);Lt(p,tt,p.position,!1)}return!0}u(jt,"readBlockScalar");function we(p,M){const U=p.tag,V=p.anchor,H=[];let et=!1;if(p.firstTabInLine!==-1)return!1;p.anchor!==null&&P(p,p.anchor,H);let T=p.input.charCodeAt(p.position);for(;T!==0&&(p.firstTabInLine!==-1&&(p.position=p.firstTabInLine,v(p,"tab characters must not be used in indentation")),T===45);){const I=p.input.charCodeAt(p.position+1);if(!_(I))break;if(et=!0,p.position++,vt(p,!0,-1)&&p.lineIndent<=M){H.push(null),T=p.input.charCodeAt(p.position);continue}const J=p.line;if(xe(p,M,n,!1,!0),H.push(p.result),vt(p,!0,-1),T=p.input.charCodeAt(p.position),(p.line===J||p.lineIndent>M)&&T!==0)v(p,"bad indentation of a sequence entry");else if(p.lineIndent<M)break}return et?(p.tag=U,p.anchor=V,p.kind="sequence",p.result=H,!0):!1}u(we,"readBlockSequence");function le(p,M,U){let V,H,et,T;const I=p.tag,J=p.anchor,X={},Z=Object.create(null);let tt=null,K=null,ht=null,lt=!1,yt=!1;if(p.firstTabInLine!==-1)return!1;p.anchor!==null&&P(p,p.anchor,X);let bt=p.input.charCodeAt(p.position);for(;bt!==0;){!lt&&p.firstTabInLine!==-1&&(p.position=p.firstTabInLine,v(p,"tab characters must not be used in indentation"));const $t=p.input.charCodeAt(p.position+1),Ut=p.line;if((bt===63||bt===58)&&_($t))bt===63?(lt&&(Tt(p,X,Z,tt,K,null,H,et,T),tt=K=ht=null),yt=!0,lt=!0,V=!0):lt?(lt=!1,V=!0):v(p,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),p.position+=1,bt=$t;else{if(H=p.line,et=p.lineStart,T=p.position,!xe(p,U,a,!1,!0))break;if(p.line===Ut){for(bt=p.input.charCodeAt(p.position);S(bt);)bt=p.input.charCodeAt(++p.position);if(bt===58)bt=p.input.charCodeAt(++p.position),_(bt)||v(p,"a whitespace character is expected after the key-value separator within a block mapping"),lt&&(Tt(p,X,Z,tt,K,null,H,et,T),tt=K=ht=null),yt=!0,lt=!1,V=!1,tt=p.tag,K=p.result;else if(yt)v(p,"can not read an implicit mapping pair; a colon is missed");else return p.tag=I,p.anchor=J,!0}else if(yt)v(p,"can not read a block mapping entry; a multiline key may not be an implicit key");else return p.tag=I,p.anchor=J,!0}if((p.line===Ut||p.lineIndent>M)&&(lt&&(H=p.line,et=p.lineStart,T=p.position),xe(p,M,l,!0,V)&&(lt?K=p.result:ht=p.result),lt||(Tt(p,X,Z,tt,K,ht,H,et,T),tt=K=ht=null),vt(p,!0,-1),bt=p.input.charCodeAt(p.position)),(p.line===Ut||p.lineIndent>M)&&bt!==0)v(p,"bad indentation of a mapping entry");else if(p.lineIndent<M)break}return lt&&Tt(p,X,Z,tt,K,null,H,et,T),yt&&(p.tag=I,p.anchor=J,p.kind="mapping",p.result=X),yt}u(le,"readBlockMapping");function Ne(p){let M=!1,U=!1,V,H,et=p.input.charCodeAt(p.position);if(et!==33)return!1;p.tag!==null&&v(p,"duplication of a tag property"),et=p.input.charCodeAt(++p.position),et===60?(M=!0,et=p.input.charCodeAt(++p.position)):et===33?(U=!0,V="!!",et=p.input.charCodeAt(++p.position)):V="!";let T=p.position;if(M){do et=p.input.charCodeAt(++p.position);while(et!==0&&et!==62);p.position<p.length?(H=p.input.slice(T,p.position),et=p.input.charCodeAt(++p.position)):v(p,"unexpected end of the stream within a verbatim tag")}else{for(;et!==0&&!_(et);)et===33&&(U?v(p,"tag suffix cannot contain exclamation marks"):(V=p.input.slice(T-1,p.position+1),y.test(V)||v(p,"named tag handle cannot contain such characters"),U=!0,T=p.position+1)),et=p.input.charCodeAt(++p.position);H=p.input.slice(T,p.position),m.test(H)&&v(p,"tag suffix cannot contain flow indicator characters")}H&&!C.test(H)&&v(p,"tag name cannot contain such characters: "+H);try{H=decodeURIComponent(H)}catch{v(p,"tag name is malformed: "+H)}return M?p.tag=H:s.call(p.tagMap,V)?p.tag=p.tagMap[V]+H:V==="!"?p.tag="!"+H:V==="!!"?p.tag="tag:yaml.org,2002:"+H:v(p,'undeclared tag handle "'+V+'"'),!0}u(Ne,"readTagProperty");function hr(p){let M=p.input.charCodeAt(p.position);if(M!==38)return!1;p.anchor!==null&&v(p,"duplication of an anchor property"),M=p.input.charCodeAt(++p.position);const U=p.position;for(;M!==0&&!_(M)&&!B(M);)M=p.input.charCodeAt(++p.position);return p.position===U&&v(p,"name of an anchor node must contain at least one character"),p.anchor=p.input.slice(U,p.position),!0}u(hr,"readAnchorProperty");function Ce(p){let M=p.input.charCodeAt(p.position);if(M!==42)return!1;M=p.input.charCodeAt(++p.position);const U=p.position;for(;M!==0&&!_(M)&&!B(M);)M=p.input.charCodeAt(++p.position);p.position===U&&v(p,"name of an alias node must contain at least one character");const V=p.input.slice(U,p.position);return s.call(p.anchorMap,V)||v(p,'unidentified alias "'+V+'"'),p.result=p.anchorMap[V],vt(p,!0,-1),!0}u(Ce,"readAlias");function Tr(p,M,U,V){const H=wt(p);return it(p),St(p,M),p.tag=null,p.anchor=null,p.kind=null,p.result=null,le(p,U,V)&&p.kind==="mapping"?(Q(p),!0):(mt(p),St(p,H),!1)}u(Tr,"tryReadBlockMappingFromProperty");function xe(p,M,U,V,H){let et,T,I=1,J=!1,X=!1,Z=null,tt,K,ht;p.depth>=p.maxDepth&&v(p,"nesting exceeded maxDepth ("+p.maxDepth+")"),p.depth+=1,p.listener!==null&&p.listener("open",p),p.tag=null,p.anchor=null,p.kind=null,p.result=null;const lt=et=T=l===U||n===U;if(V&&vt(p,!0,-1)&&(J=!0,p.lineIndent>M?I=1:p.lineIndent===M?I=0:p.lineIndent<M&&(I=-1)),I===1)for(;;){const yt=p.input.charCodeAt(p.position),bt=wt(p);if(J&&(yt===33&&p.tag!==null||yt===38&&p.anchor!==null)||!Ne(p)&&!hr(p))break;Z===null&&(Z=bt),vt(p,!0,-1)?(J=!0,T=lt,p.lineIndent>M?I=1:p.lineIndent===M?I=0:p.lineIndent<M&&(I=-1)):T=!1}if(T&&(T=J||H),I===1||l===U)if(o===U||a===U?K=M:K=M+1,ht=p.position-p.lineStart,I===1)if(T&&(we(p,ht)||le(p,ht,K))||lr(p,K))X=!0;else{const yt=p.input.charCodeAt(p.position);Z!==null&&lt&&!T&&yt!==124&&yt!==62&&Tr(p,Z,Z.position-Z.lineStart,K)||et&&jt(p,K)||Se(p,K)||Pt(p,K)?X=!0:Ce(p)?(X=!0,(p.tag!==null||p.anchor!==null)&&v(p,"alias node should not have any properties")):ne(p,K,o===U)&&(X=!0,p.tag===null&&(p.tag="?")),p.anchor!==null&&P(p,p.anchor,p.result)}else I===0&&(X=T&&we(p,ht));if(p.tag===null)p.anchor!==null&&P(p,p.anchor,p.result);else if(p.tag==="?"){p.result!==null&&p.kind!=="scalar"&&v(p,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+p.kind+'"');for(let yt=0,bt=p.implicitTypes.length;yt<bt;yt+=1)if(tt=p.implicitTypes[yt],tt.resolve(p.result)){p.result=tt.construct(p.result),p.tag=tt.tag,p.anchor!==null&&P(p,p.anchor,p.result);break}}else if(p.tag!=="!"){if(s.call(p.typeMap[p.kind||"fallback"],p.tag))tt=p.typeMap[p.kind||"fallback"][p.tag];else{tt=null;const yt=p.typeMap.multi[p.kind||"fallback"];for(let bt=0,$t=yt.length;bt<$t;bt+=1)if(p.tag.slice(0,yt[bt].tag.length)===yt[bt].tag){tt=yt[bt];break}}tt||v(p,"unknown tag !<"+p.tag+">"),p.result!==null&&tt.kind!==p.kind&&v(p,"unacceptable node kind for !<"+p.tag+'> tag; it should be "'+tt.kind+'", not "'+p.kind+'"'),tt.resolve(p.result,p.tag)?(p.result=tt.construct(p.result,p.tag),p.anchor!==null&&P(p,p.anchor,p.result)):v(p,"cannot resolve a node with !<"+p.tag+"> explicit tag")}return p.listener!==null&&p.listener("close",p),p.depth-=1,p.tag!==null||p.anchor!==null||X}u(xe,"composeNode");function Sr(p){const M=p.position;let U=!1,V;for(p.version=null,p.checkLineBreaks=p.legacy,p.tagMap=Object.create(null),p.anchorMap=Object.create(null);(V=p.input.charCodeAt(p.position))!==0&&(vt(p,!0,-1),V=p.input.charCodeAt(p.position),!(p.lineIndent>0||V!==37));){U=!0,V=p.input.charCodeAt(++p.position);let H=p.position;for(;V!==0&&!_(V);)V=p.input.charCodeAt(++p.position);const et=p.input.slice(H,p.position),T=[];for(et.length<1&&v(p,"directive name must not be less than one character in length");V!==0;){for(;S(V);)V=p.input.charCodeAt(++p.position);if(V===35){do V=p.input.charCodeAt(++p.position);while(V!==0&&!k(V));break}if(k(V))break;for(H=p.position;V!==0&&!_(V);)V=p.input.charCodeAt(++p.position);T.push(p.input.slice(H,p.position))}V!==0&&Mt(p),s.call(ft,et)?ft[et](p,et,T):N(p,'unknown document directive "'+et+'"')}if(vt(p,!0,-1),p.lineIndent===0&&p.input.charCodeAt(p.position)===45&&p.input.charCodeAt(p.position+1)===45&&p.input.charCodeAt(p.position+2)===45?(p.position+=3,vt(p,!0,-1)):U&&v(p,"directives end mark is expected"),xe(p,p.lineIndent-1,l,!1,!0),vt(p,!0,-1),p.checkLineBreaks&&g.test(p.input.slice(M,p.position))&&N(p,"non-ASCII line breaks are interpreted as content"),p.documents.push(p.result),p.position===p.lineStart&&Nt(p)){p.input.charCodeAt(p.position)===46&&(p.position+=3,vt(p,!0,-1));return}p.position<p.length-1&&v(p,"end of the stream or a document separator is expected")}u(Sr,"readDocument");function cr(p,M){p=String(p),M=M||{},p.length!==0&&(p.charCodeAt(p.length-1)!==10&&p.charCodeAt(p.length-1)!==13&&(p+=`
286
- `),p.charCodeAt(0)===65279&&(p=p.slice(1)));const U=new O(p,M),V=p.indexOf("\0");for(V!==-1&&(U.position=V,v(U,"null byte is not allowed in input")),U.input+="\0";U.input.charCodeAt(U.position)===32;)U.lineIndent+=1,U.position+=1;for(;U.position<U.length-1;)Sr(U);return U.documents}u(cr,"loadDocuments");function be(p,M,U){M!==null&&typeof M=="object"&&typeof U>"u"&&(U=M,M=null);const V=cr(p,U);if(typeof M!="function")return V;for(let H=0,et=V.length;H<et;H+=1)M(V[H])}u(be,"loadAll2");function Fe(p,M){const U=cr(p,M);if(U.length!==0){if(U.length===1)return U[0];throw new t("expected a single document in the stream, but found more")}}return u(Fe,"load2"),Ds.loadAll=be,Ds.load=Fe,Ds}u(Hg,"requireLoader");var Pa={},Td;function jg(){if(Td)return Pa;Td=1;const e=Li(),t=Fi(),r=$o(),i=Object.prototype.toString,s=Object.prototype.hasOwnProperty,o=65279,a=9,n=10,l=13,c=32,h=33,d=34,f=35,g=37,m=38,y=39,C=42,x=44,k=45,S=58,_=61,B=62,L=63,E=64,F=91,G=93,j=96,q=123,st=124,Y=125,O={};O[0]="\\0",O[7]="\\a",O[8]="\\b",O[9]="\\t",O[10]="\\n",O[11]="\\v",O[12]="\\f",O[13]="\\r",O[27]="\\e",O[34]='\\"',O[92]="\\\\",O[133]="\\N",O[160]="\\_",O[8232]="\\L",O[8233]="\\P";const D=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],v=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function N(T,I){if(I===null)return{};const J={},X=Object.keys(I);for(let Z=0,tt=X.length;Z<tt;Z+=1){let K=X[Z],ht=String(I[K]);K.slice(0,2)==="!!"&&(K="tag:yaml.org,2002:"+K.slice(2));const lt=T.compiledTypeMap.fallback[K];lt&&s.call(lt.styleAliases,ht)&&(ht=lt.styleAliases[ht]),J[K]=ht}return J}u(N,"compileStyleMap");function P(T){let I,J;const X=T.toString(16).toUpperCase();if(T<=255)I="x",J=2;else if(T<=65535)I="u",J=4;else if(T<=4294967295)I="U",J=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+I+e.repeat("0",J-X.length)+X}u(P,"encodeHex");const it=1,Q=2;function mt(T){this.schema=T.schema||r,this.indent=Math.max(1,T.indent||2),this.noArrayIndent=T.noArrayIndent||!1,this.skipInvalid=T.skipInvalid||!1,this.flowLevel=e.isNothing(T.flowLevel)?-1:T.flowLevel,this.styleMap=N(this.schema,T.styles||null),this.sortKeys=T.sortKeys||!1,this.lineWidth=T.lineWidth||80,this.noRefs=T.noRefs||!1,this.noCompatMode=T.noCompatMode||!1,this.condenseFlow=T.condenseFlow||!1,this.quotingType=T.quotingType==='"'?Q:it,this.forceQuotes=T.forceQuotes||!1,this.replacer=typeof T.replacer=="function"?T.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}u(mt,"State");function wt(T,I){const J=e.repeat(" ",I);let X=0,Z="";const tt=T.length;for(;X<tt;){let K;const ht=T.indexOf(`
287
- `,X);ht===-1?(K=T.slice(X),X=tt):(K=T.slice(X,ht+1),X=ht+1),K.length&&K!==`
288
- `&&(Z+=J),Z+=K}return Z}u(wt,"indentString");function St(T,I){return`
289
- `+e.repeat(" ",T.indent*I)}u(St,"generateNextLine");function ft(T,I){for(let J=0,X=T.implicitTypes.length;J<X;J+=1)if(T.implicitTypes[J].resolve(I))return!0;return!1}u(ft,"testImplicitResolving");function Lt(T){return T===c||T===a}u(Lt,"isWhitespace");function gt(T){return T>=32&&T<=126||T>=161&&T<=55295&&T!==8232&&T!==8233||T>=57344&&T<=65533&&T!==o||T>=65536&&T<=1114111}u(gt,"isPrintable");function Tt(T){return gt(T)&&T!==o&&T!==l&&T!==n}u(Tt,"isNsCharOrWhitespace");function Mt(T,I,J){const X=Tt(T),Z=X&&!Lt(T);return(J?X:X&&T!==x&&T!==F&&T!==G&&T!==q&&T!==Y)&&T!==f&&!(I===S&&!Z)||Tt(I)&&!Lt(I)&&T===f||I===S&&Z}u(Mt,"isPlainSafe");function vt(T){return gt(T)&&T!==o&&!Lt(T)&&T!==k&&T!==L&&T!==S&&T!==x&&T!==F&&T!==G&&T!==q&&T!==Y&&T!==f&&T!==m&&T!==C&&T!==h&&T!==st&&T!==_&&T!==B&&T!==y&&T!==d&&T!==g&&T!==E&&T!==j}u(vt,"isPlainSafeFirst");function Nt(T){return!Lt(T)&&T!==S}u(Nt,"isPlainSafeLast");function Wt(T,I){const J=T.charCodeAt(I);let X;return J>=55296&&J<=56319&&I+1<T.length&&(X=T.charCodeAt(I+1),X>=56320&&X<=57343)?(J-55296)*1024+X-56320+65536:J}u(Wt,"codePointAt");function ne(T){return/^\n* /.test(T)}u(ne,"needIndentIndicator");const Se=1,Pt=2,lr=3,jt=4,we=5;function le(T,I,J,X,Z,tt,K,ht){let lt,yt=0,bt=null,$t=!1,Ut=!1;const Ai=X!==-1;let Ge=-1,Xe=vt(Wt(T,0))&&Nt(Wt(T,T.length-1));if(I||K)for(lt=0;lt<T.length;yt>=65536?lt+=2:lt++){if(yt=Wt(T,lt),!gt(yt))return we;Xe=Xe&&Mt(yt,bt,ht),bt=yt}else{for(lt=0;lt<T.length;yt>=65536?lt+=2:lt++){if(yt=Wt(T,lt),yt===n)$t=!0,Ai&&(Ut=Ut||lt-Ge-1>X&&T[Ge+1]!==" ",Ge=lt);else if(!gt(yt))return we;Xe=Xe&&Mt(yt,bt,ht),bt=yt}Ut=Ut||Ai&&lt-Ge-1>X&&T[Ge+1]!==" "}return!$t&&!Ut?Xe&&!K&&!Z(T)?Se:tt===Q?we:Pt:J>9&&ne(T)?we:K?tt===Q?we:Pt:Ut?jt:lr}u(le,"chooseScalarStyle");function Ne(T,I,J,X,Z){T.dump=(function(){if(I.length===0)return T.quotingType===Q?'""':"''";if(!T.noCompatMode&&(D.indexOf(I)!==-1||v.test(I)))return T.quotingType===Q?'"'+I+'"':"'"+I+"'";const tt=T.indent*Math.max(1,J),K=T.lineWidth===-1?-1:Math.max(Math.min(T.lineWidth,40),T.lineWidth-tt),ht=X||T.flowLevel>-1&&J>=T.flowLevel;function lt(yt){return ft(T,yt)}switch(u(lt,"testAmbiguity"),le(I,ht,T.indent,K,lt,T.quotingType,T.forceQuotes&&!X,Z)){case Se:return I;case Pt:return"'"+I.replace(/'/g,"''")+"'";case lr:return"|"+hr(I,T.indent)+Ce(wt(I,tt));case jt:return">"+hr(I,T.indent)+Ce(wt(Tr(I,K),tt));case we:return'"'+Sr(I)+'"';default:throw new t("impossible error: invalid scalar style")}})()}u(Ne,"writeScalar");function hr(T,I){const J=ne(T)?String(I):"",X=T[T.length-1]===`
290
- `,tt=X&&(T[T.length-2]===`
291
- `||T===`
292
- `)?"+":X?"":"-";return J+tt+`
293
- `}u(hr,"blockHeader");function Ce(T){return T[T.length-1]===`
294
- `?T.slice(0,-1):T}u(Ce,"dropEndingNewline");function Tr(T,I){const J=/(\n+)([^\n]*)/g;let X=(function(){let ht=T.indexOf(`
295
- `);return ht=ht!==-1?ht:T.length,J.lastIndex=ht,xe(T.slice(0,ht),I)})(),Z=T[0]===`
296
- `||T[0]===" ",tt,K;for(;K=J.exec(T);){const ht=K[1],lt=K[2];tt=lt[0]===" ",X+=ht+(!Z&&!tt&&lt!==""?`
297
- `:"")+xe(lt,I),Z=tt}return X}u(Tr,"foldString");function xe(T,I){if(T===""||T[0]===" ")return T;const J=/ [^ ]/g;let X,Z=0,tt,K=0,ht=0,lt="";for(;X=J.exec(T);)ht=X.index,ht-Z>I&&(tt=K>Z?K:ht,lt+=`
298
- `+T.slice(Z,tt),Z=tt+1),K=ht;return lt+=`
299
- `,T.length-Z>I&&K>Z?lt+=T.slice(Z,K)+`
300
- `+T.slice(K+1):lt+=T.slice(Z),lt.slice(1)}u(xe,"foldLine");function Sr(T){let I="",J=0;for(let X=0;X<T.length;J>=65536?X+=2:X++){J=Wt(T,X);const Z=O[J];!Z&&gt(J)?(I+=T[X],J>=65536&&(I+=T[X+1])):I+=Z||P(J)}return I}u(Sr,"escapeString");function cr(T,I,J){let X="";const Z=T.tag;for(let tt=0,K=J.length;tt<K;tt+=1){let ht=J[tt];T.replacer&&(ht=T.replacer.call(J,String(tt),ht)),(U(T,I,ht,!1,!1)||typeof ht>"u"&&U(T,I,null,!1,!1))&&(X!==""&&(X+=","+(T.condenseFlow?"":" ")),X+=T.dump)}T.tag=Z,T.dump="["+X+"]"}u(cr,"writeFlowSequence");function be(T,I,J,X){let Z="";const tt=T.tag;for(let K=0,ht=J.length;K<ht;K+=1){let lt=J[K];T.replacer&&(lt=T.replacer.call(J,String(K),lt)),(U(T,I+1,lt,!0,!0,!1,!0)||typeof lt>"u"&&U(T,I+1,null,!0,!0,!1,!0))&&((!X||Z!=="")&&(Z+=St(T,I)),T.dump&&n===T.dump.charCodeAt(0)?Z+="-":Z+="- ",Z+=T.dump)}T.tag=tt,T.dump=Z||"[]"}u(be,"writeBlockSequence");function Fe(T,I,J){let X="";const Z=T.tag,tt=Object.keys(J);for(let K=0,ht=tt.length;K<ht;K+=1){let lt="";X!==""&&(lt+=", "),T.condenseFlow&&(lt+='"');const yt=tt[K];let bt=J[yt];T.replacer&&(bt=T.replacer.call(J,yt,bt)),U(T,I,yt,!1,!1)&&(T.dump.length>1024&&(lt+="? "),lt+=T.dump+(T.condenseFlow?'"':"")+":"+(T.condenseFlow?"":" "),U(T,I,bt,!1,!1)&&(lt+=T.dump,X+=lt))}T.tag=Z,T.dump="{"+X+"}"}u(Fe,"writeFlowMapping");function p(T,I,J,X){let Z="";const tt=T.tag,K=Object.keys(J);if(T.sortKeys===!0)K.sort();else if(typeof T.sortKeys=="function")K.sort(T.sortKeys);else if(T.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let ht=0,lt=K.length;ht<lt;ht+=1){let yt="";(!X||Z!=="")&&(yt+=St(T,I));const bt=K[ht];let $t=J[bt];if(T.replacer&&($t=T.replacer.call(J,bt,$t)),!U(T,I+1,bt,!0,!0,!0))continue;const Ut=T.tag!==null&&T.tag!=="?"||T.dump&&T.dump.length>1024;Ut&&(T.dump&&n===T.dump.charCodeAt(0)?yt+="?":yt+="? "),yt+=T.dump,Ut&&(yt+=St(T,I)),U(T,I+1,$t,!0,Ut)&&(T.dump&&n===T.dump.charCodeAt(0)?yt+=":":yt+=": ",yt+=T.dump,Z+=yt)}T.tag=tt,T.dump=Z||"{}"}u(p,"writeBlockMapping");function M(T,I,J){const X=J?T.explicitTypes:T.implicitTypes;for(let Z=0,tt=X.length;Z<tt;Z+=1){const K=X[Z];if((K.instanceOf||K.predicate)&&(!K.instanceOf||typeof I=="object"&&I instanceof K.instanceOf)&&(!K.predicate||K.predicate(I))){if(J?K.multi&&K.representName?T.tag=K.representName(I):T.tag=K.tag:T.tag="?",K.represent){const ht=T.styleMap[K.tag]||K.defaultStyle;let lt;if(i.call(K.represent)==="[object Function]")lt=K.represent(I,ht);else if(s.call(K.represent,ht))lt=K.represent[ht](I,ht);else throw new t("!<"+K.tag+'> tag resolver accepts not "'+ht+'" style');T.dump=lt}return!0}}return!1}u(M,"detectType");function U(T,I,J,X,Z,tt,K){T.tag=null,T.dump=J,M(T,J,!1)||M(T,J,!0);const ht=i.call(T.dump),lt=X;X&&(X=T.flowLevel<0||T.flowLevel>I);const yt=ht==="[object Object]"||ht==="[object Array]";let bt,$t;if(yt&&(bt=T.duplicates.indexOf(J),$t=bt!==-1),(T.tag!==null&&T.tag!=="?"||$t||T.indent!==2&&I>0)&&(Z=!1),$t&&T.usedDuplicates[bt])T.dump="*ref_"+bt;else{if(yt&&$t&&!T.usedDuplicates[bt]&&(T.usedDuplicates[bt]=!0),ht==="[object Object]")X&&Object.keys(T.dump).length!==0?(p(T,I,T.dump,Z),$t&&(T.dump="&ref_"+bt+T.dump)):(Fe(T,I,T.dump),$t&&(T.dump="&ref_"+bt+" "+T.dump));else if(ht==="[object Array]")X&&T.dump.length!==0?(T.noArrayIndent&&!K&&I>0?be(T,I-1,T.dump,Z):be(T,I,T.dump,Z),$t&&(T.dump="&ref_"+bt+T.dump)):(cr(T,I,T.dump),$t&&(T.dump="&ref_"+bt+" "+T.dump));else if(ht==="[object String]")T.tag!=="?"&&Ne(T,T.dump,I,tt,lt);else{if(ht==="[object Undefined]")return!1;if(T.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+ht)}if(T.tag!==null&&T.tag!=="?"){let Ut=encodeURI(T.tag[0]==="!"?T.tag.slice(1):T.tag).replace(/!/g,"%21");T.tag[0]==="!"?Ut="!"+Ut:Ut.slice(0,18)==="tag:yaml.org,2002:"?Ut="!!"+Ut.slice(18):Ut="!<"+Ut+">",T.dump=Ut+" "+T.dump}}return!0}u(U,"writeNode");function V(T,I){const J=[],X=[];H(T,J,X);const Z=X.length;for(let tt=0;tt<Z;tt+=1)I.duplicates.push(J[X[tt]]);I.usedDuplicates=new Array(Z)}u(V,"getDuplicateReferences");function H(T,I,J){if(T!==null&&typeof T=="object"){const X=I.indexOf(T);if(X!==-1)J.indexOf(X)===-1&&J.push(X);else if(I.push(T),Array.isArray(T))for(let Z=0,tt=T.length;Z<tt;Z+=1)H(T[Z],I,J);else{const Z=Object.keys(T);for(let tt=0,K=Z.length;tt<K;tt+=1)H(T[Z[tt]],I,J)}}}u(H,"inspectNode");function et(T,I){I=I||{};const J=new mt(I);J.noRefs||V(T,J);let X=T;return J.replacer&&(X=J.replacer.call({"":X},"",X)),U(J,0,X,!0,!0)?J.dump+`
301
- `:""}return u(et,"dump2"),Pa.dump=et,Pa}u(jg,"requireDumper");var Sd;function Yg(){if(Sd)return de;Sd=1;const e=Hg(),t=jg();function r(i,s){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}return u(r,"renamed"),de.Type=ye(),de.Schema=bl(),de.FAILSAFE_SCHEMA=wl(),de.JSON_SCHEMA=Fl(),de.CORE_SCHEMA=El(),de.DEFAULT_SCHEMA=$o(),de.load=e.load,de.loadAll=e.loadAll,de.dump=t.dump,de.YAMLException=Fi(),de.types={binary:$l(),float:Ll(),map:Sl(),null:_l(),pairs:Dl(),set:Pl(),timestamp:Al(),bool:Bl(),int:vl(),merge:Ml(),omap:Ol(),seq:Tl(),str:kl()},de.safeLoad=r("safeLoad","load"),de.safeLoadAll=r("safeLoadAll","loadAll"),de.safeDump=r("safeDump","dump"),de}u(Yg,"requireJsYaml");var ww=Yg(),_w=zg(ww),{Type:qL,Schema:NL,FAILSAFE_SCHEMA:zL,JSON_SCHEMA:Bw,CORE_SCHEMA:WL,DEFAULT_SCHEMA:HL,load:vw,loadAll:jL,dump:YL,YAMLException:UL,types:GL,safeLoad:XL,safeLoadAll:VL,safeDump:ZL}=_w,Lw={common:ps,getConfig:Vt,insertCluster:Xp,insertEdge:Kp,insertEdgeLabel:cl,insertMarkers:tg,insertNode:hl,interpolateToCurve:Nn,labelHelper:Ct,log:R,positionEdgeLabel:ek},cs={},Ug=u(e=>{for(const t of e)cs[t.name]=t},"registerLayoutLoaders"),Fw=u(()=>{Ug([{name:"dagre",loader:u(async()=>await At(()=>import("./dagre-GXQ25YYZ-zjZDwXOe.js"),__vite__mapDeps([4,5,6,7,1,2,3])),"loader")},{name:"swimlane",loader:u(async()=>await At(()=>import("./swimlanes-42K2YHIH-AuYjrPqh.js"),__vite__mapDeps([8,3,1,2])),"loader")},{name:"cose-bilkent",loader:u(async()=>await At(()=>import("./cose-bilkent-JH36ORCC-CrSHFmnp.js"),__vite__mapDeps([9,10,1,2,3])),"loader")}])},"registerDefaultLayoutLoaders");Fw();var KL=u(async(e,t)=>{if(!(e.layoutAlgorithm in cs))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const d=h.domId||h.id;h.domId=`${e.diagramId}-${d}`}const r=cs[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:o}=e.config,{useGradient:a,gradientStart:n,gradientStop:l}=o,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),a){const h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,Lw,{algorithm:r.algorithm})},"render"),QL=u((e="",{fallback:t="dagre"}={})=>{if(e in cs)return e;if(t in cs)return R.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"),Il="comm",Gg="rule",Xg="decl",Ew="@media",Aw="@import",Mw="@supports",$w="@namespace",yn="@keyframes",Vg="@layer",Ow="@scope",Dw=Math.abs,ss=String.fromCharCode;function Zg(e){return e.trim()}function Cn(e,t,r){return e.replace(t,r)}function xi(e,t){return e.charCodeAt(t)|0}function Si(e,t,r){return e.slice(t,r)}function Je(e){return e.length}function Kg(e){return e.length}function Ps(e,t){return t.push(e),e}var Oo=1,wi=1,Qg=0,Re=0,te=0,Ei="";function Rl(e,t,r,i,s,o,a,n){return{value:e,root:t,parent:r,type:i,props:s,children:o,line:Oo,column:wi,length:a,return:"",siblings:n}}function Pw(){return te}function Iw(){return te=Re>0?xi(Ei,--Re):0,wi--,te===10&&(wi=1,Oo--),te}function je(){return te=Re<Qg?xi(Ei,Re++):0,wi++,te===10&&(wi=1,Oo++),te}function Er(){return xi(Ei,Re)}function Ys(){return Re}function Do(e,t){return Si(Ei,e,t)}function ds(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 Rw(e){return Oo=wi=1,Qg=Je(Ei=e),Re=0,[]}function qw(e){return Ei="",e}function Ia(e){return Zg(Do(Re-1,xn(e===91?e+2:e===40?e+1:e)))}function Nw(e){for(;(te=Er())&&te<33;)je();return ds(e)>2||ds(te)>3?"":" "}function zw(e,t){for(;--t&&je()&&!(te<48||te>102||te>57&&te<65||te>70&&te<97););return Do(e,Ys()+(t<6&&Er()==32&&je()==32))}function xn(e){for(;je();)switch(te){case e:return Re;case 34:case 39:e!==34&&e!==39&&xn(te);break;case 40:e===41&&xn(e);break;case 92:je();break}return Re}function Ww(e,t){for(;je()&&e+te!==57;)if(e+te===84&&Er()===47)break;return"/*"+Do(t,Re-1)+"*"+ss(e===47?e:je())}function Hw(e){for(;!ds(Er());)je();return Do(e,Re)}function jw(e){return qw(Us("",null,null,null,[""],e=Rw(e),0,[0],e))}function Us(e,t,r,i,s,o,a,n,l){for(var c=0,h=0,d=a,f=0,g=0,m=0,y=1,C=1,x=1,k=0,S=0,_="",B=s,L=o,E=i,F=_;C;)switch(m=S,S=je()){case 40:m!=108&&xi(F,d-1)==58?(k++,F+="("):F+=Ia(S);break;case 41:k--,F+=")";break;case 34:case 39:case 91:F+=Ia(S);break;case 9:case 10:case 13:case 32:if(k>0){F+=ss(S);break}F+=Nw(m);break;case 92:F+=zw(Ys()-1,7);continue;case 47:switch(Er()){case 42:case 47:Ps(Yw(Ww(je(),Ys()),t,r,l),l),(ds(m||1)==5||ds(Er()||1)==5)&&Je(F)&&Si(F,-1,void 0)!==" "&&(F+=" ");break;default:F+="/"}break;case 123*y:n[c++]=Je(F)*x;case 125*y:case 59:case 0:if(k>0&&S){F+=ss(S);break}switch(S){case 0:case 125:C=0;case 59+h:x==-1&&(F=Cn(F,/\f/g,"")),g>0&&(Je(F)-d||y===0)&&Ps(g>32?_d(F+";",i,r,d-1,l):_d(Cn(F," ","")+";",i,r,d-2,l),l);break;case 59:F+=";";default:if(Ps(E=wd(F,t,r,c,h,s,n,_,B=[],L=[],d,o),o),S===123)if(h===0)Us(F,t,E,E,B,o,d,n,L);else{switch(f){case 99:if(xi(F,3)===110)break;case 108:if(xi(F,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Us(e,E,E,i&&Ps(wd(e,E,E,0,0,s,n,_,s,B=[],d,L),L),s,L,d,n,i?B:L):Us(F,E,E,E,[""],L,0,n,L)}}c=h=g=0,y=x=1,_=F="",d=a;break;case 58:d=1+Je(F),g=m;default:if(y<1){if(S==123)--y;else if(S==125&&y++==0&&Iw()==125)continue}switch(F+=ss(S),S*y){case 38:x=h>0?1:(F+="\f",-1);break;case 44:if(k>0)break;n[c++]=(Je(F)-1)*x,x=1;break;case 64:Er()===45&&(F+=Ia(je())),f=Er(),h=d=Je(_=F+=Hw(Ys())),S++;break;case 45:m===45&&Je(F)==2&&(y=0)}}return o}function wd(e,t,r,i,s,o,a,n,l,c,h,d){for(var f=s-1,g=s===0?o:[""],m=Kg(g),y=0,C=0,x=0;y<i;++y)for(var k=0,S=Si(e,f+1,f=Dw(C=a[y])),_=e;k<m;++k)(_=Zg(C>0?g[k]+" "+S:Cn(S,/&\f/g,g[k])))&&(l[x++]=_);return Rl(e,t,r,s===0?Gg:n,l,c,h,d)}function Yw(e,t,r,i){return Rl(e,t,r,Il,ss(Pw()),Si(e,2,-2),0,i)}function _d(e,t,r,i,s){return Rl(e,t,r,Xg,Si(e,0,i),Si(e,i+1,-1),i,s)}function bn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function Uw(e,t,r,i){switch(e.type){case Vg:if(e.children.length)break;case Aw:case $w:case Xg:return e.return=e.return||e.value;case Il:return"";case yn:return e.return=e.value+"{"+bn(e.children,i)+"}";case Gg:if(!Je(e.value=e.props.join(",")))return""}return Je(r=bn(e.children,i))?e.return=e.value+"{"+r+"}":""}function Gw(e){var t=Kg(e);return function(r,i,s,o){for(var a="",n=0;n<t;n++)a+=e[n](r,i,s,o)||"";return a}}var Jg="c4",Xw=u(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),Vw=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./c4Diagram-7LVT6UL2-CLkVbphC.js");return{diagram:t}},__vite__mapDeps([11,12,3,1,2]));return{id:Jg,diagram:e}},"loader"),Zw={id:Jg,detector:Xw,loader:Vw},Kw=Zw,tm="flowchart",Qw=u((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),Jw=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-Db0QtNj4.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,3,16,12,17]));return{id:tm,diagram:e}},"loader"),t_={id:tm,detector:Qw,loader:Jw},e_=t_,em="flowchart-v2",r_=u((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"),i_=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-Db0QtNj4.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,3,16,12,17]));return{id:em,diagram:e}},"loader"),s_={id:em,detector:r_,loader:i_},o_=s_,rm="swimlane",a_=u(e=>/^\s*swimlane-beta\b/.test(e),"detector"),n_=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./swimlanesDiagram-VR7AAH4N-0nIGA8_4.js");return{diagram:t}},__vite__mapDeps([18,13,14,15,3,16,12,17,1,2]));return{id:rm,diagram:e}},"loader"),l_={id:rm,detector:a_,loader:n_},h_=l_,im="er",c_=u(e=>/^\s*erDiagram/.test(e),"detector"),d_=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./erDiagram-RLTQ6QDP-BWuA-aqV.js");return{diagram:t}},__vite__mapDeps([19,15,3,16,17,1,2]));return{id:im,diagram:e}},"loader"),u_={id:im,detector:c_,loader:d_},f_=u_,sm="gitGraph",p_=u(e=>/^\s*gitGraph/.test(e),"detector"),g_=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./gitGraphDiagram-WWUBYQGX-B4eCBGoe.js");return{diagram:t}},__vite__mapDeps([20,21,22,23,1,2,3]));return{id:sm,diagram:e}},"loader"),m_={id:sm,detector:p_,loader:g_},y_=m_,om="gantt",C_=u(e=>/^\s*gantt/.test(e),"detector"),x_=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./ganttDiagram-EL5Y4UJY-CsITpniw.js");return{diagram:t}},__vite__mapDeps([24,1,2,3,25,26,27,28]));return{id:om,diagram:e}},"loader"),b_={id:om,detector:C_,loader:x_},k_=b_,am="info",T_=u(e=>/^\s*info/.test(e),"detector"),S_=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./infoDiagram-27XIBGKW-lTebN5Ix.js");return{diagram:t}},__vite__mapDeps([29,23,1,2,3]));return{id:am,diagram:e}},"loader"),w_={id:am,detector:T_,loader:S_},nm="pie",__=u(e=>/^\s*pie/.test(e),"detector"),B_=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./pieDiagram-E7YTZNPT-DqnkpCX4.js");return{diagram:t}},__vite__mapDeps([30,22,23,1,2,3,31,32,27]));return{id:nm,diagram:e}},"loader"),v_={id:nm,detector:__,loader:B_},lm="quadrantChart",L_=u(e=>/^\s*quadrantChart/.test(e),"detector"),F_=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./quadrantDiagram-AXDQQJYC-iQjJfars.js");return{diagram:t}},__vite__mapDeps([33,3,25,26,27,28,1,2]));return{id:lm,diagram:e}},"loader"),E_={id:lm,detector:L_,loader:F_},A_=E_,hm="xychart",M_=u(e=>/^\s*xychart(-beta)?/.test(e),"detector"),$_=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./xychartDiagram-S5SC5T6Z-DxLL2CHH.js");return{diagram:t}},__vite__mapDeps([34,3,27,32,25,26,28,1,2]));return{id:hm,diagram:e}},"loader"),O_={id:hm,detector:M_,loader:$_},D_=O_,cm="requirement",P_=u(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),I_=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./requirementDiagram-BXWQKSXE-Bv-Vh1dW.js");return{diagram:t}},__vite__mapDeps([35,15,3,16,1,2]));return{id:cm,diagram:e}},"loader"),R_={id:cm,detector:P_,loader:I_},q_=R_,dm="sequence",N_=u(e=>/^\s*sequenceDiagram/.test(e),"detector"),z_=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./sequenceDiagram-WJ2MYXX4-1RbvcHwO.js");return{diagram:t}},__vite__mapDeps([36,21,12,3,1,2]));return{id:dm,diagram:e}},"loader"),W_={id:dm,detector:N_,loader:z_},H_=W_,um="class",j_=u((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),Y_=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./classDiagram-ZZMXUADV-G5CebNaC.js");return{diagram:t}},__vite__mapDeps([37,38,14,15,3,16,12,1,2]));return{id:um,diagram:e}},"loader"),U_={id:um,detector:j_,loader:Y_},G_=U_,fm="classDiagram",X_=u((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),V_=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./classDiagram-v2-VYDZK3BY-G5CebNaC.js");return{diagram:t}},__vite__mapDeps([39,38,14,15,3,16,12,1,2]));return{id:fm,diagram:e}},"loader"),Z_={id:fm,detector:X_,loader:V_},K_=Z_,pm="state",Q_=u((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),J_=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./stateDiagram-D77RDMKH-DdLsfxgy.js");return{diagram:t}},__vite__mapDeps([40,41,15,3,16,12,5,6,7,1,2]));return{id:pm,diagram:e}},"loader"),tB={id:pm,detector:Q_,loader:J_},eB=tB,gm="stateDiagram",rB=u((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),iB=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./stateDiagram-v2-MP3YSRHH-DFwg8Qki.js");return{diagram:t}},__vite__mapDeps([42,41,15,3,16,12,1,2]));return{id:gm,diagram:e}},"loader"),sB={id:gm,detector:rB,loader:iB},oB=sB,mm="journey",aB=u(e=>/^\s*journey/.test(e),"detector"),nB=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./journeyDiagram-3NMN7TZE-Dpn3bBNo.js");return{diagram:t}},__vite__mapDeps([43,14,12,3,31,1,2]));return{id:mm,diagram:e}},"loader"),lB={id:mm,detector:aB,loader:nB},hB=lB,cB=u((e,t,r)=>{R.debug(`rendering svg for syntax error
302
- `);const i=E0(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),Qd(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),ym={draw:cB},dB=ym,uB={db:{},renderer:ym,parser:{parse:u(()=>{},"parse")}},fB=uB,Cm="flowchart-elk",pB=u((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),gB=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-Db0QtNj4.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,3,16,12,17]));return{id:Cm,diagram:e}},"loader"),mB={id:Cm,detector:pB,loader:gB},yB=mB,xm="timeline",CB=u(e=>/^\s*timeline/.test(e),"detector"),xB=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./timeline-definition-24CTP7MA-C4yuLwUH.js");return{diagram:t}},__vite__mapDeps([44,3,31,1,2]));return{id:xm,diagram:e}},"loader"),bB={id:xm,detector:CB,loader:xB},kB=bB,bm="mindmap",TB=u(e=>/^\s*mindmap/.test(e),"detector"),SB=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./mindmap-definition-YA3MSWOX-yQCKA-K4.js");return{diagram:t}},__vite__mapDeps([45,15,3,16,1,2]));return{id:bm,diagram:e}},"loader"),wB={id:bm,detector:TB,loader:SB},_B=wB,km="kanban",BB=u(e=>/^\s*kanban/.test(e),"detector"),vB=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./kanban-definition-UXKFOSKX-CJ99H4G6.js");return{diagram:t}},__vite__mapDeps([46,14,1,2,3]));return{id:km,diagram:e}},"loader"),LB={id:km,detector:BB,loader:vB},FB=LB,Tm="sankey",EB=u(e=>/^\s*sankey(-beta)?/.test(e),"detector"),AB=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./sankeyDiagram-P5KCCOFB-C__uD07f.js");return{diagram:t}},__vite__mapDeps([47,3,32,27,1,2]));return{id:Tm,diagram:e}},"loader"),MB={id:Tm,detector:EB,loader:AB},$B=MB,Sm="packet",OB=u(e=>/^\s*packet(-beta)?/.test(e),"detector"),DB=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./diagram-Z3DM3KII-CSrYcCbc.js");return{diagram:t}},__vite__mapDeps([48,22,23,1,2,3]));return{id:Sm,diagram:e}},"loader"),PB={id:Sm,detector:OB,loader:DB},wm="radar",IB=u(e=>/^\s*radar-beta/.test(e),"detector"),RB=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./diagram-UQ7AKVKN-DhFcurW6.js");return{diagram:t}},__vite__mapDeps([49,22,23,1,2,3]));return{id:wm,diagram:e}},"loader"),qB={id:wm,detector:IB,loader:RB},_m="block",NB=u(e=>/^\s*block(-beta)?/.test(e),"detector"),zB=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./blockDiagram-I7D4REHJ-CbYzOsL_.js");return{diagram:t}},__vite__mapDeps([50,14,3,17,1,2]));return{id:_m,diagram:e}},"loader"),WB={id:_m,detector:NB,loader:zB},HB=WB,Bm="treeView",jB=u(e=>/^\s*treeView-beta/.test(e),"detector"),YB=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./diagram-S7CK7UJ4-q-NHkUCx.js");return{diagram:t}},__vite__mapDeps([51,21,22,23,1,2,3]));return{id:Bm,diagram:e}},"loader"),UB={id:Bm,detector:jB,loader:YB},GB=UB,vm="architecture",XB=u(e=>/^\s*architecture/.test(e),"detector"),VB=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./architectureDiagram-5GKGNRK7-D80cJKz_.js");return{diagram:t}},__vite__mapDeps([52,22,23,1,2,10,3]));return{id:vm,diagram:e}},"loader"),ZB={id:vm,detector:XB,loader:VB},KB=ZB,Lm="eventmodeling",QB=u(e=>/^\s*eventmodeling/.test(e),"detector"),JB=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./diagram-VSXAHHWV-DZc1kHGx.js");return{diagram:t}},__vite__mapDeps([53,22,23,1,2,3]));return{id:Lm,diagram:e}},"loader"),tv={id:Lm,detector:QB,loader:JB},ev=tv,Fm="ishikawa",rv=u(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),iv=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./ishikawaDiagram-5VMMS53U-C4PzFnZ4.js");return{diagram:t}},__vite__mapDeps([54,1,2,3]));return{id:Fm,diagram:e}},"loader"),sv={id:Fm,detector:rv,loader:iv},Em="venn",ov=u(e=>/^\s*venn-beta/.test(e),"detector"),av=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./vennDiagram-4TSXK5OY-BCtqXZqe.js");return{diagram:t}},__vite__mapDeps([55,3,1,2]));return{id:Em,diagram:e}},"loader"),nv={id:Em,detector:ov,loader:av},lv=nv,Am="treemap",hv=u(e=>/^\s*treemap/.test(e),"detector"),cv=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./diagram-VX7I27RA-DE1nREE8.js");return{diagram:t}},__vite__mapDeps([56,22,16,23,1,2,3,28,32,27]));return{id:Am,diagram:e}},"loader"),dv={id:Am,detector:hv,loader:cv},Mm="wardley",uv=u(e=>/^\s*wardley-beta/i.test(e),"detector"),fv=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./wardleyDiagram-VM6X3IG4-D3OtZJoT.js");return{diagram:t}},__vite__mapDeps([57,22,23,1,2,3]));return{id:Mm,diagram:e}},"loader"),pv={id:Mm,detector:uv,loader:fv},gv=pv,$m="cynefin",mv=u(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),yv=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./cynefinDiagram-5FMLGOSQ-Bdl_eBdu.js");return{diagram:t}},__vite__mapDeps([58,22,23,1,2,3]));return{id:$m,diagram:e}},"loader"),Cv={id:$m,detector:mv,loader:yv},Om="railroad",xv=u(e=>/^\s*railroad-beta/i.test(e),"detector"),bv=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./railroadDiagram-O6MQD6OU-CfqToX3W.js");return{diagram:t}},__vite__mapDeps([59,60,22,3,23,1,2]));return{id:Om,diagram:e}},"loader"),kv={id:Om,detector:xv,loader:bv},Dm="railroadEbnf",Tv=u(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),Sv=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./ebnfDiagram-PWID7BFC-BfL8m_sf.js");return{diagram:t}},__vite__mapDeps([61,60,22,3,23,1,2]));return{id:Dm,diagram:e}},"loader"),wv={id:Dm,detector:Tv,loader:Sv},Pm="railroadAbnf",_v=u(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),Bv=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./abnfDiagram-VCTEODGH-j5YaKnl9.js");return{diagram:t}},__vite__mapDeps([62,60,22,3,23,1,2]));return{id:Pm,diagram:e}},"loader"),vv={id:Pm,detector:_v,loader:Bv},Im="railroadPeg",Lv=u(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),Fv=u(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./pegDiagram-XKGWAZYB-CMXqeAum.js");return{diagram:t}},__vite__mapDeps([63,60,22,3,23,1,2]));return{id:Im,diagram:e}},"loader"),Ev={id:Im,detector:Lv,loader:Fv},Bd=!1,Po=u(()=>{Bd||(Bd=!0,Ks("error",fB,e=>e.toLowerCase().trim()==="error"),Ks("---",{db:{clear:u(()=>{},"clear")},styles:{},renderer:{draw:u(()=>{},"draw")},parser:{parse:u(()=>{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:u(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Wa(yB,_B,KB),Wa(Kw,FB,K_,G_,f_,k_,w_,v_,q_,H_,h_,o_,e_,kB,y_,oB,eB,hB,A_,$B,PB,D_,HB,ev,GB,qB,sv,dv,kv,wv,vv,Ev,lv,gv,Cv))},"addDiagrams"),Av=u(async()=>{R.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Ur).map(async([r,{detector:i,loader:s}])=>{if(s)try{Ua(r)}catch{try{const{diagram:o,id:a}=await s();Ks(a,o,i)}catch(o){throw R.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Ur[r],o}}}))).filter(r=>r.status==="rejected");if(t.length>0){R.error(`Failed to load ${t.length} external diagrams`);for(const r of t)R.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Mv="graphics-document document";function Rm(e,t){e.attr("role",Mv),t!==""&&e.attr("aria-roledescription",t)}u(Rm,"setA11yDiagramInfo");function qm(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}u(qm,"addSVGa11yTitleDescription");var kn=class Nm{constructor(t,r,i,s,o){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=o}static{u(this,"Diagram")}static async fromText(t,r={}){const i=Vt(),s=_n(t,i);t=Qx(t)+`
303
- `;try{Ua(s)}catch{const c=RC(s);if(!c)throw new Ud(`Diagram ${s} not found.`);const{id:h,diagram:d}=await c();Ks(h,d)}const{db:o,parser:a,renderer:n,init:l}=Ua(s);return a.parser&&(a.parser.yy=o),o.clear?.(),l?.(i),r.title&&o.setDiagramTitle?.(r.title),await a.parse(t),new Nm(s,t,o,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},vd=[],$v=u(()=>{vd.forEach(e=>{e()}),vd=[]},"attachFunctions"),Ov=u(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function zm(e){const t=e.match(Yd);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
304
- `).map(a=>a.startsWith(r)?a.slice(r.length):a).join(`
305
- `):t[2];let s=vw(i,{schema:Bw})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const o={};return s.displayMode&&(o.displayMode=s.displayMode.toString()),s.title&&(o.title=s.title.toString()),s.config&&(o.config=s.config),{text:e.slice(t[0].length),metadata:o}}u(zm,"extractFrontMatter");var Dv=u(e=>e.replace(/\r\n?/g,`
306
- `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Pv=u(e=>{const{text:t,metadata:r}=zm(e),{displayMode:i,title:s,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:s,config:o,text:t}},"processFrontmatter"),Iv=u(e=>{const t=ge.detectInit(e)??{},r=ge.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:qx(e),directive:t}},"processDirectives");function ql(e){const t=Dv(e),r=Pv(t),i=Iv(r.text),s=Yn(r.config,i.directive);return e=Ov(i.text),{code:e,title:r.title,config:s}}u(ql,"preprocessDiagram");function Wm(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}u(Wm,"toBase64");var Rv=5e4,qv="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Nv="sandbox",zv="loose",Wv="http://www.w3.org/2000/svg",Hv="http://www.w3.org/1999/xlink",jv="http://www.w3.org/1999/xhtml",Yv="100%",Uv="100%",Gv="border:0;margin:0;",Xv="margin:0",Vv="allow-top-navigation-by-user-activation allow-popups",Zv='The "iframe" tag is not supported by your browser.',Kv=["foreignobject"],Qv=["dominant-baseline"];function Nl(e){const t=ql(e);return Vs(),OC(t.config??{}),t}u(Nl,"processAndSetConfigs");async function Hm(e,t){Po();try{const{code:r,config:i}=Nl(e);return{diagramType:(await Ym(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}u(Hm,"parse");var Ld=u((e,t,r=[])=>{const i=Nd(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),Jv=u((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=me(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Ih(l.styles)||n.forEach(c=>{r.insertRule(Ld(l.id,c,l.styles),r.cssRules.length)}),Ih(l.textStyles)||r.insertRule(Ld(l.id,"tspan",(l?.textStyles||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=Ya(s)+`
307
- `}else i+=`${e.themeCSS}
308
- `;return i+Ya(r)},"createCssStyles"),tL=u((e,t)=>bn(jw(`${e}{${t}}`),Gw([u(function(i,s,o,a){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===yn)return;i.props=i.props.map(n=>n===e&&Array.isArray(i.children)&&i.children.every(c=>c.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(c.props))||(n.startsWith(`${e} `)||n.startsWith(`${e}>`))&&!n.startsWith(`${e} ||`)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[Ew,Mw,Vg,Ow,"@container","@starting-style"],yn].includes(i.type)||(R.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=Il))},"addNamespace"),Uw])),"compileCSS"),eL=u((e,t,r,i)=>{const s=Jv(e,r),o=r0(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return tL(i,o)},"createUserStyles"),rL=u((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=$r(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),iL=u((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":Uv,i=Wm(`<body style="${Xv}">${e}</body>`);return`<iframe style="width:${Yv};height:${r};${Gv}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${Vv}">
309
- ${Zv}
310
- </iframe>`},"putIntoIFrame"),Fd=u((e,t,r,i,s)=>{const o=e.append("div");o.attr("id",r),i&&o.attr("style",i);const a=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns",Wv);return s&&a.attr("xmlns:xlink",s),a.append("g"),e},"appendDivSvgG");function Tn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}u(Tn,"sandboxedIframe");var sL=u((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),oL=u(async function(e,t,r){Po();const i=Nl(t);t=i.code;const s=Vt();R.debug(s),t.length>(s?.maxTextSize??Rv)&&(t=qv);const o=`#${e}`,a="i"+e,n="#"+a,l="d"+e,c="#"+l,h=u(()=>{const O=Et(f?n:c).node();O&&"remove"in O&&O.remove()},"removeTempElements");let d=Et(document.body);const f=s.securityLevel===Nv,g=s.securityLevel===zv,m=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const Y=Tn(Et(r),a);d=Et(Y.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=Et(r);Fd(d,e,l,`font-family: ${m}`,Hv)}else{if(sL(document,e,l,a),f){const Y=Tn(Et(document.body),a);d=Et(Y.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=Et("body");Fd(d,e,l)}let y,C;try{y=await kn.fromText(t,{title:i.title})}catch(Y){if(s.suppressErrorRendering)throw h(),Y;y=await kn.fromText("error"),C=Y}const x=d.select(c).node(),k=y.type,S=x.firstChild,_=S.firstChild,B=y.renderer.getClasses?.(t,y),L=eL(s,k,B,o),E=document.createElement("style");E.innerHTML=L,S.insertBefore(E,_);try{await y.renderer.draw(t,e,"11.17.2",y)}catch(Y){throw s.suppressErrorRendering?h():dB.draw(t,e,"11.17.2"),Y}const F=d.select(`${c} svg`),G=y.db.getAccTitle?.(),j=y.db.getAccDescription?.();Um(k,F,G,j);const st=u(()=>{d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",jv);let Y=d.select(c).node().innerHTML;if(R.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),Y=rL(Y,f,ar(s.arrowMarkerAbsolute)),f){const O=d.select(c+" svg").node();Y=iL(Y,O)}else g||(Y=bi.sanitize(Y,{ADD_TAGS:Kv,ADD_ATTR:Qv,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return $v(),Y},"serializeSvg")();if(C)throw C;return h(),{diagramType:k,svg:st,bindFunctions:y.db.bindFunctions}},"render");function jm(e={}){const t=oe({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),MC(t),t?.theme&&t.theme in gr?t.themeVariables=gr[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=gr.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?AC(t):zd();wn(r.logLevel),Po()}u(jm,"initialize");var Ym=u((e,t={})=>{const{code:r}=ql(e);return kn.fromText(r,t)},"getDiagramFromText");function Um(e,t,r,i){Rm(t,e),qm(t,r,i,t.attr("id"))}u(Um,"addA11yInfo");var Kr=Object.freeze({render:oL,parse:Hm,getDiagramFromText:Ym,initialize:jm,getConfig:Vt,setConfig:Wd,getSiteConfig:zd,updateSiteConfig:$C,reset:u(()=>{Vs()},"reset"),globalReset:u(()=>{Vs(ki)},"globalReset"),defaultConfig:ki});wn(Vt().logLevel);Vs(Vt());var aL=u((e,t,r)=>{R.warn(e),jn(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=u(async function(e={querySelector:".mermaid"}){try{await nL(e)}catch(t){if(jn(t)&&R.error(t.str),Cr.parseError&&Cr.parseError(t),!e.suppressErrors)throw R.error("Use the suppressErrors option to suppress these errors"),t}},"run"),nL=u(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Kr.getConfig();R.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");R.debug(`Found ${s.length} diagrams`),i?.startOnLoad!==void 0&&(R.debug("Start On Load: "+i?.startOnLoad),Kr.updateSiteConfig({startOnLoad:i?.startOnLoad}));const o=new ge.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const n=[];for(const l of Array.from(s)){if(R.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${o.next()}`;a=l.innerHTML,a=Ju(ge.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=ge.detectInit(a);h&&R.debug("Detected early reinit: ",h);try{const{svg:d,bindFunctions:f}=await Km(c,a,l);l.innerHTML=d,e&&await e(c),f&&f(l)}catch(d){aL(d,n,Cr.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),Xm=u(function(e){Kr.initialize(e)},"initialize"),lL=u(async function(e,t,r){R.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"),hL=u(async(e,{lazyLoad:t=!0}={})=>{Po(),Wa(...e),t===!1&&await Av()},"registerExternalDiagrams"),Vm=u(function(){if(Cr.startOnLoad){const{startOnLoad:e}=Kr.getConfig();e&&Cr.run().catch(t=>R.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Vm,!1);var cL=u(function(e){Cr.parseError=e},"setParseErrorHandler"),po=[],Ra=!1,Zm=u(async()=>{if(!Ra){for(Ra=!0;po.length>0;){const e=po.shift();if(e)try{await e()}catch(t){R.error("Error executing queue",t)}}Ra=!1}},"executeQueue"),dL=u(async(e,t)=>new Promise((r,i)=>{const s=u(()=>new Promise((o,a)=>{Kr.parse(e,t).then(n=>{o(n),r(n)},n=>{R.error("Error parsing",n),Cr.parseError?.(n),a(n),i(n)})}),"performCall");po.push(s),Zm().catch(i)}),"parse"),Km=u((e,t,r)=>new Promise((i,s)=>{const o=u(()=>new Promise((a,n)=>{Kr.render(e,t,r).then(l=>{a(l),i(l)},l=>{R.error("Error parsing",l),Cr.parseError?.(l),n(l),s(l)})}),"performCall");po.push(o),Zm().catch(s)}),"render"),uL=u(()=>Object.keys(Ur).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Cr={startOnLoad:!0,mermaidAPI:Kr,parse:dL,render:Km,init:lL,run:Gm,registerExternalDiagrams:hL,registerLayoutLoaders:Ug,initialize:Xm,parseError:void 0,contentLoaded:Vm,setParseErrorHandler:cL,detectType:_n,registerIconPacks:ex,getRegisteredDiagramsMetadata:uL},JL=Cr;/*! Check if previously processed *//*!
311
- * Wait for document loaded before starting the execution
312
- */export{os as $,qd as A,jx as B,fs as C,ox as D,rr as E,E0 as F,y0 as G,An as H,TL as I,_L as J,ni as K,wh as L,Sh as M,vL as N,BL as O,wL as P,bL as Q,kL as R,SL as S,FL as T,Ft as U,LL as V,dC as W,CL as X,vw as Y,Bw as Z,u as _,o0 as a,tg as a$,yL as a0,Co as a1,Dx as a2,YC as a3,Kd as a4,bi as a5,bh as a6,Mo as a7,k0 as a8,Va as a9,pe as aA,Ub as aB,Rn as aC,Pn as aD,Ns as aE,xx as aF,Cx as aG,yx as aH,mx as aI,lx as aJ,Lu as aK,dx as aL,nx as aM,px as aN,Fu as aO,cx as aP,Tx as aQ,kx as aR,bx as aS,wx as aT,Sx as aU,hx as aV,Eu as aW,gx as aX,fx as aY,ux as aZ,Au as a_,Hx as aa,Ye as ab,z as ac,W as ad,JC as ae,Jd as af,Xp as ag,hl as ah,xc as ai,gs as aj,ex as ak,Hn as al,dt as am,RL as an,IL as ao,Sw as ap,It as aq,kg as ar,ut as as,PL as at,fo as au,Sg as av,wo as aw,cl as ax,Kp as ay,ek as az,s0 as b,q1 as b$,Ru as b0,Md as b1,C0 as b2,mL as b3,Ue as b4,tx as b5,xL as b6,JL as b7,pt as b8,Su as b9,JS as bA,Cy as bB,dl as bC,YT as bD,c2 as bE,x2 as bF,bg as bG,tr as bH,u2 as bI,xl as bJ,ig as bK,iw as bL,tw as bM,jS as bN,Bo as bO,ug as bP,Ao as bQ,fg as bR,YS as bS,WT as bT,Rr as bU,Zi as bV,pi as bW,Os as bX,fa as bY,dw as bZ,Cl as b_,ul as ba,Lc as bb,ag as bc,vo as bd,og as be,b2 as bf,ng as bg,oT as bh,aT as bi,Vr as bj,vi as bk,xr as bl,Hc as bm,ir as bn,pr as bo,eT as bp,$c as bq,uo as br,mr as bs,d2 as bt,Le as bu,Ic as bv,pl as bw,rw as bx,Lo as by,co as bz,Ot as c,Qd as d,oe as e,yr as f,n0 as g,Yp as h,Ie as i,ps as j,Nu as k,R as l,l0 as m,h0 as n,i0 as o,EL as p,py as q,Ar as r,a0 as s,QL as t,KL as u,ge as v,Gx as w,Vt as x,d0 as y,Yn as z};