pmx-canvas 0.9.3 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/.github/extensions/pmx-canvas/runtime.json +1 -1
  2. package/.github/extensions/pmx-canvas/tools.json +9418 -2016
  3. package/CHANGELOG.md +54 -1
  4. package/dist/canvas/chunks/abnfDiagram-N423BO3Z-p8dtp6va.js +1 -0
  5. package/dist/canvas/chunks/architecture-TIHT7OUA-9tffvpsv.js +1 -0
  6. package/dist/canvas/chunks/architectureDiagram-T3A2C74G-5jhmxrzf.js +36 -0
  7. package/dist/canvas/chunks/blockDiagram-VBNYF7ZC-pw1fa9yb.js +132 -0
  8. package/dist/canvas/chunks/c4Diagram-5PPSVZJV-x07nq0tt.js +10 -0
  9. package/dist/canvas/chunks/classDiagram-JCYQIIEL-nc6g5x1r.js +1 -0
  10. package/dist/canvas/chunks/classDiagram-v2-OCEON4UE-0qnbpwvh.js +1 -0
  11. package/dist/canvas/chunks/cose-bilkent-JH36ORCC-nm39npq0.js +1 -0
  12. package/dist/canvas/chunks/cynefin-VYW2F7L2-ys8p46ts.js +1 -0
  13. package/dist/canvas/chunks/cynefinDiagram-MW4NZA55-vdxrwahz.js +62 -0
  14. package/dist/canvas/chunks/dagre-VZM6K2ZE-bqdm7wpd.js +4 -0
  15. package/dist/canvas/chunks/diagram-7IWD3JNH-gs5gpr93.js +30 -0
  16. package/dist/canvas/chunks/diagram-B4RE2ZJO-cgwjg47s.js +3 -0
  17. package/dist/canvas/chunks/diagram-LBJQPF4R-w3vahpav.js +24 -0
  18. package/dist/canvas/chunks/diagram-Q27KOJAE-42837z6h.js +24 -0
  19. package/dist/canvas/chunks/diagram-UB23O5K3-4fz83q59.js +41 -0
  20. package/dist/canvas/chunks/ebnfDiagram-BXEA7PRR-zphtgegj.js +1 -0
  21. package/dist/canvas/chunks/erDiagram-JOGREHBK-zvbbdxp4.js +85 -0
  22. package/dist/canvas/chunks/eventmodeling-45OFAUF4-v9q6dn4c.js +1 -0
  23. package/dist/canvas/chunks/flowDiagram-UKHOOZJN-yrr5z8tc.js +1 -0
  24. package/dist/canvas/chunks/ganttDiagram-PKOTCBZU-282jzycm.js +292 -0
  25. package/dist/canvas/chunks/gitGraph-TEB2WS4Q-kdwb8m0a.js +1 -0
  26. package/dist/canvas/chunks/gitGraphDiagram-DS77QQ5N-vqqy6p1b.js +106 -0
  27. package/dist/canvas/chunks/index-0rk4gp1g.js +2 -0
  28. package/dist/canvas/chunks/index-194m3hc3.js +2 -0
  29. package/dist/canvas/chunks/index-1r72hdzb.js +301 -0
  30. package/dist/canvas/chunks/index-353m7b0p.js +2 -0
  31. package/dist/canvas/chunks/index-3cy1bzwh.js +2 -0
  32. package/dist/canvas/chunks/index-5tv8v1hk.js +1 -0
  33. package/dist/canvas/chunks/index-6ceya556.js +332 -0
  34. package/dist/canvas/chunks/index-6qmsnxwy.js +4 -0
  35. package/dist/canvas/chunks/index-d3b3gqe9.js +2 -0
  36. package/dist/canvas/chunks/index-fjtdggjn.js +2 -0
  37. package/dist/canvas/chunks/index-g3pwnqeb.js +2 -0
  38. package/dist/canvas/chunks/index-gf4e0et4.js +2 -0
  39. package/dist/canvas/chunks/index-hj99nz1f.js +1 -0
  40. package/dist/canvas/chunks/index-nprm96xp.js +16 -0
  41. package/dist/canvas/chunks/index-qj8fxwsf.js +2 -0
  42. package/dist/canvas/chunks/index-r2fyc9w1.js +89 -0
  43. package/dist/canvas/chunks/index-rft2hcz5.js +2 -0
  44. package/dist/canvas/chunks/index-rh7nv68n.js +2 -0
  45. package/dist/canvas/chunks/index-s4j678gj.js +2 -0
  46. package/dist/canvas/chunks/index-tb1wf525.js +179 -0
  47. package/dist/canvas/chunks/index-vv56h019.js +2 -0
  48. package/dist/canvas/chunks/index-w2mra17t.js +207 -0
  49. package/dist/canvas/chunks/index-wgv7en21.js +232 -0
  50. package/dist/canvas/chunks/index-yw8h9vha.js +157 -0
  51. package/dist/canvas/chunks/info-DKCQHKI2-wpzs6sz3.js +1 -0
  52. package/dist/canvas/chunks/infoDiagram-6WML65LV-v1yvggqj.js +2 -0
  53. package/dist/canvas/chunks/ishikawaDiagram-WSZJBQD7-5hnq1a9p.js +70 -0
  54. package/dist/canvas/chunks/journeyDiagram-NVQOT4AX-zjcffveh.js +139 -0
  55. package/dist/canvas/chunks/kanban-definition-27J2QSJJ-dakqtfp1.js +89 -0
  56. package/dist/canvas/chunks/katex-dmg8k4zm.js +257 -0
  57. package/dist/canvas/chunks/mermaid.core-j2geswrd.js +12 -0
  58. package/dist/canvas/chunks/mindmap-definition-FAOFIHXS-142xhr3k.js +96 -0
  59. package/dist/canvas/chunks/packet-7NZHBO7P-xn439f0s.js +1 -0
  60. package/dist/canvas/chunks/pegDiagram-VL7TDLO6-5wvk7vsd.js +1 -0
  61. package/dist/canvas/chunks/pie-RZYD4A2V-0kf16rwh.js +1 -0
  62. package/dist/canvas/chunks/pieDiagram-7S7Q4E2Y-ztdhwycc.js +39 -0
  63. package/dist/canvas/chunks/quadrantDiagram-CIZ2JOQS-c5p9gmg6.js +7 -0
  64. package/dist/canvas/chunks/radar-I7S5WNFK-0g2pz36t.js +1 -0
  65. package/dist/canvas/chunks/railroad-3IZDKUUU-fcaran6j.js +1 -0
  66. package/dist/canvas/chunks/railroad-abnf-AHOZXSZD-wgdya41q.js +1 -0
  67. package/dist/canvas/chunks/railroad-ebnf-EBAXGLYW-gy07a4ka.js +1 -0
  68. package/dist/canvas/chunks/railroad-peg-LSFZ7HO6-ewk6wtkh.js +1 -0
  69. package/dist/canvas/chunks/railroadDiagram-AXF67PYL-xkmqkjwf.js +1 -0
  70. package/dist/canvas/chunks/requirementDiagram-LRYGKXZP-9wm2dyaw.js +84 -0
  71. package/dist/canvas/chunks/sankeyDiagram-W5VNT64P-2w19etgb.js +40 -0
  72. package/dist/canvas/chunks/sequenceDiagram-SI44F4Z6-0jn0vwmz.js +162 -0
  73. package/dist/canvas/chunks/sizeCapture-X5ZJPWSS-x75epwdq.js +1 -0
  74. package/dist/canvas/chunks/stateDiagram-OKZ733FA-schjpy6d.js +1 -0
  75. package/dist/canvas/chunks/stateDiagram-v2-UEYNNEHI-k8sfp2e7.js +1 -0
  76. package/dist/canvas/chunks/swimlanes-SLNWSIFB-gkw4xce3.js +1 -0
  77. package/dist/canvas/chunks/swimlanesDiagram-ULZ7WXOC-nqysw67j.js +8 -0
  78. package/dist/canvas/chunks/timeline-definition-Z64GVDOM-x7nkcy01.js +120 -0
  79. package/dist/canvas/chunks/treeView-QDETBFTQ-cesw6gp0.js +1 -0
  80. package/dist/canvas/chunks/treemap-6X3UGDF4-zdv4knp9.js +1 -0
  81. package/dist/canvas/chunks/vennDiagram-T6HMQDX7-x8dqn9yf.js +34 -0
  82. package/dist/canvas/chunks/wardley-OPB4EBWU-44pdddez.js +1 -0
  83. package/dist/canvas/chunks/wardleyDiagram-T6FBY63Y-t1j52t9r.js +78 -0
  84. package/dist/canvas/chunks/xychartDiagram-ELKLHX3M-38t16pme.js +7 -0
  85. package/dist/canvas/global.css +389 -229
  86. package/dist/canvas/index.js +141 -211
  87. package/dist/canvas/mcp-app.html +4205 -554
  88. package/dist/canvas/mermaid-entry.js +338 -338
  89. package/dist/canvas/surface-theme.css +6 -6
  90. package/dist/json-render/index.css +1 -1
  91. package/dist/json-render/index.js +49 -49
  92. package/dist/types/client/canvas/BarHint.d.ts +5 -3
  93. package/dist/types/client/canvas/CanvasNode.d.ts +0 -11
  94. package/dist/types/client/canvas/EdgeLayer.d.ts +1 -2
  95. package/dist/types/client/canvas/auto-fit.d.ts +4 -5
  96. package/dist/types/client/mermaid-entry.d.ts +1 -2
  97. package/dist/types/client/mermaid-render.d.ts +1 -0
  98. package/dist/types/client/nodes/BoardNode.d.ts +1 -1
  99. package/dist/types/client/nodes/ExtAppFrame.d.ts +7 -90
  100. package/dist/types/client/nodes/McpAppNode.d.ts +1 -25
  101. package/dist/types/client/nodes/MermaidNode.d.ts +1 -8
  102. package/dist/types/client/nodes/ViewerFrame.d.ts +29 -0
  103. package/dist/types/client/nodes/ViewerHost.d.ts +6 -0
  104. package/dist/types/client/nodes/iframe-document-url.d.ts +3 -9
  105. package/dist/types/client/nodes/primitive-copy.d.ts +5 -0
  106. package/dist/types/client/nodes/use-iframe-content-height.d.ts +1 -1
  107. package/dist/types/client/nodes/use-surface-frame.d.ts +4 -6
  108. package/dist/types/client/nodes/viewer-runtime-state.d.ts +2 -1
  109. package/dist/types/client/state/canvas-store.d.ts +3 -1
  110. package/dist/types/client/state/intent-bridge.d.ts +1 -0
  111. package/dist/types/client/state/presentation.d.ts +17 -6
  112. package/dist/types/json-render/server.d.ts +2 -1
  113. package/dist/types/mcp/canvas-access.d.ts +1 -12
  114. package/dist/types/mcp/resource-subscriptions.d.ts +7 -0
  115. package/dist/types/mcp/server.d.ts +2 -0
  116. package/dist/types/server/ax-wait.d.ts +1 -0
  117. package/dist/types/server/canvas-operations.d.ts +1 -0
  118. package/dist/types/server/canvas-state.d.ts +2 -0
  119. package/dist/types/server/index.d.ts +11 -6
  120. package/dist/types/server/operations/http.d.ts +10 -0
  121. package/dist/types/server/operations/index.d.ts +2 -2
  122. package/dist/types/server/operations/invoker.d.ts +4 -3
  123. package/dist/types/server/operations/mcp-contracts.d.ts +20 -0
  124. package/dist/types/server/operations/mcp.d.ts +2 -0
  125. package/dist/types/server/operations/ops/batch.d.ts +1 -0
  126. package/dist/types/server/operations/ops/boards.d.ts +0 -1
  127. package/dist/types/server/operations/registry.d.ts +2 -2
  128. package/dist/types/server/operations/types.d.ts +12 -2
  129. package/dist/types/server/server.d.ts +2 -0
  130. package/dist/types/server/tour-control.d.ts +13 -3
  131. package/dist/types/server/webpage-node.d.ts +1 -0
  132. package/dist/types/shared/ax-surface-protocol.d.ts +0 -9
  133. package/dist/types/shared/tour.d.ts +8 -0
  134. package/docs/api-reference.md +2 -2
  135. package/docs/cli.md +1 -1
  136. package/docs/design/Chrome.dc.html +32 -6
  137. package/docs/design/Types1.dc.html +3 -2
  138. package/docs/design/Types2.dc.html +1 -1
  139. package/docs/design/Types3.dc.html +1 -1
  140. package/docs/design/Zoom.dc.html +37 -60
  141. package/docs/design/canvas.json +1 -1
  142. package/docs/design.md +169 -4
  143. package/docs/http-api.md +82 -1
  144. package/docs/mcp.md +101 -21
  145. package/docs/node-types.md +38 -3
  146. package/docs/plans/plan-009-tech-debt-backlog.md +2 -2
  147. package/docs/plans/plan-019-post-0.9-roadmap.md +402 -13
  148. package/docs/product-vision-2026-09.md +9 -0
  149. package/docs/sdk.md +5 -2
  150. package/package.json +2 -2
  151. package/plugins/pmx-canvas/com.github.copilot/extensions/pmx-canvas/runtime.json +1 -1
  152. package/plugins/pmx-canvas/plugin.json +1 -1
  153. package/plugins/pmx-canvas/runtime.json +1 -1
  154. package/plugins/pmx-canvas/tools.json +9418 -2016
  155. package/skills/pmx-canvas/SKILL.md +19 -21
  156. package/skills/pmx-canvas/references/full-reference.md +44 -6
  157. package/skills/pmx-canvas/references/installing-pmx-canvas.md +7 -7
  158. package/skills/published-consumer-e2e/scripts/run-published-consumer-e2e.sh +3 -5
  159. package/src/client/canvas/BarHint.tsx +6 -3
  160. package/src/client/canvas/CanvasNode.tsx +34 -47
  161. package/src/client/canvas/CanvasViewport.tsx +6 -7
  162. package/src/client/canvas/ContextMenu.tsx +63 -3
  163. package/src/client/canvas/EdgeLayer.tsx +365 -169
  164. package/src/client/canvas/ExpandedNodeOverlay.tsx +1 -2
  165. package/src/client/canvas/Presentation.tsx +53 -3
  166. package/src/client/canvas/ToolRail.tsx +2 -0
  167. package/src/client/canvas/TopBar.tsx +24 -9
  168. package/src/client/canvas/auto-fit.ts +9 -11
  169. package/src/client/canvas/canvas-area.ts +1 -1
  170. package/src/client/canvas/use-focus-trap.ts +6 -1
  171. package/src/client/mermaid-entry.ts +6 -20
  172. package/src/client/mermaid-render.ts +39 -0
  173. package/src/client/nodes/AxStepControls.tsx +45 -69
  174. package/src/client/nodes/BoardNode.tsx +65 -9
  175. package/src/client/nodes/ContextNode.tsx +88 -396
  176. package/src/client/nodes/ExtAppFrame.tsx +283 -1462
  177. package/src/client/nodes/FileNode.tsx +92 -81
  178. package/src/client/nodes/HtmlNode.tsx +8 -36
  179. package/src/client/nodes/LedgerNode.tsx +31 -17
  180. package/src/client/nodes/MarkdownNode.tsx +8 -17
  181. package/src/client/nodes/McpAppNode.tsx +48 -154
  182. package/src/client/nodes/MermaidNode.tsx +80 -69
  183. package/src/client/nodes/PromptNode.tsx +12 -14
  184. package/src/client/nodes/ResponseNode.tsx +8 -6
  185. package/src/client/nodes/StatusNode.tsx +22 -7
  186. package/src/client/nodes/StatusSummary.tsx +5 -3
  187. package/src/client/nodes/TraceNode.tsx +8 -8
  188. package/src/client/nodes/ViewerFrame.tsx +262 -0
  189. package/src/client/nodes/ViewerHost.tsx +41 -0
  190. package/src/client/nodes/WebpageNode.tsx +22 -24
  191. package/src/client/nodes/iframe-document-url.ts +20 -27
  192. package/src/client/nodes/primitive-copy.ts +97 -0
  193. package/src/client/nodes/use-iframe-content-height.ts +34 -10
  194. package/src/client/nodes/use-surface-frame.ts +22 -11
  195. package/src/client/nodes/viewer-runtime-state.ts +41 -35
  196. package/src/client/state/canvas-store.ts +18 -12
  197. package/src/client/state/intent-bridge.ts +1 -0
  198. package/src/client/state/presentation.ts +135 -15
  199. package/src/client/state/sse-bridge.ts +18 -19
  200. package/src/client/theme/global.css +389 -229
  201. package/src/client/theme/surface-theme.css +6 -6
  202. package/src/json-render/charts/tufte-components.tsx +44 -2
  203. package/src/json-render/renderer/index.css +62 -2
  204. package/src/json-render/renderer/index.tsx +31 -7
  205. package/src/json-render/server.ts +3 -2
  206. package/src/mcp/canvas-access.ts +6 -47
  207. package/src/mcp/resource-subscriptions.ts +181 -0
  208. package/src/mcp/server.ts +185 -219
  209. package/src/server/ax-wait.ts +21 -6
  210. package/src/server/board-export.ts +35 -24
  211. package/src/server/canvas-geometry.ts +1 -0
  212. package/src/server/canvas-operations.ts +6 -2
  213. package/src/server/canvas-state.ts +5 -0
  214. package/src/server/demo-state.json +106 -100
  215. package/src/server/html-primitives.ts +3 -9
  216. package/src/server/html-surface.ts +8 -0
  217. package/src/server/index.ts +30 -12
  218. package/src/server/operations/http.ts +69 -21
  219. package/src/server/operations/index.ts +8 -1
  220. package/src/server/operations/invoker.ts +53 -5
  221. package/src/server/operations/mcp-contracts.ts +354 -0
  222. package/src/server/operations/mcp.ts +153 -18
  223. package/src/server/operations/ops/ax-await.ts +18 -10
  224. package/src/server/operations/ops/ax-read.ts +2 -0
  225. package/src/server/operations/ops/ax-timeline.ts +2 -2
  226. package/src/server/operations/ops/batch.ts +27 -8
  227. package/src/server/operations/ops/boards.ts +1 -3
  228. package/src/server/operations/ops/nodes.ts +18 -3
  229. package/src/server/operations/ops/viewport.ts +11 -9
  230. package/src/server/operations/registry.ts +24 -4
  231. package/src/server/operations/types.ts +16 -2
  232. package/src/server/server.ts +17 -59
  233. package/src/server/tour-control.ts +66 -6
  234. package/src/server/webpage-node.ts +9 -4
  235. package/src/shared/ax-surface-protocol.ts +0 -11
  236. package/src/shared/content-height-reporter.ts +4 -3
  237. package/src/shared/tour.ts +8 -0
@@ -0,0 +1,2 @@
1
+ import{e}from"./index-1r72hdzb.js";var vt=class{constructor(t){this.init=t,this.records=this.init()}static{e(this,"ImperativeState")}reset(){this.records=this.init()}};
2
+ export{vt};
@@ -0,0 +1,207 @@
1
+ import{e,t,w,lt,l,d,f,p,m,g,b,v,r,n,h,Me,fe,Ce}from"./index-1r72hdzb.js";import{V}from"./index-6qmsnxwy.js";import{It}from"./index-qj8fxwsf.js";import{we}from"./index-nprm96xp.js";import{le}from"./index-s4j678gj.js";import{J}from"./index-3cy1bzwh.js";var Je=function(){var i=e(function(Q,T,y,F){for(y=y||{},F=Q.length;F--;y[Q[F]]=T);return y},"o"),u=[1,18],c=[1,19],o=[1,20],A=[1,41],E=[1,26],k=[1,42],D=[1,24],S=[1,25],_=[1,32],U=[1,33],Ne=[1,34],L=[1,45],Le=[1,35],xe=[1,36],ve=[1,37],Ie=[1,38],Oe=[1,27],Ve=[1,28],Pe=[1,29],Re=[1,30],Ge=[1,31],x=[1,44],I=[1,46],O=[1,43],P=[1,47],Ue=[1,9],B=[1,8,9],de=[1,58],pe=[1,59],Ae=[1,60],be=[1,61],ke=[1,62],ze=[1,63],Ye=[1,64],G=[1,8,9,41],Ze=[1,77],H=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],me=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ge=[13,60,86,100,102,103],ee=[13,60,73,74,86,100,102,103],$e=[13,60,68,69,70,71,72,86,100,102,103],Ee=[1,103],te=[1,121],se=[1,117],ie=[1,113],ae=[1,119],re=[1,114],ne=[1,115],ue=[1,116],ce=[1,118],oe=[1,120],et=[22,50,60,61,82,86,87,88,89,90],tt=[1,128],Te=[12,39],Ke=[1,8,9,39,41,44,46],ye=[1,8,9,22],st=[1,153],it=[1,8,9,61],K=[1,8,9,22,50,60,61,82,86,87,88,89,90],We={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:e(function(T,y,F,C,N,s,he){var a=s.length-1;switch(N){case 8:this.$=s[a-1];break;case 9:case 10:case 13:case 15:this.$=s[a];break;case 11:case 14:this.$=s[a-2]+"."+s[a];break;case 12:case 16:this.$=s[a-1]+s[a];break;case 17:case 18:this.$=s[a-1]+"~"+s[a]+"~";break;case 19:C.addRelation(s[a]);break;case 20:s[a-1].title=C.cleanupLabel(s[a]),C.addRelation(s[a-1]);break;case 31:this.$=s[a].trim(),C.setAccTitle(this.$);break;case 32:case 33:this.$=s[a].trim(),C.setAccDescription(this.$);break;case 34:C.addClassesToNamespace(s[a-3],s[a-1][0],s[a-1][1]),C.popNamespace();break;case 35:C.addClassesToNamespace(s[a-4],s[a-1][0],s[a-1][1]),C.popNamespace();break;case 36:this.$=C.addNamespace(s[a]);break;case 37:this.$=C.addNamespace(s[a-1],s[a]);break;case 38:this.$=[[s[a]],[]];break;case 39:this.$=[[s[a-1]],[]];break;case 40:s[a][0].unshift(s[a-2]),this.$=s[a];break;case 41:this.$=[[],[s[a]]];break;case 42:this.$=[[],[s[a-1]]];break;case 43:s[a][1].unshift(s[a-2]),this.$=s[a];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=s[a];break;case 48:C.setCssClass(s[a-2],s[a]);break;case 49:C.addMembers(s[a-3],s[a-1]);break;case 51:C.setCssClass(s[a-5],s[a-3]),C.addMembers(s[a-5],s[a-1]);break;case 52:C.addAnnotation(s[a-3],s[a-1]);break;case 53:C.addAnnotation(s[a-6],s[a-4]),C.addMembers(s[a-6],s[a-1]);break;case 54:C.addAnnotation(s[a-5],s[a-3]);break;case 55:this.$=s[a],C.addClass(s[a]);break;case 56:this.$=s[a-1],C.addClass(s[a-1]),C.setClassLabel(s[a-1],s[a]);break;case 60:C.addAnnotation(s[a],s[a-2]);break;case 61:case 74:this.$=[s[a]];break;case 62:s[a].push(s[a-1]),this.$=s[a];break;case 63:break;case 64:C.addMember(s[a-1],C.cleanupLabel(s[a]));break;case 65:break;case 66:break;case 67:this.$={id1:s[a-2],id2:s[a],relation:s[a-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:s[a-3],id2:s[a],relation:s[a-1],relationTitle1:s[a-2],relationTitle2:"none"};break;case 69:this.$={id1:s[a-3],id2:s[a],relation:s[a-2],relationTitle1:"none",relationTitle2:s[a-1]};break;case 70:this.$={id1:s[a-4],id2:s[a],relation:s[a-2],relationTitle1:s[a-3],relationTitle2:s[a-1]};break;case 71:this.$=C.addNote(s[a],s[a-1]);break;case 72:this.$=C.addNote(s[a]);break;case 73:this.$=s[a-2],C.defineClass(s[a-1],s[a]);break;case 75:this.$=s[a-2].concat([s[a]]);break;case 76:C.setDirection("TB");break;case 77:C.setDirection("BT");break;case 78:C.setDirection("RL");break;case 79:C.setDirection("LR");break;case 80:this.$={type1:s[a-2],type2:s[a],lineType:s[a-1]};break;case 81:this.$={type1:"none",type2:s[a],lineType:s[a-1]};break;case 82:this.$={type1:s[a-1],type2:"none",lineType:s[a]};break;case 83:this.$={type1:"none",type2:"none",lineType:s[a]};break;case 84:this.$=C.relationType.AGGREGATION;break;case 85:this.$=C.relationType.EXTENSION;break;case 86:this.$=C.relationType.COMPOSITION;break;case 87:this.$=C.relationType.DEPENDENCY;break;case 88:this.$=C.relationType.LOLLIPOP;break;case 89:this.$=C.lineType.LINE;break;case 90:this.$=C.lineType.DOTTED_LINE;break;case 91:case 97:this.$=s[a-2],C.setClickEvent(s[a-1],s[a]);break;case 92:case 98:this.$=s[a-3],C.setClickEvent(s[a-2],s[a-1]),C.setTooltip(s[a-2],s[a]);break;case 93:this.$=s[a-2],C.setLink(s[a-1],s[a]);break;case 94:this.$=s[a-3],C.setLink(s[a-2],s[a-1],s[a]);break;case 95:this.$=s[a-3],C.setLink(s[a-2],s[a-1]),C.setTooltip(s[a-2],s[a]);break;case 96:this.$=s[a-4],C.setLink(s[a-3],s[a-2],s[a]),C.setTooltip(s[a-3],s[a-1]);break;case 99:this.$=s[a-3],C.setClickEvent(s[a-2],s[a-1],s[a]);break;case 100:this.$=s[a-4],C.setClickEvent(s[a-3],s[a-2],s[a-1]),C.setTooltip(s[a-3],s[a]);break;case 101:this.$=s[a-3],C.setLink(s[a-2],s[a]);break;case 102:this.$=s[a-4],C.setLink(s[a-3],s[a-1],s[a]);break;case 103:this.$=s[a-4],C.setLink(s[a-3],s[a-1]),C.setTooltip(s[a-3],s[a]);break;case 104:this.$=s[a-5],C.setLink(s[a-4],s[a-2],s[a]),C.setTooltip(s[a-4],s[a-1]);break;case 105:this.$=s[a-2],C.setCssStyle(s[a-1],s[a]);break;case 106:C.setCssClass(s[a-1],s[a]);break;case 107:this.$=[s[a]];break;case 108:s[a-2].push(s[a]),this.$=s[a-2];break;case 110:this.$=s[a-1]+s[a];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:u,35:c,37:o,38:22,42:A,43:23,46:E,48:k,51:D,52:S,54:_,56:U,57:Ne,60:L,62:Le,63:xe,64:ve,65:Ie,75:Oe,76:Ve,78:Pe,82:Re,83:Ge,86:x,100:I,102:O,103:P},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},i(Ue,[2,5],{8:[1,48]}),{8:[1,49]},i(B,[2,19],{22:[1,50]}),i(B,[2,21]),i(B,[2,22]),i(B,[2,23]),i(B,[2,24]),i(B,[2,25]),i(B,[2,26]),i(B,[2,27]),i(B,[2,28]),i(B,[2,29]),i(B,[2,30]),{34:[1,51]},{36:[1,52]},i(B,[2,33]),i(B,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:de,69:pe,70:Ae,71:be,72:ke,73:ze,74:Ye}),{39:[1,65]},i(G,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),i(B,[2,65]),i(B,[2,66]),{16:69,60:L,86:x,100:I,102:O},{16:39,17:40,19:70,60:L,86:x,100:I,102:O,103:P},{16:39,17:40,19:71,60:L,86:x,100:I,102:O,103:P},{16:39,17:40,19:72,60:L,86:x,100:I,102:O,103:P},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:L,86:x,100:I,102:O,103:P},{13:Ze,55:76},{58:78,60:[1,79]},i(B,[2,76]),i(B,[2,77]),i(B,[2,78]),i(B,[2,79]),i(H,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:L,86:x,100:I,102:O,103:P}),i(H,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:L,86:x,100:I,102:O,103:P},{16:39,17:40,19:87,60:L,86:x,100:I,102:O,103:P},i(me,[2,133]),i(me,[2,134]),i(me,[2,135]),i(me,[2,136]),i([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),i(Ue,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:u,35:c,37:o,42:A,46:E,48:k,51:D,52:S,54:_,56:U,57:Ne,60:L,62:Le,63:xe,64:ve,65:Ie,75:Oe,76:Ve,78:Pe,82:Re,83:Ge,86:x,100:I,102:O,103:P}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:u,35:c,37:o,38:22,42:A,43:23,46:E,48:k,51:D,52:S,54:_,56:U,57:Ne,60:L,62:Le,63:xe,64:ve,65:Ie,75:Oe,76:Ve,78:Pe,82:Re,83:Ge,86:x,100:I,102:O,103:P},i(B,[2,20]),i(B,[2,31]),i(B,[2,32]),{13:[1,91],16:39,17:40,19:90,60:L,86:x,100:I,102:O,103:P},{53:92,66:56,67:57,68:de,69:pe,70:Ae,71:be,72:ke,73:ze,74:Ye},i(B,[2,64]),{67:93,73:ze,74:Ye},i(ge,[2,83],{66:94,68:de,69:pe,70:Ae,71:be,72:ke}),i(ee,[2,84]),i(ee,[2,85]),i(ee,[2,86]),i(ee,[2,87]),i(ee,[2,88]),i($e,[2,89]),i($e,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:A,43:23,48:k,54:_,56:U},{16:100,60:L,86:x,100:I,102:O},{41:[1,102],45:101,51:Ee},{16:104,60:L,86:x,100:I,102:O},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:te,50:se,59:110,60:ie,82:ae,84:111,85:112,86:re,87:ne,88:ue,89:ce,90:oe},{60:[1,122]},{13:Ze,55:123},i(G,[2,72]),i(G,[2,138]),{22:te,50:se,59:124,60:ie,61:[1,125],82:ae,84:111,85:112,86:re,87:ne,88:ue,89:ce,90:oe},i(et,[2,74]),{16:39,17:40,19:126,60:L,86:x,100:I,102:O,103:P},i(H,[2,16]),i(H,[2,17]),i(H,[2,18]),{11:127,12:tt,39:[2,36]},i(Te,[2,9],{16:85,17:86,15:130,18:[1,129],60:L,86:x,100:I,102:O,103:P}),i(Te,[2,10]),i(Ke,[2,55],{11:131,12:tt}),i(Ue,[2,7]),{9:[1,132]},i(ye,[2,67]),{16:39,17:40,19:133,60:L,86:x,100:I,102:O,103:P},{13:[1,135],16:39,17:40,19:134,60:L,86:x,100:I,102:O,103:P},i(ge,[2,82],{66:136,68:de,69:pe,70:Ae,71:be,72:ke}),i(ge,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:A,43:23,48:k,54:_,56:U},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},i(G,[2,48],{39:[1,142]}),{41:[1,143]},i(G,[2,50]),{41:[2,61],45:144,51:Ee},{47:[1,145]},{16:39,17:40,19:146,60:L,86:x,100:I,102:O,103:P},i(B,[2,91],{13:[1,147]}),i(B,[2,93],{13:[1,149],77:[1,148]}),i(B,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},i(B,[2,105],{61:st}),i(it,[2,107],{85:154,22:te,50:se,60:ie,82:ae,86:re,87:ne,88:ue,89:ce,90:oe}),i(K,[2,109]),i(K,[2,111]),i(K,[2,112]),i(K,[2,113]),i(K,[2,114]),i(K,[2,115]),i(K,[2,116]),i(K,[2,117]),i(K,[2,118]),i(K,[2,119]),i(B,[2,106]),i(G,[2,71]),i(B,[2,73],{61:st}),{60:[1,155]},i(H,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:L,86:x,100:I,102:O,103:P},i(Te,[2,12]),i(Ke,[2,56]),{1:[2,4]},i(ye,[2,69]),i(ye,[2,68]),{16:39,17:40,19:158,60:L,86:x,100:I,102:O,103:P},i(ge,[2,80]),i(G,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:A,43:23,48:k,54:_,56:U},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:A,43:23,48:k,54:_,56:U},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:A,43:23,48:k,54:_,56:U},{45:163,51:Ee},i(G,[2,49]),{41:[2,62]},i(G,[2,52],{39:[1,164]}),i(B,[2,60]),i(B,[2,92]),i(B,[2,94]),i(B,[2,95],{77:[1,165]}),i(B,[2,98]),i(B,[2,99],{13:[1,166]}),i(B,[2,101],{13:[1,168],77:[1,167]}),{22:te,50:se,60:ie,82:ae,84:169,85:112,86:re,87:ne,88:ue,89:ce,90:oe},i(K,[2,110]),i(et,[2,75]),{14:[1,170]},i(Te,[2,11]),i(ye,[2,70]),i(G,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:Ee},i(B,[2,96]),i(B,[2,100]),i(B,[2,102]),i(B,[2,103],{77:[1,174]}),i(it,[2,108],{85:154,22:te,50:se,60:ie,82:ae,86:re,87:ne,88:ue,89:ce,90:oe}),i(Ke,[2,8]),i(G,[2,51]),{41:[1,175]},i(G,[2,54]),i(B,[2,104]),i(G,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:e(function(T,y){if(y.recoverable)this.trace(T);else{var F=Error(T);throw F.hash=y,F}},"parseError"),parse:e(function(T){var y=this,F=[0],C=[],N=[null],s=[],he=this.table,a="",Fe=0,at=0,rt=0,At=2,nt=1,bt=s.slice.call(arguments,1),M=Object.create(this.lexer),j={yy:{}};for(var Qe in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Qe))j.yy[Qe]=this.yy[Qe];if(M.setInput(T,j.yy),j.yy.lexer=M,j.yy.parser=this,typeof M.yylloc>"u")M.yylloc={};var je=M.yylloc;s.push(je);var ft=M.options&&M.options.ranges;if(typeof j.yy.parseError==="function")this.parseError=j.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function kt(Y){F.length=F.length-2*Y,N.length=N.length-Y,s.length=s.length-Y}e(kt,"popStack");function ut(){var Y=C.pop()||M.lex()||nt;if(typeof Y!=="number"){if(Y instanceof Array)C=Y,Y=C.pop();Y=y.symbols_[Y]||Y}return Y}e(ut,"lex");var R,Xe,X,z,Tt,qe,Z={},Be,W,ct,_e;while(!0){if(X=F[F.length-1],this.defaultActions[X])z=this.defaultActions[X];else{if(R===null||typeof R>"u")R=ut();z=he[X]&&he[X][R]}if(typeof z>"u"||!z.length||!z[0]){var He="";_e=[];for(Be in he[X])if(this.terminals_[Be]&&Be>At)_e.push("'"+this.terminals_[Be]+"'");if(M.showPosition)He="Parse error on line "+(Fe+1)+`:
2
+ `+M.showPosition()+`
3
+ Expecting `+_e.join(", ")+", got '"+(this.terminals_[R]||R)+"'";else He="Parse error on line "+(Fe+1)+": Unexpected "+(R==nt?"end of input":"'"+(this.terminals_[R]||R)+"'");this.parseError(He,{text:M.match,token:this.terminals_[R]||R,line:M.yylineno,loc:je,expected:_e})}if(z[0]instanceof Array&&z.length>1)throw Error("Parse Error: multiple actions possible at state: "+X+", token: "+R);switch(z[0]){case 1:if(F.push(R),N.push(M.yytext),s.push(M.yylloc),F.push(z[1]),R=null,!Xe){if(at=M.yyleng,a=M.yytext,Fe=M.yylineno,je=M.yylloc,rt>0)rt--}else R=Xe,Xe=null;break;case 2:if(W=this.productions_[z[1]][1],Z.$=N[N.length-W],Z._$={first_line:s[s.length-(W||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(W||1)].first_column,last_column:s[s.length-1].last_column},ft)Z._$.range=[s[s.length-(W||1)].range[0],s[s.length-1].range[1]];if(qe=this.performAction.apply(Z,[a,at,Fe,j.yy,z[1],N,s].concat(bt)),typeof qe<"u")return qe;if(W)F=F.slice(0,-1*W*2),N=N.slice(0,-1*W),s=s.slice(0,-1*W);F.push(this.productions_[z[1]][0]),N.push(Z.$),s.push(Z._$),ct=he[F[F.length-2]][F[F.length-1]],F.push(ct);break;case 3:return!0}}return!0},"parse")},pt=function(){var Q={EOF:1,parseError:e(function(y,F){if(this.yy.parser)this.yy.parser.parseError(y,F);else throw Error(y)},"parseError"),setInput:e(function(T,y){if(this.yy=y||this.yy||{},this._input=T,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];return this.offset=0,this},"setInput"),input:e(function(){var T=this._input[0];this.yytext+=T,this.yyleng++,this.offset++,this.match+=T,this.matched+=T;var y=T.match(/(?:\r\n?|\n).*/g);if(y)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),T},"input"),unput:e(function(T){var y=T.length,F=T.split(/(?:\r\n?|\n)/g);this._input=T+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-y),this.offset-=y;var C=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),F.length-1)this.yylineno-=F.length-1;var N=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:F?(F.length===C.length?this.yylloc.first_column:0)+C[C.length-F.length].length-F[0].length:this.yylloc.first_column-y},this.options.ranges)this.yylloc.range=[N[0],N[0]+this.yyleng-y];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(T){this.unput(this.match.slice(T))},"less"),pastInput:e(function(){var T=this.matched.substr(0,this.matched.length-this.match.length);return(T.length>20?"...":"")+T.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var T=this.match;if(T.length<20)T+=this._input.substr(0,20-T.length);return(T.substr(0,20)+(T.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var T=this.pastInput(),y=Array(T.length+1).join("-");return T+this.upcomingInput()+`
5
+ `+y+"^"},"showPosition"),test_match:e(function(T,y){var F,C,N;if(this.options.backtrack_lexer){if(N={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)N.yylloc.range=this.yylloc.range.slice(0)}if(C=T[0].match(/(?:\r\n?|\n).*/g),C)this.yylineno+=C.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:C?C[C.length-1].length-C[C.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+T[0].length},this.yytext+=T[0],this.match+=T[0],this.matches=T,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(T[0].length),this.matched+=T[0],F=this.performAction.call(this,this.yy,this,y,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(F)return F;else if(this._backtrack){for(var s in N)this[s]=N[s];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var T,y,F,C;if(!this._more)this.yytext="",this.match="";var N=this._currentRules();for(var s=0;s<N.length;s++)if(F=this._input.match(this.rules[N[s]]),F&&(!y||F[0].length>y[0].length)){if(y=F,C=s,this.options.backtrack_lexer)if(T=this.test_match(F,N[s]),T!==!1)return T;else if(this._backtrack){y=!1;continue}else return!1;else if(!this.options.flex)break}if(y){if(T=this.test_match(y,N[C]),T!==!1)return T;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var y=this.next();if(y)return y;else return this.lex()},"lex"),begin:e(function(y){this.conditionStack.push(y)},"begin"),popState:e(function(){var y=this.conditionStack.length-1;if(y>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(y){if(y=this.conditionStack.length-1-Math.abs(y||0),y>=0)return this.conditionStack[y];else return"INITIAL"},"topState"),pushState:e(function(y){this.begin(y)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:e(function(y,F,C,N){var s=N;switch(C){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),35;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;break;case 30:return this.popState(),8;break;case 31:break;case 32:return this.begin("namespace-body"),39;break;case 33:this.popState(),this.less(0);break;case 34:return this.popState(),41;break;case 35:return"EOF_IN_STRUCT";case 36:return 8;case 37:break;case 38:return"EDGE_STATE";case 39:return this.begin("class"),48;break;case 40:return this.popState(),8;break;case 41:break;case 42:return this.popState(),this.popState(),41;break;case 43:return this.begin("class-body"),39;break;case 44:return this.popState(),41;break;case 45:return"EOF_IN_STRUCT";case 46:return"EDGE_STATE";case 47:return"OPEN_IN_STRUCT";case 48:break;case 49:return"MEMBER";case 50:return 83;case 51:return 75;case 52:return 76;case 53:return 78;case 54:return 54;case 55:return 56;case 56:return 46;case 57:return 47;case 58:return 81;case 59:this.popState();break;case 60:return"GENERICTYPE";case 61:this.begin("generic");break;case 62:this.popState();break;case 63:return"BQUOTE_STR";case 64:this.begin("bqstring");break;case 65:return 77;case 66:return 77;case 67:return 77;case 68:return 77;case 69:return 69;case 70:return 69;case 71:return 71;case 72:return 71;case 73:return 70;case 74:return 68;case 75:return 72;case 76:return 73;case 77:return 74;case 78:return 22;case 79:return 44;case 80:return 100;case 81:return 18;case 82:return"PLUS";case 83:return 87;case 84:return 61;case 85:return 89;case 86:return 89;case 87:return 90;case 88:return"EQUALS";case 89:return"EQUALS";case 90:return 60;case 91:return 12;case 92:return 14;case 93:return"PUNCTUATION";case 94:return 86;case 95:return 102;case 96:return 50;case 97:return 50;case 98:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,29,34,35,36,37,38,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},namespace:{rules:[26,29,30,31,32,33,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},"class-body":{rules:[26,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},class:{rules:[26,40,41,42,43,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr:{rules:[9,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_title:{rules:[7,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_args:{rules:[22,23,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_name:{rules:[19,20,21,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},href:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},struct:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},generic:{rules:[26,50,51,52,53,54,55,56,57,58,59,60,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},bqstring:{rules:[26,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},string:{rules:[24,25,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,39,50,51,52,53,54,55,56,57,58,61,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,94,95,96,97,98],inclusive:!0}}};return Q}();We.lexer=pt;function De(){this.yy={}}return e(De,"Parser"),De.prototype=We,We.Parser=De,new De}();Je.parser=Je;var Sr=Je,ot=["#","+","~","-",""],ht=class{static{e(this,"ClassMember")}constructor(i,u){this.memberType=u,this.visibility="",this.classifier="",this.text="";let c=w(i,r());this.parseMember(c)}getDisplayDetails(){let i=this.visibility+lt(this.id);if(this.memberType==="method"){if(i+=`(${lt(this.parameters.trim())})`,this.returnType)i+=" : "+lt(this.returnType)}i=i.trim();let u=this.parseClassifier();return{displayText:i,cssStyle:u}}parseMember(i){let u="";if(this.memberType==="method"){let A=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(i);if(A){let E=A[1]?A[1].trim():"";if(ot.includes(E))this.visibility=E;if(this.id=A[2],this.parameters=A[3]?A[3].trim():"",u=A[4]?A[4].trim():"",this.returnType=A[5]?A[5].trim():"",u===""){let k=this.returnType.substring(this.returnType.length-1);if(/[$*]/.exec(k))u=k,this.returnType=this.returnType.substring(0,this.returnType.length-1)}}}else{let o=i.length,A=i.substring(0,1),E=i.substring(o-1);if(ot.includes(A))this.visibility=A;if(/[$*]/.exec(E))u=E;this.id=i.substring(this.visibility===""?0:1,u===""?o:o-1)}this.classifier=u,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();let c=`${this.visibility?"\\"+this.visibility:""}${lt(this.id)}${this.memberType==="method"?`(${lt(this.parameters)})${this.returnType?" : "+lt(this.returnType):""}`:""}`;if(this.text=c.replaceAll("<","&lt;").replaceAll(">","&gt;"),this.text.startsWith("\\&lt;"))this.text=this.text.replace("\\&lt;","~")}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},Se="classId-",dt=0,q=e((i)=>l.sanitizeText(i,r()),"sanitizeText"),Er=class i{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=e((u)=>{let c=It();n(u).select("svg").selectAll("g").filter(function(){return n(this).attr("title")!==null}).on("mouseover",(E)=>{let k=n(E.currentTarget),D=k.attr("title");if(!D)return;let S=E.currentTarget.getBoundingClientRect();c.transition().duration(200).style("opacity",".9"),c.html(V.sanitize(D)).style("left",`${window.scrollX+S.left+S.width/2}px`).style("top",`${window.scrollY+S.bottom+4}px`),k.classed("hover",!0)}).on("mouseout",(E)=>{c.transition().duration(500).style("opacity",0),n(E.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=f,this.getAccTitle=p,this.setAccDescription=m,this.getAccDescription=g,this.setDiagramTitle=b,this.getDiagramTitle=v,this.getConfig=e(()=>r().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.popNamespace=this.popNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{e(this,"ClassDB")}splitClassNameAndType(u){let c=l.sanitizeText(u,r()),o="",A=c;if(c.indexOf("~")>0){let E=c.split("~");A=q(E[0]),o=q(E[1])}return{className:A,type:o}}setClassLabel(u,c){let o=l.sanitizeText(u,r());if(c)c=q(c);let{className:A}=this.splitClassNameAndType(o);this.classes.get(A).label=c,this.classes.get(A).text=`${c}${this.classes.get(A).type?`<${this.classes.get(A).type}>`:""}`}addClass(u){let c=l.sanitizeText(u,r()),{className:o,type:A}=this.splitClassNameAndType(c);if(this.classes.has(o))return;let E=l.sanitizeText(o,r());this.classes.set(E,{id:E,type:A,label:E,text:`${E}${A?`&lt;${A}&gt;`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:Se+E+"-"+dt}),dt++}addInterface(u,c){let o={id:`interface${this.interfaces.length}`,label:u,classId:c};this.interfaces.push(o)}setDiagramId(u){this.diagramId=u}lookUpDomId(u){let c=l.sanitizeText(u,r());if(this.classes.has(c)){let o=this.classes.get(c).domId;return this.diagramId?`${this.diagramId}-${o}`:o}throw Error("Class not found: "+c)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.direction="TB",d()}getClass(u){return this.classes.get(u)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(u){let c=typeof u==="number"?`note${u}`:u;return this.notes.get(c)}getNotes(){return this.notes}addRelation(u){t.debug("Adding relation: "+JSON.stringify(u));let c=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];if(u.relation.type1===this.relationType.LOLLIPOP&&!c.includes(u.relation.type2))this.addClass(u.id2),this.addInterface(u.id1,u.id2),u.id1=`interface${this.interfaces.length-1}`;else if(u.relation.type2===this.relationType.LOLLIPOP&&!c.includes(u.relation.type1))this.addClass(u.id1),this.addInterface(u.id2,u.id1),u.id2=`interface${this.interfaces.length-1}`;else this.addClass(u.id1),this.addClass(u.id2);u.id1=this.splitClassNameAndType(u.id1).className,u.id2=this.splitClassNameAndType(u.id2).className,u.relationTitle1=l.sanitizeText(u.relationTitle1.trim(),r()),u.relationTitle2=l.sanitizeText(u.relationTitle2.trim(),r()),this.relations.push(u)}addAnnotation(u,c){let o=this.splitClassNameAndType(u).className;this.classes.get(o).annotations.push(c)}addMember(u,c){this.addClass(u);let o=this.splitClassNameAndType(u).className,A=this.classes.get(o);if(typeof c==="string"){let E=c.trim();if(E.startsWith("<<")&&E.endsWith(">>"))A.annotations.push(q(E.substring(2,E.length-2)));else if(E.indexOf(")")>0)A.methods.push(new ht(E,"method"));else if(E)A.members.push(new ht(E,"attribute"))}}addMembers(u,c){if(Array.isArray(c))c.reverse(),c.forEach((o)=>this.addMember(u,o))}addNote(u,c){let o=this.notes.size,A={id:`note${o}`,class:c,text:u,index:o};return this.notes.set(A.id,A),A.id}cleanupLabel(u){if(u.startsWith(":"))u=u.substring(1);return q(u.trim())}setCssClass(u,c){u.split(",").forEach((o)=>{let A=o;if(/\d/.exec(o[0]))A=Se+A;A=this.splitClassNameAndType(A).className;let E=this.classes.get(A);if(E)E.cssClasses+=" "+c})}defineClass(u,c){for(let o of u){let A=this.styleClasses.get(o);if(A===void 0)A={id:o,styles:[],textStyles:[]},this.styleClasses.set(o,A);if(c)c.forEach((E)=>{if(/color/.exec(E)){let k=E.replace("fill","bgFill");A.textStyles.push(k)}A.styles.push(E)});this.classes.forEach((E)=>{if(E.cssClasses.includes(o))E.styles.push(...c.flatMap((k)=>k.split(",")))})}}setTooltip(u,c){u.split(",").forEach((o)=>{if(c!==void 0){let A=this.splitClassNameAndType(o).className,E=this.classes.get(A);if(E)E.tooltip=q(c)}})}getTooltip(u,c){if(c&&this.namespaces.has(c))return this.namespaces.get(c).classes.get(u).tooltip;return this.classes.get(u).tooltip}setLink(u,c,o){let A=r();u.split(",").forEach((E)=>{let k=E;if(/\d/.exec(E[0]))k=Se+k;k=this.splitClassNameAndType(k).className;let D=this.classes.get(k);if(D)if(D.link=h.formatUrl(c,A),A.securityLevel==="sandbox")D.linkTarget="_top";else if(typeof o==="string")D.linkTarget=q(o);else D.linkTarget="_blank"}),this.setCssClass(u,"clickable")}setClickEvent(u,c,o){u.split(",").forEach((A)=>{this.setClickFunc(A,c,o);let E=this.splitClassNameAndType(A).className,k=this.classes.get(E);if(k)k.haveCallback=!0}),this.setCssClass(u,"clickable")}setClickFunc(u,c,o){let A=l.sanitizeText(u,r());if(r().securityLevel!=="loose")return;if(c===void 0)return;let k=this.splitClassNameAndType(A).className;if(this.classes.has(k)){let D=[];if(typeof o==="string"){D=o.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let S=0;S<D.length;S++){let _=D[S].trim();if(_.startsWith('"')&&_.endsWith('"'))_=_.substr(1,_.length-2);D[S]=_}}if(D.length===0)D.push(k);this.functions.push(()=>{let S=this.lookUpDomId(k),_=document.querySelector(`[id="${S}"]`);if(_!==null)_.addEventListener("click",()=>{h.runFunc(c,...D)},!1)})}}bindFunctions(u){this.functions.forEach((c)=>{c(u)})}escapeHtml(u){return u.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}getDirection(){return this.direction}setDirection(u){this.direction=u}static resolveQualifiedId(u,c){let o=c.at(-1);return o?`${o}.${u}`:u}static getAncestorIds(u){let c=u.split("."),o=Array(c.length);o[0]=c[0];for(let A=1;A<c.length;A++)o[A]=`${o[A-1]}.${c[A]}`;return o}createNamespaceNode(u,c,o,A=!1){return{id:u,label:c,classes:new Map,notes:new Map,children:new Map,domId:Se+u+"-"+this.namespaceCounter++,parent:o,explicit:A}}linkParentChild(u,c){let o=this.namespaces.get(u),A=this.namespaces.get(c);if(!o||!A)return;if(!o.children.has(c))o.children.set(c,A);A.parent??=u}addNamespace(u,c){let o=i.resolveQualifiedId(u,this.namespaceStack);if(this.namespaceStack.push(o),this.namespaces.has(o)){let k=this.namespaces.get(o);if(k.explicit=!0,c)k.label=c;return o}let A=o.split("."),E=i.getAncestorIds(o);for(let k=0;k<E.length;k++){let D=E[k],S=k>0?E[k-1]:void 0,_=k===E.length-1,U=_&&c?c:A[k];if(!this.namespaces.has(D))this.namespaces.set(D,this.createNamespaceNode(D,U,S,_));else if(_)this.namespaces.get(D).explicit=!0;if(S)this.linkParentChild(S,D)}return o}popNamespace(){this.namespaceStack.pop()}getNamespace(u){return this.namespaces.get(u)}getNamespaces(){return this.namespaces}addClassesToNamespace(u,c,o){if(!this.namespaces.has(u))return;for(let A of c){let{className:E}=this.splitClassNameAndType(A),k=this.getClass(E);k.parent=u,this.namespaces.get(u).classes.set(E,k)}for(let A of o){let E=this.getNote(A);E.parent=u,this.namespaces.get(u).notes.set(A,E)}}setCssStyle(u,c){let o=this.classes.get(u);if(!c||!o)return;for(let A of c)if(A.includes(","))o.styles.push(...A.split(","));else o.styles.push(A)}getArrowMarker(u){let c;switch(u){case 0:c="aggregation";break;case 1:c="extension";break;case 2:c="composition";break;case 3:c="dependency";break;case 4:c="lollipop";break;default:c="none"}return c}resolveExplicitAncestor(u){let c=u;while(c){let o=this.namespaces.get(c);if(!o)return;if(o.explicit)return c;c=o.parent}return}getData(){let u=[],c=[],o=r(),A=o.class?.hierarchicalNamespaces??!0;for(let k of this.namespaces.values()){if(!A&&!k.explicit)continue;let D={id:k.id,label:A?k.label:k.id,isGroup:!0,padding:o.class.padding??16,shape:"rect",cssStyles:[],look:o.look,parentId:A?k.parent:void 0};u.push(D)}for(let k of this.classes.values()){let D=A?k.parent:this.resolveExplicitAncestor(k.parent),S={...k,type:void 0,isGroup:!1,parentId:D,look:o.look};u.push(S)}for(let k of this.notes.values()){let D=A?k.parent:this.resolveExplicitAncestor(k.parent),S={id:k.id,label:k.text,isGroup:!1,shape:"note",padding:o.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${o.themeVariables.noteBkgColor}`,`stroke: ${o.themeVariables.noteBorderColor}`],look:o.look,parentId:D,labelType:"markdown"};u.push(S);let _=this.classes.get(k.class)?.id;if(_){let U={id:`edgeNote${k.index}`,start:k.id,end:_,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:o.look};c.push(U)}}for(let k of this.interfaces){let D={id:k.id,label:k.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:o.look};u.push(D)}let E=0;for(let k of this.relations){E++;let D={id:Me(k.id1,k.id2,{prefix:"id",counter:E}),start:k.id1,end:k.id2,type:"normal",label:k.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(k.relation.type1),arrowTypeEnd:this.getArrowMarker(k.relation.type2),startLabelRight:k.relationTitle1==="none"?"":k.relationTitle1,endLabelLeft:k.relationTitle2==="none"?"":k.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:k.style||"",pattern:k.relation.lineType==1?"dashed":"solid",look:o.look,labelType:"markdown"};c.push(D)}return{nodes:u,edges:c,other:{},config:o,direction:this.getDirection()}}},mt=e((i)=>`g.classGroup text {
7
+ fill: ${i.nodeBorder||i.classText};
8
+ stroke: none;
9
+ font-family: ${i.fontFamily};
10
+ font-size: 10px;
11
+
12
+ .title {
13
+ font-weight: bolder;
14
+ }
15
+
16
+ }
17
+
18
+ .cluster-label text {
19
+ fill: ${i.titleColor};
20
+ }
21
+ .cluster-label span {
22
+ color: ${i.titleColor};
23
+ }
24
+ .cluster-label span p {
25
+ background-color: transparent;
26
+ }
27
+
28
+ .cluster rect {
29
+ fill: ${i.clusterBkg};
30
+ stroke: ${i.clusterBorder};
31
+ stroke-width: 1px;
32
+ }
33
+
34
+ .cluster text {
35
+ fill: ${i.titleColor};
36
+ }
37
+
38
+ .cluster span {
39
+ color: ${i.titleColor};
40
+ }
41
+
42
+ .nodeLabel, .edgeLabel {
43
+ color: ${i.classText};
44
+ }
45
+
46
+ .noteLabel .nodeLabel, .noteLabel .edgeLabel {
47
+ color: ${i.noteTextColor};
48
+ }
49
+ .edgeLabel .label rect {
50
+ fill: ${i.mainBkg};
51
+ }
52
+ .label text {
53
+ fill: ${i.classText};
54
+ }
55
+
56
+ .labelBkg {
57
+ background: ${i.mainBkg};
58
+ }
59
+ .edgeLabel .label span {
60
+ background: ${i.mainBkg};
61
+ }
62
+
63
+ .classTitle {
64
+ font-weight: bolder;
65
+ }
66
+ .node rect,
67
+ .node circle,
68
+ .node ellipse,
69
+ .node polygon,
70
+ .node path {
71
+ fill: ${i.mainBkg};
72
+ stroke: ${i.nodeBorder};
73
+ stroke-width: ${i.strokeWidth};
74
+ }
75
+
76
+
77
+ .divider {
78
+ stroke: ${i.nodeBorder};
79
+ stroke-width: 1;
80
+ }
81
+
82
+ g.clickable {
83
+ cursor: pointer;
84
+ }
85
+
86
+ g.classGroup rect {
87
+ fill: ${i.mainBkg};
88
+ stroke: ${i.nodeBorder};
89
+ }
90
+
91
+ g.classGroup line {
92
+ stroke: ${i.nodeBorder};
93
+ stroke-width: 1;
94
+ }
95
+
96
+ .classLabel .box {
97
+ stroke: none;
98
+ stroke-width: 0;
99
+ fill: ${i.mainBkg};
100
+ opacity: 0.5;
101
+ }
102
+
103
+ .classLabel .label {
104
+ fill: ${i.nodeBorder};
105
+ font-size: 10px;
106
+ }
107
+
108
+ .relation {
109
+ stroke: ${i.lineColor};
110
+ stroke-width: ${i.strokeWidth};
111
+ fill: none;
112
+ }
113
+
114
+ .dashed-line{
115
+ stroke-dasharray: 3;
116
+ }
117
+
118
+ .dotted-line{
119
+ stroke-dasharray: 1 2;
120
+ }
121
+
122
+ [id$="-compositionStart"], .composition {
123
+ fill: ${i.lineColor} !important;
124
+ stroke: ${i.lineColor} !important;
125
+ stroke-width: 1;
126
+ }
127
+
128
+ [id$="-compositionEnd"], .composition {
129
+ fill: ${i.lineColor} !important;
130
+ stroke: ${i.lineColor} !important;
131
+ stroke-width: 1;
132
+ }
133
+
134
+ [id$="-dependencyStart"], .dependency {
135
+ fill: ${i.lineColor} !important;
136
+ stroke: ${i.lineColor} !important;
137
+ stroke-width: 1;
138
+ }
139
+
140
+ [id$="-dependencyEnd"], .dependency {
141
+ fill: ${i.lineColor} !important;
142
+ stroke: ${i.lineColor} !important;
143
+ stroke-width: 1;
144
+ }
145
+
146
+ [id$="-extensionStart"], .extension {
147
+ fill: transparent !important;
148
+ stroke: ${i.lineColor} !important;
149
+ stroke-width: 1;
150
+ }
151
+
152
+ [id$="-extensionEnd"], .extension {
153
+ fill: transparent !important;
154
+ stroke: ${i.lineColor} !important;
155
+ stroke-width: 1;
156
+ }
157
+
158
+ [id$="-aggregationStart"], .aggregation {
159
+ fill: transparent !important;
160
+ stroke: ${i.lineColor} !important;
161
+ stroke-width: 1;
162
+ }
163
+
164
+ [id$="-aggregationEnd"], .aggregation {
165
+ fill: transparent !important;
166
+ stroke: ${i.lineColor} !important;
167
+ stroke-width: 1;
168
+ }
169
+
170
+ [id$="-lollipopStart"], .lollipop {
171
+ fill: ${i.mainBkg} !important;
172
+ stroke: ${i.lineColor} !important;
173
+ stroke-width: 1;
174
+ }
175
+
176
+ [id$="-lollipopEnd"], .lollipop {
177
+ fill: ${i.mainBkg} !important;
178
+ stroke: ${i.lineColor} !important;
179
+ stroke-width: 1;
180
+ }
181
+
182
+ .edgeTerminals {
183
+ font-size: 11px;
184
+ line-height: initial;
185
+ }
186
+
187
+ .classTitleText {
188
+ text-anchor: middle;
189
+ font-size: 18px;
190
+ fill: ${i.textColor};
191
+ }
192
+
193
+ .edgeLabel[data-look="neo"] {
194
+ background-color: ${i.edgeLabelBackground};
195
+ p {
196
+ background-color: ${i.edgeLabelBackground};
197
+ }
198
+ rect {
199
+ opacity: 0.5;
200
+ background-color: ${i.edgeLabelBackground};
201
+ fill: ${i.edgeLabelBackground};
202
+ }
203
+ text-align: center;
204
+ }
205
+ ${we()}
206
+ `,"getStyles"),_r=mt,gt=e((i,u="TB")=>{if(!i.doc)return u;let c=u;for(let o of i.doc)if(o.stmt==="dir")c=o.value;return c},"getDir"),Ct=e(function(i,u){return u.db.getClasses()},"getClasses"),Et=e(async function(i,u,c,o){t.info("REF0:"),t.info("Drawing class diagram (v3)",u);let{securityLevel:A,state:E,layout:k}=r();o.db.setDiagramId(u);let D=o.db.getData(),S=le(u,A);D.type=o.type,D.layoutAlgorithm=Ce(k),D.nodeSpacing=E?.nodeSpacing||50,D.rankSpacing=E?.rankSpacing||50,D.markers=["aggregation","extension","composition","dependency","lollipop"],D.diagramId=u,await fe(D,S);let _=8;h.insertTitle(S,"classDiagramTitleText",E?.titleTopMargin??25,o.db.getDiagramTitle()),J(S,_,"classDiagram",E?.useMaxWidth??!0)},"draw"),Ar={getClasses:Ct,draw:Et,getDir:gt};
207
+ export{Sr,Er,_r,Ar};
@@ -0,0 +1,232 @@
1
+ import{e,t,l,d,f,p,m,g,b,v,r,n,ki,h,fe}from"./index-1r72hdzb.js";import{V}from"./index-6qmsnxwy.js";import{It}from"./index-qj8fxwsf.js";import{le}from"./index-s4j678gj.js";import{J}from"./index-3cy1bzwh.js";var Yt=function(){var s=e(function(tt,u,D,c){for(D=D||{},c=tt.length;c--;D[tt[c]]=u);return D},"o"),i=[1,2],T=[1,3],a=[1,4],E=[2,4],k=[1,9],C=[1,11],x=[1,16],y=[1,17],I=[1,18],O=[1,19],j=[1,33],G=[1,20],R=[1,21],_=[1,22],M=[1,23],U=[1,24],B=[1,26],K=[1,27],Y=[1,28],X=[1,29],W=[1,30],at=[1,31],yt=[1,32],gt=[1,35],Tt=[1,36],bt=[1,37],Et=[1,38],nt=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],mt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],Mt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],wt={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:e(function(u,D,c,L,w,o,ot){var S=o.length-1;switch(w){case 3:return L.setRootDoc(o[S]),o[S];break;case 4:this.$=[];break;case 5:if(o[S]!="nl")o[S-1].push(o[S]),this.$=o[S-1];break;case 6:case 7:this.$=o[S];break;case 8:this.$="nl";break;case 12:this.$=o[S];break;case 13:let _t=o[S-1];_t.description=L.trimColon(o[S]),this.$=_t;break;case 14:this.$={stmt:"relation",state1:o[S-2],state2:o[S]};break;case 15:let Dt=L.trimColon(o[S]);this.$={stmt:"relation",state1:o[S-3],state2:o[S-1],description:Dt};break;case 19:this.$={stmt:"state",id:o[S-3],type:"default",description:"",doc:o[S-1]};break;case 20:var q=o[S],Q=o[S-2].trim();if(o[S].match(":")){var ut=o[S].split(":");q=ut[0],Q=[Q,ut[1]]}this.$={stmt:"state",id:q,type:"default",description:Q};break;case 21:this.$={stmt:"state",id:o[S-3],type:"default",description:o[S-5],doc:o[S-1]};break;case 22:this.$={stmt:"state",id:o[S],type:"fork"};break;case 23:this.$={stmt:"state",id:o[S],type:"join"};break;case 24:this.$={stmt:"state",id:o[S],type:"choice"};break;case 25:this.$={stmt:"state",id:L.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:o[S-1].trim(),note:{position:o[S-2].trim(),text:o[S].trim()}};break;case 29:this.$=o[S].trim(),L.setAccTitle(this.$);break;case 30:case 31:this.$=o[S].trim(),L.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:o[S-3],url:o[S-2],tooltip:o[S-1]};break;case 33:this.$={stmt:"click",id:o[S-3],url:o[S-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:o[S-1].trim(),classes:o[S].trim()};break;case 36:this.$={stmt:"style",id:o[S-1].trim(),styleClass:o[S].trim()};break;case 37:this.$={stmt:"applyClass",id:o[S-1].trim(),styleClass:o[S].trim()};break;case 38:L.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:L.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:L.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:L.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:o[S].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:o[S-2].trim(),classes:[o[S].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:o[S-2].trim(),classes:[o[S].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:i,5:T,6:a},{1:[3]},{3:5,4:i,5:T,6:a},{3:6,4:i,5:T,6:a},s([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],E,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:k,5:C,8:8,9:10,10:12,11:13,12:14,13:15,16:x,17:y,19:I,22:O,24:j,25:G,26:R,27:_,28:M,29:U,32:25,33:B,35:K,37:Y,38:X,41:W,45:at,48:yt,51:gt,52:Tt,53:bt,54:Et,57:nt},s(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:x,17:y,19:I,22:O,24:j,25:G,26:R,27:_,28:M,29:U,32:25,33:B,35:K,37:Y,38:X,41:W,45:at,48:yt,51:gt,52:Tt,53:bt,54:Et,57:nt},s(A,[2,7]),s(A,[2,8]),s(A,[2,9]),s(A,[2,10]),s(A,[2,11]),s(A,[2,12],{14:[1,40],15:[1,41]}),s(A,[2,16]),{18:[1,42]},s(A,[2,18],{20:[1,43]}),{23:[1,44]},s(A,[2,22]),s(A,[2,23]),s(A,[2,24]),s(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},s(A,[2,28]),{34:[1,49]},{36:[1,50]},s(A,[2,31]),{13:51,24:j,57:nt},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},s(mt,[2,44],{58:[1,56]}),s(mt,[2,45],{58:[1,57]}),s(A,[2,38]),s(A,[2,39]),s(A,[2,40]),s(A,[2,41]),s(A,[2,6]),s(A,[2,13]),{13:58,24:j,57:nt},s(A,[2,17]),s(Mt,E,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},s(A,[2,29]),s(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},s(A,[2,14],{14:[1,71]}),{4:k,5:C,8:8,9:10,10:12,11:13,12:14,13:15,16:x,17:y,19:I,21:[1,72],22:O,24:j,25:G,26:R,27:_,28:M,29:U,32:25,33:B,35:K,37:Y,38:X,41:W,45:at,48:yt,51:gt,52:Tt,53:bt,54:Et,57:nt},s(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},s(A,[2,34]),s(A,[2,35]),s(A,[2,36]),s(A,[2,37]),s(mt,[2,46]),s(mt,[2,47]),s(A,[2,15]),s(A,[2,19]),s(Mt,E,{7:78}),s(A,[2,26]),s(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:k,5:C,8:8,9:10,10:12,11:13,12:14,13:15,16:x,17:y,19:I,21:[1,81],22:O,24:j,25:G,26:R,27:_,28:M,29:U,32:25,33:B,35:K,37:Y,38:X,41:W,45:at,48:yt,51:gt,52:Tt,53:bt,54:Et,57:nt},s(A,[2,32]),s(A,[2,33]),s(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:e(function(u,D){if(D.recoverable)this.trace(u);else{var c=Error(u);throw c.hash=D,c}},"parseError"),parse:e(function(u){var D=this,c=[0],L=[],w=[null],o=[],ot=this.table,S="",q=0,Q=0,ut=0,_t=2,Dt=1,pe=o.slice.call(arguments,1),N=Object.create(this.lexer),it={yy:{}};for(var Ot in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Ot))it.yy[Ot]=this.yy[Ot];if(N.setInput(u,it.yy),it.yy.lexer=N,it.yy.parser=this,typeof N.yylloc>"u")N.yylloc={};var Nt=N.yylloc;o.push(Nt);var Se=N.options&&N.options.ranges;if(typeof it.yy.parseError==="function")this.parseError=it.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function ye(z){c.length=c.length-2*z,w.length=w.length-z,o.length=o.length-z}e(ye,"popStack");function Ut(){var z=L.pop()||N.lex()||Dt;if(typeof z!=="number"){if(z instanceof Array)L=z,z=L.pop();z=D.symbols_[z]||z}return z}e(Ut,"lex");var F,Rt,rt,H,Me,$t,lt={},vt,Z,Wt,Ct;while(!0){if(rt=c[c.length-1],this.defaultActions[rt])H=this.defaultActions[rt];else{if(F===null||typeof F>"u")F=Ut();H=ot[rt]&&ot[rt][F]}if(typeof H>"u"||!H.length||!H[0]){var Ft="";Ct=[];for(vt in ot[rt])if(this.terminals_[vt]&&vt>_t)Ct.push("'"+this.terminals_[vt]+"'");if(N.showPosition)Ft="Parse error on line "+(q+1)+`:
2
+ `+N.showPosition()+`
3
+ Expecting `+Ct.join(", ")+", got '"+(this.terminals_[F]||F)+"'";else Ft="Parse error on line "+(q+1)+": Unexpected "+(F==Dt?"end of input":"'"+(this.terminals_[F]||F)+"'");this.parseError(Ft,{text:N.match,token:this.terminals_[F]||F,line:N.yylineno,loc:Nt,expected:Ct})}if(H[0]instanceof Array&&H.length>1)throw Error("Parse Error: multiple actions possible at state: "+rt+", token: "+F);switch(H[0]){case 1:if(c.push(F),w.push(N.yytext),o.push(N.yylloc),c.push(H[1]),F=null,!Rt){if(Q=N.yyleng,S=N.yytext,q=N.yylineno,Nt=N.yylloc,ut>0)ut--}else F=Rt,Rt=null;break;case 2:if(Z=this.productions_[H[1]][1],lt.$=w[w.length-Z],lt._$={first_line:o[o.length-(Z||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(Z||1)].first_column,last_column:o[o.length-1].last_column},Se)lt._$.range=[o[o.length-(Z||1)].range[0],o[o.length-1].range[1]];if($t=this.performAction.apply(lt,[S,Q,q,it.yy,H[1],w,o].concat(pe)),typeof $t<"u")return $t;if(Z)c=c.slice(0,-1*Z*2),w=w.slice(0,-1*Z),o=o.slice(0,-1*Z);c.push(this.productions_[H[1]][0]),w.push(lt.$),o.push(lt._$),Wt=ot[c[c.length-2]][c[c.length-1]],c.push(Wt);break;case 3:return!0}}return!0},"parse")},de=function(){var tt={EOF:1,parseError:e(function(D,c){if(this.yy.parser)this.yy.parser.parseError(D,c);else throw Error(D)},"parseError"),setInput:e(function(u,D){if(this.yy=D||this.yy||{},this._input=u,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];return this.offset=0,this},"setInput"),input:e(function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var D=u.match(/(?:\r\n?|\n).*/g);if(D)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),u},"input"),unput:e(function(u){var D=u.length,c=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-D),this.offset-=D;var L=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1)this.yylineno-=c.length-1;var w=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===L.length?this.yylloc.first_column:0)+L[L.length-c.length].length-c[0].length:this.yylloc.first_column-D},this.options.ranges)this.yylloc.range=[w[0],w[0]+this.yyleng-D];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(u){this.unput(this.match.slice(u))},"less"),pastInput:e(function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var u=this.match;if(u.length<20)u+=this._input.substr(0,20-u.length);return(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var u=this.pastInput(),D=Array(u.length+1).join("-");return u+this.upcomingInput()+`
5
+ `+D+"^"},"showPosition"),test_match:e(function(u,D){var c,L,w;if(this.options.backtrack_lexer){if(w={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)w.yylloc.range=this.yylloc.range.slice(0)}if(L=u[0].match(/(?:\r\n?|\n).*/g),L)this.yylineno+=L.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:L?L[L.length-1].length-L[L.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(u[0].length),this.matched+=u[0],c=this.performAction.call(this,this.yy,this,D,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(c)return c;else if(this._backtrack){for(var o in w)this[o]=w[o];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var u,D,c,L;if(!this._more)this.yytext="",this.match="";var w=this._currentRules();for(var o=0;o<w.length;o++)if(c=this._input.match(this.rules[w[o]]),c&&(!D||c[0].length>D[0].length)){if(D=c,L=o,this.options.backtrack_lexer)if(u=this.test_match(c,w[o]),u!==!1)return u;else if(this._backtrack){D=!1;continue}else return!1;else if(!this.options.flex)break}if(D){if(u=this.test_match(D,w[L]),u!==!1)return u;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var D=this.next();if(D)return D;else return this.lex()},"lex"),begin:e(function(D){this.conditionStack.push(D)},"begin"),popState:e(function(){var D=this.conditionStack.length-1;if(D>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(D){if(D=this.conditionStack.length-1-Math.abs(D||0),D>=0)return this.conditionStack[D];else return"INITIAL"},"topState"),pushState:e(function(D){this.begin(D)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(D,c,L,w){function o(){let S=c.yytext.indexOf("%%");if(S===0)return!1;if(S>0){let q=c.yytext.slice(0,S),Q=c.yytext.slice(S);if(Q)D.lexer.unput(Q);c.yytext=q}return!0}e(o,"processId");var ot=w;switch(L){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;break;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;break;case 17:return this.popState(),"acc_title_value";break;case 18:return this.begin("acc_descr"),35;break;case 19:return this.popState(),"acc_descr_value";break;case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;break;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 25:return this.popState(),this.pushState("CLASSDEFID"),42;break;case 26:return this.popState(),43;break;case 27:return this.pushState("CLASS"),48;break;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;break;case 29:return this.popState(),50;break;case 30:return this.pushState("STYLE"),45;break;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;break;case 32:return this.popState(),47;break;case 33:return this.pushState("SCALE"),17;break;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),c.yytext=c.yytext.slice(0,-8).trim(),25;break;case 38:return this.popState(),c.yytext=c.yytext.slice(0,-8).trim(),26;break;case 39:return this.popState(),c.yytext=c.yytext.slice(0,-10).trim(),27;break;case 40:return this.popState(),c.yytext=c.yytext.slice(0,-8).trim(),25;break;case 41:return this.popState(),c.yytext=c.yytext.slice(0,-8).trim(),26;break;case 42:return this.popState(),c.yytext=c.yytext.slice(0,-10).trim(),27;break;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";break;case 49:if(!o())return;return this.popState(),"ID";break;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:throw Error('Error: State name must be a single word. Found: "'+c.yytext.trim()+'"');case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;break;case 56:return this.popState(),21;break;case 57:break;case 58:return this.begin("NOTE"),29;break;case 59:return this.popState(),this.pushState("NOTE_ID"),59;break;case 60:return this.popState(),this.pushState("NOTE_ID"),60;break;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 63:break;case 64:return"NOTE_TEXT";case 65:if(!o())return;return this.popState(),"ID";break;case 66:if(!o())return;return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 67:return this.popState(),c.yytext=c.yytext.substr(2).trim(),31;break;case 68:return this.popState(),c.yytext=c.yytext.slice(0,-8).trim(),31;break;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!o())return;return 24;case 74:return c.yytext=c.yytext.trim(),14;break;case 75:return 15;case 76:return 28;case 77:return 58;case 78:return 5;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}};return tt}();wt.lexer=de;function kt(){this.yy={}}return e(kt,"Parser"),kt.prototype=wt,wt.Parser=kt,new kt}();Yt.parser=Yt;var Rr=Yt,ge="TB",Qt="TB",jt="dir",ht="state",ct="root",Gt="relation",Te="classDef",be="style",Ee="applyClass",pt="default",Zt="divider",te="fill:none",ee="fill: #333",se="c",ie="markdown",re="normal",Pt="rect",Bt="rectWithTitle",me="stateStart",ke="stateEnd",Ht="divider",zt="roundedWithTitle",_e="note",De="noteGroup",St="statediagram",ve="state",Ce=`${St}-${ve}`,ae="transition",Ae="note",xe="note-edge",Le=`${ae} ${xe}`,Ie=`${St}-${Ae}`,we="cluster",Oe=`${St}-${we}`,Ne="cluster-alt",Re=`${St}-${Ne}`,ne="parent",oe="note",$e="state",Vt="----",Fe=`${Vt}${oe}`,Kt=`${Vt}${ne}`,ce=e((s,i=Qt)=>{if(!s.doc)return i;let T=i;for(let a of s.doc)if(a.stmt==="dir")T=a.value;return T},"getDir"),Pe=e(function(s,i){return i.db.getClasses()},"getClasses"),Be=e(async function(s,i,T,a){t.info("REF0:"),t.info("Drawing state diagram (v2)",i);let{securityLevel:E,state:k,layout:C}=r();a.db.extract(a.db.getRootDocV2());let x=a.db.getData(),y=le(i,E);if(x.type=a.type,x.layoutAlgorithm=C,x.nodeSpacing=k?.nodeSpacing||50,x.rankSpacing=k?.rankSpacing||50,r().look==="neo")x.markers=["barbNeo"];else x.markers=["barb"];x.diagramId=i,await fe(x,y);let O=8;try{(typeof a.db.getLinks==="function"?a.db.getLinks():new Map).forEach((G,R)=>{let _=typeof R==="string"?R:typeof R?.id==="string"?R.id:"",M=x.nodes.find((W)=>W.id===_);if(!_){t.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(R));return}let U=y.node()?.querySelectorAll("g.node, g.rough-node"),B;if(U?.forEach((W)=>{let at=W.textContent?.trim();if(W.id===M?.domId||at===_)B=W}),!B){t.warn("⚠️ Could not find node matching text:",_);return}let K=B.parentNode;if(!K){t.warn("⚠️ Node has no parent, cannot wrap:",_);return}let Y=document.createElementNS("http://www.w3.org/2000/svg","a"),X=G.url.replace(/^"+|"+$/g,"");if(Y.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",X),Y.setAttribute("target","_blank"),G.tooltip){let W=G.tooltip.replace(/^"+|"+$/g,"");Y.setAttribute("title",W),B.setAttribute("title",W)}K.replaceChild(Y,B),Y.appendChild(B),t.info("\uD83D\uDD17 Wrapped node in <a> tag for:",_,G.url)})}catch(j){t.error("❌ Error injecting clickable links:",j)}h.insertTitle(y,"statediagramTitleText",k?.titleTopMargin??25,a.db.getDiagramTitle()),J(y,O,St,k?.useMaxWidth??!0)},"draw"),Ri={getClasses:Pe,draw:Be,getDir:ce},xt=new Map,st=0;function Lt(s="",i=0,T="",a=Vt){let E=T!==null&&T.length>0?`${a}${T}`:"";return`${$e}-${s}${E}-${i}`}e(Lt,"stateDomId");var Ye=e((s,i,T,a,E,k,C,x)=>{t.trace("items",i),i.forEach((y)=>{switch(y.stmt){case ht:ft(s,y,T,a,E,k,C,x);break;case pt:ft(s,y,T,a,E,k,C,x);break;case Gt:{ft(s,y.state1,T,a,E,k,C,x),ft(s,y.state2,T,a,E,k,C,x);let I=C==="neo",O={id:"edge"+st,start:y.state1.id,end:y.state2.id,arrowhead:"normal",arrowTypeEnd:I?"arrow_barb_neo":"arrow_barb",style:te,labelStyle:"",label:l.sanitizeText(y.description??"",r()),arrowheadStyle:ee,labelpos:se,labelType:ie,thickness:re,classes:ae,look:C};E.push(O),st++}break}})},"setupDoc"),Xt=e((s,i=Qt)=>{let T=i;if(s.doc){for(let a of s.doc)if(a.stmt==="dir")T=a.value}return T},"getDir");function dt(s,i,T){if(!i.id||i.id==="</join></fork>"||i.id==="</choice>")return;if(i.cssClasses){if(!Array.isArray(i.cssCompiledStyles))i.cssCompiledStyles=[];i.cssClasses.split(" ").forEach((E)=>{let k=T.get(E);if(k)i.cssCompiledStyles=[...i.cssCompiledStyles??[],...k.styles]})}let a=s.find((E)=>E.id===i.id);if(a)Object.assign(a,i);else s.push(i)}e(dt,"insertOrUpdateNode");function he(s){return s?.classes?.join(" ")??""}e(he,"getClassesFromDbInfo");function ue(s){return s?.styles??[]}e(ue,"getStylesFromDbInfo");var ft=e((s,i,T,a,E,k,C,x)=>{let y=i.id,I=T.get(y),O=he(I),j=ue(I),G=r();if(t.info("dataFetcher parsedItem",i,I,j),y!=="root"){let R=Pt;if(i.start===!0)R=me;else if(i.start===!1)R=ke;if(i.type!==pt)R=i.type;if(!xt.get(y))xt.set(y,{id:y,shape:R,description:l.sanitizeText(y,G),cssClasses:`${O} ${Ce}`,cssStyles:j});let _=xt.get(y);if(i.description){if(Array.isArray(_.description))_.shape=Bt,_.description.push(i.description);else if(_.description?.length&&_.description.length>0)if(_.shape=Bt,_.description===y)_.description=[i.description];else _.description=[_.description,i.description];else _.shape=Pt,_.description=i.description;_.description=l.sanitizeTextOrArray(_.description,G)}if(_.description?.length===1&&_.shape===Bt)if(_.type==="group")_.shape=zt;else _.shape=Pt;if(!_.type&&i.doc)t.info("Setting cluster for XCX",y,Xt(i)),_.type="group",_.isGroup=!0,_.dir=Xt(i),_.explicitDir=i.doc.some((U)=>U.stmt==="dir"),_.shape=i.type===Zt?Ht:zt,_.cssClasses=`${_.cssClasses} ${Oe} ${k?Re:""}`;let M={labelStyle:"",shape:_.shape,label:_.description,cssClasses:_.cssClasses,cssCompiledStyles:[],cssStyles:_.cssStyles,id:y,dir:_.dir,domId:Lt(y,st),type:_.type,isGroup:_.type==="group",padding:8,rx:10,ry:10,look:C,labelType:"markdown"};if(M.shape===Ht)M.label="";if(s&&s.id!=="root")t.trace("Setting node ",y," to be child of its parent ",s.id),M.parentId=s.id;if(M.centerLabel=!0,i.note){let U={labelStyle:"",shape:_e,label:i.note.text,labelType:"markdown",cssClasses:Ie,cssStyles:[],cssCompiledStyles:[],id:y+Fe+"-"+st,domId:Lt(y,st,oe),type:_.type,isGroup:_.type==="group",padding:G.flowchart?.padding,look:C,position:i.note.position},B=y+Kt,K={labelStyle:"",shape:De,label:i.note.text,cssClasses:_.cssClasses,cssStyles:[],id:y+Kt,domId:Lt(y,st,ne),type:"group",isGroup:!0,padding:16,look:C,position:i.note.position};st++,K.id=B,U.parentId=B,dt(a,K,x),dt(a,U,x),dt(a,M,x);let Y=y,X=U.id;if(i.note.position==="left of")Y=U.id,X=y;E.push({id:Y+"-"+X,start:Y,end:X,arrowhead:"none",arrowTypeEnd:"",style:te,labelStyle:"",classes:Le,arrowheadStyle:ee,labelpos:se,labelType:ie,thickness:re,look:C})}else dt(a,M,x)}if(i.doc)t.trace("Adding nodes children "),Ye(i,i.doc,T,a,E,!k,C,x)},"dataFetcher"),Ge=e(()=>{xt.clear(),st=0},"reset"),P={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Jt=e(()=>new Map,"newClassesList"),qt=e(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),At=e((s)=>JSON.parse(JSON.stringify(s)),"clone"),et=class{constructor(s){this.version=s,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Jt(),this.documents={root:qt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=p,this.setAccTitle=f,this.getAccDescription=g,this.setAccDescription=m,this.setDiagramTitle=b,this.getDiagramTitle=v,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{e(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(s){this.clear(!0);for(let a of Array.isArray(s)?s:s.doc)switch(a.stmt){case ht:this.addState(a.id.trim(),a.type,a.doc,a.description,a.note);break;case Gt:this.addRelation(a.state1,a.state2,a.description);break;case Te:this.addStyleClass(a.id.trim(),a.classes);break;case be:this.handleStyleDef(a);break;case Ee:this.setCssClass(a.id.trim(),a.styleClass);break;case"click":this.addLink(a.id,a.url,a.tooltip);break}let i=this.getStates(),T=r();Ge(),ft(void 0,this.getRootDocV2(),i,this.nodes,this.edges,!0,T.look,this.classes);for(let a of this.nodes){if(!Array.isArray(a.label))continue;if(a.description=a.label.slice(1),a.isGroup&&a.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${a.id}]`);a.label=a.label[0]}}handleStyleDef(s){let i=s.id.trim().split(","),T=s.styleClass.split(",");for(let a of i){let E=this.getState(a);if(!E){let k=a.trim();this.addState(k),E=this.getState(k)}if(E)E.styles=T.map((k)=>k.replace(/;/g,"")?.trim())}}setRootDoc(s){if(t.info("Setting root doc",s),this.rootDoc=s,this.version===1)this.extract(s);else this.extract(this.getRootDocV2())}docTranslator(s,i,T){if(i.stmt===Gt){this.docTranslator(s,i.state1,!0),this.docTranslator(s,i.state2,!1);return}if(i.stmt===ht)if(i.id===P.START_NODE)i.id=s.id+(T?"_start":"_end"),i.start=T;else i.id=i.id.trim();if(i.stmt!==ct&&i.stmt!==ht||!i.doc)return;let a=[],E=[];for(let k of i.doc)if(k.type===Zt){let C=At(k);C.doc=At(E),a.push(C),E=[]}else E.push(k);if(a.length>0&&E.length>0){let k={stmt:ht,id:ki(),type:"divider",doc:At(E)};a.push(At(k)),i.doc=a}i.doc.forEach((k)=>this.docTranslator(i,k,!0))}getRootDocV2(){return this.docTranslator({id:ct,stmt:ct},{id:ct,stmt:ct,doc:this.rootDoc},!0),{id:ct,doc:this.rootDoc}}addState(s,i=pt,T=void 0,a=void 0,E=void 0,k=void 0,C=void 0,x=void 0){let y=s?.trim();if(!this.currentDocument.states.has(y))t.info("Adding state ",y,a),this.currentDocument.states.set(y,{stmt:ht,id:y,descriptions:[],type:i,doc:T,note:E,classes:[],styles:[],textStyles:[]});else{let I=this.currentDocument.states.get(y);if(!I)throw Error(`State not found: ${y}`);if(!I.doc)I.doc=T;if(!I.type)I.type=i}if(a)t.info("Setting state description",y,a),(Array.isArray(a)?a:[a]).forEach((O)=>this.addDescription(y,O.trim()));if(E){let I=this.currentDocument.states.get(y);if(!I)throw Error(`State not found: ${y}`);I.note=E,I.note.text=l.sanitizeText(I.note.text,r())}if(k)t.info("Setting state classes",y,k),(Array.isArray(k)?k:[k]).forEach((O)=>this.setCssClass(y,O.trim()));if(C)t.info("Setting state styles",y,C),(Array.isArray(C)?C:[C]).forEach((O)=>this.setStyle(y,O.trim()));if(x)t.info("Setting state styles",y,C),(Array.isArray(x)?x:[x]).forEach((O)=>this.setTextStyle(y,O.trim()))}clear(s){if(this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:qt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Jt(),!s)this.links=new Map,d()}getState(s){return this.currentDocument.states.get(s)}getStates(){return this.currentDocument.states}logDocuments(){t.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(s,i,T){this.links.set(s,{url:i,tooltip:T}),t.warn("Adding link",s,i,T)}getLinks(){return this.links}startIdIfNeeded(s=""){if(s===P.START_NODE)return this.startEndCount++,`${P.START_TYPE}${this.startEndCount}`;return s}startTypeIfNeeded(s="",i=pt){return s===P.START_NODE?P.START_TYPE:i}endIdIfNeeded(s=""){if(s===P.END_NODE)return this.startEndCount++,`${P.END_TYPE}${this.startEndCount}`;return s}endTypeIfNeeded(s="",i=pt){return s===P.END_NODE?P.END_TYPE:i}addRelationObjs(s,i,T=""){let a=this.startIdIfNeeded(s.id.trim()),E=this.startTypeIfNeeded(s.id.trim(),s.type),k=this.startIdIfNeeded(i.id.trim()),C=this.startTypeIfNeeded(i.id.trim(),i.type);this.addState(a,E,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),this.addState(k,C,i.doc,i.description,i.note,i.classes,i.styles,i.textStyles),this.currentDocument.relations.push({id1:a,id2:k,relationTitle:l.sanitizeText(T,r())})}addRelation(s,i,T){if(typeof s==="object"&&typeof i==="object")this.addRelationObjs(s,i,T);else if(typeof s==="string"&&typeof i==="string"){let a=this.startIdIfNeeded(s.trim()),E=this.startTypeIfNeeded(s),k=this.endIdIfNeeded(i.trim()),C=this.endTypeIfNeeded(i);this.addState(a,E),this.addState(k,C),this.currentDocument.relations.push({id1:a,id2:k,relationTitle:T?l.sanitizeText(T,r()):void 0})}}addDescription(s,i){let T=this.currentDocument.states.get(s),a=i.startsWith(":")?i.replace(":","").trim():i;T?.descriptions?.push(l.sanitizeText(a,r()))}cleanupLabel(s){return s.startsWith(":")?s.slice(2).trim():s.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(s,i=""){if(!this.classes.has(s))this.classes.set(s,{id:s,styles:[],textStyles:[]});let T=this.classes.get(s);if(i&&T)i.split(P.STYLECLASS_SEP).forEach((a)=>{let E=a.replace(/([^;]*);/,"$1").trim();if(RegExp(P.COLOR_KEYWORD).exec(a)){let C=E.replace(P.FILL_KEYWORD,P.BG_FILL).replace(P.COLOR_KEYWORD,P.FILL_KEYWORD);T.textStyles.push(C)}T.styles.push(E)})}getClasses(){return this.classes}setupToolTips(s){let i=It();n(s).select("svg").selectAll("g.node, g.rough-node").on("mouseover",(E)=>{let k=n(E.currentTarget),C=k.attr("title");if(C===null)return;let x=E.currentTarget?.getBoundingClientRect();i.transition().duration(200).style("opacity",".9"),i.style("left",window.scrollX+x.left+(x.right-x.left)/2+"px").style("top",window.scrollY+x.bottom+"px"),i.html(V.sanitize(C)),k.classed("hover",!0)}).on("mouseout",(E)=>{i.transition().duration(500).style("opacity",0),n(E.currentTarget).classed("hover",!1)})}setCssClass(s,i){s.split(",").forEach((T)=>{let a=this.getState(T);if(!a){let E=T.trim();this.addState(E),a=this.getState(E)}a?.classes?.push(i)})}setStyle(s,i){this.getState(s)?.styles?.push(i)}setTextStyle(s,i){this.getState(s)?.textStyles?.push(i)}bindFunctions(s){this.funs.forEach((i)=>{i(s)})}getDirectionStatement(){return this.rootDoc.find((s)=>s.stmt===jt)}getDirection(){return this.getDirectionStatement()?.value??ge}setDirection(s){let i=this.getDirectionStatement();if(i)i.value=s;else this.rootDoc.unshift({stmt:jt,value:s})}trimColon(s){return s.startsWith(":")?s.slice(1).trim():s.trim()}getData(){let s=r();return{nodes:this.nodes,edges:this.edges,other:{},config:s,direction:ce(this.getRootDocV2())}}getConfig(){return r().state}},Ve=e((s)=>`
7
+ defs [id$="-barbEnd"] {
8
+ fill: ${s.transitionColor};
9
+ stroke: ${s.transitionColor};
10
+ }
11
+ g.stateGroup text {
12
+ fill: ${s.nodeBorder};
13
+ stroke: none;
14
+ font-size: 10px;
15
+ }
16
+ g.stateGroup text {
17
+ fill: ${s.textColor};
18
+ stroke: none;
19
+ font-size: 10px;
20
+
21
+ }
22
+ g.stateGroup .state-title {
23
+ font-weight: bolder;
24
+ fill: ${s.stateLabelColor};
25
+ }
26
+
27
+ g.stateGroup rect {
28
+ fill: ${s.mainBkg};
29
+ stroke: ${s.nodeBorder};
30
+ }
31
+
32
+ g.stateGroup line {
33
+ stroke: ${s.lineColor};
34
+ stroke-width: ${s.strokeWidth||1};
35
+ }
36
+
37
+ .transition {
38
+ stroke: ${s.transitionColor};
39
+ stroke-width: ${s.strokeWidth||1};
40
+ fill: none;
41
+ }
42
+
43
+ .stateGroup .composit {
44
+ fill: ${s.background};
45
+ border-bottom: 1px
46
+ }
47
+
48
+ .stateGroup .alt-composit {
49
+ fill: #e0e0e0;
50
+ border-bottom: 1px
51
+ }
52
+
53
+ .state-note {
54
+ stroke: ${s.noteBorderColor};
55
+ fill: ${s.noteBkgColor};
56
+
57
+ text {
58
+ fill: ${s.noteTextColor};
59
+ stroke: none;
60
+ font-size: 10px;
61
+ }
62
+ }
63
+
64
+ .stateLabel .box {
65
+ stroke: none;
66
+ stroke-width: 0;
67
+ fill: ${s.mainBkg};
68
+ opacity: 0.5;
69
+ }
70
+
71
+ .edgeLabel .label rect {
72
+ fill: ${s.labelBackgroundColor};
73
+ opacity: 0.5;
74
+ }
75
+ .edgeLabel {
76
+ background-color: ${s.edgeLabelBackground};
77
+ p {
78
+ background-color: ${s.edgeLabelBackground};
79
+ }
80
+ rect {
81
+ opacity: 0.5;
82
+ background-color: ${s.edgeLabelBackground};
83
+ fill: ${s.edgeLabelBackground};
84
+ }
85
+ text-align: center;
86
+ }
87
+ .edgeLabel .label text {
88
+ fill: ${s.transitionLabelColor||s.tertiaryTextColor};
89
+ }
90
+ .label div .edgeLabel {
91
+ color: ${s.transitionLabelColor||s.tertiaryTextColor};
92
+ }
93
+
94
+ .stateLabel text {
95
+ fill: ${s.stateLabelColor};
96
+ font-size: 10px;
97
+ font-weight: bold;
98
+ }
99
+
100
+ .node circle.state-start {
101
+ fill: ${s.specialStateColor};
102
+ stroke: ${s.specialStateColor};
103
+ }
104
+
105
+ .node .fork-join {
106
+ fill: ${s.specialStateColor};
107
+ stroke: ${s.specialStateColor};
108
+ }
109
+
110
+ .node circle.state-end {
111
+ fill: ${s.innerEndBackground};
112
+ stroke: ${s.background};
113
+ stroke-width: 1.5
114
+ }
115
+ .end-state-inner {
116
+ fill: ${s.compositeBackground||s.background};
117
+ // stroke: ${s.background};
118
+ stroke-width: 1.5
119
+ }
120
+
121
+ .node rect {
122
+ fill: ${s.stateBkg||s.mainBkg};
123
+ stroke: ${s.stateBorder||s.nodeBorder};
124
+ stroke-width: ${s.strokeWidth||1}px;
125
+ }
126
+ .node polygon {
127
+ fill: ${s.mainBkg};
128
+ stroke: ${s.stateBorder||s.nodeBorder};;
129
+ stroke-width: ${s.strokeWidth||1}px;
130
+ }
131
+ [id$="-barbEnd"] {
132
+ fill: ${s.lineColor};
133
+ }
134
+
135
+ .statediagram-cluster rect {
136
+ fill: ${s.compositeTitleBackground};
137
+ stroke: ${s.stateBorder||s.nodeBorder};
138
+ stroke-width: ${s.strokeWidth||1}px;
139
+ }
140
+
141
+ .cluster-label, .nodeLabel {
142
+ color: ${s.stateLabelColor};
143
+ // line-height: 1;
144
+ }
145
+
146
+ .statediagram-cluster rect.outer {
147
+ rx: 5px;
148
+ ry: 5px;
149
+ }
150
+ .statediagram-state .divider {
151
+ stroke: ${s.stateBorder||s.nodeBorder};
152
+ }
153
+
154
+ .statediagram-state .title-state {
155
+ rx: 5px;
156
+ ry: 5px;
157
+ }
158
+ .statediagram-cluster.statediagram-cluster .inner {
159
+ fill: ${s.compositeBackground||s.background};
160
+ }
161
+ .statediagram-cluster.statediagram-cluster-alt .inner {
162
+ fill: ${s.altBackground?s.altBackground:"#efefef"};
163
+ }
164
+
165
+ .statediagram-cluster .inner {
166
+ rx:0;
167
+ ry:0;
168
+ }
169
+
170
+ .statediagram-state rect.basic {
171
+ rx: 5px;
172
+ ry: 5px;
173
+ }
174
+ .statediagram-state rect.divider {
175
+ stroke-dasharray: 10,10;
176
+ fill: ${s.altBackground?s.altBackground:"#efefef"};
177
+ }
178
+
179
+ .note-edge {
180
+ stroke-dasharray: 5;
181
+ }
182
+
183
+ .statediagram-note rect {
184
+ fill: ${s.noteBkgColor};
185
+ stroke: ${s.noteBorderColor};
186
+ stroke-width: 1px;
187
+ rx: 0;
188
+ ry: 0;
189
+ }
190
+ .statediagram-note rect {
191
+ fill: ${s.noteBkgColor};
192
+ stroke: ${s.noteBorderColor};
193
+ stroke-width: 1px;
194
+ rx: 0;
195
+ ry: 0;
196
+ }
197
+
198
+ .statediagram-note text {
199
+ fill: ${s.noteTextColor};
200
+ }
201
+
202
+ .statediagram-note .nodeLabel {
203
+ color: ${s.noteTextColor};
204
+ }
205
+ .statediagram .edgeLabel {
206
+ color: red; // ${s.noteTextColor};
207
+ }
208
+
209
+ [id$="-dependencyStart"], [id$="-dependencyEnd"] {
210
+ fill: ${s.lineColor};
211
+ stroke: ${s.lineColor};
212
+ stroke-width: ${s.strokeWidth||1};
213
+ }
214
+
215
+ .statediagramTitleText {
216
+ text-anchor: middle;
217
+ font-size: 18px;
218
+ fill: ${s.textColor};
219
+ }
220
+
221
+ [data-look="neo"].statediagram-cluster rect {
222
+ fill: ${s.mainBkg};
223
+ stroke: ${s.useGradient?"url("+s.svgId+"-gradient)":s.stateBorder||s.nodeBorder};
224
+ stroke-width: ${s.strokeWidth??1};
225
+ }
226
+ [data-look="neo"].statediagram-cluster rect.outer {
227
+ rx: ${s.radius}px;
228
+ ry: ${s.radius}px;
229
+ filter: ${s.dropShadow?s.dropShadow.replace("url(#drop-shadow)",`url(${s.svgId}-drop-shadow)`):"none"}
230
+ }
231
+ `,"getStyles"),Ir=Ve;
232
+ export{Rr,Ri,et,Ir};