@loopstack/loopstack-studio 0.25.0 → 0.25.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. package/dist/components/ai-elements/message.js +2 -2
  2. package/dist/components/ai-elements/reasoning.js +9 -9
  3. package/dist/loopstack-studio.css +1 -1
  4. package/dist/node_modules/@chevrotain/gast/lib/src/helpers.js +2 -5
  5. package/dist/node_modules/@chevrotain/gast/lib/src/model.js +69 -72
  6. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{architecture-7HQA4BMR.js → architecture-YZFGNWBL.js} +2 -2
  7. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-TQ3KTPDO.js → chunk-2KRD3SAO.js} +1 -1
  8. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-4F5CHEZ2.js → chunk-67CJDMHE.js} +1 -1
  9. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-UMXZTB3W.js → chunk-7N4EOEYR.js} +5 -2
  10. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-PL6DKKU2.js → chunk-AA7GKIK3.js} +1 -1
  11. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-CIAEETIT.js +23 -0
  12. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-SJTYNZTY.js → chunk-FOC6F5B3.js} +1 -1
  13. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-K5T4RW27.js +1197 -0
  14. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-FRFDVMJY.js → chunk-KGLVRYIC.js} +1 -1
  15. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-B2363JML.js → chunk-LIHQZDEY.js} +1 -1
  16. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ORNJ4GCN.js +29 -0
  17. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{gitGraph-G5XIXVHT.js → gitGraph-7Q5UKJZL.js} +2 -2
  18. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-OMHHGYJF.js +3 -0
  19. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-4T2RLAQJ.js +3 -0
  20. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-ZZUOXDRM.js +3 -0
  21. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-PYXPWWZC.js +3 -0
  22. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treeView-SZITEDCU.js +3 -0
  23. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-W4RFUUIX.js +3 -0
  24. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/wardley-RL74JXVD.js +3 -0
  25. package/dist/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js +27 -17
  26. package/dist/node_modules/@upsetjs/venn.js/build/venn.esm.js +903 -0
  27. package/dist/node_modules/@xyflow/react/dist/esm/index.js +76 -75
  28. package/dist/node_modules/@xyflow/system/dist/esm/index.js +30 -28
  29. package/dist/node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js +31 -40
  30. package/dist/node_modules/chevrotain/lib/src/parse/errors_public.js +23 -26
  31. package/dist/node_modules/chevrotain/lib/src/parse/exceptions_public.js +12 -13
  32. package/dist/node_modules/chevrotain/lib/src/parse/grammar/checks.js +181 -205
  33. package/dist/node_modules/chevrotain/lib/src/parse/grammar/first.js +11 -13
  34. package/dist/node_modules/chevrotain/lib/src/parse/grammar/follow.js +12 -13
  35. package/dist/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js +8 -9
  36. package/dist/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js +176 -183
  37. package/dist/node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js +17 -19
  38. package/dist/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js +153 -160
  39. package/dist/node_modules/chevrotain/lib/src/parse/grammar/resolver.js +10 -12
  40. package/dist/node_modules/chevrotain/lib/src/parse/grammar/rest.js +36 -38
  41. package/dist/node_modules/chevrotain/lib/src/parse/parser/parser.js +37 -45
  42. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js +12 -14
  43. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js +80 -86
  44. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js +6 -2
  45. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js +39 -41
  46. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js +7 -8
  47. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js +69 -70
  48. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js +215 -205
  49. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js +76 -76
  50. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js +29 -39
  51. package/dist/node_modules/chevrotain/lib/src/scan/lexer.js +252 -274
  52. package/dist/node_modules/chevrotain/lib/src/scan/lexer_public.js +93 -106
  53. package/dist/node_modules/chevrotain/lib/src/scan/reg_exp.js +61 -61
  54. package/dist/node_modules/chevrotain/lib/src/scan/tokens.js +31 -41
  55. package/dist/node_modules/chevrotain/lib/src/scan/tokens_public.js +15 -18
  56. package/dist/node_modules/chevrotain-allstar/lib/all-star-lookahead.js +226 -226
  57. package/dist/node_modules/chevrotain-allstar/lib/atn.js +17 -17
  58. package/dist/node_modules/cytoscape/dist/cytoscape.esm.js +17 -14
  59. package/dist/node_modules/dagre-d3-es/src/dagre/greedy-fas.js +19 -19
  60. package/dist/node_modules/dagre-d3-es/src/dagre/layout.js +48 -48
  61. package/dist/node_modules/dagre-d3-es/src/dagre/nesting-graph.js +9 -9
  62. package/dist/node_modules/dagre-d3-es/src/dagre/order/cross-count.js +3 -3
  63. package/dist/node_modules/dagre-d3-es/src/dagre/order/index.js +11 -11
  64. package/dist/node_modules/dagre-d3-es/src/dagre/order/init-order.js +4 -4
  65. package/dist/node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js +4 -4
  66. package/dist/node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js +8 -8
  67. package/dist/node_modules/dagre-d3-es/src/dagre/order/sort.js +5 -5
  68. package/dist/node_modules/dagre-d3-es/src/dagre/position/bk.js +61 -61
  69. package/dist/node_modules/dagre-d3-es/src/dagre/position/index.js +1 -1
  70. package/dist/node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js +25 -25
  71. package/dist/node_modules/dagre-d3-es/src/dagre/rank/util.js +8 -8
  72. package/dist/node_modules/dagre-d3-es/src/dagre/util.js +48 -48
  73. package/dist/node_modules/dagre-d3-es/src/graphlib/graph.js +109 -109
  74. package/dist/node_modules/dagre-d3-es/src/graphlib/json.js +17 -17
  75. package/dist/node_modules/dompurify/dist/purify.es.js +67 -67
  76. package/dist/node_modules/katex/dist/katex.js +1256 -1209
  77. package/dist/node_modules/khroma/dist/methods/transparentize.js +3 -0
  78. package/dist/node_modules/lodash-es/_baseClone.js +2 -2
  79. package/dist/node_modules/lodash-es/_baseMatchesProperty.js +6 -6
  80. package/dist/node_modules/lodash-es/_baseToString.js +1 -1
  81. package/dist/node_modules/lodash-es/_baseUniq.js +1 -1
  82. package/dist/node_modules/lodash-es/_createSet.js +1 -1
  83. package/dist/node_modules/lodash-es/_getAllKeys.js +2 -2
  84. package/dist/node_modules/lodash-es/_getAllKeysIn.js +1 -1
  85. package/dist/node_modules/lodash-es/findIndex.js +2 -2
  86. package/dist/node_modules/lodash-es/flatMap.js +1 -1
  87. package/dist/node_modules/lodash-es/forEach.js +1 -1
  88. package/dist/node_modules/lodash-es/max.js +1 -1
  89. package/dist/node_modules/lodash-es/min.js +1 -1
  90. package/dist/node_modules/lodash-es/minBy.js +1 -1
  91. package/dist/node_modules/lodash-es/reduce.js +1 -1
  92. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-Q4EWVU46.js +691 -0
  93. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{blockDiagram-VD42YOAC.js → blockDiagram-DXYQGD6D.js} +183 -157
  94. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{c4Diagram-YG6GDRKO.js → c4Diagram-AHTNJAMY.js} +65 -63
  95. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-336JU56O.js +47 -0
  96. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-EXTU4WIE.js → chunk-426QAEUC.js} +1 -1
  97. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-B4BG7PRW.js → chunk-4TB4RGXK.js} +533 -393
  98. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5FUZZQ4R.js +3638 -0
  99. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-S3R3BYOJ.js → chunk-5PVQY5BW.js} +1 -1
  100. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-HN2XXSSU.js → chunk-BSJP7CBP.js} +20 -14
  101. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-QN33PNHL.js → chunk-EDXVE4YY.js} +1 -1
  102. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ENJZ2VHE.js +568 -0
  103. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ICPOFSXX.js +2320 -0
  104. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-DI55MBZ5.js → chunk-OYMX7WX6.js} +35 -21
  105. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-U2HBQHQK.js +272 -0
  106. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-ATLVNIR6.js → chunk-X2U36JSP.js} +1 -1
  107. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-MI3HLSF2.js → chunk-XPW4576I.js} +11 -7
  108. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-YZCP3GAM.js +60 -0
  109. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ZZ45TVLE.js +30 -0
  110. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{classDiagram-2ON5EDUG.js → classDiagram-6PBFFD2Q.js} +12 -11
  111. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{classDiagram-v2-WZHVMYZB.js → classDiagram-v2-HSJHXN6E.js} +12 -11
  112. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{dagre-6UL2VRFP.js → dagre-KV5264BT.js} +8 -8
  113. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-5BDNPKRD.js +99 -0
  114. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{diagram-PSM6KHXK.js → diagram-G4DWMVQ6.js} +20 -23
  115. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-MMDJMWI5.js +211 -0
  116. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{diagram-S2PKOQOG.js → diagram-TYMM5635.js} +4 -4
  117. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{erDiagram-Q2GNP2WA.js → erDiagram-SMLLAGMA.js} +486 -386
  118. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{flowDiagram-NV44I4VS.js → flowDiagram-DWJPFMVM.js} +915 -898
  119. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{ganttDiagram-JELNMOA3.js → ganttDiagram-T4ZO3ILL.js} +59 -29
  120. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-UUTBAWPF.js +728 -0
  121. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-42DDH7IO.js +17 -0
  122. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ishikawaDiagram-UXIWVN3A.js +714 -0
  123. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{journeyDiagram-XKPGCS4Q.js → journeyDiagram-VCZTEJTY.js} +32 -32
  124. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{kanban-definition-3W4ZIXB7.js → kanban-definition-6JOO6SKY.js} +13 -9
  125. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{mindmap-definition-VGOIOE7T.js → mindmap-definition-QFDTVHPH.js} +105 -59
  126. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-DEJITSTG.js +117 -0
  127. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{quadrantDiagram-AYHSOK5B.js → quadrantDiagram-34T5L4WZ.js} +1 -1
  128. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{requirementDiagram-UZGBJVZJ.js → requirementDiagram-MS252O5E.js} +49 -19
  129. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{sankeyDiagram-TZEHDZUN.js → sankeyDiagram-XADWPNL6.js} +1 -1
  130. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-FGHM5R23.js +4155 -0
  131. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{stateDiagram-FKZM4ZOC.js → stateDiagram-FHFEXIEX.js} +12 -12
  132. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{stateDiagram-v2-4FDKWEC3.js → stateDiagram-v2-QKLJ7IA2.js} +11 -11
  133. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-GMOUNBTQ.js +1071 -0
  134. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-DHZGUBPP.js +959 -0
  135. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-NUSXRM2D.js +574 -0
  136. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{xychartDiagram-PRI3JC2R.js → xychartDiagram-5P7HB3ND.js} +38 -35
  137. package/dist/node_modules/mermaid/dist/mermaid.core.js +235 -192
  138. package/dist/node_modules/nanoid/url-alphabet/index.js +1 -1
  139. package/dist/node_modules/remend/dist/index.js +333 -264
  140. package/dist/node_modules/streamdown/dist/chunk-BO2N2NFS.js +2498 -0
  141. package/dist/node_modules/streamdown/dist/highlighted-body-OFNGDK62.js +35 -0
  142. package/dist/node_modules/streamdown/dist/index.js +1 -1
  143. package/dist/node_modules/streamdown/dist/mermaid-GHXKKRXX.js +3 -0
  144. package/dist/node_modules/streamdown/node_modules/marked/lib/marked.esm.js +672 -667
  145. package/dist/pages/DashboardPage.js +3 -3
  146. package/package.json +2 -2
  147. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-TCCFYFTB.js +0 -787
  148. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-VBDWY6EO.js +0 -3
  149. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-DYOGHKS2.js +0 -3
  150. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-VRWISCQL.js +0 -3
  151. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-ZZBFDIW7.js +0 -3
  152. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-GDKQZRPO.js +0 -3
  153. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/context_assist.js +0 -16
  154. package/dist/node_modules/lodash-es/_arrayAggregator.js +0 -9
  155. package/dist/node_modules/lodash-es/_arrayEvery.js +0 -6
  156. package/dist/node_modules/lodash-es/_baseAggregator.js +0 -8
  157. package/dist/node_modules/lodash-es/_baseDifference.js +0 -22
  158. package/dist/node_modules/lodash-es/_baseEvery.js +0 -9
  159. package/dist/node_modules/lodash-es/_baseIsRegExp.js +0 -8
  160. package/dist/node_modules/lodash-es/_baseSlice.js +0 -8
  161. package/dist/node_modules/lodash-es/_baseSome.js +0 -9
  162. package/dist/node_modules/lodash-es/_createAggregator.js +0 -12
  163. package/dist/node_modules/lodash-es/assign.js +0 -14
  164. package/dist/node_modules/lodash-es/compact.js +0 -9
  165. package/dist/node_modules/lodash-es/difference.js +0 -8
  166. package/dist/node_modules/lodash-es/drop.js +0 -8
  167. package/dist/node_modules/lodash-es/dropRight.js +0 -8
  168. package/dist/node_modules/lodash-es/every.js +0 -11
  169. package/dist/node_modules/lodash-es/groupBy.js +0 -6
  170. package/dist/node_modules/lodash-es/head.js +0 -5
  171. package/dist/node_modules/lodash-es/includes.js +0 -13
  172. package/dist/node_modules/lodash-es/indexOf.js +0 -11
  173. package/dist/node_modules/lodash-es/isRegExp.js +0 -5
  174. package/dist/node_modules/lodash-es/negate.js +0 -16
  175. package/dist/node_modules/lodash-es/pickBy.js +0 -15
  176. package/dist/node_modules/lodash-es/reject.js +0 -10
  177. package/dist/node_modules/lodash-es/some.js +0 -11
  178. package/dist/node_modules/lodash-es/uniq.js +0 -6
  179. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-VXUJARFQ.js +0 -673
  180. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ABZYJK2D.js +0 -1547
  181. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-CVBHYZKI.js +0 -10
  182. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-DR5Q36YT.js +0 -135
  183. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JA3XYJ7Z.js +0 -247
  184. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JZLCHNYA.js +0 -3516
  185. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-N4CR4FBY.js +0 -39
  186. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QXUST7PY.js +0 -497
  187. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-TZMSLE5B.js +0 -55
  188. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-QEK2KX5R.js +0 -211
  189. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-V2S2FVAM.js +0 -621
  190. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-HS3SLOUP.js +0 -18
  191. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-ADFJNKIX.js +0 -117
  192. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WL72ISMW.js +0 -3560
  193. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-IT6M3QCI.js +0 -833
  194. package/dist/node_modules/streamdown/dist/chunk-RLXIAIE6.js +0 -2189
  195. package/dist/node_modules/streamdown/dist/highlighted-body-B3W2YXNL.js +0 -33
  196. package/dist/node_modules/streamdown/dist/mermaid-3ZIDBTTL.js +0 -3
@@ -0,0 +1,568 @@
1
+ import { __name, log } from "./chunk-AGHRB4JF.js";
2
+ import { getConfig, getConfig2, getEffectiveHtmlLabels } from "./chunk-ICPOFSXX.js";
3
+ import select_default from "../../../../d3-selection/src/select.js";
4
+ import linear_default from "../../../../d3-shape/src/curve/linear.js";
5
+ import line_default from "../../../../d3-shape/src/line.js";
6
+ import { bumpX, bumpY } from "../../../../d3-shape/src/curve/bump.js";
7
+ import basis_default from "../../../../d3-shape/src/curve/basis.js";
8
+ import cardinal_default from "../../../../d3-shape/src/curve/cardinal.js";
9
+ import catmullRom_default from "../../../../d3-shape/src/curve/catmullRom.js";
10
+ import { monotoneX, monotoneY } from "../../../../d3-shape/src/curve/monotone.js";
11
+ import natural_default from "../../../../d3-shape/src/curve/natural.js";
12
+ import step_default, { stepAfter, stepBefore } from "../../../../d3-shape/src/curve/step.js";
13
+ import "../../../../d3/src/index.js";
14
+ import { computeLabelTransform, getLineFunctionsWithOffset, markerOffsets, markerOffsets2 } from "./chunk-BSJP7CBP.js";
15
+ import { handleUndefinedAttr, utils_default } from "./chunk-5PVQY5BW.js";
16
+ import { getSubGraphTitleMargins } from "./chunk-ZZ45TVLE.js";
17
+ import { isLabelStyle, styles2String } from "./chunk-X2U36JSP.js";
18
+ import { createText } from "./chunk-U2HBQHQK.js";
19
+ import { at } from "../../../../roughjs/bundled/rough.esm.js";
20
+ import { createLabel_default } from "./chunk-5FUZZQ4R.js";
21
+ var addEdgeMarkers = /* @__PURE__ */ __name((e, r, i, a, o, s = !1, c) => {
22
+ r.arrowTypeStart && addEdgeMarker(e, "start", r.arrowTypeStart, i, a, o, s, c), r.arrowTypeEnd && addEdgeMarker(e, "end", r.arrowTypeEnd, i, a, o, s, c);
23
+ }, "addEdgeMarkers"), arrowTypesMap = {
24
+ arrow_cross: {
25
+ type: "cross",
26
+ fill: !1
27
+ },
28
+ arrow_point: {
29
+ type: "point",
30
+ fill: !0
31
+ },
32
+ arrow_barb: {
33
+ type: "barb",
34
+ fill: !0
35
+ },
36
+ arrow_barb_neo: {
37
+ type: "barb",
38
+ fill: !0
39
+ },
40
+ arrow_circle: {
41
+ type: "circle",
42
+ fill: !1
43
+ },
44
+ aggregation: {
45
+ type: "aggregation",
46
+ fill: !1
47
+ },
48
+ extension: {
49
+ type: "extension",
50
+ fill: !1
51
+ },
52
+ composition: {
53
+ type: "composition",
54
+ fill: !0
55
+ },
56
+ dependency: {
57
+ type: "dependency",
58
+ fill: !0
59
+ },
60
+ lollipop: {
61
+ type: "lollipop",
62
+ fill: !1
63
+ },
64
+ only_one: {
65
+ type: "onlyOne",
66
+ fill: !1
67
+ },
68
+ zero_or_one: {
69
+ type: "zeroOrOne",
70
+ fill: !1
71
+ },
72
+ one_or_more: {
73
+ type: "oneOrMore",
74
+ fill: !1
75
+ },
76
+ zero_or_more: {
77
+ type: "zeroOrMore",
78
+ fill: !1
79
+ },
80
+ requirement_arrow: {
81
+ type: "requirement_arrow",
82
+ fill: !1
83
+ },
84
+ requirement_contains: {
85
+ type: "requirement_contains",
86
+ fill: !1
87
+ }
88
+ }, arrowTypesWithMarginSupport = [
89
+ "cross",
90
+ "point",
91
+ "circle",
92
+ "lollipop",
93
+ "aggregation",
94
+ "extension",
95
+ "composition",
96
+ "dependency",
97
+ "barb"
98
+ ], addEdgeMarker = /* @__PURE__ */ __name((e, i, a, o, s, c, l = !1, u) => {
99
+ let d = arrowTypesMap[a], f = d && arrowTypesWithMarginSupport.includes(d.type);
100
+ if (!d) {
101
+ log.warn(`Unknown arrow type: ${a}`);
102
+ return;
103
+ }
104
+ let p = `${s}_${c}-${d.type}${i === "start" ? "Start" : "End"}${l && f ? "-margin" : ""}`;
105
+ if (u && u.trim() !== "") {
106
+ let r = `${p}_${u.replace(/[^\dA-Za-z]/g, "_")}`;
107
+ if (!document.getElementById(r)) {
108
+ let e = document.getElementById(p);
109
+ if (e) {
110
+ let i = e.cloneNode(!0);
111
+ i.id = r, i.querySelectorAll("path, circle, line").forEach((e) => {
112
+ e.setAttribute("stroke", u), d.fill && e.setAttribute("fill", u);
113
+ }), e.parentNode?.appendChild(i);
114
+ }
115
+ }
116
+ e.attr(`marker-${i}`, `url(${o}#${r})`);
117
+ } else e.attr(`marker-${i}`, `url(${o}#${p})`);
118
+ }, "addEdgeMarker"), resolveEdgeCurveType = /* @__PURE__ */ __name((e) => typeof e == "string" ? e : getConfig2()?.flowchart?.curve, "resolveEdgeCurveType"), edgeLabels = /* @__PURE__ */ new Map(), terminalLabels = /* @__PURE__ */ new Map(), clear = /* @__PURE__ */ __name(() => {
119
+ edgeLabels.clear(), terminalLabels.clear();
120
+ }, "clear"), getLabelStyles = /* @__PURE__ */ __name((e) => e ? typeof e == "string" ? e : e.reduce((e, r) => e + ";" + r, "") : "", "getLabelStyles"), insertEdgeLabel = /* @__PURE__ */ __name(async (e, i) => {
121
+ let c = getConfig2(), l = getEffectiveHtmlLabels(c), { labelStyles: u } = styles2String(i);
122
+ i.labelStyle = u;
123
+ let d = e.insert("g").attr("class", "edgeLabel"), f = d.insert("g").attr("class", "label").attr("data-id", i.id), p = i.labelType === "markdown", m = await createText(e, i.label, {
124
+ style: getLabelStyles(i.labelStyle),
125
+ useHtmlLabels: l,
126
+ addSvgBackground: !0,
127
+ isNode: !1,
128
+ markdown: p,
129
+ width: void 0
130
+ }, c);
131
+ f.node().appendChild(m), log.info("abc82", i, i.labelType);
132
+ let h = m.getBBox(), g = h;
133
+ if (l) {
134
+ let e = m.children[0], r = select_default(m);
135
+ h = e.getBoundingClientRect(), g = h, r.attr("width", h.width), r.attr("height", h.height);
136
+ } else {
137
+ let e = select_default(m).select("text").node();
138
+ e && typeof e.getBBox == "function" && (g = e.getBBox());
139
+ }
140
+ f.attr("transform", computeLabelTransform(g, l)), edgeLabels.set(i.id, d), i.width = h.width, i.height = h.height;
141
+ let _;
142
+ if (i.startLabelLeft) {
143
+ let r = e.insert("g").attr("class", "edgeTerminals"), a = r.insert("g").attr("class", "inner"), o = await createLabel_default(a, i.startLabelLeft, getLabelStyles(i.labelStyle) || "", !1, !1);
144
+ _ = o;
145
+ let c = o.getBBox();
146
+ if (l) {
147
+ let e = o.children[0], r = select_default(o);
148
+ c = e.getBoundingClientRect(), r.attr("width", c.width), r.attr("height", c.height);
149
+ }
150
+ a.attr("transform", computeLabelTransform(c, l)), terminalLabels.get(i.id) || terminalLabels.set(i.id, {}), terminalLabels.get(i.id).startLeft = r, setTerminalWidth(_, i.startLabelLeft);
151
+ }
152
+ if (i.startLabelRight) {
153
+ let r = e.insert("g").attr("class", "edgeTerminals"), a = r.insert("g").attr("class", "inner"), o = await createLabel_default(a, i.startLabelRight, getLabelStyles(i.labelStyle) || "", !1, !1);
154
+ _ = o, a.node().appendChild(o);
155
+ let c = o.getBBox();
156
+ if (l) {
157
+ let e = o.children[0], r = select_default(o);
158
+ c = e.getBoundingClientRect(), r.attr("width", c.width), r.attr("height", c.height);
159
+ }
160
+ a.attr("transform", computeLabelTransform(c, l)), terminalLabels.get(i.id) || terminalLabels.set(i.id, {}), terminalLabels.get(i.id).startRight = r, setTerminalWidth(_, i.startLabelRight);
161
+ }
162
+ if (i.endLabelLeft) {
163
+ let r = e.insert("g").attr("class", "edgeTerminals"), a = r.insert("g").attr("class", "inner"), o = await createLabel_default(a, i.endLabelLeft, getLabelStyles(i.labelStyle) || "", !1, !1);
164
+ _ = o;
165
+ let c = o.getBBox();
166
+ if (l) {
167
+ let e = o.children[0], r = select_default(o);
168
+ c = e.getBoundingClientRect(), r.attr("width", c.width), r.attr("height", c.height);
169
+ }
170
+ a.attr("transform", computeLabelTransform(c, l)), r.node().appendChild(o), terminalLabels.get(i.id) || terminalLabels.set(i.id, {}), terminalLabels.get(i.id).endLeft = r, setTerminalWidth(_, i.endLabelLeft);
171
+ }
172
+ if (i.endLabelRight) {
173
+ let r = e.insert("g").attr("class", "edgeTerminals"), a = r.insert("g").attr("class", "inner"), o = await createLabel_default(a, i.endLabelRight, getLabelStyles(i.labelStyle) || "", !1, !1);
174
+ _ = o;
175
+ let c = o.getBBox();
176
+ if (l) {
177
+ let e = o.children[0], r = select_default(o);
178
+ c = e.getBoundingClientRect(), r.attr("width", c.width), r.attr("height", c.height);
179
+ }
180
+ a.attr("transform", computeLabelTransform(c, l)), r.node().appendChild(o), terminalLabels.get(i.id) || terminalLabels.set(i.id, {}), terminalLabels.get(i.id).endRight = r, setTerminalWidth(_, i.endLabelRight);
181
+ }
182
+ return m;
183
+ }, "insertEdgeLabel");
184
+ function setTerminalWidth(e, r) {
185
+ getEffectiveHtmlLabels(getConfig2()) && e && (e.style.width = r.length * 9 + "px", e.style.height = "12px");
186
+ }
187
+ __name(setTerminalWidth, "setTerminalWidth");
188
+ var positionEdgeLabel = /* @__PURE__ */ __name((e, i) => {
189
+ log.debug("Moving label abc88 ", e.id, e.label, edgeLabels.get(e.id), i);
190
+ let o = i.updatedPath ? i.updatedPath : i.originalPath, { subGraphTitleTotalMargin: s } = getSubGraphTitleMargins(getConfig2());
191
+ if (e.label) {
192
+ let a = edgeLabels.get(e.id), c = e.x, l = e.y;
193
+ if (o) {
194
+ let a = utils_default.calcLabelPosition(o);
195
+ log.debug("Moving label " + e.label + " from (", c, ",", l, ") to (", a.x, ",", a.y, ") abc88"), i.updatedPath && (c = a.x, l = a.y);
196
+ }
197
+ a.attr("transform", `translate(${c}, ${l + s / 2})`);
198
+ }
199
+ if (e.startLabelLeft) {
200
+ let r = terminalLabels.get(e.id).startLeft, i = e.x, a = e.y;
201
+ if (o) {
202
+ let r = utils_default.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", o);
203
+ i = r.x, a = r.y;
204
+ }
205
+ r.attr("transform", `translate(${i}, ${a})`);
206
+ }
207
+ if (e.startLabelRight) {
208
+ let r = terminalLabels.get(e.id).startRight, i = e.x, a = e.y;
209
+ if (o) {
210
+ let r = utils_default.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_right", o);
211
+ i = r.x, a = r.y;
212
+ }
213
+ r.attr("transform", `translate(${i}, ${a})`);
214
+ }
215
+ if (e.endLabelLeft) {
216
+ let r = terminalLabels.get(e.id).endLeft, i = e.x, a = e.y;
217
+ if (o) {
218
+ let r = utils_default.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", o);
219
+ i = r.x, a = r.y;
220
+ }
221
+ r.attr("transform", `translate(${i}, ${a})`);
222
+ }
223
+ if (e.endLabelRight) {
224
+ let r = terminalLabels.get(e.id).endRight, i = e.x, a = e.y;
225
+ if (o) {
226
+ let r = utils_default.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", o);
227
+ i = r.x, a = r.y;
228
+ }
229
+ r.attr("transform", `translate(${i}, ${a})`);
230
+ }
231
+ }, "positionEdgeLabel"), outsideNode = /* @__PURE__ */ __name((e, r) => {
232
+ let i = e.x, a = e.y, o = Math.abs(r.x - i), s = Math.abs(r.y - a), c = e.width / 2, l = e.height / 2;
233
+ return o >= c || s >= l;
234
+ }, "outsideNode"), intersection = /* @__PURE__ */ __name((e, i, a) => {
235
+ log.debug(`intersection calc abc89:
236
+ outsidePoint: ${JSON.stringify(i)}
237
+ insidePoint : ${JSON.stringify(a)}
238
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
239
+ let o = e.x, s = e.y, c = Math.abs(o - a.x), l = e.width / 2, u = a.x < i.x ? l - c : l + c, d = e.height / 2, f = Math.abs(i.y - a.y), p = Math.abs(i.x - a.x);
240
+ if (Math.abs(s - i.y) * l > Math.abs(o - i.x) * d) {
241
+ let e = a.y < i.y ? i.y - d - s : s - d - i.y;
242
+ u = p * e / f;
243
+ let o = {
244
+ x: a.x < i.x ? a.x + u : a.x - p + u,
245
+ y: a.y < i.y ? a.y + f - e : a.y - f + e
246
+ };
247
+ return u === 0 && (o.x = i.x, o.y = i.y), p === 0 && (o.x = i.x), f === 0 && (o.y = i.y), log.debug(`abc89 top/bottom calc, Q ${f}, q ${e}, R ${p}, r ${u}`, o), o;
248
+ } else {
249
+ u = a.x < i.x ? i.x - l - o : o - l - i.x;
250
+ let e = f * u / p, s = a.x < i.x ? a.x + p - u : a.x - p + u, c = a.y < i.y ? a.y + e : a.y - e;
251
+ return log.debug(`sides calc abc89, Q ${f}, q ${e}, R ${p}, r ${u}`, {
252
+ _x: s,
253
+ _y: c
254
+ }), u === 0 && (s = i.x, c = i.y), p === 0 && (s = i.x), f === 0 && (c = i.y), {
255
+ x: s,
256
+ y: c
257
+ };
258
+ }
259
+ }, "intersection"), cutPathAtIntersect = /* @__PURE__ */ __name((e, i) => {
260
+ log.warn("abc88 cutPathAtIntersect", e, i);
261
+ let a = [], o = e[0], s = !1;
262
+ return e.forEach((e) => {
263
+ if (log.info("abc88 checking point", e, i), !outsideNode(i, e) && !s) {
264
+ let c = intersection(i, o, e);
265
+ log.debug("abc88 inside", e, o, c), log.debug("abc88 intersection", c, i);
266
+ let l = !1;
267
+ a.forEach((e) => {
268
+ l ||= e.x === c.x && e.y === c.y;
269
+ }), a.some((e) => e.x === c.x && e.y === c.y) ? log.warn("abc88 no intersect", c, a) : a.push(c), s = !0;
270
+ } else log.warn("abc88 outside", e, o), o = e, s || a.push(e);
271
+ }), log.debug("returning points", a), a;
272
+ }, "cutPathAtIntersect");
273
+ function extractCornerPoints(e) {
274
+ let r = [], i = [];
275
+ for (let a = 1; a < e.length - 1; a++) {
276
+ let o = e[a - 1], s = e[a], c = e[a + 1];
277
+ (o.x === s.x && s.y === c.y && Math.abs(s.x - c.x) > 5 && Math.abs(s.y - o.y) > 5 || o.y === s.y && s.x === c.x && Math.abs(s.x - o.x) > 5 && Math.abs(s.y - c.y) > 5) && (r.push(s), i.push(a));
278
+ }
279
+ return {
280
+ cornerPoints: r,
281
+ cornerPointPositions: i
282
+ };
283
+ }
284
+ __name(extractCornerPoints, "extractCornerPoints");
285
+ var findAdjacentPoint = /* @__PURE__ */ __name(function(e, r, i) {
286
+ let a = r.x - e.x, o = r.y - e.y, s = i / Math.sqrt(a * a + o * o);
287
+ return {
288
+ x: r.x - s * a,
289
+ y: r.y - s * o
290
+ };
291
+ }, "findAdjacentPoint"), fixCorners = /* @__PURE__ */ __name(function(e) {
292
+ let { cornerPointPositions: i } = extractCornerPoints(e), a = [];
293
+ for (let o = 0; o < e.length; o++) if (i.includes(o)) {
294
+ let i = e[o - 1], s = e[o + 1], c = e[o], l = findAdjacentPoint(i, c, 5), u = findAdjacentPoint(s, c, 5), d = u.x - l.x, f = u.y - l.y;
295
+ a.push(l);
296
+ let p = Math.sqrt(2) * 2, m = {
297
+ x: c.x,
298
+ y: c.y
299
+ };
300
+ Math.abs(s.x - i.x) > 10 && Math.abs(s.y - i.y) >= 10 ? (log.debug("Corner point fixing", Math.abs(s.x - i.x), Math.abs(s.y - i.y)), m = c.x === l.x ? {
301
+ x: d < 0 ? l.x - 5 + p : l.x + 5 - p,
302
+ y: f < 0 ? l.y - p : l.y + p
303
+ } : {
304
+ x: d < 0 ? l.x - p : l.x + p,
305
+ y: f < 0 ? l.y - 5 + p : l.y + 5 - p
306
+ }) : log.debug("Corner point skipping fixing", Math.abs(s.x - i.x), Math.abs(s.y - i.y)), a.push(m, u);
307
+ } else a.push(e[o]);
308
+ return a;
309
+ }, "fixCorners"), generateDashArray = /* @__PURE__ */ __name((e, r, i) => {
310
+ let a = e - r - i, o = Math.floor(a / 4);
311
+ return `0 ${r} ${Array(o).fill("2 2").join(" ")} ${i}`;
312
+ }, "generateDashArray"), insertEdge = /* @__PURE__ */ __name(function(e, i, o, x, C, E, D, O = !1) {
313
+ if (!D) throw Error(`insertEdge: missing diagramId for edge "${i.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);
314
+ let { handDrawnSeed: k } = getConfig2(), A = i.points, j = !1, M = C;
315
+ var N = E;
316
+ let P = [];
317
+ for (let e in i.cssCompiledStyles) isLabelStyle(e) || P.push(i.cssCompiledStyles[e]);
318
+ log.debug("UIO intersect check", i.points, N.x, M.x), N.intersect && M.intersect && !O && (A = A.slice(1, i.points.length - 1), A.unshift(M.intersect(A[0])), log.debug("Last point UIO", i.start, "-->", i.end, A[A.length - 1], N, N.intersect(A[A.length - 1])), A.push(N.intersect(A[A.length - 1])));
319
+ let F = btoa(JSON.stringify(A));
320
+ i.toCluster && (log.info("to cluster abc88", o.get(i.toCluster)), A = cutPathAtIntersect(i.points, o.get(i.toCluster).node), j = !0), i.fromCluster && (log.debug("from cluster abc88", o.get(i.fromCluster), JSON.stringify(A, null, 2)), A = cutPathAtIntersect(A.reverse(), o.get(i.fromCluster).node).reverse(), j = !0);
321
+ let I = A.filter((e) => !Number.isNaN(e.y)), L = resolveEdgeCurveType(i.curve);
322
+ L !== "rounded" && (I = fixCorners(I));
323
+ let R = linear_default;
324
+ switch (L) {
325
+ case "linear":
326
+ R = linear_default;
327
+ break;
328
+ case "basis":
329
+ R = basis_default;
330
+ break;
331
+ case "cardinal":
332
+ R = cardinal_default;
333
+ break;
334
+ case "bumpX":
335
+ R = bumpX;
336
+ break;
337
+ case "bumpY":
338
+ R = bumpY;
339
+ break;
340
+ case "catmullRom":
341
+ R = catmullRom_default;
342
+ break;
343
+ case "monotoneX":
344
+ R = monotoneX;
345
+ break;
346
+ case "monotoneY":
347
+ R = monotoneY;
348
+ break;
349
+ case "natural":
350
+ R = natural_default;
351
+ break;
352
+ case "step":
353
+ R = step_default;
354
+ break;
355
+ case "stepAfter":
356
+ R = stepAfter;
357
+ break;
358
+ case "stepBefore":
359
+ R = stepBefore;
360
+ break;
361
+ case "rounded":
362
+ R = linear_default;
363
+ break;
364
+ default: R = basis_default;
365
+ }
366
+ let { x: z, y: B } = getLineFunctionsWithOffset(i), V = line_default().x(z).y(B).curve(R), H;
367
+ switch (i.thickness) {
368
+ case "normal":
369
+ H = "edge-thickness-normal";
370
+ break;
371
+ case "thick":
372
+ H = "edge-thickness-thick";
373
+ break;
374
+ case "invisible":
375
+ H = "edge-thickness-invisible";
376
+ break;
377
+ default: H = "edge-thickness-normal";
378
+ }
379
+ switch (i.pattern) {
380
+ case "solid":
381
+ H += " edge-pattern-solid";
382
+ break;
383
+ case "dotted":
384
+ H += " edge-pattern-dotted";
385
+ break;
386
+ case "dashed":
387
+ H += " edge-pattern-dashed";
388
+ break;
389
+ default: H += " edge-pattern-solid";
390
+ }
391
+ let U, W = L === "rounded" ? generateRoundedPath(applyMarkerOffsetsToPoints(I, i), 5) : V(I), G = Array.isArray(i.style) ? i.style : [i.style], K = G.find((e) => e?.startsWith("stroke:")), q = "";
392
+ i.animate && (q = "edge-animation-fast"), i.animation && (q = "edge-animation-" + i.animation);
393
+ let J = !1;
394
+ if (i.look === "handDrawn") {
395
+ let r = at.svg(e);
396
+ Object.assign([], I);
397
+ let a = r.path(W, {
398
+ roughness: .3,
399
+ seed: k
400
+ });
401
+ H += " transition", U = select_default(a).select("path").attr("id", `${D}-${i.id}`).attr("class", " " + H + (i.classes ? " " + i.classes : "") + (q ? " " + q : "")).attr("style", G ? G.reduce((e, r) => e + ";" + r, "") : "");
402
+ let o = U.attr("d");
403
+ U.attr("d", o), e.node().appendChild(U.node());
404
+ } else {
405
+ let r = P.join(";"), a = G ? G.reduce((e, r) => e + r + ";", "") : "", o = (r ? r + ";" + a + ";" : a) + ";" + (G ? G.reduce((e, r) => e + ";" + r, "") : "");
406
+ U = e.append("path").attr("d", W).attr("id", `${D}-${i.id}`).attr("class", " " + H + (i.classes ? " " + i.classes : "") + (q ? " " + q : "")).attr("style", o), K = o.match(/stroke:([^;]+)/)?.[1], J = i.animate === !0 || !!i.animation || r.includes("animation");
407
+ let s = U.node(), c = typeof s.getTotalLength == "function" ? s.getTotalLength() : 0, l = markerOffsets2[i.arrowTypeStart] || 0, u = markerOffsets2[i.arrowTypeEnd] || 0;
408
+ if (i.look === "neo" && !J) {
409
+ let e = `stroke-dasharray: ${i.pattern === "dotted" || i.pattern === "dashed" ? generateDashArray(c, l, u) : `0 ${l} ${c - l - u} ${u}`}; stroke-dashoffset: 0;`;
410
+ U.attr("style", e + U.attr("style"));
411
+ }
412
+ }
413
+ U.attr("data-edge", !0), U.attr("data-et", "edge"), U.attr("data-id", i.id), U.attr("data-points", F), U.attr("data-look", handleUndefinedAttr(i.look)), i.showPoints && I.forEach((r) => {
414
+ e.append("circle").style("stroke", "red").style("fill", "red").attr("r", 1).attr("cx", r.x).attr("cy", r.y);
415
+ });
416
+ let Y = "";
417
+ (getConfig2().flowchart.arrowMarkerAbsolute || getConfig2().state.arrowMarkerAbsolute) && (Y = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, Y = Y.replace(/\(/g, "\\(").replace(/\)/g, "\\)")), log.info("arrowTypeStart", i.arrowTypeStart), log.info("arrowTypeEnd", i.arrowTypeEnd);
418
+ let X = !J && i?.look === "neo";
419
+ addEdgeMarkers(U, i, Y, D, x, X, K);
420
+ let Z = Math.floor(A.length / 2), Q = A[Z];
421
+ utils_default.isLabelCoordinateInPath(Q, U.attr("d")) || (j = !0);
422
+ let $ = {};
423
+ return j && ($.updatedPath = A), $.originalPath = i.points, $;
424
+ }, "insertEdge");
425
+ function generateRoundedPath(e, r) {
426
+ if (e.length < 2) return "";
427
+ let i = "", a = e.length, o = 1e-5;
428
+ for (let s = 0; s < a; s++) {
429
+ let c = e[s], l = e[s - 1], u = e[s + 1];
430
+ if (s === 0) i += `M${c.x},${c.y}`;
431
+ else if (s === a - 1) i += `L${c.x},${c.y}`;
432
+ else {
433
+ let e = c.x - l.x, a = c.y - l.y, s = u.x - c.x, d = u.y - c.y, f = Math.hypot(e, a), p = Math.hypot(s, d);
434
+ if (f < o || p < o) {
435
+ i += `L${c.x},${c.y}`;
436
+ continue;
437
+ }
438
+ let m = e / f, h = a / f, g = s / p, _ = d / p, v = m * g + h * _, y = Math.max(-1, Math.min(1, v)), b = Math.acos(y);
439
+ if (b < o || Math.abs(Math.PI - b) < o) {
440
+ i += `L${c.x},${c.y}`;
441
+ continue;
442
+ }
443
+ let x = Math.min(r / Math.sin(b / 2), f / 2, p / 2), S = c.x - m * x, C = c.y - h * x, w = c.x + g * x, T = c.y + _ * x;
444
+ i += `L${S},${C}`, i += `Q${c.x},${c.y} ${w},${T}`;
445
+ }
446
+ }
447
+ return i;
448
+ }
449
+ __name(generateRoundedPath, "generateRoundedPath");
450
+ function calculateDeltaAndAngle(e, r) {
451
+ if (!e || !r) return {
452
+ angle: 0,
453
+ deltaX: 0,
454
+ deltaY: 0
455
+ };
456
+ let i = r.x - e.x, a = r.y - e.y;
457
+ return {
458
+ angle: Math.atan2(a, i),
459
+ deltaX: i,
460
+ deltaY: a
461
+ };
462
+ }
463
+ __name(calculateDeltaAndAngle, "calculateDeltaAndAngle");
464
+ function applyMarkerOffsetsToPoints(e, r) {
465
+ let i = e.map((e) => ({ ...e }));
466
+ if (e.length >= 2 && markerOffsets[r.arrowTypeStart]) {
467
+ let a = markerOffsets[r.arrowTypeStart], o = e[0], s = e[1], { angle: c } = calculateDeltaAndAngle(o, s), l = a * Math.cos(c), u = a * Math.sin(c);
468
+ i[0].x = o.x + l, i[0].y = o.y + u;
469
+ }
470
+ let a = e.length;
471
+ if (a >= 2 && markerOffsets[r.arrowTypeEnd]) {
472
+ let o = markerOffsets[r.arrowTypeEnd], s = e[a - 1], c = e[a - 2], { angle: l } = calculateDeltaAndAngle(c, s), u = o * Math.cos(l), d = o * Math.sin(l);
473
+ i[a - 1].x = s.x - u, i[a - 1].y = s.y - d;
474
+ }
475
+ return i;
476
+ }
477
+ __name(applyMarkerOffsetsToPoints, "applyMarkerOffsetsToPoints");
478
+ var insertMarkers = /* @__PURE__ */ __name((e, r, i, a) => {
479
+ r.forEach((r) => {
480
+ markers[r](e, i, a);
481
+ });
482
+ }, "insertMarkers"), markers = {
483
+ extension: /* @__PURE__ */ __name((e, i, a) => {
484
+ log.trace("Making markers for ", a), e.append("defs").append("marker").attr("id", a + "_" + i + "-extensionStart").attr("class", "marker extension " + i).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", a + "_" + i + "-extensionEnd").attr("class", "marker extension " + i).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"), e.append("marker").attr("id", a + "_" + i + "-extensionStart-margin").attr("class", "marker extension " + i).attr("refX", 18).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").attr("viewBox", "0 0 20 14").append("polygon").attr("points", "10,7 18,13 18,1").style("stroke-width", 2).style("stroke-dasharray", "0"), e.append("defs").append("marker").attr("id", a + "_" + i + "-extensionEnd-margin").attr("class", "marker extension " + i).attr("refX", 9).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").attr("viewBox", "0 0 20 14").append("polygon").attr("points", "10,1 10,13 18,7").style("stroke-width", 2).style("stroke-dasharray", "0");
485
+ }, "extension"),
486
+ composition: /* @__PURE__ */ __name((e, r, i) => {
487
+ e.append("defs").append("marker").attr("id", i + "_" + r + "-compositionStart").attr("class", "marker composition " + r).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", i + "_" + r + "-compositionEnd").attr("class", "marker composition " + r).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", i + "_" + r + "-compositionStart-margin").attr("class", "marker composition " + r).attr("refX", 15).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").style("stroke-width", 0).attr("viewBox", "0 0 15 15").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", i + "_" + r + "-compositionEnd-margin").attr("class", "marker composition " + r).attr("refX", 3.5).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").style("stroke-width", 0).attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
488
+ }, "composition"),
489
+ aggregation: /* @__PURE__ */ __name((e, r, i) => {
490
+ e.append("defs").append("marker").attr("id", i + "_" + r + "-aggregationStart").attr("class", "marker aggregation " + r).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", i + "_" + r + "-aggregationEnd").attr("class", "marker aggregation " + r).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", i + "_" + r + "-aggregationStart-margin").attr("class", "marker aggregation " + r).attr("refX", 15).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").style("stroke-width", 2).attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", i + "_" + r + "-aggregationEnd-margin").attr("class", "marker aggregation " + r).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").style("stroke-width", 2).attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
491
+ }, "aggregation"),
492
+ dependency: /* @__PURE__ */ __name((e, r, i) => {
493
+ e.append("defs").append("marker").attr("id", i + "_" + r + "-dependencyStart").attr("class", "marker dependency " + r).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", i + "_" + r + "-dependencyEnd").attr("class", "marker dependency " + r).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"), e.append("defs").append("marker").attr("id", i + "_" + r + "-dependencyStart-margin").attr("class", "marker dependency " + r).attr("refX", 4).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").style("stroke-width", 0).attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", i + "_" + r + "-dependencyEnd-margin").attr("class", "marker dependency " + r).attr("refX", 16).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").style("stroke-width", 0).attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
494
+ }, "dependency"),
495
+ lollipop: /* @__PURE__ */ __name((e, r, i) => {
496
+ e.append("defs").append("marker").attr("id", i + "_" + r + "-lollipopStart").attr("class", "marker lollipop " + r).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), e.append("defs").append("marker").attr("id", i + "_" + r + "-lollipopEnd").attr("class", "marker lollipop " + r).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), e.append("defs").append("marker").attr("id", i + "_" + r + "-lollipopStart-margin").attr("class", "marker lollipop " + r).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("circle").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6).attr("stroke-width", 2), e.append("defs").append("marker").attr("id", i + "_" + r + "-lollipopEnd-margin").attr("class", "marker lollipop " + r).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("circle").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6).attr("stroke-width", 2);
497
+ }, "lollipop"),
498
+ point: /* @__PURE__ */ __name((e, r, i) => {
499
+ e.append("marker").attr("id", i + "_" + r + "-pointEnd").attr("class", "marker " + r).attr("viewBox", "0 0 10 10").attr("refX", 5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 8).attr("markerHeight", 8).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", i + "_" + r + "-pointStart").attr("class", "marker " + r).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 8).attr("markerHeight", 8).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", i + "_" + r + "-pointEnd-margin").attr("class", "marker " + r).attr("viewBox", "0 0 11.5 14").attr("refX", 11.5).attr("refY", 7).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 10.5).attr("markerHeight", 14).attr("orient", "auto").append("path").attr("d", "M 0 0 L 11.5 7 L 0 14 z").attr("class", "arrowMarkerPath").style("stroke-width", 0).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", i + "_" + r + "-pointStart-margin").attr("class", "marker " + r).attr("viewBox", "0 0 11.5 14").attr("refX", 1).attr("refY", 7).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11.5).attr("markerHeight", 14).attr("orient", "auto").append("polygon").attr("points", "0,7 11.5,14 11.5,0").attr("class", "arrowMarkerPath").style("stroke-width", 0).style("stroke-dasharray", "1,0");
500
+ }, "point"),
501
+ circle: /* @__PURE__ */ __name((e, r, i) => {
502
+ e.append("marker").attr("id", i + "_" + r + "-circleEnd").attr("class", "marker " + r).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", i + "_" + r + "-circleStart").attr("class", "marker " + r).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", i + "_" + r + "-circleEnd-margin").attr("class", "marker " + r).attr("viewBox", "0 0 10 10").attr("refY", 5).attr("refX", 12.25).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 14).attr("markerHeight", 14).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 0).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", i + "_" + r + "-circleStart-margin").attr("class", "marker " + r).attr("viewBox", "0 0 10 10").attr("refX", -2).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 14).attr("markerHeight", 14).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 0).style("stroke-dasharray", "1,0");
503
+ }, "circle"),
504
+ cross: /* @__PURE__ */ __name((e, r, i) => {
505
+ e.append("marker").attr("id", i + "_" + r + "-crossEnd").attr("class", "marker cross " + r).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", i + "_" + r + "-crossStart").attr("class", "marker cross " + r).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", i + "_" + r + "-crossEnd-margin").attr("class", "marker cross " + r).attr("viewBox", "0 0 15 15").attr("refX", 17.7).attr("refY", 7.5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 1,1 L 14,14 M 1,14 L 14,1").attr("class", "arrowMarkerPath").style("stroke-width", 2.5), e.append("marker").attr("id", i + "_" + r + "-crossStart-margin").attr("class", "marker cross " + r).attr("viewBox", "0 0 15 15").attr("refX", -3.5).attr("refY", 7.5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 1,1 L 14,14 M 1,14 L 14,1").attr("class", "arrowMarkerPath").style("stroke-width", 2.5).style("stroke-dasharray", "1,0");
506
+ }, "cross"),
507
+ barb: /* @__PURE__ */ __name((e, r, i) => {
508
+ e.append("defs").append("marker").attr("id", i + "_" + r + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
509
+ }, "barb"),
510
+ barbNeo: /* @__PURE__ */ __name((e, r, a) => {
511
+ let { themeVariables: o } = getConfig(), { transitionColor: s } = o;
512
+ e.append("defs").append("marker").attr("id", a + "_" + r + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L11,14 L13,7 L11,0 Z"), e.append("defs").append("marker").attr("id", a + "_" + r + "-barbEnd-margin").attr("refX", 17).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto").append("path").attr("d", "M 19,7 L11,14 L13,7 L11,0 Z").attr("fill", `${s}`);
513
+ }, "barbNeo"),
514
+ only_one: /* @__PURE__ */ __name((e, r, i) => {
515
+ e.append("defs").append("marker").attr("id", i + "_" + r + "-onlyOneStart").attr("class", "marker onlyOne " + r).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("d", "M9,0 L9,18 M15,0 L15,18"), e.append("defs").append("marker").attr("id", i + "_" + r + "-onlyOneEnd").attr("class", "marker onlyOne " + r).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("d", "M3,0 L3,18 M9,0 L9,18");
516
+ }, "only_one"),
517
+ zero_or_one: /* @__PURE__ */ __name((e, r, i) => {
518
+ let a = e.append("defs").append("marker").attr("id", i + "_" + r + "-zeroOrOneStart").attr("class", "marker zeroOrOne " + r).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto");
519
+ a.append("circle").attr("fill", "white").attr("cx", 21).attr("cy", 9).attr("r", 6), a.append("path").attr("d", "M9,0 L9,18");
520
+ let o = e.append("defs").append("marker").attr("id", i + "_" + r + "-zeroOrOneEnd").attr("class", "marker zeroOrOne " + r).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto");
521
+ o.append("circle").attr("fill", "white").attr("cx", 9).attr("cy", 9).attr("r", 6), o.append("path").attr("d", "M21,0 L21,18");
522
+ }, "zero_or_one"),
523
+ one_or_more: /* @__PURE__ */ __name((e, r, i) => {
524
+ e.append("defs").append("marker").attr("id", i + "_" + r + "-oneOrMoreStart").attr("class", "marker oneOrMore " + r).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"), e.append("defs").append("marker").attr("id", i + "_" + r + "-oneOrMoreEnd").attr("class", "marker oneOrMore " + r).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18");
525
+ }, "one_or_more"),
526
+ zero_or_more: /* @__PURE__ */ __name((e, r, i) => {
527
+ let a = e.append("defs").append("marker").attr("id", i + "_" + r + "-zeroOrMoreStart").attr("class", "marker zeroOrMore " + r).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto");
528
+ a.append("circle").attr("fill", "white").attr("cx", 48).attr("cy", 18).attr("r", 6), a.append("path").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18");
529
+ let o = e.append("defs").append("marker").attr("id", i + "_" + r + "-zeroOrMoreEnd").attr("class", "marker zeroOrMore " + r).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto");
530
+ o.append("circle").attr("fill", "white").attr("cx", 9).attr("cy", 18).attr("r", 6), o.append("path").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18");
531
+ }, "zero_or_more"),
532
+ only_one_neo: /* @__PURE__ */ __name((e, r, a) => {
533
+ let { themeVariables: o } = getConfig(), { strokeWidth: s } = o;
534
+ e.append("defs").append("marker").attr("id", a + "_" + r + "-onlyOneStart").attr("class", "marker onlyOne " + r).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").attr("d", "M9,0 L9,18 M15,0 L15,18").attr("stroke-width", `${s}`), e.append("defs").append("marker").attr("id", a + "_" + r + "-onlyOneEnd").attr("class", "marker onlyOne " + r).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").attr("d", "M3,0 L3,18 M9,0 L9,18").attr("stroke-width", `${s}`);
535
+ }, "only_one_neo"),
536
+ zero_or_one_neo: /* @__PURE__ */ __name((e, r, a) => {
537
+ let { themeVariables: o } = getConfig(), { strokeWidth: s, mainBkg: c } = o, l = e.append("defs").append("marker").attr("id", a + "_" + r + "-zeroOrOneStart").attr("class", "marker zeroOrOne " + r).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse");
538
+ l.append("circle").attr("fill", c ?? "white").attr("cx", 21).attr("cy", 9).attr("stroke-width", `${s}`).attr("r", 6), l.append("path").attr("d", "M9,0 L9,18").attr("stroke-width", `${s}`);
539
+ let u = e.append("defs").append("marker").attr("id", a + "_" + r + "-zeroOrOneEnd").attr("class", "marker zeroOrOne " + r).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto");
540
+ u.append("circle").attr("fill", c ?? "white").attr("cx", 9).attr("cy", 9).attr("stroke-width", `${s}`).attr("r", 6), u.append("path").attr("d", "M21,0 L21,18").attr("stroke-width", `${s}`);
541
+ }, "zero_or_one_neo"),
542
+ one_or_more_neo: /* @__PURE__ */ __name((e, r, a) => {
543
+ let { themeVariables: o } = getConfig(), { strokeWidth: s } = o;
544
+ e.append("defs").append("marker").attr("id", a + "_" + r + "-oneOrMoreStart").attr("class", "marker oneOrMore " + r).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width", `${s}`), e.append("defs").append("marker").attr("id", a + "_" + r + "-oneOrMoreEnd").attr("class", "marker oneOrMore " + r).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto").append("path").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width", `${s}`);
545
+ }, "one_or_more_neo"),
546
+ zero_or_more_neo: /* @__PURE__ */ __name((e, r, a) => {
547
+ let { themeVariables: o } = getConfig(), { strokeWidth: s, mainBkg: c } = o, l = e.append("defs").append("marker").attr("id", a + "_" + r + "-zeroOrMoreStart").attr("class", "marker zeroOrMore " + r).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto");
548
+ l.append("circle").attr("fill", c ?? "white").attr("cx", 45.5).attr("cy", 18).attr("r", 6).attr("stroke-width", `${s}`), l.append("path").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width", `${s}`);
549
+ let u = e.append("defs").append("marker").attr("id", a + "_" + r + "-zeroOrMoreEnd").attr("class", "marker zeroOrMore " + r).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse");
550
+ u.append("circle").attr("fill", c ?? "white").attr("cx", 11).attr("cy", 18).attr("r", 6).attr("stroke-width", `${s}`), u.append("path").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width", `${s}`);
551
+ }, "zero_or_more_neo"),
552
+ requirement_arrow: /* @__PURE__ */ __name((e, r, i) => {
553
+ e.append("defs").append("marker").attr("id", i + "_" + r + "-requirement_arrowEnd").attr("refX", 20).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").append("path").attr("d", "M0,0\n L20,10\n M20,10\n L0,20");
554
+ }, "requirement_arrow"),
555
+ requirement_contains: /* @__PURE__ */ __name((e, r, i) => {
556
+ let a = e.append("defs").append("marker").attr("id", i + "_" + r + "-requirement_containsStart").attr("refX", 0).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").append("g");
557
+ a.append("circle").attr("cx", 10).attr("cy", 10).attr("r", 9).attr("fill", "none"), a.append("line").attr("x1", 1).attr("x2", 19).attr("y1", 10).attr("y2", 10), a.append("line").attr("y1", 1).attr("y2", 19).attr("x1", 10).attr("x2", 10);
558
+ }, "requirement_contains"),
559
+ requirement_arrow_neo: /* @__PURE__ */ __name((e, r, a) => {
560
+ let { themeVariables: o } = getConfig(), { strokeWidth: s } = o;
561
+ e.append("defs").append("marker").attr("id", a + "_" + r + "-requirement_arrowEnd").attr("refX", 20).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").attr("stroke-width", `${s}`).attr("viewBox", "0 0 25 20").append("path").attr("d", "M0,0\n L20,10\n M20,10\n L0,20").attr("stroke-linejoin", "miter");
562
+ }, "requirement_arrow_neo"),
563
+ requirement_contains_neo: /* @__PURE__ */ __name((e, r, a) => {
564
+ let { themeVariables: o } = getConfig(), { strokeWidth: s } = o, c = e.append("defs").append("marker").attr("id", a + "_" + r + "-requirement_containsStart").attr("refX", 0).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("g");
565
+ c.append("circle").attr("cx", 10).attr("cy", 10).attr("r", 9).attr("fill", "none"), c.append("line").attr("x1", 1).attr("x2", 19).attr("y1", 10).attr("y2", 10), c.append("line").attr("y1", 1).attr("y2", 19).attr("x1", 10).attr("x2", 10), c.selectAll("*").attr("stroke-width", `${s}`);
566
+ }, "requirement_contains_neo")
567
+ }, markers_default = insertMarkers;
568
+ export { clear, insertEdge, insertEdgeLabel, markers_default, positionEdgeLabel };