gitnexus 1.6.9 → 1.6.10-aptos.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (539) hide show
  1. package/README.md +211 -53
  2. package/dist/_shared/graph/types.d.ts +67 -3
  3. package/dist/_shared/graph/types.d.ts.map +1 -1
  4. package/dist/_shared/index.d.ts +1 -0
  5. package/dist/_shared/index.d.ts.map +1 -1
  6. package/dist/_shared/index.js.map +1 -1
  7. package/dist/_shared/integrations/resilient-fetch.d.ts +3 -1
  8. package/dist/_shared/integrations/resilient-fetch.d.ts.map +1 -1
  9. package/dist/_shared/integrations/resilient-fetch.js +4 -3
  10. package/dist/_shared/integrations/resilient-fetch.js.map +1 -1
  11. package/dist/_shared/language-detection.d.ts.map +1 -1
  12. package/dist/_shared/language-detection.js +2 -0
  13. package/dist/_shared/language-detection.js.map +1 -1
  14. package/dist/_shared/languages.d.ts +2 -0
  15. package/dist/_shared/languages.d.ts.map +1 -1
  16. package/dist/_shared/languages.js +2 -0
  17. package/dist/_shared/languages.js.map +1 -1
  18. package/dist/_shared/lbug/schema-constants.d.ts +2 -2
  19. package/dist/_shared/lbug/schema-constants.d.ts.map +1 -1
  20. package/dist/_shared/lbug/schema-constants.js +8 -0
  21. package/dist/_shared/lbug/schema-constants.js.map +1 -1
  22. package/dist/_shared/pipeline.d.ts +1 -1
  23. package/dist/_shared/pipeline.d.ts.map +1 -1
  24. package/dist/_shared/scope-resolution/callable-flow-site.d.ts +110 -0
  25. package/dist/_shared/scope-resolution/callable-flow-site.d.ts.map +1 -0
  26. package/dist/_shared/scope-resolution/callable-flow-site.js +11 -0
  27. package/dist/_shared/scope-resolution/callable-flow-site.js.map +1 -0
  28. package/dist/_shared/scope-resolution/finalize-algorithm.d.ts +1 -1
  29. package/dist/_shared/scope-resolution/finalize-algorithm.d.ts.map +1 -1
  30. package/dist/_shared/scope-resolution/finalize-algorithm.js +1 -1
  31. package/dist/_shared/scope-resolution/finalize-algorithm.js.map +1 -1
  32. package/dist/_shared/scope-resolution/language-classification.d.ts.map +1 -1
  33. package/dist/_shared/scope-resolution/language-classification.js +1 -0
  34. package/dist/_shared/scope-resolution/language-classification.js.map +1 -1
  35. package/dist/_shared/scope-resolution/parsed-file.d.ts +7 -0
  36. package/dist/_shared/scope-resolution/parsed-file.d.ts.map +1 -1
  37. package/dist/_shared/scope-resolution/reference-site.d.ts +9 -1
  38. package/dist/_shared/scope-resolution/reference-site.d.ts.map +1 -1
  39. package/dist/_shared/scope-resolution/types.d.ts +20 -3
  40. package/dist/_shared/scope-resolution/types.d.ts.map +1 -1
  41. package/dist/cli/ai-context.d.ts +1 -1
  42. package/dist/cli/ai-context.js +25 -44
  43. package/dist/cli/analyze.d.ts +5 -2
  44. package/dist/cli/analyze.js +197 -11
  45. package/dist/cli/clean.js +17 -3
  46. package/dist/cli/cli-message.d.ts +1 -1
  47. package/dist/cli/doctor.d.ts +18 -0
  48. package/dist/cli/doctor.js +96 -5
  49. package/dist/cli/editor-targets.d.ts +17 -2
  50. package/dist/cli/editor-targets.js +44 -0
  51. package/dist/cli/embeddings.d.ts +12 -0
  52. package/dist/cli/embeddings.js +49 -0
  53. package/dist/cli/eval-server.d.ts +23 -1
  54. package/dist/cli/eval-server.js +126 -8
  55. package/dist/cli/help-i18n.js +6 -0
  56. package/dist/cli/i18n/en.d.ts +18 -8
  57. package/dist/cli/i18n/en.js +18 -8
  58. package/dist/cli/i18n/resources.d.ts +28 -8
  59. package/dist/cli/i18n/zh-CN.d.ts +10 -0
  60. package/dist/cli/i18n/zh-CN.js +18 -8
  61. package/dist/cli/index.js +21 -7
  62. package/dist/cli/lazy-action.d.ts +7 -0
  63. package/dist/cli/lazy-action.js +27 -0
  64. package/dist/cli/mcp.js +6 -3
  65. package/dist/cli/move-availability.d.ts +5 -0
  66. package/dist/cli/move-availability.js +11 -0
  67. package/dist/cli/setup.d.ts +8 -0
  68. package/dist/cli/setup.js +230 -32
  69. package/dist/cli/skill-gen.js +38 -18
  70. package/dist/cli/standard-skills.d.ts +76 -0
  71. package/dist/cli/standard-skills.js +45 -0
  72. package/dist/cli/status.d.ts +4 -1
  73. package/dist/cli/status.js +57 -4
  74. package/dist/cli/tool.js +11 -0
  75. package/dist/cli/uninstall.js +77 -18
  76. package/dist/cli/wiki.d.ts +1 -0
  77. package/dist/cli/wiki.js +7 -1
  78. package/dist/config/ignore-service.d.ts +2 -0
  79. package/dist/config/ignore-service.js +27 -0
  80. package/dist/core/analysis-features.d.ts +21 -0
  81. package/dist/core/analysis-features.js +59 -0
  82. package/dist/core/analyzer-identity.d.ts +74 -0
  83. package/dist/core/analyzer-identity.js +1820 -0
  84. package/dist/core/augmentation/engine.js +13 -8
  85. package/dist/core/embeddings/embedder.d.ts +3 -2
  86. package/dist/core/embeddings/embedder.js +24 -7
  87. package/dist/core/embeddings/embedding-identity.d.ts +11 -0
  88. package/dist/core/embeddings/embedding-identity.js +24 -0
  89. package/dist/core/embeddings/embedding-pipeline.d.ts +36 -1
  90. package/dist/core/embeddings/embedding-pipeline.js +100 -9
  91. package/dist/core/embeddings/http-client.d.ts +33 -3
  92. package/dist/core/embeddings/http-client.js +237 -25
  93. package/dist/core/embeddings/node-module-compat.d.ts +25 -0
  94. package/dist/core/embeddings/node-module-compat.js +25 -0
  95. package/dist/core/embeddings/onnxruntime-common-resolver.js +8 -5
  96. package/dist/core/embeddings/onnxruntime-node-resolver.js +33 -7
  97. package/dist/core/embeddings/runtime-install.d.ts +119 -0
  98. package/dist/core/embeddings/runtime-install.js +372 -0
  99. package/dist/core/embeddings/runtime-support.d.ts +48 -17
  100. package/dist/core/embeddings/runtime-support.js +96 -0
  101. package/dist/core/git-staleness.js +1 -1
  102. package/dist/core/group/bridge-db.js +2 -0
  103. package/dist/core/group/extractors/http-patterns/python.js +246 -108
  104. package/dist/core/group/extractors/manifest-extractor.js +4 -0
  105. package/dist/core/incremental/escalation-gate.d.ts +38 -0
  106. package/dist/core/incremental/escalation-gate.js +48 -0
  107. package/dist/core/incremental/shadow-candidates.d.ts +3 -3
  108. package/dist/core/incremental/shadow-candidates.js +3 -3
  109. package/dist/core/incremental/subgraph-extract.d.ts +2 -2
  110. package/dist/core/incremental/subgraph-extract.js +2 -2
  111. package/dist/core/index-freshness.d.ts +5 -0
  112. package/dist/core/index-freshness.js +13 -0
  113. package/dist/core/ingestion/class-extractors/configs/jvm.js +29 -0
  114. package/dist/core/ingestion/cobol/cobol-preprocessor.js +1 -1
  115. package/dist/core/ingestion/cobol/jcl-processor.js +9 -8
  116. package/dist/core/ingestion/cobol-processor.js +27 -26
  117. package/dist/core/ingestion/community-processor.d.ts +51 -1
  118. package/dist/core/ingestion/community-processor.js +323 -64
  119. package/dist/core/ingestion/emit-references.js +7 -2
  120. package/dist/core/ingestion/filesystem-walker.js +4 -0
  121. package/dist/core/ingestion/frameworks/spring/analysis-features.d.ts +3 -0
  122. package/dist/core/ingestion/frameworks/spring/analysis-features.js +7 -0
  123. package/dist/core/ingestion/frameworks/spring/bean-candidates.d.ts +30 -0
  124. package/dist/core/ingestion/frameworks/spring/bean-candidates.js +182 -0
  125. package/dist/core/ingestion/frameworks/spring/bean-catalog.d.ts +12 -0
  126. package/dist/core/ingestion/frameworks/spring/bean-catalog.js +26 -0
  127. package/dist/core/ingestion/frameworks/spring/config-bindings.d.ts +24 -0
  128. package/dist/core/ingestion/frameworks/spring/config-bindings.js +115 -0
  129. package/dist/core/ingestion/languages/c/captures.js +56 -0
  130. package/dist/core/ingestion/languages/c/query.js +17 -0
  131. package/dist/core/ingestion/languages/c/scope-resolver.js +6 -0
  132. package/dist/core/ingestion/languages/cobol/captures.js +93 -0
  133. package/dist/core/ingestion/languages/cobol/scope-resolver.js +7 -0
  134. package/dist/core/ingestion/languages/cpp/captures.js +365 -75
  135. package/dist/core/ingestion/languages/cpp/scope-resolver.js +14 -0
  136. package/dist/core/ingestion/languages/csharp/captures.js +25 -0
  137. package/dist/core/ingestion/languages/dart/captures.js +90 -2
  138. package/dist/core/ingestion/languages/dart/extension-type-preprocess.d.ts +7 -0
  139. package/dist/core/ingestion/languages/dart/extension-type-preprocess.js +30 -0
  140. package/dist/core/ingestion/languages/dart.js +2 -0
  141. package/dist/core/ingestion/languages/go/captures.js +34 -0
  142. package/dist/core/ingestion/languages/index.d.ts +1 -0
  143. package/dist/core/ingestion/languages/index.js +2 -0
  144. package/dist/core/ingestion/languages/java/analysis-features.d.ts +3 -0
  145. package/dist/core/ingestion/languages/java/analysis-features.js +13 -0
  146. package/dist/core/ingestion/languages/java/capture-side-channel.d.ts +22 -0
  147. package/dist/core/ingestion/languages/java/capture-side-channel.js +58 -0
  148. package/dist/core/ingestion/languages/java/captures.d.ts +4 -3
  149. package/dist/core/ingestion/languages/java/captures.js +193 -17
  150. package/dist/core/ingestion/languages/java/package-facts.d.ts +5 -0
  151. package/dist/core/ingestion/languages/java/package-facts.js +9 -0
  152. package/dist/core/ingestion/languages/java/package-siblings.d.ts +3 -16
  153. package/dist/core/ingestion/languages/java/package-siblings.js +8 -147
  154. package/dist/core/ingestion/languages/java/query.js +23 -0
  155. package/dist/core/ingestion/languages/java/scope-resolver.js +23 -0
  156. package/dist/core/ingestion/languages/java/spring-bean-metadata.d.ts +2 -0
  157. package/dist/core/ingestion/languages/java/spring-bean-metadata.js +8 -0
  158. package/dist/core/ingestion/languages/java/spring-config-bindings.d.ts +23 -0
  159. package/dist/core/ingestion/languages/java/spring-config-bindings.js +215 -0
  160. package/dist/core/ingestion/languages/java.js +3 -0
  161. package/dist/core/ingestion/languages/javascript/captures.js +16 -0
  162. package/dist/core/ingestion/languages/javascript/query.js +21 -0
  163. package/dist/core/ingestion/languages/jvm/package-facts.d.ts +35 -0
  164. package/dist/core/ingestion/languages/jvm/package-facts.js +40 -0
  165. package/dist/core/ingestion/languages/jvm/package-siblings.d.ts +14 -0
  166. package/dist/core/ingestion/languages/jvm/package-siblings.js +129 -0
  167. package/dist/core/ingestion/languages/kotlin/capture-side-channel.d.ts +17 -3
  168. package/dist/core/ingestion/languages/kotlin/capture-side-channel.js +42 -8
  169. package/dist/core/ingestion/languages/kotlin/captures.js +59 -0
  170. package/dist/core/ingestion/languages/kotlin/package-facts.d.ts +5 -0
  171. package/dist/core/ingestion/languages/kotlin/package-facts.js +9 -0
  172. package/dist/core/ingestion/languages/kotlin/package-siblings.d.ts +4 -0
  173. package/dist/core/ingestion/languages/kotlin/package-siblings.js +8 -0
  174. package/dist/core/ingestion/languages/kotlin/query.js +19 -0
  175. package/dist/core/ingestion/languages/kotlin/scope-resolver.js +9 -1
  176. package/dist/core/ingestion/languages/kotlin/spring-bean-metadata.d.ts +2 -0
  177. package/dist/core/ingestion/languages/kotlin/spring-bean-metadata.js +8 -0
  178. package/dist/core/ingestion/languages/kotlin.js +5 -6
  179. package/dist/core/ingestion/languages/move.d.ts +1 -0
  180. package/dist/core/ingestion/languages/move.js +27 -0
  181. package/dist/core/ingestion/languages/php/captures.js +40 -0
  182. package/dist/core/ingestion/languages/php/import-decomposer.js +12 -0
  183. package/dist/core/ingestion/languages/php/import-target.d.ts +2 -1
  184. package/dist/core/ingestion/languages/php/import-target.js +110 -2
  185. package/dist/core/ingestion/languages/php/interpret.js +10 -0
  186. package/dist/core/ingestion/languages/php/scope-resolver.js +1 -1
  187. package/dist/core/ingestion/languages/python/captures.d.ts +3 -4
  188. package/dist/core/ingestion/languages/python/captures.js +24 -5
  189. package/dist/core/ingestion/languages/python/interpret.js +4 -0
  190. package/dist/core/ingestion/languages/python/receiver-binding.d.ts +15 -2
  191. package/dist/core/ingestion/languages/python/receiver-binding.js +96 -2
  192. package/dist/core/ingestion/languages/python/simple-hooks.d.ts +5 -5
  193. package/dist/core/ingestion/languages/python/simple-hooks.js +15 -5
  194. package/dist/core/ingestion/languages/ruby/captures.js +42 -0
  195. package/dist/core/ingestion/languages/rust/captures.js +13 -0
  196. package/dist/core/ingestion/languages/rust/interpret.js +18 -0
  197. package/dist/core/ingestion/languages/rust/query.js +9 -0
  198. package/dist/core/ingestion/languages/rust/range-binding.js +6 -2
  199. package/dist/core/ingestion/languages/swift/captures.js +12 -0
  200. package/dist/core/ingestion/languages/typescript/captures.js +21 -0
  201. package/dist/core/ingestion/languages/typescript/nuxt-auto-imports.js +2 -1
  202. package/dist/core/ingestion/languages/typescript/query.js +37 -0
  203. package/dist/core/ingestion/markdown-processor.js +3 -2
  204. package/dist/core/ingestion/model/registration-table.js +1 -0
  205. package/dist/core/ingestion/parsing-processor.d.ts +3 -1
  206. package/dist/core/ingestion/parsing-processor.js +36 -1
  207. package/dist/core/ingestion/pipeline-phases/index.d.ts +2 -0
  208. package/dist/core/ingestion/pipeline-phases/index.js +2 -0
  209. package/dist/core/ingestion/pipeline-phases/parse-impl.js +56 -2
  210. package/dist/core/ingestion/pipeline-phases/parse.d.ts +0 -2
  211. package/dist/core/ingestion/pipeline-phases/parse.js +12 -3
  212. package/dist/core/ingestion/pipeline-phases/processes.d.ts +8 -0
  213. package/dist/core/ingestion/pipeline-phases/processes.js +11 -1
  214. package/dist/core/ingestion/pipeline-phases/spring-config.d.ts +37 -0
  215. package/dist/core/ingestion/pipeline-phases/spring-config.js +433 -0
  216. package/dist/core/ingestion/pipeline-phases/standalone-ingest.d.ts +10 -0
  217. package/dist/core/ingestion/pipeline-phases/standalone-ingest.js +6 -0
  218. package/dist/core/ingestion/pipeline.d.ts +4 -2
  219. package/dist/core/ingestion/pipeline.js +5 -2
  220. package/dist/core/ingestion/resolve-references.js +12 -0
  221. package/dist/core/ingestion/route-extractors/constant-resolver.d.ts +83 -0
  222. package/dist/core/ingestion/route-extractors/constant-resolver.js +131 -0
  223. package/dist/core/ingestion/route-extractors/python-const-resolver.d.ts +75 -0
  224. package/dist/core/ingestion/route-extractors/python-const-resolver.js +299 -0
  225. package/dist/core/ingestion/scope-extractor.js +306 -43
  226. package/dist/core/ingestion/scope-resolution/contract/scope-resolver.d.ts +71 -2
  227. package/dist/core/ingestion/scope-resolution/graph-bridge/callee-id-sink.d.ts +7 -7
  228. package/dist/core/ingestion/scope-resolution/graph-bridge/callee-id-sink.js +8 -7
  229. package/dist/core/ingestion/scope-resolution/graph-bridge/edges.d.ts +3 -1
  230. package/dist/core/ingestion/scope-resolution/graph-bridge/edges.js +6 -0
  231. package/dist/core/ingestion/scope-resolution/graph-bridge/ids.js +1 -0
  232. package/dist/core/ingestion/scope-resolution/graph-bridge/node-lookup.js +4 -1
  233. package/dist/core/ingestion/scope-resolution/graph-bridge/references-to-edges.js +7 -2
  234. package/dist/core/ingestion/scope-resolution/passes/callable-value-flow.d.ts +47 -0
  235. package/dist/core/ingestion/scope-resolution/passes/callable-value-flow.js +1138 -0
  236. package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.d.ts +16 -4
  237. package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.js +97 -1
  238. package/dist/core/ingestion/scope-resolution/passes/property-dispatch.d.ts +60 -0
  239. package/dist/core/ingestion/scope-resolution/passes/property-dispatch.js +111 -0
  240. package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.d.ts +4 -3
  241. package/dist/core/ingestion/scope-resolution/pipeline/phase.d.ts +5 -0
  242. package/dist/core/ingestion/scope-resolution/pipeline/phase.js +25 -38
  243. package/dist/core/ingestion/scope-resolution/pipeline/run.d.ts +6 -0
  244. package/dist/core/ingestion/scope-resolution/pipeline/run.js +147 -35
  245. package/dist/core/ingestion/scope-resolution/resolution-outcome.d.ts +1 -1
  246. package/dist/core/ingestion/scope-resolution/scope/walkers.js +73 -44
  247. package/dist/core/ingestion/taint/typescript-model.js +34 -2
  248. package/dist/core/ingestion/tree-sitter-queries.d.ts +2 -2
  249. package/dist/core/ingestion/tree-sitter-queries.js +23 -2
  250. package/dist/core/ingestion/type-extractors/jvm.js +17 -2
  251. package/dist/core/ingestion/utils/ast-helpers.d.ts +1 -0
  252. package/dist/core/ingestion/utils/ast-helpers.js +153 -2
  253. package/dist/core/ingestion/utils/callable-flow-captures.d.ts +94 -0
  254. package/dist/core/ingestion/utils/callable-flow-captures.js +878 -0
  255. package/dist/core/ingestion/utils/line-base.d.ts +20 -0
  256. package/dist/core/ingestion/utils/line-base.js +20 -0
  257. package/dist/core/ingestion/utils/symbol-labels.d.ts +21 -0
  258. package/dist/core/ingestion/utils/symbol-labels.js +45 -0
  259. package/dist/core/ingestion/workers/parse-worker.d.ts +34 -0
  260. package/dist/core/ingestion/workers/parse-worker.js +40 -5
  261. package/dist/core/ingestion/workers/result-merge.js +4 -0
  262. package/dist/core/ingestion/workers/worker-pool.d.ts +28 -0
  263. package/dist/core/ingestion/workers/worker-pool.js +128 -28
  264. package/dist/core/lbug/csv-generator.d.ts +15 -0
  265. package/dist/core/lbug/csv-generator.js +124 -27
  266. package/dist/core/lbug/cypher-escape.d.ts +20 -0
  267. package/dist/core/lbug/cypher-escape.js +20 -0
  268. package/dist/core/lbug/extension-load-error.d.ts +67 -0
  269. package/dist/core/lbug/extension-load-error.js +326 -0
  270. package/dist/core/lbug/extension-loader.d.ts +17 -2
  271. package/dist/core/lbug/extension-loader.js +38 -13
  272. package/dist/core/lbug/lbug-adapter.d.ts +203 -2
  273. package/dist/core/lbug/lbug-adapter.js +527 -86
  274. package/dist/core/lbug/lbug-config.d.ts +56 -2
  275. package/dist/core/lbug/lbug-config.js +267 -7
  276. package/dist/core/lbug/move-columns.d.ts +7 -0
  277. package/dist/core/lbug/move-columns.js +86 -0
  278. package/dist/core/lbug/native-check.d.ts +40 -0
  279. package/dist/core/lbug/native-check.js +90 -0
  280. package/dist/core/lbug/node-table-layout.d.ts +29 -0
  281. package/dist/core/lbug/node-table-layout.js +119 -0
  282. package/dist/core/lbug/pool-adapter.d.ts +23 -1
  283. package/dist/core/lbug/pool-adapter.js +115 -8
  284. package/dist/core/lbug/schema.d.ts +4 -3
  285. package/dist/core/lbug/schema.js +16 -16
  286. package/dist/core/lbug/sidecar-recovery.d.ts +172 -0
  287. package/dist/core/lbug/sidecar-recovery.js +418 -16
  288. package/dist/core/lbug/wal-checkpoint-driver.js +3 -0
  289. package/dist/core/move/artifact-download.d.ts +19 -0
  290. package/dist/core/move/artifact-download.js +179 -0
  291. package/dist/core/move/compiler-facts.d.ts +120 -0
  292. package/dist/core/move/compiler-facts.js +9 -0
  293. package/dist/core/move/consistency.d.ts +28 -0
  294. package/dist/core/move/consistency.js +98 -0
  295. package/dist/core/move/constants.d.ts +98 -0
  296. package/dist/core/move/constants.js +136 -0
  297. package/dist/core/move/discovery.d.ts +10 -0
  298. package/dist/core/move/discovery.js +22 -0
  299. package/dist/core/move/entry-points.d.ts +14 -0
  300. package/dist/core/move/entry-points.js +40 -0
  301. package/dist/core/move/facts-mapper.d.ts +75 -0
  302. package/dist/core/move/facts-mapper.js +534 -0
  303. package/dist/core/move/install-lock.d.ts +14 -0
  304. package/dist/core/move/install-lock.js +102 -0
  305. package/dist/core/move/install.d.ts +39 -0
  306. package/dist/core/move/install.js +391 -0
  307. package/dist/core/move/mcp-client.d.ts +115 -0
  308. package/dist/core/move/mcp-client.js +436 -0
  309. package/dist/core/move/move-ingest.d.ts +49 -0
  310. package/dist/core/move/move-ingest.js +320 -0
  311. package/dist/core/move/provision.d.ts +19 -0
  312. package/dist/core/move/provision.js +91 -0
  313. package/dist/core/move/release.d.ts +6 -0
  314. package/dist/core/move/release.js +10 -0
  315. package/dist/core/move/symbol-id.d.ts +35 -0
  316. package/dist/core/move/symbol-id.js +65 -0
  317. package/dist/core/move/type-parser.d.ts +11 -0
  318. package/dist/core/move/type-parser.js +38 -0
  319. package/dist/core/platform/capabilities.d.ts +0 -1
  320. package/dist/core/platform/capabilities.js +39 -8
  321. package/dist/core/run-analyze.d.ts +3 -3
  322. package/dist/core/run-analyze.js +1001 -184
  323. package/dist/core/search/fts-indexes.d.ts +31 -0
  324. package/dist/core/search/fts-indexes.js +73 -0
  325. package/dist/core/search/fts-schema.js +2 -0
  326. package/dist/core/tree-sitter/safe-parse.d.ts +8 -3
  327. package/dist/core/tree-sitter/safe-parse.js +21 -7
  328. package/dist/core/wiki/graph-queries.js +6 -5
  329. package/dist/core/wiki/llm-client.d.ts +8 -2
  330. package/dist/core/wiki/llm-client.js +41 -5
  331. package/dist/mcp/core/embedder.js +16 -2
  332. package/dist/mcp/http-transport.d.ts +5 -0
  333. package/dist/mcp/http-transport.js +19 -5
  334. package/dist/mcp/local/bean-metadata.d.ts +2 -0
  335. package/dist/mcp/local/bean-metadata.js +25 -0
  336. package/dist/mcp/local/line-display.d.ts +22 -0
  337. package/dist/mcp/local/line-display.js +3 -0
  338. package/dist/mcp/local/local-backend.d.ts +19 -1
  339. package/dist/mcp/local/local-backend.js +402 -155
  340. package/dist/mcp/local/pdg-impact.d.ts +5 -3
  341. package/dist/mcp/local/pdg-impact.js +5 -2
  342. package/dist/mcp/output-budget.d.ts +5 -0
  343. package/dist/mcp/output-budget.js +52 -0
  344. package/dist/mcp/read-only-policy.d.ts +12 -0
  345. package/dist/mcp/read-only-policy.js +102 -0
  346. package/dist/mcp/repository-policy.d.ts +34 -0
  347. package/dist/mcp/repository-policy.js +328 -0
  348. package/dist/mcp/resources.js +32 -5
  349. package/dist/mcp/server.d.ts +5 -2
  350. package/dist/mcp/server.js +29 -9
  351. package/dist/mcp/tools.d.ts +0 -8
  352. package/dist/mcp/tools.js +102 -5
  353. package/dist/server/analyze-job.d.ts +3 -0
  354. package/dist/server/analyze-job.js +17 -0
  355. package/dist/server/analyze-launch.d.ts +6 -0
  356. package/dist/server/analyze-launch.js +82 -6
  357. package/dist/server/analyze-worker-core.d.ts +2 -1
  358. package/dist/server/analyze-worker-core.js +5 -2
  359. package/dist/server/analyze-worker.js +29 -6
  360. package/dist/server/api.d.ts +30 -0
  361. package/dist/server/api.js +120 -34
  362. package/dist/server/mcp-http.d.ts +1 -1
  363. package/dist/server/mcp-http.js +4 -2
  364. package/dist/server/upload-ingest.js +2 -1
  365. package/dist/server/validation.js +2 -1
  366. package/dist/storage/git.d.ts +31 -0
  367. package/dist/storage/git.js +111 -1
  368. package/dist/storage/parse-cache.js +7 -1
  369. package/dist/storage/parsedfile-store.d.ts +8 -0
  370. package/dist/storage/parsedfile-store.js +165 -1
  371. package/dist/storage/repo-manager.d.ts +194 -2
  372. package/dist/storage/repo-manager.js +56 -1
  373. package/hooks/antigravity/gitnexus-antigravity-hook.cjs +50 -3
  374. package/hooks/claude/gitnexus-hook.cjs +59 -9
  375. package/hooks/claude/pre-tool-use.sh +0 -0
  376. package/hooks/claude/session-start.sh +0 -0
  377. package/package.json +21 -15
  378. package/scripts/cross-platform-tests.ts +56 -0
  379. package/scripts/ensure-fts.ts +43 -0
  380. package/scripts/install-duckdb-extension.mjs +85 -24
  381. package/scripts/run-cross-platform.ts +61 -6
  382. package/scripts/shard-arg.ts +30 -0
  383. package/scripts/sync-plugin-manifests.mjs +192 -0
  384. package/skills/gitnexus-lfg/README.md +55 -0
  385. package/skills/gitnexus-lfg/SKILL.md +86 -0
  386. package/skills/gitnexus-plan/README.md +142 -0
  387. package/skills/gitnexus-plan/SKILL.md +348 -0
  388. package/skills/gitnexus-plan/references/context-ledger.md +137 -0
  389. package/skills/gitnexus-plan/references/context-pack.md +126 -0
  390. package/skills/gitnexus-plan/references/evidence-provenance.md +272 -0
  391. package/skills/gitnexus-plan/references/pdg-slice.md +109 -0
  392. package/skills/gitnexus-plan/references/plan-template.md +201 -0
  393. package/skills/gitnexus-plan/scripts/evidence-provenance.mjs +2084 -0
  394. package/skills/gitnexus-review/SKILL.md +273 -0
  395. package/skills/gitnexus-review/ci-personas/ci-adversarial-lens.md +42 -0
  396. package/skills/gitnexus-review/ci-personas/ci-blast-radius-lens.md +39 -0
  397. package/skills/gitnexus-review/ci-personas/ci-correctness-lens.md +37 -0
  398. package/skills/gitnexus-review/ci-personas/ci-coverage-lens.md +40 -0
  399. package/skills/gitnexus-review/ci-personas/ci-critic-lens.md +42 -0
  400. package/skills/gitnexus-review/ci-personas/ci-security-lens.md +39 -0
  401. package/skills/gitnexus-work/README.md +71 -0
  402. package/skills/gitnexus-work/SKILL.md +269 -0
  403. package/skills/gitnexus-work/references/evidence-provenance.md +272 -0
  404. package/skills/gitnexus-work/scripts/evidence-provenance.mjs +2084 -0
  405. package/web/assets/ProcessFlowModal-B_bfBySy.js +22 -0
  406. package/web/assets/__vite-browser-external-bMKyYQkO.js +1 -0
  407. package/web/assets/agent-Bqxn-abU.js +626 -0
  408. package/web/assets/architecture-7EHR7CIX-6QZW5X65-BVWFvYz2.js +1 -0
  409. package/web/assets/architectureDiagram-UL44E2DR-CmG3uPWf.js +36 -0
  410. package/web/assets/{blockDiagram-7IZFK4PR-BkWhpzWB.js → blockDiagram-7IZFK4PR-DBefcjof.js} +7 -7
  411. package/web/assets/{c4Diagram-Y2BXMSZH-DtBvpzWD.js → c4Diagram-Y2BXMSZH-EjWnjEJl.js} +6 -6
  412. package/web/assets/chunk-2T2R6R2M-Bb6Sy3_j.js +4 -0
  413. package/web/assets/chunk-2UTLFMKG-CXlhF3Pt.js +1 -0
  414. package/web/assets/chunk-3SSMPTDK-rPsRM1x0.js +321 -0
  415. package/web/assets/chunk-4R4BOZG6-Be_F0JoX.js +159 -0
  416. package/web/assets/{chunk-6764PJDD-DpIS7hxD.js → chunk-6764PJDD-C7xxk063.js} +1 -1
  417. package/web/assets/chunk-67TQ5CYL-CA7OhIEf.js +124 -0
  418. package/web/assets/chunk-7FYTHRHK-CsmYIswB.js +32 -0
  419. package/web/assets/chunk-7J6CGLKN-BlKwgXKs.js +10 -0
  420. package/web/assets/chunk-7W6UQGC5-pyKGssV3.js +1 -0
  421. package/web/assets/chunk-C62D2QBJ-3gdL8EKc.js +1 -0
  422. package/web/assets/chunk-CEXFNPSA-CjwtMDkc.js +1 -0
  423. package/web/assets/{chunk-INKRHTLW-Nu4ri9P-.js → chunk-INKRHTLW-Ckl3_KkO.js} +13 -13
  424. package/web/assets/chunk-J5EP6P6S-L19oz55R.js +1 -0
  425. package/web/assets/{chunk-KGFNY3KK-JGMJvKCK.js → chunk-KGFNY3KK-BZeP-55u.js} +17 -17
  426. package/web/assets/chunk-KGYTTC2M-zm6n242I.js +1 -0
  427. package/web/assets/{chunk-KRXBNO2N-BW5o0KUN.js → chunk-KRXBNO2N-C-UNuKKf.js} +1 -1
  428. package/web/assets/{chunk-LCXTWHL2-CfLLCywY.js → chunk-LCXTWHL2-C162wE5z.js} +5 -5
  429. package/web/assets/chunk-LII3EMHJ-BL6lKJ_P.js +1 -0
  430. package/web/assets/chunk-LRIF4GLE-n59lhprL.js +1 -0
  431. package/web/assets/chunk-QA3QBVWF-DVXPOIxe.js +2 -0
  432. package/web/assets/chunk-RERM46MO-B5dAdWpP.js +1 -0
  433. package/web/assets/chunk-RG4AUYOV-ZNgyLFq6.js +206 -0
  434. package/web/assets/chunk-RKZBBQEN-MyIQbGgD.js +1 -0
  435. package/web/assets/chunk-RLI5ZMPA-CkXZ0y0U.js +1 -0
  436. package/web/assets/chunk-T2UQINTJ-BEyXhZWe.js +1 -0
  437. package/web/assets/chunk-UP6H54XL-BG-n7qDp.js +1 -0
  438. package/web/assets/chunk-UXSXWOXI-CW1_r5cS.js +1 -0
  439. package/web/assets/chunk-UY5QBCOK-ByqTVLvh.js +1 -0
  440. package/web/assets/chunk-VU6ZFW4Y-BLeasdkU.js +2 -0
  441. package/web/assets/{chunk-W44A43WB-JqMLIpR0.js → chunk-W44A43WB-BN8EQc_u.js} +1 -1
  442. package/web/assets/chunk-ZXARS5L4-C3v-4Fsw.js +1 -0
  443. package/web/assets/classDiagram-KGZ6W3CR-olpO3fMe.js +1 -0
  444. package/web/assets/classDiagram-v2-72OJOZXJ-olpO3fMe.js +1 -0
  445. package/web/assets/cose-bilkent-UX7MHV2Q-BmnZ7Mvj.js +1 -0
  446. package/web/assets/dagre-ND4H6XIP-CY4iIF7v.js +4 -0
  447. package/web/assets/diagram-3NCE3AQN-CO6QpzEE.js +43 -0
  448. package/web/assets/diagram-GF46GFSD-B2atbzmU.js +24 -0
  449. package/web/assets/diagram-HNR7UZ2L-DVRltWbL.js +3 -0
  450. package/web/assets/diagram-QXG6HAR7-DR6AHD2h.js +24 -0
  451. package/web/assets/diagram-WEQXMOUZ-DkpoMwTL.js +10 -0
  452. package/web/assets/erDiagram-L5TCEMPS-n8g_90bc.js +85 -0
  453. package/web/assets/eventmodeling-FCH6USID-MREXMVOE-CgFBM7e-.js +1 -0
  454. package/web/assets/flowDiagram-H6V6AXG4-SGMDiCkB.js +162 -0
  455. package/web/assets/ganttDiagram-JCBTUEKG-Cb3UBqRS.js +292 -0
  456. package/web/assets/gitGraph-WXDBUCRP-R675I2BI-DCJv7SII.js +1 -0
  457. package/web/assets/gitGraphDiagram-S2ZK5IYY-Bs9CR7tq.js +106 -0
  458. package/web/assets/index-CX_fADmQ.css +2 -0
  459. package/web/assets/index-D1Z3dGGz.js +575 -0
  460. package/web/assets/info-J43DQDTF-KCYPFFUO-BfNy-9Nd.js +1 -0
  461. package/web/assets/infoDiagram-3YFTVSEB-T368on4D.js +2 -0
  462. package/web/assets/{ishikawaDiagram-BNXS4ZKH-DfYpxnE5.js → ishikawaDiagram-BNXS4ZKH-XpjJRU9h.js} +6 -6
  463. package/web/assets/journeyDiagram-M6C3CM3L-C6wjooas.js +139 -0
  464. package/web/assets/kanban-definition-75IXJCU3-5_UVY79g.js +89 -0
  465. package/web/assets/{katex-K3KEBU37-CTc5BslQ.js → katex-K3KEBU37-qRQBy-EZ.js} +2 -2
  466. package/web/assets/{mindmap-definition-2TDM6QVE-DypvbOMQ.js → mindmap-definition-2TDM6QVE-8xDLzk2e.js} +29 -29
  467. package/web/assets/node-Ct_zna8U.js +8 -0
  468. package/web/assets/packet-YPE3B663-LP52Z2RK-D4qkeG9k.js +1 -0
  469. package/web/assets/pie-LRSECV5Y-TCRJHUBD-B_yMKyQa.js +1 -0
  470. package/web/assets/pieDiagram-CU6KROY3-Bv4LpAbr.js +30 -0
  471. package/web/assets/preload-helper-Czpn1I53.js +1 -0
  472. package/web/assets/{quadrantDiagram-VICAPDV7-yXSZ2lLz.js → quadrantDiagram-VICAPDV7-DR54jOeR.js} +6 -6
  473. package/web/assets/radar-GUYGQ44K-RDLRG3WG-DeD6yN_0.js +1 -0
  474. package/web/assets/requirementDiagram-JXO7QTGE-PEkg7sKC.js +84 -0
  475. package/web/assets/rolldown-runtime-QTnfLwEv.js +1 -0
  476. package/web/assets/sankeyDiagram-URQDO5SZ-DDWEtjcs.js +40 -0
  477. package/web/assets/sdk-CzHHH8tD.js +37 -0
  478. package/web/assets/sequenceDiagram-VS2MUI6T-Bv-uwANx.js +162 -0
  479. package/web/assets/src-JV30wyV8.js +1 -0
  480. package/web/assets/stateDiagram-7D4R322I-DVNjmkEq.js +1 -0
  481. package/web/assets/stateDiagram-v2-36443NZ5-CyN4Fh7_.js +1 -0
  482. package/web/assets/timeline-definition-O6YCAMPW-Qmsuo7qS.js +120 -0
  483. package/web/assets/treeView-BLDUP644-QA4HXRO3-CDuSYnd4.js +1 -0
  484. package/web/assets/treemap-LRROVOQU-LLAWBHMP-imazucyJ.js +1 -0
  485. package/web/assets/vennDiagram-MWXL3ELB-BD1iK1SX.js +34 -0
  486. package/web/assets/wardley-L42UT6IY-5TKZOOLJ-DqrT9tB8.js +1 -0
  487. package/web/assets/wardleyDiagram-CUQ6CDDI-D6TzLVob.js +78 -0
  488. package/web/assets/{xychartDiagram-N2JHSOCM-BOLm0eNm.js → xychartDiagram-N2JHSOCM-CoZ_Tits.js} +6 -6
  489. package/web/index.html +18 -10
  490. package/skills/gitnexus-pr-review.md +0 -163
  491. package/web/assets/agent-Dli_x7bU.js +0 -660
  492. package/web/assets/architecture-7EHR7CIX-6QZW5X65-DxJw65fT.js +0 -1
  493. package/web/assets/architectureDiagram-UL44E2DR-dEkqUZN9.js +0 -36
  494. package/web/assets/chunk-3SSMPTDK-B4_etUhr.js +0 -321
  495. package/web/assets/chunk-67TQ5CYL-4sNPJU1q.js +0 -124
  496. package/web/assets/chunk-7W6UQGC5-KyEG0HQg.js +0 -1
  497. package/web/assets/chunk-KGYTTC2M-CWC_c3H9.js +0 -161
  498. package/web/assets/chunk-LII3EMHJ-D-jm-dLa.js +0 -1
  499. package/web/assets/chunk-QA3QBVWF-BgRW3SXd.js +0 -2
  500. package/web/assets/chunk-RG4AUYOV-CqWzWsV3.js +0 -206
  501. package/web/assets/chunk-T2UQINTJ-DSBqkzH7.js +0 -1
  502. package/web/assets/chunk-UY5QBCOK-DyF0vyGd.js +0 -1
  503. package/web/assets/chunk-ZXARS5L4-CxN8oiwI.js +0 -1
  504. package/web/assets/classDiagram-KGZ6W3CR-CMne4tG9.js +0 -1
  505. package/web/assets/classDiagram-v2-72OJOZXJ-CMne4tG9.js +0 -1
  506. package/web/assets/cose-bilkent-UX7MHV2Q-D71wNYRJ.js +0 -1
  507. package/web/assets/dagre-ND4H6XIP-Co5rRx9X.js +0 -4
  508. package/web/assets/diagram-3NCE3AQN-DBp4O00j.js +0 -43
  509. package/web/assets/diagram-GF46GFSD-6N_8yS0i.js +0 -24
  510. package/web/assets/diagram-HNR7UZ2L-DFCfd5LI.js +0 -3
  511. package/web/assets/diagram-QXG6HAR7-Di093rFg.js +0 -24
  512. package/web/assets/diagram-WEQXMOUZ-DZWi4SUN.js +0 -10
  513. package/web/assets/erDiagram-L5TCEMPS-8X1y6R4Y.js +0 -85
  514. package/web/assets/eventmodeling-FCH6USID-MREXMVOE-BQm9QzEa.js +0 -1
  515. package/web/assets/flowDiagram-H6V6AXG4-CMpY8Ufn.js +0 -162
  516. package/web/assets/ganttDiagram-JCBTUEKG-D3iL2Aet.js +0 -292
  517. package/web/assets/gitGraph-WXDBUCRP-R675I2BI-Cr_Bm2Nb.js +0 -1
  518. package/web/assets/gitGraphDiagram-S2ZK5IYY-CPIDgxGm.js +0 -106
  519. package/web/assets/index-KctnI3Vq.js +0 -635
  520. package/web/assets/index-_lgn7hs5.css +0 -2
  521. package/web/assets/info-J43DQDTF-KCYPFFUO-Cs4p2oyk.js +0 -1
  522. package/web/assets/infoDiagram-3YFTVSEB-BaLMZkUg.js +0 -2
  523. package/web/assets/journeyDiagram-M6C3CM3L-CvArszLo.js +0 -139
  524. package/web/assets/kanban-definition-75IXJCU3-CpfVLLf9.js +0 -89
  525. package/web/assets/packet-YPE3B663-LP52Z2RK-CKCrztD2.js +0 -1
  526. package/web/assets/pie-LRSECV5Y-TCRJHUBD-BB7pHqoD.js +0 -1
  527. package/web/assets/pieDiagram-CU6KROY3-s27EFWgP.js +0 -30
  528. package/web/assets/radar-GUYGQ44K-RDLRG3WG-DhoTOcuK.js +0 -1
  529. package/web/assets/requirementDiagram-JXO7QTGE-CWhqInuf.js +0 -84
  530. package/web/assets/sankeyDiagram-URQDO5SZ-1qEjlFIB.js +0 -40
  531. package/web/assets/sequenceDiagram-VS2MUI6T-RyTlZ5cR.js +0 -162
  532. package/web/assets/stateDiagram-7D4R322I-DTjVfX4A.js +0 -1
  533. package/web/assets/stateDiagram-v2-36443NZ5-xY9_k9_Q.js +0 -1
  534. package/web/assets/timeline-definition-O6YCAMPW-DrrqLYAf.js +0 -120
  535. package/web/assets/treeView-BLDUP644-QA4HXRO3-ODehyGKL.js +0 -1
  536. package/web/assets/treemap-LRROVOQU-LLAWBHMP-BfpgC-7o.js +0 -1
  537. package/web/assets/vennDiagram-MWXL3ELB-B0RkWAim.js +0 -34
  538. package/web/assets/wardley-L42UT6IY-5TKZOOLJ-CNeL6VHE.js +0 -1
  539. package/web/assets/wardleyDiagram-CUQ6CDDI-boUxiQ5F.js +0 -78
@@ -1 +1 @@
1
- import{t as e}from"./chunk-AQ6EADP3-CZhslHi-.js";import{A as t,C as n,D as r,E as i,O as a,S as o,T as s,_ as c,a as l,b as u,c as d,d as f,f as p,g as m,h as ee,i as h,k as g,l as _,m as te,n as v,o as y,r as b,s as x,t as S,u as C,v as w,w as ne,x as re,y as ie}from"./chunk-W44A43WB-JqMLIpR0.js";function T(e,t,n,r){var i;do i=m(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}e(T,`addDummyNode`);function ae(e){var t=new l().setGraph(e.graph());return v(e.nodes(),function(n){t.setNode(n,e.node(n))}),v(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}e(ae,`simplify`);function E(e){var t=new l({multigraph:e.isMultigraph()}).setGraph(e.graph());return v(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),v(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}e(E,`asNonCompoundGraph`);function D(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);var c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}e(D,`intersectRect`);function O(e){var n=g(a(k(e)+1),function(){return[]});return v(e.nodes(),function(r){var i=e.node(r),a=i.rank;t(a)||(n[a][i.order]=r)}),n}e(O,`buildLayerMatrix`);function oe(e){var t=n(g(e.nodes(),function(t){return e.node(t).rank}));v(e.nodes(),function(n){var r=e.node(n);i(r,`rank`)&&(r.rank-=t)})}e(oe,`normalizeRanks`);function se(e){var r=n(g(e.nodes(),function(t){return e.node(t).rank})),i=[];v(e.nodes(),function(t){var n=e.node(t).rank-r;i[n]||(i[n]=[]),i[n].push(t)});var a=0,o=e.graph().nodeRankFactor;v(i,function(n,r){t(n)&&r%o!==0?--a:a&&v(n,function(t){e.node(t).rank+=a})})}e(se,`removeEmptyRanks`);function ce(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),T(e,`border`,i,t)}e(ce,`addBorderNode`);function k(e){return p(g(e.nodes(),function(n){var r=e.node(n).rank;if(!t(r))return r}))}e(k,`maxRank`);function le(e,t){var n={lhs:[],rhs:[]};return v(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n}e(le,`partition`);function ue(e,t){var n=d();try{return t()}finally{console.log(e+` time: `+(d()-n)+`ms`)}}e(ue,`time`);function de(e,t){return t()}e(de,`notime`);function fe(t){function n(e){var r=t.children(e),i=t.node(e);if(r.length&&v(r,n),Object.prototype.hasOwnProperty.call(i,`minRank`)){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;a<o;++a)A(t,`borderLeft`,`_bl`,e,i,a),A(t,`borderRight`,`_br`,e,i,a)}}e(n,`dfs`),v(t.children(),n)}e(fe,`addBorderSegments`);function A(e,t,n,r,i,a){var o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=T(e,`border`,o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}e(A,`addBorderNode`);function pe(e){var t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&j(e)}e(pe,`adjust`);function me(e){var t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&he(e),(t===`lr`||t===`rl`)&&(ge(e),j(e))}e(me,`undo`);function j(e){v(e.nodes(),function(t){M(e.node(t))}),v(e.edges(),function(t){M(e.edge(t))})}e(j,`swapWidthHeight`);function M(e){var t=e.width;e.width=e.height,e.height=t}e(M,`swapWidthHeightOne`);function he(e){v(e.nodes(),function(t){N(e.node(t))}),v(e.edges(),function(t){var n=e.edge(t);v(n.points,N),Object.prototype.hasOwnProperty.call(n,`y`)&&N(n)})}e(he,`reverseY`);function N(e){e.y=-e.y}e(N,`reverseYOne`);function ge(e){v(e.nodes(),function(t){P(e.node(t))}),v(e.edges(),function(t){var n=e.edge(t);v(n.points,P),Object.prototype.hasOwnProperty.call(n,`x`)&&P(n)})}e(ge,`swapXY`);function P(e){var t=e.x;e.x=e.y,e.y=t}e(P,`swapXYOne`);var _e=class{static{e(this,`List`)}constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,t=e._prev;if(t!==e)return F(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&F(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,ve)),n=n._prev;return`[`+e.join(`, `)+`]`}};function F(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}e(F,`unlink`);function ve(e,t){if(e!==`_next`&&e!==`_prev`)return t}e(ve,`filterOutLinks`);var ye=w(1);function be(e,t){if(e.nodeCount()<=1)return[];var n=Se(e,t||ye);return C(g(xe(n.graph,n.buckets,n.zeroIdx),function(t){return e.outEdges(t.v,t.w)}))}e(be,`greedyFAS`);function xe(e,t,n){for(var r=[],i=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)I(e,t,n,o);for(;o=i.dequeue();)I(e,t,n,o);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(o=t[s].dequeue(),o){r=r.concat(I(e,t,n,o,!0));break}}}return r}e(xe,`doGreedyFAS`);function I(e,t,n,r,i){var a=i?[]:void 0;return v(e.inEdges(r.v),function(r){var o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,L(t,n,s)}),v(e.outEdges(r.v),function(r){var i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,L(t,n,o)}),e.removeNode(r.v),a}e(I,`removeNode`);function Se(e,t){var n=new l,r=0,i=0;v(e.nodes(),function(e){n.setNode(e,{v:e,in:0,out:0})}),v(e.edges(),function(e){var a=n.edge(e.v,e.w)||0,o=t(e),s=a+o;n.setEdge(e.v,e.w,s),i=Math.max(i,n.node(e.v).out+=o),r=Math.max(r,n.node(e.w).in+=o)});var o=a(i+r+3).map(function(){return new _e}),s=r+1;return v(n.nodes(),function(e){L(o,s,n.node(e))}),{graph:n,buckets:o,zeroIdx:s}}e(Se,`buildState`);function L(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}e(L,`assignBucket`);function Ce(t){v(t.graph().acyclicer===`greedy`?be(t,n(t)):we(t),function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,m(`rev`))});function n(e){return function(t){return e.edge(t).weight}}e(n,`weightFn`)}e(Ce,`run`);function we(t){var n=[],r={},i={};function a(e){Object.prototype.hasOwnProperty.call(i,e)||(i[e]=!0,r[e]=!0,v(t.outEdges(e),function(e){Object.prototype.hasOwnProperty.call(r,e.w)?n.push(e):a(e.w)}),delete r[e])}return e(a,`dfs`),v(t.nodes(),a),n}e(we,`dfsFAS`);function Te(e){v(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}e(Te,`undo`);function Ee(e){e.graph().dummyChains=[],v(e.edges(),function(t){De(e,t)})}e(Ee,`run`);function De(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a!==r+1){e.removeEdge(t);var l=void 0,u,d;for(d=0,++r;r<a;++d,++r)s.points=[],l={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},u=T(e,`edge`,l,`_d`),r===c&&(l.width=s.width,l.height=s.height,l.dummy=`edge-label`,l.labelpos=s.labelpos),e.setEdge(n,u,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(u),n=u;e.setEdge(n,i,{weight:s.weight},o)}}e(De,`normalizeEdge`);function Oe(e){v(e.graph().dummyChains,function(t){var n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}e(Oe,`undo`);function R(t){var r={};function i(e){var a=t.node(e);if(Object.prototype.hasOwnProperty.call(r,e))return a.rank;r[e]=!0;var o=n(g(t.outEdges(e),function(e){return i(e.w)-t.edge(e).minlen}));return(o===1/0||o==null)&&(o=0),a.rank=o}e(i,`dfs`),v(t.sources(),i)}e(R,`longestPath`);function z(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}e(z,`slack`);function B(e){var t=new l({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var i,a;ke(t,e)<r;)i=Ae(t,e),a=t.hasNode(i.v)?z(e,i):-z(e,i),je(t,e,a);return t}e(B,`feasibleTree`);function ke(t,n){function r(e){v(n.nodeEdges(e),function(i){var a=i.v,o=e===a?i.w:a;!t.hasNode(o)&&!z(n,i)&&(t.setNode(o,{}),t.setEdge(e,o,{}),r(o))})}return e(r,`dfs`),v(t.nodes(),r),t.nodeCount()}e(ke,`tightTree`);function Ae(e,t){return _(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return z(t,n)})}e(Ae,`findMinSlackEdge`);function je(e,t,n){v(e.nodes(),function(e){t.node(e).rank+=n})}e(je,`shiftRanks`),w(1),w(1),Me.CycleException=V;function Me(t){var n={},r={},i=[];function a(e){if(Object.prototype.hasOwnProperty.call(r,e))throw new V;Object.prototype.hasOwnProperty.call(n,e)||(r[e]=!0,n[e]=!0,v(t.predecessors(e),a),delete r[e],i.push(e))}if(e(a,`visit`),v(t.sinks(),a),ie(n)!==t.nodeCount())throw new V;return i}e(Me,`topsort`);function V(){}e(V,`CycleException`),V.prototype=Error();function H(e,t,n){s(t)||(t=[t]);var r=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],a={};return v(t,function(t){if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);U(e,t,n===`post`,a,r,i)}),i}e(H,`dfs`);function U(e,t,n,r,i,a){Object.prototype.hasOwnProperty.call(r,t)||(r[t]=!0,n||a.push(t),v(i(t),function(t){U(e,t,n,r,i,a)}),n&&a.push(t))}e(U,`doDfs`);function Ne(e,t){return H(e,t,`post`)}e(Ne,`postorder`);function Pe(e,t){return H(e,t,`pre`)}e(Pe,`preorder`),W.initLowLimValues=q,W.initCutValues=G,W.calcCutValue=K,W.leaveEdge=Y,W.enterEdge=X,W.exchangeEdges=Ie;function W(e){e=ae(e),R(e);var t=B(e);q(t),G(t,e);for(var n,r;n=Y(t);)r=X(t,e,n),Ie(t,e,n,r)}e(W,`networkSimplex`);function G(e,t){var n=Ne(e,e.nodes());n=n.slice(0,n.length-1),v(n,function(n){Fe(e,t,n)})}e(G,`initCutValues`);function Fe(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=K(e,t,n)}e(Fe,`assignCutValue`);function K(e,t,n){var r=e.node(n).parent,i=!0,a=t.edge(n,r),o=0;return a||=(i=!1,t.edge(r,n)),o=a.weight,v(t.nodeEdges(n),function(a){var s=a.v===n,c=s?a.w:a.v;if(c!==r){var l=s===i,u=t.edge(a).weight;if(o+=l?u:-u,Re(e,n,c)){var d=e.edge(n,c).cutvalue;o+=l?-d:d}}}),o}e(K,`calcCutValue`);function q(e,t){arguments.length<2&&(t=e.nodes()[0]),J(e,{},1,t)}e(q,`initLowLimValues`);function J(e,t,n,r,i){var a=n,o=e.node(r);return t[r]=!0,v(e.neighbors(r),function(i){Object.prototype.hasOwnProperty.call(t,i)||(n=J(e,t,n,i,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}e(J,`dfsAssignLowLim`);function Y(e){return te(e.edges(),function(t){return e.edge(t).cutvalue<0})}e(Y,`leaveEdge`);function X(e,t,n){var r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);var a=e.node(r),o=e.node(i),s=a,c=!1;return a.lim>o.lim&&(s=o,c=!0),_(b(t.edges(),function(t){return c===ze(e,e.node(t.v),s)&&c!==ze(e,e.node(t.w),s)}),function(e){return z(t,e)})}e(X,`enterEdge`);function Ie(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),q(e),G(e,t),Le(e,t)}e(Ie,`exchangeEdges`);function Le(e,t){var n=Pe(e,te(e.nodes(),function(e){return!t.node(e).parent}));n=n.slice(1),v(n,function(n){var r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}e(Le,`updateRanks`);function Re(e,t,n){return e.hasEdge(t,n)}e(Re,`isTreeEdge`);function ze(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}e(ze,`isDescendant`);function Be(e){switch(e.graph().ranker){case`network-simplex`:Z(e);break;case`tight-tree`:He(e);break;case`longest-path`:Ve(e);break;default:Z(e)}}e(Be,`rank`);var Ve=R;function He(e){R(e),B(e)}e(He,`tightTreeRanker`);function Z(e){W(e)}e(Z,`networkSimplexRanker`);function Ue(e){var t=T(e,`root`,{},`_root`),n=Ge(e),r=p(x(n))-1,i=2*r+1;e.graph().nestingRoot=t,v(e.edges(),function(t){e.edge(t).minlen*=i});var a=Ke(e)+1;v(e.children(),function(o){We(e,t,i,a,r,n,o)}),e.graph().nodeRankFactor=i}e(Ue,`run`);function We(e,t,n,r,i,a,o){var s=e.children(o);if(!s.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:n});return}var c=ce(e,`_bt`),l=ce(e,`_bb`),u=e.node(o);e.setParent(c,o),u.borderTop=c,e.setParent(l,o),u.borderBottom=l,v(s,function(s){We(e,t,n,r,i,a,s);var u=e.node(s),d=u.borderTop?u.borderTop:s,f=u.borderBottom?u.borderBottom:s,p=u.borderTop?r:2*r,m=d===f?i-a[o]+1:1;e.setEdge(c,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,l,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,c,{weight:0,minlen:i+a[o]})}e(We,`dfs`);function Ge(t){var n={};function r(e,i){var a=t.children(e);a&&a.length&&v(a,function(e){r(e,i+1)}),n[e]=i}return e(r,`dfs`),v(t.children(),function(e){r(e,1)}),n}e(Ge,`treeDepths`);function Ke(e){return S(e.edges(),function(t,n){return t+e.edge(n).weight},0)}e(Ke,`sumWeights`);function qe(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,v(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}e(qe,`cleanup`);function Je(e,t,n){var r={},i;v(n,function(n){for(var a=e.parent(n),o,s;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}e(Je,`addSubgraphConstraints`);function Ye(e,n,r){var i=Xe(e),a=new l({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(t){return e.node(t)});return v(e.nodes(),function(o){var s=e.node(o),c=e.parent(o);(s.rank===n||s.minRank<=n&&n<=s.maxRank)&&(a.setNode(o),a.setParent(o,c||i),v(e[r](o),function(n){var r=n.v===o?n.w:n.v,i=a.edge(r,o),s=t(i)?0:i.weight;a.setEdge(r,o,{weight:e.edge(n).weight+s})}),Object.prototype.hasOwnProperty.call(s,`minRank`)&&a.setNode(o,{borderLeft:s.borderLeft[n],borderRight:s.borderRight[n]}))}),a}e(Ye,`buildLayerGraph`);function Xe(e){for(var t;e.hasNode(t=m(`_root`)););return t}e(Xe,`createRootNode`);function Ze(e,t){for(var n=0,r=1;r<t.length;++r)n+=Qe(e,t[r-1],t[r]);return n}e(Ze,`crossCount`);function Qe(e,t,n){for(var r=f(n,g(n,function(e,t){return t})),i=C(g(t,function(t){return o(g(e.outEdges(t),function(t){return{pos:r[t.w],weight:e.edge(t).weight}}),`pos`)})),a=1;a<n.length;)a<<=1;var s=2*a-1;--a;var c=g(Array(s),function(){return 0}),l=0;return v(i.forEach(function(e){var t=e.pos+a;c[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=c[t+1]),t=t-1>>1,c[t]+=e.weight;l+=e.weight*n})),l}e(Qe,`twoLayerCrossCount`);function $e(t){var n={},r=b(t.nodes(),function(e){return!t.children(e).length}),s=g(a(p(g(r,function(e){return t.node(e).rank}))+1),function(){return[]});function c(e){i(n,e)||(n[e]=!0,s[t.node(e).rank].push(e),v(t.successors(e),c))}return e(c,`dfs`),v(o(r,function(e){return t.node(e).rank}),c),s}e($e,`initOrder`);function et(e,t){return g(t,function(t){var n=e.inEdges(t);if(n.length){var r=S(n,function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}else return{v:t}})}e(et,`barycenter`);function tt(e,n){var r={};return v(e,function(e,n){var i=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:n};t(e.barycenter)||(i.barycenter=e.barycenter,i.weight=e.weight)}),v(n.edges(),function(e){var n=r[e.v],i=r[e.w];!t(n)&&!t(i)&&(i.indegree++,n.out.push(r[e.w]))}),nt(b(r,function(e){return!e.indegree}))}e(tt,`resolveConflicts`);function nt(n){var r=[];function i(e){return function(n){n.merged||(t(n.barycenter)||t(e.barycenter)||n.barycenter>=e.barycenter)&&rt(e,n)}}e(i,`handleIn`);function a(e){return function(t){t.in.push(e),--t.indegree===0&&n.push(t)}}for(e(a,`handleOut`);n.length;){var o=n.pop();r.push(o),v(o.in.reverse(),i(o)),v(o.out,a(o))}return g(b(r,function(e){return!e.merged}),function(e){return u(e,[`vs`,`i`,`barycenter`,`weight`])})}e(nt,`doResolveConflicts`);function rt(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}e(rt,`mergeEntries`);function it(e,t){var n=le(e,function(e){return Object.prototype.hasOwnProperty.call(e,`barycenter`)}),r=n.lhs,i=o(n.rhs,function(e){return-e.i}),a=[],s=0,c=0,l=0;r.sort(ot(!!t)),l=at(a,i,l),v(r,function(e){l+=e.vs.length,a.push(e.vs),s+=e.barycenter*e.weight,c+=e.weight,l=at(a,i,l)});var u={vs:C(a)};return c&&(u.barycenter=s/c,u.weight=c),u}e(it,`sort`);function at(e,t,n){for(var r;t.length&&(r=h(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}e(at,`consumeUnsortable`);function ot(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}e(ot,`compareWithBias`);function st(e,t,n,r){var i=e.children(t),a=e.node(t),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,c={};o&&(i=b(i,function(e){return e!==o&&e!==s}));var l=et(e,i);v(l,function(t){if(e.children(t.v).length){var i=st(e,t.v,n,r);c[t.v]=i,Object.prototype.hasOwnProperty.call(i,`barycenter`)&&lt(t,i)}});var u=tt(l,n);ct(u,c);var d=it(u,r);if(o&&(d.vs=C([o,d.vs,s]),e.predecessors(o).length)){var f=e.node(e.predecessors(o)[0]),p=e.node(e.predecessors(s)[0]);Object.prototype.hasOwnProperty.call(d,`barycenter`)||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+f.order+p.order)/(d.weight+2),d.weight+=2}return d}e(st,`sortSubgraph`);function ct(e,t){v(e,function(e){e.vs=C(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}e(ct,`expandSubgraphs`);function lt(e,n){t(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}e(lt,`mergeBarycenters`);function ut(e){var t=k(e),n=dt(e,a(1,t+1),`inEdges`),r=dt(e,a(t-1,-1,-1),`outEdges`),i=$e(e);pt(e,i);for(var o=1/0,s,c=0,l=0;l<4;++c,++l){ft(c%2?n:r,c%4>=2),i=O(e);var u=Ze(e,i);u<o&&(l=0,s=ne(i),o=u)}pt(e,s)}e(ut,`order`);function dt(e,t,n){return g(t,function(t){return Ye(e,t,n)})}e(dt,`buildLayerGraphs`);function ft(e,t){var n=new l;v(e,function(e){var r=e.graph().root,i=st(e,r,n,t);v(i.vs,function(t,n){e.node(t).order=n}),Je(e,n,i.vs)})}e(ft,`sweepLayerGraphs`);function pt(e,t){v(t,function(t){v(t,function(t,n){e.node(t).order=n})})}e(pt,`assignOrder`);function mt(e){var t=gt(e);v(e.graph().dummyChains,function(n){for(var r=e.node(n),i=r.edgeObj,a=ht(e,t,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;n!==i.w;){if(r=e.node(n),u){for(;(l=o[c])!==s&&e.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&e.node(l=o[c+1]).minRank<=r.rank;)c++;l=o[c]}e.setParent(n,l),n=e.successors(n)[0]}})}e(mt,`parentDummyChains`);function ht(e,t,n,r){var i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c=n,l;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}e(ht,`findPath`);function gt(t){var n={},r=0;function i(e){var a=r;v(t.children(e),i),n[e]={low:a,lim:r++}}return e(i,`dfs`),v(t.children(),i),n}e(gt,`postorder`);function _t(t,n){var r={};function i(e,n){var i=0,a=0,o=e.length,s=h(n);return v(n,function(e,c){var l=yt(t,e),u=l?t.node(l).order:o;(l||e===s)&&(v(n.slice(a,c+1),function(e){v(t.predecessors(e),function(n){var a=t.node(n),o=a.order;(o<i||u<o)&&!(a.dummy&&t.node(e).dummy)&&bt(r,n,e)})}),a=c+1,i=u)}),n}return e(i,`visitLayer`),S(n,i),r}e(_t,`findType1Conflicts`);function vt(t,n){var r={};function i(e,n,i,o,s){var c;v(a(n,i),function(n){c=e[n],t.node(c).dummy&&v(t.predecessors(c),function(e){var n=t.node(e);n.dummy&&(n.order<o||n.order>s)&&bt(r,e,c)})})}e(i,`scan`);function o(e,n){var r=-1,a,o=0;return v(n,function(s,c){if(t.node(s).dummy===`border`){var l=t.predecessors(s);l.length&&(a=t.node(l[0]).order,i(n,o,c,r,a),o=c,r=a)}i(n,o,n.length,a,e.length)}),n}return e(o,`visitLayer`),S(n,o),r}e(vt,`findType2Conflicts`);function yt(e,t){if(e.node(t).dummy)return te(e.predecessors(t),function(t){return e.node(t).dummy})}e(yt,`findOtherInnerSegmentNode`);function bt(e,t,n){if(t>n){var r=t;t=n,n=r}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}e(bt,`addConflict`);function xt(e,t,n){if(t>n){var r=t;t=n,n=r}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],n)}e(xt,`hasConflict`);function St(e,t,n,r){var i={},a={},s={};return v(t,function(e){v(e,function(e,t){i[e]=e,a[e]=e,s[e]=t})}),v(t,function(e){var t=-1;v(e,function(e){var c=r(e);if(c.length){c=o(c,function(e){return s[e]});for(var l=(c.length-1)/2,u=Math.floor(l),d=Math.ceil(l);u<=d;++u){var f=c[u];a[e]===e&&t<s[f]&&!xt(n,e,f)&&(a[f]=e,a[e]=i[e]=i[f],t=s[f])}}})}),{root:i,align:a}}e(St,`verticalAlignment`);function Ct(t,n,r,i,a){var o={},s=wt(t,n,r,a),c=a?`borderLeft`:`borderRight`;function l(e,t){for(var n=s.nodes(),r=n.pop(),i={};r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}e(l,`iterate`);function u(e){o[e]=s.inEdges(e).reduce(function(e,t){return Math.max(e,o[t.v]+s.edge(t))},0)}e(u,`pass1`);function d(e){var n=s.outEdges(e).reduce(function(e,t){return Math.min(e,o[t.w]-s.edge(t))},1/0),r=t.node(e);n!==1/0&&r.borderType!==c&&(o[e]=Math.max(o[e],n))}return e(d,`pass2`),l(u,s.predecessors.bind(s)),l(d,s.successors.bind(s)),v(i,function(e){o[e]=o[r[e]]}),o}e(Ct,`horizontalCompaction`);function wt(e,t,n,r){var i=new l,a=e.graph(),o=kt(a.nodesep,a.edgesep,r);return v(t,function(t){var r;v(t,function(t){var a=n[t];if(i.setNode(a),r){var s=n[r],c=i.edge(s,a);i.setEdge(s,a,Math.max(o(e,t,r),c||0))}r=t})}),i}e(wt,`buildBlockGraph`);function Tt(e,t){return _(x(t),function(t){var n=-1/0,i=1/0;return r(t,function(t,r){var a=At(e,r)/2;n=Math.max(t+a,n),i=Math.min(t-a,i)}),n-i})}e(Tt,`findSmallestWidthAlignment`);function Et(e,t){var r=x(t),i=n(r),a=p(r);v([`u`,`d`],function(r){v([`l`,`r`],function(o){var s=r+o,l=e[s],u;if(l!==t){var d=x(l);u=o===`l`?i-n(d):a-p(d),u&&(e[s]=c(l,function(e){return e+u}))}})})}e(Et,`alignCoordinates`);function Dt(e,t){return c(e.ul,function(n,r){if(t)return e[t.toLowerCase()][r];var i=o(g(e,r));return(i[1]+i[2])/2})}e(Dt,`balance`);function Ot(e){var t=O(e),n=y(_t(e,t),vt(e,t)),r={},i;return v([`u`,`d`],function(a){i=a===`u`?t:x(t).reverse(),v([`l`,`r`],function(t){t===`r`&&(i=g(i,function(e){return x(e).reverse()}));var o=(a===`u`?e.predecessors:e.successors).bind(e),s=St(e,i,n,o),l=Ct(e,i,s.root,s.align,t===`r`);t===`r`&&(l=c(l,function(e){return-e})),r[a+t]=l})}),Et(r,Tt(e,r)),Dt(r,e.graph().align)}e(Ot,`positionX`);function kt(e,t,n){return function(r,i,a){var o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.prototype.hasOwnProperty.call(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2;break}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.prototype.hasOwnProperty.call(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2;break}return l&&(c+=n?l:-l),l=0,c}}e(kt,`sep`);function At(e,t){return e.node(t).width}e(At,`width`);function jt(e){e=E(e),Mt(e),re(Ot(e),function(t,n){e.node(n).x=t})}e(jt,`position`);function Mt(e){var t=O(e),n=e.graph().ranksep,r=0;v(t,function(t){var i=p(g(t,function(t){return e.node(t).height}));v(t,function(t){e.node(t).y=r+i/2}),r+=i+n})}e(Mt,`positionY`);function Nt(e,t){var n=t&&t.debugTiming?ue:de;n(`layout`,()=>{var t=n(` buildLayoutGraph`,()=>Wt(e));n(` runLayout`,()=>Pt(t,n)),n(` updateInputGraph`,()=>Ft(e,t))})}e(Nt,`layout`);function Pt(e,t){t(` makeSpaceForEdgeLabels`,()=>Gt(e)),t(` removeSelfEdges`,()=>en(e)),t(` acyclic`,()=>Ce(e)),t(` nestingGraph.run`,()=>Ue(e)),t(` rank`,()=>Be(E(e))),t(` injectEdgeLabelProxies`,()=>Kt(e)),t(` removeEmptyRanks`,()=>se(e)),t(` nestingGraph.cleanup`,()=>qe(e)),t(` normalizeRanks`,()=>oe(e)),t(` assignRankMinMax`,()=>qt(e)),t(` removeEdgeLabelProxies`,()=>Jt(e)),t(` normalize.run`,()=>Ee(e)),t(` parentDummyChains`,()=>mt(e)),t(` addBorderSegments`,()=>fe(e)),t(` order`,()=>ut(e)),t(` insertSelfEdges`,()=>tn(e)),t(` adjustCoordinateSystem`,()=>pe(e)),t(` position`,()=>jt(e)),t(` positionSelfEdges`,()=>nn(e)),t(` removeBorderNodes`,()=>$t(e)),t(` normalize.undo`,()=>Oe(e)),t(` fixupEdgeLabelCoords`,()=>Zt(e)),t(` undoCoordinateSystem`,()=>me(e)),t(` translateGraph`,()=>Yt(e)),t(` assignNodeIntersects`,()=>Xt(e)),t(` reversePoints`,()=>Qt(e)),t(` acyclic.undo`,()=>Te(e))}e(Pt,`runLayout`);function Ft(e,t){v(e.nodes(),function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))}),v(e.edges(),function(n){var r=e.edge(n),i=t.edge(n);r.points=i.points,Object.prototype.hasOwnProperty.call(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}e(Ft,`updateInputGraph`);var It=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],Lt={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},Rt=[`acyclicer`,`ranker`,`rankdir`,`align`],zt=[`width`,`height`],Bt={width:0,height:0},Vt=[`minlen`,`weight`,`width`,`height`,`labeloffset`],Ht={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},Ut=[`labelpos`];function Wt(e){var t=new l({multigraph:!0,compound:!0}),n=$(e.graph());return t.setGraph(y({},Lt,Q(n,It),u(n,Rt))),v(e.nodes(),function(n){var r=$(e.node(n));t.setNode(n,ee(Q(r,zt),Bt)),t.setParent(n,e.parent(n))}),v(e.edges(),function(n){var r=$(e.edge(n));t.setEdge(n,y({},Ht,Q(r,Vt),u(r,Ut)))}),t}e(Wt,`buildLayoutGraph`);function Gt(e){var t=e.graph();t.ranksep/=2,v(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}e(Gt,`makeSpaceForEdgeLabels`);function Kt(e){v(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v);T(e,`edge-proxy`,{rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t},`_ep`)}})}e(Kt,`injectEdgeLabelProxies`);function qt(e){var t=0;v(e.nodes(),function(n){var r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=p(t,r.maxRank))}),e.graph().maxRank=t}e(qt,`assignRankMinMax`);function Jt(e){v(e.nodes(),function(t){var n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}e(Jt,`removeEdgeLabelProxies`);function Yt(t){var n=1/0,r=0,i=1/0,a=0,o=t.graph(),s=o.marginx||0,c=o.marginy||0;function l(e){var t=e.x,o=e.y,s=e.width,c=e.height;n=Math.min(n,t-s/2),r=Math.max(r,t+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2)}e(l,`getExtremes`),v(t.nodes(),function(e){l(t.node(e))}),v(t.edges(),function(e){var n=t.edge(e);Object.prototype.hasOwnProperty.call(n,`x`)&&l(n)}),n-=s,i-=c,v(t.nodes(),function(e){var r=t.node(e);r.x-=n,r.y-=i}),v(t.edges(),function(e){var r=t.edge(e);v(r.points,function(e){e.x-=n,e.y-=i}),Object.prototype.hasOwnProperty.call(r,`x`)&&(r.x-=n),Object.prototype.hasOwnProperty.call(r,`y`)&&(r.y-=i)}),o.width=r-n+s,o.height=a-i+c}e(Yt,`translateGraph`);function Xt(e){v(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(D(r,a)),n.points.push(D(i,o))})}e(Xt,`assignNodeIntersects`);function Zt(e){v(e.edges(),function(t){var n=e.edge(t);if(Object.prototype.hasOwnProperty.call(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset;break}})}e(Zt,`fixupEdgeLabelCoords`);function Qt(e){v(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}e(Qt,`reversePointsForReversedEdges`);function $t(e){v(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(h(n.borderLeft)),o=e.node(h(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),v(e.nodes(),function(t){e.node(t).dummy===`border`&&e.removeNode(t)})}e($t,`removeBorderNodes`);function en(e){v(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}e(en,`removeSelfEdges`);function tn(e){v(O(e),function(t){var n=0;v(t,function(t,r){var i=e.node(t);i.order=r+n,v(i.selfEdges,function(t){T(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,label:t.label},`_se`)}),delete i.selfEdges})})}e(tn,`insertSelfEdges`);function nn(e){v(e.nodes(),function(t){var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}e(nn,`positionSelfEdges`);function Q(e,t){return c(u(e,t),Number)}e(Q,`selectNumberAttrs`);function $(e){var t={};return v(e,function(e,n){t[n.toLowerCase()]=e}),t}e($,`canonicalize`);export{Nt as t};
1
+ import{t as e}from"./chunk-AQ6EADP3-CZhslHi-.js";import{A as t,C as n,D as r,E as i,O as a,S as o,T as s,_ as c,a as l,b as u,c as d,d as f,f as p,g as m,h as ee,i as h,k as g,l as _,m as te,n as v,o as y,r as b,s as x,t as S,u as C,v as w,w as ne,x as re,y as ie}from"./chunk-W44A43WB-BN8EQc_u.js";function T(e,t,n,r){var i;do i=m(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}e(T,`addDummyNode`);function ae(e){var t=new l().setGraph(e.graph());return v(e.nodes(),function(n){t.setNode(n,e.node(n))}),v(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}e(ae,`simplify`);function E(e){var t=new l({multigraph:e.isMultigraph()}).setGraph(e.graph());return v(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),v(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}e(E,`asNonCompoundGraph`);function D(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);var c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}e(D,`intersectRect`);function O(e){var n=g(a(k(e)+1),function(){return[]});return v(e.nodes(),function(r){var i=e.node(r),a=i.rank;t(a)||(n[a][i.order]=r)}),n}e(O,`buildLayerMatrix`);function oe(e){var t=n(g(e.nodes(),function(t){return e.node(t).rank}));v(e.nodes(),function(n){var r=e.node(n);i(r,`rank`)&&(r.rank-=t)})}e(oe,`normalizeRanks`);function se(e){var r=n(g(e.nodes(),function(t){return e.node(t).rank})),i=[];v(e.nodes(),function(t){var n=e.node(t).rank-r;i[n]||(i[n]=[]),i[n].push(t)});var a=0,o=e.graph().nodeRankFactor;v(i,function(n,r){t(n)&&r%o!==0?--a:a&&v(n,function(t){e.node(t).rank+=a})})}e(se,`removeEmptyRanks`);function ce(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),T(e,`border`,i,t)}e(ce,`addBorderNode`);function k(e){return p(g(e.nodes(),function(n){var r=e.node(n).rank;if(!t(r))return r}))}e(k,`maxRank`);function le(e,t){var n={lhs:[],rhs:[]};return v(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n}e(le,`partition`);function ue(e,t){var n=d();try{return t()}finally{console.log(e+` time: `+(d()-n)+`ms`)}}e(ue,`time`);function de(e,t){return t()}e(de,`notime`);function fe(t){function n(e){var r=t.children(e),i=t.node(e);if(r.length&&v(r,n),Object.prototype.hasOwnProperty.call(i,`minRank`)){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;a<o;++a)A(t,`borderLeft`,`_bl`,e,i,a),A(t,`borderRight`,`_br`,e,i,a)}}e(n,`dfs`),v(t.children(),n)}e(fe,`addBorderSegments`);function A(e,t,n,r,i,a){var o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=T(e,`border`,o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}e(A,`addBorderNode`);function pe(e){var t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&j(e)}e(pe,`adjust`);function me(e){var t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&he(e),(t===`lr`||t===`rl`)&&(ge(e),j(e))}e(me,`undo`);function j(e){v(e.nodes(),function(t){M(e.node(t))}),v(e.edges(),function(t){M(e.edge(t))})}e(j,`swapWidthHeight`);function M(e){var t=e.width;e.width=e.height,e.height=t}e(M,`swapWidthHeightOne`);function he(e){v(e.nodes(),function(t){N(e.node(t))}),v(e.edges(),function(t){var n=e.edge(t);v(n.points,N),Object.prototype.hasOwnProperty.call(n,`y`)&&N(n)})}e(he,`reverseY`);function N(e){e.y=-e.y}e(N,`reverseYOne`);function ge(e){v(e.nodes(),function(t){P(e.node(t))}),v(e.edges(),function(t){var n=e.edge(t);v(n.points,P),Object.prototype.hasOwnProperty.call(n,`x`)&&P(n)})}e(ge,`swapXY`);function P(e){var t=e.x;e.x=e.y,e.y=t}e(P,`swapXYOne`);var _e=class{static{e(this,`List`)}constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,t=e._prev;if(t!==e)return F(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&F(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,ve)),n=n._prev;return`[`+e.join(`, `)+`]`}};function F(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}e(F,`unlink`);function ve(e,t){if(e!==`_next`&&e!==`_prev`)return t}e(ve,`filterOutLinks`);var ye=w(1);function be(e,t){if(e.nodeCount()<=1)return[];var n=Se(e,t||ye);return C(g(xe(n.graph,n.buckets,n.zeroIdx),function(t){return e.outEdges(t.v,t.w)}))}e(be,`greedyFAS`);function xe(e,t,n){for(var r=[],i=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)I(e,t,n,o);for(;o=i.dequeue();)I(e,t,n,o);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(o=t[s].dequeue(),o){r=r.concat(I(e,t,n,o,!0));break}}}return r}e(xe,`doGreedyFAS`);function I(e,t,n,r,i){var a=i?[]:void 0;return v(e.inEdges(r.v),function(r){var o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,L(t,n,s)}),v(e.outEdges(r.v),function(r){var i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,L(t,n,o)}),e.removeNode(r.v),a}e(I,`removeNode`);function Se(e,t){var n=new l,r=0,i=0;v(e.nodes(),function(e){n.setNode(e,{v:e,in:0,out:0})}),v(e.edges(),function(e){var a=n.edge(e.v,e.w)||0,o=t(e),s=a+o;n.setEdge(e.v,e.w,s),i=Math.max(i,n.node(e.v).out+=o),r=Math.max(r,n.node(e.w).in+=o)});var o=a(i+r+3).map(function(){return new _e}),s=r+1;return v(n.nodes(),function(e){L(o,s,n.node(e))}),{graph:n,buckets:o,zeroIdx:s}}e(Se,`buildState`);function L(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}e(L,`assignBucket`);function Ce(t){v(t.graph().acyclicer===`greedy`?be(t,n(t)):we(t),function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,m(`rev`))});function n(e){return function(t){return e.edge(t).weight}}e(n,`weightFn`)}e(Ce,`run`);function we(t){var n=[],r={},i={};function a(e){Object.prototype.hasOwnProperty.call(i,e)||(i[e]=!0,r[e]=!0,v(t.outEdges(e),function(e){Object.prototype.hasOwnProperty.call(r,e.w)?n.push(e):a(e.w)}),delete r[e])}return e(a,`dfs`),v(t.nodes(),a),n}e(we,`dfsFAS`);function Te(e){v(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}e(Te,`undo`);function Ee(e){e.graph().dummyChains=[],v(e.edges(),function(t){De(e,t)})}e(Ee,`run`);function De(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a!==r+1){e.removeEdge(t);var l=void 0,u,d;for(d=0,++r;r<a;++d,++r)s.points=[],l={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},u=T(e,`edge`,l,`_d`),r===c&&(l.width=s.width,l.height=s.height,l.dummy=`edge-label`,l.labelpos=s.labelpos),e.setEdge(n,u,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(u),n=u;e.setEdge(n,i,{weight:s.weight},o)}}e(De,`normalizeEdge`);function Oe(e){v(e.graph().dummyChains,function(t){var n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}e(Oe,`undo`);function R(t){var r={};function i(e){var a=t.node(e);if(Object.prototype.hasOwnProperty.call(r,e))return a.rank;r[e]=!0;var o=n(g(t.outEdges(e),function(e){return i(e.w)-t.edge(e).minlen}));return(o===1/0||o==null)&&(o=0),a.rank=o}e(i,`dfs`),v(t.sources(),i)}e(R,`longestPath`);function z(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}e(z,`slack`);function B(e){var t=new l({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var i,a;ke(t,e)<r;)i=Ae(t,e),a=t.hasNode(i.v)?z(e,i):-z(e,i),je(t,e,a);return t}e(B,`feasibleTree`);function ke(t,n){function r(e){v(n.nodeEdges(e),function(i){var a=i.v,o=e===a?i.w:a;!t.hasNode(o)&&!z(n,i)&&(t.setNode(o,{}),t.setEdge(e,o,{}),r(o))})}return e(r,`dfs`),v(t.nodes(),r),t.nodeCount()}e(ke,`tightTree`);function Ae(e,t){return _(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return z(t,n)})}e(Ae,`findMinSlackEdge`);function je(e,t,n){v(e.nodes(),function(e){t.node(e).rank+=n})}e(je,`shiftRanks`),w(1),w(1),Me.CycleException=V;function Me(t){var n={},r={},i=[];function a(e){if(Object.prototype.hasOwnProperty.call(r,e))throw new V;Object.prototype.hasOwnProperty.call(n,e)||(r[e]=!0,n[e]=!0,v(t.predecessors(e),a),delete r[e],i.push(e))}if(e(a,`visit`),v(t.sinks(),a),ie(n)!==t.nodeCount())throw new V;return i}e(Me,`topsort`);function V(){}e(V,`CycleException`),V.prototype=Error();function H(e,t,n){s(t)||(t=[t]);var r=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],a={};return v(t,function(t){if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);U(e,t,n===`post`,a,r,i)}),i}e(H,`dfs`);function U(e,t,n,r,i,a){Object.prototype.hasOwnProperty.call(r,t)||(r[t]=!0,n||a.push(t),v(i(t),function(t){U(e,t,n,r,i,a)}),n&&a.push(t))}e(U,`doDfs`);function Ne(e,t){return H(e,t,`post`)}e(Ne,`postorder`);function Pe(e,t){return H(e,t,`pre`)}e(Pe,`preorder`),W.initLowLimValues=q,W.initCutValues=G,W.calcCutValue=K,W.leaveEdge=Y,W.enterEdge=X,W.exchangeEdges=Ie;function W(e){e=ae(e),R(e);var t=B(e);q(t),G(t,e);for(var n,r;n=Y(t);)r=X(t,e,n),Ie(t,e,n,r)}e(W,`networkSimplex`);function G(e,t){var n=Ne(e,e.nodes());n=n.slice(0,n.length-1),v(n,function(n){Fe(e,t,n)})}e(G,`initCutValues`);function Fe(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=K(e,t,n)}e(Fe,`assignCutValue`);function K(e,t,n){var r=e.node(n).parent,i=!0,a=t.edge(n,r),o=0;return a||=(i=!1,t.edge(r,n)),o=a.weight,v(t.nodeEdges(n),function(a){var s=a.v===n,c=s?a.w:a.v;if(c!==r){var l=s===i,u=t.edge(a).weight;if(o+=l?u:-u,Re(e,n,c)){var d=e.edge(n,c).cutvalue;o+=l?-d:d}}}),o}e(K,`calcCutValue`);function q(e,t){arguments.length<2&&(t=e.nodes()[0]),J(e,{},1,t)}e(q,`initLowLimValues`);function J(e,t,n,r,i){var a=n,o=e.node(r);return t[r]=!0,v(e.neighbors(r),function(i){Object.prototype.hasOwnProperty.call(t,i)||(n=J(e,t,n,i,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}e(J,`dfsAssignLowLim`);function Y(e){return te(e.edges(),function(t){return e.edge(t).cutvalue<0})}e(Y,`leaveEdge`);function X(e,t,n){var r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);var a=e.node(r),o=e.node(i),s=a,c=!1;return a.lim>o.lim&&(s=o,c=!0),_(b(t.edges(),function(t){return c===ze(e,e.node(t.v),s)&&c!==ze(e,e.node(t.w),s)}),function(e){return z(t,e)})}e(X,`enterEdge`);function Ie(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),q(e),G(e,t),Le(e,t)}e(Ie,`exchangeEdges`);function Le(e,t){var n=Pe(e,te(e.nodes(),function(e){return!t.node(e).parent}));n=n.slice(1),v(n,function(n){var r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}e(Le,`updateRanks`);function Re(e,t,n){return e.hasEdge(t,n)}e(Re,`isTreeEdge`);function ze(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}e(ze,`isDescendant`);function Be(e){switch(e.graph().ranker){case`network-simplex`:Z(e);break;case`tight-tree`:He(e);break;case`longest-path`:Ve(e);break;default:Z(e)}}e(Be,`rank`);var Ve=R;function He(e){R(e),B(e)}e(He,`tightTreeRanker`);function Z(e){W(e)}e(Z,`networkSimplexRanker`);function Ue(e){var t=T(e,`root`,{},`_root`),n=Ge(e),r=p(x(n))-1,i=2*r+1;e.graph().nestingRoot=t,v(e.edges(),function(t){e.edge(t).minlen*=i});var a=Ke(e)+1;v(e.children(),function(o){We(e,t,i,a,r,n,o)}),e.graph().nodeRankFactor=i}e(Ue,`run`);function We(e,t,n,r,i,a,o){var s=e.children(o);if(!s.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:n});return}var c=ce(e,`_bt`),l=ce(e,`_bb`),u=e.node(o);e.setParent(c,o),u.borderTop=c,e.setParent(l,o),u.borderBottom=l,v(s,function(s){We(e,t,n,r,i,a,s);var u=e.node(s),d=u.borderTop?u.borderTop:s,f=u.borderBottom?u.borderBottom:s,p=u.borderTop?r:2*r,m=d===f?i-a[o]+1:1;e.setEdge(c,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,l,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,c,{weight:0,minlen:i+a[o]})}e(We,`dfs`);function Ge(t){var n={};function r(e,i){var a=t.children(e);a&&a.length&&v(a,function(e){r(e,i+1)}),n[e]=i}return e(r,`dfs`),v(t.children(),function(e){r(e,1)}),n}e(Ge,`treeDepths`);function Ke(e){return S(e.edges(),function(t,n){return t+e.edge(n).weight},0)}e(Ke,`sumWeights`);function qe(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,v(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}e(qe,`cleanup`);function Je(e,t,n){var r={},i;v(n,function(n){for(var a=e.parent(n),o,s;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}e(Je,`addSubgraphConstraints`);function Ye(e,n,r){var i=Xe(e),a=new l({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(t){return e.node(t)});return v(e.nodes(),function(o){var s=e.node(o),c=e.parent(o);(s.rank===n||s.minRank<=n&&n<=s.maxRank)&&(a.setNode(o),a.setParent(o,c||i),v(e[r](o),function(n){var r=n.v===o?n.w:n.v,i=a.edge(r,o),s=t(i)?0:i.weight;a.setEdge(r,o,{weight:e.edge(n).weight+s})}),Object.prototype.hasOwnProperty.call(s,`minRank`)&&a.setNode(o,{borderLeft:s.borderLeft[n],borderRight:s.borderRight[n]}))}),a}e(Ye,`buildLayerGraph`);function Xe(e){for(var t;e.hasNode(t=m(`_root`)););return t}e(Xe,`createRootNode`);function Ze(e,t){for(var n=0,r=1;r<t.length;++r)n+=Qe(e,t[r-1],t[r]);return n}e(Ze,`crossCount`);function Qe(e,t,n){for(var r=f(n,g(n,function(e,t){return t})),i=C(g(t,function(t){return o(g(e.outEdges(t),function(t){return{pos:r[t.w],weight:e.edge(t).weight}}),`pos`)})),a=1;a<n.length;)a<<=1;var s=2*a-1;--a;var c=g(Array(s),function(){return 0}),l=0;return v(i.forEach(function(e){var t=e.pos+a;c[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=c[t+1]),t=t-1>>1,c[t]+=e.weight;l+=e.weight*n})),l}e(Qe,`twoLayerCrossCount`);function $e(t){var n={},r=b(t.nodes(),function(e){return!t.children(e).length}),s=g(a(p(g(r,function(e){return t.node(e).rank}))+1),function(){return[]});function c(e){i(n,e)||(n[e]=!0,s[t.node(e).rank].push(e),v(t.successors(e),c))}return e(c,`dfs`),v(o(r,function(e){return t.node(e).rank}),c),s}e($e,`initOrder`);function et(e,t){return g(t,function(t){var n=e.inEdges(t);if(n.length){var r=S(n,function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}else return{v:t}})}e(et,`barycenter`);function tt(e,n){var r={};return v(e,function(e,n){var i=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:n};t(e.barycenter)||(i.barycenter=e.barycenter,i.weight=e.weight)}),v(n.edges(),function(e){var n=r[e.v],i=r[e.w];!t(n)&&!t(i)&&(i.indegree++,n.out.push(r[e.w]))}),nt(b(r,function(e){return!e.indegree}))}e(tt,`resolveConflicts`);function nt(n){var r=[];function i(e){return function(n){n.merged||(t(n.barycenter)||t(e.barycenter)||n.barycenter>=e.barycenter)&&rt(e,n)}}e(i,`handleIn`);function a(e){return function(t){t.in.push(e),--t.indegree===0&&n.push(t)}}for(e(a,`handleOut`);n.length;){var o=n.pop();r.push(o),v(o.in.reverse(),i(o)),v(o.out,a(o))}return g(b(r,function(e){return!e.merged}),function(e){return u(e,[`vs`,`i`,`barycenter`,`weight`])})}e(nt,`doResolveConflicts`);function rt(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}e(rt,`mergeEntries`);function it(e,t){var n=le(e,function(e){return Object.prototype.hasOwnProperty.call(e,`barycenter`)}),r=n.lhs,i=o(n.rhs,function(e){return-e.i}),a=[],s=0,c=0,l=0;r.sort(ot(!!t)),l=at(a,i,l),v(r,function(e){l+=e.vs.length,a.push(e.vs),s+=e.barycenter*e.weight,c+=e.weight,l=at(a,i,l)});var u={vs:C(a)};return c&&(u.barycenter=s/c,u.weight=c),u}e(it,`sort`);function at(e,t,n){for(var r;t.length&&(r=h(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}e(at,`consumeUnsortable`);function ot(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}e(ot,`compareWithBias`);function st(e,t,n,r){var i=e.children(t),a=e.node(t),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,c={};o&&(i=b(i,function(e){return e!==o&&e!==s}));var l=et(e,i);v(l,function(t){if(e.children(t.v).length){var i=st(e,t.v,n,r);c[t.v]=i,Object.prototype.hasOwnProperty.call(i,`barycenter`)&&lt(t,i)}});var u=tt(l,n);ct(u,c);var d=it(u,r);if(o&&(d.vs=C([o,d.vs,s]),e.predecessors(o).length)){var f=e.node(e.predecessors(o)[0]),p=e.node(e.predecessors(s)[0]);Object.prototype.hasOwnProperty.call(d,`barycenter`)||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+f.order+p.order)/(d.weight+2),d.weight+=2}return d}e(st,`sortSubgraph`);function ct(e,t){v(e,function(e){e.vs=C(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}e(ct,`expandSubgraphs`);function lt(e,n){t(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}e(lt,`mergeBarycenters`);function ut(e){var t=k(e),n=dt(e,a(1,t+1),`inEdges`),r=dt(e,a(t-1,-1,-1),`outEdges`),i=$e(e);pt(e,i);for(var o=1/0,s,c=0,l=0;l<4;++c,++l){ft(c%2?n:r,c%4>=2),i=O(e);var u=Ze(e,i);u<o&&(l=0,s=ne(i),o=u)}pt(e,s)}e(ut,`order`);function dt(e,t,n){return g(t,function(t){return Ye(e,t,n)})}e(dt,`buildLayerGraphs`);function ft(e,t){var n=new l;v(e,function(e){var r=e.graph().root,i=st(e,r,n,t);v(i.vs,function(t,n){e.node(t).order=n}),Je(e,n,i.vs)})}e(ft,`sweepLayerGraphs`);function pt(e,t){v(t,function(t){v(t,function(t,n){e.node(t).order=n})})}e(pt,`assignOrder`);function mt(e){var t=gt(e);v(e.graph().dummyChains,function(n){for(var r=e.node(n),i=r.edgeObj,a=ht(e,t,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;n!==i.w;){if(r=e.node(n),u){for(;(l=o[c])!==s&&e.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&e.node(l=o[c+1]).minRank<=r.rank;)c++;l=o[c]}e.setParent(n,l),n=e.successors(n)[0]}})}e(mt,`parentDummyChains`);function ht(e,t,n,r){var i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c=n,l;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}e(ht,`findPath`);function gt(t){var n={},r=0;function i(e){var a=r;v(t.children(e),i),n[e]={low:a,lim:r++}}return e(i,`dfs`),v(t.children(),i),n}e(gt,`postorder`);function _t(t,n){var r={};function i(e,n){var i=0,a=0,o=e.length,s=h(n);return v(n,function(e,c){var l=yt(t,e),u=l?t.node(l).order:o;(l||e===s)&&(v(n.slice(a,c+1),function(e){v(t.predecessors(e),function(n){var a=t.node(n),o=a.order;(o<i||u<o)&&!(a.dummy&&t.node(e).dummy)&&bt(r,n,e)})}),a=c+1,i=u)}),n}return e(i,`visitLayer`),S(n,i),r}e(_t,`findType1Conflicts`);function vt(t,n){var r={};function i(e,n,i,o,s){var c;v(a(n,i),function(n){c=e[n],t.node(c).dummy&&v(t.predecessors(c),function(e){var n=t.node(e);n.dummy&&(n.order<o||n.order>s)&&bt(r,e,c)})})}e(i,`scan`);function o(e,n){var r=-1,a,o=0;return v(n,function(s,c){if(t.node(s).dummy===`border`){var l=t.predecessors(s);l.length&&(a=t.node(l[0]).order,i(n,o,c,r,a),o=c,r=a)}i(n,o,n.length,a,e.length)}),n}return e(o,`visitLayer`),S(n,o),r}e(vt,`findType2Conflicts`);function yt(e,t){if(e.node(t).dummy)return te(e.predecessors(t),function(t){return e.node(t).dummy})}e(yt,`findOtherInnerSegmentNode`);function bt(e,t,n){if(t>n){var r=t;t=n,n=r}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}e(bt,`addConflict`);function xt(e,t,n){if(t>n){var r=t;t=n,n=r}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],n)}e(xt,`hasConflict`);function St(e,t,n,r){var i={},a={},s={};return v(t,function(e){v(e,function(e,t){i[e]=e,a[e]=e,s[e]=t})}),v(t,function(e){var t=-1;v(e,function(e){var c=r(e);if(c.length){c=o(c,function(e){return s[e]});for(var l=(c.length-1)/2,u=Math.floor(l),d=Math.ceil(l);u<=d;++u){var f=c[u];a[e]===e&&t<s[f]&&!xt(n,e,f)&&(a[f]=e,a[e]=i[e]=i[f],t=s[f])}}})}),{root:i,align:a}}e(St,`verticalAlignment`);function Ct(t,n,r,i,a){var o={},s=wt(t,n,r,a),c=a?`borderLeft`:`borderRight`;function l(e,t){for(var n=s.nodes(),r=n.pop(),i={};r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}e(l,`iterate`);function u(e){o[e]=s.inEdges(e).reduce(function(e,t){return Math.max(e,o[t.v]+s.edge(t))},0)}e(u,`pass1`);function d(e){var n=s.outEdges(e).reduce(function(e,t){return Math.min(e,o[t.w]-s.edge(t))},1/0),r=t.node(e);n!==1/0&&r.borderType!==c&&(o[e]=Math.max(o[e],n))}return e(d,`pass2`),l(u,s.predecessors.bind(s)),l(d,s.successors.bind(s)),v(i,function(e){o[e]=o[r[e]]}),o}e(Ct,`horizontalCompaction`);function wt(e,t,n,r){var i=new l,a=e.graph(),o=kt(a.nodesep,a.edgesep,r);return v(t,function(t){var r;v(t,function(t){var a=n[t];if(i.setNode(a),r){var s=n[r],c=i.edge(s,a);i.setEdge(s,a,Math.max(o(e,t,r),c||0))}r=t})}),i}e(wt,`buildBlockGraph`);function Tt(e,t){return _(x(t),function(t){var n=-1/0,i=1/0;return r(t,function(t,r){var a=At(e,r)/2;n=Math.max(t+a,n),i=Math.min(t-a,i)}),n-i})}e(Tt,`findSmallestWidthAlignment`);function Et(e,t){var r=x(t),i=n(r),a=p(r);v([`u`,`d`],function(r){v([`l`,`r`],function(o){var s=r+o,l=e[s],u;if(l!==t){var d=x(l);u=o===`l`?i-n(d):a-p(d),u&&(e[s]=c(l,function(e){return e+u}))}})})}e(Et,`alignCoordinates`);function Dt(e,t){return c(e.ul,function(n,r){if(t)return e[t.toLowerCase()][r];var i=o(g(e,r));return(i[1]+i[2])/2})}e(Dt,`balance`);function Ot(e){var t=O(e),n=y(_t(e,t),vt(e,t)),r={},i;return v([`u`,`d`],function(a){i=a===`u`?t:x(t).reverse(),v([`l`,`r`],function(t){t===`r`&&(i=g(i,function(e){return x(e).reverse()}));var o=(a===`u`?e.predecessors:e.successors).bind(e),s=St(e,i,n,o),l=Ct(e,i,s.root,s.align,t===`r`);t===`r`&&(l=c(l,function(e){return-e})),r[a+t]=l})}),Et(r,Tt(e,r)),Dt(r,e.graph().align)}e(Ot,`positionX`);function kt(e,t,n){return function(r,i,a){var o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.prototype.hasOwnProperty.call(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2;break}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.prototype.hasOwnProperty.call(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2;break}return l&&(c+=n?l:-l),l=0,c}}e(kt,`sep`);function At(e,t){return e.node(t).width}e(At,`width`);function jt(e){e=E(e),Mt(e),re(Ot(e),function(t,n){e.node(n).x=t})}e(jt,`position`);function Mt(e){var t=O(e),n=e.graph().ranksep,r=0;v(t,function(t){var i=p(g(t,function(t){return e.node(t).height}));v(t,function(t){e.node(t).y=r+i/2}),r+=i+n})}e(Mt,`positionY`);function Nt(e,t){var n=t&&t.debugTiming?ue:de;n(`layout`,()=>{var t=n(` buildLayoutGraph`,()=>Wt(e));n(` runLayout`,()=>Pt(t,n)),n(` updateInputGraph`,()=>Ft(e,t))})}e(Nt,`layout`);function Pt(e,t){t(` makeSpaceForEdgeLabels`,()=>Gt(e)),t(` removeSelfEdges`,()=>en(e)),t(` acyclic`,()=>Ce(e)),t(` nestingGraph.run`,()=>Ue(e)),t(` rank`,()=>Be(E(e))),t(` injectEdgeLabelProxies`,()=>Kt(e)),t(` removeEmptyRanks`,()=>se(e)),t(` nestingGraph.cleanup`,()=>qe(e)),t(` normalizeRanks`,()=>oe(e)),t(` assignRankMinMax`,()=>qt(e)),t(` removeEdgeLabelProxies`,()=>Jt(e)),t(` normalize.run`,()=>Ee(e)),t(` parentDummyChains`,()=>mt(e)),t(` addBorderSegments`,()=>fe(e)),t(` order`,()=>ut(e)),t(` insertSelfEdges`,()=>tn(e)),t(` adjustCoordinateSystem`,()=>pe(e)),t(` position`,()=>jt(e)),t(` positionSelfEdges`,()=>nn(e)),t(` removeBorderNodes`,()=>$t(e)),t(` normalize.undo`,()=>Oe(e)),t(` fixupEdgeLabelCoords`,()=>Zt(e)),t(` undoCoordinateSystem`,()=>me(e)),t(` translateGraph`,()=>Yt(e)),t(` assignNodeIntersects`,()=>Xt(e)),t(` reversePoints`,()=>Qt(e)),t(` acyclic.undo`,()=>Te(e))}e(Pt,`runLayout`);function Ft(e,t){v(e.nodes(),function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))}),v(e.edges(),function(n){var r=e.edge(n),i=t.edge(n);r.points=i.points,Object.prototype.hasOwnProperty.call(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}e(Ft,`updateInputGraph`);var It=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],Lt={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},Rt=[`acyclicer`,`ranker`,`rankdir`,`align`],zt=[`width`,`height`],Bt={width:0,height:0},Vt=[`minlen`,`weight`,`width`,`height`,`labeloffset`],Ht={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},Ut=[`labelpos`];function Wt(e){var t=new l({multigraph:!0,compound:!0}),n=$(e.graph());return t.setGraph(y({},Lt,Q(n,It),u(n,Rt))),v(e.nodes(),function(n){var r=$(e.node(n));t.setNode(n,ee(Q(r,zt),Bt)),t.setParent(n,e.parent(n))}),v(e.edges(),function(n){var r=$(e.edge(n));t.setEdge(n,y({},Ht,Q(r,Vt),u(r,Ut)))}),t}e(Wt,`buildLayoutGraph`);function Gt(e){var t=e.graph();t.ranksep/=2,v(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}e(Gt,`makeSpaceForEdgeLabels`);function Kt(e){v(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v);T(e,`edge-proxy`,{rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t},`_ep`)}})}e(Kt,`injectEdgeLabelProxies`);function qt(e){var t=0;v(e.nodes(),function(n){var r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=p(t,r.maxRank))}),e.graph().maxRank=t}e(qt,`assignRankMinMax`);function Jt(e){v(e.nodes(),function(t){var n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}e(Jt,`removeEdgeLabelProxies`);function Yt(t){var n=1/0,r=0,i=1/0,a=0,o=t.graph(),s=o.marginx||0,c=o.marginy||0;function l(e){var t=e.x,o=e.y,s=e.width,c=e.height;n=Math.min(n,t-s/2),r=Math.max(r,t+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2)}e(l,`getExtremes`),v(t.nodes(),function(e){l(t.node(e))}),v(t.edges(),function(e){var n=t.edge(e);Object.prototype.hasOwnProperty.call(n,`x`)&&l(n)}),n-=s,i-=c,v(t.nodes(),function(e){var r=t.node(e);r.x-=n,r.y-=i}),v(t.edges(),function(e){var r=t.edge(e);v(r.points,function(e){e.x-=n,e.y-=i}),Object.prototype.hasOwnProperty.call(r,`x`)&&(r.x-=n),Object.prototype.hasOwnProperty.call(r,`y`)&&(r.y-=i)}),o.width=r-n+s,o.height=a-i+c}e(Yt,`translateGraph`);function Xt(e){v(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(D(r,a)),n.points.push(D(i,o))})}e(Xt,`assignNodeIntersects`);function Zt(e){v(e.edges(),function(t){var n=e.edge(t);if(Object.prototype.hasOwnProperty.call(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset;break}})}e(Zt,`fixupEdgeLabelCoords`);function Qt(e){v(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}e(Qt,`reversePointsForReversedEdges`);function $t(e){v(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(h(n.borderLeft)),o=e.node(h(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),v(e.nodes(),function(t){e.node(t).dummy===`border`&&e.removeNode(t)})}e($t,`removeBorderNodes`);function en(e){v(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}e(en,`removeSelfEdges`);function tn(e){v(O(e),function(t){var n=0;v(t,function(t,r){var i=e.node(t);i.order=r+n,v(i.selfEdges,function(t){T(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,label:t.label},`_se`)}),delete i.selfEdges})})}e(tn,`insertSelfEdges`);function nn(e){v(e.nodes(),function(t){var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}e(nn,`positionSelfEdges`);function Q(e,t){return c(u(e,t),Number)}e(Q,`selectNumberAttrs`);function $(e){var t={};return v(e,function(e,n){t[n.toLowerCase()]=e}),t}e($,`canonicalize`);export{Nt as t};
@@ -1,9 +1,9 @@
1
- import{F as e,H as t,K as n,N as r,S as i,Y as a,Z as o,r as s,tt as c}from"./chunk-67TQ5CYL-4sNPJU1q.js";import{t as l}from"./chunk-AQ6EADP3-CZhslHi-.js";import{q as u}from"./chunk-7W6UQGC5-KyEG0HQg.js";import{o as d,y as f}from"./chunk-QA3QBVWF-BgRW3SXd.js";import{n as p}from"./index-KctnI3Vq.js";import{t as m}from"./chunk-6764PJDD-DpIS7hxD.js";import{t as h}from"./chunk-ZXARS5L4-CxN8oiwI.js";var g=(function(){var e=l(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,2],n=[1,3],r=[1,4],i=[2,4],a=[1,9],o=[1,11],s=[1,16],c=[1,17],u=[1,18],d=[1,19],f=[1,33],p=[1,20],m=[1,21],h=[1,22],g=[1,23],_=[1,24],v=[1,26],y=[1,27],b=[1,28],x=[1,29],S=[1,30],C=[1,31],w=[1,32],T=[1,35],E=[1,36],D=[1,37],O=[1,38],k=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],j=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],M=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N={trace:l(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NL`,6:`SD`,14:`DESCR`,15:`-->`,16:`HIDE_EMPTY`,17:`scale`,18:`WIDTH`,19:`COMPOSIT_STATE`,20:`STRUCT_START`,21:`STRUCT_STOP`,22:`STATE_DESCR`,23:`AS`,24:`ID`,25:`FORK`,26:`JOIN`,27:`CHOICE`,28:`CONCURRENT`,29:`note`,31:`NOTE_TEXT`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,38:`CLICK`,39:`STRING`,40:`HREF`,41:`classDef`,42:`CLASSDEF_ID`,43:`CLASSDEF_STYLEOPTS`,44:`DEFAULT`,45:`style`,46:`STYLE_IDS`,47:`STYLEDEF_STYLEOPTS`,48:`class`,49:`CLASSENTITY_IDS`,50:`STYLECLASS`,51:`direction_tb`,52:`direction_bt`,53:`direction_rl`,54:`direction_lr`,56:`;`,57:`EDGE_STATE`,58:`STYLE_SEPARATOR`,59:`left_of`,60:`right_of`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:l(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:a[s]!=`nl`&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:this.$=a[s];break;case 8:this.$=`nl`;break;case 12:this.$=a[s];break;case 13:let e=a[s-1];e.description=r.trimColon(a[s]),this.$=e;break;case 14:this.$={stmt:`relation`,state1:a[s-2],state2:a[s]};break;case 15:let t=r.trimColon(a[s]);this.$={stmt:`relation`,state1:a[s-3],state2:a[s-1],description:t};break;case 19:this.$={stmt:`state`,id:a[s-3],type:`default`,description:``,doc:a[s-1]};break;case 20:var c=a[s],l=a[s-2].trim();if(a[s].match(`:`)){var u=a[s].split(`:`);c=u[0],l=[l,u[1]]}this.$={stmt:`state`,id:c,type:`default`,description:l};break;case 21:this.$={stmt:`state`,id:a[s-3],type:`default`,description:a[s-5],doc:a[s-1]};break;case 22:this.$={stmt:`state`,id:a[s],type:`fork`};break;case 23:this.$={stmt:`state`,id:a[s],type:`join`};break;case 24:this.$={stmt:`state`,id:a[s],type:`choice`};break;case 25:this.$={stmt:`state`,id:r.getDividerId(),type:`divider`};break;case 26:this.$={stmt:`state`,id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 29:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 30:case 31:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:this.$={stmt:`click`,id:a[s-3],url:a[s-2],tooltip:a[s-1]};break;case 33:this.$={stmt:`click`,id:a[s-3],url:a[s-1],tooltip:``};break;case 34:case 35:this.$={stmt:`classDef`,id:a[s-1].trim(),classes:a[s].trim()};break;case 36:this.$={stmt:`style`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 37:this.$={stmt:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:r.setDirection(`TB`),this.$={stmt:`dir`,value:`TB`};break;case 39:r.setDirection(`BT`),this.$={stmt:`dir`,value:`BT`};break;case 40:r.setDirection(`RL`),this.$={stmt:`dir`,value:`RL`};break;case 41:r.setDirection(`LR`),this.$={stmt:`dir`,value:`LR`};break;case 44:case 45:this.$={stmt:`state`,id:a[s].trim(),type:`default`,description:``};break;case 46:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break;case 47:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break}},`anonymous`),table:[{3:1,4:t,5:n,6:r},{1:[3]},{3:5,4:t,5:n,6:r},{3:6,4:t,5:n,6:r},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:s,17:c,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:s,17:c,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,7]),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(A,[2,11]),e(A,[2,12],{14:[1,40],15:[1,41]}),e(A,[2,16]),{18:[1,42]},e(A,[2,18],{20:[1,43]}),{23:[1,44]},e(A,[2,22]),e(A,[2,23]),e(A,[2,24]),e(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(A,[2,28]),{34:[1,49]},{36:[1,50]},e(A,[2,31]),{13:51,24:f,57:k},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(j,[2,44],{58:[1,56]}),e(j,[2,45],{58:[1,57]}),e(A,[2,38]),e(A,[2,39]),e(A,[2,40]),e(A,[2,41]),e(A,[2,6]),e(A,[2,13]),{13:58,24:f,57:k},e(A,[2,17]),e(M,i,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(A,[2,29]),e(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},e(A,[2,14],{14:[1,71]}),{4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:s,17:c,19:u,21:[1,72],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(A,[2,34]),e(A,[2,35]),e(A,[2,36]),e(A,[2,37]),e(j,[2,46]),e(j,[2,47]),e(A,[2,15]),e(A,[2,19]),e(M,i,{7:78}),e(A,[2,26]),e(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:s,17:c,19:u,21:[1,81],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,32]),e(A,[2,33]),e(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:l(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:l(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,c=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,typeof h.yylloc>`u`&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}l(b,`popStack`);function x(){var e;return e=r.pop()||h.lex()||p,typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}l(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:((S===null||typeof S>`u`)&&(S=x()),T=o[w]&&o[w][S]),typeof T>`u`||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(c+1)+`:
1
+ import{t as e}from"./chunk-AQ6EADP3-CZhslHi-.js";import{q as t}from"./chunk-7W6UQGC5-pyKGssV3.js";import{F as n,H as r,K as i,N as a,S as o,Y as s,Z as c,r as l,tt as u}from"./chunk-67TQ5CYL-CA7OhIEf.js";import{o as d,y as f}from"./chunk-QA3QBVWF-DVXPOIxe.js";import{r as p}from"./chunk-VU6ZFW4Y-BLeasdkU.js";import{t as m}from"./chunk-6764PJDD-C7xxk063.js";import{t as h}from"./chunk-ZXARS5L4-C3v-4Fsw.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,16],l=[1,17],u=[1,18],d=[1,19],f=[1,33],p=[1,20],m=[1,21],h=[1,22],g=[1,23],_=[1,24],v=[1,26],y=[1,27],b=[1,28],x=[1,29],S=[1,30],C=[1,31],w=[1,32],T=[1,35],E=[1,36],D=[1,37],O=[1,38],k=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],j=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],M=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NL`,6:`SD`,14:`DESCR`,15:`-->`,16:`HIDE_EMPTY`,17:`scale`,18:`WIDTH`,19:`COMPOSIT_STATE`,20:`STRUCT_START`,21:`STRUCT_STOP`,22:`STATE_DESCR`,23:`AS`,24:`ID`,25:`FORK`,26:`JOIN`,27:`CHOICE`,28:`CONCURRENT`,29:`note`,31:`NOTE_TEXT`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,38:`CLICK`,39:`STRING`,40:`HREF`,41:`classDef`,42:`CLASSDEF_ID`,43:`CLASSDEF_STYLEOPTS`,44:`DEFAULT`,45:`style`,46:`STYLE_IDS`,47:`STYLEDEF_STYLEOPTS`,48:`class`,49:`CLASSENTITY_IDS`,50:`STYLECLASS`,51:`direction_tb`,52:`direction_bt`,53:`direction_rl`,54:`direction_lr`,56:`;`,57:`EDGE_STATE`,58:`STYLE_SEPARATOR`,59:`left_of`,60:`right_of`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:a[s]!=`nl`&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:this.$=a[s];break;case 8:this.$=`nl`;break;case 12:this.$=a[s];break;case 13:let e=a[s-1];e.description=r.trimColon(a[s]),this.$=e;break;case 14:this.$={stmt:`relation`,state1:a[s-2],state2:a[s]};break;case 15:let t=r.trimColon(a[s]);this.$={stmt:`relation`,state1:a[s-3],state2:a[s-1],description:t};break;case 19:this.$={stmt:`state`,id:a[s-3],type:`default`,description:``,doc:a[s-1]};break;case 20:var c=a[s],l=a[s-2].trim();if(a[s].match(`:`)){var u=a[s].split(`:`);c=u[0],l=[l,u[1]]}this.$={stmt:`state`,id:c,type:`default`,description:l};break;case 21:this.$={stmt:`state`,id:a[s-3],type:`default`,description:a[s-5],doc:a[s-1]};break;case 22:this.$={stmt:`state`,id:a[s],type:`fork`};break;case 23:this.$={stmt:`state`,id:a[s],type:`join`};break;case 24:this.$={stmt:`state`,id:a[s],type:`choice`};break;case 25:this.$={stmt:`state`,id:r.getDividerId(),type:`divider`};break;case 26:this.$={stmt:`state`,id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 29:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 30:case 31:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:this.$={stmt:`click`,id:a[s-3],url:a[s-2],tooltip:a[s-1]};break;case 33:this.$={stmt:`click`,id:a[s-3],url:a[s-1],tooltip:``};break;case 34:case 35:this.$={stmt:`classDef`,id:a[s-1].trim(),classes:a[s].trim()};break;case 36:this.$={stmt:`style`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 37:this.$={stmt:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:r.setDirection(`TB`),this.$={stmt:`dir`,value:`TB`};break;case 39:r.setDirection(`BT`),this.$={stmt:`dir`,value:`BT`};break;case 40:r.setDirection(`RL`),this.$={stmt:`dir`,value:`RL`};break;case 41:r.setDirection(`LR`),this.$={stmt:`dir`,value:`LR`};break;case 44:case 45:this.$={stmt:`state`,id:a[s].trim(),type:`default`,description:``};break;case 46:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break;case 47:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break}},`anonymous`),table:[{3:1,4:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,7]),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(A,[2,11]),t(A,[2,12],{14:[1,40],15:[1,41]}),t(A,[2,16]),{18:[1,42]},t(A,[2,18],{20:[1,43]}),{23:[1,44]},t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(A,[2,28]),{34:[1,49]},{36:[1,50]},t(A,[2,31]),{13:51,24:f,57:k},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(j,[2,44],{58:[1,56]}),t(j,[2,45],{58:[1,57]}),t(A,[2,38]),t(A,[2,39]),t(A,[2,40]),t(A,[2,41]),t(A,[2,6]),t(A,[2,13]),{13:58,24:f,57:k},t(A,[2,17]),t(M,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(A,[2,29]),t(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(A,[2,14],{14:[1,71]}),{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,72],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(A,[2,34]),t(A,[2,35]),t(A,[2,36]),t(A,[2,37]),t(j,[2,46]),t(j,[2,47]),t(A,[2,15]),t(A,[2,19]),t(M,a,{7:78}),t(A,[2,26]),t(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,81],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,32]),t(A,[2,33]),t(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,typeof h.yylloc>`u`&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e;return e=i.pop()||h.lex()||p,typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:((S===null||typeof S>`u`)&&(S=x()),T=s[w]&&s[w][S]),typeof T>`u`||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
- Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(c+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,s=h.yytext,c=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,u,c,g.yy,T[1],i,a].concat(m)),typeof E<`u`)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};N.lexer=(function(){return{EOF:1,parseError:l(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:l(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:l(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:l(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:l(function(){return this._more=!0,this},`more`),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
- `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:l(function(e){this.unput(this.match.slice(e))},`less`),pastInput:l(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:l(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:l(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
5
- `+t+`^`},`showPosition`),test_match:l(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:l(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:l(function(){return this.next()||this.lex()},`lex`),begin:l(function(e){this.conditionStack.push(e)},`begin`),popState:l(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:l(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:l(function(e){this.begin(e)},`pushState`),stateStackSize:l(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:l(function(e,t,n,r){function i(){let n=t.yytext.indexOf(`%%`);if(n===0)return!1;if(n>0){let r=t.yytext.slice(0,n),i=t.yytext.slice(n);i&&e.lexer.unput(i),t.yytext=r}return!0}switch(l(i,`processId`),n){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState(`SCALE`),17;case 14:return 18;case 15:this.popState();break;case 16:return this.begin(`acc_title`),33;case 17:return this.popState(),`acc_title_value`;case 18:return this.begin(`acc_descr`),35;case 19:return this.popState(),`acc_descr_value`;case 20:this.begin(`acc_descr_multiline`);break;case 21:this.popState();break;case 22:return`acc_descr_multiline_value`;case 23:return this.pushState(`CLASSDEF`),41;case 24:return this.popState(),this.pushState(`CLASSDEFID`),`DEFAULT_CLASSDEF_ID`;case 25:return this.popState(),this.pushState(`CLASSDEFID`),42;case 26:return this.popState(),43;case 27:return this.pushState(`CLASS`),48;case 28:return this.popState(),this.pushState(`CLASS_STYLE`),49;case 29:return this.popState(),50;case 30:return this.pushState(`STYLE`),45;case 31:return this.popState(),this.pushState(`STYLEDEF_STYLES`),46;case 32:return this.popState(),47;case 33:return this.pushState(`SCALE`),17;case 34:return 18;case 35:this.popState();break;case 36:this.pushState(`STATE`);break;case 37:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),25;case 38:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),26;case 39:return this.popState(),t.yytext=t.yytext.slice(0,-10).trim(),27;case 40:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),25;case 41:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),26;case 42:return this.popState(),t.yytext=t.yytext.slice(0,-10).trim(),27;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState(`STATE_STRING`);break;case 48:return this.pushState(`STATE_ID`),`AS`;case 49:return i()?(this.popState(),`ID`):void 0;case 50:this.popState();break;case 51:return`STATE_DESCR`;case 52:return 19;case 53:this.popState();break;case 54:return this.popState(),this.pushState(`struct`),20;case 55:return this.popState(),21;case 56:break;case 57:return this.begin(`NOTE`),29;case 58:return this.popState(),this.pushState(`NOTE_ID`),59;case 59:return this.popState(),this.pushState(`NOTE_ID`),60;case 60:this.popState(),this.pushState(`FLOATING_NOTE`);break;case 61:return this.popState(),this.pushState(`FLOATING_NOTE_ID`),`AS`;case 62:break;case 63:return`NOTE_TEXT`;case 64:return i()?(this.popState(),`ID`):void 0;case 65:return i()?(this.popState(),this.pushState(`NOTE_TEXT`),24):void 0;case 66:return this.popState(),t.yytext=t.yytext.substr(2).trim(),31;case 67:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),31;case 68:return 6;case 69:return 6;case 70:return 16;case 71:return 57;case 72:return i()?24:void 0;case 73:return t.yytext=t.yytext.trim(),14;case 74:return 15;case 75:return 28;case 76:return 58;case 77:return 5;case 78:return`INVALID`}},`anonymous`),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,55,56,57,71,72,73,74,75,76],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,54,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}}})();function P(){this.yy={}}return l(P,`Parser`),P.prototype=N,N.Parser=P,new P})();g.parser=g;var _=g,v=`state`,y=`root`,b=`relation`,x=`classDef`,S=`style`,C=`applyClass`,w=`default`,T=`divider`,E=`fill:none`,D=`fill: #333`,O=`markdown`,k=`normal`,A=`rect`,j=`rectWithTitle`,M=`stateStart`,N=`stateEnd`,P=`divider`,F=`roundedWithTitle`,ee=`note`,te=`noteGroup`,I=`statediagram`,ne=`${I}-state`,L=`transition`,re=`note`,ie=`${L} note-edge`,ae=`${I}-${re}`,oe=`${I}-cluster`,se=`${I}-cluster-alt`,R=`parent`,z=`note`,ce=`state`,B=`----`,le=`${B}${z}`,V=`${B}${R}`,H=l((e,t=`TB`)=>{if(!e.doc)return t;let n=t;for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`),ue={getClasses:l(function(e,t){return t.db.getClasses()},`getClasses`),draw:l(async function(e,t,n,r){u.info(`REF0:`),u.info(`Drawing state diagram (v2)`,t);let{securityLevel:i,state:a,layout:s}=o();r.db.extract(r.db.getRootDocV2());let c=r.db.getData(),l=m(t,i);c.type=r.type,c.layoutAlgorithm=s,c.nodeSpacing=a?.nodeSpacing||50,c.rankSpacing=a?.rankSpacing||50,o().look===`neo`?c.markers=[`barbNeo`]:c.markers=[`barb`],c.diagramId=t,await p(c,l);try{(typeof r.db.getLinks==`function`?r.db.getLinks():new Map).forEach((e,t)=>{let n=typeof t==`string`?t:typeof t?.id==`string`?t.id:``;if(!n){u.warn(`⚠️ Invalid or missing stateId from key:`,JSON.stringify(t));return}let r=l.node()?.querySelectorAll(`g`),i;if(r?.forEach(e=>{e.textContent?.trim()===n&&(i=e)}),!i){u.warn(`⚠️ Could not find node matching text:`,n);return}let a=i.parentNode;if(!a){u.warn(`⚠️ Node has no parent, cannot wrap:`,n);return}let o=document.createElementNS(`http://www.w3.org/2000/svg`,`a`),s=e.url.replace(/^"+|"+$/g,``);if(o.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,s),o.setAttribute(`target`,`_blank`),e.tooltip){let t=e.tooltip.replace(/^"+|"+$/g,``);o.setAttribute(`title`,t)}a.replaceChild(o,i),o.appendChild(i),u.info(`🔗 Wrapped node in <a> tag for:`,n,e.url)})}catch(e){u.error(`❌ Error injecting clickable links:`,e)}d.insertTitle(l,`statediagramTitleText`,a?.titleTopMargin??25,r.db.getDiagramTitle()),h(l,8,I,a?.useMaxWidth??!0)},`draw`),getDir:H},U=new Map,W=0;function G(e=``,t=0,n=``,r=B){return`${ce}-${e}${n!==null&&n.length>0?`${r}${n}`:``}-${t}`}l(G,`stateDomId`);var de=l((e,t,n,r,i,a,c,l)=>{u.trace(`items`,t),t.forEach(t=>{switch(t.stmt){case v:X(e,t,n,r,i,a,c,l);break;case w:X(e,t,n,r,i,a,c,l);break;case b:{X(e,t.state1,n,r,i,a,c,l),X(e,t.state2,n,r,i,a,c,l);let u=c===`neo`,d={id:`edge`+W,start:t.state1.id,end:t.state2.id,arrowhead:`normal`,arrowTypeEnd:u?`arrow_barb_neo`:`arrow_barb`,style:E,labelStyle:``,label:s.sanitizeText(t.description??``,o()),arrowheadStyle:D,labelpos:`c`,labelType:O,thickness:k,classes:L,look:c};i.push(d),W++}break}})},`setupDoc`),K=l((e,t=`TB`)=>{let n=t;if(e.doc)for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`);function q(e,t,n){if(!t.id||t.id===`</join></fork>`||t.id===`</choice>`)return;t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(` `).forEach(e=>{let r=n.get(e);r&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...r.styles])}));let r=e.find(e=>e.id===t.id);r?Object.assign(r,t):e.push(t)}l(q,`insertOrUpdateNode`);function J(e){return e?.classes?.join(` `)??``}l(J,`getClassesFromDbInfo`);function Y(e){return e?.styles??[]}l(Y,`getStylesFromDbInfo`);var X=l((e,t,n,r,i,a,c,l)=>{let d=t.id,f=n.get(d),p=J(f),m=Y(f),h=o();if(u.info(`dataFetcher parsedItem`,t,f,m),d!==`root`){let n=A;t.start===!0?n=M:t.start===!1&&(n=N),t.type!==w&&(n=t.type),U.get(d)||U.set(d,{id:d,shape:n,description:s.sanitizeText(d,h),cssClasses:`${p} ${ne}`,cssStyles:m});let o=U.get(d);t.description&&(Array.isArray(o.description)?(o.shape=j,o.description.push(t.description)):o.description?.length&&o.description.length>0?(o.shape=j,o.description===d?o.description=[t.description]:o.description=[o.description,t.description]):(o.shape=A,o.description=t.description),o.description=s.sanitizeTextOrArray(o.description,h)),o.description?.length===1&&o.shape===j&&(o.type===`group`?o.shape=F:o.shape=A),!o.type&&t.doc&&(u.info(`Setting cluster for XCX`,d,K(t)),o.type=`group`,o.isGroup=!0,o.dir=K(t),o.shape=t.type===T?P:F,o.cssClasses=`${o.cssClasses} ${oe} ${a?se:``}`);let f={labelStyle:``,shape:o.shape,label:o.description,cssClasses:o.cssClasses,cssCompiledStyles:[],cssStyles:o.cssStyles,id:d,dir:o.dir,domId:G(d,W),type:o.type,isGroup:o.type===`group`,padding:8,rx:10,ry:10,look:c,labelType:`markdown`};if(f.shape===P&&(f.label=``),e&&e.id!==`root`&&(u.trace(`Setting node `,d,` to be child of its parent `,e.id),f.parentId=e.id),f.centerLabel=!0,t.note){let e={labelStyle:``,shape:ee,label:t.note.text,labelType:`markdown`,cssClasses:ae,cssStyles:[],cssCompiledStyles:[],id:d+le+`-`+W,domId:G(d,W,z),type:o.type,isGroup:o.type===`group`,padding:h.flowchart?.padding,look:c,position:t.note.position},n=d+V,a={labelStyle:``,shape:te,label:t.note.text,cssClasses:o.cssClasses,cssStyles:[],id:d+V,domId:G(d,W,R),type:`group`,isGroup:!0,padding:16,look:c,position:t.note.position};W++,a.id=n,e.parentId=n,q(r,a,l),q(r,e,l),q(r,f,l);let s=d,u=e.id;t.note.position===`left of`&&(s=e.id,u=d),i.push({id:s+`-`+u,start:s,end:u,arrowhead:`none`,arrowTypeEnd:``,style:E,labelStyle:``,classes:ie,arrowheadStyle:D,labelpos:`c`,labelType:O,thickness:k,look:c})}else q(r,f,l)}t.doc&&(u.trace(`Adding nodes children `),de(t,t.doc,n,r,i,!a,c,l))},`dataFetcher`),fe=l(()=>{U.clear(),W=0},`reset`),Z={START_NODE:`[*]`,START_TYPE:`start`,END_NODE:`[*]`,END_TYPE:`end`,COLOR_KEYWORD:`color`,FILL_KEYWORD:`fill`,BG_FILL:`bgFill`,STYLECLASS_SEP:`,`},Q=l(()=>new Map,`newClassesList`),pe=l(()=>({relations:[],states:new Map,documents:{}}),`newDoc`),$=l(e=>JSON.parse(JSON.stringify(e)),`clone`),me=class{constructor(a){this.version=a,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Q(),this.documents={root:pe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=c,this.setAccTitle=r,this.getAccDescription=i,this.setAccDescription=t,this.setDiagramTitle=e,this.getDiagramTitle=n,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}static{l(this,`StateDB`)}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(e){this.clear(!0);for(let t of Array.isArray(e)?e:e.doc)switch(t.stmt){case v:this.addState(t.id.trim(),t.type,t.doc,t.description,t.note);break;case b:this.addRelation(t.state1,t.state2,t.description);break;case x:this.addStyleClass(t.id.trim(),t.classes);break;case S:this.handleStyleDef(t);break;case C:this.setCssClass(t.id.trim(),t.styleClass);break;case`click`:this.addLink(t.id,t.url,t.tooltip);break}let t=this.getStates(),n=o();fe(),X(void 0,this.getRootDocV2(),t,this.nodes,this.edges,!0,n.look,this.classes);for(let e of this.nodes)if(Array.isArray(e.label)){if(e.description=e.label.slice(1),e.isGroup&&e.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${e.id}]`);e.label=e.label[0]}}handleStyleDef(e){let t=e.id.trim().split(`,`),n=e.styleClass.split(`,`);for(let e of t){let t=this.getState(e);if(!t){let n=e.trim();this.addState(n),t=this.getState(n)}t&&(t.styles=n.map(e=>e.replace(/;/g,``)?.trim()))}}setRootDoc(e){u.info(`Setting root doc`,e),this.rootDoc=e,this.version===1?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(e,t,n){if(t.stmt===b){this.docTranslator(e,t.state1,!0),this.docTranslator(e,t.state2,!1);return}if(t.stmt===v&&(t.id===Z.START_NODE?(t.id=e.id+(n?`_start`:`_end`),t.start=n):t.id=t.id.trim()),t.stmt!==y&&t.stmt!==v||!t.doc)return;let r=[],i=[];for(let e of t.doc)if(e.type===T){let t=$(e);t.doc=$(i),r.push(t),i=[]}else i.push(e);if(r.length>0&&i.length>0){let e={stmt:v,id:f(),type:`divider`,doc:$(i)};r.push($(e)),t.doc=r}t.doc.forEach(e=>this.docTranslator(t,e,!0))}getRootDocV2(){return this.docTranslator({id:y,stmt:y},{id:y,stmt:y,doc:this.rootDoc},!0),{id:y,doc:this.rootDoc}}addState(e,t=w,n=void 0,r=void 0,i=void 0,a=void 0,c=void 0,l=void 0){let d=e?.trim();if(!this.currentDocument.states.has(d))u.info(`Adding state `,d,r),this.currentDocument.states.set(d,{stmt:v,id:d,descriptions:[],type:t,doc:n,note:i,classes:[],styles:[],textStyles:[]});else{let e=this.currentDocument.states.get(d);if(!e)throw Error(`State not found: ${d}`);e.doc||=n,e.type||=t}if(r&&(u.info(`Setting state description`,d,r),(Array.isArray(r)?r:[r]).forEach(e=>this.addDescription(d,e.trim()))),i){let e=this.currentDocument.states.get(d);if(!e)throw Error(`State not found: ${d}`);e.note=i,e.note.text=s.sanitizeText(e.note.text,o())}a&&(u.info(`Setting state classes`,d,a),(Array.isArray(a)?a:[a]).forEach(e=>this.setCssClass(d,e.trim()))),c&&(u.info(`Setting state styles`,d,c),(Array.isArray(c)?c:[c]).forEach(e=>this.setStyle(d,e.trim()))),l&&(u.info(`Setting state styles`,d,c),(Array.isArray(l)?l:[l]).forEach(e=>this.setTextStyle(d,e.trim())))}clear(e){this.nodes=[],this.edges=[],this.documents={root:pe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Q(),e||(this.links=new Map,a())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){u.info(`Documents = `,this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,t,n){this.links.set(e,{url:t,tooltip:n}),u.warn(`Adding link`,e,t,n)}getLinks(){return this.links}startIdIfNeeded(e=``){return e===Z.START_NODE?(this.startEndCount++,`${Z.START_TYPE}${this.startEndCount}`):e}startTypeIfNeeded(e=``,t=w){return e===Z.START_NODE?Z.START_TYPE:t}endIdIfNeeded(e=``){return e===Z.END_NODE?(this.startEndCount++,`${Z.END_TYPE}${this.startEndCount}`):e}endTypeIfNeeded(e=``,t=w){return e===Z.END_NODE?Z.END_TYPE:t}addRelationObjs(e,t,n=``){let r=this.startIdIfNeeded(e.id.trim()),i=this.startTypeIfNeeded(e.id.trim(),e.type),a=this.startIdIfNeeded(t.id.trim()),c=this.startTypeIfNeeded(t.id.trim(),t.type);this.addState(r,i,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(a,c,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.currentDocument.relations.push({id1:r,id2:a,relationTitle:s.sanitizeText(n,o())})}addRelation(e,t,n){if(typeof e==`object`&&typeof t==`object`)this.addRelationObjs(e,t,n);else if(typeof e==`string`&&typeof t==`string`){let r=this.startIdIfNeeded(e.trim()),i=this.startTypeIfNeeded(e),a=this.endIdIfNeeded(t.trim()),c=this.endTypeIfNeeded(t);this.addState(r,i),this.addState(a,c),this.currentDocument.relations.push({id1:r,id2:a,relationTitle:n?s.sanitizeText(n,o()):void 0})}}addDescription(e,t){let n=this.currentDocument.states.get(e),r=t.startsWith(`:`)?t.replace(`:`,``).trim():t;n?.descriptions?.push(s.sanitizeText(r,o()))}cleanupLabel(e){return e.startsWith(`:`)?e.slice(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(e,t=``){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});let n=this.classes.get(e);t&&n&&t.split(Z.STYLECLASS_SEP).forEach(e=>{let t=e.replace(/([^;]*);/,`$1`).trim();if(RegExp(Z.COLOR_KEYWORD).exec(e)){let e=t.replace(Z.FILL_KEYWORD,Z.BG_FILL).replace(Z.COLOR_KEYWORD,Z.FILL_KEYWORD);n.textStyles.push(e)}n.styles.push(t)})}getClasses(){return this.classes}setCssClass(e,t){e.split(`,`).forEach(e=>{let n=this.getState(e);if(!n){let t=e.trim();this.addState(t),n=this.getState(t)}n?.classes?.push(t)})}setStyle(e,t){this.getState(e)?.styles?.push(t)}setTextStyle(e,t){this.getState(e)?.textStyles?.push(t)}getDirectionStatement(){return this.rootDoc.find(e=>e.stmt===`dir`)}getDirection(){return this.getDirectionStatement()?.value??`TB`}setDirection(e){let t=this.getDirectionStatement();t?t.value=e:this.rootDoc.unshift({stmt:`dir`,value:e})}trimColon(e){return e.startsWith(`:`)?e.slice(1).trim():e.trim()}getData(){let e=o();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:H(this.getRootDocV2())}}getConfig(){return o().state}},he=l(e=>`
3
+ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),typeof E<`u`)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};N.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
5
+ `+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(t,n,r,i){function a(){let e=n.yytext.indexOf(`%%`);if(e===0)return!1;if(e>0){let r=n.yytext.slice(0,e),i=n.yytext.slice(e);i&&t.lexer.unput(i),n.yytext=r}return!0}switch(e(a,`processId`),r){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState(`SCALE`),17;case 14:return 18;case 15:this.popState();break;case 16:return this.begin(`acc_title`),33;case 17:return this.popState(),`acc_title_value`;case 18:return this.begin(`acc_descr`),35;case 19:return this.popState(),`acc_descr_value`;case 20:this.begin(`acc_descr_multiline`);break;case 21:this.popState();break;case 22:return`acc_descr_multiline_value`;case 23:return this.pushState(`CLASSDEF`),41;case 24:return this.popState(),this.pushState(`CLASSDEFID`),`DEFAULT_CLASSDEF_ID`;case 25:return this.popState(),this.pushState(`CLASSDEFID`),42;case 26:return this.popState(),43;case 27:return this.pushState(`CLASS`),48;case 28:return this.popState(),this.pushState(`CLASS_STYLE`),49;case 29:return this.popState(),50;case 30:return this.pushState(`STYLE`),45;case 31:return this.popState(),this.pushState(`STYLEDEF_STYLES`),46;case 32:return this.popState(),47;case 33:return this.pushState(`SCALE`),17;case 34:return 18;case 35:this.popState();break;case 36:this.pushState(`STATE`);break;case 37:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 38:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 39:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 40:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 41:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 42:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState(`STATE_STRING`);break;case 48:return this.pushState(`STATE_ID`),`AS`;case 49:return a()?(this.popState(),`ID`):void 0;case 50:this.popState();break;case 51:return`STATE_DESCR`;case 52:return 19;case 53:this.popState();break;case 54:return this.popState(),this.pushState(`struct`),20;case 55:return this.popState(),21;case 56:break;case 57:return this.begin(`NOTE`),29;case 58:return this.popState(),this.pushState(`NOTE_ID`),59;case 59:return this.popState(),this.pushState(`NOTE_ID`),60;case 60:this.popState(),this.pushState(`FLOATING_NOTE`);break;case 61:return this.popState(),this.pushState(`FLOATING_NOTE_ID`),`AS`;case 62:break;case 63:return`NOTE_TEXT`;case 64:return a()?(this.popState(),`ID`):void 0;case 65:return a()?(this.popState(),this.pushState(`NOTE_TEXT`),24):void 0;case 66:return this.popState(),n.yytext=n.yytext.substr(2).trim(),31;case 67:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),31;case 68:return 6;case 69:return 6;case 70:return 16;case 71:return 57;case 72:return a()?24:void 0;case 73:return n.yytext=n.yytext.trim(),14;case 74:return 15;case 75:return 28;case 76:return 58;case 77:return 5;case 78:return`INVALID`}},`anonymous`),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,55,56,57,71,72,73,74,75,76],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,54,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}}})();function P(){this.yy={}}return e(P,`Parser`),P.prototype=N,N.Parser=P,new P})();g.parser=g;var _=g,v=`state`,y=`root`,b=`relation`,x=`classDef`,S=`style`,C=`applyClass`,w=`default`,T=`divider`,E=`fill:none`,D=`fill: #333`,O=`markdown`,k=`normal`,A=`rect`,j=`rectWithTitle`,M=`stateStart`,N=`stateEnd`,P=`divider`,F=`roundedWithTitle`,ee=`note`,te=`noteGroup`,I=`statediagram`,ne=`${I}-state`,L=`transition`,re=`note`,ie=`${L} note-edge`,ae=`${I}-${re}`,oe=`${I}-cluster`,se=`${I}-cluster-alt`,R=`parent`,z=`note`,ce=`state`,B=`----`,le=`${B}${z}`,V=`${B}${R}`,H=e((e,t=`TB`)=>{if(!e.doc)return t;let n=t;for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`),ue={getClasses:e(function(e,t){return t.db.getClasses()},`getClasses`),draw:e(async function(e,n,r,i){t.info(`REF0:`),t.info(`Drawing state diagram (v2)`,n);let{securityLevel:a,state:o,layout:s}=c();i.db.extract(i.db.getRootDocV2());let l=i.db.getData(),u=m(n,a);l.type=i.type,l.layoutAlgorithm=s,l.nodeSpacing=o?.nodeSpacing||50,l.rankSpacing=o?.rankSpacing||50,c().look===`neo`?l.markers=[`barbNeo`]:l.markers=[`barb`],l.diagramId=n,await p(l,u);try{(typeof i.db.getLinks==`function`?i.db.getLinks():new Map).forEach((e,n)=>{let r=typeof n==`string`?n:typeof n?.id==`string`?n.id:``;if(!r){t.warn(`⚠️ Invalid or missing stateId from key:`,JSON.stringify(n));return}let i=u.node()?.querySelectorAll(`g`),a;if(i?.forEach(e=>{e.textContent?.trim()===r&&(a=e)}),!a){t.warn(`⚠️ Could not find node matching text:`,r);return}let o=a.parentNode;if(!o){t.warn(`⚠️ Node has no parent, cannot wrap:`,r);return}let s=document.createElementNS(`http://www.w3.org/2000/svg`,`a`),c=e.url.replace(/^"+|"+$/g,``);if(s.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,c),s.setAttribute(`target`,`_blank`),e.tooltip){let t=e.tooltip.replace(/^"+|"+$/g,``);s.setAttribute(`title`,t)}o.replaceChild(s,a),s.appendChild(a),t.info(`🔗 Wrapped node in <a> tag for:`,r,e.url)})}catch(e){t.error(`❌ Error injecting clickable links:`,e)}d.insertTitle(u,`statediagramTitleText`,o?.titleTopMargin??25,i.db.getDiagramTitle()),h(u,8,I,o?.useMaxWidth??!0)},`draw`),getDir:H},U=new Map,W=0;function G(e=``,t=0,n=``,r=B){return`${ce}-${e}${n!==null&&n.length>0?`${r}${n}`:``}-${t}`}e(G,`stateDomId`);var de=e((e,n,r,i,a,o,s,u)=>{t.trace(`items`,n),n.forEach(t=>{switch(t.stmt){case v:X(e,t,r,i,a,o,s,u);break;case w:X(e,t,r,i,a,o,s,u);break;case b:{X(e,t.state1,r,i,a,o,s,u),X(e,t.state2,r,i,a,o,s,u);let n=s===`neo`,d={id:`edge`+W,start:t.state1.id,end:t.state2.id,arrowhead:`normal`,arrowTypeEnd:n?`arrow_barb_neo`:`arrow_barb`,style:E,labelStyle:``,label:l.sanitizeText(t.description??``,c()),arrowheadStyle:D,labelpos:`c`,labelType:O,thickness:k,classes:L,look:s};a.push(d),W++}break}})},`setupDoc`),K=e((e,t=`TB`)=>{let n=t;if(e.doc)for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`);function q(e,t,n){if(!t.id||t.id===`</join></fork>`||t.id===`</choice>`)return;t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(` `).forEach(e=>{let r=n.get(e);r&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...r.styles])}));let r=e.find(e=>e.id===t.id);r?Object.assign(r,t):e.push(t)}e(q,`insertOrUpdateNode`);function J(e){return e?.classes?.join(` `)??``}e(J,`getClassesFromDbInfo`);function Y(e){return e?.styles??[]}e(Y,`getStylesFromDbInfo`);var X=e((e,n,r,i,a,o,s,u)=>{let d=n.id,f=r.get(d),p=J(f),m=Y(f),h=c();if(t.info(`dataFetcher parsedItem`,n,f,m),d!==`root`){let r=A;n.start===!0?r=M:n.start===!1&&(r=N),n.type!==w&&(r=n.type),U.get(d)||U.set(d,{id:d,shape:r,description:l.sanitizeText(d,h),cssClasses:`${p} ${ne}`,cssStyles:m});let c=U.get(d);n.description&&(Array.isArray(c.description)?(c.shape=j,c.description.push(n.description)):c.description?.length&&c.description.length>0?(c.shape=j,c.description===d?c.description=[n.description]:c.description=[c.description,n.description]):(c.shape=A,c.description=n.description),c.description=l.sanitizeTextOrArray(c.description,h)),c.description?.length===1&&c.shape===j&&(c.type===`group`?c.shape=F:c.shape=A),!c.type&&n.doc&&(t.info(`Setting cluster for XCX`,d,K(n)),c.type=`group`,c.isGroup=!0,c.dir=K(n),c.shape=n.type===T?P:F,c.cssClasses=`${c.cssClasses} ${oe} ${o?se:``}`);let f={labelStyle:``,shape:c.shape,label:c.description,cssClasses:c.cssClasses,cssCompiledStyles:[],cssStyles:c.cssStyles,id:d,dir:c.dir,domId:G(d,W),type:c.type,isGroup:c.type===`group`,padding:8,rx:10,ry:10,look:s,labelType:`markdown`};if(f.shape===P&&(f.label=``),e&&e.id!==`root`&&(t.trace(`Setting node `,d,` to be child of its parent `,e.id),f.parentId=e.id),f.centerLabel=!0,n.note){let e={labelStyle:``,shape:ee,label:n.note.text,labelType:`markdown`,cssClasses:ae,cssStyles:[],cssCompiledStyles:[],id:d+le+`-`+W,domId:G(d,W,z),type:c.type,isGroup:c.type===`group`,padding:h.flowchart?.padding,look:s,position:n.note.position},t=d+V,r={labelStyle:``,shape:te,label:n.note.text,cssClasses:c.cssClasses,cssStyles:[],id:d+V,domId:G(d,W,R),type:`group`,isGroup:!0,padding:16,look:s,position:n.note.position};W++,r.id=t,e.parentId=t,q(i,r,u),q(i,e,u),q(i,f,u);let o=d,l=e.id;n.note.position===`left of`&&(o=e.id,l=d),a.push({id:o+`-`+l,start:o,end:l,arrowhead:`none`,arrowTypeEnd:``,style:E,labelStyle:``,classes:ie,arrowheadStyle:D,labelpos:`c`,labelType:O,thickness:k,look:s})}else q(i,f,u)}n.doc&&(t.trace(`Adding nodes children `),de(n,n.doc,r,i,a,!o,s,u))},`dataFetcher`),fe=e(()=>{U.clear(),W=0},`reset`),Z={START_NODE:`[*]`,START_TYPE:`start`,END_NODE:`[*]`,END_TYPE:`end`,COLOR_KEYWORD:`color`,FILL_KEYWORD:`fill`,BG_FILL:`bgFill`,STYLECLASS_SEP:`,`},Q=e(()=>new Map,`newClassesList`),pe=e(()=>({relations:[],states:new Map,documents:{}}),`newDoc`),$=e(e=>JSON.parse(JSON.stringify(e)),`clone`),me=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Q(),this.documents={root:pe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=u,this.setAccTitle=a,this.getAccDescription=o,this.setAccDescription=r,this.setDiagramTitle=n,this.getDiagramTitle=i,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}static{e(this,`StateDB`)}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(e){this.clear(!0);for(let t of Array.isArray(e)?e:e.doc)switch(t.stmt){case v:this.addState(t.id.trim(),t.type,t.doc,t.description,t.note);break;case b:this.addRelation(t.state1,t.state2,t.description);break;case x:this.addStyleClass(t.id.trim(),t.classes);break;case S:this.handleStyleDef(t);break;case C:this.setCssClass(t.id.trim(),t.styleClass);break;case`click`:this.addLink(t.id,t.url,t.tooltip);break}let t=this.getStates(),n=c();fe(),X(void 0,this.getRootDocV2(),t,this.nodes,this.edges,!0,n.look,this.classes);for(let e of this.nodes)if(Array.isArray(e.label)){if(e.description=e.label.slice(1),e.isGroup&&e.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${e.id}]`);e.label=e.label[0]}}handleStyleDef(e){let t=e.id.trim().split(`,`),n=e.styleClass.split(`,`);for(let e of t){let t=this.getState(e);if(!t){let n=e.trim();this.addState(n),t=this.getState(n)}t&&(t.styles=n.map(e=>e.replace(/;/g,``)?.trim()))}}setRootDoc(e){t.info(`Setting root doc`,e),this.rootDoc=e,this.version===1?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(e,t,n){if(t.stmt===b){this.docTranslator(e,t.state1,!0),this.docTranslator(e,t.state2,!1);return}if(t.stmt===v&&(t.id===Z.START_NODE?(t.id=e.id+(n?`_start`:`_end`),t.start=n):t.id=t.id.trim()),t.stmt!==y&&t.stmt!==v||!t.doc)return;let r=[],i=[];for(let e of t.doc)if(e.type===T){let t=$(e);t.doc=$(i),r.push(t),i=[]}else i.push(e);if(r.length>0&&i.length>0){let e={stmt:v,id:f(),type:`divider`,doc:$(i)};r.push($(e)),t.doc=r}t.doc.forEach(e=>this.docTranslator(t,e,!0))}getRootDocV2(){return this.docTranslator({id:y,stmt:y},{id:y,stmt:y,doc:this.rootDoc},!0),{id:y,doc:this.rootDoc}}addState(e,n=w,r=void 0,i=void 0,a=void 0,o=void 0,s=void 0,u=void 0){let d=e?.trim();if(!this.currentDocument.states.has(d))t.info(`Adding state `,d,i),this.currentDocument.states.set(d,{stmt:v,id:d,descriptions:[],type:n,doc:r,note:a,classes:[],styles:[],textStyles:[]});else{let e=this.currentDocument.states.get(d);if(!e)throw Error(`State not found: ${d}`);e.doc||=r,e.type||=n}if(i&&(t.info(`Setting state description`,d,i),(Array.isArray(i)?i:[i]).forEach(e=>this.addDescription(d,e.trim()))),a){let e=this.currentDocument.states.get(d);if(!e)throw Error(`State not found: ${d}`);e.note=a,e.note.text=l.sanitizeText(e.note.text,c())}o&&(t.info(`Setting state classes`,d,o),(Array.isArray(o)?o:[o]).forEach(e=>this.setCssClass(d,e.trim()))),s&&(t.info(`Setting state styles`,d,s),(Array.isArray(s)?s:[s]).forEach(e=>this.setStyle(d,e.trim()))),u&&(t.info(`Setting state styles`,d,s),(Array.isArray(u)?u:[u]).forEach(e=>this.setTextStyle(d,e.trim())))}clear(e){this.nodes=[],this.edges=[],this.documents={root:pe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Q(),e||(this.links=new Map,s())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){t.info(`Documents = `,this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,n,r){this.links.set(e,{url:n,tooltip:r}),t.warn(`Adding link`,e,n,r)}getLinks(){return this.links}startIdIfNeeded(e=``){return e===Z.START_NODE?(this.startEndCount++,`${Z.START_TYPE}${this.startEndCount}`):e}startTypeIfNeeded(e=``,t=w){return e===Z.START_NODE?Z.START_TYPE:t}endIdIfNeeded(e=``){return e===Z.END_NODE?(this.startEndCount++,`${Z.END_TYPE}${this.startEndCount}`):e}endTypeIfNeeded(e=``,t=w){return e===Z.END_NODE?Z.END_TYPE:t}addRelationObjs(e,t,n=``){let r=this.startIdIfNeeded(e.id.trim()),i=this.startTypeIfNeeded(e.id.trim(),e.type),a=this.startIdIfNeeded(t.id.trim()),o=this.startTypeIfNeeded(t.id.trim(),t.type);this.addState(r,i,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(a,o,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.currentDocument.relations.push({id1:r,id2:a,relationTitle:l.sanitizeText(n,c())})}addRelation(e,t,n){if(typeof e==`object`&&typeof t==`object`)this.addRelationObjs(e,t,n);else if(typeof e==`string`&&typeof t==`string`){let r=this.startIdIfNeeded(e.trim()),i=this.startTypeIfNeeded(e),a=this.endIdIfNeeded(t.trim()),o=this.endTypeIfNeeded(t);this.addState(r,i),this.addState(a,o),this.currentDocument.relations.push({id1:r,id2:a,relationTitle:n?l.sanitizeText(n,c()):void 0})}}addDescription(e,t){let n=this.currentDocument.states.get(e),r=t.startsWith(`:`)?t.replace(`:`,``).trim():t;n?.descriptions?.push(l.sanitizeText(r,c()))}cleanupLabel(e){return e.startsWith(`:`)?e.slice(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(e,t=``){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});let n=this.classes.get(e);t&&n&&t.split(Z.STYLECLASS_SEP).forEach(e=>{let t=e.replace(/([^;]*);/,`$1`).trim();if(RegExp(Z.COLOR_KEYWORD).exec(e)){let e=t.replace(Z.FILL_KEYWORD,Z.BG_FILL).replace(Z.COLOR_KEYWORD,Z.FILL_KEYWORD);n.textStyles.push(e)}n.styles.push(t)})}getClasses(){return this.classes}setCssClass(e,t){e.split(`,`).forEach(e=>{let n=this.getState(e);if(!n){let t=e.trim();this.addState(t),n=this.getState(t)}n?.classes?.push(t)})}setStyle(e,t){this.getState(e)?.styles?.push(t)}setTextStyle(e,t){this.getState(e)?.textStyles?.push(t)}getDirectionStatement(){return this.rootDoc.find(e=>e.stmt===`dir`)}getDirection(){return this.getDirectionStatement()?.value??`TB`}setDirection(e){let t=this.getDirectionStatement();t?t.value=e:this.rootDoc.unshift({stmt:`dir`,value:e})}trimColon(e){return e.startsWith(`:`)?e.slice(1).trim():e.trim()}getData(){let e=c();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:H(this.getRootDocV2())}}getConfig(){return c().state}},he=e(e=>`
7
7
  defs [id$="-barbEnd"] {
8
8
  fill: ${e.transitionColor};
9
9
  stroke: ${e.transitionColor};
@@ -0,0 +1 @@
1
+ import{i as e,t}from"./chunk-AQ6EADP3-CZhslHi-.js";import{V as n}from"./chunk-7W6UQGC5-pyKGssV3.js";import{s as r}from"./chunk-67TQ5CYL-CA7OhIEf.js";import{t as i}from"./chunk-KNLZD3CH-BGlP6X9R.js";var a=e(i(),1),o=t((e,t)=>{let n=e.append(`rect`);if(n.attr(`x`,t.x),n.attr(`y`,t.y),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`width`,t.width),n.attr(`height`,t.height),t.name&&n.attr(`name`,t.name),t.rx&&n.attr(`rx`,t.rx),t.ry&&n.attr(`ry`,t.ry),t.attrs!==void 0)for(let e in t.attrs)n.attr(e,t.attrs[e]);return t.class&&n.attr(`class`,t.class),n},`drawRect`),s=t((e,t)=>{o(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:`rect`}).lower()},`drawBackgroundRect`),c=t((e,t)=>{let n=t.text.replace(r,` `),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.attr(`class`,`legend`),i.style(`text-anchor`,t.anchor),t.class&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.text(n),i},`drawText`),l=t((e,t,n,r)=>{let i=e.append(`image`);i.attr(`x`,t),i.attr(`y`,n);let o=(0,a.sanitizeUrl)(r);i.attr(`xlink:href`,o)},`drawImage`),u=t((e,t,n,r)=>{let i=e.append(`use`);i.attr(`x`,t),i.attr(`y`,n);let o=(0,a.sanitizeUrl)(r);i.attr(`xlink:href`,`#${o}`)},`drawEmbeddedImage`),d=t(()=>({x:0,y:0,width:100,height:100,fill:`#EDF2AE`,stroke:`#666`,anchor:`start`,rx:0,ry:0}),`getNoteRect`),f=t(()=>({x:0,y:0,width:100,height:100,"text-anchor":`start`,style:`#666`,textMargin:0,rx:0,ry:0,tspan:!0}),`getTextObj`),p=t(()=>{let e=n(`.mermaidTooltip`);return e.empty()&&(e=n(`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},`createTooltip`);export{s as a,o as c,c as i,f as n,u as o,p as r,d as s,l as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./chunk-AQ6EADP3-CZhslHi-.js";import{V as t}from"./chunk-7W6UQGC5-pyKGssV3.js";import{Z as n}from"./chunk-67TQ5CYL-CA7OhIEf.js";var r=e(e=>{let{securityLevel:r}=n(),i=t(`body`);return r===`sandbox`&&(i=t((t(`#i${e}`).node()?.contentDocument??document).body)),i.select(`#${e}`)},`selectSvgElement`);export{r as t};
@@ -0,0 +1,2 @@
1
+ import{i as e,t}from"./chunk-AQ6EADP3-CZhslHi-.js";import{$ as n,D as r,F as i,L as a,O as o,Q as s,S as c,V as l,Y as u,_ as d,b as ee,d as te,f as ne,g as re,h as ie,j as ae,o as oe,q as f,r as se,u as ce,x as le,z as ue}from"./chunk-7W6UQGC5-pyKGssV3.js";import{B as de,Q as p,a as fe,et as pe,r as m}from"./chunk-67TQ5CYL-CA7OhIEf.js";import{t as me}from"./chunk-KNLZD3CH-BGlP6X9R.js";var he=e(me(),1);function ge(e){return Number.isSafeInteger(e)&&e>=0}t(ge,`isLength`);function h(e){return e!=null&&typeof e!=`function`&&ge(e.length)}t(h,`isArrayLike`);function _e(e){return e===`__proto__`}t(_e,`isUnsafeProperty`);function g(e){return e==null||typeof e!=`object`&&typeof e!=`function`}t(g,`isPrimitive`);function _(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}t(_,`getSymbols`);function v(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}t(v,`getTag`);var y=`[object RegExp]`,b=`[object String]`,x=`[object Number]`,S=`[object Boolean]`,C=`[object Arguments]`,w=`[object Symbol]`,T=`[object Date]`,E=`[object Map]`,D=`[object Set]`,ve=`[object Array]`,O=`[object ArrayBuffer]`,k=`[object Object]`,A=`[object DataView]`,ye=`[object Uint8Array]`,be=`[object Uint8ClampedArray]`,xe=`[object Uint16Array]`,Se=`[object Uint32Array]`,j=`[object Int8Array]`,Ce=`[object Int16Array]`,we=`[object Int32Array]`,Te=`[object Float32Array]`,Ee=`[object Float64Array]`;function M(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}t(M,`isTypedArray`);function De(e,t){return N(e,void 0,e,new Map,t)}t(De,`cloneDeepWith`);function N(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(g(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=N(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,N(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(N(a,void 0,n,r,i));return t}if(typeof Buffer<`u`&&Buffer.isBuffer(e))return e.subarray();if(M(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=N(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),P(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),P(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),P(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,P(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),P(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),P(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),P(t,e,n,r,i),t}if(typeof e==`object`&&Oe(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),P(t,e,n,r,i),t}return e}t(N,`cloneDeepWithImpl`);function P(e,t,n=e,r,i){let a=[...Object.keys(t),..._(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=N(t[s],s,n,r,i))}}t(P,`copyProperties`);function Oe(e){switch(v(e)){case C:case ve:case O:case A:case S:case T:case Te:case Ee:case j:case Ce:case we:case E:case x:case k:case y:case D:case b:case w:case ye:case be:case xe:case Se:return!0;default:return!1}}t(Oe,`isCloneableObject`);function ke(e,t){return De(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(v(e)===k&&typeof e.constructor!=`function`){let t={};return a.set(e,t),P(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case x:case b:case S:{let t=new e.constructor(e?.valueOf());return P(t,e),t}case C:{let t={};return P(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}t(ke,`cloneDeepWith`);function F(e){return ke(e)}t(F,`cloneDeep`);function I(e){return typeof e==`object`&&!!e&&v(e)===`[object Arguments]`}t(I,`isArguments`);function L(e){return typeof e==`object`&&!!e}t(L,`isObjectLike`);function Ae(e){return L(e)&&h(e)}t(Ae,`isArrayLikeObject`);function je(e){return Array.isArray(e)}t(je,`isArray`);function R(e,n){if(typeof e!=`function`||n!=null&&typeof n!=`function`)throw TypeError(`Expected a function`);let r=t(function(...t){let i=n?n.apply(this,t):t[0],a=r.cache;if(a.has(i))return a.get(i);let o=e.apply(this,t);return r.cache=a.set(i,o)||a,o},`memoized`);return r.cache=new(R.Cache||Map),r}t(R,`memoize`),R.Cache=Map;function Me(){}t(Me,`noop`);function Ne(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}t(Ne,`isPrototype`);function z(e){return M(e)}t(z,`isTypedArray`);function Pe(e){if(g(e))return e;let t=v(e);if(!Fe(e))return{};if(je(e)){let t=Array.from(e);return e.length>0&&typeof e[0]==`string`&&Object.hasOwn(e,`index`)&&(t.index=e.index,t.input=e.input),t}if(z(e)){let t=e,n=t.constructor;return new n(t.buffer,t.byteOffset,t.length)}if(t===O)return new ArrayBuffer(e.byteLength);if(t===A){let t=e,n=t.buffer,r=t.byteOffset,i=t.byteLength,a=new ArrayBuffer(i),o=new Uint8Array(n,r,i);return new Uint8Array(a).set(o),new DataView(a)}if(t===S||t===x||t===b){let n=e.constructor,r=new n(e.valueOf());return t===b?Le(r,e):B(r,e),r}if(t===T)return new Date(Number(e));if(t===y){let t=e,n=new RegExp(t.source,t.flags);return n.lastIndex=t.lastIndex,n}if(t===w)return Object(Symbol.prototype.valueOf.call(e));if(t===E){let t=e,n=new Map;return t.forEach((e,t)=>{n.set(t,e)}),n}if(t===D){let t=e,n=new Set;return t.forEach(e=>{n.add(e)}),n}if(t===C){let t=e,n={};return B(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return Re(n,e),B(n,e),Ie(n,e),n}t(Pe,`clone`);function Fe(e){switch(v(e)){case C:case ve:case O:case A:case S:case T:case Te:case Ee:case j:case Ce:case we:case E:case x:case k:case y:case D:case b:case w:case ye:case be:case xe:case Se:return!0;default:return!1}}t(Fe,`isCloneableObject`);function B(e,t){for(let n in t)Object.hasOwn(t,n)&&(e[n]=t[n])}t(B,`copyOwnProperties`);function Ie(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r<n.length;r++){let i=n[r];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}t(Ie,`copySymbolProperties`);function Le(e,t){let n=t.valueOf().length;for(let r in t)Object.hasOwn(t,r)&&(Number.isNaN(Number(r))||Number(r)>=n)&&(e[r]=t[r])}t(Le,`cloneStringObjectProperties`);function Re(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}t(Re,`copyPrototype`);function V(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}t(V,`isPlainObject`);function ze(e){if(g(e))return e;if(Array.isArray(e)||M(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}if(typeof File<`u`&&e instanceof File)return new n([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e==`object`){let n=Object.create(t);return Object.assign(n,e)}return e}t(ze,`clone`);function Be(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=H(i,t,r,new Map)}return i}t(Be,`mergeWith`);function H(e,t,n,r){if(g(e)&&(e=Object(e)),typeof t!=`object`||!t)return e;if(r.has(t))return ze(r.get(t));if(r.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]=t[e]??void 0}let i=[...Object.keys(t),..._(t)];for(let a=0;a<i.length;a++){let o=i[a];if(_e(o))continue;let s=t[o],c=e[o];if(I(s)&&(s={...s}),I(c)&&(c={...c}),typeof Buffer<`u`&&Buffer.isBuffer(s)&&(s=F(s)),Array.isArray(s))if(Array.isArray(c)){let e=[],t=Reflect.ownKeys(c);for(let n=0;n<t.length;n++){let r=t[n];e[r]=c[r]}c=e}else if(Ae(c)){let e=[];for(let t=0;t<c.length;t++)e[t]=c[t];c=e}else c=[];let l=n(c,s,o,e,t,r);l===void 0?Array.isArray(s)||L(c)&&L(s)&&(V(c)||V(s)||z(c)||z(s))?e[o]=H(c,s,n,r):c==null&&V(s)?e[o]=H({},s,n,r):c==null&&z(s)?e[o]=F(s):(c===void 0||s!==void 0)&&(e[o]=s):e[o]=l}return e}t(H,`mergeWithDeep`);function Ve(e,...t){return Be(e,...t,Me)}t(Ve,`merge`);function He(e){if(e==null)return!0;if(h(e))return typeof e.splice!=`function`&&typeof e!=`string`&&(typeof Buffer>`u`||!Buffer.isBuffer(e))&&!z(e)&&!I(e)?!1:e.length===0;if(typeof e==`object`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return Ne(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}t(He,`isEmpty`);var Ue={curveBasis:se,curveBasisClosed:ce,curveBasisOpen:c,curveBumpX:d,curveBumpY:s,curveBundle:ne,curveCardinalClosed:u,curveCardinalOpen:ae,curveCardinal:oe,curveCatmullRomClosed:i,curveCatmullRomOpen:te,curveCatmullRom:r,curveLinear:o,curveLinearClosed:n,curveMonotoneX:a,curveMonotoneY:ee,curveNatural:ue,curveStep:le,curveStepAfter:ie,curveStepBefore:re},We=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Ge=t(function(e,t){let n=Ke(e,/(?:init\b)|(?:initialize\b)/),r={};if(Array.isArray(n)){let e=n.map(e=>e.args);pe(e),r=fe(r,[...e])}else r=n.args;if(!r)return;let i=de(e,t),a=`config`;return r[a]!==void 0&&(i===`flowchart-v2`&&(i=`flowchart`),r[i]=r[a],delete r[a]),r},`detectInit`),Ke=t(function(e,t=null){try{let n=RegExp(`[%]{2}(?![{]${We.source})(?=[}][%]{2}).*
2
+ `,`ig`);e=e.trim().replace(n,``).replace(/'/gm,`"`),f.debug(`Detecting diagram directive${t===null?``:` type:`+t} based on the text:${e}`);let r,i=[];for(;(r=p.exec(e))!==null;)if(r.index===p.lastIndex&&p.lastIndex++,r&&!t||t&&r[1]?.match(t)||t&&r[2]?.match(t)){let e=r[1]?r[1]:r[2],t=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;i.push({type:e,args:t})}return i.length===0?{type:e,args:null}:i.length===1?i[0]:i}catch(n){return f.error(`ERROR: ${n.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},`detectDirective`),qe=t(function(e){return e.replace(p,``)},`removeDirectives`),Je=t(function(e,t){for(let[n,r]of t.entries())if(r.match(e))return n;return-1},`isSubstringInArray`);function U(e,t){return e?Ue[`curve${e.charAt(0).toUpperCase()+e.slice(1)}`]??t:t}t(U,`interpolateToCurve`);function Ye(e,t){let n=e.trim();if(n)return t.securityLevel===`loose`?n:(0,he.sanitizeUrl)(n)}t(Ye,`formatUrl`);var Xe=t((e,...t)=>{let n=e.split(`.`),r=n.length-1,i=n[r],a=window;for(let t=0;t<r;t++)if(a=a[n[t]],!a){f.error(`Function name: ${e} not found in window`);return}a[i](...t)},`runFunc`);function W(e,t){return!e||!t?0:Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}t(W,`distance`);function Ze(e){let t,n=0;return e.forEach(e=>{n+=W(e,t),t=e}),G(e,n/2)}t(Ze,`traverseEdge`);function Qe(e){return e.length===1?e[0]:Ze(e)}t(Qe,`calcLabelPosition`);var $e=t((e,t=2)=>{let n=10**t;return Math.round(e*n)/n},`roundNumber`),G=t((e,t)=>{let n,r=t;for(let t of e){if(n){let e=W(t,n);if(e===0)return n;if(e<r)r-=e;else{let i=r/e;if(i<=0)return n;if(i>=1)return{x:t.x,y:t.y};if(i>0&&i<1)return{x:$e((1-i)*n.x+i*t.x,5),y:$e((1-i)*n.y+i*t.y,5)}}}n=t}throw Error(`Could not find a suitable point for the given distance`)},`calculatePoint`),et=t((e,t,n)=>{f.info(`our points ${JSON.stringify(t)}`),t[0]!==n&&(t=t.reverse());let r=G(t,25),i=e?10:5,a=Math.atan2(t[0].y-r.y,t[0].x-r.x),o={x:0,y:0};return o.x=Math.sin(a)*i+(t[0].x+r.x)/2,o.y=-Math.cos(a)*i+(t[0].y+r.y)/2,o},`calcCardinalityPosition`);function tt(e,t,n){let r=structuredClone(n);f.info(`our points`,r),t!==`start_left`&&t!==`start_right`&&r.reverse();let i=G(r,25+e),a=10+e*.5,o=Math.atan2(r[0].y-i.y,r[0].x-i.x),s={x:0,y:0};return t===`start_left`?(s.x=Math.sin(o+Math.PI)*a+(r[0].x+i.x)/2,s.y=-Math.cos(o+Math.PI)*a+(r[0].y+i.y)/2):t===`end_right`?(s.x=Math.sin(o-Math.PI)*a+(r[0].x+i.x)/2-5,s.y=-Math.cos(o-Math.PI)*a+(r[0].y+i.y)/2-5):t===`end_left`?(s.x=Math.sin(o)*a+(r[0].x+i.x)/2-5,s.y=-Math.cos(o)*a+(r[0].y+i.y)/2-5):(s.x=Math.sin(o)*a+(r[0].x+i.x)/2,s.y=-Math.cos(o)*a+(r[0].y+i.y)/2),s}t(tt,`calcTerminalLabelPosition`);function K(e){let t=``,n=``;for(let r of e)r!==void 0&&(r.startsWith(`color:`)||r.startsWith(`text-align:`)?n=n+r+`;`:t=t+r+`;`);return{style:t,labelStyle:n}}t(K,`getStylesFromArray`);var nt=0,rt=t(()=>(nt++,`id-`+Math.random().toString(36).substr(2,12)+`-`+nt),`generateId`);function it(e){let t=``;for(let n=0;n<e;n++)t+=`0123456789abcdef`.charAt(Math.floor(Math.random()*16));return t}t(it,`makeRandomHex`);var at=t(e=>it(e.length),`random`),ot=t(function(){return{x:0,y:0,fill:void 0,anchor:`start`,style:`#666`,width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:``}},`getTextObj`),st=t(function(e,t){let n=t.text.replace(m.lineBreakRegex,` `),[,r]=Q(t.fontSize),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.style(`text-anchor`,t.anchor),i.style(`font-family`,t.fontFamily),i.style(`font-size`,r),i.style(`font-weight`,t.fontWeight),i.attr(`fill`,t.fill),t.class!==void 0&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.attr(`fill`,t.fill),a.text(n),i},`drawSimpleText`),q=R((e,t,n)=>{if(!e||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,joinWith:`<br/>`},n),m.lineBreakRegex.test(e)))return e;let r=e.split(` `).filter(Boolean),i=[],a=``;return r.forEach((e,o)=>{let s=Y(`${e} `,n),c=Y(a,n);if(s>t){let{hyphenatedStrings:r,remainingWord:o}=ct(e,t,`-`,n);i.push(a,...r),a=o}else c+s>=t?(i.push(a),a=e):a=[a,e].filter(Boolean).join(` `);o+1===r.length&&i.push(a)}),i.filter(e=>e!==``).join(n.joinWith)},(e,t,n)=>`${e}${t}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),ct=R((e,t,n=`-`,r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,margin:0},r);let i=[...e],a=[],o=``;return i.forEach((e,s)=>{let c=`${o}${e}`;if(Y(c,r)>=t){let e=s+1,t=i.length===e,r=`${c}${n}`;a.push(t?c:r),o=``}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,n=`-`,r)=>`${e}${t}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function J(e,t){return X(e,t).height}t(J,`calculateTextHeight`);function Y(e,t){return X(e,t).width}t(Y,`calculateTextWidth`);var X=R((e,t)=>{let{fontSize:n=12,fontFamily:r=`Arial`,fontWeight:i=400}=t;if(!e)return{width:0,height:0};let[,a]=Q(n),o=[`sans-serif`,r],s=e.split(m.lineBreakRegex),c=[],u=l(`body`);if(!u.remove)return{width:0,height:0,lineHeight:0};let d=u.append(`svg`);for(let e of o){let t=0,n={width:0,height:0,lineHeight:0};for(let r of s){let o=ot();o.text=r||`​`;let s=st(d,o).style(`font-size`,a).style(`font-weight`,i).style(`font-family`,e),c=(s._groups||s)[0][0].getBBox();if(c.width===0&&c.height===0)throw Error(`svg element not in render tree`);n.width=Math.round(Math.max(n.width,c.width)),t=Math.round(c.height),n.height+=t,n.lineHeight=Math.round(Math.max(n.lineHeight,t))}c.push(n)}return d.remove(),c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),lt=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{t(this,`InitIDGenerator`)}},Z,ut=t(function(e){return Z||=document.createElement(`div`),e=escape(e).replace(/%26/g,`&`).replace(/%23/g,`#`).replace(/%3B/g,`;`),Z.innerHTML=e,unescape(Z.textContent)},`entityDecode`);function dt(e){return`str`in e}t(dt,`isDetailedError`);var ft=t((e,t,n,r)=>{if(!r)return;let i=e.node()?.getBBox();i&&e.append(`text`).text(r).attr(`text-anchor`,`middle`).attr(`x`,i.x+i.width/2).attr(`y`,-n).attr(`class`,t)},`insertTitle`),Q=t(e=>{if(typeof e==`number`)return[e,e+`px`];let t=parseInt(e??``,10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+`px`]:[t,e]},`parseFontSize`);function $(e,t){return Ve({},e,t)}t($,`cleanAndMerge`);var pt={assignWithDepth:fe,wrapLabel:q,calculateTextHeight:J,calculateTextWidth:Y,calculateTextDimensions:X,cleanAndMerge:$,detectInit:Ge,detectDirective:Ke,isSubstringInArray:Je,interpolateToCurve:U,calcLabelPosition:Qe,calcCardinalityPosition:et,calcTerminalLabelPosition:tt,formatUrl:Ye,getStylesFromArray:K,generateId:rt,random:at,runFunc:Xe,entityDecode:ut,insertTitle:ft,isLabelCoordinateInPath:vt,parseFontSize:Q,InitIDGenerator:lt},mt=t(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/#\w+;/g,function(e){let t=e.substring(1,e.length-1);return/^\+?\d+$/.test(t)?`fl°°`+t+`¶ß`:`fl°`+t+`¶ß`}),t},`encodeEntities`),ht=t(function(e){return e.replace(/fl°°/g,`&#`).replace(/fl°/g,`&`).replace(/¶ß/g,`;`)},`decodeEntities`),gt=t((e,t,{counter:n=0,prefix:r,suffix:i},a)=>a||`${r?`${r}_`:``}${e}_${t}_${n}${i?`_${i}`:``}`,`getEdgeId`);function _t(e){return e??null}t(_t,`handleUndefinedAttr`);function vt(e,t){let n=Math.round(e.x),r=Math.round(e.y),i=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString());return i.includes(n.toString())||i.includes(r.toString())}t(vt,`isLabelCoordinateInPath`);export{Pe as _,$ as a,dt as c,J as d,K as f,X as g,He as h,_t as i,q as l,Y as m,gt as n,pt as o,Q as p,ht as r,at as s,qe as t,mt as u,U as v,rt as y};
@@ -0,0 +1 @@
1
+ import{t as e}from"./chunk-AQ6EADP3-CZhslHi-.js";import{_ as t,d as n,f as r,h as i,i as a,m as o,n as s,p as c,t as l}from"./chunk-4R4BOZG6-Be_F0JoX.js";var u=class extends a{static{e(this,`ArchitectureTokenBuilder`)}static{t(this,`ArchitectureTokenBuilder`)}constructor(){super([`architecture`])}},d=class extends l{static{e(this,`ArchitectureValueConverter`)}static{t(this,`ArchitectureValueConverter`)}runCustomConverter(e,t,n){if(e.name===`ARCH_ICON`)return t.replace(/[()]/g,``).trim();if(e.name===`ARCH_TEXT_ICON`)return t.replace(/["()]/g,``);if(e.name===`ARCH_TITLE`){let e=t.replace(/^\[|]$/g,``).trim();return(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))&&(e=e.slice(1,-1),e=e.replace(/\\"/g,`"`).replace(/\\'/g,`'`)),e.trim()}}},f={parser:{TokenBuilder:t(()=>new u,`TokenBuilder`),ValueConverter:t(()=>new d,`ValueConverter`)}};function p(e=o){let t=i(c(e),r),a=i(s({shared:t}),n,f);return t.ServiceRegistry.register(a),{shared:t,Architecture:a}}e(p,`createArchitectureServices`),t(p,`createArchitectureServices`);export{f as n,p as t};