jekyll-obsidian-site 0.2.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 (191) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +133 -0
  4. data/website/_config.yml +21 -0
  5. data/website/_includes/website/archive-timeline.html +8 -0
  6. data/website/_includes/website/blog-ledger.html +19 -0
  7. data/website/_includes/website/blog-navigation.html +7 -0
  8. data/website/_includes/website/comments.html +22 -0
  9. data/website/_includes/website/contact-icon.html +14 -0
  10. data/website/_includes/website/context-tags.html +7 -0
  11. data/website/_includes/website/context.html +3 -0
  12. data/website/_includes/website/dialogs.html +71 -0
  13. data/website/_includes/website/docs-navigation.html +7 -0
  14. data/website/_includes/website/docs-tree.html +8 -0
  15. data/website/_includes/website/footer.html +14 -0
  16. data/website/_includes/website/github-icon.html +3 -0
  17. data/website/_includes/website/head.html +41 -0
  18. data/website/_includes/website/header.html +35 -0
  19. data/website/_includes/website/language-switcher.html +16 -0
  20. data/website/_includes/website/local-graph.html +25 -0
  21. data/website/_includes/website/note-header.html +35 -0
  22. data/website/_includes/website/outline.html +9 -0
  23. data/website/_includes/website/page-actions.html +34 -0
  24. data/website/_includes/website/portfolio-grid.html +36 -0
  25. data/website/_includes/website/portfolio-topics.html +4 -0
  26. data/website/_includes/website/post-cards.html +16 -0
  27. data/website/_includes/website/related-articles.html +7 -0
  28. data/website/_includes/website/relations.html +16 -0
  29. data/website/_includes/website/source-actions.html +28 -0
  30. data/website/_includes/website/system-page.html +31 -0
  31. data/website/_includes/website/tab-collection.html +28 -0
  32. data/website/_includes/website/tag-filter.html +12 -0
  33. data/website/_layouts/website-docs.html +20 -0
  34. data/website/_layouts/website-minimal.html +93 -0
  35. data/website/_layouts/website-redirect.html +17 -0
  36. data/website/assets/chunks/abnfDiagram-N423BO3Z-TSORAEI2.js +1 -0
  37. data/website/assets/chunks/architecture-TIHT7OUA-OUC5PEC7.js +1 -0
  38. data/website/assets/chunks/architectureDiagram-T3A2C74G-6P5MB2DJ.js +36 -0
  39. data/website/assets/chunks/blockDiagram-VBNYF7ZC-ZWINYROZ.js +132 -0
  40. data/website/assets/chunks/c4Diagram-5PPSVZJV-R5RMEAOT.js +10 -0
  41. data/website/assets/chunks/chunk-22DRK7VS.js +1 -0
  42. data/website/assets/chunks/chunk-25REBZ7M.js +2 -0
  43. data/website/assets/chunks/chunk-2RQCUDTG.js +1 -0
  44. data/website/assets/chunks/chunk-34FHPXU4.js +1 -0
  45. data/website/assets/chunks/chunk-57XXJOQN.js +10 -0
  46. data/website/assets/chunks/chunk-6DCNDVBX.js +2 -0
  47. data/website/assets/chunks/chunk-6DHFEWGX.js +1 -0
  48. data/website/assets/chunks/chunk-6VQ47JJS.js +2 -0
  49. data/website/assets/chunks/chunk-7CSIRG7W.js +127 -0
  50. data/website/assets/chunks/chunk-A43YELH5.js +1 -0
  51. data/website/assets/chunks/chunk-AIX6IH4O.js +1 -0
  52. data/website/assets/chunks/chunk-B3K7RH5O.js +88 -0
  53. data/website/assets/chunks/chunk-CBGUD2NP.js +1 -0
  54. data/website/assets/chunks/chunk-D3WOCELE.js +1 -0
  55. data/website/assets/chunks/chunk-D6FURU6X.js +1 -0
  56. data/website/assets/chunks/chunk-DGEGT77F.js +1 -0
  57. data/website/assets/chunks/chunk-DN52R6U7.js +1 -0
  58. data/website/assets/chunks/chunk-E3T3IFAC.js +1 -0
  59. data/website/assets/chunks/chunk-EIBFAW37.js +1 -0
  60. data/website/assets/chunks/chunk-ERWOH47R.js +1 -0
  61. data/website/assets/chunks/chunk-ETOVTYWF.js +1 -0
  62. data/website/assets/chunks/chunk-GHD3PFWA.js +231 -0
  63. data/website/assets/chunks/chunk-GMBKQ7NZ.js +1 -0
  64. data/website/assets/chunks/chunk-GQM25EPP.js +156 -0
  65. data/website/assets/chunks/chunk-GSOU4UTT.js +1 -0
  66. data/website/assets/chunks/chunk-HEMELP7J.js +1 -0
  67. data/website/assets/chunks/chunk-HZ5I5NJO.js +1 -0
  68. data/website/assets/chunks/chunk-IP56FOSI.js +70 -0
  69. data/website/assets/chunks/chunk-L7BMR7WL.js +1 -0
  70. data/website/assets/chunks/chunk-LGUG3SQB.js +1 -0
  71. data/website/assets/chunks/chunk-LOMHZYS2.js +1 -0
  72. data/website/assets/chunks/chunk-MII4VZEB.js +3 -0
  73. data/website/assets/chunks/chunk-MYMJLHQL.js +62 -0
  74. data/website/assets/chunks/chunk-NBH7YOBD.js +15 -0
  75. data/website/assets/chunks/chunk-NCOVM3YF.js +1 -0
  76. data/website/assets/chunks/chunk-OAGTSILX.js +1 -0
  77. data/website/assets/chunks/chunk-OCX5OCIU.js +321 -0
  78. data/website/assets/chunks/chunk-OE3NOVIH.js +1 -0
  79. data/website/assets/chunks/chunk-PLP5XUTJ.js +1 -0
  80. data/website/assets/chunks/chunk-PNOERP6G.js +1 -0
  81. data/website/assets/chunks/chunk-QBPQ7DPE.js +1 -0
  82. data/website/assets/chunks/chunk-RWFFDL53.js +1 -0
  83. data/website/assets/chunks/chunk-SEGIW3MP.js +1 -0
  84. data/website/assets/chunks/chunk-SZDMZNUS.js +1 -0
  85. data/website/assets/chunks/chunk-T2QBAPVT.js +1 -0
  86. data/website/assets/chunks/chunk-UE533OZ7.js +1 -0
  87. data/website/assets/chunks/chunk-UTWOJE2A.js +1 -0
  88. data/website/assets/chunks/chunk-VOCDYA3H.js +1 -0
  89. data/website/assets/chunks/chunk-VYZZPKGK.js +161 -0
  90. data/website/assets/chunks/chunk-WWLZIRS6.js +1 -0
  91. data/website/assets/chunks/chunk-XNXYDBKX.js +32 -0
  92. data/website/assets/chunks/chunk-XQUIO562.js +1 -0
  93. data/website/assets/chunks/chunk-Y2XVFW7T.js +2 -0
  94. data/website/assets/chunks/chunk-YORIST7Z.js +1 -0
  95. data/website/assets/chunks/chunk-Z2WBQPVY.js +206 -0
  96. data/website/assets/chunks/classDiagram-JCYQIIEL-OFDVDDIM.js +1 -0
  97. data/website/assets/chunks/classDiagram-v2-OCEON4UE-E36B6BGQ.js +1 -0
  98. data/website/assets/chunks/cose-bilkent-JH36ORCC-CBAW64AB.js +1 -0
  99. data/website/assets/chunks/cynefin-VYW2F7L2-CBO6DLNV.js +1 -0
  100. data/website/assets/chunks/cynefinDiagram-MW4NZA55-DFINLOUY.js +62 -0
  101. data/website/assets/chunks/dagre-VZM6K2ZE-BZFBSZAH.js +4 -0
  102. data/website/assets/chunks/diagram-7IWD3JNH-XQHTVOU2.js +30 -0
  103. data/website/assets/chunks/diagram-B4RE2ZJO-FTSXBZJR.js +3 -0
  104. data/website/assets/chunks/diagram-LBJQPF4R-ZSZW4OLH.js +24 -0
  105. data/website/assets/chunks/diagram-Q27KOJAE-2IV5TVCJ.js +24 -0
  106. data/website/assets/chunks/diagram-UB23O5K3-D6PDUTFL.js +41 -0
  107. data/website/assets/chunks/ebnfDiagram-BXEA7PRR-C6MAER3M.js +1 -0
  108. data/website/assets/chunks/erDiagram-JOGREHBK-EDAD2H5M.js +85 -0
  109. data/website/assets/chunks/eventmodeling-45OFAUF4-4K577DMF.js +1 -0
  110. data/website/assets/chunks/flowDiagram-UKHOOZJN-545F4YX3.js +1 -0
  111. data/website/assets/chunks/ganttDiagram-PKOTCBZU-7A7EKMY3.js +292 -0
  112. data/website/assets/chunks/gitGraph-TEB2WS4Q-3WUB7WYQ.js +1 -0
  113. data/website/assets/chunks/gitGraphDiagram-DS77QQ5N-A5UWV5FF.js +106 -0
  114. data/website/assets/chunks/info-DKCQHKI2-EOOHI7XS.js +1 -0
  115. data/website/assets/chunks/infoDiagram-6WML65LV-CWIOOWJP.js +2 -0
  116. data/website/assets/chunks/ishikawaDiagram-WSZJBQD7-CEASQVDL.js +70 -0
  117. data/website/assets/chunks/journeyDiagram-NVQOT4AX-LYG3S2AW.js +139 -0
  118. data/website/assets/chunks/kanban-definition-27J2QSJJ-HCC6KAYI.js +89 -0
  119. data/website/assets/chunks/katex-F4MQ6FB3.js +257 -0
  120. data/website/assets/chunks/mindmap-definition-FAOFIHXS-JMGSM3RE.js +96 -0
  121. data/website/assets/chunks/packet-7NZHBO7P-W3SJA3MY.js +1 -0
  122. data/website/assets/chunks/pegDiagram-VL7TDLO6-4JO3Y3Z3.js +1 -0
  123. data/website/assets/chunks/pie-RZYD4A2V-YOIQBTY7.js +1 -0
  124. data/website/assets/chunks/pieDiagram-7S7Q4E2Y-VFQ7SE46.js +39 -0
  125. data/website/assets/chunks/quadrantDiagram-CIZ2JOQS-JISDI2S6.js +7 -0
  126. data/website/assets/chunks/radar-I7S5WNFK-NMKP5AZO.js +1 -0
  127. data/website/assets/chunks/railroad-3IZDKUUU-7MOIV7CI.js +1 -0
  128. data/website/assets/chunks/railroad-abnf-AHOZXSZD-HXNH5SLO.js +1 -0
  129. data/website/assets/chunks/railroad-ebnf-EBAXGLYW-OWDJEWMK.js +1 -0
  130. data/website/assets/chunks/railroad-peg-LSFZ7HO6-ASSINGP5.js +1 -0
  131. data/website/assets/chunks/railroadDiagram-AXF67PYL-AFV5VP5F.js +1 -0
  132. data/website/assets/chunks/requirementDiagram-LRYGKXZP-RNRPEHHN.js +84 -0
  133. data/website/assets/chunks/sankeyDiagram-W5VNT64P-O54R2L3E.js +40 -0
  134. data/website/assets/chunks/sequenceDiagram-SI44F4Z6-42WISKJ7.js +162 -0
  135. data/website/assets/chunks/sizeCapture-X5ZJPWSS-LRN2Q37T.js +1 -0
  136. data/website/assets/chunks/stateDiagram-OKZ733FA-BWIBJXIR.js +1 -0
  137. data/website/assets/chunks/stateDiagram-v2-UEYNNEHI-L73LHL3L.js +1 -0
  138. data/website/assets/chunks/swimlanes-SLNWSIFB-ECOAE7LQ.js +1 -0
  139. data/website/assets/chunks/swimlanesDiagram-ULZ7WXOC-3CKKKFZZ.js +8 -0
  140. data/website/assets/chunks/timeline-definition-Z64GVDOM-HR2OL5G7.js +120 -0
  141. data/website/assets/chunks/treeView-QDETBFTQ-C6D5WFJA.js +1 -0
  142. data/website/assets/chunks/treemap-6X3UGDF4-JFCDMSCA.js +1 -0
  143. data/website/assets/chunks/vennDiagram-T6HMQDX7-62WAAPTF.js +34 -0
  144. data/website/assets/chunks/wardley-OPB4EBWU-RQIOII7I.js +1 -0
  145. data/website/assets/chunks/wardleyDiagram-T6FBY63Y-KUXO3NHV.js +78 -0
  146. data/website/assets/chunks/xychartDiagram-ELKLHX3M-I54W4HJ7.js +7 -0
  147. data/website/assets/color-scheme-bootstrap-4H4ZR4BW.js +1 -0
  148. data/website/assets/docs-3WBBQT6K.css +1 -0
  149. data/website/assets/docs-W3D5DWQF.js +1 -0
  150. data/website/assets/docs-navigation-75ALFYBA.js +1 -0
  151. data/website/assets/graph-QWL54LWD.js +1 -0
  152. data/website/assets/manifest.json +314 -0
  153. data/website/assets/math-7JTH4OWZ.js +21 -0
  154. data/website/assets/mermaid-RXC6URG4.js +10 -0
  155. data/website/assets/minimal-3NPTDWQX.js +1 -0
  156. data/website/assets/minimal-E2VATXXS.css +1 -0
  157. data/website/assets/previews-FMHOX7UX.js +1 -0
  158. data/website/assets/search-BH73JZDU.js +1 -0
  159. data/website/assets/search-worker-SM4IM4J7.js +1 -0
  160. data/website/exe/jekyll-obsidian +5 -0
  161. data/website/lib/jekyll_obsidian/adapter.rb +733 -0
  162. data/website/lib/jekyll_obsidian/built_in_themes.rb +855 -0
  163. data/website/lib/jekyll_obsidian/cli.rb +84 -0
  164. data/website/lib/jekyll_obsidian/content_policy.rb +194 -0
  165. data/website/lib/jekyll_obsidian/destination_registry.rb +39 -0
  166. data/website/lib/jekyll_obsidian/directory_indexes.rb +30 -0
  167. data/website/lib/jekyll_obsidian/external_media.rb +371 -0
  168. data/website/lib/jekyll_obsidian/front_matter.rb +453 -0
  169. data/website/lib/jekyll_obsidian/github_markdown.rb +664 -0
  170. data/website/lib/jekyll_obsidian/html_publication.rb +206 -0
  171. data/website/lib/jekyll_obsidian/initializer.rb +68 -0
  172. data/website/lib/jekyll_obsidian/localized_compiler.rb +1044 -0
  173. data/website/lib/jekyll_obsidian/media_policy.rb +41 -0
  174. data/website/lib/jekyll_obsidian/ofm_scanner.rb +493 -0
  175. data/website/lib/jekyll_obsidian/output_text.rb +13 -0
  176. data/website/lib/jekyll_obsidian/preview.rb +93 -0
  177. data/website/lib/jekyll_obsidian/published_markdown.rb +32 -0
  178. data/website/lib/jekyll_obsidian/raw_html_manifest.rb +66 -0
  179. data/website/lib/jekyll_obsidian/runtime.rb +197 -0
  180. data/website/lib/jekyll_obsidian/site_compilation.rb +147 -0
  181. data/website/lib/jekyll_obsidian/site_navigation.rb +517 -0
  182. data/website/lib/jekyll_obsidian/url_builder.rb +163 -0
  183. data/website/lib/jekyll_obsidian/value_objects.rb +198 -0
  184. data/website/lib/jekyll_obsidian/vault_compiler.rb +2771 -0
  185. data/website/lib/jekyll_obsidian/version.rb +6 -0
  186. data/website/lib/jekyll_obsidian/workspace_layout.rb +104 -0
  187. data/website/lib/jekyll_obsidian.rb +22 -0
  188. data/website/scripts/audit-site.rb +120 -0
  189. data/website/scripts/templates/pages.yml +55 -0
  190. data/website/scripts/verify-site-urls.rb +585 -0
  191. metadata +319 -0
@@ -0,0 +1,132 @@
1
+ import{a as Gt}from"./chunk-NBH7YOBD.js";import{D as Zt}from"./chunk-E3T3IFAC.js";import{a as tt,d as Vt}from"./chunk-XQUIO562.js";import{a as Xt,b as jt}from"./chunk-GSOU4UTT.js";import{c as nt}from"./chunk-IP56FOSI.js";import"./chunk-CBGUD2NP.js";import{a as Kt,f as Ut,p as $,r as wt}from"./chunk-6DCNDVBX.js";import"./chunk-22DRK7VS.js";import{H as mt,I as Mt,N as Ft,O as Pt,T as Wt,_ as C,a as zt,b as At,u as Q,y as A}from"./chunk-7CSIRG7W.js";import{b as L}from"./chunk-ERWOH47R.js";import{a as g}from"./chunk-EIBFAW37.js";import{K as Yt,O as Ht,e as _}from"./chunk-LGUG3SQB.js";import"./chunk-6DHFEWGX.js";var St=(function(){var e=g(function(T,w,p,x){for(p=p||{},x=T.length;x--;p[T[x]]=w);return p},"o"),t=[1,15],a=[1,7],i=[1,13],s=[1,14],l=[1,19],r=[1,16],n=[1,17],c=[1,18],d=[8,30],h=[8,10,21,28,29,30,31,39,43,46],u=[1,23],y=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],b=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],k={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:g(function(w,p,x,S,E,o,P){var f=o.length-1;switch(E){case 4:S.getLogger().debug("Rule: separator (NL) ");break;case 5:S.getLogger().debug("Rule: separator (Space) ");break;case 6:S.getLogger().debug("Rule: separator (EOF) ");break;case 7:S.getLogger().debug("Rule: hierarchy: ",o[f-1]),S.setHierarchy(o[f-1]);break;case 8:S.getLogger().debug("Stop NL ");break;case 9:S.getLogger().debug("Stop EOF ");break;case 10:S.getLogger().debug("Stop NL2 ");break;case 11:S.getLogger().debug("Stop EOF2 ");break;case 12:S.getLogger().debug("Rule: statement: ",o[f]),typeof o[f].length=="number"?this.$=o[f]:this.$=[o[f]];break;case 13:S.getLogger().debug("Rule: statement #2: ",o[f-1]),this.$=[o[f-1]].concat(o[f]);break;case 14:S.getLogger().debug("Rule: link: ",o[f],w),this.$={edgeTypeStr:o[f],label:""};break;case 15:S.getLogger().debug("Rule: LABEL link: ",o[f-3],o[f-1],o[f]),this.$={edgeTypeStr:o[f],label:o[f-1]};break;case 18:let O=parseInt(o[f]),G=S.generateId();this.$={id:G,type:"space",label:"",width:O,children:[]};break;case 23:S.getLogger().debug("Rule: (nodeStatement link node) ",o[f-2],o[f-1],o[f]," typestr: ",o[f-1].edgeTypeStr);let j=S.edgeStrToEdgeData(o[f-1].edgeTypeStr),dt=S.edgeStrToEdgeStartData(o[f-1].edgeTypeStr),at=S.edgeStrToThickness(o[f-1].edgeTypeStr),ut=S.edgeStrToPattern(o[f-1].edgeTypeStr);this.$=[{id:o[f-2].id,label:o[f-2].label,type:o[f-2].type,directions:o[f-2].directions},{id:o[f-2].id+"-"+o[f].id,start:o[f-2].id,end:o[f].id,label:o[f-1].label,type:"edge",thickness:at,pattern:ut,directions:o[f].directions,arrowTypeEnd:j,arrowTypeStart:dt},{id:o[f].id,label:o[f].label,type:S.typeStr2Type(o[f].typeStr),directions:o[f].directions}];break;case 24:S.getLogger().debug("Rule: nodeStatement (abc88 node size) ",o[f-1],o[f]),this.$={id:o[f-1].id,label:o[f-1].label,type:S.typeStr2Type(o[f-1].typeStr),directions:o[f-1].directions,widthInColumns:parseInt(o[f],10)};break;case 25:S.getLogger().debug("Rule: nodeStatement (node) ",o[f]),this.$={id:o[f].id,label:o[f].label,type:S.typeStr2Type(o[f].typeStr),directions:o[f].directions,widthInColumns:1};break;case 26:S.getLogger().debug("APA123",this?this:"na"),S.getLogger().debug("COLUMNS: ",o[f]),this.$={type:"column-setting",columns:o[f]==="auto"?-1:parseInt(o[f])};break;case 27:S.getLogger().debug("Rule: id-block statement : ",o[f-2],o[f-1]);let R=S.generateId();this.$={...o[f-2],type:"composite",children:o[f-1]};break;case 28:S.getLogger().debug("Rule: blockStatement : ",o[f-2],o[f-1],o[f]);let V=S.generateId();this.$={id:V,type:"composite",label:"",children:o[f-1]};break;case 29:S.getLogger().debug("Rule: node (NODE_ID separator): ",o[f]),this.$={id:o[f]};break;case 30:S.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",o[f-1],o[f]),this.$={id:o[f-1],label:o[f].label,typeStr:o[f].typeStr,directions:o[f].directions};break;case 31:S.getLogger().debug("Rule: dirList: ",o[f]),this.$=[o[f]];break;case 32:S.getLogger().debug("Rule: dirList: ",o[f-1],o[f]),this.$=[o[f-1]].concat(o[f]);break;case 33:S.getLogger().debug("Rule: nodeShapeNLabel: ",o[f-2],o[f-1],o[f]),this.$={typeStr:o[f-2]+o[f],label:o[f-1]};break;case 34:S.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",o[f-3],o[f-2]," #3:",o[f-1],o[f]),this.$={typeStr:o[f-3]+o[f],label:o[f-2],directions:o[f-1]};break;case 35:case 36:this.$={type:"classDef",id:o[f-1].trim(),css:o[f].trim()};break;case 37:this.$={type:"applyClass",id:o[f-1].trim(),styleClass:o[f].trim()};break;case 38:this.$={type:"applyStyles",id:o[f-1].trim(),stylesStr:o[f].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:s,31:l,39:r,43:n,46:c},{8:[1,20]},e(d,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:i,29:s,31:l,39:r,43:n,46:c}),e(h,[2,16],{14:22,15:u,16:y}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(m,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,31:l},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:s,31:l,39:r,43:n,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(b,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(d,[2,13]),{26:35,31:l},{31:[2,14]},{17:[1,36]},e(m,[2,24]),{10:t,11:37,13:4,14:22,15:u,16:y,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:s,31:l,39:r,43:n,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(b,[2,30]),{18:[1,43]},{18:[1,44]},e(m,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(h,[2,27]),e(b,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(b,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:g(function(w,p){if(p.recoverable)this.trace(w);else{var x=new Error(w);throw x.hash=p,x}},"parseError"),parse:g(function(w){var p=this,x=[0],S=[],E=[null],o=[],P=this.table,f="",O=0,G=0,j=0,dt=2,at=1,ut=o.slice.call(arguments,1),R=Object.create(this.lexer),V={yy:{}};for(var pt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,pt)&&(V.yy[pt]=this.yy[pt]);R.setInput(w,V.yy),V.yy.lexer=R,V.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var ft=R.yylloc;o.push(ft);var _e=R.options&&R.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function De(W){x.length=x.length-2*W,E.length=E.length-W,o.length=o.length-W}g(De,"popStack");function Ot(){var W;return W=S.pop()||R.lex()||at,typeof W!="number"&&(W instanceof Array&&(S=W,W=S.pop()),W=p.symbols_[W]||W),W}g(Ot,"lex");for(var F,xt,q,H,$r,bt,J={},st,Z,Rt,it;;){if(q=x[x.length-1],this.defaultActions[q]?H=this.defaultActions[q]:((F===null||typeof F>"u")&&(F=Ot()),H=P[q]&&P[q][F]),typeof H>"u"||!H.length||!H[0]){var yt="";it=[];for(st in P[q])this.terminals_[st]&&st>dt&&it.push("'"+this.terminals_[st]+"'");R.showPosition?yt="Parse error on line "+(O+1)+`:
2
+ `+R.showPosition()+`
3
+ Expecting `+it.join(", ")+", got '"+(this.terminals_[F]||F)+"'":yt="Parse error on line "+(O+1)+": Unexpected "+(F==at?"end of input":"'"+(this.terminals_[F]||F)+"'"),this.parseError(yt,{text:R.match,token:this.terminals_[F]||F,line:R.yylineno,loc:ft,expected:it})}if(H[0]instanceof Array&&H.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+F);switch(H[0]){case 1:x.push(F),E.push(R.yytext),o.push(R.yylloc),x.push(H[1]),F=null,xt?(F=xt,xt=null):(G=R.yyleng,f=R.yytext,O=R.yylineno,ft=R.yylloc,j>0&&j--);break;case 2:if(Z=this.productions_[H[1]][1],J.$=E[E.length-Z],J._$={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},_e&&(J._$.range=[o[o.length-(Z||1)].range[0],o[o.length-1].range[1]]),bt=this.performAction.apply(J,[f,G,O,V.yy,H[1],E,o].concat(ut)),typeof bt<"u")return bt;Z&&(x=x.slice(0,-1*Z*2),E=E.slice(0,-1*Z),o=o.slice(0,-1*Z)),x.push(this.productions_[H[1]][0]),E.push(J.$),o.push(J._$),Rt=P[x[x.length-2]][x[x.length-1]],x.push(Rt);break;case 3:return!0}}return!0},"parse")},I=(function(){var T={EOF:1,parseError:g(function(p,x){if(this.yy.parser)this.yy.parser.parseError(p,x);else throw new Error(p)},"parseError"),setInput:g(function(w,p){return this.yy=p||this.yy||{},this._input=w,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:g(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var p=w.match(/(?:\r\n?|\n).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w},"input"),unput:g(function(w){var p=w.length,x=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;var S=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1&&(this.yylineno-=x.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===S.length?this.yylloc.first_column:0)+S[S.length-x.length].length-x[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-p]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(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:g(function(w){this.unput(this.match.slice(w))},"less"),pastInput:g(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var w=this.pastInput(),p=new Array(w.length+1).join("-");return w+this.upcomingInput()+`
5
+ `+p+"^"},"showPosition"),test_match:g(function(w,p){var x,S,E;if(this.options.backtrack_lexer&&(E={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&&(E.yylloc.range=this.yylloc.range.slice(0))),S=w[0].match(/(?:\r\n?|\n).*/g),S&&(this.yylineno+=S.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:S?S[S.length-1].length-S[S.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+w[0].length},this.yytext+=w[0],this.match+=w[0],this.matches=w,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(w[0].length),this.matched+=w[0],x=this.performAction.call(this,this.yy,this,p,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),x)return x;if(this._backtrack){for(var o in E)this[o]=E[o];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var w,p,x,S;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),o=0;o<E.length;o++)if(x=this._input.match(this.rules[E[o]]),x&&(!p||x[0].length>p[0].length)){if(p=x,S=o,this.options.backtrack_lexer){if(w=this.test_match(x,E[o]),w!==!1)return w;if(this._backtrack){p=!1;continue}else return!1}else if(!this.options.flex)break}return p?(w=this.test_match(p,E[S]),w!==!1?w:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var p=this.next();return p||this.lex()},"lex"),begin:g(function(p){this.conditionStack.push(p)},"begin"),popState:g(function(){var p=this.conditionStack.length-1;return p>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:g(function(p){return p=this.conditionStack.length-1-Math.abs(p||0),p>=0?this.conditionStack[p]:"INITIAL"},"topState"),pushState:g(function(p){this.begin(p)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:g(function(p,x,S,E){var o=E;switch(S){case 0:return p.getLogger().debug("Found block-beta"),10;break;case 1:return p.getLogger().debug("Found id-block"),29;break;case 2:return p.getLogger().debug("Found block"),10;break;case 3:p.getLogger().debug(".",x.yytext);break;case 4:p.getLogger().debug("_",x.yytext);break;case 5:return 5;case 6:return x.yytext=-1,28;break;case 7:return x.yytext=x.yytext.replace(/columns\s+/,""),p.getLogger().debug("COLUMNS (LEX)",x.yytext),28;break;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:p.getLogger().debug("LEX: POPPING STR:",x.yytext),this.popState();break;case 13:return p.getLogger().debug("LEX: STR end:",x.yytext),"STR";break;case 14:return x.yytext=x.yytext.replace(/space\:/,""),p.getLogger().debug("SPACE NUM (LEX)",x.yytext),21;break;case 15:return x.yytext="1",p.getLogger().debug("COLUMNS (LEX)",x.yytext),21;break;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;break;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 21:return this.popState(),this.pushState("CLASSDEFID"),40;break;case 22:return this.popState(),41;break;case 23:return this.pushState("CLASS"),43;break;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;break;case 25:return this.popState(),45;break;case 26:return this.pushState("STYLE_STMNT"),46;break;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;break;case 28:return this.popState(),48;break;case 29:return this.pushState("acc_title"),"acc_title";break;case 30:return this.popState(),"acc_title_value";break;case 31:return this.pushState("acc_descr"),"acc_descr";break;case 32:return this.popState(),"acc_descr_value";break;case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),p.getLogger().debug("Lex: (("),"NODE_DEND";break;case 38:return this.popState(),p.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),p.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 40:return this.popState(),p.getLogger().debug("Lex: (("),"NODE_DEND";break;case 41:return this.popState(),p.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),p.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 43:return this.popState(),p.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 44:return this.popState(),p.getLogger().debug("Lex: (("),"NODE_DEND";break;case 45:return this.popState(),p.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 46:return this.popState(),p.getLogger().debug("Lex: ("),"NODE_DEND";break;case 47:return this.popState(),p.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 48:return this.popState(),p.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 49:return this.popState(),p.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),p.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 51:return this.popState(),p.getLogger().debug("Lex: )"),"NODE_DEND";break;case 52:return this.popState(),p.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 53:return this.popState(),p.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 54:return p.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;break;case 55:return p.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;break;case 56:return p.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;break;case 57:return p.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 58:return p.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;break;case 59:return p.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 60:return p.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 61:return p.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 62:return p.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;break;case 63:return p.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;break;case 64:return p.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 65:return this.pushState("NODE"),35;break;case 66:return this.pushState("NODE"),35;break;case 67:return this.pushState("NODE"),35;break;case 68:return this.pushState("NODE"),35;break;case 69:return this.pushState("NODE"),35;break;case 70:return this.pushState("NODE"),35;break;case 71:return this.pushState("NODE"),35;break;case 72:return p.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;break;case 73:return this.pushState("BLOCK_ARROW"),p.getLogger().debug("LEX ARR START"),37;break;case 74:return p.getLogger().debug("Lex: NODE_ID",x.yytext),31;break;case 75:return p.getLogger().debug("Lex: EOF",x.yytext),8;break;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:p.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:p.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return p.getLogger().debug("LEX: NODE_DESCR:",x.yytext),"NODE_DESCR";break;case 83:p.getLogger().debug("LEX POPPING"),this.popState();break;case 84:p.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return x.yytext=x.yytext.replace(/^,\s*/,""),p.getLogger().debug("Lex (right): dir:",x.yytext),"DIR";break;case 86:return x.yytext=x.yytext.replace(/^,\s*/,""),p.getLogger().debug("Lex (left):",x.yytext),"DIR";break;case 87:return x.yytext=x.yytext.replace(/^,\s*/,""),p.getLogger().debug("Lex (x):",x.yytext),"DIR";break;case 88:return x.yytext=x.yytext.replace(/^,\s*/,""),p.getLogger().debug("Lex (y):",x.yytext),"DIR";break;case 89:return x.yytext=x.yytext.replace(/^,\s*/,""),p.getLogger().debug("Lex (up):",x.yytext),"DIR";break;case 90:return x.yytext=x.yytext.replace(/^,\s*/,""),p.getLogger().debug("Lex (down):",x.yytext),"DIR";break;case 91:return x.yytext="]>",p.getLogger().debug("Lex (ARROW_DIR end):",x.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 92:return p.getLogger().debug("Lex: LINK","#"+x.yytext+"#"),15;break;case 93:return p.getLogger().debug("Lex: LINK",x.yytext),15;break;case 94:return p.getLogger().debug("Lex: LINK",x.yytext),15;break;case 95:return p.getLogger().debug("Lex: LINK",x.yytext),15;break;case 96:return p.getLogger().debug("Lex: START_LINK",x.yytext),this.pushState("LLABEL"),16;break;case 97:return p.getLogger().debug("Lex: START_LINK",x.yytext),this.pushState("LLABEL"),16;break;case 98:return p.getLogger().debug("Lex: START_LINK",x.yytext),this.pushState("LLABEL"),16;break;case 99:this.pushState("md_string");break;case 100:return p.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 101:return this.popState(),p.getLogger().debug("Lex: LINK","#"+x.yytext+"#"),15;break;case 102:return this.popState(),p.getLogger().debug("Lex: LINK",x.yytext),15;break;case 103:return this.popState(),p.getLogger().debug("Lex: LINK",x.yytext),15;break;case 104:return p.getLogger().debug("Lex: COLON",x.yytext),x.yytext=x.yytext.slice(1),27;break}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return T})();k.lexer=I;function D(){this.yy={}}return g(D,"Parser"),D.prototype=k,k.Parser=D,new D})();St.parser=St;var Te=St,U=new Map,Dt=[],Lt=new Map,qt="color",Jt="fill",Be="bgFill",ie=",",ct=new Map,Tt="",Ie=g(e=>Ft.sanitizeText(e,C()),"sanitizeText"),Ne=g(function(e,t=""){let a=ct.get(e);a||(a={id:e,styles:[],textStyles:[]},ct.set(e,a)),t?.split(ie).forEach(i=>{let s=i.replace(/([^;]*);/,"$1").trim();if(RegExp(qt).exec(i)){let r=s.replace(Jt,Be).replace(qt,Jt);a.textStyles.push(r)}a.styles.push(s)})},"addStyleClass"),Ce=g(function(e,t=""){let a=U.get(e);t!=null&&(a.styles=t.split(ie))},"addStyle2Node"),Oe=g(function(e,t){e.split(",").forEach(function(a){let i=U.get(a);if(i===void 0){let s=a.trim();i={id:s,type:"na",children:[]},U.set(s,i)}i.classes||(i.classes=[]),i.classes.push(t)})},"setCssClass"),ne=g((e,t)=>{let a=e.flat(),i=[],l=a.find(r=>r?.type==="column-setting")?.columns??-1;for(let r of a){if(typeof l=="number"&&l>0&&r.type!=="column-setting"&&typeof r.widthInColumns=="number"&&r.widthInColumns>l&&L.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${l}`),r.label&&(r.label=Ie(r.label)),r.type==="classDef"){Ne(r.id,r.css);continue}if(r.type==="applyClass"){Oe(r.id,r?.styleClass??"");continue}if(r.type==="applyStyles"){r?.stylesStr&&Ce(r.id,r?.stylesStr);continue}if(r.type==="column-setting")t.columns=r.columns??-1;else if(r.type==="edge"){let n=(Lt.get(r.id)??0)+1;Lt.set(r.id,n),r.id=n+"-"+r.id,Dt.push(r)}else{r.label||(r.type==="composite"?r.label="":r.label=r.id);let n=U.get(r.id);if(n===void 0?U.set(r.id,r):(r.type!=="na"&&(n.type=r.type),r.label!==r.id&&(n.label=r.label)),r.children&&ne(r.children,r),r.type==="space"){let c=r.width??1;for(let d=0;d<c;d++){let h=Kt(r);h.id=h.id+"-"+d,U.set(h.id,h),i.push(h)}}else n===void 0&&i.push(r)}}t.children=i},"populateBlockDatabase"),Bt=[],rt={id:"root",type:"composite",children:[],columns:-1},Re=g(()=>{L.debug("Clear called"),Wt(),rt={id:"root",type:"composite",children:[],columns:-1},U=new Map([["root",rt]]),Bt=[],ct=new Map,Dt=[],Lt=new Map,Tt=""},"clear");function le(e){switch(L.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return L.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}g(le,"typeStr2Type");function ce(e){return L.debug("typeStr2Type",e),e==="=="?"thick":"normal"}g(ce,"edgeTypeStr2Type");function oe(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}g(oe,"edgeStrToEdgeData");function he(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}g(he,"edgeStrToEdgeStartData");function ge(e){return e.includes("==")?"thick":"normal"}g(ge,"edgeStrToThickness");function de(e){return e.includes(".-")?"dotted":"solid"}g(de,"edgeStrToPattern");var Qt=0,ze=g(()=>(Qt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Qt),"generateId"),Ae=g(e=>{rt.children=e,ne(e,rt),Bt=rt.children},"setHierarchy"),Me=g(e=>{let t=U.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),Fe=g(()=>[...U.values()],"getBlocksFlat"),Pe=g(()=>Bt||[],"getBlocks"),We=g(()=>Dt,"getEdges"),Ye=g(e=>U.get(e),"getBlock"),He=g(e=>{U.set(e.id,e)},"setBlock"),Ke=g(e=>{Tt=e},"setDiagramId"),Ue=g(()=>Tt,"getDiagramId"),Xe=g(()=>L,"getLogger"),je=g(function(){return ct},"getClasses"),Ve={getConfig:g(()=>Q().block,"getConfig"),typeStr2Type:le,edgeTypeStr2Type:ce,edgeStrToEdgeData:oe,edgeStrToEdgeStartData:he,edgeStrToThickness:ge,edgeStrToPattern:de,getLogger:Xe,getBlocksFlat:Fe,getBlocks:Pe,getEdges:We,setHierarchy:Ae,getBlock:Ye,setBlock:He,getColumns:Me,getClasses:je,clear:Re,generateId:ze,setDiagramId:Ke,getDiagramId:Ue},Ze=Ve,kt=g((e,t)=>{let a=At,i=a(e,"r"),s=a(e,"g"),l=a(e,"b");return zt(i,s,l,t)},"fade"),Ge=g(e=>`.label {
7
+ font-family: ${e.fontFamily};
8
+ color: ${e.nodeTextColor||e.textColor};
9
+ }
10
+ .cluster-label text {
11
+ fill: ${e.titleColor};
12
+ }
13
+ .cluster-label span,p {
14
+ color: ${e.titleColor};
15
+ }
16
+
17
+
18
+
19
+ .label text,span,p {
20
+ fill: ${e.nodeTextColor||e.textColor};
21
+ color: ${e.nodeTextColor||e.textColor};
22
+ }
23
+
24
+ .node rect,
25
+ .node circle,
26
+ .node ellipse,
27
+ .node polygon,
28
+ .node path {
29
+ fill: ${e.mainBkg};
30
+ stroke: ${e.nodeBorder};
31
+ stroke-width: 1px;
32
+ }
33
+ .flowchart-label text {
34
+ text-anchor: middle;
35
+ }
36
+ // .flowchart-label .text-outer-tspan {
37
+ // text-anchor: middle;
38
+ // }
39
+ // .flowchart-label .text-inner-tspan {
40
+ // text-anchor: start;
41
+ // }
42
+
43
+ .node .label {
44
+ text-align: center;
45
+ }
46
+ .node.clickable {
47
+ cursor: pointer;
48
+ }
49
+
50
+ .arrowheadPath {
51
+ fill: ${e.arrowheadColor};
52
+ }
53
+
54
+ .edgePath .path {
55
+ stroke: ${e.lineColor};
56
+ stroke-width: 2.0px;
57
+ }
58
+
59
+ .flowchart-link {
60
+ stroke: ${e.lineColor};
61
+ fill: none;
62
+ }
63
+
64
+ .edgeLabel {
65
+ background-color: ${e.edgeLabelBackground};
66
+ /*
67
+ * This is for backward compatibility with existing code that didn't
68
+ * add a \`<p>\` around edge labels.
69
+ *
70
+ * TODO: We should probably remove this in a future release.
71
+ */
72
+ p {
73
+ margin: 0;
74
+ padding: 0;
75
+ display: inline;
76
+ }
77
+ rect {
78
+ opacity: 0.5;
79
+ background-color: ${e.edgeLabelBackground};
80
+ fill: ${e.edgeLabelBackground};
81
+ }
82
+ text-align: center;
83
+ }
84
+
85
+ /* For html labels only */
86
+ .labelBkg {
87
+ background-color: ${e.edgeLabelBackground};
88
+ }
89
+
90
+ .node .cluster {
91
+ // fill: ${kt(e.mainBkg,.5)};
92
+ fill: ${kt(e.clusterBkg,.5)};
93
+ stroke: ${kt(e.clusterBorder,.2)};
94
+ box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
95
+ stroke-width: 1px;
96
+ }
97
+
98
+ .cluster text {
99
+ fill: ${e.titleColor};
100
+ }
101
+
102
+ .cluster span,p {
103
+ color: ${e.titleColor};
104
+ }
105
+ /* .cluster div {
106
+ color: ${e.titleColor};
107
+ } */
108
+
109
+ div.mermaidTooltip {
110
+ position: absolute;
111
+ text-align: center;
112
+ max-width: 200px;
113
+ padding: 2px;
114
+ font-family: ${e.fontFamily};
115
+ font-size: 12px;
116
+ background: ${e.tertiaryColor};
117
+ border: 1px solid ${e.border2};
118
+ border-radius: 2px;
119
+ pointer-events: none;
120
+ z-index: 100;
121
+ }
122
+
123
+ .flowchartTitleText {
124
+ text-anchor: middle;
125
+ font-size: 18px;
126
+ fill: ${e.textColor};
127
+ }
128
+ ${Gt()}
129
+ `,"getStyles"),qe=Ge,Je=g((e,t,a,i)=>{t.forEach(s=>{lr[s](e,a,i)})},"insertMarkers"),Qe=g((e,t,a)=>{L.trace("Making markers for ",a),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),$e=g((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),tr=g((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),er=g((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),rr=g((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),ar=g((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),sr=g((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),ir=g((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),nr=g((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),lr={extension:Qe,composition:$e,aggregation:tr,dependency:er,lollipop:rr,point:ar,circle:sr,cross:ir,barb:nr},cr=Je;function vt(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};let a=t%e,i=Math.floor(t/e);return{px:a,py:i}}g(vt,"calculateBlockPosition");var or=g(e=>{let t=0,a=0;for(let i of e.children){let{width:s,height:l,x:r,y:n}=i.size??{width:0,height:0,x:0,y:0};if(L.debug("getMaxChildSize abc95 child:",i.id,"width:",s,"height:",l,"x:",r,"y:",n,i.type),i.type==="space")continue;let c=s/(i.widthInColumns??1);c>t&&(t=c),l>a&&(a=l)}return{width:t,height:a}},"getMaxChildSize");function ot(e,t,a=0,i=0,s=8){L.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",a),e?.size?.width||(e.size={width:a,height:i,x:0,y:0});let l=0,r=0;if(e.children?.length>0){for(let b of e.children)ot(b,t,0,0,s);let n=or(e);l=n.width,r=n.height,L.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",l,r);for(let b of e.children)b.size&&(L.debug(`abc95 Setting size of children of ${e.id} id=${b.id} ${l} ${r} ${JSON.stringify(b.size)}`),b.size.width=l*(b.widthInColumns??1)+s*((b.widthInColumns??1)-1),b.size.height=r,b.size.x=0,b.size.y=0,L.debug(`abc95 updating size of ${e.id} children child:${b.id} maxWidth:${l} maxHeight:${r}`));for(let b of e.children)ot(b,t,l,r,s);let c=e.columns??-1,d=0;for(let b of e.children)d+=b.widthInColumns??1;let h=e.children.length;c>0&&c<d&&(h=c);let u=Math.ceil(d/h),y=h*(l+s)+s,m=u*(r+s)+s;if(y<a){L.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${a} siblingHeight ${i} width ${y}`),y=a,m=i;let b=(a-h*s-s)/h,v=(i-u*s-s)/u;L.debug("Size indata abc88",e.id,"childWidth",b,"maxWidth",l),L.debug("Size indata abc88",e.id,"childHeight",v,"maxHeight",r),L.debug("Size indata abc88 xSize",h,"padding",s);for(let k of e.children)k.size&&(k.size.width=b,k.size.height=v,k.size.x=0,k.size.y=0)}if(L.debug(`abc95 (finale calc) ${e.id} xSize ${h} ySize ${u} columns ${c}${e.children.length} width=${Math.max(y,e.size?.width||0)}`),y<(e?.size?.width||0)){y=e?.size?.width||0;let b=c>0?Math.min(e.children.length,c):e.children.length;if(b>0){let v=(y-b*s-s)/b;L.debug("abc95 (growing to fit) width",e.id,y,e.size?.width,v);for(let k of e.children)k.size&&(k.size.width=v)}}e.size={width:y,height:m,x:0,y:0}}L.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}g(ot,"setBlockSizes");function It(e,t,a=8){L.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let i=e.columns??-1;if(L.debug("layoutBlocks columns abc95",e.id,"=>",i,e),e.children&&e.children.length>0){let s=e?.children[0]?.size?.width??0,l=e.children.length*s+(e.children.length-1)*a;L.debug("widthOfChildren 88",l,"posX");let r=new Map;{let u=0;for(let y of e.children){if(!y.size)continue;let{py:m}=vt(i,u),b=r.get(m)??0;y.size.height>b&&r.set(m,y.size.height);let v=y?.widthInColumns??1;i>0&&(v=Math.min(v,i-u%i)),u+=v}}let n=new Map;{let u=0,y=[...r.keys()].sort((m,b)=>m-b);for(let m of y)n.set(m,u),u+=(r.get(m)??0)+a}let c=0;L.debug("abc91 block?.size?.x",e.id,e?.size?.x);let d=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-a,h=0;for(let u of e.children){let y=e;if(!u.size)continue;let{width:m,height:b}=u.size,{px:v,py:k}=vt(i,c);if(k!=h&&(h=k,d=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-a,L.debug("New row in layout for block",e.id," and child ",u.id,h)),L.debug(`abc89 layout blocks (child) id: ${u.id} Pos: ${c} (px, py) ${v},${k} (${y?.size?.x},${y?.size?.y}) parent: ${y.id} width: ${m}${a}`),y.size){let D=m/2;u.size.x=d+a+D,L.debug(`abc91 layout blocks (calc) px, pyid:${u.id} startingPos=X${d} new startingPosX${u.size.x} ${D} padding=${a} width=${m} halfWidth=${D} => x:${u.size.x} y:${u.size.y} ${u.widthInColumns} (width * (child?.w || 1)) / 2 ${m*(u?.widthInColumns??1)/2}`),d=u.size.x+D;let T=n.get(k)??0,w=r.get(k)??b;u.size.y=y.size.y-y.size.height/2+T+w/2+a,L.debug(`abc88 layout blocks (calc) px, pyid:${u.id}startingPosX${d}${a}${D}=>x:${u.size.x}y:${u.size.y}${u.widthInColumns}(width * (child?.w || 1)) / 2${m*(u?.widthInColumns??1)/2}`)}u.children&&It(u,t,a);let I=u?.widthInColumns??1;i>0&&(I=Math.min(I,i-c%i)),c+=I,L.debug("abc88 columnsPos",u,c)}}L.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}g(It,"layoutBlocks");function Nt(e,{minX:t,minY:a,maxX:i,maxY:s}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){let{x:l,y:r,width:n,height:c}=e.size;l-n/2<t&&(t=l-n/2),r-c/2<a&&(a=r-c/2),l+n/2>i&&(i=l+n/2),r+c/2>s&&(s=r+c/2)}if(e.children)for(let l of e.children)({minX:t,minY:a,maxX:i,maxY:s}=Nt(l,{minX:t,minY:a,maxX:i,maxY:s}));return{minX:t,minY:a,maxX:i,maxY:s}}g(Nt,"findBounds");function ue(e){let t=e.getBlock("root");if(!t)return;let a=C()?.block?.padding??8;ot(t,e,0,0,a),It(t,e,a),L.debug("getBlocks",JSON.stringify(t,null,2));let{minX:i,minY:s,maxX:l,maxY:r}=Nt(t),n=r-s,c=l-i;return{x:i,y:s,width:c,height:n}}g(ue,"layout");var hr=g(async(e,t,a,i=!1,s=!1)=>{let l=t||"";typeof l=="object"&&(l=l[0]);let r=C(),n=A(r);return await nt(e,l,{style:a,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},r)},"createLabel"),K=hr,gr=g((e,t,a,i,s)=>{t.arrowTypeStart&&$t(e,"start",t.arrowTypeStart,a,i,s),t.arrowTypeEnd&&$t(e,"end",t.arrowTypeEnd,a,i,s)},"addEdgeMarkers"),dr={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},$t=g((e,t,a,i,s,l)=>{let r=dr[a];if(!r){L.warn(`Unknown arrow type: ${a}`);return}let n=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${i}#${s}_${l}-${r}${n})`)},"addEdgeMarker"),Et={},M={},ur=g(async(e,t)=>{let a=C(),i=A(a),s=e.insert("g").attr("class","edgeLabel"),l=s.insert("g").attr("class","label"),r=t.labelType==="markdown",n=await nt(e,t.label,{style:t.labelStyle,useHtmlLabels:i,addSvgBackground:r,isNode:!1,markdown:r,width:r?void 0:Number.POSITIVE_INFINITY},a);l.node().appendChild(n);let c=n.getBBox(),d=c;if(i){let u=n.children[0],y=_(n);c=u.getBoundingClientRect(),d=c,y.attr("width",c.width),y.attr("height",c.height)}else{let u=_(n).select("text").node();u&&typeof u.getBBox=="function"&&(d=u.getBBox())}l.attr("transform",tt(d,i)),Et[t.id]=s,t.width=c.width,t.height=c.height;let h;if(t.startLabelLeft){let u=e.insert("g").attr("class","edgeTerminals"),y=u.insert("g").attr("class","inner"),m=await K(y,t.startLabelLeft,t.labelStyle);h=m;let b=m.getBBox();if(i){let v=m.children[0],k=_(m);b=v.getBoundingClientRect(),k.attr("width",b.width),k.attr("height",b.height)}y.attr("transform",tt(b,i)),M[t.id]||(M[t.id]={}),M[t.id].startLeft=u,et(h,t.startLabelLeft)}if(t.startLabelRight){let u=e.insert("g").attr("class","edgeTerminals"),y=u.insert("g").attr("class","inner"),m=await K(y,t.startLabelRight,t.labelStyle);h=m;let b=m.getBBox();if(i){let v=m.children[0],k=_(m);b=v.getBoundingClientRect(),k.attr("width",b.width),k.attr("height",b.height)}y.attr("transform",tt(b,i)),M[t.id]||(M[t.id]={}),M[t.id].startRight=u,et(h,t.startLabelRight)}if(t.endLabelLeft){let u=e.insert("g").attr("class","edgeTerminals"),y=u.insert("g").attr("class","inner"),m=await K(u,t.endLabelLeft,t.labelStyle);h=m;let b=m.getBBox();if(i){let v=m.children[0],k=_(m);b=v.getBoundingClientRect(),k.attr("width",b.width),k.attr("height",b.height)}y.attr("transform",tt(b,i)),M[t.id]||(M[t.id]={}),M[t.id].endLeft=u,et(h,t.endLabelLeft)}if(t.endLabelRight){let u=e.insert("g").attr("class","edgeTerminals"),y=u.insert("g").attr("class","inner"),m=await K(u,t.endLabelRight,t.labelStyle);h=m;let b=m.getBBox();if(i){let v=m.children[0],k=_(m);b=v.getBoundingClientRect(),k.attr("width",b.width),k.attr("height",b.height)}y.attr("transform",tt(b,i)),M[t.id]||(M[t.id]={}),M[t.id].endRight=u,et(h,t.endLabelRight)}return n},"insertEdgeLabel");function et(e,t){A(C())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}g(et,"setTerminalWidth");var pr=g((e,t)=>{L.debug("Moving label abc88 ",e.id,e.label,Et[e.id],t);let a=t.updatedPath?t.updatedPath:t.originalPath,i=C(),{subGraphTitleTotalMargin:s}=Xt(i);if(e.label){let l=Et[e.id],r=e.x,n=e.y;if(a){let c=$.calcLabelPosition(a);L.debug("Moving label "+e.label+" from (",r,",",n,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(r=c.x,n=c.y)}l.attr("transform",`translate(${r}, ${n+s/2})`)}if(e.startLabelLeft){let l=M[e.id].startLeft,r=e.x,n=e.y;if(a){let c=$.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",a);r=c.x,n=c.y}l.attr("transform",`translate(${r}, ${n})`)}if(e.startLabelRight){let l=M[e.id].startRight,r=e.x,n=e.y;if(a){let c=$.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",a);r=c.x,n=c.y}l.attr("transform",`translate(${r}, ${n})`)}if(e.endLabelLeft){let l=M[e.id].endLeft,r=e.x,n=e.y;if(a){let c=$.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",a);r=c.x,n=c.y}l.attr("transform",`translate(${r}, ${n})`)}if(e.endLabelRight){let l=M[e.id].endRight,r=e.x,n=e.y;if(a){let c=$.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",a);r=c.x,n=c.y}l.attr("transform",`translate(${r}, ${n})`)}},"positionEdgeLabel"),fr=g((e,t)=>{let a=e.x,i=e.y,s=Math.abs(t.x-a),l=Math.abs(t.y-i),r=e.width/2,n=e.height/2;return s>=r||l>=n},"outsideNode"),xr=g((e,t,a)=>{L.debug(`intersection calc abc89:
130
+ outsidePoint: ${JSON.stringify(t)}
131
+ insidePoint : ${JSON.stringify(a)}
132
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let i=e.x,s=e.y,l=Math.abs(i-a.x),r=e.width/2,n=a.x<t.x?r-l:r+l,c=e.height/2,d=Math.abs(t.y-a.y),h=Math.abs(t.x-a.x);if(Math.abs(s-t.y)*r>Math.abs(i-t.x)*c){let u=a.y<t.y?t.y-c-s:s-c-t.y;n=h*u/d;let y={x:a.x<t.x?a.x+n:a.x-h+n,y:a.y<t.y?a.y+d-u:a.y-d+u};return n===0&&(y.x=t.x,y.y=t.y),h===0&&(y.x=t.x),d===0&&(y.y=t.y),L.debug(`abc89 topp/bott calc, Q ${d}, q ${u}, R ${h}, r ${n}`,y),y}else{a.x<t.x?n=t.x-r-i:n=i-r-t.x;let u=d*n/h,y=a.x<t.x?a.x+h-n:a.x-h+n,m=a.y<t.y?a.y+u:a.y-u;return L.debug(`sides calc abc89, Q ${d}, q ${u}, R ${h}, r ${n}`,{_x:y,_y:m}),n===0&&(y=t.x,m=t.y),h===0&&(y=t.x),d===0&&(m=t.y),{x:y,y:m}}},"intersection"),te=g((e,t)=>{L.debug("abc88 cutPathAtIntersect",e,t);let a=[],i=e[0],s=!1;return e.forEach(l=>{if(!fr(t,l)&&!s){let r=xr(t,i,l),n=!1;a.forEach(c=>{n=n||c.x===r.x&&c.y===r.y}),a.some(c=>c.x===r.x&&c.y===r.y)||a.push(r),s=!0}else i=l,s||a.push(l)}),a},"cutPathAtIntersect"),br=g(function(e,t,a,i,s,l,r){let n=a.points;L.debug("abc88 InsertEdge: edge=",a,"e=",t);let c=!1,d=l.node(t.v);var h=l.node(t.w);h?.intersect&&d?.intersect&&(n=n.slice(1,a.points.length-1),n.unshift(d.intersect(n[0])),n.push(h.intersect(n[n.length-1]))),a.toCluster&&(L.debug("to cluster abc88",i[a.toCluster]),n=te(a.points,i[a.toCluster].node),c=!0),a.fromCluster&&(L.debug("from cluster abc88",i[a.fromCluster]),n=te(n.reverse(),i[a.fromCluster].node).reverse(),c=!0);let u=n.filter(w=>!Number.isNaN(w.y)),y=Ht;a.curve&&(s==="graph"||s==="flowchart")&&(y=a.curve);let{x:m,y:b}=Vt(a),v=Yt().x(m).y(b).curve(y),k;switch(a.thickness){case"normal":k="edge-thickness-normal";break;case"thick":k="edge-thickness-thick";break;case"invisible":k="edge-thickness-thick";break;default:k=""}switch(a.pattern){case"solid":k+=" edge-pattern-solid";break;case"dotted":k+=" edge-pattern-dotted";break;case"dashed":k+=" edge-pattern-dashed";break}let I=e.append("path").attr("d",v(u)).attr("id",a.id).attr("class"," "+k+(a.classes?" "+a.classes:"")).attr("style",a.style),D="";(C().flowchart.arrowMarkerAbsolute||C().state.arrowMarkerAbsolute)&&(D=Mt(!0)),gr(I,a,D,r,s);let T={};return c&&(T.updatedPath=n),T.originalPath=a.points,T},"insertEdge"),yr=g(e=>{let t=new Set;for(let a of e)switch(a){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(a);break}return t},"expandAndDeduplicateDirections"),mr=g((e,t,a,i)=>{let s=yr(e),l=2,r=t.height+2*a.padding,n=r/l,c=i??t.width+2*n+a.padding,d=a.padding/2;return s.has("right")&&s.has("left")&&s.has("up")&&s.has("down")?[{x:0,y:0},{x:n,y:0},{x:c/2,y:2*d},{x:c-n,y:0},{x:c,y:0},{x:c,y:-r/3},{x:c+2*d,y:-r/2},{x:c,y:-2*r/3},{x:c,y:-r},{x:c-n,y:-r},{x:c/2,y:-r-2*d},{x:n,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*d,y:-r/2},{x:0,y:-r/3}]:s.has("right")&&s.has("left")&&s.has("up")?[{x:n,y:0},{x:c-n,y:0},{x:c,y:-r/2},{x:c-n,y:-r},{x:n,y:-r},{x:0,y:-r/2}]:s.has("right")&&s.has("left")&&s.has("down")?[{x:0,y:0},{x:n,y:-r},{x:c-n,y:-r},{x:c,y:0}]:s.has("right")&&s.has("up")&&s.has("down")?[{x:0,y:0},{x:c,y:-n},{x:c,y:-r+n},{x:0,y:-r}]:s.has("left")&&s.has("up")&&s.has("down")?[{x:c,y:0},{x:0,y:-n},{x:0,y:-r+n},{x:c,y:-r}]:s.has("right")&&s.has("left")?[{x:n,y:0},{x:n,y:-d},{x:c-n,y:-d},{x:c-n,y:0},{x:c,y:-r/2},{x:c-n,y:-r},{x:c-n,y:-r+d},{x:n,y:-r+d},{x:n,y:-r},{x:0,y:-r/2}]:s.has("up")&&s.has("down")?[{x:c/2,y:0},{x:0,y:-d},{x:n,y:-d},{x:n,y:-r+d},{x:0,y:-r+d},{x:c/2,y:-r},{x:c,y:-r+d},{x:c-n,y:-r+d},{x:c-n,y:-d},{x:c,y:-d}]:s.has("right")&&s.has("up")?[{x:0,y:0},{x:c,y:-n},{x:0,y:-r}]:s.has("right")&&s.has("down")?[{x:0,y:0},{x:c,y:0},{x:0,y:-r}]:s.has("left")&&s.has("up")?[{x:c,y:0},{x:0,y:-n},{x:c,y:-r}]:s.has("left")&&s.has("down")?[{x:c,y:0},{x:0,y:0},{x:c,y:-r}]:s.has("right")?[{x:n,y:-d},{x:n,y:-d},{x:c-n,y:-d},{x:c-n,y:0},{x:c,y:-r/2},{x:c-n,y:-r},{x:c-n,y:-r+d},{x:n,y:-r+d},{x:n,y:-r+d}]:s.has("left")?[{x:n,y:0},{x:n,y:-d},{x:c-n,y:-d},{x:c-n,y:-r+d},{x:n,y:-r+d},{x:n,y:-r},{x:0,y:-r/2}]:s.has("up")?[{x:n,y:-d},{x:n,y:-r+d},{x:0,y:-r+d},{x:c/2,y:-r},{x:c,y:-r+d},{x:c-n,y:-r+d},{x:c-n,y:-d}]:s.has("down")?[{x:c/2,y:0},{x:0,y:-d},{x:n,y:-d},{x:n,y:-r+d},{x:c-n,y:-r+d},{x:c-n,y:-d},{x:c,y:-d}]:[{x:0,y:0}]},"getArrowPoints");function pe(e,t){return e.intersect(t)}g(pe,"intersectNode");var wr=pe;function fe(e,t,a,i){var s=e.x,l=e.y,r=s-i.x,n=l-i.y,c=Math.sqrt(t*t*n*n+a*a*r*r),d=Math.abs(t*a*r/c);i.x<s&&(d=-d);var h=Math.abs(t*a*n/c);return i.y<l&&(h=-h),{x:s+d,y:l+h}}g(fe,"intersectEllipse");var xe=fe;function be(e,t,a){return xe(e,t,t,a)}g(be,"intersectCircle");var kr=be;function ye(e,t,a,i){var s,l,r,n,c,d,h,u,y,m,b,v,k,I,D;if(s=t.y-e.y,r=e.x-t.x,c=t.x*e.y-e.x*t.y,y=s*a.x+r*a.y+c,m=s*i.x+r*i.y+c,!(y!==0&&m!==0&&_t(y,m))&&(l=i.y-a.y,n=a.x-i.x,d=i.x*a.y-a.x*i.y,h=l*e.x+n*e.y+d,u=l*t.x+n*t.y+d,!(h!==0&&u!==0&&_t(h,u))&&(b=s*n-l*r,b!==0)))return v=Math.abs(b/2),k=r*d-n*c,I=k<0?(k-v)/b:(k+v)/b,k=l*c-s*d,D=k<0?(k-v)/b:(k+v)/b,{x:I,y:D}}g(ye,"intersectLine");function _t(e,t){return e*t>0}g(_t,"sameSign");var Sr=ye,Lr=me;function me(e,t,a){var i=e.x,s=e.y,l=[],r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(b){r=Math.min(r,b.x),n=Math.min(n,b.y)}):(r=Math.min(r,t.x),n=Math.min(n,t.y));for(var c=i-e.width/2-r,d=s-e.height/2-n,h=0;h<t.length;h++){var u=t[h],y=t[h<t.length-1?h+1:0],m=Sr(e,a,{x:c+u.x,y:d+u.y},{x:c+y.x,y:d+y.y});m&&l.push(m)}return l.length?(l.length>1&&l.sort(function(b,v){var k=b.x-a.x,I=b.y-a.y,D=Math.sqrt(k*k+I*I),T=v.x-a.x,w=v.y-a.y,p=Math.sqrt(T*T+w*w);return D<p?-1:D===p?0:1}),l[0]):e}g(me,"intersectPolygon");var vr=g((e,t)=>{var a=e.x,i=e.y,s=t.x-a,l=t.y-i,r=e.width/2,n=e.height/2,c,d;return Math.abs(l)*r>Math.abs(s)*n?(l<0&&(n=-n),c=l===0?0:n*s/l,d=n):(s<0&&(r=-r),c=r,d=s===0?0:r*l/s),{x:a+c,y:i+d}},"intersectRect"),Er=vr,B={node:wr,circle:kr,ellipse:xe,polygon:Lr,rect:Er},z=g(async(e,t,a,i)=>{let s=C(),l,r=t.useHtmlLabels||A(s);a?l=a:l="node default";let n=e.insert("g").attr("class",l).attr("id",t.domId||t.id),c=n.insert("g").attr("class","label").attr("style",t.labelStyle),d;t.labelText===void 0?d="":d=typeof t.labelText=="string"?t.labelText:t.labelText[0];let h;t.labelType==="markdown"?h=nt(c,mt(wt(d),s),{useHtmlLabels:r,width:t.width||s.flowchart.wrappingWidth,classes:"markdown-node-label"},s):h=await K(c,mt(wt(d),s),t.labelStyle,!1,i);let u=h.getBBox(),y=t.padding/2;if(A(s)){let m=h.children[0],b=_(h);await jt(m,d),u=m.getBoundingClientRect(),b.attr("width",u.width),b.attr("height",u.height)}return r?c.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):c.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&c.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:n,bbox:u,halfPadding:y,label:c}},"labelHelper"),N=g((e,t)=>{let a=t.node().getBBox();e.width=a.width,e.height=a.height},"updateNodeBounds");function X(e,t,a,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+a/2+")")}g(X,"insertPolygonShape");var _r=g(async(e,t)=>{t.useHtmlLabels||A(C())||(t.centerLabel=!0);let{shapeSvg:i,bbox:s,halfPadding:l}=await z(e,t,"node "+t.classes,!0);L.info("Classes = ",t.classes);let r=i.insert("rect",":first-child");return r.attr("rx",t.rx).attr("ry",t.ry).attr("x",-s.width/2-l).attr("y",-s.height/2-l).attr("width",s.width+t.padding).attr("height",s.height+t.padding),N(t,r),t.intersect=function(n){return B.rect(t,n)},i},"note"),Dr=_r,ee=g(e=>e?" "+e:"","formatClass"),Y=g((e,t)=>`${t||"node default"}${ee(e.classes)} ${ee(e.class)}`,"getClassesFromNode"),re=g(async(e,t)=>{let{shapeSvg:a,bbox:i}=await z(e,t,Y(t,void 0),!0),s=i.width+t.padding,l=i.height+t.padding,r=s+l,n=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}];L.info("Question main (Circle)");let c=X(a,r,r,n);return c.attr("style",t.style),N(t,c),t.intersect=function(d){return L.warn("Intersect called"),B.polygon(t,n,d)},a},"question"),Tr=g((e,t)=>{let a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=28,s=[{x:0,y:i/2},{x:i/2,y:0},{x:0,y:-i/2},{x:-i/2,y:0}];return a.insert("polygon",":first-child").attr("points",s.map(function(r){return r.x+","+r.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(r){return B.circle(t,14,r)},a},"choice"),Br=g(async(e,t)=>{let{shapeSvg:a,bbox:i}=await z(e,t,Y(t,void 0),!0),s=4,l=t.positioned?t.height:i.height+t.padding,r=l/s,n=t.positioned?t.width:i.width+2*r+t.padding,c=[{x:r,y:0},{x:n-r,y:0},{x:n,y:-l/2},{x:n-r,y:-l},{x:r,y:-l},{x:0,y:-l/2}],d=X(a,n,l,c);return d.attr("style",t.style),N(t,d),t.intersect=function(h){return B.polygon(t,c,h)},a},"hexagon"),Ir=g(async(e,t)=>{let{shapeSvg:a,bbox:i}=await z(e,t,void 0,!0),s=2,l=i.height+2*t.padding,r=l/s,n=i.width+2*r+t.padding,d=t.positioned&&(t.widthInColumns??1)>1&&t.width>n?t.width:n,h=mr(t.directions,i,t,d),u=X(a,d,l,h);return u.attr("style",t.style),N(t,u),t.intersect=function(y){return B.polygon(t,h,y)},a},"block_arrow"),Nr=g(async(e,t)=>{let{shapeSvg:a,bbox:i}=await z(e,t,Y(t,void 0),!0),s=i.width+t.padding,l=i.height+t.padding,r=[{x:-l/2,y:0},{x:s,y:0},{x:s,y:-l},{x:-l/2,y:-l},{x:0,y:-l/2}];return X(a,s,l,r).attr("style",t.style),t.width=s+l,t.height=l,t.intersect=function(c){return B.polygon(t,r,c)},a},"rect_left_inv_arrow"),Cr=g(async(e,t)=>{let{shapeSvg:a,bbox:i}=await z(e,t,Y(t),!0),s=i.width+t.padding,l=i.height+t.padding,r=[{x:-2*l/6,y:0},{x:s-l/6,y:0},{x:s+2*l/6,y:-l},{x:l/6,y:-l}],n=X(a,s,l,r);return n.attr("style",t.style),N(t,n),t.intersect=function(c){return B.polygon(t,r,c)},a},"lean_right"),Or=g(async(e,t)=>{let{shapeSvg:a,bbox:i}=await z(e,t,Y(t,void 0),!0),s=i.width+t.padding,l=i.height+t.padding,r=[{x:2*l/6,y:0},{x:s+l/6,y:0},{x:s-2*l/6,y:-l},{x:-l/6,y:-l}],n=X(a,s,l,r);return n.attr("style",t.style),N(t,n),t.intersect=function(c){return B.polygon(t,r,c)},a},"lean_left"),Rr=g(async(e,t)=>{let{shapeSvg:a,bbox:i}=await z(e,t,Y(t,void 0),!0),s=i.width+t.padding,l=i.height+t.padding,r=[{x:-2*l/6,y:0},{x:s+2*l/6,y:0},{x:s-l/6,y:-l},{x:l/6,y:-l}],n=X(a,s,l,r);return n.attr("style",t.style),N(t,n),t.intersect=function(c){return B.polygon(t,r,c)},a},"trapezoid"),zr=g(async(e,t)=>{let{shapeSvg:a,bbox:i}=await z(e,t,Y(t,void 0),!0),s=i.width+t.padding,l=i.height+t.padding,r=[{x:l/6,y:0},{x:s-l/6,y:0},{x:s+2*l/6,y:-l},{x:-2*l/6,y:-l}],n=X(a,s,l,r);return n.attr("style",t.style),N(t,n),t.intersect=function(c){return B.polygon(t,r,c)},a},"inv_trapezoid"),Ar=g(async(e,t)=>{let{shapeSvg:a,bbox:i}=await z(e,t,Y(t,void 0),!0),s=i.width+t.padding,l=i.height+t.padding,r=[{x:0,y:0},{x:s+l/2,y:0},{x:s,y:-l/2},{x:s+l/2,y:-l},{x:0,y:-l}],n=X(a,s,l,r);return n.attr("style",t.style),N(t,n),t.intersect=function(c){return B.polygon(t,r,c)},a},"rect_right_inv_arrow"),Mr=g(async(e,t)=>{let{shapeSvg:a,bbox:i}=await z(e,t,Y(t,void 0),!0),s=i.width+t.padding,l=s/2,r=l/(2.5+s/50),n=i.height+r+t.padding,c="M 0,"+r+" a "+l+","+r+" 0,0,0 "+s+" 0 a "+l+","+r+" 0,0,0 "+-s+" 0 l 0,"+n+" a "+l+","+r+" 0,0,0 "+s+" 0 l 0,"+-n,d=a.attr("label-offset-y",r).insert("path",":first-child").attr("style",t.style).attr("d",c).attr("transform","translate("+-s/2+","+-(n/2+r)+")");return N(t,d),t.intersect=function(h){let u=B.rect(t,h),y=u.x-t.x;if(l!=0&&(Math.abs(y)<t.width/2||Math.abs(y)==t.width/2&&Math.abs(u.y-t.y)>t.height/2-r)){let m=r*r*(1-y*y/(l*l));m!=0&&(m=Math.sqrt(m)),m=r-m,h.y-t.y>0&&(m=-m),u.y+=m}return u},a},"cylinder"),Fr=g(async(e,t)=>{let{shapeSvg:a,bbox:i,halfPadding:s}=await z(e,t,"node "+t.classes+" "+t.class,!0),l=a.insert("rect",":first-child"),r=t.positioned?t.width:i.width+t.padding,n=t.positioned?t.height:i.height+t.padding,c=t.positioned?-r/2:-i.width/2-s,d=t.positioned?-n/2:-i.height/2-s;if(l.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",d).attr("width",r).attr("height",n),t.props){let h=new Set(Object.keys(t.props));t.props.borders&&(ht(l,t.props.borders,r,n),h.delete("borders")),h.forEach(u=>{L.warn(`Unknown node property ${u}`)})}return N(t,l),t.intersect=function(h){return B.rect(t,h)},a},"rect"),Pr=g(async(e,t)=>{let{shapeSvg:a,bbox:i,halfPadding:s}=await z(e,t,"node "+t.classes,!0),l=a.insert("rect",":first-child"),r=t.positioned?t.width:i.width+t.padding,n=t.positioned?t.height:i.height+t.padding,c=t.positioned?-r/2:-i.width/2-s,d=t.positioned?-n/2:-i.height/2-s;if(l.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",d).attr("width",r).attr("height",n),t.props){let h=new Set(Object.keys(t.props));t.props.borders&&(ht(l,t.props.borders,r,n),h.delete("borders")),h.forEach(u=>{L.warn(`Unknown node property ${u}`)})}return N(t,l),t.intersect=function(h){return B.rect(t,h)},a},"composite"),Wr=g(async(e,t)=>{let{shapeSvg:a}=await z(e,t,"label",!0);L.trace("Classes = ",t.class);let i=a.insert("rect",":first-child"),s=0,l=0;if(i.attr("width",s).attr("height",l),a.attr("class","label edgeLabel"),t.props){let r=new Set(Object.keys(t.props));t.props.borders&&(ht(i,t.props.borders,s,l),r.delete("borders")),r.forEach(n=>{L.warn(`Unknown node property ${n}`)})}return N(t,i),t.intersect=function(r){return B.rect(t,r)},a},"labelRect");function ht(e,t,a,i){let s=[],l=g(n=>{s.push(n,0)},"addBorder"),r=g(n=>{s.push(0,n)},"skipBorder");t.includes("t")?(L.debug("add top border"),l(a)):r(a),t.includes("r")?(L.debug("add right border"),l(i)):r(i),t.includes("b")?(L.debug("add bottom border"),l(a)):r(a),t.includes("l")?(L.debug("add left border"),l(i)):r(i),e.attr("stroke-dasharray",s.join(" "))}g(ht,"applyNodePropertyBorders");var Yr=g(async(e,t)=>{let a;t.classes?a="node "+t.classes:a="node default";let i=e.insert("g").attr("class",a).attr("id",t.domId||t.id),s=i.insert("rect",":first-child"),l=i.insert("line"),r=i.insert("g").attr("class","label"),n=t.labelText.flat?t.labelText.flat():t.labelText,c="";typeof n=="object"?c=n[0]:c=n,L.info("Label text abc79",c,n,typeof n=="object");let d=await K(r,c,t.labelStyle,!0,!0),h={width:0,height:0};if(A(C())){let v=d.children[0],k=_(d);h=v.getBoundingClientRect(),k.attr("width",h.width),k.attr("height",h.height)}L.info("Text 2",n);let u=n.slice(1,n.length),y=d.getBBox(),m=await K(r,u.join?u.join("<br/>"):u,t.labelStyle,!0,!0);if(A(C())){let v=m.children[0],k=_(m);h=v.getBoundingClientRect(),k.attr("width",h.width),k.attr("height",h.height)}let b=t.padding/2;return _(m).attr("transform","translate( "+(h.width>y.width?0:(y.width-h.width)/2)+", "+(y.height+b+5)+")"),_(d).attr("transform","translate( "+(h.width<y.width?0:-(y.width-h.width)/2)+", 0)"),h=r.node().getBBox(),r.attr("transform","translate("+-h.width/2+", "+(-h.height/2-b+3)+")"),s.attr("class","outer title-state").attr("x",-h.width/2-b).attr("y",-h.height/2-b).attr("width",h.width+t.padding).attr("height",h.height+t.padding),l.attr("class","divider").attr("x1",-h.width/2-b).attr("x2",h.width/2+b).attr("y1",-h.height/2-b+y.height+b).attr("y2",-h.height/2-b+y.height+b),N(t,s),t.intersect=function(v){return B.rect(t,v)},i},"rectWithTitle"),Hr=g(async(e,t)=>{let{shapeSvg:a,bbox:i}=await z(e,t,Y(t,void 0),!0),s=i.height+t.padding,l=i.width+s/4+t.padding,r=a.insert("rect",":first-child").attr("style",t.style).attr("rx",s/2).attr("ry",s/2).attr("x",-l/2).attr("y",-s/2).attr("width",l).attr("height",s);return N(t,r),t.intersect=function(n){return B.rect(t,n)},a},"stadium"),Kr=g(async(e,t)=>{let{shapeSvg:a,bbox:i,halfPadding:s}=await z(e,t,Y(t,void 0),!0),l=a.insert("circle",":first-child");return l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+s).attr("width",i.width+t.padding).attr("height",i.height+t.padding),L.info("Circle main"),N(t,l),t.intersect=function(r){return L.info("Circle intersect",t,i.width/2+s,r),B.circle(t,i.width/2+s,r)},a},"circle"),Ur=g(async(e,t)=>{let{shapeSvg:a,bbox:i,halfPadding:s}=await z(e,t,Y(t,void 0),!0),l=5,r=a.insert("g",":first-child"),n=r.insert("circle"),c=r.insert("circle");return r.attr("class",t.class),n.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+s+l).attr("width",i.width+t.padding+l*2).attr("height",i.height+t.padding+l*2),c.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+s).attr("width",i.width+t.padding).attr("height",i.height+t.padding),L.info("DoubleCircle main"),N(t,n),t.intersect=function(d){return L.info("DoubleCircle intersect",t,i.width/2+s+l,d),B.circle(t,i.width/2+s+l,d)},a},"doublecircle"),Xr=g(async(e,t)=>{let{shapeSvg:a,bbox:i}=await z(e,t,Y(t,void 0),!0),s=i.width+t.padding,l=i.height+t.padding,r=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}],n=X(a,s,l,r);return n.attr("style",t.style),N(t,n),t.intersect=function(c){return B.polygon(t,r,c)},a},"subroutine"),jr=g((e,t)=>{let a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=a.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),N(t,i),t.intersect=function(s){return B.circle(t,7,s)},a},"start"),ae=g((e,t,a)=>{let i=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),s=70,l=10;a==="LR"&&(s=10,l=70);let r=i.append("rect").attr("x",-1*s/2).attr("y",-1*l/2).attr("width",s).attr("height",l).attr("class","fork-join");return N(t,r),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(n){return B.rect(t,n)},i},"forkJoin"),Vr=g((e,t)=>{let a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=a.insert("circle",":first-child"),s=a.insert("circle",":first-child");return s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),i.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),N(t,s),t.intersect=function(l){return B.circle(t,7,l)},a},"end"),Zr=g(async(e,t)=>{let a=t.padding/2,i=4,s=8,l;t.classes?l="node "+t.classes:l="node default";let r=e.insert("g").attr("class",l).attr("id",t.domId||t.id),n=r.insert("rect",":first-child"),c=r.insert("line"),d=r.insert("line"),h=0,u=i,y=r.insert("g").attr("class","label"),m=0,b=t.classData.annotations?.[0],v=t.classData.annotations[0]?"\xAB"+t.classData.annotations[0]+"\xBB":"",k=await K(y,v,t.labelStyle,!0,!0),I=k.getBBox();if(A(C())){let E=k.children[0],o=_(k);I=E.getBoundingClientRect(),o.attr("width",I.width),o.attr("height",I.height)}t.classData.annotations[0]&&(u+=I.height+i,h+=I.width);let D=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(A(C())?D+="&lt;"+t.classData.type+"&gt;":D+="<"+t.classData.type+">");let T=await K(y,D,t.labelStyle,!0,!0);_(T).attr("class","classTitle");let w=T.getBBox();if(A(C())){let E=T.children[0],o=_(T);w=E.getBoundingClientRect(),o.attr("width",w.width),o.attr("height",w.height)}u+=w.height+i,w.width>h&&(h=w.width);let p=[];t.classData.members.forEach(async E=>{let o=E.getDisplayDetails(),P=o.displayText;A(C())&&(P=P.replace(/</g,"&lt;").replace(/>/g,"&gt;"));let f=await K(y,P,o.cssStyle?o.cssStyle:t.labelStyle,!0,!0),O=f.getBBox();if(A(C())){let G=f.children[0],j=_(f);O=G.getBoundingClientRect(),j.attr("width",O.width),j.attr("height",O.height)}O.width>h&&(h=O.width),u+=O.height+i,p.push(f)}),u+=s;let x=[];if(t.classData.methods.forEach(async E=>{let o=E.getDisplayDetails(),P=o.displayText;A(C())&&(P=P.replace(/</g,"&lt;").replace(/>/g,"&gt;"));let f=await K(y,P,o.cssStyle?o.cssStyle:t.labelStyle,!0,!0),O=f.getBBox();if(A(C())){let G=f.children[0],j=_(f);O=G.getBoundingClientRect(),j.attr("width",O.width),j.attr("height",O.height)}O.width>h&&(h=O.width),u+=O.height+i,x.push(f)}),u+=s,b){let E=(h-I.width)/2;_(k).attr("transform","translate( "+(-1*h/2+E)+", "+-1*u/2+")"),m=I.height+i}let S=(h-w.width)/2;return _(T).attr("transform","translate( "+(-1*h/2+S)+", "+(-1*u/2+m)+")"),m+=w.height+i,c.attr("class","divider").attr("x1",-h/2-a).attr("x2",h/2+a).attr("y1",-u/2-a+s+m).attr("y2",-u/2-a+s+m),m+=s,p.forEach(E=>{_(E).attr("transform","translate( "+-h/2+", "+(-1*u/2+m+s/2)+")");let o=E?.getBBox();m+=(o?.height??0)+i}),m+=s,d.attr("class","divider").attr("x1",-h/2-a).attr("x2",h/2+a).attr("y1",-u/2-a+s+m).attr("y2",-u/2-a+s+m),m+=s,x.forEach(E=>{_(E).attr("transform","translate( "+-h/2+", "+(-1*u/2+m)+")");let o=E?.getBBox();m+=(o?.height??0)+i}),n.attr("style",t.style).attr("class","outer title-state").attr("x",-h/2-a).attr("y",-(u/2)-a).attr("width",h+t.padding).attr("height",u+t.padding),N(t,n),t.intersect=function(E){return B.rect(t,E)},r},"class_box"),se={rhombus:re,composite:Pr,question:re,rect:Fr,labelRect:Wr,rectWithTitle:Yr,choice:Tr,circle:Kr,doublecircle:Ur,stadium:Hr,hexagon:Br,block_arrow:Ir,rect_left_inv_arrow:Nr,lean_right:Cr,lean_left:Or,trapezoid:Rr,inv_trapezoid:zr,rect_right_inv_arrow:Ar,cylinder:Mr,start:jr,end:Vr,note:Dr,subroutine:Xr,fork:ae,join:ae,class_box:Zr},lt={},we=g(async(e,t,a)=>{let i,s;if(t.link){let l;C().securityLevel==="sandbox"?l="_top":t.linkTarget&&(l=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",l),s=await se[t.shape](i,t,a)}else s=await se[t.shape](e,t,a),i=s;return t.tooltip&&s.attr("title",t.tooltip),t.class&&s.attr("class","node default "+t.class),lt[t.id]=i,t.haveCallback&&lt[t.id].attr("class",lt[t.id].attr("class")+" clickable"),i},"insertNode"),Gr=g(e=>{let t=lt[e.id];L.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let a=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-a)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode");function Ct(e,t,a=!1){let i=e,s="default";(i?.classes?.length||0)>0&&(s=(i?.classes??[]).join(" ")),s=s+" flowchart-label";let l=0,r="",n;switch(i.type){case"round":l=5,r="rect";break;case"composite":l=0,r="composite",n=0;break;case"square":r="rect";break;case"diamond":r="question";break;case"hexagon":r="hexagon";break;case"block_arrow":r="block_arrow";break;case"odd":r="rect_left_inv_arrow";break;case"lean_right":r="lean_right";break;case"lean_left":r="lean_left";break;case"trapezoid":r="trapezoid";break;case"inv_trapezoid":r="inv_trapezoid";break;case"rect_left_inv_arrow":r="rect_left_inv_arrow";break;case"circle":r="circle";break;case"ellipse":r="ellipse";break;case"stadium":r="stadium";break;case"subroutine":r="subroutine";break;case"cylinder":r="cylinder";break;case"group":r="rect";break;case"doublecircle":r="doublecircle";break;default:r="rect"}let c=Ut(i?.styles??[]),d=i.label,h=i.size??{width:0,height:0,x:0,y:0},u=t.getDiagramId();return{labelStyle:c.labelStyle,shape:r,labelText:d,rx:l,ry:l,class:s,style:c.style,id:i.id,domId:u?`${u}-${i.id}`:i.id,directions:i.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:a,intersect:void 0,type:i.type,padding:n??Q()?.block?.padding??0,widthInColumns:i.widthInColumns??1}}g(Ct,"getNodeFromBlock");async function ke(e,t,a){let i=Ct(t,a,!1);if(i.type==="group")return;let s=Q(),l=await we(e,i,{config:s}),r=l.node().getBBox(),n=a.getBlock(i.id);n.size={width:r.width,height:r.height,x:0,y:0,node:l},a.setBlock(n),l.remove()}g(ke,"calculateBlockSize");async function Se(e,t,a){let i=Ct(t,a,!0);if(a.getBlock(i.id).type!=="space"){let l=Q();await we(e,i,{config:l}),t.intersect=i?.intersect,Gr(i)}}g(Se,"insertBlockPositioned");async function gt(e,t,a,i){for(let s of t)await i(e,s,a),s.children&&await gt(e,s.children,a,i)}g(gt,"performOperations");async function Le(e,t,a){await gt(e,t,a,ke)}g(Le,"calculateBlockSizes");async function ve(e,t,a){await gt(e,t,a,Se)}g(ve,"insertBlocks");async function Ee(e,t,a,i,s){let l=new Zt({multigraph:!0,compound:!0});l.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let r of a)r.size&&l.setNode(r.id,{width:r.size.width,height:r.size.height,intersect:r.intersect});for(let r of t)if(r.start&&r.end){let n=i.getBlock(r.start),c=i.getBlock(r.end);if(n?.size&&c?.size){let d=n.size,h=c.size,u=[{x:d.x,y:d.y},{x:d.x+(h.x-d.x)/2,y:d.y+(h.y-d.y)/2},{x:h.x,y:h.y}],y=s?`${s}-${r.id}`:r.id,m=r.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",b=r.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",v=`${m} ${b} flowchart-link LS-a1 LE-b1`;br(e,{v:r.start,w:r.end,name:y},{...r,id:y,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:u,classes:v},void 0,"block",l,s),r.label&&(await ur(e,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:u,classes:v}),pr({...r,x:u[1].x,y:u[1].y},{originalPath:u}))}}}g(Ee,"insertEdges");var qr=g(function(e,t){return t.db.getClasses()},"getClasses"),Jr=g(async function(e,t,a,i){let{securityLevel:s,block:l}=Q(),r=i.db;r.setDiagramId(t);let n;s==="sandbox"&&(n=_("#i"+t));let c=s==="sandbox"?_(n.nodes()[0].contentDocument.body):_("body"),d=s==="sandbox"?c.select(`[id="${t}"]`):_(`[id="${t}"]`);cr(d,["point","circle","cross"],i.type,t);let u=r.getBlocks(),y=r.getBlocksFlat(),m=r.getEdges(),b=d.insert("g").attr("class","block");await Le(b,u,r);let v=ue(r);if(await ve(b,u,r),await Ee(b,m,y,r,t),v){let k=v,I=Math.max(1,Math.round(.125*(k.width/k.height))),D=k.height+I+10,T=k.width+10,{useMaxWidth:w}=l;Pt(d,D,T,!!w),L.debug("Here Bounds",v,k),d.attr("viewBox",`${k.x-5} ${k.y-5} ${k.width+10} ${k.height+10}`)}},"draw"),Qr={draw:Jr,getClasses:qr},xa={parser:Te,db:Ze,renderer:Qr,styles:qe};export{xa as diagram};
@@ -0,0 +1,10 @@
1
+ import{a as ke,f as Ee}from"./chunk-PLP5XUTJ.js";import{i as ve,j as ee,k as Ct}from"./chunk-6DCNDVBX.js";import{a as Fe}from"./chunk-22DRK7VS.js";import{H as te,N as Yt,O as be,U as ge,V as _e,W as xe,X as me,_ as Ot,h as ye}from"./chunk-7CSIRG7W.js";import{b as $t}from"./chunk-ERWOH47R.js";import{a as y}from"./chunk-EIBFAW37.js";import{e as Dt}from"./chunk-LGUG3SQB.js";import{b as Ue}from"./chunk-6DHFEWGX.js";var Re=Ue(Fe(),1),Ut=(function(){var e=y(function(_t,x,v,k){for(v=v||{},k=_t.length;k--;v[_t[k]]=x);return v},"o"),t=[1,24],n=[1,25],o=[1,26],l=[1,27],s=[1,28],a=[1,63],r=[1,64],i=[1,65],u=[1,66],d=[1,67],p=[1,68],b=[1,69],m=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],rt=[1,46],nt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],bt=[1,59],gt=[1,60],wt=[14,42],Wt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Rt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],E=[1,82],A=[1,83],C=[1,84],w=[1,85],T=[12,14,42],ce=[12,14,33,42],It=[12,14,33,42,76,77,79,80],vt=[12,33],Qt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ht={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:y(function(x,v,k,g,R,h,St){var f=h.length-1;switch(R){case 3:g.setDirection("TB");break;case 4:g.setDirection("BT");break;case 5:g.setDirection("RL");break;case 6:g.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:g.setC4Type(h[f-3]);break;case 19:g.setTitle(h[f].substring(6)),this.$=h[f].substring(6);break;case 20:g.setAccDescription(h[f].substring(15)),this.$=h[f].substring(15);break;case 21:this.$=h[f].trim(),g.setTitle(this.$);break;case 22:case 23:this.$=h[f].trim(),g.setAccDescription(this.$);break;case 28:h[f].splice(2,0,"ENTERPRISE"),g.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 29:h[f].splice(2,0,"SYSTEM"),g.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 30:g.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 31:h[f].splice(2,0,"CONTAINER"),g.addContainerBoundary(...h[f]),this.$=h[f];break;case 32:g.addDeploymentNode("node",...h[f]),this.$=h[f];break;case 33:g.addDeploymentNode("nodeL",...h[f]),this.$=h[f];break;case 34:g.addDeploymentNode("nodeR",...h[f]),this.$=h[f];break;case 35:g.popBoundaryParseStack();break;case 39:g.addPersonOrSystem("person",...h[f]),this.$=h[f];break;case 40:g.addPersonOrSystem("external_person",...h[f]),this.$=h[f];break;case 41:g.addPersonOrSystem("system",...h[f]),this.$=h[f];break;case 42:g.addPersonOrSystem("system_db",...h[f]),this.$=h[f];break;case 43:g.addPersonOrSystem("system_queue",...h[f]),this.$=h[f];break;case 44:g.addPersonOrSystem("external_system",...h[f]),this.$=h[f];break;case 45:g.addPersonOrSystem("external_system_db",...h[f]),this.$=h[f];break;case 46:g.addPersonOrSystem("external_system_queue",...h[f]),this.$=h[f];break;case 47:g.addContainer("container",...h[f]),this.$=h[f];break;case 48:g.addContainer("container_db",...h[f]),this.$=h[f];break;case 49:g.addContainer("container_queue",...h[f]),this.$=h[f];break;case 50:g.addContainer("external_container",...h[f]),this.$=h[f];break;case 51:g.addContainer("external_container_db",...h[f]),this.$=h[f];break;case 52:g.addContainer("external_container_queue",...h[f]),this.$=h[f];break;case 53:g.addComponent("component",...h[f]),this.$=h[f];break;case 54:g.addComponent("component_db",...h[f]),this.$=h[f];break;case 55:g.addComponent("component_queue",...h[f]),this.$=h[f];break;case 56:g.addComponent("external_component",...h[f]),this.$=h[f];break;case 57:g.addComponent("external_component_db",...h[f]),this.$=h[f];break;case 58:g.addComponent("external_component_queue",...h[f]),this.$=h[f];break;case 60:g.addRel("rel",...h[f]),this.$=h[f];break;case 61:g.addRel("birel",...h[f]),this.$=h[f];break;case 62:g.addRel("rel_u",...h[f]),this.$=h[f];break;case 63:g.addRel("rel_d",...h[f]),this.$=h[f];break;case 64:g.addRel("rel_l",...h[f]),this.$=h[f];break;case 65:g.addRel("rel_r",...h[f]),this.$=h[f];break;case 66:g.addRel("rel_b",...h[f]),this.$=h[f];break;case 67:h[f].splice(0,1),g.addRel("rel",...h[f]),this.$=h[f];break;case 68:g.updateElStyle("update_el_style",...h[f]),this.$=h[f];break;case 69:g.updateRelStyle("update_rel_style",...h[f]),this.$=h[f];break;case 70:g.updateLayoutConfig("update_layout_config",...h[f]),this.$=h[f];break;case 71:this.$=[h[f]];break;case 72:h[f].unshift(h[f-1]),this.$=h[f];break;case 73:case 75:this.$=h[f].trim();break;case 74:let kt={};kt[h[f-1].trim()]=h[f].trim(),this.$=kt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:70,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:71,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:72,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:73,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{14:[1,74]},e(wt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:a,36:r,37:i,38:u,39:d,40:p,41:b,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt}),e(wt,[2,14]),e(Wt,[2,16],{12:[1,76]}),e(wt,[2,36],{12:[1,77]}),e(Rt,[2,19]),e(Rt,[2,20]),{25:[1,78]},{27:[1,79]},e(Rt,[2,23]),{35:80,75:81,76:E,77:A,79:C,80:w},{35:86,75:81,76:E,77:A,79:C,80:w},{35:87,75:81,76:E,77:A,79:C,80:w},{35:88,75:81,76:E,77:A,79:C,80:w},{35:89,75:81,76:E,77:A,79:C,80:w},{35:90,75:81,76:E,77:A,79:C,80:w},{35:91,75:81,76:E,77:A,79:C,80:w},{35:92,75:81,76:E,77:A,79:C,80:w},{35:93,75:81,76:E,77:A,79:C,80:w},{35:94,75:81,76:E,77:A,79:C,80:w},{35:95,75:81,76:E,77:A,79:C,80:w},{35:96,75:81,76:E,77:A,79:C,80:w},{35:97,75:81,76:E,77:A,79:C,80:w},{35:98,75:81,76:E,77:A,79:C,80:w},{35:99,75:81,76:E,77:A,79:C,80:w},{35:100,75:81,76:E,77:A,79:C,80:w},{35:101,75:81,76:E,77:A,79:C,80:w},{35:102,75:81,76:E,77:A,79:C,80:w},{35:103,75:81,76:E,77:A,79:C,80:w},{35:104,75:81,76:E,77:A,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:E,77:A,79:C,80:w},{35:106,75:81,76:E,77:A,79:C,80:w},{35:107,75:81,76:E,77:A,79:C,80:w},{35:108,75:81,76:E,77:A,79:C,80:w},{35:109,75:81,76:E,77:A,79:C,80:w},{35:110,75:81,76:E,77:A,79:C,80:w},{35:111,75:81,76:E,77:A,79:C,80:w},{35:112,75:81,76:E,77:A,79:C,80:w},{35:113,75:81,76:E,77:A,79:C,80:w},{35:114,75:81,76:E,77:A,79:C,80:w},{35:115,75:81,76:E,77:A,79:C,80:w},{20:116,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{12:[1,118],33:[1,117]},{35:119,75:81,76:E,77:A,79:C,80:w},{35:120,75:81,76:E,77:A,79:C,80:w},{35:121,75:81,76:E,77:A,79:C,80:w},{35:122,75:81,76:E,77:A,79:C,80:w},{35:123,75:81,76:E,77:A,79:C,80:w},{35:124,75:81,76:E,77:A,79:C,80:w},{35:125,75:81,76:E,77:A,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(wt,[2,15]),e(Wt,[2,17],{21:22,19:130,22:t,23:n,24:o,26:l,28:s}),e(wt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:n,24:o,26:l,28:s,34:a,36:r,37:i,38:u,39:d,40:p,41:b,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt}),e(Rt,[2,21]),e(Rt,[2,22]),e(T,[2,39]),e(ce,[2,71],{75:81,35:132,76:E,77:A,79:C,80:w}),e(It,[2,73]),{78:[1,133]},e(It,[2,75]),e(It,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Wt,[2,18]),e(wt,[2,38]),e(ce,[2,72]),e(It,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Qt,[2,25]),e(Qt,[2,26],{12:[1,138]}),e(Qt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:y(function(x,v){if(v.recoverable)this.trace(x);else{var k=new Error(x);throw k.hash=v,k}},"parseError"),parse:y(function(x){var v=this,k=[0],g=[],R=[null],h=[],St=this.table,f="",kt=0,he=0,ue=0,Le=2,de=1,Ne=h.slice.call(arguments,1),D=Object.create(this.lexer),Et={yy:{}};for(var qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,qt)&&(Et.yy[qt]=this.yy[qt]);D.setInput(x,Et.yy),Et.yy.lexer=D,Et.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Gt=D.yylloc;h.push(Gt);var Ye=D.options&&D.options.ranges;typeof Et.yy.parseError=="function"?this.parseError=Et.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(L){k.length=k.length-2*L,R.length=R.length-L,h.length=h.length-L}y(je,"popStack");function fe(){var L;return L=g.pop()||D.lex()||de,typeof L!="number"&&(L instanceof Array&&(g=L,L=g.pop()),L=v.symbols_[L]||L),L}y(fe,"lex");for(var B,Kt,At,N,I0,Jt,Tt={},Lt,W,pe,Nt;;){if(At=k[k.length-1],this.defaultActions[At]?N=this.defaultActions[At]:((B===null||typeof B>"u")&&(B=fe()),N=St[At]&&St[At][B]),typeof N>"u"||!N.length||!N[0]){var Zt="";Nt=[];for(Lt in St[At])this.terminals_[Lt]&&Lt>Le&&Nt.push("'"+this.terminals_[Lt]+"'");D.showPosition?Zt="Parse error on line "+(kt+1)+`:
2
+ `+D.showPosition()+`
3
+ Expecting `+Nt.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Zt="Parse error on line "+(kt+1)+": Unexpected "+(B==de?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Zt,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:Gt,expected:Nt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+At+", token: "+B);switch(N[0]){case 1:k.push(B),R.push(D.yytext),h.push(D.yylloc),k.push(N[1]),B=null,Kt?(B=Kt,Kt=null):(he=D.yyleng,f=D.yytext,kt=D.yylineno,Gt=D.yylloc,ue>0&&ue--);break;case 2:if(W=this.productions_[N[1]][1],Tt.$=R[R.length-W],Tt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},Ye&&(Tt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Jt=this.performAction.apply(Tt,[f,he,kt,Et.yy,N[1],R,h].concat(Ne)),typeof Jt<"u")return Jt;W&&(k=k.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),k.push(this.productions_[N[1]][0]),R.push(Tt.$),h.push(Tt._$),pe=St[k[k.length-2]][k[k.length-1]],k.push(pe);break;case 3:return!0}}return!0},"parse")},Me=(function(){var _t={EOF:1,parseError:y(function(v,k){if(this.yy.parser)this.yy.parser.parseError(v,k);else throw new Error(v)},"parseError"),setInput:y(function(x,v){return this.yy=v||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:y(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var v=x.match(/(?:\r\n?|\n).*/g);return v?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:y(function(x){var v=x.length,k=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),k.length-1&&(this.yylineno-=k.length-1);var R=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:k?(k.length===g.length?this.yylloc.first_column:0)+g[g.length-k.length].length-k[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:y(function(){return this._more=!0,this},"more"),reject:y(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:y(function(x){this.unput(this.match.slice(x))},"less"),pastInput:y(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:y(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:y(function(){var x=this.pastInput(),v=new Array(x.length+1).join("-");return x+this.upcomingInput()+`
5
+ `+v+"^"},"showPosition"),test_match:y(function(x,v){var k,g,R;if(this.options.backtrack_lexer&&(R={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&&(R.yylloc.range=this.yylloc.range.slice(0))),g=x[0].match(/(?:\r\n?|\n).*/g),g&&(this.yylineno+=g.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-g[g.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(x[0].length),this.matched+=x[0],k=this.performAction.call(this,this.yy,this,v,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),k)return k;if(this._backtrack){for(var h in R)this[h]=R[h];return!1}return!1},"test_match"),next:y(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,v,k,g;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),h=0;h<R.length;h++)if(k=this._input.match(this.rules[R[h]]),k&&(!v||k[0].length>v[0].length)){if(v=k,g=h,this.options.backtrack_lexer){if(x=this.test_match(k,R[h]),x!==!1)return x;if(this._backtrack){v=!1;continue}else return!1}else if(!this.options.flex)break}return v?(x=this.test_match(v,R[g]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:y(function(){var v=this.next();return v||this.lex()},"lex"),begin:y(function(v){this.conditionStack.push(v)},"begin"),popState:y(function(){var v=this.conditionStack.length-1;return v>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:y(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:y(function(v){return v=this.conditionStack.length-1-Math.abs(v||0),v>=0?this.conditionStack[v]:"INITIAL"},"topState"),pushState:y(function(v){this.begin(v)},"pushState"),stateStackSize:y(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:y(function(v,k,g,R){var h=R;switch(g){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),26;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:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;break;case 23:return this.begin("person"),44;break;case 24:return this.begin("system_ext_queue"),51;break;case 25:return this.begin("system_ext_db"),50;break;case 26:return this.begin("system_ext"),49;break;case 27:return this.begin("system_queue"),48;break;case 28:return this.begin("system_db"),47;break;case 29:return this.begin("system"),46;break;case 30:return this.begin("boundary"),37;break;case 31:return this.begin("enterprise_boundary"),34;break;case 32:return this.begin("system_boundary"),36;break;case 33:return this.begin("container_ext_queue"),57;break;case 34:return this.begin("container_ext_db"),56;break;case 35:return this.begin("container_ext"),55;break;case 36:return this.begin("container_queue"),54;break;case 37:return this.begin("container_db"),53;break;case 38:return this.begin("container"),52;break;case 39:return this.begin("container_boundary"),38;break;case 40:return this.begin("component_ext_queue"),63;break;case 41:return this.begin("component_ext_db"),62;break;case 42:return this.begin("component_ext"),61;break;case 43:return this.begin("component_queue"),60;break;case 44:return this.begin("component_db"),59;break;case 45:return this.begin("component"),58;break;case 46:return this.begin("node"),39;break;case 47:return this.begin("node"),39;break;case 48:return this.begin("node_l"),40;break;case 49:return this.begin("node_r"),41;break;case 50:return this.begin("rel"),64;break;case 51:return this.begin("birel"),65;break;case 52:return this.begin("rel_u"),66;break;case 53:return this.begin("rel_u"),66;break;case 54:return this.begin("rel_d"),67;break;case 55:return this.begin("rel_d"),67;break;case 56:return this.begin("rel_l"),68;break;case 57:return this.begin("rel_l"),68;break;case 58:return this.begin("rel_r"),69;break;case 59:return this.begin("rel_r"),69;break;case 60:return this.begin("rel_b"),70;break;case 61:return this.begin("rel_index"),71;break;case 62:return this.begin("update_el_style"),72;break;case 63:return this.begin("update_rel_style"),73;break;case 64:return this.begin("update_layout_config"),74;break;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";break;case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";break;case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[65,66,67,68],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return _t})();Ht.lexer=Me;function Mt(){this.yy={}}return y(Mt,"Parser"),Mt.prototype=Ht,Ht.Parser=Mt,new Mt})();Ut.parser=Ut;var Ve=Ut,V=[],xt=[""],I="global",F="",X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Bt=[],ne="",se=!1,Ft=4,Vt=2,we,ze=y(function(){return we},"getC4Type"),Xe=y(function(e){we=te(e,Ot())},"setC4Type"),We=y(function(e,t,n,o,l,s,a,r,i){if(e==null||t===void 0||t===null||n===void 0||n===null||o===void 0||o===null)return;let u={},d=Bt.find(p=>p.from===t&&p.to===n);if(d?u=d:Bt.push(u),u.type=e,u.from=t,u.to=n,u.label={text:o},l==null)u.techn={text:""};else if(typeof l=="object"){let[p,b]=Object.entries(l)[0];u[p]={text:b}}else u.techn={text:l};if(s==null)u.descr={text:""};else if(typeof s=="object"){let[p,b]=Object.entries(s)[0];u[p]={text:b}}else u.descr={text:s};if(typeof a=="object"){let[p,b]=Object.entries(a)[0];u[p]=b}else u.sprite=a;if(typeof r=="object"){let[p,b]=Object.entries(r)[0];u[p]=b}else u.tags=r;if(typeof i=="object"){let[p,b]=Object.entries(i)[0];u[p]=b}else u.link=i;u.wrap=mt()},"addRel"),Qe=y(function(e,t,n,o,l,s,a){if(t===null||n===null)return;let r={},i=V.find(u=>u.alias===t);if(i&&t===i.alias?r=i:(r.alias=t,V.push(r)),n==null?r.label={text:""}:r.label={text:n},o==null)r.descr={text:""};else if(typeof o=="object"){let[u,d]=Object.entries(o)[0];r[u]={text:d}}else r.descr={text:o};if(typeof l=="object"){let[u,d]=Object.entries(l)[0];r[u]=d}else r.sprite=l;if(typeof s=="object"){let[u,d]=Object.entries(s)[0];r[u]=d}else r.tags=s;if(typeof a=="object"){let[u,d]=Object.entries(a)[0];r[u]=d}else r.link=a;r.typeC4Shape={text:e},r.parentBoundary=I,r.wrap=mt()},"addPersonOrSystem"),He=y(function(e,t,n,o,l,s,a,r){if(t===null||n===null)return;let i={},u=V.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,V.push(i)),n==null?i.label={text:""}:i.label={text:n},o==null)i.techn={text:""};else if(typeof o=="object"){let[d,p]=Object.entries(o)[0];i[d]={text:p}}else i.techn={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,p]=Object.entries(l)[0];i[d]={text:p}}else i.descr={text:l};if(typeof s=="object"){let[d,p]=Object.entries(s)[0];i[d]=p}else i.sprite=s;if(typeof a=="object"){let[d,p]=Object.entries(a)[0];i[d]=p}else i.tags=a;if(typeof r=="object"){let[d,p]=Object.entries(r)[0];i[d]=p}else i.link=r;i.wrap=mt(),i.typeC4Shape={text:e},i.parentBoundary=I},"addContainer"),qe=y(function(e,t,n,o,l,s,a,r){if(t===null||n===null)return;let i={},u=V.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,V.push(i)),n==null?i.label={text:""}:i.label={text:n},o==null)i.techn={text:""};else if(typeof o=="object"){let[d,p]=Object.entries(o)[0];i[d]={text:p}}else i.techn={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,p]=Object.entries(l)[0];i[d]={text:p}}else i.descr={text:l};if(typeof s=="object"){let[d,p]=Object.entries(s)[0];i[d]=p}else i.sprite=s;if(typeof a=="object"){let[d,p]=Object.entries(a)[0];i[d]=p}else i.tags=a;if(typeof r=="object"){let[d,p]=Object.entries(r)[0];i[d]=p}else i.link=r;i.wrap=mt(),i.typeC4Shape={text:e},i.parentBoundary=I},"addComponent"),Ge=y(function(e,t,n,o,l){if(e===null||t===null)return;let s={},a=X.find(r=>r.alias===e);if(a&&e===a.alias?s=a:(s.alias=e,X.push(s)),t==null?s.label={text:""}:s.label={text:t},n==null)s.type={text:"system"};else if(typeof n=="object"){let[r,i]=Object.entries(n)[0];s[r]={text:i}}else s.type={text:n};if(typeof o=="object"){let[r,i]=Object.entries(o)[0];s[r]=i}else s.tags=o;if(typeof l=="object"){let[r,i]=Object.entries(l)[0];s[r]=i}else s.link=l;s.parentBoundary=I,s.wrap=mt(),F=I,I=e,xt.push(F)},"addPersonOrSystemBoundary"),Ke=y(function(e,t,n,o,l){if(e===null||t===null)return;let s={},a=X.find(r=>r.alias===e);if(a&&e===a.alias?s=a:(s.alias=e,X.push(s)),t==null?s.label={text:""}:s.label={text:t},n==null)s.type={text:"container"};else if(typeof n=="object"){let[r,i]=Object.entries(n)[0];s[r]={text:i}}else s.type={text:n};if(typeof o=="object"){let[r,i]=Object.entries(o)[0];s[r]=i}else s.tags=o;if(typeof l=="object"){let[r,i]=Object.entries(l)[0];s[r]=i}else s.link=l;s.parentBoundary=I,s.wrap=mt(),F=I,I=e,xt.push(F)},"addContainerBoundary"),Je=y(function(e,t,n,o,l,s,a,r){if(t===null||n===null)return;let i={},u=X.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,X.push(i)),n==null?i.label={text:""}:i.label={text:n},o==null)i.type={text:"node"};else if(typeof o=="object"){let[d,p]=Object.entries(o)[0];i[d]={text:p}}else i.type={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,p]=Object.entries(l)[0];i[d]={text:p}}else i.descr={text:l};if(typeof a=="object"){let[d,p]=Object.entries(a)[0];i[d]=p}else i.tags=a;if(typeof r=="object"){let[d,p]=Object.entries(r)[0];i[d]=p}else i.link=r;i.nodeType=e,i.parentBoundary=I,i.wrap=mt(),F=I,I=t,xt.push(F)},"addDeploymentNode"),Ze=y(function(){I=F,xt.pop(),F=xt.pop(),xt.push(F)},"popBoundaryParseStack"),$e=y(function(e,t,n,o,l,s,a,r,i,u,d){let p=V.find(b=>b.alias===t);if(!(p===void 0&&(p=X.find(b=>b.alias===t),p===void 0))){if(n!=null)if(typeof n=="object"){let[b,m]=Object.entries(n)[0];p[b]=m}else p.bgColor=n;if(o!=null)if(typeof o=="object"){let[b,m]=Object.entries(o)[0];p[b]=m}else p.fontColor=o;if(l!=null)if(typeof l=="object"){let[b,m]=Object.entries(l)[0];p[b]=m}else p.borderColor=l;if(s!=null)if(typeof s=="object"){let[b,m]=Object.entries(s)[0];p[b]=m}else p.shadowing=s;if(a!=null)if(typeof a=="object"){let[b,m]=Object.entries(a)[0];p[b]=m}else p.shape=a;if(r!=null)if(typeof r=="object"){let[b,m]=Object.entries(r)[0];p[b]=m}else p.sprite=r;if(i!=null)if(typeof i=="object"){let[b,m]=Object.entries(i)[0];p[b]=m}else p.techn=i;if(u!=null)if(typeof u=="object"){let[b,m]=Object.entries(u)[0];p[b]=m}else p.legendText=u;if(d!=null)if(typeof d=="object"){let[b,m]=Object.entries(d)[0];p[b]=m}else p.legendSprite=d}},"updateElStyle"),t0=y(function(e,t,n,o,l,s,a){let r=Bt.find(i=>i.from===t&&i.to===n);if(r!==void 0){if(o!=null)if(typeof o=="object"){let[i,u]=Object.entries(o)[0];r[i]=u}else r.textColor=o;if(l!=null)if(typeof l=="object"){let[i,u]=Object.entries(l)[0];r[i]=u}else r.lineColor=l;if(s!=null)if(typeof s=="object"){let[i,u]=Object.entries(s)[0];r[i]=parseInt(u)}else r.offsetX=parseInt(s);if(a!=null)if(typeof a=="object"){let[i,u]=Object.entries(a)[0];r[i]=parseInt(u)}else r.offsetY=parseInt(a)}},"updateRelStyle"),e0=y(function(e,t,n){let o=Ft,l=Vt;if(typeof t=="object"){let s=Object.values(t)[0];o=parseInt(s)}else o=parseInt(t);if(typeof n=="object"){let s=Object.values(n)[0];l=parseInt(s)}else l=parseInt(n);o>=1&&(Ft=o),l>=1&&(Vt=l)},"updateLayoutConfig"),a0=y(function(){return Ft},"getC4ShapeInRow"),i0=y(function(){return Vt},"getC4BoundaryInRow"),r0=y(function(){return I},"getCurrentBoundaryParse"),n0=y(function(){return F},"getParentBoundaryParse"),Te=y(function(e){return e==null?V:V.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),s0=y(function(e){return V.find(t=>t.alias===e)},"getC4Shape"),l0=y(function(e){return Object.keys(Te(e))},"getC4ShapeKeys"),Oe=y(function(e){return e==null?X:X.filter(t=>t.parentBoundary===e)},"getBoundaries"),o0=Oe,c0=y(function(){return Bt},"getRels"),h0=y(function(){return ne},"getTitle"),u0=y(function(e){se=e},"setWrap"),mt=y(function(){return se},"autoWrap"),d0=y(function(){V=[],X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],F="",I="global",xt=[""],Bt=[],xt=[""],ne="",se=!1,Ft=4,Vt=2},"clear"),f0={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},p0={FILLED:0,OPEN:1},y0={LEFTOF:0,RIGHTOF:1,OVER:2},b0=y(function(e){ne=te(e,Ot())},"setTitle"),ae={addPersonOrSystem:Qe,addPersonOrSystemBoundary:Ge,addContainer:He,addContainerBoundary:Ke,addComponent:qe,addDeploymentNode:Je,popBoundaryParseStack:Ze,addRel:We,updateElStyle:$e,updateRelStyle:t0,updateLayoutConfig:e0,autoWrap:mt,setWrap:u0,getC4ShapeArray:Te,getC4Shape:s0,getC4ShapeKeys:l0,getBoundaries:Oe,getBoundarys:o0,getCurrentBoundaryParse:r0,getParentBoundaryParse:n0,getRels:c0,getTitle:h0,getC4Type:ze,getC4ShapeInRow:a0,getC4BoundaryInRow:i0,setAccTitle:ge,getAccTitle:_e,getAccDescription:me,setAccDescription:xe,getConfig:y(()=>Ot().c4,"getConfig"),clear:d0,LINETYPE:f0,ARROWTYPE:p0,PLACEMENT:y0,setTitle:b0,setC4Type:Xe},le=y(function(e,t){return ke(e,t)},"drawRect"),Se=y(function(e,t,n,o,l,s){let a=e.append("image");a.attr("width",t),a.attr("height",n),a.attr("x",o),a.attr("y",l);let r=s.startsWith("data:image/png;base64")?s:(0,Re.sanitizeUrl)(s);a.attr("xlink:href",r)},"drawImage"),g0=y((e,t,n,o)=>{let l=e.append("g"),s=0;for(let a of t){let r=a.textColor?a.textColor:"#444444",i=a.lineColor?a.lineColor:"#444444",u=a.offsetX?parseInt(a.offsetX):0,d=a.offsetY?parseInt(a.offsetY):0,p="";if(s===0){let m=l.append("line");m.attr("x1",a.startPoint.x),m.attr("y1",a.startPoint.y),m.attr("x2",a.endPoint.x),m.attr("y2",a.endPoint.y),m.attr("stroke-width","1"),m.attr("stroke",i),m.style("fill","none"),a.type!=="rel_b"&&m.attr("marker-end","url("+p+"#"+o+"-arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&m.attr("marker-start","url("+p+"#"+o+"-arrowend)"),s=-1}else{let m=l.append("path");m.attr("fill","none").attr("stroke-width","1").attr("stroke",i).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),a.type!=="rel_b"&&m.attr("marker-end","url("+p+"#"+o+"-arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&m.attr("marker-start","url("+p+"#"+o+"-arrowend)")}let b=n.messageFont();Q(n)(a.label.text,l,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+u,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+d,a.label.width,a.label.height,{fill:r},b),a.techn&&a.techn.text!==""&&(b=n.messageFont(),Q(n)("["+a.techn.text+"]",l,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+u,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+n.messageFontSize+5+d,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:r,"font-style":"italic"},b))}},"drawRels"),_0=y(function(e,t,n){let o=e.append("g"),l=t.bgColor?t.bgColor:"none",s=t.borderColor?t.borderColor:"#444444",a=t.fontColor?t.fontColor:"black",r={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(r={"stroke-width":1});let i={x:t.x,y:t.y,fill:l,stroke:s,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:r};le(o,i);let u=n.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=a,Q(n)(t.label.text,o,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},u),t.type&&t.type.text!==""&&(u=n.boundaryFont(),u.fontColor=a,Q(n)(t.type.text,o,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},u)),t.descr&&t.descr.text!==""&&(u=n.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=a,Q(n)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},u))},"drawBoundary"),x0=y(function(e,t,n){let o=t.bgColor?t.bgColor:n[t.typeC4Shape.text+"_bg_color"],l=t.borderColor?t.borderColor:n[t.typeC4Shape.text+"_border_color"],s=t.fontColor?t.fontColor:"#FFFFFF",a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(t.typeC4Shape.text){case"person":a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}let r=e.append("g");r.attr("class","person-man");let i=Ee();switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":i.x=t.x,i.y=t.y,i.fill=o,i.width=t.width,i.height=t.height,i.stroke=l,i.rx=2.5,i.ry=2.5,i.attrs={"stroke-width":.5},le(r,i);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":r.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),r.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":r.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),r.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2));break}let u=T0(n,t.typeC4Shape.text);switch(r.append("text").attr("fill",s).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",t.typeC4Shape.width).attr("x",t.x+t.width/2-t.typeC4Shape.width/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":Se(r,48,48,t.x+t.width/2-24,t.y+t.image.Y,a);break}let d=n[t.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=s,Q(n)(t.label.text,r,t.x,t.y+t.label.Y,t.width,t.height,{fill:s},d),d=n[t.typeC4Shape.text+"Font"](),d.fontColor=s,t.techn&&t.techn?.text!==""?Q(n)(t.techn.text,r,t.x,t.y+t.techn.Y,t.width,t.height,{fill:s,"font-style":"italic"},d):t.type&&t.type.text!==""&&Q(n)(t.type.text,r,t.x,t.y+t.type.Y,t.width,t.height,{fill:s,"font-style":"italic"},d),t.descr&&t.descr.text!==""&&(d=n.personFont(),d.fontColor=s,Q(n)(t.descr.text,r,t.x,t.y+t.descr.Y,t.width,t.height,{fill:s},d)),t.height},"drawC4Shape"),m0=y(function(e,t){e.append("defs").append("symbol").attr("id",t+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),v0=y(function(e,t){e.append("defs").append("symbol").attr("id",t+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),k0=y(function(e,t){e.append("defs").append("symbol").attr("id",t+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),E0=y(function(e,t){e.append("defs").append("marker").attr("id",t+"-arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),A0=y(function(e,t){e.append("defs").append("marker").attr("id",t+"-arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),C0=y(function(e,t){e.append("defs").append("marker").attr("id",t+"-filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),w0=y(function(e,t){let o=e.append("defs").append("marker").attr("id",t+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);o.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),o.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),T0=y((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"getC4ShapeFont"),Q=(function(){function e(l,s,a,r,i,u,d){let p=s.append("text").attr("x",a+i/2).attr("y",r+u/2+5).style("text-anchor","middle").text(l);o(p,d)}y(e,"byText");function t(l,s,a,r,i,u,d,p){let{fontSize:b,fontFamily:m,fontWeight:O}=p,S=l.split(Yt.lineBreakRegex);for(let P=0;P<S.length;P++){let M=P*b-b*(S.length-1)/2,U=s.append("text").attr("x",a+i/2).attr("y",r).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",b).style("font-weight",O).style("font-family",m);U.append("tspan").attr("dy",M).text(S[P]).attr("alignment-baseline","mathematical"),o(U,d)}}y(t,"byTspan");function n(l,s,a,r,i,u,d,p){let b=s.append("switch"),O=b.append("foreignObject").attr("x",a).attr("y",r).attr("width",i).attr("height",u).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");O.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(l),t(l,b,a,r,i,u,d,p),o(O,d)}y(n,"byFo");function o(l,s){for(let a in s)s.hasOwnProperty(a)&&l.attr(a,s[a])}return y(o,"_setTextAttrs"),function(l){return l.textPlacement==="fo"?n:l.textPlacement==="old"?e:t}})(),z={drawRect:le,drawBoundary:_0,drawC4Shape:x0,drawRels:g0,drawImage:Se,insertArrowHead:E0,insertArrowEnd:A0,insertArrowFilledHead:C0,insertArrowCrossHead:w0,insertDatabaseIcon:m0,insertComputerIcon:v0,insertClockIcon:k0},zt=0,Xt=0,De=4,ie=2;Ut.yy=ae;var _={},Pe=class{static{y(this,"Bounds")}constructor(e){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,re(e.db.getConfig())}setData(e,t,n,o){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=t,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=o}updateVal(e,t,n,o){e[t]===void 0?e[t]=n:e[t]=o(n,e[t])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let t=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+e.margin:this.nextData.stopx+e.margin*2,n=t+e.width,o=this.nextData.starty+e.margin*2,l=o+e.height;(t>=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>De)&&(t=this.nextData.startx+e.margin+_.nextLinePaddingX,o=this.nextData.stopy+e.margin*2,this.nextData.stopx=n=t+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=l=o+e.height,this.nextData.cnt=1),e.x=t,e.y=o,this.updateVal(this.data,"startx",t,Math.min),this.updateVal(this.data,"starty",o,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",l,Math.max),this.updateVal(this.nextData,"startx",t,Math.min),this.updateVal(this.nextData,"starty",o,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",l,Math.max)}init(e){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},re(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},re=y(function(e){ye(_,e),e.fontFamily&&(_.personFontFamily=_.systemFontFamily=_.messageFontFamily=e.fontFamily),e.fontSize&&(_.personFontSize=_.systemFontSize=_.messageFontSize=e.fontSize),e.fontWeight&&(_.personFontWeight=_.systemFontWeight=_.messageFontWeight=e.fontWeight)},"setConf"),Pt=y((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),jt=y(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),O0=y(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont");function j(e,t,n,o,l){if(!t[e].width)if(n)t[e].text=ve(t[e].text,l,o),t[e].textLines=t[e].text.split(Yt.lineBreakRegex).length,t[e].width=l,t[e].height=ee(t[e].text,o);else{let s=t[e].text.split(Yt.lineBreakRegex);t[e].textLines=s.length;let a=0;t[e].height=0,t[e].width=0;for(let r of s)t[e].width=Math.max(Ct(r,o),t[e].width),a=ee(r,o),t[e].height=t[e].height+a}}y(j,"calcC4ShapeTextWH");var Be=y(function(e,t,n){t.x=n.data.startx,t.y=n.data.starty,t.width=n.data.stopx-n.data.startx,t.height=n.data.stopy-n.data.starty,t.label.y=_.c4ShapeMargin-35;let o=t.wrap&&_.wrap,l=jt(_);l.fontSize=l.fontSize+2,l.fontWeight="bold";let s=Ct(t.label.text,l);j("label",t,o,l,s),z.drawBoundary(e,t,_)},"drawBoundary"),Ie=y(function(e,t,n,o){let l=0;for(let s of o){l=0;let a=n[s],r=Pt(_,a.typeC4Shape.text);switch(r.fontSize=r.fontSize-2,a.typeC4Shape.width=Ct("\xAB"+a.typeC4Shape.text+"\xBB",r),a.typeC4Shape.height=r.fontSize+2,a.typeC4Shape.Y=_.c4ShapePadding,l=a.typeC4Shape.Y+a.typeC4Shape.height-4,a.image={width:0,height:0,Y:0},a.typeC4Shape.text){case"person":case"external_person":a.image.width=48,a.image.height=48,a.image.Y=l,l=a.image.Y+a.image.height;break}a.sprite&&(a.image.width=48,a.image.height=48,a.image.Y=l,l=a.image.Y+a.image.height);let i=a.wrap&&_.wrap,u=_.width-_.c4ShapePadding*2,d=Pt(_,a.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",a,i,d,u),a.label.Y=l+8,l=a.label.Y+a.label.height,a.type&&a.type.text!==""){a.type.text="["+a.type.text+"]";let m=Pt(_,a.typeC4Shape.text);j("type",a,i,m,u),a.type.Y=l+5,l=a.type.Y+a.type.height}else if(a.techn&&a.techn.text!==""){a.techn.text="["+a.techn.text+"]";let m=Pt(_,a.techn.text);j("techn",a,i,m,u),a.techn.Y=l+5,l=a.techn.Y+a.techn.height}let p=l,b=a.label.width;if(a.descr&&a.descr.text!==""){let m=Pt(_,a.typeC4Shape.text);j("descr",a,i,m,u),a.descr.Y=l+20,l=a.descr.Y+a.descr.height,b=Math.max(a.label.width,a.descr.width),p=l-a.descr.textLines*5}b=b+_.c4ShapePadding,a.width=Math.max(a.width||_.width,b,_.width),a.height=Math.max(a.height||_.height,p,_.height),a.margin=a.margin||_.c4ShapeMargin,e.insert(a),z.drawC4Shape(t,a,_)}e.bumpLastMargin(_.c4ShapeMargin)},"drawC4ShapeArray"),Y=class{static{y(this,"Point")}constructor(e,t){this.x=e,this.y=t}},Ae=y(function(e,t){let n=e.x,o=e.y,l=t.x,s=t.y,a=n+e.width/2,r=o+e.height/2,i=Math.abs(n-l),u=Math.abs(o-s),d=u/i,p=e.height/e.width,b=null;return o==s&&n<l?b=new Y(n+e.width,r):o==s&&n>l?b=new Y(n,r):n==l&&o<s?b=new Y(a,o+e.height):n==l&&o>s&&(b=new Y(a,o)),n>l&&o<s?p>=d?b=new Y(n,r+d*e.width/2):b=new Y(a-i/u*e.height/2,o+e.height):n<l&&o<s?p>=d?b=new Y(n+e.width,r+d*e.width/2):b=new Y(a+i/u*e.height/2,o+e.height):n<l&&o>s?p>=d?b=new Y(n+e.width,r-d*e.width/2):b=new Y(a+e.height/2*i/u,o):n>l&&o>s&&(p>=d?b=new Y(n,r-e.width/2*d):b=new Y(a-e.height/2*i/u,o)),b},"getIntersectPoint"),R0=y(function(e,t){let n={x:0,y:0};n.x=t.x+t.width/2,n.y=t.y+t.height/2;let o=Ae(e,n);n.x=e.x+e.width/2,n.y=e.y+e.height/2;let l=Ae(t,n);return{startPoint:o,endPoint:l}},"getIntersectPoints"),S0=y(function(e,t,n,o,l){let s=0;for(let a of t){s=s+1;let r=a.wrap&&_.wrap,i=O0(_);o.db.getC4Type()==="C4Dynamic"&&(a.label.text=s+": "+a.label.text);let d=Ct(a.label.text,i);j("label",a,r,i,d),a.techn&&a.techn.text!==""&&(d=Ct(a.techn.text,i),j("techn",a,r,i,d)),a.descr&&a.descr.text!==""&&(d=Ct(a.descr.text,i),j("descr",a,r,i,d));let p=n(a.from),b=n(a.to),m=R0(p,b);a.startPoint=m.startPoint,a.endPoint=m.endPoint}z.drawRels(e,t,_,l)},"drawRels");function oe(e,t,n,o,l){let s=new Pe(l);s.data.widthLimit=n.data.widthLimit/Math.min(ie,o.length);for(let[a,r]of o.entries()){let i=0;r.image={width:0,height:0,Y:0},r.sprite&&(r.image.width=48,r.image.height=48,r.image.Y=i,i=r.image.Y+r.image.height);let u=r.wrap&&_.wrap,d=jt(_);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",r,u,d,s.data.widthLimit),r.label.Y=i+8,i=r.label.Y+r.label.height,r.type&&r.type.text!==""){r.type.text="["+r.type.text+"]";let O=jt(_);j("type",r,u,O,s.data.widthLimit),r.type.Y=i+5,i=r.type.Y+r.type.height}if(r.descr&&r.descr.text!==""){let O=jt(_);O.fontSize=O.fontSize-2,j("descr",r,u,O,s.data.widthLimit),r.descr.Y=i+20,i=r.descr.Y+r.descr.height}if(a==0||a%ie===0){let O=n.data.startx+_.diagramMarginX,S=n.data.stopy+_.diagramMarginY+i;s.setData(O,O,S,S)}else{let O=s.data.stopx!==s.data.startx?s.data.stopx+_.diagramMarginX:s.data.startx,S=s.data.starty;s.setData(O,O,S,S)}s.name=r.alias;let p=l.db.getC4ShapeArray(r.alias),b=l.db.getC4ShapeKeys(r.alias);b.length>0&&Ie(s,e,p,b),t=r.alias;let m=l.db.getBoundaries(t);m.length>0&&oe(e,t,s,m,l),r.alias!=="global"&&Be(e,r,s),n.data.stopy=Math.max(s.data.stopy+_.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(s.data.stopx+_.c4ShapeMargin,n.data.stopx),zt=Math.max(zt,n.data.stopx),Xt=Math.max(Xt,n.data.stopy)}}y(oe,"drawInsideBoundary");var D0=y(function(e,t,n,o){_=Ot().c4;let l=Ot().securityLevel,s;l==="sandbox"&&(s=Dt("#i"+t));let a=l==="sandbox"?Dt(s.nodes()[0].contentDocument.body):Dt("body"),r=o.db;o.db.setWrap(_.wrap),De=r.getC4ShapeInRow(),ie=r.getC4BoundaryInRow(),$t.debug(`C:${JSON.stringify(_,null,2)}`);let i=l==="sandbox"?a.select(`[id="${t}"]`):Dt(`[id="${t}"]`);z.insertComputerIcon(i,t),z.insertDatabaseIcon(i,t),z.insertClockIcon(i,t);let u=new Pe(o);u.setData(_.diagramMarginX,_.diagramMarginX,_.diagramMarginY,_.diagramMarginY),u.data.widthLimit=screen.availWidth,zt=_.diagramMarginX,Xt=_.diagramMarginY;let d=o.db.getTitle(),p=o.db.getBoundaries("");oe(i,"",u,p,o),z.insertArrowHead(i,t),z.insertArrowEnd(i,t),z.insertArrowCrossHead(i,t),z.insertArrowFilledHead(i,t),S0(i,o.db.getRels(),o.db.getC4Shape,o,t),u.data.stopx=zt,u.data.stopy=Xt;let b=u.data,O=b.stopy-b.starty+2*_.diagramMarginY,P=b.stopx-b.startx+2*_.diagramMarginX;d&&i.append("text").text(d).attr("x",(b.stopx-b.startx)/2-4*_.diagramMarginX).attr("y",b.starty+_.diagramMarginY),be(i,O,P,_.useMaxWidth);let M=d?60:0;i.attr("viewBox",b.startx-_.diagramMarginX+" -"+(_.diagramMarginY+M)+" "+P+" "+(O+M)),$t.debug("models:",b)},"draw"),Ce={drawPersonOrSystemArray:Ie,drawBoundary:Be,setConf:re,draw:D0},P0=y(e=>`.person {
7
+ stroke: ${e.personBorder};
8
+ fill: ${e.personBkg};
9
+ }
10
+ `,"getStyles"),B0=P0,F0={parser:Ve,db:ae,renderer:Ce,styles:B0,init:y(({c4:e,wrap:t})=>{Ce.setConf(e),ae.setWrap(t)},"init")};export{F0 as diagram};
@@ -0,0 +1 @@
1
+ import{a as m}from"./chunk-6DHFEWGX.js";var R=m(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0;e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;e.htmlCtrlEntityRegex=/&(newline|tab);/gi;e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;e.urlSchemeRegex=/^.+(:|&colon;)/gim;e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;e.relativeFirstCharacters=[".","/"];e.BLANK_URL="about:blank"});var v=m(s=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});s.sanitizeUrl=p;var t=R();function d(r){return t.relativeFirstCharacters.indexOf(r[0])>-1}function x(r){var c=r.replace(t.ctrlCharactersRegex,"");return c.replace(t.htmlEntitiesRegex,function(a,i){return String.fromCharCode(i)})}function C(r){return URL.canParse(r)}function g(r){try{return decodeURIComponent(r)}catch{return r}}function p(r){if(!r)return t.BLANK_URL;var c,a=g(r.trim());do a=x(a).replace(t.htmlCtrlEntityRegex,"").replace(t.ctrlCharactersRegex,"").replace(t.whitespaceEscapeCharsRegex,"").trim(),a=g(a),c=a.match(t.ctrlCharactersRegex)||a.match(t.htmlEntitiesRegex)||a.match(t.htmlCtrlEntityRegex)||a.match(t.whitespaceEscapeCharsRegex);while(c&&c.length>0);var i=a;if(!i)return t.BLANK_URL;if(d(i))return i;var h=i.trimStart(),u=h.match(t.urlSchemeRegex);if(!u)return i;var n=u[0].toLowerCase().trim();if(t.invalidProtocolRegex.test(n))return t.BLANK_URL;var o=h.replace(/\\/g,"/");if(n==="mailto:"||n.includes("://"))return o;if(n==="http:"||n==="https:"){if(!C(o))return t.BLANK_URL;var l=new URL(o);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return o}});export{v as a};
@@ -0,0 +1,2 @@
1
+ import{a as o,b as d,c,d as i,e as l,g as u,q as f,w as E,y as m}from"./chunk-VYZZPKGK.js";var b=class extends m{static{o(this,"RailroadEbnfTokenBuilder")}constructor(){super(["railroad-ebnf-beta"])}},v=o(a=>{let e=a.slice(1,-1),r="";for(let t=0;t<e.length;t++){let n=e[t];if(n==="\\"&&t+1<e.length){t++;let s=e[t];switch(s){case"n":r+=`
2
+ `;break;case"r":r+="\r";break;case"t":r+=" ";break;default:r+=s}continue}r+=n}return r},"decodeEscapedString"),h=class extends E{static{o(this,"RailroadEbnfValueConverter")}runConverter(a,e,r){let t=super.runConverter(a,e,r);if(a.name==="TITLE"&&typeof t=="string"){let n=t.trim();if(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))return v(n)}return t}runCustomConverter(a,e,r){if(a.name==="EBNF_STRING")return v(e);if(a.name==="EBNF_SPECIAL_SEQUENCE")return e.slice(1,-1).trim()}},C={parser:{TokenBuilder:o(()=>new b,"TokenBuilder"),ValueConverter:o(()=>new h,"ValueConverter")}};function R(a=l){let e=i(c(a),u),r=i(d({shared:e}),f,C);return e.ServiceRegistry.register(r),{shared:e,RailroadEbnf:r}}o(R,"createRailroadEbnfServices");export{C as a,R as b};
@@ -0,0 +1 @@
1
+ import{O as w}from"./chunk-7CSIRG7W.js";import{b as c}from"./chunk-ERWOH47R.js";import{a as r}from"./chunk-EIBFAW37.js";var l=r((t,e,i,h)=>{t.attr("class",i);let{width:o,height:n,x,y:u}=m(t,e);w(t,n,o,h);let a=s(x,u,o,n,e);t.attr("viewBox",a),c.debug(`viewBox configured: ${a} with padding: ${e}`)},"setupViewPortForSVG"),m=r((t,e)=>{let i=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+e*2,height:i.height+e*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),s=r((t,e,i,h,o)=>`${t-o} ${e-o} ${i} ${h}`,"createViewBox");export{l as a};
@@ -0,0 +1 @@
1
+ import{d as h,e as u,f as y,g as w}from"./chunk-57XXJOQN.js";import{a as g,d as f,g as c}from"./chunk-MYMJLHQL.js";import{e as m}from"./chunk-6DCNDVBX.js";import{N as p,u as l}from"./chunk-7CSIRG7W.js";import{b as i}from"./chunk-ERWOH47R.js";import{a as e}from"./chunk-EIBFAW37.js";var L={common:p,getConfig:l,insertCluster:f,insertEdge:y,insertEdgeLabel:h,insertMarkers:w,insertNode:c,interpolateToCurve:m,labelHelper:g,log:i,positionEdgeLabel:u},a={},E=e(t=>{for(let r of t)a[r.name]=r},"registerLayoutLoaders"),b=e(()=>{E([{name:"dagre",loader:e(async()=>await import("./dagre-VZM6K2ZE-BZFBSZAH.js"),"loader")},{name:"swimlane",loader:e(async()=>await import("./swimlanes-SLNWSIFB-ECOAE7LQ.js"),"loader")},{name:"cose-bilkent",loader:e(async()=>await import("./cose-bilkent-JH36ORCC-CBAW64AB.js"),"loader")}])},"registerDefaultLayoutLoaders");b();var U=e(async(t,r,F)=>{if(!(t.layoutAlgorithm in a))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(let o of t.nodes){let I=o.domId||o.id;o.domId=`${t.diagramId}-${I}`}let n=a[t.layoutAlgorithm],$=await n.loader(),{theme:d,themeVariables:D}=t.config,{useGradient:v,gradientStart:x,gradientStop:A}=D,s=r.attr("id");if(r.append("defs").append("filter").attr("id",`${s}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${d?.includes("dark")?"#FFFFFF":"#000000"}`),r.append("defs").append("filter").attr("id",`${s}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${d?.includes("dark")?"#FFFFFF":"#000000"}`),v){let o=r.append("linearGradient").attr("id",r.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");o.append("svg:stop").attr("offset","0%").attr("stop-color",x).attr("stop-opacity",1),o.append("svg:stop").attr("offset","100%").attr("stop-color",A).attr("stop-opacity",1)}return $.render(t,r,L,{algorithm:n.algorithm},F)},"render"),G=e((t="",{fallback:r="dagre"}={})=>{if(t in a)return t;if(r in a)return i.warn(`Layout algorithm ${t} is not registered. Using ${r} as fallback.`),r;throw new Error(`Both layout algorithms ${t} and ${r} are not registered.`)},"getRegisteredLayoutAlgorithm");export{E as a,U as b,G as c};