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,96 @@
1
+ import{a as ge}from"./chunk-D3WOCELE.js";import{a as ue}from"./chunk-2RQCUDTG.js";import{b as he,c as de}from"./chunk-34FHPXU4.js";import"./chunk-57XXJOQN.js";import"./chunk-MYMJLHQL.js";import"./chunk-YORIST7Z.js";import"./chunk-QBPQ7DPE.js";import"./chunk-XQUIO562.js";import"./chunk-GSOU4UTT.js";import"./chunk-IP56FOSI.js";import"./chunk-CBGUD2NP.js";import"./chunk-6DCNDVBX.js";import"./chunk-22DRK7VS.js";import{H as M,_ as C,c as se,d as oe,e as ae,k as B,u as ce,x as le}from"./chunk-7CSIRG7W.js";import{b as T}from"./chunk-ERWOH47R.js";import{a as h}from"./chunk-EIBFAW37.js";import"./chunk-LGUG3SQB.js";import"./chunk-6DHFEWGX.js";var k=[];for(let e=0;e<256;++e)k.push((e+256).toString(16).slice(1));function pe(e,i=0){return(k[e[i+0]]+k[e[i+1]]+k[e[i+2]]+k[e[i+3]]+"-"+k[e[i+4]]+k[e[i+5]]+"-"+k[e[i+6]]+k[e[i+7]]+"-"+k[e[i+8]]+k[e[i+9]]+"-"+k[e[i+10]]+k[e[i+11]]+k[e[i+12]]+k[e[i+13]]+k[e[i+14]]+k[e[i+15]]).toLowerCase()}var Ee=new Uint8Array(16);function q(){return crypto.getRandomValues(Ee)}function _e(e,i,l){return!i&&!e&&crypto.randomUUID?crypto.randomUUID():Se(e,i,l)}function Se(e,i,l){e=e||{};let a=e.random??e.rng?.()??q();if(a.length<16)throw new Error("Random bytes length must be >= 16");if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,i){if(l=l||0,l<0||l+16>i.length)throw new RangeError(`UUID byte range ${l}:${l+15} is out of buffer bounds`);for(let t=0;t<16;++t)i[l+t]=a[t];return i}return pe(a)}var J=_e;var K=(function(){var e=h(function(D,s,n,o){for(n=n||{},o=D.length;o--;n[D[o]]=s);return n},"o"),i=[1,4],l=[1,13],a=[1,12],t=[1,15],d=[1,16],f=[1,20],m=[1,19],b=[6,7,8],O=[1,26],w=[1,24],R=[1,25],g=[6,7,11],A=[1,6,13,15,16,19,22],Q=[1,33],Z=[1,34],$=[1,6,7,11,13,15,16,19,22],j={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:h(function(s,n,o,c,p,r,U){var u=r.length-1;switch(p){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[u].id),c.addNode(r[u-1].length,r[u].id,r[u].descr,r[u].type);break;case 16:c.getLogger().trace("Icon: ",r[u]),c.decorateNode({icon:r[u]});break;case 17:case 21:c.decorateNode({class:r[u]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[u].id),c.addNode(0,r[u].id,r[u].descr,r[u].type);break;case 20:c.decorateNode({icon:r[u]});break;case 25:c.getLogger().trace("node found ..",r[u-2]),this.$={id:r[u-1],descr:r[u-1],type:c.getType(r[u-2],r[u])};break;case 26:this.$={id:r[u],descr:r[u],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",r[u-3]),this.$={id:r[u-3],descr:r[u-1],type:c.getType(r[u-2],r[u])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:i},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:i},{6:l,7:[1,10],9:9,12:11,13:a,14:14,15:t,16:d,17:17,18:18,19:f,22:m},e(b,[2,3]),{1:[2,2]},e(b,[2,4]),e(b,[2,5]),{1:[2,6],6:l,12:21,13:a,14:14,15:t,16:d,17:17,18:18,19:f,22:m},{6:l,9:22,12:11,13:a,14:14,15:t,16:d,17:17,18:18,19:f,22:m},{6:O,7:w,10:23,11:R},e(g,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:f,22:m}),e(g,[2,18]),e(g,[2,19]),e(g,[2,20]),e(g,[2,21]),e(g,[2,23]),e(g,[2,24]),e(g,[2,26],{19:[1,30]}),{20:[1,31]},{6:O,7:w,10:32,11:R},{1:[2,7],6:l,12:21,13:a,14:14,15:t,16:d,17:17,18:18,19:f,22:m},e(A,[2,14],{7:Q,11:Z}),e($,[2,8]),e($,[2,9]),e($,[2,10]),e(g,[2,15]),e(g,[2,16]),e(g,[2,17]),{20:[1,35]},{21:[1,36]},e(A,[2,13],{7:Q,11:Z}),e($,[2,11]),e($,[2,12]),{21:[1,37]},e(g,[2,25]),e(g,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:h(function(s,n){if(n.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=n,o}},"parseError"),parse:h(function(s){var n=this,o=[0],c=[],p=[null],r=[],U=this.table,u="",V=0,ee=0,te=0,me=2,ie=1,ye=r.slice.call(arguments,1),y=Object.create(this.lexer),L={yy:{}};for(var H in this.yy)Object.prototype.hasOwnProperty.call(this.yy,H)&&(L.yy[H]=this.yy[H]);y.setInput(s,L.yy),L.yy.lexer=y,L.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var W=y.yylloc;r.push(W);var ke=y.options&&y.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function be(_){o.length=o.length-2*_,p.length=p.length-_,r.length=r.length-_}h(be,"popStack");function ne(){var _;return _=c.pop()||y.lex()||ie,typeof _!="number"&&(_ instanceof Array&&(c=_,_=c.pop()),_=n.symbols_[_]||_),_}h(ne,"lex");for(var E,X,v,S,we,z,I={},F,x,re,G;;){if(v=o[o.length-1],this.defaultActions[v]?S=this.defaultActions[v]:((E===null||typeof E>"u")&&(E=ne()),S=U[v]&&U[v][E]),typeof S>"u"||!S.length||!S[0]){var Y="";G=[];for(F in U[v])this.terminals_[F]&&F>me&&G.push("'"+this.terminals_[F]+"'");y.showPosition?Y="Parse error on line "+(V+1)+`:
2
+ `+y.showPosition()+`
3
+ Expecting `+G.join(", ")+", got '"+(this.terminals_[E]||E)+"'":Y="Parse error on line "+(V+1)+": Unexpected "+(E==ie?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(Y,{text:y.match,token:this.terminals_[E]||E,line:y.yylineno,loc:W,expected:G})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+E);switch(S[0]){case 1:o.push(E),p.push(y.yytext),r.push(y.yylloc),o.push(S[1]),E=null,X?(E=X,X=null):(ee=y.yyleng,u=y.yytext,V=y.yylineno,W=y.yylloc,te>0&&te--);break;case 2:if(x=this.productions_[S[1]][1],I.$=p[p.length-x],I._$={first_line:r[r.length-(x||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(x||1)].first_column,last_column:r[r.length-1].last_column},ke&&(I._$.range=[r[r.length-(x||1)].range[0],r[r.length-1].range[1]]),z=this.performAction.apply(I,[u,ee,V,L.yy,S[1],p,r].concat(ye)),typeof z<"u")return z;x&&(o=o.slice(0,-1*x*2),p=p.slice(0,-1*x),r=r.slice(0,-1*x)),o.push(this.productions_[S[1]][0]),p.push(I.$),r.push(I._$),re=U[o[o.length-2]][o[o.length-1]],o.push(re);break;case 3:return!0}}return!0},"parse")},fe=(function(){var D={EOF:1,parseError:h(function(n,o){if(this.yy.parser)this.yy.parser.parseError(n,o);else throw new Error(n)},"parseError"),setInput:h(function(s,n){return this.yy=n||this.yy||{},this._input=s,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:h(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:h(function(s){var n=s.length,o=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var c=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),o.length-1&&(this.yylineno-=o.length-1);var p=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:o?(o.length===c.length?this.yylloc.first_column:0)+c[c.length-o.length].length-o[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(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:h(function(s){this.unput(this.match.slice(s))},"less"),pastInput:h(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
5
+ `+n+"^"},"showPosition"),test_match:h(function(s,n){var o,c,p;if(this.options.backtrack_lexer&&(p={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&&(p.yylloc.range=this.yylloc.range.slice(0))),c=s[0].match(/(?:\r\n?|\n).*/g),c&&(this.yylineno+=c.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,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(s[0].length),this.matched+=s[0],o=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var r in p)this[r]=p[r];return!1}return!1},"test_match"),next:h(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,n,o,c;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),r=0;r<p.length;r++)if(o=this._input.match(this.rules[p[r]]),o&&(!n||o[0].length>n[0].length)){if(n=o,c=r,this.options.backtrack_lexer){if(s=this.test_match(o,p[r]),s!==!1)return s;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(s=this.test_match(n,p[c]),s!==!1?s:!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:h(function(){var n=this.next();return n||this.lex()},"lex"),begin:h(function(n){this.conditionStack.push(n)},"begin"),popState:h(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:h(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:h(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:h(function(n){this.begin(n)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:h(function(n,o,c,p){var r=p;switch(c){case 0:return n.getLogger().trace("Found comment",o.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:n.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return n.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:n.getLogger().trace("end icon"),this.popState();break;case 10:return n.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return n.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return n.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return n.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:n.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return n.getLogger().trace("description:",o.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),n.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),n.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),n.getLogger().trace("node end ...",o.yytext),"NODE_DEND";break;case 30:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return n.getLogger().trace("Long description:",o.yytext),20;break;case 36:return n.getLogger().trace("Long description:",o.yytext),20;break}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return D})();j.lexer=fe;function P(){this.yy={}}return h(P,"Parser"),P.prototype=j,j.Parser=P,new P})();K.parser=K;var xe=K,Ne=12,N={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},De=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=N,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{h(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let i=this.nodes.length-1;i>=0;i--)if(this.nodes[i].level<e)return this.nodes[i];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,i,l,a){T.info("addNode",e,i,l,a);let t=!1;this.nodes.length===0?(this.baseLevel=e,e=0,t=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,t=!1);let d=C(),f=d.mindmap?.padding??B.mindmap.padding;switch(a){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:f*=2;break}let m={id:this.count++,nodeId:M(i,d),level:e,descr:M(l,d),type:a,children:[],width:d.mindmap?.maxNodeWidth??B.mindmap.maxNodeWidth,padding:f,isRoot:t},b=this.getParent(e);if(b)b.children.push(m),this.nodes.push(m);else if(t)this.nodes.push(m);else throw new Error(`There can be only one root. No parent could be found for ("${m.descr}")`)}getType(e,i){switch(T.debug("In get type",e,i),e){case"[":return this.nodeType.RECT;case"(":return i===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,i){this.elements[e]=i}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;let i=C(),l=this.nodes[this.nodes.length-1];e.icon&&(l.icon=M(e.icon,i)),e.class&&(l.class=M(e.class,i))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,i){if(e.level===0?e.section=void 0:e.section=i,e.children)for(let[l,a]of e.children.entries()){let t=e.level===0?l%(Ne-1):i;this.assignSections(a,t)}}flattenNodes(e,i){let l=C(),a=["mindmap-node"];e.isRoot===!0?a.push("section-root","section--1"):e.section!==void 0&&a.push(`section-${e.section}`),e.class&&a.push(e.class);let t=a.join(" "),d=h(m=>{let O=(l.theme?.toLowerCase()??"").includes("redux");switch(m){case N.CIRCLE:return"mindmapCircle";case N.RECT:return"rect";case N.ROUNDED_RECT:return"rounded";case N.CLOUD:return"cloud";case N.BANG:return"bang";case N.HEXAGON:return"hexagon";case N.DEFAULT:return O?"rounded":"defaultMindmapNode";case N.NO_BORDER:default:return"rect"}},"getShapeFromType"),f={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:d(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:t,cssStyles:[],look:l.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(i.push(f),e.children)for(let m of e.children)this.flattenNodes(m,i)}generateEdges(e,i){if(!e.children)return;let l=C();for(let a of e.children){let t="edge";a.section!==void 0&&(t+=` section-edge-${a.section}`);let d=e.level+1;t+=` edge-depth-${d}`;let f={id:`edge_${e.id}_${a.id}`,start:e.id.toString(),end:a.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:l.look,classes:t,depth:e.level,section:a.section};i.push(f),this.generateEdges(a,i)}}getData(){let e=this.getMindmap(),i=C(),a=le().layout!==void 0,t=i;if(a||(t.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:t};T.debug("getData: mindmapRoot",e,i),this.assignSections(e);let d=[],f=[];this.flattenNodes(e,d),this.generateEdges(e,f),T.debug(`getData: processed ${d.length} nodes and ${f.length} edges`);let m=new Map;for(let b of d)m.set(b.id,{shape:b.shape,width:b.width,height:b.height,padding:b.padding});return{nodes:d,edges:f,config:t,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(m),type:"mindmap",diagramId:"mindmap-"+J()}}getLogger(){return T}},Le=h(async(e,i,l,a)=>{T.debug(`Rendering mindmap diagram
7
+ `+e);let t=a.db,d=t.getData(),f=ge(i,d.config.securityLevel);if(d.type=a.type,d.layoutAlgorithm=de(d.config.layout,{fallback:"cose-bilkent"}),d.diagramId=i,!t.getMindmap())return;d.nodes.forEach(g=>{g.shape==="rounded"?(g.radius=15,g.taper=15,g.stroke="none",g.width=0,g.padding=15):g.shape==="circle"?g.padding=10:g.shape==="rect"?(g.width=0,g.padding=10):g.shape==="hexagon"&&(g.width=0,g.height=0)}),await he(d,f);let{themeVariables:b}=ce(),{useGradient:O,gradientStart:w,gradientStop:R}=b;if(O&&w&&R){let g=f.attr("id"),A=f.append("defs").append("linearGradient").attr("id",`${g}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");A.append("stop").attr("offset","0%").attr("stop-color",w).attr("stop-opacity",1),A.append("stop").attr("offset","100%").attr("stop-color",R).attr("stop-opacity",1)}ue(f,d.config.mindmap?.padding??B.mindmap.padding,"mindmapDiagram",d.config.mindmap?.useMaxWidth??B.mindmap.useMaxWidth)},"draw"),ve={draw:Le},Te=h(e=>{let{theme:i,look:l}=e,a="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],se(e["lineColor"+t])?e["lineColor"+t]=oe(e["lineColor"+t],20):e["lineColor"+t]=ae(e["lineColor"+t],20);for(let t=0;t<e.THEME_COLOR_LIMIT;t++){let d=""+(l==="neo"?Math.max(10-(t-1)*2,2):17-3*t);a+=`
8
+ .section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} polygon, .section-${t-1} path {
9
+ fill: ${e["cScale"+t]};
10
+ }
11
+ .section-${t-1} text {
12
+ fill: ${e["cScaleLabel"+t]};
13
+ }
14
+ .section-${t-1} span {
15
+ color: ${e["cScaleLabel"+t]};
16
+ }
17
+ .node-icon-${t-1} {
18
+ font-size: 40px;
19
+ color: ${e["cScaleLabel"+t]};
20
+ }
21
+ .section-edge-${t-1}{
22
+ stroke: ${e["cScale"+t]};
23
+ }
24
+ .edge-depth-${t-1}{
25
+ stroke-width: ${d};
26
+ }
27
+ .section-${t-1} line {
28
+ stroke: ${e["cScaleInv"+t]} ;
29
+ stroke-width: 3;
30
+ }
31
+
32
+ .disabled, .disabled circle, .disabled text {
33
+ fill: lightgray;
34
+ }
35
+ .disabled text {
36
+ fill: #efefef;
37
+ }
38
+ [data-look="neo"].mindmap-node.section-${t-1} rect, [data-look="neo"].mindmap-node.section-${t-1} path, [data-look="neo"].mindmap-node.section-${t-1} circle, [data-look="neo"].mindmap-node.section-${t-1} polygon {
39
+ fill: ${i==="redux"||i==="redux-dark"||i==="neutral"?e.mainBkg:e["cScale"+t]};
40
+ stroke: ${i==="redux"||i==="redux-dark"?e.nodeBorder:e["cScale"+t]};
41
+ stroke-width: ${e.strokeWidth??2}px;
42
+ }
43
+ [data-look="neo"].section-edge-${t-1}{
44
+ stroke: ${i?.includes("redux")||i==="neo-dark"?e.nodeBorder:e["cScale"+t]};
45
+ }
46
+ [data-look="neo"].mindmap-node.section-${t-1} text {
47
+ fill: ${i==="redux"||i==="redux-dark"?e.nodeBorder:e["cScaleLabel"+(i==="neutral"?1:t)]};
48
+ }
49
+ `}return a},"genSections"),Oe=h((e,i,l)=>{let a="";for(let t=0;t<e;t++)a+=`
50
+ [data-look="neo"].mindmap-node.section-${t-1} rect, [data-look="neo"].mindmap-node.section-${t-1} path, [data-look="neo"].mindmap-node.section-${t-1} circle, [data-look="neo"].mindmap-node.section-${t-1} polygon {
51
+ stroke: url(${i}-gradient);
52
+ fill: ${l};
53
+ }
54
+ .section-${t-1} line {
55
+ stroke-width: 0;
56
+ }`;return a},"genGradient"),Ie=h(e=>{let{theme:i}=e,l=e.svgId,a=e.dropShadow?e.dropShadow.replace("url(#drop-shadow)",`url(${l}-drop-shadow)`):"none";return`
57
+ .edge {
58
+ stroke-width: 3;
59
+ }
60
+ ${Te(e)}
61
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
62
+ fill: ${e.git0};
63
+ }
64
+ .section-root text {
65
+ fill: ${e.gitBranchLabel0};
66
+ }
67
+ .section-root span {
68
+ color: ${i?.includes("redux")?e.nodeBorder:e.gitBranchLabel0};
69
+ }
70
+ .icon-container {
71
+ height:100%;
72
+ display: flex;
73
+ justify-content: center;
74
+ align-items: center;
75
+ }
76
+ .edge {
77
+ fill: none;
78
+ }
79
+ .mindmap-node-label {
80
+ dy: 1em;
81
+ alignment-baseline: middle;
82
+ text-anchor: middle;
83
+ dominant-baseline: middle;
84
+ text-align: center;
85
+ }
86
+ [data-look="neo"].mindmap-node {
87
+ filter: ${a};
88
+ }
89
+ [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {
90
+ fill: ${i?.includes("redux")?e.mainBkg:e.git0};
91
+ }
92
+ [data-look="neo"].mindmap-node.section-root .text-inner-tspan {
93
+ fill: ${i?.includes("redux")?e.nodeBorder:e["cScaleLabel"+(i==="neutral"?1:0)]};
94
+ }
95
+ ${e.useGradient&&l&&e.mainBkg?Oe(e.THEME_COLOR_LIMIT,l,e.mainBkg):""}
96
+ `},"getStyles"),Ce=Ie,it={get db(){return new De},renderer:ve,parser:xe,styles:Ce};export{it as diagram};
@@ -0,0 +1 @@
1
+ import{a as e,b as r}from"./chunk-OAGTSILX.js";import"./chunk-VYZZPKGK.js";import"./chunk-6DHFEWGX.js";export{e as PacketModule,r as createPacketServices};
@@ -0,0 +1 @@
1
+ import{a,b as m,c as p}from"./chunk-B3K7RH5O.js";import{a as s}from"./chunk-NCOVM3YF.js";import{b as l}from"./chunk-MII4VZEB.js";import"./chunk-HEMELP7J.js";import"./chunk-AIX6IH4O.js";import"./chunk-HZ5I5NJO.js";import"./chunk-ETOVTYWF.js";import"./chunk-SEGIW3MP.js";import"./chunk-Y2XVFW7T.js";import"./chunk-25REBZ7M.js";import"./chunk-UTWOJE2A.js";import{b as i}from"./chunk-6VQ47JJS.js";import"./chunk-OE3NOVIH.js";import"./chunk-LOMHZYS2.js";import"./chunk-OAGTSILX.js";import"./chunk-DN52R6U7.js";import"./chunk-RWFFDL53.js";import"./chunk-A43YELH5.js";import"./chunk-VYZZPKGK.js";import"./chunk-VOCDYA3H.js";import"./chunk-7CSIRG7W.js";import{b as n}from"./chunk-ERWOH47R.js";import{a as t}from"./chunk-EIBFAW37.js";import"./chunk-LGUG3SQB.js";import"./chunk-6DHFEWGX.js";var f=i().RailroadPeg.parser.LangiumParser,c=t(e=>{let r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{let r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{let r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${u(r)}`:`!${u(r)}`}:r},"transformPrefix"),u=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{let r=v(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),v=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return c(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),y=t(e=>({name:e.name,definition:c(e.definition)}),"transformRule"),h=t(e=>{s(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(y(r)))},"populateDb"),b={parse:t(e=>{a.clear(),n.debug("[PEG Parser] Starting Langium parse");let r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new l(r);let o=r.value;n.debug("[PEG Parser] Parsed rules:",o.rules.length),h(o),n.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},R={parser:b,db:a,renderer:p,styles:m};export{R as diagram};
@@ -0,0 +1 @@
1
+ import{a as e,b as r}from"./chunk-DN52R6U7.js";import"./chunk-VYZZPKGK.js";import"./chunk-6DHFEWGX.js";export{e as PieModule,r as createPieServices};
@@ -0,0 +1,39 @@
1
+ import{a as ot}from"./chunk-NCOVM3YF.js";import{a as nt}from"./chunk-MII4VZEB.js";import"./chunk-HEMELP7J.js";import"./chunk-AIX6IH4O.js";import"./chunk-HZ5I5NJO.js";import"./chunk-ETOVTYWF.js";import"./chunk-SEGIW3MP.js";import"./chunk-Y2XVFW7T.js";import"./chunk-25REBZ7M.js";import"./chunk-UTWOJE2A.js";import"./chunk-6VQ47JJS.js";import"./chunk-OE3NOVIH.js";import"./chunk-LOMHZYS2.js";import"./chunk-OAGTSILX.js";import"./chunk-DN52R6U7.js";import"./chunk-RWFFDL53.js";import"./chunk-A43YELH5.js";import"./chunk-VYZZPKGK.js";import{a as at}from"./chunk-VOCDYA3H.js";import{n as rt,o as it}from"./chunk-6DCNDVBX.js";import"./chunk-22DRK7VS.js";import{O as V,T as X,U as Z,V as j,W as q,X as J,Y as K,Z as Q,_ as Y,k as U}from"./chunk-7CSIRG7W.js";import{b as T}from"./chunk-ERWOH47R.js";import{a as l}from"./chunk-EIBFAW37.js";import{I as R,L as et,p as tt}from"./chunk-LGUG3SQB.js";import"./chunk-6DHFEWGX.js";var lt=U.pie,L={sections:new Map,showData:!1,config:lt},b=L.sections,O=L.showData,St=structuredClone(lt),xt=l(()=>structuredClone(St),"getConfig"),wt=l(()=>{b=new Map,O=L.showData,X()},"clear"),Ct=l(({label:t,value:a})=>{if(a<0)throw new Error(`"${t}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);b.has(t)||(b.set(t,a),T.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),$t=l(()=>b,"getSections"),Dt=l(t=>{O=t},"setShowData"),yt=l(()=>O,"getShowData"),st={getConfig:xt,clear:wt,setDiagramTitle:K,getDiagramTitle:Q,setAccTitle:Z,getAccTitle:j,setAccDescription:q,getAccDescription:J,addSection:Ct,getSections:$t,setShowData:Dt,getShowData:yt},Tt=l((t,a)=>{ot(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),bt={parse:l(async t=>{let a=await nt("pie",t);T.debug(a),Tt(a,st)},"parse")},At=l(t=>`
2
+ .pieCircle{
3
+ stroke: ${t.pieStrokeColor};
4
+ stroke-width : ${t.pieStrokeWidth};
5
+ opacity : ${t.pieOpacity};
6
+ }
7
+ .pieCircle.highlighted{
8
+ scale: 1.05;
9
+ opacity: 1;
10
+ }
11
+ .pieCircle.highlightedOnHover:hover{
12
+ transition-duration: 250ms;
13
+ scale: 1.05;
14
+ opacity: 1;
15
+ }
16
+ .pieOuterCircle{
17
+ stroke: ${t.pieOuterStrokeColor};
18
+ stroke-width: ${t.pieOuterStrokeWidth};
19
+ fill: none;
20
+ }
21
+ .pieTitleText {
22
+ text-anchor: middle;
23
+ font-size: ${t.pieTitleTextSize};
24
+ fill: ${t.pieTitleTextColor};
25
+ font-family: ${t.fontFamily};
26
+ }
27
+ .slice {
28
+ font-family: ${t.fontFamily};
29
+ fill: ${t.pieSectionTextColor};
30
+ font-size:${t.pieSectionTextSize};
31
+ // fill: white;
32
+ }
33
+ .legend text {
34
+ fill: ${t.pieLegendTextColor};
35
+ font-family: ${t.fontFamily};
36
+ font-size: ${t.pieLegendTextSize};
37
+ }
38
+ `,"getStyles"),kt=At,_t=l(t=>{let a=[...t.values()].reduce((n,m)=>n+m,0),W=[...t.entries()].map(([n,m])=>({label:n,value:m})).filter(n=>n.value/a*100>=1);return et().value(n=>n.value).sort(null)(W)},"createPieArcs"),zt=l((t,a,W,F)=>{T.debug(`rendering pie chart
39
+ `+t);let n=F.db,m=Y(),h=it(n.getConfig(),m.pie),H=40,i=18,c=4,S=450,x=S,A=at(a),$=A.append("g");$.attr("transform","translate("+x/2+","+S/2+")");let{themeVariables:o}=m,[M]=rt(o.pieOuterStrokeWidth);M??=2;let ct=h.legendPosition,P=h.textPosition,dt=h.donutHole>0&&h.donutHole<=.9?h.donutHole:0,f=Math.min(x,S)/2-H,gt=R().innerRadius(dt*f).outerRadius(f),pt=R().innerRadius(f*P).outerRadius(f*P),w=$.append("g");w.append("circle").attr("cx",0).attr("cy",0).attr("r",f+M/2).attr("class","pieOuterCircle");let D=n.getSections(),ht=_t(D),ft=[o.pie1,o.pie2,o.pie3,o.pie4,o.pie5,o.pie6,o.pie7,o.pie8,o.pie9,o.pie10,o.pie11,o.pie12],k=0;D.forEach(e=>{k+=e});let G=ht.filter(e=>(e.data.value/k*100).toFixed(0)!=="0"),_=tt(ft).domain([...D.keys()]);w.selectAll("mySlices").data(G).enter().append("path").attr("d",gt).attr("fill",e=>_(e.data.label)).attr("class",e=>{let r="pieCircle";return h.highlightSlice==="hover"?r+=" highlightedOnHover":h.highlightSlice===e.data.label&&(r+=" highlighted"),r}),w.selectAll("mySlices").data(G).enter().append("text").text(e=>(e.data.value/k*100).toFixed(0)+"%").attr("transform",e=>"translate("+pt.centroid(e)+")").style("text-anchor","middle").attr("class","slice");let ut=$.append("text").text(n.getDiagramTitle()).attr("x",0).attr("y",-(S-50)/2).attr("class","pieTitleText"),C=[...D.entries()].map(([e,r])=>({label:e,value:r})),u=$.selectAll(".legend").data(C).enter().append("g").attr("class","legend");u.append("rect").attr("width",i).attr("height",i).style("fill",e=>_(e.label)).style("stroke",e=>_(e.label)),u.append("text").attr("x",i+c).attr("y",i-c).text(e=>n.getShowData()?`${e.label} [${e.value}]`:e.label);let v=Math.max(...u.selectAll("text").nodes().map(e=>e?.getBoundingClientRect().width??0)),y=S,z=x+H,s=i+c,E=C.length*s;switch(ct){case"center":u.attr("transform",(e,r)=>{let d=s*C.length/2,g=-v/2-(i+c),p=r*s-d;return"translate("+g+","+p+")"});break;case"top":y+=E,u.attr("transform",(e,r)=>{let d=f,g=-v/2-(i+c),p=r*s-d;return`translate(${g}, ${p})`}),w.attr("transform",()=>`translate(0, ${E+s})`);break;case"bottom":y+=E,u.attr("transform",(e,r)=>{let d=-f-s,g=-v/2-(i+c),p=r*s-d;return"translate("+g+","+p+")"});break;case"left":z+=i+c+v,u.attr("transform",(e,r)=>{let d=s*C.length/2,g=-f-(i+c),p=r*s-d;return"translate("+g+","+p+")"}),w.attr("transform",()=>`translate(${v+i+c}, 0)`);break;default:z+=i+c+v,u.attr("transform",(e,r)=>{let d=s*C.length/2,g=12*i,p=r*s-d;return"translate("+g+","+p+")"});break}let B=ut.node()?.getBoundingClientRect().width??0,mt=x/2-B/2,vt=x/2+B/2,N=Math.min(0,mt),I=Math.max(z,vt)-N;A.attr("viewBox",`${N} 0 ${I} ${y}`),V(A,y,I,h.useMaxWidth)},"draw"),Et={draw:zt},Bt={parser:bt,db:st,renderer:Et,styles:kt};export{Bt as diagram};
@@ -0,0 +1,7 @@
1
+ import{H as re,O as se,T as oe,U as le,V as he,W as ce,X as de,Y as ue,Z as Et,_ as Tt,i as ne,k as D}from"./chunk-7CSIRG7W.js";import{b as ct}from"./chunk-ERWOH47R.js";import{a as s}from"./chunk-EIBFAW37.js";import{e as mt,r as Dt}from"./chunk-LGUG3SQB.js";import"./chunk-6DHFEWGX.js";var zt=(function(){var t=s(function(Y,r,l,u){for(l=l||{},u=Y.length;u--;l[Y[u]]=r);return l},"o"),a=[1,3],p=[1,4],f=[1,5],o=[1,6],x=[1,7],_=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],h=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[55,56,57],k=[2,36],m=[1,37],q=[1,36],y=[1,38],b=[1,35],T=[1,43],g=[1,41],A=[1,45],dt=[1,14],ut=[1,23],xt=[1,18],ft=[1,19],ot=[1,20],St=[1,21],lt=[1,22],i=[1,24],It=[1,25],wt=[1,26],Bt=[1,27],Rt=[1,28],Nt=[1,29],U=[1,32],Q=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],H=[1,63],X=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Wt=[1,66],Ut=[1,67],Qt=[1,68],Ot=[1,69],Ht=[1,70],Xt=[1,71],Mt=[1,72],Yt=[1,73],jt=[1,74],Gt=[1,75],Kt=[1,76],Zt=[1,77],B=[4,5,6,7,8,9,10,11,12,13,14,15,18],K=[1,91],Z=[1,92],J=[1,93],$=[1,100],tt=[1,94],et=[1,97],it=[1,95],at=[1,96],nt=[1,98],rt=[1,99],_t=[1,103],Jt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],At={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:s(function(r,l,u,d,S,e,ht){var n=e.length-1;switch(S){case 23:this.$=e[n];break;case 24:this.$=e[n-1]+""+e[n];break;case 26:this.$=e[n-1]+e[n];break;case 27:this.$=[e[n].trim()];break;case 28:e[n-2].push(e[n].trim()),this.$=e[n-2];break;case 29:this.$=e[n-4],d.addClass(e[n-2],e[n]);break;case 37:this.$=[];break;case 42:this.$=e[n].trim(),d.setDiagramTitle(this.$);break;case 43:this.$=e[n].trim(),d.setAccTitle(this.$);break;case 44:case 45:this.$=e[n].trim(),d.setAccDescription(this.$);break;case 46:d.addSection(e[n].substr(8)),this.$=e[n].substr(8);break;case 47:d.addPoint(e[n-3],"",e[n-1],e[n],[]);break;case 48:d.addPoint(e[n-4],e[n-3],e[n-1],e[n],[]);break;case 49:d.addPoint(e[n-4],"",e[n-2],e[n-1],e[n]);break;case 50:d.addPoint(e[n-5],e[n-4],e[n-2],e[n-1],e[n]);break;case 51:d.setXAxisLeftText(e[n-2]),d.setXAxisRightText(e[n]);break;case 52:e[n-1].text+=" \u27F6 ",d.setXAxisLeftText(e[n-1]);break;case 53:d.setXAxisLeftText(e[n]);break;case 54:d.setYAxisBottomText(e[n-2]),d.setYAxisTopText(e[n]);break;case 55:e[n-1].text+=" \u27F6 ",d.setYAxisBottomText(e[n-1]);break;case 56:d.setYAxisBottomText(e[n]);break;case 57:d.setQuadrant1Text(e[n]);break;case 58:d.setQuadrant2Text(e[n]);break;case 59:d.setQuadrant3Text(e[n]);break;case 60:d.setQuadrant4Text(e[n]);break;case 64:this.$={text:e[n],type:"text"};break;case 65:this.$={text:e[n-1].text+""+e[n],type:e[n-1].type};break;case 66:this.$={text:e[n],type:"text"};break;case 67:this.$={text:e[n],type:"markdown"};break;case 68:this.$=e[n];break;case 69:this.$=e[n-1]+""+e[n];break}},"anonymous"),table:[{18:a,26:1,27:2,28:p,55:f,56:o,57:x},{1:[3]},{18:a,26:8,27:2,28:p,55:f,56:o,57:x},{18:a,26:9,27:2,28:p,55:f,56:o,57:x},t(_,[2,33],{29:10}),t(h,[2,61]),t(h,[2,62]),t(h,[2,63]),{1:[2,30]},{1:[2,31]},t(c,k,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:m,5:q,10:y,12:b,13:T,14:g,15:A,18:dt,25:ut,35:xt,37:ft,39:ot,41:St,42:lt,48:i,50:It,51:wt,52:Bt,53:Rt,54:Nt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(_,[2,34]),{27:46,55:f,56:o,57:x},t(c,[2,37]),t(c,k,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:m,5:q,10:y,12:b,13:T,14:g,15:A,18:dt,25:ut,35:xt,37:ft,39:ot,41:St,42:lt,48:i,50:It,51:wt,52:Bt,53:Rt,54:Nt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,39]),t(c,[2,40]),t(c,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(c,[2,45]),t(c,[2,46]),{18:[1,51]},{4:m,5:q,10:y,12:b,13:T,14:g,15:A,43:52,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:q,10:y,12:b,13:T,14:g,15:A,43:53,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:q,10:y,12:b,13:T,14:g,15:A,43:54,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:q,10:y,12:b,13:T,14:g,15:A,43:55,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:q,10:y,12:b,13:T,14:g,15:A,43:56,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:q,10:y,12:b,13:T,14:g,15:A,43:57,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:q,8:H,10:y,12:b,13:T,14:g,15:A,18:X,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(_,[2,35]),t(c,[2,38]),t(c,[2,42]),t(c,[2,43]),t(c,[2,44]),{3:65,4:Wt,5:Ut,6:Qt,7:Ot,8:Ht,9:Xt,10:Mt,11:Yt,12:jt,13:Gt,14:Kt,15:Zt,21:64},t(c,[2,53],{59:60,58:61,4:m,5:q,8:H,10:y,12:b,13:T,14:g,15:A,18:X,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(c,[2,56],{59:60,58:61,4:m,5:q,8:H,10:y,12:b,13:T,14:g,15:A,18:X,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(c,[2,57],{59:60,58:61,4:m,5:q,8:H,10:y,12:b,13:T,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,58],{59:60,58:61,4:m,5:q,8:H,10:y,12:b,13:T,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,59],{59:60,58:61,4:m,5:q,8:H,10:y,12:b,13:T,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,60],{59:60,58:61,4:m,5:q,8:H,10:y,12:b,13:T,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Wt,5:Ut,6:Qt,7:Ot,8:Ht,9:Xt,10:Mt,11:Yt,12:jt,13:Gt,14:Kt,15:Zt,18:[1,82]},t(B,[2,23]),t(B,[2,1]),t(B,[2,2]),t(B,[2,3]),t(B,[2,4]),t(B,[2,5]),t(B,[2,6]),t(B,[2,7]),t(B,[2,8]),t(B,[2,9]),t(B,[2,10]),t(B,[2,11]),t(B,[2,12]),t(c,[2,52],{58:31,43:84,4:m,5:q,10:y,12:b,13:T,14:g,15:A,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,55],{58:31,43:85,4:m,5:q,10:y,12:b,13:T,14:g,15:A,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:rt,22:89,23:88},t(B,[2,24]),t(c,[2,51],{59:60,58:61,4:m,5:q,8:H,10:y,12:b,13:T,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,54],{59:60,58:61,4:m,5:q,8:H,10:y,12:b,13:T,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,47],{22:89,16:90,23:101,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:rt}),{46:[1,102]},t(c,[2,29],{10:_t}),t(Jt,[2,27],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:rt}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(c,[2,49],{10:_t}),t(c,[2,48],{22:89,16:90,23:105,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:rt}),{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:rt,22:106},t(N,[2,26]),t(c,[2,50],{10:_t}),t(Jt,[2,28],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:rt})],defaultActions:{8:[2,30],9:[2,31]},parseError:s(function(r,l){if(l.recoverable)this.trace(r);else{var u=new Error(r);throw u.hash=l,u}},"parseError"),parse:s(function(r){var l=this,u=[0],d=[],S=[null],e=[],ht=this.table,n="",pt=0,$t=0,te=0,Ce=2,ee=1,Le=e.slice.call(arguments,1),z=Object.create(this.lexer),j={yy:{}};for(var Ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ft)&&(j.yy[Ft]=this.yy[Ft]);z.setInput(r,j.yy),j.yy.lexer=z,j.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var Pt=z.yylloc;e.push(Pt);var Ee=z.options&&z.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function De(R){u.length=u.length-2*R,S.length=S.length-R,e.length=e.length-R}s(De,"popStack");function ie(){var R;return R=d.pop()||z.lex()||ee,typeof R!="number"&&(R instanceof Array&&(d=R,R=d.pop()),R=l.symbols_[R]||R),R}s(ie,"lex");for(var I,vt,G,W,Ne,Ct,st={},yt,M,ae,bt;;){if(G=u[u.length-1],this.defaultActions[G]?W=this.defaultActions[G]:((I===null||typeof I>"u")&&(I=ie()),W=ht[G]&&ht[G][I]),typeof W>"u"||!W.length||!W[0]){var Lt="";bt=[];for(yt in ht[G])this.terminals_[yt]&&yt>Ce&&bt.push("'"+this.terminals_[yt]+"'");z.showPosition?Lt="Parse error on line "+(pt+1)+`:
2
+ `+z.showPosition()+`
3
+ Expecting `+bt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Lt="Parse error on line "+(pt+1)+": Unexpected "+(I==ee?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Lt,{text:z.match,token:this.terminals_[I]||I,line:z.yylineno,loc:Pt,expected:bt})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+I);switch(W[0]){case 1:u.push(I),S.push(z.yytext),e.push(z.yylloc),u.push(W[1]),I=null,vt?(I=vt,vt=null):($t=z.yyleng,n=z.yytext,pt=z.yylineno,Pt=z.yylloc,te>0&&te--);break;case 2:if(M=this.productions_[W[1]][1],st.$=S[S.length-M],st._$={first_line:e[e.length-(M||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(M||1)].first_column,last_column:e[e.length-1].last_column},Ee&&(st._$.range=[e[e.length-(M||1)].range[0],e[e.length-1].range[1]]),Ct=this.performAction.apply(st,[n,$t,pt,j.yy,W[1],S,e].concat(Le)),typeof Ct<"u")return Ct;M&&(u=u.slice(0,-1*M*2),S=S.slice(0,-1*M),e=e.slice(0,-1*M)),u.push(this.productions_[W[1]][0]),S.push(st.$),e.push(st._$),ae=ht[u[u.length-2]][u[u.length-1]],u.push(ae);break;case 3:return!0}}return!0},"parse")},ve=(function(){var Y={EOF:1,parseError:s(function(l,u){if(this.yy.parser)this.yy.parser.parseError(l,u);else throw new Error(l)},"parseError"),setInput:s(function(r,l){return this.yy=l||this.yy||{},this._input=r,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:s(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var l=r.length,u=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var d=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),u.length-1&&(this.yylineno-=u.length-1);var S=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:u?(u.length===d.length?this.yylloc.first_column:0)+d[d.length-u.length].length-u[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
5
+ `+l+"^"},"showPosition"),test_match:s(function(r,l){var u,d,S;if(this.options.backtrack_lexer&&(S={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&&(S.yylloc.range=this.yylloc.range.slice(0))),d=r[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],u=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),u)return u;if(this._backtrack){for(var e in S)this[e]=S[e];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,l,u,d;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),e=0;e<S.length;e++)if(u=this._input.match(this.rules[S[e]]),u&&(!l||u[0].length>l[0].length)){if(l=u,d=e,this.options.backtrack_lexer){if(r=this.test_match(u,S[e]),r!==!1)return r;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(r=this.test_match(l,S[d]),r!==!1?r:!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:s(function(){var l=this.next();return l||this.lex()},"lex"),begin:s(function(l){this.conditionStack.push(l)},"begin"),popState:s(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:s(function(l){this.begin(l)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(l,u,d,S){var e=S;switch(d){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;break;case 5:return this.popState(),"title_value";break;case 6:return this.begin("acc_title"),37;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),39;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;break;case 29:return this.begin("point_start"),44;break;case 30:return this.begin("point_x"),45;break;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;break;case 34:return 28;case 35:return 4;case 36:return 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:return 65;case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?:[^\x00-\x7F]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return Y})();At.lexer=ve;function gt(){this.yy={}}return s(gt,"Parser"),gt.prototype=At,At.Parser=gt,new gt})();zt.parser=zt;var ze=zt,w=ne(),Ve=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{s(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:D.quadrantChart?.chartWidth||500,chartWidth:D.quadrantChart?.chartHeight||500,titlePadding:D.quadrantChart?.titlePadding||10,titleFontSize:D.quadrantChart?.titleFontSize||20,quadrantPadding:D.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:D.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:D.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:D.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:D.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:D.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:D.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:D.quadrantChart?.pointTextPadding||5,pointLabelFontSize:D.quadrantChart?.pointLabelFontSize||12,pointRadius:D.quadrantChart?.pointRadius||5,xAxisPosition:D.quadrantChart?.xAxisPosition||"top",yAxisPosition:D.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:D.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:D.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:w.quadrant1Fill,quadrant2Fill:w.quadrant2Fill,quadrant3Fill:w.quadrant3Fill,quadrant4Fill:w.quadrant4Fill,quadrant1TextFill:w.quadrant1TextFill,quadrant2TextFill:w.quadrant2TextFill,quadrant3TextFill:w.quadrant3TextFill,quadrant4TextFill:w.quadrant4TextFill,quadrantPointFill:w.quadrantPointFill,quadrantPointTextFill:w.quadrantPointTextFill,quadrantXAxisTextFill:w.quadrantXAxisTextFill,quadrantYAxisTextFill:w.quadrantYAxisTextFill,quadrantTitleFill:w.quadrantTitleFill,quadrantInternalBorderStrokeFill:w.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:w.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,ct.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,a){this.classes.set(t,a)}setConfig(t){ct.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){ct.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,a,p,f){let o=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,x={top:t==="top"&&a?o:0,bottom:t==="bottom"&&a?o:0},_=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,h={left:this.config.yAxisPosition==="left"&&p?_:0,right:this.config.yAxisPosition==="right"&&p?_:0},c=this.config.titleFontSize+this.config.titlePadding*2,k={top:f?c:0},m=this.config.quadrantPadding+h.left,q=this.config.quadrantPadding+x.top+k.top,y=this.config.chartWidth-this.config.quadrantPadding*2-h.left-h.right,b=this.config.chartHeight-this.config.quadrantPadding*2-x.top-x.bottom-k.top,T=y/2,g=b/2;return{xAxisSpace:x,yAxisSpace:h,titleSpace:k,quadrantSpace:{quadrantLeft:m,quadrantTop:q,quadrantWidth:y,quadrantHalfWidth:T,quadrantHeight:b,quadrantHalfHeight:g}}}getAxisLabels(t,a,p,f){let{quadrantSpace:o,titleSpace:x}=f,{quadrantHalfHeight:_,quadrantHeight:h,quadrantLeft:c,quadrantHalfWidth:k,quadrantTop:m,quadrantWidth:q}=o,y=!!this.data.xAxisRightText,b=!!this.data.yAxisTopText,T=[];return this.data.xAxisLeftText&&a&&T.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:c+(y?k/2:0),y:t==="top"?this.config.xAxisLabelPadding+x.top:this.config.xAxisLabelPadding+m+h+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:y?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&a&&T.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:c+k+(y?k/2:0),y:t==="top"?this.config.xAxisLabelPadding+x.top:this.config.xAxisLabelPadding+m+h+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:y?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&p&&T.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+c+q+this.config.quadrantPadding,y:m+h-(b?_/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:b?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&p&&T.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+c+q+this.config.quadrantPadding,y:m+_-(b?_/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:b?"center":"left",horizontalPos:"top",rotation:-90}),T}getQuadrants(t){let{quadrantSpace:a}=t,{quadrantHalfHeight:p,quadrantLeft:f,quadrantHalfWidth:o,quadrantTop:x}=a,_=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:f+o,y:x,width:o,height:p,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:f,y:x,width:o,height:p,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:f,y:x+p,width:o,height:p,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:f+o,y:x+p,width:o,height:p,fill:this.themeConfig.quadrant4Fill}];for(let h of _)h.text.x=h.x+h.width/2,this.data.points.length===0?(h.text.y=h.y+h.height/2,h.text.horizontalPos="middle"):(h.text.y=h.y+this.config.quadrantTextTopPadding,h.text.horizontalPos="top");return _}getQuadrantPoints(t){let{quadrantSpace:a}=t,{quadrantHeight:p,quadrantLeft:f,quadrantTop:o,quadrantWidth:x}=a,_=Dt().domain([0,1]).range([f,x+f]),h=Dt().domain([0,1]).range([p+o,o]);return this.data.points.map(k=>{let m=this.classes.get(k.className);return m&&(k={...m,...k}),{x:_(k.x),y:h(k.y),fill:k.color??this.themeConfig.quadrantPointFill,radius:k.radius??this.config.pointRadius,text:{text:k.text,fill:this.themeConfig.quadrantPointTextFill,x:_(k.x),y:h(k.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:k.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:k.strokeWidth??"0px"}})}getBorders(t){let a=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:p}=t,{quadrantHalfHeight:f,quadrantHeight:o,quadrantLeft:x,quadrantHalfWidth:_,quadrantTop:h,quadrantWidth:c}=p;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:x-a,y1:h,x2:x+c+a,y2:h},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:x+c,y1:h+a,x2:x+c,y2:h+o-a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:x-a,y1:h+o,x2:x+c+a,y2:h+o},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:x,y1:h+a,x2:x,y2:h+o-a},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:x+_,y1:h+a,x2:x+_,y2:h+o-a},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:x+a,y1:h+f,x2:x+c-a,y2:h+f}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let t=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),a=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),p=this.config.showTitle&&!!this.data.titleText,f=this.data.points.length>0?"bottom":this.config.xAxisPosition,o=this.calculateSpace(f,t,a,p);return{points:this.getQuadrantPoints(o),quadrants:this.getQuadrants(o),axisLabels:this.getAxisLabels(f,t,a,o),borderLines:this.getBorders(o),title:this.getTitle(p)}}},qt=class extends Error{static{s(this,"InvalidStyleError")}constructor(t,a,p){super(`value for ${t} ${a} is invalid, please use a valid ${p}`),this.name="InvalidStyleError"}};function Vt(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}s(Vt,"validateHexCode");function xe(t){return!/^\d+$/.test(t)}s(xe,"validateNumber");function fe(t){return!/^\d+px$/.test(t)}s(fe,"validateSizeInPixels");function O(t){return re(t.trim(),Tt())}s(O,"textSanitizer");var V=new Ve;function ge(t){V.setData({quadrant1Text:O(t.text)})}s(ge,"setQuadrant1Text");function pe(t){V.setData({quadrant2Text:O(t.text)})}s(pe,"setQuadrant2Text");function ye(t){V.setData({quadrant3Text:O(t.text)})}s(ye,"setQuadrant3Text");function be(t){V.setData({quadrant4Text:O(t.text)})}s(be,"setQuadrant4Text");function Te(t){V.setData({xAxisLeftText:O(t.text)})}s(Te,"setXAxisLeftText");function me(t){V.setData({xAxisRightText:O(t.text)})}s(me,"setXAxisRightText");function qe(t){V.setData({yAxisTopText:O(t.text)})}s(qe,"setYAxisTopText");function ke(t){V.setData({yAxisBottomText:O(t.text)})}s(ke,"setYAxisBottomText");function kt(t){let a={};for(let p of t){let[f,o]=p.trim().split(/\s*:\s*/);if(f==="radius"){if(xe(o))throw new qt(f,o,"number");a.radius=parseInt(o)}else if(f==="color"){if(Vt(o))throw new qt(f,o,"hex code");a.color=o}else if(f==="stroke-color"){if(Vt(o))throw new qt(f,o,"hex code");a.strokeColor=o}else if(f==="stroke-width"){if(fe(o))throw new qt(f,o,"number of pixels (eg. 10px)");a.strokeWidth=o}else throw new Error(`style named ${f} is not supported.`)}return a}s(kt,"parseStyles");function Se(t,a,p,f,o){let x=kt(o);V.addPoints([{x:p,y:f,text:O(t.text),className:a,...x}])}s(Se,"addPoint");function _e(t,a){V.addClass(t,kt(a))}s(_e,"addClass");function Ae(t){V.setConfig({chartWidth:t})}s(Ae,"setWidth");function Fe(t){V.setConfig({chartHeight:t})}s(Fe,"setHeight");function Pe(){let t=Tt(),{themeVariables:a,quadrantChart:p}=t;return p&&V.setConfig(p),V.setThemeConfig({quadrant1Fill:a.quadrant1Fill,quadrant2Fill:a.quadrant2Fill,quadrant3Fill:a.quadrant3Fill,quadrant4Fill:a.quadrant4Fill,quadrant1TextFill:a.quadrant1TextFill,quadrant2TextFill:a.quadrant2TextFill,quadrant3TextFill:a.quadrant3TextFill,quadrant4TextFill:a.quadrant4TextFill,quadrantPointFill:a.quadrantPointFill,quadrantPointTextFill:a.quadrantPointTextFill,quadrantXAxisTextFill:a.quadrantXAxisTextFill,quadrantYAxisTextFill:a.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:a.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:a.quadrantInternalBorderStrokeFill,quadrantTitleFill:a.quadrantTitleFill}),V.setData({titleText:Et()}),V.build()}s(Pe,"getQuadrantData");var Ie=s(function(){V.clear(),oe()},"clear"),we={setWidth:Ae,setHeight:Fe,setQuadrant1Text:ge,setQuadrant2Text:pe,setQuadrant3Text:ye,setQuadrant4Text:be,setXAxisLeftText:Te,setXAxisRightText:me,setYAxisTopText:qe,setYAxisBottomText:ke,parseStyles:kt,addPoint:Se,addClass:_e,getQuadrantData:Pe,clear:Ie,setAccTitle:le,getAccTitle:he,setDiagramTitle:ue,getDiagramTitle:Et,getAccDescription:de,setAccDescription:ce},Be=s((t,a,p,f)=>{function o(i){return i==="top"?"hanging":"middle"}s(o,"getDominantBaseLine");function x(i){return i==="left"?"start":"middle"}s(x,"getTextAnchor");function _(i){return`translate(${i.x}, ${i.y}) rotate(${i.rotation||0})`}s(_,"getTransformation");let h=Tt();ct.debug(`Rendering quadrant chart
7
+ `+t);let c=h.securityLevel,k;c==="sandbox"&&(k=mt("#i"+a));let q=(c==="sandbox"?mt(k.nodes()[0].contentDocument.body):mt("body")).select(`[id="${a}"]`),y=q.append("g").attr("class","main"),b=h.quadrantChart?.chartWidth??500,T=h.quadrantChart?.chartHeight??500;se(q,T,b,h.quadrantChart?.useMaxWidth??!0),q.attr("viewBox","0 0 "+b+" "+T),f.db.setHeight(T),f.db.setWidth(b);let g=f.db.getQuadrantData(),A=y.append("g").attr("class","quadrants"),dt=y.append("g").attr("class","border"),ut=y.append("g").attr("class","data-points"),xt=y.append("g").attr("class","labels"),ft=y.append("g").attr("class","title");g.title&&ft.append("text").attr("x",0).attr("y",0).attr("fill",g.title.fill).attr("font-size",g.title.fontSize).attr("dominant-baseline",o(g.title.horizontalPos)).attr("text-anchor",x(g.title.verticalPos)).attr("transform",_(g.title)).text(g.title.text),g.borderLines&&dt.selectAll("line").data(g.borderLines).enter().append("line").attr("x1",i=>i.x1).attr("y1",i=>i.y1).attr("x2",i=>i.x2).attr("y2",i=>i.y2).style("stroke",i=>i.strokeFill).style("stroke-width",i=>i.strokeWidth);let ot=A.selectAll("g.quadrant").data(g.quadrants).enter().append("g").attr("class","quadrant");ot.append("rect").attr("x",i=>i.x).attr("y",i=>i.y).attr("width",i=>i.width).attr("height",i=>i.height).attr("fill",i=>i.fill),ot.append("text").attr("x",0).attr("y",0).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>o(i.text.horizontalPos)).attr("text-anchor",i=>x(i.text.verticalPos)).attr("transform",i=>_(i.text)).text(i=>i.text.text),xt.selectAll("g.label").data(g.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(i=>i.text).attr("fill",i=>i.fill).attr("font-size",i=>i.fontSize).attr("dominant-baseline",i=>o(i.horizontalPos)).attr("text-anchor",i=>x(i.verticalPos)).attr("transform",i=>_(i));let lt=ut.selectAll("g.data-point").data(g.points).enter().append("g").attr("class","data-point");lt.append("circle").attr("cx",i=>i.x).attr("cy",i=>i.y).attr("r",i=>i.radius).attr("fill",i=>i.fill).attr("stroke",i=>i.strokeColor).attr("stroke-width",i=>i.strokeWidth),lt.append("text").attr("x",0).attr("y",0).text(i=>i.text.text).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>o(i.text.horizontalPos)).attr("text-anchor",i=>x(i.text.verticalPos)).attr("transform",i=>_(i.text))},"draw"),Re={draw:Be},Xe={parser:ze,db:we,renderer:Re,styles:s(()=>"","styles")};export{Xe as diagram};
@@ -0,0 +1 @@
1
+ import{a as r,b as e}from"./chunk-SEGIW3MP.js";import"./chunk-VYZZPKGK.js";import"./chunk-6DHFEWGX.js";export{r as RadarModule,e as createRadarServices};
@@ -0,0 +1 @@
1
+ import{a as r,b as o}from"./chunk-Y2XVFW7T.js";import"./chunk-VYZZPKGK.js";import"./chunk-6DHFEWGX.js";export{r as RailroadModule,o as createRailroadServices};
@@ -0,0 +1 @@
1
+ import{a as r,b as o}from"./chunk-UTWOJE2A.js";import"./chunk-VYZZPKGK.js";import"./chunk-6DHFEWGX.js";export{r as RailroadAbnfModule,o as createRailroadAbnfServices};
@@ -0,0 +1 @@
1
+ import{a as r,b as o}from"./chunk-25REBZ7M.js";import"./chunk-VYZZPKGK.js";import"./chunk-6DHFEWGX.js";export{r as RailroadEbnfModule,o as createRailroadEbnfServices};
@@ -0,0 +1 @@
1
+ import{a as e,b as r}from"./chunk-6VQ47JJS.js";import"./chunk-VYZZPKGK.js";import"./chunk-6DHFEWGX.js";export{e as RailroadPegModule,r as createRailroadPegServices};
@@ -0,0 +1 @@
1
+ import{a,b as p,c as u}from"./chunk-B3K7RH5O.js";import{a as l}from"./chunk-NCOVM3YF.js";import{b as m}from"./chunk-MII4VZEB.js";import"./chunk-HEMELP7J.js";import"./chunk-AIX6IH4O.js";import"./chunk-HZ5I5NJO.js";import"./chunk-ETOVTYWF.js";import"./chunk-SEGIW3MP.js";import{b as s}from"./chunk-Y2XVFW7T.js";import"./chunk-25REBZ7M.js";import"./chunk-UTWOJE2A.js";import"./chunk-6VQ47JJS.js";import"./chunk-OE3NOVIH.js";import"./chunk-LOMHZYS2.js";import"./chunk-OAGTSILX.js";import"./chunk-DN52R6U7.js";import"./chunk-RWFFDL53.js";import"./chunk-A43YELH5.js";import"./chunk-VYZZPKGK.js";import"./chunk-VOCDYA3H.js";import"./chunk-7CSIRG7W.js";import{b as i}from"./chunk-ERWOH47R.js";import{a as n}from"./chunk-EIBFAW37.js";import"./chunk-LGUG3SQB.js";import"./chunk-6DHFEWGX.js";var d=s().Railroad.parser.LangiumParser,t=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{let r=e.elements.map(t);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{let r=e.alternatives.map(t);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:t(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:t(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:t(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:t(e.definition)}),"transformRule"),f=n(e=>{l(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(c(r)))},"populateDb"),g={parse:n(e=>{a.clear(),i.debug("[Railroad Parser] Starting Langium parse");let r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new m(r);let o=r.value;i.debug("[Railroad Parser] Parsed rules:",o.rules.length),f(o),i.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:a}},y={parser:g,db:a,renderer:u,styles:p},w=y;export{w as default,y as diagram};
@@ -0,0 +1,84 @@
1
+ import{a as st}from"./chunk-D3WOCELE.js";import{a as it}from"./chunk-2RQCUDTG.js";import{b as et,c as tt}from"./chunk-34FHPXU4.js";import"./chunk-57XXJOQN.js";import"./chunk-MYMJLHQL.js";import"./chunk-YORIST7Z.js";import"./chunk-QBPQ7DPE.js";import"./chunk-XQUIO562.js";import"./chunk-GSOU4UTT.js";import"./chunk-IP56FOSI.js";import"./chunk-CBGUD2NP.js";import{p as Ze}from"./chunk-6DCNDVBX.js";import"./chunk-22DRK7VS.js";import{T as Ke,U as We,V as je,W as Ge,X as ze,Y as Xe,Z as Je,_ as ye,u as Ce}from"./chunk-7CSIRG7W.js";import{b as ke}from"./chunk-ERWOH47R.js";import{a as h,b as He}from"./chunk-EIBFAW37.js";import"./chunk-LGUG3SQB.js";import"./chunk-6DHFEWGX.js";var Ae=(function(){var e=h(function($,r,a,c){for(a=a||{},c=$.length;c--;a[$[c]]=r);return a},"o"),u=[1,3],o=[1,4],n=[1,5],i=[1,6],f=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],k=[1,22],E=[2,7],R=[1,26],_=[1,27],I=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],O=[1,24],w=[1,31],D=[1,32],M=[1,30],p=[1,39],b=[1,40],d=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ve=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],de=[27,29],ve=[1,70],Le=[1,71],xe=[1,72],Oe=[1,73],we=[1,74],De=[1,75],Me=[1,76],Z=[1,83],U=[1,80],ee=[1,84],te=[1,85],se=[1,86],ie=[1,87],re=[1,88],ne=[1,89],ae=[1,90],le=[1,91],ce=[1,92],Ee=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],Fe=[1,101],$e=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],oe=[1,116],he=[1,117],ue=[1,114],fe=[1,115],_e={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:h(function(r,a,c,s,m,t,me){var l=t.length-1;switch(m){case 4:this.$=t[l].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[l].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[l-3],t[l-4]);break;case 22:s.addRequirement(t[l-5],t[l-6]),s.setClass([t[l-5]],t[l-3]);break;case 23:s.setNewReqId(t[l-2]);break;case 24:s.setNewReqText(t[l-2]);break;case 25:s.setNewReqRisk(t[l-2]);break;case 26:s.setNewReqVerifyMethod(t[l-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[l-3]);break;case 43:s.addElement(t[l-5]),s.setClass([t[l-5]],t[l-3]);break;case 44:s.setNewElementType(t[l-2]);break;case 45:s.setNewElementDocRef(t[l-2]);break;case 48:s.addRelationship(t[l-2],t[l],t[l-4]);break;case 49:s.addRelationship(t[l-2],t[l-4],t[l]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[l-2],s.defineClass(t[l-1],t[l]);break;case 58:s.setClass(t[l-1],t[l]);break;case 59:s.setClass([t[l-2]],t[l]);break;case 60:case 62:this.$=[t[l]];break;case 61:case 63:this.$=t[l-2].concat([t[l]]);break;case 64:this.$=t[l-2],s.setCssStyle(t[l-1],t[l]);break;case 65:this.$=[t[l]];break;case 66:t[l-2].push(t[l]),this.$=t[l-2];break;case 68:this.$=t[l-1]+t[l];break}},"anonymous"),table:[{3:1,4:2,6:u,9:o,11:n,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:u,9:o,11:n,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(f,[2,6]),{3:12,4:2,6:u,9:o,11:n,13:i},{1:[2,2]},{4:17,5:k,7:13,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:_,23:I,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:b},e(f,[2,4]),e(f,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:k,7:42,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:_,23:I,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:b},{4:17,5:k,7:43,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:_,23:I,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:b},{4:17,5:k,7:44,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:_,23:I,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:b},{4:17,5:k,7:45,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:_,23:I,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:b},{4:17,5:k,7:46,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:_,23:I,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:b},{4:17,5:k,7:47,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:_,23:I,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:b},{4:17,5:k,7:48,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:_,23:I,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:b},{4:17,5:k,7:49,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:_,23:I,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:b},{4:17,5:k,7:50,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:_,23:I,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:b},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),{30:60,33:62,75:P,89:p,90:b},{30:63,33:62,75:P,89:p,90:b},{30:64,33:62,75:P,89:p,90:b},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ve,[2,81]),e(Ve,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(de,[2,79]),e(de,[2,80]),{27:[1,67],29:[1,68]},e(de,[2,85]),e(de,[2,86]),{62:69,65:ve,66:Le,67:xe,68:Oe,69:we,70:De,71:Me},{62:77,65:ve,66:Le,67:xe,68:Oe,69:we,70:De,71:Me},{30:78,33:62,75:P,89:p,90:b},{73:79,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,60]),e(Ee,[2,62]),{73:93,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},{30:94,33:62,75:P,76:U,89:p,90:b},{5:[1,95]},{30:96,33:62,75:P,89:p,90:b},{5:[1,97]},{30:98,33:62,75:P,89:p,90:b},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(d,[2,59],{76:U}),e(d,[2,64],{76:Fe}),{33:103,75:[1,102],89:p,90:b},e($e,[2,65],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(d,[2,57],{76:Fe}),e(d,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:oe,40:he,56:113,57:ue,59:fe},{27:[1,118],76:U},{33:119,89:p,90:b},{33:120,89:p,90:b},{75:Z,78:121,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,61]),e(Ee,[2,63]),e(T,[2,68]),e(d,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(d,[2,28]),{5:[1,127]},e(d,[2,42]),{32:[1,128]},{32:[1,129]},{5:oe,40:he,56:130,57:ue,59:fe},e(d,[2,47]),{5:[1,131]},e(d,[2,48]),e(d,[2,49]),e($e,[2,66],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),{33:132,89:p,90:b},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(d,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(d,[2,46]),{5:oe,40:he,56:152,57:ue,59:fe},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(d,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(d,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:oe,40:he,56:163,57:ue,59:fe},{5:oe,40:he,56:164,57:ue,59:fe},e(d,[2,23]),e(d,[2,24]),e(d,[2,25]),e(d,[2,26]),e(d,[2,44]),e(d,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:h(function(r,a){if(a.recoverable)this.trace(r);else{var c=new Error(r);throw c.hash=a,c}},"parseError"),parse:h(function(r){var a=this,c=[0],s=[],m=[null],t=[],me=this.table,l="",be=0,Pe=0,Ue=0,at=2,Ye=1,lt=t.slice.call(arguments,1),g=Object.create(this.lexer),G={yy:{}};for(var Se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Se)&&(G.yy[Se]=this.yy[Se]);g.setInput(r,G.yy),G.yy.lexer=g,G.yy.parser=this,typeof g.yylloc>"u"&&(g.yylloc={});var Ie=g.yylloc;t.push(Ie);var ct=g.options&&g.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ot(S){c.length=c.length-2*S,m.length=m.length-S,t.length=t.length-S}h(ot,"popStack");function Be(){var S;return S=s.pop()||g.lex()||Ye,typeof S!="number"&&(S instanceof Array&&(s=S,S=s.pop()),S=a.symbols_[S]||S),S}h(Be,"lex");for(var y,Te,z,N,pt,Ne,J={},Re,F,Qe,ge;;){if(z=c[c.length-1],this.defaultActions[z]?N=this.defaultActions[z]:((y===null||typeof y>"u")&&(y=Be()),N=me[z]&&me[z][y]),typeof N>"u"||!N.length||!N[0]){var qe="";ge=[];for(Re in me[z])this.terminals_[Re]&&Re>at&&ge.push("'"+this.terminals_[Re]+"'");g.showPosition?qe="Parse error on line "+(be+1)+`:
2
+ `+g.showPosition()+`
3
+ Expecting `+ge.join(", ")+", got '"+(this.terminals_[y]||y)+"'":qe="Parse error on line "+(be+1)+": Unexpected "+(y==Ye?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(qe,{text:g.match,token:this.terminals_[y]||y,line:g.yylineno,loc:Ie,expected:ge})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+y);switch(N[0]){case 1:c.push(y),m.push(g.yytext),t.push(g.yylloc),c.push(N[1]),y=null,Te?(y=Te,Te=null):(Pe=g.yyleng,l=g.yytext,be=g.yylineno,Ie=g.yylloc,Ue>0&&Ue--);break;case 2:if(F=this.productions_[N[1]][1],J.$=m[m.length-F],J._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},ct&&(J._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),Ne=this.performAction.apply(J,[l,Pe,be,G.yy,N[1],m,t].concat(lt)),typeof Ne<"u")return Ne;F&&(c=c.slice(0,-1*F*2),m=m.slice(0,-1*F),t=t.slice(0,-1*F)),c.push(this.productions_[N[1]][0]),m.push(J.$),t.push(J._$),Qe=me[c[c.length-2]][c[c.length-1]],c.push(Qe);break;case 3:return!0}}return!0},"parse")},nt=(function(){var $={EOF:1,parseError:h(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:h(function(r,a){return this.yy=a||this.yy||{},this._input=r,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:h(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var a=r.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:h(function(r){var a=r.length,c=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;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),c.length-1&&(this.yylineno-=c.length-1);var m=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:c?(c.length===s.length?this.yylloc.first_column:0)+s[s.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(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:h(function(r){this.unput(this.match.slice(r))},"less"),pastInput:h(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var r=this.pastInput(),a=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
5
+ `+a+"^"},"showPosition"),test_match:h(function(r,a){var c,s,m;if(this.options.backtrack_lexer&&(m={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&&(m.yylloc.range=this.yylloc.range.slice(0))),s=r[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+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],c=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var t in m)this[t]=m[t];return!1}return!1},"test_match"),next:h(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,a,c,s;this._more||(this.yytext="",this.match="");for(var m=this._currentRules(),t=0;t<m.length;t++)if(c=this._input.match(this.rules[m[t]]),c&&(!a||c[0].length>a[0].length)){if(a=c,s=t,this.options.backtrack_lexer){if(r=this.test_match(c,m[t]),r!==!1)return r;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(r=this.test_match(a,m[s]),r!==!1?r:!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:h(function(){var a=this.next();return a||this.lex()},"lex"),begin:h(function(a){this.conditionStack.push(a)},"begin"),popState:h(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:h(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:h(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:h(function(a){this.begin(a)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:h(function(a,c,s,m){var t=m;switch(s){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;break;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;break;case 60:return this.begin("style"),74;break;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return c.yytext=c.yytext.trim(),89;break;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,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,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return $})();_e.lexer=nt;function pe(){this.yy={}}return h(pe,"Parser"),pe.prototype=_e,_e.Parser=pe,new pe})();Ae.parser=Ae;var ht=Ae,ut=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=We,this.getAccTitle=je,this.setAccDescription=Ge,this.getAccDescription=ze,this.setDiagramTitle=Xe,this.getDiagramTitle=Je,this.getConfig=h(()=>ye().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{h(this,"RequirementDB")}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(e,u){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:u,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=e)}setNewReqText(e){this.latestRequirement!==void 0&&(this.latestRequirement.text=e)}setNewReqRisk(e){this.latestRequirement!==void 0&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),ke.info("Added new element: ",e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){this.latestElement!==void 0&&(this.latestElement.type=e)}setNewElementDocRef(e){this.latestElement!==void 0&&(this.latestElement.docRef=e)}addRelationship(e,u,o){this.relations.push({type:e,src:u,dst:o})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,Ke()}setCssStyle(e,u){for(let o of e){let n=this.requirements.get(o)??this.elements.get(o);if(!u||!n)return;for(let i of u)i.includes(",")?n.cssStyles.push(...i.split(",")):n.cssStyles.push(i)}}setClass(e,u){for(let o of e){let n=this.requirements.get(o)??this.elements.get(o);if(n)for(let i of u){n.classes.push(i);let f=this.classes.get(i)?.styles;f&&n.cssStyles.push(...f)}}}defineClass(e,u){for(let o of e){let n=this.classes.get(o);n===void 0&&(n={id:o,styles:[],textStyles:[]},this.classes.set(o,n)),u&&u.forEach(function(i){if(/color/.exec(i)){let f=i.replace("fill","bgFill");n.textStyles.push(f)}n.styles.push(i)}),this.requirements.forEach(i=>{i.classes.includes(o)&&i.cssStyles.push(...u.flatMap(f=>f.split(",")))}),this.elements.forEach(i=>{i.classes.includes(o)&&i.cssStyles.push(...u.flatMap(f=>f.split(",")))})}}getClasses(){return this.classes}getData(){let e=ye(),u=[],o=[];for(let n of this.requirements.values()){let i=n;i.id=n.name,i.cssStyles=n.cssStyles,i.cssClasses=n.classes.join(" "),i.shape="requirementBox",i.look=e.look,i.colorIndex=u.length,u.push(i)}for(let n of this.elements.values()){let i=n;i.shape="requirementBox",i.look=e.look,i.id=n.name,i.cssStyles=n.cssStyles,i.cssClasses=n.classes.join(" "),i.colorIndex=u.length,u.push(i)}for(let n of this.relations){let i=0,f=n.type===this.Relationships.CONTAINS,k={id:`${n.src}-${n.dst}-${i}`,start:this.requirements.get(n.src)?.name??this.elements.get(n.src)?.name,end:this.requirements.get(n.dst)?.name??this.elements.get(n.dst)?.name,label:`&lt;&lt;${n.type}&gt;&gt;`,classes:"relationshipLine",style:["fill:none",f?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:f?"normal":"dashed",arrowTypeStart:f?"requirement_contains":"",arrowTypeEnd:f?"":"requirement_arrow",look:e.look,labelType:"markdown"};o.push(k),i++}return{nodes:u,edges:o,other:{},config:e,direction:this.getDirection()}}},ft=h(e=>{let u=Ce(),{themeVariables:o,look:n}=u,{bkgColorArray:i,borderColorArray:f}=o;if(!f?.length)return"";let k="";for(let E=0;E<e.THEME_COLOR_LIMIT;E++)k+=`
7
+
8
+ [data-look="${n}"][data-color-id="color-${E}"].node path {
9
+ stroke: ${f[E]};
10
+ fill: ${i?.length?i[E]:""};
11
+ }
12
+
13
+ [data-look="${n}"][data-color-id="color-${E}"].node rect {
14
+ stroke: ${f[E]};
15
+ fill: ${i?.length?i[E]:""};
16
+ }
17
+ `;return k},"genColor"),mt=h(e=>{let u=Ce(),{look:o,themeVariables:n}=u,{requirementEdgeLabelBackground:i}=n;return`
18
+ ${ft(e)}
19
+ marker {
20
+ fill: ${e.relationColor};
21
+ stroke: ${e.relationColor};
22
+ }
23
+
24
+ marker.cross {
25
+ stroke: ${e.lineColor};
26
+ }
27
+
28
+ svg {
29
+ font-family: ${e.fontFamily};
30
+ font-size: ${e.fontSize};
31
+ }
32
+
33
+ .reqBox {
34
+ fill: ${e.requirementBackground};
35
+ fill-opacity: 1.0;
36
+ stroke: ${e.requirementBorderColor};
37
+ stroke-width: ${e.requirementBorderSize};
38
+ }
39
+
40
+ .reqTitle, .reqLabel{
41
+ fill: ${e.requirementTextColor};
42
+ }
43
+ .reqLabelBox {
44
+ fill: ${e.relationLabelBackground};
45
+ fill-opacity: 1.0;
46
+ }
47
+
48
+ .req-title-line {
49
+ stroke: ${e.requirementBorderColor};
50
+ stroke-width: ${e.requirementBorderSize};
51
+ }
52
+ .relationshipLine {
53
+ stroke: ${e.relationColor};
54
+ stroke-width: ${o==="neo"?e.strokeWidth:"1px"};
55
+ }
56
+ .relationshipLabel {
57
+ fill: ${e.relationLabelColor};
58
+ }
59
+ .edgeLabel {
60
+ background-color: ${e.edgeLabelBackground};
61
+ }
62
+ .edgeLabel .label rect {
63
+ fill: ${e.edgeLabelBackground};
64
+ }
65
+ .edgeLabel .label text {
66
+ fill: ${e.relationLabelColor};
67
+ }
68
+ .divider {
69
+ stroke: ${e.nodeBorder};
70
+ stroke-width: 1;
71
+ }
72
+ .label {
73
+ font-family: ${e.fontFamily};
74
+ color: ${e.nodeTextColor||e.textColor};
75
+ }
76
+ .label text,span {
77
+ fill: ${e.nodeTextColor||e.textColor};
78
+ color: ${e.nodeTextColor||e.textColor};
79
+ }
80
+ .labelBkg {
81
+ background-color: ${i??e.edgeLabelBackground};
82
+ }
83
+
84
+ `},"getStyles"),dt=mt,rt={};He(rt,{draw:()=>Et});var Et=h(async function(e,u,o,n){ke.info("REF0:"),ke.info("Drawing requirement diagram (unified)",u);let{securityLevel:i,state:f,layout:k,look:E}=ye(),R=n.db.getData(),_=st(u,i);R.type=n.type,R.layoutAlgorithm=tt(k),R.nodeSpacing=f?.nodeSpacing??50,R.rankSpacing=f?.rankSpacing??50,R.markers=E==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],R.diagramId=u,await et(R,_);let I=8;Ze.insertTitle(_,"requirementDiagramTitleText",f?.titleTopMargin??25,n.db.getDiagramTitle()),it(_,I,"requirementDiagram",f?.useMaxWidth??!0)},"draw"),vt={parser:ht,get db(){return new ut},renderer:rt,styles:dt};export{vt as diagram};
@@ -0,0 +1,40 @@
1
+ import{N as xt,P as kt,T as _t,U as vt,V as bt,W as St,X as Lt,Y as wt,Z as Et,_ as Q,aa as At}from"./chunk-7CSIRG7W.js";import"./chunk-ERWOH47R.js";import{a as d}from"./chunk-EIBFAW37.js";import{H as Tt,e as G,p as Ct}from"./chunk-LGUG3SQB.js";import"./chunk-6DHFEWGX.js";function X(t,r){let s;if(r===void 0)for(let u of t)u!=null&&(s<u||s===void 0&&u>=u)&&(s=u);else{let u=-1;for(let f of t)(f=r(f,++u,t))!=null&&(s<f||s===void 0&&f>=f)&&(s=f)}return s}function U(t,r){let s;if(r===void 0)for(let u of t)u!=null&&(s>u||s===void 0&&u>=u)&&(s=u);else{let u=-1;for(let f of t)(f=r(f,++u,t))!=null&&(s>f||s===void 0&&f>=f)&&(s=f)}return s}function H(t,r){let s=0;if(r===void 0)for(let u of t)(u=+u)&&(s+=u);else{let u=-1;for(let f of t)(f=+r(f,++u,t))&&(s+=f)}return s}function Bt(t){return t.target.depth}function st(t){return t.depth}function it(t,r){return r-1-t.height}function J(t,r){return t.sourceLinks.length?t.depth:r-1}function at(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?U(t.sourceLinks,Bt)-1:0}function Y(t){return function(){return t}}function Mt(t,r){return K(t.source,r.source)||t.index-r.index}function Ot(t,r){return K(t.target,r.target)||t.index-r.index}function K(t,r){return t.y0-r.y0}function lt(t){return t.value}function $t(t){return t.index}function Vt(t){return t.nodes}function Ft(t){return t.links}function Nt(t,r){let s=t.get(r);if(!s)throw new Error("missing: "+r);return s}function It({nodes:t}){for(let r of t){let s=r.y0,u=s;for(let f of r.sourceLinks)f.y0=s+f.width/2,s+=f.width;for(let f of r.targetLinks)f.y1=u+f.width/2,u+=f.width}}function Z(){let t=0,r=0,s=1,u=1,f=24,_=8,y,g=$t,i=J,a,c,x=Vt,k=Ft,p=6;function v(){let e={nodes:x.apply(null,arguments),links:k.apply(null,arguments)};return A(e),E(e),T(e),M(e),R(e),It(e),e}v.update=function(e){return It(e),e},v.nodeId=function(e){return arguments.length?(g=typeof e=="function"?e:Y(e),v):g},v.nodeAlign=function(e){return arguments.length?(i=typeof e=="function"?e:Y(e),v):i},v.nodeSort=function(e){return arguments.length?(a=e,v):a},v.nodeWidth=function(e){return arguments.length?(f=+e,v):f},v.nodePadding=function(e){return arguments.length?(_=y=+e,v):_},v.nodes=function(e){return arguments.length?(x=typeof e=="function"?e:Y(e),v):x},v.links=function(e){return arguments.length?(k=typeof e=="function"?e:Y(e),v):k},v.linkSort=function(e){return arguments.length?(c=e,v):c},v.size=function(e){return arguments.length?(t=r=0,s=+e[0],u=+e[1],v):[s-t,u-r]},v.extent=function(e){return arguments.length?(t=+e[0][0],s=+e[1][0],r=+e[0][1],u=+e[1][1],v):[[t,r],[s,u]]},v.iterations=function(e){return arguments.length?(p=+e,v):p};function A({nodes:e,links:l}){for(let[n,o]of e.entries())o.index=n,o.sourceLinks=[],o.targetLinks=[];let h=new Map(e.map((n,o)=>[g(n,o,e),n]));for(let[n,o]of l.entries()){o.index=n;let{source:m,target:b}=o;typeof m!="object"&&(m=o.source=Nt(h,m)),typeof b!="object"&&(b=o.target=Nt(h,b)),m.sourceLinks.push(o),b.targetLinks.push(o)}if(c!=null)for(let{sourceLinks:n,targetLinks:o}of e)n.sort(c),o.sort(c)}function E({nodes:e}){for(let l of e)l.value=l.fixedValue===void 0?Math.max(H(l.sourceLinks,lt),H(l.targetLinks,lt)):l.fixedValue}function T({nodes:e}){let l=e.length,h=new Set(e),n=new Set,o=0;for(;h.size;){for(let m of h){m.depth=o;for(let{target:b}of m.sourceLinks)n.add(b)}if(++o>l)throw new Error("circular link");h=n,n=new Set}}function M({nodes:e}){let l=e.length,h=new Set(e),n=new Set,o=0;for(;h.size;){for(let m of h){m.height=o;for(let{source:b}of m.targetLinks)n.add(b)}if(++o>l)throw new Error("circular link");h=n,n=new Set}}function O({nodes:e}){let l=X(e,o=>o.depth)+1,h=(s-t-f)/(l-1),n=new Array(l);for(let o of e){let m=Math.max(0,Math.min(l-1,Math.floor(i.call(null,o,l))));o.layer=m,o.x0=t+m*h,o.x1=o.x0+f,n[m]?n[m].push(o):n[m]=[o]}if(a)for(let o of n)o.sort(a);return n}function P(e){let l=U(e,h=>(u-r-(h.length-1)*y)/H(h,lt));for(let h of e){let n=r;for(let o of h){o.y0=n,o.y1=n+o.value*l,n=o.y1+y;for(let m of o.sourceLinks)m.width=m.value*l}n=(u-n+y)/(h.length+1);for(let o=0;o<h.length;++o){let m=h[o];m.y0+=n*(o+1),m.y1+=n*(o+1)}V(h)}}function R(e){let l=O(e);y=Math.min(_,(u-r)/(X(l,h=>h.length)-1)),P(l);for(let h=0;h<p;++h){let n=Math.pow(.99,h),o=Math.max(1-n,(h+1)/p);N(l,n,o),S(l,n,o)}}function S(e,l,h){for(let n=1,o=e.length;n<o;++n){let m=e[n];for(let b of m){let $=0,C=0;for(let{source:w,value:ot}of b.targetLinks){let q=ot*(b.layer-w.layer);$+=L(w,b)*q,C+=q}if(!(C>0))continue;let D=($/C-b.y0)*l;b.y0+=D,b.y1+=D,W(b)}a===void 0&&m.sort(K),j(m,h)}}function N(e,l,h){for(let n=e.length,o=n-2;o>=0;--o){let m=e[o];for(let b of m){let $=0,C=0;for(let{target:w,value:ot}of b.sourceLinks){let q=ot*(w.layer-b.layer);$+=z(b,w)*q,C+=q}if(!(C>0))continue;let D=($/C-b.y0)*l;b.y0+=D,b.y1+=D,W(b)}a===void 0&&m.sort(K),j(m,h)}}function j(e,l){let h=e.length>>1,n=e[h];I(e,n.y0-y,h-1,l),B(e,n.y1+y,h+1,l),I(e,u,e.length-1,l),B(e,r,0,l)}function B(e,l,h,n){for(;h<e.length;++h){let o=e[h],m=(l-o.y0)*n;m>1e-6&&(o.y0+=m,o.y1+=m),l=o.y1+y}}function I(e,l,h,n){for(;h>=0;--h){let o=e[h],m=(o.y1-l)*n;m>1e-6&&(o.y0-=m,o.y1-=m),l=o.y0-y}}function W({sourceLinks:e,targetLinks:l}){if(c===void 0){for(let{source:{sourceLinks:h}}of l)h.sort(Ot);for(let{target:{targetLinks:h}}of e)h.sort(Mt)}}function V(e){if(c===void 0)for(let{sourceLinks:l,targetLinks:h}of e)l.sort(Ot),h.sort(Mt)}function L(e,l){let h=e.y0-(e.sourceLinks.length-1)*y/2;for(let{target:n,width:o}of e.sourceLinks){if(n===l)break;h+=o+y}for(let{source:n,width:o}of l.targetLinks){if(n===e)break;h-=o}return h}function z(e,l){let h=l.y0-(l.targetLinks.length-1)*y/2;for(let{source:n,width:o}of l.targetLinks){if(n===e)break;h+=o+y}for(let{target:n,width:o}of e.sourceLinks){if(n===l)break;h-=o}return h}return v}var ut=Math.PI,ft=2*ut,F=1e-6,Wt=ft-F;function ct(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Pt(){return new ct}ct.prototype=Pt.prototype={constructor:ct,moveTo:function(t,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+r)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,r){this._+="L"+(this._x1=+t)+","+(this._y1=+r)},quadraticCurveTo:function(t,r,s,u){this._+="Q"+ +t+","+ +r+","+(this._x1=+s)+","+(this._y1=+u)},bezierCurveTo:function(t,r,s,u,f,_){this._+="C"+ +t+","+ +r+","+ +s+","+ +u+","+(this._x1=+f)+","+(this._y1=+_)},arcTo:function(t,r,s,u,f){t=+t,r=+r,s=+s,u=+u,f=+f;var _=this._x1,y=this._y1,g=s-t,i=u-r,a=_-t,c=y-r,x=a*a+c*c;if(f<0)throw new Error("negative radius: "+f);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=r);else if(x>F)if(!(Math.abs(c*g-i*a)>F)||!f)this._+="L"+(this._x1=t)+","+(this._y1=r);else{var k=s-_,p=u-y,v=g*g+i*i,A=k*k+p*p,E=Math.sqrt(v),T=Math.sqrt(x),M=f*Math.tan((ut-Math.acos((v+x-A)/(2*E*T)))/2),O=M/T,P=M/E;Math.abs(O-1)>F&&(this._+="L"+(t+O*a)+","+(r+O*c)),this._+="A"+f+","+f+",0,0,"+ +(c*k>a*p)+","+(this._x1=t+P*g)+","+(this._y1=r+P*i)}},arc:function(t,r,s,u,f,_){t=+t,r=+r,s=+s,_=!!_;var y=s*Math.cos(u),g=s*Math.sin(u),i=t+y,a=r+g,c=1^_,x=_?u-f:f-u;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+i+","+a:(Math.abs(this._x1-i)>F||Math.abs(this._y1-a)>F)&&(this._+="L"+i+","+a),s&&(x<0&&(x=x%ft+ft),x>Wt?this._+="A"+s+","+s+",0,1,"+c+","+(t-y)+","+(r-g)+"A"+s+","+s+",0,1,"+c+","+(this._x1=i)+","+(this._y1=a):x>F&&(this._+="A"+s+","+s+",0,"+ +(x>=ut)+","+c+","+(this._x1=t+s*Math.cos(f))+","+(this._y1=r+s*Math.sin(f))))},rect:function(t,r,s,u){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+r)+"h"+ +s+"v"+ +u+"h"+-s+"Z"},toString:function(){return this._}};var ht=Pt;function dt(t){return function(){return t}}function Rt(t){return t[0]}function zt(t){return t[1]}var Dt=Array.prototype.slice;function Ut(t){return t.source}function Ht(t){return t.target}function Yt(t){var r=Ut,s=Ht,u=Rt,f=zt,_=null;function y(){var g,i=Dt.call(arguments),a=r.apply(this,i),c=s.apply(this,i);if(_||(_=g=ht()),t(_,+u.apply(this,(i[0]=a,i)),+f.apply(this,i),+u.apply(this,(i[0]=c,i)),+f.apply(this,i)),g)return _=null,g+""||null}return y.source=function(g){return arguments.length?(r=g,y):r},y.target=function(g){return arguments.length?(s=g,y):s},y.x=function(g){return arguments.length?(u=typeof g=="function"?g:dt(+g),y):u},y.y=function(g){return arguments.length?(f=typeof g=="function"?g:dt(+g),y):f},y.context=function(g){return arguments.length?(_=g??null,y):_},y}function qt(t,r,s,u,f){t.moveTo(r,s),t.bezierCurveTo(r=(r+u)/2,s,r,f,u,f)}function pt(){return Yt(qt)}function Gt(t){return[t.source.x1,t.y0]}function Xt(t){return[t.target.x0,t.y1]}function yt(){return pt().source(Gt).target(Xt)}var mt=(function(){var t=d(function(g,i,a,c){for(a=a||{},c=g.length;c--;a[g[c]]=i);return a},"o"),r=[1,9],s=[1,10],u=[1,5,10,12],f={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:d(function(i,a,c,x,k,p,v){var A=p.length-1;switch(k){case 7:let E=x.findOrCreateNode(p[A-4].trim().replaceAll('""','"')),T=x.findOrCreateNode(p[A-2].trim().replaceAll('""','"')),M=parseFloat(p[A].trim());x.addLink(E,T,M);break;case 8:case 9:case 11:this.$=p[A];break;case 10:this.$=p[A-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:r,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(u,[2,8]),t(u,[2,9]),{19:[1,16]},t(u,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:r,20:s},{15:18,16:7,17:8,18:r,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(u,[2,10]),{15:21,16:7,17:8,18:r,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:d(function(i,a){if(a.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=a,c}},"parseError"),parse:d(function(i){var a=this,c=[0],x=[],k=[null],p=[],v=this.table,A="",E=0,T=0,M=0,O=2,P=1,R=p.slice.call(arguments,1),S=Object.create(this.lexer),N={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(N.yy[j]=this.yy[j]);S.setInput(i,N.yy),N.yy.lexer=S,N.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var B=S.yylloc;p.push(B);var I=S.options&&S.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function W(w){c.length=c.length-2*w,k.length=k.length-w,p.length=p.length-w}d(W,"popStack");function V(){var w;return w=x.pop()||S.lex()||P,typeof w!="number"&&(w instanceof Array&&(x=w,w=x.pop()),w=a.symbols_[w]||w),w}d(V,"lex");for(var L,z,e,l,h,n,o={},m,b,$,C;;){if(e=c[c.length-1],this.defaultActions[e]?l=this.defaultActions[e]:((L===null||typeof L>"u")&&(L=V()),l=v[e]&&v[e][L]),typeof l>"u"||!l.length||!l[0]){var D="";C=[];for(m in v[e])this.terminals_[m]&&m>O&&C.push("'"+this.terminals_[m]+"'");S.showPosition?D="Parse error on line "+(E+1)+`:
2
+ `+S.showPosition()+`
3
+ Expecting `+C.join(", ")+", got '"+(this.terminals_[L]||L)+"'":D="Parse error on line "+(E+1)+": Unexpected "+(L==P?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(D,{text:S.match,token:this.terminals_[L]||L,line:S.yylineno,loc:B,expected:C})}if(l[0]instanceof Array&&l.length>1)throw new Error("Parse Error: multiple actions possible at state: "+e+", token: "+L);switch(l[0]){case 1:c.push(L),k.push(S.yytext),p.push(S.yylloc),c.push(l[1]),L=null,z?(L=z,z=null):(T=S.yyleng,A=S.yytext,E=S.yylineno,B=S.yylloc,M>0&&M--);break;case 2:if(b=this.productions_[l[1]][1],o.$=k[k.length-b],o._$={first_line:p[p.length-(b||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(b||1)].first_column,last_column:p[p.length-1].last_column},I&&(o._$.range=[p[p.length-(b||1)].range[0],p[p.length-1].range[1]]),n=this.performAction.apply(o,[A,T,E,N.yy,l[1],k,p].concat(R)),typeof n<"u")return n;b&&(c=c.slice(0,-1*b*2),k=k.slice(0,-1*b),p=p.slice(0,-1*b)),c.push(this.productions_[l[1]][0]),k.push(o.$),p.push(o._$),$=v[c[c.length-2]][c[c.length-1]],c.push($);break;case 3:return!0}}return!0},"parse")},_=(function(){var g={EOF:1,parseError:d(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:d(function(i,a){return this.yy=a||this.yy||{},this._input=i,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:d(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:d(function(i){var a=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var x=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),c.length-1&&(this.yylineno-=c.length-1);var k=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:c?(c.length===x.length?this.yylloc.first_column:0)+x[x.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[k[0],k[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(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:d(function(i){this.unput(this.match.slice(i))},"less"),pastInput:d(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
5
+ `+a+"^"},"showPosition"),test_match:d(function(i,a){var c,x,k;if(this.options.backtrack_lexer&&(k={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&&(k.yylloc.range=this.yylloc.range.slice(0))),x=i[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],c=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var p in k)this[p]=k[p];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,a,c,x;this._more||(this.yytext="",this.match="");for(var k=this._currentRules(),p=0;p<k.length;p++)if(c=this._input.match(this.rules[k[p]]),c&&(!a||c[0].length>a[0].length)){if(a=c,x=p,this.options.backtrack_lexer){if(i=this.test_match(c,k[p]),i!==!1)return i;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(i=this.test_match(a,k[x]),i!==!1?i:!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:d(function(){var a=this.next();return a||this.lex()},"lex"),begin:d(function(a){this.conditionStack.push(a)},"begin"),popState:d(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(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:d(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:d(function(a){this.begin(a)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:d(function(a,c,x,k){var p=k;switch(x){case 0:return this.pushState("csv"),4;break;case 1:return this.pushState("csv"),4;break;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;break;case 6:return 20;case 7:return this.popState("escaped_text"),18;break;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return g})();f.lexer=_;function y(){this.yy={}}return d(y,"Parser"),y.prototype=f,f.Parser=y,new y})();mt.parser=mt;var tt=mt,nt=[],rt=[],et=new Map,Jt=d(()=>{nt=[],rt=[],et=new Map,_t()},"clear"),Qt=class{constructor(t,r,s=0){this.source=t,this.target=r,this.value=s}static{d(this,"SankeyLink")}},Kt=d((t,r,s)=>{nt.push(new Qt(t,r,s))},"addLink"),Zt=class{constructor(t){this.ID=t}static{d(this,"SankeyNode")}},te=d(t=>{t=xt.sanitizeText(t,Q());let r=et.get(t);return r===void 0&&(r=new Zt(t),et.set(t,r),rt.push(r)),r},"findOrCreateNode"),ee=d(()=>rt,"getNodes"),ne=d(()=>nt,"getLinks"),re=d(()=>({nodes:rt.map(t=>({id:t.ID})),links:nt.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),oe={nodesMap:et,getConfig:d(()=>Q().sankey,"getConfig"),getNodes:ee,getLinks:ne,getGraph:re,addLink:Kt,findOrCreateNode:te,getAccTitle:bt,setAccTitle:vt,getAccDescription:Lt,setAccDescription:St,getDiagramTitle:Et,setDiagramTitle:wt,clear:Jt},jt=class gt{static{d(this,"Uid")}static{this.count=0}static next(r){return new gt(r+ ++gt.count)}constructor(r){this.id=r,this.href=`#${r}`}toString(){return"url("+this.href+")"}},se={left:st,right:it,center:at,justify:J},ie=d(t=>{let r=0,s=0;for(let u of t){let f=u.value??0;f>r&&(r=f,s=u.layer??0)}return s},"findCentralNodeLayer"),ae=d(function(t,r,s,u){let{securityLevel:f,sankey:_}=Q(),y=At.sankey,g;f==="sandbox"&&(g=G("#i"+r));let i=f==="sandbox"?G(g.nodes()[0].contentDocument.body):G("body"),a=f==="sandbox"?i.select(`[id="${r}"]`):G(`[id="${r}"]`),c=_?.width??y.width,x=_?.height??y.width,k=_?.useMaxWidth??y.useMaxWidth,p=_?.nodeAlignment??y.nodeAlignment,v=_?.prefix??y.prefix,A=_?.suffix??y.suffix,E=_?.showValues??y.showValues,T=_?.nodeWidth??y.nodeWidth??10,M=_?.nodePadding??y.nodePadding??12,O=_?.labelStyle??y.labelStyle??"legacy",P=_?.nodeColors??{},R=u.db.getGraph(),S=se[p];Z().nodeId(n=>n.id).nodeWidth(T).nodePadding(M+(E?15:0)).nodeAlign(S).extent([[0,0],[c,x]])(R);let j=ie(R.nodes),B=Ct(Tt),I=d(n=>P[n]??B(n),"getNodeColor");a.append("g").attr("class","nodes").selectAll(".node").data(R.nodes).join("g").attr("class","node").attr("id",n=>(n.uid=jt.next("node-")).id).attr("transform",function(n){return"translate("+n.x0+","+n.y0+")"}).attr("x",n=>n.x0).attr("y",n=>n.y0).append("rect").attr("height",n=>n.y1-n.y0).attr("width",n=>n.x1-n.x0).attr("fill",n=>I(n.id));let W=d(({id:n,value:o})=>E?`${n}
7
+ ${v}${Math.round(o*100)/100}${A}`:n,"getText"),V=d(n=>O==="outlined"?(n.layer??0)<j?{x:n.x0-6,anchor:"end"}:{x:n.x1+6,anchor:"start"}:n.x0<c/2?{x:n.x1+6,anchor:"start"}:{x:n.x0-6,anchor:"end"},"getLabelPosition"),L=a.append("g").attr("class","node-labels").attr("font-size",14),z=d(n=>L.selectAll(n?`.${n}`:"text").data(R.nodes).join("text").attr("class",n??null).attr("x",o=>V(o).x).attr("y",o=>(o.y1+o.y0)/2).attr("dy",`${E?"0":"0.35"}em`).attr("text-anchor",o=>V(o).anchor).text(W),"appendLabel");O==="outlined"?(z("sankey-label-bg"),z("sankey-label-fg")):z();let e=a.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(R.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),l=_?.linkColor??"gradient";if(l==="gradient"){let n=e.append("linearGradient").attr("id",o=>(o.uid=jt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",o=>o.source.x1).attr("x2",o=>o.target.x0);n.append("stop").attr("offset","0%").attr("stop-color",o=>I(o.source.id)),n.append("stop").attr("offset","100%").attr("stop-color",o=>I(o.target.id))}let h;switch(l){case"gradient":h=d(n=>n.uid,"coloring");break;case"source":h=d(n=>I(n.source.id),"coloring");break;case"target":h=d(n=>I(n.target.id),"coloring");break;default:h=l}e.append("path").attr("d",yt()).attr("stroke",h).attr("stroke-width",n=>Math.max(1,n.width)),kt(void 0,a,0,k)},"draw"),le={draw:ae},ue=d(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
8
+ `).trim(),"prepareTextForParsing"),fe=d(t=>`.label {
9
+ font-family: ${t.fontFamily};
10
+ }
11
+
12
+ .node-labels {
13
+ font-family: ${t.fontFamily};
14
+ }
15
+
16
+ /* Outlined label style - background stroke for better readability */
17
+ .sankey-label-bg {
18
+ stroke: ${t.mainBkg||t.background||"#fff"};
19
+ stroke-width: 4px;
20
+ stroke-linejoin: round;
21
+ paint-order: stroke;
22
+ }
23
+
24
+ /* Foreground label text */
25
+ .sankey-label-fg {
26
+ fill: ${t.textColor};
27
+ }
28
+
29
+ /* Node styling */
30
+ .node rect {
31
+ shape-rendering: crispEdges;
32
+ }
33
+
34
+ /* Link styling */
35
+ .link {
36
+ fill: none;
37
+ stroke-opacity: 0.5;
38
+ mix-blend-mode: multiply;
39
+ }
40
+ `,"getStyles"),ce=fe,he=tt.parse.bind(tt);tt.parse=t=>he(ue(t));var Ze={styles:ce,parser:tt,db:oe,renderer:le};export{Ze as diagram};