@usepagelet/runtime 0.1.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 (183) hide show
  1. package/README.md +24 -0
  2. package/dist/v1/capabilities.md +59 -0
  3. package/dist/v1/chunks/architecture-7EHR7CIX-CDRXMAVQ.js +2 -0
  4. package/dist/v1/chunks/architecture-7EHR7CIX-CDRXMAVQ.js.map +7 -0
  5. package/dist/v1/chunks/architectureDiagram-3BPJPVTR-EYIVUOEK.js +37 -0
  6. package/dist/v1/chunks/architectureDiagram-3BPJPVTR-EYIVUOEK.js.map +7 -0
  7. package/dist/v1/chunks/blockDiagram-GPEHLZMM-P7MBAWVH.js +133 -0
  8. package/dist/v1/chunks/blockDiagram-GPEHLZMM-P7MBAWVH.js.map +7 -0
  9. package/dist/v1/chunks/c4Diagram-AAUBKEIU-2XSL5LGB.js +11 -0
  10. package/dist/v1/chunks/c4Diagram-AAUBKEIU-2XSL5LGB.js.map +7 -0
  11. package/dist/v1/chunks/chunk-2STBDRRH.js +2 -0
  12. package/dist/v1/chunks/chunk-2STBDRRH.js.map +7 -0
  13. package/dist/v1/chunks/chunk-6AA7JQNC.js +71 -0
  14. package/dist/v1/chunks/chunk-6AA7JQNC.js.map +7 -0
  15. package/dist/v1/chunks/chunk-72WSJX2P.js +2 -0
  16. package/dist/v1/chunks/chunk-72WSJX2P.js.map +7 -0
  17. package/dist/v1/chunks/chunk-AUV7QZZ7.js +2 -0
  18. package/dist/v1/chunks/chunk-AUV7QZZ7.js.map +7 -0
  19. package/dist/v1/chunks/chunk-AZFF2WJO.js +2 -0
  20. package/dist/v1/chunks/chunk-AZFF2WJO.js.map +7 -0
  21. package/dist/v1/chunks/chunk-C2IUOGBD.js +2 -0
  22. package/dist/v1/chunks/chunk-C2IUOGBD.js.map +7 -0
  23. package/dist/v1/chunks/chunk-DKQVSAO3.js +2 -0
  24. package/dist/v1/chunks/chunk-DKQVSAO3.js.map +7 -0
  25. package/dist/v1/chunks/chunk-DS52DG6H.js +2 -0
  26. package/dist/v1/chunks/chunk-DS52DG6H.js.map +7 -0
  27. package/dist/v1/chunks/chunk-DXEOG5W4.js +2 -0
  28. package/dist/v1/chunks/chunk-DXEOG5W4.js.map +7 -0
  29. package/dist/v1/chunks/chunk-EHSK6IMI.js +3 -0
  30. package/dist/v1/chunks/chunk-EHSK6IMI.js.map +7 -0
  31. package/dist/v1/chunks/chunk-FWZR474D.js +2 -0
  32. package/dist/v1/chunks/chunk-FWZR474D.js.map +7 -0
  33. package/dist/v1/chunks/chunk-FYLAOHYS.js +2 -0
  34. package/dist/v1/chunks/chunk-FYLAOHYS.js.map +7 -0
  35. package/dist/v1/chunks/chunk-G6W4FKMG.js +2 -0
  36. package/dist/v1/chunks/chunk-G6W4FKMG.js.map +7 -0
  37. package/dist/v1/chunks/chunk-HLP6UJDY.js +2 -0
  38. package/dist/v1/chunks/chunk-HLP6UJDY.js.map +7 -0
  39. package/dist/v1/chunks/chunk-IGLPGT7W.js +160 -0
  40. package/dist/v1/chunks/chunk-IGLPGT7W.js.map +7 -0
  41. package/dist/v1/chunks/chunk-IQVRW6XA.js +322 -0
  42. package/dist/v1/chunks/chunk-IQVRW6XA.js.map +7 -0
  43. package/dist/v1/chunks/chunk-IY5OUPDU.js +5 -0
  44. package/dist/v1/chunks/chunk-IY5OUPDU.js.map +7 -0
  45. package/dist/v1/chunks/chunk-JOJIMF7A.js +2 -0
  46. package/dist/v1/chunks/chunk-JOJIMF7A.js.map +7 -0
  47. package/dist/v1/chunks/chunk-NWD66TP4.js +2 -0
  48. package/dist/v1/chunks/chunk-NWD66TP4.js.map +7 -0
  49. package/dist/v1/chunks/chunk-PLQZIFSO.js +2 -0
  50. package/dist/v1/chunks/chunk-PLQZIFSO.js.map +7 -0
  51. package/dist/v1/chunks/chunk-PVPXGQIV.js +2 -0
  52. package/dist/v1/chunks/chunk-PVPXGQIV.js.map +7 -0
  53. package/dist/v1/chunks/chunk-QDJGX3SU.js +16 -0
  54. package/dist/v1/chunks/chunk-QDJGX3SU.js.map +7 -0
  55. package/dist/v1/chunks/chunk-QSGUWHXF.js +2 -0
  56. package/dist/v1/chunks/chunk-QSGUWHXF.js.map +7 -0
  57. package/dist/v1/chunks/chunk-RCIRWMC7.js +2 -0
  58. package/dist/v1/chunks/chunk-RCIRWMC7.js.map +7 -0
  59. package/dist/v1/chunks/chunk-S4ACHXBI.js +2 -0
  60. package/dist/v1/chunks/chunk-S4ACHXBI.js.map +7 -0
  61. package/dist/v1/chunks/chunk-SA4K3XYV.js +2 -0
  62. package/dist/v1/chunks/chunk-SA4K3XYV.js.map +7 -0
  63. package/dist/v1/chunks/chunk-SAENYLYK.js +232 -0
  64. package/dist/v1/chunks/chunk-SAENYLYK.js.map +7 -0
  65. package/dist/v1/chunks/chunk-SN6BTAM3.js +4 -0
  66. package/dist/v1/chunks/chunk-SN6BTAM3.js.map +7 -0
  67. package/dist/v1/chunks/chunk-SWJRRCAF.js +2 -0
  68. package/dist/v1/chunks/chunk-SWJRRCAF.js.map +7 -0
  69. package/dist/v1/chunks/chunk-TGL5CWDU.js +63 -0
  70. package/dist/v1/chunks/chunk-TGL5CWDU.js.map +7 -0
  71. package/dist/v1/chunks/chunk-TVSQ2OZ6.js +11 -0
  72. package/dist/v1/chunks/chunk-TVSQ2OZ6.js.map +7 -0
  73. package/dist/v1/chunks/chunk-URGT6V7R.js +2 -0
  74. package/dist/v1/chunks/chunk-URGT6V7R.js.map +7 -0
  75. package/dist/v1/chunks/chunk-WBEUYPCI.js +123 -0
  76. package/dist/v1/chunks/chunk-WBEUYPCI.js.map +7 -0
  77. package/dist/v1/chunks/chunk-WEZ3ELJO.js +2 -0
  78. package/dist/v1/chunks/chunk-WEZ3ELJO.js.map +7 -0
  79. package/dist/v1/chunks/chunk-WIIGSS4X.js +2 -0
  80. package/dist/v1/chunks/chunk-WIIGSS4X.js.map +7 -0
  81. package/dist/v1/chunks/chunk-XUJKMBZ5.js +2 -0
  82. package/dist/v1/chunks/chunk-XUJKMBZ5.js.map +7 -0
  83. package/dist/v1/chunks/chunk-YC75LZ32.js +33 -0
  84. package/dist/v1/chunks/chunk-YC75LZ32.js.map +7 -0
  85. package/dist/v1/chunks/chunk-YK2CHHQT.js +207 -0
  86. package/dist/v1/chunks/chunk-YK2CHHQT.js.map +7 -0
  87. package/dist/v1/chunks/chunk-YYWGGXI6.js +2 -0
  88. package/dist/v1/chunks/chunk-YYWGGXI6.js.map +7 -0
  89. package/dist/v1/chunks/chunk-ZY7EQCMR.js +4 -0
  90. package/dist/v1/chunks/chunk-ZY7EQCMR.js.map +7 -0
  91. package/dist/v1/chunks/classDiagram-4FO5ZUOK-4VU3VATX.js +2 -0
  92. package/dist/v1/chunks/classDiagram-4FO5ZUOK-4VU3VATX.js.map +7 -0
  93. package/dist/v1/chunks/classDiagram-v2-Q7XG4LA2-QIBN3KO6.js +2 -0
  94. package/dist/v1/chunks/classDiagram-v2-Q7XG4LA2-QIBN3KO6.js.map +7 -0
  95. package/dist/v1/chunks/cose-bilkent-S5V4N54A-MHLDSCZY.js +2 -0
  96. package/dist/v1/chunks/cose-bilkent-S5V4N54A-MHLDSCZY.js.map +7 -0
  97. package/dist/v1/chunks/dagre-BM42HDAG-U3ECKIMS.js +5 -0
  98. package/dist/v1/chunks/dagre-BM42HDAG-U3ECKIMS.js.map +7 -0
  99. package/dist/v1/chunks/diagram-2AECGRRQ-BNRGNWOM.js +44 -0
  100. package/dist/v1/chunks/diagram-2AECGRRQ-BNRGNWOM.js.map +7 -0
  101. package/dist/v1/chunks/diagram-5GNKFQAL-CPWZIJ4M.js +11 -0
  102. package/dist/v1/chunks/diagram-5GNKFQAL-CPWZIJ4M.js.map +7 -0
  103. package/dist/v1/chunks/diagram-KO2AKTUF-7CDCIBL3.js +4 -0
  104. package/dist/v1/chunks/diagram-KO2AKTUF-7CDCIBL3.js.map +7 -0
  105. package/dist/v1/chunks/diagram-LMA3HP47-LPHFNXWX.js +25 -0
  106. package/dist/v1/chunks/diagram-LMA3HP47-LPHFNXWX.js.map +7 -0
  107. package/dist/v1/chunks/diagram-OG6HWLK6-FWJ2MCGI.js +25 -0
  108. package/dist/v1/chunks/diagram-OG6HWLK6-FWJ2MCGI.js.map +7 -0
  109. package/dist/v1/chunks/erDiagram-TEJ5UH35-OX62GPYU.js +86 -0
  110. package/dist/v1/chunks/erDiagram-TEJ5UH35-OX62GPYU.js.map +7 -0
  111. package/dist/v1/chunks/eventmodeling-FCH6USID-NRRIBZEB.js +2 -0
  112. package/dist/v1/chunks/eventmodeling-FCH6USID-NRRIBZEB.js.map +7 -0
  113. package/dist/v1/chunks/flowDiagram-I6XJVG4X-I4ULL6MS.js +163 -0
  114. package/dist/v1/chunks/flowDiagram-I6XJVG4X-I4ULL6MS.js.map +7 -0
  115. package/dist/v1/chunks/ganttDiagram-6RSMTGT7-TIDOVKXT.js +293 -0
  116. package/dist/v1/chunks/ganttDiagram-6RSMTGT7-TIDOVKXT.js.map +7 -0
  117. package/dist/v1/chunks/gitGraph-WXDBUCRP-4LEEA2GI.js +2 -0
  118. package/dist/v1/chunks/gitGraph-WXDBUCRP-4LEEA2GI.js.map +7 -0
  119. package/dist/v1/chunks/gitGraphDiagram-PVQCEYII-BPEBW2KG.js +107 -0
  120. package/dist/v1/chunks/gitGraphDiagram-PVQCEYII-BPEBW2KG.js.map +7 -0
  121. package/dist/v1/chunks/info-J43DQDTF-EI2RS372.js +2 -0
  122. package/dist/v1/chunks/info-J43DQDTF-EI2RS372.js.map +7 -0
  123. package/dist/v1/chunks/infoDiagram-5YYISTIA-5GFVQYI7.js +3 -0
  124. package/dist/v1/chunks/infoDiagram-5YYISTIA-5GFVQYI7.js.map +7 -0
  125. package/dist/v1/chunks/ishikawaDiagram-YF4QCWOH-AZ7PAHIN.js +71 -0
  126. package/dist/v1/chunks/ishikawaDiagram-YF4QCWOH-AZ7PAHIN.js.map +7 -0
  127. package/dist/v1/chunks/journeyDiagram-JHISSGLW-B4ZN6VTS.js +140 -0
  128. package/dist/v1/chunks/journeyDiagram-JHISSGLW-B4ZN6VTS.js.map +7 -0
  129. package/dist/v1/chunks/kanban-definition-UN3LZRKU-5THRXHJP.js +90 -0
  130. package/dist/v1/chunks/kanban-definition-UN3LZRKU-5THRXHJP.js.map +7 -0
  131. package/dist/v1/chunks/katex-CLI7E3QC.js +258 -0
  132. package/dist/v1/chunks/katex-CLI7E3QC.js.map +7 -0
  133. package/dist/v1/chunks/mindmap-definition-RKZ34NQL-E57QDEMN.js +97 -0
  134. package/dist/v1/chunks/mindmap-definition-RKZ34NQL-E57QDEMN.js.map +7 -0
  135. package/dist/v1/chunks/packet-YPE3B663-PKWGZRBL.js +2 -0
  136. package/dist/v1/chunks/packet-YPE3B663-PKWGZRBL.js.map +7 -0
  137. package/dist/v1/chunks/pie-LRSECV5Y-QSTOXR4H.js +2 -0
  138. package/dist/v1/chunks/pie-LRSECV5Y-QSTOXR4H.js.map +7 -0
  139. package/dist/v1/chunks/pieDiagram-4H26LBE5-CZULUIHM.js +31 -0
  140. package/dist/v1/chunks/pieDiagram-4H26LBE5-CZULUIHM.js.map +7 -0
  141. package/dist/v1/chunks/quadrantDiagram-W4KKPZXB-WRXQ2LCP.js +8 -0
  142. package/dist/v1/chunks/quadrantDiagram-W4KKPZXB-WRXQ2LCP.js.map +7 -0
  143. package/dist/v1/chunks/radar-GUYGQ44K-UJHF7VJA.js +2 -0
  144. package/dist/v1/chunks/radar-GUYGQ44K-UJHF7VJA.js.map +7 -0
  145. package/dist/v1/chunks/requirementDiagram-4Y6WPE33-LUKBHY3G.js +85 -0
  146. package/dist/v1/chunks/requirementDiagram-4Y6WPE33-LUKBHY3G.js.map +7 -0
  147. package/dist/v1/chunks/sankeyDiagram-5OEKKPKP-IHGIKQ7Q.js +41 -0
  148. package/dist/v1/chunks/sankeyDiagram-5OEKKPKP-IHGIKQ7Q.js.map +7 -0
  149. package/dist/v1/chunks/sequenceDiagram-3UESZ5HK-AZIJM7V2.js +163 -0
  150. package/dist/v1/chunks/sequenceDiagram-3UESZ5HK-AZIJM7V2.js.map +7 -0
  151. package/dist/v1/chunks/stateDiagram-AJRCARHV-7TL53ICK.js +2 -0
  152. package/dist/v1/chunks/stateDiagram-AJRCARHV-7TL53ICK.js.map +7 -0
  153. package/dist/v1/chunks/stateDiagram-v2-BHNVJYJU-TJ245A24.js +2 -0
  154. package/dist/v1/chunks/stateDiagram-v2-BHNVJYJU-TJ245A24.js.map +7 -0
  155. package/dist/v1/chunks/timeline-definition-PNZ67QCA-C5FF5CVI.js +121 -0
  156. package/dist/v1/chunks/timeline-definition-PNZ67QCA-C5FF5CVI.js.map +7 -0
  157. package/dist/v1/chunks/treeView-BLDUP644-2MCPJRE2.js +2 -0
  158. package/dist/v1/chunks/treeView-BLDUP644-2MCPJRE2.js.map +7 -0
  159. package/dist/v1/chunks/treemap-LRROVOQU-WSVRI32O.js +2 -0
  160. package/dist/v1/chunks/treemap-LRROVOQU-WSVRI32O.js.map +7 -0
  161. package/dist/v1/chunks/vennDiagram-CIIHVFJN-NQU7FBQX.js +35 -0
  162. package/dist/v1/chunks/vennDiagram-CIIHVFJN-NQU7FBQX.js.map +7 -0
  163. package/dist/v1/chunks/wardley-L42UT6IY-GONRRIFG.js +2 -0
  164. package/dist/v1/chunks/wardley-L42UT6IY-GONRRIFG.js.map +7 -0
  165. package/dist/v1/chunks/wardleyDiagram-YWT4CUSO-KNM7EB5A.js +79 -0
  166. package/dist/v1/chunks/wardleyDiagram-YWT4CUSO-KNM7EB5A.js.map +7 -0
  167. package/dist/v1/chunks/xychartDiagram-2RQKCTM6-CMGOBHPC.js +8 -0
  168. package/dist/v1/chunks/xychartDiagram-2RQKCTM6-CMGOBHPC.js.map +7 -0
  169. package/dist/v1/modules/charts.js +4 -0
  170. package/dist/v1/modules/charts.js.map +7 -0
  171. package/dist/v1/modules/code.js +26 -0
  172. package/dist/v1/modules/code.js.map +7 -0
  173. package/dist/v1/modules/markdown.js +65 -0
  174. package/dist/v1/modules/markdown.js.map +7 -0
  175. package/dist/v1/modules/math.js +258 -0
  176. package/dist/v1/modules/math.js.map +7 -0
  177. package/dist/v1/modules/mermaid.js +9 -0
  178. package/dist/v1/modules/mermaid.js.map +7 -0
  179. package/dist/v1/modules/png.js +3 -0
  180. package/dist/v1/modules/png.js.map +7 -0
  181. package/dist/v1/pagelet.js +128 -0
  182. package/dist/v1/pagelet.js.map +7 -0
  183. package/package.json +40 -0
@@ -0,0 +1,133 @@
1
+ import{a as qt}from"./chunk-QDJGX3SU.js";import{D as Gt}from"./chunk-AZFF2WJO.js";import{a as tt,d as Ut}from"./chunk-RCIRWMC7.js";import{a as Vt,b as Zt}from"./chunk-XUJKMBZ5.js";import{f as lt}from"./chunk-6AA7JQNC.js";import{a as Xt,f as jt,p as et,r as kt}from"./chunk-EHSK6IMI.js";import"./chunk-SA4K3XYV.js";import{A as $,E as M,G as wt,H as Ft,M as Pt,N as Wt,S as Yt,Z as C,a as At,b as Mt}from"./chunk-WBEUYPCI.js";import{J as Ht,N as Kt,b as g,d as L,j as _}from"./chunk-PVPXGQIV.js";import"./chunk-SN6BTAM3.js";import"./chunk-URGT6V7R.js";var Lt=(function(){var e=g(function(T,w,u,b){for(u=u||{},b=T.length;b--;u[T[b]]=w);return u},"o"),t=[1,15],a=[1,7],n=[1,13],s=[1,14],l=[1,19],r=[1,16],i=[1,17],c=[1,18],d=[8,30],o=[8,10,21,28,29,30,31,39,43,46],p=[1,23],y=[1,24],x=[8,10,15,16,21,28,29,30,31,39,43,46],m=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],k={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:g(function(w,u,b,S,E,h,W){var f=h.length-1;switch(E){case 4:S.getLogger().debug("Rule: separator (NL) ");break;case 5:S.getLogger().debug("Rule: separator (Space) ");break;case 6:S.getLogger().debug("Rule: separator (EOF) ");break;case 7:S.getLogger().debug("Rule: hierarchy: ",h[f-1]),S.setHierarchy(h[f-1]);break;case 8:S.getLogger().debug("Stop NL ");break;case 9:S.getLogger().debug("Stop EOF ");break;case 10:S.getLogger().debug("Stop NL2 ");break;case 11:S.getLogger().debug("Stop EOF2 ");break;case 12:S.getLogger().debug("Rule: statement: ",h[f]),typeof h[f].length=="number"?this.$=h[f]:this.$=[h[f]];break;case 13:S.getLogger().debug("Rule: statement #2: ",h[f-1]),this.$=[h[f-1]].concat(h[f]);break;case 14:S.getLogger().debug("Rule: link: ",h[f],w),this.$={edgeTypeStr:h[f],label:""};break;case 15:S.getLogger().debug("Rule: LABEL link: ",h[f-3],h[f-1],h[f]),this.$={edgeTypeStr:h[f],label:h[f-1]};break;case 18:let R=parseInt(h[f]),q=S.generateId();this.$={id:q,type:"space",label:"",width:R,children:[]};break;case 23:S.getLogger().debug("Rule: (nodeStatement link node) ",h[f-2],h[f-1],h[f]," typestr: ",h[f-1].edgeTypeStr);let V=S.edgeStrToEdgeData(h[f-1].edgeTypeStr),ut=S.edgeStrToEdgeStartData(h[f-1].edgeTypeStr),st=S.edgeStrToThickness(h[f-1].edgeTypeStr),pt=S.edgeStrToPattern(h[f-1].edgeTypeStr);this.$=[{id:h[f-2].id,label:h[f-2].label,type:h[f-2].type,directions:h[f-2].directions},{id:h[f-2].id+"-"+h[f].id,start:h[f-2].id,end:h[f].id,label:h[f-1].label,type:"edge",thickness:st,pattern:pt,directions:h[f].directions,arrowTypeEnd:V,arrowTypeStart:ut},{id:h[f].id,label:h[f].label,type:S.typeStr2Type(h[f].typeStr),directions:h[f].directions}];break;case 24:S.getLogger().debug("Rule: nodeStatement (abc88 node size) ",h[f-1],h[f]),this.$={id:h[f-1].id,label:h[f-1].label,type:S.typeStr2Type(h[f-1].typeStr),directions:h[f-1].directions,widthInColumns:parseInt(h[f],10)};break;case 25:S.getLogger().debug("Rule: nodeStatement (node) ",h[f]),this.$={id:h[f].id,label:h[f].label,type:S.typeStr2Type(h[f].typeStr),directions:h[f].directions,widthInColumns:1};break;case 26:S.getLogger().debug("APA123",this?this:"na"),S.getLogger().debug("COLUMNS: ",h[f]),this.$={type:"column-setting",columns:h[f]==="auto"?-1:parseInt(h[f])};break;case 27:S.getLogger().debug("Rule: id-block statement : ",h[f-2],h[f-1]);let z=S.generateId();this.$={...h[f-2],type:"composite",children:h[f-1]};break;case 28:S.getLogger().debug("Rule: blockStatement : ",h[f-2],h[f-1],h[f]);let Z=S.generateId();this.$={id:Z,type:"composite",label:"",children:h[f-1]};break;case 29:S.getLogger().debug("Rule: node (NODE_ID separator): ",h[f]),this.$={id:h[f]};break;case 30:S.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",h[f-1],h[f]),this.$={id:h[f-1],label:h[f].label,typeStr:h[f].typeStr,directions:h[f].directions};break;case 31:S.getLogger().debug("Rule: dirList: ",h[f]),this.$=[h[f]];break;case 32:S.getLogger().debug("Rule: dirList: ",h[f-1],h[f]),this.$=[h[f-1]].concat(h[f]);break;case 33:S.getLogger().debug("Rule: nodeShapeNLabel: ",h[f-2],h[f-1],h[f]),this.$={typeStr:h[f-2]+h[f],label:h[f-1]};break;case 34:S.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",h[f-3],h[f-2]," #3:",h[f-1],h[f]),this.$={typeStr:h[f-3]+h[f],label:h[f-2],directions:h[f-1]};break;case 35:case 36:this.$={type:"classDef",id:h[f-1].trim(),css:h[f].trim()};break;case 37:this.$={type:"applyClass",id:h[f-1].trim(),styleClass:h[f].trim()};break;case 38:this.$={type:"applyStyles",id:h[f-1].trim(),stylesStr:h[f].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:n,29:s,31:l,39:r,43:i,46:c},{8:[1,20]},e(d,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:n,29:s,31:l,39:r,43:i,46:c}),e(o,[2,16],{14:22,15:p,16:y}),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),e(o,[2,20]),e(o,[2,21]),e(o,[2,22]),e(x,[2,25],{27:[1,25]}),e(o,[2,26]),{19:26,26:12,31:l},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:n,29:s,31:l,39:r,43:i,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(m,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(d,[2,13]),{26:35,31:l},{31:[2,14]},{17:[1,36]},e(x,[2,24]),{10:t,11:37,13:4,14:22,15:p,16:y,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:n,29:s,31:l,39:r,43:i,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(m,[2,30]),{18:[1,43]},{18:[1,44]},e(x,[2,23]),{18:[1,45]},{30:[1,46]},e(o,[2,28]),e(o,[2,35]),e(o,[2,36]),e(o,[2,37]),e(o,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(o,[2,27]),e(m,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(m,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:g(function(w,u){if(u.recoverable)this.trace(w);else{var b=new Error(w);throw b.hash=u,b}},"parseError"),parse:g(function(w){var u=this,b=[0],S=[],E=[null],h=[],W=this.table,f="",R=0,q=0,V=0,ut=2,st=1,pt=h.slice.call(arguments,1),z=Object.create(this.lexer),Z={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&(Z.yy[ft]=this.yy[ft]);z.setInput(w,Z.yy),Z.yy.lexer=z,Z.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var xt=z.yylloc;h.push(xt);var De=z.options&&z.options.ranges;typeof Z.yy.parseError=="function"?this.parseError=Z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(Y){b.length=b.length-2*Y,E.length=E.length-Y,h.length=h.length-Y}g(Te,"popStack");function Rt(){var Y;return Y=S.pop()||z.lex()||st,typeof Y!="number"&&(Y instanceof Array&&(S=Y,Y=S.pop()),Y=u.symbols_[Y]||Y),Y}g(Rt,"lex");for(var P,bt,J,K,ea,yt,Q={},it,G,zt,nt;;){if(J=b[b.length-1],this.defaultActions[J]?K=this.defaultActions[J]:((P===null||typeof P>"u")&&(P=Rt()),K=W[J]&&W[J][P]),typeof K>"u"||!K.length||!K[0]){var mt="";nt=[];for(it in W[J])this.terminals_[it]&&it>ut&&nt.push("'"+this.terminals_[it]+"'");z.showPosition?mt="Parse error on line "+(R+1)+`:
2
+ `+z.showPosition()+`
3
+ Expecting `+nt.join(", ")+", got '"+(this.terminals_[P]||P)+"'":mt="Parse error on line "+(R+1)+": Unexpected "+(P==st?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(mt,{text:z.match,token:this.terminals_[P]||P,line:z.yylineno,loc:xt,expected:nt})}if(K[0]instanceof Array&&K.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+P);switch(K[0]){case 1:b.push(P),E.push(z.yytext),h.push(z.yylloc),b.push(K[1]),P=null,bt?(P=bt,bt=null):(q=z.yyleng,f=z.yytext,R=z.yylineno,xt=z.yylloc,V>0&&V--);break;case 2:if(G=this.productions_[K[1]][1],Q.$=E[E.length-G],Q._$={first_line:h[h.length-(G||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(G||1)].first_column,last_column:h[h.length-1].last_column},De&&(Q._$.range=[h[h.length-(G||1)].range[0],h[h.length-1].range[1]]),yt=this.performAction.apply(Q,[f,q,R,Z.yy,K[1],E,h].concat(pt)),typeof yt<"u")return yt;G&&(b=b.slice(0,-1*G*2),E=E.slice(0,-1*G),h=h.slice(0,-1*G)),b.push(this.productions_[K[1]][0]),E.push(Q.$),h.push(Q._$),zt=W[b[b.length-2]][b[b.length-1]],b.push(zt);break;case 3:return!0}}return!0},"parse")},D=(function(){var T={EOF:1,parseError:g(function(u,b){if(this.yy.parser)this.yy.parser.parseError(u,b);else throw new Error(u)},"parseError"),setInput:g(function(w,u){return this.yy=u||this.yy||{},this._input=w,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:g(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var u=w.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w},"input"),unput:g(function(w){var u=w.length,b=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;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),b.length-1&&(this.yylineno-=b.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:b?(b.length===S.length?this.yylloc.first_column:0)+S[S.length-b.length].length-b[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(w){this.unput(this.match.slice(w))},"less"),pastInput:g(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var w=this.pastInput(),u=new Array(w.length+1).join("-");return w+this.upcomingInput()+`
5
+ `+u+"^"},"showPosition"),test_match:g(function(w,u){var b,S,E;if(this.options.backtrack_lexer&&(E={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(E.yylloc.range=this.yylloc.range.slice(0))),S=w[0].match(/(?:\r\n?|\n).*/g),S&&(this.yylineno+=S.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:S?S[S.length-1].length-S[S.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+w[0].length},this.yytext+=w[0],this.match+=w[0],this.matches=w,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(w[0].length),this.matched+=w[0],b=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),b)return b;if(this._backtrack){for(var h in E)this[h]=E[h];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var w,u,b,S;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),h=0;h<E.length;h++)if(b=this._input.match(this.rules[E[h]]),b&&(!u||b[0].length>u[0].length)){if(u=b,S=h,this.options.backtrack_lexer){if(w=this.test_match(b,E[h]),w!==!1)return w;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(w=this.test_match(u,E[S]),w!==!1?w:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var u=this.next();return u||this.lex()},"lex"),begin:g(function(u){this.conditionStack.push(u)},"begin"),popState:g(function(){var u=this.conditionStack.length-1;return u>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:g(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:g(function(u){this.begin(u)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:g(function(u,b,S,E){var h=E;switch(S){case 0:return u.getLogger().debug("Found block-beta"),10;break;case 1:return u.getLogger().debug("Found id-block"),29;break;case 2:return u.getLogger().debug("Found block"),10;break;case 3:u.getLogger().debug(".",b.yytext);break;case 4:u.getLogger().debug("_",b.yytext);break;case 5:return 5;case 6:return b.yytext=-1,28;break;case 7:return b.yytext=b.yytext.replace(/columns\s+/,""),u.getLogger().debug("COLUMNS (LEX)",b.yytext),28;break;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:u.getLogger().debug("LEX: POPPING STR:",b.yytext),this.popState();break;case 13:return u.getLogger().debug("LEX: STR end:",b.yytext),"STR";break;case 14:return b.yytext=b.yytext.replace(/space\:/,""),u.getLogger().debug("SPACE NUM (LEX)",b.yytext),21;break;case 15:return b.yytext="1",u.getLogger().debug("COLUMNS (LEX)",b.yytext),21;break;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;break;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 21:return this.popState(),this.pushState("CLASSDEFID"),40;break;case 22:return this.popState(),41;break;case 23:return this.pushState("CLASS"),43;break;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;break;case 25:return this.popState(),45;break;case 26:return this.pushState("STYLE_STMNT"),46;break;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;break;case 28:return this.popState(),48;break;case 29:return this.pushState("acc_title"),"acc_title";break;case 30:return this.popState(),"acc_title_value";break;case 31:return this.pushState("acc_descr"),"acc_descr";break;case 32:return this.popState(),"acc_descr_value";break;case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),u.getLogger().debug("Lex: (("),"NODE_DEND";break;case 38:return this.popState(),u.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),u.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 40:return this.popState(),u.getLogger().debug("Lex: (("),"NODE_DEND";break;case 41:return this.popState(),u.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),u.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 43:return this.popState(),u.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 44:return this.popState(),u.getLogger().debug("Lex: (("),"NODE_DEND";break;case 45:return this.popState(),u.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 46:return this.popState(),u.getLogger().debug("Lex: ("),"NODE_DEND";break;case 47:return this.popState(),u.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 48:return this.popState(),u.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 49:return this.popState(),u.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),u.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 51:return this.popState(),u.getLogger().debug("Lex: )"),"NODE_DEND";break;case 52:return this.popState(),u.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 53:return this.popState(),u.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 54:return u.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;break;case 55:return u.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;break;case 56:return u.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;break;case 57:return u.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 58:return u.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;break;case 59:return u.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 60:return u.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 61:return u.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 62:return u.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;break;case 63:return u.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;break;case 64:return u.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 65:return this.pushState("NODE"),35;break;case 66:return this.pushState("NODE"),35;break;case 67:return this.pushState("NODE"),35;break;case 68:return this.pushState("NODE"),35;break;case 69:return this.pushState("NODE"),35;break;case 70:return this.pushState("NODE"),35;break;case 71:return this.pushState("NODE"),35;break;case 72:return u.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;break;case 73:return this.pushState("BLOCK_ARROW"),u.getLogger().debug("LEX ARR START"),37;break;case 74:return u.getLogger().debug("Lex: NODE_ID",b.yytext),31;break;case 75:return u.getLogger().debug("Lex: EOF",b.yytext),8;break;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:u.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:u.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return u.getLogger().debug("LEX: NODE_DESCR:",b.yytext),"NODE_DESCR";break;case 83:u.getLogger().debug("LEX POPPING"),this.popState();break;case 84:u.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return b.yytext=b.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (right): dir:",b.yytext),"DIR";break;case 86:return b.yytext=b.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (left):",b.yytext),"DIR";break;case 87:return b.yytext=b.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (x):",b.yytext),"DIR";break;case 88:return b.yytext=b.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (y):",b.yytext),"DIR";break;case 89:return b.yytext=b.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (up):",b.yytext),"DIR";break;case 90:return b.yytext=b.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (down):",b.yytext),"DIR";break;case 91:return b.yytext="]>",u.getLogger().debug("Lex (ARROW_DIR end):",b.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 92:return u.getLogger().debug("Lex: LINK","#"+b.yytext+"#"),15;break;case 93:return u.getLogger().debug("Lex: LINK",b.yytext),15;break;case 94:return u.getLogger().debug("Lex: LINK",b.yytext),15;break;case 95:return u.getLogger().debug("Lex: LINK",b.yytext),15;break;case 96:return u.getLogger().debug("Lex: START_LINK",b.yytext),this.pushState("LLABEL"),16;break;case 97:return u.getLogger().debug("Lex: START_LINK",b.yytext),this.pushState("LLABEL"),16;break;case 98:return u.getLogger().debug("Lex: START_LINK",b.yytext),this.pushState("LLABEL"),16;break;case 99:this.pushState("md_string");break;case 100:return u.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 101:return this.popState(),u.getLogger().debug("Lex: LINK","#"+b.yytext+"#"),15;break;case 102:return this.popState(),u.getLogger().debug("Lex: LINK",b.yytext),15;break;case 103:return this.popState(),u.getLogger().debug("Lex: LINK",b.yytext),15;break;case 104:return u.getLogger().debug("Lex: COLON",b.yytext),b.yytext=b.yytext.slice(1),27;break}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return T})();k.lexer=D;function N(){this.yy={}}return g(N,"Parser"),N.prototype=k,k.Parser=N,new N})();Lt.parser=Lt;var Be=Lt,X=new Map,Tt=[],vt=new Map,Jt="color",Qt="fill",Ie="bgFill",ne=",",Ne=C(),ot=new Map,Bt="",Ce=g(e=>Pt.sanitizeText(e,Ne),"sanitizeText"),Oe=g(function(e,t=""){let a=ot.get(e);a||(a={id:e,styles:[],textStyles:[]},ot.set(e,a)),t?.split(ne).forEach(n=>{let s=n.replace(/([^;]*);/,"$1").trim();if(RegExp(Jt).exec(n)){let r=s.replace(Qt,Ie).replace(Jt,Qt);a.textStyles.push(r)}a.styles.push(s)})},"addStyleClass"),Re=g(function(e,t=""){let a=X.get(e);t!=null&&(a.styles=t.split(ne))},"addStyle2Node"),ze=g(function(e,t){e.split(",").forEach(function(a){let n=X.get(a);if(n===void 0){let s=a.trim();n={id:s,type:"na",children:[]},X.set(s,n)}n.classes||(n.classes=[]),n.classes.push(t)})},"setCssClass"),le=g((e,t)=>{let a=e.flat(),n=[],l=a.find(r=>r?.type==="column-setting")?.columns??-1;for(let r of a){if(typeof l=="number"&&l>0&&r.type!=="column-setting"&&typeof r.widthInColumns=="number"&&r.widthInColumns>l&&L.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${l}`),r.label&&(r.label=Ce(r.label)),r.type==="classDef"){Oe(r.id,r.css);continue}if(r.type==="applyClass"){ze(r.id,r?.styleClass??"");continue}if(r.type==="applyStyles"){r?.stylesStr&&Re(r.id,r?.stylesStr);continue}if(r.type==="column-setting")t.columns=r.columns??-1;else if(r.type==="edge"){let i=(vt.get(r.id)??0)+1;vt.set(r.id,i),r.id=i+"-"+r.id,Tt.push(r)}else{r.label||(r.type==="composite"?r.label="":r.label=r.id);let i=X.get(r.id);if(i===void 0?X.set(r.id,r):(r.type!=="na"&&(i.type=r.type),r.label!==r.id&&(i.label=r.label)),r.children&&le(r.children,r),r.type==="space"){let c=r.width??1;for(let d=0;d<c;d++){let o=Xt(r);o.id=o.id+"-"+d,X.set(o.id,o),n.push(o)}}else i===void 0&&n.push(r)}}t.children=n},"populateBlockDatabase"),It=[],at={id:"root",type:"composite",children:[],columns:-1},Ae=g(()=>{L.debug("Clear called"),Yt(),at={id:"root",type:"composite",children:[],columns:-1},X=new Map([["root",at]]),It=[],ot=new Map,Tt=[],vt=new Map,Bt=""},"clear");function ce(e){switch(L.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return L.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}g(ce,"typeStr2Type");function oe(e){return L.debug("typeStr2Type",e),e==="=="?"thick":"normal"}g(oe,"edgeTypeStr2Type");function he(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}g(he,"edgeStrToEdgeData");function de(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}g(de,"edgeStrToEdgeStartData");function ge(e){return e.includes("==")?"thick":"normal"}g(ge,"edgeStrToThickness");function ue(e){return e.includes(".-")?"dotted":"solid"}g(ue,"edgeStrToPattern");var $t=0,Me=g(()=>($t++,"id-"+Math.random().toString(36).substr(2,12)+"-"+$t),"generateId"),Fe=g(e=>{at.children=e,le(e,at),It=at.children},"setHierarchy"),Pe=g(e=>{let t=X.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),We=g(()=>[...X.values()],"getBlocksFlat"),Ye=g(()=>It||[],"getBlocks"),He=g(()=>Tt,"getEdges"),Ke=g(e=>X.get(e),"getBlock"),Ue=g(e=>{X.set(e.id,e)},"setBlock"),Xe=g(e=>{Bt=e},"setDiagramId"),je=g(()=>Bt,"getDiagramId"),Ve=g(()=>L,"getLogger"),Ze=g(function(){return ot},"getClasses"),Ge={getConfig:g(()=>$().block,"getConfig"),typeStr2Type:ce,edgeTypeStr2Type:oe,edgeStrToEdgeData:he,edgeStrToEdgeStartData:de,edgeStrToThickness:ge,edgeStrToPattern:ue,getLogger:Ve,getBlocksFlat:We,getBlocks:Ye,getEdges:He,setHierarchy:Fe,getBlock:Ke,setBlock:Ue,getColumns:Pe,getClasses:Ze,clear:Ae,generateId:Me,setDiagramId:Xe,getDiagramId:je},qe=Ge,St=g((e,t)=>{let a=Mt,n=a(e,"r"),s=a(e,"g"),l=a(e,"b");return At(n,s,l,t)},"fade"),Je=g(e=>`.label {
7
+ font-family: ${e.fontFamily};
8
+ color: ${e.nodeTextColor||e.textColor};
9
+ }
10
+ .cluster-label text {
11
+ fill: ${e.titleColor};
12
+ }
13
+ .cluster-label span,p {
14
+ color: ${e.titleColor};
15
+ }
16
+
17
+
18
+
19
+ .label text,span,p {
20
+ fill: ${e.nodeTextColor||e.textColor};
21
+ color: ${e.nodeTextColor||e.textColor};
22
+ }
23
+
24
+ .node rect,
25
+ .node circle,
26
+ .node ellipse,
27
+ .node polygon,
28
+ .node path {
29
+ fill: ${e.mainBkg};
30
+ stroke: ${e.nodeBorder};
31
+ stroke-width: 1px;
32
+ }
33
+ .flowchart-label text {
34
+ text-anchor: middle;
35
+ }
36
+ // .flowchart-label .text-outer-tspan {
37
+ // text-anchor: middle;
38
+ // }
39
+ // .flowchart-label .text-inner-tspan {
40
+ // text-anchor: start;
41
+ // }
42
+
43
+ .node .label {
44
+ text-align: center;
45
+ }
46
+ .node.clickable {
47
+ cursor: pointer;
48
+ }
49
+
50
+ .arrowheadPath {
51
+ fill: ${e.arrowheadColor};
52
+ }
53
+
54
+ .edgePath .path {
55
+ stroke: ${e.lineColor};
56
+ stroke-width: 2.0px;
57
+ }
58
+
59
+ .flowchart-link {
60
+ stroke: ${e.lineColor};
61
+ fill: none;
62
+ }
63
+
64
+ .edgeLabel {
65
+ background-color: ${e.edgeLabelBackground};
66
+ /*
67
+ * This is for backward compatibility with existing code that didn't
68
+ * add a \`<p>\` around edge labels.
69
+ *
70
+ * TODO: We should probably remove this in a future release.
71
+ */
72
+ p {
73
+ margin: 0;
74
+ padding: 0;
75
+ display: inline;
76
+ }
77
+ rect {
78
+ opacity: 0.5;
79
+ background-color: ${e.edgeLabelBackground};
80
+ fill: ${e.edgeLabelBackground};
81
+ }
82
+ text-align: center;
83
+ }
84
+
85
+ /* For html labels only */
86
+ .labelBkg {
87
+ background-color: ${e.edgeLabelBackground};
88
+ }
89
+
90
+ .node .cluster {
91
+ // fill: ${St(e.mainBkg,.5)};
92
+ fill: ${St(e.clusterBkg,.5)};
93
+ stroke: ${St(e.clusterBorder,.2)};
94
+ box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
95
+ stroke-width: 1px;
96
+ }
97
+
98
+ .cluster text {
99
+ fill: ${e.titleColor};
100
+ }
101
+
102
+ .cluster span,p {
103
+ color: ${e.titleColor};
104
+ }
105
+ /* .cluster div {
106
+ color: ${e.titleColor};
107
+ } */
108
+
109
+ div.mermaidTooltip {
110
+ position: absolute;
111
+ text-align: center;
112
+ max-width: 200px;
113
+ padding: 2px;
114
+ font-family: ${e.fontFamily};
115
+ font-size: 12px;
116
+ background: ${e.tertiaryColor};
117
+ border: 1px solid ${e.border2};
118
+ border-radius: 2px;
119
+ pointer-events: none;
120
+ z-index: 100;
121
+ }
122
+
123
+ .flowchartTitleText {
124
+ text-anchor: middle;
125
+ font-size: 18px;
126
+ fill: ${e.textColor};
127
+ }
128
+ ${qt()}
129
+ `,"getStyles"),Qe=Je,$e=g((e,t,a,n)=>{t.forEach(s=>{or[s](e,a,n)})},"insertMarkers"),tr=g((e,t,a)=>{L.trace("Making markers for ",a),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),er=g((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),rr=g((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),ar=g((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),sr=g((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),ir=g((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),nr=g((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),lr=g((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),cr=g((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),or={extension:tr,composition:er,aggregation:rr,dependency:ar,lollipop:sr,point:ir,circle:nr,cross:lr,barb:cr},hr=$e,O=C()?.block?.padding??8;function Et(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};let a=t%e,n=Math.floor(t/e);return{px:a,py:n}}g(Et,"calculateBlockPosition");var dr=g(e=>{let t=0,a=0;for(let n of e.children){let{width:s,height:l,x:r,y:i}=n.size??{width:0,height:0,x:0,y:0};if(L.debug("getMaxChildSize abc95 child:",n.id,"width:",s,"height:",l,"x:",r,"y:",i,n.type),n.type==="space")continue;let c=s/(n.widthInColumns??1);c>t&&(t=c),l>a&&(a=l)}return{width:t,height:a}},"getMaxChildSize");function ht(e,t,a=0,n=0){L.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",a),e?.size?.width||(e.size={width:a,height:n,x:0,y:0});let s=0,l=0;if(e.children?.length>0){for(let x of e.children)ht(x,t);let r=dr(e);s=r.width,l=r.height,L.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",s,l);for(let x of e.children)x.size&&(L.debug(`abc95 Setting size of children of ${e.id} id=${x.id} ${s} ${l} ${JSON.stringify(x.size)}`),x.size.width=s*(x.widthInColumns??1)+O*((x.widthInColumns??1)-1),x.size.height=l,x.size.x=0,x.size.y=0,L.debug(`abc95 updating size of ${e.id} children child:${x.id} maxWidth:${s} maxHeight:${l}`));for(let x of e.children)ht(x,t,s,l);let i=e.columns??-1,c=0;for(let x of e.children)c+=x.widthInColumns??1;let d=e.children.length;i>0&&i<c&&(d=i);let o=Math.ceil(c/d),p=d*(s+O)+O,y=o*(l+O)+O;if(p<a){L.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${a} siblingHeight ${n} width ${p}`),p=a,y=n;let x=(a-d*O-O)/d,m=(n-o*O-O)/o;L.debug("Size indata abc88",e.id,"childWidth",x,"maxWidth",s),L.debug("Size indata abc88",e.id,"childHeight",m,"maxHeight",l),L.debug("Size indata abc88 xSize",d,"padding",O);for(let v of e.children)v.size&&(v.size.width=x,v.size.height=m,v.size.x=0,v.size.y=0)}if(L.debug(`abc95 (finale calc) ${e.id} xSize ${d} ySize ${o} columns ${i}${e.children.length} width=${Math.max(p,e.size?.width||0)}`),p<(e?.size?.width||0)){p=e?.size?.width||0;let x=i>0?Math.min(e.children.length,i):e.children.length;if(x>0){let m=(p-x*O-O)/x;L.debug("abc95 (growing to fit) width",e.id,p,e.size?.width,m);for(let v of e.children)v.size&&(v.size.width=m)}}e.size={width:p,height:y,x:0,y:0}}L.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}g(ht,"setBlockSizes");function Nt(e,t){L.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let a=e.columns??-1;if(L.debug("layoutBlocks columns abc95",e.id,"=>",a,e),e.children&&e.children.length>0){let n=e?.children[0]?.size?.width??0,s=e.children.length*n+(e.children.length-1)*O;L.debug("widthOfChildren 88",s,"posX");let l=new Map;{let o=0;for(let p of e.children){if(!p.size)continue;let{py:y}=Et(a,o),x=l.get(y)??0;p.size.height>x&&l.set(y,p.size.height);let m=p?.widthInColumns??1;a>0&&(m=Math.min(m,a-o%a)),o+=m}}let r=new Map;{let o=0,p=[...l.keys()].sort((y,x)=>y-x);for(let y of p)r.set(y,o),o+=(l.get(y)??0)+O}let i=0;L.debug("abc91 block?.size?.x",e.id,e?.size?.x);let c=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-O,d=0;for(let o of e.children){let p=e;if(!o.size)continue;let{width:y,height:x}=o.size,{px:m,py:v}=Et(a,i);if(v!=d&&(d=v,c=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-O,L.debug("New row in layout for block",e.id," and child ",o.id,d)),L.debug(`abc89 layout blocks (child) id: ${o.id} Pos: ${i} (px, py) ${m},${v} (${p?.size?.x},${p?.size?.y}) parent: ${p.id} width: ${y}${O}`),p.size){let D=y/2;o.size.x=c+O+D,L.debug(`abc91 layout blocks (calc) px, pyid:${o.id} startingPos=X${c} new startingPosX${o.size.x} ${D} padding=${O} width=${y} halfWidth=${D} => x:${o.size.x} y:${o.size.y} ${o.widthInColumns} (width * (child?.w || 1)) / 2 ${y*(o?.widthInColumns??1)/2}`),c=o.size.x+D;let N=r.get(v)??0,T=l.get(v)??x;o.size.y=p.size.y-p.size.height/2+N+T/2+O,L.debug(`abc88 layout blocks (calc) px, pyid:${o.id}startingPosX${c}${O}${D}=>x:${o.size.x}y:${o.size.y}${o.widthInColumns}(width * (child?.w || 1)) / 2${y*(o?.widthInColumns??1)/2}`)}o.children&&Nt(o,t);let k=o?.widthInColumns??1;a>0&&(k=Math.min(k,a-i%a)),i+=k,L.debug("abc88 columnsPos",o,i)}}L.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}g(Nt,"layoutBlocks");function Ct(e,{minX:t,minY:a,maxX:n,maxY:s}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){let{x:l,y:r,width:i,height:c}=e.size;l-i/2<t&&(t=l-i/2),r-c/2<a&&(a=r-c/2),l+i/2>n&&(n=l+i/2),r+c/2>s&&(s=r+c/2)}if(e.children)for(let l of e.children)({minX:t,minY:a,maxX:n,maxY:s}=Ct(l,{minX:t,minY:a,maxX:n,maxY:s}));return{minX:t,minY:a,maxX:n,maxY:s}}g(Ct,"findBounds");function pe(e){let t=e.getBlock("root");if(!t)return;ht(t,e,0,0),Nt(t,e),L.debug("getBlocks",JSON.stringify(t,null,2));let{minX:a,minY:n,maxX:s,maxY:l}=Ct(t),r=l-n,i=s-a;return{x:a,y:n,width:i,height:r}}g(pe,"layout");var gr=g(async(e,t,a,n=!1,s=!1)=>{let l=t||"";typeof l=="object"&&(l=l[0]);let r=C(),i=M(r);return await lt(e,l,{style:a,isTitle:n,useHtmlLabels:i,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},r)},"createLabel"),U=gr,ur=g((e,t,a,n,s)=>{t.arrowTypeStart&&te(e,"start",t.arrowTypeStart,a,n,s),t.arrowTypeEnd&&te(e,"end",t.arrowTypeEnd,a,n,s)},"addEdgeMarkers"),pr={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},te=g((e,t,a,n,s,l)=>{let r=pr[a];if(!r){L.warn(`Unknown arrow type: ${a}`);return}let i=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${n}#${s}_${l}-${r}${i})`)},"addEdgeMarker"),_t={},F={},fr=g(async(e,t)=>{let a=C(),n=M(a),s=e.insert("g").attr("class","edgeLabel"),l=s.insert("g").attr("class","label"),r=t.labelType==="markdown",i=await lt(e,t.label,{style:t.labelStyle,useHtmlLabels:n,addSvgBackground:r,isNode:!1,markdown:r,width:r?void 0:Number.POSITIVE_INFINITY},a);l.node().appendChild(i);let c=i.getBBox(),d=c;if(n){let p=i.children[0],y=_(i);c=p.getBoundingClientRect(),d=c,y.attr("width",c.width),y.attr("height",c.height)}else{let p=_(i).select("text").node();p&&typeof p.getBBox=="function"&&(d=p.getBBox())}l.attr("transform",tt(d,n)),_t[t.id]=s,t.width=c.width,t.height=c.height;let o;if(t.startLabelLeft){let p=e.insert("g").attr("class","edgeTerminals"),y=p.insert("g").attr("class","inner"),x=await U(y,t.startLabelLeft,t.labelStyle);o=x;let m=x.getBBox();if(n){let v=x.children[0],k=_(x);m=v.getBoundingClientRect(),k.attr("width",m.width),k.attr("height",m.height)}y.attr("transform",tt(m,n)),F[t.id]||(F[t.id]={}),F[t.id].startLeft=p,rt(o,t.startLabelLeft)}if(t.startLabelRight){let p=e.insert("g").attr("class","edgeTerminals"),y=p.insert("g").attr("class","inner"),x=await U(y,t.startLabelRight,t.labelStyle);o=x;let m=x.getBBox();if(n){let v=x.children[0],k=_(x);m=v.getBoundingClientRect(),k.attr("width",m.width),k.attr("height",m.height)}y.attr("transform",tt(m,n)),F[t.id]||(F[t.id]={}),F[t.id].startRight=p,rt(o,t.startLabelRight)}if(t.endLabelLeft){let p=e.insert("g").attr("class","edgeTerminals"),y=p.insert("g").attr("class","inner"),x=await U(p,t.endLabelLeft,t.labelStyle);o=x;let m=x.getBBox();if(n){let v=x.children[0],k=_(x);m=v.getBoundingClientRect(),k.attr("width",m.width),k.attr("height",m.height)}y.attr("transform",tt(m,n)),F[t.id]||(F[t.id]={}),F[t.id].endLeft=p,rt(o,t.endLabelLeft)}if(t.endLabelRight){let p=e.insert("g").attr("class","edgeTerminals"),y=p.insert("g").attr("class","inner"),x=await U(p,t.endLabelRight,t.labelStyle);o=x;let m=x.getBBox();if(n){let v=x.children[0],k=_(x);m=v.getBoundingClientRect(),k.attr("width",m.width),k.attr("height",m.height)}y.attr("transform",tt(m,n)),F[t.id]||(F[t.id]={}),F[t.id].endRight=p,rt(o,t.endLabelRight)}return i},"insertEdgeLabel");function rt(e,t){M(C())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}g(rt,"setTerminalWidth");var xr=g((e,t)=>{L.debug("Moving label abc88 ",e.id,e.label,_t[e.id],t);let a=t.updatedPath?t.updatedPath:t.originalPath,n=C(),{subGraphTitleTotalMargin:s}=Vt(n);if(e.label){let l=_t[e.id],r=e.x,i=e.y;if(a){let c=et.calcLabelPosition(a);L.debug("Moving label "+e.label+" from (",r,",",i,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(r=c.x,i=c.y)}l.attr("transform",`translate(${r}, ${i+s/2})`)}if(e.startLabelLeft){let l=F[e.id].startLeft,r=e.x,i=e.y;if(a){let c=et.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",a);r=c.x,i=c.y}l.attr("transform",`translate(${r}, ${i})`)}if(e.startLabelRight){let l=F[e.id].startRight,r=e.x,i=e.y;if(a){let c=et.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",a);r=c.x,i=c.y}l.attr("transform",`translate(${r}, ${i})`)}if(e.endLabelLeft){let l=F[e.id].endLeft,r=e.x,i=e.y;if(a){let c=et.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",a);r=c.x,i=c.y}l.attr("transform",`translate(${r}, ${i})`)}if(e.endLabelRight){let l=F[e.id].endRight,r=e.x,i=e.y;if(a){let c=et.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",a);r=c.x,i=c.y}l.attr("transform",`translate(${r}, ${i})`)}},"positionEdgeLabel"),br=g((e,t)=>{let a=e.x,n=e.y,s=Math.abs(t.x-a),l=Math.abs(t.y-n),r=e.width/2,i=e.height/2;return s>=r||l>=i},"outsideNode"),yr=g((e,t,a)=>{L.debug(`intersection calc abc89:
130
+ outsidePoint: ${JSON.stringify(t)}
131
+ insidePoint : ${JSON.stringify(a)}
132
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let n=e.x,s=e.y,l=Math.abs(n-a.x),r=e.width/2,i=a.x<t.x?r-l:r+l,c=e.height/2,d=Math.abs(t.y-a.y),o=Math.abs(t.x-a.x);if(Math.abs(s-t.y)*r>Math.abs(n-t.x)*c){let p=a.y<t.y?t.y-c-s:s-c-t.y;i=o*p/d;let y={x:a.x<t.x?a.x+i:a.x-o+i,y:a.y<t.y?a.y+d-p:a.y-d+p};return i===0&&(y.x=t.x,y.y=t.y),o===0&&(y.x=t.x),d===0&&(y.y=t.y),L.debug(`abc89 topp/bott calc, Q ${d}, q ${p}, R ${o}, r ${i}`,y),y}else{a.x<t.x?i=t.x-r-n:i=n-r-t.x;let p=d*i/o,y=a.x<t.x?a.x+o-i:a.x-o+i,x=a.y<t.y?a.y+p:a.y-p;return L.debug(`sides calc abc89, Q ${d}, q ${p}, R ${o}, r ${i}`,{_x:y,_y:x}),i===0&&(y=t.x,x=t.y),o===0&&(y=t.x),d===0&&(x=t.y),{x:y,y:x}}},"intersection"),ee=g((e,t)=>{L.debug("abc88 cutPathAtIntersect",e,t);let a=[],n=e[0],s=!1;return e.forEach(l=>{if(!br(t,l)&&!s){let r=yr(t,n,l),i=!1;a.forEach(c=>{i=i||c.x===r.x&&c.y===r.y}),a.some(c=>c.x===r.x&&c.y===r.y)||a.push(r),s=!0}else n=l,s||a.push(l)}),a},"cutPathAtIntersect"),mr=g(function(e,t,a,n,s,l,r){let i=a.points;L.debug("abc88 InsertEdge: edge=",a,"e=",t);let c=!1,d=l.node(t.v);var o=l.node(t.w);o?.intersect&&d?.intersect&&(i=i.slice(1,a.points.length-1),i.unshift(d.intersect(i[0])),i.push(o.intersect(i[i.length-1]))),a.toCluster&&(L.debug("to cluster abc88",n[a.toCluster]),i=ee(a.points,n[a.toCluster].node),c=!0),a.fromCluster&&(L.debug("from cluster abc88",n[a.fromCluster]),i=ee(i.reverse(),n[a.fromCluster].node).reverse(),c=!0);let p=i.filter(w=>!Number.isNaN(w.y)),y=Kt;a.curve&&(s==="graph"||s==="flowchart")&&(y=a.curve);let{x,y:m}=Ut(a),v=Ht().x(x).y(m).curve(y),k;switch(a.thickness){case"normal":k="edge-thickness-normal";break;case"thick":k="edge-thickness-thick";break;case"invisible":k="edge-thickness-thick";break;default:k=""}switch(a.pattern){case"solid":k+=" edge-pattern-solid";break;case"dotted":k+=" edge-pattern-dotted";break;case"dashed":k+=" edge-pattern-dashed";break}let D=e.append("path").attr("d",v(p)).attr("id",a.id).attr("class"," "+k+(a.classes?" "+a.classes:"")).attr("style",a.style),N="";(C().flowchart.arrowMarkerAbsolute||C().state.arrowMarkerAbsolute)&&(N=Ft(!0)),ur(D,a,N,r,s);let T={};return c&&(T.updatedPath=i),T.originalPath=a.points,T},"insertEdge"),wr=g(e=>{let t=new Set;for(let a of e)switch(a){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(a);break}return t},"expandAndDeduplicateDirections"),kr=g((e,t,a,n)=>{let s=wr(e),l=2,r=t.height+2*a.padding,i=r/l,c=n??t.width+2*i+a.padding,d=a.padding/2;return s.has("right")&&s.has("left")&&s.has("up")&&s.has("down")?[{x:0,y:0},{x:i,y:0},{x:c/2,y:2*d},{x:c-i,y:0},{x:c,y:0},{x:c,y:-r/3},{x:c+2*d,y:-r/2},{x:c,y:-2*r/3},{x:c,y:-r},{x:c-i,y:-r},{x:c/2,y:-r-2*d},{x:i,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*d,y:-r/2},{x:0,y:-r/3}]:s.has("right")&&s.has("left")&&s.has("up")?[{x:i,y:0},{x:c-i,y:0},{x:c,y:-r/2},{x:c-i,y:-r},{x:i,y:-r},{x:0,y:-r/2}]:s.has("right")&&s.has("left")&&s.has("down")?[{x:0,y:0},{x:i,y:-r},{x:c-i,y:-r},{x:c,y:0}]:s.has("right")&&s.has("up")&&s.has("down")?[{x:0,y:0},{x:c,y:-i},{x:c,y:-r+i},{x:0,y:-r}]:s.has("left")&&s.has("up")&&s.has("down")?[{x:c,y:0},{x:0,y:-i},{x:0,y:-r+i},{x:c,y:-r}]:s.has("right")&&s.has("left")?[{x:i,y:0},{x:i,y:-d},{x:c-i,y:-d},{x:c-i,y:0},{x:c,y:-r/2},{x:c-i,y:-r},{x:c-i,y:-r+d},{x:i,y:-r+d},{x:i,y:-r},{x:0,y:-r/2}]:s.has("up")&&s.has("down")?[{x:c/2,y:0},{x:0,y:-d},{x:i,y:-d},{x:i,y:-r+d},{x:0,y:-r+d},{x:c/2,y:-r},{x:c,y:-r+d},{x:c-i,y:-r+d},{x:c-i,y:-d},{x:c,y:-d}]:s.has("right")&&s.has("up")?[{x:0,y:0},{x:c,y:-i},{x:0,y:-r}]:s.has("right")&&s.has("down")?[{x:0,y:0},{x:c,y:0},{x:0,y:-r}]:s.has("left")&&s.has("up")?[{x:c,y:0},{x:0,y:-i},{x:c,y:-r}]:s.has("left")&&s.has("down")?[{x:c,y:0},{x:0,y:0},{x:c,y:-r}]:s.has("right")?[{x:i,y:-d},{x:i,y:-d},{x:c-i,y:-d},{x:c-i,y:0},{x:c,y:-r/2},{x:c-i,y:-r},{x:c-i,y:-r+d},{x:i,y:-r+d},{x:i,y:-r+d}]:s.has("left")?[{x:i,y:0},{x:i,y:-d},{x:c-i,y:-d},{x:c-i,y:-r+d},{x:i,y:-r+d},{x:i,y:-r},{x:0,y:-r/2}]:s.has("up")?[{x:i,y:-d},{x:i,y:-r+d},{x:0,y:-r+d},{x:c/2,y:-r},{x:c,y:-r+d},{x:c-i,y:-r+d},{x:c-i,y:-d}]:s.has("down")?[{x:c/2,y:0},{x:0,y:-d},{x:i,y:-d},{x:i,y:-r+d},{x:c-i,y:-r+d},{x:c-i,y:-d},{x:c,y:-d}]:[{x:0,y:0}]},"getArrowPoints");function fe(e,t){return e.intersect(t)}g(fe,"intersectNode");var Sr=fe;function xe(e,t,a,n){var s=e.x,l=e.y,r=s-n.x,i=l-n.y,c=Math.sqrt(t*t*i*i+a*a*r*r),d=Math.abs(t*a*r/c);n.x<s&&(d=-d);var o=Math.abs(t*a*i/c);return n.y<l&&(o=-o),{x:s+d,y:l+o}}g(xe,"intersectEllipse");var be=xe;function ye(e,t,a){return be(e,t,t,a)}g(ye,"intersectCircle");var Lr=ye;function me(e,t,a,n){var s,l,r,i,c,d,o,p,y,x,m,v,k,D,N;if(s=t.y-e.y,r=e.x-t.x,c=t.x*e.y-e.x*t.y,y=s*a.x+r*a.y+c,x=s*n.x+r*n.y+c,!(y!==0&&x!==0&&Dt(y,x))&&(l=n.y-a.y,i=a.x-n.x,d=n.x*a.y-a.x*n.y,o=l*e.x+i*e.y+d,p=l*t.x+i*t.y+d,!(o!==0&&p!==0&&Dt(o,p))&&(m=s*i-l*r,m!==0)))return v=Math.abs(m/2),k=r*d-i*c,D=k<0?(k-v)/m:(k+v)/m,k=l*c-s*d,N=k<0?(k-v)/m:(k+v)/m,{x:D,y:N}}g(me,"intersectLine");function Dt(e,t){return e*t>0}g(Dt,"sameSign");var vr=me,Er=we;function we(e,t,a){var n=e.x,s=e.y,l=[],r=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(m){r=Math.min(r,m.x),i=Math.min(i,m.y)}):(r=Math.min(r,t.x),i=Math.min(i,t.y));for(var c=n-e.width/2-r,d=s-e.height/2-i,o=0;o<t.length;o++){var p=t[o],y=t[o<t.length-1?o+1:0],x=vr(e,a,{x:c+p.x,y:d+p.y},{x:c+y.x,y:d+y.y});x&&l.push(x)}return l.length?(l.length>1&&l.sort(function(m,v){var k=m.x-a.x,D=m.y-a.y,N=Math.sqrt(k*k+D*D),T=v.x-a.x,w=v.y-a.y,u=Math.sqrt(T*T+w*w);return N<u?-1:N===u?0:1}),l[0]):e}g(we,"intersectPolygon");var _r=g((e,t)=>{var a=e.x,n=e.y,s=t.x-a,l=t.y-n,r=e.width/2,i=e.height/2,c,d;return Math.abs(l)*r>Math.abs(s)*i?(l<0&&(i=-i),c=l===0?0:i*s/l,d=i):(s<0&&(r=-r),c=r,d=s===0?0:r*l/s),{x:a+c,y:n+d}},"intersectRect"),Dr=_r,B={node:Sr,circle:Lr,ellipse:be,polygon:Er,rect:Dr},A=g(async(e,t,a,n)=>{let s=C(),l,r=t.useHtmlLabels||M(s);a?l=a:l="node default";let i=e.insert("g").attr("class",l).attr("id",t.domId||t.id),c=i.insert("g").attr("class","label").attr("style",t.labelStyle),d;t.labelText===void 0?d="":d=typeof t.labelText=="string"?t.labelText:t.labelText[0];let o;t.labelType==="markdown"?o=lt(c,wt(kt(d),s),{useHtmlLabels:r,width:t.width||s.flowchart.wrappingWidth,classes:"markdown-node-label"},s):o=await U(c,wt(kt(d),s),t.labelStyle,!1,n);let p=o.getBBox(),y=t.padding/2;if(M(s)){let x=o.children[0],m=_(o);await Zt(x,d),p=x.getBoundingClientRect(),m.attr("width",p.width),m.attr("height",p.height)}return r?c.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):c.attr("transform","translate(0, "+-p.height/2+")"),t.centerLabel&&c.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:i,bbox:p,halfPadding:y,label:c}},"labelHelper"),I=g((e,t)=>{let a=t.node().getBBox();e.width=a.width,e.height=a.height},"updateNodeBounds");function j(e,t,a,n){return e.insert("polygon",":first-child").attr("points",n.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+a/2+")")}g(j,"insertPolygonShape");var Tr=g(async(e,t)=>{t.useHtmlLabels||M(C())||(t.centerLabel=!0);let{shapeSvg:n,bbox:s,halfPadding:l}=await A(e,t,"node "+t.classes,!0);L.info("Classes = ",t.classes);let r=n.insert("rect",":first-child");return r.attr("rx",t.rx).attr("ry",t.ry).attr("x",-s.width/2-l).attr("y",-s.height/2-l).attr("width",s.width+t.padding).attr("height",s.height+t.padding),I(t,r),t.intersect=function(i){return B.rect(t,i)},n},"note"),Br=Tr,re=g(e=>e?" "+e:"","formatClass"),H=g((e,t)=>`${t||"node default"}${re(e.classes)} ${re(e.class)}`,"getClassesFromNode"),ae=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=s+l,i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}];L.info("Question main (Circle)");let c=j(a,r,r,i);return c.attr("style",t.style),I(t,c),t.intersect=function(d){return L.warn("Intersect called"),B.polygon(t,i,d)},a},"question"),Ir=g((e,t)=>{let a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=28,s=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return a.insert("polygon",":first-child").attr("points",s.map(function(r){return r.x+","+r.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(r){return B.circle(t,14,r)},a},"choice"),Nr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=4,l=t.positioned?t.height:n.height+t.padding,r=l/s,i=t.positioned?t.width:n.width+2*r+t.padding,c=[{x:r,y:0},{x:i-r,y:0},{x:i,y:-l/2},{x:i-r,y:-l},{x:r,y:-l},{x:0,y:-l/2}],d=j(a,i,l,c);return d.attr("style",t.style),I(t,d),t.intersect=function(o){return B.polygon(t,c,o)},a},"hexagon"),Cr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,void 0,!0),s=2,l=n.height+2*t.padding,r=l/s,i=n.width+2*r+t.padding,d=t.positioned&&(t.widthInColumns??1)>1&&t.width>i?t.width:i,o=kr(t.directions,n,t,d),p=j(a,d,l,o);return p.attr("style",t.style),I(t,p),t.intersect=function(y){return B.polygon(t,o,y)},a},"block_arrow"),Or=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:-l/2,y:0},{x:s,y:0},{x:s,y:-l},{x:-l/2,y:-l},{x:0,y:-l/2}];return j(a,s,l,r).attr("style",t.style),t.width=s+l,t.height=l,t.intersect=function(c){return B.polygon(t,r,c)},a},"rect_left_inv_arrow"),Rr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:-2*l/6,y:0},{x:s-l/6,y:0},{x:s+2*l/6,y:-l},{x:l/6,y:-l}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"lean_right"),zr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:2*l/6,y:0},{x:s+l/6,y:0},{x:s-2*l/6,y:-l},{x:-l/6,y:-l}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"lean_left"),Ar=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:-2*l/6,y:0},{x:s+2*l/6,y:0},{x:s-l/6,y:-l},{x:l/6,y:-l}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"trapezoid"),Mr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:l/6,y:0},{x:s-l/6,y:0},{x:s+2*l/6,y:-l},{x:-2*l/6,y:-l}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"inv_trapezoid"),Fr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:0,y:0},{x:s+l/2,y:0},{x:s,y:-l/2},{x:s+l/2,y:-l},{x:0,y:-l}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"rect_right_inv_arrow"),Pr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=s/2,r=l/(2.5+s/50),i=n.height+r+t.padding,c="M 0,"+r+" a "+l+","+r+" 0,0,0 "+s+" 0 a "+l+","+r+" 0,0,0 "+-s+" 0 l 0,"+i+" a "+l+","+r+" 0,0,0 "+s+" 0 l 0,"+-i,d=a.attr("label-offset-y",r).insert("path",":first-child").attr("style",t.style).attr("d",c).attr("transform","translate("+-s/2+","+-(i/2+r)+")");return I(t,d),t.intersect=function(o){let p=B.rect(t,o),y=p.x-t.x;if(l!=0&&(Math.abs(y)<t.width/2||Math.abs(y)==t.width/2&&Math.abs(p.y-t.y)>t.height/2-r)){let x=r*r*(1-y*y/(l*l));x!=0&&(x=Math.sqrt(x)),x=r-x,o.y-t.y>0&&(x=-x),p.y+=x}return p},a},"cylinder"),Wr=g(async(e,t)=>{let{shapeSvg:a,bbox:n,halfPadding:s}=await A(e,t,"node "+t.classes+" "+t.class,!0),l=a.insert("rect",":first-child"),r=t.positioned?t.width:n.width+t.padding,i=t.positioned?t.height:n.height+t.padding,c=t.positioned?-r/2:-n.width/2-s,d=t.positioned?-i/2:-n.height/2-s;if(l.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",d).attr("width",r).attr("height",i),t.props){let o=new Set(Object.keys(t.props));t.props.borders&&(dt(l,t.props.borders,r,i),o.delete("borders")),o.forEach(p=>{L.warn(`Unknown node property ${p}`)})}return I(t,l),t.intersect=function(o){return B.rect(t,o)},a},"rect"),Yr=g(async(e,t)=>{let{shapeSvg:a,bbox:n,halfPadding:s}=await A(e,t,"node "+t.classes,!0),l=a.insert("rect",":first-child"),r=t.positioned?t.width:n.width+t.padding,i=t.positioned?t.height:n.height+t.padding,c=t.positioned?-r/2:-n.width/2-s,d=t.positioned?-i/2:-n.height/2-s;if(l.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",d).attr("width",r).attr("height",i),t.props){let o=new Set(Object.keys(t.props));t.props.borders&&(dt(l,t.props.borders,r,i),o.delete("borders")),o.forEach(p=>{L.warn(`Unknown node property ${p}`)})}return I(t,l),t.intersect=function(o){return B.rect(t,o)},a},"composite"),Hr=g(async(e,t)=>{let{shapeSvg:a}=await A(e,t,"label",!0);L.trace("Classes = ",t.class);let n=a.insert("rect",":first-child"),s=0,l=0;if(n.attr("width",s).attr("height",l),a.attr("class","label edgeLabel"),t.props){let r=new Set(Object.keys(t.props));t.props.borders&&(dt(n,t.props.borders,s,l),r.delete("borders")),r.forEach(i=>{L.warn(`Unknown node property ${i}`)})}return I(t,n),t.intersect=function(r){return B.rect(t,r)},a},"labelRect");function dt(e,t,a,n){let s=[],l=g(i=>{s.push(i,0)},"addBorder"),r=g(i=>{s.push(0,i)},"skipBorder");t.includes("t")?(L.debug("add top border"),l(a)):r(a),t.includes("r")?(L.debug("add right border"),l(n)):r(n),t.includes("b")?(L.debug("add bottom border"),l(a)):r(a),t.includes("l")?(L.debug("add left border"),l(n)):r(n),e.attr("stroke-dasharray",s.join(" "))}g(dt,"applyNodePropertyBorders");var Kr=g(async(e,t)=>{let a;t.classes?a="node "+t.classes:a="node default";let n=e.insert("g").attr("class",a).attr("id",t.domId||t.id),s=n.insert("rect",":first-child"),l=n.insert("line"),r=n.insert("g").attr("class","label"),i=t.labelText.flat?t.labelText.flat():t.labelText,c="";typeof i=="object"?c=i[0]:c=i,L.info("Label text abc79",c,i,typeof i=="object");let d=await U(r,c,t.labelStyle,!0,!0),o={width:0,height:0};if(M(C())){let v=d.children[0],k=_(d);o=v.getBoundingClientRect(),k.attr("width",o.width),k.attr("height",o.height)}L.info("Text 2",i);let p=i.slice(1,i.length),y=d.getBBox(),x=await U(r,p.join?p.join("<br/>"):p,t.labelStyle,!0,!0);if(M(C())){let v=x.children[0],k=_(x);o=v.getBoundingClientRect(),k.attr("width",o.width),k.attr("height",o.height)}let m=t.padding/2;return _(x).attr("transform","translate( "+(o.width>y.width?0:(y.width-o.width)/2)+", "+(y.height+m+5)+")"),_(d).attr("transform","translate( "+(o.width<y.width?0:-(y.width-o.width)/2)+", 0)"),o=r.node().getBBox(),r.attr("transform","translate("+-o.width/2+", "+(-o.height/2-m+3)+")"),s.attr("class","outer title-state").attr("x",-o.width/2-m).attr("y",-o.height/2-m).attr("width",o.width+t.padding).attr("height",o.height+t.padding),l.attr("class","divider").attr("x1",-o.width/2-m).attr("x2",o.width/2+m).attr("y1",-o.height/2-m+y.height+m).attr("y2",-o.height/2-m+y.height+m),I(t,s),t.intersect=function(v){return B.rect(t,v)},n},"rectWithTitle"),Ur=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.height+t.padding,l=n.width+s/4+t.padding,r=a.insert("rect",":first-child").attr("style",t.style).attr("rx",s/2).attr("ry",s/2).attr("x",-l/2).attr("y",-s/2).attr("width",l).attr("height",s);return I(t,r),t.intersect=function(i){return B.rect(t,i)},a},"stadium"),Xr=g(async(e,t)=>{let{shapeSvg:a,bbox:n,halfPadding:s}=await A(e,t,H(t,void 0),!0),l=a.insert("circle",":first-child");return l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+s).attr("width",n.width+t.padding).attr("height",n.height+t.padding),L.info("Circle main"),I(t,l),t.intersect=function(r){return L.info("Circle intersect",t,n.width/2+s,r),B.circle(t,n.width/2+s,r)},a},"circle"),jr=g(async(e,t)=>{let{shapeSvg:a,bbox:n,halfPadding:s}=await A(e,t,H(t,void 0),!0),l=5,r=a.insert("g",":first-child"),i=r.insert("circle"),c=r.insert("circle");return r.attr("class",t.class),i.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+s+l).attr("width",n.width+t.padding+l*2).attr("height",n.height+t.padding+l*2),c.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+s).attr("width",n.width+t.padding).attr("height",n.height+t.padding),L.info("DoubleCircle main"),I(t,i),t.intersect=function(d){return L.info("DoubleCircle intersect",t,n.width/2+s+l,d),B.circle(t,n.width/2+s+l,d)},a},"doublecircle"),Vr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"subroutine"),Zr=g((e,t)=>{let a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=a.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),I(t,n),t.intersect=function(s){return B.circle(t,7,s)},a},"start"),se=g((e,t,a)=>{let n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),s=70,l=10;a==="LR"&&(s=10,l=70);let r=n.append("rect").attr("x",-1*s/2).attr("y",-1*l/2).attr("width",s).attr("height",l).attr("class","fork-join");return I(t,r),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(i){return B.rect(t,i)},n},"forkJoin"),Gr=g((e,t)=>{let a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=a.insert("circle",":first-child"),s=a.insert("circle",":first-child");return s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),I(t,s),t.intersect=function(l){return B.circle(t,7,l)},a},"end"),qr=g(async(e,t)=>{let a=t.padding/2,n=4,s=8,l;t.classes?l="node "+t.classes:l="node default";let r=e.insert("g").attr("class",l).attr("id",t.domId||t.id),i=r.insert("rect",":first-child"),c=r.insert("line"),d=r.insert("line"),o=0,p=n,y=r.insert("g").attr("class","label"),x=0,m=t.classData.annotations?.[0],v=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",k=await U(y,v,t.labelStyle,!0,!0),D=k.getBBox();if(M(C())){let E=k.children[0],h=_(k);D=E.getBoundingClientRect(),h.attr("width",D.width),h.attr("height",D.height)}t.classData.annotations[0]&&(p+=D.height+n,o+=D.width);let N=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(M(C())?N+="&lt;"+t.classData.type+"&gt;":N+="<"+t.classData.type+">");let T=await U(y,N,t.labelStyle,!0,!0);_(T).attr("class","classTitle");let w=T.getBBox();if(M(C())){let E=T.children[0],h=_(T);w=E.getBoundingClientRect(),h.attr("width",w.width),h.attr("height",w.height)}p+=w.height+n,w.width>o&&(o=w.width);let u=[];t.classData.members.forEach(async E=>{let h=E.getDisplayDetails(),W=h.displayText;M(C())&&(W=W.replace(/</g,"&lt;").replace(/>/g,"&gt;"));let f=await U(y,W,h.cssStyle?h.cssStyle:t.labelStyle,!0,!0),R=f.getBBox();if(M(C())){let q=f.children[0],V=_(f);R=q.getBoundingClientRect(),V.attr("width",R.width),V.attr("height",R.height)}R.width>o&&(o=R.width),p+=R.height+n,u.push(f)}),p+=s;let b=[];if(t.classData.methods.forEach(async E=>{let h=E.getDisplayDetails(),W=h.displayText;M(C())&&(W=W.replace(/</g,"&lt;").replace(/>/g,"&gt;"));let f=await U(y,W,h.cssStyle?h.cssStyle:t.labelStyle,!0,!0),R=f.getBBox();if(M(C())){let q=f.children[0],V=_(f);R=q.getBoundingClientRect(),V.attr("width",R.width),V.attr("height",R.height)}R.width>o&&(o=R.width),p+=R.height+n,b.push(f)}),p+=s,m){let E=(o-D.width)/2;_(k).attr("transform","translate( "+(-1*o/2+E)+", "+-1*p/2+")"),x=D.height+n}let S=(o-w.width)/2;return _(T).attr("transform","translate( "+(-1*o/2+S)+", "+(-1*p/2+x)+")"),x+=w.height+n,c.attr("class","divider").attr("x1",-o/2-a).attr("x2",o/2+a).attr("y1",-p/2-a+s+x).attr("y2",-p/2-a+s+x),x+=s,u.forEach(E=>{_(E).attr("transform","translate( "+-o/2+", "+(-1*p/2+x+s/2)+")");let h=E?.getBBox();x+=(h?.height??0)+n}),x+=s,d.attr("class","divider").attr("x1",-o/2-a).attr("x2",o/2+a).attr("y1",-p/2-a+s+x).attr("y2",-p/2-a+s+x),x+=s,b.forEach(E=>{_(E).attr("transform","translate( "+-o/2+", "+(-1*p/2+x)+")");let h=E?.getBBox();x+=(h?.height??0)+n}),i.attr("style",t.style).attr("class","outer title-state").attr("x",-o/2-a).attr("y",-(p/2)-a).attr("width",o+t.padding).attr("height",p+t.padding),I(t,i),t.intersect=function(E){return B.rect(t,E)},r},"class_box"),ie={rhombus:ae,composite:Yr,question:ae,rect:Wr,labelRect:Hr,rectWithTitle:Kr,choice:Ir,circle:Xr,doublecircle:jr,stadium:Ur,hexagon:Nr,block_arrow:Cr,rect_left_inv_arrow:Or,lean_right:Rr,lean_left:zr,trapezoid:Ar,inv_trapezoid:Mr,rect_right_inv_arrow:Fr,cylinder:Pr,start:Zr,end:Gr,note:Br,subroutine:Vr,fork:se,join:se,class_box:qr},ct={},ke=g(async(e,t,a)=>{let n,s;if(t.link){let l;C().securityLevel==="sandbox"?l="_top":t.linkTarget&&(l=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",l),s=await ie[t.shape](n,t,a)}else s=await ie[t.shape](e,t,a),n=s;return t.tooltip&&s.attr("title",t.tooltip),t.class&&s.attr("class","node default "+t.class),ct[t.id]=n,t.haveCallback&&ct[t.id].attr("class",ct[t.id].attr("class")+" clickable"),n},"insertNode"),Jr=g(e=>{let t=ct[e.id];L.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let a=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-a)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode");function Ot(e,t,a=!1){let n=e,s="default";(n?.classes?.length||0)>0&&(s=(n?.classes??[]).join(" ")),s=s+" flowchart-label";let l=0,r="",i;switch(n.type){case"round":l=5,r="rect";break;case"composite":l=0,r="composite",i=0;break;case"square":r="rect";break;case"diamond":r="question";break;case"hexagon":r="hexagon";break;case"block_arrow":r="block_arrow";break;case"odd":r="rect_left_inv_arrow";break;case"lean_right":r="lean_right";break;case"lean_left":r="lean_left";break;case"trapezoid":r="trapezoid";break;case"inv_trapezoid":r="inv_trapezoid";break;case"rect_left_inv_arrow":r="rect_left_inv_arrow";break;case"circle":r="circle";break;case"ellipse":r="ellipse";break;case"stadium":r="stadium";break;case"subroutine":r="subroutine";break;case"cylinder":r="cylinder";break;case"group":r="rect";break;case"doublecircle":r="doublecircle";break;default:r="rect"}let c=jt(n?.styles??[]),d=n.label,o=n.size??{width:0,height:0,x:0,y:0},p=t.getDiagramId();return{labelStyle:c.labelStyle,shape:r,labelText:d,rx:l,ry:l,class:s,style:c.style,id:n.id,domId:p?`${p}-${n.id}`:n.id,directions:n.directions,width:o.width,height:o.height,x:o.x,y:o.y,positioned:a,intersect:void 0,type:n.type,padding:i??$()?.block?.padding??0,widthInColumns:n.widthInColumns??1}}g(Ot,"getNodeFromBlock");async function Se(e,t,a){let n=Ot(t,a,!1);if(n.type==="group")return;let s=$(),l=await ke(e,n,{config:s}),r=l.node().getBBox(),i=a.getBlock(n.id);i.size={width:r.width,height:r.height,x:0,y:0,node:l},a.setBlock(i),l.remove()}g(Se,"calculateBlockSize");async function Le(e,t,a){let n=Ot(t,a,!0);if(a.getBlock(n.id).type!=="space"){let l=$();await ke(e,n,{config:l}),t.intersect=n?.intersect,Jr(n)}}g(Le,"insertBlockPositioned");async function gt(e,t,a,n){for(let s of t)await n(e,s,a),s.children&&await gt(e,s.children,a,n)}g(gt,"performOperations");async function ve(e,t,a){await gt(e,t,a,Se)}g(ve,"calculateBlockSizes");async function Ee(e,t,a){await gt(e,t,a,Le)}g(Ee,"insertBlocks");async function _e(e,t,a,n,s){let l=new Gt({multigraph:!0,compound:!0});l.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let r of a)r.size&&l.setNode(r.id,{width:r.size.width,height:r.size.height,intersect:r.intersect});for(let r of t)if(r.start&&r.end){let i=n.getBlock(r.start),c=n.getBlock(r.end);if(i?.size&&c?.size){let d=i.size,o=c.size,p=[{x:d.x,y:d.y},{x:d.x+(o.x-d.x)/2,y:d.y+(o.y-d.y)/2},{x:o.x,y:o.y}],y=s?`${s}-${r.id}`:r.id,x=r.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",m=r.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",v=`${x} ${m} flowchart-link LS-a1 LE-b1`;mr(e,{v:r.start,w:r.end,name:y},{...r,id:y,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:p,classes:v},void 0,"block",l,s),r.label&&(await fr(e,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:p,classes:v}),xr({...r,x:p[1].x,y:p[1].y},{originalPath:p}))}}}g(_e,"insertEdges");var Qr=g(function(e,t){return t.db.getClasses()},"getClasses"),$r=g(async function(e,t,a,n){let{securityLevel:s,block:l}=$(),r=n.db;r.setDiagramId(t);let i;s==="sandbox"&&(i=_("#i"+t));let c=s==="sandbox"?_(i.nodes()[0].contentDocument.body):_("body"),d=s==="sandbox"?c.select(`[id="${t}"]`):_(`[id="${t}"]`);hr(d,["point","circle","cross"],n.type,t);let p=r.getBlocks(),y=r.getBlocksFlat(),x=r.getEdges(),m=d.insert("g").attr("class","block");await ve(m,p,r);let v=pe(r);if(await Ee(m,p,r),await _e(m,x,y,r,t),v){let k=v,D=Math.max(1,Math.round(.125*(k.width/k.height))),N=k.height+D+10,T=k.width+10,{useMaxWidth:w}=l;Wt(d,N,T,!!w),L.debug("Here Bounds",v,k),d.attr("viewBox",`${k.x-5} ${k.y-5} ${k.width+10} ${k.height+10}`)}},"draw"),ta={draw:$r,getClasses:Qr},xa={parser:Be,db:qe,renderer:ta,styles:Qe};export{xa as diagram};
133
+ //# sourceMappingURL=blockDiagram-GPEHLZMM-P7MBAWVH.js.map