gitnexus 1.6.4-rc.2 → 1.6.4-rc.21

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 (243) hide show
  1. package/README.md +35 -0
  2. package/dist/_shared/index.d.ts +1 -1
  3. package/dist/_shared/index.d.ts.map +1 -1
  4. package/dist/_shared/index.js +1 -1
  5. package/dist/_shared/index.js.map +1 -1
  6. package/dist/_shared/scope-resolution/finalize-algorithm.d.ts +22 -14
  7. package/dist/_shared/scope-resolution/finalize-algorithm.d.ts.map +1 -1
  8. package/dist/_shared/scope-resolution/finalize-algorithm.js +298 -37
  9. package/dist/_shared/scope-resolution/finalize-algorithm.js.map +1 -1
  10. package/dist/_shared/scope-resolution/scope-tree.d.ts +23 -1
  11. package/dist/_shared/scope-resolution/scope-tree.d.ts.map +1 -1
  12. package/dist/_shared/scope-resolution/scope-tree.js +36 -2
  13. package/dist/_shared/scope-resolution/scope-tree.js.map +1 -1
  14. package/dist/_shared/scope-resolution/types.d.ts +47 -3
  15. package/dist/_shared/scope-resolution/types.d.ts.map +1 -1
  16. package/dist/_shared/scope-resolution/types.js +10 -2
  17. package/dist/_shared/scope-resolution/types.js.map +1 -1
  18. package/dist/cli/analyze.d.ts +6 -0
  19. package/dist/cli/analyze.js +35 -0
  20. package/dist/cli/doctor.d.ts +1 -0
  21. package/dist/cli/doctor.js +31 -0
  22. package/dist/cli/index.js +13 -0
  23. package/dist/cli/setup.js +2 -2
  24. package/dist/core/embeddings/config.d.ts +2 -0
  25. package/dist/core/embeddings/config.js +36 -0
  26. package/dist/core/embeddings/embedder.js +11 -6
  27. package/dist/core/embeddings/embedding-pipeline.d.ts +7 -1
  28. package/dist/core/embeddings/embedding-pipeline.js +93 -29
  29. package/dist/core/embeddings/exact-search.d.ts +15 -0
  30. package/dist/core/embeddings/exact-search.js +27 -0
  31. package/dist/core/embeddings/types.d.ts +4 -0
  32. package/dist/core/embeddings/types.js +2 -0
  33. package/dist/core/group/config-parser.js +2 -0
  34. package/dist/core/group/matching.d.ts +3 -3
  35. package/dist/core/group/matching.js +46 -6
  36. package/dist/core/group/storage.js +2 -0
  37. package/dist/core/group/sync.js +1 -1
  38. package/dist/core/group/types.d.ts +18 -0
  39. package/dist/core/ingestion/call-processor.d.ts +3 -3
  40. package/dist/core/ingestion/call-processor.js +58 -65
  41. package/dist/core/ingestion/constants.d.ts +4 -3
  42. package/dist/core/ingestion/constants.js +8 -3
  43. package/dist/core/ingestion/finalize-orchestrator.js +6 -3
  44. package/dist/core/ingestion/heritage-processor.js +2 -2
  45. package/dist/core/ingestion/import-processor.js +1 -1
  46. package/dist/core/ingestion/language-provider.d.ts +8 -0
  47. package/dist/core/ingestion/languages/csharp/captures.js +4 -1
  48. package/dist/core/ingestion/languages/csharp/namespace-siblings.d.ts +14 -13
  49. package/dist/core/ingestion/languages/csharp/namespace-siblings.js +62 -50
  50. package/dist/core/ingestion/languages/python/captures.js +9 -1
  51. package/dist/core/ingestion/languages/python/index.d.ts +1 -1
  52. package/dist/core/ingestion/languages/python/index.js +1 -1
  53. package/dist/core/ingestion/languages/python/simple-hooks.d.ts +3 -1
  54. package/dist/core/ingestion/languages/python/simple-hooks.js +8 -0
  55. package/dist/core/ingestion/languages/python.js +28 -1
  56. package/dist/core/ingestion/languages/swift.js +14 -0
  57. package/dist/core/ingestion/languages/typescript/arity-metadata.d.ts +59 -0
  58. package/dist/core/ingestion/languages/typescript/arity-metadata.js +103 -0
  59. package/dist/core/ingestion/languages/typescript/arity.d.ts +37 -0
  60. package/dist/core/ingestion/languages/typescript/arity.js +54 -0
  61. package/dist/core/ingestion/languages/typescript/cache-stats.d.ts +17 -0
  62. package/dist/core/ingestion/languages/typescript/cache-stats.js +28 -0
  63. package/dist/core/ingestion/languages/typescript/captures.d.ts +28 -0
  64. package/dist/core/ingestion/languages/typescript/captures.js +451 -0
  65. package/dist/core/ingestion/languages/typescript/import-decomposer.d.ts +49 -0
  66. package/dist/core/ingestion/languages/typescript/import-decomposer.js +371 -0
  67. package/dist/core/ingestion/languages/typescript/import-target.d.ts +50 -0
  68. package/dist/core/ingestion/languages/typescript/import-target.js +61 -0
  69. package/dist/core/ingestion/languages/typescript/index.d.ts +94 -0
  70. package/dist/core/ingestion/languages/typescript/index.js +94 -0
  71. package/dist/core/ingestion/languages/typescript/interpret.d.ts +35 -0
  72. package/dist/core/ingestion/languages/typescript/interpret.js +317 -0
  73. package/dist/core/ingestion/languages/typescript/merge-bindings.d.ts +62 -0
  74. package/dist/core/ingestion/languages/typescript/merge-bindings.js +158 -0
  75. package/dist/core/ingestion/languages/typescript/query.d.ts +77 -0
  76. package/dist/core/ingestion/languages/typescript/query.js +778 -0
  77. package/dist/core/ingestion/languages/typescript/receiver-binding.d.ts +59 -0
  78. package/dist/core/ingestion/languages/typescript/receiver-binding.js +171 -0
  79. package/dist/core/ingestion/languages/typescript/scope-resolver.d.ts +16 -0
  80. package/dist/core/ingestion/languages/typescript/scope-resolver.js +113 -0
  81. package/dist/core/ingestion/languages/typescript/simple-hooks.d.ts +71 -0
  82. package/dist/core/ingestion/languages/typescript/simple-hooks.js +131 -0
  83. package/dist/core/ingestion/languages/typescript.js +19 -0
  84. package/dist/core/ingestion/method-extractors/configs/swift.js +3 -4
  85. package/dist/core/ingestion/model/scope-resolution-indexes.d.ts +14 -1
  86. package/dist/core/ingestion/parsing-processor.js +20 -9
  87. package/dist/core/ingestion/pipeline-phases/processes.js +9 -4
  88. package/dist/core/ingestion/pipeline-phases/tools.d.ts +1 -0
  89. package/dist/core/ingestion/pipeline-phases/tools.js +10 -4
  90. package/dist/core/ingestion/registry-primary-flag.d.ts +3 -1
  91. package/dist/core/ingestion/registry-primary-flag.js +4 -1
  92. package/dist/core/ingestion/scope-extractor-bridge.d.ts +5 -2
  93. package/dist/core/ingestion/scope-extractor-bridge.js +7 -2
  94. package/dist/core/ingestion/scope-extractor.js +19 -18
  95. package/dist/core/ingestion/scope-resolution/contract/scope-resolver.d.ts +73 -11
  96. package/dist/core/ingestion/scope-resolution/contract/scope-resolver.js +48 -10
  97. package/dist/core/ingestion/scope-resolution/passes/compound-receiver.js +283 -14
  98. package/dist/core/ingestion/scope-resolution/passes/imported-return-types.d.ts +23 -2
  99. package/dist/core/ingestion/scope-resolution/passes/imported-return-types.js +109 -37
  100. package/dist/core/ingestion/scope-resolution/passes/mro.js +3 -1
  101. package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.js +13 -5
  102. package/dist/core/ingestion/scope-resolution/pipeline/phase.js +11 -2
  103. package/dist/core/ingestion/scope-resolution/pipeline/registry.js +2 -0
  104. package/dist/core/ingestion/scope-resolution/pipeline/run.d.ts +8 -0
  105. package/dist/core/ingestion/scope-resolution/pipeline/run.js +21 -5
  106. package/dist/core/ingestion/scope-resolution/pipeline/validate-bindings-immutability.d.ts +39 -0
  107. package/dist/core/ingestion/scope-resolution/pipeline/validate-bindings-immutability.js +65 -0
  108. package/dist/core/ingestion/scope-resolution/scope/walkers.d.ts +54 -11
  109. package/dist/core/ingestion/scope-resolution/scope/walkers.js +105 -30
  110. package/dist/core/ingestion/type-extractors/swift.js +7 -4
  111. package/dist/core/ingestion/utils/ast-helpers.d.ts +2 -0
  112. package/dist/core/ingestion/utils/ast-helpers.js +12 -0
  113. package/dist/core/ingestion/utils/env.d.ts +10 -0
  114. package/dist/core/ingestion/utils/env.js +14 -0
  115. package/dist/core/ingestion/workers/parse-worker.d.ts +1 -0
  116. package/dist/core/ingestion/workers/parse-worker.js +15 -9
  117. package/dist/core/ingestion/workers/worker-pool.d.ts +11 -4
  118. package/dist/core/ingestion/workers/worker-pool.js +244 -48
  119. package/dist/core/lbug/extension-loader.d.ts +86 -0
  120. package/dist/core/lbug/extension-loader.js +184 -0
  121. package/dist/core/lbug/lbug-adapter.d.ts +18 -17
  122. package/dist/core/lbug/lbug-adapter.js +45 -73
  123. package/dist/core/lbug/pool-adapter.js +10 -28
  124. package/dist/core/platform/capabilities.d.ts +24 -0
  125. package/dist/core/platform/capabilities.js +54 -0
  126. package/dist/core/run-analyze.js +36 -9
  127. package/dist/core/search/bm25-index.d.ts +0 -17
  128. package/dist/core/search/bm25-index.js +10 -118
  129. package/dist/core/search/fts-indexes.d.ts +1 -0
  130. package/dist/core/search/fts-indexes.js +7 -0
  131. package/dist/core/search/fts-schema.d.ts +6 -0
  132. package/dist/core/search/fts-schema.js +7 -0
  133. package/dist/mcp/core/embedder.js +11 -4
  134. package/dist/mcp/local/local-backend.js +50 -15
  135. package/dist/server/api.d.ts +5 -0
  136. package/dist/server/api.js +113 -0
  137. package/hooks/claude/gitnexus-hook.cjs +11 -1
  138. package/package.json +6 -5
  139. package/scripts/build-tree-sitter-dart.cjs +42 -0
  140. package/scripts/build-tree-sitter-proto.cjs +1 -1
  141. package/scripts/build.js +22 -2
  142. package/scripts/install-duckdb-extension.mjs +37 -0
  143. package/vendor/tree-sitter-dart/README.md +18 -0
  144. package/vendor/tree-sitter-dart/binding.gyp +31 -0
  145. package/vendor/tree-sitter-dart/bindings/node/binding.cc +20 -0
  146. package/vendor/tree-sitter-dart/bindings/node/index.d.ts +28 -0
  147. package/vendor/tree-sitter-dart/bindings/node/index.js +7 -0
  148. package/vendor/tree-sitter-dart/grammar.js +2895 -0
  149. package/vendor/tree-sitter-dart/package.json +18 -0
  150. package/vendor/tree-sitter-dart/queries/highlights.scm +246 -0
  151. package/vendor/tree-sitter-dart/queries/tags.scm +92 -0
  152. package/vendor/tree-sitter-dart/queries/test.scm +1 -0
  153. package/vendor/tree-sitter-dart/src/grammar.json +12459 -0
  154. package/vendor/tree-sitter-dart/src/node-types.json +15055 -0
  155. package/vendor/tree-sitter-dart/src/parser.c +196127 -0
  156. package/vendor/tree-sitter-dart/src/scanner.c +130 -0
  157. package/vendor/tree-sitter-dart/src/tree_sitter/alloc.h +54 -0
  158. package/vendor/tree-sitter-dart/src/tree_sitter/array.h +290 -0
  159. package/vendor/tree-sitter-dart/src/tree_sitter/parser.h +265 -0
  160. package/vendor/tree-sitter-swift/LICENSE +21 -0
  161. package/vendor/tree-sitter-swift/README.md +139 -0
  162. package/vendor/tree-sitter-swift/bindings/node/index.d.ts +28 -0
  163. package/vendor/tree-sitter-swift/bindings/node/index.js +7 -0
  164. package/vendor/tree-sitter-swift/package.json +28 -0
  165. package/vendor/tree-sitter-swift/prebuilds/darwin-arm64/tree-sitter-swift.node +0 -0
  166. package/vendor/tree-sitter-swift/prebuilds/darwin-x64/tree-sitter-swift.node +0 -0
  167. package/vendor/tree-sitter-swift/prebuilds/linux-arm64/tree-sitter-swift.node +0 -0
  168. package/vendor/tree-sitter-swift/prebuilds/linux-x64/tree-sitter-swift.node +0 -0
  169. package/vendor/tree-sitter-swift/prebuilds/win32-arm64/tree-sitter-swift.node +0 -0
  170. package/vendor/tree-sitter-swift/prebuilds/win32-x64/tree-sitter-swift.node +0 -0
  171. package/vendor/tree-sitter-swift/src/node-types.json +30694 -0
  172. package/web/assets/agent-DaprsFSX.js +597 -0
  173. package/web/assets/architecture-YZFGNWBL-S5CXDPWN-DEdGaPg2.js +1 -0
  174. package/web/assets/architectureDiagram-EMZXCZ2Q-Domyk_gO.js +36 -0
  175. package/web/assets/blockDiagram-IGV67L2C-B_2kD7tM.js +132 -0
  176. package/web/assets/c4Diagram-DFAF54RM-BhJJW8Gg.js +10 -0
  177. package/web/assets/chunk-3GS5O3IE-jlWIjPsl.js +231 -0
  178. package/web/assets/chunk-3YCYZ6SJ-Blq_IzZs.js +1 -0
  179. package/web/assets/chunk-6NTNNK5N-DyPc58pp.js +1 -0
  180. package/web/assets/chunk-7RZVMHOQ-BdIU-RGO.js +321 -0
  181. package/web/assets/chunk-A34GCYZU-BI2i_LdU.js +1 -0
  182. package/web/assets/chunk-AEOMTBSW-D7qjBMHW.js +1 -0
  183. package/web/assets/chunk-CilyBKbf.js +1 -0
  184. package/web/assets/chunk-DJ7UZH7F-i11ywiBl.js +1 -0
  185. package/web/assets/chunk-DKKBVRCY-1SffGI1N.js +4 -0
  186. package/web/assets/chunk-DU5LTGQ6-DaPeiwD5.js +1 -0
  187. package/web/assets/chunk-FXACKDTF-uhhi2PC2.js +159 -0
  188. package/web/assets/chunk-H3VCZNTA-IchcISDt.js +1 -0
  189. package/web/assets/chunk-HN6EAY2L-D7ZFMNrB.js +1 -0
  190. package/web/assets/chunk-KSICW3F5-C2tZmXwv.js +15 -0
  191. package/web/assets/chunk-O5ABG6QK-Bt-Km84H.js +1 -0
  192. package/web/assets/chunk-PK6DOVAG-ChlWY0BQ.js +206 -0
  193. package/web/assets/chunk-RNJOYNJ4-B724K7cW.js +1 -0
  194. package/web/assets/chunk-RWUO3TPN-DYn1XriD.js +1 -0
  195. package/web/assets/chunk-TBF5ZNIQ-DKtDz6ae.js +1 -0
  196. package/web/assets/chunk-TU3PZOEN-DE5Qhc0N.js +1 -0
  197. package/web/assets/chunk-TYMNRAUI-g1h33cq-.js +1 -0
  198. package/web/assets/chunk-VELTKBKT-C9dVN39o.js +1 -0
  199. package/web/assets/chunk-W7ZLLLMY-Du-Hb9yb.js +1 -0
  200. package/web/assets/chunk-WSB5WSVC-B123clsZ.js +1 -0
  201. package/web/assets/chunk-XGPFEOL4-BR7Eue38.js +1 -0
  202. package/web/assets/classDiagram-PPOCWD7C-BglfKSs_.js +1 -0
  203. package/web/assets/classDiagram-v2-23LJLIIU-BSzTM28O.js +1 -0
  204. package/web/assets/context-builder-CqQNhRj1.js +15 -0
  205. package/web/assets/cose-bilkent-PNC4W37J-DCfErU-A.js +1 -0
  206. package/web/assets/dagre-E77IOHMT-tDRRhDoN.js +4 -0
  207. package/web/assets/diagram-H7BISOXX-CUVHlmAh.js +43 -0
  208. package/web/assets/diagram-JC5VWROH-BoyOxulB.js +24 -0
  209. package/web/assets/diagram-LXUTUG65-osr9hb7N.js +10 -0
  210. package/web/assets/diagram-WEHSV5V5-d8nUqS39.js +24 -0
  211. package/web/assets/erDiagram-GCSMX5X6-b-IwOhPS.js +85 -0
  212. package/web/assets/flowDiagram-OTCZ4VVT-Ott2Q0AP.js +162 -0
  213. package/web/assets/ganttDiagram-MUNLMDZQ-BYtgN_5s.js +292 -0
  214. package/web/assets/gitGraph-7Q5UKJZL-54BCDZD5-CFyBIGZq.js +1 -0
  215. package/web/assets/gitGraphDiagram-3HKGZ4G3-CsVD2gn4.js +106 -0
  216. package/web/assets/index-BleGLU8S.css +2 -0
  217. package/web/assets/index-C_xK08EW.js +885 -0
  218. package/web/assets/info-OMHHGYJF-BF2H5H6G-yjAxKEzh.js +1 -0
  219. package/web/assets/infoDiagram-MN7RKWGX-DXK0Unn5.js +2 -0
  220. package/web/assets/ishikawaDiagram-YMYX4NHK-CXsnC2FA.js +70 -0
  221. package/web/assets/journeyDiagram-SO5T7YLQ-BzZ07B-X.js +139 -0
  222. package/web/assets/kanban-definition-LJHFXRCJ-C6_EpAd9.js +89 -0
  223. package/web/assets/katex-GD7MH7QM-CJiOjBBJ.js +261 -0
  224. package/web/assets/mindmap-definition-2EUWGEK5-CCYGWZ1m.js +96 -0
  225. package/web/assets/packet-4T2RLAQJ-EV4IVRXR-B8k4E3IT.js +1 -0
  226. package/web/assets/pie-ZZUOXDRM-N23DN5KN-DdvfY118.js +1 -0
  227. package/web/assets/pieDiagram-3IATQBI2-RyvRlQb4.js +30 -0
  228. package/web/assets/quadrantDiagram-E256RVCF-Bfb6sxCx.js +7 -0
  229. package/web/assets/radar-PYXPWWZC-P6TP7ZYP-1EEDC_yU.js +1 -0
  230. package/web/assets/requirementDiagram-M5DCFWZL-DjvHDyvN.js +84 -0
  231. package/web/assets/sankeyDiagram-L3NBLAOT-CBCbbl8s.js +10 -0
  232. package/web/assets/sequenceDiagram-ZOUHS735-BscU8TUR.js +157 -0
  233. package/web/assets/stateDiagram-MLPALWAM-CJusEK2D.js +1 -0
  234. package/web/assets/stateDiagram-v2-B5LQ5ZB2-DImJ3PXD.js +1 -0
  235. package/web/assets/timeline-definition-5SPVSISX-DigPA1X8.js +120 -0
  236. package/web/assets/treeView-SZITEDCU-5DXDK3XO-CzPDt3aG.js +1 -0
  237. package/web/assets/treemap-W4RFUUIX-WYLRDWKO-B9Iqiorr.js +1 -0
  238. package/web/assets/vennDiagram-IE5QUKF5-C91UkZIf.js +34 -0
  239. package/web/assets/wardley-RL74JXVD-BCRCBASE-x42Qw7hp.js +1 -0
  240. package/web/assets/wardleyDiagram-XU3VSMPF-DloBhI0U.js +20 -0
  241. package/web/assets/xychartDiagram-ZHJ5623Y-BGWJvgwI.js +7 -0
  242. package/web/index.html +21 -0
  243. package/scripts/patch-tree-sitter-swift.cjs +0 -78
@@ -0,0 +1,157 @@
1
+ import{o as e,t}from"./chunk-VELTKBKT-C9dVN39o.js";import{$t as n,A as r,Bt as i,Ft as a,I as o,Jt as s,Pt as c,Qt as l,Rt as u,Ut as d,Vn as f,Vt as p,_n as m,en as h,fn as g,gn as _,hn as v,in as y,kt as b,mn as x,nn as S,pn as C,qn as w,sn as T,tn as E}from"./index-C_xK08EW.js";import{a as D,c as O,n as k,o as A,s as j,t as M}from"./chunk-O5ABG6QK-Bt-Km84H.js";import{t as N}from"./chunk-TU3PZOEN-DE5Qhc0N.js";var P=(function(){var e=t(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,12],l=[1,14],u=[1,15],d=[1,17],f=[1,18],p=[1,19],m=[1,25],h=[1,26],g=[1,27],_=[1,28],v=[1,29],y=[1,30],b=[1,31],x=[1,32],S=[1,33],C=[1,34],w=[1,35],T=[1,36],E=[1,37],D=[1,38],O=[1,39],k=[1,40],A=[1,42],j=[1,43],M=[1,44],N=[1,45],P=[1,46],F=[1,47],I=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],L=[1,74],ee=[1,80],R=[1,81],te=[1,82],ne=[1,83],re=[1,84],z=[1,85],B=[1,86],V=[1,87],ie=[1,88],H=[1,89],U=[1,90],W=[1,91],ae=[1,92],oe=[1,93],se=[1,94],G=[1,95],ce=[1,96],K=[1,97],le=[1,98],ue=[1,99],de=[1,100],fe=[1,101],pe=[1,102],me=[1,103],he=[1,104],ge=[1,105],_e=[2,78],ve=[4,5,17,51,53,54],ye=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],be=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],xe=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Ce=[5,52],q=[70,71,72,73],J=[1,151],we={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NEWLINE`,6:`SD`,10:`INVALID`,14:`create`,15:`box`,16:`restOfLine`,17:`end`,19:`autonumber`,20:`NUM`,21:`off`,22:`activate`,24:`deactivate`,30:`title`,31:`legacy_title`,32:`acc_title`,33:`acc_title_value`,34:`acc_descr`,35:`acc_descr_value`,36:`acc_descr_multiline_value`,37:`loop`,38:`rect`,39:`opt`,40:`alt`,42:`par`,44:`par_over`,45:`critical`,47:`break`,48:`option`,49:`and`,50:`else`,51:`participant`,52:`AS`,53:`participant_actor`,54:`destroy`,56:`note`,59:`over`,61:`links`,62:`link`,63:`properties`,64:`details`,66:`,`,67:`left_of`,68:`right_of`,70:`+`,71:`-`,72:`()`,73:`ACTOR`,75:`CONFIG_START`,76:`CONFIG_CONTENT`,77:`CONFIG_END`,78:`SOLID_OPEN_ARROW`,79:`DOTTED_OPEN_ARROW`,80:`SOLID_ARROW`,81:`SOLID_ARROW_TOP`,82:`SOLID_ARROW_BOTTOM`,83:`STICK_ARROW_TOP`,84:`STICK_ARROW_BOTTOM`,85:`SOLID_ARROW_TOP_DOTTED`,86:`SOLID_ARROW_BOTTOM_DOTTED`,87:`STICK_ARROW_TOP_DOTTED`,88:`STICK_ARROW_BOTTOM_DOTTED`,89:`SOLID_ARROW_TOP_REVERSE`,90:`SOLID_ARROW_BOTTOM_REVERSE`,91:`STICK_ARROW_TOP_REVERSE`,92:`STICK_ARROW_BOTTOM_REVERSE`,93:`SOLID_ARROW_TOP_REVERSE_DOTTED`,94:`SOLID_ARROW_BOTTOM_REVERSE_DOTTED`,95:`STICK_ARROW_TOP_REVERSE_DOTTED`,96:`STICK_ARROW_BOTTOM_REVERSE_DOTTED`,97:`BIDIRECTIONAL_SOLID_ARROW`,98:`DOTTED_ARROW`,99:`BIDIRECTIONAL_DOTTED_ARROW`,100:`SOLID_CROSS`,101:`DOTTED_CROSS`,102:`SOLID_POINT`,103:`DOTTED_POINT`,104:`TXT`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.apply(a[s]),a[s];case 4:case 10:this.$=[];break;case 5:case 11:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:case 7:case 12:case 13:this.$=a[s];break;case 8:case 9:case 14:this.$=[];break;case 16:a[s].type=`createParticipant`,this.$=a[s];break;case 17:a[s-1].unshift({type:`boxStart`,boxData:r.parseBoxData(a[s-2])}),a[s-1].push({type:`boxEnd`,boxText:a[s-2]}),this.$=a[s-1];break;case 19:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:`sequenceIndex`,sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:`sequenceIndex`,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor};break;case 24:this.$={type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1].actor};break;case 30:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 31:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 32:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 35:a[s-1].unshift({type:`loopStart`,loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:`loopEnd`,loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:`rectStart`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:`rectEnd`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:`optStart`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:`optEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 38:a[s-1].unshift({type:`altStart`,altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:`altEnd`,signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 39:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_OVER_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 41:a[s-1].unshift({type:`criticalStart`,criticalText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.CRITICAL_START}),a[s-1].push({type:`criticalEnd`,signalType:r.LINETYPE.CRITICAL_END}),this.$=a[s-1];break;case 42:a[s-1].unshift({type:`breakStart`,breakText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_START}),a[s-1].push({type:`breakEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[s-1];break;case 44:this.$=a[s-3].concat([{type:`option`,optionText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[s]]);break;case 46:this.$=a[s-3].concat([{type:`and`,parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 48:this.$=a[s-3].concat([{type:`else`,altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 49:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 50:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 51:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 52:case 57:a[s-1].draw=`actor`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 53:a[s-1].type=`destroyParticipant`,this.$=a[s-1];break;case 54:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 55:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 56:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 58:this.$=[a[s-1],{type:`addNote`,placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 59:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:`addNote`,placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 60:this.$=[a[s-1],{type:`addLinks`,actor:a[s-1].actor,text:a[s]}];break;case 61:this.$=[a[s-1],{type:`addALink`,actor:a[s-1].actor,text:a[s]}];break;case 62:this.$=[a[s-1],{type:`addProperties`,actor:a[s-1].actor,text:a[s]}];break;case 63:this.$=[a[s-1],{type:`addDetails`,actor:a[s-1].actor,text:a[s]}];break;case 66:this.$=[a[s-2],a[s]];break;case 67:this.$=a[s];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0},{type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor}];break;case 71:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4].actor}];break;case 72:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor}];break;case 73:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-4].actor}];break;case 74:this.$=[a[s-5],a[s-1],{type:`addMessage`,from:a[s-5].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-5].actor}];break;case 75:this.$=[a[s-3],a[s-1],{type:`addMessage`,from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 76:this.$={type:`addParticipant`,actor:a[s-1],config:a[s]};break;case 77:this.$=a[s-1].trim();break;case 78:this.$={type:`addParticipant`,actor:a[s]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(a[s].trim().substring(1));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},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},e(I,[2,5]),{9:48,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},e(I,[2,7]),e(I,[2,8]),e(I,[2,9]),e(I,[2,15]),{13:49,51:D,53:O,54:k},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:F},{23:56,73:F},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(I,[2,30]),e(I,[2,31]),{33:[1,62]},{35:[1,63]},e(I,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:L},{23:75,55:76,73:L},{23:77,73:F},{69:78,72:[1,79],78:ee,79:R,80:te,81:ne,82:re,83:z,84:B,85:V,86:ie,87:H,88:U,89:W,90:ae,91:oe,92:se,93:G,94:ce,95:K,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:F},{23:111,73:F},{23:112,73:F},{23:113,73:F},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],_e),e(I,[2,6]),e(I,[2,16]),e(ve,[2,10],{11:114}),e(I,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(I,[2,22]),{5:[1,118]},{5:[1,119]},e(I,[2,25]),e(I,[2,26]),e(I,[2,27]),e(I,[2,28]),e(I,[2,29]),e(I,[2,32]),e(I,[2,33]),e(ye,a,{7:120}),e(ye,a,{7:121}),e(ye,a,{7:122}),e(be,a,{41:123,7:124}),e(xe,a,{43:125,7:126}),e(xe,a,{7:126,43:127}),e(Se,a,{46:128,7:129}),e(ye,a,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Ce,_e,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:F},{69:146,78:ee,79:R,80:te,81:ne,82:re,83:z,84:B,85:V,86:ie,87:H,88:U,89:W,90:ae,91:oe,92:se,93:G,94:ce,95:K,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},e(q,[2,79]),e(q,[2,80]),e(q,[2,81]),e(q,[2,82]),e(q,[2,83]),e(q,[2,84]),e(q,[2,85]),e(q,[2,86]),e(q,[2,87]),e(q,[2,88]),e(q,[2,89]),e(q,[2,90]),e(q,[2,91]),e(q,[2,92]),e(q,[2,93]),e(q,[2,94]),e(q,[2,95]),e(q,[2,96]),e(q,[2,97]),e(q,[2,98]),e(q,[2,99]),e(q,[2,100]),e(q,[2,101]),e(q,[2,102]),e(q,[2,103]),e(q,[2,104]),{23:147,73:F},{23:149,60:148,73:F},{73:[2,68]},{73:[2,69]},{58:150,104:J},{58:152,104:J},{58:153,104:J},{58:154,104:J},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:D,53:O,54:k},{5:[1,160]},e(I,[2,20]),e(I,[2,21]),e(I,[2,23]),e(I,[2,24]),{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,161],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,162],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,163],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,164]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,47],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,50:[1,165],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,166]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,45],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,49:[1,167],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,168]},{17:[1,169]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,43],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,48:[1,170],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,171],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{16:[1,172]},e(I,[2,50]),{16:[1,173]},e(I,[2,55]),e(Ce,[2,76]),{76:[1,174]},{16:[1,175]},e(I,[2,52]),{16:[1,176]},e(I,[2,57]),e(I,[2,53]),{23:177,73:F},{23:178,73:F},{23:179,73:F},{58:180,104:J},{23:181,72:[1,182],73:F},{58:183,104:J},{58:184,104:J},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(I,[2,17]),e(ve,[2,11]),{13:186,51:D,53:O,54:k},e(ve,[2,13]),e(ve,[2,14]),e(I,[2,19]),e(I,[2,35]),e(I,[2,36]),e(I,[2,37]),e(I,[2,38]),{16:[1,187]},e(I,[2,39]),{16:[1,188]},e(I,[2,40]),e(I,[2,41]),{16:[1,189]},e(I,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:J},{58:196,104:J},{58:197,104:J},{5:[2,75]},{58:198,104:J},{23:199,73:F},{5:[2,58]},{5:[2,59]},{23:200,73:F},e(ve,[2,12]),e(be,a,{7:124,41:201}),e(xe,a,{7:126,43:202}),e(Se,a,{7:129,46:203}),e(I,[2,49]),e(I,[2,54]),e(Ce,[2,77]),e(I,[2,51]),e(I,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:J},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){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(e,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}t(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}t(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
+ `+h.showPosition()+`
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`)};we.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(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:t(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:t(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:t(function(){return this._more=!0,this},`more`),reject:t(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:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(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:t(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:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
5
+ `+t+`^`},`showPosition`),test_match:t(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:t(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:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`begin`),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(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:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:t(function(e,t,n,r){switch(n){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin(`CONFIG`),75;case 8:return 76;case 9:return this.popState(),this.begin(`ALIAS`),77;case 10:return this.popState(),this.popState(),77;case 11:return t.yytext=t.yytext.trim(),73;case 12:return t.yytext=t.yytext.trim(),this.begin(`ALIAS`),73;case 13:return t.yytext=t.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return t.yytext=t.yytext.trim(),this.popState(),10;case 16:return this.begin(`LINE`),15;case 17:return this.begin(`ID`),51;case 18:return this.begin(`ID`),53;case 19:return 14;case 20:return this.begin(`ID`),54;case 21:return this.popState(),this.popState(),this.begin(`LINE`),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin(`LINE`),37;case 24:return this.begin(`LINE`),38;case 25:return this.begin(`LINE`),39;case 26:return this.begin(`LINE`),40;case 27:return this.begin(`LINE`),50;case 28:return this.begin(`LINE`),42;case 29:return this.begin(`LINE`),44;case 30:return this.begin(`LINE`),49;case 31:return this.begin(`LINE`),45;case 32:return this.begin(`LINE`),48;case 33:return this.begin(`LINE`),47;case 34:return this.popState(),16;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin(`ID`),22;case 45:return this.begin(`ID`),24;case 46:return 30;case 47:return 31;case 48:return this.begin(`acc_title`),32;case 49:return this.popState(),`acc_title_value`;case 50:return this.begin(`acc_descr`),34;case 51:return this.popState(),`acc_descr_value`;case 52:this.begin(`acc_descr_multiline`);break;case 53:this.popState();break;case 54:return`acc_descr_multiline_value`;case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 59:return 5;case 60:return t.yytext=t.yytext.trim(),73;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 104;case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 92:return 5;case 93:return 10}},`anonymous`),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}}})();function Te(){this.yy={}}return t(Te,`Parser`),Te.prototype=we,we.Parser=Te,new Te})();P.parser=P;var F=P,I={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},L={FILLED:0,OPEN:1},ee={LEFTOF:0,RIGHTOF:1,OVER:2},R={ACTOR:`actor`,BOUNDARY:`boundary`,COLLECTIONS:`collections`,CONTROL:`control`,DATABASE:`database`,ENTITY:`entity`,PARTICIPANT:`participant`,QUEUE:`queue`},te=class{constructor(){this.state=new N(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=n,this.setAccDescription=s,this.setDiagramTitle=h,this.getAccTitle=v,this.getAccDescription=y,this.getDiagramTitle=T,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(x().wrap),this.LINETYPE=I,this.ARROWTYPE=L,this.PLACEMENT=ee}static{t(this,`SequenceDB`)}addBox(e){this.state.records.boxes.push({name:e.text,wrap:e.wrap??this.autoWrap(),fill:e.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(e,t,n,r,i){let o=this.state.records.currentBox,s;if(i!==void 0){let e;e=i.includes(`
7
+ `)?i+`
8
+ `:`{
9
+ `+i+`
10
+ }`,s=c(e,{schema:a})}r=s?.type??r,s?.alias&&(!n||n.text===t)&&(n={text:s.alias,wrap:n?.wrap,type:r});let l=this.state.records.actors.get(e);if(l){if(this.state.records.currentBox&&l.box&&this.state.records.currentBox!==l.box)throw Error(`A same participant should only be defined in one Box: ${l.name} can't be in '${l.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(o=l.box?l.box:this.state.records.currentBox,l.box=o,l&&t===l.name&&n==null)return}if(n?.text??(n={text:t,type:r}),(r==null||n.text==null)&&(n={text:t,type:r}),this.state.records.actors.set(e,{box:o,name:t,description:n.text,wrap:n.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??`participant`}),this.state.records.prevActor){let t=this.state.records.actors.get(this.state.records.prevActor);t&&(t.nextActor=e)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(e),this.state.records.prevActor=e}activationCount(e){let t,n=0;if(!e)return 0;for(t=0;t<this.state.records.messages.length;t++)this.state.records.messages[t].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[t].from===e&&n++,this.state.records.messages[t].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[t].from===e&&n--;return n}addMessage(e,t,n,r){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:n.text,wrap:n.wrap??this.autoWrap(),answer:r})}addSignal(e,t,n,r,i=!1,a){if(r===this.LINETYPE.ACTIVE_END&&this.activationCount(e??``)<1){let t=Error(`Trying to inactivate an inactive participant (`+e+`)`);throw t.hash={text:`->>-`,token:`->>-`,line:`1`,loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:[`'ACTIVE_PARTICIPANT'`]},t}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:n?.text??``,wrap:n?.wrap??this.autoWrap(),type:r,activate:i,centralConnection:a??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(e=>e.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(e){return this.state.records.actors.get(e)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(e){this.state.records.wrapEnabled=e}extractWrap(e){if(e===void 0)return{};e=e.trim();let t=/^:?wrap:/.exec(e)===null?/^:?nowrap:/.exec(e)===null?void 0:!1:!0;return{cleanedText:(t===void 0?e:e.replace(/^:?(?:no)?wrap:/,``)).trim(),wrap:t}}autoWrap(){return this.state.records.wrapEnabled===void 0?x().sequence?.wrap??!1:this.state.records.wrapEnabled}clear(){this.state.reset(),g()}parseMessage(e){let t=e.trim(),{wrap:n,cleanedText:r}=this.extractWrap(t),i={text:r,wrap:n};return w.debug(`parseMessage: ${JSON.stringify(i)}`),i}parseBoxData(e){let t=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e),n=t?.[1]?t[1].trim():`transparent`,r=t?.[2]?t[2].trim():void 0;if(window?.CSS)window.CSS.supports(`color`,n)||(n=`transparent`,r=e.trim());else{let t=new Option().style;t.color=n,t.color!==n&&(n=`transparent`,r=e.trim())}let{wrap:i,cleanedText:a}=this.extractWrap(r);return{text:a?_(a,x()):void 0,color:n,wrap:i}}addNote(e,t,n){let r={actor:e,placement:t,message:n.text,wrap:n.wrap??this.autoWrap()},i=[].concat(e,e);this.state.records.notes.push(r),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:i[0],to:i[1],message:n.text,wrap:n.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:t})}addLinks(e,t){let n=this.getActor(e);try{let e=_(t.text,x());e=e.replace(/&equals;/g,`=`),e=e.replace(/&amp;/g,`&`);let r=JSON.parse(e);this.insertLinks(n,r)}catch(e){w.error(`error while parsing actor link text`,e)}}addALink(e,t){let n=this.getActor(e);try{let e={},r=_(t.text,x()),i=r.indexOf(`@`);r=r.replace(/&equals;/g,`=`),r=r.replace(/&amp;/g,`&`);let a=r.slice(0,i-1).trim();e[a]=r.slice(i+1).trim(),this.insertLinks(n,e)}catch(e){w.error(`error while parsing actor link text`,e)}}insertLinks(e,t){if(e.links==null)e.links=t;else for(let n in t)e.links[n]=t[n]}addProperties(e,t){let n=this.getActor(e);try{let e=_(t.text,x()),r=JSON.parse(e);this.insertProperties(n,r)}catch(e){w.error(`error while parsing actor properties text`,e)}}insertProperties(e,t){if(e.properties==null)e.properties=t;else for(let n in t)e.properties[n]=t[n]}boxEnd(){this.state.records.currentBox=void 0}addDetails(e,t){let n=this.getActor(e),r=document.getElementById(t.text);try{let e=r.innerHTML,t=JSON.parse(e);t.properties&&this.insertProperties(n,t.properties),t.links&&this.insertLinks(n,t.links)}catch(e){w.error(`error while parsing actor details text`,e)}}getActorProperty(e,t){if(e?.properties!==void 0)return e.properties[t]}apply(e){if(Array.isArray(e))e.forEach(e=>{this.apply(e)});else switch(e.type){case`sequenceIndex`:this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case`addParticipant`:this.addActor(e.actor,e.actor,e.description,e.draw,e.config);break;case`createParticipant`:if(this.state.records.actors.has(e.actor))throw Error(`It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior`);this.state.records.lastCreated=e.actor,this.addActor(e.actor,e.actor,e.description,e.draw,e.config),this.state.records.createdActors.set(e.actor,this.state.records.messages.length);break;case`destroyParticipant`:this.state.records.lastDestroyed=e.actor,this.state.records.destroyedActors.set(e.actor,this.state.records.messages.length);break;case`activeStart`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`centralConnection`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`centralConnectionReverse`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`activeEnd`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`addNote`:this.addNote(e.actor,e.placement,e.text);break;case`addLinks`:this.addLinks(e.actor,e.text);break;case`addALink`:this.addALink(e.actor,e.text);break;case`addProperties`:this.addProperties(e.actor,e.text);break;case`addDetails`:this.addDetails(e.actor,e.text);break;case`addMessage`:if(this.state.records.lastCreated){if(e.to!==this.state.records.lastCreated)throw Error(`The created participant `+this.state.records.lastCreated.name+` does not have an associated creating message after its declaration. Please check the sequence diagram.`);this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(e.to!==this.state.records.lastDestroyed&&e.from!==this.state.records.lastDestroyed)throw Error(`The destroyed participant `+this.state.records.lastDestroyed.name+` does not have an associated destroying message after its declaration. Please check the sequence diagram.`);this.state.records.lastDestroyed=void 0}this.addSignal(e.from,e.to,e.msg,e.signalType,e.activate,e.centralConnection);break;case`boxStart`:this.addBox(e.boxData);break;case`boxEnd`:this.boxEnd();break;case`loopStart`:this.addSignal(void 0,void 0,e.loopText,e.signalType);break;case`loopEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`rectStart`:this.addSignal(void 0,void 0,e.color,e.signalType);break;case`rectEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`optStart`:this.addSignal(void 0,void 0,e.optText,e.signalType);break;case`optEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`altStart`:this.addSignal(void 0,void 0,e.altText,e.signalType);break;case`else`:this.addSignal(void 0,void 0,e.altText,e.signalType);break;case`altEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`setAccTitle`:n(e.text);break;case`parStart`:this.addSignal(void 0,void 0,e.parText,e.signalType);break;case`and`:this.addSignal(void 0,void 0,e.parText,e.signalType);break;case`parEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`criticalStart`:this.addSignal(void 0,void 0,e.criticalText,e.signalType);break;case`option`:this.addSignal(void 0,void 0,e.optionText,e.signalType);break;case`criticalEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`breakStart`:this.addSignal(void 0,void 0,e.breakText,e.signalType);break;case`breakEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break}}getConfig(){return x().sequence}},ne=t(e=>{let t=e.dropShadow??`none`,{look:n}=x();return`.actor {
11
+ stroke: ${e.actorBorder};
12
+ fill: ${e.actorBkg};
13
+ stroke-width: ${e.strokeWidth??1};
14
+ }
15
+
16
+ rect.actor.outer-path[data-look="neo"] {
17
+ filter: ${t};
18
+ }
19
+
20
+ rect.note[data-look="neo"] {
21
+ stroke:${e.noteBorderColor};
22
+ fill:${e.noteBkgColor};
23
+ filter: ${t};
24
+ }
25
+
26
+ text.actor > tspan {
27
+ fill: ${e.actorTextColor};
28
+ stroke: none;
29
+ }
30
+
31
+ .actor-line {
32
+ stroke: ${e.actorLineColor};
33
+ }
34
+
35
+ .innerArc {
36
+ stroke-width: 1.5;
37
+ stroke-dasharray: none;
38
+ }
39
+
40
+ .messageLine0 {
41
+ stroke-width: 1.5;
42
+ stroke-dasharray: none;
43
+ stroke: ${e.signalColor};
44
+ }
45
+
46
+ .messageLine1 {
47
+ stroke-width: 1.5;
48
+ stroke-dasharray: 2, 2;
49
+ stroke: ${e.signalColor};
50
+ }
51
+
52
+ [id$="-arrowhead"] path {
53
+ fill: ${e.signalColor};
54
+ stroke: ${e.signalColor};
55
+ }
56
+
57
+ .sequenceNumber {
58
+ fill: ${e.sequenceNumberColor};
59
+ }
60
+
61
+ [id$="-sequencenumber"] {
62
+ fill: ${e.signalColor};
63
+ }
64
+
65
+ [id$="-crosshead"] path {
66
+ fill: ${e.signalColor};
67
+ stroke: ${e.signalColor};
68
+ }
69
+
70
+ .messageText {
71
+ fill: ${e.signalTextColor};
72
+ stroke: none;
73
+ }
74
+
75
+ .labelBox {
76
+ stroke: ${e.labelBoxBorderColor};
77
+ fill: ${e.labelBoxBkgColor};
78
+ filter: ${n===`neo`?t:`none`};
79
+ }
80
+
81
+ .labelText, .labelText > tspan {
82
+ fill: ${e.labelTextColor};
83
+ stroke: none;
84
+ }
85
+
86
+ .loopText, .loopText > tspan {
87
+ fill: ${e.loopTextColor};
88
+ stroke: none;
89
+ }
90
+
91
+ .loopLine {
92
+ stroke-width: 2px;
93
+ stroke-dasharray: 2, 2;
94
+ stroke: ${e.labelBoxBorderColor};
95
+ fill: ${e.labelBoxBorderColor};
96
+ }
97
+
98
+ .note {
99
+ //stroke: #decc93;
100
+ stroke: ${e.noteBorderColor};
101
+ fill: ${e.noteBkgColor};
102
+ }
103
+
104
+ .noteText, .noteText > tspan {
105
+ fill: ${e.noteTextColor};
106
+ stroke: none;
107
+ ${e.noteFontWeight?`font-weight: ${e.noteFontWeight};`:``}
108
+ }
109
+
110
+ .activation0 {
111
+ fill: ${e.activationBkgColor};
112
+ stroke: ${e.activationBorderColor};
113
+ }
114
+
115
+ .activation1 {
116
+ fill: ${e.activationBkgColor};
117
+ stroke: ${e.activationBorderColor};
118
+ }
119
+
120
+ .activation2 {
121
+ fill: ${e.activationBkgColor};
122
+ stroke: ${e.activationBorderColor};
123
+ }
124
+
125
+ .actorPopupMenu {
126
+ position: absolute;
127
+ }
128
+
129
+ .actorPopupMenuPanel {
130
+ position: absolute;
131
+ fill: ${e.actorBkg};
132
+ box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
133
+ filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
134
+ }
135
+ .actor-man circle, line {
136
+ fill: ${e.actorBkg};
137
+ stroke-width: 2px;
138
+ }
139
+
140
+ g rect.rect {
141
+ filter: ${t};
142
+ stroke: ${e.nodeBorder};
143
+ }
144
+ `},`getStyles`),re=e(b(),1),z=36,B=`actor-top`,V=`actor-bottom`,ie=`actor-box`,H=`actor-man`,U=new Set([`redux-color`,`redux-dark-color`]),W=t(function(e,t){let n=O(e,t);return d().look===`neo`&&n.attr(`data-look`,`neo`),n},`drawRect`),ae=t(function(e,t,n,r,i){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};let a=t.links,o=t.actorCnt,s=t.rectData;var c=`none`;i&&(c=`block !important`);let l=e.append(`g`);l.attr(`id`,`actor`+o+`_popup`),l.attr(`class`,`actorPopupMenu`),l.attr(`display`,c);var u=``;s.class!==void 0&&(u=` `+s.class);let d=s.width>n?s.width:n,f=l.append(`rect`);if(f.attr(`class`,`actorPopupMenuPanel`+u),f.attr(`x`,s.x),f.attr(`y`,s.height),f.attr(`fill`,s.fill),f.attr(`stroke`,s.stroke),f.attr(`width`,d),f.attr(`height`,s.height),f.attr(`rx`,s.rx),f.attr(`ry`,s.ry),a!=null){var p=20;for(let e in a){var m=l.append(`a`),h=(0,re.sanitizeUrl)(a[e]);m.attr(`xlink:href`,h),m.attr(`target`,`_blank`),Me(r)(e,m,s.x+10,s.height+p,d,20,{class:`actor`},r),p+=30}}return f.attr(`height`,p),{height:s.height+p,width:d}},`drawPopup`),oe=t(function(e){return`var pu = document.getElementById('`+e+`'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }`},`popupMenuToggle`),se=t(async function(e,t,n=null){let r=e.append(`foreignObject`),i=await p(t.text,d()),a=r.append(`xhtml:div`).attr(`style`,`width: fit-content;`).attr(`xmlns`,`http://www.w3.org/1999/xhtml`).html(i).node().getBoundingClientRect();if(r.attr(`height`,Math.round(a.height)).attr(`width`,Math.round(a.width)),t.class===`noteText`){let n=e.node().firstChild;n.setAttribute(`height`,a.height+2*t.textMargin);let i=n.getBBox();r.attr(`x`,Math.round(i.x+i.width/2-a.width/2)).attr(`y`,Math.round(i.y+i.height/2-a.height/2))}else if(n){let{startx:e,stopx:i,starty:o}=n;if(e>i){let t=e;e=i,i=t}r.attr(`x`,Math.round(e+Math.abs(e-i)/2-a.width/2)),t.class===`loopText`?r.attr(`y`,Math.round(o)):r.attr(`y`,Math.round(o-a.height))}return[r]},`drawKatex`),G=t(function(e,n){let i=0,a=0,o=n.text.split(u.lineBreakRegex),[s,c]=r(n.fontSize),l=[],d=0,f=t(()=>n.y,`yfunc`);if(n.valign!==void 0&&n.textMargin!==void 0&&n.textMargin>0)switch(n.valign){case`top`:case`start`:f=t(()=>Math.round(n.y+n.textMargin),`yfunc`);break;case`middle`:case`center`:f=t(()=>Math.round(n.y+(i+a+n.textMargin)/2),`yfunc`);break;case`bottom`:case`end`:f=t(()=>Math.round(n.y+(i+a+2*n.textMargin)-n.textMargin),`yfunc`);break}if(n.anchor!==void 0&&n.textMargin!==void 0&&n.width!==void 0)switch(n.anchor){case`left`:case`start`:n.x=Math.round(n.x+n.textMargin),n.anchor=`start`,n.dominantBaseline=`middle`,n.alignmentBaseline=`middle`;break;case`middle`:case`center`:n.x=Math.round(n.x+n.width/2),n.anchor=`middle`,n.dominantBaseline=`middle`,n.alignmentBaseline=`middle`;break;case`right`:case`end`:n.x=Math.round(n.x+n.width-n.textMargin),n.anchor=`end`,n.dominantBaseline=`middle`,n.alignmentBaseline=`middle`;break}for(let[t,r]of o.entries()){n.textMargin!==void 0&&n.textMargin===0&&s!==void 0&&(d=t*s);let o=e.append(`text`);o.attr(`x`,n.x),o.attr(`y`,f()),n.anchor!==void 0&&o.attr(`text-anchor`,n.anchor).attr(`dominant-baseline`,n.dominantBaseline).attr(`alignment-baseline`,n.alignmentBaseline),n.fontFamily!==void 0&&o.style(`font-family`,n.fontFamily),c!==void 0&&o.style(`font-size`,c),n.fontWeight!==void 0&&o.style(`font-weight`,n.fontWeight),n.fill!==void 0&&o.attr(`fill`,n.fill),n.class!==void 0&&o.attr(`class`,n.class),n.dy===void 0?d!==0&&o.attr(`dy`,d):o.attr(`dy`,n.dy);let u=r||`​`;if(n.tspan){let e=o.append(`tspan`);e.attr(`x`,n.x),n.fill!==void 0&&e.attr(`fill`,n.fill),e.text(u)}else o.text(u);n.valign!==void 0&&n.textMargin!==void 0&&n.textMargin>0&&(a+=(o._groups||o)[0][0].getBBox().height,i=a),l.push(o)}return l},`drawText`),ce=t(function(e,n){function r(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}t(r,`genPoints`);let i=e.append(`polygon`);return i.attr(`points`,r(n.x,n.y,n.width,n.height,7)),i.attr(`class`,`labelBox`),n.y+=n.height/2,G(e,n),i},`drawLabel`),K=-1,le=t((e,t,n,r)=>{e.select&&n.forEach(n=>{let i=t.get(n),a=e.select(`#actor`+i.actorCnt);!r.mirrorActors&&i.stopy?a.attr(`y2`,i.stopy+i.height/2):r.mirrorActors&&a.attr(`y2`,i.stopy)})},`fixLifeLineHeights`),ue=t(function(e,t,n,r,a){let o=r?t.stopy:t.starty,s=t.x+t.width/2,c=o+t.height,{look:l,theme:u,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p}=d,m=e.append(`g`).lower();var h=m;r||(K++,Object.keys(t.links||{}).length&&!n.forceMenus&&h.attr(`onclick`,oe(`actor${K}_popup`)).attr(`cursor`,`pointer`),h.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),h=m.append(`g`),t.actorCnt=K,t.links!=null&&h.attr(`id`,`root-`+K),l===`neo`&&h.attr(`data-look`,`neo`));let g=j();var _=`actor`;t.properties?.class?_=t.properties.class:g.fill=`#eaeaea`,r?_+=` ${V}`:_+=` ${B}`,g.x=t.x,g.y=o,g.width=t.width,g.height=t.height,g.class=_,g.rx=3,g.ry=3,g.name=t.name,l===`neo`&&(g.rx=6,g.ry=6);let v=W(h,g),y=a.get(t.name)??0;if(U.has(u)&&(v.style(`stroke`,p[y%p.length]),v.style(`fill`,f[y%p.length])),l===`neo`&&v.attr(`filter`,`url(#drop-shadow)`),t.rectData=g,t.properties?.icon){let e=t.properties.icon.trim();e.charAt(0)===`@`?A(h,g.x+g.width-20,g.y+10,e.substr(1)):M(h,g.x+g.width-20,g.y+10,e)}r||(h.attr(`data-et`,`participant`),h.attr(`data-type`,`participant`),h.attr(`data-id`,t.name)),Y(n,i(t.description))(t.description,h,g.x,g.y,g.width,g.height,{class:`actor ${ie}`},n);let b=t.height;if(v.node){let e=v.node().getBBox();t.height=e.height,b=e.height}return b},`drawActorTypeParticipant`),de=t(function(e,t,n,r,a){let o=r?t.stopy:t.starty,s=t.x+t.width/2,c=o+t.height,{look:l,theme:u,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p}=d,m=e.append(`g`).lower();var h=m;r||(K++,Object.keys(t.links||{}).length&&!n.forceMenus&&h.attr(`onclick`,oe(`actor${K}_popup`)).attr(`cursor`,`pointer`),h.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),h=m.append(`g`),t.actorCnt=K,t.links!=null&&h.attr(`id`,`root-`+K),l===`neo`&&h.attr(`data-look`,`neo`));let g=j();var _=`actor`;t.properties?.class?_=t.properties.class:g.fill=`#eaeaea`,r?_+=` ${V}`:_+=` ${B}`,g.x=t.x,g.y=o,g.width=t.width,g.height=t.height,g.class=_,g.name=t.name;let v={...g,x:g.x+-6,y:g.y+6,class:`actor`},y=W(h,g),b=W(h,v);t.rectData=g,l===`neo`&&h.attr(`filter`,`url(#drop-shadow)`);let x=a.get(t.name)??0;if(U.has(u)&&(y.style(`stroke`,p[x%p.length]),y.style(`fill`,f[x%p.length]),b.style(`stroke`,p[x%p.length]),b.style(`fill`,f[x%p.length])),t.properties?.icon){let e=t.properties.icon.trim();e.charAt(0)===`@`?A(h,g.x+g.width-20,g.y+10,e.substr(1)):M(h,g.x+g.width-20,g.y+10,e)}Y(n,i(t.description))(t.description,h,g.x-6,g.y+6,g.width,g.height,{class:`actor ${ie}`},n);let S=t.height;if(y.node){let e=y.node().getBBox();t.height=e.height,S=e.height}return r||(h.attr(`data-et`,`participant`),h.attr(`data-type`,`collections`),h.attr(`data-id`,t.name)),S},`drawActorTypeCollections`),fe=t(function(e,t,n,r,a){let o=r?t.stopy:t.starty,s=t.x+t.width/2,c=o+t.height,{look:l,theme:u,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p}=d,m=e.append(`g`).lower(),h=m;r||(K++,Object.keys(t.links||{}).length&&!n.forceMenus&&h.attr(`onclick`,oe(`actor${K}_popup`)).attr(`cursor`,`pointer`),h.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),h=m.append(`g`),t.actorCnt=K,t.links!=null&&h.attr(`id`,`root-`+K),l===`neo`&&h.attr(`data-look`,`neo`));let g=j(),_=`actor`;t.properties?.class?_=t.properties.class:g.fill=`#eaeaea`,r?_+=` ${V}`:_+=` ${B}`,h.attr(`class`,_),g.x=t.x,g.y=o,g.width=t.width,g.height=t.height,g.name=t.name;let v=g.height/2,y=v/(2.5+g.height/50),b=h.append(`g`),x=h.append(`g`),S=`M ${g.x},${g.y+v}
145
+ a ${y},${v} 0 0 0 0,${g.height}
146
+ h ${g.width-2*y}
147
+ a ${y},${v} 0 0 0 0,-${g.height}
148
+ Z
149
+ `;b.append(`path`).attr(`d`,S),x.append(`path`).attr(`d`,`M ${g.x},${g.y+v}
150
+ a ${y},${v} 0 0 0 0,${g.height}`),b.attr(`transform`,`translate(${y}, ${-(g.height/2)})`),x.attr(`transform`,`translate(${g.width-y}, ${-g.height/2})`),t.rectData=g,l===`neo`&&b.attr(`filter`,`url(#drop-shadow)`);let C=a.get(t.name)??0;if(U.has(u)&&(b.style(`stroke`,p[C%p.length]),b.style(`fill`,f[C%p.length]),x.style(`stroke`,p[C%p.length]),x.style(`fill`,f[C%p.length])),t.properties?.icon){let e=t.properties.icon.trim(),n=g.x+g.width-20,r=g.y+10;e.charAt(0)===`@`?A(h,n,r,e.substr(1)):M(h,n,r,e)}Y(n,i(t.description))(t.description,h,g.x,g.y,g.width,g.height,{class:`actor ${ie}`},n);let w=t.height,T=b.select(`path:last-child`);if(T.node()){let e=T.node().getBBox();t.height=e.height,w=e.height}return r||(h.attr(`data-et`,`participant`),h.attr(`data-type`,`queue`),h.attr(`data-id`,t.name)),w},`drawActorTypeQueue`),pe=t(function(e,t,n,r,a,o){let s=r?t.stopy:t.starty,c=t.x+t.width/2,l=s+75,{look:u,theme:d,themeVariables:f}=n,{bkgColorArray:p,borderColorArray:m,actorBorder:h,actorBkg:g}=f,_=e.append(`g`).lower();r||(K++,_.append(`line`).attr(`id`,`actor`+K).attr(`x1`,c).attr(`y1`,l).attr(`x2`,c).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K);let v=e.append(`g`),y=H;r?y+=` ${V}`:y+=` ${B}`,v.attr(`class`,y),v.attr(`name`,t.name);let b=j();b.x=t.x,b.y=s,b.fill=`#eaeaea`,b.width=t.width,b.height=t.height,b.class=`actor`;let x=t.x+t.width/2,S=s+32;v.append(`defs`).append(`marker`).attr(`id`,a+`-filled-head-control`).attr(`refX`,11).attr(`refY`,5.8).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`172.5`).attr(`stroke-width`,1.2).append(`path`).attr(`d`,`M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z`),v.append(`circle`).attr(`cx`,x).attr(`cy`,S).attr(`r`,22).attr(`filter`,`${u===`neo`?`url(#drop-shadow)`:``}`),v.append(`line`).attr(`marker-end`,`url(#`+a+`-filled-head-control)`).attr(`transform`,`translate(${x}, ${S-22})`);let C=o.get(t.name)??0;return U.has(d)?(v.style(`stroke`,m[C%m.length]),v.style(`fill`,p[C%m.length])):(v.style(`stroke`,h),v.style(`fill`,g)),t.height=v.node().getBBox().height+2*(n?.sequence?.labelBoxHeight??0),Y(n,i(t.description))(t.description,v,b.x,b.y+22+(r?5:12),b.width,b.height,{class:`actor ${H}`},n),r||(v.attr(`data-et`,`participant`),v.attr(`data-type`,`control`),v.attr(`data-id`,t.name)),t.height},`drawActorTypeControl`),me=t(function(e,t,n,r,a){let o=r?t.stopy:t.starty,s=t.x+t.width/2,c=o+75,{look:l,theme:u,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p}=d,m=e.append(`g`).lower(),h=e.append(`g`),g=`actor`;r?g+=` ${V}`:g+=` ${B}`,h.attr(`class`,g),h.attr(`name`,t.name);let _=j();_.x=t.x,_.y=o,_.fill=`#eaeaea`,_.width=t.width,_.height=t.height,_.class=`actor`;let v=t.x+t.width/2,y=o+(r?10:25);h.append(`circle`).attr(`cx`,v).attr(`cy`,y).attr(`r`,22).attr(`width`,t.width).attr(`height`,t.height),h.append(`line`).attr(`x1`,v-22).attr(`x2`,v+22).attr(`y1`,y+22).attr(`y2`,y+22).attr(`stroke-width`,2),l===`neo`&&h.attr(`filter`,`url(#drop-shadow)`);let b=a.get(t.name)??0;return U.has(u)&&(h.style(`stroke`,p[b%p.length]),h.style(`fill`,f[b%p.length])),t.height=h.node().getBBox().height+(n?.sequence?.labelBoxHeight??0),r||(K++,m.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K),Y(n,i(t.description))(t.description,h,_.x,_.y+(r?15:30),_.width,_.height,{class:`actor ${H}`},n),r?h.attr(`transform`,`translate(0, 22)`):(h.attr(`transform`,`translate(0, ${22/2-5})`),h.attr(`data-et`,`participant`),h.attr(`data-type`,`entity`),h.attr(`data-id`,t.name)),t.height},`drawActorTypeEntity`),he=t(function(e,t,n,r,a){let o=r?t.stopy:t.starty,s=t.x+t.width/2,c=o+t.height+2*n.boxTextMargin,{theme:l,themeVariables:u,look:d}=n,{bkgColorArray:f,borderColorArray:p,actorBorder:m}=u,h=e.append(`g`).lower(),g=h;r||(K++,Object.keys(t.links||{}).length&&!n.forceMenus&&g.attr(`onclick`,oe(`actor${K}_popup`)).attr(`cursor`,`pointer`),g.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),g=h.append(`g`),t.actorCnt=K,t.links!=null&&g.attr(`id`,`root-`+K),d===`neo`&&g.attr(`data-look`,`neo`));let _=j(),v=`actor`;t.properties?.class?v=t.properties.class:_.fill=`#eaeaea`,r?v+=` ${V}`:v+=` ${B}`,_.x=t.x,_.y=o,_.width=t.width,_.height=t.height,_.class=v,_.name=t.name,_.x=t.x,_.y=o;let y=_.width/3,b=_.width/3,x=y/2,S=x/(2.5+y/50),C=g.append(`g`);C.attr(`class`,v);let w=`
151
+ M ${_.x},${_.y+S}
152
+ a ${x},${S} 0 0 0 ${y},0
153
+ a ${x},${S} 0 0 0 -${y},0
154
+ l 0,${b-2*S}
155
+ a ${x},${S} 0 0 0 ${y},0
156
+ l 0,-${b-2*S}
157
+ `;C.append(`path`).attr(`d`,w),d===`neo`&&C.attr(`filter`,`url(#drop-shadow)`);let T=a.get(t.name)??0;U.has(l)?(C.style(`stroke`,p[T%p.length]),C.style(`fill`,f[T%p.length])):C.style(`stroke`,m),C.attr(`transform`,`translate(${y}, ${S})`),t.rectData=_,Y(n,i(t.description))(t.description,g,_.x,_.y+35,_.width,_.height,{class:`actor ${ie}`},n);let E=C.select(`path:last-child`);return E.node()&&(t.height=E.node().getBBox().height+(n.sequence.labelBoxHeight??0)),r||(g.attr(`data-et`,`participant`),g.attr(`data-type`,`database`),g.attr(`data-id`,t.name)),t.height},`drawActorTypeDatabase`),ge=t(function(e,t,n,r,a){let o=r?t.stopy:t.starty,s=t.x+t.width/2,c=o+80,l=e.append(`g`).lower(),{look:u,theme:d,themeVariables:f}=n,{bkgColorArray:p,borderColorArray:m,actorBorder:h}=f;r||(K++,l.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K);let g=e.append(`g`),_=H;r?_+=` ${V}`:_+=` ${B}`,g.attr(`class`,_),g.attr(`name`,t.name);let v=j();v.x=t.x,v.y=o,v.fill=`#eaeaea`,v.width=t.width,v.height=t.height,v.class=`actor`,g.append(`line`).attr(`id`,`actor-man-torso`+K).attr(`x1`,t.x+t.width/2-22*2.5).attr(`y1`,o+12).attr(`x2`,t.x+t.width/2-15).attr(`y2`,o+12),g.append(`line`).attr(`id`,`actor-man-arms`+K).attr(`x1`,t.x+t.width/2-22*2.5).attr(`y1`,o+2).attr(`x2`,t.x+t.width/2-22*2.5).attr(`y2`,o+22),g.append(`circle`).attr(`cx`,t.x+t.width/2).attr(`cy`,o+12).attr(`r`,22),u===`neo`&&g.attr(`filter`,`url(#drop-shadow)`);let y=a.get(t.name)??0;return U.has(d)?(g.style(`stroke`,m[y%m.length]),g.style(`fill`,p[y%m.length])):g.style(`stroke`,h),t.height=g.node().getBBox().height+(n.sequence.labelBoxHeight??0),Y(n,i(t.description))(t.description,g,v.x,v.y+15,v.width,v.height,{class:`actor ${H}`},n),g.attr(`transform`,`translate(0,21)`),r||(g.attr(`data-et`,`participant`),g.attr(`data-type`,`boundary`),g.attr(`data-id`,t.name)),t.height},`drawActorTypeBoundary`),_e=t(function(e,t,n,r,a){let o=r?t.stopy:t.starty,s=t.x+t.width/2,c=o+80,{look:l,theme:u,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p,actorBorder:m}=d,h=e.append(`g`).lower();r||(K++,h.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K);let g=e.append(`g`),_=H;r?_+=` ${V}`:_+=` ${B}`,g.attr(`class`,_),g.attr(`name`,t.name),r||g.attr(`data-et`,`participant`).attr(`data-type`,`actor`).attr(`data-id`,t.name);let v=l===`neo`?.5:1,y=l===`neo`?o+(1-v)*30:o;g.append(`line`).attr(`id`,`actor-man-torso`+K).attr(`x1`,s).attr(`y1`,y+25*v).attr(`x2`,s).attr(`y2`,y+45*v),g.append(`line`).attr(`id`,`actor-man-arms`+K).attr(`x1`,s-z/2*v).attr(`y1`,y+33*v).attr(`x2`,s+z/2*v).attr(`y2`,y+33*v),g.append(`line`).attr(`x1`,s-z/2*v).attr(`y1`,y+60*v).attr(`x2`,s).attr(`y2`,y+45*v),g.append(`line`).attr(`x1`,s).attr(`y1`,y+45*v).attr(`x2`,s+(z/2-2)*v).attr(`y2`,y+60*v);let b=g.append(`circle`);b.attr(`cx`,t.x+t.width/2),b.attr(`cy`,y+10*v),b.attr(`r`,15*v),b.attr(`width`,t.width*v),b.attr(`height`,t.height*v),t.height=g.node().getBBox().height;let x=j();x.x=t.x,x.y=y,x.fill=`#eaeaea`,x.width=t.width,x.height=t.height/v,x.class=`actor`,x.rx=3,x.ry=3;let S=a.get(t.name)??0;return U.has(u)?(g.style(`stroke`,p[S%p.length]),g.style(`fill`,f[S%p.length])):g.style(`stroke`,m),Y(n,i(t.description))(t.description,g,x.x,y+35*v-(l===`neo`?10:0),x.width,x.height,{class:`actor ${H}`},n),t.height},`drawActorTypeActor`),ve=t(async function(e,t,n,r,i,a,o){let s=o??new Map([...a.db.getActors().values()].map((e,t)=>[e.name,t]));switch(t.type){case`actor`:return await _e(e,t,n,r,s);case`participant`:return await ue(e,t,n,r,s);case`boundary`:return await ge(e,t,n,r,s);case`control`:return await pe(e,t,n,r,i,s);case`entity`:return await me(e,t,n,r,s);case`database`:return await he(e,t,n,r,s);case`collections`:return await de(e,t,n,r,s);case`queue`:return await fe(e,t,n,r,s)}},`drawActor`),ye=t(function(e,t,n){let r=e.append(`g`);Ce(r,t),t.name&&Y(n)(t.name,r,t.x,t.y+n.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:`text`},n),r.lower()},`drawBox`),be=t(function(e){return e.append(`g`)},`anchorElement`),xe=t(function(e,t,n,r,i,a,o){let{theme:s,themeVariables:c}=r,{bkgColorArray:l,borderColorArray:u,mainBkg:d}=c,f=j(),p=t.anchored,m=t.actor;f.x=t.startx,f.y=t.starty,f.class=`activation`+i%3,f.width=t.stopx-t.startx,f.height=n-t.starty;let h=W(p,f),g=(o??new Map([...a.db.getActors().values()].map((e,t)=>[e.name,t]))).get(m)??0;U.has(s)&&(h.style(`stroke`,u[g%u.length]),h.style(`fill`,l[g%u.length]??d))},`drawActivation`),Se=t(async function(e,n,r,a,o){let{boxMargin:s,boxTextMargin:c,labelBoxHeight:l,labelBoxWidth:u,messageFontFamily:d,messageFontSize:f,messageFontWeight:p}=a,m=e.append(`g`).attr(`data-et`,`control-structure`).attr(`data-id`,`i`+o.id),h=t(function(e,t,n,r){return m.append(`line`).attr(`x1`,e).attr(`y1`,t).attr(`x2`,n).attr(`y2`,r).attr(`class`,`loopLine`)},`drawLoopLine`);h(n.startx,n.starty,n.stopx,n.starty),h(n.stopx,n.starty,n.stopx,n.stopy),h(n.startx,n.stopy,n.stopx,n.stopy),h(n.startx,n.starty,n.startx,n.stopy),n.sections!==void 0&&n.sections.forEach(function(e){h(n.startx,e.y,n.stopx,e.y).style(`stroke-dasharray`,`3, 3`)});let g=k();g.text=r,g.x=n.startx,g.y=n.starty,g.fontFamily=d,g.fontSize=f,g.fontWeight=p,g.anchor=`middle`,g.valign=`middle`,g.tspan=!1,g.width=Math.max(u??0,50),g.height=l+(a.look===`neo`?15:0)||20,g.textMargin=c,g.class=`labelText`,ce(m,g),g=Ae(),g.text=n.title,g.x=n.startx+u/2+(n.stopx-n.startx)/2,g.y=n.starty+s+c,g.anchor=`middle`,g.valign=`middle`,g.textMargin=c,g.class=`loopText`,g.fontFamily=d,g.fontSize=f,g.fontWeight=p,g.wrap=!0;let _=i(g.text)?await se(m,g,n):G(m,g);if(n.sectionTitles!==void 0){for(let[e,t]of Object.entries(n.sectionTitles))if(t.message){g.text=t.message,g.x=n.startx+(n.stopx-n.startx)/2,g.y=n.sections[e].y+s+c,g.class=`loopText`,g.anchor=`middle`,g.valign=`middle`,g.tspan=!1,g.fontFamily=d,g.fontSize=f,g.fontWeight=p,g.wrap=n.wrap,i(g.text)?(n.starty=n.sections[e].y,await se(m,g,n)):G(m,g);let r=Math.round(_.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));n.sections[e].height+=r-(s+c)}}return n.height=Math.round(n.stopy-n.starty),m},`drawLoop`),Ce=t(function(e,t){D(e,t)},`drawBackgroundRect`),q=t(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-database`).attr(`fill-rule`,`evenodd`).attr(`clip-rule`,`evenodd`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z`)},`insertDatabaseIcon`),J=t(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-computer`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z`)},`insertComputerIcon`),we=t(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-clock`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z`)},`insertClockIcon`),Te=t(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowhead`).attr(`refX`,7.9).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M -1 0 L 10 5 L 0 10 z`)},`insertArrowHead`),Ee=t(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-filled-head`).attr(`refX`,15.5).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`insertArrowFilledHead`),De=t(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-sequencenumber`).attr(`refX`,15).attr(`refY`,15).attr(`markerWidth`,60).attr(`markerHeight`,40).attr(`orient`,`auto`).append(`circle`).attr(`cx`,15).attr(`cy`,15).attr(`r`,6)},`insertSequenceNumber`),Oe=t(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-crosshead`).attr(`markerWidth`,15).attr(`markerHeight`,8).attr(`orient`,`auto`).attr(`refX`,4).attr(`refY`,4.5).append(`path`).attr(`fill`,`none`).attr(`stroke`,`#000000`).style(`stroke-dasharray`,`0, 0`).attr(`stroke-width`,`1pt`).attr(`d`,`M 1,2 L 6,7 M 6,2 L 1,7`)},`insertArrowCrossHead`),ke=t(function(e,t){let{theme:n}=t;e.append(`defs`).append(`filter`).attr(`id`,`drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${n===`redux`||n===`redux-color`?`#000000`:`#FFFFFF`}`)},`insertDropShadow`),Ae=t(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:`#666`,width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},`getTextObj`),je=t(function(){return{x:0,y:0,fill:`#EDF2AE`,stroke:`#666`,width:100,anchor:`start`,height:100,rx:0,ry:0}},`getNoteRect`),Y=(function(){function e(e,t,n,r,i,a,s){o(t.append(`text`).attr(`x`,n+i/2).attr(`y`,r+a/2+5).style(`text-anchor`,`middle`).text(e),s)}t(e,`byText`);function n(e,t,n,i,a,s,c,l){let{actorFontSize:d,actorFontFamily:f,actorFontWeight:p}=l,[m,h]=r(d),g=e.split(u.lineBreakRegex);for(let e=0;e<g.length;e++){let r=e*m-m*(g.length-1)/2,l=t.append(`text`).attr(`x`,n+a/2).attr(`y`,i).style(`text-anchor`,`middle`).style(`font-size`,h).style(`font-weight`,p).style(`font-family`,f);l.append(`tspan`).attr(`x`,n+a/2).attr(`dy`,r).text(g[e]),l.attr(`y`,i+s/2).attr(`dominant-baseline`,`central`).attr(`alignment-baseline`,`central`),o(l,c)}}t(n,`byTspan`);function i(e,t,r,i,a,s,c,l){let u=t.append(`switch`),d=u.append(`foreignObject`).attr(`x`,r).attr(`y`,i).attr(`width`,a).attr(`height`,s).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);d.append(`div`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),n(e,u,r,i,a,s,c,l),o(d,c)}t(i,`byFo`);async function a(e,t,r,i,a,s,c,u){let f=await l(e,d()),m=t.append(`switch`),h=m.append(`foreignObject`).attr(`x`,r+a/2-f.width/2).attr(`y`,i+s/2-f.height/2).attr(`width`,f.width).attr(`height`,f.height).append(`xhtml:div`).style(`height`,`100%`).style(`width`,`100%`);h.append(`div`).style(`text-align`,`center`).style(`vertical-align`,`middle`).html(await p(e,d())),n(e,m,r,i,a,s,c,u),o(h,c)}t(a,`byKatex`);function o(e,t){for(let n in t)t.hasOwnProperty(n)&&e.attr(n,t[n])}return t(o,`_setTextAttrs`),function(t,r=!1){return r?a:t.textPlacement===`fo`?i:t.textPlacement===`old`?e:n}})(),Me=(function(){function e(e,t,n,r,a,o,s){i(t.append(`text`).attr(`x`,n).attr(`y`,r).style(`text-anchor`,`start`).text(e),s)}t(e,`byText`);function n(e,t,n,r,a,o,s,c){let{actorFontSize:l,actorFontFamily:d,actorFontWeight:f}=c,p=e.split(u.lineBreakRegex);for(let e=0;e<p.length;e++){let a=e*l-l*(p.length-1)/2,c=t.append(`text`).attr(`x`,n).attr(`y`,r).style(`text-anchor`,`start`).style(`font-size`,l).style(`font-weight`,f).style(`font-family`,d);c.append(`tspan`).attr(`x`,n).attr(`dy`,a).text(p[e]),c.attr(`y`,r+o/2).attr(`dominant-baseline`,`central`).attr(`alignment-baseline`,`central`),i(c,s)}}t(n,`byTspan`);function r(e,t,r,a,o,s,c,l){let u=t.append(`switch`),d=u.append(`foreignObject`).attr(`x`,r).attr(`y`,a).attr(`width`,o).attr(`height`,s).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);d.append(`div`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),n(e,u,r,a,o,s,c,l),i(d,c)}t(r,`byFo`);function i(e,t){for(let n in t)t.hasOwnProperty(n)&&e.attr(n,t[n])}return t(i,`_setTextAttrs`),function(t){return t.textPlacement===`fo`?r:t.textPlacement===`old`?e:n}})(),Ne=t(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-solidTopArrowHead`).attr(`refX`,7.9).attr(`refY`,7.25).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 8 L 0 8 z`)},`insertSolidTopArrowHead`),Pe=t(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-solidBottomArrowHead`).attr(`refX`,7.9).attr(`refY`,.75).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 0 L 0 8 z`)},`insertSolidBottomArrowHead`),Fe=t(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-stickTopArrowHead`).attr(`refX`,7.5).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 7 7`).attr(`stroke`,`black`).attr(`stroke-width`,1.5).attr(`fill`,`none`)},`insertStickTopArrowHead`),Ie=t(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-stickBottomArrowHead`).attr(`refX`,7.5).attr(`refY`,0).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 7 L 7 0`).attr(`stroke`,`black`).attr(`stroke-width`,1.5).attr(`fill`,`none`)},`insertStickBottomArrowHead`),X={drawRect:W,drawText:G,drawLabel:ce,drawActor:ve,drawBox:ye,drawPopup:ae,anchorElement:be,drawActivation:xe,drawLoop:Se,drawBackgroundRect:Ce,insertArrowHead:Te,insertArrowFilledHead:Ee,insertSequenceNumber:De,insertArrowCrossHead:Oe,insertDatabaseIcon:q,insertComputerIcon:J,insertClockIcon:we,getTextObj:Ae,getNoteRect:je,fixLifeLineHeights:le,sanitizeUrl:re.sanitizeUrl,insertDropShadow:ke,insertSolidTopArrowHead:Ne,insertSolidBottomArrowHead:Pe,insertStickTopArrowHead:Fe,insertStickBottomArrowHead:Ie},Z={},Q={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:t(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(e=>e.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},`getHeight`),clear:t(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},`clear`),addBox:t(function(e){this.boxes.push(e)},`addBox`),addActor:t(function(e){this.actors.push(e)},`addActor`),addLoop:t(function(e){this.loops.push(e)},`addLoop`),addMessage:t(function(e){this.messages.push(e)},`addMessage`),addNote:t(function(e){this.notes.push(e)},`addNote`),lastActor:t(function(){return this.actors[this.actors.length-1]},`lastActor`),lastLoop:t(function(){return this.loops[this.loops.length-1]},`lastLoop`),lastMessage:t(function(){return this.messages[this.messages.length-1]},`lastMessage`),lastNote:t(function(){return this.notes[this.notes.length-1]},`lastNote`),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:t(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,qe(x())},`init`),updateVal:t(function(e,t,n,r){e[t]===void 0?e[t]=n:e[t]=r(n,e[t])},`updateVal`),updateBounds:t(function(e,n,r,i){let a=this,o=0;function s(s){return t(function(t){o++;let c=a.sequenceItems.length-o+1;a.updateVal(t,`starty`,n-c*Z.boxMargin,Math.min),a.updateVal(t,`stopy`,i+c*Z.boxMargin,Math.max),a.updateVal(Q.data,`startx`,e-c*Z.boxMargin,Math.min),a.updateVal(Q.data,`stopx`,r+c*Z.boxMargin,Math.max),s!==`activation`&&(a.updateVal(t,`startx`,e-c*Z.boxMargin,Math.min),a.updateVal(t,`stopx`,r+c*Z.boxMargin,Math.max),a.updateVal(Q.data,`starty`,n-c*Z.boxMargin,Math.min),a.updateVal(Q.data,`stopy`,i+c*Z.boxMargin,Math.max))},`updateItemBounds`)}t(s,`updateFn`),this.sequenceItems.forEach(s()),this.activations.forEach(s(`activation`))},`updateBounds`),insert:t(function(e,t,n,r){let i=u.getMin(e,n),a=u.getMax(e,n),o=u.getMin(t,r),s=u.getMax(t,r);this.updateVal(Q.data,`startx`,i,Math.min),this.updateVal(Q.data,`starty`,o,Math.min),this.updateVal(Q.data,`stopx`,a,Math.max),this.updateVal(Q.data,`stopy`,s,Math.max),this.updateBounds(i,o,a,s)},`insert`),newActivation:t(function(e,t,n){let r=n.get(e.from),i=Je(e.from).length||0,a=r.x+r.width/2+(i-1)*Z.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+Z.activationWidth,stopy:void 0,actor:e.from,anchored:X.anchorElement(t)})},`newActivation`),endActivation:t(function(e){let t=this.activations.map(function(e){return e.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},`endActivation`),createLoop:t(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},`createLoop`),newLoop:t(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},`newLoop`),endLoop:t(function(){return this.sequenceItems.pop()},`endLoop`),isLoopOverlap:t(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},`isLoopOverlap`),addSectionToLoop:t(function(e){let t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:Q.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},`addSectionToLoop`),saveVerticalPos:t(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},`saveVerticalPos`),resetVerticalPos:t(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},`resetVerticalPos`),bumpVerticalPos:t(function(e){this.verticalPos+=e,this.data.stopy=u.getMax(this.data.stopy,this.verticalPos)},`bumpVerticalPos`),getVerticalPos:t(function(){return this.verticalPos},`getVerticalPos`),getBounds:t(function(){return{bounds:this.data,models:this.models}},`getBounds`)},Le=t(async function(e,t,n){Q.bumpVerticalPos(Z.boxMargin),t.height=Z.boxMargin,t.starty=Q.getVerticalPos();let r=j();r.x=t.startx,r.y=t.starty,r.width=t.width||Z.width,r.class=`note`;let a=e.append(`g`);a.attr(`data-et`,`note`),a.attr(`data-id`,`i`+n);let o=X.drawRect(a,r),s=k();s.x=t.startx,s.y=t.starty,s.width=r.width,s.dy=`1em`,s.text=t.message,s.class=`noteText`,s.fontFamily=Z.noteFontFamily,s.fontSize=Z.noteFontSize,s.fontWeight=Z.noteFontWeight,s.anchor=Z.noteAlign,s.textMargin=Z.noteMargin,s.valign=`center`;let c=i(s.text)?await se(a,s):G(a,s),l=Math.round(c.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));o.attr(`height`,l+2*Z.noteMargin),t.height+=l+2*Z.noteMargin,Q.bumpVerticalPos(l+2*Z.noteMargin),t.stopy=t.starty+l+2*Z.noteMargin,t.stopx=t.startx+r.width,Q.insert(t.startx,t.starty,t.stopx,t.stopy),Q.models.addNote(t)},`drawNote`),Re=t(function(e,n,r,i,a,o,s){let c=i.db.getActors(),l=c.get(n.from),u=c.get(n.to),d=r.sequenceVisible,f=l.x+l.width/2,p=u.x+u.width/2,m=f<=p,h=ot(n,i),g=e.append(`g`),_=16.5,v=t((e,t)=>{let n=e?_:-_;return t?-n:n},`getCircleOffset`),y=t(e=>{g.append(`circle`).attr(`cx`,e).attr(`cy`,s).attr(`r`,5).attr(`width`,10).attr(`height`,10)},`drawCircle`),{CENTRAL_CONNECTION:b,CENTRAL_CONNECTION_REVERSE:x,CENTRAL_CONNECTION_DUAL:S}=i.db.LINETYPE;if(d)switch(n.centralConnection){case b:h&&(p+=v(m,!0));break;case x:h||(f+=v(m,!1));break;case S:h?p+=v(m,!0):f+=v(m,!1);break}switch(n.centralConnection){case b:y(p);break;case x:y(f);break;case S:y(f),y(p);break}},`drawCentralConnection`),ze=t(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),`messageFont`),Be=t(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),`noteFont`),Ve=t(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),`actorFont`);async function He(e,t){Q.bumpVerticalPos(10);let{startx:n,stopx:r,message:a}=t,s=u.splitBreaks(a).length,c=i(a),d=c?await l(a,x()):o.calculateTextDimensions(a,ze(Z));if(!c){let e=d.height/s;t.height+=e,Q.bumpVerticalPos(e)}let f,p=d.height-10,m=d.width;if(n===r){f=Q.getVerticalPos()+p,Z.rightAngles||(p+=Z.boxMargin,f=Q.getVerticalPos()+p),p+=30;let e=u.getMax(m/2,Z.width/2);Q.insert(n-e,Q.getVerticalPos()-10+p,r+e,Q.getVerticalPos()+30+p)}else p+=Z.boxMargin,f=Q.getVerticalPos()+p,Q.insert(n,f-10,r,f);return Q.bumpVerticalPos(p),t.height+=p,t.stopy=t.starty+t.height,Q.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),f}t(He,`boundMessage`);var Ue=t(async function(e,t,n,r,a,s){let{startx:c,stopx:l,starty:d,message:f,type:p,sequenceIndex:m,sequenceVisible:h}=t,g=o.calculateTextDimensions(f,ze(Z)),_=k();_.x=c,_.y=d+10,_.width=l-c,_.class=`messageText`,_.dy=`1em`,_.text=f,_.fontFamily=Z.messageFontFamily,_.fontSize=Z.messageFontSize,_.fontWeight=Z.messageFontWeight,_.anchor=Z.messageAlign,_.valign=`center`,_.textMargin=Z.wrapPadding,_.tspan=!1,i(_.text)?await se(e,_,{startx:c,stopx:l,starty:n}):G(e,_);let v=g.width,y;if(c===l){let i=h||Z.showSequenceNumbers,o=ot(a,r),s=st(a,r),d=c+(i&&(o||s)?10:0);y=Z.rightAngles?e.append(`path`).attr(`d`,`M ${d},${n} H ${c+u.getMax(Z.width/2,v/2)} V ${n+25} H ${c}`):e.append(`path`).attr(`d`,`M `+d+`,`+n+` C `+(d+60)+`,`+(n-10)+` `+(c+60)+`,`+(n+30)+` `+c+`,`+(n+20)),it(a,r)&&Re(e,a,t,r,c,l,n)}else y=e.append(`line`),y.attr(`x1`,c),y.attr(`y1`,n),y.attr(`x2`,l),y.attr(`y2`,n),it(a,r)&&Re(e,a,t,r,c,l,n);p===r.db.LINETYPE.DOTTED||p===r.db.LINETYPE.DOTTED_CROSS||p===r.db.LINETYPE.DOTTED_POINT||p===r.db.LINETYPE.DOTTED_OPEN||p===r.db.LINETYPE.BIDIRECTIONAL_DOTTED||p===r.db.LINETYPE.SOLID_TOP_DOTTED||p===r.db.LINETYPE.SOLID_BOTTOM_DOTTED||p===r.db.LINETYPE.STICK_TOP_DOTTED||p===r.db.LINETYPE.STICK_BOTTOM_DOTTED||p===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||p===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||p===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||p===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(y.style(`stroke-dasharray`,`3, 3`),y.attr(`class`,`messageLine1`)):y.attr(`class`,`messageLine0`),y.attr(`data-et`,`message`),y.attr(`data-id`,`i`+t.id),y.attr(`data-from`,t.from),y.attr(`data-to`,t.to);let b=``;if(Z.arrowMarkerAbsolute&&(b=S(!0)),y.attr(`stroke-width`,2),y.attr(`stroke`,`none`),y.style(`fill`,`none`),(p===r.db.LINETYPE.SOLID_TOP||p===r.db.LINETYPE.SOLID_TOP_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+s+`-solidTopArrowHead)`),(p===r.db.LINETYPE.SOLID_BOTTOM||p===r.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+s+`-solidBottomArrowHead)`),(p===r.db.LINETYPE.STICK_TOP||p===r.db.LINETYPE.STICK_TOP_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+s+`-stickTopArrowHead)`),(p===r.db.LINETYPE.STICK_BOTTOM||p===r.db.LINETYPE.STICK_BOTTOM_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+s+`-stickBottomArrowHead)`),(p===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||p===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+s+`-solidBottomArrowHead)`),(p===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||p===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+s+`-solidTopArrowHead)`),(p===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||p===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+s+`-stickBottomArrowHead)`),(p===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||p===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+s+`-stickTopArrowHead)`),(p===r.db.LINETYPE.SOLID||p===r.db.LINETYPE.DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+s+`-arrowhead)`),(p===r.db.LINETYPE.BIDIRECTIONAL_SOLID||p===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(y.attr(`marker-start`,`url(`+b+`#`+s+`-arrowhead)`),y.attr(`marker-end`,`url(`+b+`#`+s+`-arrowhead)`)),(p===r.db.LINETYPE.SOLID_POINT||p===r.db.LINETYPE.DOTTED_POINT)&&y.attr(`marker-end`,`url(`+b+`#`+s+`-filled-head)`),(p===r.db.LINETYPE.SOLID_CROSS||p===r.db.LINETYPE.DOTTED_CROSS)&&y.attr(`marker-end`,`url(`+b+`#`+s+`-crosshead)`),h||Z.showSequenceNumbers){let i=p===r.db.LINETYPE.BIDIRECTIONAL_SOLID||p===r.db.LINETYPE.BIDIRECTIONAL_DOTTED,o=p===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||p===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||p===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||p===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||p===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||p===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||p===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||p===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,u=it(a,r),d=c,f=l;i?(c<l?d=c+12:(d=c-6+(u?-5:0),d+=a?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||a?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),y.attr(`x1`,d)):o?(l>c?f=l-12:(f=l-6,d+=a?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||a?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),f+=u?15:0,y.attr(`x2`,f),y.attr(`x1`,d)):y.attr(`x1`,c+6);let h=0,g=c===l,_=c<=l;h=g?t.fromBounds+1:o?_?t.toBounds-1:t.fromBounds+1:_?t.fromBounds+1:t.toBounds-1,e.append(`line`).attr(`x1`,h).attr(`y1`,n).attr(`x2`,h).attr(`y2`,n).attr(`stroke-width`,0).attr(`marker-start`,`url(`+b+`#`+s+`-sequencenumber)`),e.append(`text`).attr(`x`,h).attr(`y`,n+4).attr(`font-family`,`sans-serif`).attr(`font-size`,`12px`).attr(`text-anchor`,`middle`).attr(`class`,`sequenceNumber`).text(m)}},`drawMessage`),We=t(function(e,t,n,r,i,a,o){let s=0,c=0,l,d=0;for(let e of r){let r=t.get(e),a=r.box;l&&l!=a&&(o||Q.models.addBox(l),c+=Z.boxMargin+l.margin),a&&a!=l&&(o||(a.x=s+c,a.y=i),c+=a.margin),r.width=u.getMax(r.width||Z.width,Z.width),r.height=u.getMax(r.height||Z.height,Z.height),r.margin=r.margin||Z.actorMargin,d=u.getMax(d,r.height),n.get(r.name)&&(c+=r.width/2),r.x=s+c,r.starty=Q.getVerticalPos(),Q.insert(r.x,i,r.x+r.width,r.height),s+=r.width+c,r.box&&(r.box.width=s+a.margin-r.box.x),c=r.margin,l=r.box,Q.models.addActor(r)}l&&!o&&Q.models.addBox(l),Q.bumpVerticalPos(d)},`addActorRenderingData`),Ge=t(async function(e,t,n,r,i,a,o){if(r){let r=0;Q.bumpVerticalPos(Z.boxMargin*2);for(let s of n){let n=t.get(s);n.stopy||=Q.getVerticalPos();let c=await X.drawActor(e,n,Z,!0,i,a,o);r=u.getMax(r,c)}Q.bumpVerticalPos(r+Z.boxMargin)}else for(let r of n){let n=t.get(r);await X.drawActor(e,n,Z,!1,i,a,o)}},`drawActors`),Ke=t(function(e,t,n,r){let i=0,a=0;for(let o of n){let n=t.get(o),s=$e(n),c=X.drawPopup(e,n,s,Z,Z.forceMenus,r);c.height>i&&(i=c.height),c.width+n.x>a&&(a=c.width+n.x)}return{maxHeight:i,maxWidth:a}},`drawActorsPopup`),qe=t(function(e){m(Z,e),e.fontFamily&&(Z.actorFontFamily=Z.noteFontFamily=Z.messageFontFamily=e.fontFamily),e.fontSize&&(Z.actorFontSize=Z.noteFontSize=Z.messageFontSize=e.fontSize),e.fontWeight&&(Z.actorFontWeight=Z.noteFontWeight=Z.messageFontWeight=e.fontWeight)},`setConf`),Je=t(function(e){return Q.activations.filter(function(t){return t.actor===e})},`actorActivations`),Ye=t(function(e,t){let n=t.get(e),r=Je(e);return[r.reduce(function(e,t){return u.getMin(e,t.startx)},n.x+n.width/2-1),r.reduce(function(e,t){return u.getMax(e,t.stopx)},n.x+n.width/2+1)]},`activationBounds`);function $(e,t,n,r,i){Q.bumpVerticalPos(n);let a=r;if(t.id&&t.message&&e[t.id]){let n=e[t.id].width,i=ze(Z);t.message=o.wrapLabel(`[${t.message}]`,n-2*Z.wrapPadding,i),t.width=n,t.wrap=!0;let s=o.calculateTextDimensions(t.message,i),c=u.getMax(s.height,Z.labelBoxHeight);a=r+c,w.debug(`${c} - ${t.message}`)}i(t),Q.bumpVerticalPos(a)}t($,`adjustLoopHeightForWrap`);function Xe(e,n,r,i,a,o,s){function c(t,r){t.x<a.get(e.from).x?(Q.insert(n.stopx-r,n.starty,n.startx,n.stopy+t.height/2+Z.noteMargin),n.stopx+=r):(Q.insert(n.startx,n.starty,n.stopx+r,n.stopy+t.height/2+Z.noteMargin),n.stopx-=r)}t(c,`receiverAdjustment`);function l(t,r){t.x<a.get(e.to).x?(Q.insert(n.startx-r,n.starty,n.stopx,n.stopy+t.height/2+Z.noteMargin),n.startx+=r):(Q.insert(n.stopx,n.starty,n.startx+r,n.stopy+t.height/2+Z.noteMargin),n.startx-=r)}t(l,`senderAdjustment`);let u=[R.ACTOR,R.CONTROL,R.ENTITY,R.DATABASE];if(o.get(e.to)==i){let t=a.get(e.to);c(t,u.includes(t.type)?z/2+3:t.width/2+3),t.starty=r-t.height/2,Q.bumpVerticalPos(t.height/2)}else if(s.get(e.from)==i){let t=a.get(e.from);Z.mirrorActors&&l(t,u.includes(t.type)?z/2:t.width/2),t.stopy=r-t.height/2,Q.bumpVerticalPos(t.height/2)}else if(s.get(e.to)==i){let t=a.get(e.to);Z.mirrorActors&&c(t,u.includes(t.type)?z/2+3:t.width/2+3),t.stopy=r-t.height/2,Q.bumpVerticalPos(t.height/2)}}t(Xe,`adjustCreatedDestroyedData`);var Ze=t(async function(e,n,r,i){let{securityLevel:a,sequence:o,look:s}=x();Z=o;let c;a===`sandbox`&&(c=f(`#i`+n));let l=f(a===`sandbox`?c.nodes()[0].contentDocument.body:`body`),u=a===`sandbox`?c.nodes()[0].contentDocument:document;Q.init(),w.debug(i.db);let d=a===`sandbox`?l.select(`[id="${n}"]`):f(`[id="${n}"]`),p=i.db.getActors(),m=i.db.getCreatedActors(),h=i.db.getDestroyedActors(),g=i.db.getBoxes(),_=i.db.getActorKeys(),v=i.db.getMessages(),y=i.db.getDiagramTitle(),b=i.db.hasAtLeastOneBox(),S=i.db.hasAtLeastOneBoxWithTitle(),C=await Qe(p,v,i);if(Z.height=await et(p,C,g),X.insertComputerIcon(d,n),X.insertDatabaseIcon(d,n),X.insertClockIcon(d,n),b&&(Q.bumpVerticalPos(Z.boxMargin),S&&Q.bumpVerticalPos(g[0].textMaxHeight)),Z.hideUnusedParticipants===!0){let e=new Set;v.forEach(t=>{e.add(t.from),e.add(t.to)}),_=_.filter(t=>e.has(t))}let T=new Map(_.map((e,t)=>[p.get(e)?.name??e,t]));We(d,p,m,_,0,v,!1);let D=await lt(v,p,C,i);X.insertArrowHead(d,n),X.insertArrowCrossHead(d,n),X.insertArrowFilledHead(d,n),X.insertSequenceNumber(d,n),X.insertSolidTopArrowHead(d,n),X.insertSolidBottomArrowHead(d,n),X.insertStickTopArrowHead(d,n),X.insertStickBottomArrowHead(d,n),s===`neo`&&X.insertDropShadow(d,Z);function O(e,t){let n=Q.endActivation(e);n.starty+18>t&&(n.starty=t-6,t+=12),X.drawActivation(d,n,t,Z,Je(e.from).length,i,T),Q.insert(n.startx,t-10,n.stopx,t)}t(O,`activeEnd`);let k=1,A=1,j=[],M=[],N=0;for(let e of v){let t,n,r;switch(e.type){case i.db.LINETYPE.NOTE:Q.resetVerticalPos(),n=e.noteModel,await Le(d,n,e.id);break;case i.db.LINETYPE.ACTIVE_START:Q.newActivation(e,d,p);break;case i.db.LINETYPE.CENTRAL_CONNECTION:Q.newActivation(e,d,p);break;case i.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:Q.newActivation(e,d,p);break;case i.db.LINETYPE.ACTIVE_END:O(e,Q.getVerticalPos());break;case i.db.LINETYPE.LOOP_START:$(D,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case i.db.LINETYPE.LOOP_END:t=Q.endLoop(),await X.drawLoop(d,t,`loop`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;case i.db.LINETYPE.RECT_START:$(D,e,Z.boxMargin,Z.boxMargin,e=>Q.newLoop(void 0,e.message));break;case i.db.LINETYPE.RECT_END:t=Q.endLoop(),M.push(t),Q.models.addLoop(t),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos());break;case i.db.LINETYPE.OPT_START:$(D,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case i.db.LINETYPE.OPT_END:t=Q.endLoop(),await X.drawLoop(d,t,`opt`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;case i.db.LINETYPE.ALT_START:$(D,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case i.db.LINETYPE.ALT_ELSE:$(D,e,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case i.db.LINETYPE.ALT_END:t=Q.endLoop(),await X.drawLoop(d,t,`alt`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:$(D,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e)),Q.saveVerticalPos();break;case i.db.LINETYPE.PAR_AND:$(D,e,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case i.db.LINETYPE.PAR_END:t=Q.endLoop(),await X.drawLoop(d,t,`par`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;case i.db.LINETYPE.AUTONUMBER:k=e.message.start||k,A=e.message.step||A,e.message.visible?i.db.enableSequenceNumbers():i.db.disableSequenceNumbers();break;case i.db.LINETYPE.CRITICAL_START:$(D,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case i.db.LINETYPE.CRITICAL_OPTION:$(D,e,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case i.db.LINETYPE.CRITICAL_END:t=Q.endLoop(),await X.drawLoop(d,t,`critical`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;case i.db.LINETYPE.BREAK_START:$(D,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case i.db.LINETYPE.BREAK_END:t=Q.endLoop(),await X.drawLoop(d,t,`break`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;default:try{r=e.msgModel,r.starty=Q.getVerticalPos(),r.sequenceIndex=k,r.sequenceVisible=i.db.showSequenceNumbers(),r.id=e.id,r.from=e.from,r.to=e.to;let t=await He(d,r);Xe(e,r,t,N,p,m,h),j.push({messageModel:r,lineStartY:t,msg:e}),Q.models.addMessage(r)}catch(e){w.error(`error while drawing message`,e)}}[i.db.LINETYPE.SOLID_OPEN,i.db.LINETYPE.DOTTED_OPEN,i.db.LINETYPE.SOLID,i.db.LINETYPE.SOLID_TOP,i.db.LINETYPE.SOLID_BOTTOM,i.db.LINETYPE.STICK_TOP,i.db.LINETYPE.STICK_BOTTOM,i.db.LINETYPE.SOLID_TOP_DOTTED,i.db.LINETYPE.SOLID_BOTTOM_DOTTED,i.db.LINETYPE.STICK_TOP_DOTTED,i.db.LINETYPE.STICK_BOTTOM_DOTTED,i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,i.db.LINETYPE.STICK_ARROW_TOP_REVERSE,i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,i.db.LINETYPE.DOTTED,i.db.LINETYPE.SOLID_CROSS,i.db.LINETYPE.DOTTED_CROSS,i.db.LINETYPE.SOLID_POINT,i.db.LINETYPE.DOTTED_POINT,i.db.LINETYPE.BIDIRECTIONAL_SOLID,i.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type)&&(k+=A),N++}w.debug(`createdActors`,m),w.debug(`destroyedActors`,h),await Ge(d,p,_,!1,n,i,T);for(let e of j)await Ue(d,e.messageModel,e.lineStartY,i,e.msg,n);Z.mirrorActors&&await Ge(d,p,_,!0,n,i,T),M.forEach(e=>X.drawBackgroundRect(d,e)),le(d,p,_,Z);for(let e of Q.models.boxes){e.height=Q.getVerticalPos()-e.y,Q.insert(e.x,e.y,e.x+e.width,e.height);let t=Z.boxMargin*2;e.startx=e.x-t,e.starty=e.y-t*.25,e.stopx=e.startx+e.width+2*t,e.stopy=e.starty+e.height+t*.75,e.stroke=`rgb(0,0,0, 0.5)`,X.drawBox(d,e,Z)}b&&Q.bumpVerticalPos(Z.boxMargin);let P=Ke(d,p,_,u),{bounds:F}=Q.getBounds();F.startx===void 0&&(F.startx=0),F.starty===void 0&&(F.starty=0),F.stopx===void 0&&(F.stopx=0),F.stopy===void 0&&(F.stopy=0);let I=F.stopy-F.starty;I<P.maxHeight&&(I=P.maxHeight);let L=I+2*Z.diagramMarginY;Z.mirrorActors&&(L=L-Z.boxMargin+Z.bottomMarginAdj);let ee=F.stopx-F.startx;ee<P.maxWidth&&(ee=P.maxWidth);let R=ee+2*Z.diagramMarginX;y&&d.append(`text`).text(y).attr(`x`,(F.stopx-F.startx)/2-2*Z.diagramMarginX).attr(`y`,-25),E(d,L,R,Z.useMaxWidth);let te=y?40:0,ne=p.size&&s===`neo`?30:0;d.attr(`viewBox`,F.startx-Z.diagramMarginX+` -`+(Z.diagramMarginY+te)+` `+R+` `+(L+te+ne)),w.debug(`models:`,Q.models)},`draw`);async function Qe(e,t,n){let r={};for(let a of t)if(e.get(a.to)&&e.get(a.from)){let t=e.get(a.to);if(a.placement===n.db.PLACEMENT.LEFTOF&&!t.prevActor||a.placement===n.db.PLACEMENT.RIGHTOF&&!t.nextActor)continue;let s=a.placement!==void 0,c=!s,d=s?Be(Z):ze(Z),f=a.wrap?o.wrapLabel(a.message,Z.width-2*Z.wrapPadding,d):a.message,p=(i(f)?await l(a.message,x()):o.calculateTextDimensions(f,d)).width+2*Z.wrapPadding;c&&a.from===t.nextActor?r[a.to]=u.getMax(r[a.to]||0,p):c&&a.from===t.prevActor?r[a.from]=u.getMax(r[a.from]||0,p):c&&a.from===a.to?(r[a.from]=u.getMax(r[a.from]||0,p/2),r[a.to]=u.getMax(r[a.to]||0,p/2)):a.placement===n.db.PLACEMENT.RIGHTOF?r[a.from]=u.getMax(r[a.from]||0,p):a.placement===n.db.PLACEMENT.LEFTOF?r[t.prevActor]=u.getMax(r[t.prevActor]||0,p):a.placement===n.db.PLACEMENT.OVER&&(t.prevActor&&(r[t.prevActor]=u.getMax(r[t.prevActor]||0,p/2)),t.nextActor&&(r[a.from]=u.getMax(r[a.from]||0,p/2)))}return w.debug(`maxMessageWidthPerActor:`,r),r}t(Qe,`getMaxMessageWidthPerActor`);var $e=t(function(e){let t=0,n=Ve(Z);for(let r in e.links){let e=o.calculateTextDimensions(r,n).width+2*Z.wrapPadding+2*Z.boxMargin;t<e&&(t=e)}return t},`getRequiredPopupWidth`);async function et(e,t,n){let r=0;for(let t of e.keys()){let n=e.get(t);n.wrap&&(n.description=o.wrapLabel(n.description,Z.width-2*Z.wrapPadding,Ve(Z)));let a=i(n.description)?await l(n.description,x()):o.calculateTextDimensions(n.description,Ve(Z));n.width=n.wrap?Z.width:u.getMax(Z.width,a.width+2*Z.wrapPadding),n.height=n.wrap?u.getMax(a.height,Z.height):Z.height,r=u.getMax(r,n.height)}for(let n in t){let r=e.get(n);if(!r)continue;let i=e.get(r.nextActor);if(!i){let e=t[n]+Z.actorMargin-r.width/2;r.margin=u.getMax(e,Z.actorMargin);continue}let a=t[n]+Z.actorMargin-r.width/2-i.width/2;r.margin=u.getMax(a,Z.actorMargin)}let a=0;return n.forEach(t=>{let n=ze(Z),r=t.actorKeys.reduce((t,n)=>t+=e.get(n).width+(e.get(n).margin||0),0),i=Z.boxMargin*8;r+=i,r-=2*Z.boxTextMargin,t.wrap&&(t.name=o.wrapLabel(t.name,r-2*Z.wrapPadding,n));let s=o.calculateTextDimensions(t.name,n);a=u.getMax(s.height,a);let c=u.getMax(r,s.width+2*Z.wrapPadding);if(t.margin=Z.boxTextMargin,r<c){let e=(c-r)/2;t.margin+=e}}),n.forEach(e=>e.textMaxHeight=a),u.getMax(r,Z.height)}t(et,`calculateActorMargins`);var tt=t(async function(e,t,n){let r=t.get(e.from),a=t.get(e.to),s=r.x,c=a.x,d=e.wrap&&e.message,f=i(e.message)?await l(e.message,x()):o.calculateTextDimensions(d?o.wrapLabel(e.message,Z.width,Be(Z)):e.message,Be(Z)),p={width:d?Z.width:u.getMax(Z.width,f.width+2*Z.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===n.db.PLACEMENT.RIGHTOF?(p.width=d?u.getMax(Z.width,f.width):u.getMax(r.width/2+a.width/2,f.width+2*Z.noteMargin),p.startx=s+(r.width+Z.actorMargin)/2):e.placement===n.db.PLACEMENT.LEFTOF?(p.width=d?u.getMax(Z.width,f.width+2*Z.noteMargin):u.getMax(r.width/2+a.width/2,f.width+2*Z.noteMargin),p.startx=s-p.width+(r.width-Z.actorMargin)/2):e.to===e.from?(f=o.calculateTextDimensions(d?o.wrapLabel(e.message,u.getMax(Z.width,r.width),Be(Z)):e.message,Be(Z)),p.width=d?u.getMax(Z.width,r.width):u.getMax(r.width,Z.width,f.width+2*Z.noteMargin),p.startx=s+(r.width-p.width)/2):(p.width=Math.abs(s+r.width/2-(c+a.width/2))+Z.actorMargin,p.startx=s<c?s+r.width/2-Z.actorMargin/2:c+a.width/2-Z.actorMargin/2),d&&(p.message=o.wrapLabel(e.message,p.width-2*Z.wrapPadding,Be(Z))),w.debug(`NM:[${p.startx},${p.stopx},${p.starty},${p.stopy}:${p.width},${p.height}=${e.message}]`),p},`buildNoteModel`),nt=4,rt=6,it=t(function(e,t){let{CENTRAL_CONNECTION:n,CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i}=t.db.LINETYPE;return[n,r,i].includes(e.centralConnection)},`hasCentralConnection`),at=t(function(e,t,n){let{CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i,BIDIRECTIONAL_SOLID:a,BIDIRECTIONAL_DOTTED:o}=t.db.LINETYPE,s=0;return(e.centralConnection===r||e.centralConnection===i)&&(s+=nt),(e.centralConnection===r||e.centralConnection===i)&&(e.type===a||e.type===o)&&(s+=n?0:-rt),s},`calculateCentralConnectionOffset`),ot=t(function(e,t){let{SOLID_ARROW_TOP_REVERSE:n,SOLID_ARROW_TOP_REVERSE_DOTTED:r,SOLID_ARROW_BOTTOM_REVERSE:i,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:a,STICK_ARROW_TOP_REVERSE:o,STICK_ARROW_TOP_REVERSE_DOTTED:s,STICK_ARROW_BOTTOM_REVERSE:c,STICK_ARROW_BOTTOM_REVERSE_DOTTED:l}=t.db.LINETYPE;return[n,r,i,a,o,s,c,l].includes(e.type)},`isReverseArrowType`),st=t(function(e,t){let{BIDIRECTIONAL_SOLID:n,BIDIRECTIONAL_DOTTED:r}=t.db.LINETYPE;return[n,r].includes(e.type)},`isBidirectionalArrowType`),ct=t(function(e,n,r){let{look:i}=x();if(![r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.SOLID_TOP,r.db.LINETYPE.SOLID_BOTTOM,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.SOLID_TOP_DOTTED,r.db.LINETYPE.SOLID_BOTTOM_DOTTED,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type))return{};let[a,s]=Ye(e.from,n),[c,l]=Ye(e.to,n),d=a<=c,f=d?s:a,p=d?c:l;i===`neo`&&(e.type!==r.db.LINETYPE.SOLID_OPEN&&(p+=d?-3:3),(e.type===r.db.LINETYPE.BIDIRECTIONAL_SOLID||e.type===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(f+=d?3:-3)),f+=at(e,r,d);let m=Math.abs(c-l)>2,h=t(e=>d?-e:e,`adjustValue`);e.from===e.to?p=f:(e.activate&&!m&&(p+=h(Z.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)||(p+=h(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(f-=h(3)));let g=[a,s,c,l],_=Math.abs(f-p);e.wrap&&e.message&&(e.message=o.wrapLabel(e.message,u.getMax(_+2*Z.wrapPadding,Z.width),ze(Z)));let v=o.calculateTextDimensions(e.message,ze(Z));return{width:u.getMax(e.wrap?0:v.width+2*Z.wrapPadding,_+2*Z.wrapPadding,Z.width),height:0,startx:f,stopx:p,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,g),toBounds:Math.max.apply(null,g)}},`buildMessageModel`),lt=t(async function(e,t,n,r){let i={},a=[],o,s,c;for(let n of e){switch(n.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:a.push({id:n.id,msg:n.message,from:2**53-1,to:-(2**53-1),width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:n.message&&(o=a.pop(),i[o.id]=o,i[n.id]=o,a.push(o));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:o=a.pop(),i[o.id]=o;break;case r.db.LINETYPE.ACTIVE_START:{let e=t.get(n.from?n.from:n.to.actor),r=Je(n.from?n.from:n.to.actor).length,i=e.x+e.width/2+(r-1)*Z.activationWidth/2,a={startx:i,stopx:i+Z.activationWidth,actor:n.from,enabled:!0};Q.activations.push(a)}break;case r.db.LINETYPE.ACTIVE_END:{let e=Q.activations.map(e=>e.actor).lastIndexOf(n.from);Q.activations.splice(e,1).splice(0,1)}break}n.placement===void 0?(c=ct(n,t,r),n.msgModel=c,c.startx&&c.stopx&&a.length>0&&a.forEach(e=>{if(o=e,c.startx===c.stopx){let e=t.get(n.from),r=t.get(n.to);o.from=u.getMin(e.x-c.width/2,e.x-e.width/2,o.from),o.to=u.getMax(r.x+c.width/2,r.x+e.width/2,o.to),o.width=u.getMax(o.width,Math.abs(o.to-o.from))-Z.labelBoxWidth}else o.from=u.getMin(c.startx,o.from),o.to=u.getMax(c.stopx,o.to),o.width=u.getMax(o.width,c.width)-Z.labelBoxWidth})):(s=await tt(n,t,r),n.noteModel=s,a.forEach(e=>{o=e,o.from=u.getMin(o.from,s.startx),o.to=u.getMax(o.to,s.startx+s.width),o.width=u.getMax(o.width,Math.abs(o.from-o.to))-Z.labelBoxWidth}))}return Q.activations=[],w.debug(`Loop type widths:`,i),i},`calculateLoopBounds`),ut={parser:F,get db(){return new te},renderer:{bounds:Q,drawActors:Ge,drawActorsPopup:Ke,setConf:qe,draw:Ze},styles:ne,init:t(e=>{e.sequence||={},e.wrap&&(e.sequence.wrap=e.wrap,C({sequence:{wrap:e.wrap}}))},`init`)};export{ut as diagram};
@@ -0,0 +1 @@
1
+ import{t as e}from"./chunk-VELTKBKT-C9dVN39o.js";import{I as t,Rt as n,Sn as r,Vn as i,bn as a,mn as o,nn as s,qn as c,tn as l}from"./index-C_xK08EW.js";import"./chunk-H3VCZNTA-IchcISDt.js";import{t as u}from"./chunk-HN6EAY2L-D7ZFMNrB.js";import"./chunk-TBF5ZNIQ-DKtDz6ae.js";import"./chunk-RWUO3TPN-DYn1XriD.js";import{t as d}from"./chunk-3YCYZ6SJ-Blq_IzZs.js";import{n as f,r as p,t as m}from"./chunk-3GS5O3IE-jlWIjPsl.js";var h=e(e=>e.append(`circle`).attr(`class`,`start-state`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit).attr(`cy`,o().state.padding+o().state.sizeUnit),`drawStartState`),g=e(e=>e.append(`line`).style(`stroke`,`grey`).style(`stroke-dasharray`,`3`).attr(`x1`,o().state.textHeight).attr(`class`,`divider`).attr(`x2`,o().state.textHeight*2).attr(`y1`,0).attr(`y2`,0),`drawDivider`),_=e((e,t)=>{let n=e.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+2*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),r=n.node().getBBox();return e.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,r.width+2*o().state.padding).attr(`height`,r.height+2*o().state.padding).attr(`rx`,o().state.radius),n},`drawSimpleState`),v=e((t,n)=>{let r=e(function(e,t,n){let r=e.append(`tspan`).attr(`x`,2*o().state.padding).text(t);n||r.attr(`dy`,o().state.textHeight)},`addTspan`),i=t.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+1.3*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(n.descriptions[0]).node().getBBox(),a=i.height,s=t.append(`text`).attr(`x`,o().state.padding).attr(`y`,a+o().state.padding*.4+o().state.dividerMargin+o().state.textHeight).attr(`class`,`state-description`),c=!0,l=!0;n.descriptions.forEach(function(e){c||(r(s,e,l),l=!1),c=!1});let u=t.append(`line`).attr(`x1`,o().state.padding).attr(`y1`,o().state.padding+a+o().state.dividerMargin/2).attr(`y2`,o().state.padding+a+o().state.dividerMargin/2).attr(`class`,`descr-divider`),d=s.node().getBBox(),f=Math.max(d.width,i.width);return u.attr(`x2`,f+3*o().state.padding),t.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,f+2*o().state.padding).attr(`height`,d.height+a+2*o().state.padding).attr(`rx`,o().state.radius),t},`drawDescrState`),y=e((e,t,n)=>{let r=o().state.padding,i=2*o().state.padding,a=e.node().getBBox(),s=a.width,c=a.x,l=e.append(`text`).attr(`x`,0).attr(`y`,o().state.titleShift).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),u=l.node().getBBox().width+i,d=Math.max(u,s);d===s&&(d+=i);let f,p=e.node().getBBox();t.doc,f=c-r,u>s&&(f=(s-d)/2+r),Math.abs(c-p.x)<r&&u>s&&(f=c-(u-s)/2);let m=1-o().state.textHeight;return e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,m).attr(`class`,n?`alt-composit`:`composit`).attr(`width`,d).attr(`height`,p.height+o().state.textHeight+o().state.titleShift+1).attr(`rx`,`0`),l.attr(`x`,f+r),u<=s&&l.attr(`x`,c+(d-i)/2-u/2+r),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,o().state.textHeight*3).attr(`rx`,o().state.radius),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,p.height+3+2*o().state.textHeight).attr(`rx`,o().state.radius),e},`addTitleAndBox`),b=e(e=>(e.append(`circle`).attr(`class`,`end-state-outer`).attr(`r`,o().state.sizeUnit+o().state.miniPadding).attr(`cx`,o().state.padding+o().state.sizeUnit+o().state.miniPadding).attr(`cy`,o().state.padding+o().state.sizeUnit+o().state.miniPadding),e.append(`circle`).attr(`class`,`end-state-inner`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit+2).attr(`cy`,o().state.padding+o().state.sizeUnit+2)),`drawEndState`),x=e((e,t)=>{let n=o().state.forkWidth,r=o().state.forkHeight;if(t.parentId){let e=n;n=r,r=e}return e.append(`rect`).style(`stroke`,`black`).style(`fill`,`black`).attr(`width`,n).attr(`height`,r).attr(`x`,o().state.padding).attr(`y`,o().state.padding)},`drawForkJoinState`),S=e((e,t,r,i)=>{let a=0,s=i.append(`text`);s.style(`text-anchor`,`start`),s.attr(`class`,`noteText`);let c=e.replace(/\r\n/g,`<br/>`);c=c.replace(/\n/g,`<br/>`);let l=c.split(n.lineBreakRegex),u=1.25*o().state.noteMargin;for(let e of l){let n=e.trim();if(n.length>0){let e=s.append(`tspan`);if(e.text(n),u===0){let t=e.node().getBBox();u+=t.height}a+=u,e.attr(`x`,t+o().state.noteMargin),e.attr(`y`,r+a+1.25*o().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:a}},`_drawLongText`),C=e((e,t)=>{t.attr(`class`,`state-note`);let n=t.append(`rect`).attr(`x`,0).attr(`y`,o().state.padding),{textWidth:r,textHeight:i}=S(e,0,0,t.append(`g`));return n.attr(`height`,i+2*o().state.noteMargin),n.attr(`width`,r+o().state.noteMargin*2),n},`drawNote`),w=e(function(e,t){let n=t.id,r={id:n,label:t.id,width:0,height:0},i=e.append(`g`).attr(`id`,n).attr(`class`,`stateGroup`);t.type===`start`&&h(i),t.type===`end`&&b(i),(t.type===`fork`||t.type===`join`)&&x(i,t),t.type===`note`&&C(t.note.text,i),t.type===`divider`&&g(i),t.type===`default`&&t.descriptions.length===0&&_(i,t),t.type===`default`&&t.descriptions.length>0&&v(i,t);let a=i.node().getBBox();return r.width=a.width+2*o().state.padding,r.height=a.height+2*o().state.padding,r},`drawState`),T=0,E=e(function(i,l,u){let d=e(function(e){switch(e){case f.relationType.AGGREGATION:return`aggregation`;case f.relationType.EXTENSION:return`extension`;case f.relationType.COMPOSITION:return`composition`;case f.relationType.DEPENDENCY:return`dependency`}},`getRelationType`);l.points=l.points.filter(e=>!Number.isNaN(e.y));let p=l.points,m=r().x(function(e){return e.x}).y(function(e){return e.y}).curve(a),h=i.append(`path`).attr(`d`,m(p)).attr(`id`,`edge`+T).attr(`class`,`transition`),g=``;if(o().state.arrowMarkerAbsolute&&(g=s(!0)),h.attr(`marker-end`,`url(`+g+`#`+d(f.relationType.DEPENDENCY)+`End)`),u.title!==void 0){let e=i.append(`g`).attr(`class`,`stateLabel`),{x:r,y:a}=t.calcLabelPosition(l.points),s=n.getRows(u.title),d=0,f=[],p=0,m=0;for(let t=0;t<=s.length;t++){let n=e.append(`text`).attr(`text-anchor`,`middle`).text(s[t]).attr(`x`,r).attr(`y`,a+d),i=n.node().getBBox();p=Math.max(p,i.width),m=Math.min(m,i.x),c.info(i.x,r,a+d),d===0&&(d=n.node().getBBox().height,c.info(`Title height`,d,a)),f.push(n)}let h=d*s.length;if(s.length>1){let e=(s.length-1)*d*.5;f.forEach((t,n)=>t.attr(`y`,a+n*d-e)),h=d*s.length}let g=e.node().getBBox();e.insert(`rect`,`:first-child`).attr(`class`,`box`).attr(`x`,r-p/2-o().state.padding/2).attr(`y`,a-h/2-o().state.padding/2-3.5).attr(`width`,p+o().state.padding).attr(`height`,h+o().state.padding),c.info(g)}T++},`drawEdge`),D,O={},k=e(function(){},`setConf`),A=e(function(e){e.append(`defs`).append(`marker`).attr(`id`,`dependencyEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`insertMarkers`),j=e(function(e,t,n,r){D=o().state;let a=o().securityLevel,s;a===`sandbox`&&(s=i(`#i`+t));let u=i(a===`sandbox`?s.nodes()[0].contentDocument.body:`body`),d=a===`sandbox`?s.nodes()[0].contentDocument:document;c.debug(`Rendering diagram `+e);let f=u.select(`[id='${t}']`);A(f),N(r.db.getRootDoc(),f.append(`g`).attr(`id`,t+`-root`),void 0,!1,u,d,r);let p=D.padding,m=f.node().getBBox(),h=m.width+p*2,g=m.height+p*2;l(f,g,h*1.75,D.useMaxWidth),f.attr(`viewBox`,`${m.x-D.padding} ${m.y-D.padding} `+h+` `+g)},`draw`),M=e(e=>e?e.length*D.fontSizeFactor:1,`getLabelWidth`),N=e((e,t,r,i,a,o,s)=>{let l=new u({compound:!0,multigraph:!0}),f,p=!0;for(f=0;f<e.length;f++)if(e[f].stmt===`relation`){p=!1;break}r?l.setGraph({rankdir:`LR`,multigraph:!0,compound:!0,ranker:`tight-tree`,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,isMultiGraph:!0}):l.setGraph({rankdir:`TB`,multigraph:!0,compound:!0,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,ranker:`tight-tree`,isMultiGraph:!0}),l.setDefaultEdgeLabel(function(){return{}});let m=s.db.getStates(),h=s.db.getRelations(),g=Object.keys(m);for(let e of g){let n=m[e];r&&(n.parentId=r);let c;if(n.doc){let e=t.append(`g`).attr(`id`,n.id).attr(`class`,`stateGroup`);if(c=N(n.doc,e,n.id,!i,a,o,s),!0){e=y(e,n,i);let t=e.node().getBBox();c.width=t.width,c.height=t.height+D.padding/2,O[n.id]={y:D.compositTitleSize}}}else c=w(t,n,l);if(n.note){let e=w(t,{descriptions:[],id:n.id+`-note`,note:n.note,type:`note`},l);n.note.position===`left of`?(l.setNode(c.id+`-note`,e),l.setNode(c.id,c)):(l.setNode(c.id,c),l.setNode(c.id+`-note`,e)),l.setParent(c.id,c.id+`-group`),l.setParent(c.id+`-note`,c.id+`-group`)}else l.setNode(c.id,c)}c.debug(`Count=`,l.nodeCount(),l);let _=0;h.forEach(function(e){_++,c.debug(`Setting edge`,e),l.setEdge(e.id1,e.id2,{relation:e,width:M(e.title),height:D.labelHeight*n.getRows(e.title).length,labelpos:`c`},`id`+_)}),d(l),c.debug(`Graph after layout`,l.nodes());let v=t.node();l.nodes().forEach(function(e){e!==void 0&&l.node(e)!==void 0?(c.warn(`Node `+e+`: `+JSON.stringify(l.node(e))),a.select(`#`+v.id+` #`+e).attr(`transform`,`translate(`+(l.node(e).x-l.node(e).width/2)+`,`+(l.node(e).y+(O[e]?O[e].y:0)-l.node(e).height/2)+` )`),a.select(`#`+v.id+` #`+e).attr(`data-x-shift`,l.node(e).x-l.node(e).width/2),o.querySelectorAll(`#`+v.id+` #`+e+` .divider`).forEach(e=>{let t=e.parentElement,n=0,r=0;t&&(t.parentElement&&(n=t.parentElement.getBBox().width),r=parseInt(t.getAttribute(`data-x-shift`),10),Number.isNaN(r)&&(r=0)),e.setAttribute(`x1`,0-r+8),e.setAttribute(`x2`,n-r-8)})):c.debug(`No Node `+e+`: `+JSON.stringify(l.node(e)))});let b=v.getBBox();l.edges().forEach(function(e){e!==void 0&&l.edge(e)!==void 0&&(c.debug(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(l.edge(e))),E(t,l.edge(e),l.edge(e).relation))}),b=v.getBBox();let x={id:r||`root`,label:r||`root`,width:0,height:0};return x.width=b.width+2*D.padding,x.height=b.height+2*D.padding,c.debug(`Doc rendered`,x,l),x},`renderDoc`),P={parser:m,get db(){return new f(1)},renderer:{setConf:k,draw:j},styles:p,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{P as diagram};
@@ -0,0 +1 @@
1
+ import{t as e}from"./chunk-VELTKBKT-C9dVN39o.js";import"./index-C_xK08EW.js";import"./chunk-TBF5ZNIQ-DKtDz6ae.js";import"./chunk-RWUO3TPN-DYn1XriD.js";import{i as t,n,r,t as i}from"./chunk-3GS5O3IE-jlWIjPsl.js";var a={parser:i,get db(){return new n(2)},renderer:t,styles:r,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
@@ -0,0 +1,120 @@
1
+ import{i as e,t}from"./chunk-VELTKBKT-C9dVN39o.js";import{A as n,It as r,Ut as i,Vn as a,Wn as o,Yt as s,an as c,dn as l,fn as u,mn as d,qn as f,qt as p,rn as m}from"./index-C_xK08EW.js";var h=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,11,13,14,15,17,19,20,23,24],r=[1,12],i=[1,13],a=[1,14],o=[1,15],s=[1,16],c=[1,19],l=[1,20],u={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:`error`,6:`EOF`,7:`timeline`,8:`timeline_lr`,9:`timeline_td`,11:`SPACE`,13:`NEWLINE`,14:`title`,15:`acc_title`,16:`acc_title_value`,17:`acc_descr`,18:`acc_descr_value`,19:`acc_descr_multiline_value`,20:`section`,23:`period`,24:`event`},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:r.setDirection(`LR`);break;case 4:r.setDirection(`TD`);break;case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:case 10:this.$=[];break;case 11:r.getCommonDb().setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),r.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),r.getCommonDb().setAccDescription(this.$);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:r.addTask(a[s],0,``),this.$=a[s];break;case 19:r.addEvent(a[s].substr(2)),this.$=a[s];break}},`anonymous`),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(n,[2,5],{5:6}),e(n,[2,2]),e(n,[2,3]),e(n,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},e(n,[2,10],{1:[2,1]}),e(n,[2,6]),{12:21,14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},e(n,[2,8]),e(n,[2,9]),e(n,[2,11]),{16:[1,22]},{18:[1,23]},e(n,[2,14]),e(n,[2,15]),e(n,[2,16]),e(n,[2,17]),e(n,[2,18]),e(n,[2,19]),e(n,[2,7]),e(n,[2,12]),e(n,[2,13])],defaultActions:{},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){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(e,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}t(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}t(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
+ `+h.showPosition()+`
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`)};u.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(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:t(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:t(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:t(function(){return this._more=!0,this},`more`),reject:t(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:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(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:t(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:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
5
+ `+t+`^`},`showPosition`),test_match:t(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:t(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:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`begin`),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(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:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:t(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return 13;case 3:break;case 4:break;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin(`acc_title`),15;case 10:return this.popState(),`acc_title_value`;case 11:return this.begin(`acc_descr`),17;case 12:return this.popState(),`acc_descr_value`;case 13:this.begin(`acc_descr_multiline`);break;case 14:this.popState();break;case 15:return`acc_descr_multiline_value`;case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return`INVALID`}},`anonymous`),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}}})();function d(){this.yy={}}return t(d,`Parser`),d.prototype=u,u.Parser=d,new d})();h.parser=h;var g=h,_={};e(_,{addEvent:()=>M,addSection:()=>O,addTask:()=>j,addTaskOrg:()=>N,clear:()=>T,default:()=>ee,getCommonDb:()=>w,getDirection:()=>D,getSections:()=>k,getTasks:()=>A,setDirection:()=>E});var v=``,y=0,b=`LR`,x=[],S=[],C=[],w=t(()=>l,`getCommonDb`),T=t(function(){x.length=0,S.length=0,v=``,C.length=0,b=`LR`,u()},`clear`),E=t(function(e){b=e},`setDirection`),D=t(function(){return b},`getDirection`),O=t(function(e){v=e,x.push(e)},`addSection`),k=t(function(){return x},`getSections`),A=t(function(){let e=P(),t=0;for(;!e&&t<100;)e=P(),t++;return S.push(...C),S},`getTasks`),j=t(function(e,t,n){let r={id:y++,section:v,type:v,task:e,score:t||0,events:n?[n]:[]};C.push(r)},`addTask`),M=t(function(e){C.find(e=>e.id===y-1).events.push(e)},`addEvent`),N=t(function(e){let t={section:v,type:v,description:e,task:e,classes:[]};S.push(t)},`addTaskOrg`),P=t(function(){let e=t(function(e){return C[e].processed},`compileTask`),n=!0;for(let[t,r]of C.entries())e(t),n&&=r.processed;return n},`compileTasks`),ee={clear:T,getCommonDb:w,getDirection:D,setDirection:E,addSection:O,getSections:k,getTasks:A,addTask:j,addTaskOrg:N,addEvent:M},F=0,I=t(function(e,t){let n=e.append(`rect`);return 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),n.attr(`rx`,t.rx),n.attr(`ry`,t.ry),t.class!==void 0&&n.attr(`class`,t.class),n},`drawRect`),te=t(function(e,n){let r=e.append(`circle`).attr(`cx`,n.cx).attr(`cy`,n.cy).attr(`class`,`face`).attr(`r`,15).attr(`stroke-width`,2).attr(`overflow`,`visible`),i=e.append(`g`);i.append(`circle`).attr(`cx`,n.cx-15/3).attr(`cy`,n.cy-15/3).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`),i.append(`circle`).attr(`cx`,n.cx+15/3).attr(`cy`,n.cy-15/3).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`);function a(e){let t=o().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(6.8181818181818175);e.append(`path`).attr(`class`,`mouth`).attr(`d`,t).attr(`transform`,`translate(`+n.cx+`,`+(n.cy+2)+`)`)}t(a,`smile`);function s(e){let t=o().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(6.8181818181818175);e.append(`path`).attr(`class`,`mouth`).attr(`d`,t).attr(`transform`,`translate(`+n.cx+`,`+(n.cy+7)+`)`)}t(s,`sad`);function c(e){e.append(`line`).attr(`class`,`mouth`).attr(`stroke`,2).attr(`x1`,n.cx-5).attr(`y1`,n.cy+7).attr(`x2`,n.cx+5).attr(`y2`,n.cy+7).attr(`class`,`mouth`).attr(`stroke-width`,`1px`).attr(`stroke`,`#666`)}return t(c,`ambivalent`),n.score>3?a(i):n.score<3?s(i):c(i),r},`drawFace`),ne=t(function(e,t){let n=e.append(`circle`);return n.attr(`cx`,t.cx),n.attr(`cy`,t.cy),n.attr(`class`,`actor-`+t.pos),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`r`,t.r),n.class!==void 0&&n.attr(`class`,n.class),t.title!==void 0&&n.append(`title`).text(t.title),n},`drawCircle`),L=t(function(e,t){let n=t.text.replace(/<br\s*\/?>/gi,` `),r=e.append(`text`);r.attr(`x`,t.x),r.attr(`y`,t.y),r.attr(`class`,`legend`),r.style(`text-anchor`,t.anchor),t.class!==void 0&&r.attr(`class`,t.class);let i=r.append(`tspan`);return i.attr(`x`,t.x+t.textMargin*2),i.text(n),r},`drawText`),re=t(function(e,n){function r(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}t(r,`genPoints`);let i=e.append(`polygon`);i.attr(`points`,r(n.x,n.y,50,20,7)),i.attr(`class`,`labelBox`),n.y+=n.labelMargin,n.x+=.5*n.labelMargin,L(e,n)},`drawLabel`),R=t(function(e,t,n){let r=e.append(`g`),i=B();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=n.width,i.height=n.height,i.class=`journey-section section-type-`+t.num,i.rx=3,i.ry=3,I(r,i),V(n)(t.text,r,i.x,i.y,i.width,i.height,{class:`journey-section section-type-`+t.num},n,t.colour)},`drawSection`),z=-1,ie=t(function(e,t,n,r){let i=t.x+n.width/2,a=e.append(`g`);z++,a.append(`line`).attr(`id`,r+`-task`+z).attr(`x1`,i).attr(`y1`,t.y).attr(`x2`,i).attr(`y2`,450).attr(`class`,`task-line`).attr(`stroke-width`,`1px`).attr(`stroke-dasharray`,`4 2`).attr(`stroke`,`#666`),te(a,{cx:i,cy:300+(5-t.score)*30,score:t.score});let o=B();o.x=t.x,o.y=t.y,o.fill=t.fill,o.width=n.width,o.height=n.height,o.class=`task task-type-`+t.num,o.rx=3,o.ry=3,I(a,o),V(n)(t.task,a,o.x,o.y,o.width,o.height,{class:`task`},n,t.colour)},`drawTask`),ae=t(function(e,t){I(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:`rect`}).lower()},`drawBackgroundRect`),oe=t(function(){return{x:0,y:0,fill:void 0,"text-anchor":`start`,width:100,height:100,textMargin:0,rx:0,ry:0}},`getTextObj`),B=t(function(){return{x:0,y:0,width:100,anchor:`start`,height:100,rx:0,ry:0}},`getNoteRect`),V=(function(){function e(e,t,n,r,a,o,s,c){i(t.append(`text`).attr(`x`,n+a/2).attr(`y`,r+o/2+5).style(`font-color`,c).style(`text-anchor`,`middle`).text(e),s)}t(e,`byText`);function n(e,t,n,r,a,o,s,c,l){let{taskFontSize:u,taskFontFamily:d}=c,f=e.split(/<br\s*\/?>/gi);for(let e=0;e<f.length;e++){let c=e*u-u*(f.length-1)/2,p=t.append(`text`).attr(`x`,n+a/2).attr(`y`,r).attr(`fill`,l).style(`text-anchor`,`middle`).style(`font-size`,u).style(`font-family`,d);p.append(`tspan`).attr(`x`,n+a/2).attr(`dy`,c).text(f[e]),p.attr(`y`,r+o/2).attr(`dominant-baseline`,`central`).attr(`alignment-baseline`,`central`),i(p,s)}}t(n,`byTspan`);function r(e,t,r,a,o,s,c,l){let u=t.append(`switch`),d=u.append(`foreignObject`).attr(`x`,r).attr(`y`,a).attr(`width`,o).attr(`height`,s).attr(`position`,`fixed`).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);d.append(`div`).attr(`class`,`label`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),n(e,u,r,a,o,s,c,l),i(d,c)}t(r,`byFo`);function i(e,t){for(let n in t)n in t&&e.attr(n,t[n])}return t(i,`_setTextAttrs`),function(t){return t.textPlacement===`fo`?r:t.textPlacement===`old`?e:n}})(),se=t(function(e,t){F=0,z=-1,e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowhead`).attr(`refX`,5).attr(`refY`,2).attr(`markerWidth`,6).attr(`markerHeight`,4).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0,0 V 4 L6,2 Z`)},`initGraphics`);function H(e,t){e.each(function(){var e=a(this),n=e.text().split(/(\s+|<br>)/).reverse(),r,i=[],o=1.1,s=e.attr(`y`),c=parseFloat(e.attr(`dy`)),l=e.text(null).append(`tspan`).attr(`x`,0).attr(`y`,s).attr(`dy`,c+`em`);for(let a=0;a<n.length;a++)r=n[n.length-1-a],i.push(r),l.text(i.join(` `).trim()),(l.node().getComputedTextLength()>t||r===`<br>`)&&(i.pop(),l.text(i.join(` `).trim()),i=r===`<br>`?[``]:[r],l=e.append(`tspan`).attr(`x`,0).attr(`y`,s).attr(`dy`,o+`em`).text(r))})}t(H,`wrap`);var ce=t(function(e,t,n,r,i,o=!1){let{theme:s,look:c}=r,l=s?.includes(`redux`),u=n%(r?.themeVariables?.THEME_COLOR_LIMIT??12)-1,d=e.append(`g`);t.section=u,d.attr(`class`,(t.class?t.class+` `:``)+`timeline-node `+(`section-`+u));let f=d.append(`g`),p=d.append(`g`),m=p.append(`text`).text(t.descr).attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).call(H,t.width).node().getBBox(),h=r.fontSize?.replace?r.fontSize.replace(`px`,``):r.fontSize;if(t.height=m.height+h*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width+=2*t.padding,p.attr(`transform`,`translate(`+t.width/2+`, `+t.padding/2+`)`),l&&p.attr(`transform`,`translate(${t.width/2}, ${o?t.padding/2+3:t.padding})`),ue(f,t,u,i,r),c===`neo`&&(d.attr(`data-look`,`neo`),l)){let t=s.includes(`dark`),n=a(e.node()?.ownerSVGElement??e.node()),r=n.attr(`id`)??``,i=r?`${r}-drop-shadow`:`drop-shadow`;if(n.select(`#${i}`).empty()){let e=n.select(`defs`);(e.empty()?n.append(`defs`):e).append(`filter`).attr(`id`,i).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,t?`0.2`:`0.06`).attr(`flood-color`,t?`#FFFFFF`:`#000000`)}}return t},`drawNode`),le=t(function(e,t,n){let r=e.append(`g`),i=r.append(`text`).text(t.descr).attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).call(H,t.width).node().getBBox(),a=n.fontSize?.replace?n.fontSize.replace(`px`,``):n.fontSize;return r.remove(),i.height+a*1.1*.5+t.padding},`getVirtualNodeHeight`),ue=t(function(e,t,n,r,i){let{theme:a}=i,o=a?.includes(`redux`)?0:5,s=o>0?`M0 ${t.height-5} v${-t.height+10} q0,-${o},${o},-${o} h${t.width-10} q${o},0,${o},${o} v${t.height-5} H0 Z`:`M0 ${t.height-5} v${-(t.height-5)} h${t.width} v${t.height} H0 Z`;e.append(`path`).attr(`id`,r+`-node-`+ F++).attr(`class`,`node-bkg node-`+t.type).attr(`d`,s),a?.includes(`redux`)||e.append(`line`).attr(`class`,`node-line-`+n).attr(`x1`,0).attr(`y1`,t.height).attr(`x2`,t.width).attr(`y2`,t.height)},`defaultBkg`),U={drawRect:I,drawCircle:ne,drawSection:R,drawText:L,drawLabel:re,drawTask:ie,drawBackgroundRect:ae,getTextObj:oe,getNoteRect:B,initGraphics:se,drawNode:ce,getVirtualNodeHeight:le},de=t(function(e,t,n,r){let i=d(),{look:o,theme:s,themeVariables:c}=i,{useGradient:l,gradientStart:u,gradientStop:m}=c,h=i.timeline?.leftMargin??50;f.debug(`timeline`,r.db);let g=i.securityLevel,_;g===`sandbox`&&(_=a(`#i`+t));let v=a(g===`sandbox`?_.nodes()[0].contentDocument.body:`body`).select(`#`+t);v.append(`g`);let y=r.db.getTasks(),b=r.db.getCommonDb().getDiagramTitle();f.debug(`task`,y),U.initGraphics(v,t);let x=r.db.getSections();f.debug(`sections`,x);let S=0,C=0,w=0,T=0,E=50+h,D=50;T=50;let O=0,k=!0;x.forEach(function(e){let t={number:O,descr:e,section:O,width:150,padding:20,maxHeight:S},n=U.getVirtualNodeHeight(v,t,i);f.debug(`sectionHeight before draw`,n),S=Math.max(S,n+20)});let A=0,j=0;f.debug(`tasks.length`,y.length);for(let[e,t]of y.entries()){let n={number:e,descr:t,section:t.section,width:150,padding:20,maxHeight:C},r=U.getVirtualNodeHeight(v,n,i);f.debug(`taskHeight before draw`,r),C=Math.max(C,r+20),A=Math.max(A,t.events.length);let a=0;for(let e of t.events){let n={descr:e,section:t.section,number:t.section,width:150,padding:20,maxHeight:50};a+=U.getVirtualNodeHeight(v,n,i)}t.events.length>0&&(a+=(t.events.length-1)*10),j=Math.max(j,a)}f.debug(`maxSectionHeight before draw`,S),f.debug(`maxTaskHeight before draw`,C),x&&x.length>0?x.forEach(e=>{let n=y.filter(t=>t.section===e),r={number:O,descr:e,section:O,width:200*Math.max(n.length,1)-50,padding:20,maxHeight:S};f.debug(`sectionNode`,r);let a=v.append(`g`),o=U.drawNode(a,r,O,i,t);f.debug(`sectionNode output`,o),a.attr(`transform`,`translate(${E}, ${T})`),D+=S+50,n.length>0&&W(v,n,O,E,D,C,i,A,j,S,!1,t),E+=200*Math.max(n.length,1),D=T,O++}):(k=!1,W(v,y,O,E,D,C,i,A,j,S,!0,t));let M=v.node().getBBox();if(f.debug(`bounds`,M),b&&v.append(`text`).text(b).attr(`x`,o===`neo`?M.x*2+h:M.width/2-h).attr(`font-size`,`4ex`).attr(`font-weight`,`bold`).attr(`y`,20),w=k?S+C+150:C+100,v.append(`g`).attr(`class`,`lineWrapper`).append(`line`).attr(`x1`,h).attr(`y1`,w).attr(`x2`,M.width+3*h).attr(`y2`,w).attr(`stroke-width`,4).attr(`stroke`,`black`).attr(`marker-end`,`url(#${t}-arrowhead)`),o===`neo`&&l&&s!==`neutral`){let e=v.select(`defs`),t=(e.empty()?v.append(`defs`):e).append(`linearGradient`).attr(`id`,v.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);t.append(`stop`).attr(`offset`,`0%`).attr(`stop-color`,u).attr(`stop-opacity`,1),t.append(`stop`).attr(`offset`,`100%`).attr(`stop-color`,m).attr(`stop-opacity`,1)}p(void 0,v,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},`draw`),W=t(function(e,t,n,r,i,a,o,s,c,l,u,d){for(let s of t){let t={descr:s.task,section:n,number:n,width:150,padding:20,maxHeight:a};f.debug(`taskNode`,t);let l=e.append(`g`).attr(`class`,`taskWrapper`),p=U.drawNode(l,t,n,o,d).height;if(f.debug(`taskHeight after draw`,p),l.attr(`transform`,`translate(${r}, ${i})`),a=Math.max(a,p),s.events){let t=e.append(`g`).attr(`class`,`lineWrapper`),l=a;i+=100,l+=fe(e,s.events,n,r,i,o,d),i-=100,t.append(`line`).attr(`x1`,r+190/2).attr(`y1`,i+a).attr(`x2`,r+190/2).attr(`y2`,i+a+100+c+100).attr(`stroke-width`,2).attr(`stroke`,`black`).attr(`marker-end`,`url(#${d}-arrowhead)`).attr(`stroke-dasharray`,`5,5`)}r+=200,u&&!o.timeline?.disableMulticolor&&n++}i-=10},`drawTasks`),fe=t(function(e,t,n,r,i,a,o){let s=0,c=i;i+=100;for(let c of t){let t={descr:c,section:n,number:n,width:150,padding:20,maxHeight:50};f.debug(`eventNode`,t);let l=e.append(`g`).attr(`class`,`eventWrapper`),u=U.drawNode(l,t,n,a,o,!0).height;s+=u,l.attr(`transform`,`translate(${r}, ${i})`),i=i+10+u}return i=c,s},`drawEvents`),pe={setConf:t(()=>{},`setConf`),draw:de},G=200,K=5,me=G+K*2,q=G+100,he=q+K*2,J=10,ge=0,Y=20,X=20,Z=30,Q=50,_e=t(function(e,t,i,a){let o=d(),s=o.timeline?.leftMargin??50;f.debug(`timeline`,a.db);let c=r(t);c.append(`g`);let l=a.db.getTasks(),u=a.db.getCommonDb().getDiagramTitle();f.debug(`task`,l),U.initGraphics(c);let m=a.db.getSections();f.debug(`sections`,m);let h=0,g=0,_=50+s,v=50,y=v,b=_,x=me+X,S=he+Q,C=b+x,w=0,T=m&&m.length>0,E=T?C:_+x,D=Math.max(50,x+S-K*2);m.forEach(function(e){let t={number:w,descr:e,section:w,width:D,padding:K,maxHeight:h},n=U.getVirtualNodeHeight(c,t,o);f.debug(`sectionHeight before draw`,n),h=Math.max(h,n)});let O=0;f.debug(`tasks.length`,l.length);for(let[e,t]of l.entries()){let n={number:e,descr:t,section:t.section,width:G,padding:K,maxHeight:g},r=U.getVirtualNodeHeight(c,n,o);f.debug(`taskHeight before draw`,r),g=Math.max(g,r);let i=0;for(let e of t.events){let n={descr:e,section:t.section,number:t.section,width:q,padding:K,maxHeight:50};i+=U.getVirtualNodeHeight(c,n,o)}t.events.length>0&&(i+=(t.events.length-1)*J),O=Math.max(O,i)+ge}f.debug(`maxSectionHeight before draw`,h),f.debug(`maxTaskHeight before draw`,g);let k=Math.max(g,O)+Z;T?m.forEach(e=>{let t=l.filter(t=>t.section===e),n={number:w,descr:e,section:w,width:D,padding:K,maxHeight:h};f.debug(`sectionNode`,n);let r=c.append(`g`),i=U.drawNode(r,n,w,o);f.debug(`sectionNode output`,i);let a=E-x;r.attr(`transform`,`translate(${a}, ${v})`);let s=v+i.height+Y;t.length>0&&$(c,t,w,E,s,g,o,k,!1);let u=t.length,d=i.height+Y+k*Math.max(u,1)-(u>0?Z*2:0);v+=d,w++}):$(c,l,w,E,v,g,o,k,!0);let A=c.node()?.getBBox();if(!A)throw Error(`bbox not found`);if(f.debug(`bounds`,A),u){if(c.append(`text`).text(u).attr(`x`,A.width/2-s).attr(`font-size`,`4ex`).attr(`font-weight`,`bold`).attr(`y`,20),A=c.node()?.getBBox(),!A)throw Error(`bbox not found`);f.debug(`bounds after title`,A)}let[j]=n(o.fontSize),M=(j??16)*2,N=(j??16)*.5+20,P=c.append(`g`).attr(`class`,`lineWrapper`);P.append(`line`).attr(`x1`,E).attr(`y1`,y-M).attr(`x2`,E).attr(`y2`,A.y+A.height+N).attr(`stroke-width`,4).attr(`stroke`,`black`).attr(`marker-end`,`url(#arrowhead)`),P.lower(),p(void 0,c,o.timeline?.padding??50,o.timeline?.useMaxWidth??!1)},`draw`),$=t(function(e,t,n,r,i,a,o,s,c){for(let l of t){let t={descr:l.task,section:n,number:n,width:G,padding:K,maxHeight:a};f.debug(`taskNode`,t);let u=e.append(`g`).attr(`class`,`taskWrapper`),d=U.drawNode(u,t,n,o),p=d.height;f.debug(`taskHeight after draw`,p);let m=r-X-d.width;if(u.attr(`transform`,`translate(${m}, ${i})`),a=Math.max(a,p),l.events&&l.events.length>0){let t=i,a=r+Q;ve(e,l.events,n,r,a,t,o)}i+=s,c&&!o.timeline?.disableMulticolor&&n++}},`drawTasks`),ve=t(function(e,t,n,r,i,a,o){let s=a;for(let a of t){let t={descr:a,section:n,number:n,width:q,padding:K,maxHeight:0};f.debug(`eventNode`,t);let c=e.append(`g`).attr(`class`,`eventWrapper`),l=U.drawNode(c,t,n,o).height;c.attr(`transform`,`translate(${i}, ${s})`);let u=e.append(`g`).attr(`class`,`lineWrapper`),d=s+l/2;u.append(`line`).attr(`x1`,r).attr(`y1`,d).attr(`x2`,i).attr(`y2`,d).attr(`stroke-width`,2).attr(`stroke`,`black`).attr(`marker-end`,`url(#arrowhead)`).attr(`stroke-dasharray`,`5,5`),s=s+l+J}return s-a},`drawEvents`),ye={setConf:t(()=>{},`setConf`),draw:_e},be=t(e=>{let{theme:t}=i(),n=t?.includes(`dark`),r=t?.includes(`color`),a=e.svgId?.replace(/^#/,``)??``,o=a?`url(#${a}-drop-shadow)`:e.dropShadow??`none`,s=``;for(let t=0;t<e.THEME_COLOR_LIMIT;t++){let i=`${17-3*t}`,a=r?e.borderColorArray[t]:e.mainBkg,c=r?e.borderColorArray[t]:e.nodeBorder;s+=`
7
+ .section-${t-1} rect,
8
+ .section-${t-1} path,
9
+ .section-${t-1} circle {
10
+ fill: ${n&&r?e.mainBkg:a};
11
+ stroke: ${c};
12
+ stroke-width: ${e.strokeWidth};
13
+ filter: ${o};
14
+ }
15
+
16
+ .section-${t-1} text {
17
+ fill: ${e.nodeBorder};
18
+ font-weight: ${e.fontWeight}
19
+ }
20
+
21
+ .node-icon-${t-1} {
22
+ font-size: 40px;
23
+ color: ${e[`cScaleLabel`+t]};
24
+ }
25
+
26
+ .section-edge-${t-1} {
27
+ stroke: ${e[`cScale`+t]};
28
+ }
29
+
30
+ .edge-depth-${t-1} {
31
+ stroke-width: ${i};
32
+ }
33
+
34
+ .section-${t-1} line {
35
+ stroke: ${e[`cScaleInv`+t]};
36
+ stroke-width: 3;
37
+ }
38
+
39
+ .lineWrapper line {
40
+ stroke: ${e.nodeBorder};
41
+ stroke-width:${e.strokeWidth}
42
+ }
43
+
44
+ .disabled,
45
+ .disabled circle,
46
+ .disabled text {
47
+ fill: ${e.tertiaryColor??`lightgray`};
48
+ }
49
+
50
+ .disabled text {
51
+ fill: ${e.clusterBorder??`#efefef`};
52
+ }
53
+ `}return s},`genReduxSections`),xe=t(e=>{let t=``;for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e[`lineColor`+t]=e[`lineColor`+t]||e[`cScaleInv`+t],m(e[`lineColor`+t])?e[`lineColor`+t]=s(e[`lineColor`+t],20):e[`lineColor`+t]=c(e[`lineColor`+t],20);for(let n=0;n<e.THEME_COLOR_LIMIT;n++){let r=``+(17-3*n);t+=`
54
+ .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} path {
55
+ fill: ${e[`cScale`+n]};
56
+ }
57
+ .section-${n-1} text {
58
+ fill: ${e[`cScaleLabel`+n]};
59
+ }
60
+ .node-icon-${n-1} {
61
+ font-size: 40px;
62
+ color: ${e[`cScaleLabel`+n]};
63
+ }
64
+ .section-edge-${n-1}{
65
+ stroke: ${e[`cScale`+n]};
66
+ }
67
+ .edge-depth-${n-1}{
68
+ stroke-width: ${r};
69
+ }
70
+ .section-${n-1} line {
71
+ stroke: ${e[`cScaleInv`+n]} ;
72
+ stroke-width: 3;
73
+ }
74
+
75
+ .lineWrapper line{
76
+ stroke: ${e[`cScaleLabel`+n]} ;
77
+ }
78
+
79
+ .disabled, .disabled circle, .disabled text {
80
+ fill: ${e.tertiaryColor??`lightgray`};
81
+ }
82
+ .disabled text {
83
+ fill: ${e.clusterBorder??`#efefef`};
84
+ }
85
+ `}return t},`genSections`),Se=t(e=>{let{theme:t}=i(),n=t?.includes(`redux`),r=t===`neutral`,a=e.svgId?.replace(/^#/,``)??``,o=``;if(e.useGradient&&a&&e.THEME_COLOR_LIMIT&&!r)for(let t=0;t<e.THEME_COLOR_LIMIT;t++)o+=`
86
+ .section-${t-1}[data-look="neo"] rect,
87
+ .section-${t-1}[data-look="neo"] path,
88
+ .section-${t-1}[data-look="neo"] circle {
89
+ fill: ${e.mainBkg};
90
+ stroke: url(#${a}-gradient);
91
+ stroke-width: 2;
92
+ }
93
+ .section-${t-1}[data-look="neo"] line {
94
+ stroke: url(#${a}-gradient);
95
+ stroke-width: 2;
96
+ }`;return`
97
+ .edge {
98
+ stroke-width: 3;
99
+ }
100
+ ${n?be(e):xe(e)}
101
+ ${o}
102
+ .section-root rect, .section-root path, .section-root circle {
103
+ fill: ${e.git0};
104
+ }
105
+ .section-root text {
106
+ fill: ${e.gitBranchLabel0};
107
+ }
108
+ .icon-container {
109
+ height:100%;
110
+ display: flex;
111
+ justify-content: center;
112
+ align-items: center;
113
+ }
114
+ .edge {
115
+ fill: none;
116
+ }
117
+ .eventWrapper {
118
+ filter: brightness(120%);
119
+ }
120
+ `},`getStyles`),Ce={db:_,renderer:{setConf:t(()=>{},`setConf`),draw:t((e,t,n,r)=>(r?.db?.getDirection?.()??`LR`)===`TD`?ye.draw(e,t,n,r):pe.draw(e,t,n,r),`draw`)},parser:g,styles:Se};export{Ce as diagram};
@@ -0,0 +1 @@
1
+ import"./index-C_xK08EW.js";import"./chunk-H3VCZNTA-IchcISDt.js";import"./chunk-FXACKDTF-uhhi2PC2.js";import{t as e}from"./chunk-RNJOYNJ4-B724K7cW.js";export{e as createTreeViewServices};
@@ -0,0 +1 @@
1
+ import"./index-C_xK08EW.js";import"./chunk-H3VCZNTA-IchcISDt.js";import"./chunk-FXACKDTF-uhhi2PC2.js";import{t as e}from"./chunk-WSB5WSVC-B123clsZ.js";export{e as createTreemapServices};