@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
@@ -1,9 +1,9 @@
1
1
  import { __name, log } from "./chunk-AGHRB4JF.js";
2
- import { clear, common_default, getAccDescription, getAccTitle, getConfig2, getDiagramTitle, setAccDescription, setAccTitle, setDiagramTitle } from "./chunk-ABZYJK2D.js";
3
- import { generateId, utils_default } from "./chunk-S3R3BYOJ.js";
4
- import { render } from "./chunk-N4CR4FBY.js";
2
+ import { clear, common_default, getAccDescription, getAccTitle, getConfig2, getDiagramTitle, setAccDescription, setAccTitle, setDiagramTitle } from "./chunk-ICPOFSXX.js";
3
+ import { generateId, utils_default } from "./chunk-5PVQY5BW.js";
4
+ import { render } from "./chunk-336JU56O.js";
5
5
  import { getDiagramElement } from "./chunk-55IACEB6.js";
6
- import { setupViewPortForSVG } from "./chunk-QN33PNHL.js";
6
+ import { setupViewPortForSVG } from "./chunk-EDXVE4YY.js";
7
7
  var parser = (function() {
8
8
  var b = /* @__PURE__ */ __name(function(e, b, x, S) {
9
9
  for (x ||= {}, S = e.length; S--; x[e[S]] = b);
@@ -1127,7 +1127,7 @@ var parser = (function() {
1127
1127
  /^(?:hide empty description\b)/i,
1128
1128
  /^(?:\[\*\])/i,
1129
1129
  /^(?:[^:\n\s\-\{]+)/i,
1130
- /^(?:\s*:[^:\n;]+)/i,
1130
+ /^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,
1131
1131
  /^(?:-->)/i,
1132
1132
  /^(?:--)/i,
1133
1133
  /^(?::::)/i,
@@ -1159,7 +1159,8 @@ var parser = (function() {
1159
1159
  75,
1160
1160
  76,
1161
1161
  77,
1162
- 78
1162
+ 78,
1163
+ 79
1163
1164
  ],
1164
1165
  inclusive: !1
1165
1166
  },
@@ -1331,7 +1332,7 @@ var parser = (function() {
1331
1332
  return __name($, "Parser"), $.prototype = Q, Q.Parser = $, new $();
1332
1333
  })();
1333
1334
  parser.parser = parser;
1334
- var stateDiagram_default = parser, DEFAULT_DIAGRAM_DIRECTION = "TB", DEFAULT_NESTED_DOC_DIR = "TB", STMT_DIRECTION = "dir", STMT_STATE = "state", STMT_ROOT = "root", STMT_RELATION = "relation", STMT_CLASSDEF = "classDef", STMT_STYLEDEF = "style", STMT_APPLYCLASS = "applyClass", DEFAULT_STATE_TYPE = "default", DIVIDER_TYPE = "divider", G_EDGE_STYLE = "fill:none", G_EDGE_ARROWHEADSTYLE = "fill: #333", G_EDGE_LABELPOS = "c", G_EDGE_LABELTYPE = "text", G_EDGE_THICKNESS = "normal", SHAPE_STATE = "rect", SHAPE_STATE_WITH_DESC = "rectWithTitle", SHAPE_START = "stateStart", SHAPE_END = "stateEnd", SHAPE_DIVIDER = "divider", SHAPE_GROUP = "roundedWithTitle", SHAPE_NOTE = "note", SHAPE_NOTEGROUP = "noteGroup", CSS_DIAGRAM = "statediagram", CSS_DIAGRAM_STATE = `${CSS_DIAGRAM}-state`, CSS_EDGE = "transition", CSS_NOTE = "note", CSS_EDGE_NOTE_EDGE = `${CSS_EDGE} note-edge`, CSS_DIAGRAM_NOTE = `${CSS_DIAGRAM}-${CSS_NOTE}`, CSS_DIAGRAM_CLUSTER = `${CSS_DIAGRAM}-cluster`, CSS_DIAGRAM_CLUSTER_ALT = `${CSS_DIAGRAM}-cluster-alt`, PARENT = "parent", NOTE = "note", DOMID_STATE = "state", DOMID_TYPE_SPACER = "----", NOTE_ID = `${DOMID_TYPE_SPACER}${NOTE}`, PARENT_ID = `${DOMID_TYPE_SPACER}${PARENT}`, getDir = /* @__PURE__ */ __name((e, b = DEFAULT_NESTED_DOC_DIR) => {
1335
+ var stateDiagram_default = parser, DEFAULT_DIAGRAM_DIRECTION = "TB", DEFAULT_NESTED_DOC_DIR = "TB", STMT_DIRECTION = "dir", STMT_STATE = "state", STMT_ROOT = "root", STMT_RELATION = "relation", STMT_CLASSDEF = "classDef", STMT_STYLEDEF = "style", STMT_APPLYCLASS = "applyClass", DEFAULT_STATE_TYPE = "default", DIVIDER_TYPE = "divider", G_EDGE_STYLE = "fill:none", G_EDGE_ARROWHEADSTYLE = "fill: #333", G_EDGE_LABELPOS = "c", G_EDGE_LABELTYPE = "markdown", G_EDGE_THICKNESS = "normal", SHAPE_STATE = "rect", SHAPE_STATE_WITH_DESC = "rectWithTitle", SHAPE_START = "stateStart", SHAPE_END = "stateEnd", SHAPE_DIVIDER = "divider", SHAPE_GROUP = "roundedWithTitle", SHAPE_NOTE = "note", SHAPE_NOTEGROUP = "noteGroup", CSS_DIAGRAM = "statediagram", CSS_DIAGRAM_STATE = `${CSS_DIAGRAM}-state`, CSS_EDGE = "transition", CSS_NOTE = "note", CSS_EDGE_NOTE_EDGE = `${CSS_EDGE} note-edge`, CSS_DIAGRAM_NOTE = `${CSS_DIAGRAM}-${CSS_NOTE}`, CSS_DIAGRAM_CLUSTER = `${CSS_DIAGRAM}-cluster`, CSS_DIAGRAM_CLUSTER_ALT = `${CSS_DIAGRAM}-cluster-alt`, PARENT = "parent", NOTE = "note", DOMID_STATE = "state", DOMID_TYPE_SPACER = "----", NOTE_ID = `${DOMID_TYPE_SPACER}${NOTE}`, PARENT_ID = `${DOMID_TYPE_SPACER}${PARENT}`, getDir = /* @__PURE__ */ __name((e, b = DEFAULT_NESTED_DOC_DIR) => {
1335
1336
  if (!e.doc) return b;
1336
1337
  let x = b;
1337
1338
  for (let b of e.doc) b.stmt === "dir" && (x = b.value);
@@ -1345,7 +1346,7 @@ var stateDiagram_default = parser, DEFAULT_DIAGRAM_DIRECTION = "TB", DEFAULT_NES
1345
1346
  let { securityLevel: w, state: E, layout: D } = getConfig2();
1346
1347
  C.db.extract(C.db.getRootDocV2());
1347
1348
  let O = C.db.getData(), k = getDiagramElement(x, w);
1348
- O.type = C.type, O.layoutAlgorithm = D, O.nodeSpacing = E?.nodeSpacing || 50, O.rankSpacing = E?.rankSpacing || 50, O.markers = ["barb"], O.diagramId = x, await render(O, k);
1349
+ O.type = C.type, O.layoutAlgorithm = D, O.nodeSpacing = E?.nodeSpacing || 50, O.rankSpacing = E?.rankSpacing || 50, getConfig2().look === "neo" ? O.markers = ["barbNeo"] : O.markers = ["barb"], O.diagramId = x, await render(O, k);
1349
1350
  try {
1350
1351
  (typeof C.db.getLinks == "function" ? C.db.getLinks() : /* @__PURE__ */ new Map()).forEach((e, x) => {
1351
1352
  let S = typeof x == "string" ? x : typeof x?.id == "string" ? x.id : "";
@@ -1395,12 +1396,12 @@ var setupDoc = /* @__PURE__ */ __name((e, x, C, w, E, D, O, k) => {
1395
1396
  case STMT_RELATION:
1396
1397
  {
1397
1398
  dataFetcher(e, b.state1, C, w, E, D, O, k), dataFetcher(e, b.state2, C, w, E, D, O, k);
1398
- let x = {
1399
+ let x = O === "neo", A = {
1399
1400
  id: "edge" + graphItemCount,
1400
1401
  start: b.state1.id,
1401
1402
  end: b.state2.id,
1402
1403
  arrowhead: "normal",
1403
- arrowTypeEnd: "arrow_barb",
1404
+ arrowTypeEnd: x ? "arrow_barb_neo" : "arrow_barb",
1404
1405
  style: G_EDGE_STYLE,
1405
1406
  labelStyle: "",
1406
1407
  label: common_default.sanitizeText(b.description ?? "", getConfig2()),
@@ -1411,7 +1412,7 @@ var setupDoc = /* @__PURE__ */ __name((e, x, C, w, E, D, O, k) => {
1411
1412
  classes: CSS_EDGE,
1412
1413
  look: O
1413
1414
  };
1414
- E.push(x), graphItemCount++;
1415
+ E.push(A), graphItemCount++;
1415
1416
  }
1416
1417
  break;
1417
1418
  }
@@ -1467,13 +1468,15 @@ var dataFetcher = /* @__PURE__ */ __name((e, x, C, w, E, D, O, k) => {
1467
1468
  padding: 8,
1468
1469
  rx: 10,
1469
1470
  ry: 10,
1470
- look: O
1471
+ look: O,
1472
+ labelType: "markdown"
1471
1473
  };
1472
1474
  if (j.shape === SHAPE_DIVIDER && (j.label = ""), e && e.id !== "root" && (log.trace("Setting node ", A, " to be child of its parent ", e.id), j.parentId = e.id), j.centerLabel = !0, x.note) {
1473
1475
  let e = {
1474
1476
  labelStyle: "",
1475
1477
  shape: SHAPE_NOTE,
1476
1478
  label: x.note.text,
1479
+ labelType: "markdown",
1477
1480
  cssClasses: CSS_DIAGRAM_NOTE,
1478
1481
  cssStyles: [],
1479
1482
  cssCompiledStyles: [],
@@ -1777,7 +1780,7 @@ var dataFetcher = /* @__PURE__ */ __name((e, x, C, w, E, D, O, k) => {
1777
1780
  return getConfig2().state;
1778
1781
  }
1779
1782
  }, styles_default = /* @__PURE__ */ __name((e) => `
1780
- defs #statediagram-barbEnd {
1783
+ defs [id$="-barbEnd"] {
1781
1784
  fill: ${e.transitionColor};
1782
1785
  stroke: ${e.transitionColor};
1783
1786
  }
@@ -1804,12 +1807,12 @@ g.stateGroup rect {
1804
1807
 
1805
1808
  g.stateGroup line {
1806
1809
  stroke: ${e.lineColor};
1807
- stroke-width: 1;
1810
+ stroke-width: ${e.strokeWidth || 1};
1808
1811
  }
1809
1812
 
1810
1813
  .transition {
1811
1814
  stroke: ${e.transitionColor};
1812
- stroke-width: 1;
1815
+ stroke-width: ${e.strokeWidth || 1};
1813
1816
  fill: none;
1814
1817
  }
1815
1818
 
@@ -1894,21 +1897,21 @@ g.stateGroup line {
1894
1897
  .node rect {
1895
1898
  fill: ${e.stateBkg || e.mainBkg};
1896
1899
  stroke: ${e.stateBorder || e.nodeBorder};
1897
- stroke-width: 1px;
1900
+ stroke-width: ${e.strokeWidth || 1}px;
1898
1901
  }
1899
1902
  .node polygon {
1900
1903
  fill: ${e.mainBkg};
1901
1904
  stroke: ${e.stateBorder || e.nodeBorder};;
1902
- stroke-width: 1px;
1905
+ stroke-width: ${e.strokeWidth || 1}px;
1903
1906
  }
1904
- #statediagram-barbEnd {
1907
+ [id$="-barbEnd"] {
1905
1908
  fill: ${e.lineColor};
1906
1909
  }
1907
1910
 
1908
1911
  .statediagram-cluster rect {
1909
1912
  fill: ${e.compositeTitleBackground};
1910
1913
  stroke: ${e.stateBorder || e.nodeBorder};
1911
- stroke-width: 1px;
1914
+ stroke-width: ${e.strokeWidth || 1}px;
1912
1915
  }
1913
1916
 
1914
1917
  .cluster-label, .nodeLabel {
@@ -1979,10 +1982,10 @@ g.stateGroup line {
1979
1982
  color: red; // ${e.noteTextColor};
1980
1983
  }
1981
1984
 
1982
- #dependencyStart, #dependencyEnd {
1985
+ [id$="-dependencyStart"], [id$="-dependencyEnd"] {
1983
1986
  fill: ${e.lineColor};
1984
1987
  stroke: ${e.lineColor};
1985
- stroke-width: 1;
1988
+ stroke-width: ${e.strokeWidth || 1};
1986
1989
  }
1987
1990
 
1988
1991
  .statediagramTitleText {
@@ -1990,5 +1993,16 @@ g.stateGroup line {
1990
1993
  font-size: 18px;
1991
1994
  fill: ${e.textColor};
1992
1995
  }
1996
+
1997
+ [data-look="neo"].statediagram-cluster rect {
1998
+ fill: ${e.mainBkg};
1999
+ stroke: ${e.useGradient ? "url(" + e.svgId + "-gradient)" : e.stateBorder || e.nodeBorder};
2000
+ stroke-width: ${e.strokeWidth ?? 1};
2001
+ }
2002
+ [data-look="neo"].statediagram-cluster rect.outer {
2003
+ rx: ${e.radius}px;
2004
+ ry: ${e.radius}px;
2005
+ filter: ${e.dropShadow ? e.dropShadow.replace("url(#drop-shadow)", `url(${e.svgId}-drop-shadow)`) : "none"}
2006
+ }
1993
2007
  `, "getStyles");
1994
2008
  export { StateDB, stateDiagram_default, stateRenderer_v3_unified_default, styles_default };
@@ -0,0 +1,272 @@
1
+ import { __name, log } from "./chunk-AGHRB4JF.js";
2
+ import { common_default, getConfig, hasKatex, renderKatexSanitized, sanitizeText } from "./chunk-ICPOFSXX.js";
3
+ import select_default from "../../../../d3-selection/src/select.js";
4
+ import "../../../../d3/src/index.js";
5
+ import { decodeEntities } from "./chunk-5PVQY5BW.js";
6
+ import { stringToIcon } from "../../../../@iconify/utils/lib/icon/name.js";
7
+ import { getIconData } from "../../../../@iconify/utils/lib/icon-set/get-icon.js";
8
+ import { iconToSVG } from "../../../../@iconify/utils/lib/svg/build.js";
9
+ import { replaceIDs } from "../../../../@iconify/utils/lib/svg/id.js";
10
+ import { iconToHTML } from "../../../../@iconify/utils/lib/svg/html.js";
11
+ import { k } from "../../../../marked/lib/marked.esm.js";
12
+ import { dedent } from "../../../../ts-dedent/esm/index.js";
13
+ var unknownIcon = {
14
+ body: "<g><rect width=\"80\" height=\"80\" style=\"fill: #087ebf; stroke-width: 0px;\"/><text transform=\"translate(21.16 64.67)\" style=\"fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;\"><tspan x=\"0\" y=\"0\">?</tspan></text></g>",
15
+ height: 80,
16
+ width: 80
17
+ }, iconsStore = /* @__PURE__ */ new Map(), loaderStore = /* @__PURE__ */ new Map(), registerIconPacks = /* @__PURE__ */ __name((a) => {
18
+ for (let A of a) {
19
+ if (!A.name) throw Error("Invalid icon loader. Must have a \"name\" property with non-empty string value.");
20
+ if (log.debug("Registering icon pack:", A.name), "loader" in A) loaderStore.set(A.name, A.loader);
21
+ else if ("icons" in A) iconsStore.set(A.name, A.icons);
22
+ else throw log.error("Invalid icon loader:", A), Error("Invalid icon loader. Must have either \"icons\" or \"loader\" property.");
23
+ }
24
+ }, "registerIconPacks"), getRegisteredIconData = /* @__PURE__ */ __name(async (a, A) => {
25
+ let j = stringToIcon(a, !0, A !== void 0);
26
+ if (!j) throw Error(`Invalid icon name: ${a}`);
27
+ let M = j.prefix || A;
28
+ if (!M) throw Error(`Icon name must contain a prefix: ${a}`);
29
+ let N = iconsStore.get(M);
30
+ if (!N) {
31
+ let a = loaderStore.get(M);
32
+ if (!a) throw Error(`Icon set not found: ${j.prefix}`);
33
+ try {
34
+ N = {
35
+ ...await a(),
36
+ prefix: M
37
+ }, iconsStore.set(M, N);
38
+ } catch (a) {
39
+ throw log.error(a), Error(`Failed to load icon set: ${j.prefix}`);
40
+ }
41
+ }
42
+ let P = getIconData(N, j.name);
43
+ if (!P) throw Error(`Icon not found: ${a}`);
44
+ return P;
45
+ }, "getRegisteredIconData"), isIconAvailable = /* @__PURE__ */ __name(async (a) => {
46
+ try {
47
+ return await getRegisteredIconData(a), !0;
48
+ } catch {
49
+ return !1;
50
+ }
51
+ }, "isIconAvailable"), getIconSVG = /* @__PURE__ */ __name(async (a, A, M) => {
52
+ let N;
53
+ try {
54
+ N = await getRegisteredIconData(a, A?.fallbackPrefix);
55
+ } catch (a) {
56
+ log.error(a), N = unknownIcon;
57
+ }
58
+ let F = iconToSVG(N, A);
59
+ return sanitizeText(iconToHTML(replaceIDs(F.body), {
60
+ ...F.attributes,
61
+ ...M
62
+ }), getConfig());
63
+ }, "getIconSVG");
64
+ function preprocessMarkdown(a, { markdownAutoWrap: O }) {
65
+ return dedent(a.replace(/<br\/>/g, "\n").replace(/\n{2,}/g, "\n"));
66
+ }
67
+ __name(preprocessMarkdown, "preprocessMarkdown");
68
+ function nonMarkdownToLines(a) {
69
+ return a.split(/\\n|\n|<br\s*\/?>/gi).map((a) => a.trim().match(/<[^>]+>|[^\s<>]+/g)?.map((a) => ({
70
+ content: a,
71
+ type: "normal"
72
+ })) ?? []);
73
+ }
74
+ __name(nonMarkdownToLines, "nonMarkdownToLines");
75
+ function markdownToLines(O, A = {}) {
76
+ let j = preprocessMarkdown(O, A), M = k.lexer(j), N = [[]], P = 0;
77
+ function F(a, O = "normal") {
78
+ a.type === "text" ? a.text.split("\n").forEach((a, A) => {
79
+ A !== 0 && (P++, N.push([])), a.split(" ").forEach((a) => {
80
+ a = a.replace(/&#39;/g, "'"), a && N[P].push({
81
+ content: a,
82
+ type: O
83
+ });
84
+ });
85
+ }) : a.type === "strong" || a.type === "em" ? a.tokens.forEach((O) => {
86
+ F(O, a.type);
87
+ }) : a.type === "html" && N[P].push({
88
+ content: a.text,
89
+ type: "normal"
90
+ });
91
+ }
92
+ return __name(F, "processNode"), M.forEach((a) => {
93
+ a.type === "paragraph" ? a.tokens?.forEach((a) => {
94
+ F(a);
95
+ }) : a.type === "html" ? N[P].push({
96
+ content: a.text,
97
+ type: "normal"
98
+ }) : N[P].push({
99
+ content: a.raw,
100
+ type: "normal"
101
+ });
102
+ }), N;
103
+ }
104
+ __name(markdownToLines, "markdownToLines");
105
+ function nonMarkdownToHTML(a) {
106
+ return a ? `<p>${a.replace(/\\n|\n/g, "<br />")}</p>` : "";
107
+ }
108
+ __name(nonMarkdownToHTML, "nonMarkdownToHTML");
109
+ function markdownToHTML(A, { markdownAutoWrap: j } = {}) {
110
+ let M = k.lexer(A);
111
+ function N(a) {
112
+ return a.type === "text" ? j === !1 ? a.text.replace(/\n */g, "<br/>").replace(/ /g, "&nbsp;") : a.text.replace(/\n */g, "<br/>") : a.type === "strong" ? `<strong>${a.tokens?.map(N).join("")}</strong>` : a.type === "em" ? `<em>${a.tokens?.map(N).join("")}</em>` : a.type === "paragraph" ? `<p>${a.tokens?.map(N).join("")}</p>` : a.type === "space" ? "" : a.type === "html" ? `${a.text}` : a.type === "escape" ? a.text : (log.warn(`Unsupported markdown: ${a.type}`), a.raw);
113
+ }
114
+ return __name(N, "output"), M.map(N).join("");
115
+ }
116
+ __name(markdownToHTML, "markdownToHTML");
117
+ function splitTextToChars(a) {
118
+ return Intl.Segmenter ? [...new Intl.Segmenter().segment(a)].map((a) => a.segment) : [...a];
119
+ }
120
+ __name(splitTextToChars, "splitTextToChars");
121
+ function splitWordToFitWidth(a, O) {
122
+ return splitWordToFitWidthRecursion(a, [], splitTextToChars(O.content), O.type);
123
+ }
124
+ __name(splitWordToFitWidth, "splitWordToFitWidth");
125
+ function splitWordToFitWidthRecursion(a, O, A, j) {
126
+ if (A.length === 0) return [{
127
+ content: O.join(""),
128
+ type: j
129
+ }, {
130
+ content: "",
131
+ type: j
132
+ }];
133
+ let [M, ...N] = A, P = [...O, M];
134
+ return a([{
135
+ content: P.join(""),
136
+ type: j
137
+ }]) ? splitWordToFitWidthRecursion(a, P, N, j) : (O.length === 0 && M && (O.push(M), A.shift()), [{
138
+ content: O.join(""),
139
+ type: j
140
+ }, {
141
+ content: A.join(""),
142
+ type: j
143
+ }]);
144
+ }
145
+ __name(splitWordToFitWidthRecursion, "splitWordToFitWidthRecursion");
146
+ function splitLineToFitWidth(a, O) {
147
+ if (a.some(({ content: a }) => a.includes("\n"))) throw Error("splitLineToFitWidth does not support newlines in the line");
148
+ return splitLineToFitWidthRecursion(a, O);
149
+ }
150
+ __name(splitLineToFitWidth, "splitLineToFitWidth");
151
+ function splitLineToFitWidthRecursion(a, O, A = [], j = []) {
152
+ if (a.length === 0) return j.length > 0 && A.push(j), A.length > 0 ? A : [];
153
+ let M = "";
154
+ a[0].content === " " && (M = " ", a.shift());
155
+ let N = a.shift() ?? {
156
+ content: " ",
157
+ type: "normal"
158
+ }, P = [...j];
159
+ if (M !== "" && P.push({
160
+ content: M,
161
+ type: "normal"
162
+ }), P.push(N), O(P)) return splitLineToFitWidthRecursion(a, O, A, P);
163
+ if (j.length > 0) A.push(j), a.unshift(N);
164
+ else if (N.content) {
165
+ let [j, M] = splitWordToFitWidth(O, N);
166
+ A.push([j]), M.content && a.unshift(M);
167
+ }
168
+ return splitLineToFitWidthRecursion(a, O, A);
169
+ }
170
+ __name(splitLineToFitWidthRecursion, "splitLineToFitWidthRecursion");
171
+ function applyStyle(a, O) {
172
+ O && a.attr("style", O);
173
+ }
174
+ __name(applyStyle, "applyStyle");
175
+ var maxSafeSizeForWidth = 16384;
176
+ async function addHtmlSpan(a, O, F, I, L = !1, R = getConfig()) {
177
+ let z = a.append("foreignObject");
178
+ z.attr("width", `${Math.min(10 * F, maxSafeSizeForWidth)}px`), z.attr("height", `${Math.min(10 * F, maxSafeSizeForWidth)}px`);
179
+ let B = z.append("xhtml:div"), V = hasKatex(O.label) ? await renderKatexSanitized(O.label.replace(common_default.lineBreakRegex, "\n"), R) : sanitizeText(O.label, R), H = O.isNode ? "nodeLabel" : "edgeLabel", U = B.append("span");
180
+ U.html(V), applyStyle(U, O.labelStyle), U.attr("class", `${H} ${I}`), applyStyle(B, O.labelStyle), B.style("display", "table-cell"), B.style("white-space", "nowrap"), B.style("line-height", "1.5"), F !== Infinity && (B.style("max-width", F + "px"), B.style("text-align", "center")), B.attr("xmlns", "http://www.w3.org/1999/xhtml"), L && B.attr("class", "labelBkg");
181
+ let W = B.node().getBoundingClientRect();
182
+ return W.width === F && (B.style("display", "table"), B.style("white-space", "break-spaces"), B.style("width", F + "px"), W = B.node().getBoundingClientRect()), z.node();
183
+ }
184
+ __name(addHtmlSpan, "addHtmlSpan");
185
+ function createTspan(a, O, A, j = !1) {
186
+ let M = a.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", O * A - .1 + "em").attr("dy", A + "em");
187
+ return j && M.attr("text-anchor", "middle"), M;
188
+ }
189
+ __name(createTspan, "createTspan");
190
+ function computeWidthOfText(a, O, A) {
191
+ let j = a.append("text"), M = createTspan(j, 1, O);
192
+ updateTextContentAndStyles(M, A);
193
+ let N = M.node().getComputedTextLength();
194
+ return j.remove(), N;
195
+ }
196
+ __name(computeWidthOfText, "computeWidthOfText");
197
+ function computeDimensionOfText(a, O, A) {
198
+ let j = a.append("text"), M = createTspan(j, 1, O);
199
+ updateTextContentAndStyles(M, [{
200
+ content: A,
201
+ type: "normal"
202
+ }]);
203
+ let N = M.node()?.getBoundingClientRect();
204
+ return N && j.remove(), N;
205
+ }
206
+ __name(computeDimensionOfText, "computeDimensionOfText");
207
+ function createFormattedText(O, A, j, M = !1, N = !1) {
208
+ let P = 1.1, F = A.append("g"), I = F.insert("rect").attr("class", "background").attr("style", "stroke: none"), L = F.append("text").attr("y", "-10.1");
209
+ N && L.attr("text-anchor", "middle");
210
+ let R = 0;
211
+ for (let A of j) {
212
+ let j = /* @__PURE__ */ __name((a) => computeWidthOfText(F, P, a) <= O, "checkWidth"), M = j(A) ? [A] : splitLineToFitWidth(A, j);
213
+ for (let a of M) updateTextContentAndStyles(createTspan(L, R, P, N), a), R++;
214
+ }
215
+ if (M) {
216
+ let a = L.node().getBBox();
217
+ return I.attr("x", a.x - 2).attr("y", a.y - 2).attr("width", a.width + 4).attr("height", a.height + 4), F.node();
218
+ } else return L.node();
219
+ }
220
+ __name(createFormattedText, "createFormattedText");
221
+ function decodeHTMLEntities(a) {
222
+ return a.replace(/&(amp|lt|gt);/g, (a, O) => {
223
+ switch (O) {
224
+ case "amp": return "&";
225
+ case "lt": return "<";
226
+ case "gt": return ">";
227
+ default: return a;
228
+ }
229
+ });
230
+ }
231
+ __name(decodeHTMLEntities, "decodeHTMLEntities");
232
+ function updateTextContentAndStyles(a, O) {
233
+ a.text(""), O.forEach((O, A) => {
234
+ let j = a.append("tspan").attr("font-style", O.type === "em" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", O.type === "strong" ? "bold" : "normal");
235
+ A === 0 ? j.text(decodeHTMLEntities(O.content)) : j.text(" " + decodeHTMLEntities(O.content));
236
+ });
237
+ }
238
+ __name(updateTextContentAndStyles, "updateTextContentAndStyles");
239
+ async function replaceIconSubstring(a, O = {}) {
240
+ let A = [];
241
+ a.replace(/(fa[bklrs]?):fa-([\w-]+)/g, (a, j, M) => (A.push((async () => {
242
+ let A = `${j}:${M}`;
243
+ return await isIconAvailable(A) ? await getIconSVG(A, void 0, { class: "label-icon" }) : `<i class='${sanitizeText(a, O).replace(":", " ")}'></i>`;
244
+ })()), a));
245
+ let j = await Promise.all(A);
246
+ return a.replace(/(fa[bklrs]?):fa-([\w-]+)/g, () => j.shift() ?? "");
247
+ }
248
+ __name(replaceIconSubstring, "replaceIconSubstring");
249
+ var createText = /* @__PURE__ */ __name(async (a, A = "", { style: j = "", isTitle: N = !1, classes: P = "", useHtmlLabels: L = !0, markdown: R = !0, isNode: z = !0, width: B = 200, addSvgBackground: V = !1 } = {}, H) => {
250
+ if (log.debug("XYZ createText", A, j, N, P, L, z, "addSvgBackground: ", V), L) {
251
+ let O = await replaceIconSubstring(decodeEntities(R ? markdownToHTML(A, H) : nonMarkdownToHTML(A)), H), N = A.replace(/\\\\/g, "\\");
252
+ return await addHtmlSpan(a, {
253
+ isNode: z,
254
+ label: hasKatex(A) ? N : O,
255
+ labelStyle: j.replace("fill:", "color:")
256
+ }, B, P, V, H);
257
+ } else {
258
+ let O = decodeEntities(A.replace(/<br\s*\/?>/g, "<br/>")), M = createFormattedText(B, a, R ? markdownToLines(O.replace("<br>", "<br/>"), H) : nonMarkdownToLines(O), A ? V : !1, !z);
259
+ if (z) {
260
+ /stroke:/.exec(j) && (j = j.replace("stroke:", "lineColor:"));
261
+ let a = j.replace(/stroke:[^;]+;?/g, "").replace(/stroke-width:[^;]+;?/g, "").replace(/fill:[^;]+;?/g, "").replace(/color:/g, "fill:");
262
+ select_default(M).attr("style", a);
263
+ } else {
264
+ let a = j.replace(/stroke:[^;]+;?/g, "").replace(/stroke-width:[^;]+;?/g, "").replace(/fill:[^;]+;?/g, "").replace(/background:/g, "fill:");
265
+ select_default(M).select("rect").attr("style", a.replace(/background:/g, "fill:"));
266
+ let O = j.replace(/stroke:[^;]+;?/g, "").replace(/stroke-width:[^;]+;?/g, "").replace(/fill:[^;]+;?/g, "").replace(/color:/g, "fill:");
267
+ select_default(M).select("text").attr("style", O);
268
+ }
269
+ return N ? select_default(M).selectAll("tspan.text-outer-tspan").classed("title-row", !0) : select_default(M).selectAll("tspan.text-outer-tspan").classed("row", !0), M;
270
+ }
271
+ }, "createText");
272
+ export { computeDimensionOfText, createText, getIconSVG, registerIconPacks, unknownIcon };
@@ -1,5 +1,5 @@
1
1
  import { __name } from "./chunk-AGHRB4JF.js";
2
- import { getConfig2 } from "./chunk-ABZYJK2D.js";
2
+ import { getConfig2 } from "./chunk-ICPOFSXX.js";
3
3
  var solidStateFill = /* @__PURE__ */ __name((e) => {
4
4
  let { handDrawnSeed: r } = getConfig2();
5
5
  return {
@@ -560,6 +560,15 @@ function charFromCodepoint(c) {
560
560
  return c <= 65535 ? String.fromCharCode(c) : String.fromCharCode((c - 65536 >> 10) + 55296, (c - 65536 & 1023) + 56320);
561
561
  }
562
562
  __name(charFromCodepoint, "charFromCodepoint");
563
+ function setProperty(c, I, L) {
564
+ I === "__proto__" ? Object.defineProperty(c, I, {
565
+ configurable: !0,
566
+ enumerable: !0,
567
+ writable: !0,
568
+ value: L
569
+ }) : c[I] = L;
570
+ }
571
+ __name(setProperty, "setProperty");
563
572
  var simpleEscapeCheck = Array(256), simpleEscapeMap = Array(256);
564
573
  for (i = 0; i < 256; i++) simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0, simpleEscapeMap[i] = simpleEscapeSequence(i);
565
574
  var i;
@@ -613,7 +622,7 @@ function captureSegment(c, I, L, R) {
613
622
  __name(captureSegment, "captureSegment");
614
623
  function mergeMappings(c, I, L, R) {
615
624
  var z, B, V, U;
616
- for (common.isObject(L) || throwError(c, "cannot merge mappings; the provided source object is unacceptable"), z = Object.keys(L), V = 0, U = z.length; V < U; V += 1) B = z[V], _hasOwnProperty$1.call(I, B) || (I[B] = L[B], R[B] = !0);
625
+ for (common.isObject(L) || throwError(c, "cannot merge mappings; the provided source object is unacceptable"), z = Object.keys(L), V = 0, U = z.length; V < U; V += 1) B = z[V], _hasOwnProperty$1.call(I, B) || (setProperty(I, B, L[B]), R[B] = !0);
617
626
  }
618
627
  __name(mergeMappings, "mergeMappings");
619
628
  function storeMappingPair(c, I, L, R, z, B, V, H, U) {
@@ -621,12 +630,7 @@ function storeMappingPair(c, I, L, R, z, B, V, H, U) {
621
630
  if (Array.isArray(z)) for (z = Array.prototype.slice.call(z), W = 0, G = z.length; W < G; W += 1) Array.isArray(z[W]) && throwError(c, "nested arrays are not supported inside keys"), typeof z == "object" && _class(z[W]) === "[object Object]" && (z[W] = "[object Object]");
622
631
  if (typeof z == "object" && _class(z) === "[object Object]" && (z = "[object Object]"), z = String(z), I === null && (I = {}), R === "tag:yaml.org,2002:merge") if (Array.isArray(B)) for (W = 0, G = B.length; W < G; W += 1) mergeMappings(c, I, B[W], L);
623
632
  else mergeMappings(c, I, B, L);
624
- else !c.json && !_hasOwnProperty$1.call(L, z) && _hasOwnProperty$1.call(I, z) && (c.line = V || c.line, c.lineStart = H || c.lineStart, c.position = U || c.position, throwError(c, "duplicated mapping key")), z === "__proto__" ? Object.defineProperty(I, z, {
625
- configurable: !0,
626
- enumerable: !0,
627
- writable: !0,
628
- value: B
629
- }) : I[z] = B, delete L[z];
633
+ else !c.json && !_hasOwnProperty$1.call(L, z) && _hasOwnProperty$1.call(I, z) && (c.line = V || c.line, c.lineStart = H || c.lineStart, c.position = U || c.position, throwError(c, "duplicated mapping key")), setProperty(I, z, B), delete L[z];
630
634
  return I;
631
635
  }
632
636
  __name(storeMappingPair, "storeMappingPair");
@@ -0,0 +1,60 @@
1
+ import { __name } from "./chunk-AGHRB4JF.js";
2
+ import { lineBreakRegex } from "./chunk-ICPOFSXX.js";
3
+ import select_default from "../../../../d3-selection/src/select.js";
4
+ import "../../../../d3/src/index.js";
5
+ import { require_dist } from "../../../../@braintree/sanitize-url/dist/index.js";
6
+ var import_dist = require_dist(), drawRect = /* @__PURE__ */ __name((e, s) => {
7
+ let c = e.append("rect");
8
+ if (c.attr("x", s.x), c.attr("y", s.y), c.attr("fill", s.fill), c.attr("stroke", s.stroke), c.attr("width", s.width), c.attr("height", s.height), s.name && c.attr("name", s.name), s.rx && c.attr("rx", s.rx), s.ry && c.attr("ry", s.ry), s.attrs !== void 0) for (let e in s.attrs) c.attr(e, s.attrs[e]);
9
+ return s.class && c.attr("class", s.class), c;
10
+ }, "drawRect"), drawBackgroundRect = /* @__PURE__ */ __name((e, s) => {
11
+ drawRect(e, {
12
+ x: s.startx,
13
+ y: s.starty,
14
+ width: s.stopx - s.startx,
15
+ height: s.stopy - s.starty,
16
+ fill: s.fill,
17
+ stroke: s.stroke,
18
+ class: "rect"
19
+ }).lower();
20
+ }, "drawBackgroundRect"), drawText = /* @__PURE__ */ __name((e, c) => {
21
+ let l = c.text.replace(lineBreakRegex, " "), u = e.append("text");
22
+ u.attr("x", c.x), u.attr("y", c.y), u.attr("class", "legend"), u.style("text-anchor", c.anchor), c.class && u.attr("class", c.class);
23
+ let d = u.append("tspan");
24
+ return d.attr("x", c.x + c.textMargin * 2), d.text(l), u;
25
+ }, "drawText"), drawImage = /* @__PURE__ */ __name((e, s, c, l) => {
26
+ let d = e.append("image");
27
+ d.attr("x", s), d.attr("y", c);
28
+ let f = (0, import_dist.sanitizeUrl)(l);
29
+ d.attr("xlink:href", f);
30
+ }, "drawImage"), drawEmbeddedImage = /* @__PURE__ */ __name((e, s, c, l) => {
31
+ let d = e.append("use");
32
+ d.attr("x", s), d.attr("y", c);
33
+ let f = (0, import_dist.sanitizeUrl)(l);
34
+ d.attr("xlink:href", `#${f}`);
35
+ }, "drawEmbeddedImage"), getNoteRect = /* @__PURE__ */ __name(() => ({
36
+ x: 0,
37
+ y: 0,
38
+ width: 100,
39
+ height: 100,
40
+ fill: "#EDF2AE",
41
+ stroke: "#666",
42
+ anchor: "start",
43
+ rx: 0,
44
+ ry: 0
45
+ }), "getNoteRect"), getTextObj = /* @__PURE__ */ __name(() => ({
46
+ x: 0,
47
+ y: 0,
48
+ width: 100,
49
+ height: 100,
50
+ "text-anchor": "start",
51
+ style: "#666",
52
+ textMargin: 0,
53
+ rx: 0,
54
+ ry: 0,
55
+ tspan: !0
56
+ }), "getTextObj"), createTooltip = /* @__PURE__ */ __name(() => {
57
+ let e = select_default(".mermaidTooltip");
58
+ return e.empty() && (e = select_default("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0).style("position", "absolute").style("text-align", "center").style("max-width", "200px").style("padding", "2px").style("font-size", "12px").style("background", "#ffffde").style("border", "1px solid #333").style("border-radius", "2px").style("pointer-events", "none").style("z-index", "100")), e;
59
+ }, "createTooltip");
60
+ export { createTooltip, drawBackgroundRect, drawEmbeddedImage, drawImage, drawRect, drawText, getNoteRect, getTextObj };
@@ -0,0 +1,30 @@
1
+ import { __name } from "./chunk-AGHRB4JF.js";
2
+ import { defaultConfig_default, getConfig2 } from "./chunk-ICPOFSXX.js";
3
+ import { parseFontSize } from "./chunk-5PVQY5BW.js";
4
+ var getSubGraphTitleMargins = /* @__PURE__ */ __name(({ flowchart: e }) => {
5
+ let n = e?.subGraphTitleMargin?.top ?? 0, r = e?.subGraphTitleMargin?.bottom ?? 0;
6
+ return {
7
+ subGraphTitleTopMargin: n,
8
+ subGraphTitleBottomMargin: r,
9
+ subGraphTitleTotalMargin: n + r
10
+ };
11
+ }, "getSubGraphTitleMargins");
12
+ async function configureLabelImages(i, a) {
13
+ let o = i.getElementsByTagName("img");
14
+ if (!o || o.length === 0) return;
15
+ let s = a.replace(/<img[^>]*>/g, "").trim() === "";
16
+ await Promise.all([...o].map((i) => new Promise((a) => {
17
+ function o() {
18
+ if (i.style.display = "flex", i.style.flexDirection = "column", s) {
19
+ let [e = defaultConfig_default.fontSize] = parseFontSize(getConfig2().fontSize ? getConfig2().fontSize : window.getComputedStyle(document.body).fontSize), a = e * 5 + "px";
20
+ i.style.minWidth = a, i.style.maxWidth = a;
21
+ } else i.style.width = "100%";
22
+ a(i);
23
+ }
24
+ __name(o, "setupImage"), setTimeout(() => {
25
+ i.complete && o();
26
+ }), i.addEventListener("error", o), i.addEventListener("load", o);
27
+ })));
28
+ }
29
+ __name(configureLabelImages, "configureLabelImages");
30
+ export { configureLabelImages, getSubGraphTitleMargins };
@@ -1,17 +1,18 @@
1
1
  import { __name } from "./chunk-AGHRB4JF.js";
2
- import "./chunk-ABZYJK2D.js";
3
- import "./chunk-HN2XXSSU.js";
4
- import "./chunk-CVBHYZKI.js";
5
- import "./chunk-ATLVNIR6.js";
6
- import "./chunk-S3R3BYOJ.js";
7
- import "./chunk-JA3XYJ7Z.js";
8
- import "./chunk-JZLCHNYA.js";
9
- import "./chunk-QXUST7PY.js";
10
- import "./chunk-N4CR4FBY.js";
2
+ import "./chunk-ICPOFSXX.js";
3
+ import "./chunk-BSJP7CBP.js";
4
+ import "./chunk-5PVQY5BW.js";
5
+ import "./chunk-ZZ45TVLE.js";
6
+ import "./chunk-X2U36JSP.js";
7
+ import "./chunk-U2HBQHQK.js";
8
+ import "./chunk-5FUZZQ4R.js";
9
+ import "./chunk-ENJZ2VHE.js";
10
+ import "./chunk-336JU56O.js";
11
11
  import "./chunk-FMBD7UC4.js";
12
+ import "./chunk-YZCP3GAM.js";
12
13
  import "./chunk-55IACEB6.js";
13
- import "./chunk-QN33PNHL.js";
14
- import { ClassDB, classDiagram_default, classRenderer_v3_unified_default, styles_default } from "./chunk-B4BG7PRW.js";
14
+ import "./chunk-EDXVE4YY.js";
15
+ import { ClassDB, classDiagram_default, classRenderer_v3_unified_default, styles_default } from "./chunk-4TB4RGXK.js";
15
16
  var diagram = {
16
17
  parser: classDiagram_default,
17
18
  get db() {
@@ -1,17 +1,18 @@
1
1
  import { __name } from "./chunk-AGHRB4JF.js";
2
- import "./chunk-ABZYJK2D.js";
3
- import "./chunk-HN2XXSSU.js";
4
- import "./chunk-CVBHYZKI.js";
5
- import "./chunk-ATLVNIR6.js";
6
- import "./chunk-S3R3BYOJ.js";
7
- import "./chunk-JA3XYJ7Z.js";
8
- import "./chunk-JZLCHNYA.js";
9
- import "./chunk-QXUST7PY.js";
10
- import "./chunk-N4CR4FBY.js";
2
+ import "./chunk-ICPOFSXX.js";
3
+ import "./chunk-BSJP7CBP.js";
4
+ import "./chunk-5PVQY5BW.js";
5
+ import "./chunk-ZZ45TVLE.js";
6
+ import "./chunk-X2U36JSP.js";
7
+ import "./chunk-U2HBQHQK.js";
8
+ import "./chunk-5FUZZQ4R.js";
9
+ import "./chunk-ENJZ2VHE.js";
10
+ import "./chunk-336JU56O.js";
11
11
  import "./chunk-FMBD7UC4.js";
12
+ import "./chunk-YZCP3GAM.js";
12
13
  import "./chunk-55IACEB6.js";
13
- import "./chunk-QN33PNHL.js";
14
- import { ClassDB, classDiagram_default, classRenderer_v3_unified_default, styles_default } from "./chunk-B4BG7PRW.js";
14
+ import "./chunk-EDXVE4YY.js";
15
+ import { ClassDB, classDiagram_default, classRenderer_v3_unified_default, styles_default } from "./chunk-4TB4RGXK.js";
15
16
  var diagram = {
16
17
  parser: classDiagram_default,
17
18
  get db() {