@sme.up/ketchup2 2.7.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (344) hide show
  1. package/dist/abnfDiagram-VCTEODGH-C9blQ78p.cjs +1 -0
  2. package/dist/abnfDiagram-VCTEODGH-DZIaCwNE.js +89 -0
  3. package/dist/{arc-CVbkjF8U.js → arc-7ZXqzxve.js} +1 -1
  4. package/dist/{arc-w3BipdfE.cjs → arc-DBilzVYt.cjs} +1 -1
  5. package/dist/architecture-7GRP2DOG-DYFsLst2.js +3 -0
  6. package/dist/architecture-7GRP2DOG-DdhuGtEz.cjs +1 -0
  7. package/dist/architectureDiagram-5GKGNRK7-B080D0D_.cjs +36 -0
  8. package/dist/{architectureDiagram-3BPJPVTR-B6VZAtZU.js → architectureDiagram-5GKGNRK7-BJvIxhbL.js} +338 -251
  9. package/dist/assets/svg/functions.svg +1 -0
  10. package/dist/basic-components/button-list/button-list-types.d.ts +2 -1
  11. package/dist/basic-components/button-list/button-list-types.d.ts.map +1 -1
  12. package/dist/basic-components/button-list/button-list.d.ts.map +1 -1
  13. package/dist/basic-components/cell/cell-types.d.ts +5 -0
  14. package/dist/basic-components/cell/cell-types.d.ts.map +1 -1
  15. package/dist/basic-components/cell/cell.d.ts.map +1 -1
  16. package/dist/basic-components/checkbox/checkbox-types.d.ts +5 -0
  17. package/dist/basic-components/checkbox/checkbox-types.d.ts.map +1 -1
  18. package/dist/basic-components/chips/chips-types.d.ts +15 -1
  19. package/dist/basic-components/chips/chips-types.d.ts.map +1 -1
  20. package/dist/basic-components/chips/chips.d.ts.map +1 -1
  21. package/dist/basic-components/chips-input/chips-input-types.d.ts +5 -0
  22. package/dist/basic-components/chips-input/chips-input-types.d.ts.map +1 -1
  23. package/dist/basic-components/chips-input/chips-input.d.ts.map +1 -1
  24. package/dist/basic-components/multiple-autocomplete/multiple-autocomplete-types.d.ts +5 -0
  25. package/dist/basic-components/multiple-autocomplete/multiple-autocomplete-types.d.ts.map +1 -1
  26. package/dist/basic-components/multiple-autocomplete/multiple-autocomplete.d.ts.map +1 -1
  27. package/dist/basic-components/multiple-select/multiple-select-types.d.ts +5 -0
  28. package/dist/basic-components/multiple-select/multiple-select-types.d.ts.map +1 -1
  29. package/dist/basic-components/multiple-select/multiple-select.d.ts.map +1 -1
  30. package/dist/blockDiagram-I7D4REHJ-C5aW9ypR.js +1919 -0
  31. package/dist/blockDiagram-I7D4REHJ-fT7Of27R.cjs +129 -0
  32. package/dist/c4Diagram-7LVT6UL2-B1n5PnN5.cjs +38 -0
  33. package/dist/{c4Diagram-AAUBKEIU-CdT8VCbo.js → c4Diagram-7LVT6UL2-JxFfT5VH.js} +808 -789
  34. package/dist/channel-BvUly9jN.cjs +1 -0
  35. package/dist/{channel-C-LAmObA.js → channel-D6agWknC.js} +1 -1
  36. package/dist/chunk-2E4U76K2-BiZwNOhf.cjs +1 -0
  37. package/dist/chunk-2E4U76K2-C8vehurw.js +346 -0
  38. package/dist/chunk-2Q5K7J3B-B8v9mTdK.cjs +1 -0
  39. package/dist/{chunk-QZHKN3VN-lYfzaOt9.js → chunk-2Q5K7J3B-kzxEEeTu.js} +2 -2
  40. package/dist/chunk-4HAMMTFA-Db_fcZEn.cjs +62 -0
  41. package/dist/{chunk-3OPIFGDE-Bs2mXISw.js → chunk-4HAMMTFA-MZIwowe1.js} +1665 -1143
  42. package/dist/{chunk-FMBD7UC4-BURT0llY.js → chunk-5VM5RSS4-Cr17nBXp.js} +2 -2
  43. package/dist/{chunk-FMBD7UC4-BIKI8zae.cjs → chunk-5VM5RSS4-CwDmQ9T_.cjs} +1 -1
  44. package/dist/{chunk-5ZQYHXKU-B_nOC8-n.js → chunk-75Z2AOVW-BwUD389x.js} +56 -55
  45. package/dist/chunk-75Z2AOVW-RbCLc-XL.cjs +2 -0
  46. package/dist/chunk-CLGD4ZFX-DKRy6g5T.js +10 -0
  47. package/dist/chunk-CLGD4ZFX-Dvn-kRD7.cjs +1 -0
  48. package/dist/{chunk-CSCIHK7Q-BEk3YcEH.js → chunk-DU6HZSFF-CNSdkWoH.js} +997 -764
  49. package/dist/chunk-DU6HZSFF-mznJTFyO.cjs +127 -0
  50. package/dist/chunk-F27PBJKO-C5NrgqMI.cjs +1 -0
  51. package/dist/{chunk-ND2GUHAM-Ca12h-m9.js → chunk-F27PBJKO-DKsmevT5.js} +18 -17
  52. package/dist/chunk-FOHPRMQF-BYsnEQU5.cjs +161 -0
  53. package/dist/{chunk-NNHCCRGN-BB1q5NkR.js → chunk-FOHPRMQF-C49KxWOg.js} +5156 -4419
  54. package/dist/chunk-GMAD6QVW-BVSRANO9.cjs +72 -0
  55. package/dist/{chunk-O5CBEL6O-DbWeP4Au.js → chunk-GMAD6QVW-DKxKOKLF.js} +459 -503
  56. package/dist/chunk-GVQU2GXP-BiuaO1L5.cjs +1 -0
  57. package/dist/chunk-GVQU2GXP-w4KY-she.js +37 -0
  58. package/dist/chunk-IMKFNOWR-CusIwu2H.cjs +231 -0
  59. package/dist/{chunk-AQP2D5EJ-vJ_pitKp.js → chunk-IMKFNOWR-DHxMOe_C.js} +313 -291
  60. package/dist/{chunk-4BX2VUAB-zglw1T4d.js → chunk-JWPE2WC7-Ccb0QaC8.js} +2 -2
  61. package/dist/chunk-JWPE2WC7-Cs1kjq8S.cjs +1 -0
  62. package/dist/chunk-L3NEJ4N5-B8UQMgqc.cjs +1 -0
  63. package/dist/chunk-L3NEJ4N5-CvNbHpcd.js +245 -0
  64. package/dist/chunk-LNGE3PJU-CiGrDO_F.js +1513 -0
  65. package/dist/chunk-LNGE3PJU-TgsSSByc.cjs +34 -0
  66. package/dist/{chunk-KSCS5N6A-BemQomLE.js → chunk-OSK3NFVY-BmtDbEvT.js} +304 -195
  67. package/dist/chunk-OSK3NFVY-DE9_ERt9.cjs +10 -0
  68. package/dist/chunk-P2QGCYS3-DRvvOWJ2.js +67 -0
  69. package/dist/chunk-P2QGCYS3-DqT85Q-S.cjs +1 -0
  70. package/dist/chunk-POPQ4Y6H-CaEkosGL.js +26 -0
  71. package/dist/chunk-POPQ4Y6H-QqO5seyb.cjs +1 -0
  72. package/dist/chunk-PWAF6VOD-CbmhQpgH.js +277 -0
  73. package/dist/chunk-PWAF6VOD-CjrO-QHU.cjs +1 -0
  74. package/dist/{flowDiagram-I6XJVG4X-DnsxKD0w.js → chunk-SHT3W25Y-DJgD-hyF.js} +566 -522
  75. package/dist/chunk-SHT3W25Y-DuMn9iH6.cjs +168 -0
  76. package/dist/chunk-SVP7TREG-BNwvtyzm.js +490 -0
  77. package/dist/chunk-SVP7TREG-CiwWyOxx.cjs +88 -0
  78. package/dist/{chunk-727SXJPM-Dj8nsm0O.cjs → chunk-TICWLB2K-1u0p_luB.cjs} +7 -7
  79. package/dist/{chunk-727SXJPM-CDeV7mmg.js → chunk-TICWLB2K-DqSHwYf9.js} +183 -177
  80. package/dist/chunk-TLUHSLCS-ZDzqyqeY.cjs +1 -0
  81. package/dist/{chunk-LZXEDZCA-J9irjuVP.js → chunk-TLUHSLCS-opHh7fd-.js} +35 -25
  82. package/dist/chunk-XXDRQBXY-BF71LTT1.cjs +1 -0
  83. package/dist/chunk-XXDRQBXY-BZK6GgVm.js +9 -0
  84. package/dist/chunk-Y2CYZVJY-CnmLqFtv.cjs +1 -0
  85. package/dist/chunk-Y2CYZVJY-i11wjrBe.js +12 -0
  86. package/dist/classDiagram-ZZMXUADV-BTRkvFx4.js +30 -0
  87. package/dist/classDiagram-ZZMXUADV-CwAl_N60.cjs +1 -0
  88. package/dist/classDiagram-v2-VYDZK3BY-CFutvfy-.js +30 -0
  89. package/dist/classDiagram-v2-VYDZK3BY-CwAl_N60.cjs +1 -0
  90. package/dist/components/activity-timeline/activity-timeline-types.d.ts +46 -0
  91. package/dist/components/activity-timeline/activity-timeline-types.d.ts.map +1 -0
  92. package/dist/components/activity-timeline/activity-timeline.d.ts +4 -0
  93. package/dist/components/activity-timeline/activity-timeline.d.ts.map +1 -0
  94. package/dist/components/data-table/assets/data-table-row-actions-collapsed.d.ts +12 -0
  95. package/dist/components/data-table/assets/data-table-row-actions-collapsed.d.ts.map +1 -0
  96. package/dist/components/data-table/assets/data-table-row-actions.d.ts +11 -0
  97. package/dist/components/data-table/assets/data-table-row-actions.d.ts.map +1 -0
  98. package/dist/components/data-table/data-table-types.d.ts +52 -1
  99. package/dist/components/data-table/data-table-types.d.ts.map +1 -1
  100. package/dist/components/data-table/data-table.d.ts.map +1 -1
  101. package/dist/components/data-table/header/Header.d.ts.map +1 -1
  102. package/dist/components/data-table/header/header-types.d.ts +7 -1
  103. package/dist/components/data-table/header/header-types.d.ts.map +1 -1
  104. package/dist/components/tab-bar/tab-bar-assets.d.ts +1 -0
  105. package/dist/components/tab-bar/tab-bar-assets.d.ts.map +1 -1
  106. package/dist/components/tab-bar/tab-bar.d.ts.map +1 -1
  107. package/dist/components/workflow-designer/workflow-designer-metadata-panel.d.ts +14 -0
  108. package/dist/components/workflow-designer/workflow-designer-metadata-panel.d.ts.map +1 -0
  109. package/dist/components/workflow-designer/workflow-designer-types.d.ts +40 -7
  110. package/dist/components/workflow-designer/workflow-designer-types.d.ts.map +1 -1
  111. package/dist/components/workflow-designer/workflow-designer-utils.d.ts +80 -1
  112. package/dist/components/workflow-designer/workflow-designer-utils.d.ts.map +1 -1
  113. package/dist/components/workflow-designer/workflow-designer-utils.test.d.ts +2 -0
  114. package/dist/components/workflow-designer/workflow-designer-utils.test.d.ts.map +1 -0
  115. package/dist/components/workflow-designer/workflow-designer.d.ts +4 -3
  116. package/dist/components/workflow-designer/workflow-designer.d.ts.map +1 -1
  117. package/dist/{cose-bilkent-S5V4N54A-BhA3VnPW.js → cose-bilkent-JH36ORCC-CE0T5PqO.js} +25 -24
  118. package/dist/cose-bilkent-JH36ORCC-D6t9R42P.cjs +1 -0
  119. package/dist/cynefin-OW5HDTMX-CsZ3W32G.cjs +1 -0
  120. package/dist/cynefin-OW5HDTMX-DlKRHClQ.js +3 -0
  121. package/dist/cynefinDiagram-5FMLGOSQ-D5vkxB9p.js +349 -0
  122. package/dist/cynefinDiagram-5FMLGOSQ-D95Uad6U.cjs +62 -0
  123. package/dist/{cytoscape.esm-BU21wl3m.js → cytoscape.esm-BQqfb1oS.js} +2260 -2206
  124. package/dist/cytoscape.esm-TdwWzXkE.cjs +321 -0
  125. package/dist/dagre-GXQ25YYZ-CFXgAmuL.js +423 -0
  126. package/dist/dagre-GXQ25YYZ-NS5a_ezX.cjs +4 -0
  127. package/dist/{dagre-B2BBwKNb.cjs → dagre-nX1Mh32P.cjs} +1 -1
  128. package/dist/{dagre-3-RnF0EK.js → dagre-qXSFUdzO.js} +131 -131
  129. package/dist/diagram-S7CK7UJ4-CTj-4VAh.cjs +30 -0
  130. package/dist/diagram-S7CK7UJ4-DrGNegqs.js +301 -0
  131. package/dist/{diagram-2AECGRRQ-23vM90dy.js → diagram-UQ7AKVKN-LU56O9S9.js} +82 -81
  132. package/dist/diagram-UQ7AKVKN-eskbTWOc.cjs +41 -0
  133. package/dist/{diagram-KO2AKTUF-BEnEQF6b.js → diagram-VSXAHHWV-CaQnupEx.js} +66 -65
  134. package/dist/diagram-VSXAHHWV-DzHhzg5V.cjs +3 -0
  135. package/dist/diagram-VX7I27RA-D7Ibz__z.cjs +24 -0
  136. package/dist/{diagram-OG6HWLK6-Cfbv6mIH.js → diagram-VX7I27RA-DH-s9daK.js} +105 -104
  137. package/dist/diagram-Z3DM3KII-BpFP72Tr.cjs +24 -0
  138. package/dist/{diagram-LMA3HP47-OWxAHrmz.js → diagram-Z3DM3KII-DWhRX2l9.js} +21 -20
  139. package/dist/{dist-Btd8EZyy.js → dist-C7OpkiTz.js} +2 -3
  140. package/dist/dist-DrOEvFlx.cjs +1 -0
  141. package/dist/ebnfDiagram-PWID7BFC-CtT2erlt.js +100 -0
  142. package/dist/ebnfDiagram-PWID7BFC-DXCy8fra.cjs +1 -0
  143. package/dist/erDiagram-RLTQ6QDP-B-cUtqmN.cjs +99 -0
  144. package/dist/erDiagram-RLTQ6QDP-CxxAoCSs.js +1966 -0
  145. package/dist/eventmodeling-NTZA5JFV-5J5w1INt.js +3 -0
  146. package/dist/eventmodeling-NTZA5JFV-DcUTtbEf.cjs +1 -0
  147. package/dist/flowDiagram-HODETNUW-B6sXxv0S.cjs +1 -0
  148. package/dist/flowDiagram-HODETNUW-BUvMJJnE.js +17 -0
  149. package/dist/functional-components/multiple-field/multiple-field-types.d.ts +2 -0
  150. package/dist/functional-components/multiple-field/multiple-field-types.d.ts.map +1 -1
  151. package/dist/functional-components/multiple-field/multiple-field.d.ts.map +1 -1
  152. package/dist/functional-components/row/row-types.d.ts +5 -0
  153. package/dist/functional-components/row/row-types.d.ts.map +1 -1
  154. package/dist/functional-components/row/row.d.ts.map +1 -1
  155. package/dist/functional-components/timeline-engine/components/gantt/gantt-assets.d.ts +3 -1
  156. package/dist/functional-components/timeline-engine/components/gantt/gantt-assets.d.ts.map +1 -1
  157. package/dist/functional-components/timeline-engine/timeline-engine-utils.d.ts.map +1 -1
  158. package/dist/functional-components/tree-picker/tree-picker-types.d.ts +42 -0
  159. package/dist/functional-components/tree-picker/tree-picker-types.d.ts.map +1 -0
  160. package/dist/functional-components/tree-picker/tree-picker.d.ts +3 -0
  161. package/dist/functional-components/tree-picker/tree-picker.d.ts.map +1 -0
  162. package/dist/ganttDiagram-EL5Y4UJY-Bee0Pd-N.cjs +292 -0
  163. package/dist/{ganttDiagram-6RSMTGT7-CwbJqdwB.js → ganttDiagram-EL5Y4UJY-C04RZW4s.js} +675 -671
  164. package/dist/gitGraph-4MIJSDKK-BCt5iiZ5.js +3 -0
  165. package/dist/gitGraph-4MIJSDKK-BeFVwcRC.cjs +1 -0
  166. package/dist/{gitGraphDiagram-PVQCEYII-mL2WiT98.js → gitGraphDiagram-WWUBYQGX-BTcuEGsY.js} +146 -145
  167. package/dist/gitGraphDiagram-WWUBYQGX-DA026nbS.cjs +106 -0
  168. package/dist/index.d.ts +4 -1
  169. package/dist/index.d.ts.map +1 -1
  170. package/dist/info-A6RAGUB7-C0KA0jej.cjs +1 -0
  171. package/dist/info-A6RAGUB7-DYBvudiC.js +3 -0
  172. package/dist/infoDiagram-27XIBGKW-B5nTXQEj.cjs +2 -0
  173. package/dist/infoDiagram-27XIBGKW-BoUOV42E.js +20 -0
  174. package/dist/{ishikawaDiagram-YF4QCWOH-DGOgWzve.js → ishikawaDiagram-5VMMS53U-D15Hi9wp.js} +134 -133
  175. package/dist/{ishikawaDiagram-YF4QCWOH-DAWMXD1l.cjs → ishikawaDiagram-5VMMS53U-ptk0d5z2.cjs} +6 -6
  176. package/dist/{journeyDiagram-JHISSGLW-CHVTMdrq.js → journeyDiagram-3NMN7TZE-BUb4frTN.js} +181 -180
  177. package/dist/{journeyDiagram-JHISSGLW-DfnmJPLn.cjs → journeyDiagram-3NMN7TZE-CxVpPKa-.cjs} +8 -8
  178. package/dist/kanban-definition-UXKFOSKX-Cd_nphr7.cjs +89 -0
  179. package/dist/{kanban-definition-UN3LZRKU-upKA3b5x.js → kanban-definition-UXKFOSKX-DkgBC20j.js} +141 -138
  180. package/dist/katex-DUe6VLjC.cjs +257 -0
  181. package/dist/{katex-D-2KeLwt.js → katex-Dyoqg6Cv.js} +1562 -1600
  182. package/dist/ketchup2.cjs.js +156 -154
  183. package/dist/ketchup2.css +1 -1
  184. package/dist/ketchup2.es.js +31759 -29656
  185. package/dist/{line-DIhSUgmA.js → line-BEo8vh4N.js} +1 -1
  186. package/dist/{line-CzwncDY3.cjs → line-wiGgVVGi.cjs} +1 -1
  187. package/dist/{linear-DUAteVwl.js → linear-BNesvT28.js} +1 -1
  188. package/dist/{linear-1lpO_WlJ.cjs → linear-YA14Lx5Z.cjs} +1 -1
  189. package/dist/locale/en/translation.json.d.ts +16 -0
  190. package/dist/locale/it/translation.json.d.ts +16 -0
  191. package/dist/mermaid-parser.core-CqChDTj1.cjs +6 -0
  192. package/dist/mermaid-parser.core-oFB-qEU8.js +638 -0
  193. package/dist/{mindmap-definition-RKZ34NQL-C8cZ7xN-.cjs → mindmap-definition-YA3MSWOX-0PG4raFG.cjs} +11 -11
  194. package/dist/{mindmap-definition-RKZ34NQL-C3YkCJDi.js → mindmap-definition-YA3MSWOX-Cjs12XgD.js} +156 -154
  195. package/dist/packet-AYTQ26CC-BEwXWBE0.js +3 -0
  196. package/dist/packet-AYTQ26CC-DfXUrk97.cjs +1 -0
  197. package/dist/pegDiagram-XKGWAZYB-BuyVzOiH.js +94 -0
  198. package/dist/pegDiagram-XKGWAZYB-J7VwZsJf.cjs +1 -0
  199. package/dist/pie-WAS4IAKB-4NfHFfJd.cjs +1 -0
  200. package/dist/pie-WAS4IAKB-BOR5Wwai.js +3 -0
  201. package/dist/pieDiagram-E7YTZNPT-B-rPB0ZO.cjs +39 -0
  202. package/dist/pieDiagram-E7YTZNPT-D4bB4TDP.js +205 -0
  203. package/dist/{quadrantDiagram-W4KKPZXB-C2oA-eGZ.js → quadrantDiagram-AXDQQJYC-B6Q9biU9.js} +293 -293
  204. package/dist/quadrantDiagram-AXDQQJYC-C5sdY1DW.cjs +7 -0
  205. package/dist/radar-RG4KPBEZ-BwLQFFzF.js +3 -0
  206. package/dist/radar-RG4KPBEZ-_epvvHKu.cjs +1 -0
  207. package/dist/railroad-74A4TZTK-CaWzRQE0.js +3 -0
  208. package/dist/railroad-74A4TZTK-D2qbdjOh.cjs +1 -0
  209. package/dist/railroad-abnf-HS5TGJTU-D2tm1mra.js +3 -0
  210. package/dist/railroad-abnf-HS5TGJTU-_ThxftPt.cjs +1 -0
  211. package/dist/railroad-ebnf-LZEXJU2U-CKpMMgXK.cjs +1 -0
  212. package/dist/railroad-ebnf-LZEXJU2U-KAuGgmQe.js +3 -0
  213. package/dist/railroad-peg-WCYAUIDC-B8bfIIor.cjs +1 -0
  214. package/dist/railroad-peg-WCYAUIDC-XB38GivH.js +3 -0
  215. package/dist/railroadDiagram-O6MQD6OU-C7LfgSGm.cjs +1 -0
  216. package/dist/railroadDiagram-O6MQD6OU-DFR4_PxB.js +76 -0
  217. package/dist/{requirementDiagram-4Y6WPE33-BEGryahw.js → requirementDiagram-BXWQKSXE-BfWCCTu8.js} +169 -166
  218. package/dist/requirementDiagram-BXWQKSXE-y2O3wvFe.cjs +84 -0
  219. package/dist/{sankeyDiagram-5OEKKPKP-VPzKV4zM.js → sankeyDiagram-P5KCCOFB-B_3NESVW.js} +109 -108
  220. package/dist/sankeyDiagram-P5KCCOFB-z8VLw23o.cjs +40 -0
  221. package/dist/sequenceDiagram-WJ2MYXX4-3cWo24Xv.cjs +162 -0
  222. package/dist/{sequenceDiagram-3UESZ5HK-Bc30_Cm2.js → sequenceDiagram-WJ2MYXX4-B8W9PUBb.js} +692 -688
  223. package/dist/sizeCapture-INFHLROL-CHXIsPO_.js +46 -0
  224. package/dist/sizeCapture-INFHLROL-bJ2ZX4Du.cjs +1 -0
  225. package/dist/src-B16ML7oM.cjs +1 -0
  226. package/dist/{src-DjDATEq3.js → src-D-6ZfKf9.js} +500 -507
  227. package/dist/stateDiagram-D77RDMKH-DghYG1f5.cjs +1 -0
  228. package/dist/stateDiagram-D77RDMKH-IwptGFzp.js +220 -0
  229. package/dist/stateDiagram-v2-MP3YSRHH-0rNAzd4v.cjs +1 -0
  230. package/dist/stateDiagram-v2-MP3YSRHH-NATCGJSV.js +30 -0
  231. package/dist/swimlanes-42K2YHIH-jhIjSCsq.js +4976 -0
  232. package/dist/swimlanes-42K2YHIH-svHo0tVy.cjs +1 -0
  233. package/dist/swimlanesDiagram-VR7AAH4N-DKxpX9Hj.js +31 -0
  234. package/dist/swimlanesDiagram-VR7AAH4N-DcDLe-u-.cjs +8 -0
  235. package/dist/{timeline-definition-PNZ67QCA-1z911Ume.js → timeline-definition-24CTP7MA-C6u6A92C.js} +212 -211
  236. package/dist/timeline-definition-24CTP7MA-CA62jwSB.cjs +120 -0
  237. package/dist/treeView-Q6P3EWNA-CkgGYPwy.js +3 -0
  238. package/dist/treeView-Q6P3EWNA-zIJfTe51.cjs +1 -0
  239. package/dist/treemap-WGGIJYW6-CooEnQQp.cjs +1 -0
  240. package/dist/treemap-WGGIJYW6-D4tTzsvR.js +3 -0
  241. package/dist/types/translation.d.ts +17 -1
  242. package/dist/types/translation.d.ts.map +1 -1
  243. package/dist/utils/data-structures.d.ts +2 -1
  244. package/dist/utils/data-structures.d.ts.map +1 -1
  245. package/dist/{vennDiagram-CIIHVFJN-BiLcQ0SR.js → vennDiagram-4TSXK5OY-Bt9cyeRX.js} +324 -302
  246. package/dist/vennDiagram-4TSXK5OY-YKU1Lb_h.cjs +34 -0
  247. package/dist/wardley-WFR3VGLG-Cp2KFpcw.cjs +1 -0
  248. package/dist/wardley-WFR3VGLG-D1o3hFSK.js +3 -0
  249. package/dist/wardleyDiagram-VM6X3IG4-BvyabMK8.cjs +78 -0
  250. package/dist/{wardleyDiagram-YWT4CUSO-Bq-BejOl.js → wardleyDiagram-VM6X3IG4-QkNx10Ny.js} +144 -143
  251. package/dist/{xychartDiagram-2RQKCTM6-B13zquXC.js → xychartDiagram-S5SC5T6Z-BSwoR01A.js} +729 -559
  252. package/dist/xychartDiagram-S5SC5T6Z-BtNTzcXw.cjs +7 -0
  253. package/package.json +5 -2
  254. package/dist/architecture-7EHR7CIX-Bzeobe9Y.cjs +0 -1
  255. package/dist/architecture-7EHR7CIX-C8NPmR2w.js +0 -3
  256. package/dist/architectureDiagram-3BPJPVTR-DlnXl9d5.cjs +0 -36
  257. package/dist/blockDiagram-GPEHLZMM-BohmRoCC.js +0 -3157
  258. package/dist/blockDiagram-GPEHLZMM-rfyR2Ffl.cjs +0 -132
  259. package/dist/c4Diagram-AAUBKEIU-Du1vqJYZ.cjs +0 -10
  260. package/dist/channel-DJpMBAs-.cjs +0 -1
  261. package/dist/chunk-2J33WTMH-BMqA-riF.js +0 -25
  262. package/dist/chunk-2J33WTMH-BQs9SXq8.cjs +0 -1
  263. package/dist/chunk-3OPIFGDE-Bk_ByTBh.cjs +0 -62
  264. package/dist/chunk-4BX2VUAB-C8VW0QW0.cjs +0 -1
  265. package/dist/chunk-55IACEB6-CNxnI3nm.cjs +0 -1
  266. package/dist/chunk-55IACEB6-CmKDx-YO.js +0 -8
  267. package/dist/chunk-5ZQYHXKU-DMrStm4M.cjs +0 -2
  268. package/dist/chunk-AQP2D5EJ-CYuEYK6i.cjs +0 -231
  269. package/dist/chunk-BSJP7CBP-CSCICPww.cjs +0 -1
  270. package/dist/chunk-BSJP7CBP-YsQACkyC.js +0 -82
  271. package/dist/chunk-CSCIHK7Q-BAdl6GW-.cjs +0 -124
  272. package/dist/chunk-KSCS5N6A-DsN7gJEf.cjs +0 -10
  273. package/dist/chunk-L5ZTLDWV-BQCNoMVG.js +0 -32
  274. package/dist/chunk-L5ZTLDWV-BbLRyKcx.cjs +0 -1
  275. package/dist/chunk-LZXEDZCA-rjLYyX5U.cjs +0 -1
  276. package/dist/chunk-ND2GUHAM-1o9Sjy2_.cjs +0 -1
  277. package/dist/chunk-NNHCCRGN-qV8bfiMQ.cjs +0 -159
  278. package/dist/chunk-NZK2D7GU-CPxdSJTy.js +0 -67
  279. package/dist/chunk-NZK2D7GU-CRneGIrP.cjs +0 -1
  280. package/dist/chunk-O5CBEL6O-Cd4Z5Dy9.cjs +0 -70
  281. package/dist/chunk-QZHKN3VN-ZJ4hLUIw.cjs +0 -1
  282. package/dist/chunk-WU5MYG2G-DuCEb9G-.js +0 -9
  283. package/dist/chunk-WU5MYG2G-ExiaHFbF.cjs +0 -1
  284. package/dist/chunk-XPW4576I-BybfDrup.cjs +0 -32
  285. package/dist/chunk-XPW4576I-D3DQ47oC.js +0 -1146
  286. package/dist/classDiagram-4FO5ZUOK-CRX1QumH.js +0 -29
  287. package/dist/classDiagram-4FO5ZUOK-yTAlLFG2.cjs +0 -1
  288. package/dist/classDiagram-v2-Q7XG4LA2-oM01mYfB.js +0 -29
  289. package/dist/classDiagram-v2-Q7XG4LA2-yTAlLFG2.cjs +0 -1
  290. package/dist/cose-bilkent-S5V4N54A-D7fhWOP4.cjs +0 -1
  291. package/dist/cytoscape.esm-CElDUMAx.cjs +0 -321
  292. package/dist/dagre-BM42HDAG-DfpR5Mml.js +0 -297
  293. package/dist/dagre-BM42HDAG-kORxgFz_.cjs +0 -4
  294. package/dist/diagram-2AECGRRQ-B0IEGKjr.cjs +0 -43
  295. package/dist/diagram-5GNKFQAL-BEY9x4us.js +0 -101
  296. package/dist/diagram-5GNKFQAL-vb6e35PR.cjs +0 -10
  297. package/dist/diagram-KO2AKTUF-9V_zu-2x.cjs +0 -3
  298. package/dist/diagram-LMA3HP47-BN_geiB9.cjs +0 -24
  299. package/dist/diagram-OG6HWLK6-6OnEK9-6.cjs +0 -24
  300. package/dist/dist-D8RD2QWc.cjs +0 -1
  301. package/dist/erDiagram-TEJ5UH35-6OEXIM6m.js +0 -1700
  302. package/dist/erDiagram-TEJ5UH35-CzsOt0l4.cjs +0 -85
  303. package/dist/eventmodeling-FCH6USID-Cued7Lz2.cjs +0 -1
  304. package/dist/eventmodeling-FCH6USID-mCB8hc7X.js +0 -3
  305. package/dist/flowDiagram-I6XJVG4X-DR1CMtZZ.cjs +0 -162
  306. package/dist/ganttDiagram-6RSMTGT7-C5t5_mjf.cjs +0 -292
  307. package/dist/gitGraph-WXDBUCRP-B23gOjfP.js +0 -3
  308. package/dist/gitGraph-WXDBUCRP-Bi-Y5dA7.cjs +0 -1
  309. package/dist/gitGraphDiagram-PVQCEYII-CLdgm7yJ.cjs +0 -106
  310. package/dist/info-J43DQDTF-DC3N8SoX.js +0 -3
  311. package/dist/info-J43DQDTF-jRjlWVKj.cjs +0 -1
  312. package/dist/infoDiagram-5YYISTIA-BIM8xaiE.js +0 -19
  313. package/dist/infoDiagram-5YYISTIA-CbnHgs-I.cjs +0 -2
  314. package/dist/kanban-definition-UN3LZRKU-CbeoJJE7.cjs +0 -89
  315. package/dist/katex-CkiTumqg.cjs +0 -257
  316. package/dist/mermaid-parser.core-ADyJ_PY4.cjs +0 -3
  317. package/dist/mermaid-parser.core-D6xVjl2t.js +0 -373
  318. package/dist/packet-YPE3B663-CGZxZ1Z0.cjs +0 -1
  319. package/dist/packet-YPE3B663-D2JW2EUF.js +0 -3
  320. package/dist/pie-LRSECV5Y-BHyd33ZA.js +0 -3
  321. package/dist/pie-LRSECV5Y-Ca_qbHEv.cjs +0 -1
  322. package/dist/pieDiagram-4H26LBE5-BvhguaHn.js +0 -165
  323. package/dist/pieDiagram-4H26LBE5-DpDrJBQK.cjs +0 -30
  324. package/dist/quadrantDiagram-W4KKPZXB-hWSN7YfD.cjs +0 -7
  325. package/dist/radar-GUYGQ44K-BpJWFTCm.js +0 -3
  326. package/dist/radar-GUYGQ44K-CYqWSxO_.cjs +0 -1
  327. package/dist/requirementDiagram-4Y6WPE33-GmjmsbiY.cjs +0 -84
  328. package/dist/sankeyDiagram-5OEKKPKP-DbGAx-Bm.cjs +0 -40
  329. package/dist/sequenceDiagram-3UESZ5HK-D85rpewi.cjs +0 -162
  330. package/dist/src-DEmZ9bFr.cjs +0 -1
  331. package/dist/stateDiagram-AJRCARHV-Bg4Y3HPa.cjs +0 -1
  332. package/dist/stateDiagram-AJRCARHV-wqjltbKb.js +0 -217
  333. package/dist/stateDiagram-v2-BHNVJYJU-Cgrf5tQC.js +0 -27
  334. package/dist/stateDiagram-v2-BHNVJYJU-D_Tzn4WM.cjs +0 -1
  335. package/dist/timeline-definition-PNZ67QCA-Dpu3hfhP.cjs +0 -120
  336. package/dist/treeView-BLDUP644-C9tQMbiq.js +0 -3
  337. package/dist/treeView-BLDUP644-DKh9BcaT.cjs +0 -1
  338. package/dist/treemap-LRROVOQU-2aferAph.cjs +0 -1
  339. package/dist/treemap-LRROVOQU-CBv3oGC3.js +0 -3
  340. package/dist/vennDiagram-CIIHVFJN-BLBDqWTG.cjs +0 -34
  341. package/dist/wardley-L42UT6IY-CIM0_V5T.js +0 -3
  342. package/dist/wardley-L42UT6IY-DjjjOB8T.cjs +0 -1
  343. package/dist/wardleyDiagram-YWT4CUSO-dzyAWKiV.cjs +0 -78
  344. package/dist/xychartDiagram-2RQKCTM6-DA3O42Dk.cjs +0 -7
@@ -1,61 +1,125 @@
1
- import { g as e, h as t, p as n } from "./src-DjDATEq3.js";
2
- import { A as r, B as i, M as a, T as o, b as s, g as c, x as l, z as u } from "./chunk-CSCIHK7Q-BEk3YcEH.js";
3
- import { a as d, r as f, u as p } from "./chunk-5ZQYHXKU-B_nOC8-n.js";
4
- import { n as m, t as h } from "./chunk-L5ZTLDWV-BQCNoMVG.js";
5
- import { a as g, i as _, r as v, t as y } from "./chunk-NZK2D7GU-CPxdSJTy.js";
6
- import { n as b, r as x } from "./chunk-O5CBEL6O-DbWeP4Au.js";
7
- import { t as S } from "./rough.esm-rcMoXTJj.js";
8
- //#region node_modules/mermaid/dist/chunks/mermaid.core/chunk-3OPIFGDE.mjs
9
- var C = /* @__PURE__ */ t(async (e, t, r) => {
10
- let i, a = t.useHtmlLabels || c(l()?.htmlLabels);
1
+ import { m as e, p as t } from "./src-D-6ZfKf9.js";
2
+ import { A as n, B as r, M as i, T as a, b as o, f as s, g as c, x as l, z as u } from "./chunk-DU6HZSFF-CNSdkWoH.js";
3
+ import { n as d } from "./chunk-Y2CYZVJY-i11wjrBe.js";
4
+ import { a as f, p, r as m, u as h } from "./chunk-75Z2AOVW-BwUD389x.js";
5
+ import { a as g, i as _, r as v, t as y } from "./chunk-P2QGCYS3-DRvvOWJ2.js";
6
+ import { t as b } from "./chunk-PWAF6VOD-CbmhQpgH.js";
7
+ import { n as x, r as S } from "./chunk-GMAD6QVW-DKxKOKLF.js";
8
+ import { t as C } from "./rough.esm-rcMoXTJj.js";
9
+ //#region node_modules/mermaid/dist/chunks/mermaid.core/chunk-4HAMMTFA.mjs
10
+ var w = 1, T = 3;
11
+ async function E(e) {
12
+ let t = e.getElementsByTagName("img");
13
+ if (!t || t.length === 0) return;
14
+ let n = !D(e);
15
+ await Promise.all([...t].map((e) => new Promise((t) => {
16
+ function r() {
17
+ if (e.style.display = "flex", e.style.flexDirection = "column", n) {
18
+ let [t = s.fontSize] = p(l().fontSize ? l().fontSize : window.getComputedStyle(document.body).fontSize), n = t * 5 + "px";
19
+ e.style.minWidth = n, e.style.maxWidth = n;
20
+ } else e.style.width = "100%";
21
+ t(e);
22
+ }
23
+ d(r, "setupImage"), setTimeout(() => {
24
+ e.complete && r();
25
+ }), e.addEventListener("error", r), e.addEventListener("load", r);
26
+ })));
27
+ }
28
+ d(E, "configureLabelImages");
29
+ function D(e) {
30
+ return e.nodeType === T ? e.textContent?.trim() !== "" : e.nodeType !== w || e.tagName.toLowerCase() === "img" ? !1 : [...e.childNodes].some(D);
31
+ }
32
+ d(D, "hasTextBesidesImages");
33
+ var O = 3, k = 32, A = /* @__PURE__ */ d(async (e, n, r) => {
34
+ let i = l(), a = e.insert("g").attr("class", r ?? "node default").attr("id", n.domId || n.id), o = a.insert("g").attr("class", "label").attr("style", h(n.labelStyle)), s = [
35
+ {
36
+ text: typeof n.label == "string" ? n.label : n.label?.[0] ?? "",
37
+ cssClass: "c4-name"
38
+ },
39
+ {
40
+ text: n.stereotype,
41
+ cssClass: "c4-type"
42
+ },
43
+ ...(n.description ?? []).map((e) => ({
44
+ text: e,
45
+ cssClass: "c4-descr"
46
+ }))
47
+ ].filter((e) => e.text), c = n.width ? Math.max(n.width - 2 * (n.padding ?? 0), k) : l().flowchart?.wrappingWidth ?? 200, d = i.c4?.wrap ?? !0 ? c : Infinity, p = await Promise.all(s.map(async (e) => {
48
+ let r = o.append("g").attr("class", e.cssClass), a = await x(r, u(f(e.text ?? ""), i), {
49
+ useHtmlLabels: !1,
50
+ markdown: !1,
51
+ isNode: !0,
52
+ width: d,
53
+ style: n.labelStyle
54
+ }, i);
55
+ return t(a).selectAll("tspan.text-outer-tspan").attr("text-anchor", "middle"), t(a).selectAll("tspan.text-inner-tspan").attr("font-weight", null).attr("font-style", null), {
56
+ el: r,
57
+ box: r.node().getBBox()
58
+ };
59
+ })), m = Math.max(...p.map(({ box: e }) => e.width), 0), g = 0;
60
+ for (let { el: e, box: t } of p) e.attr("transform", `translate(${m / 2 - t.x - t.width / 2}, ${g - t.y})`), g += t.height + O;
61
+ let _ = p.length > 0 ? g - O : 0;
62
+ return o.insert("rect", ":first-child"), o.attr("transform", `translate(${-m / 2}, ${-_ / 2})`), {
63
+ shapeSvg: a,
64
+ bbox: o.node().getBBox(),
65
+ halfPadding: (n.padding ?? 0) / 2,
66
+ label: o
67
+ };
68
+ }, "c4LabelHelper"), j = /* @__PURE__ */ d(async (e, n, r) => {
69
+ if (n.stereotype !== void 0) return A(e, n, r);
70
+ let i, a = n.useHtmlLabels || c(l()?.htmlLabels);
11
71
  i = r || "node default";
12
- let o = e.insert("g").attr("class", i).attr("id", t.domId || t.id), s = o.insert("g").attr("class", "label").attr("style", p(t.labelStyle)), f;
13
- f = t.label === void 0 ? "" : typeof t.label == "string" ? t.label : t.label[0];
14
- let m = !!t.icon || !!t.img, g = t.labelType === "markdown", _ = await b(s, u(d(f), l()), {
72
+ let o = e.insert("g").attr("class", i).attr("id", n.domId || n.id), s = o.insert("g").attr("class", "label").attr("style", h(n.labelStyle)), d;
73
+ d = n.label === void 0 ? "" : typeof n.label == "string" ? n.label : n.label[0];
74
+ let p = !!n.icon || !!n.img, m = n.labelType === "markdown", g = await x(s, u(f(d), l()), {
15
75
  useHtmlLabels: a,
16
- width: t.width || l().flowchart?.wrappingWidth,
17
- classes: g ? "markdown-node-label" : "",
18
- style: t.labelStyle,
19
- addSvgBackground: m,
20
- markdown: g
21
- }, l()), v = _.getBBox(), y = (t?.padding ?? 0) / 2;
76
+ width: n.width || n.wrappingWidth || l().flowchart?.wrappingWidth,
77
+ classes: m ? "markdown-node-label" : "",
78
+ style: n.labelStyle,
79
+ addSvgBackground: p,
80
+ markdown: m
81
+ }, l()), _ = (n?.padding ?? 0) / 2, v;
22
82
  if (a) {
23
- let e = _.children[0], t = n(_);
24
- await h(e, f), v = e.getBoundingClientRect(), t.attr("width", v.width), t.attr("height", v.height);
25
- }
26
- return a ? s.attr("transform", "translate(" + -v.width / 2 + ", " + -v.height / 2 + ")") : s.attr("transform", "translate(0, " + -v.height / 2 + ")"), t.centerLabel && s.attr("transform", "translate(" + -v.width / 2 + ", " + -v.height / 2 + ")"), s.insert("rect", ":first-child"), {
83
+ let e = g.children[0], n = t(g);
84
+ await E(e), v = await S.measure(() => e.getBoundingClientRect()), n.attr("width", v.width), n.attr("height", v.height);
85
+ } else v = await S.measure(() => g.getBBox());
86
+ return a ? s.attr("transform", "translate(" + -v.width / 2 + ", " + -v.height / 2 + ")") : s.attr("transform", "translate(0, " + -v.height / 2 + ")"), n.centerLabel && s.attr("transform", "translate(" + -v.width / 2 + ", " + -v.height / 2 + ")"), s.insert("rect", ":first-child"), {
27
87
  shapeSvg: o,
28
88
  bbox: v,
29
- halfPadding: y,
89
+ halfPadding: _,
30
90
  label: s
31
91
  };
32
- }, "labelHelper"), w = /* @__PURE__ */ t(async (e, t, r) => {
33
- let i = r.useHtmlLabels ?? o(l()), a = e.insert("g").attr("class", "label").attr("style", r.labelStyle || ""), s = await b(a, u(d(t), l()), {
92
+ }, "labelHelper"), M = /* @__PURE__ */ d(async (e, n, r) => {
93
+ let i = r.useHtmlLabels ?? a(l()), o = e.insert("g").attr("class", "label").attr("style", r.labelStyle || ""), s = await x(o, u(f(n), l()), {
34
94
  useHtmlLabels: i,
35
95
  width: r.width || l()?.flowchart?.wrappingWidth,
36
96
  style: r.labelStyle,
37
97
  addSvgBackground: !!r.icon || !!r.img
38
- }), c = s.getBBox(), f = r.padding / 2;
39
- if (o(l())) {
40
- let e = s.children[0], t = n(s);
41
- c = e.getBoundingClientRect(), t.attr("width", c.width), t.attr("height", c.height);
42
- }
43
- return i ? a.attr("transform", "translate(" + -c.width / 2 + ", " + -c.height / 2 + ")") : a.attr("transform", "translate(0, " + -c.height / 2 + ")"), r.centerLabel && a.attr("transform", "translate(" + -c.width / 2 + ", " + -c.height / 2 + ")"), a.insert("rect", ":first-child"), {
98
+ }), c = r.padding / 2, d;
99
+ if (a(l())) {
100
+ let e = s.children[0], n = t(s);
101
+ d = await S.measure(() => e.getBoundingClientRect()), n.attr("width", d.width), n.attr("height", d.height);
102
+ } else d = await S.measure(() => s.getBBox());
103
+ return i ? o.attr("transform", "translate(" + -d.width / 2 + ", " + -d.height / 2 + ")") : o.attr("transform", "translate(0, " + -d.height / 2 + ")"), r.centerLabel && o.attr("transform", "translate(" + -d.width / 2 + ", " + -d.height / 2 + ")"), o.insert("rect", ":first-child"), {
44
104
  shapeSvg: e,
45
- bbox: c,
46
- halfPadding: f,
47
- label: a
105
+ bbox: d,
106
+ halfPadding: c,
107
+ label: o
48
108
  };
49
- }, "insertLabel"), T = /* @__PURE__ */ t((e, t) => {
50
- let n = t.node().getBBox();
51
- e.width = n.width, e.height = n.height;
52
- }, "updateNodeBounds"), E = /* @__PURE__ */ t((e, t) => (e.look === "handDrawn" ? "rough-node" : "node") + " " + e.cssClasses + " " + (t || ""), "getNodeClasses");
53
- function D(e) {
109
+ }, "insertLabel"), N = /* @__PURE__ */ d((e, t, n) => {
110
+ if (n) {
111
+ e.width = n.width, e.height = n.height;
112
+ return;
113
+ }
114
+ let r = t.node().getBBox();
115
+ e.width = r.width, e.height = r.height;
116
+ }, "updateNodeBounds"), P = /* @__PURE__ */ d((e, t) => (e.look === "handDrawn" ? "rough-node" : "node") + " " + e.cssClasses + " " + (t || ""), "getNodeClasses");
117
+ function F(e) {
54
118
  let t = e.map((e, t) => `${t === 0 ? "M" : "L"}${e.x},${e.y}`);
55
119
  return t.push("Z"), t.join(" ");
56
120
  }
57
- t(D, "createPathFromPoints");
58
- function O(e, t, n, r, i, a) {
121
+ d(F, "createPathFromPoints");
122
+ function I(e, t, n, r, i, a) {
59
123
  let o = [], s = n - e, c = r - t, l = s / a, u = 2 * Math.PI / l, d = t + c / 2;
60
124
  for (let t = 0; t <= 50; t++) {
61
125
  let n = e + t / 50 * s, r = d + i * Math.sin(u * (n - e));
@@ -66,8 +130,8 @@ function O(e, t, n, r, i, a) {
66
130
  }
67
131
  return o;
68
132
  }
69
- t(O, "generateFullSineWavePoints");
70
- function k(e, t, n, r, i, a) {
133
+ d(I, "generateFullSineWavePoints");
134
+ function L(e, t, n, r, i, a) {
71
135
  let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
72
136
  for (let i = 0; i < r; i++) {
73
137
  let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
@@ -78,53 +142,41 @@ function k(e, t, n, r, i, a) {
78
142
  }
79
143
  return o;
80
144
  }
81
- t(k, "generateCirclePoints");
82
- function A(e) {
83
- let n = Array.from(e.childNodes).filter((e) => e.tagName === "path"), r = document.createElementNS("http://www.w3.org/2000/svg", "path"), i = n.map((e) => e.getAttribute("d")).filter((e) => e !== null).join(" ");
84
- r.setAttribute("d", i);
85
- let a = n.find((e) => e.getAttribute("fill") !== "none"), o = n.find((e) => e.getAttribute("stroke") !== "none"), s = /* @__PURE__ */ t((e, t) => e?.getAttribute(t) ?? void 0, "getAttr");
86
- if (a) {
145
+ d(L, "generateCirclePoints");
146
+ function ee(e) {
147
+ let t = Array.from(e.childNodes).filter((e) => e.tagName === "path"), n = document.createElementNS("http://www.w3.org/2000/svg", "path"), r = t.map((e) => e.getAttribute("d")).filter((e) => e !== null).join(" ");
148
+ n.setAttribute("d", r);
149
+ let i = t.find((e) => e.getAttribute("fill") !== "none"), a = t.find((e) => e.getAttribute("stroke") !== "none"), o = /* @__PURE__ */ d((e, t) => e?.getAttribute(t) ?? void 0, "getAttr");
150
+ if (i) {
87
151
  let e = {
88
- fill: s(a, "fill"),
89
- "fill-opacity": s(a, "fill-opacity") ?? "1"
152
+ fill: o(i, "fill"),
153
+ "fill-opacity": o(i, "fill-opacity") ?? "1"
90
154
  };
91
155
  Object.entries(e).forEach(([e, t]) => {
92
- t && r.setAttribute(e, t);
156
+ t && n.setAttribute(e, t);
93
157
  });
94
158
  }
95
- if (o) {
159
+ if (a) {
96
160
  let e = {
97
- stroke: s(o, "stroke"),
98
- "stroke-width": s(o, "stroke-width") ?? "1",
99
- "stroke-opacity": s(o, "stroke-opacity") ?? "1"
161
+ stroke: o(a, "stroke"),
162
+ "stroke-width": o(a, "stroke-width") ?? "1",
163
+ "stroke-opacity": o(a, "stroke-opacity") ?? "1"
100
164
  };
101
165
  Object.entries(e).forEach(([e, t]) => {
102
- t && r.setAttribute(e, t);
166
+ t && n.setAttribute(e, t);
103
167
  });
104
168
  }
105
- let c = document.createElementNS("http://www.w3.org/2000/svg", "g");
106
- return c.appendChild(r), c;
169
+ let s = document.createElementNS("http://www.w3.org/2000/svg", "g");
170
+ return s.appendChild(n), s;
107
171
  }
108
- t(A, "mergePaths");
109
- var j = /* @__PURE__ */ t((e, t) => {
172
+ d(ee, "mergePaths");
173
+ var R = /* @__PURE__ */ d((e, t) => {
110
174
  var n = e.x, r = e.y, i = t.x - n, a = t.y - r, o = e.width / 2, s = e.height / 2, c, l;
111
175
  return Math.abs(a) * o > Math.abs(i) * s ? (a < 0 && (s = -s), c = a === 0 ? 0 : s * i / a, l = s) : (i < 0 && (o = -o), c = o, l = i === 0 ? 0 : o * a / i), {
112
176
  x: n + c,
113
177
  y: r + l
114
178
  };
115
- }, "intersectRect"), M = /* @__PURE__ */ t(async (e, t, n, r = !1, i = !1) => {
116
- let a = t || "";
117
- typeof a == "object" && (a = a[0]);
118
- let s = l(), c = o(s);
119
- return await b(e, a, {
120
- style: n,
121
- isTitle: r,
122
- useHtmlLabels: c,
123
- markdown: !1,
124
- isNode: i,
125
- width: Infinity
126
- }, s);
127
- }, "createLabel"), N = /* @__PURE__ */ t((e, t, n, r, i) => [
179
+ }, "intersectRect"), z = /* @__PURE__ */ d((e, t, n, r, i) => [
128
180
  "M",
129
181
  e + i,
130
182
  t,
@@ -169,178 +221,25 @@ var j = /* @__PURE__ */ t((e, t) => {
169
221
  e + i,
170
222
  t,
171
223
  "Z"
172
- ].join(" "), "createRoundedRectPathD"), P = /* @__PURE__ */ t(async (t, r) => {
173
- e.info("Creating subgraph rect for ", r.id, r);
174
- let i = l(), { themeVariables: a, handDrawnSeed: s } = i, { clusterBkg: c, clusterBorder: u } = a, { labelStyles: d, nodeStyles: f, borderStyles: p, backgroundStyles: h } = _(r), v = t.insert("g").attr("class", "cluster " + r.cssClasses).attr("id", r.domId).attr("data-look", r.look), y = o(i), x = v.insert("g").attr("class", "cluster-label "), C;
175
- C = r.labelType === "markdown" ? await b(x, r.label, {
176
- style: r.labelStyle,
177
- useHtmlLabels: y,
178
- isNode: !0,
179
- width: r.width
180
- }) : await M(x, r.label, r.labelStyle || "", !1, !0);
181
- let w = C.getBBox();
182
- if (o(i)) {
183
- let e = C.children[0], t = n(C);
184
- w = e.getBoundingClientRect(), t.attr("width", w.width), t.attr("height", w.height);
185
- }
186
- let T = r.width <= w.width + r.padding ? w.width + r.padding : r.width;
187
- r.width <= w.width + r.padding ? r.diff = (T - r.width) / 2 - r.padding : r.diff = -r.padding;
188
- let E = r.height, D = r.x - T / 2, O = r.y - E / 2;
189
- e.trace("Data ", r, JSON.stringify(r));
190
- let k;
191
- if (r.look === "handDrawn") {
192
- let t = S.svg(v), n = g(r, {
193
- roughness: .7,
194
- fill: c,
195
- stroke: u,
196
- fillWeight: 3,
197
- seed: s
198
- }), i = t.path(N(D, O, T, E, 0), n);
199
- k = v.insert(() => (e.debug("Rough node insert CXC", i), i), ":first-child"), k.select("path:nth-child(2)").attr("style", p.join(";")), k.select("path").attr("style", h.join(";").replace("fill", "stroke"));
200
- } else k = v.insert("rect", ":first-child"), k.attr("style", f).attr("rx", r.rx).attr("ry", r.ry).attr("x", D).attr("y", O).attr("width", T).attr("height", E);
201
- let { subGraphTitleTopMargin: A } = m(i);
202
- if (x.attr("transform", `translate(${r.x - w.width / 2}, ${r.y - r.height / 2 + A})`), d) {
203
- let e = x.select("span");
204
- e && e.attr("style", d);
205
- }
206
- let P = k.node().getBBox();
207
- return r.offsetX = 0, r.width = P.width, r.height = P.height, r.offsetY = w.height - r.padding / 2, r.intersect = function(e) {
208
- return j(r, e);
209
- }, {
210
- cluster: v,
211
- labelBBox: w
212
- };
213
- }, "rect"), F = {
214
- rect: P,
215
- squareRect: P,
216
- roundedWithTitle: /* @__PURE__ */ t(async (e, t) => {
217
- let r = l(), { themeVariables: i, handDrawnSeed: a } = r, { altBackground: s, compositeBackground: c, compositeTitleBackground: u, nodeBorder: d } = i, f = e.insert("g").attr("class", t.cssClasses).attr("id", t.domId).attr("data-id", t.id).attr("data-look", t.look), p = f.insert("g", ":first-child"), m = f.insert("g").attr("class", "cluster-label"), h = f.append("rect"), g = await M(m, t.label, t.labelStyle, void 0, !0), _ = g.getBBox();
218
- if (o(r)) {
219
- let e = g.children[0], t = n(g);
220
- _ = e.getBoundingClientRect(), t.attr("width", _.width), t.attr("height", _.height);
221
- }
222
- let v = 0 * t.padding, y = v / 2, b = (t.width <= _.width + t.padding ? _.width + t.padding : t.width) + v;
223
- t.width <= _.width + t.padding ? t.diff = (b - t.width) / 2 - t.padding : t.diff = -t.padding;
224
- let x = t.height + v, C = t.height + v - _.height - 6, w = t.x - b / 2, T = t.y - x / 2;
225
- t.width = b;
226
- let E = t.y - t.height / 2 - y + _.height + 2, D;
227
- if (t.look === "handDrawn") {
228
- let e = t.cssClasses.includes("statediagram-cluster-alt"), n = S.svg(f), r = t.rx || t.ry ? n.path(N(w, T, b, x, 10), {
229
- roughness: .7,
230
- fill: u,
231
- fillStyle: "solid",
232
- stroke: d,
233
- seed: a
234
- }) : n.rectangle(w, T, b, x, { seed: a });
235
- D = f.insert(() => r, ":first-child");
236
- let i = n.rectangle(w, E, b, C, {
237
- fill: e ? s : c,
238
- fillStyle: e ? "hachure" : "solid",
239
- stroke: d,
240
- seed: a
241
- });
242
- D = f.insert(() => r, ":first-child"), h = f.insert(() => i);
243
- } else D = p.insert("rect", ":first-child"), D.attr("class", "outer").attr("x", w).attr("y", T).attr("width", b).attr("height", x).attr("data-look", t.look), h.attr("class", "inner").attr("x", w).attr("y", E).attr("width", b).attr("height", C);
244
- return m.attr("transform", `translate(${t.x - _.width / 2}, ${T + 1 - (o(r) ? 0 : 3)})`), t.height = D.node().getBBox().height, t.offsetX = 0, t.offsetY = _.height - t.padding / 2, t.labelBBox = _, t.intersect = function(e) {
245
- return j(t, e);
246
- }, {
247
- cluster: f,
248
- labelBBox: _
249
- };
250
- }, "roundedWithTitle"),
251
- noteGroup: /* @__PURE__ */ t((e, t) => {
252
- let n = e.insert("g").attr("class", "note-cluster").attr("id", t.domId), r = n.insert("rect", ":first-child"), i = 0 * t.padding, a = i / 2;
253
- r.attr("rx", t.rx).attr("ry", t.ry).attr("x", t.x - t.width / 2 - a).attr("y", t.y - t.height / 2 - a).attr("width", t.width + i).attr("height", t.height + i).attr("fill", "none");
254
- let o = r.node().getBBox();
255
- return t.width = o.width, t.height = o.height, t.intersect = function(e) {
256
- return j(t, e);
257
- }, {
258
- cluster: n,
259
- labelBBox: {
260
- width: 0,
261
- height: 0
262
- }
263
- };
264
- }, "noteGroup"),
265
- divider: /* @__PURE__ */ t((e, t) => {
266
- let { themeVariables: n, handDrawnSeed: r } = l(), { nodeBorder: i } = n, a = e.insert("g").attr("class", t.cssClasses).attr("id", t.domId).attr("data-look", t.look), o = a.insert("g", ":first-child"), s = 0 * t.padding, c = t.width + s;
267
- t.diff = -t.padding;
268
- let u = t.height + s, d = t.x - c / 2, f = t.y - u / 2;
269
- t.width = c;
270
- let p;
271
- if (t.look === "handDrawn") {
272
- let e = S.svg(a).rectangle(d, f, c, u, {
273
- fill: "lightgrey",
274
- roughness: .5,
275
- strokeLineDash: [5],
276
- stroke: i,
277
- seed: r
278
- });
279
- p = a.insert(() => e, ":first-child");
280
- } else {
281
- p = o.insert("rect", ":first-child");
282
- let e = "outer";
283
- e = (t.look, "divider"), p.attr("class", e).attr("x", d).attr("y", f).attr("width", c).attr("height", u).attr("data-look", t.look);
284
- }
285
- return t.height = p.node().getBBox().height, t.offsetX = 0, t.offsetY = 0, t.intersect = function(e) {
286
- return j(t, e);
287
- }, {
288
- cluster: a,
289
- labelBBox: {}
290
- };
291
- }, "divider"),
292
- kanbanSection: /* @__PURE__ */ t(async (t, r) => {
293
- e.info("Creating subgraph rect for ", r.id, r);
294
- let i = l(), { themeVariables: a, handDrawnSeed: s } = i, { clusterBkg: c, clusterBorder: u } = a, { labelStyles: d, nodeStyles: f, borderStyles: p, backgroundStyles: h } = _(r), v = t.insert("g").attr("class", "cluster " + r.cssClasses).attr("id", r.domId).attr("data-look", r.look), y = o(i), x = v.insert("g").attr("class", "cluster-label "), C = await b(x, r.label, {
295
- style: r.labelStyle,
296
- useHtmlLabels: y,
297
- isNode: !0,
298
- width: r.width
299
- }), w = C.getBBox();
300
- if (o(i)) {
301
- let e = C.children[0], t = n(C);
302
- w = e.getBoundingClientRect(), t.attr("width", w.width), t.attr("height", w.height);
303
- }
304
- let T = r.width <= w.width + r.padding ? w.width + r.padding : r.width;
305
- r.width <= w.width + r.padding ? r.diff = (T - r.width) / 2 - r.padding : r.diff = -r.padding;
306
- let E = r.height, D = r.x - T / 2, O = r.y - E / 2;
307
- e.trace("Data ", r, JSON.stringify(r));
308
- let k;
309
- if (r.look === "handDrawn") {
310
- let t = S.svg(v), n = g(r, {
311
- roughness: .7,
312
- fill: c,
313
- stroke: u,
314
- fillWeight: 4,
315
- seed: s
316
- }), i = t.path(N(D, O, T, E, r.rx), n);
317
- k = v.insert(() => (e.debug("Rough node insert CXC", i), i), ":first-child"), k.select("path:nth-child(2)").attr("style", p.join(";")), k.select("path").attr("style", h.join(";").replace("fill", "stroke"));
318
- } else k = v.insert("rect", ":first-child"), k.attr("style", f).attr("rx", r.rx).attr("ry", r.ry).attr("x", D).attr("y", O).attr("width", T).attr("height", E);
319
- let { subGraphTitleTopMargin: A } = m(i);
320
- if (x.attr("transform", `translate(${r.x - w.width / 2}, ${r.y - r.height / 2 + A})`), d) {
321
- let e = x.select("span");
322
- e && e.attr("style", d);
323
- }
324
- let M = k.node().getBBox();
325
- return r.offsetX = 0, r.width = M.width, r.height = M.height, r.offsetY = w.height - r.padding / 2, r.intersect = function(e) {
326
- return j(r, e);
327
- }, {
328
- cluster: v,
329
- labelBBox: w
330
- };
331
- }, "kanbanSection")
332
- }, I = /* @__PURE__ */ new Map(), ee = /* @__PURE__ */ t(async (e, t) => {
333
- let n = await F[t.shape || "rect"](e, t);
334
- return I.set(t.id, n), n;
335
- }, "insertCluster"), te = /* @__PURE__ */ t(() => {
336
- I = /* @__PURE__ */ new Map();
337
- }, "clear");
338
- function L(e, t) {
224
+ ].join(" "), "createRoundedRectPathD"), te = /* @__PURE__ */ d(async (e, t, n, r = !1, i = !1) => {
225
+ let o = t || "";
226
+ typeof o == "object" && (o = o[0]);
227
+ let s = l(), c = a(s);
228
+ return await x(e, o, {
229
+ style: n,
230
+ isTitle: r,
231
+ useHtmlLabels: c,
232
+ markdown: !1,
233
+ isNode: i,
234
+ width: Infinity
235
+ }, s);
236
+ }, "createLabel");
237
+ function B(e, t) {
339
238
  return e.intersect(t);
340
239
  }
341
- t(L, "intersectNode");
342
- var R = L;
343
- function ne(e, t, n, r) {
240
+ d(B, "intersectNode");
241
+ var ne = B;
242
+ function V(e, t, n, r) {
344
243
  var i = e.x, a = e.y, o = i - r.x, s = a - r.y, c = Math.sqrt(t * t * s * s + n * n * o * o), l = Math.abs(t * n * o / c);
345
244
  r.x < i && (l = -l);
346
245
  var u = Math.abs(t * n * s / c);
@@ -349,19 +248,19 @@ function ne(e, t, n, r) {
349
248
  y: a + u
350
249
  };
351
250
  }
352
- t(ne, "intersectEllipse");
353
- var z = ne;
354
- function B(e, t, n) {
355
- return z(e, t, t, n);
251
+ d(V, "intersectEllipse");
252
+ var H = V;
253
+ function re(e, t, n) {
254
+ return H(e, t, t, n);
356
255
  }
357
- t(B, "intersectCircle");
358
- var V = B;
359
- function H(e, t, n, r) {
256
+ d(re, "intersectCircle");
257
+ var ie = re;
258
+ function U(e, t, n, r) {
360
259
  {
361
260
  let i = t.y - e.y, a = e.x - t.x, o = t.x * e.y - e.x * t.y, s = i * n.x + a * n.y + o, c = i * r.x + a * r.y + o, l = 1e-6;
362
- if (s !== 0 && c !== 0 && re(s, c)) return;
261
+ if (s !== 0 && c !== 0 && W(s, c)) return;
363
262
  let u = r.y - n.y, d = n.x - r.x, f = r.x * n.y - n.x * r.y, p = u * e.x + d * e.y + f, m = u * t.x + d * t.y + f;
364
- if (Math.abs(p) < l && Math.abs(m) < l && re(p, m)) return;
263
+ if (Math.abs(p) < l && Math.abs(m) < l && W(p, m)) return;
365
264
  let h = i * d - u * a;
366
265
  if (h === 0) return;
367
266
  let g = Math.abs(h / 2), _ = a * f - d * o, v = _ < 0 ? (_ - g) / h : (_ + g) / h;
@@ -371,20 +270,20 @@ function H(e, t, n, r) {
371
270
  };
372
271
  }
373
272
  }
374
- t(H, "intersectLine");
375
- function re(e, t) {
273
+ d(U, "intersectLine");
274
+ function W(e, t) {
376
275
  return e * t > 0;
377
276
  }
378
- t(re, "sameSign");
379
- var ie = H;
380
- function U(e, t, n) {
277
+ d(W, "sameSign");
278
+ var G = U;
279
+ function ae(e, t, n) {
381
280
  let r = e.x, i = e.y, a = [], o = Infinity, s = Infinity;
382
281
  typeof t.forEach == "function" ? t.forEach(function(e) {
383
282
  o = Math.min(o, e.x), s = Math.min(s, e.y);
384
283
  }) : (o = Math.min(o, t.x), s = Math.min(s, t.y));
385
284
  let c = r - e.width / 2 - o, l = i - e.height / 2 - s;
386
285
  for (let r = 0; r < t.length; r++) {
387
- let i = t[r], o = t[r < t.length - 1 ? r + 1 : 0], s = ie(e, n, {
286
+ let i = t[r], o = t[r < t.length - 1 ? r + 1 : 0], s = G(e, n, {
388
287
  x: c + i.x,
389
288
  y: l + i.y
390
289
  }, {
@@ -398,32 +297,32 @@ function U(e, t, n) {
398
297
  return a < c ? -1 : a === c ? 0 : 1;
399
298
  }), a[0]) : e;
400
299
  }
401
- t(U, "intersectPolygon");
402
- var W = {
403
- node: R,
404
- circle: V,
405
- ellipse: z,
406
- polygon: U,
407
- rect: j
300
+ d(ae, "intersectPolygon");
301
+ var K = {
302
+ node: ne,
303
+ circle: ie,
304
+ ellipse: H,
305
+ polygon: ae,
306
+ rect: R
408
307
  };
409
- function G(t, n) {
308
+ function oe(t, n) {
410
309
  let { labelStyles: r } = _(n);
411
310
  n.labelStyle = r;
412
- let i = E(n), a = i;
311
+ let i = P(n), a = i;
413
312
  i || (a = "anchor");
414
- let o = t.insert("g").attr("class", a).attr("id", n.domId || n.id), { cssStyles: s } = n, c = S.svg(o), l = g(n, {
313
+ let o = t.insert("g").attr("class", a).attr("id", n.domId || n.id), { cssStyles: s } = n, c = C.svg(o), l = g(n, {
415
314
  fill: "black",
416
315
  stroke: "none",
417
316
  fillStyle: "solid"
418
317
  });
419
318
  n.look !== "handDrawn" && (l.roughness = 0);
420
319
  let u = c.circle(0, 0, 2, l), d = o.insert(() => u, ":first-child");
421
- return d.attr("class", "anchor").attr("style", p(s)), T(n, d), n.intersect = function(t) {
422
- return e.info("Circle intersect", n, 1, t), W.circle(n, 1, t);
320
+ return d.attr("class", "anchor").attr("style", h(s)), N(n, d), n.intersect = function(t) {
321
+ return e.info("Circle intersect", n, 1, t), K.circle(n, 1, t);
423
322
  }, o;
424
323
  }
425
- t(G, "anchor");
426
- function K(e, t, n, r, i, a, o) {
324
+ d(oe, "anchor");
325
+ function se(e, t, n, r, i, a, o) {
427
326
  let s = (e + n) / 2, c = (t + r) / 2, l = Math.atan2(r - t, n - e), u = (n - e) / 2, d = (r - t) / 2, f = u / i, p = d / a, m = Math.sqrt(f ** 2 + p ** 2);
428
327
  if (m > 1) throw Error("The given radii are too small to create an arc between the points.");
429
328
  let h = Math.sqrt(1 - m ** 2), g = s + h * a * Math.sin(l) * (o ? -1 : 1), _ = c - h * i * Math.cos(l) * (o ? -1 : 1), v = Math.atan2((t - _) / a, (e - g) / i), y = Math.atan2((r - _) / a, (n - g) / i) - v;
@@ -438,54 +337,579 @@ function K(e, t, n, r, i, a, o) {
438
337
  }
439
338
  return b;
440
339
  }
441
- t(K, "generateArcPoints");
442
- function ae(e, t, n) {
340
+ d(se, "generateArcPoints");
341
+ function ce(e, t, n) {
443
342
  let [r, i] = [t, n].sort((e, t) => t - e);
444
343
  return i * (1 - Math.sqrt(1 - (e / r / 2) ** 2));
445
344
  }
446
- t(ae, "calculateArcSagitta");
447
- async function oe(e, n) {
448
- let { labelStyles: r, nodeStyles: i } = _(n);
449
- n.labelStyle = r;
450
- let a = n.padding ?? 0, o = n.look === "neo" ? 16 : a, s = n.look === "neo" ? 12 : a, c = /* @__PURE__ */ t((e) => e + s, "calcTotalHeight"), l = /* @__PURE__ */ t((e) => {
345
+ d(ce, "calculateArcSagitta");
346
+ async function le(e, t) {
347
+ let { labelStyles: n, nodeStyles: r } = _(t);
348
+ t.labelStyle = n;
349
+ let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i, s = /* @__PURE__ */ d((e) => e + o, "calcTotalHeight"), c = /* @__PURE__ */ d((e) => {
451
350
  let t = e / 2;
452
351
  return [t / (2.5 + e / 50), t];
453
- }, "calcEllipseRadius"), { shapeSvg: u, bbox: d } = await C(e, n, E(n)), f = c(n?.height ? n?.height : d.height), [p, m] = l(f), h = ae(f, p, m), v = (n?.width ? n?.width : d.width) + o * 2 + h - h, y = f, { cssStyles: b } = n, x = [
352
+ }, "calcEllipseRadius"), { shapeSvg: l, bbox: u } = await j(e, t, P(t)), f = s(t?.height ? t?.height : u.height), [p, m] = c(f), h = ce(f, p, m), v = (t?.width ? t?.width : u.width) + a * 2 + h - h, y = f, { cssStyles: b } = t, x = [
353
+ {
354
+ x: v / 2,
355
+ y: -y / 2
356
+ },
357
+ {
358
+ x: -v / 2,
359
+ y: -y / 2
360
+ },
361
+ ...se(-v / 2, -y / 2, -v / 2, y / 2, p, m, !1),
362
+ {
363
+ x: v / 2,
364
+ y: y / 2
365
+ },
366
+ ...se(v / 2, y / 2, v / 2, -y / 2, p, m, !0)
367
+ ], S = C.svg(l), w = g(t, {});
368
+ t.look !== "handDrawn" && (w.roughness = 0, w.fillStyle = "solid");
369
+ let T = F(x), E = S.path(T, w), D = l.insert(() => E, ":first-child");
370
+ return D.attr("class", "basic label-container outer-path"), b && t.look !== "handDrawn" && D.selectAll("path").attr("style", b), r && t.look !== "handDrawn" && D.selectAll("path").attr("style", r), D.attr("transform", `translate(${p / 2}, 0)`), N(t, D), t.intersect = function(e) {
371
+ return K.polygon(t, x, e);
372
+ }, l;
373
+ }
374
+ d(le, "bowTieRect");
375
+ async function ue(e, t, { config: { themeVariables: n } }) {
376
+ let { labelStyles: r, nodeStyles: i } = _(t);
377
+ t.labelStyle = r;
378
+ let { shapeSvg: a, bbox: o, label: s } = await j(e, t, P(t)), c = n?.nodeBorder ?? n?.lineColor ?? "currentColor", l = t.padding ?? 12, u = Math.max(o.width + l * 2, t.width ?? 0, 80), f = Math.max(Math.min(u * .08, 12), 5), p = Math.max(o.height + l * 2 + f, t.height ?? 0), m = -p / 2 + f, h = p / 2, v = u * .72, y = [
379
+ `M${-u / 2},${m}`,
380
+ `L${-v / 2},${h}`,
381
+ `A${v / 2},${f} 0 0 0 ${v / 2},${h}`,
382
+ `L${u / 2},${m}`,
383
+ `A${u / 2},${f} 0 0 0 ${-u / 2},${m}`,
384
+ "Z"
385
+ ].join(" "), { cssStyles: b } = t, x = a.insert("g", ":first-child").attr("class", "basic label-container");
386
+ if (t.look === "handDrawn") {
387
+ let e = C.svg(a).path(y, g(t, {}));
388
+ x.node()?.appendChild(e), b && x.attr("style", b);
389
+ } else x.append("path").attr("d", y).attr("style", i);
390
+ x.append("ellipse").attr("cx", 0).attr("cy", m).attr("rx", u / 2).attr("ry", f).attr("style", `fill:none;stroke:${c};stroke-width:1px`), N(t, x);
391
+ let S = m + (h - m) / 2;
392
+ s.attr("transform", `translate(${-(o.width / 2) - (o.x - (o.left ?? 0))}, ${S - o.height / 2 - (o.y - (o.top ?? 0))})`);
393
+ let w = /* @__PURE__ */ d((e, t, n) => Array.from({ length: 13 }, (r, i) => {
394
+ let a = Math.PI - i * Math.PI / 12;
395
+ return {
396
+ x: e * Math.cos(a),
397
+ y: t + n * f * Math.sin(a)
398
+ };
399
+ }), "arc"), T = [...w(u / 2, m, -1), ...w(v / 2, h, 1).reverse()];
400
+ return t.intersect = function(e) {
401
+ return K.polygon(t, T, e);
402
+ }, a;
403
+ }
404
+ d(ue, "bucket");
405
+ var de = 20, fe = 8, pe = 80, me = 8;
406
+ async function he(e, t) {
407
+ let { themeVariables: n } = l(), r = n.clusterBkg, i = n.clusterBorder, { nodeStyles: o } = _(t), { shapeSvg: s, bbox: c } = await j(e, t, P(t)), u = t.padding ?? 8, d = c.height, f = Math.max(c.width + u * 2, pe, t?.width ?? 0), p = Math.max(d + fe + de + u * 2, t?.height ?? 0), m = -f / 2, v = -p / 2, y = -(fe + de) / 2, b = s.select(".label");
408
+ b && (t.useHtmlLabels ?? a(l()) ? b.attr("transform", `translate(${-c.width / 2}, ${-c.height / 2 + y})`) : b.attr("transform", `translate(0, ${-c.height / 2 + y})`));
409
+ let x;
410
+ if (t.look === "handDrawn") {
411
+ let e = C.svg(s), n = g(t, {
412
+ fill: r,
413
+ stroke: i,
414
+ fillStyle: "solid"
415
+ }), a = e.path(z(m, v, f, p, me), n);
416
+ x = s.insert(() => a, ":first-child"), x.attr("class", "basic label-container collapsed-group").attr("style", h(t.cssStyles));
417
+ } else x = s.insert("rect", ":first-child"), x.attr("class", "basic label-container collapsed-group").attr("style", o).attr("rx", me).attr("ry", me).attr("x", m).attr("y", v).attr("width", f).attr("height", p).attr("fill", r).attr("stroke", i);
418
+ let S = v + u + d + fe;
419
+ s.append("line").attr("class", "collapsed-separator").attr("x1", m + 8).attr("y1", S).attr("x2", m + f - 8).attr("y2", S).attr("stroke", i).attr("stroke-dasharray", "3, 3");
420
+ let w = S + de / 2;
421
+ for (let e = -1; e <= 1; e++) s.append("circle").attr("class", "collapsed-indicator").attr("cx", e * 10).attr("cy", w).attr("r", 2.5).attr("fill", i);
422
+ return N(t, x), t.calcIntersect = function(e, t) {
423
+ return K.rect(e, t);
424
+ }, t.intersect = function(e) {
425
+ return K.rect(t, e);
426
+ }, s;
427
+ }
428
+ d(he, "collapsedGroup");
429
+ function q(e, t, n, r) {
430
+ return e.insert("polygon", ":first-child").attr("points", r.map(function(e) {
431
+ return e.x + "," + e.y;
432
+ }).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + n / 2 + ")");
433
+ }
434
+ d(q, "insertPolygonShape");
435
+ var ge = [
436
+ "right",
437
+ "left",
438
+ "up",
439
+ "down"
440
+ ], _e = "point", ve = /* @__PURE__ */ d((e) => {
441
+ let t = /* @__PURE__ */ new Set();
442
+ for (let n of e) switch (n) {
443
+ case "x":
444
+ t.add("right"), t.add("left");
445
+ break;
446
+ case "y":
447
+ t.add("up"), t.add("down");
448
+ break;
449
+ default:
450
+ t.add(n);
451
+ break;
452
+ }
453
+ return t;
454
+ }, "expandAndDeduplicateDirections"), ye = /* @__PURE__ */ d((e) => ge.filter((t) => e.has(t)).join("|") || _e, "getDirectionKey"), be = {
455
+ "right|left|up|down": /* @__PURE__ */ d(({ height: e, midpoint: t, padding: n, width: r }) => [
456
+ {
457
+ x: 0,
458
+ y: 0
459
+ },
460
+ {
461
+ x: t,
462
+ y: 0
463
+ },
464
+ {
465
+ x: r / 2,
466
+ y: 2 * n
467
+ },
468
+ {
469
+ x: r - t,
470
+ y: 0
471
+ },
472
+ {
473
+ x: r,
474
+ y: 0
475
+ },
476
+ {
477
+ x: r,
478
+ y: -e / 3
479
+ },
480
+ {
481
+ x: r + 2 * n,
482
+ y: -e / 2
483
+ },
484
+ {
485
+ x: r,
486
+ y: -2 * e / 3
487
+ },
488
+ {
489
+ x: r,
490
+ y: -e
491
+ },
492
+ {
493
+ x: r - t,
494
+ y: -e
495
+ },
496
+ {
497
+ x: r / 2,
498
+ y: -e - 2 * n
499
+ },
500
+ {
501
+ x: t,
502
+ y: -e
503
+ },
504
+ {
505
+ x: 0,
506
+ y: -e
507
+ },
508
+ {
509
+ x: 0,
510
+ y: -2 * e / 3
511
+ },
512
+ {
513
+ x: -2 * n,
514
+ y: -e / 2
515
+ },
516
+ {
517
+ x: 0,
518
+ y: -e / 3
519
+ }
520
+ ], "right|left|up|down"),
521
+ "right|left|up": /* @__PURE__ */ d(({ height: e, midpoint: t, width: n }) => [
522
+ {
523
+ x: t,
524
+ y: 0
525
+ },
526
+ {
527
+ x: n - t,
528
+ y: 0
529
+ },
530
+ {
531
+ x: n,
532
+ y: -e / 2
533
+ },
534
+ {
535
+ x: n - t,
536
+ y: -e
537
+ },
538
+ {
539
+ x: t,
540
+ y: -e
541
+ },
542
+ {
543
+ x: 0,
544
+ y: -e / 2
545
+ }
546
+ ], "right|left|up"),
547
+ "right|left|down": /* @__PURE__ */ d(({ height: e, midpoint: t, width: n }) => [
548
+ {
549
+ x: 0,
550
+ y: 0
551
+ },
552
+ {
553
+ x: t,
554
+ y: -e
555
+ },
556
+ {
557
+ x: n - t,
558
+ y: -e
559
+ },
560
+ {
561
+ x: n,
562
+ y: 0
563
+ }
564
+ ], "right|left|down"),
565
+ "right|up|down": /* @__PURE__ */ d(({ height: e, midpoint: t, width: n }) => [
566
+ {
567
+ x: 0,
568
+ y: 0
569
+ },
570
+ {
571
+ x: n,
572
+ y: -t
573
+ },
574
+ {
575
+ x: n,
576
+ y: -e + t
577
+ },
578
+ {
579
+ x: 0,
580
+ y: -e
581
+ }
582
+ ], "right|up|down"),
583
+ "left|up|down": /* @__PURE__ */ d(({ height: e, midpoint: t, width: n }) => [
584
+ {
585
+ x: n,
586
+ y: 0
587
+ },
588
+ {
589
+ x: 0,
590
+ y: -t
591
+ },
592
+ {
593
+ x: 0,
594
+ y: -e + t
595
+ },
596
+ {
597
+ x: n,
598
+ y: -e
599
+ }
600
+ ], "left|up|down"),
601
+ "right|left": /* @__PURE__ */ d(({ height: e, midpoint: t, padding: n, width: r }) => [
602
+ {
603
+ x: t,
604
+ y: 0
605
+ },
606
+ {
607
+ x: t,
608
+ y: -n
609
+ },
610
+ {
611
+ x: r - t,
612
+ y: -n
613
+ },
614
+ {
615
+ x: r - t,
616
+ y: 0
617
+ },
618
+ {
619
+ x: r,
620
+ y: -e / 2
621
+ },
622
+ {
623
+ x: r - t,
624
+ y: -e
625
+ },
626
+ {
627
+ x: r - t,
628
+ y: -e + n
629
+ },
630
+ {
631
+ x: t,
632
+ y: -e + n
633
+ },
634
+ {
635
+ x: t,
636
+ y: -e
637
+ },
638
+ {
639
+ x: 0,
640
+ y: -e / 2
641
+ }
642
+ ], "right|left"),
643
+ "up|down": /* @__PURE__ */ d(({ height: e, midpoint: t, padding: n, width: r }) => [
644
+ {
645
+ x: r / 2,
646
+ y: 0
647
+ },
648
+ {
649
+ x: 0,
650
+ y: -n
651
+ },
652
+ {
653
+ x: t,
654
+ y: -n
655
+ },
656
+ {
657
+ x: t,
658
+ y: -e + n
659
+ },
660
+ {
661
+ x: 0,
662
+ y: -e + n
663
+ },
664
+ {
665
+ x: r / 2,
666
+ y: -e
667
+ },
668
+ {
669
+ x: r,
670
+ y: -e + n
671
+ },
672
+ {
673
+ x: r - t,
674
+ y: -e + n
675
+ },
676
+ {
677
+ x: r - t,
678
+ y: -n
679
+ },
680
+ {
681
+ x: r,
682
+ y: -n
683
+ }
684
+ ], "up|down"),
685
+ "right|up": /* @__PURE__ */ d(({ height: e, midpoint: t, width: n }) => [
686
+ {
687
+ x: 0,
688
+ y: 0
689
+ },
690
+ {
691
+ x: n,
692
+ y: -t
693
+ },
694
+ {
695
+ x: 0,
696
+ y: -e
697
+ }
698
+ ], "right|up"),
699
+ "right|down": /* @__PURE__ */ d(({ height: e, width: t }) => [
700
+ {
701
+ x: 0,
702
+ y: 0
703
+ },
704
+ {
705
+ x: t,
706
+ y: 0
707
+ },
708
+ {
709
+ x: 0,
710
+ y: -e
711
+ }
712
+ ], "right|down"),
713
+ "left|up": /* @__PURE__ */ d(({ height: e, midpoint: t, width: n }) => [
714
+ {
715
+ x: n,
716
+ y: 0
717
+ },
718
+ {
719
+ x: 0,
720
+ y: -t
721
+ },
722
+ {
723
+ x: n,
724
+ y: -e
725
+ }
726
+ ], "left|up"),
727
+ "left|down": /* @__PURE__ */ d(({ height: e, width: t }) => [
728
+ {
729
+ x: t,
730
+ y: 0
731
+ },
732
+ {
733
+ x: 0,
734
+ y: 0
735
+ },
736
+ {
737
+ x: t,
738
+ y: -e
739
+ }
740
+ ], "left|down"),
741
+ right: /* @__PURE__ */ d(({ height: e, midpoint: t, padding: n, width: r }) => [
742
+ {
743
+ x: t,
744
+ y: -n
745
+ },
746
+ {
747
+ x: t,
748
+ y: -n
749
+ },
750
+ {
751
+ x: r - t,
752
+ y: -n
753
+ },
754
+ {
755
+ x: r - t,
756
+ y: 0
757
+ },
758
+ {
759
+ x: r,
760
+ y: -e / 2
761
+ },
762
+ {
763
+ x: r - t,
764
+ y: -e
765
+ },
766
+ {
767
+ x: r - t,
768
+ y: -e + n
769
+ },
770
+ {
771
+ x: t,
772
+ y: -e + n
773
+ },
774
+ {
775
+ x: t,
776
+ y: -e + n
777
+ }
778
+ ], "right"),
779
+ left: /* @__PURE__ */ d(({ height: e, midpoint: t, padding: n, width: r }) => [
780
+ {
781
+ x: t,
782
+ y: 0
783
+ },
784
+ {
785
+ x: t,
786
+ y: -n
787
+ },
788
+ {
789
+ x: r - t,
790
+ y: -n
791
+ },
792
+ {
793
+ x: r - t,
794
+ y: -e + n
795
+ },
796
+ {
797
+ x: t,
798
+ y: -e + n
799
+ },
454
800
  {
455
- x: v / 2,
456
- y: -y / 2
801
+ x: t,
802
+ y: -e
457
803
  },
458
804
  {
459
- x: -v / 2,
460
- y: -y / 2
805
+ x: 0,
806
+ y: -e / 2
807
+ }
808
+ ], "left"),
809
+ up: /* @__PURE__ */ d(({ height: e, midpoint: t, padding: n, width: r }) => [
810
+ {
811
+ x: t,
812
+ y: -n
461
813
  },
462
- ...K(-v / 2, -y / 2, -v / 2, y / 2, p, m, !1),
463
814
  {
464
- x: v / 2,
465
- y: y / 2
815
+ x: t,
816
+ y: -e + n
466
817
  },
467
- ...K(v / 2, y / 2, v / 2, -y / 2, p, m, !0)
468
- ], w = S.svg(u), O = g(n, {});
469
- n.look !== "handDrawn" && (O.roughness = 0, O.fillStyle = "solid");
470
- let k = D(x), A = w.path(k, O), j = u.insert(() => A, ":first-child");
471
- return j.attr("class", "basic label-container outer-path"), b && n.look !== "handDrawn" && j.selectAll("path").attr("style", b), i && n.look !== "handDrawn" && j.selectAll("path").attr("style", i), j.attr("transform", `translate(${p / 2}, 0)`), T(n, j), n.intersect = function(e) {
472
- return W.polygon(n, x, e);
473
- }, u;
818
+ {
819
+ x: 0,
820
+ y: -e + n
821
+ },
822
+ {
823
+ x: r / 2,
824
+ y: -e
825
+ },
826
+ {
827
+ x: r,
828
+ y: -e + n
829
+ },
830
+ {
831
+ x: r - t,
832
+ y: -e + n
833
+ },
834
+ {
835
+ x: r - t,
836
+ y: -n
837
+ }
838
+ ], "up"),
839
+ down: /* @__PURE__ */ d(({ height: e, midpoint: t, padding: n, width: r }) => [
840
+ {
841
+ x: r / 2,
842
+ y: 0
843
+ },
844
+ {
845
+ x: 0,
846
+ y: -n
847
+ },
848
+ {
849
+ x: t,
850
+ y: -n
851
+ },
852
+ {
853
+ x: t,
854
+ y: -e + n
855
+ },
856
+ {
857
+ x: r - t,
858
+ y: -e + n
859
+ },
860
+ {
861
+ x: r - t,
862
+ y: -n
863
+ },
864
+ {
865
+ x: r,
866
+ y: -n
867
+ }
868
+ ], "down"),
869
+ [_e]: () => [{
870
+ x: 0,
871
+ y: 0
872
+ }]
873
+ }, xe = /* @__PURE__ */ d((e, t, n, r) => {
874
+ let i = ve(e), a = (n.padding ?? 0) / 2, o = t.height + 4 * a, s = o / 2, c = r ?? t.width + 2 * s + 2 * a;
875
+ return (be[ye(i)] ?? be[_e])({
876
+ height: o,
877
+ midpoint: s,
878
+ padding: a,
879
+ width: c
880
+ });
881
+ }, "getArrowPoints");
882
+ async function Se(e, t) {
883
+ let n = t, { shapeSvg: r, bbox: i } = await j(e, n, P(n)), a = n.padding ?? 0, o = i.height + 2 * a, s = o / 2, c = i.width + 2 * s + a, l = n.width ?? 0, u = n.positioned && (n.widthInColumns ?? 1) > 1 && l > c ? l : c, d = xe(n.directions ?? [], i, n, u), f = q(r, u, o, d);
884
+ return f.attr("style", n.style ?? null), N(n, f), n.intersect = function(e) {
885
+ return K.polygon(n, d, e);
886
+ }, r;
474
887
  }
475
- t(oe, "bowTieRect");
476
- function q(e, t, n, r) {
477
- return e.insert("polygon", ":first-child").attr("points", r.map(function(e) {
478
- return e.x + "," + e.y;
479
- }).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + n / 2 + ")");
888
+ d(Se, "block_arrow");
889
+ async function Ce(e, t, { config: { themeVariables: n } }) {
890
+ let { labelStyles: r, nodeStyles: i } = _(t);
891
+ t.labelStyle = r;
892
+ let { shapeSvg: a, bbox: o, label: s } = await j(e, t, P(t)), c = n?.nodeBorder ?? n?.lineColor ?? "currentColor", l = t.padding ?? 12, u = Math.max(o.width + l * 2, t.width ?? 0, 90), d = Math.max(o.height + l * 2 + 18, t.height ?? 0), f = -d / 2, { cssStyles: p } = t, m = a.insert("g", ":first-child").attr("class", "basic label-container");
893
+ if (t.look === "handDrawn") {
894
+ let e = C.svg(a).path(z(-u / 2, f, u, d, 12), g(t, {}));
895
+ m.node()?.appendChild(e), p && m.attr("style", p);
896
+ } else m.append("rect").attr("x", -u / 2).attr("y", f).attr("width", u).attr("height", d).attr("rx", 12).attr("ry", 12).attr("style", i);
897
+ m.append("line").attr("x1", -u / 2).attr("y1", f + 18).attr("x2", u / 2).attr("y2", f + 18).attr("style", `stroke:${c};stroke-width:1px`);
898
+ for (let e = 0; e < 3; e++) m.append("circle").attr("cx", -u / 2 + 12 + e * 9).attr("cy", f + 18 / 2).attr("r", 2.5).attr("style", `fill:${c};stroke:none`);
899
+ m.append("rect").attr("class", "browser-address-bar").attr("x", -u / 2 + 44).attr("y", f + 4).attr("width", Math.max(u - 56, 10)).attr("height", 10).attr("rx", 3).attr("ry", 3).attr("style", `fill:none;stroke:${c};stroke-width:1px;opacity:0.6`), N(t, m);
900
+ let h = f + 18 + (d - 18) / 2;
901
+ return s.attr("transform", `translate(${-(o.width / 2) - (o.x - (o.left ?? 0))}, ${h - o.height / 2 - (o.y - (o.top ?? 0))})`), t.intersect = function(e) {
902
+ return K.rect(t, e);
903
+ }, a;
480
904
  }
481
- t(q, "insertPolygonShape");
482
- var se = 12;
483
- async function ce(e, t) {
905
+ d(Ce, "browser");
906
+ var we = 12;
907
+ async function Te(e, t) {
484
908
  let { labelStyles: n, nodeStyles: r } = _(t);
485
909
  t.labelStyle = n;
486
- let i = t.padding ?? 0, a = t.look === "neo" ? 28 : i, o = t.look === "neo" ? 24 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.width ?? c.width) + (t.look === "neo" ? a * 2 : a + se), u = (t?.height ?? c.height) + (t.look === "neo" ? o * 2 : o), d = l, f = -u, p = [
910
+ let i = t.padding ?? 0, a = t.look === "neo" ? 28 : i, o = t.look === "neo" ? 24 : i, { shapeSvg: s, bbox: c } = await j(e, t, P(t)), l = (t?.width ?? c.width) + (t.look === "neo" ? a * 2 : a + we), u = (t?.height ?? c.height) + (t.look === "neo" ? o * 2 : o), d = l, f = -u, p = [
487
911
  {
488
- x: 0 + se,
912
+ x: 0 + we,
489
913
  y: f
490
914
  },
491
915
  {
@@ -502,26 +926,26 @@ async function ce(e, t) {
502
926
  },
503
927
  {
504
928
  x: 0,
505
- y: f + se
929
+ y: f + we
506
930
  },
507
931
  {
508
- x: 0 + se,
932
+ x: 0 + we,
509
933
  y: f
510
934
  }
511
935
  ], m, { cssStyles: h } = t;
512
936
  if (t.look === "handDrawn") {
513
- let e = S.svg(s), n = g(t, {}), r = D(p), i = e.path(r, n);
937
+ let e = C.svg(s), n = g(t, {}), r = F(p), i = e.path(r, n);
514
938
  m = s.insert(() => i, ":first-child").attr("transform", `translate(${-l / 2}, ${u / 2})`), h && m.attr("style", h);
515
939
  } else m = q(s, l, u, p);
516
- return r && m.attr("style", r), T(t, m), t.intersect = function(e) {
517
- return W.polygon(t, p, e);
940
+ return r && m.attr("style", r), N(t, m), t.intersect = function(e) {
941
+ return K.polygon(t, p, e);
518
942
  }, s;
519
943
  }
520
- t(ce, "card");
521
- function le(e, t) {
944
+ d(Te, "card");
945
+ function Ee(e, t) {
522
946
  let { nodeStyles: n } = _(t);
523
947
  t.label = "";
524
- let r = e.insert("g").attr("class", E(t)).attr("id", t.domId ?? t.id), { cssStyles: i } = t, a = Math.max(28, t.width ?? 0), o = [
948
+ let r = e.insert("g").attr("class", P(t)).attr("id", t.domId ?? t.id), { cssStyles: i } = t, a = Math.max(28, t.width ?? 0), o = [
525
949
  {
526
950
  x: 0,
527
951
  y: a / 2
@@ -538,31 +962,57 @@ function le(e, t) {
538
962
  x: -a / 2,
539
963
  y: 0
540
964
  }
541
- ], s = S.svg(r), c = g(t, {});
965
+ ], s = C.svg(r), c = g(t, {});
542
966
  t.look !== "handDrawn" && (c.roughness = 0, c.fillStyle = "solid");
543
- let l = D(o), u = s.path(l, c), d = r.insert(() => u, ":first-child");
967
+ let l = F(o), u = s.path(l, c), d = r.insert(() => u, ":first-child");
544
968
  return i && t.look !== "handDrawn" && d.selectAll("path").attr("style", i), n && t.look !== "handDrawn" && d.selectAll("path").attr("style", n), t.width = 28, t.height = 28, t.intersect = function(e) {
545
- return W.polygon(t, o, e);
969
+ return K.polygon(t, o, e);
546
970
  }, r;
547
971
  }
548
- t(le, "choice");
549
- async function ue(t, n, r) {
972
+ d(Ee, "choice");
973
+ async function De(t, n, r) {
550
974
  let { labelStyles: i, nodeStyles: a } = _(n);
551
975
  n.labelStyle = i;
552
- let { shapeSvg: o, bbox: s, halfPadding: c } = await C(t, n, E(n)), l = r?.padding ?? c, u = n.look === "neo" ? s.width / 2 + 32 : s.width / 2 + l, d, { cssStyles: f } = n;
976
+ let { shapeSvg: o, bbox: s, halfPadding: c } = await j(t, n, P(n)), l = r?.padding ?? c, u = n.look === "neo" ? s.width / 2 + 32 : s.width / 2 + l, d, { cssStyles: f } = n;
553
977
  if (n.look === "handDrawn") {
554
- let e = S.svg(o), t = g(n, {}), r = e.circle(0, 0, u * 2, t);
555
- d = o.insert(() => r, ":first-child"), d.attr("class", "basic label-container").attr("style", p(f));
978
+ let e = C.svg(o), t = g(n, {}), r = e.circle(0, 0, u * 2, t);
979
+ d = o.insert(() => r, ":first-child"), d.attr("class", "basic label-container").attr("style", h(f));
556
980
  } else d = o.insert("circle", ":first-child").attr("class", "basic label-container").attr("style", a).attr("r", u).attr("cx", 0).attr("cy", 0);
557
- return T(n, d), n.calcIntersect = function(e, t) {
981
+ return N(n, d), n.calcIntersect = function(e, t) {
558
982
  let n = e.width / 2;
559
- return W.circle(e, n, t);
983
+ return K.circle(e, n, t);
560
984
  }, n.intersect = function(t) {
561
- return e.info("Circle intersect", n, u, t), W.circle(n, u, t);
985
+ return e.info("Circle intersect", n, u, t), K.circle(n, u, t);
562
986
  }, o;
563
987
  }
564
- t(ue, "circle");
565
- function de(e) {
988
+ d(De, "circle");
989
+ async function Oe(e, t) {
990
+ let n = t, { shapeSvg: r, bbox: i, halfPadding: a } = await j(e, n, [
991
+ "node",
992
+ n.cssClasses,
993
+ n.class
994
+ ].filter(Boolean).join(" ")), o = r.insert("rect", ":first-child"), s = n.padding ?? 0, c = n.positioned ? n.width ?? 0 : i.width + s, l = n.positioned ? n.height ?? 0 : i.height + s, u = n.positioned ? -c / 2 : -i.width / 2 - a, d = n.positioned ? -l / 2 : -i.height / 2 - a;
995
+ return o.attr("class", "basic cluster composite label-container").attr("style", n.style ?? null).attr("rx", n.rx ?? null).attr("ry", n.ry ?? null).attr("x", u).attr("y", d).attr("width", c).attr("height", l), N(n, o), n.intersect = function(e) {
996
+ return K.rect(n, e);
997
+ }, r;
998
+ }
999
+ d(Oe, "composite");
1000
+ async function ke(e, t, { config: { themeVariables: n } }) {
1001
+ let { labelStyles: r, nodeStyles: i } = _(t);
1002
+ t.labelStyle = r;
1003
+ let { shapeSvg: a, bbox: o, label: s } = await j(e, t, P(t)), c = n?.nodeBorder ?? n?.lineColor ?? "currentColor", l = t.padding ?? 12, u = Math.max(o.width + l * 2, t.width ?? 0, 90), d = Math.max(o.height + l * 2 + 20, t.height ?? 0), f = -d / 2, { cssStyles: p } = t, m = a.insert("g", ":first-child").attr("class", "basic label-container");
1004
+ if (t.look === "handDrawn") {
1005
+ let e = C.svg(a).path(z(-u / 2, f, u, d, 12), g(t, {}));
1006
+ m.node()?.appendChild(e), p && m.attr("style", p);
1007
+ } else m.append("rect").attr("x", -u / 2).attr("y", f).attr("width", u).attr("height", d).attr("rx", 12).attr("ry", 12).attr("style", i);
1008
+ m.append("text").attr("x", -u / 2 + 12).attr("y", f + 16).attr("class", "console-glyph").attr("style", `font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(">_"), N(t, m);
1009
+ let h = f + 20 + (d - 20) / 2;
1010
+ return s.attr("transform", `translate(${-(o.width / 2) - (o.x - (o.left ?? 0))}, ${h - o.height / 2 - (o.y - (o.top ?? 0))})`), t.intersect = function(e) {
1011
+ return K.rect(t, e);
1012
+ }, a;
1013
+ }
1014
+ d(ke, "consoleWindow");
1015
+ function Ae(e) {
566
1016
  let t = Math.cos(Math.PI / 4), n = Math.sin(Math.PI / 4), r = e * 2, i = {
567
1017
  x: r / 2 * t,
568
1018
  y: r / 2 * n
@@ -579,21 +1029,21 @@ function de(e) {
579
1029
  return `M ${a.x},${a.y} L ${s.x},${s.y}
580
1030
  M ${i.x},${i.y} L ${o.x},${o.y}`;
581
1031
  }
582
- t(de, "createLine");
583
- function fe(t, n) {
1032
+ d(Ae, "createLine");
1033
+ function je(t, n) {
584
1034
  let { labelStyles: r, nodeStyles: i } = _(n);
585
1035
  n.labelStyle = r, n.label = "";
586
- let a = t.insert("g").attr("class", E(n)).attr("id", n.domId ?? n.id), o = Math.max(30, n?.width ?? 0), { cssStyles: s } = n, c = S.svg(a), l = g(n, {});
1036
+ let a = t.insert("g").attr("class", P(n)).attr("id", n.domId ?? n.id), o = Math.max(30, n?.width ?? 0), { cssStyles: s } = n, c = C.svg(a), l = g(n, {});
587
1037
  n.look !== "handDrawn" && (l.roughness = 0, l.fillStyle = "solid");
588
- let u = c.circle(0, 0, o * 2, l), d = de(o), f = c.path(d, l), p = a.insert(() => u, ":first-child");
589
- return p.insert(() => f), p.attr("class", "outer-path"), s && n.look !== "handDrawn" && p.selectAll("path").attr("style", s), i && n.look !== "handDrawn" && p.selectAll("path").attr("style", i), T(n, p), n.intersect = function(t) {
1038
+ let u = c.circle(0, 0, o * 2, l), d = Ae(o), f = c.path(d, l), p = a.insert(() => u, ":first-child");
1039
+ return p.insert(() => f), p.attr("class", "outer-path"), s && n.look !== "handDrawn" && p.selectAll("path").attr("style", s), i && n.look !== "handDrawn" && p.selectAll("path").attr("style", i), N(n, p), n.intersect = function(t) {
590
1040
  return e.info("crossedCircle intersect", n, {
591
1041
  radius: o,
592
1042
  point: t
593
- }), W.circle(n, o, t);
1043
+ }), K.circle(n, o, t);
594
1044
  }, a;
595
1045
  }
596
- t(fe, "crossedCircle");
1046
+ d(je, "crossedCircle");
597
1047
  function J(e, t, n, r = 100, i = 0, a = 180) {
598
1048
  let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
599
1049
  for (let i = 0; i < r; i++) {
@@ -605,11 +1055,11 @@ function J(e, t, n, r = 100, i = 0, a = 180) {
605
1055
  }
606
1056
  return o;
607
1057
  }
608
- t(J, "generateCirclePoints");
609
- async function pe(e, t) {
1058
+ d(J, "generateCirclePoints");
1059
+ async function Me(e, t) {
610
1060
  let { labelStyles: n, nodeStyles: r } = _(t);
611
1061
  t.labelStyle = n;
612
- let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = t.look === "neo" ? 18 : t.padding ?? 0, c = t.look === "neo" ? 12 : t.padding ?? 0, l = a.width + s, u = a.height + c, d = Math.max(5, u * .1), { cssStyles: f } = t, p = [
1062
+ let { shapeSvg: i, bbox: a, label: o } = await j(e, t, P(t)), s = t.look === "neo" ? 18 : t.padding ?? 0, c = t.look === "neo" ? 12 : t.padding ?? 0, l = a.width + s, u = a.height + c, d = Math.max(5, u * .1), { cssStyles: f } = t, p = [
613
1063
  ...J(l / 2, -u / 2, d, 30, -90, 0),
614
1064
  {
615
1065
  x: -l / 2 - d,
@@ -651,14 +1101,14 @@ async function pe(e, t) {
651
1101
  x: l / 2,
652
1102
  y: u / 2 + d
653
1103
  }
654
- ], h = S.svg(i), v = g(t, { fill: "none" });
1104
+ ], h = C.svg(i), v = g(t, { fill: "none" });
655
1105
  t.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
656
- let y = D(p).replace("Z", ""), b = h.path(y, v), x = D(m), w = h.path(x, { ...v }), O = i.insert("g", ":first-child");
657
- return O.insert(() => w, ":first-child").attr("stroke-opacity", 0), O.insert(() => b, ":first-child"), O.attr("class", "text"), f && t.look !== "handDrawn" && O.selectAll("path").attr("style", f), r && t.look !== "handDrawn" && O.selectAll("path").attr("style", r), O.attr("transform", `translate(${d}, 0)`), o.attr("transform", `translate(${-l / 2 + d - (a.x - (a.left ?? 0))},${-u / 2 + (t.padding ?? 0) / 2 - (a.y - (a.top ?? 0))})`), T(t, O), t.intersect = function(e) {
658
- return W.polygon(t, m, e);
1106
+ let y = F(p).replace("Z", ""), b = h.path(y, v), x = F(m), S = h.path(x, { ...v }), w = i.insert("g", ":first-child");
1107
+ return w.insert(() => S, ":first-child").attr("stroke-opacity", 0), w.insert(() => b, ":first-child"), w.attr("class", "text"), f && t.look !== "handDrawn" && w.selectAll("path").attr("style", f), r && t.look !== "handDrawn" && w.selectAll("path").attr("style", r), w.attr("transform", `translate(${d}, 0)`), o.attr("transform", `translate(${-l / 2 + d - (a.x - (a.left ?? 0))},${-u / 2 + (t.padding ?? 0) / 2 - (a.y - (a.top ?? 0))})`), N(t, w), t.intersect = function(e) {
1108
+ return K.polygon(t, m, e);
659
1109
  }, i;
660
1110
  }
661
- t(pe, "curlyBraceLeft");
1111
+ d(Me, "curlyBraceLeft");
662
1112
  function Y(e, t, n, r = 100, i = 0, a = 180) {
663
1113
  let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
664
1114
  for (let i = 0; i < r; i++) {
@@ -670,11 +1120,11 @@ function Y(e, t, n, r = 100, i = 0, a = 180) {
670
1120
  }
671
1121
  return o;
672
1122
  }
673
- t(Y, "generateCirclePoints");
674
- async function me(e, t) {
1123
+ d(Y, "generateCirclePoints");
1124
+ async function Ne(e, t) {
675
1125
  let { labelStyles: n, nodeStyles: r } = _(t);
676
1126
  t.labelStyle = n;
677
- let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = t.look === "neo" ? 18 : t.padding ?? 0, c = t.look === "neo" ? 12 : t.padding ?? 0, l = a.width + (t.look === "neo" ? s * 2 : s), u = a.height + (t.look === "neo" ? c * 2 : c), d = Math.max(5, u * .1), { cssStyles: f } = t, p = [
1127
+ let { shapeSvg: i, bbox: a, label: o } = await j(e, t, P(t)), s = t.look === "neo" ? 18 : t.padding ?? 0, c = t.look === "neo" ? 12 : t.padding ?? 0, l = a.width + (t.look === "neo" ? s * 2 : s), u = a.height + (t.look === "neo" ? c * 2 : c), d = Math.max(5, u * .1), { cssStyles: f } = t, p = [
678
1128
  ...Y(l / 2, -u / 2, d, 20, -90, 0),
679
1129
  {
680
1130
  x: l / 2 + d,
@@ -716,14 +1166,14 @@ async function me(e, t) {
716
1166
  x: -l / 2,
717
1167
  y: u / 2 + d
718
1168
  }
719
- ], h = S.svg(i), v = g(t, { fill: "none" });
1169
+ ], h = C.svg(i), v = g(t, { fill: "none" });
720
1170
  t.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
721
- let y = D(p).replace("Z", ""), b = h.path(y, v), x = D(m), w = h.path(x, { ...v }), O = i.insert("g", ":first-child");
722
- return O.insert(() => w, ":first-child").attr("stroke-opacity", 0), O.insert(() => b, ":first-child"), O.attr("class", "text"), f && t.look !== "handDrawn" && O.selectAll("path").attr("style", f), r && t.look !== "handDrawn" && O.selectAll("path").attr("style", r), O.attr("transform", `translate(${-d}, 0)`), o.attr("transform", `translate(${-l / 2 + (t.padding ?? 0) / 2 - (a.x - (a.left ?? 0))},${-u / 2 + (t.padding ?? 0) / 2 - (a.y - (a.top ?? 0))})`), T(t, O), t.intersect = function(e) {
723
- return W.polygon(t, m, e);
1171
+ let y = F(p).replace("Z", ""), b = h.path(y, v), x = F(m), S = h.path(x, { ...v }), w = i.insert("g", ":first-child");
1172
+ return w.insert(() => S, ":first-child").attr("stroke-opacity", 0), w.insert(() => b, ":first-child"), w.attr("class", "text"), f && t.look !== "handDrawn" && w.selectAll("path").attr("style", f), r && t.look !== "handDrawn" && w.selectAll("path").attr("style", r), w.attr("transform", `translate(${-d}, 0)`), o.attr("transform", `translate(${-l / 2 + (t.padding ?? 0) / 2 - (a.x - (a.left ?? 0))},${-u / 2 + (t.padding ?? 0) / 2 - (a.y - (a.top ?? 0))})`), N(t, w), t.intersect = function(e) {
1173
+ return K.polygon(t, m, e);
724
1174
  }, i;
725
1175
  }
726
- t(me, "curlyBraceRight");
1176
+ d(Ne, "curlyBraceRight");
727
1177
  function X(e, t, n, r = 100, i = 0, a = 180) {
728
1178
  let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
729
1179
  for (let i = 0; i < r; i++) {
@@ -735,11 +1185,11 @@ function X(e, t, n, r = 100, i = 0, a = 180) {
735
1185
  }
736
1186
  return o;
737
1187
  }
738
- t(X, "generateCirclePoints");
739
- async function he(e, t) {
1188
+ d(X, "generateCirclePoints");
1189
+ async function Pe(e, t) {
740
1190
  let { labelStyles: n, nodeStyles: r } = _(t);
741
1191
  t.labelStyle = n;
742
- let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = t.look === "neo" ? 18 : t.padding ?? 0, c = t.look === "neo" ? 12 : t.padding ?? 0, l = a.width + (t.look === "neo" ? s * 2 : s), u = a.height + (t.look === "neo" ? c * 2 : c), d = Math.max(5, u * .1), { cssStyles: f } = t, p = [
1192
+ let { shapeSvg: i, bbox: a, label: o } = await j(e, t, P(t)), s = t.look === "neo" ? 18 : t.padding ?? 0, c = t.look === "neo" ? 12 : t.padding ?? 0, l = a.width + (t.look === "neo" ? s * 2 : s), u = a.height + (t.look === "neo" ? c * 2 : c), d = Math.max(5, u * .1), { cssStyles: f } = t, p = [
743
1193
  ...X(l / 2, -u / 2, d, 30, -90, 0),
744
1194
  {
745
1195
  x: -l / 2 - d,
@@ -806,18 +1256,18 @@ async function he(e, t) {
806
1256
  y: -d
807
1257
  },
808
1258
  ...X(-l / 2 + d + d / 2, u / 2, d, 30, -180, -270)
809
- ], v = S.svg(i), y = g(t, { fill: "none" });
1259
+ ], v = C.svg(i), y = g(t, { fill: "none" });
810
1260
  t.look !== "handDrawn" && (y.roughness = 0, y.fillStyle = "solid");
811
- let b = D(p).replace("Z", ""), x = v.path(b, y), w = D(m).replace("Z", ""), O = v.path(w, y), k = D(h), A = v.path(k, { ...y }), j = i.insert("g", ":first-child");
812
- return j.insert(() => A, ":first-child").attr("stroke-opacity", 0), j.insert(() => x, ":first-child"), j.insert(() => O, ":first-child"), j.attr("class", "text"), f && t.look !== "handDrawn" && j.selectAll("path").attr("style", f), r && t.look !== "handDrawn" && j.selectAll("path").attr("style", r), j.attr("transform", `translate(${d - d / 4}, 0)`), o.attr("transform", `translate(${-l / 2 + (t.padding ?? 0) / 2 - (a.x - (a.left ?? 0))},${-u / 2 + (t.padding ?? 0) / 2 - (a.y - (a.top ?? 0))})`), T(t, j), t.intersect = function(e) {
813
- return W.polygon(t, h, e);
1261
+ let b = F(p).replace("Z", ""), x = v.path(b, y), S = F(m).replace("Z", ""), w = v.path(S, y), T = F(h), E = v.path(T, { ...y }), D = i.insert("g", ":first-child");
1262
+ return D.insert(() => E, ":first-child").attr("stroke-opacity", 0), D.insert(() => x, ":first-child"), D.insert(() => w, ":first-child"), D.attr("class", "text"), f && t.look !== "handDrawn" && D.selectAll("path").attr("style", f), r && t.look !== "handDrawn" && D.selectAll("path").attr("style", r), D.attr("transform", `translate(${d - d / 4}, 0)`), o.attr("transform", `translate(${-l / 2 + (t.padding ?? 0) / 2 - (a.x - (a.left ?? 0))},${-u / 2 + (t.padding ?? 0) / 2 - (a.y - (a.top ?? 0))})`), N(t, D), t.intersect = function(e) {
1263
+ return K.polygon(t, h, e);
814
1264
  }, i;
815
1265
  }
816
- t(he, "curlyBraces");
817
- async function ge(e, t) {
1266
+ d(Pe, "curlyBraces");
1267
+ async function Fe(e, t) {
818
1268
  let { labelStyles: n, nodeStyles: r } = _(t);
819
1269
  t.labelStyle = n;
820
- let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = Math.max(20, (c.width + a * 2) * 1.25, t?.width ?? 0), u = Math.max(5, c.height + o * 2, t?.height ?? 0), d = u / 2, { cssStyles: f } = t, p = S.svg(s), m = g(t, {});
1270
+ let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i, { shapeSvg: s, bbox: c } = await j(e, t, P(t)), l = Math.max(20, (c.width + a * 2) * 1.25, t?.width ?? 0), u = Math.max(5, c.height + o * 2, t?.height ?? 0), d = u / 2, { cssStyles: f } = t, p = C.svg(s), m = g(t, {});
821
1271
  t.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
822
1272
  let h = l, v = u, y = h - d, b = v / 4, x = [
823
1273
  {
@@ -840,73 +1290,97 @@ async function ge(e, t) {
840
1290
  x: y,
841
1291
  y: v
842
1292
  },
843
- ...k(-y, -v / 2, d, 50, 270, 90)
844
- ], w = D(x), O = p.path(w, m), A = s.insert(() => O, ":first-child");
845
- return A.attr("class", "basic label-container outer-path"), f && t.look !== "handDrawn" && A.selectChildren("path").attr("style", f), r && t.look !== "handDrawn" && A.selectChildren("path").attr("style", r), A.attr("transform", `translate(${-l / 2}, ${-u / 2})`), T(t, A), t.intersect = function(e) {
846
- return W.polygon(t, x, e);
1293
+ ...L(-y, -v / 2, d, 50, 270, 90)
1294
+ ], S = F(x), w = p.path(S, m), T = s.insert(() => w, ":first-child");
1295
+ return T.attr("class", "basic label-container outer-path"), f && t.look !== "handDrawn" && T.selectChildren("path").attr("style", f), r && t.look !== "handDrawn" && T.selectChildren("path").attr("style", r), T.attr("transform", `translate(${-l / 2}, ${-u / 2})`), N(t, T), t.intersect = function(e) {
1296
+ return K.polygon(t, x, e);
847
1297
  }, s;
848
1298
  }
849
- t(ge, "curvedTrapezoid");
850
- var _e = /* @__PURE__ */ t((e, t, n, r, i, a) => [
1299
+ d(Fe, "curvedTrapezoid");
1300
+ async function Ie(e, t) {
1301
+ let { labelStyles: n, nodeStyles: r } = _(t);
1302
+ t.labelStyle = n;
1303
+ let { shapeSvg: i, bbox: a, label: o } = await j(e, t, P(t)), s = t.padding ?? 20, c = Math.max(a.width + s * 2, t.width ?? 0, 100), l = Math.min(Math.max(c * .23, 16), 56), u = l * .27, d = Math.max(a.height + s * 2, t.height ? t.height - (2 * l - u) : 0), f = Math.min(c * .177, d * .45), p = d + 2 * l - u, m = -p / 2, h = m + 2 * l - u, v = i.insert("g", ":first-child").attr("class", "basic label-container"), { cssStyles: y } = t;
1304
+ if (t.look === "handDrawn") {
1305
+ let e = C.svg(i), n = g(t, {}), r = e.path(z(-c / 2, h, c, d, f), n), a = e.circle(0, m + l, l * 2, n);
1306
+ v.insert(() => a, ":first-child"), v.insert(() => r, ":first-child"), y && v.attr("style", y);
1307
+ } else v.append("rect").attr("x", -c / 2).attr("y", h).attr("width", c).attr("height", d).attr("rx", f).attr("ry", f).attr("style", r), v.append("circle").attr("cx", 0).attr("cy", m + l).attr("r", l).attr("style", r);
1308
+ N(t, v);
1309
+ let b = h + d / 2;
1310
+ o.attr("transform", `translate(${-(a.width / 2) - (a.x - (a.left ?? 0))}, ${b - a.height / 2 - (a.y - (a.top ?? 0))})`);
1311
+ let x = m + l, S = Math.asin(Math.min(1, (h - x) / l)) * 180 / Math.PI, w = [
1312
+ ...L(0, -x, l, 24, 180 + S, -S),
1313
+ ...L(-(-c / 2 + f), -(h + f), f, 12, 90, 0),
1314
+ ...L(-(-c / 2 + f), -(p / 2 - f), f, 12, 360, 270),
1315
+ ...L(-(c / 2 - f), -(p / 2 - f), f, 12, 270, 180),
1316
+ ...L(-(c / 2 - f), -(h + f), f, 12, 180, 90)
1317
+ ];
1318
+ return t.intersect = function(e) {
1319
+ return K.polygon(t, w, e);
1320
+ }, i;
1321
+ }
1322
+ d(Ie, "person");
1323
+ var Le = /* @__PURE__ */ d((e, t, n, r, i, a) => [
851
1324
  `M${e},${t + a}`,
852
1325
  `a${i},${a} 0,0,0 ${n},0`,
853
1326
  `a${i},${a} 0,0,0 ${-n},0`,
854
1327
  `l0,${r}`,
855
1328
  `a${i},${a} 0,0,0 ${n},0`,
856
1329
  `l0,${-r}`
857
- ].join(" "), "createCylinderPathD"), ve = /* @__PURE__ */ t((e, t, n, r, i, a) => [
1330
+ ].join(" "), "createCylinderPathD"), Re = /* @__PURE__ */ d((e, t, n, r, i, a) => [
858
1331
  `M${e},${t + a}`,
859
1332
  `M${e + n},${t + a}`,
860
1333
  `a${i},${a} 0,0,0 ${-n},0`,
861
1334
  `l0,${r}`,
862
1335
  `a${i},${a} 0,0,0 ${n},0`,
863
1336
  `l0,${-r}`
864
- ].join(" "), "createOuterCylinderPathD"), ye = /* @__PURE__ */ t((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD"), be = 8, xe = 8;
865
- async function Se(e, t) {
1337
+ ].join(" "), "createOuterCylinderPathD"), ze = /* @__PURE__ */ d((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD"), Be = 8, Ve = 8;
1338
+ async function He(e, t) {
866
1339
  let { labelStyles: n, nodeStyles: r } = _(t);
867
1340
  t.labelStyle = n;
868
- let i = t.padding ?? 0, a = t.look === "neo" ? 24 : i, o = t.look === "neo" ? 24 : i;
869
- if (t.width || t.height) {
870
- let e = t.width ?? 0;
871
- t.width = (t.width ?? 0) - o, t.width < xe && (t.width = xe);
872
- let n = e / 2 / (2.5 + e / 50);
873
- t.height = (t.height ?? 0) - a - n * 3, t.height < be && (t.height = be);
1341
+ let i = t.padding ?? 0, a = t.look === "neo" ? 24 : i, o = t.look === "neo" ? 24 : i, s = t.width ?? 0;
1342
+ if (t.width && (t.width -= o, t.width < Ve && (t.width = Ve)), t.height) {
1343
+ let e = s / 2 / (2.5 + s / 50);
1344
+ t.height = t.height - a - e * 3, t.height < Be && (t.height = Be);
874
1345
  }
875
- let { shapeSvg: s, bbox: c, label: l } = await C(e, t, E(t)), u = (t.width ? t.width : c.width) + o, d = u / 2, f = d / (2.5 + u / 50), m = (t.height ? t.height : c.height) + a + f, h, { cssStyles: v } = t;
1346
+ let { shapeSvg: c, bbox: l, label: u } = await j(e, t, P(t)), d = Math.max(t.width ?? 0, l.width) + o, f = d / 2, p = f / (2.5 + d / 50), m = Math.max(t.height ?? 0, l.height) + a + p, v, { cssStyles: y } = t;
876
1347
  if (t.look === "handDrawn") {
877
- let e = S.svg(s), n = ve(0, 0, u, m, d, f), r = ye(0, f, u, m, d, f), i = g(t, {}), a = e.path(n, i), o = e.path(r, g(t, { fill: "none" }));
878
- h = s.insert(() => o, ":first-child"), h = s.insert(() => a, ":first-child"), h.attr("class", "basic label-container"), v && h.attr("style", v);
1348
+ let e = C.svg(c), n = Re(0, 0, d, m, f, p), r = ze(0, p, d, m, f, p), i = g(t, {}), a = e.path(n, i), o = e.path(r, g(t, { fill: "none" }));
1349
+ v = c.insert(() => o, ":first-child"), v = c.insert(() => a, ":first-child"), v.attr("class", "basic label-container"), y && v.attr("style", y);
879
1350
  } else {
880
- let e = _e(0, 0, u, m, d, f);
881
- h = s.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container outer-path").attr("style", p(v)).attr("style", r);
1351
+ let e = Le(0, 0, d, m, f, p);
1352
+ v = c.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container outer-path").attr("style", h(y)).attr("style", r);
882
1353
  }
883
- return h.attr("label-offset-y", f), h.attr("transform", `translate(${-u / 2}, ${-(m / 2 + f)})`), T(t, h), l.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(e) {
884
- let n = W.rect(t, e), r = n.x - (t.x ?? 0);
885
- if (d != 0 && (Math.abs(r) < (t.width ?? 0) / 2 || Math.abs(r) == (t.width ?? 0) / 2 && Math.abs(n.y - (t.y ?? 0)) > (t.height ?? 0) / 2 - f)) {
886
- let i = f * f * (1 - r * r / (d * d));
887
- i > 0 && (i = Math.sqrt(i)), i = f - i, e.y - (t.y ?? 0) > 0 && (i = -i), n.y += i;
1354
+ return v.attr("label-offset-y", p), v.attr("transform", `translate(${-d / 2}, ${-(m / 2 + p)})`), N(t, v), u.attr("transform", `translate(${-(l.width / 2) - (l.x - (l.left ?? 0))}, ${-(l.height / 2) + (t.padding ?? 0) / 1.5 - (l.y - (l.top ?? 0))})`), t.intersect = function(e) {
1355
+ let n = K.rect(t, e), r = n.x - (t.x ?? 0);
1356
+ if (f != 0 && (Math.abs(r) < (t.width ?? 0) / 2 || Math.abs(r) == (t.width ?? 0) / 2 && Math.abs(n.y - (t.y ?? 0)) > (t.height ?? 0) / 2 - p)) {
1357
+ let i = p * p * (1 - r * r / (f * f));
1358
+ i > 0 && (i = Math.sqrt(i)), i = p - i, e.y - (t.y ?? 0) > 0 && (i = -i), n.y += i;
888
1359
  }
889
1360
  return n;
890
- }, s;
1361
+ }, c;
891
1362
  }
892
- t(Se, "cylinder");
893
- async function Ce(e, t, n) {
1363
+ d(He, "cylinder");
1364
+ async function Ue(e, t, n) {
894
1365
  let { labelStyles: r, nodeStyles: i } = _(t);
895
1366
  t.labelStyle = r;
896
- let { shapeSvg: a, bbox: o } = await C(e, t, E(t)), s = Math.max(o.width + n.labelPaddingX * 2, t?.width || 0), c = Math.max(o.height + n.labelPaddingY * 2, t?.height || 0), l = -s / 2, u = -c / 2, d, { rx: f, ry: m } = t, { cssStyles: h } = t;
897
- if (n?.rx && n.ry && (f = n.rx, m = n.ry), t.look === "handDrawn") {
898
- let e = S.svg(a), n = g(t, {}), r = f || m ? e.path(N(l, u, s, c, f || 0), n) : e.rectangle(l, u, s, c, n);
899
- d = a.insert(() => r, ":first-child"), d.attr("class", "basic label-container").attr("style", p(h));
900
- } else d = a.insert("rect", ":first-child"), d.attr("class", "basic label-container").attr("style", i).attr("rx", p(f)).attr("ry", p(m)).attr("x", l).attr("y", u).attr("width", s).attr("height", c);
901
- return T(t, d), t.calcIntersect = function(e, t) {
902
- return W.rect(e, t);
1367
+ let { shapeSvg: a, bbox: o } = await j(e, t, P(t)), s = Math.max(o.width + n.labelPaddingX * 2, t?.width || 0), c = Math.max(o.height + n.labelPaddingY * 2, t?.height || 0), l = -s / 2, u = -c / 2, d, { rx: f, ry: p } = t, { cssStyles: m } = t;
1368
+ if (n?.rx && n.ry && (f = n.rx, p = n.ry), t.look === "handDrawn") {
1369
+ let e = C.svg(a), n = g(t, {}), r = f || p ? e.path(z(l, u, s, c, f || 0), n) : e.rectangle(l, u, s, c, n);
1370
+ d = a.insert(() => r, ":first-child"), d.attr("class", "basic label-container").attr("style", h(m));
1371
+ } else d = a.insert("rect", ":first-child"), d.attr("class", "basic label-container").attr("style", i).attr("rx", h(f)).attr("ry", h(p)).attr("x", l).attr("y", u).attr("width", s).attr("height", c);
1372
+ return N(t, d, t.look === "handDrawn" ? void 0 : {
1373
+ width: s,
1374
+ height: c
1375
+ }), t.calcIntersect = function(e, t) {
1376
+ return K.rect(e, t);
903
1377
  }, t.intersect = function(e) {
904
- return W.rect(t, e);
1378
+ return K.rect(t, e);
905
1379
  }, a;
906
1380
  }
907
- t(Ce, "drawRect");
908
- async function we(e, t) {
909
- let { cssClasses: n, labelPaddingX: r, labelPaddingY: i, padding: a, width: o, height: s } = t, c = await Ce(e, t, {
1381
+ d(Ue, "drawRect");
1382
+ async function We(e, t) {
1383
+ let { cssClasses: n, labelPaddingX: r, labelPaddingY: i, padding: a, width: o, height: s } = t, c = await Ue(e, t, {
910
1384
  rx: 0,
911
1385
  ry: 0,
912
1386
  classes: n ?? "",
@@ -914,7 +1388,7 @@ async function we(e, t) {
914
1388
  labelPaddingY: i ?? a ?? 0
915
1389
  });
916
1390
  if (t.look === "handDrawn") {
917
- let e = S.svg(c), n = g(t, {}), r = c.select(".basic.label-container > path:nth-child(2)"), i = r.node();
1391
+ let e = C.svg(c), n = g(t, {}), r = c.select(".basic.label-container > path:nth-child(2)"), i = r.node();
918
1392
  if (!i) return c;
919
1393
  let a = null;
920
1394
  if (i instanceof SVGGraphicsElement) a = i.getBBox();
@@ -924,11 +1398,11 @@ async function we(e, t) {
924
1398
  let l = c.select(".basic.label-container"), u = (Number(l.attr("width")) || o) ?? 0, d = (Number(l.attr("height")) || s) ?? 0;
925
1399
  return u > 0 && d > 0 && l.attr("stroke-dasharray", `${u} ${d}`), c;
926
1400
  }
927
- t(we, "datastore");
928
- async function Te(e, t) {
1401
+ d(We, "datastore");
1402
+ async function Ge(e, t) {
929
1403
  let { labelStyles: n, nodeStyles: r } = _(t);
930
1404
  t.labelStyle = n;
931
- let i = t.look === "neo" ? 16 : t.padding ?? 0, a = t.look === "neo" ? 16 : t.padding ?? 0, { shapeSvg: o, bbox: s, label: c } = await C(e, t, E(t)), l = s.width + i, u = s.height + a, d = u * .2, f = -l / 2, p = -u / 2 - d / 2, { cssStyles: m } = t, h = S.svg(o), v = g(t, {});
1405
+ let i = t.look === "neo" ? 16 : t.padding ?? 0, a = t.look === "neo" ? 16 : t.padding ?? 0, { shapeSvg: o, bbox: s, label: c } = await j(e, t, P(t)), l = s.width + i, u = s.height + a, d = u * .2, f = -l / 2, p = -u / 2 - d / 2, { cssStyles: m } = t, h = C.svg(o), v = g(t, {});
932
1406
  t.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
933
1407
  let y = [
934
1408
  {
@@ -960,55 +1434,55 @@ async function Te(e, t) {
960
1434
  y: p + d
961
1435
  }
962
1436
  ], b = h.polygon(y.map((e) => [e.x, e.y]), v), x = o.insert(() => b, ":first-child");
963
- return x.attr("class", "basic label-container outer-path"), m && t.look !== "handDrawn" && x.selectAll("path").attr("style", m), r && t.look !== "handDrawn" && x.selectAll("path").attr("style", r), c.attr("transform", `translate(${f + (t.padding ?? 0) / 2 - (s.x - (s.left ?? 0))}, ${p + d + (t.padding ?? 0) / 2 - (s.y - (s.top ?? 0))})`), T(t, x), t.intersect = function(e) {
964
- return W.rect(t, e);
1437
+ return x.attr("class", "basic label-container outer-path"), m && t.look !== "handDrawn" && x.selectAll("path").attr("style", m), r && t.look !== "handDrawn" && x.selectAll("path").attr("style", r), c.attr("transform", `translate(${f + (t.padding ?? 0) / 2 - (s.x - (s.left ?? 0))}, ${p + d + (t.padding ?? 0) / 2 - (s.y - (s.top ?? 0))})`), N(t, x), t.intersect = function(e) {
1438
+ return K.rect(t, e);
965
1439
  }, o;
966
1440
  }
967
- t(Te, "dividedRectangle");
968
- async function Ee(t, n) {
1441
+ d(Ge, "dividedRectangle");
1442
+ async function Ke(t, n) {
969
1443
  let { labelStyles: r, nodeStyles: i } = _(n), a = n.look === "neo" ? 12 : 5;
970
1444
  n.labelStyle = r;
971
- let o = n.padding ?? 0, s = n.look === "neo" ? 16 : o, { shapeSvg: c, bbox: l } = await C(t, n, E(n)), u = (n?.width ? n?.width / 2 : l.width / 2) + (s ?? 0), d = u - a, f, { cssStyles: m } = n;
1445
+ let o = n.padding ?? 0, s = n.look === "neo" ? 16 : o, { shapeSvg: c, bbox: l } = await j(t, n, P(n)), u = (n?.width ? n?.width / 2 : l.width / 2) + (s ?? 0), d = u - a, f, { cssStyles: p } = n;
972
1446
  if (n.look === "handDrawn") {
973
- let e = S.svg(c), t = g(n, {
1447
+ let e = C.svg(c), t = g(n, {
974
1448
  roughness: .2,
975
1449
  strokeWidth: 2.5
976
1450
  }), r = g(n, {
977
1451
  roughness: .2,
978
1452
  strokeWidth: 1.5
979
1453
  }), i = e.circle(0, 0, u * 2, t), a = e.circle(0, 0, d * 2, r);
980
- f = c.insert("g", ":first-child"), f.attr("class", p(n.cssClasses)).attr("style", p(m)), f.node()?.appendChild(i), f.node()?.appendChild(a);
1454
+ f = c.insert("g", ":first-child"), f.attr("class", h(n.cssClasses)).attr("style", h(p)), f.node()?.appendChild(i), f.node()?.appendChild(a);
981
1455
  } else {
982
1456
  f = c.insert("g", ":first-child");
983
1457
  let e = f.insert("circle", ":first-child"), t = f.insert("circle");
984
1458
  f.attr("class", "basic label-container").attr("style", i), e.attr("class", "outer-circle").attr("style", i).attr("r", u).attr("cx", 0).attr("cy", 0), t.attr("class", "inner-circle").attr("style", i).attr("r", d).attr("cx", 0).attr("cy", 0);
985
1459
  }
986
- return T(n, f), n.intersect = function(t) {
987
- return e.info("DoubleCircle intersect", n, u, t), W.circle(n, u, t);
1460
+ return N(n, f), n.intersect = function(t) {
1461
+ return e.info("DoubleCircle intersect", n, u, t), K.circle(n, u, t);
988
1462
  }, c;
989
1463
  }
990
- t(Ee, "doublecircle");
991
- function De(t, n, { config: { themeVariables: r } }) {
1464
+ d(Ke, "doublecircle");
1465
+ function qe(t, n, { config: { themeVariables: r } }) {
992
1466
  let { labelStyles: i, nodeStyles: a } = _(n);
993
1467
  n.label = "", n.labelStyle = i;
994
- let o = t.insert("g").attr("class", E(n)).attr("id", n.domId ?? n.id), { cssStyles: s } = n, c = S.svg(o), { nodeBorder: l } = r, u = g(n, { fillStyle: "solid" });
1468
+ let o = t.insert("g").attr("class", P(n)).attr("id", n.domId ?? n.id), { cssStyles: s } = n, c = C.svg(o), { nodeBorder: l } = r, u = g(n, { fillStyle: "solid" });
995
1469
  n.look !== "handDrawn" && (u.roughness = 0);
996
1470
  let d = c.circle(0, 0, 14, u), f = o.insert(() => d, ":first-child");
997
- return f.selectAll("path").attr("style", `fill: ${l} !important;`), s && s.length > 0 && n.look !== "handDrawn" && f.selectAll("path").attr("style", s), a && n.look !== "handDrawn" && f.selectAll("path").attr("style", a), T(n, f), n.intersect = function(t) {
1471
+ return f.selectAll("path").attr("style", `fill: ${l} !important;`), s && s.length > 0 && n.look !== "handDrawn" && f.selectAll("path").attr("style", s), a && n.look !== "handDrawn" && f.selectAll("path").attr("style", a), N(n, f), n.intersect = function(t) {
998
1472
  return e.info("filledCircle intersect", n, {
999
1473
  radius: 7,
1000
1474
  point: t
1001
- }), W.circle(n, 7, t);
1475
+ }), K.circle(n, 7, t);
1002
1476
  }, o;
1003
1477
  }
1004
- t(De, "filledCircle");
1005
- var Oe = 10, ke = 10;
1006
- async function Ae(t, n) {
1478
+ d(qe, "filledCircle");
1479
+ var Je = 10, Ye = 10;
1480
+ async function Xe(t, n) {
1007
1481
  let { labelStyles: r, nodeStyles: i } = _(n);
1008
1482
  n.labelStyle = r;
1009
1483
  let a = n.padding ?? 0, o = n.look === "neo" ? a * 2 : a;
1010
- (n.width || n.height) && (n.height = n?.height ?? 0, n.height < Oe && (n.height = Oe), n.width = (n?.width ?? 0) - o - o / 2, n.width < ke && (n.width = ke));
1011
- let { shapeSvg: s, bbox: c, label: l } = await C(t, n, E(n)), u = (n?.width ? n?.width : c.width) + (o ?? 0), d = n?.height ? n?.height : u + c.height, f = d, p = [
1484
+ (n.width || n.height) && (n.height = n?.height ?? 0, n.height < Je && (n.height = Je), n.width = (n?.width ?? 0) - o - o / 2, n.width < Ye && (n.width = Ye));
1485
+ let { shapeSvg: s, bbox: c, label: l } = await j(t, n, P(n)), u = (n?.width ? n?.width : c.width) + (o ?? 0), d = n?.height ? n?.height : u + c.height, f = d, p = [
1012
1486
  {
1013
1487
  x: 0,
1014
1488
  y: -d
@@ -1021,38 +1495,85 @@ async function Ae(t, n) {
1021
1495
  x: f / 2,
1022
1496
  y: 0
1023
1497
  }
1024
- ], { cssStyles: m } = n, h = S.svg(s), v = g(n, {});
1498
+ ], { cssStyles: m } = n, h = C.svg(s), v = g(n, {});
1025
1499
  n.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
1026
- let y = D(p), b = h.path(y, v), x = s.insert(() => b, ":first-child").attr("transform", `translate(${-d / 2}, ${d / 2})`).attr("class", "outer-path");
1027
- return m && n.look !== "handDrawn" && x.selectChildren("path").attr("style", m), i && n.look !== "handDrawn" && x.selectChildren("path").attr("style", i), n.width = u, n.height = d, T(n, x), l.attr("transform", `translate(${-c.width / 2 - (c.x - (c.left ?? 0))}, ${-d / 2 + (n.padding ?? 0) / 2 + (c.y - (c.top ?? 0))})`), n.intersect = function(t) {
1028
- return e.info("Triangle intersect", n, p, t), W.polygon(n, p, t);
1500
+ let y = F(p), b = h.path(y, v), x = s.insert(() => b, ":first-child").attr("transform", `translate(${-d / 2}, ${d / 2})`).attr("class", "outer-path");
1501
+ return m && n.look !== "handDrawn" && x.selectChildren("path").attr("style", m), i && n.look !== "handDrawn" && x.selectChildren("path").attr("style", i), n.width = u, n.height = d, N(n, x), l.attr("transform", `translate(${-c.width / 2 - (c.x - (c.left ?? 0))}, ${-d / 2 + (n.padding ?? 0) / 2 + (c.y - (c.top ?? 0))})`), n.intersect = function(t) {
1502
+ return e.info("Triangle intersect", n, p, t), K.polygon(n, p, t);
1029
1503
  }, s;
1030
1504
  }
1031
- t(Ae, "flippedTriangle");
1032
- function je(e, t, { dir: n, config: { state: r, themeVariables: i } }) {
1505
+ d(Xe, "flippedTriangle");
1506
+ async function Ze(e, t) {
1507
+ let { labelStyles: n, nodeStyles: r } = _(t);
1508
+ t.labelStyle = n;
1509
+ let { shapeSvg: i, bbox: a, label: o } = await j(e, t, P(t)), s = t.padding ?? 12, c = Math.max(a.width + s * 2, t.width ?? 0, 90), l = a.height + s * 2, u = Math.max(Math.min(l * .16, 14), 8), d = Math.max(l + u, t.height ?? 0), f = d - u, p = Math.max(c * .38, 28), m = -d / 2, h = [
1510
+ {
1511
+ x: -c / 2,
1512
+ y: m
1513
+ },
1514
+ {
1515
+ x: -c / 2 + p,
1516
+ y: m
1517
+ },
1518
+ {
1519
+ x: -c / 2 + p,
1520
+ y: m + u
1521
+ },
1522
+ {
1523
+ x: c / 2,
1524
+ y: m + u
1525
+ },
1526
+ {
1527
+ x: c / 2,
1528
+ y: d / 2
1529
+ },
1530
+ {
1531
+ x: -c / 2,
1532
+ y: d / 2
1533
+ }
1534
+ ], v = [
1535
+ `M${h[0].x},${h[0].y}`,
1536
+ ...h.slice(1).map((e) => `L${e.x},${e.y}`),
1537
+ "Z"
1538
+ ].join(" "), { cssStyles: y } = t, b;
1539
+ if (t.look === "handDrawn") {
1540
+ let e = C.svg(i).path(v, g(t, {}));
1541
+ b = i.insert(() => e, ":first-child").attr("class", "basic label-container"), y && b.attr("style", y);
1542
+ } else b = i.insert("path", ":first-child").attr("d", v).attr("class", "basic label-container").attr("style", r);
1543
+ t.look === "handDrawn" ? N(t, b) : N(t, b, {
1544
+ width: c,
1545
+ height: d
1546
+ });
1547
+ let x = m + u + f / 2;
1548
+ return o.attr("transform", `translate(${-(a.width / 2) - (a.x - (a.left ?? 0))}, ${x - a.height / 2 - (a.y - (a.top ?? 0))})`), t.intersect = function(e) {
1549
+ return K.polygon(t, h, e);
1550
+ }, i;
1551
+ }
1552
+ d(Ze, "folder");
1553
+ function Qe(e, t, { dir: n, config: { state: r, themeVariables: i } }) {
1033
1554
  let { nodeStyles: a } = _(t);
1034
1555
  t.label = "";
1035
- let o = e.insert("g").attr("class", E(t)).attr("id", t.domId ?? t.id), { cssStyles: s } = t, c = Math.max(70, t?.width ?? 0), l = Math.max(10, t?.height ?? 0);
1556
+ let o = e.insert("g").attr("class", P(t)).attr("id", t.domId ?? t.id), { cssStyles: s } = t, c = Math.max(70, t?.width ?? 0), l = Math.max(10, t?.height ?? 0);
1036
1557
  n === "LR" && (c = Math.max(10, t?.width ?? 0), l = Math.max(70, t?.height ?? 0));
1037
- let u = -1 * c / 2, d = -1 * l / 2, f = S.svg(o), p = g(t, {
1558
+ let u = -1 * c / 2, d = -1 * l / 2, f = C.svg(o), p = g(t, {
1038
1559
  stroke: i.lineColor,
1039
1560
  fill: i.lineColor
1040
1561
  });
1041
1562
  t.look !== "handDrawn" && (p.roughness = 0, p.fillStyle = "solid");
1042
1563
  let m = f.rectangle(u, d, c, l, p), h = o.insert(() => m, ":first-child");
1043
- s && t.look !== "handDrawn" && h.selectAll("path").attr("style", s), a && t.look !== "handDrawn" && h.selectAll("path").attr("style", a), T(t, h);
1564
+ s && t.look !== "handDrawn" && h.selectAll("path").attr("style", s), a && t.look !== "handDrawn" && h.selectAll("path").attr("style", a), N(t, h);
1044
1565
  let v = r?.padding ?? 0;
1045
1566
  return t.width && t.height && (t.width += v / 2 || 0, t.height += v / 2 || 0), t.intersect = function(e) {
1046
- return W.rect(t, e);
1567
+ return K.rect(t, e);
1047
1568
  }, o;
1048
1569
  }
1049
- t(je, "forkJoin");
1050
- async function Me(t, n) {
1570
+ d(Qe, "forkJoin");
1571
+ async function $e(t, n) {
1051
1572
  let { labelStyles: r, nodeStyles: i } = _(n);
1052
1573
  n.labelStyle = r;
1053
1574
  let a = n.look === "neo" ? 16 : n.padding ?? 0, o = n.look === "neo" ? 12 : n.padding ?? 0;
1054
1575
  (n.width || n.height) && (n.height = (n?.height ?? 0) - o * 2, n.height < 10 && (n.height = 10), n.width = (n?.width ?? 0) - a * 2, n.width < 15 && (n.width = 15));
1055
- let { shapeSvg: s, bbox: c } = await C(t, n, E(n)), l = (n?.width ? n?.width : Math.max(15, c.width)) + a * 2, u = (n?.height ? n?.height : Math.max(10, c.height)) + o * 2, d = u / 2, { cssStyles: f } = n, p = S.svg(s), m = g(n, {});
1576
+ let { shapeSvg: s, bbox: c } = await j(t, n, P(n)), l = (n?.width ? n?.width : Math.max(15, c.width)) + a * 2, u = (n?.height ? n?.height : Math.max(10, c.height)) + o * 2, d = u / 2, { cssStyles: f } = n, p = C.svg(s), m = g(n, {});
1056
1577
  n.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
1057
1578
  let h = [
1058
1579
  {
@@ -1063,7 +1584,7 @@ async function Me(t, n) {
1063
1584
  x: l / 2 - d,
1064
1585
  y: -u / 2
1065
1586
  },
1066
- ...k(-l / 2 + d, 0, d, 50, 90, 270),
1587
+ ...L(-l / 2 + d, 0, d, 50, 90, 270),
1067
1588
  {
1068
1589
  x: l / 2 - d,
1069
1590
  y: u / 2
@@ -1072,16 +1593,16 @@ async function Me(t, n) {
1072
1593
  x: -l / 2,
1073
1594
  y: u / 2
1074
1595
  }
1075
- ], v = D(h), y = p.path(v, m), b = s.insert(() => y, ":first-child");
1076
- return b.attr("class", "basic label-container outer-path"), f && n.look !== "handDrawn" && b.selectChildren("path").attr("style", f), i && n.look !== "handDrawn" && b.selectChildren("path").attr("style", i), T(n, b), n.intersect = function(t) {
1596
+ ], v = F(h), y = p.path(v, m), b = s.insert(() => y, ":first-child");
1597
+ return b.attr("class", "basic label-container outer-path"), f && n.look !== "handDrawn" && b.selectChildren("path").attr("style", f), i && n.look !== "handDrawn" && b.selectChildren("path").attr("style", i), N(n, b), n.intersect = function(t) {
1077
1598
  return e.info("Pill intersect", n, {
1078
1599
  radius: d,
1079
1600
  point: t
1080
- }), W.polygon(n, h, t);
1601
+ }), K.polygon(n, h, t);
1081
1602
  }, s;
1082
1603
  }
1083
- t(Me, "halfRoundedRectangle");
1084
- var Ne = /* @__PURE__ */ t((e, t, n, r, i) => [
1604
+ d($e, "halfRoundedRectangle");
1605
+ var et = /* @__PURE__ */ d((e, t, n, r, i) => [
1085
1606
  `M${e + i},${t}`,
1086
1607
  `L${e + n - i},${t}`,
1087
1608
  `L${e + n},${t - r / 2}`,
@@ -1090,7 +1611,7 @@ var Ne = /* @__PURE__ */ t((e, t, n, r, i) => [
1090
1611
  `L${e},${t - r / 2}`,
1091
1612
  "Z"
1092
1613
  ].join(" "), "createHexagonPathD");
1093
- async function Pe(e, t) {
1614
+ async function tt(e, t) {
1094
1615
  let { labelStyles: n, nodeStyles: r } = _(t), i = t.look === "neo" ? 3.5 : 4;
1095
1616
  t.labelStyle = n;
1096
1617
  let a = t.padding ?? 0, o = t.look === "neo" ? 70 : a, s = t.look === "neo" ? 32 : a;
@@ -1098,7 +1619,7 @@ async function Pe(e, t) {
1098
1619
  let e = (t.height ?? 0) / i;
1099
1620
  t.width = (t?.width ?? 0) - 2 * e - s, t.height = (t.height ?? 0) - o;
1100
1621
  }
1101
- let { shapeSvg: c, bbox: l } = await C(e, t, E(t)), u = (t?.height ? t?.height : l.height) + o, d = u / i, f = (t?.width ? t?.width : l.width) + 2 * d + s, p = [
1622
+ let { shapeSvg: c, bbox: l } = await j(e, t, P(t)), u = (t?.height ? t?.height : l.height) + o, d = u / i, f = (t?.width ? t?.width : l.width) + 2 * d + s, p = [
1102
1623
  {
1103
1624
  x: d,
1104
1625
  y: 0
@@ -1125,18 +1646,18 @@ async function Pe(e, t) {
1125
1646
  }
1126
1647
  ], m, { cssStyles: h } = t;
1127
1648
  if (t.look === "handDrawn") {
1128
- let e = S.svg(c), n = g(t, {}), r = Ne(0, 0, f, u, d), i = e.path(r, n);
1649
+ let e = C.svg(c), n = g(t, {}), r = et(0, 0, f, u, d), i = e.path(r, n);
1129
1650
  m = c.insert(() => i, ":first-child").attr("transform", `translate(${-f / 2}, ${u / 2})`), h && m.attr("style", h);
1130
1651
  } else m = q(c, f, u, p);
1131
- return r && m.attr("style", r), t.width = f, t.height = u, T(t, m), t.intersect = function(e) {
1132
- return W.polygon(t, p, e);
1652
+ return r && m.attr("style", r), t.width = f, t.height = u, N(t, m), t.intersect = function(e) {
1653
+ return K.polygon(t, p, e);
1133
1654
  }, c;
1134
1655
  }
1135
- t(Pe, "hexagon");
1136
- async function Fe(t, n) {
1656
+ d(tt, "hexagon");
1657
+ async function nt(t, n) {
1137
1658
  let { labelStyles: r, nodeStyles: i } = _(n);
1138
1659
  n.label = "", n.labelStyle = r;
1139
- let { shapeSvg: a } = await C(t, n, E(n)), o = Math.max(30, n?.width ?? 0), s = Math.max(30, n?.height ?? 0), { cssStyles: c } = n, l = S.svg(a), u = g(n, {});
1660
+ let { shapeSvg: a } = await j(t, n, P(n)), o = Math.max(30, n?.width ?? 0), s = Math.max(30, n?.height ?? 0), { cssStyles: c } = n, l = C.svg(a), u = g(n, {});
1140
1661
  n.look !== "handDrawn" && (u.roughness = 0, u.fillStyle = "solid");
1141
1662
  let d = [
1142
1663
  {
@@ -1155,39 +1676,39 @@ async function Fe(t, n) {
1155
1676
  x: o,
1156
1677
  y: s
1157
1678
  }
1158
- ], f = D(d), p = l.path(f, u), m = a.insert(() => p, ":first-child");
1159
- return m.attr("class", "basic label-container outer-path"), c && n.look !== "handDrawn" && m.selectChildren("path").attr("style", c), i && n.look !== "handDrawn" && m.selectChildren("path").attr("style", i), m.attr("transform", `translate(${-o / 2}, ${-s / 2})`), T(n, m), n.intersect = function(t) {
1160
- return e.info("Pill intersect", n, { points: d }), W.polygon(n, d, t);
1679
+ ], f = F(d), p = l.path(f, u), m = a.insert(() => p, ":first-child");
1680
+ return m.attr("class", "basic label-container outer-path"), c && n.look !== "handDrawn" && m.selectChildren("path").attr("style", c), i && n.look !== "handDrawn" && m.selectChildren("path").attr("style", i), m.attr("transform", `translate(${-o / 2}, ${-s / 2})`), N(n, m), n.intersect = function(t) {
1681
+ return e.info("Pill intersect", n, { points: d }), K.polygon(n, d, t);
1161
1682
  }, a;
1162
1683
  }
1163
- t(Fe, "hourglass");
1164
- async function Ie(t, n, { config: { themeVariables: r, flowchart: i } }) {
1684
+ d(nt, "hourglass");
1685
+ async function rt(t, n, { config: { themeVariables: r, flowchart: i } }) {
1165
1686
  let { labelStyles: a } = _(n);
1166
1687
  n.labelStyle = a;
1167
1688
  let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1168
1689
  n.width = Math.max(c, l ?? 0);
1169
- let { shapeSvg: u, bbox: d, label: f } = await C(t, n, "icon-shape default"), p = n.pos === "t", m = c, h = c, { nodeBorder: v } = r, { stylesMap: b } = y(n), w = -h / 2, E = -m / 2, D = n.label ? 8 : 0, O = S.svg(u), k = g(n, {
1690
+ let { shapeSvg: u, bbox: d, label: f } = await j(t, n, "icon-shape default"), p = n.pos === "t", m = c, h = c, { nodeBorder: v } = r, { stylesMap: x } = y(n), S = -h / 2, w = -m / 2, T = n.label ? 8 : 0, E = C.svg(u), D = g(n, {
1170
1691
  stroke: "none",
1171
1692
  fill: "none"
1172
1693
  });
1173
- n.look !== "handDrawn" && (k.roughness = 0, k.fillStyle = "solid");
1174
- let A = O.rectangle(w, E, h, m, k), j = Math.max(h, d.width), M = m + d.height + D, N = O.rectangle(-j / 2, -M / 2, j, M, {
1175
- ...k,
1694
+ n.look !== "handDrawn" && (D.roughness = 0, D.fillStyle = "solid");
1695
+ let O = E.rectangle(S, w, h, m, D), k = Math.max(h, d.width), A = m + d.height + T, M = E.rectangle(-k / 2, -A / 2, k, A, {
1696
+ ...D,
1176
1697
  fill: "transparent",
1177
1698
  stroke: "none"
1178
- }), P = u.insert(() => A, ":first-child"), F = u.insert(() => N);
1699
+ }), P = u.insert(() => O, ":first-child"), F = u.insert(() => M);
1179
1700
  if (n.icon) {
1180
1701
  let e = u.append("g");
1181
- e.html(`<g>${await x(n.icon, {
1702
+ e.html(`<g>${await b(n.icon, {
1182
1703
  height: c,
1183
1704
  width: c,
1184
1705
  fallbackPrefix: ""
1185
1706
  })}</g>`);
1186
1707
  let t = e.node().getBBox(), r = t.width, i = t.height, a = t.x, o = t.y;
1187
- e.attr("transform", `translate(${-r / 2 - a},${p ? d.height / 2 + D / 2 - i / 2 - o : -d.height / 2 - D / 2 - i / 2 - o})`), e.attr("style", `color: ${b.get("stroke") ?? v};`);
1708
+ e.attr("transform", `translate(${-r / 2 - a},${p ? d.height / 2 + T / 2 - i / 2 - o : -d.height / 2 - T / 2 - i / 2 - o})`), e.attr("style", `color: ${x.get("stroke") ?? v};`);
1188
1709
  }
1189
- return f.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${p ? -M / 2 : M / 2 - d.height})`), P.attr("transform", `translate(0,${p ? d.height / 2 + D / 2 : -d.height / 2 - D / 2})`), T(n, F), n.intersect = function(t) {
1190
- if (e.info("iconSquare intersect", n, t), !n.label) return W.rect(n, t);
1710
+ return f.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${p ? -A / 2 : A / 2 - d.height})`), P.attr("transform", `translate(0,${p ? d.height / 2 + T / 2 : -d.height / 2 - T / 2})`), N(n, F), n.intersect = function(t) {
1711
+ if (e.info("iconSquare intersect", n, t), !n.label) return K.rect(n, t);
1191
1712
  let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
1192
1713
  return o = p ? [
1193
1714
  {
@@ -1200,11 +1721,11 @@ async function Ie(t, n, { config: { themeVariables: r, flowchart: i } }) {
1200
1721
  },
1201
1722
  {
1202
1723
  x: r + d.width / 2,
1203
- y: i - a / 2 + d.height + D
1724
+ y: i - a / 2 + d.height + T
1204
1725
  },
1205
1726
  {
1206
1727
  x: r + h / 2,
1207
- y: i - a / 2 + d.height + D
1728
+ y: i - a / 2 + d.height + T
1208
1729
  },
1209
1730
  {
1210
1731
  x: r + h / 2,
@@ -1216,11 +1737,11 @@ async function Ie(t, n, { config: { themeVariables: r, flowchart: i } }) {
1216
1737
  },
1217
1738
  {
1218
1739
  x: r - h / 2,
1219
- y: i - a / 2 + d.height + D
1740
+ y: i - a / 2 + d.height + T
1220
1741
  },
1221
1742
  {
1222
1743
  x: r - d.width / 2,
1223
- y: i - a / 2 + d.height + D
1744
+ y: i - a / 2 + d.height + T
1224
1745
  }
1225
1746
  ] : [
1226
1747
  {
@@ -1255,57 +1776,57 @@ async function Ie(t, n, { config: { themeVariables: r, flowchart: i } }) {
1255
1776
  x: r - h / 2,
1256
1777
  y: i - a / 2 + m
1257
1778
  }
1258
- ], W.polygon(n, o, t);
1779
+ ], K.polygon(n, o, t);
1259
1780
  }, u;
1260
1781
  }
1261
- t(Ie, "icon");
1262
- async function Le(t, n, { config: { themeVariables: r, flowchart: i } }) {
1782
+ d(rt, "icon");
1783
+ async function it(t, n, { config: { themeVariables: r, flowchart: i } }) {
1263
1784
  let { labelStyles: a } = _(n);
1264
1785
  n.labelStyle = a;
1265
1786
  let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1266
1787
  n.width = Math.max(c, l ?? 0);
1267
- let { shapeSvg: u, bbox: d, label: f } = await C(t, n, "icon-shape default"), p = n.label ? 8 : 0, m = n.pos === "t", { nodeBorder: h, mainBkg: v } = r, { stylesMap: b } = y(n), w = S.svg(u), E = g(n, {});
1268
- n.look !== "handDrawn" && (E.roughness = 0, E.fillStyle = "solid"), E.stroke = b.get("fill") ?? v;
1269
- let D = u.append("g");
1270
- n.icon && D.html(`<g>${await x(n.icon, {
1788
+ let { shapeSvg: u, bbox: d, label: f } = await j(t, n, "icon-shape default"), p = n.label ? 8 : 0, m = n.pos === "t", { nodeBorder: h, mainBkg: v } = r, { stylesMap: x } = y(n), S = C.svg(u), w = g(n, {});
1789
+ n.look !== "handDrawn" && (w.roughness = 0, w.fillStyle = "solid"), w.stroke = x.get("fill") ?? v;
1790
+ let T = u.append("g");
1791
+ n.icon && T.html(`<g>${await b(n.icon, {
1271
1792
  height: c,
1272
1793
  width: c,
1273
1794
  fallbackPrefix: ""
1274
1795
  })}</g>`);
1275
- let O = D.node().getBBox(), k = O.width, A = O.height, j = O.x, M = O.y, N = Math.max(k, A) * Math.SQRT2 + 40, P = w.circle(0, 0, N, E), F = Math.max(N, d.width), I = N + d.height + p, ee = w.rectangle(-F / 2, -I / 2, F, I, {
1276
- ...E,
1796
+ let E = T.node().getBBox(), D = E.width, O = E.height, k = E.x, A = E.y, M = Math.max(D, O) * Math.SQRT2 + 40, P = S.circle(0, 0, M, w), F = Math.max(M, d.width), I = M + d.height + p, L = S.rectangle(-F / 2, -I / 2, F, I, {
1797
+ ...w,
1277
1798
  fill: "transparent",
1278
1799
  stroke: "none"
1279
- }), te = u.insert(() => P, ":first-child"), L = u.insert(() => ee);
1280
- return D.attr("transform", `translate(${-k / 2 - j},${m ? d.height / 2 + p / 2 - A / 2 - M : -d.height / 2 - p / 2 - A / 2 - M})`), D.attr("style", `color: ${b.get("stroke") ?? h};`), f.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -I / 2 : I / 2 - d.height})`), te.attr("transform", `translate(0,${m ? d.height / 2 + p / 2 : -d.height / 2 - p / 2})`), T(n, L), n.intersect = function(t) {
1281
- return e.info("iconSquare intersect", n, t), W.rect(n, t);
1800
+ }), ee = u.insert(() => P, ":first-child"), R = u.insert(() => L);
1801
+ return T.attr("transform", `translate(${-D / 2 - k},${m ? d.height / 2 + p / 2 - O / 2 - A : -d.height / 2 - p / 2 - O / 2 - A})`), T.attr("style", `color: ${x.get("stroke") ?? h};`), f.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -I / 2 : I / 2 - d.height})`), ee.attr("transform", `translate(0,${m ? d.height / 2 + p / 2 : -d.height / 2 - p / 2})`), N(n, R), n.intersect = function(t) {
1802
+ return e.info("iconSquare intersect", n, t), K.rect(n, t);
1282
1803
  }, u;
1283
1804
  }
1284
- t(Le, "iconCircle");
1285
- async function Re(t, n, { config: { themeVariables: r, flowchart: i } }) {
1805
+ d(it, "iconCircle");
1806
+ async function at(t, n, { config: { themeVariables: r, flowchart: i } }) {
1286
1807
  let { labelStyles: a } = _(n);
1287
1808
  n.labelStyle = a;
1288
1809
  let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1289
1810
  n.width = Math.max(c, l ?? 0);
1290
- let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await C(t, n, "icon-shape default"), m = n.pos === "t", h = c + f * 2, v = c + f * 2, { nodeBorder: b, mainBkg: w } = r, { stylesMap: E } = y(n), D = -v / 2, O = -h / 2, k = n.label ? 8 : 0, A = S.svg(u), j = g(n, {});
1291
- n.look !== "handDrawn" && (j.roughness = 0, j.fillStyle = "solid"), j.stroke = E.get("fill") ?? w;
1292
- let M = A.path(N(D, O, v, h, 5), j), P = Math.max(v, d.width), F = h + d.height + k, I = A.rectangle(-P / 2, -F / 2, P, F, {
1293
- ...j,
1811
+ let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await j(t, n, "icon-shape default"), m = n.pos === "t", h = c + f * 2, v = c + f * 2, { nodeBorder: x, mainBkg: S } = r, { stylesMap: w } = y(n), T = -v / 2, E = -h / 2, D = n.label ? 8 : 0, O = C.svg(u), k = g(n, {});
1812
+ n.look !== "handDrawn" && (k.roughness = 0, k.fillStyle = "solid"), k.stroke = w.get("fill") ?? S;
1813
+ let A = O.path(z(T, E, v, h, 5), k), M = Math.max(v, d.width), P = h + d.height + D, F = O.rectangle(-M / 2, -P / 2, M, P, {
1814
+ ...k,
1294
1815
  fill: "transparent",
1295
1816
  stroke: "none"
1296
- }), ee = u.insert(() => M, ":first-child").attr("class", "icon-shape2"), te = u.insert(() => I);
1817
+ }), I = u.insert(() => A, ":first-child").attr("class", "icon-shape2"), L = u.insert(() => F);
1297
1818
  if (n.icon) {
1298
1819
  let e = u.append("g");
1299
- e.html(`<g>${await x(n.icon, {
1820
+ e.html(`<g>${await b(n.icon, {
1300
1821
  height: c,
1301
1822
  width: c,
1302
1823
  fallbackPrefix: ""
1303
1824
  })}</g>`);
1304
1825
  let t = e.node().getBBox(), r = t.width, i = t.height, a = t.x, o = t.y;
1305
- e.attr("transform", `translate(${-r / 2 - a},${m ? d.height / 2 + k / 2 - i / 2 - o : -d.height / 2 - k / 2 - i / 2 - o})`), e.attr("style", `color: ${E.get("stroke") ?? b};`);
1826
+ e.attr("transform", `translate(${-r / 2 - a},${m ? d.height / 2 + D / 2 - i / 2 - o : -d.height / 2 - D / 2 - i / 2 - o})`), e.attr("style", `color: ${w.get("stroke") ?? x};`);
1306
1827
  }
1307
- return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -F / 2 : F / 2 - d.height})`), ee.attr("transform", `translate(0,${m ? d.height / 2 + k / 2 : -d.height / 2 - k / 2})`), T(n, te), n.intersect = function(t) {
1308
- if (e.info("iconSquare intersect", n, t), !n.label) return W.rect(n, t);
1828
+ return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -P / 2 : P / 2 - d.height})`), I.attr("transform", `translate(0,${m ? d.height / 2 + D / 2 : -d.height / 2 - D / 2})`), N(n, L), n.intersect = function(t) {
1829
+ if (e.info("iconSquare intersect", n, t), !n.label) return K.rect(n, t);
1309
1830
  let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
1310
1831
  return o = m ? [
1311
1832
  {
@@ -1318,11 +1839,11 @@ async function Re(t, n, { config: { themeVariables: r, flowchart: i } }) {
1318
1839
  },
1319
1840
  {
1320
1841
  x: r + d.width / 2,
1321
- y: i - a / 2 + d.height + k
1842
+ y: i - a / 2 + d.height + D
1322
1843
  },
1323
1844
  {
1324
1845
  x: r + v / 2,
1325
- y: i - a / 2 + d.height + k
1846
+ y: i - a / 2 + d.height + D
1326
1847
  },
1327
1848
  {
1328
1849
  x: r + v / 2,
@@ -1334,11 +1855,11 @@ async function Re(t, n, { config: { themeVariables: r, flowchart: i } }) {
1334
1855
  },
1335
1856
  {
1336
1857
  x: r - v / 2,
1337
- y: i - a / 2 + d.height + k
1858
+ y: i - a / 2 + d.height + D
1338
1859
  },
1339
1860
  {
1340
1861
  x: r - d.width / 2,
1341
- y: i - a / 2 + d.height + k
1862
+ y: i - a / 2 + d.height + D
1342
1863
  }
1343
1864
  ] : [
1344
1865
  {
@@ -1373,34 +1894,34 @@ async function Re(t, n, { config: { themeVariables: r, flowchart: i } }) {
1373
1894
  x: r - v / 2,
1374
1895
  y: i - a / 2 + h
1375
1896
  }
1376
- ], W.polygon(n, o, t);
1897
+ ], K.polygon(n, o, t);
1377
1898
  }, u;
1378
1899
  }
1379
- t(Re, "iconRounded");
1380
- async function ze(t, n, { config: { themeVariables: r, flowchart: i } }) {
1900
+ d(at, "iconRounded");
1901
+ async function ot(t, n, { config: { themeVariables: r, flowchart: i } }) {
1381
1902
  let { labelStyles: a } = _(n);
1382
1903
  n.labelStyle = a;
1383
1904
  let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1384
1905
  n.width = Math.max(c, l ?? 0);
1385
- let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await C(t, n, "icon-shape default"), m = n.pos === "t", h = c + f * 2, v = c + f * 2, { nodeBorder: b, mainBkg: w } = r, { stylesMap: E } = y(n), D = -v / 2, O = -h / 2, k = n.label ? 8 : 0, A = S.svg(u), j = g(n, {});
1386
- n.look !== "handDrawn" && (j.roughness = 0, j.fillStyle = "solid"), j.stroke = E.get("fill") ?? w;
1387
- let M = A.path(N(D, O, v, h, .1), j), P = Math.max(v, d.width), F = h + d.height + k, I = A.rectangle(-P / 2, -F / 2, P, F, {
1388
- ...j,
1906
+ let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await j(t, n, "icon-shape default"), m = n.pos === "t", h = c + f * 2, v = c + f * 2, { nodeBorder: x, mainBkg: S } = r, { stylesMap: w } = y(n), T = -v / 2, E = -h / 2, D = n.label ? 8 : 0, O = C.svg(u), k = g(n, {});
1907
+ n.look !== "handDrawn" && (k.roughness = 0, k.fillStyle = "solid"), k.stroke = w.get("fill") ?? S;
1908
+ let A = O.path(z(T, E, v, h, .1), k), M = Math.max(v, d.width), P = h + d.height + D, F = O.rectangle(-M / 2, -P / 2, M, P, {
1909
+ ...k,
1389
1910
  fill: "transparent",
1390
1911
  stroke: "none"
1391
- }), ee = u.insert(() => M, ":first-child"), te = u.insert(() => I);
1912
+ }), I = u.insert(() => A, ":first-child"), L = u.insert(() => F);
1392
1913
  if (n.icon) {
1393
1914
  let e = u.append("g");
1394
- e.html(`<g>${await x(n.icon, {
1915
+ e.html(`<g>${await b(n.icon, {
1395
1916
  height: c,
1396
1917
  width: c,
1397
1918
  fallbackPrefix: ""
1398
1919
  })}</g>`);
1399
1920
  let t = e.node().getBBox(), r = t.width, i = t.height, a = t.x, o = t.y;
1400
- e.attr("transform", `translate(${-r / 2 - a},${m ? d.height / 2 + k / 2 - i / 2 - o : -d.height / 2 - k / 2 - i / 2 - o})`), e.attr("style", `color: ${E.get("stroke") ?? b};`);
1921
+ e.attr("transform", `translate(${-r / 2 - a},${m ? d.height / 2 + D / 2 - i / 2 - o : -d.height / 2 - D / 2 - i / 2 - o})`), e.attr("style", `color: ${w.get("stroke") ?? x};`);
1401
1922
  }
1402
- return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -F / 2 : F / 2 - d.height})`), ee.attr("transform", `translate(0,${m ? d.height / 2 + k / 2 : -d.height / 2 - k / 2})`), T(n, te), n.intersect = function(t) {
1403
- if (e.info("iconSquare intersect", n, t), !n.label) return W.rect(n, t);
1923
+ return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -P / 2 : P / 2 - d.height})`), I.attr("transform", `translate(0,${m ? d.height / 2 + D / 2 : -d.height / 2 - D / 2})`), N(n, L), n.intersect = function(t) {
1924
+ if (e.info("iconSquare intersect", n, t), !n.label) return K.rect(n, t);
1404
1925
  let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
1405
1926
  return o = m ? [
1406
1927
  {
@@ -1413,11 +1934,11 @@ async function ze(t, n, { config: { themeVariables: r, flowchart: i } }) {
1413
1934
  },
1414
1935
  {
1415
1936
  x: r + d.width / 2,
1416
- y: i - a / 2 + d.height + k
1937
+ y: i - a / 2 + d.height + D
1417
1938
  },
1418
1939
  {
1419
1940
  x: r + v / 2,
1420
- y: i - a / 2 + d.height + k
1941
+ y: i - a / 2 + d.height + D
1421
1942
  },
1422
1943
  {
1423
1944
  x: r + v / 2,
@@ -1429,11 +1950,11 @@ async function ze(t, n, { config: { themeVariables: r, flowchart: i } }) {
1429
1950
  },
1430
1951
  {
1431
1952
  x: r - v / 2,
1432
- y: i - a / 2 + d.height + k
1953
+ y: i - a / 2 + d.height + D
1433
1954
  },
1434
1955
  {
1435
1956
  x: r - d.width / 2,
1436
- y: i - a / 2 + d.height + k
1957
+ y: i - a / 2 + d.height + D
1437
1958
  }
1438
1959
  ] : [
1439
1960
  {
@@ -1468,11 +1989,11 @@ async function ze(t, n, { config: { themeVariables: r, flowchart: i } }) {
1468
1989
  x: r - v / 2,
1469
1990
  y: i - a / 2 + h
1470
1991
  }
1471
- ], W.polygon(n, o, t);
1992
+ ], K.polygon(n, o, t);
1472
1993
  }, u;
1473
1994
  }
1474
- t(ze, "iconSquare");
1475
- async function Be(t, n, { config: { flowchart: r } }) {
1995
+ d(ot, "iconSquare");
1996
+ async function st(t, n, { config: { flowchart: r } }) {
1476
1997
  let i = new Image();
1477
1998
  i.src = n?.img ?? "", await i.decode();
1478
1999
  let a = Number(i.naturalWidth.toString().replace("px", "")), o = Number(i.naturalHeight.toString().replace("px", ""));
@@ -1483,19 +2004,19 @@ async function Be(t, n, { config: { flowchart: r } }) {
1483
2004
  n.defaultWidth = r?.wrappingWidth;
1484
2005
  let l = Math.max(n.label ? c ?? 0 : 0, n?.assetWidth ?? a), u = n.constraint === "on" && n?.assetHeight ? n.assetHeight * n.imageAspectRatio : l, d = n.constraint === "on" ? u / n.imageAspectRatio : n?.assetHeight ?? o;
1485
2006
  n.width = Math.max(u, c ?? 0);
1486
- let { shapeSvg: f, bbox: p, label: m } = await C(t, n, "image-shape default"), h = n.pos === "t", v = -u / 2, y = -d / 2, b = n.label ? 8 : 0, x = S.svg(f), w = g(n, {});
1487
- n.look !== "handDrawn" && (w.roughness = 0, w.fillStyle = "solid");
1488
- let E = x.rectangle(v, y, u, d, w), D = Math.max(u, p.width), O = d + p.height + b, k = x.rectangle(-D / 2, -O / 2, D, O, {
1489
- ...w,
2007
+ let { shapeSvg: f, bbox: p, label: m } = await j(t, n, "image-shape default"), h = n.pos === "t", v = -u / 2, y = -d / 2, b = n.label ? 8 : 0, x = C.svg(f), S = g(n, {});
2008
+ n.look !== "handDrawn" && (S.roughness = 0, S.fillStyle = "solid");
2009
+ let w = x.rectangle(v, y, u, d, S), T = Math.max(u, p.width), E = d + p.height + b, D = x.rectangle(-T / 2, -E / 2, T, E, {
2010
+ ...S,
1490
2011
  fill: "none",
1491
2012
  stroke: "none"
1492
- }), A = f.insert(() => E, ":first-child"), j = f.insert(() => k);
2013
+ }), O = f.insert(() => w, ":first-child"), k = f.insert(() => D);
1493
2014
  if (n.img) {
1494
2015
  let e = f.append("image");
1495
- e.attr("href", n.img), e.attr("width", u), e.attr("height", d), e.attr("preserveAspectRatio", "none"), e.attr("transform", `translate(${-u / 2},${h ? O / 2 - d : -O / 2})`);
2016
+ e.attr("href", n.img), e.attr("width", u), e.attr("height", d), e.attr("preserveAspectRatio", "none"), e.attr("transform", `translate(${-u / 2},${h ? E / 2 - d : -E / 2})`);
1496
2017
  }
1497
- return m.attr("transform", `translate(${-p.width / 2 - (p.x - (p.left ?? 0))},${h ? -d / 2 - p.height / 2 - b / 2 : d / 2 - p.height / 2 + b / 2})`), A.attr("transform", `translate(0,${h ? p.height / 2 + b / 2 : -p.height / 2 - b / 2})`), T(n, j), n.intersect = function(t) {
1498
- if (e.info("iconSquare intersect", n, t), !n.label) return W.rect(n, t);
2018
+ return m.attr("transform", `translate(${-p.width / 2 - (p.x - (p.left ?? 0))},${h ? -d / 2 - p.height / 2 - b / 2 : d / 2 - p.height / 2 + b / 2})`), O.attr("transform", `translate(0,${h ? p.height / 2 + b / 2 : -p.height / 2 - b / 2})`), N(n, k), n.intersect = function(t) {
2019
+ if (e.info("iconSquare intersect", n, t), !n.label) return K.rect(n, t);
1499
2020
  let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
1500
2021
  return o = h ? [
1501
2022
  {
@@ -1563,51 +2084,51 @@ async function Be(t, n, { config: { flowchart: r } }) {
1563
2084
  x: r - u / 2,
1564
2085
  y: i - a / 2 + d
1565
2086
  }
1566
- ], W.polygon(n, o, t);
2087
+ ], K.polygon(n, o, t);
1567
2088
  }, f;
1568
2089
  }
1569
- t(Be, "imageSquare");
1570
- async function Ve(e, t) {
2090
+ d(st, "imageSquare");
2091
+ async function ct(e, t) {
1571
2092
  let { labelStyles: n, nodeStyles: r } = _(t);
1572
2093
  t.labelStyle = n;
1573
- let i = t.padding ?? 0, a = i, o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = Math.max(c.width + (o ?? 0) * 2, t?.width ?? 0), u = Math.max(c.height + (a ?? 0) * 2, t?.height ?? 0), d = [
2094
+ let i = t.padding ?? 0, a = i, o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await j(e, t, P(t)), l = Math.max(c.height + a * 2, t.height ?? 0), u = Math.max(c.width + o * 2, (t.width ?? 0) - l), d = [
1574
2095
  {
1575
2096
  x: 0,
1576
2097
  y: 0
1577
2098
  },
1578
2099
  {
1579
- x: l,
2100
+ x: u,
1580
2101
  y: 0
1581
2102
  },
1582
2103
  {
1583
- x: l + 3 * u / 6,
1584
- y: -u
2104
+ x: u + 3 * l / 6,
2105
+ y: -l
1585
2106
  },
1586
2107
  {
1587
- x: -3 * u / 6,
1588
- y: -u
2108
+ x: -3 * l / 6,
2109
+ y: -l
1589
2110
  }
1590
2111
  ], f, { cssStyles: p } = t;
1591
2112
  if (t.look === "handDrawn") {
1592
- let e = S.svg(s), n = g(t, {}), r = D(d), i = e.path(r, n);
1593
- f = s.insert(() => i, ":first-child").attr("transform", `translate(${-l / 2}, ${u / 2})`), p && f.attr("style", p);
1594
- } else f = q(s, l, u, d);
1595
- return r && f.attr("style", r), t.width = l, t.height = u, T(t, f), t.intersect = function(e) {
1596
- return W.polygon(t, d, e);
2113
+ let e = C.svg(s), n = g(t, {}), r = F(d), i = e.path(r, n);
2114
+ f = s.insert(() => i, ":first-child").attr("transform", `translate(${-u / 2}, ${l / 2})`), p && f.attr("style", p);
2115
+ } else f = q(s, u, l, d);
2116
+ return r && f.attr("style", r), t.width = u, t.height = l, N(t, f), t.intersect = function(e) {
2117
+ return K.polygon(t, d, e);
1597
2118
  }, s;
1598
2119
  }
1599
- t(Ve, "inv_trapezoid");
1600
- async function He(e, t) {
1601
- let { shapeSvg: n, bbox: r, label: i } = await C(e, t, "label"), a = n.insert("rect", ":first-child");
1602
- return a.attr("width", .1).attr("height", .1), n.attr("class", "label edgeLabel"), i.attr("transform", `translate(${-(r.width / 2) - (r.x - (r.left ?? 0))}, ${-(r.height / 2) - (r.y - (r.top ?? 0))})`), T(t, a), t.intersect = function(e) {
1603
- return W.rect(t, e);
2120
+ d(ct, "inv_trapezoid");
2121
+ async function lt(e, t) {
2122
+ let { shapeSvg: n, bbox: r, label: i } = await j(e, t, "label"), a = n.insert("rect", ":first-child");
2123
+ return a.attr("width", .1).attr("height", .1), n.attr("class", "label edgeLabel"), i.attr("transform", `translate(${-(r.width / 2) - (r.x - (r.left ?? 0))}, ${-(r.height / 2) - (r.y - (r.top ?? 0))})`), N(t, a), t.intersect = function(e) {
2124
+ return K.rect(t, e);
1604
2125
  }, n;
1605
2126
  }
1606
- t(He, "labelRect");
1607
- async function Ue(e, t) {
2127
+ d(lt, "labelRect");
2128
+ async function ut(e, t) {
1608
2129
  let { labelStyles: n, nodeStyles: r } = _(t);
1609
2130
  t.labelStyle = n;
1610
- let i = t.padding ?? 0, a = i, o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.height ?? c.height) + a, u = (t?.width ?? c.width) + o, d = [
2131
+ let i = t.padding ?? 0, a = i, o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await j(e, t, P(t)), l = Math.max(c.height + a, t.height ?? 0), u = Math.max(c.width + o, (t.width ?? 0) - l), d = [
1611
2132
  {
1612
2133
  x: 0,
1613
2134
  y: 0
@@ -1626,18 +2147,18 @@ async function Ue(e, t) {
1626
2147
  }
1627
2148
  ], f, { cssStyles: p } = t;
1628
2149
  if (t.look === "handDrawn") {
1629
- let e = S.svg(s), n = g(t, {}), r = D(d), i = e.path(r, n);
2150
+ let e = C.svg(s), n = g(t, {}), r = F(d), i = e.path(r, n);
1630
2151
  f = s.insert(() => i, ":first-child").attr("transform", `translate(${-u / 2}, ${l / 2})`), p && f.attr("style", p);
1631
2152
  } else f = q(s, u, l, d);
1632
- return r && f.attr("style", r), t.width = u, t.height = l, T(t, f), t.intersect = function(e) {
1633
- return W.polygon(t, d, e);
2153
+ return r && f.attr("style", r), t.width = u, t.height = l, N(t, f), t.intersect = function(e) {
2154
+ return K.polygon(t, d, e);
1634
2155
  }, s;
1635
2156
  }
1636
- t(Ue, "lean_left");
1637
- async function We(e, t) {
2157
+ d(ut, "lean_left");
2158
+ async function dt(e, t) {
1638
2159
  let { labelStyles: n, nodeStyles: r } = _(t);
1639
2160
  t.labelStyle = n;
1640
- let i = t.padding ?? 0, a = i, o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.height ?? c.height) + a, u = (t?.width ?? c.width) + o, d = [
2161
+ let i = t.padding ?? 0, a = i, o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await j(e, t, P(t)), l = Math.max(c.height + a, t.height ?? 0), u = Math.max(c.width + o, (t.width ?? 0) - l), d = [
1641
2162
  {
1642
2163
  x: -3 * l / 6,
1643
2164
  y: 0
@@ -1656,18 +2177,18 @@ async function We(e, t) {
1656
2177
  }
1657
2178
  ], f, { cssStyles: p } = t;
1658
2179
  if (t.look === "handDrawn") {
1659
- let e = S.svg(s), n = g(t, {}), r = D(d), i = e.path(r, n);
2180
+ let e = C.svg(s), n = g(t, {}), r = F(d), i = e.path(r, n);
1660
2181
  f = s.insert(() => i, ":first-child").attr("transform", `translate(${-u / 2}, ${l / 2})`), p && f.attr("style", p);
1661
2182
  } else f = q(s, u, l, d);
1662
- return r && f.attr("style", r), t.width = u, t.height = l, T(t, f), t.intersect = function(e) {
1663
- return W.polygon(t, d, e);
2183
+ return r && f.attr("style", r), t.width = u, t.height = l, N(t, f), t.intersect = function(e) {
2184
+ return K.polygon(t, d, e);
1664
2185
  }, s;
1665
2186
  }
1666
- t(We, "lean_right");
1667
- function Ge(t, n) {
2187
+ d(dt, "lean_right");
2188
+ function ft(t, n) {
1668
2189
  let { labelStyles: r, nodeStyles: i } = _(n);
1669
2190
  n.label = "", n.labelStyle = r;
1670
- let a = t.insert("g").attr("class", E(n)).attr("id", n.domId ?? n.id), { cssStyles: o } = n, s = Math.max(35, n?.width ?? 0), c = Math.max(35, n?.height ?? 0), l = [
2191
+ let a = t.insert("g").attr("class", P(n)).attr("id", n.domId ?? n.id), { cssStyles: o } = n, s = Math.max(35, n?.width ?? 0), c = Math.max(35, n?.height ?? 0), l = [
1671
2192
  {
1672
2193
  x: s,
1673
2194
  y: 0
@@ -1692,15 +2213,15 @@ function Ge(t, n) {
1692
2213
  x: 14,
1693
2214
  y: c - 7 / 2
1694
2215
  }
1695
- ], u = S.svg(a), d = g(n, {});
2216
+ ], u = C.svg(a), d = g(n, {});
1696
2217
  n.look !== "handDrawn" && (d.roughness = 0, d.fillStyle = "solid");
1697
- let f = D(l), p = u.path(f, d), m = a.insert(() => p, ":first-child");
1698
- return m.attr("class", "outer-path"), o && n.look !== "handDrawn" && m.selectAll("path").attr("style", o), i && n.look !== "handDrawn" && m.selectAll("path").attr("style", i), m.attr("transform", `translate(-${s / 2},${-c})`), T(n, m), n.intersect = function(t) {
1699
- return e.info("lightningBolt intersect", n, t), W.polygon(n, l, t);
2218
+ let f = F(l), p = u.path(f, d), m = a.insert(() => p, ":first-child");
2219
+ return m.attr("class", "outer-path"), o && n.look !== "handDrawn" && m.selectAll("path").attr("style", o), i && n.look !== "handDrawn" && m.selectAll("path").attr("style", i), m.attr("transform", `translate(-${s / 2},${-c})`), N(n, m), n.intersect = function(t) {
2220
+ return e.info("lightningBolt intersect", n, t), K.polygon(n, l, t);
1700
2221
  }, a;
1701
2222
  }
1702
- t(Ge, "lightningBolt");
1703
- var Ke = /* @__PURE__ */ t((e, t, n, r, i, a, o) => [
2223
+ d(ft, "lightningBolt");
2224
+ var pt = /* @__PURE__ */ d((e, t, n, r, i, a, o) => [
1704
2225
  `M${e},${t + a}`,
1705
2226
  `a${i},${a} 0,0,0 ${n},0`,
1706
2227
  `a${i},${a} 0,0,0 ${-n},0`,
@@ -1709,7 +2230,7 @@ var Ke = /* @__PURE__ */ t((e, t, n, r, i, a, o) => [
1709
2230
  `l0,${-r}`,
1710
2231
  `M${e},${t + a + o}`,
1711
2232
  `a${i},${a} 0,0,0 ${n},0`
1712
- ].join(" "), "createCylinderPathD"), qe = /* @__PURE__ */ t((e, t, n, r, i, a, o) => [
2233
+ ].join(" "), "createCylinderPathD"), mt = /* @__PURE__ */ d((e, t, n, r, i, a, o) => [
1713
2234
  `M${e},${t + a}`,
1714
2235
  `M${e + n},${t + a}`,
1715
2236
  `a${i},${a} 0,0,0 ${-n},0`,
@@ -1718,27 +2239,27 @@ var Ke = /* @__PURE__ */ t((e, t, n, r, i, a, o) => [
1718
2239
  `l0,${-r}`,
1719
2240
  `M${e},${t + a + o}`,
1720
2241
  `a${i},${a} 0,0,0 ${n},0`
1721
- ].join(" "), "createOuterCylinderPathD"), Je = /* @__PURE__ */ t((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD"), Ye = 10, Xe = 10;
1722
- async function Ze(e, t) {
2242
+ ].join(" "), "createOuterCylinderPathD"), ht = /* @__PURE__ */ d((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD"), gt = 10, _t = 10;
2243
+ async function vt(e, t) {
1723
2244
  let { labelStyles: n, nodeStyles: r } = _(t);
1724
2245
  t.labelStyle = n;
1725
2246
  let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 24 : i;
1726
2247
  if (t.width || t.height) {
1727
2248
  let e = t.width ?? 0;
1728
- t.width = (t.width ?? 0) - a, t.width < Xe && (t.width = Xe);
2249
+ t.width = (t.width ?? 0) - a, t.width < _t && (t.width = _t);
1729
2250
  let n = e / 2 / (2.5 + e / 50);
1730
- t.height = (t.height ?? 0) - o - n * 3, t.height < Ye && (t.height = Ye);
2251
+ t.height = (t.height ?? 0) - o - n * 3, t.height < gt && (t.height = gt);
1731
2252
  }
1732
- let { shapeSvg: s, bbox: c, label: l } = await C(e, t, E(t)), u = (t?.width ? t?.width : c.width) + a * 2, d = u / 2, f = d / (2.5 + u / 50), m = (t?.height ? t?.height : c.height) + f + o * 2, h = m * .1, v, { cssStyles: y } = t;
2253
+ let { shapeSvg: s, bbox: c, label: l } = await j(e, t, P(t)), u = (t?.width ? t?.width : c.width) + a * 2, d = u / 2, f = d / (2.5 + u / 50), p = (t?.height ? t?.height : c.height) + f + o * 2, m = p * .1, v, { cssStyles: y } = t;
1733
2254
  if (t.look === "handDrawn") {
1734
- let e = S.svg(s), n = qe(0, 0, u, m, d, f, h), r = Je(0, f, u, m, d, f), i = g(t, {}), a = e.path(n, i), o = e.path(r, i);
2255
+ let e = C.svg(s), n = mt(0, 0, u, p, d, f, m), r = ht(0, f, u, p, d, f), i = g(t, {}), a = e.path(n, i), o = e.path(r, i);
1735
2256
  s.insert(() => o, ":first-child").attr("class", "line"), v = s.insert(() => a, ":first-child"), v.attr("class", "basic label-container"), y && v.attr("style", y);
1736
2257
  } else {
1737
- let e = Ke(0, 0, u, m, d, f, h);
1738
- v = s.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container outer-path").attr("style", p(y)).attr("style", r);
2258
+ let e = pt(0, 0, u, p, d, f, m);
2259
+ v = s.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container outer-path").attr("style", h(y)).attr("style", r);
1739
2260
  }
1740
- return v.attr("label-offset-y", f), v.attr("transform", `translate(${-u / 2}, ${-(m / 2 + f)})`), T(t, v), l.attr("transform", `translate(${-(c.width / 2) - (c.x - (c.left ?? 0))}, ${-(c.height / 2) + f - (c.y - (c.top ?? 0))})`), t.intersect = function(e) {
1741
- let n = W.rect(t, e), r = n.x - (t.x ?? 0);
2261
+ return v.attr("label-offset-y", f), v.attr("transform", `translate(${-u / 2}, ${-(p / 2 + f)})`), N(t, v), l.attr("transform", `translate(${-(c.width / 2) - (c.x - (c.left ?? 0))}, ${-(c.height / 2) + f - (c.y - (c.top ?? 0))})`), t.intersect = function(e) {
2262
+ let n = K.rect(t, e), r = n.x - (t.x ?? 0);
1742
2263
  if (d != 0 && (Math.abs(r) < (t.width ?? 0) / 2 || Math.abs(r) == (t.width ?? 0) / 2 && Math.abs(n.y - (t.y ?? 0)) > (t.height ?? 0) / 2 - f)) {
1743
2264
  let i = f * f * (1 - r * r / (d * d));
1744
2265
  i > 0 && (i = Math.sqrt(i)), i = f - i, e.y - (t.y ?? 0) > 0 && (i = -i), n.y += i;
@@ -1746,13 +2267,13 @@ async function Ze(e, t) {
1746
2267
  return n;
1747
2268
  }, s;
1748
2269
  }
1749
- t(Ze, "linedCylinder");
1750
- async function Qe(e, t) {
2270
+ d(vt, "linedCylinder");
2271
+ async function yt(e, t) {
1751
2272
  let { labelStyles: n, nodeStyles: r } = _(t);
1752
2273
  t.labelStyle = n;
1753
2274
  let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
1754
2275
  (t.width || t.height) && (t.width = (t.width ?? 0) * 10 / 11 - a * 2, t.width < 10 && (t.width = 10), t.height = (t?.height ?? 0) - o * 2, t.height < 10 && (t.height = 10));
1755
- let { shapeSvg: s, bbox: c, label: l } = await C(e, t, E(t)), u = (t?.width ? t?.width : c.width) + (a ?? 0) * 2, d = (t?.height ? t?.height : c.height) + (o ?? 0) * 2, f = t.look === "neo" ? d / 4 : d / 8, p = d + f, { cssStyles: m } = t, h = S.svg(s), v = g(t, {});
2276
+ let { shapeSvg: s, bbox: c, label: l } = await j(e, t, P(t)), u = (t?.width ? t?.width : c.width) + (a ?? 0) * 2, d = (t?.height ? t?.height : c.height) + (o ?? 0) * 2, f = t.look === "neo" ? d / 4 : d / 8, p = d + f, { cssStyles: m } = t, h = C.svg(s), v = g(t, {});
1756
2277
  t.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
1757
2278
  let y = [
1758
2279
  {
@@ -1763,7 +2284,7 @@ async function Qe(e, t) {
1763
2284
  x: -u / 2 - u / 2 * .1,
1764
2285
  y: p / 2
1765
2286
  },
1766
- ...O(-u / 2 - u / 2 * .1, p / 2, u / 2 + u / 2 * .1, p / 2, f, .8),
2287
+ ...I(-u / 2 - u / 2 * .1, p / 2, u / 2 + u / 2 * .1, p / 2, f, .8),
1767
2288
  {
1768
2289
  x: u / 2 + u / 2 * .1,
1769
2290
  y: -p / 2
@@ -1785,17 +2306,17 @@ async function Qe(e, t) {
1785
2306
  y: -p / 2
1786
2307
  }
1787
2308
  ], b = h.polygon(y.map((e) => [e.x, e.y]), v), x = s.insert(() => b, ":first-child");
1788
- return x.attr("class", "basic label-container outer-path"), m && t.look !== "handDrawn" && x.selectAll("path").attr("style", m), r && t.look !== "handDrawn" && x.selectAll("path").attr("style", r), x.attr("transform", `translate(0,${-f / 2})`), l.attr("transform", `translate(${-u / 2 + (t.padding ?? 0) + u / 2 * .1 / 2 - (c.x - (c.left ?? 0))},${-d / 2 + (t.padding ?? 0) - f / 2 - (c.y - (c.top ?? 0))})`), T(t, x), t.intersect = function(e) {
1789
- return W.polygon(t, y, e);
2309
+ return x.attr("class", "basic label-container outer-path"), m && t.look !== "handDrawn" && x.selectAll("path").attr("style", m), r && t.look !== "handDrawn" && x.selectAll("path").attr("style", r), x.attr("transform", `translate(0,${-f / 2})`), l.attr("transform", `translate(${-u / 2 + (t.padding ?? 0) + u / 2 * .1 / 2 - (c.x - (c.left ?? 0))},${-d / 2 + (t.padding ?? 0) - f / 2 - (c.y - (c.top ?? 0))})`), N(t, x), t.intersect = function(e) {
2310
+ return K.polygon(t, y, e);
1790
2311
  }, s;
1791
2312
  }
1792
- t(Qe, "linedWaveEdgedRect");
1793
- async function $e(e, t) {
2313
+ d(yt, "linedWaveEdgedRect");
2314
+ async function bt(e, t) {
1794
2315
  let { labelStyles: n, nodeStyles: r } = _(t);
1795
2316
  t.labelStyle = n;
1796
2317
  let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i, s = t.look === "neo" ? 10 : 5;
1797
2318
  (t.width || t.height) && (t.width = Math.max((t?.width ?? 0) - a * 2 - 2 * s, 10), t.height = Math.max((t?.height ?? 0) - o * 2 - 2 * s, 10));
1798
- let { shapeSvg: c, bbox: l, label: u } = await C(e, t, E(t)), d = (t?.width ? t?.width : l.width) + a * 2 + 2 * s, f = (t?.height ? t?.height : l.height) + o * 2 + 2 * s, p = d - 2 * s, m = f - 2 * s, h = -p / 2, v = -m / 2, { cssStyles: y } = t, b = S.svg(c), x = g(t, {}), w = [
2319
+ let { shapeSvg: c, bbox: l, label: u } = await j(e, t, P(t)), d = (t?.width ? t?.width : l.width) + a * 2 + 2 * s, f = (t?.height ? t?.height : l.height) + o * 2 + 2 * s, p = d - 2 * s, m = f - 2 * s, h = -p / 2, v = -m / 2, { cssStyles: y } = t, b = C.svg(c), x = g(t, {}), S = [
1799
2320
  {
1800
2321
  x: h - s,
1801
2322
  y: v + s
@@ -1844,7 +2365,7 @@ async function $e(e, t) {
1844
2365
  x: h,
1845
2366
  y: v + s
1846
2367
  }
1847
- ], O = [
2368
+ ], w = [
1848
2369
  {
1849
2370
  x: h,
1850
2371
  y: v + s
@@ -1871,20 +2392,20 @@ async function $e(e, t) {
1871
2392
  }
1872
2393
  ];
1873
2394
  t.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
1874
- let k = D(w), j = b.path(k, x), M = D(O), N = b.path(M, x);
1875
- t.look !== "handDrawn" && (j = A(j), N = A(N));
1876
- let P = c.insert("g", ":first-child");
1877
- return P.insert(() => j), P.insert(() => N), P.attr("class", "basic label-container outer-path"), y && t.look !== "handDrawn" && P.selectAll("path").attr("style", y), r && t.look !== "handDrawn" && P.selectAll("path").attr("style", r), u.attr("transform", `translate(${-(l.width / 2) - s - (l.x - (l.left ?? 0))}, ${-(l.height / 2) + s - (l.y - (l.top ?? 0))})`), T(t, P), t.intersect = function(e) {
1878
- return W.polygon(t, w, e);
2395
+ let T = F(S), E = b.path(T, x), D = F(w), O = b.path(D, x);
2396
+ t.look !== "handDrawn" && (E = ee(E), O = ee(O));
2397
+ let k = c.insert("g", ":first-child");
2398
+ return k.insert(() => E), k.insert(() => O), k.attr("class", "basic label-container outer-path"), y && t.look !== "handDrawn" && k.selectAll("path").attr("style", y), r && t.look !== "handDrawn" && k.selectAll("path").attr("style", r), u.attr("transform", `translate(${-(l.width / 2) - s - (l.x - (l.left ?? 0))}, ${-(l.height / 2) + s - (l.y - (l.top ?? 0))})`), N(t, k), t.intersect = function(e) {
2399
+ return K.polygon(t, S, e);
1879
2400
  }, c;
1880
2401
  }
1881
- t($e, "multiRect");
1882
- async function et(e, t) {
2402
+ d(bt, "multiRect");
2403
+ async function xt(e, t) {
1883
2404
  let { labelStyles: n, nodeStyles: r } = _(t);
1884
2405
  t.labelStyle = n;
1885
- let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = t.padding ?? 0, c = t.look === "neo" ? 16 : s, l = t.look === "neo" ? 12 : s, u = !0;
2406
+ let { shapeSvg: i, bbox: a, label: o } = await j(e, t, P(t)), s = t.padding ?? 0, c = t.look === "neo" ? 16 : s, l = t.look === "neo" ? 12 : s, u = !0;
1886
2407
  (t.width || t.height) && (u = !1, t.width = (t?.width ?? 0) - c * 2, t.height = (t?.height ?? 0) - l * 3);
1887
- let d = Math.max(a.width, t?.width ?? 0) + c * 2, f = Math.max(a.height, t?.height ?? 0) + l * 3, p = t.look === "neo" ? f / 4 : f / 8, m = f + (u ? p / 2 : -p / 2), h = -d / 2, v = -m / 2, { cssStyles: y } = t, b = O(h - 10, v + m + 10, h + d - 10, v + m + 10, p, .8), x = b?.[b.length - 1], w = [
2408
+ let d = Math.max(a.width, t?.width ?? 0) + c * 2, f = Math.max(a.height, t?.height ?? 0) + l * 3, p = t.look === "neo" ? f / 4 : f / 8, m = f + (u ? p / 2 : -p / 2), h = -d / 2, v = -m / 2, { cssStyles: y } = t, b = I(h - 10, v + m + 10, h + d - 10, v + m + 10, p, .8), x = b?.[b.length - 1], S = [
1888
2409
  {
1889
2410
  x: h - 10,
1890
2411
  y: v + 10
@@ -1930,7 +2451,7 @@ async function et(e, t) {
1930
2451
  x: h,
1931
2452
  y: v + 10
1932
2453
  }
1933
- ], k = [
2454
+ ], w = [
1934
2455
  {
1935
2456
  x: h,
1936
2457
  y: v + 10
@@ -1955,39 +2476,39 @@ async function et(e, t) {
1955
2476
  x: h,
1956
2477
  y: v
1957
2478
  }
1958
- ], A = S.svg(i), j = g(t, {});
1959
- t.look !== "handDrawn" && (j.roughness = 0, j.fillStyle = "solid");
1960
- let M = D(w), N = A.path(M, j), P = D(k), F = A.path(P, j), I = i.insert(() => N, ":first-child");
1961
- return I.insert(() => F), I.attr("class", "basic label-container outer-path"), y && t.look !== "handDrawn" && I.selectAll("path").attr("style", y), r && t.look !== "handDrawn" && I.selectAll("path").attr("style", r), I.attr("transform", `translate(0,${-p / 2})`), o.attr("transform", `translate(${-(a.width / 2) - 10 - (a.x - (a.left ?? 0))}, ${-(a.height / 2) + 10 - p / 2 - (a.y - (a.top ?? 0))})`), T(t, I), t.intersect = function(e) {
1962
- return W.polygon(t, w, e);
2479
+ ], T = C.svg(i), E = g(t, {});
2480
+ t.look !== "handDrawn" && (E.roughness = 0, E.fillStyle = "solid");
2481
+ let D = F(S), O = T.path(D, E), k = F(w), A = T.path(k, E), M = i.insert(() => O, ":first-child");
2482
+ return M.insert(() => A), M.attr("class", "basic label-container outer-path"), y && t.look !== "handDrawn" && M.selectAll("path").attr("style", y), r && t.look !== "handDrawn" && M.selectAll("path").attr("style", r), M.attr("transform", `translate(0,${-p / 2})`), o.attr("transform", `translate(${-(a.width / 2) - 10 - (a.x - (a.left ?? 0))}, ${-(a.height / 2) + 10 - p / 2 - (a.y - (a.top ?? 0))})`), N(t, M), t.intersect = function(e) {
2483
+ return K.polygon(t, S, e);
1963
2484
  }, i;
1964
2485
  }
1965
- t(et, "multiWaveEdgedRectangle");
1966
- async function tt(e, t, { config: { themeVariables: n } }) {
2486
+ d(xt, "multiWaveEdgedRectangle");
2487
+ async function St(e, t, { config: { themeVariables: n } }) {
1967
2488
  let { labelStyles: r, nodeStyles: i } = _(t);
1968
- t.labelStyle = r, t.useHtmlLabels || o(s()) || (t.centerLabel = !0);
1969
- let { shapeSvg: a, bbox: c, label: l } = await C(e, t, E(t)), u = Math.max(c.width + (t.padding ?? 0) * 2, t?.width ?? 0), d = Math.max(c.height + (t.padding ?? 0) * 2, t?.height ?? 0), f = -u / 2, p = -d / 2, { cssStyles: m } = t, h = S.svg(a), v = g(t, {
2489
+ t.labelStyle = r, t.useHtmlLabels || a(o()) || (t.centerLabel = !0);
2490
+ let { shapeSvg: s, bbox: c, label: l } = await j(e, t, P(t)), u = Math.max(c.width + (t.padding ?? 0) * 2, t?.width ?? 0), d = Math.max(c.height + (t.padding ?? 0) * 2, t?.height ?? 0), f = -u / 2, p = -d / 2, { cssStyles: m } = t, h = C.svg(s), v = g(t, {
1970
2491
  fill: n.noteBkgColor,
1971
2492
  stroke: n.noteBorderColor
1972
2493
  });
1973
2494
  t.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
1974
- let y = h.rectangle(f, p, u, d, v), b = a.insert(() => y, ":first-child");
1975
- return b.attr("class", "basic label-container outer-path"), l.attr("class", "label noteLabel"), m && t.look !== "handDrawn" && b.selectAll("path").attr("style", m), i && t.look !== "handDrawn" && b.selectAll("path").attr("style", i), l.attr("transform", `translate(${-c.width / 2 - (c.x - (c.left ?? 0))}, ${-(c.height / 2) - (c.y - (c.top ?? 0))})`), T(t, b), t.intersect = function(e) {
1976
- return W.rect(t, e);
1977
- }, a;
2495
+ let y = h.rectangle(f, p, u, d, v), b = s.insert(() => y, ":first-child");
2496
+ return b.attr("class", "basic label-container outer-path"), l.attr("class", "label noteLabel"), m && t.look !== "handDrawn" && b.selectAll("path").attr("style", m), i && t.look !== "handDrawn" && b.selectAll("path").attr("style", i), l.attr("transform", `translate(${-c.width / 2 - (c.x - (c.left ?? 0))}, ${-(c.height / 2) - (c.y - (c.top ?? 0))})`), N(t, b), t.intersect = function(e) {
2497
+ return K.rect(t, e);
2498
+ }, s;
1978
2499
  }
1979
- t(tt, "note");
1980
- var nt = /* @__PURE__ */ t((e, t, n) => [
2500
+ d(St, "note");
2501
+ var Ct = /* @__PURE__ */ d((e, t, n) => [
1981
2502
  `M${e + n / 2},${t}`,
1982
2503
  `L${e + n},${t - n / 2}`,
1983
2504
  `L${e + n / 2},${t - n}`,
1984
2505
  `L${e},${t - n / 2}`,
1985
2506
  "Z"
1986
2507
  ].join(" "), "createDecisionBoxPathD");
1987
- async function rt(e, t) {
2508
+ async function wt(e, t) {
1988
2509
  let { labelStyles: n, nodeStyles: r } = _(t);
1989
2510
  t.labelStyle = n;
1990
- let { shapeSvg: i, bbox: a } = await C(e, t, E(t)), o = a.width + (t.padding ?? 0) + (a.height + (t.padding ?? 0)), s = .5, c = [
2511
+ let { shapeSvg: i, bbox: a } = await j(e, t, P(t)), o = a.width + (t.padding ?? 0) + (a.height + (t.padding ?? 0)), s = .5, c = [
1991
2512
  {
1992
2513
  x: o / 2,
1993
2514
  y: 0
@@ -2006,10 +2527,10 @@ async function rt(e, t) {
2006
2527
  }
2007
2528
  ], l, { cssStyles: u } = t;
2008
2529
  if (t.look === "handDrawn") {
2009
- let e = S.svg(i), n = g(t, {}), r = nt(0, 0, o), a = e.path(r, n);
2530
+ let e = C.svg(i), n = g(t, {}), r = Ct(0, 0, o), a = e.path(r, n);
2010
2531
  l = i.insert(() => a, ":first-child").attr("transform", `translate(${-o / 2 + s}, ${o / 2})`), u && l.attr("style", u);
2011
2532
  } else l = q(i, o, o, c), l.attr("transform", `translate(${-o / 2 + s}, ${o / 2})`);
2012
- return r && l.attr("style", r), T(t, l), t.calcIntersect = function(e, t) {
2533
+ return r && l.attr("style", r), N(t, l), t.calcIntersect = function(e, t) {
2013
2534
  let n = e.width, r = [
2014
2535
  {
2015
2536
  x: n / 2,
@@ -2027,7 +2548,7 @@ async function rt(e, t) {
2027
2548
  x: 0,
2028
2549
  y: -n / 2
2029
2550
  }
2030
- ], i = W.polygon(e, r, t);
2551
+ ], i = K.polygon(e, r, t);
2031
2552
  return {
2032
2553
  x: i.x - .5,
2033
2554
  y: i.y - .5
@@ -2036,70 +2557,70 @@ async function rt(e, t) {
2036
2557
  return this.calcIntersect(t, e);
2037
2558
  }, i;
2038
2559
  }
2039
- t(rt, "question");
2040
- async function it(e, t) {
2560
+ d(wt, "question");
2561
+ async function Tt(e, t) {
2041
2562
  let { labelStyles: n, nodeStyles: r } = _(t);
2042
2563
  t.labelStyle = n;
2043
- let i = t.padding ?? 0, a = t.look === "neo" ? 21 : i ?? 0, o = t.look === "neo" ? 12 : i ?? 0, { shapeSvg: s, bbox: c, label: l } = await C(e, t, E(t)), u = (t?.width ?? c.width) + (t.look === "neo" ? a * 2 : a), d = (t?.height ?? c.height) + (t.look === "neo" ? o * 2 : o), f = -u / 2, p = -d / 2, m = p / 2, h = [
2564
+ let i = t.padding ?? 0, a = t.look === "neo" ? 21 : i ?? 0, o = t.look === "neo" ? 12 : i ?? 0, { shapeSvg: s, bbox: c, label: l } = await j(e, t, P(t)), u = c.width + (t.look === "neo" ? a * 2 : a), d = Math.max(c.height + (t.look === "neo" ? o * 2 : o), t.height ?? 0), f = d / 4, p = -Math.max(u, (t.width ?? 0) - f) / 2, m = -d / 2, h = m / 2, v = [
2044
2565
  {
2045
- x: f + m,
2046
- y: p
2566
+ x: p + h,
2567
+ y: m
2047
2568
  },
2048
2569
  {
2049
- x: f,
2570
+ x: p,
2050
2571
  y: 0
2051
2572
  },
2052
2573
  {
2053
- x: f + m,
2054
- y: -p
2574
+ x: p + h,
2575
+ y: -m
2055
2576
  },
2056
2577
  {
2057
- x: -f,
2058
- y: -p
2578
+ x: -p,
2579
+ y: -m
2059
2580
  },
2060
2581
  {
2061
- x: -f,
2062
- y: p
2582
+ x: -p,
2583
+ y: m
2063
2584
  }
2064
- ], { cssStyles: v } = t, y = S.svg(s), b = g(t, {});
2065
- t.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid");
2066
- let x = D(h), w = y.path(x, b), O = s.insert(() => w, ":first-child");
2067
- return O.attr("class", "basic label-container outer-path"), v && t.look !== "handDrawn" && O.selectAll("path").attr("style", v), r && t.look !== "handDrawn" && O.selectAll("path").attr("style", r), O.attr("transform", `translate(${-m / 2},0)`), l.attr("transform", `translate(${-m / 2 - c.width / 2 - (c.x - (c.left ?? 0))}, ${-(c.height / 2) - (c.y - (c.top ?? 0))})`), T(t, O), t.intersect = function(e) {
2068
- return W.polygon(t, h, e);
2585
+ ], { cssStyles: y } = t, b = C.svg(s), x = g(t, {});
2586
+ t.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
2587
+ let S = F(v), w = b.path(S, x), T = s.insert(() => w, ":first-child");
2588
+ return T.attr("class", "basic label-container outer-path"), y && t.look !== "handDrawn" && T.selectAll("path").attr("style", y), r && t.look !== "handDrawn" && T.selectAll("path").attr("style", r), T.attr("transform", `translate(${-h / 2},0)`), l.attr("transform", `translate(${-h / 2 - c.width / 2 - (c.x - (c.left ?? 0))}, ${-(c.height / 2) - (c.y - (c.top ?? 0))})`), N(t, T), t.intersect = function(e) {
2589
+ return K.polygon(t, v, e);
2069
2590
  }, s;
2070
2591
  }
2071
- t(it, "rect_left_inv_arrow");
2072
- async function at(t, r) {
2073
- let { labelStyles: i, nodeStyles: a } = _(r);
2592
+ d(Tt, "rect_left_inv_arrow");
2593
+ async function Et(n, r) {
2594
+ let { labelStyles: i, nodeStyles: o } = _(r);
2074
2595
  r.labelStyle = i;
2075
2596
  let s;
2076
2597
  s = r.cssClasses ? "node " + r.cssClasses : "node default";
2077
- let c = t.insert("g").attr("class", s).attr("id", r.domId || r.id), u = c.insert("g"), d = c.insert("g").attr("class", "label").attr("style", a), f = r.description, p = r.label, m = await M(d, p, r.labelStyle, !0, !0), h = {
2598
+ let c = n.insert("g").attr("class", s).attr("id", r.domId || r.id), u = c.insert("g"), d = c.insert("g").attr("class", "label").attr("style", o), f = r.description, p = r.label, m = await te(d, p, r.labelStyle, !0, !0), h = {
2078
2599
  width: 0,
2079
2600
  height: 0
2080
2601
  };
2081
- if (o(l())) {
2082
- let e = m.children[0], t = n(m);
2083
- h = e.getBoundingClientRect(), t.attr("width", h.width), t.attr("height", h.height);
2602
+ if (a(l())) {
2603
+ let e = m.children[0], n = t(m);
2604
+ h = e.getBoundingClientRect(), n.attr("width", h.width), n.attr("height", h.height);
2084
2605
  }
2085
2606
  e.info("Text 2", f);
2086
- let v = f || [], y = m.getBBox(), b = await M(d, Array.isArray(v) ? v.join("<br/>") : v, r.labelStyle, !0, !0), x = b.children[0], C = n(b);
2087
- h = x.getBoundingClientRect(), C.attr("width", h.width), C.attr("height", h.height);
2607
+ let v = f || [], y = m.getBBox(), b = await te(d, Array.isArray(v) ? v.join("<br/>") : v, r.labelStyle, !0, !0), x = b.children[0], S = t(b);
2608
+ h = x.getBoundingClientRect(), S.attr("width", h.width), S.attr("height", h.height);
2088
2609
  let w = (r.padding || 0) / 2;
2089
- n(b).attr("transform", "translate( " + (h.width > y.width ? 0 : (y.width - h.width) / 2) + ", " + (y.height + w + 5) + ")"), n(m).attr("transform", "translate( " + (h.width < y.width ? 0 : -(y.width - h.width) / 2) + ", 0)"), h = d.node().getBBox(), d.attr("transform", "translate(" + -h.width / 2 + ", " + (-h.height / 2 - w + 3) + ")");
2090
- let E = h.width + (r.padding || 0), D = h.height + (r.padding || 0), O = -h.width / 2 - w, k = -h.height / 2 - w, A, j;
2610
+ t(b).attr("transform", "translate( " + (h.width > y.width ? 0 : (y.width - h.width) / 2) + ", " + (y.height + w + 5) + ")"), t(m).attr("transform", "translate( " + (h.width < y.width ? 0 : -(y.width - h.width) / 2) + ", 0)"), h = d.node().getBBox(), d.attr("transform", "translate(" + -h.width / 2 + ", " + (-h.height / 2 - w + 3) + ")");
2611
+ let T = h.width + (r.padding || 0), E = h.height + (r.padding || 0), D = -h.width / 2 - w, O = -h.height / 2 - w, k, A;
2091
2612
  if (r.look === "handDrawn") {
2092
- let t = S.svg(c), n = g(r, {}), i = t.path(N(O, k, E, D, r.rx || 0), n), a = t.line(-h.width / 2 - w, -h.height / 2 - w + y.height + w, h.width / 2 + w, -h.height / 2 - w + y.height + w, n);
2093
- j = c.insert(() => (e.debug("Rough node insert CXC", i), a), ":first-child"), A = c.insert(() => (e.debug("Rough node insert CXC", i), i), ":first-child");
2094
- } else A = u.insert("rect", ":first-child"), j = u.insert("line"), A.attr("class", "outer title-state").attr("style", a).attr("x", -h.width / 2 - w).attr("y", -h.height / 2 - w).attr("width", h.width + (r.padding || 0)).attr("height", h.height + (r.padding || 0)), j.attr("class", "divider").attr("x1", -h.width / 2 - w).attr("x2", h.width / 2 + w).attr("y1", -h.height / 2 - w + y.height + w).attr("y2", -h.height / 2 - w + y.height + w);
2095
- return T(r, A), r.intersect = function(e) {
2096
- return W.rect(r, e);
2613
+ let t = C.svg(c), n = g(r, {}), i = t.path(z(D, O, T, E, r.rx || 0), n), a = t.line(-h.width / 2 - w, -h.height / 2 - w + y.height + w, h.width / 2 + w, -h.height / 2 - w + y.height + w, n);
2614
+ A = c.insert(() => (e.debug("Rough node insert CXC", i), a), ":first-child"), k = c.insert(() => (e.debug("Rough node insert CXC", i), i), ":first-child");
2615
+ } else k = u.insert("rect", ":first-child"), A = u.insert("line"), k.attr("class", "outer title-state").attr("style", o).attr("x", -h.width / 2 - w).attr("y", -h.height / 2 - w).attr("width", h.width + (r.padding || 0)).attr("height", h.height + (r.padding || 0)), A.attr("class", "divider").attr("x1", -h.width / 2 - w).attr("x2", h.width / 2 + w).attr("y1", -h.height / 2 - w + y.height + w).attr("y2", -h.height / 2 - w + y.height + w);
2616
+ return N(r, k), r.intersect = function(e) {
2617
+ return K.rect(r, e);
2097
2618
  }, c;
2098
2619
  }
2099
- t(at, "rectWithTitle");
2100
- async function ot(e, t, { config: { themeVariables: n } }) {
2620
+ d(Et, "rectWithTitle");
2621
+ async function Dt(e, t, { config: { themeVariables: n } }) {
2101
2622
  let r = n?.radius ?? 5;
2102
- return Ce(e, t, {
2623
+ return Ue(e, t, {
2103
2624
  rx: r,
2104
2625
  ry: r,
2105
2626
  classes: "",
@@ -2107,54 +2628,54 @@ async function ot(e, t, { config: { themeVariables: n } }) {
2107
2628
  labelPaddingY: (t?.padding ?? 0) * 1
2108
2629
  });
2109
2630
  }
2110
- t(ot, "roundedRect");
2631
+ d(Dt, "roundedRect");
2111
2632
  var Z = 8;
2112
- async function st(e, t) {
2633
+ async function Ot(e, t) {
2113
2634
  let { labelStyles: n, nodeStyles: r } = _(t);
2114
2635
  t.labelStyle = n;
2115
- let i = t.look === "neo" ? 16 : t.padding ?? 0, a = t.look === "neo" ? 12 : t.padding ?? 0, { shapeSvg: o, bbox: s, label: c } = await C(e, t, E(t)), l = (t?.width ?? s.width) + i * 2 + (t.look === "neo" ? Z : Z * 2), u = (t?.height ?? s.height) + a * 2, d = l - Z, f = u, m = Z - l / 2, h = -u / 2, { cssStyles: v } = t, y = S.svg(o), b = g(t, {});
2636
+ let i = t.look === "neo" ? 16 : t.padding ?? 0, a = t.look === "neo" ? 12 : t.padding ?? 0, { shapeSvg: o, bbox: s, label: c } = await j(e, t, P(t)), l = (t?.width ?? s.width) + i * 2 + (t.look === "neo" ? Z : Z * 2), u = (t?.height ?? s.height) + a * 2, d = l - Z, f = u, p = Z - l / 2, m = -u / 2, { cssStyles: v } = t, y = C.svg(o), b = g(t, {});
2116
2637
  t.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid");
2117
2638
  let x = [
2118
2639
  {
2119
- x: m,
2120
- y: h
2640
+ x: p,
2641
+ y: m
2121
2642
  },
2122
2643
  {
2123
- x: m + d,
2124
- y: h
2644
+ x: p + d,
2645
+ y: m
2125
2646
  },
2126
2647
  {
2127
- x: m + d,
2128
- y: h + f
2648
+ x: p + d,
2649
+ y: m + f
2129
2650
  },
2130
2651
  {
2131
- x: m - Z,
2132
- y: h + f
2652
+ x: p - Z,
2653
+ y: m + f
2133
2654
  },
2134
2655
  {
2135
- x: m - Z,
2136
- y: h
2656
+ x: p - Z,
2657
+ y: m
2137
2658
  },
2138
2659
  {
2139
- x: m,
2140
- y: h
2660
+ x: p,
2661
+ y: m
2141
2662
  },
2142
2663
  {
2143
- x: m,
2144
- y: h + f
2664
+ x: p,
2665
+ y: m + f
2145
2666
  }
2146
- ], w = y.polygon(x.map((e) => [e.x, e.y]), b), D = o.insert(() => w, ":first-child");
2147
- return D.attr("class", "basic label-container outer-path").attr("style", p(v)), r && t.look !== "handDrawn" && D.selectAll("path").attr("style", r), v && t.look !== "handDrawn" && D.selectAll("path").attr("style", r), c.attr("transform", `translate(${Z / 2 - s.width / 2 - (s.x - (s.left ?? 0))}, ${-(s.height / 2) - (s.y - (s.top ?? 0))})`), T(t, D), t.intersect = function(e) {
2148
- return W.rect(t, e);
2667
+ ], S = y.polygon(x.map((e) => [e.x, e.y]), b), w = o.insert(() => S, ":first-child");
2668
+ return w.attr("class", "basic label-container outer-path").attr("style", h(v)), r && t.look !== "handDrawn" && w.selectAll("path").attr("style", r), v && t.look !== "handDrawn" && w.selectAll("path").attr("style", r), c.attr("transform", `translate(${Z / 2 - s.width / 2 - (s.x - (s.left ?? 0))}, ${-(s.height / 2) - (s.y - (s.top ?? 0))})`), N(t, w), t.intersect = function(e) {
2669
+ return K.rect(t, e);
2149
2670
  }, o;
2150
2671
  }
2151
- t(st, "shadedProcess");
2152
- async function ct(e, t) {
2672
+ d(Ot, "shadedProcess");
2673
+ async function kt(e, t) {
2153
2674
  let { labelStyles: n, nodeStyles: r } = _(t);
2154
2675
  t.labelStyle = n;
2155
2676
  let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
2156
2677
  (t.width || t.height) && (t.width = Math.max((t?.width ?? 0) - a * 2, 10), t.height = Math.max((t?.height ?? 0) / 1.5 - o * 2, 10));
2157
- let { shapeSvg: s, bbox: c, label: l } = await C(e, t, E(t)), u = (t?.width ? t?.width : c.width) + a * 2, d = ((t?.height ? t?.height : c.height) + o * 2) * 1.5, f = u, p = d / 1.5, m = -f / 2, h = -p / 2, { cssStyles: v } = t, y = S.svg(s), b = g(t, {});
2678
+ let { shapeSvg: s, bbox: c, label: l } = await j(e, t, P(t)), u = (t?.width ? t?.width : c.width) + a * 2, d = ((t?.height ? t?.height : c.height) + o * 2) * 1.5, f = u, p = d / 1.5, m = -f / 2, h = -p / 2, { cssStyles: v } = t, y = C.svg(s), b = g(t, {});
2158
2679
  t.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid");
2159
2680
  let x = [
2160
2681
  {
@@ -2173,15 +2694,15 @@ async function ct(e, t) {
2173
2694
  x: m + f,
2174
2695
  y: h - p / 2
2175
2696
  }
2176
- ], w = D(x), O = y.path(w, b), k = s.insert(() => O, ":first-child");
2177
- return k.attr("class", "basic label-container outer-path"), v && t.look !== "handDrawn" && k.selectChildren("path").attr("style", v), r && t.look !== "handDrawn" && k.selectChildren("path").attr("style", r), k.attr("transform", `translate(0, ${p / 4})`), l.attr("transform", `translate(${-f / 2 + (t.padding ?? 0) - (c.x - (c.left ?? 0))}, ${-p / 4 + (t.padding ?? 0) - (c.y - (c.top ?? 0))})`), T(t, k), t.intersect = function(e) {
2178
- return W.polygon(t, x, e);
2697
+ ], S = F(x), w = y.path(S, b), T = s.insert(() => w, ":first-child");
2698
+ return T.attr("class", "basic label-container outer-path"), v && t.look !== "handDrawn" && T.selectChildren("path").attr("style", v), r && t.look !== "handDrawn" && T.selectChildren("path").attr("style", r), T.attr("transform", `translate(0, ${p / 4})`), l.attr("transform", `translate(${-f / 2 + (t.padding ?? 0) - (c.x - (c.left ?? 0))}, ${-p / 4 + (t.padding ?? 0) - (c.y - (c.top ?? 0))})`), N(t, T), t.intersect = function(e) {
2699
+ return K.polygon(t, x, e);
2179
2700
  }, s;
2180
2701
  }
2181
- t(ct, "slopedRect");
2182
- async function lt(e, t) {
2702
+ d(kt, "slopedRect");
2703
+ async function At(e, t) {
2183
2704
  let n = t.padding ?? 0, r = t.look === "neo" ? 16 : n * 2, i = t.look === "neo" ? 12 : n;
2184
- return Ce(e, t, {
2705
+ return Ue(e, t, {
2185
2706
  rx: 0,
2186
2707
  ry: 0,
2187
2708
  classes: "",
@@ -2189,11 +2710,11 @@ async function lt(e, t) {
2189
2710
  labelPaddingY: i
2190
2711
  });
2191
2712
  }
2192
- t(lt, "squareRect");
2193
- async function ut(e, t) {
2713
+ d(At, "squareRect");
2714
+ async function jt(e, t) {
2194
2715
  let { labelStyles: n, nodeStyles: r } = _(t);
2195
2716
  t.labelStyle = n;
2196
- let i = t.padding ?? 0, a = t.look === "neo" ? 20 : i, o = t.look === "neo" ? 12 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = c.height + (t.look === "neo" ? o * 2 : o), u = c.width + l / 4 + (t.look === "neo" ? a * 2 : a), d = l / 2, { cssStyles: f } = t, p = S.svg(s), m = g(t, {});
2717
+ let i = t.padding ?? 0, a = t.look === "neo" ? 20 : i, o = t.look === "neo" ? 12 : i, { shapeSvg: s, bbox: c } = await j(e, t, P(t)), l = c.height + (t.look === "neo" ? o * 2 : o), u = c.width + l / 4 + (t.look === "neo" ? a * 2 : a), d = l / 2, { cssStyles: f } = t, p = C.svg(s), m = g(t, {});
2197
2718
  t.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
2198
2719
  let h = [
2199
2720
  {
@@ -2204,32 +2725,32 @@ async function ut(e, t) {
2204
2725
  x: u / 2 - d,
2205
2726
  y: -l / 2
2206
2727
  },
2207
- ...k(-u / 2 + d, 0, d, 50, 90, 270),
2728
+ ...L(-u / 2 + d, 0, d, 50, 90, 270),
2208
2729
  {
2209
2730
  x: u / 2 - d,
2210
2731
  y: l / 2
2211
2732
  },
2212
- ...k(u / 2 - d, 0, d, 50, 270, 450)
2213
- ], v = D(h), y = p.path(v, m), b = s.insert(() => y, ":first-child");
2214
- return b.attr("class", "basic label-container outer-path"), f && t.look !== "handDrawn" && b.selectChildren("path").attr("style", f), r && t.look !== "handDrawn" && b.selectChildren("path").attr("style", r), T(t, b), t.intersect = function(e) {
2215
- return W.polygon(t, h, e);
2733
+ ...L(u / 2 - d, 0, d, 50, 270, 450)
2734
+ ], v = F(h), y = p.path(v, m), b = s.insert(() => y, ":first-child");
2735
+ return b.attr("class", "basic label-container outer-path"), f && t.look !== "handDrawn" && b.selectChildren("path").attr("style", f), r && t.look !== "handDrawn" && b.selectChildren("path").attr("style", r), N(t, b), t.intersect = function(e) {
2736
+ return K.polygon(t, h, e);
2216
2737
  }, s;
2217
2738
  }
2218
- t(ut, "stadium");
2219
- async function dt(e, t) {
2220
- return Ce(e, t, {
2739
+ d(jt, "stadium");
2740
+ async function Mt(e, t) {
2741
+ return Ue(e, t, {
2221
2742
  rx: t.look === "neo" ? 3 : 5,
2222
2743
  ry: t.look === "neo" ? 3 : 5,
2223
2744
  classes: "flowchart-node"
2224
2745
  });
2225
2746
  }
2226
- t(dt, "state");
2227
- function ft(e, t, { config: { themeVariables: n } }) {
2747
+ d(Mt, "state");
2748
+ function Nt(e, t, { config: { themeVariables: n } }) {
2228
2749
  let { labelStyles: r, nodeStyles: i } = _(t);
2229
2750
  t.labelStyle = r;
2230
2751
  let { cssStyles: a } = t, { lineColor: o, stateBorder: s, nodeBorder: c, nodeShadow: l } = n;
2231
2752
  (t.width || t.height) && ((t.width ?? 0) < 14 && (t.width = 14), (t.height ?? 0) < 14 && (t.height = 14)), t.width ||= 14, t.height ||= 14;
2232
- let u = e.insert("g").attr("class", "node default").attr("id", t.domId ?? t.id), d = S.svg(u), f = g(t, {});
2753
+ let u = e.insert("g").attr("class", "node default").attr("id", t.domId ?? t.id), d = C.svg(u), f = g(t, {});
2233
2754
  t.look !== "handDrawn" && (f.roughness = 0, f.fillStyle = "solid");
2234
2755
  let p = d.circle(0, 0, t.width, {
2235
2756
  ...f,
@@ -2246,33 +2767,33 @@ function ft(e, t, { config: { themeVariables: n } }) {
2246
2767
  let t = e.node()?.ownerSVGElement?.id ?? "", n = t ? `${t}-drop-shadow-small` : "drop-shadow-small";
2247
2768
  y.attr("style", `filter:url(#${n})`);
2248
2769
  }
2249
- return T(t, y), t.intersect = function(e) {
2250
- return W.circle(t, (t.width ?? 0) / 2, e);
2770
+ return N(t, y), t.intersect = function(e) {
2771
+ return K.circle(t, (t.width ?? 0) / 2, e);
2251
2772
  }, u;
2252
2773
  }
2253
- t(ft, "stateEnd");
2254
- function pt(e, t, { config: { themeVariables: n } }) {
2774
+ d(Nt, "stateEnd");
2775
+ function Pt(e, t, { config: { themeVariables: n } }) {
2255
2776
  let { lineColor: r, nodeShadow: i } = n;
2256
2777
  (t.width || t.height) && ((t.width ?? 0) < 14 && (t.width = 14), (t.height ?? 0) < 14 && (t.height = 14)), t.width ||= 14, t.height ||= 14;
2257
2778
  let a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), o;
2258
2779
  if (t.look === "handDrawn") {
2259
- let e = S.svg(a).circle(0, 0, t.width, v(r));
2780
+ let e = C.svg(a).circle(0, 0, t.width, v(r));
2260
2781
  o = a.insert(() => e), o.attr("class", "state-start").attr("r", (t.width ?? 7) / 2).attr("width", t.width ?? 14).attr("height", t.height ?? 14);
2261
2782
  } else o = a.insert("circle", ":first-child"), o.attr("class", "state-start").attr("r", (t.width ?? 7) / 2).attr("width", t.width ?? 14).attr("height", t.height ?? 14);
2262
2783
  if (t.width < 25 && i && t.look !== "handDrawn") {
2263
2784
  let t = e.node()?.ownerSVGElement?.id ?? "", n = t ? `${t}-drop-shadow-small` : "drop-shadow-small";
2264
2785
  o.attr("style", `filter:url(#${n})`);
2265
2786
  }
2266
- return T(t, o), t.intersect = function(e) {
2267
- return W.circle(t, (t.width ?? 7) / 2, e);
2787
+ return N(t, o), t.intersect = function(e) {
2788
+ return K.circle(t, (t.width ?? 7) / 2, e);
2268
2789
  }, a;
2269
2790
  }
2270
- t(pt, "stateStart");
2271
- var mt = 8;
2272
- async function ht(e, t) {
2791
+ d(Pt, "stateStart");
2792
+ var Ft = 8;
2793
+ async function It(e, t) {
2273
2794
  let { labelStyles: n, nodeStyles: r } = _(t);
2274
2795
  t.labelStyle = n;
2275
- let i = t?.padding ?? 8, a = t.look === "neo" ? 28 : i, o = t.look === "neo" ? 12 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.width ?? c.width) + 2 * mt + a, u = (t?.height ?? c.height) + o, d = l - 2 * mt, f = u, m = -l / 2, h = -u / 2, v = [
2796
+ let i = t?.padding ?? 8, a = t.look === "neo" ? 28 : i, o = t.look === "neo" ? 12 : i, { shapeSvg: s, bbox: c } = await j(e, t, P(t)), l = Math.max(c.width + 2 * Ft + a, t.width ?? 0), u = Math.max(c.height + o, t.height ?? 0), d = l - 2 * Ft, f = u, p = -l / 2, m = -u / 2, v = [
2276
2797
  {
2277
2798
  x: 0,
2278
2799
  y: 0
@@ -2315,26 +2836,26 @@ async function ht(e, t) {
2315
2836
  }
2316
2837
  ];
2317
2838
  if (t.look === "handDrawn") {
2318
- let e = S.svg(s), n = g(t, {}), r = e.rectangle(m, h, d + 16, f, n), i = e.line(m + mt, h, m + mt, h + f, n), a = e.line(m + mt + d, h, m + mt + d, h + f, n);
2839
+ let e = C.svg(s), n = g(t, {}), r = e.rectangle(p, m, d + 16, f, n), i = e.line(p + Ft, m, p + Ft, m + f, n), a = e.line(p + Ft + d, m, p + Ft + d, m + f, n);
2319
2840
  s.insert(() => i, ":first-child"), s.insert(() => a, ":first-child");
2320
2841
  let o = s.insert(() => r, ":first-child"), { cssStyles: c } = t;
2321
- o.attr("class", "basic label-container").attr("style", p(c)), T(t, o);
2842
+ o.attr("class", "basic label-container").attr("style", h(c)), N(t, o);
2322
2843
  } else {
2323
2844
  let e = q(s, d, f, v);
2324
- r && e.attr("style", r), T(t, e);
2845
+ r && e.attr("style", r), N(t, e);
2325
2846
  }
2326
2847
  return t.intersect = function(e) {
2327
- return W.polygon(t, v, e);
2848
+ return K.polygon(t, v, e);
2328
2849
  }, s;
2329
2850
  }
2330
- t(ht, "subroutine");
2331
- var gt = .2;
2332
- async function _t(e, t) {
2851
+ d(It, "subroutine");
2852
+ var Lt = .2;
2853
+ async function Rt(e, t) {
2333
2854
  let { labelStyles: n, nodeStyles: r } = _(t);
2334
2855
  t.labelStyle = n;
2335
2856
  let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
2336
- (t.width || t.height) && (t.height = Math.max((t?.height ?? 0) - o * 2, 10), t.width = Math.max((t?.width ?? 0) - a * 2 - gt * (t.height + o * 2), 10));
2337
- let { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.height ? t?.height : c.height) + o * 2, u = gt * l, d = gt * l, f = (t?.width ? t?.width : c.width) + a * 2 + u - u, p = l, m = -f / 2, h = -p / 2, { cssStyles: v } = t, y = S.svg(s), b = g(t, {}), x = [
2857
+ (t.width || t.height) && (t.height = Math.max((t?.height ?? 0) - o * 2, 10), t.width = Math.max((t?.width ?? 0) - a * 2 - Lt * (t.height + o * 2), 10));
2858
+ let { shapeSvg: s, bbox: c } = await j(e, t, P(t)), l = (t?.height ? t?.height : c.height) + o * 2, u = Lt * l, d = Lt * l, f = (t?.width ? t?.width : c.width) + a * 2 + u - u, p = l, m = -f / 2, h = -p / 2, { cssStyles: v } = t, y = C.svg(s), b = g(t, {}), x = [
2338
2859
  {
2339
2860
  x: m - u / 2,
2340
2861
  y: h
@@ -2351,7 +2872,7 @@ async function _t(e, t) {
2351
2872
  x: m - u / 2,
2352
2873
  y: h + p
2353
2874
  }
2354
- ], w = [
2875
+ ], S = [
2355
2876
  {
2356
2877
  x: m + f - u / 2,
2357
2878
  y: h + p
@@ -2366,26 +2887,26 @@ async function _t(e, t) {
2366
2887
  }
2367
2888
  ];
2368
2889
  t.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid");
2369
- let O = D(x), k = y.path(O, b), A = D(w), j = y.path(A, {
2890
+ let w = F(x), T = y.path(w, b), E = F(S), D = y.path(E, {
2370
2891
  ...b,
2371
2892
  fillStyle: "solid"
2372
- }), M = s.insert(() => j, ":first-child");
2373
- return M.insert(() => k, ":first-child"), M.attr("class", "basic label-container outer-path"), v && t.look !== "handDrawn" && M.selectAll("path").attr("style", v), r && t.look !== "handDrawn" && M.selectAll("path").attr("style", r), T(t, M), t.intersect = function(e) {
2374
- return W.polygon(t, x, e);
2893
+ }), O = s.insert(() => D, ":first-child");
2894
+ return O.insert(() => T, ":first-child"), O.attr("class", "basic label-container outer-path"), v && t.look !== "handDrawn" && O.selectAll("path").attr("style", v), r && t.look !== "handDrawn" && O.selectAll("path").attr("style", r), N(t, O), t.intersect = function(e) {
2895
+ return K.polygon(t, x, e);
2375
2896
  }, s;
2376
2897
  }
2377
- t(_t, "taggedRect");
2378
- async function vt(e, t) {
2898
+ d(Rt, "taggedRect");
2899
+ async function zt(e, t) {
2379
2900
  let { labelStyles: n, nodeStyles: r } = _(t);
2380
2901
  t.labelStyle = n;
2381
- let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = Math.max(a.width + (t.padding ?? 0) * 2, t?.width ?? 0), c = Math.max(a.height + (t.padding ?? 0) * 2, t?.height ?? 0), l = c / 8, u = .2 * s, d = .2 * c, f = c + l, { cssStyles: p } = t, m = S.svg(i), h = g(t, {});
2902
+ let { shapeSvg: i, bbox: a, label: o } = await j(e, t, P(t)), s = Math.max(a.width + (t.padding ?? 0) * 2, t?.width ?? 0), c = Math.max(a.height + (t.padding ?? 0) * 2, t?.height ?? 0), l = c / 8, u = .2 * s, d = .2 * c, f = c + l, { cssStyles: p } = t, m = C.svg(i), h = g(t, {});
2382
2903
  t.look !== "handDrawn" && (h.roughness = 0, h.fillStyle = "solid");
2383
2904
  let v = [
2384
2905
  {
2385
2906
  x: -s / 2 - s / 2 * .1,
2386
2907
  y: f / 2
2387
2908
  },
2388
- ...O(-s / 2 - s / 2 * .1, f / 2, s / 2 + s / 2 * .1, f / 2, l, .8),
2909
+ ...I(-s / 2 - s / 2 * .1, f / 2, s / 2 + s / 2 * .1, f / 2, l, .8),
2389
2910
  {
2390
2911
  x: s / 2 + s / 2 * .1,
2391
2912
  y: -f / 2
@@ -2407,71 +2928,69 @@ async function vt(e, t) {
2407
2928
  x: y + s,
2408
2929
  y: (b + c) * .9
2409
2930
  },
2410
- ...O(y + s, (b + c) * 1.25, y + s - u, (b + c) * 1.3, -c * .02, .5)
2411
- ], w = D(v), k = m.path(w, h), A = D(x), j = m.path(A, {
2931
+ ...I(y + s, (b + c) * 1.25, y + s - u, (b + c) * 1.3, -c * .02, .5)
2932
+ ], S = F(v), w = m.path(S, h), T = F(x), E = m.path(T, {
2412
2933
  ...h,
2413
2934
  fillStyle: "solid"
2414
- }), M = i.insert(() => j, ":first-child");
2415
- return M.insert(() => k, ":first-child"), M.attr("class", "basic label-container outer-path"), p && t.look !== "handDrawn" && M.selectAll("path").attr("style", p), r && t.look !== "handDrawn" && M.selectAll("path").attr("style", r), M.attr("transform", `translate(0,${-l / 2})`), o.attr("transform", `translate(${-s / 2 + (t.padding ?? 0) - (a.x - (a.left ?? 0))},${-c / 2 + (t.padding ?? 0) - l / 2 - (a.y - (a.top ?? 0))})`), T(t, M), t.intersect = function(e) {
2416
- return W.polygon(t, v, e);
2935
+ }), D = i.insert(() => E, ":first-child");
2936
+ return D.insert(() => w, ":first-child"), D.attr("class", "basic label-container outer-path"), p && t.look !== "handDrawn" && D.selectAll("path").attr("style", p), r && t.look !== "handDrawn" && D.selectAll("path").attr("style", r), D.attr("transform", `translate(0,${-l / 2})`), o.attr("transform", `translate(${-s / 2 + (t.padding ?? 0) - (a.x - (a.left ?? 0))},${-c / 2 + (t.padding ?? 0) - l / 2 - (a.y - (a.top ?? 0))})`), N(t, D), t.intersect = function(e) {
2937
+ return K.polygon(t, v, e);
2417
2938
  }, i;
2418
2939
  }
2419
- t(vt, "taggedWaveEdgedRectangle");
2420
- async function yt(e, t) {
2940
+ d(zt, "taggedWaveEdgedRectangle");
2941
+ async function Bt(e, t) {
2421
2942
  let { labelStyles: n, nodeStyles: r } = _(t);
2422
2943
  t.labelStyle = n;
2423
- let { shapeSvg: i, bbox: a } = await C(e, t, E(t)), o = Math.max(a.width + (t.padding ?? 0), t?.width || 0), s = Math.max(a.height + (t.padding ?? 0), t?.height || 0), c = -o / 2, l = -s / 2, u = i.insert("rect", ":first-child");
2424
- return u.attr("class", "text").attr("style", r).attr("rx", 0).attr("ry", 0).attr("x", c).attr("y", l).attr("width", o).attr("height", s), T(t, u), t.intersect = function(e) {
2425
- return W.rect(t, e);
2944
+ let { shapeSvg: i, bbox: a } = await j(e, t, P(t)), o = Math.max(a.width + (t.padding ?? 0), t?.width || 0), s = Math.max(a.height + (t.padding ?? 0), t?.height || 0), c = -o / 2, l = -s / 2, u = i.insert("rect", ":first-child");
2945
+ return u.attr("class", "text").attr("style", r).attr("rx", 0).attr("ry", 0).attr("x", c).attr("y", l).attr("width", o).attr("height", s), N(t, u), t.intersect = function(e) {
2946
+ return K.rect(t, e);
2426
2947
  }, i;
2427
2948
  }
2428
- t(yt, "text");
2429
- var bt = /* @__PURE__ */ t((e, t, n, r, i, a) => `M${e},${t}
2949
+ d(Bt, "text");
2950
+ var Vt = /* @__PURE__ */ d((e, t, n, r, i, a) => `M${e},${t}
2430
2951
  a${i},${a} 0,0,1 0,${-r}
2431
2952
  l${n},0
2432
2953
  a${i},${a} 0,0,1 0,${r}
2433
2954
  M${n},${-r}
2434
2955
  a${i},${a} 0,0,0 0,${r}
2435
- l${-n},0`, "createCylinderPathD"), xt = /* @__PURE__ */ t((e, t, n, r, i, a) => [
2956
+ l${-n},0`, "createCylinderPathD"), Ht = /* @__PURE__ */ d((e, t, n, r, i, a) => [
2436
2957
  `M${e},${t}`,
2437
2958
  `M${e + n},${t}`,
2438
2959
  `a${i},${a} 0,0,0 0,${-r}`,
2439
2960
  `l${-n},0`,
2440
2961
  `a${i},${a} 0,0,0 0,${r}`,
2441
2962
  `l${n},0`
2442
- ].join(" "), "createOuterCylinderPathD"), St = /* @__PURE__ */ t((e, t, n, r, i, a) => [`M${e + n / 2},${-r / 2}`, `a${i},${a} 0,0,0 0,${r}`].join(" "), "createInnerCylinderPathD"), Ct = 5, wt = 10;
2443
- async function Tt(e, t) {
2963
+ ].join(" "), "createOuterCylinderPathD"), Ut = /* @__PURE__ */ d((e, t, n, r, i, a) => [`M${e + n / 2},${-r / 2}`, `a${i},${a} 0,0,0 0,${r}`].join(" "), "createInnerCylinderPathD"), Wt = 5, Gt = 10;
2964
+ async function Kt(e, t) {
2444
2965
  let { labelStyles: n, nodeStyles: r } = _(t);
2445
2966
  t.labelStyle = n;
2446
- let i = t.padding ?? 0, a = t.look === "neo" ? 12 : i / 2;
2447
- if (t.width || t.height) {
2448
- let e = t.height ?? 0;
2449
- t.height = (t.height ?? 0) - a, t.height < Ct && (t.height = Ct);
2450
- let n = e / 2 / (2.5 + e / 50);
2451
- t.width = (t.width ?? 0) - a - n * 3, t.width < wt && (t.width = wt);
2967
+ let i = t.padding ?? 0, a = t.look === "neo" ? 12 : i / 2, o = t.height ?? 0;
2968
+ if (t.height && (t.height -= a, t.height < Wt && (t.height = Wt)), t.width) {
2969
+ let e = o / 2 / (2.5 + o / 50);
2970
+ t.width = t.width - a - e * 3, t.width < Gt && (t.width = Gt);
2452
2971
  }
2453
- let { shapeSvg: o, bbox: s, label: c } = await C(e, t, E(t)), l = (t.height ? t.height : s.height) + a, u = l / 2, d = u / (2.5 + l / 50), f = (t.width ? t.width : s.width) + d + a, { cssStyles: m } = t, h;
2972
+ let { shapeSvg: s, bbox: c, label: l } = await j(e, t, P(t)), u = Math.max(t.height ?? 0, c.height) + a, d = u / 2, f = d / (2.5 + u / 50), p = Math.max(t.width ?? 0, c.width) + f + a, { cssStyles: m } = t, v;
2454
2973
  if (t.look === "handDrawn") {
2455
- let e = S.svg(o), n = xt(0, 0, f, l, d, u), r = St(0, 0, f, l, d, u), i = e.path(n, g(t, {})), a = e.path(r, g(t, { fill: "none" }));
2456
- h = o.insert(() => a, ":first-child"), h = o.insert(() => i, ":first-child"), h.attr("class", "basic label-container"), m && h.attr("style", m);
2974
+ let e = C.svg(s), n = Ht(0, 0, p, u, f, d), r = Ut(0, 0, p, u, f, d), i = e.path(n, g(t, {})), a = e.path(r, g(t, { fill: "none" }));
2975
+ v = s.insert(() => a, ":first-child"), v = s.insert(() => i, ":first-child"), v.attr("class", "basic label-container"), m && v.attr("style", m);
2457
2976
  } else {
2458
- let e = bt(0, 0, f, l, d, u);
2459
- h = o.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container").attr("style", p(m)).attr("style", r), h.attr("class", "basic label-container outer-path"), m && h.selectAll("path").attr("style", m), r && h.selectAll("path").attr("style", r);
2977
+ let e = Vt(0, 0, p, u, f, d);
2978
+ v = s.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container").attr("style", h(m)).attr("style", r), v.attr("class", "basic label-container outer-path"), m && v.selectAll("path").attr("style", m), r && v.selectAll("path").attr("style", r);
2460
2979
  }
2461
- return h.attr("label-offset-x", d), h.attr("transform", `translate(${-f / 2}, ${l / 2} )`), c.attr("transform", `translate(${-(s.width / 2) - d - (s.x - (s.left ?? 0))}, ${-(s.height / 2) - (s.y - (s.top ?? 0))})`), T(t, h), t.intersect = function(e) {
2462
- let n = W.rect(t, e), r = n.y - (t.y ?? 0);
2463
- if (u != 0 && (Math.abs(r) < (t.height ?? 0) / 2 || Math.abs(r) == (t.height ?? 0) / 2 && Math.abs(n.x - (t.x ?? 0)) > (t.width ?? 0) / 2 - d)) {
2464
- let i = d * d * (1 - r * r / (u * u));
2465
- i != 0 && (i = Math.sqrt(Math.abs(i))), i = d - i, e.x - (t.x ?? 0) > 0 && (i = -i), n.x += i;
2980
+ return v.attr("label-offset-x", f), v.attr("transform", `translate(${-p / 2}, ${u / 2} )`), l.attr("transform", `translate(${-(c.width / 2) - f - (c.x - (c.left ?? 0))}, ${-(c.height / 2) - (c.y - (c.top ?? 0))})`), N(t, v), t.intersect = function(e) {
2981
+ let n = K.rect(t, e), r = n.y - (t.y ?? 0);
2982
+ if (d != 0 && (Math.abs(r) < (t.height ?? 0) / 2 || Math.abs(r) == (t.height ?? 0) / 2 && Math.abs(n.x - (t.x ?? 0)) > (t.width ?? 0) / 2 - f)) {
2983
+ let i = f * f * (1 - r * r / (d * d));
2984
+ i != 0 && (i = Math.sqrt(Math.abs(i))), i = f - i, e.x - (t.x ?? 0) > 0 && (i = -i), n.x += i;
2466
2985
  }
2467
2986
  return n;
2468
- }, o;
2987
+ }, s;
2469
2988
  }
2470
- t(Tt, "tiltedCylinder");
2471
- async function Et(e, t) {
2989
+ d(Kt, "tiltedCylinder");
2990
+ async function qt(e, t) {
2472
2991
  let { labelStyles: n, nodeStyles: r } = _(t);
2473
2992
  t.labelStyle = n;
2474
- let i = t.padding ?? 0, a = (t.look, i), o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.height ?? c.height) + a, u = (t?.width ?? c.width) + o, d = [
2993
+ let i = t.padding ?? 0, a = (t.look, i), o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await j(e, t, P(t)), l = Math.max(c.height + a, t.height ?? 0), u = Math.max(c.width + o, (t.width ?? 0) - l), d = [
2475
2994
  {
2476
2995
  x: -3 * l / 6,
2477
2996
  y: 0
@@ -2490,20 +3009,20 @@ async function Et(e, t) {
2490
3009
  }
2491
3010
  ], f, { cssStyles: p } = t;
2492
3011
  if (t.look === "handDrawn") {
2493
- let e = S.svg(s), n = g(t, {}), r = D(d), i = e.path(r, n);
3012
+ let e = C.svg(s), n = g(t, {}), r = F(d), i = e.path(r, n);
2494
3013
  f = s.insert(() => i, ":first-child").attr("transform", `translate(${-u / 2}, ${l / 2})`), p && f.attr("style", p);
2495
3014
  } else f = q(s, u, l, d);
2496
- return r && f.attr("style", r), t.width = u, t.height = l, T(t, f), t.intersect = function(e) {
2497
- return W.polygon(t, d, e);
3015
+ return r && f.attr("style", r), t.width = u, t.height = l, N(t, f), t.intersect = function(e) {
3016
+ return K.polygon(t, d, e);
2498
3017
  }, s;
2499
3018
  }
2500
- t(Et, "trapezoid");
2501
- async function Dt(e, t) {
3019
+ d(qt, "trapezoid");
3020
+ async function Jt(e, t) {
2502
3021
  let { labelStyles: n, nodeStyles: r } = _(t);
2503
3022
  t.labelStyle = n;
2504
3023
  let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
2505
3024
  (t.width || t.height) && (t.height = (t.height ?? 0) - o * 2, t.height < 5 && (t.height = 5), t.width = (t.width ?? 0) - a * 2, t.width < 15 && (t.width = 15));
2506
- let { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.width ? t?.width : c.width) + a * 2, u = (t?.height ? t?.height : c.height) + o * 2, { cssStyles: d } = t, f = S.svg(s), p = g(t, {});
3025
+ let { shapeSvg: s, bbox: c } = await j(e, t, P(t)), l = (t?.width ? t?.width : c.width) + a * 2, u = (t?.height ? t?.height : c.height) + o * 2, { cssStyles: d } = t, f = C.svg(s), p = g(t, {});
2507
3026
  t.look !== "handDrawn" && (p.roughness = 0, p.fillStyle = "solid");
2508
3027
  let m = [
2509
3028
  {
@@ -2530,19 +3049,19 @@ async function Dt(e, t) {
2530
3049
  x: -l / 2,
2531
3050
  y: -u / 2 * .6
2532
3051
  }
2533
- ], h = D(m), v = f.path(h, p), y = s.insert(() => v, ":first-child");
2534
- return y.attr("class", "basic label-container outer-path"), d && t.look !== "handDrawn" && y.selectChildren("path").attr("style", d), r && t.look !== "handDrawn" && y.selectChildren("path").attr("style", r), T(t, y), t.intersect = function(e) {
2535
- return W.polygon(t, m, e);
3052
+ ], h = F(m), v = f.path(h, p), y = s.insert(() => v, ":first-child");
3053
+ return y.attr("class", "basic label-container outer-path"), d && t.look !== "handDrawn" && y.selectChildren("path").attr("style", d), r && t.look !== "handDrawn" && y.selectChildren("path").attr("style", r), N(t, y), t.intersect = function(e) {
3054
+ return K.polygon(t, m, e);
2536
3055
  }, s;
2537
3056
  }
2538
- t(Dt, "trapezoidalPentagon");
2539
- var Ot = 10, kt = 10;
2540
- async function At(t, n) {
3057
+ d(Jt, "trapezoidalPentagon");
3058
+ var Yt = 10, Xt = 10;
3059
+ async function Zt(t, n) {
2541
3060
  let { labelStyles: r, nodeStyles: i } = _(n);
2542
3061
  n.labelStyle = r;
2543
3062
  let a = n.padding ?? 0, o = n.look === "neo" ? a * 2 : a;
2544
- (n.width || n.height) && (n.width = ((n?.width ?? 0) - o) / 2, n.width < kt && (n.width = kt), n.height = n?.height ?? 0, n.height < Ot && (n.height = Ot));
2545
- let { shapeSvg: s, bbox: u, label: d } = await C(t, n, E(n)), f = c(l().flowchart?.htmlLabels), p = (n?.width ? n?.width : u.width) + o, m = n?.height ? n?.height : p + u.height, h = m, v = [
3063
+ (n.width || n.height) && (n.width = ((n?.width ?? 0) - o) / 2, n.width < Xt && (n.width = Xt), n.height = n?.height ?? 0, n.height < Yt && (n.height = Yt));
3064
+ let { shapeSvg: s, bbox: u, label: d } = await j(t, n, P(n)), f = c(l().flowchart?.htmlLabels), p = (n?.width ? n?.width : u.width) + o, m = n?.height ? n?.height : p + u.height, h = m, v = [
2546
3065
  {
2547
3066
  x: 0,
2548
3067
  y: 0
@@ -2555,27 +3074,27 @@ async function At(t, n) {
2555
3074
  x: h / 2,
2556
3075
  y: -m
2557
3076
  }
2558
- ], { cssStyles: y } = n, b = S.svg(s), x = g(n, {});
3077
+ ], { cssStyles: y } = n, b = C.svg(s), x = g(n, {});
2559
3078
  n.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
2560
- let w = D(v), O = b.path(w, x), k = s.insert(() => O, ":first-child").attr("transform", `translate(${-m / 2}, ${m / 2})`).attr("class", "outer-path");
2561
- return y && n.look !== "handDrawn" && k.selectChildren("path").attr("style", y), i && n.look !== "handDrawn" && k.selectChildren("path").attr("style", i), n.width = p, n.height = m, T(n, k), d.attr("transform", `translate(${-u.width / 2 - (u.x - (u.left ?? 0))}, ${m / 2 - (u.height + (n.padding ?? 0) / (f ? 2 : 1) - (u.y - (u.top ?? 0)))})`), n.intersect = function(t) {
2562
- return e.info("Triangle intersect", n, v, t), W.polygon(n, v, t);
3079
+ let S = F(v), w = b.path(S, x), T = s.insert(() => w, ":first-child").attr("transform", `translate(${-m / 2}, ${m / 2})`).attr("class", "outer-path");
3080
+ return y && n.look !== "handDrawn" && T.selectChildren("path").attr("style", y), i && n.look !== "handDrawn" && T.selectChildren("path").attr("style", i), n.width = p, n.height = m, N(n, T), d.attr("transform", `translate(${-u.width / 2 - (u.x - (u.left ?? 0))}, ${m / 2 - (u.height + (n.padding ?? 0) / (f ? 2 : 1) - (u.y - (u.top ?? 0)))})`), n.intersect = function(t) {
3081
+ return e.info("Triangle intersect", n, v, t), K.polygon(n, v, t);
2563
3082
  }, s;
2564
3083
  }
2565
- t(At, "triangle");
2566
- async function jt(e, t) {
3084
+ d(Zt, "triangle");
3085
+ async function Qt(e, t) {
2567
3086
  let { labelStyles: n, nodeStyles: r } = _(t);
2568
3087
  t.labelStyle = n;
2569
3088
  let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i, s = !0;
2570
3089
  (t.width || t.height) && (s = !1, t.width = (t?.width ?? 0) - a * 2, t.width < 10 && (t.width = 10), t.height = (t?.height ?? 0) - o * 2, t.height < 10 && (t.height = 10));
2571
- let { shapeSvg: c, bbox: l, label: u } = await C(e, t, E(t)), d = (t?.width ? t?.width : l.width) + (a ?? 0) * 2, f = (t?.height ? t?.height : l.height) + (o ?? 0) * 2, p = t.look === "neo" ? f / 4 : f / 8, m = f + (s ? p : -p), { cssStyles: h } = t, v = 14 - d, y = v > 0 ? v / 2 : 0, b = S.svg(c), x = g(t, {});
3090
+ let { shapeSvg: c, bbox: l, label: u } = await j(e, t, P(t)), d = (t?.width ? t?.width : l.width) + (a ?? 0) * 2, f = (t?.height ? t?.height : l.height) + (o ?? 0) * 2, p = t.look === "neo" ? f / 4 : f / 8, m = f + (s ? p : -p), { cssStyles: h } = t, v = 14 - d, y = v > 0 ? v / 2 : 0, b = C.svg(c), x = g(t, {});
2572
3091
  t.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
2573
- let w = [
3092
+ let S = [
2574
3093
  {
2575
3094
  x: -d / 2 - y,
2576
3095
  y: m / 2
2577
3096
  },
2578
- ...O(-d / 2 - y, m / 2, d / 2 + y, m / 2, p, .8),
3097
+ ...I(-d / 2 - y, m / 2, d / 2 + y, m / 2, p, .8),
2579
3098
  {
2580
3099
  x: d / 2 + y,
2581
3100
  y: -m / 2
@@ -2584,13 +3103,13 @@ async function jt(e, t) {
2584
3103
  x: -d / 2 - y,
2585
3104
  y: -m / 2
2586
3105
  }
2587
- ], k = D(w), A = b.path(k, x), j = c.insert(() => A, ":first-child");
2588
- return j.attr("class", "basic label-container outer-path"), h && t.look !== "handDrawn" && j.selectAll("path").attr("style", h), r && t.look !== "handDrawn" && j.selectAll("path").attr("style", r), j.attr("transform", `translate(0,${-p / 2})`), u.attr("transform", `translate(${-d / 2 + (t.padding ?? 0) - (l.x - (l.left ?? 0))},${-f / 2 + (t.padding ?? 0) - p - (l.y - (l.top ?? 0))})`), T(t, j), t.intersect = function(e) {
2589
- return W.polygon(t, w, e);
3106
+ ], w = F(S), T = b.path(w, x), E = c.insert(() => T, ":first-child");
3107
+ return E.attr("class", "basic label-container outer-path"), h && t.look !== "handDrawn" && E.selectAll("path").attr("style", h), r && t.look !== "handDrawn" && E.selectAll("path").attr("style", r), E.attr("transform", `translate(0,${-p / 2})`), u.attr("transform", `translate(${-d / 2 + (t.padding ?? 0) - (l.x - (l.left ?? 0))},${-f / 2 + (t.padding ?? 0) - p - (l.y - (l.top ?? 0))})`), N(t, E), t.intersect = function(e) {
3108
+ return K.polygon(t, S, e);
2590
3109
  }, c;
2591
3110
  }
2592
- t(jt, "waveEdgedRectangle");
2593
- async function Mt(e, t) {
3111
+ d(Qt, "waveEdgedRectangle");
3112
+ async function $t(e, t) {
2594
3113
  let { labelStyles: n, nodeStyles: r } = _(t);
2595
3114
  t.labelStyle = n;
2596
3115
  let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 20 : i;
@@ -2599,32 +3118,32 @@ async function Mt(e, t) {
2599
3118
  let e = Math.min(t.height * .2, t.height / 4);
2600
3119
  t.height = Math.ceil(t.height - o - 20 / 9 * e), t.width -= a * 2;
2601
3120
  }
2602
- let { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.width ? t?.width : c.width) + a * 2, u = (t?.height ? t?.height : c.height) + o, d = u / 8, f = u + d * 2, { cssStyles: p } = t, m = S.svg(s), h = g(t, {});
3121
+ let { shapeSvg: s, bbox: c } = await j(e, t, P(t)), l = (t?.width ? t?.width : c.width) + a * 2, u = (t?.height ? t?.height : c.height) + o, d = u / 8, f = u + d * 2, { cssStyles: p } = t, m = C.svg(s), h = g(t, {});
2603
3122
  t.look !== "handDrawn" && (h.roughness = 0, h.fillStyle = "solid");
2604
3123
  let v = [
2605
3124
  {
2606
3125
  x: -l / 2,
2607
3126
  y: f / 2
2608
3127
  },
2609
- ...O(-l / 2, f / 2, l / 2, f / 2, d, 1),
3128
+ ...I(-l / 2, f / 2, l / 2, f / 2, d, 1),
2610
3129
  {
2611
3130
  x: l / 2,
2612
3131
  y: -f / 2
2613
3132
  },
2614
- ...O(l / 2, -f / 2, -l / 2, -f / 2, d, -1)
2615
- ], y = D(v), b = m.path(y, h), x = s.insert(() => b, ":first-child");
2616
- return x.attr("class", "basic label-container"), p && t.look !== "handDrawn" && x.selectAll("path").attr("style", p), r && t.look !== "handDrawn" && x.selectAll("path").attr("style", r), T(t, x), t.intersect = function(e) {
2617
- return W.polygon(t, v, e);
3133
+ ...I(l / 2, -f / 2, -l / 2, -f / 2, d, -1)
3134
+ ], y = F(v), b = m.path(y, h), x = s.insert(() => b, ":first-child");
3135
+ return x.attr("class", "basic label-container"), p && t.look !== "handDrawn" && x.selectAll("path").attr("style", p), r && t.look !== "handDrawn" && x.selectAll("path").attr("style", r), N(t, x), t.intersect = function(e) {
3136
+ return K.polygon(t, v, e);
2618
3137
  }, s;
2619
3138
  }
2620
- t(Mt, "waveRectangle");
3139
+ d($t, "waveRectangle");
2621
3140
  var Q = 10;
2622
- async function Nt(e, t) {
3141
+ async function en(e, t) {
2623
3142
  let { labelStyles: n, nodeStyles: r } = _(t);
2624
3143
  t.labelStyle = n;
2625
3144
  let i = t.look === "neo" ? 16 : t.padding ?? 0, a = t.look === "neo" ? 12 : t.padding ?? 0;
2626
3145
  (t.width || t.height) && (t.width = Math.max((t?.width ?? 0) - i * 2 - Q, 10), t.height = Math.max((t?.height ?? 0) - a * 2 - Q, 10));
2627
- let { shapeSvg: o, bbox: s, label: c } = await C(e, t, E(t)), l = (t?.width ? t?.width : s.width) + i * 2 + Q, u = (t?.height ? t?.height : s.height) + a * 2 + Q, d = l - Q, f = u - Q, p = -d / 2, m = -f / 2, { cssStyles: h } = t, v = S.svg(o), y = g(t, {}), b = [
3146
+ let { shapeSvg: o, bbox: s, label: c } = await j(e, t, P(t)), l = (t?.width ? t?.width : s.width) + i * 2 + Q, u = (t?.height ? t?.height : s.height) + a * 2 + Q, d = l - Q, f = u - Q, p = -d / 2, m = -f / 2, { cssStyles: h } = t, v = C.svg(o), y = g(t, {}), b = [
2628
3147
  {
2629
3148
  x: p - Q,
2630
3149
  y: m - Q
@@ -2645,155 +3164,155 @@ async function Nt(e, t) {
2645
3164
  M${p - Q},${m} L${p + d},${m}
2646
3165
  M${p},${m - Q} L${p},${m + f}`;
2647
3166
  t.look !== "handDrawn" && (y.roughness = 0, y.fillStyle = "solid");
2648
- let w = v.path(x, y), D = o.insert(() => w, ":first-child");
2649
- return D.attr("transform", `translate(${Q / 2}, ${Q / 2})`), D.attr("class", "basic label-container outer-path"), h && t.look !== "handDrawn" && D.selectAll("path").attr("style", h), r && t.look !== "handDrawn" && D.selectAll("path").attr("style", r), c.attr("transform", `translate(${-(s.width / 2) + Q / 2 - (s.x - (s.left ?? 0))}, ${-(s.height / 2) + Q / 2 - (s.y - (s.top ?? 0))})`), T(t, D), t.intersect = function(e) {
2650
- return W.polygon(t, b, e);
3167
+ let S = v.path(x, y), w = o.insert(() => S, ":first-child");
3168
+ return w.attr("transform", `translate(${Q / 2}, ${Q / 2})`), w.attr("class", "basic label-container outer-path"), h && t.look !== "handDrawn" && w.selectAll("path").attr("style", h), r && t.look !== "handDrawn" && w.selectAll("path").attr("style", r), c.attr("transform", `translate(${-(s.width / 2) + Q / 2 - (s.x - (s.left ?? 0))}, ${-(s.height / 2) + Q / 2 - (s.y - (s.top ?? 0))})`), N(t, w), t.intersect = function(e) {
3169
+ return K.polygon(t, b, e);
2651
3170
  }, o;
2652
3171
  }
2653
- t(Nt, "windowPane");
2654
- var Pt = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), Ft = /* @__PURE__ */ new Set([
3172
+ d(en, "windowPane");
3173
+ var tn = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), nn = /* @__PURE__ */ new Set([
2655
3174
  "redux",
2656
3175
  "redux-dark",
2657
3176
  "redux-color",
2658
3177
  "redux-dark-color"
2659
3178
  ]);
2660
- async function It(e, t) {
2661
- let r = t;
2662
- r.alias && (t.label = r.alias);
2663
- let { theme: i, themeVariables: a } = s(), { rowEven: o, rowOdd: l, nodeBorder: u, borderColorArray: d } = a;
2664
- if (t.look === "handDrawn") {
2665
- let { themeVariables: n } = s(), { background: r } = n;
2666
- await It(e, {
2667
- ...t,
2668
- id: t.id + "-background",
2669
- domId: (t.domId || t.id) + "-background",
3179
+ async function rn(e, n) {
3180
+ let r = n;
3181
+ r.alias && (n.label = r.alias);
3182
+ let { theme: i, themeVariables: a } = o(), { rowEven: s, rowOdd: l, nodeBorder: u, borderColorArray: d } = a;
3183
+ if (n.look === "handDrawn") {
3184
+ let { themeVariables: t } = o(), { background: r } = t;
3185
+ await rn(e, {
3186
+ ...n,
3187
+ id: n.id + "-background",
3188
+ domId: (n.domId || n.id) + "-background",
2670
3189
  look: "default",
2671
3190
  cssStyles: ["stroke: none", `fill: ${r}`]
2672
3191
  });
2673
3192
  }
2674
- let p = s();
2675
- t.useHtmlLabels = p.htmlLabels;
2676
- let m = p.er?.diagramPadding ?? 10, h = p.er?.entityPadding ?? 6, { cssStyles: v } = t, { labelStyles: y, nodeStyles: b } = _(t);
2677
- if (r.attributes.length === 0 && t.label) {
2678
- let n = {
3193
+ let f = o();
3194
+ n.useHtmlLabels = f.htmlLabels;
3195
+ let p = f.er?.diagramPadding ?? 10, h = f.er?.entityPadding ?? 6, { cssStyles: v } = n, { labelStyles: y, nodeStyles: b } = _(n);
3196
+ if (r.attributes.length === 0 && n.label) {
3197
+ let t = {
2679
3198
  rx: 0,
2680
3199
  ry: 0,
2681
- labelPaddingX: m,
2682
- labelPaddingY: m * 1.5,
3200
+ labelPaddingX: p,
3201
+ labelPaddingY: p * 1.5,
2683
3202
  classes: ""
2684
3203
  };
2685
- f(t.label, p) + n.labelPaddingX * 2 < p.er.minEntityWidth && (t.width = p.er.minEntityWidth);
2686
- let a = await Ce(e, t, n);
2687
- if (i != null && Pt.has(i)) {
3204
+ m(n.label, f) + t.labelPaddingX * 2 < f.er.minEntityWidth && (n.width = f.er.minEntityWidth);
3205
+ let a = await Ue(e, n, t);
3206
+ if (i != null && tn.has(i)) {
2688
3207
  let e = r.colorIndex ?? 0;
2689
3208
  a.attr("data-color-id", `color-${e % d.length}`);
2690
3209
  }
2691
- if (!c(p.htmlLabels)) {
3210
+ if (!c(f.htmlLabels)) {
2692
3211
  let e = a.select("text"), t = e.node()?.getBBox();
2693
3212
  e.attr("transform", `translate(${-t.width / 2}, 0)`);
2694
3213
  }
2695
3214
  return a;
2696
3215
  }
2697
- p.htmlLabels || (m *= 1.25, h *= 1.25);
2698
- let x = E(t);
3216
+ f.htmlLabels || (p *= 1.25, h *= 1.25);
3217
+ let x = P(n);
2699
3218
  x ||= "node default";
2700
- let C = e.insert("g").attr("class", x).attr("id", t.domId || t.id), w = await Lt(C, t.label ?? "", p, 0, 0, ["name"], y);
3219
+ let S = e.insert("g").attr("class", x).attr("id", n.domId || n.id), w = await an(S, n.label ?? "", f, 0, 0, ["name"], y);
2701
3220
  w.height += h;
2702
- let D = 0, O = [], k = [], A = 0, j = 0, M = 0, N = 0, P = !0, F = !0;
3221
+ let T = 0, E = [], D = [], O = 0, k = 0, A = 0, j = 0, M = !0, F = !0;
2703
3222
  for (let e of r.attributes) {
2704
- let t = await Lt(C, e.type, p, 0, D, ["attribute-type"], y);
2705
- A = Math.max(A, t.width + m);
2706
- let n = await Lt(C, e.name, p, 0, D, ["attribute-name"], y);
2707
- j = Math.max(j, n.width + m);
2708
- let r = await Lt(C, e.keys.join(), p, 0, D, ["attribute-keys"], y);
2709
- M = Math.max(M, r.width + m);
2710
- let i = await Lt(C, e.comment, p, 0, D, ["attribute-comment"], y);
2711
- N = Math.max(N, i.width + m);
3223
+ let t = await an(S, e.type, f, 0, T, ["attribute-type"], y);
3224
+ O = Math.max(O, t.width + p);
3225
+ let n = await an(S, e.name, f, 0, T, ["attribute-name"], y);
3226
+ k = Math.max(k, n.width + p);
3227
+ let r = await an(S, e.keys.join(), f, 0, T, ["attribute-keys"], y);
3228
+ A = Math.max(A, r.width + p);
3229
+ let i = await an(S, e.comment, f, 0, T, ["attribute-comment"], y);
3230
+ j = Math.max(j, i.width + p);
2712
3231
  let a = Math.max(t.height, n.height, r.height, i.height) + h;
2713
- k.push({
2714
- yOffset: D,
3232
+ D.push({
3233
+ yOffset: T,
2715
3234
  rowHeight: a
2716
- }), D += a;
3235
+ }), T += a;
2717
3236
  }
2718
3237
  let I = 4;
2719
- M <= m && (P = !1, M = 0, I--), N <= m && (F = !1, N = 0, I--);
2720
- let ee = C.node().getBBox();
2721
- if (w.width + m * 2 - (A + j + M + N) > 0) {
2722
- let e = w.width + m * 2 - (A + j + M + N);
2723
- A += e / I, j += e / I, M > 0 && (M += e / I), N > 0 && (N += e / I);
3238
+ A <= p && (M = !1, A = 0, I--), j <= p && (F = !1, j = 0, I--);
3239
+ let L = S.node().getBBox();
3240
+ if (w.width + p * 2 - (O + k + A + j) > 0) {
3241
+ let e = w.width + p * 2 - (O + k + A + j);
3242
+ O += e / I, k += e / I, A > 0 && (A += e / I), j > 0 && (j += e / I);
2724
3243
  }
2725
- let te = A + j + M + N, L = S.svg(C), R = g(t, {});
2726
- t.look !== "handDrawn" && (R.roughness = 0, R.fillStyle = "solid");
2727
- let ne = 0;
2728
- k.length > 0 && (ne = k.reduce((e, t) => e + (t?.rowHeight ?? 0), 0));
2729
- let z = Math.max(ee.width + m * 2, t?.width || 0, te), B = Math.max((ne ?? 0) + w.height, t?.height || 0), V = -z / 2, H = -B / 2;
2730
- if (C.selectAll("g:not(:first-child)").each((e, t, r) => {
2731
- let i = n(r[t]), a = i.attr("transform"), o = 0, s = 0;
3244
+ let ee = O + k + A + j, R = C.svg(S), z = g(n, {});
3245
+ n.look !== "handDrawn" && (z.roughness = 0, z.fillStyle = "solid");
3246
+ let te = 0;
3247
+ D.length > 0 && (te = D.reduce((e, t) => e + (t?.rowHeight ?? 0), 0));
3248
+ let B = Math.max(L.width + p * 2, n?.width || 0, ee), ne = Math.max((te ?? 0) + w.height, n?.height || 0), V = -B / 2, H = -ne / 2;
3249
+ if (S.selectAll("g:not(:first-child)").each((e, n, r) => {
3250
+ let i = t(r[n]), a = i.attr("transform"), o = 0, s = 0;
2732
3251
  if (a) {
2733
3252
  let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);
2734
- e && (o = parseFloat(e[1]), s = parseFloat(e[2]), i.attr("class").includes("attribute-name") ? o += A : i.attr("class").includes("attribute-keys") ? o += A + j : i.attr("class").includes("attribute-comment") && (o += A + j + M));
3253
+ e && (o = parseFloat(e[1]), s = parseFloat(e[2]), i.attr("class").includes("attribute-name") ? o += O : i.attr("class").includes("attribute-keys") ? o += O + k : i.attr("class").includes("attribute-comment") && (o += O + k + A));
2735
3254
  }
2736
- i.attr("transform", `translate(${V + m / 2 + o}, ${s + H + w.height + h / 2})`);
2737
- }), C.select(".name").attr("transform", "translate(" + -w.width / 2 + ", " + (H + h / 2) + ")"), i != null && Pt.has(i)) {
3255
+ i.attr("transform", `translate(${V + p / 2 + o}, ${s + H + w.height + h / 2})`);
3256
+ }), S.select(".name").attr("transform", "translate(" + -w.width / 2 + ", " + (H + h / 2) + ")"), i != null && tn.has(i)) {
2738
3257
  let e = r.colorIndex ?? 0;
2739
- C.attr("data-color-id", `color-${e % d.length}`);
3258
+ S.attr("data-color-id", `color-${e % d.length}`);
2740
3259
  }
2741
- let re = L.rectangle(V, H, z, B, R), ie = C.insert(() => re, ":first-child").attr("class", "outer-path").attr("style", v.join(""));
2742
- O.push(0);
2743
- for (let [e, t] of k.entries()) {
2744
- let n = (e + 1) % 2 == 0 && t.yOffset !== 0, r = L.rectangle(V, w.height + H + t?.yOffset, z, t?.rowHeight, {
2745
- ...R,
2746
- fill: n ? o : l,
3260
+ let re = R.rectangle(V, H, B, ne, z), ie = S.insert(() => re, ":first-child").attr("class", "outer-path").attr("style", v.join(""));
3261
+ E.push(0);
3262
+ for (let [e, t] of D.entries()) {
3263
+ let n = (e + 1) % 2 == 0 && t.yOffset !== 0, r = R.rectangle(V, w.height + H + t?.yOffset, B, t?.rowHeight, {
3264
+ ...z,
3265
+ fill: n ? s : l,
2747
3266
  stroke: u
2748
3267
  });
2749
- C.insert(() => r, "g.label").attr("style", v.join("")).attr("class", `row-rect-${n ? "even" : "odd"}`);
3268
+ S.insert(() => r, "g.label").attr("style", v.join("")).attr("class", `row-rect-${n ? "even" : "odd"}`);
2750
3269
  }
2751
- let U = 1e-4, G = Rt(V, w.height + H, z + V, w.height + H, U), K = L.polygon(G.map((e) => [e.x, e.y]), R);
2752
- if (C.insert(() => K).attr("class", "divider"), G = Rt(A + V, w.height + H, A + V, B + H, U), K = L.polygon(G.map((e) => [e.x, e.y]), R), C.insert(() => K).attr("class", "divider"), P) {
2753
- let e = A + j + V;
2754
- G = Rt(e, w.height + H, e, B + H, U), K = L.polygon(G.map((e) => [e.x, e.y]), R), C.insert(() => K).attr("class", "divider");
3270
+ let U = 1e-4, W = on(V, w.height + H, B + V, w.height + H, U), G = R.polygon(W.map((e) => [e.x, e.y]), z);
3271
+ if (S.insert(() => G).attr("class", "divider"), W = on(O + V, w.height + H, O + V, ne + H, U), G = R.polygon(W.map((e) => [e.x, e.y]), z), S.insert(() => G).attr("class", "divider"), M) {
3272
+ let e = O + k + V;
3273
+ W = on(e, w.height + H, e, ne + H, U), G = R.polygon(W.map((e) => [e.x, e.y]), z), S.insert(() => G).attr("class", "divider");
2755
3274
  }
2756
3275
  if (F) {
2757
- let e = A + j + M + V;
2758
- G = Rt(e, w.height + H, e, B + H, U), K = L.polygon(G.map((e) => [e.x, e.y]), R), C.insert(() => K).attr("class", "divider");
3276
+ let e = O + k + A + V;
3277
+ W = on(e, w.height + H, e, ne + H, U), G = R.polygon(W.map((e) => [e.x, e.y]), z), S.insert(() => G).attr("class", "divider");
2759
3278
  }
2760
- for (let e of O) {
3279
+ for (let e of E) {
2761
3280
  let t = w.height + H + e;
2762
- G = Rt(V, t, z + V, t, U), K = L.polygon(G.map((e) => [e.x, e.y]), R), C.insert(() => K).attr("class", "divider");
3281
+ W = on(V, t, B + V, t, U), G = R.polygon(W.map((e) => [e.x, e.y]), z), S.insert(() => G).attr("class", "divider");
2763
3282
  }
2764
- if (T(t, ie), b && t.look !== "handDrawn") if (i != null && Ft.has(i)) C.selectAll("path").attr("style", b);
3283
+ if (N(n, ie), b && n.look !== "handDrawn") if (i != null && nn.has(i)) S.selectAll("path").attr("style", b);
2765
3284
  else {
2766
3285
  let e = b.split(";")?.filter((e) => e.includes("stroke"))?.map((e) => `${e}`).join("; ");
2767
- C.selectAll("path").attr("style", e ?? ""), C.selectAll(".row-rect-even path").attr("style", b);
3286
+ S.selectAll("path").attr("style", e ?? ""), S.selectAll(".row-rect-even path").attr("style", b);
2768
3287
  }
2769
- return t.intersect = function(e) {
2770
- return W.rect(t, e);
2771
- }, C;
2772
- }
2773
- t(It, "erBox");
2774
- async function Lt(e, t, r, i = 0, o = 0, s = [], l = "") {
2775
- let u = e.insert("g").attr("class", `label ${s.join(" ")}`).attr("transform", `translate(${i}, ${o})`).attr("style", l);
2776
- t !== a(t) && (t = a(t), t = t.replaceAll("<", "&lt;").replaceAll(">", "&gt;"));
2777
- let d = u.node().appendChild(await b(u, t, {
2778
- width: f(t, r) + 100,
3288
+ return n.intersect = function(e) {
3289
+ return K.rect(n, e);
3290
+ }, S;
3291
+ }
3292
+ d(rn, "erBox");
3293
+ async function an(e, n, r, a = 0, o = 0, s = [], l = "") {
3294
+ let u = e.insert("g").attr("class", `label ${s.join(" ")}`).attr("transform", `translate(${a}, ${o})`).attr("style", l);
3295
+ n !== i(n) && (n = i(n), n = n.replaceAll("<", "&lt;").replaceAll(">", "&gt;"));
3296
+ let d = u.node().appendChild(await x(u, n, {
3297
+ width: m(n, r) + 100,
2779
3298
  style: l,
2780
3299
  useHtmlLabels: r.htmlLabels
2781
3300
  }, r));
2782
- if (t.includes("&lt;") || t.includes("&gt;")) {
3301
+ if (n.includes("&lt;") || n.includes("&gt;")) {
2783
3302
  let e = d.children[0];
2784
3303
  for (e.textContent = e.textContent.replaceAll("&lt;", "<").replaceAll("&gt;", ">"); e.childNodes[0];) e = e.childNodes[0], e.textContent = e.textContent.replaceAll("&lt;", "<").replaceAll("&gt;", ">");
2785
3304
  }
2786
- let p = d.getBBox();
3305
+ let f = d.getBBox();
2787
3306
  if (c(r.htmlLabels)) {
2788
3307
  let e = d.children[0];
2789
3308
  e.style.textAlign = "start";
2790
- let t = n(d);
2791
- p = e.getBoundingClientRect(), t.attr("width", p.width), t.attr("height", p.height);
3309
+ let n = t(d);
3310
+ f = e.getBoundingClientRect(), n.attr("width", f.width), n.attr("height", f.height);
2792
3311
  }
2793
- return p;
3312
+ return f;
2794
3313
  }
2795
- t(Lt, "addText");
2796
- function Rt(e, t, n, r, i) {
3314
+ d(an, "addText");
3315
+ function on(e, t, n, r, i) {
2797
3316
  return e === n ? [
2798
3317
  {
2799
3318
  x: e - i / 2,
@@ -2830,25 +3349,25 @@ function Rt(e, t, n, r, i) {
2830
3349
  }
2831
3350
  ];
2832
3351
  }
2833
- t(Rt, "lineToPolygon");
2834
- async function zt(e, t, n, r, i = n.class.padding ?? 12) {
2835
- let a = r ? 0 : 3, o = e.insert("g").attr("class", E(t)).attr("id", t.domId || t.id), s = null, c = null, l = null, u = null, d = 0, f = 0, p = 0;
3352
+ d(on, "lineToPolygon");
3353
+ async function sn(e, t, n, r, i = n.class.padding ?? 12) {
3354
+ let a = r ? 0 : 3, o = e.insert("g").attr("class", P(t)).attr("id", t.domId || t.id), s = null, c = null, l = null, u = null, d = 0, f = 0, p = 0;
2836
3355
  if (s = o.insert("g").attr("class", "annotation-group text"), t.annotations.length > 0) {
2837
3356
  let e = t.annotations[0];
2838
- await Bt(s, { text: `\xAB${e}\xBB` }, 0), d = s.node().getBBox().height;
3357
+ await cn(s, { text: `\xAB${e}\xBB` }, 0), d = s.node().getBBox().height;
2839
3358
  }
2840
- c = o.insert("g").attr("class", "label-group text"), await Bt(c, t, 0, ["font-weight: bolder"]);
3359
+ c = o.insert("g").attr("class", "label-group text"), await cn(c, t, 0, ["font-weight: bolder"]);
2841
3360
  let m = c.node().getBBox();
2842
3361
  f = m.height, l = o.insert("g").attr("class", "members-group text");
2843
3362
  let h = 0;
2844
3363
  for (let e of t.members) {
2845
- let t = await Bt(l, e, h, [e.parseClassifier()]);
3364
+ let t = await cn(l, e, h, [e.parseClassifier()]);
2846
3365
  h += t + a;
2847
3366
  }
2848
3367
  p = l.node().getBBox().height, p <= 0 && (p = i / 2), u = o.insert("g").attr("class", "methods-group text");
2849
3368
  let g = 0;
2850
3369
  for (let e of t.methods) {
2851
- let t = await Bt(u, e, g, [e.parseClassifier()]);
3370
+ let t = await cn(u, e, g, [e.parseClassifier()]);
2852
3371
  g += t + a;
2853
3372
  }
2854
3373
  let _ = o.node().getBBox();
@@ -2861,84 +3380,67 @@ async function zt(e, t, n, r, i = n.class.padding ?? 12) {
2861
3380
  bbox: _
2862
3381
  };
2863
3382
  }
2864
- t(zt, "textHelper");
2865
- async function Bt(e, a, o, l = []) {
2866
- let u = e.insert("g").attr("class", "label").attr("style", l.join("; ")), p = s(), m = "useHtmlLabels" in a ? a.useHtmlLabels : c(p.htmlLabels) ?? !0, h = "";
2867
- h = "text" in a ? a.text : a.label, !m && h.startsWith("\\") && (h = h.substring(1)), r(h) && (m = !0);
2868
- let g = await b(u, i(d(h)), {
2869
- width: f(h, p) + 50,
3383
+ d(sn, "textHelper");
3384
+ async function cn(e, i, a, s = []) {
3385
+ let l = e.insert("g").attr("class", "label").attr("style", s.join("; ")), u = o(), d = "useHtmlLabels" in i ? i.useHtmlLabels : c(u.htmlLabels) ?? !0, p = "";
3386
+ p = "text" in i ? i.text : i.label, !d && p.startsWith("\\") && (p = p.substring(1)), n(p) && (d = !0);
3387
+ let h = await x(l, r(f(p)), {
3388
+ width: m(p, u) + 50,
2870
3389
  classes: "markdown-node-label",
2871
- useHtmlLabels: m
2872
- }, p), _, v = 1;
2873
- if (m) {
2874
- let e = g.children[0], r = n(g);
2875
- v = e.innerHTML.split("<br>").length, e.innerHTML.includes("</math>") && (v += e.innerHTML.split("<mrow>").length - 1);
2876
- let i = e.getElementsByTagName("img");
2877
- if (i) {
2878
- let e = h.replace(/<img[^>]*>/g, "").trim() === "";
2879
- await Promise.all([...i].map((n) => new Promise((r) => {
2880
- function i() {
2881
- if (n.style.display = "flex", n.style.flexDirection = "column", e) {
2882
- let e = p.fontSize?.toString() ?? window.getComputedStyle(document.body).fontSize, t = parseInt(e, 10) * 5 + "px";
2883
- n.style.minWidth = t, n.style.maxWidth = t;
2884
- } else n.style.width = "100%";
2885
- r(n);
2886
- }
2887
- t(i, "setupImage"), setTimeout(() => {
2888
- n.complete && i();
2889
- }), n.addEventListener("error", i), n.addEventListener("load", i);
2890
- })));
2891
- }
2892
- _ = e.getBoundingClientRect(), r.attr("width", _.width), r.attr("height", _.height);
3390
+ useHtmlLabels: d
3391
+ }, u), g, _ = 1;
3392
+ if (d) {
3393
+ let e = h.children[0], n = t(h);
3394
+ _ = e.innerHTML.split("<br>").length, e.innerHTML.includes("</math>") && (_ += e.innerHTML.split("<mrow>").length - 1), await E(e), g = e.getBoundingClientRect(), n.attr("width", g.width), n.attr("height", g.height);
2893
3395
  } else {
2894
- l.includes("font-weight: bolder") && n(g).selectAll("tspan").attr("font-weight", ""), v = g.children.length;
2895
- let e = g.children[0];
2896
- (g.textContent === "" || g.textContent.includes("&gt")) && (e.textContent = h[0] + h.substring(1).replaceAll("&gt;", ">").replaceAll("&lt;", "<").trim(), h[1] === " " && (e.textContent = e.textContent[0] + " " + e.textContent.substring(1))), e.textContent === "undefined" && (e.textContent = ""), _ = g.getBBox();
3396
+ s.includes("font-weight: bolder") && t(h).selectAll("tspan").attr("font-weight", ""), _ = h.children.length;
3397
+ let e = h.children[0];
3398
+ (h.textContent === "" || h.textContent.includes("&gt")) && (e.textContent = p[0] + p.substring(1).replaceAll("&gt;", ">").replaceAll("&lt;", "<").trim(), p[1] === " " && (e.textContent = e.textContent[0] + " " + e.textContent.substring(1))), e.textContent === "undefined" && (e.textContent = ""), g = h.getBBox();
2897
3399
  }
2898
- return u.attr("transform", "translate(0," + (-_.height / (2 * v) + o) + ")"), _.height;
3400
+ return l.attr("transform", "translate(0," + (-g.height / (2 * _) + a) + ")"), g.height;
2899
3401
  }
2900
- t(Bt, "addText");
2901
- async function Vt(e, t) {
2902
- let r = l(), { themeVariables: i } = r, { useGradient: a } = i, o = r.class.padding ?? 12, s = o, u = t.useHtmlLabels ?? c(r.htmlLabels) ?? !0, d = t;
3402
+ d(cn, "addText");
3403
+ async function ln(e, n) {
3404
+ let r = l(), { themeVariables: i } = r, { useGradient: a } = i, o = r.class.padding ?? 12, s = o, u = n.useHtmlLabels ?? c(r.htmlLabels) ?? !0, d = n;
2903
3405
  d.annotations = d.annotations ?? [], d.members = d.members ?? [], d.methods = d.methods ?? [];
2904
- let { shapeSvg: f, bbox: p } = await zt(e, t, r, u, s), { labelStyles: m, nodeStyles: h } = _(t);
2905
- t.labelStyle = m, t.cssStyles = d.styles || "";
3406
+ let { shapeSvg: f, bbox: p } = await sn(e, n, r, u, s), { labelStyles: m, nodeStyles: h } = _(n);
3407
+ n.labelStyle = m, n.cssStyles = d.styles || "";
2906
3408
  let v = d.styles?.join(";") || h || "";
2907
- t.cssStyles ||= v.replaceAll("!important", "").split(";");
2908
- let y = d.members.length === 0 && d.methods.length === 0 && !r.class?.hideEmptyMembersBox, b = S.svg(f), x = g(t, {});
2909
- t.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
2910
- let C = Math.max(t.width ?? 0, p.width), w = Math.max(t.height ?? 0, p.height), E = (t.height ?? 0) > p.height;
3409
+ n.cssStyles ||= v.replaceAll("!important", "").split(";");
3410
+ let y = d.members.length === 0 && d.methods.length === 0 && !r.class?.hideEmptyMembersBox, b = C.svg(f), x = g(n, {});
3411
+ n.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
3412
+ let S = Math.max(n.width ?? 0, p.width), w = Math.max(n.height ?? 0, p.height), T = (n.height ?? 0) > p.height;
2911
3413
  d.members.length === 0 && d.methods.length === 0 ? w += s : d.members.length > 0 && d.methods.length === 0 && (w += s * 2);
2912
- let D = -C / 2, O = -w / 2, k = y ? o * 2 : d.members.length === 0 && d.methods.length === 0 ? -o : 0;
2913
- E && (k = o * 2);
2914
- let A = b.rectangle(D - o, O - o - (y ? o : d.members.length === 0 && d.methods.length === 0 ? -o / 2 : 0), C + 2 * o, w + 2 * o + k, x), j = f.insert(() => A, ":first-child");
2915
- j.attr("class", "basic label-container outer-path");
2916
- let M = j.node().getBBox(), N = f.select(".annotation-group").node().getBBox().height - (y ? o / 2 : 0) || 0, P = f.select(".label-group").node().getBBox().height - (y ? o / 2 : 0) || 0, F = f.select(".members-group").node().getBBox().height - (y ? o / 2 : 0) || 0, I = (N + P + O + o - (O - o - (y ? o : d.members.length === 0 && d.methods.length === 0 ? -o / 2 : 0))) / 2;
2917
- if (f.selectAll(".text").each((e, t, i) => {
2918
- let a = n(i[t]), c = a.attr("transform"), l = 0;
3414
+ let E = -S / 2, D = -w / 2, O = y ? o * 2 : d.members.length === 0 && d.methods.length === 0 ? -o : 0;
3415
+ T && (O = o * 2);
3416
+ let k = b.rectangle(E - o, D - o - (y ? o : d.members.length === 0 && d.methods.length === 0 ? -o / 2 : 0), S + 2 * o, w + 2 * o + O, x), A = f.insert(() => k, ":first-child");
3417
+ A.attr("class", "basic label-container outer-path");
3418
+ let j = A.node().getBBox(), M = f.select(".annotation-group").node().getBBox().height - (y ? o / 2 : 0) || 0, P = f.select(".label-group").node().getBBox().height - (y ? o / 2 : 0) || 0, F = f.select(".members-group").node().getBBox().height - (y ? o / 2 : 0) || 0, I = (M + P + D + o - (D - o - (y ? o : d.members.length === 0 && d.methods.length === 0 ? -o / 2 : 0))) / 2;
3419
+ if (f.selectAll(".text").each((e, n, i) => {
3420
+ let a = t(i[n]), c = a.attr("transform"), l = 0;
2919
3421
  if (c) {
2920
3422
  let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(c);
2921
3423
  e && (l = parseFloat(e[2]));
2922
3424
  }
2923
- let p = l + O + o - (y ? o : d.members.length === 0 && d.methods.length === 0 ? -o / 2 : 0);
3425
+ let p = l + D + o - (y ? o : d.members.length === 0 && d.methods.length === 0 ? -o / 2 : 0);
2924
3426
  if (a.attr("class").includes("methods-group")) {
2925
3427
  let e = Math.max(F, s / 2);
2926
- p = E ? Math.max(I, N + P + e + O + s * 2 + o) + s * 2 : N + P + e + O + s * 4 + o;
3428
+ p = T ? Math.max(I, M + P + e + D + s * 2 + o) + s * 2 : M + P + e + D + s * 4 + o;
2927
3429
  }
2928
3430
  d.members.length === 0 && d.methods.length === 0 && r.class?.hideEmptyMembersBox && (p = d.annotations.length > 0 ? l - s : l), u || (p -= 4);
2929
- let m = D;
3431
+ let m = E;
2930
3432
  (a.attr("class").includes("label-group") || a.attr("class").includes("annotation-group")) && (m = -a.node()?.getBBox().width / 2 || 0, f.selectAll("text").each(function(e, t, n) {
2931
3433
  window.getComputedStyle(n[t]).textAnchor === "middle" && (m = 0);
2932
3434
  })), a.attr("transform", `translate(${m}, ${p})`);
2933
3435
  }), d.members.length > 0 || d.methods.length > 0 || y) {
2934
- let e = N + P + O + o, n = b.line(M.x, e, M.x + M.width, e + .001, x);
2935
- f.insert(() => n).attr("class", `divider${t.look === "neo" && !a ? " neo-line" : ""}`).attr("style", v);
3436
+ let e = M + P + D + o, t = b.line(j.x, e, j.x + j.width, e + .001, x);
3437
+ f.insert(() => t).attr("class", `divider${n.look === "neo" && !a ? " neo-line" : ""}`).attr("style", v);
2936
3438
  }
2937
3439
  if (y || d.members.length > 0 || d.methods.length > 0) {
2938
- let e = N + P + F + O + s * 2 + o, n = b.line(M.x, E ? Math.max(I, e) : e, M.x + M.width, (E ? Math.max(I, e) : e) + .001, x);
2939
- f.insert(() => n).attr("class", `divider${t.look === "neo" && !a ? " neo-line" : ""}`).attr("style", v);
3440
+ let e = M + P + F + D + s * 2 + o, t = b.line(j.x, T ? Math.max(I, e) : e, j.x + j.width, (T ? Math.max(I, e) : e) + .001, x);
3441
+ f.insert(() => t).attr("class", `divider${n.look === "neo" && !a ? " neo-line" : ""}`).attr("style", v);
2940
3442
  }
2941
- if (d.look !== "handDrawn" && f.selectAll("path").attr("style", v), j.select(":nth-child(2)").attr("style", v), f.selectAll(".divider").select("path").attr("style", v), t.labelStyle ? f.selectAll("span").attr("style", t.labelStyle) : f.selectAll("span").attr("style", v), !u) {
3443
+ if (d.look !== "handDrawn" && f.selectAll("path").attr("style", v), A.select(":nth-child(2)").attr("style", v), f.selectAll(".divider").select("path").attr("style", v), n.labelStyle ? f.selectAll("span").attr("style", n.labelStyle) : f.selectAll("span").attr("style", v), !u) {
2942
3444
  let e = RegExp(/color\s*:\s*([^;]*)/), t = e.exec(v);
2943
3445
  if (t) {
2944
3446
  let e = t[0].replace("color", "fill");
@@ -2951,81 +3453,85 @@ async function Vt(e, t) {
2951
3453
  }
2952
3454
  }
2953
3455
  }
2954
- return T(t, j), t.intersect = function(e) {
2955
- return W.rect(t, e);
3456
+ return N(n, A), n.intersect = function(e) {
3457
+ return K.rect(n, e);
2956
3458
  }, f;
2957
3459
  }
2958
- t(Vt, "classBox");
2959
- async function Ht(e, t) {
2960
- let { labelStyles: r, nodeStyles: i } = _(t);
2961
- t.labelStyle = r;
2962
- let a = t, o = t, s = "verifyMethod" in t, c = E(t), { themeVariables: u } = l(), { borderColorArray: d, requirementEdgeLabelBackground: f } = u, p = e.insert("g").attr("class", c).attr("id", t.domId ?? t.id), m;
2963
- m = s ? await $(p, `&lt;&lt;${a.type}&gt;&gt;`, 0, t.labelStyle) : await $(p, "&lt;&lt;Element&gt;&gt;", 0, t.labelStyle);
2964
- let h = m, v = await $(p, a.name, h, t.labelStyle + "; font-weight: bold;");
2965
- if (h += v + 20, s) {
2966
- let e = await $(p, `${a.requirementId ? `ID: ${a.requirementId}` : ""}`, h, t.labelStyle);
2967
- h += e;
2968
- let n = await $(p, `${a.text ? `Text: ${a.text}` : ""}`, h, t.labelStyle);
2969
- h += n;
2970
- let r = await $(p, `${a.risk ? `Risk: ${a.risk}` : ""}`, h, t.labelStyle);
2971
- h += r, await $(p, `${a.verifyMethod ? `Verification: ${a.verifyMethod}` : ""}`, h, t.labelStyle);
3460
+ d(ln, "classBox");
3461
+ async function un(e, n) {
3462
+ let { labelStyles: r, nodeStyles: i } = _(n);
3463
+ n.labelStyle = r;
3464
+ let a = n, o = n, s = "verifyMethod" in n, c = P(n), u = l(), { themeVariables: d } = u, { borderColorArray: f, requirementEdgeLabelBackground: p } = d, m = u.layout === "elk" ? "start" : "center", h = e.insert("g").attr("class", c).attr("id", n.domId ?? n.id), v;
3465
+ v = s ? await $(h, `&lt;&lt;${a.type}&gt;&gt;`, 0, n.labelStyle) : await $(h, "&lt;&lt;Element&gt;&gt;", 0, n.labelStyle);
3466
+ let y = v, b = await $(h, a.name, y, n.labelStyle + "; font-weight: bold;");
3467
+ if (y += b + 20, s) {
3468
+ let e = await $(h, `${a.requirementId ? `ID: ${a.requirementId}` : ""}`, y, n.labelStyle, m);
3469
+ y += e;
3470
+ let t = await $(h, `${a.text ? `Text: ${a.text}` : ""}`, y, n.labelStyle, m);
3471
+ y += t;
3472
+ let r = await $(h, `${a.risk ? `Risk: ${a.risk}` : ""}`, y, n.labelStyle, m);
3473
+ y += r, await $(h, `${a.verifyMethod ? `Verification: ${a.verifyMethod}` : ""}`, y, n.labelStyle, m);
2972
3474
  } else {
2973
- let e = await $(p, `${o.type ? `Type: ${o.type}` : ""}`, h, t.labelStyle);
2974
- h += e, await $(p, `${o.docRef ? `Doc Ref: ${o.docRef}` : ""}`, h, t.labelStyle);
3475
+ let e = await $(h, `${o.type ? `Type: ${o.type}` : ""}`, y, n.labelStyle, m);
3476
+ y += e, await $(h, `${o.docRef ? `Doc Ref: ${o.docRef}` : ""}`, y, n.labelStyle, m);
2975
3477
  }
2976
- let y = (p.node()?.getBBox().width ?? 200) + 20, b = (p.node()?.getBBox().height ?? 200) + 20, x = -y / 2, C = -b / 2, w = S.svg(p), D = g(t, {});
2977
- t.look !== "handDrawn" && (D.roughness = 0, D.fillStyle = "solid");
2978
- let O = w.rectangle(x, C, y, b, D), k = p.insert(() => O, ":first-child");
2979
- if (k.attr("class", "basic label-container outer-path").attr("style", i), d?.length) {
2980
- let e = t.colorIndex ?? 0;
2981
- p.attr("data-color-id", `color-${e % d.length}`);
3478
+ let x = (h.node()?.getBBox().width ?? 200) + 20, S = (h.node()?.getBBox().height ?? 200) + 20, w = -x / 2, T = -S / 2, E = C.svg(h), D = g(n, {});
3479
+ n.look !== "handDrawn" && (D.roughness = 0, D.fillStyle = "solid");
3480
+ let O = E.rectangle(w, T, x, S, D), k = h.insert(() => O, ":first-child");
3481
+ if (k.attr("class", "basic label-container outer-path").attr("style", i), f?.length) {
3482
+ let e = n.colorIndex ?? 0;
3483
+ h.attr("data-color-id", `color-${e % f.length}`);
2982
3484
  }
2983
- if (p.selectAll(".label").each((e, t, r) => {
2984
- let i = n(r[t]), a = i.attr("transform"), o = 0, s = 0;
3485
+ if (h.selectAll(".label").each((e, n, r) => {
3486
+ let i = t(r[n]), a = i.attr("transform"), o = 0, s = 0;
2985
3487
  if (a) {
2986
3488
  let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);
2987
3489
  e && (o = parseFloat(e[1]), s = parseFloat(e[2]));
2988
3490
  }
2989
- let c = s - b / 2, l = x + 20 / 2;
2990
- (t === 0 || t === 1) && (l = o), i.attr("transform", `translate(${l}, ${c + 20})`);
2991
- }), h > m + v + 20) {
2992
- let e = C + m + v + 20, n;
2993
- if (t.look === "neo") {
2994
- let t = .001, r = [
2995
- [x, e],
2996
- [x + y, e],
2997
- [x + y, e + t],
2998
- [x, e + t]
3491
+ let c = s - S / 2, l = w + 20 / 2;
3492
+ (n === 0 || n === 1) && (l = o), i.attr("transform", `translate(${l}, ${c + 20})`);
3493
+ }), y > v + b + 20) {
3494
+ let e = T + v + b + 20, t;
3495
+ if (n.look === "neo") {
3496
+ let n = .001, r = [
3497
+ [w, e],
3498
+ [w + x, e],
3499
+ [w + x, e + n],
3500
+ [w, e + n]
2999
3501
  ];
3000
- n = w.polygon(r, D);
3001
- } else n = w.line(x, e, x + y, e, D);
3002
- p.insert(() => n).attr("class", "divider");
3502
+ t = E.polygon(r, D);
3503
+ } else t = E.line(w, e, w + x, e, D);
3504
+ h.insert(() => t).attr("class", "divider");
3003
3505
  }
3004
- return T(t, k), t.intersect = function(e) {
3005
- return W.rect(t, e);
3006
- }, i && t.look !== "handDrawn" && (f || d?.length) && p.selectAll("path").attr("style", i), p;
3007
- }
3008
- t(Ht, "requirementBox");
3009
- async function $(e, t, r, a = "") {
3010
- if (t === "") return 0;
3011
- let o = e.insert("g").attr("class", "label").attr("style", a), s = l(), c = s.htmlLabels ?? !0, u = await b(o, i(d(t)), {
3012
- width: f(t, s) + 50,
3506
+ return N(n, k), n.intersect = function(e) {
3507
+ return K.rect(n, e);
3508
+ }, i && n.look !== "handDrawn" && (p || f?.length) && h.selectAll("path").attr("style", i), h;
3509
+ }
3510
+ d(un, "requirementBox");
3511
+ async function $(e, n, i, a = "", o = "center") {
3512
+ if (n === "") return 0;
3513
+ let s = e.insert("g").attr("class", "label").attr("style", a), c = l(), u = c.htmlLabels ?? !0, d = await x(s, r(f(n)), {
3514
+ width: m(n, c) + 50,
3013
3515
  classes: "markdown-node-label",
3014
- useHtmlLabels: c,
3516
+ useHtmlLabels: u,
3015
3517
  style: a
3016
- }, s), p;
3017
- if (c) {
3018
- let e = u.children[0], t = n(u);
3019
- p = e.getBoundingClientRect(), t.attr("width", p.width), t.attr("height", p.height);
3518
+ }, c), p;
3519
+ if (u) {
3520
+ let e = d.children[0], n = t(d);
3521
+ o === "start" && t(e).style("text-align", "left"), p = e.getBoundingClientRect(), n.attr("width", p.width), n.attr("height", p.height);
3020
3522
  } else {
3021
- let e = u.children[0];
3523
+ let e = d.children[0];
3022
3524
  for (let t of e.children) a && t.setAttribute("style", a);
3023
- p = u.getBBox(), p.height += 6;
3525
+ if (o === "start") {
3526
+ e.setAttribute("text-anchor", "start");
3527
+ for (let t of e.children) t.setAttribute("text-anchor", "start");
3528
+ }
3529
+ p = d.getBBox(), p.height += 6;
3024
3530
  }
3025
- return o.attr("transform", `translate(${-p.width / 2},${-p.height / 2 + r})`), p.height;
3531
+ return s.attr("transform", `translate(${-p.width / 2},${-p.height / 2 + i})`), p.height;
3026
3532
  }
3027
- t($, "addText");
3028
- var Ut = /* @__PURE__ */ t((e) => {
3533
+ d($, "addText");
3534
+ var dn = /* @__PURE__ */ d((e) => {
3029
3535
  switch (e) {
3030
3536
  case "Very High": return "red";
3031
3537
  case "High": return "orange";
@@ -3034,12 +3540,12 @@ var Ut = /* @__PURE__ */ t((e) => {
3034
3540
  case "Very Low": return "lightblue";
3035
3541
  }
3036
3542
  }, "colorFromPriority");
3037
- async function Wt(e, t, { config: n }) {
3543
+ async function fn(e, t, { config: n }) {
3038
3544
  let { labelStyles: r, nodeStyles: i } = _(t);
3039
3545
  t.labelStyle = r || "";
3040
3546
  let a = t.width;
3041
3547
  t.width = (t.width ?? 200) - 10;
3042
- let { shapeSvg: o, bbox: s, label: c } = await C(e, t, E(t)), l = t.padding || 10, u = "", d;
3548
+ let { shapeSvg: o, bbox: s, label: c } = await j(e, t, P(t)), l = t.padding || 10, u = "", d;
3043
3549
  "ticket" in t && t.ticket && n?.kanban?.ticketBaseUrl && (u = n?.kanban?.ticketBaseUrl.replace("#TICKET#", t.ticket), d = o.insert("svg:a", ":first-child").attr("class", "kanban-ticket-link").attr("xlink:href", u).attr("target", "_blank"));
3044
3550
  let f = {
3045
3551
  useHtmlLabels: t.useHtmlLabels,
@@ -3049,32 +3555,32 @@ async function Wt(e, t, { config: n }) {
3049
3555
  padding: t.padding || 8,
3050
3556
  centerLabel: !1
3051
3557
  }, p, m;
3052
- d ? {label: p, bbox: m} = await w(d, "ticket" in t && t.ticket || "", f) : {label: p, bbox: m} = await w(o, "ticket" in t && t.ticket || "", f);
3053
- let { label: h, bbox: v } = await w(o, "assigned" in t && t.assigned || "", f);
3558
+ d ? {label: p, bbox: m} = await M(d, "ticket" in t && t.ticket || "", f) : {label: p, bbox: m} = await M(o, "ticket" in t && t.ticket || "", f);
3559
+ let { label: h, bbox: v } = await M(o, "assigned" in t && t.assigned || "", f);
3054
3560
  t.width = a;
3055
- let y = t?.width || 0, b = Math.max(m.height, v.height) / 2, x = Math.max(s.height + 20, t?.height || 0) + b, D = -y / 2, O = -x / 2;
3561
+ let y = t?.width || 0, b = Math.max(m.height, v.height) / 2, x = Math.max(s.height + 20, t?.height || 0) + b, S = -y / 2, w = -x / 2;
3056
3562
  c.attr("transform", "translate(" + (l - y / 2) + ", " + (-b - s.height / 2) + ")"), p.attr("transform", "translate(" + (l - y / 2) + ", " + (-b + s.height / 2) + ")"), h.attr("transform", "translate(" + (l + y / 2 - v.width - 20) + ", " + (-b + s.height / 2) + ")");
3057
- let k, { rx: A, ry: j } = t, { cssStyles: M } = t;
3563
+ let T, { rx: E, ry: D } = t, { cssStyles: O } = t;
3058
3564
  if (t.look === "handDrawn") {
3059
- let e = S.svg(o), n = g(t, {}), r = A || j ? e.path(N(D, O, y, x, A || 0), n) : e.rectangle(D, O, y, x, n);
3060
- k = o.insert(() => r, ":first-child"), k.attr("class", "basic label-container").attr("style", M || null);
3565
+ let e = C.svg(o), n = g(t, {}), r = E || D ? e.path(z(S, w, y, x, E || 0), n) : e.rectangle(S, w, y, x, n);
3566
+ T = o.insert(() => r, ":first-child"), T.attr("class", "basic label-container").attr("style", O || null);
3061
3567
  } else {
3062
- k = o.insert("rect", ":first-child"), k.attr("class", "basic label-container __APA__").attr("style", i).attr("rx", A ?? 5).attr("ry", j ?? 5).attr("x", D).attr("y", O).attr("width", y).attr("height", x);
3568
+ T = o.insert("rect", ":first-child"), T.attr("class", "basic label-container __APA__").attr("style", i).attr("rx", E ?? 5).attr("ry", D ?? 5).attr("x", S).attr("y", w).attr("width", y).attr("height", x);
3063
3569
  let e = "priority" in t && t.priority;
3064
3570
  if (e) {
3065
- let t = o.append("line"), n = D + 2, r = O + Math.floor((A ?? 0) / 2), i = O + x - Math.floor((A ?? 0) / 2);
3066
- t.attr("x1", n).attr("y1", r).attr("x2", n).attr("y2", i).attr("stroke-width", "4").attr("stroke", Ut(e));
3571
+ let t = o.append("line"), n = S + 2, r = w + Math.floor((E ?? 0) / 2), i = w + x - Math.floor((E ?? 0) / 2);
3572
+ t.attr("x1", n).attr("y1", r).attr("x2", n).attr("y2", i).attr("stroke-width", "4").attr("stroke", dn(e));
3067
3573
  }
3068
3574
  }
3069
- return T(t, k), t.height = x, t.intersect = function(e) {
3070
- return W.rect(t, e);
3575
+ return N(t, T), t.height = x, t.intersect = function(e) {
3576
+ return K.rect(t, e);
3071
3577
  }, o;
3072
3578
  }
3073
- t(Wt, "kanbanItem");
3074
- async function Gt(t, n) {
3579
+ d(fn, "kanbanItem");
3580
+ async function pn(t, n) {
3075
3581
  let { labelStyles: r, nodeStyles: i } = _(n);
3076
3582
  n.labelStyle = r;
3077
- let { shapeSvg: a, bbox: o, halfPadding: s, label: c } = await C(t, n, E(n)), l = o.width + 10 * s, u = o.height + 8 * s, d = .15 * l, { cssStyles: f } = n, m = o.width + 20, h = o.height + 20, v = Math.max(l, m), y = Math.max(u, h);
3583
+ let { shapeSvg: a, bbox: o, halfPadding: s, label: c } = await j(t, n, P(n)), l = o.width + 10 * s, u = o.height + 8 * s, d = .15 * l, { cssStyles: f } = n, p = o.width + 20, m = o.height + 20, v = Math.max(l, p), y = Math.max(u, m);
3078
3584
  c.attr("transform", `translate(${-o.width / 2}, ${-o.height / 2})`);
3079
3585
  let b, x = `M0 0
3080
3586
  a${d},${d} 1 0,0 ${v * .25},${-1 * y * .1}
@@ -3096,49 +3602,49 @@ async function Gt(t, n) {
3096
3602
  a${d},${d} 1 0,0 ${v * .1},${-1 * y * .33}
3097
3603
  H0 V0 Z`;
3098
3604
  if (n.look === "handDrawn") {
3099
- let e = S.svg(a), t = g(n, {}), r = e.path(x, t);
3100
- b = a.insert(() => r, ":first-child"), b.attr("class", "basic label-container").attr("style", p(f));
3605
+ let e = C.svg(a), t = g(n, {}), r = e.path(x, t);
3606
+ b = a.insert(() => r, ":first-child"), b.attr("class", "basic label-container").attr("style", h(f));
3101
3607
  } else b = a.insert("path", ":first-child").attr("class", "basic label-container").attr("style", i).attr("d", x);
3102
- return b.attr("transform", `translate(${-v / 2}, ${-y / 2})`), T(n, b), n.calcIntersect = function(e, t) {
3103
- return W.rect(e, t);
3608
+ return b.attr("transform", `translate(${-v / 2}, ${-y / 2})`), N(n, b), n.calcIntersect = function(e, t) {
3609
+ return K.rect(e, t);
3104
3610
  }, n.intersect = function(t) {
3105
- return e.info("Bang intersect", n, t), W.rect(n, t);
3611
+ return e.info("Bang intersect", n, t), K.rect(n, t);
3106
3612
  }, a;
3107
3613
  }
3108
- t(Gt, "bang");
3109
- async function Kt(t, n) {
3614
+ d(pn, "bang");
3615
+ async function mn(t, n) {
3110
3616
  let { labelStyles: r, nodeStyles: i } = _(n);
3111
3617
  n.labelStyle = r;
3112
- let { shapeSvg: a, bbox: o, halfPadding: s, label: c } = await C(t, n, E(n)), l = o.width + 2 * s, u = o.height + 2 * s, d = .15 * l, f = .25 * l, m = .35 * l, h = .2 * l, { cssStyles: v } = n, y, b = `M0 0
3618
+ let { shapeSvg: a, bbox: o, halfPadding: s, label: c } = await j(t, n, P(n)), l = o.width + 2 * s, u = o.height + 2 * s, d = .15 * l, f = .25 * l, p = .35 * l, m = .2 * l, { cssStyles: v } = n, y, b = `M0 0
3113
3619
  a${d},${d} 0 0,1 ${l * .25},${-1 * l * .1}
3114
- a${m},${m} 1 0,1 ${l * .4},${-1 * l * .1}
3620
+ a${p},${p} 1 0,1 ${l * .4},${-1 * l * .1}
3115
3621
  a${f},${f} 1 0,1 ${l * .35},${l * .2}
3116
3622
 
3117
3623
  a${d},${d} 1 0,1 ${l * .15},${u * .35}
3118
- a${h},${h} 1 0,1 ${-1 * l * .15},${u * .65}
3624
+ a${m},${m} 1 0,1 ${-1 * l * .15},${u * .65}
3119
3625
 
3120
3626
  a${f},${d} 1 0,1 ${-1 * l * .25},${l * .15}
3121
- a${m},${m} 1 0,1 ${-1 * l * .5},0
3627
+ a${p},${p} 1 0,1 ${-1 * l * .5},0
3122
3628
  a${d},${d} 1 0,1 ${-1 * l * .25},${-1 * l * .15}
3123
3629
 
3124
3630
  a${d},${d} 1 0,1 ${-1 * l * .1},${-1 * u * .35}
3125
- a${h},${h} 1 0,1 ${l * .1},${-1 * u * .65}
3631
+ a${m},${m} 1 0,1 ${l * .1},${-1 * u * .65}
3126
3632
  H0 V0 Z`;
3127
3633
  if (n.look === "handDrawn") {
3128
- let e = S.svg(a), t = g(n, {}), r = e.path(b, t);
3129
- y = a.insert(() => r, ":first-child"), y.attr("class", "basic label-container").attr("style", p(v));
3634
+ let e = C.svg(a), t = g(n, {}), r = e.path(b, t);
3635
+ y = a.insert(() => r, ":first-child"), y.attr("class", "basic label-container").attr("style", h(v));
3130
3636
  } else y = a.insert("path", ":first-child").attr("class", "basic label-container").attr("style", i).attr("d", b);
3131
- return c.attr("transform", `translate(${-o.width / 2}, ${-o.height / 2})`), y.attr("transform", `translate(${-l / 2}, ${-u / 2})`), T(n, y), n.calcIntersect = function(e, t) {
3132
- return W.rect(e, t);
3637
+ return c.attr("transform", `translate(${-o.width / 2}, ${-o.height / 2})`), y.attr("transform", `translate(${-l / 2}, ${-u / 2})`), N(n, y), n.calcIntersect = function(e, t) {
3638
+ return K.rect(e, t);
3133
3639
  }, n.intersect = function(t) {
3134
- return e.info("Cloud intersect", n, t), W.rect(n, t);
3640
+ return e.info("Cloud intersect", n, t), K.rect(n, t);
3135
3641
  }, a;
3136
3642
  }
3137
- t(Kt, "cloud");
3138
- async function qt(e, t) {
3643
+ d(mn, "cloud");
3644
+ async function hn(e, t) {
3139
3645
  let { labelStyles: n, nodeStyles: r } = _(t);
3140
3646
  t.labelStyle = n;
3141
- let { shapeSvg: i, bbox: a, halfPadding: o, label: s } = await C(e, t, E(t)), c = a.width + 8 * o, l = a.height + 2 * o, u = t.look === "neo" ? `
3647
+ let { shapeSvg: i, bbox: a, halfPadding: o, label: s } = await j(e, t, P(t)), c = a.width + 8 * o, l = a.height + 2 * o, u = t.look === "neo" ? `
3142
3648
  M${-c / 2} ${l / 2 - 5}
3143
3649
  v${-l + 10}
3144
3650
  q0,-5 5,-5
@@ -3161,18 +3667,18 @@ async function qt(e, t) {
3161
3667
  `;
3162
3668
  if (!t.domId) throw Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);
3163
3669
  let d = i.append("path").attr("id", t.domId).attr("class", "node-bkg node-" + t.type).attr("style", r).attr("d", u);
3164
- return i.append("line").attr("class", "node-line-").attr("x1", -c / 2).attr("y1", l / 2).attr("x2", c / 2).attr("y2", l / 2), s.attr("transform", `translate(${-a.width / 2}, ${-a.height / 2})`), i.append(() => s.node()), T(t, d), t.calcIntersect = function(e, t) {
3165
- return W.rect(e, t);
3670
+ return i.append("line").attr("class", "node-line-").attr("x1", -c / 2).attr("y1", l / 2).attr("x2", c / 2).attr("y2", l / 2), s.attr("transform", `translate(${-a.width / 2}, ${-a.height / 2})`), i.append(() => s.node()), N(t, d), t.calcIntersect = function(e, t) {
3671
+ return K.rect(e, t);
3166
3672
  }, t.intersect = function(e) {
3167
- return W.rect(t, e);
3673
+ return K.rect(t, e);
3168
3674
  }, i;
3169
3675
  }
3170
- t(qt, "defaultMindmapNode");
3171
- async function Jt(e, t) {
3172
- return ue(e, t, { padding: t.padding ?? 0 });
3676
+ d(hn, "defaultMindmapNode");
3677
+ async function gn(e, t) {
3678
+ return De(e, t, { padding: t.padding ?? 0 });
3173
3679
  }
3174
- t(Jt, "mindmapCircle");
3175
- var Yt = [
3680
+ d(gn, "mindmapCircle");
3681
+ var _n = [
3176
3682
  {
3177
3683
  semanticName: "Process",
3178
3684
  name: "Rectangle",
@@ -3184,7 +3690,7 @@ var Yt = [
3184
3690
  "rectangle"
3185
3691
  ],
3186
3692
  internalAliases: ["squareRect"],
3187
- handler: lt
3693
+ handler: At
3188
3694
  },
3189
3695
  {
3190
3696
  semanticName: "Event",
@@ -3193,7 +3699,7 @@ var Yt = [
3193
3699
  description: "Represents an event",
3194
3700
  aliases: ["event"],
3195
3701
  internalAliases: ["roundedRect"],
3196
- handler: ot
3702
+ handler: Dt
3197
3703
  },
3198
3704
  {
3199
3705
  semanticName: "Terminal Point",
@@ -3201,7 +3707,7 @@ var Yt = [
3201
3707
  shortName: "stadium",
3202
3708
  description: "Terminal point",
3203
3709
  aliases: ["terminal", "pill"],
3204
- handler: ut
3710
+ handler: jt
3205
3711
  },
3206
3712
  {
3207
3713
  semanticName: "Subprocess",
@@ -3214,7 +3720,7 @@ var Yt = [
3214
3720
  "framed-rectangle",
3215
3721
  "subroutine"
3216
3722
  ],
3217
- handler: ht
3723
+ handler: It
3218
3724
  },
3219
3725
  {
3220
3726
  semanticName: "Database",
@@ -3226,7 +3732,7 @@ var Yt = [
3226
3732
  "database",
3227
3733
  "cylinder"
3228
3734
  ],
3229
- handler: Se
3735
+ handler: He
3230
3736
  },
3231
3737
  {
3232
3738
  semanticName: "Data Store",
@@ -3234,7 +3740,43 @@ var Yt = [
3234
3740
  shortName: "datastore",
3235
3741
  description: "Data flow diagram data store",
3236
3742
  aliases: ["data-store"],
3237
- handler: we
3743
+ handler: We
3744
+ },
3745
+ {
3746
+ semanticName: "Folder",
3747
+ name: "Folder",
3748
+ shortName: "folder",
3749
+ description: "Folder or directory",
3750
+ aliases: ["directory"],
3751
+ handler: Ze
3752
+ },
3753
+ {
3754
+ semanticName: "Bucket",
3755
+ name: "Bucket",
3756
+ shortName: "bucket",
3757
+ description: "Object storage bucket",
3758
+ handler: ue
3759
+ },
3760
+ {
3761
+ semanticName: "Console",
3762
+ name: "Console (terminal window)",
3763
+ shortName: "console",
3764
+ description: "Terminal or console window",
3765
+ handler: ke
3766
+ },
3767
+ {
3768
+ semanticName: "Browser",
3769
+ name: "Browser",
3770
+ shortName: "browser",
3771
+ description: "Browser window",
3772
+ handler: Ce
3773
+ },
3774
+ {
3775
+ semanticName: "Person",
3776
+ name: "Person",
3777
+ shortName: "person",
3778
+ description: "Person (circular head above a rounded body)",
3779
+ handler: Ie
3238
3780
  },
3239
3781
  {
3240
3782
  semanticName: "Start",
@@ -3242,7 +3784,7 @@ var Yt = [
3242
3784
  shortName: "circle",
3243
3785
  description: "Starting point",
3244
3786
  aliases: ["circ"],
3245
- handler: ue
3787
+ handler: De
3246
3788
  },
3247
3789
  {
3248
3790
  semanticName: "Bang",
@@ -3250,7 +3792,7 @@ var Yt = [
3250
3792
  shortName: "bang",
3251
3793
  description: "Bang",
3252
3794
  aliases: ["bang"],
3253
- handler: Gt
3795
+ handler: pn
3254
3796
  },
3255
3797
  {
3256
3798
  semanticName: "Cloud",
@@ -3258,7 +3800,7 @@ var Yt = [
3258
3800
  shortName: "cloud",
3259
3801
  description: "cloud",
3260
3802
  aliases: ["cloud"],
3261
- handler: Kt
3803
+ handler: mn
3262
3804
  },
3263
3805
  {
3264
3806
  semanticName: "Decision",
@@ -3270,7 +3812,7 @@ var Yt = [
3270
3812
  "diamond",
3271
3813
  "question"
3272
3814
  ],
3273
- handler: rt
3815
+ handler: wt
3274
3816
  },
3275
3817
  {
3276
3818
  semanticName: "Prepare Conditional",
@@ -3278,7 +3820,7 @@ var Yt = [
3278
3820
  shortName: "hex",
3279
3821
  description: "Preparation or condition step",
3280
3822
  aliases: ["hexagon", "prepare"],
3281
- handler: Pe
3823
+ handler: tt
3282
3824
  },
3283
3825
  {
3284
3826
  semanticName: "Data Input/Output",
@@ -3287,7 +3829,7 @@ var Yt = [
3287
3829
  description: "Represents input or output",
3288
3830
  aliases: ["lean-right", "in-out"],
3289
3831
  internalAliases: ["lean_right"],
3290
- handler: We
3832
+ handler: dt
3291
3833
  },
3292
3834
  {
3293
3835
  semanticName: "Data Input/Output",
@@ -3296,7 +3838,7 @@ var Yt = [
3296
3838
  description: "Represents output or input",
3297
3839
  aliases: ["lean-left", "out-in"],
3298
3840
  internalAliases: ["lean_left"],
3299
- handler: Ue
3841
+ handler: ut
3300
3842
  },
3301
3843
  {
3302
3844
  semanticName: "Priority Action",
@@ -3308,7 +3850,7 @@ var Yt = [
3308
3850
  "trapezoid-bottom",
3309
3851
  "trapezoid"
3310
3852
  ],
3311
- handler: Et
3853
+ handler: qt
3312
3854
  },
3313
3855
  {
3314
3856
  semanticName: "Manual Operation",
@@ -3321,7 +3863,7 @@ var Yt = [
3321
3863
  "inv-trapezoid"
3322
3864
  ],
3323
3865
  internalAliases: ["inv_trapezoid"],
3324
- handler: Ve
3866
+ handler: ct
3325
3867
  },
3326
3868
  {
3327
3869
  semanticName: "Stop",
@@ -3330,14 +3872,14 @@ var Yt = [
3330
3872
  description: "Represents a stop point",
3331
3873
  aliases: ["double-circle"],
3332
3874
  internalAliases: ["doublecircle"],
3333
- handler: Ee
3875
+ handler: Ke
3334
3876
  },
3335
3877
  {
3336
3878
  semanticName: "Text Block",
3337
3879
  name: "Text Block",
3338
3880
  shortName: "text",
3339
3881
  description: "Text block",
3340
- handler: yt
3882
+ handler: Bt
3341
3883
  },
3342
3884
  {
3343
3885
  semanticName: "Card",
@@ -3345,7 +3887,7 @@ var Yt = [
3345
3887
  shortName: "notch-rect",
3346
3888
  description: "Represents a card",
3347
3889
  aliases: ["card", "notched-rectangle"],
3348
- handler: ce
3890
+ handler: Te
3349
3891
  },
3350
3892
  {
3351
3893
  semanticName: "Lined/Shaded Process",
@@ -3358,7 +3900,7 @@ var Yt = [
3358
3900
  "lin-proc",
3359
3901
  "shaded-process"
3360
3902
  ],
3361
- handler: st
3903
+ handler: Ot
3362
3904
  },
3363
3905
  {
3364
3906
  semanticName: "Start",
@@ -3367,7 +3909,7 @@ var Yt = [
3367
3909
  description: "Small starting point",
3368
3910
  aliases: ["start", "small-circle"],
3369
3911
  internalAliases: ["stateStart"],
3370
- handler: pt
3912
+ handler: Pt
3371
3913
  },
3372
3914
  {
3373
3915
  semanticName: "Stop",
@@ -3376,7 +3918,7 @@ var Yt = [
3376
3918
  description: "Stop point",
3377
3919
  aliases: ["stop", "framed-circle"],
3378
3920
  internalAliases: ["stateEnd"],
3379
- handler: ft
3921
+ handler: Nt
3380
3922
  },
3381
3923
  {
3382
3924
  semanticName: "Fork/Join",
@@ -3385,7 +3927,7 @@ var Yt = [
3385
3927
  description: "Fork or join in process flow",
3386
3928
  aliases: ["join"],
3387
3929
  internalAliases: ["forkJoin"],
3388
- handler: je
3930
+ handler: Qe
3389
3931
  },
3390
3932
  {
3391
3933
  semanticName: "Collate",
@@ -3393,7 +3935,7 @@ var Yt = [
3393
3935
  shortName: "hourglass",
3394
3936
  description: "Represents a collate operation",
3395
3937
  aliases: ["hourglass", "collate"],
3396
- handler: Fe
3938
+ handler: nt
3397
3939
  },
3398
3940
  {
3399
3941
  semanticName: "Comment",
@@ -3401,21 +3943,21 @@ var Yt = [
3401
3943
  shortName: "brace",
3402
3944
  description: "Adds a comment",
3403
3945
  aliases: ["comment", "brace-l"],
3404
- handler: pe
3946
+ handler: Me
3405
3947
  },
3406
3948
  {
3407
3949
  semanticName: "Comment Right",
3408
3950
  name: "Curly Brace",
3409
3951
  shortName: "brace-r",
3410
3952
  description: "Adds a comment",
3411
- handler: me
3953
+ handler: Ne
3412
3954
  },
3413
3955
  {
3414
3956
  semanticName: "Comment with braces on both sides",
3415
3957
  name: "Curly Braces",
3416
3958
  shortName: "braces",
3417
3959
  description: "Adds a comment",
3418
- handler: he
3960
+ handler: Pe
3419
3961
  },
3420
3962
  {
3421
3963
  semanticName: "Com Link",
@@ -3423,7 +3965,7 @@ var Yt = [
3423
3965
  shortName: "bolt",
3424
3966
  description: "Communication link",
3425
3967
  aliases: ["com-link", "lightning-bolt"],
3426
- handler: Ge
3968
+ handler: ft
3427
3969
  },
3428
3970
  {
3429
3971
  semanticName: "Document",
@@ -3431,7 +3973,7 @@ var Yt = [
3431
3973
  shortName: "doc",
3432
3974
  description: "Represents a document",
3433
3975
  aliases: ["doc", "document"],
3434
- handler: jt
3976
+ handler: Qt
3435
3977
  },
3436
3978
  {
3437
3979
  semanticName: "Delay",
@@ -3439,7 +3981,7 @@ var Yt = [
3439
3981
  shortName: "delay",
3440
3982
  description: "Represents a delay",
3441
3983
  aliases: ["half-rounded-rectangle"],
3442
- handler: Me
3984
+ handler: $e
3443
3985
  },
3444
3986
  {
3445
3987
  semanticName: "Direct Access Storage",
@@ -3447,7 +3989,7 @@ var Yt = [
3447
3989
  shortName: "h-cyl",
3448
3990
  description: "Direct access storage",
3449
3991
  aliases: ["das", "horizontal-cylinder"],
3450
- handler: Tt
3992
+ handler: Kt
3451
3993
  },
3452
3994
  {
3453
3995
  semanticName: "Disk Storage",
@@ -3455,7 +3997,7 @@ var Yt = [
3455
3997
  shortName: "lin-cyl",
3456
3998
  description: "Disk storage",
3457
3999
  aliases: ["disk", "lined-cylinder"],
3458
- handler: Ze
4000
+ handler: vt
3459
4001
  },
3460
4002
  {
3461
4003
  semanticName: "Display",
@@ -3463,7 +4005,7 @@ var Yt = [
3463
4005
  shortName: "curv-trap",
3464
4006
  description: "Represents a display",
3465
4007
  aliases: ["curved-trapezoid", "display"],
3466
- handler: ge
4008
+ handler: Fe
3467
4009
  },
3468
4010
  {
3469
4011
  semanticName: "Divided Process",
@@ -3475,7 +4017,7 @@ var Yt = [
3475
4017
  "divided-rectangle",
3476
4018
  "divided-process"
3477
4019
  ],
3478
- handler: Te
4020
+ handler: Ge
3479
4021
  },
3480
4022
  {
3481
4023
  semanticName: "Extract",
@@ -3483,7 +4025,7 @@ var Yt = [
3483
4025
  shortName: "tri",
3484
4026
  description: "Extraction process",
3485
4027
  aliases: ["extract", "triangle"],
3486
- handler: At
4028
+ handler: Zt
3487
4029
  },
3488
4030
  {
3489
4031
  semanticName: "Internal Storage",
@@ -3491,7 +4033,7 @@ var Yt = [
3491
4033
  shortName: "win-pane",
3492
4034
  description: "Internal storage",
3493
4035
  aliases: ["internal-storage", "window-pane"],
3494
- handler: Nt
4036
+ handler: en
3495
4037
  },
3496
4038
  {
3497
4039
  semanticName: "Junction",
@@ -3499,7 +4041,7 @@ var Yt = [
3499
4041
  shortName: "f-circ",
3500
4042
  description: "Junction point",
3501
4043
  aliases: ["junction", "filled-circle"],
3502
- handler: De
4044
+ handler: qe
3503
4045
  },
3504
4046
  {
3505
4047
  semanticName: "Loop Limit",
@@ -3507,7 +4049,7 @@ var Yt = [
3507
4049
  shortName: "notch-pent",
3508
4050
  description: "Loop limit step",
3509
4051
  aliases: ["loop-limit", "notched-pentagon"],
3510
- handler: Dt
4052
+ handler: Jt
3511
4053
  },
3512
4054
  {
3513
4055
  semanticName: "Manual File",
@@ -3515,7 +4057,7 @@ var Yt = [
3515
4057
  shortName: "flip-tri",
3516
4058
  description: "Manual file operation",
3517
4059
  aliases: ["manual-file", "flipped-triangle"],
3518
- handler: Ae
4060
+ handler: Xe
3519
4061
  },
3520
4062
  {
3521
4063
  semanticName: "Manual Input",
@@ -3523,7 +4065,7 @@ var Yt = [
3523
4065
  shortName: "sl-rect",
3524
4066
  description: "Manual input step",
3525
4067
  aliases: ["manual-input", "sloped-rectangle"],
3526
- handler: ct
4068
+ handler: kt
3527
4069
  },
3528
4070
  {
3529
4071
  semanticName: "Multi-Document",
@@ -3535,7 +4077,7 @@ var Yt = [
3535
4077
  "st-doc",
3536
4078
  "stacked-document"
3537
4079
  ],
3538
- handler: et
4080
+ handler: xt
3539
4081
  },
3540
4082
  {
3541
4083
  semanticName: "Multi-Process",
@@ -3547,7 +4089,7 @@ var Yt = [
3547
4089
  "processes",
3548
4090
  "stacked-rectangle"
3549
4091
  ],
3550
- handler: $e
4092
+ handler: bt
3551
4093
  },
3552
4094
  {
3553
4095
  semanticName: "Stored Data",
@@ -3555,7 +4097,7 @@ var Yt = [
3555
4097
  shortName: "bow-rect",
3556
4098
  description: "Stored data",
3557
4099
  aliases: ["stored-data", "bow-tie-rectangle"],
3558
- handler: oe
4100
+ handler: le
3559
4101
  },
3560
4102
  {
3561
4103
  semanticName: "Summary",
@@ -3563,7 +4105,7 @@ var Yt = [
3563
4105
  shortName: "cross-circ",
3564
4106
  description: "Summary",
3565
4107
  aliases: ["summary", "crossed-circle"],
3566
- handler: fe
4108
+ handler: je
3567
4109
  },
3568
4110
  {
3569
4111
  semanticName: "Tagged Document",
@@ -3571,7 +4113,7 @@ var Yt = [
3571
4113
  shortName: "tag-doc",
3572
4114
  description: "Tagged document",
3573
4115
  aliases: ["tag-doc", "tagged-document"],
3574
- handler: vt
4116
+ handler: zt
3575
4117
  },
3576
4118
  {
3577
4119
  semanticName: "Tagged Process",
@@ -3583,7 +4125,7 @@ var Yt = [
3583
4125
  "tag-proc",
3584
4126
  "tagged-process"
3585
4127
  ],
3586
- handler: _t
4128
+ handler: Rt
3587
4129
  },
3588
4130
  {
3589
4131
  semanticName: "Paper Tape",
@@ -3591,7 +4133,7 @@ var Yt = [
3591
4133
  shortName: "flag",
3592
4134
  description: "Paper tape",
3593
4135
  aliases: ["paper-tape"],
3594
- handler: Mt
4136
+ handler: $t
3595
4137
  },
3596
4138
  {
3597
4139
  semanticName: "Odd",
@@ -3599,7 +4141,7 @@ var Yt = [
3599
4141
  shortName: "odd",
3600
4142
  description: "Odd shape",
3601
4143
  internalAliases: ["rect_left_inv_arrow"],
3602
- handler: it
4144
+ handler: Tt
3603
4145
  },
3604
4146
  {
3605
4147
  semanticName: "Lined Document",
@@ -3607,60 +4149,40 @@ var Yt = [
3607
4149
  shortName: "lin-doc",
3608
4150
  description: "Lined document",
3609
4151
  aliases: ["lined-document"],
3610
- handler: Qe
4152
+ handler: yt
3611
4153
  }
3612
- ], Xt = (/* @__PURE__ */ t(() => {
4154
+ ], vn = (/* @__PURE__ */ d(() => {
3613
4155
  let e = [...Object.entries({
3614
- state: dt,
3615
- choice: le,
3616
- note: tt,
3617
- rectWithTitle: at,
3618
- labelRect: He,
3619
- iconSquare: ze,
3620
- iconCircle: Le,
3621
- icon: Ie,
3622
- iconRounded: Re,
3623
- imageSquare: Be,
3624
- anchor: G,
3625
- kanbanItem: Wt,
3626
- mindmapCircle: Jt,
3627
- defaultMindmapNode: qt,
3628
- classBox: Vt,
3629
- erBox: It,
3630
- requirementBox: Ht
3631
- }), ...Yt.flatMap((e) => [
4156
+ state: Mt,
4157
+ choice: Ee,
4158
+ note: St,
4159
+ composite: Oe,
4160
+ rectWithTitle: Et,
4161
+ labelRect: lt,
4162
+ block_arrow: Se,
4163
+ collapsedGroup: he,
4164
+ iconSquare: ot,
4165
+ iconCircle: it,
4166
+ icon: rt,
4167
+ iconRounded: at,
4168
+ imageSquare: st,
4169
+ anchor: oe,
4170
+ kanbanItem: fn,
4171
+ mindmapCircle: gn,
4172
+ defaultMindmapNode: hn,
4173
+ classBox: ln,
4174
+ erBox: rn,
4175
+ requirementBox: un
4176
+ }), ..._n.flatMap((e) => [
3632
4177
  e.shortName,
3633
4178
  ..."aliases" in e ? e.aliases : [],
3634
4179
  ..."internalAliases" in e ? e.internalAliases : []
3635
4180
  ].map((t) => [t, e.handler]))];
3636
4181
  return Object.fromEntries(e);
3637
4182
  }, "generateShapeMap"))();
3638
- function Zt(e) {
3639
- return e in Xt;
3640
- }
3641
- t(Zt, "isValidShape");
3642
- var Qt = /* @__PURE__ */ new Map();
3643
- async function $t(e, t, n) {
3644
- let r, i;
3645
- t.shape === "rect" && (t.rx && t.ry ? t.shape = "roundedRect" : t.shape = "squareRect");
3646
- let a = t.shape ? Xt[t.shape] : void 0;
3647
- if (!a) throw Error(`No such shape: ${t.shape}. Please check your syntax.`);
3648
- if (t.link) {
3649
- let o;
3650
- n.config.securityLevel === "sandbox" ? o = "_top" : t.linkTarget && (o = t.linkTarget || "_blank"), r = e.insert("svg:a").attr("xlink:href", t.link).attr("target", o ?? null), i = await a(r, t, n);
3651
- } else i = await a(e, t, n), r = i;
3652
- return r.attr("data-look", p(t.look)), t.tooltip && i.attr("title", t.tooltip), Qt.set(t.id, r), t.haveCallback && r.attr("class", r.attr("class") + " clickable"), r;
3653
- }
3654
- t($t, "insertNode");
3655
- var en = /* @__PURE__ */ t((e, t) => {
3656
- Qt.set(t.id, e);
3657
- }, "setNodeElem"), tn = /* @__PURE__ */ t(() => {
3658
- Qt.clear();
3659
- }, "clear"), nn = /* @__PURE__ */ t((t) => {
3660
- let n = Qt.get(t.id);
3661
- e.trace("Transforming node", t.diff, t, "translate(" + (t.x - t.width / 2 - 5) + ", " + t.width / 2 + ")");
3662
- let r = t.diff || 0;
3663
- return t.clusterNode ? n.attr("transform", "translate(" + (t.x + r - t.width / 2) + ", " + (t.y - t.height / 2 - 8) + ")") : n.attr("transform", "translate(" + t.x + ", " + t.y + ")"), r;
3664
- }, "positionNode");
4183
+ function yn(e) {
4184
+ return e in vn;
4185
+ }
4186
+ d(yn, "isValidShape");
3665
4187
  //#endregion
3666
- export { $t as a, nn as c, ee as i, en as l, tn as n, Zt as o, M as r, C as s, te as t, T as u };
4188
+ export { j as a, yn as i, z as n, vn as o, R as r, N as s, te as t };