@sme.up/ketchup2 2.7.0 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (288) hide show
  1. package/dist/abnfDiagram-VCTEODGH-DwAVRNNu.js +89 -0
  2. package/dist/{arc-CVbkjF8U.js → arc-DXfwi1YX.js} +8 -6
  3. package/dist/architecture-7GRP2DOG-BsytjMto.js +3 -0
  4. package/dist/{architectureDiagram-3BPJPVTR-B6VZAtZU.js → architectureDiagram-5GKGNRK7-N1aPr2hw.js} +636 -540
  5. package/dist/assets/svg/functions.svg +1 -0
  6. package/dist/basic-components/autocomplete/autocomplete.d.ts.map +1 -1
  7. package/dist/basic-components/button-list/button-list-types.d.ts +2 -1
  8. package/dist/basic-components/button-list/button-list-types.d.ts.map +1 -1
  9. package/dist/basic-components/button-list/button-list.d.ts.map +1 -1
  10. package/dist/basic-components/cell/cell-types.d.ts +5 -0
  11. package/dist/basic-components/cell/cell-types.d.ts.map +1 -1
  12. package/dist/basic-components/cell/cell.d.ts.map +1 -1
  13. package/dist/basic-components/checkbox/checkbox-types.d.ts +5 -0
  14. package/dist/basic-components/checkbox/checkbox-types.d.ts.map +1 -1
  15. package/dist/basic-components/chips/chips-types.d.ts +15 -1
  16. package/dist/basic-components/chips/chips-types.d.ts.map +1 -1
  17. package/dist/basic-components/chips/chips.d.ts.map +1 -1
  18. package/dist/basic-components/chips-input/chips-input-types.d.ts +5 -0
  19. package/dist/basic-components/chips-input/chips-input-types.d.ts.map +1 -1
  20. package/dist/basic-components/chips-input/chips-input.d.ts.map +1 -1
  21. package/dist/basic-components/file-upload/file-upload-hook.d.ts.map +1 -1
  22. package/dist/basic-components/list/list.d.ts.map +1 -1
  23. package/dist/basic-components/multiple-autocomplete/multiple-autocomplete-types.d.ts +5 -0
  24. package/dist/basic-components/multiple-autocomplete/multiple-autocomplete-types.d.ts.map +1 -1
  25. package/dist/basic-components/multiple-autocomplete/multiple-autocomplete.d.ts.map +1 -1
  26. package/dist/basic-components/multiple-select/multiple-select-types.d.ts +5 -0
  27. package/dist/basic-components/multiple-select/multiple-select-types.d.ts.map +1 -1
  28. package/dist/basic-components/multiple-select/multiple-select.d.ts.map +1 -1
  29. package/dist/basic-components/select/select.d.ts.map +1 -1
  30. package/dist/blockDiagram-I7D4REHJ-Cu18ws5-.js +1922 -0
  31. package/dist/{c4Diagram-AAUBKEIU-CdT8VCbo.js → c4Diagram-7LVT6UL2-B-uBy_NE.js} +899 -850
  32. package/dist/{channel-C-LAmObA.js → channel-CuEby436.js} +1 -1
  33. package/dist/chunk-2E4U76K2-ComA5SPA.js +348 -0
  34. package/dist/{chunk-QZHKN3VN-lYfzaOt9.js → chunk-2Q5K7J3B-kzxEEeTu.js} +2 -2
  35. package/dist/{chunk-3OPIFGDE-Bs2mXISw.js → chunk-4HAMMTFA-CZgIgrp_.js} +1667 -1145
  36. package/dist/{chunk-FMBD7UC4-BURT0llY.js → chunk-5VM5RSS4-Cr17nBXp.js} +2 -2
  37. package/dist/{chunk-5ZQYHXKU-B_nOC8-n.js → chunk-75Z2AOVW-Drsj7a97.js} +106 -136
  38. package/dist/chunk-CLGD4ZFX-CLGio9rD.js +14 -0
  39. package/dist/{chunk-CSCIHK7Q-BEk3YcEH.js → chunk-DU6HZSFF-waeanndy.js} +1005 -768
  40. package/dist/{chunk-ND2GUHAM-Ca12h-m9.js → chunk-F27PBJKO-jIrOJO87.js} +18 -17
  41. package/dist/{chunk-NNHCCRGN-BB1q5NkR.js → chunk-FOHPRMQF-LRqOLsSw.js} +5518 -4708
  42. package/dist/{chunk-O5CBEL6O-DbWeP4Au.js → chunk-GMAD6QVW-D80II4AD.js} +486 -520
  43. package/dist/chunk-GVQU2GXP-DP3t_9Rl.js +37 -0
  44. package/dist/{chunk-AQP2D5EJ-vJ_pitKp.js → chunk-IMKFNOWR-8ItzAAcf.js} +336 -318
  45. package/dist/{chunk-4BX2VUAB-zglw1T4d.js → chunk-JWPE2WC7-Ccb0QaC8.js} +2 -2
  46. package/dist/chunk-L3NEJ4N5-qPot4t6M.js +245 -0
  47. package/dist/chunk-LNGE3PJU-CtYcu9x8.js +1521 -0
  48. package/dist/{chunk-KSCS5N6A-BemQomLE.js → chunk-OSK3NFVY-CQhPF3Mc.js} +310 -198
  49. package/dist/chunk-P2QGCYS3-BUeNZ170.js +67 -0
  50. package/dist/chunk-POPQ4Y6H-CU9oz17Z.js +26 -0
  51. package/dist/chunk-PWAF6VOD-D37VoZ8H.js +275 -0
  52. package/dist/{flowDiagram-I6XJVG4X-DnsxKD0w.js → chunk-SHT3W25Y-Cri27Jke.js} +581 -543
  53. package/dist/chunk-SVP7TREG-CyJlOPau.js +490 -0
  54. package/dist/{chunk-727SXJPM-CDeV7mmg.js → chunk-TICWLB2K-Cw2iT_VD.js} +191 -185
  55. package/dist/{chunk-LZXEDZCA-J9irjuVP.js → chunk-TLUHSLCS-BdsLNXjt.js} +35 -25
  56. package/dist/chunk-XXDRQBXY-C1ZEFXGu.js +9 -0
  57. package/dist/chunk-Y2CYZVJY-i11wjrBe.js +12 -0
  58. package/dist/classDiagram-ZZMXUADV-L32jCfMj.js +30 -0
  59. package/dist/classDiagram-v2-VYDZK3BY-BsnrDCgX.js +30 -0
  60. package/dist/components/activity-timeline/activity-timeline-types.d.ts +46 -0
  61. package/dist/components/activity-timeline/activity-timeline-types.d.ts.map +1 -0
  62. package/dist/components/activity-timeline/activity-timeline.d.ts +4 -0
  63. package/dist/components/activity-timeline/activity-timeline.d.ts.map +1 -0
  64. package/dist/components/app-bar/app-bar.d.ts.map +1 -1
  65. package/dist/components/breadcrumbs/breadcrumbs.d.ts.map +1 -1
  66. package/dist/components/chat/chat.d.ts.map +1 -1
  67. package/dist/components/data-table/assets/data-table-row-actions-collapsed.d.ts +12 -0
  68. package/dist/components/data-table/assets/data-table-row-actions-collapsed.d.ts.map +1 -0
  69. package/dist/components/data-table/assets/data-table-row-actions.d.ts +11 -0
  70. package/dist/components/data-table/assets/data-table-row-actions.d.ts.map +1 -0
  71. package/dist/components/data-table/data-table-types.d.ts +52 -1
  72. package/dist/components/data-table/data-table-types.d.ts.map +1 -1
  73. package/dist/components/data-table/data-table.d.ts.map +1 -1
  74. package/dist/components/data-table/header/Header.d.ts.map +1 -1
  75. package/dist/components/data-table/header/header-types.d.ts +7 -1
  76. package/dist/components/data-table/header/header-types.d.ts.map +1 -1
  77. package/dist/components/echarts/echarts-graph.d.ts.map +1 -1
  78. package/dist/components/scaffold/context/scaffold-provider.d.ts.map +1 -1
  79. package/dist/components/tab-bar/tab-bar-assets.d.ts +1 -0
  80. package/dist/components/tab-bar/tab-bar-assets.d.ts.map +1 -1
  81. package/dist/components/tab-bar/tab-bar.d.ts.map +1 -1
  82. package/dist/components/tooltip/tooltip.d.ts.map +1 -1
  83. package/dist/components/workflow-designer/workflow-designer-metadata-panel.d.ts +14 -0
  84. package/dist/components/workflow-designer/workflow-designer-metadata-panel.d.ts.map +1 -0
  85. package/dist/components/workflow-designer/workflow-designer-types.d.ts +40 -7
  86. package/dist/components/workflow-designer/workflow-designer-types.d.ts.map +1 -1
  87. package/dist/components/workflow-designer/workflow-designer-utils.d.ts +80 -1
  88. package/dist/components/workflow-designer/workflow-designer-utils.d.ts.map +1 -1
  89. package/dist/components/workflow-designer/workflow-designer-utils.test.d.ts +2 -0
  90. package/dist/components/workflow-designer/workflow-designer-utils.test.d.ts.map +1 -0
  91. package/dist/components/workflow-designer/workflow-designer.d.ts +4 -3
  92. package/dist/components/workflow-designer/workflow-designer.d.ts.map +1 -1
  93. package/dist/{cose-bilkent-S5V4N54A-BhA3VnPW.js → cose-bilkent-JH36ORCC-Qs_Z6zBZ.js} +87 -83
  94. package/dist/cynefin-OW5HDTMX-BJXlKro0.js +3 -0
  95. package/dist/cynefinDiagram-5FMLGOSQ-3Ha1hdlV.js +355 -0
  96. package/dist/{cytoscape.esm-BU21wl3m.js → cytoscape.esm-C5TvPYYm.js} +2749 -2701
  97. package/dist/{dagre-3-RnF0EK.js → dagre-D5csT9sx.js} +144 -146
  98. package/dist/dagre-GXQ25YYZ-Bg7xf6xn.js +425 -0
  99. package/dist/{defaultLocale-DnzPsei5.js → defaultLocale-N-0uLSyg.js} +1 -4
  100. package/dist/diagram-S7CK7UJ4-BuDHTdHA.js +301 -0
  101. package/dist/{diagram-2AECGRRQ-23vM90dy.js → diagram-UQ7AKVKN-uvzJGj43.js} +82 -81
  102. package/dist/{diagram-KO2AKTUF-BEnEQF6b.js → diagram-VSXAHHWV-CrQQCs-B.js} +66 -65
  103. package/dist/{diagram-OG6HWLK6-Cfbv6mIH.js → diagram-VX7I27RA-BNmG1sig.js} +92 -89
  104. package/dist/{diagram-LMA3HP47-OWxAHrmz.js → diagram-Z3DM3KII-B6BrLhP0.js} +21 -20
  105. package/dist/{dist-Btd8EZyy.js → dist-CsrMlyO_.js} +2 -3
  106. package/dist/ebnfDiagram-PWID7BFC-DMx8xAFO.js +100 -0
  107. package/dist/erDiagram-RLTQ6QDP-bkJ9nzVK.js +1966 -0
  108. package/dist/eventmodeling-NTZA5JFV-Cj-VH7yh.js +3 -0
  109. package/dist/flowDiagram-HODETNUW-BIvD7-ts.js +17 -0
  110. package/dist/functional-components/multiple-field/multiple-field-types.d.ts +2 -0
  111. package/dist/functional-components/multiple-field/multiple-field-types.d.ts.map +1 -1
  112. package/dist/functional-components/multiple-field/multiple-field.d.ts.map +1 -1
  113. package/dist/functional-components/row/row-types.d.ts +5 -0
  114. package/dist/functional-components/row/row-types.d.ts.map +1 -1
  115. package/dist/functional-components/row/row.d.ts.map +1 -1
  116. package/dist/functional-components/timeline-engine/components/gantt/gantt-assets.d.ts +3 -1
  117. package/dist/functional-components/timeline-engine/components/gantt/gantt-assets.d.ts.map +1 -1
  118. package/dist/functional-components/timeline-engine/timeline-engine-utils.d.ts.map +1 -1
  119. package/dist/functional-components/tree-picker/tree-picker-types.d.ts +42 -0
  120. package/dist/functional-components/tree-picker/tree-picker-types.d.ts.map +1 -0
  121. package/dist/functional-components/tree-picker/tree-picker.d.ts +3 -0
  122. package/dist/functional-components/tree-picker/tree-picker.d.ts.map +1 -0
  123. package/dist/{ganttDiagram-6RSMTGT7-CwbJqdwB.js → ganttDiagram-EL5Y4UJY-CL-ywzz_.js} +703 -710
  124. package/dist/gitGraph-4MIJSDKK-C9JGDovl.js +3 -0
  125. package/dist/{gitGraphDiagram-PVQCEYII-mL2WiT98.js → gitGraphDiagram-WWUBYQGX-aXhNDG6P.js} +156 -151
  126. package/dist/{graphlib-VMWSbyYi.js → graphlib-XW-Jr8pF.js} +5 -5
  127. package/dist/index.d.ts +4 -1
  128. package/dist/index.d.ts.map +1 -1
  129. package/dist/info-A6RAGUB7-CmZJKEaW.js +3 -0
  130. package/dist/infoDiagram-27XIBGKW-Je4heBlk.js +20 -0
  131. package/dist/{init-MwSGRDIl.js → init-CsQUQz36.js} +1 -3
  132. package/dist/{ishikawaDiagram-YF4QCWOH-DGOgWzve.js → ishikawaDiagram-5VMMS53U-DK7HlH95.js} +142 -141
  133. package/dist/{journeyDiagram-JHISSGLW-CHVTMdrq.js → journeyDiagram-3NMN7TZE-CpuYEKcB.js} +192 -191
  134. package/dist/{kanban-definition-UN3LZRKU-upKA3b5x.js → kanban-definition-UXKFOSKX-aK8uKmyY.js} +149 -146
  135. package/dist/{katex-D-2KeLwt.js → katex-CT2p8LXT.js} +1627 -1650
  136. package/dist/ketchup2.css +1 -1
  137. package/dist/ketchup2.es.js +34744 -32755
  138. package/dist/{line-DIhSUgmA.js → line-DTqYMLoX.js} +2 -2
  139. package/dist/{linear-DUAteVwl.js → linear-CXc5xaa6.js} +8 -9
  140. package/dist/locale/en/translation.json.d.ts +16 -0
  141. package/dist/locale/it/translation.json.d.ts +16 -0
  142. package/dist/mermaid-parser.core-BwVmI_Rq.js +638 -0
  143. package/dist/{mindmap-definition-RKZ34NQL-C3YkCJDi.js → mindmap-definition-YA3MSWOX-ZMYcmi9J.js} +170 -170
  144. package/dist/{ordinal-D_ZgubzR.js → ordinal-BubEveRk.js} +1 -1
  145. package/dist/packet-AYTQ26CC-B3tgRshR.js +3 -0
  146. package/dist/{path-DGNPZRdx.js → path-CnWkkRiY.js} +10 -11
  147. package/dist/pegDiagram-XKGWAZYB-DsfILwZN.js +94 -0
  148. package/dist/pie-WAS4IAKB-BRiI8kbI.js +3 -0
  149. package/dist/pieDiagram-E7YTZNPT-DcSLcLdd.js +203 -0
  150. package/dist/{quadrantDiagram-W4KKPZXB-C2oA-eGZ.js → quadrantDiagram-AXDQQJYC-DSx3teop.js} +300 -300
  151. package/dist/radar-RG4KPBEZ-ASOMQXFw.js +3 -0
  152. package/dist/railroad-74A4TZTK-oS840SLr.js +3 -0
  153. package/dist/railroad-abnf-HS5TGJTU-nnQAkZY2.js +3 -0
  154. package/dist/railroad-ebnf-LZEXJU2U-DBQIOba3.js +3 -0
  155. package/dist/railroad-peg-WCYAUIDC-fBPN2TVb.js +3 -0
  156. package/dist/railroadDiagram-O6MQD6OU-jOZRtNDi.js +76 -0
  157. package/dist/{requirementDiagram-4Y6WPE33-BEGryahw.js → requirementDiagram-BXWQKSXE-D14hkkez.js} +176 -173
  158. package/dist/{rough.esm-rcMoXTJj.js → rough.esm-DXYGHN3m.js} +60 -51
  159. package/dist/{sankeyDiagram-5OEKKPKP-VPzKV4zM.js → sankeyDiagram-P5KCCOFB-C0jmknYo.js} +123 -120
  160. package/dist/{sequenceDiagram-3UESZ5HK-Bc30_Cm2.js → sequenceDiagram-WJ2MYXX4-C00egnMz.js} +714 -722
  161. package/dist/sizeCapture-INFHLROL-CHXIsPO_.js +46 -0
  162. package/dist/{src-DjDATEq3.js → src-DQoflmwT.js} +499 -509
  163. package/dist/stateDiagram-D77RDMKH-YfzmviNY.js +220 -0
  164. package/dist/stateDiagram-v2-MP3YSRHH-B6Hzx8T0.js +30 -0
  165. package/dist/swimlanes-42K2YHIH-CJcMmxXf.js +4979 -0
  166. package/dist/swimlanesDiagram-VR7AAH4N-DirvhGBA.js +31 -0
  167. package/dist/{timeline-definition-PNZ67QCA-1z911Ume.js → timeline-definition-24CTP7MA-D2xfYuSV.js} +220 -219
  168. package/dist/treeView-Q6P3EWNA-BmvB2b-_.js +3 -0
  169. package/dist/treemap-WGGIJYW6-Cjjk75wA.js +3 -0
  170. package/dist/types/translation.d.ts +17 -1
  171. package/dist/types/translation.d.ts.map +1 -1
  172. package/dist/utils/data-structures.d.ts +2 -1
  173. package/dist/utils/data-structures.d.ts.map +1 -1
  174. package/dist/{v4-BK7K-jy_.js → v4-DIjJgmR0.js} +1 -1
  175. package/dist/{vennDiagram-CIIHVFJN-BiLcQ0SR.js → vennDiagram-4TSXK5OY-C4XLgus_.js} +332 -310
  176. package/dist/wardley-WFR3VGLG-BamDiE0x.js +3 -0
  177. package/dist/{wardleyDiagram-YWT4CUSO-Bq-BejOl.js → wardleyDiagram-VM6X3IG4-DFoKuS9s.js} +156 -155
  178. package/dist/{xychartDiagram-2RQKCTM6-B13zquXC.js → xychartDiagram-S5SC5T6Z-BzKKgVBe.js} +740 -574
  179. package/package.json +41 -38
  180. package/dist/arc-w3BipdfE.cjs +0 -1
  181. package/dist/architecture-7EHR7CIX-Bzeobe9Y.cjs +0 -1
  182. package/dist/architecture-7EHR7CIX-C8NPmR2w.js +0 -3
  183. package/dist/architectureDiagram-3BPJPVTR-DlnXl9d5.cjs +0 -36
  184. package/dist/array-DZSRzHA_.cjs +0 -1
  185. package/dist/blockDiagram-GPEHLZMM-BohmRoCC.js +0 -3157
  186. package/dist/blockDiagram-GPEHLZMM-rfyR2Ffl.cjs +0 -132
  187. package/dist/c4Diagram-AAUBKEIU-Du1vqJYZ.cjs +0 -10
  188. package/dist/channel-DJpMBAs-.cjs +0 -1
  189. package/dist/chunk-2J33WTMH-BMqA-riF.js +0 -25
  190. package/dist/chunk-2J33WTMH-BQs9SXq8.cjs +0 -1
  191. package/dist/chunk-3OPIFGDE-Bk_ByTBh.cjs +0 -62
  192. package/dist/chunk-4BX2VUAB-C8VW0QW0.cjs +0 -1
  193. package/dist/chunk-55IACEB6-CNxnI3nm.cjs +0 -1
  194. package/dist/chunk-55IACEB6-CmKDx-YO.js +0 -8
  195. package/dist/chunk-5ZQYHXKU-DMrStm4M.cjs +0 -2
  196. package/dist/chunk-727SXJPM-Dj8nsm0O.cjs +0 -206
  197. package/dist/chunk-AQP2D5EJ-CYuEYK6i.cjs +0 -231
  198. package/dist/chunk-BSJP7CBP-CSCICPww.cjs +0 -1
  199. package/dist/chunk-BSJP7CBP-YsQACkyC.js +0 -82
  200. package/dist/chunk-CSCIHK7Q-BAdl6GW-.cjs +0 -124
  201. package/dist/chunk-FMBD7UC4-BIKI8zae.cjs +0 -15
  202. package/dist/chunk-KSCS5N6A-DsN7gJEf.cjs +0 -10
  203. package/dist/chunk-L5ZTLDWV-BQCNoMVG.js +0 -32
  204. package/dist/chunk-L5ZTLDWV-BbLRyKcx.cjs +0 -1
  205. package/dist/chunk-LZXEDZCA-rjLYyX5U.cjs +0 -1
  206. package/dist/chunk-ND2GUHAM-1o9Sjy2_.cjs +0 -1
  207. package/dist/chunk-NNHCCRGN-qV8bfiMQ.cjs +0 -159
  208. package/dist/chunk-NZK2D7GU-CPxdSJTy.js +0 -67
  209. package/dist/chunk-NZK2D7GU-CRneGIrP.cjs +0 -1
  210. package/dist/chunk-O5CBEL6O-Cd4Z5Dy9.cjs +0 -70
  211. package/dist/chunk-QZHKN3VN-ZJ4hLUIw.cjs +0 -1
  212. package/dist/chunk-WU5MYG2G-DuCEb9G-.js +0 -9
  213. package/dist/chunk-WU5MYG2G-ExiaHFbF.cjs +0 -1
  214. package/dist/chunk-XPW4576I-BybfDrup.cjs +0 -32
  215. package/dist/chunk-XPW4576I-D3DQ47oC.js +0 -1146
  216. package/dist/classDiagram-4FO5ZUOK-CRX1QumH.js +0 -29
  217. package/dist/classDiagram-4FO5ZUOK-yTAlLFG2.cjs +0 -1
  218. package/dist/classDiagram-v2-Q7XG4LA2-oM01mYfB.js +0 -29
  219. package/dist/classDiagram-v2-Q7XG4LA2-yTAlLFG2.cjs +0 -1
  220. package/dist/cose-bilkent-S5V4N54A-D7fhWOP4.cjs +0 -1
  221. package/dist/cytoscape.esm-CElDUMAx.cjs +0 -321
  222. package/dist/dagre-B2BBwKNb.cjs +0 -1
  223. package/dist/dagre-BM42HDAG-DfpR5Mml.js +0 -297
  224. package/dist/dagre-BM42HDAG-kORxgFz_.cjs +0 -4
  225. package/dist/defaultLocale-u9yUoUmE.cjs +0 -1
  226. package/dist/diagram-2AECGRRQ-B0IEGKjr.cjs +0 -43
  227. package/dist/diagram-5GNKFQAL-BEY9x4us.js +0 -101
  228. package/dist/diagram-5GNKFQAL-vb6e35PR.cjs +0 -10
  229. package/dist/diagram-KO2AKTUF-9V_zu-2x.cjs +0 -3
  230. package/dist/diagram-LMA3HP47-BN_geiB9.cjs +0 -24
  231. package/dist/diagram-OG6HWLK6-6OnEK9-6.cjs +0 -24
  232. package/dist/dist-D8RD2QWc.cjs +0 -1
  233. package/dist/erDiagram-TEJ5UH35-6OEXIM6m.js +0 -1700
  234. package/dist/erDiagram-TEJ5UH35-CzsOt0l4.cjs +0 -85
  235. package/dist/eventmodeling-FCH6USID-Cued7Lz2.cjs +0 -1
  236. package/dist/eventmodeling-FCH6USID-mCB8hc7X.js +0 -3
  237. package/dist/flowDiagram-I6XJVG4X-DR1CMtZZ.cjs +0 -162
  238. package/dist/ganttDiagram-6RSMTGT7-C5t5_mjf.cjs +0 -292
  239. package/dist/gitGraph-WXDBUCRP-B23gOjfP.js +0 -3
  240. package/dist/gitGraph-WXDBUCRP-Bi-Y5dA7.cjs +0 -1
  241. package/dist/gitGraphDiagram-PVQCEYII-CLdgm7yJ.cjs +0 -106
  242. package/dist/graphlib-CkkG5MuS.cjs +0 -1
  243. package/dist/info-J43DQDTF-DC3N8SoX.js +0 -3
  244. package/dist/info-J43DQDTF-jRjlWVKj.cjs +0 -1
  245. package/dist/infoDiagram-5YYISTIA-BIM8xaiE.js +0 -19
  246. package/dist/infoDiagram-5YYISTIA-CbnHgs-I.cjs +0 -2
  247. package/dist/init-07zIhv_j.cjs +0 -1
  248. package/dist/ishikawaDiagram-YF4QCWOH-DAWMXD1l.cjs +0 -70
  249. package/dist/journeyDiagram-JHISSGLW-DfnmJPLn.cjs +0 -139
  250. package/dist/kanban-definition-UN3LZRKU-CbeoJJE7.cjs +0 -89
  251. package/dist/katex-CkiTumqg.cjs +0 -257
  252. package/dist/ketchup2.cjs.js +0 -485
  253. package/dist/line-CzwncDY3.cjs +0 -1
  254. package/dist/linear-1lpO_WlJ.cjs +0 -1
  255. package/dist/mermaid-parser.core-ADyJ_PY4.cjs +0 -3
  256. package/dist/mermaid-parser.core-D6xVjl2t.js +0 -373
  257. package/dist/mindmap-definition-RKZ34NQL-C8cZ7xN-.cjs +0 -96
  258. package/dist/ordinal-CUPR-p0T.cjs +0 -1
  259. package/dist/packet-YPE3B663-CGZxZ1Z0.cjs +0 -1
  260. package/dist/packet-YPE3B663-D2JW2EUF.js +0 -3
  261. package/dist/path-Kklx0M1v.cjs +0 -1
  262. package/dist/pie-LRSECV5Y-BHyd33ZA.js +0 -3
  263. package/dist/pie-LRSECV5Y-Ca_qbHEv.cjs +0 -1
  264. package/dist/pieDiagram-4H26LBE5-BvhguaHn.js +0 -165
  265. package/dist/pieDiagram-4H26LBE5-DpDrJBQK.cjs +0 -30
  266. package/dist/quadrantDiagram-W4KKPZXB-hWSN7YfD.cjs +0 -7
  267. package/dist/radar-GUYGQ44K-BpJWFTCm.js +0 -3
  268. package/dist/radar-GUYGQ44K-CYqWSxO_.cjs +0 -1
  269. package/dist/requirementDiagram-4Y6WPE33-GmjmsbiY.cjs +0 -84
  270. package/dist/rough.esm-r0QOSzHM.cjs +0 -1
  271. package/dist/sankeyDiagram-5OEKKPKP-DbGAx-Bm.cjs +0 -40
  272. package/dist/sequenceDiagram-3UESZ5HK-D85rpewi.cjs +0 -162
  273. package/dist/src-DEmZ9bFr.cjs +0 -1
  274. package/dist/stateDiagram-AJRCARHV-Bg4Y3HPa.cjs +0 -1
  275. package/dist/stateDiagram-AJRCARHV-wqjltbKb.js +0 -217
  276. package/dist/stateDiagram-v2-BHNVJYJU-Cgrf5tQC.js +0 -27
  277. package/dist/stateDiagram-v2-BHNVJYJU-D_Tzn4WM.cjs +0 -1
  278. package/dist/timeline-definition-PNZ67QCA-Dpu3hfhP.cjs +0 -120
  279. package/dist/treeView-BLDUP644-C9tQMbiq.js +0 -3
  280. package/dist/treeView-BLDUP644-DKh9BcaT.cjs +0 -1
  281. package/dist/treemap-LRROVOQU-2aferAph.cjs +0 -1
  282. package/dist/treemap-LRROVOQU-CBv3oGC3.js +0 -3
  283. package/dist/v4-Dyp-SQ1c.cjs +0 -1
  284. package/dist/vennDiagram-CIIHVFJN-BLBDqWTG.cjs +0 -34
  285. package/dist/wardley-L42UT6IY-CIM0_V5T.js +0 -3
  286. package/dist/wardley-L42UT6IY-DjjjOB8T.cjs +0 -1
  287. package/dist/wardleyDiagram-YWT4CUSO-dzyAWKiV.cjs +0 -78
  288. 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-DQoflmwT.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-waeanndy.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-Drsj7a97.js";
5
+ import { a as g, i as _, r as v, t as y } from "./chunk-P2QGCYS3-BUeNZ170.js";
6
+ import { t as b } from "./chunk-PWAF6VOD-D37VoZ8H.js";
7
+ import { n as x, r as S } from "./chunk-GMAD6QVW-D80II4AD.js";
8
+ import { t as C } from "./rough.esm-DXYGHN3m.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 = l().fontSize ? l().fontSize : window.getComputedStyle(document.body).fontSize, [n = s.fontSize] = p(t), r = n * 5 + "px";
19
+ e.style.minWidth = r, e.style.maxWidth = r;
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,577 @@ 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: t.add(n);
450
+ }
451
+ return t;
452
+ }, "expandAndDeduplicateDirections"), ye = /* @__PURE__ */ d((e) => ge.filter((t) => e.has(t)).join("|") || _e, "getDirectionKey"), be = {
453
+ "right|left|up|down": /* @__PURE__ */ d(({ height: e, midpoint: t, padding: n, width: r }) => [
454
+ {
455
+ x: 0,
456
+ y: 0
457
+ },
458
+ {
459
+ x: t,
460
+ y: 0
461
+ },
462
+ {
463
+ x: r / 2,
464
+ y: 2 * n
465
+ },
466
+ {
467
+ x: r - t,
468
+ y: 0
469
+ },
470
+ {
471
+ x: r,
472
+ y: 0
473
+ },
474
+ {
475
+ x: r,
476
+ y: -e / 3
477
+ },
478
+ {
479
+ x: r + 2 * n,
480
+ y: -e / 2
481
+ },
482
+ {
483
+ x: r,
484
+ y: -2 * e / 3
485
+ },
486
+ {
487
+ x: r,
488
+ y: -e
489
+ },
490
+ {
491
+ x: r - t,
492
+ y: -e
493
+ },
494
+ {
495
+ x: r / 2,
496
+ y: -e - 2 * n
497
+ },
498
+ {
499
+ x: t,
500
+ y: -e
501
+ },
502
+ {
503
+ x: 0,
504
+ y: -e
505
+ },
506
+ {
507
+ x: 0,
508
+ y: -2 * e / 3
509
+ },
510
+ {
511
+ x: -2 * n,
512
+ y: -e / 2
513
+ },
514
+ {
515
+ x: 0,
516
+ y: -e / 3
517
+ }
518
+ ], "right|left|up|down"),
519
+ "right|left|up": /* @__PURE__ */ d(({ height: e, midpoint: t, width: n }) => [
520
+ {
521
+ x: t,
522
+ y: 0
523
+ },
524
+ {
525
+ x: n - t,
526
+ y: 0
527
+ },
528
+ {
529
+ x: n,
530
+ y: -e / 2
531
+ },
532
+ {
533
+ x: n - t,
534
+ y: -e
535
+ },
536
+ {
537
+ x: t,
538
+ y: -e
539
+ },
540
+ {
541
+ x: 0,
542
+ y: -e / 2
543
+ }
544
+ ], "right|left|up"),
545
+ "right|left|down": /* @__PURE__ */ d(({ height: e, midpoint: t, width: n }) => [
546
+ {
547
+ x: 0,
548
+ y: 0
549
+ },
550
+ {
551
+ x: t,
552
+ y: -e
553
+ },
554
+ {
555
+ x: n - t,
556
+ y: -e
557
+ },
558
+ {
559
+ x: n,
560
+ y: 0
561
+ }
562
+ ], "right|left|down"),
563
+ "right|up|down": /* @__PURE__ */ d(({ height: e, midpoint: t, width: n }) => [
564
+ {
565
+ x: 0,
566
+ y: 0
567
+ },
568
+ {
569
+ x: n,
570
+ y: -t
571
+ },
572
+ {
573
+ x: n,
574
+ y: -e + t
575
+ },
576
+ {
577
+ x: 0,
578
+ y: -e
579
+ }
580
+ ], "right|up|down"),
581
+ "left|up|down": /* @__PURE__ */ d(({ height: e, midpoint: t, width: n }) => [
582
+ {
583
+ x: n,
584
+ y: 0
585
+ },
586
+ {
587
+ x: 0,
588
+ y: -t
589
+ },
590
+ {
591
+ x: 0,
592
+ y: -e + t
593
+ },
594
+ {
595
+ x: n,
596
+ y: -e
597
+ }
598
+ ], "left|up|down"),
599
+ "right|left": /* @__PURE__ */ d(({ height: e, midpoint: t, padding: n, width: r }) => [
600
+ {
601
+ x: t,
602
+ y: 0
603
+ },
604
+ {
605
+ x: t,
606
+ y: -n
607
+ },
608
+ {
609
+ x: r - t,
610
+ y: -n
611
+ },
612
+ {
613
+ x: r - t,
614
+ y: 0
615
+ },
616
+ {
617
+ x: r,
618
+ y: -e / 2
619
+ },
620
+ {
621
+ x: r - t,
622
+ y: -e
623
+ },
624
+ {
625
+ x: r - t,
626
+ y: -e + n
627
+ },
628
+ {
629
+ x: t,
630
+ y: -e + n
631
+ },
632
+ {
633
+ x: t,
634
+ y: -e
635
+ },
636
+ {
637
+ x: 0,
638
+ y: -e / 2
639
+ }
640
+ ], "right|left"),
641
+ "up|down": /* @__PURE__ */ d(({ height: e, midpoint: t, padding: n, width: r }) => [
642
+ {
643
+ x: r / 2,
644
+ y: 0
645
+ },
646
+ {
647
+ x: 0,
648
+ y: -n
649
+ },
650
+ {
651
+ x: t,
652
+ y: -n
653
+ },
654
+ {
655
+ x: t,
656
+ y: -e + n
657
+ },
658
+ {
659
+ x: 0,
660
+ y: -e + n
661
+ },
662
+ {
663
+ x: r / 2,
664
+ y: -e
665
+ },
666
+ {
667
+ x: r,
668
+ y: -e + n
669
+ },
670
+ {
671
+ x: r - t,
672
+ y: -e + n
673
+ },
674
+ {
675
+ x: r - t,
676
+ y: -n
677
+ },
678
+ {
679
+ x: r,
680
+ y: -n
681
+ }
682
+ ], "up|down"),
683
+ "right|up": /* @__PURE__ */ d(({ height: e, midpoint: t, width: n }) => [
684
+ {
685
+ x: 0,
686
+ y: 0
687
+ },
688
+ {
689
+ x: n,
690
+ y: -t
691
+ },
692
+ {
693
+ x: 0,
694
+ y: -e
695
+ }
696
+ ], "right|up"),
697
+ "right|down": /* @__PURE__ */ d(({ height: e, width: t }) => [
698
+ {
699
+ x: 0,
700
+ y: 0
701
+ },
702
+ {
703
+ x: t,
704
+ y: 0
705
+ },
706
+ {
707
+ x: 0,
708
+ y: -e
709
+ }
710
+ ], "right|down"),
711
+ "left|up": /* @__PURE__ */ d(({ height: e, midpoint: t, width: n }) => [
712
+ {
713
+ x: n,
714
+ y: 0
715
+ },
716
+ {
717
+ x: 0,
718
+ y: -t
719
+ },
720
+ {
721
+ x: n,
722
+ y: -e
723
+ }
724
+ ], "left|up"),
725
+ "left|down": /* @__PURE__ */ d(({ height: e, width: t }) => [
726
+ {
727
+ x: t,
728
+ y: 0
729
+ },
730
+ {
731
+ x: 0,
732
+ y: 0
733
+ },
734
+ {
735
+ x: t,
736
+ y: -e
737
+ }
738
+ ], "left|down"),
739
+ right: /* @__PURE__ */ d(({ height: e, midpoint: t, padding: n, width: r }) => [
740
+ {
741
+ x: t,
742
+ y: -n
743
+ },
744
+ {
745
+ x: t,
746
+ y: -n
747
+ },
748
+ {
749
+ x: r - t,
750
+ y: -n
751
+ },
752
+ {
753
+ x: r - t,
754
+ y: 0
755
+ },
756
+ {
757
+ x: r,
758
+ y: -e / 2
759
+ },
760
+ {
761
+ x: r - t,
762
+ y: -e
763
+ },
764
+ {
765
+ x: r - t,
766
+ y: -e + n
767
+ },
768
+ {
769
+ x: t,
770
+ y: -e + n
771
+ },
772
+ {
773
+ x: t,
774
+ y: -e + n
775
+ }
776
+ ], "right"),
777
+ left: /* @__PURE__ */ d(({ height: e, midpoint: t, padding: n, width: r }) => [
778
+ {
779
+ x: t,
780
+ y: 0
781
+ },
782
+ {
783
+ x: t,
784
+ y: -n
785
+ },
786
+ {
787
+ x: r - t,
788
+ y: -n
789
+ },
790
+ {
791
+ x: r - t,
792
+ y: -e + n
793
+ },
794
+ {
795
+ x: t,
796
+ y: -e + n
797
+ },
798
+ {
799
+ x: t,
800
+ y: -e
801
+ },
454
802
  {
455
- x: v / 2,
456
- y: -y / 2
803
+ x: 0,
804
+ y: -e / 2
805
+ }
806
+ ], "left"),
807
+ up: /* @__PURE__ */ d(({ height: e, midpoint: t, padding: n, width: r }) => [
808
+ {
809
+ x: t,
810
+ y: -n
457
811
  },
458
812
  {
459
- x: -v / 2,
460
- y: -y / 2
813
+ x: t,
814
+ y: -e + n
461
815
  },
462
- ...K(-v / 2, -y / 2, -v / 2, y / 2, p, m, !1),
463
816
  {
464
- x: v / 2,
465
- y: y / 2
817
+ x: 0,
818
+ y: -e + n
466
819
  },
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;
820
+ {
821
+ x: r / 2,
822
+ y: -e
823
+ },
824
+ {
825
+ x: r,
826
+ y: -e + n
827
+ },
828
+ {
829
+ x: r - t,
830
+ y: -e + n
831
+ },
832
+ {
833
+ x: r - t,
834
+ y: -n
835
+ }
836
+ ], "up"),
837
+ down: /* @__PURE__ */ d(({ height: e, midpoint: t, padding: n, width: r }) => [
838
+ {
839
+ x: r / 2,
840
+ y: 0
841
+ },
842
+ {
843
+ x: 0,
844
+ y: -n
845
+ },
846
+ {
847
+ x: t,
848
+ y: -n
849
+ },
850
+ {
851
+ x: t,
852
+ y: -e + n
853
+ },
854
+ {
855
+ x: r - t,
856
+ y: -e + n
857
+ },
858
+ {
859
+ x: r - t,
860
+ y: -n
861
+ },
862
+ {
863
+ x: r,
864
+ y: -n
865
+ }
866
+ ], "down"),
867
+ [_e]: () => [{
868
+ x: 0,
869
+ y: 0
870
+ }]
871
+ }, xe = /* @__PURE__ */ d((e, t, n, r) => {
872
+ 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;
873
+ return (be[ye(i)] ?? be[_e])({
874
+ height: o,
875
+ midpoint: s,
876
+ padding: a,
877
+ width: c
878
+ });
879
+ }, "getArrowPoints");
880
+ async function Se(e, t) {
881
+ 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);
882
+ return f.attr("style", n.style ?? null), N(n, f), n.intersect = function(e) {
883
+ return K.polygon(n, d, e);
884
+ }, r;
474
885
  }
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 + ")");
886
+ d(Se, "block_arrow");
887
+ async function Ce(e, t, { config: { themeVariables: n } }) {
888
+ let { labelStyles: r, nodeStyles: i } = _(t);
889
+ t.labelStyle = r;
890
+ 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");
891
+ if (t.look === "handDrawn") {
892
+ let e = C.svg(a).path(z(-u / 2, f, u, d, 12), g(t, {}));
893
+ m.node()?.appendChild(e), p && m.attr("style", p);
894
+ } 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);
895
+ 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`);
896
+ for (let e = 0; e < 3; e++) m.append("circle").attr("cx", -u / 2 + 12 + e * 9).attr("cy", f + 9).attr("r", 2.5).attr("style", `fill:${c};stroke:none`);
897
+ 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);
898
+ let h = f + 18 + (d - 18) / 2;
899
+ 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) {
900
+ return K.rect(t, e);
901
+ }, a;
480
902
  }
481
- t(q, "insertPolygonShape");
482
- var se = 12;
483
- async function ce(e, t) {
903
+ d(Ce, "browser");
904
+ var we = 12;
905
+ async function Te(e, t) {
484
906
  let { labelStyles: n, nodeStyles: r } = _(t);
485
907
  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 = [
908
+ 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
909
  {
488
- x: 0 + se,
910
+ x: 0 + we,
489
911
  y: f
490
912
  },
491
913
  {
@@ -502,26 +924,26 @@ async function ce(e, t) {
502
924
  },
503
925
  {
504
926
  x: 0,
505
- y: f + se
927
+ y: f + we
506
928
  },
507
929
  {
508
- x: 0 + se,
930
+ x: 0 + we,
509
931
  y: f
510
932
  }
511
933
  ], m, { cssStyles: h } = t;
512
934
  if (t.look === "handDrawn") {
513
- let e = S.svg(s), n = g(t, {}), r = D(p), i = e.path(r, n);
935
+ let e = C.svg(s), n = g(t, {}), r = F(p), i = e.path(r, n);
514
936
  m = s.insert(() => i, ":first-child").attr("transform", `translate(${-l / 2}, ${u / 2})`), h && m.attr("style", h);
515
937
  } 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);
938
+ return r && m.attr("style", r), N(t, m), t.intersect = function(e) {
939
+ return K.polygon(t, p, e);
518
940
  }, s;
519
941
  }
520
- t(ce, "card");
521
- function le(e, t) {
942
+ d(Te, "card");
943
+ function Ee(e, t) {
522
944
  let { nodeStyles: n } = _(t);
523
945
  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 = [
946
+ 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
947
  {
526
948
  x: 0,
527
949
  y: a / 2
@@ -538,31 +960,57 @@ function le(e, t) {
538
960
  x: -a / 2,
539
961
  y: 0
540
962
  }
541
- ], s = S.svg(r), c = g(t, {});
963
+ ], s = C.svg(r), c = g(t, {});
542
964
  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");
965
+ let l = F(o), u = s.path(l, c), d = r.insert(() => u, ":first-child");
544
966
  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);
967
+ return K.polygon(t, o, e);
546
968
  }, r;
547
969
  }
548
- t(le, "choice");
549
- async function ue(t, n, r) {
970
+ d(Ee, "choice");
971
+ async function De(t, n, r) {
550
972
  let { labelStyles: i, nodeStyles: a } = _(n);
551
973
  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;
974
+ 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
975
  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));
976
+ let e = C.svg(o), t = g(n, {}), r = e.circle(0, 0, u * 2, t);
977
+ d = o.insert(() => r, ":first-child"), d.attr("class", "basic label-container").attr("style", h(f));
556
978
  } 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) {
979
+ return N(n, d), n.calcIntersect = function(e, t) {
558
980
  let n = e.width / 2;
559
- return W.circle(e, n, t);
981
+ return K.circle(e, n, t);
560
982
  }, n.intersect = function(t) {
561
- return e.info("Circle intersect", n, u, t), W.circle(n, u, t);
983
+ return e.info("Circle intersect", n, u, t), K.circle(n, u, t);
562
984
  }, o;
563
985
  }
564
- t(ue, "circle");
565
- function de(e) {
986
+ d(De, "circle");
987
+ async function Oe(e, t) {
988
+ let n = t, { shapeSvg: r, bbox: i, halfPadding: a } = await j(e, n, [
989
+ "node",
990
+ n.cssClasses,
991
+ n.class
992
+ ].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;
993
+ 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) {
994
+ return K.rect(n, e);
995
+ }, r;
996
+ }
997
+ d(Oe, "composite");
998
+ async function ke(e, t, { config: { themeVariables: n } }) {
999
+ let { labelStyles: r, nodeStyles: i } = _(t);
1000
+ t.labelStyle = r;
1001
+ 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");
1002
+ if (t.look === "handDrawn") {
1003
+ let e = C.svg(a).path(z(-u / 2, f, u, d, 12), g(t, {}));
1004
+ m.node()?.appendChild(e), p && m.attr("style", p);
1005
+ } 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);
1006
+ 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);
1007
+ let h = f + 20 + (d - 20) / 2;
1008
+ 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) {
1009
+ return K.rect(t, e);
1010
+ }, a;
1011
+ }
1012
+ d(ke, "consoleWindow");
1013
+ function Ae(e) {
566
1014
  let t = Math.cos(Math.PI / 4), n = Math.sin(Math.PI / 4), r = e * 2, i = {
567
1015
  x: r / 2 * t,
568
1016
  y: r / 2 * n
@@ -579,21 +1027,21 @@ function de(e) {
579
1027
  return `M ${a.x},${a.y} L ${s.x},${s.y}
580
1028
  M ${i.x},${i.y} L ${o.x},${o.y}`;
581
1029
  }
582
- t(de, "createLine");
583
- function fe(t, n) {
1030
+ d(Ae, "createLine");
1031
+ function je(t, n) {
584
1032
  let { labelStyles: r, nodeStyles: i } = _(n);
585
1033
  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, {});
1034
+ 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
1035
  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) {
1036
+ let u = c.circle(0, 0, o * 2, l), d = Ae(o), f = c.path(d, l), p = a.insert(() => u, ":first-child");
1037
+ 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
1038
  return e.info("crossedCircle intersect", n, {
591
1039
  radius: o,
592
1040
  point: t
593
- }), W.circle(n, o, t);
1041
+ }), K.circle(n, o, t);
594
1042
  }, a;
595
1043
  }
596
- t(fe, "crossedCircle");
1044
+ d(je, "crossedCircle");
597
1045
  function J(e, t, n, r = 100, i = 0, a = 180) {
598
1046
  let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
599
1047
  for (let i = 0; i < r; i++) {
@@ -605,11 +1053,11 @@ function J(e, t, n, r = 100, i = 0, a = 180) {
605
1053
  }
606
1054
  return o;
607
1055
  }
608
- t(J, "generateCirclePoints");
609
- async function pe(e, t) {
1056
+ d(J, "generateCirclePoints");
1057
+ async function Me(e, t) {
610
1058
  let { labelStyles: n, nodeStyles: r } = _(t);
611
1059
  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 = [
1060
+ 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
1061
  ...J(l / 2, -u / 2, d, 30, -90, 0),
614
1062
  {
615
1063
  x: -l / 2 - d,
@@ -651,14 +1099,14 @@ async function pe(e, t) {
651
1099
  x: l / 2,
652
1100
  y: u / 2 + d
653
1101
  }
654
- ], h = S.svg(i), v = g(t, { fill: "none" });
1102
+ ], h = C.svg(i), v = g(t, { fill: "none" });
655
1103
  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);
1104
+ 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");
1105
+ 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) {
1106
+ return K.polygon(t, m, e);
659
1107
  }, i;
660
1108
  }
661
- t(pe, "curlyBraceLeft");
1109
+ d(Me, "curlyBraceLeft");
662
1110
  function Y(e, t, n, r = 100, i = 0, a = 180) {
663
1111
  let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
664
1112
  for (let i = 0; i < r; i++) {
@@ -670,11 +1118,11 @@ function Y(e, t, n, r = 100, i = 0, a = 180) {
670
1118
  }
671
1119
  return o;
672
1120
  }
673
- t(Y, "generateCirclePoints");
674
- async function me(e, t) {
1121
+ d(Y, "generateCirclePoints");
1122
+ async function Ne(e, t) {
675
1123
  let { labelStyles: n, nodeStyles: r } = _(t);
676
1124
  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 = [
1125
+ 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
1126
  ...Y(l / 2, -u / 2, d, 20, -90, 0),
679
1127
  {
680
1128
  x: l / 2 + d,
@@ -716,14 +1164,14 @@ async function me(e, t) {
716
1164
  x: -l / 2,
717
1165
  y: u / 2 + d
718
1166
  }
719
- ], h = S.svg(i), v = g(t, { fill: "none" });
1167
+ ], h = C.svg(i), v = g(t, { fill: "none" });
720
1168
  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);
1169
+ 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");
1170
+ 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) {
1171
+ return K.polygon(t, m, e);
724
1172
  }, i;
725
1173
  }
726
- t(me, "curlyBraceRight");
1174
+ d(Ne, "curlyBraceRight");
727
1175
  function X(e, t, n, r = 100, i = 0, a = 180) {
728
1176
  let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
729
1177
  for (let i = 0; i < r; i++) {
@@ -735,11 +1183,11 @@ function X(e, t, n, r = 100, i = 0, a = 180) {
735
1183
  }
736
1184
  return o;
737
1185
  }
738
- t(X, "generateCirclePoints");
739
- async function he(e, t) {
1186
+ d(X, "generateCirclePoints");
1187
+ async function Pe(e, t) {
740
1188
  let { labelStyles: n, nodeStyles: r } = _(t);
741
1189
  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 = [
1190
+ 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
1191
  ...X(l / 2, -u / 2, d, 30, -90, 0),
744
1192
  {
745
1193
  x: -l / 2 - d,
@@ -806,18 +1254,18 @@ async function he(e, t) {
806
1254
  y: -d
807
1255
  },
808
1256
  ...X(-l / 2 + d + d / 2, u / 2, d, 30, -180, -270)
809
- ], v = S.svg(i), y = g(t, { fill: "none" });
1257
+ ], v = C.svg(i), y = g(t, { fill: "none" });
810
1258
  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);
1259
+ 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");
1260
+ 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) {
1261
+ return K.polygon(t, h, e);
814
1262
  }, i;
815
1263
  }
816
- t(he, "curlyBraces");
817
- async function ge(e, t) {
1264
+ d(Pe, "curlyBraces");
1265
+ async function Fe(e, t) {
818
1266
  let { labelStyles: n, nodeStyles: r } = _(t);
819
1267
  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, {});
1268
+ 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
1269
  t.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
822
1270
  let h = l, v = u, y = h - d, b = v / 4, x = [
823
1271
  {
@@ -840,73 +1288,97 @@ async function ge(e, t) {
840
1288
  x: y,
841
1289
  y: v
842
1290
  },
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);
1291
+ ...L(-y, -v / 2, d, 50, 270, 90)
1292
+ ], S = F(x), w = p.path(S, m), T = s.insert(() => w, ":first-child");
1293
+ 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) {
1294
+ return K.polygon(t, x, e);
847
1295
  }, s;
848
1296
  }
849
- t(ge, "curvedTrapezoid");
850
- var _e = /* @__PURE__ */ t((e, t, n, r, i, a) => [
1297
+ d(Fe, "curvedTrapezoid");
1298
+ async function Ie(e, t) {
1299
+ let { labelStyles: n, nodeStyles: r } = _(t);
1300
+ t.labelStyle = n;
1301
+ 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;
1302
+ if (t.look === "handDrawn") {
1303
+ 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);
1304
+ v.insert(() => a, ":first-child"), v.insert(() => r, ":first-child"), y && v.attr("style", y);
1305
+ } 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);
1306
+ N(t, v);
1307
+ let b = h + d / 2;
1308
+ o.attr("transform", `translate(${-(a.width / 2) - (a.x - (a.left ?? 0))}, ${b - a.height / 2 - (a.y - (a.top ?? 0))})`);
1309
+ let x = m + l, S = Math.asin(Math.min(1, (h - x) / l)) * 180 / Math.PI, w = [
1310
+ ...L(0, -x, l, 24, 180 + S, -S),
1311
+ ...L(-(-c / 2 + f), -(h + f), f, 12, 90, 0),
1312
+ ...L(-(-c / 2 + f), -(p / 2 - f), f, 12, 360, 270),
1313
+ ...L(-(c / 2 - f), -(p / 2 - f), f, 12, 270, 180),
1314
+ ...L(-(c / 2 - f), -(h + f), f, 12, 180, 90)
1315
+ ];
1316
+ return t.intersect = function(e) {
1317
+ return K.polygon(t, w, e);
1318
+ }, i;
1319
+ }
1320
+ d(Ie, "person");
1321
+ var Le = /* @__PURE__ */ d((e, t, n, r, i, a) => [
851
1322
  `M${e},${t + a}`,
852
1323
  `a${i},${a} 0,0,0 ${n},0`,
853
1324
  `a${i},${a} 0,0,0 ${-n},0`,
854
1325
  `l0,${r}`,
855
1326
  `a${i},${a} 0,0,0 ${n},0`,
856
1327
  `l0,${-r}`
857
- ].join(" "), "createCylinderPathD"), ve = /* @__PURE__ */ t((e, t, n, r, i, a) => [
1328
+ ].join(" "), "createCylinderPathD"), Re = /* @__PURE__ */ d((e, t, n, r, i, a) => [
858
1329
  `M${e},${t + a}`,
859
1330
  `M${e + n},${t + a}`,
860
1331
  `a${i},${a} 0,0,0 ${-n},0`,
861
1332
  `l0,${r}`,
862
1333
  `a${i},${a} 0,0,0 ${n},0`,
863
1334
  `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) {
1335
+ ].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;
1336
+ async function He(e, t) {
866
1337
  let { labelStyles: n, nodeStyles: r } = _(t);
867
1338
  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);
1339
+ let i = t.padding ?? 0, a = t.look === "neo" ? 24 : i, o = t.look === "neo" ? 24 : i, s = t.width ?? 0;
1340
+ if (t.width && (t.width -= o, t.width < Ve && (t.width = Ve)), t.height) {
1341
+ let e = s / 2 / (2.5 + s / 50);
1342
+ t.height = t.height - a - e * 3, t.height < Be && (t.height = Be);
874
1343
  }
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;
1344
+ 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
1345
  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);
1346
+ 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" }));
1347
+ v = c.insert(() => o, ":first-child"), v = c.insert(() => a, ":first-child"), v.attr("class", "basic label-container"), y && v.attr("style", y);
879
1348
  } 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);
1349
+ let e = Le(0, 0, d, m, f, p);
1350
+ v = c.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container outer-path").attr("style", h(y)).attr("style", r);
882
1351
  }
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;
1352
+ 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) {
1353
+ let n = K.rect(t, e), r = n.x - (t.x ?? 0);
1354
+ 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)) {
1355
+ let i = p * p * (1 - r * r / (f * f));
1356
+ i > 0 && (i = Math.sqrt(i)), i = p - i, e.y - (t.y ?? 0) > 0 && (i = -i), n.y += i;
888
1357
  }
889
1358
  return n;
890
- }, s;
1359
+ }, c;
891
1360
  }
892
- t(Se, "cylinder");
893
- async function Ce(e, t, n) {
1361
+ d(He, "cylinder");
1362
+ async function Ue(e, t, n) {
894
1363
  let { labelStyles: r, nodeStyles: i } = _(t);
895
1364
  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);
1365
+ 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;
1366
+ if (n?.rx && n.ry && (f = n.rx, p = n.ry), t.look === "handDrawn") {
1367
+ 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);
1368
+ d = a.insert(() => r, ":first-child"), d.attr("class", "basic label-container").attr("style", h(m));
1369
+ } 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);
1370
+ return N(t, d, t.look === "handDrawn" ? void 0 : {
1371
+ width: s,
1372
+ height: c
1373
+ }), t.calcIntersect = function(e, t) {
1374
+ return K.rect(e, t);
903
1375
  }, t.intersect = function(e) {
904
- return W.rect(t, e);
1376
+ return K.rect(t, e);
905
1377
  }, a;
906
1378
  }
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, {
1379
+ d(Ue, "drawRect");
1380
+ async function We(e, t) {
1381
+ let { cssClasses: n, labelPaddingX: r, labelPaddingY: i, padding: a, width: o, height: s } = t, c = await Ue(e, t, {
910
1382
  rx: 0,
911
1383
  ry: 0,
912
1384
  classes: n ?? "",
@@ -914,7 +1386,7 @@ async function we(e, t) {
914
1386
  labelPaddingY: i ?? a ?? 0
915
1387
  });
916
1388
  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();
1389
+ let e = C.svg(c), n = g(t, {}), r = c.select(".basic.label-container > path:nth-child(2)"), i = r.node();
918
1390
  if (!i) return c;
919
1391
  let a = null;
920
1392
  if (i instanceof SVGGraphicsElement) a = i.getBBox();
@@ -924,11 +1396,11 @@ async function we(e, t) {
924
1396
  let l = c.select(".basic.label-container"), u = (Number(l.attr("width")) || o) ?? 0, d = (Number(l.attr("height")) || s) ?? 0;
925
1397
  return u > 0 && d > 0 && l.attr("stroke-dasharray", `${u} ${d}`), c;
926
1398
  }
927
- t(we, "datastore");
928
- async function Te(e, t) {
1399
+ d(We, "datastore");
1400
+ async function Ge(e, t) {
929
1401
  let { labelStyles: n, nodeStyles: r } = _(t);
930
1402
  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, {});
1403
+ 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
1404
  t.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
933
1405
  let y = [
934
1406
  {
@@ -960,55 +1432,55 @@ async function Te(e, t) {
960
1432
  y: p + d
961
1433
  }
962
1434
  ], 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);
1435
+ 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) {
1436
+ return K.rect(t, e);
965
1437
  }, o;
966
1438
  }
967
- t(Te, "dividedRectangle");
968
- async function Ee(t, n) {
1439
+ d(Ge, "dividedRectangle");
1440
+ async function Ke(t, n) {
969
1441
  let { labelStyles: r, nodeStyles: i } = _(n), a = n.look === "neo" ? 12 : 5;
970
1442
  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;
1443
+ 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
1444
  if (n.look === "handDrawn") {
973
- let e = S.svg(c), t = g(n, {
1445
+ let e = C.svg(c), t = g(n, {
974
1446
  roughness: .2,
975
1447
  strokeWidth: 2.5
976
1448
  }), r = g(n, {
977
1449
  roughness: .2,
978
1450
  strokeWidth: 1.5
979
1451
  }), 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);
1452
+ 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
1453
  } else {
982
1454
  f = c.insert("g", ":first-child");
983
1455
  let e = f.insert("circle", ":first-child"), t = f.insert("circle");
984
1456
  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
1457
  }
986
- return T(n, f), n.intersect = function(t) {
987
- return e.info("DoubleCircle intersect", n, u, t), W.circle(n, u, t);
1458
+ return N(n, f), n.intersect = function(t) {
1459
+ return e.info("DoubleCircle intersect", n, u, t), K.circle(n, u, t);
988
1460
  }, c;
989
1461
  }
990
- t(Ee, "doublecircle");
991
- function De(t, n, { config: { themeVariables: r } }) {
1462
+ d(Ke, "doublecircle");
1463
+ function qe(t, n, { config: { themeVariables: r } }) {
992
1464
  let { labelStyles: i, nodeStyles: a } = _(n);
993
1465
  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" });
1466
+ 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
1467
  n.look !== "handDrawn" && (u.roughness = 0);
996
1468
  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) {
1469
+ 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
1470
  return e.info("filledCircle intersect", n, {
999
1471
  radius: 7,
1000
1472
  point: t
1001
- }), W.circle(n, 7, t);
1473
+ }), K.circle(n, 7, t);
1002
1474
  }, o;
1003
1475
  }
1004
- t(De, "filledCircle");
1005
- var Oe = 10, ke = 10;
1006
- async function Ae(t, n) {
1476
+ d(qe, "filledCircle");
1477
+ var Je = 10, Ye = 10;
1478
+ async function Xe(t, n) {
1007
1479
  let { labelStyles: r, nodeStyles: i } = _(n);
1008
1480
  n.labelStyle = r;
1009
1481
  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 = [
1482
+ (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));
1483
+ 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
1484
  {
1013
1485
  x: 0,
1014
1486
  y: -d
@@ -1021,38 +1493,85 @@ async function Ae(t, n) {
1021
1493
  x: f / 2,
1022
1494
  y: 0
1023
1495
  }
1024
- ], { cssStyles: m } = n, h = S.svg(s), v = g(n, {});
1496
+ ], { cssStyles: m } = n, h = C.svg(s), v = g(n, {});
1025
1497
  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);
1498
+ 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");
1499
+ 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) {
1500
+ return e.info("Triangle intersect", n, p, t), K.polygon(n, p, t);
1029
1501
  }, s;
1030
1502
  }
1031
- t(Ae, "flippedTriangle");
1032
- function je(e, t, { dir: n, config: { state: r, themeVariables: i } }) {
1503
+ d(Xe, "flippedTriangle");
1504
+ async function Ze(e, t) {
1505
+ let { labelStyles: n, nodeStyles: r } = _(t);
1506
+ t.labelStyle = n;
1507
+ 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 = [
1508
+ {
1509
+ x: -c / 2,
1510
+ y: m
1511
+ },
1512
+ {
1513
+ x: -c / 2 + p,
1514
+ y: m
1515
+ },
1516
+ {
1517
+ x: -c / 2 + p,
1518
+ y: m + u
1519
+ },
1520
+ {
1521
+ x: c / 2,
1522
+ y: m + u
1523
+ },
1524
+ {
1525
+ x: c / 2,
1526
+ y: d / 2
1527
+ },
1528
+ {
1529
+ x: -c / 2,
1530
+ y: d / 2
1531
+ }
1532
+ ], v = [
1533
+ `M${h[0].x},${h[0].y}`,
1534
+ ...h.slice(1).map((e) => `L${e.x},${e.y}`),
1535
+ "Z"
1536
+ ].join(" "), { cssStyles: y } = t, b;
1537
+ if (t.look === "handDrawn") {
1538
+ let e = C.svg(i).path(v, g(t, {}));
1539
+ b = i.insert(() => e, ":first-child").attr("class", "basic label-container"), y && b.attr("style", y);
1540
+ } else b = i.insert("path", ":first-child").attr("d", v).attr("class", "basic label-container").attr("style", r);
1541
+ t.look === "handDrawn" ? N(t, b) : N(t, b, {
1542
+ width: c,
1543
+ height: d
1544
+ });
1545
+ let x = m + u + f / 2;
1546
+ 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) {
1547
+ return K.polygon(t, h, e);
1548
+ }, i;
1549
+ }
1550
+ d(Ze, "folder");
1551
+ function Qe(e, t, { dir: n, config: { state: r, themeVariables: i } }) {
1033
1552
  let { nodeStyles: a } = _(t);
1034
1553
  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);
1554
+ 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
1555
  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, {
1556
+ let u = -1 * c / 2, d = -1 * l / 2, f = C.svg(o), p = g(t, {
1038
1557
  stroke: i.lineColor,
1039
1558
  fill: i.lineColor
1040
1559
  });
1041
1560
  t.look !== "handDrawn" && (p.roughness = 0, p.fillStyle = "solid");
1042
1561
  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);
1562
+ s && t.look !== "handDrawn" && h.selectAll("path").attr("style", s), a && t.look !== "handDrawn" && h.selectAll("path").attr("style", a), N(t, h);
1044
1563
  let v = r?.padding ?? 0;
1045
1564
  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);
1565
+ return K.rect(t, e);
1047
1566
  }, o;
1048
1567
  }
1049
- t(je, "forkJoin");
1050
- async function Me(t, n) {
1568
+ d(Qe, "forkJoin");
1569
+ async function $e(t, n) {
1051
1570
  let { labelStyles: r, nodeStyles: i } = _(n);
1052
1571
  n.labelStyle = r;
1053
1572
  let a = n.look === "neo" ? 16 : n.padding ?? 0, o = n.look === "neo" ? 12 : n.padding ?? 0;
1054
1573
  (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, {});
1574
+ 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
1575
  n.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
1057
1576
  let h = [
1058
1577
  {
@@ -1063,7 +1582,7 @@ async function Me(t, n) {
1063
1582
  x: l / 2 - d,
1064
1583
  y: -u / 2
1065
1584
  },
1066
- ...k(-l / 2 + d, 0, d, 50, 90, 270),
1585
+ ...L(-l / 2 + d, 0, d, 50, 90, 270),
1067
1586
  {
1068
1587
  x: l / 2 - d,
1069
1588
  y: u / 2
@@ -1072,16 +1591,16 @@ async function Me(t, n) {
1072
1591
  x: -l / 2,
1073
1592
  y: u / 2
1074
1593
  }
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) {
1594
+ ], v = F(h), y = p.path(v, m), b = s.insert(() => y, ":first-child");
1595
+ 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
1596
  return e.info("Pill intersect", n, {
1078
1597
  radius: d,
1079
1598
  point: t
1080
- }), W.polygon(n, h, t);
1599
+ }), K.polygon(n, h, t);
1081
1600
  }, s;
1082
1601
  }
1083
- t(Me, "halfRoundedRectangle");
1084
- var Ne = /* @__PURE__ */ t((e, t, n, r, i) => [
1602
+ d($e, "halfRoundedRectangle");
1603
+ var et = /* @__PURE__ */ d((e, t, n, r, i) => [
1085
1604
  `M${e + i},${t}`,
1086
1605
  `L${e + n - i},${t}`,
1087
1606
  `L${e + n},${t - r / 2}`,
@@ -1090,7 +1609,7 @@ var Ne = /* @__PURE__ */ t((e, t, n, r, i) => [
1090
1609
  `L${e},${t - r / 2}`,
1091
1610
  "Z"
1092
1611
  ].join(" "), "createHexagonPathD");
1093
- async function Pe(e, t) {
1612
+ async function tt(e, t) {
1094
1613
  let { labelStyles: n, nodeStyles: r } = _(t), i = t.look === "neo" ? 3.5 : 4;
1095
1614
  t.labelStyle = n;
1096
1615
  let a = t.padding ?? 0, o = t.look === "neo" ? 70 : a, s = t.look === "neo" ? 32 : a;
@@ -1098,7 +1617,7 @@ async function Pe(e, t) {
1098
1617
  let e = (t.height ?? 0) / i;
1099
1618
  t.width = (t?.width ?? 0) - 2 * e - s, t.height = (t.height ?? 0) - o;
1100
1619
  }
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 = [
1620
+ 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
1621
  {
1103
1622
  x: d,
1104
1623
  y: 0
@@ -1125,18 +1644,18 @@ async function Pe(e, t) {
1125
1644
  }
1126
1645
  ], m, { cssStyles: h } = t;
1127
1646
  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);
1647
+ let e = C.svg(c), n = g(t, {}), r = et(0, 0, f, u, d), i = e.path(r, n);
1129
1648
  m = c.insert(() => i, ":first-child").attr("transform", `translate(${-f / 2}, ${u / 2})`), h && m.attr("style", h);
1130
1649
  } 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);
1650
+ return r && m.attr("style", r), t.width = f, t.height = u, N(t, m), t.intersect = function(e) {
1651
+ return K.polygon(t, p, e);
1133
1652
  }, c;
1134
1653
  }
1135
- t(Pe, "hexagon");
1136
- async function Fe(t, n) {
1654
+ d(tt, "hexagon");
1655
+ async function nt(t, n) {
1137
1656
  let { labelStyles: r, nodeStyles: i } = _(n);
1138
1657
  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, {});
1658
+ 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
1659
  n.look !== "handDrawn" && (u.roughness = 0, u.fillStyle = "solid");
1141
1660
  let d = [
1142
1661
  {
@@ -1155,39 +1674,39 @@ async function Fe(t, n) {
1155
1674
  x: o,
1156
1675
  y: s
1157
1676
  }
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);
1677
+ ], f = F(d), p = l.path(f, u), m = a.insert(() => p, ":first-child");
1678
+ 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) {
1679
+ return e.info("Pill intersect", n, { points: d }), K.polygon(n, d, t);
1161
1680
  }, a;
1162
1681
  }
1163
- t(Fe, "hourglass");
1164
- async function Ie(t, n, { config: { themeVariables: r, flowchart: i } }) {
1682
+ d(nt, "hourglass");
1683
+ async function rt(t, n, { config: { themeVariables: r, flowchart: i } }) {
1165
1684
  let { labelStyles: a } = _(n);
1166
1685
  n.labelStyle = a;
1167
1686
  let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1168
1687
  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, {
1688
+ 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
1689
  stroke: "none",
1171
1690
  fill: "none"
1172
1691
  });
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,
1692
+ n.look !== "handDrawn" && (D.roughness = 0, D.fillStyle = "solid");
1693
+ 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, {
1694
+ ...D,
1176
1695
  fill: "transparent",
1177
1696
  stroke: "none"
1178
- }), P = u.insert(() => A, ":first-child"), F = u.insert(() => N);
1697
+ }), P = u.insert(() => O, ":first-child"), F = u.insert(() => M);
1179
1698
  if (n.icon) {
1180
1699
  let e = u.append("g");
1181
- e.html(`<g>${await x(n.icon, {
1700
+ e.html(`<g>${await b(n.icon, {
1182
1701
  height: c,
1183
1702
  width: c,
1184
1703
  fallbackPrefix: ""
1185
1704
  })}</g>`);
1186
1705
  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};`);
1706
+ 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
1707
  }
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);
1708
+ 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) {
1709
+ if (e.info("iconSquare intersect", n, t), !n.label) return K.rect(n, t);
1191
1710
  let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
1192
1711
  return o = p ? [
1193
1712
  {
@@ -1200,11 +1719,11 @@ async function Ie(t, n, { config: { themeVariables: r, flowchart: i } }) {
1200
1719
  },
1201
1720
  {
1202
1721
  x: r + d.width / 2,
1203
- y: i - a / 2 + d.height + D
1722
+ y: i - a / 2 + d.height + T
1204
1723
  },
1205
1724
  {
1206
1725
  x: r + h / 2,
1207
- y: i - a / 2 + d.height + D
1726
+ y: i - a / 2 + d.height + T
1208
1727
  },
1209
1728
  {
1210
1729
  x: r + h / 2,
@@ -1216,11 +1735,11 @@ async function Ie(t, n, { config: { themeVariables: r, flowchart: i } }) {
1216
1735
  },
1217
1736
  {
1218
1737
  x: r - h / 2,
1219
- y: i - a / 2 + d.height + D
1738
+ y: i - a / 2 + d.height + T
1220
1739
  },
1221
1740
  {
1222
1741
  x: r - d.width / 2,
1223
- y: i - a / 2 + d.height + D
1742
+ y: i - a / 2 + d.height + T
1224
1743
  }
1225
1744
  ] : [
1226
1745
  {
@@ -1255,57 +1774,57 @@ async function Ie(t, n, { config: { themeVariables: r, flowchart: i } }) {
1255
1774
  x: r - h / 2,
1256
1775
  y: i - a / 2 + m
1257
1776
  }
1258
- ], W.polygon(n, o, t);
1777
+ ], K.polygon(n, o, t);
1259
1778
  }, u;
1260
1779
  }
1261
- t(Ie, "icon");
1262
- async function Le(t, n, { config: { themeVariables: r, flowchart: i } }) {
1780
+ d(rt, "icon");
1781
+ async function it(t, n, { config: { themeVariables: r, flowchart: i } }) {
1263
1782
  let { labelStyles: a } = _(n);
1264
1783
  n.labelStyle = a;
1265
1784
  let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1266
1785
  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, {
1786
+ 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, {});
1787
+ n.look !== "handDrawn" && (w.roughness = 0, w.fillStyle = "solid"), w.stroke = x.get("fill") ?? v;
1788
+ let T = u.append("g");
1789
+ n.icon && T.html(`<g>${await b(n.icon, {
1271
1790
  height: c,
1272
1791
  width: c,
1273
1792
  fallbackPrefix: ""
1274
1793
  })}</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,
1794
+ 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, {
1795
+ ...w,
1277
1796
  fill: "transparent",
1278
1797
  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);
1798
+ }), ee = u.insert(() => P, ":first-child"), R = u.insert(() => L);
1799
+ 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) {
1800
+ return e.info("iconSquare intersect", n, t), K.rect(n, t);
1282
1801
  }, u;
1283
1802
  }
1284
- t(Le, "iconCircle");
1285
- async function Re(t, n, { config: { themeVariables: r, flowchart: i } }) {
1803
+ d(it, "iconCircle");
1804
+ async function at(t, n, { config: { themeVariables: r, flowchart: i } }) {
1286
1805
  let { labelStyles: a } = _(n);
1287
1806
  n.labelStyle = a;
1288
1807
  let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1289
1808
  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,
1809
+ 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, {});
1810
+ n.look !== "handDrawn" && (k.roughness = 0, k.fillStyle = "solid"), k.stroke = w.get("fill") ?? S;
1811
+ 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, {
1812
+ ...k,
1294
1813
  fill: "transparent",
1295
1814
  stroke: "none"
1296
- }), ee = u.insert(() => M, ":first-child").attr("class", "icon-shape2"), te = u.insert(() => I);
1815
+ }), I = u.insert(() => A, ":first-child").attr("class", "icon-shape2"), L = u.insert(() => F);
1297
1816
  if (n.icon) {
1298
1817
  let e = u.append("g");
1299
- e.html(`<g>${await x(n.icon, {
1818
+ e.html(`<g>${await b(n.icon, {
1300
1819
  height: c,
1301
1820
  width: c,
1302
1821
  fallbackPrefix: ""
1303
1822
  })}</g>`);
1304
1823
  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};`);
1824
+ 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
1825
  }
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);
1826
+ 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) {
1827
+ if (e.info("iconSquare intersect", n, t), !n.label) return K.rect(n, t);
1309
1828
  let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
1310
1829
  return o = m ? [
1311
1830
  {
@@ -1318,11 +1837,11 @@ async function Re(t, n, { config: { themeVariables: r, flowchart: i } }) {
1318
1837
  },
1319
1838
  {
1320
1839
  x: r + d.width / 2,
1321
- y: i - a / 2 + d.height + k
1840
+ y: i - a / 2 + d.height + D
1322
1841
  },
1323
1842
  {
1324
1843
  x: r + v / 2,
1325
- y: i - a / 2 + d.height + k
1844
+ y: i - a / 2 + d.height + D
1326
1845
  },
1327
1846
  {
1328
1847
  x: r + v / 2,
@@ -1334,11 +1853,11 @@ async function Re(t, n, { config: { themeVariables: r, flowchart: i } }) {
1334
1853
  },
1335
1854
  {
1336
1855
  x: r - v / 2,
1337
- y: i - a / 2 + d.height + k
1856
+ y: i - a / 2 + d.height + D
1338
1857
  },
1339
1858
  {
1340
1859
  x: r - d.width / 2,
1341
- y: i - a / 2 + d.height + k
1860
+ y: i - a / 2 + d.height + D
1342
1861
  }
1343
1862
  ] : [
1344
1863
  {
@@ -1373,34 +1892,34 @@ async function Re(t, n, { config: { themeVariables: r, flowchart: i } }) {
1373
1892
  x: r - v / 2,
1374
1893
  y: i - a / 2 + h
1375
1894
  }
1376
- ], W.polygon(n, o, t);
1895
+ ], K.polygon(n, o, t);
1377
1896
  }, u;
1378
1897
  }
1379
- t(Re, "iconRounded");
1380
- async function ze(t, n, { config: { themeVariables: r, flowchart: i } }) {
1898
+ d(at, "iconRounded");
1899
+ async function ot(t, n, { config: { themeVariables: r, flowchart: i } }) {
1381
1900
  let { labelStyles: a } = _(n);
1382
1901
  n.labelStyle = a;
1383
1902
  let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1384
1903
  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,
1904
+ 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, {});
1905
+ n.look !== "handDrawn" && (k.roughness = 0, k.fillStyle = "solid"), k.stroke = w.get("fill") ?? S;
1906
+ 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, {
1907
+ ...k,
1389
1908
  fill: "transparent",
1390
1909
  stroke: "none"
1391
- }), ee = u.insert(() => M, ":first-child"), te = u.insert(() => I);
1910
+ }), I = u.insert(() => A, ":first-child"), L = u.insert(() => F);
1392
1911
  if (n.icon) {
1393
1912
  let e = u.append("g");
1394
- e.html(`<g>${await x(n.icon, {
1913
+ e.html(`<g>${await b(n.icon, {
1395
1914
  height: c,
1396
1915
  width: c,
1397
1916
  fallbackPrefix: ""
1398
1917
  })}</g>`);
1399
1918
  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};`);
1919
+ 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
1920
  }
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);
1921
+ 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) {
1922
+ if (e.info("iconSquare intersect", n, t), !n.label) return K.rect(n, t);
1404
1923
  let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
1405
1924
  return o = m ? [
1406
1925
  {
@@ -1413,11 +1932,11 @@ async function ze(t, n, { config: { themeVariables: r, flowchart: i } }) {
1413
1932
  },
1414
1933
  {
1415
1934
  x: r + d.width / 2,
1416
- y: i - a / 2 + d.height + k
1935
+ y: i - a / 2 + d.height + D
1417
1936
  },
1418
1937
  {
1419
1938
  x: r + v / 2,
1420
- y: i - a / 2 + d.height + k
1939
+ y: i - a / 2 + d.height + D
1421
1940
  },
1422
1941
  {
1423
1942
  x: r + v / 2,
@@ -1429,11 +1948,11 @@ async function ze(t, n, { config: { themeVariables: r, flowchart: i } }) {
1429
1948
  },
1430
1949
  {
1431
1950
  x: r - v / 2,
1432
- y: i - a / 2 + d.height + k
1951
+ y: i - a / 2 + d.height + D
1433
1952
  },
1434
1953
  {
1435
1954
  x: r - d.width / 2,
1436
- y: i - a / 2 + d.height + k
1955
+ y: i - a / 2 + d.height + D
1437
1956
  }
1438
1957
  ] : [
1439
1958
  {
@@ -1468,11 +1987,11 @@ async function ze(t, n, { config: { themeVariables: r, flowchart: i } }) {
1468
1987
  x: r - v / 2,
1469
1988
  y: i - a / 2 + h
1470
1989
  }
1471
- ], W.polygon(n, o, t);
1990
+ ], K.polygon(n, o, t);
1472
1991
  }, u;
1473
1992
  }
1474
- t(ze, "iconSquare");
1475
- async function Be(t, n, { config: { flowchart: r } }) {
1993
+ d(ot, "iconSquare");
1994
+ async function st(t, n, { config: { flowchart: r } }) {
1476
1995
  let i = new Image();
1477
1996
  i.src = n?.img ?? "", await i.decode();
1478
1997
  let a = Number(i.naturalWidth.toString().replace("px", "")), o = Number(i.naturalHeight.toString().replace("px", ""));
@@ -1483,19 +2002,19 @@ async function Be(t, n, { config: { flowchart: r } }) {
1483
2002
  n.defaultWidth = r?.wrappingWidth;
1484
2003
  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
2004
  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,
2005
+ 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, {});
2006
+ n.look !== "handDrawn" && (S.roughness = 0, S.fillStyle = "solid");
2007
+ 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, {
2008
+ ...S,
1490
2009
  fill: "none",
1491
2010
  stroke: "none"
1492
- }), A = f.insert(() => E, ":first-child"), j = f.insert(() => k);
2011
+ }), O = f.insert(() => w, ":first-child"), k = f.insert(() => D);
1493
2012
  if (n.img) {
1494
2013
  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})`);
2014
+ 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
2015
  }
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);
2016
+ 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) {
2017
+ if (e.info("iconSquare intersect", n, t), !n.label) return K.rect(n, t);
1499
2018
  let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
1500
2019
  return o = h ? [
1501
2020
  {
@@ -1563,51 +2082,51 @@ async function Be(t, n, { config: { flowchart: r } }) {
1563
2082
  x: r - u / 2,
1564
2083
  y: i - a / 2 + d
1565
2084
  }
1566
- ], W.polygon(n, o, t);
2085
+ ], K.polygon(n, o, t);
1567
2086
  }, f;
1568
2087
  }
1569
- t(Be, "imageSquare");
1570
- async function Ve(e, t) {
2088
+ d(st, "imageSquare");
2089
+ async function ct(e, t) {
1571
2090
  let { labelStyles: n, nodeStyles: r } = _(t);
1572
2091
  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 = [
2092
+ 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
2093
  {
1575
2094
  x: 0,
1576
2095
  y: 0
1577
2096
  },
1578
2097
  {
1579
- x: l,
2098
+ x: u,
1580
2099
  y: 0
1581
2100
  },
1582
2101
  {
1583
- x: l + 3 * u / 6,
1584
- y: -u
2102
+ x: u + 3 * l / 6,
2103
+ y: -l
1585
2104
  },
1586
2105
  {
1587
- x: -3 * u / 6,
1588
- y: -u
2106
+ x: -3 * l / 6,
2107
+ y: -l
1589
2108
  }
1590
2109
  ], f, { cssStyles: p } = t;
1591
2110
  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);
2111
+ let e = C.svg(s), n = g(t, {}), r = F(d), i = e.path(r, n);
2112
+ f = s.insert(() => i, ":first-child").attr("transform", `translate(${-u / 2}, ${l / 2})`), p && f.attr("style", p);
2113
+ } else f = q(s, u, l, d);
2114
+ return r && f.attr("style", r), t.width = u, t.height = l, N(t, f), t.intersect = function(e) {
2115
+ return K.polygon(t, d, e);
1597
2116
  }, s;
1598
2117
  }
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);
2118
+ d(ct, "inv_trapezoid");
2119
+ async function lt(e, t) {
2120
+ let { shapeSvg: n, bbox: r, label: i } = await j(e, t, "label"), a = n.insert("rect", ":first-child");
2121
+ 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) {
2122
+ return K.rect(t, e);
1604
2123
  }, n;
1605
2124
  }
1606
- t(He, "labelRect");
1607
- async function Ue(e, t) {
2125
+ d(lt, "labelRect");
2126
+ async function ut(e, t) {
1608
2127
  let { labelStyles: n, nodeStyles: r } = _(t);
1609
2128
  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 = [
2129
+ 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
2130
  {
1612
2131
  x: 0,
1613
2132
  y: 0
@@ -1626,18 +2145,18 @@ async function Ue(e, t) {
1626
2145
  }
1627
2146
  ], f, { cssStyles: p } = t;
1628
2147
  if (t.look === "handDrawn") {
1629
- let e = S.svg(s), n = g(t, {}), r = D(d), i = e.path(r, n);
2148
+ let e = C.svg(s), n = g(t, {}), r = F(d), i = e.path(r, n);
1630
2149
  f = s.insert(() => i, ":first-child").attr("transform", `translate(${-u / 2}, ${l / 2})`), p && f.attr("style", p);
1631
2150
  } 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);
2151
+ return r && f.attr("style", r), t.width = u, t.height = l, N(t, f), t.intersect = function(e) {
2152
+ return K.polygon(t, d, e);
1634
2153
  }, s;
1635
2154
  }
1636
- t(Ue, "lean_left");
1637
- async function We(e, t) {
2155
+ d(ut, "lean_left");
2156
+ async function dt(e, t) {
1638
2157
  let { labelStyles: n, nodeStyles: r } = _(t);
1639
2158
  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 = [
2159
+ 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
2160
  {
1642
2161
  x: -3 * l / 6,
1643
2162
  y: 0
@@ -1656,18 +2175,18 @@ async function We(e, t) {
1656
2175
  }
1657
2176
  ], f, { cssStyles: p } = t;
1658
2177
  if (t.look === "handDrawn") {
1659
- let e = S.svg(s), n = g(t, {}), r = D(d), i = e.path(r, n);
2178
+ let e = C.svg(s), n = g(t, {}), r = F(d), i = e.path(r, n);
1660
2179
  f = s.insert(() => i, ":first-child").attr("transform", `translate(${-u / 2}, ${l / 2})`), p && f.attr("style", p);
1661
2180
  } 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);
2181
+ return r && f.attr("style", r), t.width = u, t.height = l, N(t, f), t.intersect = function(e) {
2182
+ return K.polygon(t, d, e);
1664
2183
  }, s;
1665
2184
  }
1666
- t(We, "lean_right");
1667
- function Ge(t, n) {
2185
+ d(dt, "lean_right");
2186
+ function ft(t, n) {
1668
2187
  let { labelStyles: r, nodeStyles: i } = _(n);
1669
2188
  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 = [
2189
+ 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
2190
  {
1672
2191
  x: s,
1673
2192
  y: 0
@@ -1692,15 +2211,15 @@ function Ge(t, n) {
1692
2211
  x: 14,
1693
2212
  y: c - 7 / 2
1694
2213
  }
1695
- ], u = S.svg(a), d = g(n, {});
2214
+ ], u = C.svg(a), d = g(n, {});
1696
2215
  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);
2216
+ let f = F(l), p = u.path(f, d), m = a.insert(() => p, ":first-child");
2217
+ 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) {
2218
+ return e.info("lightningBolt intersect", n, t), K.polygon(n, l, t);
1700
2219
  }, a;
1701
2220
  }
1702
- t(Ge, "lightningBolt");
1703
- var Ke = /* @__PURE__ */ t((e, t, n, r, i, a, o) => [
2221
+ d(ft, "lightningBolt");
2222
+ var pt = /* @__PURE__ */ d((e, t, n, r, i, a, o) => [
1704
2223
  `M${e},${t + a}`,
1705
2224
  `a${i},${a} 0,0,0 ${n},0`,
1706
2225
  `a${i},${a} 0,0,0 ${-n},0`,
@@ -1709,7 +2228,7 @@ var Ke = /* @__PURE__ */ t((e, t, n, r, i, a, o) => [
1709
2228
  `l0,${-r}`,
1710
2229
  `M${e},${t + a + o}`,
1711
2230
  `a${i},${a} 0,0,0 ${n},0`
1712
- ].join(" "), "createCylinderPathD"), qe = /* @__PURE__ */ t((e, t, n, r, i, a, o) => [
2231
+ ].join(" "), "createCylinderPathD"), mt = /* @__PURE__ */ d((e, t, n, r, i, a, o) => [
1713
2232
  `M${e},${t + a}`,
1714
2233
  `M${e + n},${t + a}`,
1715
2234
  `a${i},${a} 0,0,0 ${-n},0`,
@@ -1718,27 +2237,27 @@ var Ke = /* @__PURE__ */ t((e, t, n, r, i, a, o) => [
1718
2237
  `l0,${-r}`,
1719
2238
  `M${e},${t + a + o}`,
1720
2239
  `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) {
2240
+ ].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;
2241
+ async function vt(e, t) {
1723
2242
  let { labelStyles: n, nodeStyles: r } = _(t);
1724
2243
  t.labelStyle = n;
1725
2244
  let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 24 : i;
1726
2245
  if (t.width || t.height) {
1727
2246
  let e = t.width ?? 0;
1728
- t.width = (t.width ?? 0) - a, t.width < Xe && (t.width = Xe);
2247
+ t.width = (t.width ?? 0) - a, t.width < _t && (t.width = _t);
1729
2248
  let n = e / 2 / (2.5 + e / 50);
1730
- t.height = (t.height ?? 0) - o - n * 3, t.height < Ye && (t.height = Ye);
2249
+ t.height = (t.height ?? 0) - o - n * 3, t.height < gt && (t.height = gt);
1731
2250
  }
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;
2251
+ 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
2252
  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);
2253
+ 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
2254
  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
2255
  } 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);
2256
+ let e = pt(0, 0, u, p, d, f, m);
2257
+ v = s.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container outer-path").attr("style", h(y)).attr("style", r);
1739
2258
  }
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);
2259
+ 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) {
2260
+ let n = K.rect(t, e), r = n.x - (t.x ?? 0);
1742
2261
  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
2262
  let i = f * f * (1 - r * r / (d * d));
1744
2263
  i > 0 && (i = Math.sqrt(i)), i = f - i, e.y - (t.y ?? 0) > 0 && (i = -i), n.y += i;
@@ -1746,13 +2265,13 @@ async function Ze(e, t) {
1746
2265
  return n;
1747
2266
  }, s;
1748
2267
  }
1749
- t(Ze, "linedCylinder");
1750
- async function Qe(e, t) {
2268
+ d(vt, "linedCylinder");
2269
+ async function yt(e, t) {
1751
2270
  let { labelStyles: n, nodeStyles: r } = _(t);
1752
2271
  t.labelStyle = n;
1753
2272
  let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
1754
2273
  (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, {});
2274
+ 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
2275
  t.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
1757
2276
  let y = [
1758
2277
  {
@@ -1763,7 +2282,7 @@ async function Qe(e, t) {
1763
2282
  x: -u / 2 - u / 2 * .1,
1764
2283
  y: p / 2
1765
2284
  },
1766
- ...O(-u / 2 - u / 2 * .1, p / 2, u / 2 + u / 2 * .1, p / 2, f, .8),
2285
+ ...I(-u / 2 - u / 2 * .1, p / 2, u / 2 + u / 2 * .1, p / 2, f, .8),
1767
2286
  {
1768
2287
  x: u / 2 + u / 2 * .1,
1769
2288
  y: -p / 2
@@ -1785,17 +2304,17 @@ async function Qe(e, t) {
1785
2304
  y: -p / 2
1786
2305
  }
1787
2306
  ], 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);
2307
+ 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) {
2308
+ return K.polygon(t, y, e);
1790
2309
  }, s;
1791
2310
  }
1792
- t(Qe, "linedWaveEdgedRect");
1793
- async function $e(e, t) {
2311
+ d(yt, "linedWaveEdgedRect");
2312
+ async function bt(e, t) {
1794
2313
  let { labelStyles: n, nodeStyles: r } = _(t);
1795
2314
  t.labelStyle = n;
1796
2315
  let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i, s = t.look === "neo" ? 10 : 5;
1797
2316
  (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 = [
2317
+ 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
2318
  {
1800
2319
  x: h - s,
1801
2320
  y: v + s
@@ -1844,7 +2363,7 @@ async function $e(e, t) {
1844
2363
  x: h,
1845
2364
  y: v + s
1846
2365
  }
1847
- ], O = [
2366
+ ], w = [
1848
2367
  {
1849
2368
  x: h,
1850
2369
  y: v + s
@@ -1871,20 +2390,20 @@ async function $e(e, t) {
1871
2390
  }
1872
2391
  ];
1873
2392
  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);
2393
+ let T = F(S), E = b.path(T, x), D = F(w), O = b.path(D, x);
2394
+ t.look !== "handDrawn" && (E = ee(E), O = ee(O));
2395
+ let k = c.insert("g", ":first-child");
2396
+ 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) {
2397
+ return K.polygon(t, S, e);
1879
2398
  }, c;
1880
2399
  }
1881
- t($e, "multiRect");
1882
- async function et(e, t) {
2400
+ d(bt, "multiRect");
2401
+ async function xt(e, t) {
1883
2402
  let { labelStyles: n, nodeStyles: r } = _(t);
1884
2403
  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;
2404
+ 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
2405
  (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 = [
2406
+ 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
2407
  {
1889
2408
  x: h - 10,
1890
2409
  y: v + 10
@@ -1930,7 +2449,7 @@ async function et(e, t) {
1930
2449
  x: h,
1931
2450
  y: v + 10
1932
2451
  }
1933
- ], k = [
2452
+ ], w = [
1934
2453
  {
1935
2454
  x: h,
1936
2455
  y: v + 10
@@ -1955,39 +2474,39 @@ async function et(e, t) {
1955
2474
  x: h,
1956
2475
  y: v
1957
2476
  }
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);
2477
+ ], T = C.svg(i), E = g(t, {});
2478
+ t.look !== "handDrawn" && (E.roughness = 0, E.fillStyle = "solid");
2479
+ let D = F(S), O = T.path(D, E), k = F(w), A = T.path(k, E), M = i.insert(() => O, ":first-child");
2480
+ 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) {
2481
+ return K.polygon(t, S, e);
1963
2482
  }, i;
1964
2483
  }
1965
- t(et, "multiWaveEdgedRectangle");
1966
- async function tt(e, t, { config: { themeVariables: n } }) {
2484
+ d(xt, "multiWaveEdgedRectangle");
2485
+ async function St(e, t, { config: { themeVariables: n } }) {
1967
2486
  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, {
2487
+ t.labelStyle = r, t.useHtmlLabels || a(o()) || (t.centerLabel = !0);
2488
+ 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
2489
  fill: n.noteBkgColor,
1971
2490
  stroke: n.noteBorderColor
1972
2491
  });
1973
2492
  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;
2493
+ let y = h.rectangle(f, p, u, d, v), b = s.insert(() => y, ":first-child");
2494
+ 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) {
2495
+ return K.rect(t, e);
2496
+ }, s;
1978
2497
  }
1979
- t(tt, "note");
1980
- var nt = /* @__PURE__ */ t((e, t, n) => [
2498
+ d(St, "note");
2499
+ var Ct = /* @__PURE__ */ d((e, t, n) => [
1981
2500
  `M${e + n / 2},${t}`,
1982
2501
  `L${e + n},${t - n / 2}`,
1983
2502
  `L${e + n / 2},${t - n}`,
1984
2503
  `L${e},${t - n / 2}`,
1985
2504
  "Z"
1986
2505
  ].join(" "), "createDecisionBoxPathD");
1987
- async function rt(e, t) {
2506
+ async function wt(e, t) {
1988
2507
  let { labelStyles: n, nodeStyles: r } = _(t);
1989
2508
  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 = [
2509
+ 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
2510
  {
1992
2511
  x: o / 2,
1993
2512
  y: 0
@@ -2006,10 +2525,10 @@ async function rt(e, t) {
2006
2525
  }
2007
2526
  ], l, { cssStyles: u } = t;
2008
2527
  if (t.look === "handDrawn") {
2009
- let e = S.svg(i), n = g(t, {}), r = nt(0, 0, o), a = e.path(r, n);
2528
+ let e = C.svg(i), n = g(t, {}), r = Ct(0, 0, o), a = e.path(r, n);
2010
2529
  l = i.insert(() => a, ":first-child").attr("transform", `translate(${-o / 2 + s}, ${o / 2})`), u && l.attr("style", u);
2011
2530
  } 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) {
2531
+ return r && l.attr("style", r), N(t, l), t.calcIntersect = function(e, t) {
2013
2532
  let n = e.width, r = [
2014
2533
  {
2015
2534
  x: n / 2,
@@ -2027,7 +2546,7 @@ async function rt(e, t) {
2027
2546
  x: 0,
2028
2547
  y: -n / 2
2029
2548
  }
2030
- ], i = W.polygon(e, r, t);
2549
+ ], i = K.polygon(e, r, t);
2031
2550
  return {
2032
2551
  x: i.x - .5,
2033
2552
  y: i.y - .5
@@ -2036,70 +2555,70 @@ async function rt(e, t) {
2036
2555
  return this.calcIntersect(t, e);
2037
2556
  }, i;
2038
2557
  }
2039
- t(rt, "question");
2040
- async function it(e, t) {
2558
+ d(wt, "question");
2559
+ async function Tt(e, t) {
2041
2560
  let { labelStyles: n, nodeStyles: r } = _(t);
2042
2561
  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 = [
2562
+ 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
2563
  {
2045
- x: f + m,
2046
- y: p
2564
+ x: p + h,
2565
+ y: m
2047
2566
  },
2048
2567
  {
2049
- x: f,
2568
+ x: p,
2050
2569
  y: 0
2051
2570
  },
2052
2571
  {
2053
- x: f + m,
2054
- y: -p
2572
+ x: p + h,
2573
+ y: -m
2055
2574
  },
2056
2575
  {
2057
- x: -f,
2058
- y: -p
2576
+ x: -p,
2577
+ y: -m
2059
2578
  },
2060
2579
  {
2061
- x: -f,
2062
- y: p
2580
+ x: -p,
2581
+ y: m
2063
2582
  }
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);
2583
+ ], { cssStyles: y } = t, b = C.svg(s), x = g(t, {});
2584
+ t.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
2585
+ let S = F(v), w = b.path(S, x), T = s.insert(() => w, ":first-child");
2586
+ 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) {
2587
+ return K.polygon(t, v, e);
2069
2588
  }, s;
2070
2589
  }
2071
- t(it, "rect_left_inv_arrow");
2072
- async function at(t, r) {
2073
- let { labelStyles: i, nodeStyles: a } = _(r);
2590
+ d(Tt, "rect_left_inv_arrow");
2591
+ async function Et(n, r) {
2592
+ let { labelStyles: i, nodeStyles: o } = _(r);
2074
2593
  r.labelStyle = i;
2075
2594
  let s;
2076
2595
  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 = {
2596
+ 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
2597
  width: 0,
2079
2598
  height: 0
2080
2599
  };
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);
2600
+ if (a(l())) {
2601
+ let e = m.children[0], n = t(m);
2602
+ h = e.getBoundingClientRect(), n.attr("width", h.width), n.attr("height", h.height);
2084
2603
  }
2085
2604
  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);
2605
+ 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);
2606
+ h = x.getBoundingClientRect(), S.attr("width", h.width), S.attr("height", h.height);
2088
2607
  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;
2608
+ 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) + ")");
2609
+ 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
2610
  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);
2611
+ 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);
2612
+ 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");
2613
+ } 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);
2614
+ return N(r, k), r.intersect = function(e) {
2615
+ return K.rect(r, e);
2097
2616
  }, c;
2098
2617
  }
2099
- t(at, "rectWithTitle");
2100
- async function ot(e, t, { config: { themeVariables: n } }) {
2618
+ d(Et, "rectWithTitle");
2619
+ async function Dt(e, t, { config: { themeVariables: n } }) {
2101
2620
  let r = n?.radius ?? 5;
2102
- return Ce(e, t, {
2621
+ return Ue(e, t, {
2103
2622
  rx: r,
2104
2623
  ry: r,
2105
2624
  classes: "",
@@ -2107,54 +2626,54 @@ async function ot(e, t, { config: { themeVariables: n } }) {
2107
2626
  labelPaddingY: (t?.padding ?? 0) * 1
2108
2627
  });
2109
2628
  }
2110
- t(ot, "roundedRect");
2629
+ d(Dt, "roundedRect");
2111
2630
  var Z = 8;
2112
- async function st(e, t) {
2631
+ async function Ot(e, t) {
2113
2632
  let { labelStyles: n, nodeStyles: r } = _(t);
2114
2633
  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, {});
2634
+ 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
2635
  t.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid");
2117
2636
  let x = [
2118
2637
  {
2119
- x: m,
2120
- y: h
2638
+ x: p,
2639
+ y: m
2121
2640
  },
2122
2641
  {
2123
- x: m + d,
2124
- y: h
2642
+ x: p + d,
2643
+ y: m
2125
2644
  },
2126
2645
  {
2127
- x: m + d,
2128
- y: h + f
2646
+ x: p + d,
2647
+ y: m + f
2129
2648
  },
2130
2649
  {
2131
- x: m - Z,
2132
- y: h + f
2650
+ x: p - Z,
2651
+ y: m + f
2133
2652
  },
2134
2653
  {
2135
- x: m - Z,
2136
- y: h
2654
+ x: p - Z,
2655
+ y: m
2137
2656
  },
2138
2657
  {
2139
- x: m,
2140
- y: h
2658
+ x: p,
2659
+ y: m
2141
2660
  },
2142
2661
  {
2143
- x: m,
2144
- y: h + f
2662
+ x: p,
2663
+ y: m + f
2145
2664
  }
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);
2665
+ ], S = y.polygon(x.map((e) => [e.x, e.y]), b), w = o.insert(() => S, ":first-child");
2666
+ 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) {
2667
+ return K.rect(t, e);
2149
2668
  }, o;
2150
2669
  }
2151
- t(st, "shadedProcess");
2152
- async function ct(e, t) {
2670
+ d(Ot, "shadedProcess");
2671
+ async function kt(e, t) {
2153
2672
  let { labelStyles: n, nodeStyles: r } = _(t);
2154
2673
  t.labelStyle = n;
2155
2674
  let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
2156
2675
  (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, {});
2676
+ 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
2677
  t.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid");
2159
2678
  let x = [
2160
2679
  {
@@ -2173,15 +2692,15 @@ async function ct(e, t) {
2173
2692
  x: m + f,
2174
2693
  y: h - p / 2
2175
2694
  }
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);
2695
+ ], S = F(x), w = y.path(S, b), T = s.insert(() => w, ":first-child");
2696
+ 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) {
2697
+ return K.polygon(t, x, e);
2179
2698
  }, s;
2180
2699
  }
2181
- t(ct, "slopedRect");
2182
- async function lt(e, t) {
2700
+ d(kt, "slopedRect");
2701
+ async function At(e, t) {
2183
2702
  let n = t.padding ?? 0, r = t.look === "neo" ? 16 : n * 2, i = t.look === "neo" ? 12 : n;
2184
- return Ce(e, t, {
2703
+ return Ue(e, t, {
2185
2704
  rx: 0,
2186
2705
  ry: 0,
2187
2706
  classes: "",
@@ -2189,11 +2708,11 @@ async function lt(e, t) {
2189
2708
  labelPaddingY: i
2190
2709
  });
2191
2710
  }
2192
- t(lt, "squareRect");
2193
- async function ut(e, t) {
2711
+ d(At, "squareRect");
2712
+ async function jt(e, t) {
2194
2713
  let { labelStyles: n, nodeStyles: r } = _(t);
2195
2714
  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, {});
2715
+ 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
2716
  t.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
2198
2717
  let h = [
2199
2718
  {
@@ -2204,32 +2723,32 @@ async function ut(e, t) {
2204
2723
  x: u / 2 - d,
2205
2724
  y: -l / 2
2206
2725
  },
2207
- ...k(-u / 2 + d, 0, d, 50, 90, 270),
2726
+ ...L(-u / 2 + d, 0, d, 50, 90, 270),
2208
2727
  {
2209
2728
  x: u / 2 - d,
2210
2729
  y: l / 2
2211
2730
  },
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);
2731
+ ...L(u / 2 - d, 0, d, 50, 270, 450)
2732
+ ], v = F(h), y = p.path(v, m), b = s.insert(() => y, ":first-child");
2733
+ 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) {
2734
+ return K.polygon(t, h, e);
2216
2735
  }, s;
2217
2736
  }
2218
- t(ut, "stadium");
2219
- async function dt(e, t) {
2220
- return Ce(e, t, {
2737
+ d(jt, "stadium");
2738
+ async function Mt(e, t) {
2739
+ return Ue(e, t, {
2221
2740
  rx: t.look === "neo" ? 3 : 5,
2222
2741
  ry: t.look === "neo" ? 3 : 5,
2223
2742
  classes: "flowchart-node"
2224
2743
  });
2225
2744
  }
2226
- t(dt, "state");
2227
- function ft(e, t, { config: { themeVariables: n } }) {
2745
+ d(Mt, "state");
2746
+ function Nt(e, t, { config: { themeVariables: n } }) {
2228
2747
  let { labelStyles: r, nodeStyles: i } = _(t);
2229
2748
  t.labelStyle = r;
2230
2749
  let { cssStyles: a } = t, { lineColor: o, stateBorder: s, nodeBorder: c, nodeShadow: l } = n;
2231
2750
  (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, {});
2751
+ let u = e.insert("g").attr("class", "node default").attr("id", t.domId ?? t.id), d = C.svg(u), f = g(t, {});
2233
2752
  t.look !== "handDrawn" && (f.roughness = 0, f.fillStyle = "solid");
2234
2753
  let p = d.circle(0, 0, t.width, {
2235
2754
  ...f,
@@ -2246,33 +2765,33 @@ function ft(e, t, { config: { themeVariables: n } }) {
2246
2765
  let t = e.node()?.ownerSVGElement?.id ?? "", n = t ? `${t}-drop-shadow-small` : "drop-shadow-small";
2247
2766
  y.attr("style", `filter:url(#${n})`);
2248
2767
  }
2249
- return T(t, y), t.intersect = function(e) {
2250
- return W.circle(t, (t.width ?? 0) / 2, e);
2768
+ return N(t, y), t.intersect = function(e) {
2769
+ return K.circle(t, (t.width ?? 0) / 2, e);
2251
2770
  }, u;
2252
2771
  }
2253
- t(ft, "stateEnd");
2254
- function pt(e, t, { config: { themeVariables: n } }) {
2772
+ d(Nt, "stateEnd");
2773
+ function Pt(e, t, { config: { themeVariables: n } }) {
2255
2774
  let { lineColor: r, nodeShadow: i } = n;
2256
2775
  (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
2776
  let a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), o;
2258
2777
  if (t.look === "handDrawn") {
2259
- let e = S.svg(a).circle(0, 0, t.width, v(r));
2778
+ let e = C.svg(a).circle(0, 0, t.width, v(r));
2260
2779
  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
2780
  } 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
2781
  if (t.width < 25 && i && t.look !== "handDrawn") {
2263
2782
  let t = e.node()?.ownerSVGElement?.id ?? "", n = t ? `${t}-drop-shadow-small` : "drop-shadow-small";
2264
2783
  o.attr("style", `filter:url(#${n})`);
2265
2784
  }
2266
- return T(t, o), t.intersect = function(e) {
2267
- return W.circle(t, (t.width ?? 7) / 2, e);
2785
+ return N(t, o), t.intersect = function(e) {
2786
+ return K.circle(t, (t.width ?? 7) / 2, e);
2268
2787
  }, a;
2269
2788
  }
2270
- t(pt, "stateStart");
2271
- var mt = 8;
2272
- async function ht(e, t) {
2789
+ d(Pt, "stateStart");
2790
+ var Ft = 8;
2791
+ async function It(e, t) {
2273
2792
  let { labelStyles: n, nodeStyles: r } = _(t);
2274
2793
  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 = [
2794
+ 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
2795
  {
2277
2796
  x: 0,
2278
2797
  y: 0
@@ -2315,26 +2834,26 @@ async function ht(e, t) {
2315
2834
  }
2316
2835
  ];
2317
2836
  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);
2837
+ 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
2838
  s.insert(() => i, ":first-child"), s.insert(() => a, ":first-child");
2320
2839
  let o = s.insert(() => r, ":first-child"), { cssStyles: c } = t;
2321
- o.attr("class", "basic label-container").attr("style", p(c)), T(t, o);
2840
+ o.attr("class", "basic label-container").attr("style", h(c)), N(t, o);
2322
2841
  } else {
2323
2842
  let e = q(s, d, f, v);
2324
- r && e.attr("style", r), T(t, e);
2843
+ r && e.attr("style", r), N(t, e);
2325
2844
  }
2326
2845
  return t.intersect = function(e) {
2327
- return W.polygon(t, v, e);
2846
+ return K.polygon(t, v, e);
2328
2847
  }, s;
2329
2848
  }
2330
- t(ht, "subroutine");
2331
- var gt = .2;
2332
- async function _t(e, t) {
2849
+ d(It, "subroutine");
2850
+ var Lt = .2;
2851
+ async function Rt(e, t) {
2333
2852
  let { labelStyles: n, nodeStyles: r } = _(t);
2334
2853
  t.labelStyle = n;
2335
2854
  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 = [
2855
+ (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));
2856
+ 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
2857
  {
2339
2858
  x: m - u / 2,
2340
2859
  y: h
@@ -2351,7 +2870,7 @@ async function _t(e, t) {
2351
2870
  x: m - u / 2,
2352
2871
  y: h + p
2353
2872
  }
2354
- ], w = [
2873
+ ], S = [
2355
2874
  {
2356
2875
  x: m + f - u / 2,
2357
2876
  y: h + p
@@ -2366,26 +2885,26 @@ async function _t(e, t) {
2366
2885
  }
2367
2886
  ];
2368
2887
  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, {
2888
+ let w = F(x), T = y.path(w, b), E = F(S), D = y.path(E, {
2370
2889
  ...b,
2371
2890
  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);
2891
+ }), O = s.insert(() => D, ":first-child");
2892
+ 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) {
2893
+ return K.polygon(t, x, e);
2375
2894
  }, s;
2376
2895
  }
2377
- t(_t, "taggedRect");
2378
- async function vt(e, t) {
2896
+ d(Rt, "taggedRect");
2897
+ async function zt(e, t) {
2379
2898
  let { labelStyles: n, nodeStyles: r } = _(t);
2380
2899
  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, {});
2900
+ 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
2901
  t.look !== "handDrawn" && (h.roughness = 0, h.fillStyle = "solid");
2383
2902
  let v = [
2384
2903
  {
2385
2904
  x: -s / 2 - s / 2 * .1,
2386
2905
  y: f / 2
2387
2906
  },
2388
- ...O(-s / 2 - s / 2 * .1, f / 2, s / 2 + s / 2 * .1, f / 2, l, .8),
2907
+ ...I(-s / 2 - s / 2 * .1, f / 2, s / 2 + s / 2 * .1, f / 2, l, .8),
2389
2908
  {
2390
2909
  x: s / 2 + s / 2 * .1,
2391
2910
  y: -f / 2
@@ -2407,71 +2926,69 @@ async function vt(e, t) {
2407
2926
  x: y + s,
2408
2927
  y: (b + c) * .9
2409
2928
  },
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, {
2929
+ ...I(y + s, (b + c) * 1.25, y + s - u, (b + c) * 1.3, -c * .02, .5)
2930
+ ], S = F(v), w = m.path(S, h), T = F(x), E = m.path(T, {
2412
2931
  ...h,
2413
2932
  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);
2933
+ }), D = i.insert(() => E, ":first-child");
2934
+ 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) {
2935
+ return K.polygon(t, v, e);
2417
2936
  }, i;
2418
2937
  }
2419
- t(vt, "taggedWaveEdgedRectangle");
2420
- async function yt(e, t) {
2938
+ d(zt, "taggedWaveEdgedRectangle");
2939
+ async function Bt(e, t) {
2421
2940
  let { labelStyles: n, nodeStyles: r } = _(t);
2422
2941
  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);
2942
+ 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");
2943
+ 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) {
2944
+ return K.rect(t, e);
2426
2945
  }, i;
2427
2946
  }
2428
- t(yt, "text");
2429
- var bt = /* @__PURE__ */ t((e, t, n, r, i, a) => `M${e},${t}
2947
+ d(Bt, "text");
2948
+ var Vt = /* @__PURE__ */ d((e, t, n, r, i, a) => `M${e},${t}
2430
2949
  a${i},${a} 0,0,1 0,${-r}
2431
2950
  l${n},0
2432
2951
  a${i},${a} 0,0,1 0,${r}
2433
2952
  M${n},${-r}
2434
2953
  a${i},${a} 0,0,0 0,${r}
2435
- l${-n},0`, "createCylinderPathD"), xt = /* @__PURE__ */ t((e, t, n, r, i, a) => [
2954
+ l${-n},0`, "createCylinderPathD"), Ht = /* @__PURE__ */ d((e, t, n, r, i, a) => [
2436
2955
  `M${e},${t}`,
2437
2956
  `M${e + n},${t}`,
2438
2957
  `a${i},${a} 0,0,0 0,${-r}`,
2439
2958
  `l${-n},0`,
2440
2959
  `a${i},${a} 0,0,0 0,${r}`,
2441
2960
  `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) {
2961
+ ].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;
2962
+ async function Kt(e, t) {
2444
2963
  let { labelStyles: n, nodeStyles: r } = _(t);
2445
2964
  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);
2965
+ let i = t.padding ?? 0, a = t.look === "neo" ? 12 : i / 2, o = t.height ?? 0;
2966
+ if (t.height && (t.height -= a, t.height < Wt && (t.height = Wt)), t.width) {
2967
+ let e = o / 2 / (2.5 + o / 50);
2968
+ t.width = t.width - a - e * 3, t.width < Gt && (t.width = Gt);
2452
2969
  }
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;
2970
+ 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
2971
  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);
2972
+ 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" }));
2973
+ v = s.insert(() => a, ":first-child"), v = s.insert(() => i, ":first-child"), v.attr("class", "basic label-container"), m && v.attr("style", m);
2457
2974
  } 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);
2975
+ let e = Vt(0, 0, p, u, f, d);
2976
+ 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
2977
  }
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;
2978
+ 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) {
2979
+ let n = K.rect(t, e), r = n.y - (t.y ?? 0);
2980
+ 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)) {
2981
+ let i = f * f * (1 - r * r / (d * d));
2982
+ i != 0 && (i = Math.sqrt(Math.abs(i))), i = f - i, e.x - (t.x ?? 0) > 0 && (i = -i), n.x += i;
2466
2983
  }
2467
2984
  return n;
2468
- }, o;
2985
+ }, s;
2469
2986
  }
2470
- t(Tt, "tiltedCylinder");
2471
- async function Et(e, t) {
2987
+ d(Kt, "tiltedCylinder");
2988
+ async function qt(e, t) {
2472
2989
  let { labelStyles: n, nodeStyles: r } = _(t);
2473
2990
  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 = [
2991
+ 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
2992
  {
2476
2993
  x: -3 * l / 6,
2477
2994
  y: 0
@@ -2490,20 +3007,20 @@ async function Et(e, t) {
2490
3007
  }
2491
3008
  ], f, { cssStyles: p } = t;
2492
3009
  if (t.look === "handDrawn") {
2493
- let e = S.svg(s), n = g(t, {}), r = D(d), i = e.path(r, n);
3010
+ let e = C.svg(s), n = g(t, {}), r = F(d), i = e.path(r, n);
2494
3011
  f = s.insert(() => i, ":first-child").attr("transform", `translate(${-u / 2}, ${l / 2})`), p && f.attr("style", p);
2495
3012
  } 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);
3013
+ return r && f.attr("style", r), t.width = u, t.height = l, N(t, f), t.intersect = function(e) {
3014
+ return K.polygon(t, d, e);
2498
3015
  }, s;
2499
3016
  }
2500
- t(Et, "trapezoid");
2501
- async function Dt(e, t) {
3017
+ d(qt, "trapezoid");
3018
+ async function Jt(e, t) {
2502
3019
  let { labelStyles: n, nodeStyles: r } = _(t);
2503
3020
  t.labelStyle = n;
2504
3021
  let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
2505
3022
  (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, {});
3023
+ 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
3024
  t.look !== "handDrawn" && (p.roughness = 0, p.fillStyle = "solid");
2508
3025
  let m = [
2509
3026
  {
@@ -2530,19 +3047,19 @@ async function Dt(e, t) {
2530
3047
  x: -l / 2,
2531
3048
  y: -u / 2 * .6
2532
3049
  }
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);
3050
+ ], h = F(m), v = f.path(h, p), y = s.insert(() => v, ":first-child");
3051
+ 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) {
3052
+ return K.polygon(t, m, e);
2536
3053
  }, s;
2537
3054
  }
2538
- t(Dt, "trapezoidalPentagon");
2539
- var Ot = 10, kt = 10;
2540
- async function At(t, n) {
3055
+ d(Jt, "trapezoidalPentagon");
3056
+ var Yt = 10, Xt = 10;
3057
+ async function Zt(t, n) {
2541
3058
  let { labelStyles: r, nodeStyles: i } = _(n);
2542
3059
  n.labelStyle = r;
2543
3060
  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 = [
3061
+ (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));
3062
+ 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
3063
  {
2547
3064
  x: 0,
2548
3065
  y: 0
@@ -2555,27 +3072,27 @@ async function At(t, n) {
2555
3072
  x: h / 2,
2556
3073
  y: -m
2557
3074
  }
2558
- ], { cssStyles: y } = n, b = S.svg(s), x = g(n, {});
3075
+ ], { cssStyles: y } = n, b = C.svg(s), x = g(n, {});
2559
3076
  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);
3077
+ 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");
3078
+ 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) {
3079
+ return e.info("Triangle intersect", n, v, t), K.polygon(n, v, t);
2563
3080
  }, s;
2564
3081
  }
2565
- t(At, "triangle");
2566
- async function jt(e, t) {
3082
+ d(Zt, "triangle");
3083
+ async function Qt(e, t) {
2567
3084
  let { labelStyles: n, nodeStyles: r } = _(t);
2568
3085
  t.labelStyle = n;
2569
3086
  let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i, s = !0;
2570
3087
  (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, {});
3088
+ 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
3089
  t.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
2573
- let w = [
3090
+ let S = [
2574
3091
  {
2575
3092
  x: -d / 2 - y,
2576
3093
  y: m / 2
2577
3094
  },
2578
- ...O(-d / 2 - y, m / 2, d / 2 + y, m / 2, p, .8),
3095
+ ...I(-d / 2 - y, m / 2, d / 2 + y, m / 2, p, .8),
2579
3096
  {
2580
3097
  x: d / 2 + y,
2581
3098
  y: -m / 2
@@ -2584,13 +3101,13 @@ async function jt(e, t) {
2584
3101
  x: -d / 2 - y,
2585
3102
  y: -m / 2
2586
3103
  }
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);
3104
+ ], w = F(S), T = b.path(w, x), E = c.insert(() => T, ":first-child");
3105
+ 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) {
3106
+ return K.polygon(t, S, e);
2590
3107
  }, c;
2591
3108
  }
2592
- t(jt, "waveEdgedRectangle");
2593
- async function Mt(e, t) {
3109
+ d(Qt, "waveEdgedRectangle");
3110
+ async function $t(e, t) {
2594
3111
  let { labelStyles: n, nodeStyles: r } = _(t);
2595
3112
  t.labelStyle = n;
2596
3113
  let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 20 : i;
@@ -2599,32 +3116,32 @@ async function Mt(e, t) {
2599
3116
  let e = Math.min(t.height * .2, t.height / 4);
2600
3117
  t.height = Math.ceil(t.height - o - 20 / 9 * e), t.width -= a * 2;
2601
3118
  }
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, {});
3119
+ 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
3120
  t.look !== "handDrawn" && (h.roughness = 0, h.fillStyle = "solid");
2604
3121
  let v = [
2605
3122
  {
2606
3123
  x: -l / 2,
2607
3124
  y: f / 2
2608
3125
  },
2609
- ...O(-l / 2, f / 2, l / 2, f / 2, d, 1),
3126
+ ...I(-l / 2, f / 2, l / 2, f / 2, d, 1),
2610
3127
  {
2611
3128
  x: l / 2,
2612
3129
  y: -f / 2
2613
3130
  },
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);
3131
+ ...I(l / 2, -f / 2, -l / 2, -f / 2, d, -1)
3132
+ ], y = F(v), b = m.path(y, h), x = s.insert(() => b, ":first-child");
3133
+ 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) {
3134
+ return K.polygon(t, v, e);
2618
3135
  }, s;
2619
3136
  }
2620
- t(Mt, "waveRectangle");
3137
+ d($t, "waveRectangle");
2621
3138
  var Q = 10;
2622
- async function Nt(e, t) {
3139
+ async function en(e, t) {
2623
3140
  let { labelStyles: n, nodeStyles: r } = _(t);
2624
3141
  t.labelStyle = n;
2625
3142
  let i = t.look === "neo" ? 16 : t.padding ?? 0, a = t.look === "neo" ? 12 : t.padding ?? 0;
2626
3143
  (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 = [
3144
+ 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
3145
  {
2629
3146
  x: p - Q,
2630
3147
  y: m - Q
@@ -2645,155 +3162,157 @@ async function Nt(e, t) {
2645
3162
  M${p - Q},${m} L${p + d},${m}
2646
3163
  M${p},${m - Q} L${p},${m + f}`;
2647
3164
  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);
3165
+ let S = v.path(x, y), w = o.insert(() => S, ":first-child");
3166
+ 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) {
3167
+ return K.polygon(t, b, e);
2651
3168
  }, o;
2652
3169
  }
2653
- t(Nt, "windowPane");
2654
- var Pt = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), Ft = /* @__PURE__ */ new Set([
3170
+ d(en, "windowPane");
3171
+ var tn = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), nn = /* @__PURE__ */ new Set([
2655
3172
  "redux",
2656
3173
  "redux-dark",
2657
3174
  "redux-color",
2658
3175
  "redux-dark-color"
2659
3176
  ]);
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",
3177
+ async function rn(e, n) {
3178
+ let r = n;
3179
+ r.alias && (n.label = r.alias);
3180
+ let { theme: i, themeVariables: a } = o(), { rowEven: s, rowOdd: l, nodeBorder: u, borderColorArray: d } = a;
3181
+ if (n.look === "handDrawn") {
3182
+ let { themeVariables: t } = o(), { background: r } = t;
3183
+ await rn(e, {
3184
+ ...n,
3185
+ id: n.id + "-background",
3186
+ domId: (n.domId || n.id) + "-background",
2670
3187
  look: "default",
2671
3188
  cssStyles: ["stroke: none", `fill: ${r}`]
2672
3189
  });
2673
3190
  }
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 = {
3191
+ let f = o();
3192
+ n.useHtmlLabels = f.htmlLabels;
3193
+ let p = f.er?.diagramPadding ?? 10, h = f.er?.entityPadding ?? 6, { cssStyles: v } = n, { labelStyles: y, nodeStyles: b } = _(n);
3194
+ if (r.attributes.length === 0 && n.label) {
3195
+ let t = {
2679
3196
  rx: 0,
2680
3197
  ry: 0,
2681
- labelPaddingX: m,
2682
- labelPaddingY: m * 1.5,
3198
+ labelPaddingX: p,
3199
+ labelPaddingY: p * 1.5,
2683
3200
  classes: ""
2684
3201
  };
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)) {
3202
+ m(n.label, f) + t.labelPaddingX * 2 < f.er.minEntityWidth && (n.width = f.er.minEntityWidth);
3203
+ let a = await Ue(e, n, t);
3204
+ if (i != null && tn.has(i)) {
2688
3205
  let e = r.colorIndex ?? 0;
2689
3206
  a.attr("data-color-id", `color-${e % d.length}`);
2690
3207
  }
2691
- if (!c(p.htmlLabels)) {
3208
+ if (!c(f.htmlLabels)) {
2692
3209
  let e = a.select("text"), t = e.node()?.getBBox();
2693
3210
  e.attr("transform", `translate(${-t.width / 2}, 0)`);
2694
3211
  }
2695
3212
  return a;
2696
3213
  }
2697
- p.htmlLabels || (m *= 1.25, h *= 1.25);
2698
- let x = E(t);
3214
+ f.htmlLabels || (p *= 1.25, h *= 1.25);
3215
+ let x = P(n);
2699
3216
  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);
3217
+ 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
3218
  w.height += h;
2702
- let D = 0, O = [], k = [], A = 0, j = 0, M = 0, N = 0, P = !0, F = !0;
3219
+ let T = 0, E = [], D = [], O = 0, k = 0, A = 0, j = 0, M = !0, F = !0;
2703
3220
  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);
3221
+ let t = await an(S, e.type, f, 0, T, ["attribute-type"], y);
3222
+ O = Math.max(O, t.width + p);
3223
+ let n = await an(S, e.name, f, 0, T, ["attribute-name"], y);
3224
+ k = Math.max(k, n.width + p);
3225
+ let r = await an(S, e.keys.join(), f, 0, T, ["attribute-keys"], y);
3226
+ A = Math.max(A, r.width + p);
3227
+ let i = await an(S, e.comment, f, 0, T, ["attribute-comment"], y);
3228
+ j = Math.max(j, i.width + p);
2712
3229
  let a = Math.max(t.height, n.height, r.height, i.height) + h;
2713
- k.push({
2714
- yOffset: D,
3230
+ D.push({
3231
+ yOffset: T,
2715
3232
  rowHeight: a
2716
- }), D += a;
3233
+ }), T += a;
2717
3234
  }
2718
3235
  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);
3236
+ A <= p && (M = !1, A = 0, I--), j <= p && (F = !1, j = 0, I--);
3237
+ let L = S.node().getBBox();
3238
+ if (w.width + p * 2 - (O + k + A + j) > 0) {
3239
+ let e = w.width + p * 2 - (O + k + A + j);
3240
+ O += e / I, k += e / I, A > 0 && (A += e / I), j > 0 && (j += e / I);
2724
3241
  }
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;
3242
+ let ee = O + k + A + j, R = C.svg(S), z = g(n, {});
3243
+ n.look !== "handDrawn" && (z.roughness = 0, z.fillStyle = "solid");
3244
+ let te = 0;
3245
+ D.length > 0 && (te = D.reduce((e, t) => e + (t?.rowHeight ?? 0), 0));
3246
+ 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;
3247
+ if (S.selectAll("g:not(:first-child)").each((e, n, r) => {
3248
+ let i = t(r[n]), a = i.attr("transform"), o = 0, s = 0;
2732
3249
  if (a) {
2733
3250
  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));
3251
+ 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
3252
  }
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)) {
3253
+ i.attr("transform", `translate(${V + p / 2 + o}, ${s + H + w.height + h / 2})`);
3254
+ }), S.select(".name").attr("transform", "translate(" + -w.width / 2 + ", " + (H + h / 2) + ")"), i != null && tn.has(i)) {
2738
3255
  let e = r.colorIndex ?? 0;
2739
- C.attr("data-color-id", `color-${e % d.length}`);
3256
+ S.attr("data-color-id", `color-${e % d.length}`);
2740
3257
  }
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,
3258
+ let re = R.rectangle(V, H, B, ne, z), ie = S.insert(() => re, ":first-child").attr("class", "outer-path").attr("style", v.join(""));
3259
+ E.push(0);
3260
+ for (let [e, t] of D.entries()) {
3261
+ let n = (e + 1) % 2 == 0 && t.yOffset !== 0, r = R.rectangle(V, w.height + H + t?.yOffset, B, t?.rowHeight, {
3262
+ ...z,
3263
+ fill: n ? s : l,
2747
3264
  stroke: u
2748
3265
  });
2749
- C.insert(() => r, "g.label").attr("style", v.join("")).attr("class", `row-rect-${n ? "even" : "odd"}`);
3266
+ S.insert(() => r, "g.label").attr("style", v.join("")).attr("class", `row-rect-${n ? "even" : "odd"}`);
2750
3267
  }
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");
3268
+ 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);
3269
+ 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) {
3270
+ let e = O + k + V;
3271
+ 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
3272
  }
2756
3273
  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");
3274
+ let e = O + k + A + V;
3275
+ 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
3276
  }
2760
- for (let e of O) {
3277
+ for (let e of E) {
2761
3278
  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");
3279
+ 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
3280
  }
2764
- if (T(t, ie), b && t.look !== "handDrawn") if (i != null && Ft.has(i)) C.selectAll("path").attr("style", b);
2765
- else {
2766
- 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);
3281
+ if (N(n, ie), b && n.look !== "handDrawn") {
3282
+ if (i != null && nn.has(i)) S.selectAll("path").attr("style", b);
3283
+ else {
3284
+ let e = b.split(";")?.filter((e) => e.includes("stroke"))?.map((e) => `${e}`).join("; ");
3285
+ S.selectAll("path").attr("style", e ?? ""), S.selectAll(".row-rect-even path").attr("style", b);
3286
+ }
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 + 10;
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 };