omni-context-cli 0.0.37 → 0.0.39

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 (114) hide show
  1. package/dist/agents/quest.md +1 -1
  2. package/dist/cli.js +7 -7
  3. package/dist/clients/extension.vsix +0 -0
  4. package/dist/clients/web/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  5. package/dist/clients/web/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  6. package/dist/clients/web/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  7. package/dist/clients/web/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  8. package/dist/clients/web/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  9. package/dist/clients/web/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  10. package/dist/clients/web/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  11. package/dist/clients/web/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  12. package/dist/clients/web/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  13. package/dist/clients/web/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  14. package/dist/clients/web/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  15. package/dist/clients/web/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  16. package/dist/clients/web/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  17. package/dist/clients/web/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  18. package/dist/clients/web/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  19. package/dist/clients/web/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  20. package/dist/clients/web/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  21. package/dist/clients/web/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  22. package/dist/clients/web/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  23. package/dist/clients/web/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  24. package/dist/clients/web/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  25. package/dist/clients/web/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  26. package/dist/clients/web/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  27. package/dist/clients/web/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  28. package/dist/clients/web/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  29. package/dist/clients/web/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  30. package/dist/clients/web/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  31. package/dist/clients/web/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  32. package/dist/clients/web/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  33. package/dist/clients/web/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  34. package/dist/clients/web/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  35. package/dist/clients/web/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  36. package/dist/clients/web/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  37. package/dist/clients/web/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  38. package/dist/clients/web/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  39. package/dist/clients/web/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  40. package/dist/clients/web/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  41. package/dist/clients/web/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  42. package/dist/clients/web/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  43. package/dist/clients/web/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  44. package/dist/clients/web/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  45. package/dist/clients/web/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  46. package/dist/clients/web/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  47. package/dist/clients/web/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  48. package/dist/clients/web/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  49. package/dist/clients/web/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  50. package/dist/clients/web/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  51. package/dist/clients/web/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  52. package/dist/clients/web/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  53. package/dist/clients/web/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  54. package/dist/clients/web/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  55. package/dist/clients/web/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  56. package/dist/clients/web/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  57. package/dist/clients/web/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  58. package/dist/clients/web/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  59. package/dist/clients/web/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  60. package/dist/clients/web/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  61. package/dist/clients/web/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  62. package/dist/clients/web/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  63. package/dist/clients/web/assets/_baseUniq-BFIaUHWF.js +1 -0
  64. package/dist/clients/web/assets/arc-CX4sIPz0.js +1 -0
  65. package/dist/clients/web/assets/architectureDiagram-VXUJARFQ-ClAz1TdR.js +1 -0
  66. package/dist/clients/web/assets/blockDiagram-VD42YOAC-cXvv5Xme.js +1 -0
  67. package/dist/clients/web/assets/c4Diagram-YG6GDRKO-CrEaxiOQ.js +1 -0
  68. package/dist/clients/web/assets/channel-WvpFzh0S.js +1 -0
  69. package/dist/clients/web/assets/chunk-4BX2VUAB-Xr5eQ2jr.js +1 -0
  70. package/dist/clients/web/assets/chunk-55IACEB6-BrPAEmD2.js +1 -0
  71. package/dist/clients/web/assets/chunk-B4BG7PRW-Cja4muSQ.js +1 -0
  72. package/dist/clients/web/assets/chunk-DI55MBZ5-CO44EGwl.js +1 -0
  73. package/dist/clients/web/assets/chunk-FMBD7UC4-DHQTSncN.js +1 -0
  74. package/dist/clients/web/assets/chunk-QN33PNHL-C_u6j8ll.js +1 -0
  75. package/dist/clients/web/assets/chunk-QZHKN3VN-Baz9sG4a.js +1 -0
  76. package/dist/clients/web/assets/chunk-TZMSLE5B-BlXDqp8M.js +1 -0
  77. package/dist/clients/web/assets/classDiagram-2ON5EDUG-BGhuL3vX.js +1 -0
  78. package/dist/clients/web/assets/classDiagram-v2-WZHVMYZB-BGhuL3vX.js +1 -0
  79. package/dist/clients/web/assets/clone-BrjahQ2T.js +1 -0
  80. package/dist/clients/web/assets/cose-bilkent-S5V4N54A-DZWAEoy6.js +1 -0
  81. package/dist/clients/web/assets/cytoscape.esm-Cw0kmstm.js +9 -0
  82. package/dist/clients/web/assets/dagre-6UL2VRFP-qiPMpj-s.js +1 -0
  83. package/dist/clients/web/assets/defaultLocale-DK_abR1s.js +1 -0
  84. package/dist/clients/web/assets/diagram-PSM6KHXK-e6unNrWN.js +1 -0
  85. package/dist/clients/web/assets/diagram-QEK2KX5R-DMbTtJpL.js +1 -0
  86. package/dist/clients/web/assets/diagram-S2PKOQOG-DJzyjWuo.js +1 -0
  87. package/dist/clients/web/assets/erDiagram-Q2GNP2WA-X-nh9pp7.js +1 -0
  88. package/dist/clients/web/assets/flowDiagram-NV44I4VS-Cfyd4KjH.js +1 -0
  89. package/dist/clients/web/assets/ganttDiagram-JELNMOA3-Qr2DTISc.js +1 -0
  90. package/dist/clients/web/assets/gitGraphDiagram-NY62KEGX-D7fkew24.js +1 -0
  91. package/dist/clients/web/assets/graph-DbcIVQWO.js +1 -0
  92. package/dist/clients/web/assets/index-PxdJoyNn.js +27 -0
  93. package/dist/clients/web/assets/index-_TATy_re.css +1 -0
  94. package/dist/clients/web/assets/infoDiagram-WHAUD3N6-CIhYDMFh.js +1 -0
  95. package/dist/clients/web/assets/init-C9Lo50Hz.js +1 -0
  96. package/dist/clients/web/assets/journeyDiagram-XKPGCS4Q-D31lU2HV.js +1 -0
  97. package/dist/clients/web/assets/kanban-definition-3W4ZIXB7-Dld77aF_.js +1 -0
  98. package/dist/clients/web/assets/layout-DFoNjwYU.js +1 -0
  99. package/dist/clients/web/assets/linear-DhSwIfiB.js +1 -0
  100. package/dist/clients/web/assets/min-C_FjB4Pz.js +1 -0
  101. package/dist/clients/web/assets/mindmap-definition-VGOIOE7T-BZ6YN87L.js +1 -0
  102. package/dist/clients/web/assets/ordinal-2upbOM02.js +1 -0
  103. package/dist/clients/web/assets/pieDiagram-ADFJNKIX-DFxN-730.js +1 -0
  104. package/dist/clients/web/assets/quadrantDiagram-AYHSOK5B-qmd91frX.js +1 -0
  105. package/dist/clients/web/assets/requirementDiagram-UZGBJVZJ-DXXq7RCX.js +1 -0
  106. package/dist/clients/web/assets/sankeyDiagram-TZEHDZUN-BlyT9ih9.js +1 -0
  107. package/dist/clients/web/assets/sequenceDiagram-WL72ISMW-B07J5kyu.js +1 -0
  108. package/dist/clients/web/assets/stateDiagram-FKZM4ZOC-YrX5yZ-e.js +1 -0
  109. package/dist/clients/web/assets/stateDiagram-v2-4FDKWEC3-DkYEm35t.js +1 -0
  110. package/dist/clients/web/assets/timeline-definition-IT6M3QCI-bMWx8q5z.js +1 -0
  111. package/dist/clients/web/assets/treemap-KMMF4GRG-B8jlkm1c.js +1 -0
  112. package/dist/clients/web/assets/xychartDiagram-PRI3JC2R-38DLhcVC.js +1 -0
  113. package/dist/clients/web/index.html +16 -0
  114. package/package.json +4 -2
@@ -0,0 +1 @@
1
+ var t,e;import{g as r}from"./chunk-FMBD7UC4-DHQTSncN.js";import{_ as s,F as n,d as i,e as a,l as o,y as c,A as l,ai as d,R as h,S as u,c as f,O as y,aj as x,ak as p,al as g,u as b,k as m,am as k,an as w,i as v,ao as S}from"./index-PxdJoyNn.js";import{c as _}from"./clone-BrjahQ2T.js";import{G as L}from"./graph-DbcIVQWO.js";import{c as E}from"./channel-WvpFzh0S.js";import"./_baseUniq-BFIaUHWF.js";var D=function(){var t=s(function(t,e,r,s){for(r=r||{},s=t.length;s--;r[t[s]]=e);return r},"o"),e=[1,15],r=[1,7],n=[1,13],i=[1,14],a=[1,19],o=[1,16],c=[1,17],l=[1,18],d=[8,30],h=[8,10,21,28,29,30,31,39,43,46],u=[1,23],f=[1,24],y=[8,10,15,16,21,28,29,30,31,39,43,46],x=[8,10,15,16,21,27,28,29,30,31,39,43,46],p=[1,49],g={trace:s(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:s(function(t,e,r,s,n,i,a){var o=i.length-1;switch(n){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: ",i[o-1]),s.setHierarchy(i[o-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: ",i[o]),"number"==typeof i[o].length?this.$=i[o]:this.$=[i[o]];break;case 13:s.getLogger().debug("Rule: statement #2: ",i[o-1]),this.$=[i[o-1]].concat(i[o]);break;case 14:s.getLogger().debug("Rule: link: ",i[o],t),this.$={edgeTypeStr:i[o],label:""};break;case 15:s.getLogger().debug("Rule: LABEL link: ",i[o-3],i[o-1],i[o]),this.$={edgeTypeStr:i[o],label:i[o-1]};break;case 18:const e=parseInt(i[o]),r=s.generateId();this.$={id:r,type:"space",label:"",width:e,children:[]};break;case 23:s.getLogger().debug("Rule: (nodeStatement link node) ",i[o-2],i[o-1],i[o]," typestr: ",i[o-1].edgeTypeStr);const n=s.edgeStrToEdgeData(i[o-1].edgeTypeStr);this.$=[{id:i[o-2].id,label:i[o-2].label,type:i[o-2].type,directions:i[o-2].directions},{id:i[o-2].id+"-"+i[o].id,start:i[o-2].id,end:i[o].id,label:i[o-1].label,type:"edge",directions:i[o].directions,arrowTypeEnd:n,arrowTypeStart:"arrow_open"},{id:i[o].id,label:i[o].label,type:s.typeStr2Type(i[o].typeStr),directions:i[o].directions}];break;case 24:s.getLogger().debug("Rule: nodeStatement (abc88 node size) ",i[o-1],i[o]),this.$={id:i[o-1].id,label:i[o-1].label,type:s.typeStr2Type(i[o-1].typeStr),directions:i[o-1].directions,widthInColumns:parseInt(i[o],10)};break;case 25:s.getLogger().debug("Rule: nodeStatement (node) ",i[o]),this.$={id:i[o].id,label:i[o].label,type:s.typeStr2Type(i[o].typeStr),directions:i[o].directions,widthInColumns:1};break;case 26:s.getLogger().debug("APA123",this?this:"na"),s.getLogger().debug("COLUMNS: ",i[o]),this.$={type:"column-setting",columns:"auto"===i[o]?-1:parseInt(i[o])};break;case 27:s.getLogger().debug("Rule: id-block statement : ",i[o-2],i[o-1]),s.generateId(),this.$={...i[o-2],type:"composite",children:i[o-1]};break;case 28:s.getLogger().debug("Rule: blockStatement : ",i[o-2],i[o-1],i[o]);const a=s.generateId();this.$={id:a,type:"composite",label:"",children:i[o-1]};break;case 29:s.getLogger().debug("Rule: node (NODE_ID separator): ",i[o]),this.$={id:i[o]};break;case 30:s.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",i[o-1],i[o]),this.$={id:i[o-1],label:i[o].label,typeStr:i[o].typeStr,directions:i[o].directions};break;case 31:s.getLogger().debug("Rule: dirList: ",i[o]),this.$=[i[o]];break;case 32:s.getLogger().debug("Rule: dirList: ",i[o-1],i[o]),this.$=[i[o-1]].concat(i[o]);break;case 33:s.getLogger().debug("Rule: nodeShapeNLabel: ",i[o-2],i[o-1],i[o]),this.$={typeStr:i[o-2]+i[o],label:i[o-1]};break;case 34:s.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",i[o-3],i[o-2]," #3:",i[o-1],i[o]),this.$={typeStr:i[o-3]+i[o],label:i[o-2],directions:i[o-1]};break;case 35:case 36:this.$={type:"classDef",id:i[o-1].trim(),css:i[o].trim()};break;case 37:this.$={type:"applyClass",id:i[o-1].trim(),styleClass:i[o].trim()};break;case 38:this.$={type:"applyStyles",id:i[o-1].trim(),stylesStr:i[o].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:e,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,39:o,43:c,46:l},{8:[1,20]},t(d,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:e,21:r,28:n,29:i,31:a,39:o,43:c,46:l}),t(h,[2,16],{14:22,15:u,16:f}),t(h,[2,17]),t(h,[2,18]),t(h,[2,19]),t(h,[2,20]),t(h,[2,21]),t(h,[2,22]),t(y,[2,25],{27:[1,25]}),t(h,[2,26]),{19:26,26:12,31:a},{10:e,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,39:o,43:c,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(x,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(d,[2,13]),{26:35,31:a},{31:[2,14]},{17:[1,36]},t(y,[2,24]),{10:e,11:37,13:4,14:22,15:u,16:f,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,39:o,43:c,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(x,[2,30]),{18:[1,43]},{18:[1,44]},t(y,[2,23]),{18:[1,45]},{30:[1,46]},t(h,[2,28]),t(h,[2,35]),t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{36:[1,47]},{33:48,34:p},{15:[1,50]},t(h,[2,27]),t(x,[2,33]),{38:[1,51]},{33:52,34:p,38:[2,31]},{31:[2,15]},t(x,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:s(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:s(function(t){var e=this,r=[0],n=[],i=[null],a=[],o=this.table,c="",l=0,d=0,h=a.slice.call(arguments,1),u=Object.create(this.lexer),f={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(f.yy[y]=this.yy[y]);u.setInput(t,f.yy),f.yy.lexer=u,f.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var x=u.yylloc;a.push(x);var p=u.options&&u.options.ranges;function g(){var t;return"number"!=typeof(t=n.pop()||u.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,s(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),s(g,"lex");for(var b,m,k,w,v,S,_,L,E={};;){if(m=r[r.length-1],this.defaultActions[m]?k=this.defaultActions[m]:(null==b&&(b=g()),k=o[m]&&o[m][b]),void 0===k||!k.length||!k[0]){var D="";for(v in L=[],o[m])this.terminals_[v]&&v>2&&L.push("'"+this.terminals_[v]+"'");D=u.showPosition?"Parse error on line "+(l+1)+":\n"+u.showPosition()+"\nExpecting "+L.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(D,{text:u.match,token:this.terminals_[b]||b,line:u.yylineno,loc:x,expected:L})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+b);switch(k[0]){case 1:r.push(b),i.push(u.yytext),a.push(u.yylloc),r.push(k[1]),b=null,d=u.yyleng,c=u.yytext,l=u.yylineno,x=u.yylloc;break;case 2:if(S=this.productions_[k[1]][1],E.$=i[i.length-S],E._$={first_line:a[a.length-(S||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(S||1)].first_column,last_column:a[a.length-1].last_column},p&&(E._$.range=[a[a.length-(S||1)].range[0],a[a.length-1].range[1]]),void 0!==(w=this.performAction.apply(E,[c,d,l,f.yy,k[1],i,a].concat(h))))return w;S&&(r=r.slice(0,-1*S*2),i=i.slice(0,-1*S),a=a.slice(0,-1*S)),r.push(this.productions_[k[1]][0]),i.push(E.$),a.push(E._$),_=o[r[r.length-2]][r[r.length-1]],r.push(_);break;case 3:return!0}}return!0},"parse")},b=function(){return{EOF:1,parseError:s(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:s(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:s(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;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),r.length-1&&(this.yylineno-=r.length-1);var n=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:r?(r.length===s.length?this.yylloc.first_column:0)+s[s.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:s(function(t){this.unput(this.match.slice(t))},"less"),pastInput:s(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:s(function(t,e){var r,s,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(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+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var i in n)this[i]=n[i];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;var t,e,r,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),i=0;i<n.length;i++)if((r=this._input.match(this.rules[n[i]]))&&(!e||r[0].length>e[0].length)){if(e=r,s=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var t=this.next();return t||this.lex()},"lex"),begin:s(function(t){this.conditionStack.push(t)},"begin"),popState:s(function(){return this.conditionStack.length-1>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(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:s(function(t){this.begin(t)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:s(function(t,e,r,s){switch(r){case 0:return t.getLogger().debug("Found block-beta"),10;case 1:return t.getLogger().debug("Found id-block"),29;case 2:return t.getLogger().debug("Found block"),10;case 3:t.getLogger().debug(".",e.yytext);break;case 4:t.getLogger().debug("_",e.yytext);break;case 5:return 5;case 6:return e.yytext=-1,28;case 7:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 13:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 14:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 15:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return t.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),37;case 74:return t.getLogger().debug("Lex: NODE_ID",e.yytext),31;case 75:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 78:return"NODE_DESCR";case 80:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 83:t.getLogger().debug("LEX POPPING"),this.popState();break;case 84:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 91:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 93:case 94:case 95:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 96:case 97:case 98:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 100:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 102:case 103:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 104:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.yytext.slice(1),27}},"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}}}}();function m(){this.yy={}}return g.lexer=b,s(m,"Parser"),m.prototype=g,g.Parser=m,new m}();D.parser=D;var $=D,N=new Map,T=[],O=new Map,I="color",R="fill",A=f(),M=new Map,C=s(t=>m.sanitizeText(t,A),"sanitizeText"),B=s(function(t,e=""){let r=M.get(t);r||(r={id:t,styles:[],textStyles:[]},M.set(t,r)),null!=e&&e.split(",").forEach(t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(I).exec(t)){const t=e.replace(R,"bgFill").replace(I,R);r.textStyles.push(t)}r.styles.push(e)})},"addStyleClass"),P=s(function(t,e=""){const r=N.get(t);null!=e&&(r.styles=e.split(","))},"addStyle2Node"),Y=s(function(t,e){t.split(",").forEach(function(t){let r=N.get(t);if(void 0===r){const e=t.trim();r={id:e,type:"na",children:[]},N.set(e,r)}r.classes||(r.classes=[]),r.classes.push(e)})},"setCssClass"),X=s((t,e)=>{const r=t.flat(),s=[],n=r.find(t=>"column-setting"===(null==t?void 0:t.type)),i=(null==n?void 0:n.columns)??-1;for(const a of r)if("number"==typeof i&&i>0&&"column-setting"!==a.type&&"number"==typeof a.widthInColumns&&a.widthInColumns>i&&o.warn(`Block ${a.id} width ${a.widthInColumns} exceeds configured column width ${i}`),a.label&&(a.label=C(a.label)),"classDef"!==a.type)if("applyClass"!==a.type)if("applyStyles"!==a.type)if("column-setting"===a.type)e.columns=a.columns??-1;else if("edge"===a.type){const t=(O.get(a.id)??0)+1;O.set(a.id,t),a.id=t+"-"+a.id,T.push(a)}else{a.label||("composite"===a.type?a.label="":a.label=a.id);const t=N.get(a.id);if(void 0===t?N.set(a.id,a):("na"!==a.type&&(t.type=a.type),a.label!==a.id&&(t.label=a.label)),a.children&&X(a.children,a),"space"===a.type){const t=a.width??1;for(let e=0;e<t;e++){const t=_(a);t.id=t.id+"-"+e,N.set(t.id,t),s.push(t)}}else void 0===t&&s.push(a)}else(null==a?void 0:a.stylesStr)&&P(a.id,null==a?void 0:a.stylesStr);else Y(a.id,(null==a?void 0:a.styleClass)??"");else B(a.id,a.css);e.children=s},"populateBlockDatabase"),W=[],z={id:"root",type:"composite",children:[],columns:-1},F=s(()=>{o.debug("Clear called"),c(),z={id:"root",type:"composite",children:[],columns:-1},N=new Map([["root",z]]),W=[],M=new Map,T=[],O=new Map},"clear");function U(t){switch(o.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return o.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"}}function H(t){return o.debug("typeStr2Type",t),"=="===t?"thick":"normal"}function K(t){switch(t.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}s(U,"typeStr2Type"),s(H,"edgeTypeStr2Type"),s(K,"edgeStrToEdgeData");var j=0,Z=s(()=>(j++,"id-"+Math.random().toString(36).substr(2,12)+"-"+j),"generateId"),q=s(t=>{z.children=t,X(t,z),W=z.children},"setHierarchy"),G=s(t=>{const e=N.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),J=s(()=>[...N.values()],"getBlocksFlat"),Q=s(()=>W||[],"getBlocks"),V=s(()=>T,"getEdges"),tt=s(t=>N.get(t),"getBlock"),et=s(t=>{N.set(t.id,t)},"setBlock"),rt=s(()=>o,"getLogger"),st=s(function(){return M},"getClasses"),nt={getConfig:s(()=>n().block,"getConfig"),typeStr2Type:U,edgeTypeStr2Type:H,edgeStrToEdgeData:K,getLogger:rt,getBlocksFlat:J,getBlocks:Q,getEdges:V,setHierarchy:q,getBlock:tt,setBlock:et,getColumns:G,getClasses:st,clear:F,generateId:Z},it=s((t,e)=>{const r=E,s=r(t,"r"),n=r(t,"g"),i=r(t,"b");return l(s,n,i,e)},"fade"),at=s(t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span,p {\n color: ${t.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${it(t.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .node .cluster {\n // fill: ${it(t.mainBkg,.5)};\n fill: ${it(t.clusterBkg,.5)};\n stroke: ${it(t.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span,p {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n ${r()}\n`,"getStyles"),ot=s((t,e,r,s)=>{e.forEach(e=>{ct[e](t,r,s)})},"insertMarkers"),ct={extension:s((t,e,r)=>{o.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).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"),composition:s((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).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"),aggregation:s((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).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"),dependency:s((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).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"),lollipop:s((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).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),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).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"),point:s((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).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"),circle:s((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).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"),cross:s((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).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"),barb:s((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-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")},lt=ot,dt=(null==(e=null==(t=f())?void 0:t.block)?void 0:e.padding)??8;function ht(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);if(t<0)return{px:e,py:0};if(1===t)return{px:0,py:e};return{px:e%t,py:Math.floor(e/t)}}s(ht,"calculateBlockPosition");var ut=s(t=>{let e=0,r=0;for(const s of t.children){const{width:n,height:i,x:a,y:c}=s.size??{width:0,height:0,x:0,y:0};o.debug("getMaxChildSize abc95 child:",s.id,"width:",n,"height:",i,"x:",a,"y:",c,s.type),"space"!==s.type&&(n>e&&(e=n/(t.widthInColumns??1)),i>r&&(r=i))}return{width:e,height:r}},"getMaxChildSize");function ft(t,e,r=0,s=0){var n,i,a,c,l,d,h,u,f,y,x;o.debug("setBlockSizes abc95 (start)",t.id,null==(n=null==t?void 0:t.size)?void 0:n.x,"block width =",null==t?void 0:t.size,"siblingWidth",r),(null==(i=null==t?void 0:t.size)?void 0:i.width)||(t.size={width:r,height:s,x:0,y:0});let p=0,g=0;if((null==(a=t.children)?void 0:a.length)>0){for(const r of t.children)ft(r,e);const n=ut(t);p=n.width,g=n.height,o.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",p,g);for(const e of t.children)e.size&&(o.debug(`abc95 Setting size of children of ${t.id} id=${e.id} ${p} ${g} ${JSON.stringify(e.size)}`),e.size.width=p*(e.widthInColumns??1)+dt*((e.widthInColumns??1)-1),e.size.height=g,e.size.x=0,e.size.y=0,o.debug(`abc95 updating size of ${t.id} children child:${e.id} maxWidth:${p} maxHeight:${g}`));for(const r of t.children)ft(r,e,p,g);const i=t.columns??-1;let a=0;for(const e of t.children)a+=e.widthInColumns??1;let u=t.children.length;i>0&&i<a&&(u=i);const f=Math.ceil(a/u);let y=u*(p+dt)+dt,x=f*(g+dt)+dt;if(y<r){o.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${r} siblingHeight ${s} width ${y}`),y=r,x=s;const e=(r-u*dt-dt)/u,n=(s-f*dt-dt)/f;o.debug("Size indata abc88",t.id,"childWidth",e,"maxWidth",p),o.debug("Size indata abc88",t.id,"childHeight",n,"maxHeight",g),o.debug("Size indata abc88 xSize",u,"padding",dt);for(const r of t.children)r.size&&(r.size.width=e,r.size.height=n,r.size.x=0,r.size.y=0)}if(o.debug(`abc95 (finale calc) ${t.id} xSize ${u} ySize ${f} columns ${i}${t.children.length} width=${Math.max(y,(null==(c=t.size)?void 0:c.width)||0)}`),y<((null==(l=null==t?void 0:t.size)?void 0:l.width)||0)){y=(null==(d=null==t?void 0:t.size)?void 0:d.width)||0;const e=i>0?Math.min(t.children.length,i):t.children.length;if(e>0){const r=(y-e*dt-dt)/e;o.debug("abc95 (growing to fit) width",t.id,y,null==(h=t.size)?void 0:h.width,r);for(const e of t.children)e.size&&(e.size.width=r)}}t.size={width:y,height:x,x:0,y:0}}o.debug("setBlockSizes abc94 (done)",t.id,null==(u=null==t?void 0:t.size)?void 0:u.x,null==(f=null==t?void 0:t.size)?void 0:f.width,null==(y=null==t?void 0:t.size)?void 0:y.y,null==(x=null==t?void 0:t.size)?void 0:x.height)}function yt(t,e){var r,s,n,i,a,c,l,d,h,u,f,y,x,p,g,b,m;o.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${null==(r=null==t?void 0:t.size)?void 0:r.x} y: ${null==(s=null==t?void 0:t.size)?void 0:s.y} width: ${null==(n=null==t?void 0:t.size)?void 0:n.width}`);const k=t.columns??-1;if(o.debug("layoutBlocks columns abc95",t.id,"=>",k,t),t.children&&t.children.length>0){const e=(null==(a=null==(i=null==t?void 0:t.children[0])?void 0:i.size)?void 0:a.width)??0,r=t.children.length*e+(t.children.length-1)*dt;o.debug("widthOfChildren 88",r,"posX");let s=0;o.debug("abc91 block?.size?.x",t.id,null==(c=null==t?void 0:t.size)?void 0:c.x);let n=(null==(l=null==t?void 0:t.size)?void 0:l.x)?(null==(d=null==t?void 0:t.size)?void 0:d.x)+(-(null==(h=null==t?void 0:t.size)?void 0:h.width)/2||0):-dt,g=0;for(const i of t.children){const e=t;if(!i.size)continue;const{width:r,height:a}=i.size,{px:c,py:l}=ht(k,s);if(l!=g&&(g=l,n=(null==(u=null==t?void 0:t.size)?void 0:u.x)?(null==(f=null==t?void 0:t.size)?void 0:f.x)+(-(null==(y=null==t?void 0:t.size)?void 0:y.width)/2||0):-dt,o.debug("New row in layout for block",t.id," and child ",i.id,g)),o.debug(`abc89 layout blocks (child) id: ${i.id} Pos: ${s} (px, py) ${c},${l} (${null==(x=null==e?void 0:e.size)?void 0:x.x},${null==(p=null==e?void 0:e.size)?void 0:p.y}) parent: ${e.id} width: ${r}${dt}`),e.size){const t=r/2;i.size.x=n+dt+t,o.debug(`abc91 layout blocks (calc) px, pyid:${i.id} startingPos=X${n} new startingPosX${i.size.x} ${t} padding=${dt} width=${r} halfWidth=${t} => x:${i.size.x} y:${i.size.y} ${i.widthInColumns} (width * (child?.w || 1)) / 2 ${r*((null==i?void 0:i.widthInColumns)??1)/2}`),n=i.size.x+t,i.size.y=e.size.y-e.size.height/2+l*(a+dt)+a/2+dt,o.debug(`abc88 layout blocks (calc) px, pyid:${i.id}startingPosX${n}${dt}${t}=>x:${i.size.x}y:${i.size.y}${i.widthInColumns}(width * (child?.w || 1)) / 2${r*((null==i?void 0:i.widthInColumns)??1)/2}`)}i.children&&yt(i);let d=(null==i?void 0:i.widthInColumns)??1;k>0&&(d=Math.min(d,k-s%k)),s+=d,o.debug("abc88 columnsPos",i,s)}}o.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${null==(g=null==t?void 0:t.size)?void 0:g.x} y: ${null==(b=null==t?void 0:t.size)?void 0:b.y} width: ${null==(m=null==t?void 0:t.size)?void 0:m.width}`)}function xt(t,{minX:e,minY:r,maxX:s,maxY:n}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&"root"!==t.id){const{x:i,y:a,width:o,height:c}=t.size;i-o/2<e&&(e=i-o/2),a-c/2<r&&(r=a-c/2),i+o/2>s&&(s=i+o/2),a+c/2>n&&(n=a+c/2)}if(t.children)for(const i of t.children)({minX:e,minY:r,maxX:s,maxY:n}=xt(i,{minX:e,minY:r,maxX:s,maxY:n}));return{minX:e,minY:r,maxX:s,maxY:n}}function pt(t){const e=t.getBlock("root");if(!e)return;ft(e,t,0,0),yt(e),o.debug("getBlocks",JSON.stringify(e,null,2));const{minX:r,minY:s,maxX:n,maxY:i}=xt(e);return{x:r,y:s,width:n-r,height:i-s}}function gt(t,e){e&&t.attr("style",e)}function bt(t,e){const r=i(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),s=r.append("xhtml:div"),n=t.label,a=t.isNode?"nodeLabel":"edgeLabel",o=s.append("span");return o.html(v(n,e)),gt(o,t.labelStyle),o.attr("class",a),gt(s,t.labelStyle),s.style("display","inline-block"),s.style("white-space","nowrap"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),r.node()}s(ft,"setBlockSizes"),s(yt,"layoutBlocks"),s(xt,"findBounds"),s(pt,"layout"),s(gt,"applyStyle"),s(bt,"addHtmlLabel");var mt=s(async(t,e,r,s)=>{let n=t||"";"object"==typeof n&&(n=n[0]);const i=f();if(x(i.flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),o.debug("vertexText"+n);return bt({isNode:s,label:await k(w(n)),labelStyle:e.replace("fill:","color:")},i)}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let s=[];s="string"==typeof n?n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?n:[];for(const e of s){const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),r?s.setAttribute("class","title-row"):s.setAttribute("class","row"),s.textContent=e.trim(),t.appendChild(s)}return t}},"createLabel"),kt=s((t,e,r,s,n)=>{e.arrowTypeStart&&vt(t,"start",e.arrowTypeStart,r,s,n),e.arrowTypeEnd&&vt(t,"end",e.arrowTypeEnd,r,s,n)},"addEdgeMarkers"),wt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},vt=s((t,e,r,s,n,i)=>{const a=wt[r];if(!a)return void o.warn(`Unknown arrow type: ${r}`);const c="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${s}#${n}_${i}-${a}${c})`)},"addEdgeMarker"),St={},_t={},Lt=s(async(t,e)=>{const r=f(),s=x(r.flowchart.htmlLabels),n="markdown"===e.labelType?p(t,e.label,{style:e.labelStyle,useHtmlLabels:s,addSvgBackground:!0},r):await mt(e.label,e.labelStyle),a=t.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label");o.node().appendChild(n);let c,l=n.getBBox();if(s){const t=n.children[0],e=i(n);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}if(o.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),St[e.id]=a,e.width=l.width,e.height=l.height,e.startLabelLeft){const r=await mt(e.startLabelLeft,e.labelStyle),s=t.insert("g").attr("class","edgeTerminals"),n=s.insert("g").attr("class","inner");c=n.node().appendChild(r);const i=r.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),_t[e.id]||(_t[e.id]={}),_t[e.id].startLeft=s,Et(c,e.startLabelLeft)}if(e.startLabelRight){const r=await mt(e.startLabelRight,e.labelStyle),s=t.insert("g").attr("class","edgeTerminals"),n=s.insert("g").attr("class","inner");c=s.node().appendChild(r),n.node().appendChild(r);const i=r.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),_t[e.id]||(_t[e.id]={}),_t[e.id].startRight=s,Et(c,e.startLabelRight)}if(e.endLabelLeft){const r=await mt(e.endLabelLeft,e.labelStyle),s=t.insert("g").attr("class","edgeTerminals"),n=s.insert("g").attr("class","inner");c=n.node().appendChild(r);const i=r.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),s.node().appendChild(r),_t[e.id]||(_t[e.id]={}),_t[e.id].endLeft=s,Et(c,e.endLabelLeft)}if(e.endLabelRight){const r=await mt(e.endLabelRight,e.labelStyle),s=t.insert("g").attr("class","edgeTerminals"),n=s.insert("g").attr("class","inner");c=n.node().appendChild(r);const i=r.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),s.node().appendChild(r),_t[e.id]||(_t[e.id]={}),_t[e.id].endRight=s,Et(c,e.endLabelRight)}return n},"insertEdgeLabel");function Et(t,e){f().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}s(Et,"setTerminalWidth");var Dt=s((t,e)=>{o.debug("Moving label abc88 ",t.id,t.label,St[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath;const s=f(),{subGraphTitleTotalMargin:n}=g(s);if(t.label){const s=St[t.id];let i=t.x,a=t.y;if(r){const s=b.calcLabelPosition(r);o.debug("Moving label "+t.label+" from (",i,",",a,") to (",s.x,",",s.y,") abc88"),e.updatedPath&&(i=s.x,a=s.y)}s.attr("transform",`translate(${i}, ${a+n/2})`)}if(t.startLabelLeft){const e=_t[t.id].startLeft;let s=t.x,n=t.y;if(r){const e=b.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=e.x,n=e.y}e.attr("transform",`translate(${s}, ${n})`)}if(t.startLabelRight){const e=_t[t.id].startRight;let s=t.x,n=t.y;if(r){const e=b.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=e.x,n=e.y}e.attr("transform",`translate(${s}, ${n})`)}if(t.endLabelLeft){const e=_t[t.id].endLeft;let s=t.x,n=t.y;if(r){const e=b.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=e.x,n=e.y}e.attr("transform",`translate(${s}, ${n})`)}if(t.endLabelRight){const e=_t[t.id].endRight;let s=t.x,n=t.y;if(r){const e=b.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=e.x,n=e.y}e.attr("transform",`translate(${s}, ${n})`)}},"positionEdgeLabel"),$t=s((t,e)=>{const r=t.x,s=t.y,n=Math.abs(e.x-r),i=Math.abs(e.y-s),a=t.width/2,o=t.height/2;return n>=a||i>=o},"outsideNode"),Nt=s((t,e,r)=>{o.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const s=t.x,n=t.y,i=Math.abs(s-r.x),a=t.width/2;let c=r.x<e.x?a-i:a+i;const l=t.height/2,d=Math.abs(e.y-r.y),h=Math.abs(e.x-r.x);if(Math.abs(n-e.y)*a>Math.abs(s-e.x)*l){let t=r.y<e.y?e.y-l-n:n-l-e.y;c=h*t/d;const s={x:r.x<e.x?r.x+c:r.x-h+c,y:r.y<e.y?r.y+d-t:r.y-d+t};return 0===c&&(s.x=e.x,s.y=e.y),0===h&&(s.x=e.x),0===d&&(s.y=e.y),o.debug(`abc89 topp/bott calc, Q ${d}, q ${t}, R ${h}, r ${c}`,s),s}{c=r.x<e.x?e.x-a-s:s-a-e.x;let t=d*c/h,n=r.x<e.x?r.x+h-c:r.x-h+c,i=r.y<e.y?r.y+t:r.y-t;return o.debug(`sides calc abc89, Q ${d}, q ${t}, R ${h}, r ${c}`,{_x:n,_y:i}),0===c&&(n=e.x,i=e.y),0===h&&(n=e.x),0===d&&(i=e.y),{x:n,y:i}}},"intersection"),Tt=s((t,e)=>{o.debug("abc88 cutPathAtIntersect",t,e);let r=[],s=t[0],n=!1;return t.forEach(t=>{if($t(e,t)||n)s=t,n||r.push(t);else{const i=Nt(e,s,t);let a=!1;r.forEach(t=>{a=a||t.x===i.x&&t.y===i.y}),r.some(t=>t.x===i.x&&t.y===i.y)||r.push(i),n=!0}}),r},"cutPathAtIntersect"),Ot=s(function(t,e,r,s,n,i,a){let c=r.points;o.debug("abc88 InsertEdge: edge=",r,"e=",e);let l=!1;const x=i.node(e.v);var p=i.node(e.w);(null==p?void 0:p.intersect)&&(null==x?void 0:x.intersect)&&(c=c.slice(1,r.points.length-1),c.unshift(x.intersect(c[0])),c.push(p.intersect(c[c.length-1]))),r.toCluster&&(o.debug("to cluster abc88",s[r.toCluster]),c=Tt(r.points,s[r.toCluster].node),l=!0),r.fromCluster&&(o.debug("from cluster abc88",s[r.fromCluster]),c=Tt(c.reverse(),s[r.fromCluster].node).reverse(),l=!0);const g=c.filter(t=>!Number.isNaN(t.y));let b=u;!r.curve||"graph"!==n&&"flowchart"!==n||(b=r.curve);const{x:m,y:k}=d(r),w=h().x(m).y(k).curve(b);let v;switch(r.thickness){case"normal":v="edge-thickness-normal";break;case"thick":case"invisible":v="edge-thickness-thick";break;default:v=""}switch(r.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed"}const S=t.append("path").attr("d",w(g)).attr("id",r.id).attr("class"," "+v+(r.classes?" "+r.classes:"")).attr("style",r.style);let _="";(f().flowchart.arrowMarkerAbsolute||f().state.arrowMarkerAbsolute)&&(_=y(!0)),kt(S,r,_,a,n);let L={};return l&&(L.updatedPath=c),L.originalPath=r.points,L},"insertEdge"),It=s(t=>{const e=new Set;for(const r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r)}return e},"expandAndDeduplicateDirections"),Rt=s((t,e,r)=>{const s=It(t),n=e.height+2*r.padding,i=n/2,a=e.width+2*i+r.padding,o=r.padding/2;return s.has("right")&&s.has("left")&&s.has("up")&&s.has("down")?[{x:0,y:0},{x:i,y:0},{x:a/2,y:2*o},{x:a-i,y:0},{x:a,y:0},{x:a,y:-n/3},{x:a+2*o,y:-n/2},{x:a,y:-2*n/3},{x:a,y:-n},{x:a-i,y:-n},{x:a/2,y:-n-2*o},{x:i,y:-n},{x:0,y:-n},{x:0,y:-2*n/3},{x:-2*o,y:-n/2},{x:0,y:-n/3}]:s.has("right")&&s.has("left")&&s.has("up")?[{x:i,y:0},{x:a-i,y:0},{x:a,y:-n/2},{x:a-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}]:s.has("right")&&s.has("left")&&s.has("down")?[{x:0,y:0},{x:i,y:-n},{x:a-i,y:-n},{x:a,y:0}]:s.has("right")&&s.has("up")&&s.has("down")?[{x:0,y:0},{x:a,y:-i},{x:a,y:-n+i},{x:0,y:-n}]:s.has("left")&&s.has("up")&&s.has("down")?[{x:a,y:0},{x:0,y:-i},{x:0,y:-n+i},{x:a,y:-n}]:s.has("right")&&s.has("left")?[{x:i,y:0},{x:i,y:-o},{x:a-i,y:-o},{x:a-i,y:0},{x:a,y:-n/2},{x:a-i,y:-n},{x:a-i,y:-n+o},{x:i,y:-n+o},{x:i,y:-n},{x:0,y:-n/2}]:s.has("up")&&s.has("down")?[{x:a/2,y:0},{x:0,y:-o},{x:i,y:-o},{x:i,y:-n+o},{x:0,y:-n+o},{x:a/2,y:-n},{x:a,y:-n+o},{x:a-i,y:-n+o},{x:a-i,y:-o},{x:a,y:-o}]:s.has("right")&&s.has("up")?[{x:0,y:0},{x:a,y:-i},{x:0,y:-n}]:s.has("right")&&s.has("down")?[{x:0,y:0},{x:a,y:0},{x:0,y:-n}]:s.has("left")&&s.has("up")?[{x:a,y:0},{x:0,y:-i},{x:a,y:-n}]:s.has("left")&&s.has("down")?[{x:a,y:0},{x:0,y:0},{x:a,y:-n}]:s.has("right")?[{x:i,y:-o},{x:i,y:-o},{x:a-i,y:-o},{x:a-i,y:0},{x:a,y:-n/2},{x:a-i,y:-n},{x:a-i,y:-n+o},{x:i,y:-n+o},{x:i,y:-n+o}]:s.has("left")?[{x:i,y:0},{x:i,y:-o},{x:a-i,y:-o},{x:a-i,y:-n+o},{x:i,y:-n+o},{x:i,y:-n},{x:0,y:-n/2}]:s.has("up")?[{x:i,y:-o},{x:i,y:-n+o},{x:0,y:-n+o},{x:a/2,y:-n},{x:a,y:-n+o},{x:a-i,y:-n+o},{x:a-i,y:-o}]:s.has("down")?[{x:a/2,y:0},{x:0,y:-o},{x:i,y:-o},{x:i,y:-n+o},{x:a-i,y:-n+o},{x:a-i,y:-o},{x:a,y:-o}]:[{x:0,y:0}]},"getArrowPoints");function At(t,e){return t.intersect(e)}s(At,"intersectNode");var Mt=At;function Ct(t,e,r,s){var n=t.x,i=t.y,a=n-s.x,o=i-s.y,c=Math.sqrt(e*e*o*o+r*r*a*a),l=Math.abs(e*r*a/c);s.x<n&&(l=-l);var d=Math.abs(e*r*o/c);return s.y<i&&(d=-d),{x:n+l,y:i+d}}s(Ct,"intersectEllipse");var Bt=Ct;function Pt(t,e,r){return Bt(t,e,e,r)}s(Pt,"intersectCircle");var Yt=Pt;function Xt(t,e,r,s){var n,i,a,o,c,l,d,h,u,f,y,x,p;if(n=e.y-t.y,a=t.x-e.x,c=e.x*t.y-t.x*e.y,u=n*r.x+a*r.y+c,f=n*s.x+a*s.y+c,!(0!==u&&0!==f&&Wt(u,f)||(i=s.y-r.y,o=r.x-s.x,l=s.x*r.y-r.x*s.y,d=i*t.x+o*t.y+l,h=i*e.x+o*e.y+l,0!==d&&0!==h&&Wt(d,h)||0===(y=n*o-i*a))))return x=Math.abs(y/2),{x:(p=a*l-o*c)<0?(p-x)/y:(p+x)/y,y:(p=i*c-n*l)<0?(p-x)/y:(p+x)/y}}function Wt(t,e){return t*e>0}s(Xt,"intersectLine"),s(Wt,"sameSign");var zt=Xt,Ft=Ut;function Ut(t,e,r){var s=t.x,n=t.y,i=[],a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){a=Math.min(a,t.x),o=Math.min(o,t.y)}):(a=Math.min(a,e.x),o=Math.min(o,e.y));for(var c=s-t.width/2-a,l=n-t.height/2-o,d=0;d<e.length;d++){var h=e[d],u=e[d<e.length-1?d+1:0],f=zt(t,r,{x:c+h.x,y:l+h.y},{x:c+u.x,y:l+u.y});f&&i.push(f)}return i.length?(i.length>1&&i.sort(function(t,e){var s=t.x-r.x,n=t.y-r.y,i=Math.sqrt(s*s+n*n),a=e.x-r.x,o=e.y-r.y,c=Math.sqrt(a*a+o*o);return i<c?-1:i===c?0:1}),i[0]):t}s(Ut,"intersectPolygon");var Ht={node:Mt,circle:Yt,ellipse:Bt,polygon:Ft,rect:s((t,e)=>{var r,s,n=t.x,i=t.y,a=e.x-n,o=e.y-i,c=t.width/2,l=t.height/2;return Math.abs(o)*c>Math.abs(a)*l?(o<0&&(l=-l),r=0===o?0:l*a/o,s=l):(a<0&&(c=-c),r=c,s=0===a?0:c*o/a),{x:n+r,y:i+s}},"intersectRect")},Kt=s(async(t,e,r,n)=>{const a=f();let o;const c=e.useHtmlLabels||x(a.flowchart.htmlLabels);o=r||"node default";const l=t.insert("g").attr("class",o).attr("id",e.domId||e.id),d=l.insert("g").attr("class","label").attr("style",e.labelStyle);let h;h=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];const u=d.node();let y;y="markdown"===e.labelType?p(d,v(w(h),a),{useHtmlLabels:c,width:e.width||a.flowchart.wrappingWidth,classes:"markdown-node-label"},a):u.appendChild(await mt(v(w(h),a),e.labelStyle,!1,n));let g=y.getBBox();const b=e.padding/2;if(x(a.flowchart.htmlLabels)){const t=y.children[0],e=i(y),r=t.getElementsByTagName("img");if(r){const t=""===h.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map(e=>new Promise(r=>{function n(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=a.fontSize?a.fontSize:window.getComputedStyle(document.body).fontSize,r=5,s=parseInt(t,10)*r+"px";e.style.minWidth=s,e.style.maxWidth=s}else e.style.width="100%";r(e)}s(n,"setupImage"),setTimeout(()=>{e.complete&&n()}),e.addEventListener("error",n),e.addEventListener("load",n)})))}g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}return c?d.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"):d.attr("transform","translate(0, "+-g.height/2+")"),e.centerLabel&&d.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),d.insert("rect",":first-child"),{shapeSvg:l,bbox:g,halfPadding:b,label:d}},"labelHelper"),jt=s((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");function Zt(t,e,r,s){return t.insert("polygon",":first-child").attr("points",s.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}s(Zt,"insertPolygonShape");var qt=s(async(t,e)=>{e.useHtmlLabels||f().flowchart.htmlLabels||(e.centerLabel=!0);const{shapeSvg:r,bbox:s,halfPadding:n}=await Kt(t,e,"node "+e.classes,!0);o.info("Classes = ",e.classes);const i=r.insert("rect",":first-child");return i.attr("rx",e.rx).attr("ry",e.ry).attr("x",-s.width/2-n).attr("y",-s.height/2-n).attr("width",s.width+e.padding).attr("height",s.height+e.padding),jt(e,i),e.intersect=function(t){return Ht.rect(e,t)},r},"note"),Gt=s(t=>t?" "+t:"","formatClass"),Jt=s((t,e)=>`${e||"node default"}${Gt(t.classes)} ${Gt(t.class)}`,"getClassesFromNode"),Qt=s(async(t,e)=>{const{shapeSvg:r,bbox:s}=await Kt(t,e,Jt(e,void 0),!0),n=s.width+e.padding+(s.height+e.padding),i=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}];o.info("Question main (Circle)");const a=Zt(r,n,n,i);return a.attr("style",e.style),jt(e,a),e.intersect=function(t){return o.warn("Intersect called"),Ht.polygon(e,i,t)},r},"question"),Vt=s((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),s=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return r.insert("polygon",":first-child").attr("points",s.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return Ht.circle(e,14,t)},r},"choice"),te=s(async(t,e)=>{const{shapeSvg:r,bbox:s}=await Kt(t,e,Jt(e,void 0),!0),n=s.height+e.padding,i=n/4,a=s.width+2*i+e.padding,o=[{x:i,y:0},{x:a-i,y:0},{x:a,y:-n/2},{x:a-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}],c=Zt(r,a,n,o);return c.attr("style",e.style),jt(e,c),e.intersect=function(t){return Ht.polygon(e,o,t)},r},"hexagon"),ee=s(async(t,e)=>{const{shapeSvg:r,bbox:s}=await Kt(t,e,void 0,!0),n=s.height+2*e.padding,i=n/2,a=s.width+2*i+e.padding,o=Rt(e.directions,s,e),c=Zt(r,a,n,o);return c.attr("style",e.style),jt(e,c),e.intersect=function(t){return Ht.polygon(e,o,t)},r},"block_arrow"),re=s(async(t,e)=>{const{shapeSvg:r,bbox:s}=await Kt(t,e,Jt(e,void 0),!0),n=s.width+e.padding,i=s.height+e.padding,a=[{x:-i/2,y:0},{x:n,y:0},{x:n,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}];return Zt(r,n,i,a).attr("style",e.style),e.width=n+i,e.height=i,e.intersect=function(t){return Ht.polygon(e,a,t)},r},"rect_left_inv_arrow"),se=s(async(t,e)=>{const{shapeSvg:r,bbox:s}=await Kt(t,e,Jt(e),!0),n=s.width+e.padding,i=s.height+e.padding,a=[{x:-2*i/6,y:0},{x:n-i/6,y:0},{x:n+2*i/6,y:-i},{x:i/6,y:-i}],o=Zt(r,n,i,a);return o.attr("style",e.style),jt(e,o),e.intersect=function(t){return Ht.polygon(e,a,t)},r},"lean_right"),ne=s(async(t,e)=>{const{shapeSvg:r,bbox:s}=await Kt(t,e,Jt(e,void 0),!0),n=s.width+e.padding,i=s.height+e.padding,a=[{x:2*i/6,y:0},{x:n+i/6,y:0},{x:n-2*i/6,y:-i},{x:-i/6,y:-i}],o=Zt(r,n,i,a);return o.attr("style",e.style),jt(e,o),e.intersect=function(t){return Ht.polygon(e,a,t)},r},"lean_left"),ie=s(async(t,e)=>{const{shapeSvg:r,bbox:s}=await Kt(t,e,Jt(e,void 0),!0),n=s.width+e.padding,i=s.height+e.padding,a=[{x:-2*i/6,y:0},{x:n+2*i/6,y:0},{x:n-i/6,y:-i},{x:i/6,y:-i}],o=Zt(r,n,i,a);return o.attr("style",e.style),jt(e,o),e.intersect=function(t){return Ht.polygon(e,a,t)},r},"trapezoid"),ae=s(async(t,e)=>{const{shapeSvg:r,bbox:s}=await Kt(t,e,Jt(e,void 0),!0),n=s.width+e.padding,i=s.height+e.padding,a=[{x:i/6,y:0},{x:n-i/6,y:0},{x:n+2*i/6,y:-i},{x:-2*i/6,y:-i}],o=Zt(r,n,i,a);return o.attr("style",e.style),jt(e,o),e.intersect=function(t){return Ht.polygon(e,a,t)},r},"inv_trapezoid"),oe=s(async(t,e)=>{const{shapeSvg:r,bbox:s}=await Kt(t,e,Jt(e,void 0),!0),n=s.width+e.padding,i=s.height+e.padding,a=[{x:0,y:0},{x:n+i/2,y:0},{x:n,y:-i/2},{x:n+i/2,y:-i},{x:0,y:-i}],o=Zt(r,n,i,a);return o.attr("style",e.style),jt(e,o),e.intersect=function(t){return Ht.polygon(e,a,t)},r},"rect_right_inv_arrow"),ce=s(async(t,e)=>{const{shapeSvg:r,bbox:s}=await Kt(t,e,Jt(e,void 0),!0),n=s.width+e.padding,i=n/2,a=i/(2.5+n/50),o=s.height+a+e.padding,c="M 0,"+a+" a "+i+","+a+" 0,0,0 "+n+" 0 a "+i+","+a+" 0,0,0 "+-n+" 0 l 0,"+o+" a "+i+","+a+" 0,0,0 "+n+" 0 l 0,"+-o,l=r.attr("label-offset-y",a).insert("path",":first-child").attr("style",e.style).attr("d",c).attr("transform","translate("+-n/2+","+-(o/2+a)+")");return jt(e,l),e.intersect=function(t){const r=Ht.rect(e,t),s=r.x-e.x;if(0!=i&&(Math.abs(s)<e.width/2||Math.abs(s)==e.width/2&&Math.abs(r.y-e.y)>e.height/2-a)){let n=a*a*(1-s*s/(i*i));0!=n&&(n=Math.sqrt(n)),n=a-n,t.y-e.y>0&&(n=-n),r.y+=n}return r},r},"cylinder"),le=s(async(t,e)=>{const{shapeSvg:r,bbox:s,halfPadding:n}=await Kt(t,e,"node "+e.classes+" "+e.class,!0),i=r.insert("rect",":first-child"),a=e.positioned?e.width:s.width+e.padding,c=e.positioned?e.height:s.height+e.padding,l=e.positioned?-a/2:-s.width/2-n,d=e.positioned?-c/2:-s.height/2-n;if(i.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",d).attr("width",a).attr("height",c),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(ue(i,e.props.borders,a,c),t.delete("borders")),t.forEach(t=>{o.warn(`Unknown node property ${t}`)})}return jt(e,i),e.intersect=function(t){return Ht.rect(e,t)},r},"rect"),de=s(async(t,e)=>{const{shapeSvg:r,bbox:s,halfPadding:n}=await Kt(t,e,"node "+e.classes,!0),i=r.insert("rect",":first-child"),a=e.positioned?e.width:s.width+e.padding,c=e.positioned?e.height:s.height+e.padding,l=e.positioned?-a/2:-s.width/2-n,d=e.positioned?-c/2:-s.height/2-n;if(i.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",d).attr("width",a).attr("height",c),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(ue(i,e.props.borders,a,c),t.delete("borders")),t.forEach(t=>{o.warn(`Unknown node property ${t}`)})}return jt(e,i),e.intersect=function(t){return Ht.rect(e,t)},r},"composite"),he=s(async(t,e)=>{const{shapeSvg:r}=await Kt(t,e,"label",!0);o.trace("Classes = ",e.class);const s=r.insert("rect",":first-child");if(s.attr("width",0).attr("height",0),r.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(ue(s,e.props.borders,0,0),t.delete("borders")),t.forEach(t=>{o.warn(`Unknown node property ${t}`)})}return jt(e,s),e.intersect=function(t){return Ht.rect(e,t)},r},"labelRect");function ue(t,e,r,n){const i=[],a=s(t=>{i.push(t,0)},"addBorder"),c=s(t=>{i.push(0,t)},"skipBorder");e.includes("t")?(o.debug("add top border"),a(r)):c(r),e.includes("r")?(o.debug("add right border"),a(n)):c(n),e.includes("b")?(o.debug("add bottom border"),a(r)):c(r),e.includes("l")?(o.debug("add left border"),a(n)):c(n),t.attr("stroke-dasharray",i.join(" "))}s(ue,"applyNodePropertyBorders");var fe=s(async(t,e)=>{let r;r=e.classes?"node "+e.classes:"node default";const s=t.insert("g").attr("class",r).attr("id",e.domId||e.id),n=s.insert("rect",":first-child"),a=s.insert("line"),c=s.insert("g").attr("class","label"),l=e.labelText.flat?e.labelText.flat():e.labelText;let d="";d="object"==typeof l?l[0]:l,o.info("Label text abc79",d,l,"object"==typeof l);const h=c.node().appendChild(await mt(d,e.labelStyle,!0,!0));let u={width:0,height:0};if(x(f().flowchart.htmlLabels)){const t=h.children[0],e=i(h);u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}o.info("Text 2",l);const y=l.slice(1,l.length);let p=h.getBBox();const g=c.node().appendChild(await mt(y.join?y.join("<br/>"):y,e.labelStyle,!0,!0));if(x(f().flowchart.htmlLabels)){const t=g.children[0],e=i(g);u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}const b=e.padding/2;return i(g).attr("transform","translate( "+(u.width>p.width?0:(p.width-u.width)/2)+", "+(p.height+b+5)+")"),i(h).attr("transform","translate( "+(u.width<p.width?0:-(p.width-u.width)/2)+", 0)"),u=c.node().getBBox(),c.attr("transform","translate("+-u.width/2+", "+(-u.height/2-b+3)+")"),n.attr("class","outer title-state").attr("x",-u.width/2-b).attr("y",-u.height/2-b).attr("width",u.width+e.padding).attr("height",u.height+e.padding),a.attr("class","divider").attr("x1",-u.width/2-b).attr("x2",u.width/2+b).attr("y1",-u.height/2-b+p.height+b).attr("y2",-u.height/2-b+p.height+b),jt(e,n),e.intersect=function(t){return Ht.rect(e,t)},s},"rectWithTitle"),ye=s(async(t,e)=>{const{shapeSvg:r,bbox:s}=await Kt(t,e,Jt(e,void 0),!0),n=s.height+e.padding,i=s.width+n/4+e.padding,a=r.insert("rect",":first-child").attr("style",e.style).attr("rx",n/2).attr("ry",n/2).attr("x",-i/2).attr("y",-n/2).attr("width",i).attr("height",n);return jt(e,a),e.intersect=function(t){return Ht.rect(e,t)},r},"stadium"),xe=s(async(t,e)=>{const{shapeSvg:r,bbox:s,halfPadding:n}=await Kt(t,e,Jt(e,void 0),!0),i=r.insert("circle",":first-child");return i.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",s.width/2+n).attr("width",s.width+e.padding).attr("height",s.height+e.padding),o.info("Circle main"),jt(e,i),e.intersect=function(t){return o.info("Circle intersect",e,s.width/2+n,t),Ht.circle(e,s.width/2+n,t)},r},"circle"),pe=s(async(t,e)=>{const{shapeSvg:r,bbox:s,halfPadding:n}=await Kt(t,e,Jt(e,void 0),!0),i=r.insert("g",":first-child"),a=i.insert("circle"),c=i.insert("circle");return i.attr("class",e.class),a.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",s.width/2+n+5).attr("width",s.width+e.padding+10).attr("height",s.height+e.padding+10),c.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",s.width/2+n).attr("width",s.width+e.padding).attr("height",s.height+e.padding),o.info("DoubleCircle main"),jt(e,a),e.intersect=function(t){return o.info("DoubleCircle intersect",e,s.width/2+n+5,t),Ht.circle(e,s.width/2+n+5,t)},r},"doublecircle"),ge=s(async(t,e)=>{const{shapeSvg:r,bbox:s}=await Kt(t,e,Jt(e,void 0),!0),n=s.width+e.padding,i=s.height+e.padding,a=[{x:0,y:0},{x:n,y:0},{x:n,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],o=Zt(r,n,i,a);return o.attr("style",e.style),jt(e,o),e.intersect=function(t){return Ht.polygon(e,a,t)},r},"subroutine"),be=s((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),s=r.insert("circle",":first-child");return s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),jt(e,s),e.intersect=function(t){return Ht.circle(e,7,t)},r},"start"),me=s((t,e,r)=>{const s=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let n=70,i=10;"LR"===r&&(n=10,i=70);const a=s.append("rect").attr("x",-1*n/2).attr("y",-1*i/2).attr("width",n).attr("height",i).attr("class","fork-join");return jt(e,a),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return Ht.rect(e,t)},s},"forkJoin"),ke={rhombus:Qt,composite:de,question:Qt,rect:le,labelRect:he,rectWithTitle:fe,choice:Vt,circle:xe,doublecircle:pe,stadium:ye,hexagon:te,block_arrow:ee,rect_left_inv_arrow:re,lean_right:se,lean_left:ne,trapezoid:ie,inv_trapezoid:ae,rect_right_inv_arrow:oe,cylinder:ce,start:be,end:s((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),s=r.insert("circle",":first-child"),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),s.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),jt(e,n),e.intersect=function(t){return Ht.circle(e,7,t)},r},"end"),note:qt,subroutine:ge,fork:me,join:me,class_box:s(async(t,e)=>{var r;const s=e.padding/2;let n;n=e.classes?"node "+e.classes:"node default";const a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),o=a.insert("rect",":first-child"),c=a.insert("line"),l=a.insert("line");let d=0,h=4;const u=a.insert("g").attr("class","label");let y=0;const p=null==(r=e.classData.annotations)?void 0:r[0],g=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",b=u.node().appendChild(await mt(g,e.labelStyle,!0,!0));let m=b.getBBox();if(x(f().flowchart.htmlLabels)){const t=b.children[0],e=i(b);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}e.classData.annotations[0]&&(h+=m.height+4,d+=m.width);let k=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&(f().flowchart.htmlLabels?k+="&lt;"+e.classData.type+"&gt;":k+="<"+e.classData.type+">");const w=u.node().appendChild(await mt(k,e.labelStyle,!0,!0));i(w).attr("class","classTitle");let v=w.getBBox();if(x(f().flowchart.htmlLabels)){const t=w.children[0],e=i(w);v=t.getBoundingClientRect(),e.attr("width",v.width),e.attr("height",v.height)}h+=v.height+4,v.width>d&&(d=v.width);const S=[];e.classData.members.forEach(async t=>{const r=t.getDisplayDetails();let s=r.displayText;f().flowchart.htmlLabels&&(s=s.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const n=u.node().appendChild(await mt(s,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0));let a=n.getBBox();if(x(f().flowchart.htmlLabels)){const t=n.children[0],e=i(n);a=t.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)}a.width>d&&(d=a.width),h+=a.height+4,S.push(n)}),h+=8;const _=[];if(e.classData.methods.forEach(async t=>{const r=t.getDisplayDetails();let s=r.displayText;f().flowchart.htmlLabels&&(s=s.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const n=u.node().appendChild(await mt(s,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0));let a=n.getBBox();if(x(f().flowchart.htmlLabels)){const t=n.children[0],e=i(n);a=t.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)}a.width>d&&(d=a.width),h+=a.height+4,_.push(n)}),h+=8,p){let t=(d-m.width)/2;i(b).attr("transform","translate( "+(-1*d/2+t)+", "+-1*h/2+")"),y=m.height+4}let L=(d-v.width)/2;return i(w).attr("transform","translate( "+(-1*d/2+L)+", "+(-1*h/2+y)+")"),y+=v.height+4,c.attr("class","divider").attr("x1",-d/2-s).attr("x2",d/2+s).attr("y1",-h/2-s+8+y).attr("y2",-h/2-s+8+y),y+=8,S.forEach(t=>{i(t).attr("transform","translate( "+-d/2+", "+(-1*h/2+y+4)+")");const e=null==t?void 0:t.getBBox();y+=((null==e?void 0:e.height)??0)+4}),y+=8,l.attr("class","divider").attr("x1",-d/2-s).attr("x2",d/2+s).attr("y1",-h/2-s+8+y).attr("y2",-h/2-s+8+y),y+=8,_.forEach(t=>{i(t).attr("transform","translate( "+-d/2+", "+(-1*h/2+y)+")");const e=null==t?void 0:t.getBBox();y+=((null==e?void 0:e.height)??0)+4}),o.attr("style",e.style).attr("class","outer title-state").attr("x",-d/2-s).attr("y",-h/2-s).attr("width",d+e.padding).attr("height",h+e.padding),jt(e,o),e.intersect=function(t){return Ht.rect(e,t)},a},"class_box")},we={},ve=s(async(t,e,r)=>{let s,n;if(e.link){let i;"sandbox"===f().securityLevel?i="_top":e.linkTarget&&(i=e.linkTarget||"_blank"),s=t.insert("svg:a").attr("xlink:href",e.link).attr("target",i),n=await ke[e.shape](s,e,r)}else n=await ke[e.shape](t,e,r),s=n;return e.tooltip&&n.attr("title",e.tooltip),e.class&&n.attr("class","node default "+e.class),we[e.id]=s,e.haveCallback&&we[e.id].attr("class",we[e.id].attr("class")+" clickable"),s},"insertNode"),Se=s(t=>{const e=we[t.id];o.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode");function _e(t,e,r=!1){var s,i,a;const o=t;let c="default";((null==(s=null==o?void 0:o.classes)?void 0:s.length)||0)>0&&(c=((null==o?void 0:o.classes)??[]).join(" ")),c+=" flowchart-label";let l,d=0,h="";switch(o.type){case"round":d=5,h="rect";break;case"composite":d=0,h="composite",l=0;break;case"square":case"group":default:h="rect";break;case"diamond":h="question";break;case"hexagon":h="hexagon";break;case"block_arrow":h="block_arrow";break;case"odd":case"rect_left_inv_arrow":h="rect_left_inv_arrow";break;case"lean_right":h="lean_right";break;case"lean_left":h="lean_left";break;case"trapezoid":h="trapezoid";break;case"inv_trapezoid":h="inv_trapezoid";break;case"circle":h="circle";break;case"ellipse":h="ellipse";break;case"stadium":h="stadium";break;case"subroutine":h="subroutine";break;case"cylinder":h="cylinder";break;case"doublecircle":h="doublecircle"}const u=S((null==o?void 0:o.styles)??[]),f=o.label,y=o.size??{width:0,height:0,x:0,y:0};return{labelStyle:u.labelStyle,shape:h,labelText:f,rx:d,ry:d,class:c,style:u.style,id:o.id,directions:o.directions,width:y.width,height:y.height,x:y.x,y:y.y,positioned:r,intersect:void 0,type:o.type,padding:l??(null==(a=null==(i=n())?void 0:i.block)?void 0:a.padding)??0}}async function Le(t,e,r){const s=_e(e,0,!1);if("group"===s.type)return;const i=n(),a=await ve(t,s,{config:i}),o=a.node().getBBox(),c=r.getBlock(s.id);c.size={width:o.width,height:o.height,x:0,y:0,node:a},r.setBlock(c),a.remove()}async function Ee(t,e,r){const s=_e(e,0,!0);if("space"!==r.getBlock(s.id).type){const r=n();await ve(t,s,{config:r}),e.intersect=null==s?void 0:s.intersect,Se(s)}}async function De(t,e,r,s){for(const n of e)await s(t,n,r),n.children&&await De(t,n.children,r,s)}async function $e(t,e,r){await De(t,e,r,Le)}async function Ne(t,e,r){await De(t,e,r,Ee)}async function Te(t,e,r,s,n){const i=new L({multigraph:!0,compound:!0});i.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const a of r)a.size&&i.setNode(a.id,{width:a.size.width,height:a.size.height,intersect:a.intersect});for(const a of e)if(a.start&&a.end){const e=s.getBlock(a.start),r=s.getBlock(a.end);if((null==e?void 0:e.size)&&(null==r?void 0:r.size)){const s=e.size,o=r.size,c=[{x:s.x,y:s.y},{x:s.x+(o.x-s.x)/2,y:s.y+(o.y-s.y)/2},{x:o.x,y:o.y}];Ot(t,{v:a.start,w:a.end,name:a.id},{...a,arrowTypeEnd:a.arrowTypeEnd,arrowTypeStart:a.arrowTypeStart,points:c,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",i,n),a.label&&(await Lt(t,{...a,label:a.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:a.arrowTypeEnd,arrowTypeStart:a.arrowTypeStart,points:c,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),Dt({...a,x:c[1].x,y:c[1].y},{originalPath:c}))}}}s(_e,"getNodeFromBlock"),s(Le,"calculateBlockSize"),s(Ee,"insertBlockPositioned"),s(De,"performOperations"),s($e,"calculateBlockSizes"),s(Ne,"insertBlocks"),s(Te,"insertEdges");var Oe=s(function(t,e){return e.db.getClasses()},"getClasses"),Ie={parser:$,db:nt,renderer:{draw:s(async function(t,e,r,s){const{securityLevel:c,block:l}=n(),d=s.db;let h;"sandbox"===c&&(h=i("#i"+e));const u=i("sandbox"===c?h.nodes()[0].contentDocument.body:"body"),f="sandbox"===c?u.select(`[id="${e}"]`):i(`[id="${e}"]`);lt(f,["point","circle","cross"],s.type,e);const y=d.getBlocks(),x=d.getBlocksFlat(),p=d.getEdges(),g=f.insert("g").attr("class","block");await $e(g,y,d);const b=pt(d);if(await Ne(g,y,d),await Te(g,p,x,d,e),b){const t=b,e=Math.max(1,Math.round(t.width/t.height*.125)),r=t.height+e+10,s=t.width+10,{useMaxWidth:n}=l;a(f,r,s,!!n),o.debug("Here Bounds",b,t),f.attr("viewBox",`${t.x-5} ${t.y-5} ${t.width+10} ${t.height+10}`)}},"draw"),getClasses:Oe},styles:at};export{Ie as diagram};
@@ -0,0 +1 @@
1
+ var e,t;import{g as s,d as i}from"./chunk-TZMSLE5B-BlXDqp8M.js";import{s as n,g as r,a,b as l,_ as o,c as u,d as h,l as f,e as d,f as _,h as b,i as p,j as E,w as y,k as m,m as A}from"./index-PxdJoyNn.js";var x=function(){var e=o(function(e,t,s,i){for(s=s||{},i=e.length;i--;s[e[i]]=t);return s},"o"),t=[1,24],s=[1,25],i=[1,26],n=[1,27],r=[1,28],a=[1,63],l=[1,64],u=[1,65],h=[1,66],f=[1,67],d=[1,68],_=[1,69],b=[1,29],p=[1,30],E=[1,31],y=[1,32],m=[1,33],A=[1,34],x=[1,35],O=[1,36],T=[1,37],v=[1,38],g=[1,39],C=[1,40],R=[1,41],k=[1,42],S=[1,43],N=[1,44],j=[1,45],w=[1,46],D=[1,47],B=[1,48],I=[1,50],M=[1,51],U=[1,52],L=[1,53],P=[1,54],Y=[1,55],F=[1,56],X=[1,57],Q=[1,58],W=[1,59],q=[1,60],z=[14,42],H=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],G=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],V=[1,82],K=[1,83],J=[1,84],Z=[1,85],$=[12,14,42],ee=[12,14,33,42],te=[12,14,33,42,76,77,79,80],se=[12,33],ie=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ne={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:o(function(e,t,s,i,n,r,a){var l=r.length-1;switch(n){case 3:i.setDirection("TB");break;case 4:i.setDirection("BT");break;case 5:i.setDirection("RL");break;case 6:i.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:i.setC4Type(r[l-3]);break;case 19:i.setTitle(r[l].substring(6)),this.$=r[l].substring(6);break;case 20:i.setAccDescription(r[l].substring(15)),this.$=r[l].substring(15);break;case 21:this.$=r[l].trim(),i.setTitle(this.$);break;case 22:case 23:this.$=r[l].trim(),i.setAccDescription(this.$);break;case 28:r[l].splice(2,0,"ENTERPRISE"),i.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 29:r[l].splice(2,0,"SYSTEM"),i.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 30:i.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 31:r[l].splice(2,0,"CONTAINER"),i.addContainerBoundary(...r[l]),this.$=r[l];break;case 32:i.addDeploymentNode("node",...r[l]),this.$=r[l];break;case 33:i.addDeploymentNode("nodeL",...r[l]),this.$=r[l];break;case 34:i.addDeploymentNode("nodeR",...r[l]),this.$=r[l];break;case 35:i.popBoundaryParseStack();break;case 39:i.addPersonOrSystem("person",...r[l]),this.$=r[l];break;case 40:i.addPersonOrSystem("external_person",...r[l]),this.$=r[l];break;case 41:i.addPersonOrSystem("system",...r[l]),this.$=r[l];break;case 42:i.addPersonOrSystem("system_db",...r[l]),this.$=r[l];break;case 43:i.addPersonOrSystem("system_queue",...r[l]),this.$=r[l];break;case 44:i.addPersonOrSystem("external_system",...r[l]),this.$=r[l];break;case 45:i.addPersonOrSystem("external_system_db",...r[l]),this.$=r[l];break;case 46:i.addPersonOrSystem("external_system_queue",...r[l]),this.$=r[l];break;case 47:i.addContainer("container",...r[l]),this.$=r[l];break;case 48:i.addContainer("container_db",...r[l]),this.$=r[l];break;case 49:i.addContainer("container_queue",...r[l]),this.$=r[l];break;case 50:i.addContainer("external_container",...r[l]),this.$=r[l];break;case 51:i.addContainer("external_container_db",...r[l]),this.$=r[l];break;case 52:i.addContainer("external_container_queue",...r[l]),this.$=r[l];break;case 53:i.addComponent("component",...r[l]),this.$=r[l];break;case 54:i.addComponent("component_db",...r[l]),this.$=r[l];break;case 55:i.addComponent("component_queue",...r[l]),this.$=r[l];break;case 56:i.addComponent("external_component",...r[l]),this.$=r[l];break;case 57:i.addComponent("external_component_db",...r[l]),this.$=r[l];break;case 58:i.addComponent("external_component_queue",...r[l]),this.$=r[l];break;case 60:i.addRel("rel",...r[l]),this.$=r[l];break;case 61:i.addRel("birel",...r[l]),this.$=r[l];break;case 62:i.addRel("rel_u",...r[l]),this.$=r[l];break;case 63:i.addRel("rel_d",...r[l]),this.$=r[l];break;case 64:i.addRel("rel_l",...r[l]),this.$=r[l];break;case 65:i.addRel("rel_r",...r[l]),this.$=r[l];break;case 66:i.addRel("rel_b",...r[l]),this.$=r[l];break;case 67:r[l].splice(0,1),i.addRel("rel",...r[l]),this.$=r[l];break;case 68:i.updateElStyle("update_el_style",...r[l]),this.$=r[l];break;case 69:i.updateRelStyle("update_rel_style",...r[l]),this.$=r[l];break;case 70:i.updateLayoutConfig("update_layout_config",...r[l]),this.$=r[l];break;case 71:this.$=[r[l]];break;case 72:r[l].unshift(r[l-1]),this.$=r[l];break;case 73:case 75:this.$=r[l].trim();break;case 74:let e={};e[r[l-1].trim()]=r[l].trim(),this.$=e;break;case 76:this.$=""}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:i,26:n,28:r,29:49,30:61,32:62,34:a,36:l,37:u,38:h,39:f,40:d,41:_,43:23,44:b,45:p,46:E,47:y,48:m,49:A,50:x,51:O,52:T,53:v,54:g,55:C,56:R,57:k,58:S,59:N,60:j,61:w,62:D,63:B,64:I,65:M,66:U,67:L,68:P,69:Y,70:F,71:X,72:Q,73:W,74:q},{13:70,19:20,20:21,21:22,22:t,23:s,24:i,26:n,28:r,29:49,30:61,32:62,34:a,36:l,37:u,38:h,39:f,40:d,41:_,43:23,44:b,45:p,46:E,47:y,48:m,49:A,50:x,51:O,52:T,53:v,54:g,55:C,56:R,57:k,58:S,59:N,60:j,61:w,62:D,63:B,64:I,65:M,66:U,67:L,68:P,69:Y,70:F,71:X,72:Q,73:W,74:q},{13:71,19:20,20:21,21:22,22:t,23:s,24:i,26:n,28:r,29:49,30:61,32:62,34:a,36:l,37:u,38:h,39:f,40:d,41:_,43:23,44:b,45:p,46:E,47:y,48:m,49:A,50:x,51:O,52:T,53:v,54:g,55:C,56:R,57:k,58:S,59:N,60:j,61:w,62:D,63:B,64:I,65:M,66:U,67:L,68:P,69:Y,70:F,71:X,72:Q,73:W,74:q},{13:72,19:20,20:21,21:22,22:t,23:s,24:i,26:n,28:r,29:49,30:61,32:62,34:a,36:l,37:u,38:h,39:f,40:d,41:_,43:23,44:b,45:p,46:E,47:y,48:m,49:A,50:x,51:O,52:T,53:v,54:g,55:C,56:R,57:k,58:S,59:N,60:j,61:w,62:D,63:B,64:I,65:M,66:U,67:L,68:P,69:Y,70:F,71:X,72:Q,73:W,74:q},{13:73,19:20,20:21,21:22,22:t,23:s,24:i,26:n,28:r,29:49,30:61,32:62,34:a,36:l,37:u,38:h,39:f,40:d,41:_,43:23,44:b,45:p,46:E,47:y,48:m,49:A,50:x,51:O,52:T,53:v,54:g,55:C,56:R,57:k,58:S,59:N,60:j,61:w,62:D,63:B,64:I,65:M,66:U,67:L,68:P,69:Y,70:F,71:X,72:Q,73:W,74:q},{14:[1,74]},e(z,[2,13],{43:23,29:49,30:61,32:62,20:75,34:a,36:l,37:u,38:h,39:f,40:d,41:_,44:b,45:p,46:E,47:y,48:m,49:A,50:x,51:O,52:T,53:v,54:g,55:C,56:R,57:k,58:S,59:N,60:j,61:w,62:D,63:B,64:I,65:M,66:U,67:L,68:P,69:Y,70:F,71:X,72:Q,73:W,74:q}),e(z,[2,14]),e(H,[2,16],{12:[1,76]}),e(z,[2,36],{12:[1,77]}),e(G,[2,19]),e(G,[2,20]),{25:[1,78]},{27:[1,79]},e(G,[2,23]),{35:80,75:81,76:V,77:K,79:J,80:Z},{35:86,75:81,76:V,77:K,79:J,80:Z},{35:87,75:81,76:V,77:K,79:J,80:Z},{35:88,75:81,76:V,77:K,79:J,80:Z},{35:89,75:81,76:V,77:K,79:J,80:Z},{35:90,75:81,76:V,77:K,79:J,80:Z},{35:91,75:81,76:V,77:K,79:J,80:Z},{35:92,75:81,76:V,77:K,79:J,80:Z},{35:93,75:81,76:V,77:K,79:J,80:Z},{35:94,75:81,76:V,77:K,79:J,80:Z},{35:95,75:81,76:V,77:K,79:J,80:Z},{35:96,75:81,76:V,77:K,79:J,80:Z},{35:97,75:81,76:V,77:K,79:J,80:Z},{35:98,75:81,76:V,77:K,79:J,80:Z},{35:99,75:81,76:V,77:K,79:J,80:Z},{35:100,75:81,76:V,77:K,79:J,80:Z},{35:101,75:81,76:V,77:K,79:J,80:Z},{35:102,75:81,76:V,77:K,79:J,80:Z},{35:103,75:81,76:V,77:K,79:J,80:Z},{35:104,75:81,76:V,77:K,79:J,80:Z},e($,[2,59]),{35:105,75:81,76:V,77:K,79:J,80:Z},{35:106,75:81,76:V,77:K,79:J,80:Z},{35:107,75:81,76:V,77:K,79:J,80:Z},{35:108,75:81,76:V,77:K,79:J,80:Z},{35:109,75:81,76:V,77:K,79:J,80:Z},{35:110,75:81,76:V,77:K,79:J,80:Z},{35:111,75:81,76:V,77:K,79:J,80:Z},{35:112,75:81,76:V,77:K,79:J,80:Z},{35:113,75:81,76:V,77:K,79:J,80:Z},{35:114,75:81,76:V,77:K,79:J,80:Z},{35:115,75:81,76:V,77:K,79:J,80:Z},{20:116,29:49,30:61,32:62,34:a,36:l,37:u,38:h,39:f,40:d,41:_,43:23,44:b,45:p,46:E,47:y,48:m,49:A,50:x,51:O,52:T,53:v,54:g,55:C,56:R,57:k,58:S,59:N,60:j,61:w,62:D,63:B,64:I,65:M,66:U,67:L,68:P,69:Y,70:F,71:X,72:Q,73:W,74:q},{12:[1,118],33:[1,117]},{35:119,75:81,76:V,77:K,79:J,80:Z},{35:120,75:81,76:V,77:K,79:J,80:Z},{35:121,75:81,76:V,77:K,79:J,80:Z},{35:122,75:81,76:V,77:K,79:J,80:Z},{35:123,75:81,76:V,77:K,79:J,80:Z},{35:124,75:81,76:V,77:K,79:J,80:Z},{35:125,75:81,76:V,77:K,79:J,80:Z},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(z,[2,15]),e(H,[2,17],{21:22,19:130,22:t,23:s,24:i,26:n,28:r}),e(z,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:i,26:n,28:r,34:a,36:l,37:u,38:h,39:f,40:d,41:_,44:b,45:p,46:E,47:y,48:m,49:A,50:x,51:O,52:T,53:v,54:g,55:C,56:R,57:k,58:S,59:N,60:j,61:w,62:D,63:B,64:I,65:M,66:U,67:L,68:P,69:Y,70:F,71:X,72:Q,73:W,74:q}),e(G,[2,21]),e(G,[2,22]),e($,[2,39]),e(ee,[2,71],{75:81,35:132,76:V,77:K,79:J,80:Z}),e(te,[2,73]),{78:[1,133]},e(te,[2,75]),e(te,[2,76]),e($,[2,40]),e($,[2,41]),e($,[2,42]),e($,[2,43]),e($,[2,44]),e($,[2,45]),e($,[2,46]),e($,[2,47]),e($,[2,48]),e($,[2,49]),e($,[2,50]),e($,[2,51]),e($,[2,52]),e($,[2,53]),e($,[2,54]),e($,[2,55]),e($,[2,56]),e($,[2,57]),e($,[2,58]),e($,[2,60]),e($,[2,61]),e($,[2,62]),e($,[2,63]),e($,[2,64]),e($,[2,65]),e($,[2,66]),e($,[2,67]),e($,[2,68]),e($,[2,69]),e($,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(se,[2,28]),e(se,[2,29]),e(se,[2,30]),e(se,[2,31]),e(se,[2,32]),e(se,[2,33]),e(se,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(H,[2,18]),e(z,[2,38]),e(ee,[2,72]),e(te,[2,74]),e($,[2,24]),e($,[2,35]),e(ie,[2,25]),e(ie,[2,26],{12:[1,138]}),e(ie,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:o(function(e,t){if(!t.recoverable){var s=new Error(e);throw s.hash=t,s}this.trace(e)},"parseError"),parse:o(function(e){var t=this,s=[0],i=[],n=[null],r=[],a=this.table,l="",c=0,u=0,h=r.slice.call(arguments,1),f=Object.create(this.lexer),d={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(d.yy[_]=this.yy[_]);f.setInput(e,d.yy),d.yy.lexer=f,d.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var b=f.yylloc;r.push(b);var p=f.options&&f.options.ranges;function E(){var e;return"number"!=typeof(e=i.pop()||f.lex()||1)&&(e instanceof Array&&(e=(i=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(function(e){s.length=s.length-2*e,n.length=n.length-e,r.length=r.length-e},"popStack"),o(E,"lex");for(var y,m,A,x,O,T,v,g,C={};;){if(m=s[s.length-1],this.defaultActions[m]?A=this.defaultActions[m]:(null==y&&(y=E()),A=a[m]&&a[m][y]),void 0===A||!A.length||!A[0]){var R="";for(O in g=[],a[m])this.terminals_[O]&&O>2&&g.push("'"+this.terminals_[O]+"'");R=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+g.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==y?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(R,{text:f.match,token:this.terminals_[y]||y,line:f.yylineno,loc:b,expected:g})}if(A[0]instanceof Array&&A.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+y);switch(A[0]){case 1:s.push(y),n.push(f.yytext),r.push(f.yylloc),s.push(A[1]),y=null,u=f.yyleng,l=f.yytext,c=f.yylineno,b=f.yylloc;break;case 2:if(T=this.productions_[A[1]][1],C.$=n[n.length-T],C._$={first_line:r[r.length-(T||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(T||1)].first_column,last_column:r[r.length-1].last_column},p&&(C._$.range=[r[r.length-(T||1)].range[0],r[r.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[l,u,c,d.yy,A[1],n,r].concat(h))))return x;T&&(s=s.slice(0,-1*T*2),n=n.slice(0,-1*T),r=r.slice(0,-1*T)),s.push(this.productions_[A[1]][0]),n.push(C.$),r.push(C._$),v=a[s[s.length-2]][s[s.length-1]],s.push(v);break;case 3:return!0}}return!0},"parse")},re=function(){return{EOF:1,parseError:o(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:o(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:o(function(e){var t=e.length,s=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var i=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),s.length-1&&(this.yylineno-=s.length-1);var n=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:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:o(function(e){this.unput(this.match.slice(e))},"less"),pastInput:o(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},"showPosition"),test_match:o(function(e,t){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],s=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;var e,t,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if((s=this._input.match(this.rules[n[r]]))&&(!t||s[0].length>t[0].length)){if(t=s,i=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(s,n[r])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var e=this.next();return e||this.lex()},"lex"),begin:o(function(e){this.conditionStack.push(e)},"begin"),popState:o(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(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:o(function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:o(function(e){this.begin(e)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:o(function(e,t,s,i){switch(s){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 73:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 16:case 70:break;case 14:c;break;case 15:return 12;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:case 79:this.popState(),this.popState();break;case 69:case 71:return 80;case 72:this.begin("string");break;case 74:case 80:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}}}();function ae(){this.yy={}}return ne.lexer=re,o(ae,"Parser"),ae.prototype=ne,ne.Parser=ae,new ae}();x.parser=x;var O,T=x,v=[],g=[""],C="global",R="",k=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],S=[],N="",j=!1,w=4,D=2,B=o(function(){return O},"getC4Type"),I=o(function(e){let t=p(e,u());O=t},"setC4Type"),M=o(function(e,t,s,i,n,r,a,l,o){if(null==e||null==t||null==s||null==i)return;let c={};const u=S.find(e=>e.from===t&&e.to===s);if(u?c=u:S.push(c),c.type=e,c.from=t,c.to=s,c.label={text:i},null==n)c.techn={text:""};else if("object"==typeof n){let[e,t]=Object.entries(n)[0];c[e]={text:t}}else c.techn={text:n};if(null==r)c.descr={text:""};else if("object"==typeof r){let[e,t]=Object.entries(r)[0];c[e]={text:t}}else c.descr={text:r};if("object"==typeof a){let[e,t]=Object.entries(a)[0];c[e]=t}else c.sprite=a;if("object"==typeof l){let[e,t]=Object.entries(l)[0];c[e]=t}else c.tags=l;if("object"==typeof o){let[e,t]=Object.entries(o)[0];c[e]=t}else c.link=o;c.wrap=re()},"addRel"),U=o(function(e,t,s,i,n,r,a){if(null===t||null===s)return;let l={};const o=v.find(e=>e.alias===t);if(o&&t===o.alias?l=o:(l.alias=t,v.push(l)),l.label=null==s?{text:""}:{text:s},null==i)l.descr={text:""};else if("object"==typeof i){let[e,t]=Object.entries(i)[0];l[e]={text:t}}else l.descr={text:i};if("object"==typeof n){let[e,t]=Object.entries(n)[0];l[e]=t}else l.sprite=n;if("object"==typeof r){let[e,t]=Object.entries(r)[0];l[e]=t}else l.tags=r;if("object"==typeof a){let[e,t]=Object.entries(a)[0];l[e]=t}else l.link=a;l.typeC4Shape={text:e},l.parentBoundary=C,l.wrap=re()},"addPersonOrSystem"),L=o(function(e,t,s,i,n,r,a,l){if(null===t||null===s)return;let o={};const c=v.find(e=>e.alias===t);if(c&&t===c.alias?o=c:(o.alias=t,v.push(o)),o.label=null==s?{text:""}:{text:s},null==i)o.techn={text:""};else if("object"==typeof i){let[e,t]=Object.entries(i)[0];o[e]={text:t}}else o.techn={text:i};if(null==n)o.descr={text:""};else if("object"==typeof n){let[e,t]=Object.entries(n)[0];o[e]={text:t}}else o.descr={text:n};if("object"==typeof r){let[e,t]=Object.entries(r)[0];o[e]=t}else o.sprite=r;if("object"==typeof a){let[e,t]=Object.entries(a)[0];o[e]=t}else o.tags=a;if("object"==typeof l){let[e,t]=Object.entries(l)[0];o[e]=t}else o.link=l;o.wrap=re(),o.typeC4Shape={text:e},o.parentBoundary=C},"addContainer"),P=o(function(e,t,s,i,n,r,a,l){if(null===t||null===s)return;let o={};const c=v.find(e=>e.alias===t);if(c&&t===c.alias?o=c:(o.alias=t,v.push(o)),o.label=null==s?{text:""}:{text:s},null==i)o.techn={text:""};else if("object"==typeof i){let[e,t]=Object.entries(i)[0];o[e]={text:t}}else o.techn={text:i};if(null==n)o.descr={text:""};else if("object"==typeof n){let[e,t]=Object.entries(n)[0];o[e]={text:t}}else o.descr={text:n};if("object"==typeof r){let[e,t]=Object.entries(r)[0];o[e]=t}else o.sprite=r;if("object"==typeof a){let[e,t]=Object.entries(a)[0];o[e]=t}else o.tags=a;if("object"==typeof l){let[e,t]=Object.entries(l)[0];o[e]=t}else o.link=l;o.wrap=re(),o.typeC4Shape={text:e},o.parentBoundary=C},"addComponent"),Y=o(function(e,t,s,i,n){if(null===e||null===t)return;let r={};const a=k.find(t=>t.alias===e);if(a&&e===a.alias?r=a:(r.alias=e,k.push(r)),r.label=null==t?{text:""}:{text:t},null==s)r.type={text:"system"};else if("object"==typeof s){let[e,t]=Object.entries(s)[0];r[e]={text:t}}else r.type={text:s};if("object"==typeof i){let[e,t]=Object.entries(i)[0];r[e]=t}else r.tags=i;if("object"==typeof n){let[e,t]=Object.entries(n)[0];r[e]=t}else r.link=n;r.parentBoundary=C,r.wrap=re(),R=C,C=e,g.push(R)},"addPersonOrSystemBoundary"),F=o(function(e,t,s,i,n){if(null===e||null===t)return;let r={};const a=k.find(t=>t.alias===e);if(a&&e===a.alias?r=a:(r.alias=e,k.push(r)),r.label=null==t?{text:""}:{text:t},null==s)r.type={text:"container"};else if("object"==typeof s){let[e,t]=Object.entries(s)[0];r[e]={text:t}}else r.type={text:s};if("object"==typeof i){let[e,t]=Object.entries(i)[0];r[e]=t}else r.tags=i;if("object"==typeof n){let[e,t]=Object.entries(n)[0];r[e]=t}else r.link=n;r.parentBoundary=C,r.wrap=re(),R=C,C=e,g.push(R)},"addContainerBoundary"),X=o(function(e,t,s,i,n,r,a,l){if(null===t||null===s)return;let o={};const c=k.find(e=>e.alias===t);if(c&&t===c.alias?o=c:(o.alias=t,k.push(o)),o.label=null==s?{text:""}:{text:s},null==i)o.type={text:"node"};else if("object"==typeof i){let[e,t]=Object.entries(i)[0];o[e]={text:t}}else o.type={text:i};if(null==n)o.descr={text:""};else if("object"==typeof n){let[e,t]=Object.entries(n)[0];o[e]={text:t}}else o.descr={text:n};if("object"==typeof a){let[e,t]=Object.entries(a)[0];o[e]=t}else o.tags=a;if("object"==typeof l){let[e,t]=Object.entries(l)[0];o[e]=t}else o.link=l;o.nodeType=e,o.parentBoundary=C,o.wrap=re(),R=C,C=t,g.push(R)},"addDeploymentNode"),Q=o(function(){C=R,g.pop(),R=g.pop(),g.push(R)},"popBoundaryParseStack"),W=o(function(e,t,s,i,n,r,a,l,o,c,u){let h=v.find(e=>e.alias===t);if(void 0!==h||(h=k.find(e=>e.alias===t),void 0!==h)){if(null!=s)if("object"==typeof s){let[e,t]=Object.entries(s)[0];h[e]=t}else h.bgColor=s;if(null!=i)if("object"==typeof i){let[e,t]=Object.entries(i)[0];h[e]=t}else h.fontColor=i;if(null!=n)if("object"==typeof n){let[e,t]=Object.entries(n)[0];h[e]=t}else h.borderColor=n;if(null!=r)if("object"==typeof r){let[e,t]=Object.entries(r)[0];h[e]=t}else h.shadowing=r;if(null!=a)if("object"==typeof a){let[e,t]=Object.entries(a)[0];h[e]=t}else h.shape=a;if(null!=l)if("object"==typeof l){let[e,t]=Object.entries(l)[0];h[e]=t}else h.sprite=l;if(null!=o)if("object"==typeof o){let[e,t]=Object.entries(o)[0];h[e]=t}else h.techn=o;if(null!=c)if("object"==typeof c){let[e,t]=Object.entries(c)[0];h[e]=t}else h.legendText=c;if(null!=u)if("object"==typeof u){let[e,t]=Object.entries(u)[0];h[e]=t}else h.legendSprite=u}},"updateElStyle"),q=o(function(e,t,s,i,n,r,a){const l=S.find(e=>e.from===t&&e.to===s);if(void 0!==l){if(null!=i)if("object"==typeof i){let[e,t]=Object.entries(i)[0];l[e]=t}else l.textColor=i;if(null!=n)if("object"==typeof n){let[e,t]=Object.entries(n)[0];l[e]=t}else l.lineColor=n;if(null!=r)if("object"==typeof r){let[e,t]=Object.entries(r)[0];l[e]=parseInt(t)}else l.offsetX=parseInt(r);if(null!=a)if("object"==typeof a){let[e,t]=Object.entries(a)[0];l[e]=parseInt(t)}else l.offsetY=parseInt(a)}},"updateRelStyle"),z=o(function(e,t,s){let i=w,n=D;if("object"==typeof t){const e=Object.values(t)[0];i=parseInt(e)}else i=parseInt(t);if("object"==typeof s){const e=Object.values(s)[0];n=parseInt(e)}else n=parseInt(s);i>=1&&(w=i),n>=1&&(D=n)},"updateLayoutConfig"),H=o(function(){return w},"getC4ShapeInRow"),G=o(function(){return D},"getC4BoundaryInRow"),V=o(function(){return C},"getCurrentBoundaryParse"),K=o(function(){return R},"getParentBoundaryParse"),J=o(function(e){return null==e?v:v.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),Z=o(function(e){return v.find(t=>t.alias===e)},"getC4Shape"),$=o(function(e){return Object.keys(J(e))},"getC4ShapeKeys"),ee=o(function(e){return null==e?k:k.filter(t=>t.parentBoundary===e)},"getBoundaries"),te=ee,se=o(function(){return S},"getRels"),ie=o(function(){return N},"getTitle"),ne=o(function(e){j=e},"setWrap"),re=o(function(){return j},"autoWrap"),ae=o(function(){v=[],k=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],R="",C="global",g=[""],S=[],g=[""],N="",j=!1,w=4,D=2},"clear"),le=o(function(e){let t=p(e,u());N=t},"setTitle"),oe={addPersonOrSystem:U,addPersonOrSystemBoundary:Y,addContainer:L,addContainerBoundary:F,addComponent:P,addDeploymentNode:X,popBoundaryParseStack:Q,addRel:M,updateElStyle:W,updateRelStyle:q,updateLayoutConfig:z,autoWrap:re,setWrap:ne,getC4ShapeArray:J,getC4Shape:Z,getC4ShapeKeys:$,getBoundaries:ee,getBoundarys:te,getCurrentBoundaryParse:V,getParentBoundaryParse:K,getRels:se,getTitle:ie,getC4Type:B,getC4ShapeInRow:H,getC4BoundaryInRow:G,setAccTitle:l,getAccTitle:a,getAccDescription:r,setAccDescription:n,getConfig:o(()=>u().c4,"getConfig"),clear:ae,LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:le,setC4Type:I},ce=o(function(e,t){return i(e,t)},"drawRect"),ue=o(function(e,t,s,i,n,r){const a=e.append("image");a.attr("width",t),a.attr("height",s),a.attr("x",i),a.attr("y",n);let l=r.startsWith("data:image/png;base64")?r:E.sanitizeUrl(r);a.attr("xlink:href",l)},"drawImage"),he=o((e,t,s)=>{const i=e.append("g");let n=0;for(let r of t){let e=r.textColor?r.textColor:"#444444",t=r.lineColor?r.lineColor:"#444444",a=r.offsetX?parseInt(r.offsetX):0,l=r.offsetY?parseInt(r.offsetY):0,o="";if(0===n){let e=i.append("line");e.attr("x1",r.startPoint.x),e.attr("y1",r.startPoint.y),e.attr("x2",r.endPoint.x),e.attr("y2",r.endPoint.y),e.attr("stroke-width","1"),e.attr("stroke",t),e.style("fill","none"),"rel_b"!==r.type&&e.attr("marker-end","url("+o+"#arrowhead)"),"birel"!==r.type&&"rel_b"!==r.type||e.attr("marker-start","url("+o+"#arrowend)"),n=-1}else{let e=i.append("path");e.attr("fill","none").attr("stroke-width","1").attr("stroke",t).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",r.startPoint.x).replaceAll("starty",r.startPoint.y).replaceAll("controlx",r.startPoint.x+(r.endPoint.x-r.startPoint.x)/2-(r.endPoint.x-r.startPoint.x)/4).replaceAll("controly",r.startPoint.y+(r.endPoint.y-r.startPoint.y)/2).replaceAll("stopx",r.endPoint.x).replaceAll("stopy",r.endPoint.y)),"rel_b"!==r.type&&e.attr("marker-end","url("+o+"#arrowhead)"),"birel"!==r.type&&"rel_b"!==r.type||e.attr("marker-start","url("+o+"#arrowend)")}let c=s.messageFont();Te(s)(r.label.text,i,Math.min(r.startPoint.x,r.endPoint.x)+Math.abs(r.endPoint.x-r.startPoint.x)/2+a,Math.min(r.startPoint.y,r.endPoint.y)+Math.abs(r.endPoint.y-r.startPoint.y)/2+l,r.label.width,r.label.height,{fill:e},c),r.techn&&""!==r.techn.text&&(c=s.messageFont(),Te(s)("["+r.techn.text+"]",i,Math.min(r.startPoint.x,r.endPoint.x)+Math.abs(r.endPoint.x-r.startPoint.x)/2+a,Math.min(r.startPoint.y,r.endPoint.y)+Math.abs(r.endPoint.y-r.startPoint.y)/2+s.messageFontSize+5+l,Math.max(r.label.width,r.techn.width),r.techn.height,{fill:e,"font-style":"italic"},c))}},"drawRels"),fe=o(function(e,t,s){const i=e.append("g");let n=t.bgColor?t.bgColor:"none",r=t.borderColor?t.borderColor:"#444444",a=t.fontColor?t.fontColor:"black",l={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(l={"stroke-width":1});let o={x:t.x,y:t.y,fill:n,stroke:r,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:l};ce(i,o);let c=s.boundaryFont();c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=a,Te(s)(t.label.text,i,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},c),t.type&&""!==t.type.text&&(c=s.boundaryFont(),c.fontColor=a,Te(s)(t.type.text,i,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},c)),t.descr&&""!==t.descr.text&&(c=s.boundaryFont(),c.fontSize=c.fontSize-2,c.fontColor=a,Te(s)(t.descr.text,i,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},c))},"drawBoundary"),de=o(function(e,t,i){var n;let r=t.bgColor?t.bgColor:i[t.typeC4Shape.text+"_bg_color"],a=t.borderColor?t.borderColor:i[t.typeC4Shape.text+"_border_color"],l=t.fontColor?t.fontColor:"#FFFFFF",o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(t.typeC4Shape.text){case"person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}const c=e.append("g");c.attr("class","person-man");const u=s();switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":u.x=t.x,u.y=t.y,u.fill=r,u.width=t.width,u.height=t.height,u.stroke=a,u.rx=2.5,u.ry=2.5,u.attrs={"stroke-width":.5},ce(c,u);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":c.append("path").attr("fill",r).attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),c.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":c.append("path").attr("fill",r).attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),c.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2))}let h=Oe(i,t.typeC4Shape.text);switch(c.append("text").attr("fill",l).attr("font-family",h.fontFamily).attr("font-size",h.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",t.typeC4Shape.width).attr("x",t.x+t.width/2-t.typeC4Shape.width/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":ue(c,48,48,t.x+t.width/2-24,t.y+t.image.Y,o)}let f=i[t.typeC4Shape.text+"Font"]();return f.fontWeight="bold",f.fontSize=f.fontSize+2,f.fontColor=l,Te(i)(t.label.text,c,t.x,t.y+t.label.Y,t.width,t.height,{fill:l},f),f=i[t.typeC4Shape.text+"Font"](),f.fontColor=l,t.techn&&""!==(null==(n=t.techn)?void 0:n.text)?Te(i)(t.techn.text,c,t.x,t.y+t.techn.Y,t.width,t.height,{fill:l,"font-style":"italic"},f):t.type&&""!==t.type.text&&Te(i)(t.type.text,c,t.x,t.y+t.type.Y,t.width,t.height,{fill:l,"font-style":"italic"},f),t.descr&&""!==t.descr.text&&(f=i.personFont(),f.fontColor=l,Te(i)(t.descr.text,c,t.x,t.y+t.descr.Y,t.width,t.height,{fill:l},f)),t.height},"drawC4Shape"),_e=o(function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),be=o(function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),pe=o(function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),Ee=o(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),ye=o(function(e){e.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),me=o(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),Ae=o(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),xe=o(function(e){const t=e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);t.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),t.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),Oe=o((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"getC4ShapeFont"),Te=function(){function e(e,t,s,n,r,a,l){i(t.append("text").attr("x",s+r/2).attr("y",n+a/2+5).style("text-anchor","middle").text(e),l)}function t(e,t,s,n,r,a,l,o){const{fontSize:c,fontFamily:u,fontWeight:h}=o,f=e.split(m.lineBreakRegex);for(let d=0;d<f.length;d++){const e=d*c-c*(f.length-1)/2,a=t.append("text").attr("x",s+r/2).attr("y",n).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",c).style("font-weight",h).style("font-family",u);a.append("tspan").attr("dy",e).text(f[d]).attr("alignment-baseline","mathematical"),i(a,l)}}function s(e,s,n,r,a,l,o,c){const u=s.append("switch"),h=u.append("foreignObject").attr("x",n).attr("y",r).attr("width",a).attr("height",l).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(e),t(e,u,n,r,a,0,o,c),i(h,o)}function i(e,t){for(const s in t)t.hasOwnProperty(s)&&e.attr(s,t[s])}return o(e,"byText"),o(t,"byTspan"),o(s,"byFo"),o(i,"_setTextAttrs"),function(i){return"fo"===i.textPlacement?s:"old"===i.textPlacement?e:t}}(),ve={drawRect:ce,drawBoundary:fe,drawC4Shape:de,drawRels:he,drawImage:ue,insertArrowHead:Ee,insertArrowEnd:ye,insertArrowFilledHead:me,insertDynamicNumber:Ae,insertArrowCrossHead:xe,insertDatabaseIcon:_e,insertComputerIcon:be,insertClockIcon:pe},ge=0,Ce=0,Re=4,ke=2;x.yy=oe;var Se={},Ne=(o(e=class{constructor(e){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,je(e.db.getConfig())}setData(e,t,s,i){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=t,this.nextData.starty=this.data.starty=s,this.nextData.stopy=this.data.stopy=i}updateVal(e,t,s,i){void 0===e[t]?e[t]=s:e[t]=i(s,e[t])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let t=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+e.margin:this.nextData.stopx+2*e.margin,s=t+e.width,i=this.nextData.starty+2*e.margin,n=i+e.height;(t>=this.data.widthLimit||s>=this.data.widthLimit||this.nextData.cnt>Re)&&(t=this.nextData.startx+e.margin+Se.nextLinePaddingX,i=this.nextData.stopy+2*e.margin,this.nextData.stopx=s=t+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=n=i+e.height,this.nextData.cnt=1),e.x=t,e.y=i,this.updateVal(this.data,"startx",t,Math.min),this.updateVal(this.data,"starty",i,Math.min),this.updateVal(this.data,"stopx",s,Math.max),this.updateVal(this.data,"stopy",n,Math.max),this.updateVal(this.nextData,"startx",t,Math.min),this.updateVal(this.nextData,"starty",i,Math.min),this.updateVal(this.nextData,"stopx",s,Math.max),this.updateVal(this.nextData,"stopy",n,Math.max)}init(e){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},je(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},"Bounds"),e),je=o(function(e){_(Se,e),e.fontFamily&&(Se.personFontFamily=Se.systemFontFamily=Se.messageFontFamily=e.fontFamily),e.fontSize&&(Se.personFontSize=Se.systemFontSize=Se.messageFontSize=e.fontSize),e.fontWeight&&(Se.personFontWeight=Se.systemFontWeight=Se.messageFontWeight=e.fontWeight)},"setConf"),we=o((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),De=o(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),Be=o(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont");function Ie(e,t,s,i,n){if(!t[e].width)if(s)t[e].text=y(t[e].text,n,i),t[e].textLines=t[e].text.split(m.lineBreakRegex).length,t[e].width=n,t[e].height=A(t[e].text,i);else{let s=t[e].text.split(m.lineBreakRegex);t[e].textLines=s.length;let n=0;t[e].height=0,t[e].width=0;for(const r of s)t[e].width=Math.max(b(r,i),t[e].width),n=A(r,i),t[e].height=t[e].height+n}}o(Ie,"calcC4ShapeTextWH");var Me=o(function(e,t,s){t.x=s.data.startx,t.y=s.data.starty,t.width=s.data.stopx-s.data.startx,t.height=s.data.stopy-s.data.starty,t.label.y=Se.c4ShapeMargin-35;let i=t.wrap&&Se.wrap,n=De(Se);n.fontSize=n.fontSize+2,n.fontWeight="bold",Ie("label",t,i,n,b(t.label.text,n)),ve.drawBoundary(e,t,Se)},"drawBoundary"),Ue=o(function(e,t,s,i){let n=0;for(const r of i){n=0;const i=s[r];let a=we(Se,i.typeC4Shape.text);switch(a.fontSize=a.fontSize-2,i.typeC4Shape.width=b("«"+i.typeC4Shape.text+"»",a),i.typeC4Shape.height=a.fontSize+2,i.typeC4Shape.Y=Se.c4ShapePadding,n=i.typeC4Shape.Y+i.typeC4Shape.height-4,i.image={width:0,height:0,Y:0},i.typeC4Shape.text){case"person":case"external_person":i.image.width=48,i.image.height=48,i.image.Y=n,n=i.image.Y+i.image.height}i.sprite&&(i.image.width=48,i.image.height=48,i.image.Y=n,n=i.image.Y+i.image.height);let l=i.wrap&&Se.wrap,o=Se.width-2*Se.c4ShapePadding,c=we(Se,i.typeC4Shape.text);if(c.fontSize=c.fontSize+2,c.fontWeight="bold",Ie("label",i,l,c,o),i.label.Y=n+8,n=i.label.Y+i.label.height,i.type&&""!==i.type.text){i.type.text="["+i.type.text+"]",Ie("type",i,l,we(Se,i.typeC4Shape.text),o),i.type.Y=n+5,n=i.type.Y+i.type.height}else if(i.techn&&""!==i.techn.text){i.techn.text="["+i.techn.text+"]",Ie("techn",i,l,we(Se,i.techn.text),o),i.techn.Y=n+5,n=i.techn.Y+i.techn.height}let u=n,h=i.label.width;if(i.descr&&""!==i.descr.text){Ie("descr",i,l,we(Se,i.typeC4Shape.text),o),i.descr.Y=n+20,n=i.descr.Y+i.descr.height,h=Math.max(i.label.width,i.descr.width),u=n-5*i.descr.textLines}h+=Se.c4ShapePadding,i.width=Math.max(i.width||Se.width,h,Se.width),i.height=Math.max(i.height||Se.height,u,Se.height),i.margin=i.margin||Se.c4ShapeMargin,e.insert(i),ve.drawC4Shape(t,i,Se)}e.bumpLastMargin(Se.c4ShapeMargin)},"drawC4ShapeArray"),Le=(o(t=class{constructor(e,t){this.x=e,this.y=t}},"Point"),t),Pe=o(function(e,t){let s=e.x,i=e.y,n=t.x,r=t.y,a=s+e.width/2,l=i+e.height/2,o=Math.abs(s-n),c=Math.abs(i-r),u=c/o,h=e.height/e.width,f=null;return i==r&&s<n?f=new Le(s+e.width,l):i==r&&s>n?f=new Le(s,l):s==n&&i<r?f=new Le(a,i+e.height):s==n&&i>r&&(f=new Le(a,i)),s>n&&i<r?f=h>=u?new Le(s,l+u*e.width/2):new Le(a-o/c*e.height/2,i+e.height):s<n&&i<r?f=h>=u?new Le(s+e.width,l+u*e.width/2):new Le(a+o/c*e.height/2,i+e.height):s<n&&i>r?f=h>=u?new Le(s+e.width,l-u*e.width/2):new Le(a+e.height/2*o/c,i):s>n&&i>r&&(f=h>=u?new Le(s,l-e.width/2*u):new Le(a-e.height/2*o/c,i)),f},"getIntersectPoint"),Ye=o(function(e,t){let s={x:0,y:0};s.x=t.x+t.width/2,s.y=t.y+t.height/2;let i=Pe(e,s);return s.x=e.x+e.width/2,s.y=e.y+e.height/2,{startPoint:i,endPoint:Pe(t,s)}},"getIntersectPoints"),Fe=o(function(e,t,s,i){let n=0;for(let r of t){n+=1;let e=r.wrap&&Se.wrap,t=Be(Se);"C4Dynamic"===i.db.getC4Type()&&(r.label.text=n+": "+r.label.text);let a=b(r.label.text,t);Ie("label",r,e,t,a),r.techn&&""!==r.techn.text&&(a=b(r.techn.text,t),Ie("techn",r,e,t,a)),r.descr&&""!==r.descr.text&&(a=b(r.descr.text,t),Ie("descr",r,e,t,a));let l=s(r.from),o=s(r.to),c=Ye(l,o);r.startPoint=c.startPoint,r.endPoint=c.endPoint}ve.drawRels(e,t,Se)},"drawRels");function Xe(e,t,s,i,n){let r=new Ne(n);r.data.widthLimit=s.data.widthLimit/Math.min(ke,i.length);for(let[a,l]of i.entries()){let i=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=i,i=l.image.Y+l.image.height);let o=l.wrap&&Se.wrap,c=De(Se);if(c.fontSize=c.fontSize+2,c.fontWeight="bold",Ie("label",l,o,c,r.data.widthLimit),l.label.Y=i+8,i=l.label.Y+l.label.height,l.type&&""!==l.type.text){l.type.text="["+l.type.text+"]",Ie("type",l,o,De(Se),r.data.widthLimit),l.type.Y=i+5,i=l.type.Y+l.type.height}if(l.descr&&""!==l.descr.text){let e=De(Se);e.fontSize=e.fontSize-2,Ie("descr",l,o,e,r.data.widthLimit),l.descr.Y=i+20,i=l.descr.Y+l.descr.height}if(0==a||a%ke===0){let e=s.data.startx+Se.diagramMarginX,t=s.data.stopy+Se.diagramMarginY+i;r.setData(e,e,t,t)}else{let e=r.data.stopx!==r.data.startx?r.data.stopx+Se.diagramMarginX:r.data.startx,t=r.data.starty;r.setData(e,e,t,t)}r.name=l.alias;let u=n.db.getC4ShapeArray(l.alias),h=n.db.getC4ShapeKeys(l.alias);h.length>0&&Ue(r,e,u,h),t=l.alias;let f=n.db.getBoundaries(t);f.length>0&&Xe(e,t,r,f,n),"global"!==l.alias&&Me(e,l,r),s.data.stopy=Math.max(r.data.stopy+Se.c4ShapeMargin,s.data.stopy),s.data.stopx=Math.max(r.data.stopx+Se.c4ShapeMargin,s.data.stopx),ge=Math.max(ge,s.data.stopx),Ce=Math.max(Ce,s.data.stopy)}}o(Xe,"drawInsideBoundary");var Qe={drawPersonOrSystemArray:Ue,drawBoundary:Me,setConf:je,draw:o(function(e,t,s,i){Se=u().c4;const n=u().securityLevel;let r;"sandbox"===n&&(r=h("#i"+t));const a=h("sandbox"===n?r.nodes()[0].contentDocument.body:"body");let l=i.db;i.db.setWrap(Se.wrap),Re=l.getC4ShapeInRow(),ke=l.getC4BoundaryInRow(),f.debug(`C:${JSON.stringify(Se,null,2)}`);const o="sandbox"===n?a.select(`[id="${t}"]`):h(`[id="${t}"]`);ve.insertComputerIcon(o),ve.insertDatabaseIcon(o),ve.insertClockIcon(o);let c=new Ne(i);c.setData(Se.diagramMarginX,Se.diagramMarginX,Se.diagramMarginY,Se.diagramMarginY),c.data.widthLimit=screen.availWidth,ge=Se.diagramMarginX,Ce=Se.diagramMarginY;const _=i.db.getTitle();Xe(o,"",c,i.db.getBoundaries(""),i),ve.insertArrowHead(o),ve.insertArrowEnd(o),ve.insertArrowCrossHead(o),ve.insertArrowFilledHead(o),Fe(o,i.db.getRels(),i.db.getC4Shape,i),c.data.stopx=ge,c.data.stopy=Ce;const b=c.data;let p=b.stopy-b.starty+2*Se.diagramMarginY;const E=b.stopx-b.startx+2*Se.diagramMarginX;_&&o.append("text").text(_).attr("x",(b.stopx-b.startx)/2-4*Se.diagramMarginX).attr("y",b.starty+Se.diagramMarginY),d(o,p,E,Se.useMaxWidth);const y=_?60:0;o.attr("viewBox",b.startx-Se.diagramMarginX+" -"+(Se.diagramMarginY+y)+" "+E+" "+(p+y)),f.debug("models:",b)},"draw")},We={parser:T,db:oe,renderer:Qe,styles:o(e=>`.person {\n stroke: ${e.personBorder};\n fill: ${e.personBkg};\n }\n`,"getStyles"),init:o(({c4:e,wrap:t})=>{Qe.setConf(e),oe.setWrap(t)},"init")};export{We as diagram};
@@ -0,0 +1 @@
1
+ import{ap as a,aq as s}from"./index-PxdJoyNn.js";const o=(o,p)=>a.lang.round(s.parse(o)[p]);export{o as c};
@@ -0,0 +1 @@
1
+ import{_ as l}from"./index-PxdJoyNn.js";function n(l,n){var o,p,u;l.accDescr&&(null==(o=n.setAccDescription)||o.call(n,l.accDescr)),l.accTitle&&(null==(p=n.setAccTitle)||p.call(n,l.accTitle)),l.title&&(null==(u=n.setDiagramTitle)||u.call(n,l.title))}l(n,"populateCommonDb");export{n as p};
@@ -0,0 +1 @@
1
+ import{_ as a,d as e}from"./index-PxdJoyNn.js";var r=a((a,r)=>{let d;"sandbox"===r&&(d=e("#i"+a));return e("sandbox"===r?d.nodes()[0].contentDocument.body:"body").select(`[id="${a}"]`)},"getDiagramElement");export{r as g};
@@ -0,0 +1 @@
1
+ var t,s;import{g as e}from"./chunk-FMBD7UC4-DHQTSncN.js";import{g as i}from"./chunk-55IACEB6-BrPAEmD2.js";import{s as u}from"./chunk-QN33PNHL-C_u6j8ll.js";import{_ as n,l as a,c as r,o as c,r as h,u as o,d as l,b as A,a as E,s as d,g as C,p,q as F,k as D,y as B,x as f,i as b,Q as k}from"./index-PxdJoyNn.js";var T=function(){var t=n(function(t,s,e,i){for(e=e||{},i=t.length;i--;e[t[i]]=s);return e},"o"),s=[1,18],e=[1,19],i=[1,20],u=[1,41],a=[1,42],r=[1,26],c=[1,24],h=[1,25],o=[1,32],l=[1,33],A=[1,34],E=[1,45],d=[1,35],C=[1,36],p=[1,37],F=[1,38],D=[1,27],B=[1,28],f=[1,29],b=[1,30],k=[1,31],T=[1,44],m=[1,46],_=[1,43],S=[1,47],g=[1,9],y=[1,8,9],N=[1,58],L=[1,59],v=[1,60],I=[1,61],O=[1,62],$=[1,63],w=[1,64],R=[1,8,9,41],x=[1,76],P=[1,8,9,12,13,22,39,41,44,68,69,70,71,72,73,74,79,81],M=[1,8,9,12,13,18,20,22,39,41,44,50,60,68,69,70,71,72,73,74,79,81,86,100,102,103],G=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],K=[13,60,68,69,70,71,72,86,100,102,103],Y=[1,100],j=[1,117],Q=[1,113],z=[1,109],H=[1,115],X=[1,110],q=[1,111],W=[1,112],J=[1,114],V=[1,116],Z=[22,48,60,61,82,86,87,88,89,90],tt=[1,8,9,39,41,44],st=[1,8,9,22],et=[1,145],it=[1,8,9,61],ut=[1,8,9,22,48,60,61,82,86,87,88,89,90],nt={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,emptyBody:47,SPACE:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",48:"SPACE",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[43,2],[43,3],[47,0],[47,2],[47,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:n(function(t,s,e,i,u,n,a){var r=n.length-1;switch(u){case 8:this.$=n[r-1];break;case 9:case 10:case 13:case 15:this.$=n[r];break;case 11:case 14:this.$=n[r-2]+"."+n[r];break;case 12:case 16:case 100:this.$=n[r-1]+n[r];break;case 17:case 18:this.$=n[r-1]+"~"+n[r]+"~";break;case 19:i.addRelation(n[r]);break;case 20:n[r-1].title=i.cleanupLabel(n[r]),i.addRelation(n[r-1]);break;case 31:this.$=n[r].trim(),i.setAccTitle(this.$);break;case 32:case 33:this.$=n[r].trim(),i.setAccDescription(this.$);break;case 34:i.addClassesToNamespace(n[r-3],n[r-1]);break;case 35:i.addClassesToNamespace(n[r-4],n[r-1]);break;case 36:this.$=n[r],i.addNamespace(n[r]);break;case 37:case 51:case 64:case 97:this.$=[n[r]];break;case 38:this.$=[n[r-1]];break;case 39:n[r].unshift(n[r-2]),this.$=n[r];break;case 41:i.setCssClass(n[r-2],n[r]);break;case 42:i.addMembers(n[r-3],n[r-1]);break;case 44:i.setCssClass(n[r-5],n[r-3]),i.addMembers(n[r-5],n[r-1]);break;case 45:this.$=n[r],i.addClass(n[r]);break;case 46:this.$=n[r-1],i.addClass(n[r-1]),i.setClassLabel(n[r-1],n[r]);break;case 50:i.addAnnotation(n[r],n[r-2]);break;case 52:n[r].push(n[r-1]),this.$=n[r];break;case 53:case 55:case 56:break;case 54:i.addMember(n[r-1],i.cleanupLabel(n[r]));break;case 57:this.$={id1:n[r-2],id2:n[r],relation:n[r-1],relationTitle1:"none",relationTitle2:"none"};break;case 58:this.$={id1:n[r-3],id2:n[r],relation:n[r-1],relationTitle1:n[r-2],relationTitle2:"none"};break;case 59:this.$={id1:n[r-3],id2:n[r],relation:n[r-2],relationTitle1:"none",relationTitle2:n[r-1]};break;case 60:this.$={id1:n[r-4],id2:n[r],relation:n[r-2],relationTitle1:n[r-3],relationTitle2:n[r-1]};break;case 61:i.addNote(n[r],n[r-1]);break;case 62:i.addNote(n[r]);break;case 63:this.$=n[r-2],i.defineClass(n[r-1],n[r]);break;case 65:this.$=n[r-2].concat([n[r]]);break;case 66:i.setDirection("TB");break;case 67:i.setDirection("BT");break;case 68:i.setDirection("RL");break;case 69:i.setDirection("LR");break;case 70:this.$={type1:n[r-2],type2:n[r],lineType:n[r-1]};break;case 71:this.$={type1:"none",type2:n[r],lineType:n[r-1]};break;case 72:this.$={type1:n[r-1],type2:"none",lineType:n[r]};break;case 73:this.$={type1:"none",type2:"none",lineType:n[r]};break;case 74:this.$=i.relationType.AGGREGATION;break;case 75:this.$=i.relationType.EXTENSION;break;case 76:this.$=i.relationType.COMPOSITION;break;case 77:this.$=i.relationType.DEPENDENCY;break;case 78:this.$=i.relationType.LOLLIPOP;break;case 79:this.$=i.lineType.LINE;break;case 80:this.$=i.lineType.DOTTED_LINE;break;case 81:case 87:this.$=n[r-2],i.setClickEvent(n[r-1],n[r]);break;case 82:case 88:this.$=n[r-3],i.setClickEvent(n[r-2],n[r-1]),i.setTooltip(n[r-2],n[r]);break;case 83:this.$=n[r-2],i.setLink(n[r-1],n[r]);break;case 84:this.$=n[r-3],i.setLink(n[r-2],n[r-1],n[r]);break;case 85:this.$=n[r-3],i.setLink(n[r-2],n[r-1]),i.setTooltip(n[r-2],n[r]);break;case 86:this.$=n[r-4],i.setLink(n[r-3],n[r-2],n[r]),i.setTooltip(n[r-3],n[r-1]);break;case 89:this.$=n[r-3],i.setClickEvent(n[r-2],n[r-1],n[r]);break;case 90:this.$=n[r-4],i.setClickEvent(n[r-3],n[r-2],n[r-1]),i.setTooltip(n[r-3],n[r]);break;case 91:this.$=n[r-3],i.setLink(n[r-2],n[r]);break;case 92:this.$=n[r-4],i.setLink(n[r-3],n[r-1],n[r]);break;case 93:this.$=n[r-4],i.setLink(n[r-3],n[r-1]),i.setTooltip(n[r-3],n[r]);break;case 94:this.$=n[r-5],i.setLink(n[r-4],n[r-2],n[r]),i.setTooltip(n[r-4],n[r-1]);break;case 95:this.$=n[r-2],i.setCssStyle(n[r-1],n[r]);break;case 96:i.setCssClass(n[r-1],n[r]);break;case 98:n[r-2].push(n[r]),this.$=n[r-2]}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:s,35:e,37:i,38:22,42:u,43:23,46:a,49:r,51:c,52:h,54:o,56:l,57:A,60:E,62:d,63:C,64:p,65:F,75:D,76:B,78:f,82:b,83:k,86:T,100:m,102:_,103:S},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(g,[2,5],{8:[1,48]}),{8:[1,49]},t(y,[2,19],{22:[1,50]}),t(y,[2,21]),t(y,[2,22]),t(y,[2,23]),t(y,[2,24]),t(y,[2,25]),t(y,[2,26]),t(y,[2,27]),t(y,[2,28]),t(y,[2,29]),t(y,[2,30]),{34:[1,51]},{36:[1,52]},t(y,[2,33]),t(y,[2,53],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:N,69:L,70:v,71:I,72:O,73:$,74:w}),{39:[1,65]},t(R,[2,40],{39:[1,67],44:[1,66]}),t(y,[2,55]),t(y,[2,56]),{16:68,60:E,86:T,100:m,102:_},{16:39,17:40,19:69,60:E,86:T,100:m,102:_,103:S},{16:39,17:40,19:70,60:E,86:T,100:m,102:_,103:S},{16:39,17:40,19:71,60:E,86:T,100:m,102:_,103:S},{60:[1,72]},{13:[1,73]},{16:39,17:40,19:74,60:E,86:T,100:m,102:_,103:S},{13:x,55:75},{58:77,60:[1,78]},t(y,[2,66]),t(y,[2,67]),t(y,[2,68]),t(y,[2,69]),t(P,[2,13],{16:39,17:40,19:80,18:[1,79],20:[1,81],60:E,86:T,100:m,102:_,103:S}),t(P,[2,15],{20:[1,82]}),{15:83,16:84,17:85,60:E,86:T,100:m,102:_,103:S},{16:39,17:40,19:86,60:E,86:T,100:m,102:_,103:S},t(M,[2,123]),t(M,[2,124]),t(M,[2,125]),t(M,[2,126]),t([1,8,9,12,13,20,22,39,41,44,68,69,70,71,72,73,74,79,81],[2,127]),t(g,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:87,33:s,35:e,37:i,42:u,46:a,49:r,51:c,52:h,54:o,56:l,57:A,60:E,62:d,63:C,64:p,65:F,75:D,76:B,78:f,82:b,83:k,86:T,100:m,102:_,103:S}),{5:88,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:s,35:e,37:i,38:22,42:u,43:23,46:a,49:r,51:c,52:h,54:o,56:l,57:A,60:E,62:d,63:C,64:p,65:F,75:D,76:B,78:f,82:b,83:k,86:T,100:m,102:_,103:S},t(y,[2,20]),t(y,[2,31]),t(y,[2,32]),{13:[1,90],16:39,17:40,19:89,60:E,86:T,100:m,102:_,103:S},{53:91,66:56,67:57,68:N,69:L,70:v,71:I,72:O,73:$,74:w},t(y,[2,54]),{67:92,73:$,74:w},t(G,[2,73],{66:93,68:N,69:L,70:v,71:I,72:O}),t(U,[2,74]),t(U,[2,75]),t(U,[2,76]),t(U,[2,77]),t(U,[2,78]),t(K,[2,79]),t(K,[2,80]),{8:[1,95],24:96,40:94,43:23,46:a},{16:97,60:E,86:T,100:m,102:_},{41:[1,99],45:98,51:Y},{50:[1,101]},{13:[1,102]},{13:[1,103]},{79:[1,104],81:[1,105]},{22:j,48:Q,59:106,60:z,82:H,84:107,85:108,86:X,87:q,88:W,89:J,90:V},{60:[1,118]},{13:x,55:119},t(y,[2,62]),t(y,[2,128]),{22:j,48:Q,59:120,60:z,61:[1,121],82:H,84:107,85:108,86:X,87:q,88:W,89:J,90:V},t(Z,[2,64]),{16:39,17:40,19:122,60:E,86:T,100:m,102:_,103:S},t(P,[2,16]),t(P,[2,17]),t(P,[2,18]),{39:[2,36]},{15:124,16:84,17:85,18:[1,123],39:[2,9],60:E,86:T,100:m,102:_,103:S},{39:[2,10]},t(tt,[2,45],{11:125,12:[1,126]}),t(g,[2,7]),{9:[1,127]},t(st,[2,57]),{16:39,17:40,19:128,60:E,86:T,100:m,102:_,103:S},{13:[1,130],16:39,17:40,19:129,60:E,86:T,100:m,102:_,103:S},t(G,[2,72],{66:131,68:N,69:L,70:v,71:I,72:O}),t(G,[2,71]),{41:[1,132]},{24:96,40:133,43:23,46:a},{8:[1,134],41:[2,37]},t(R,[2,41],{39:[1,135]}),{41:[1,136]},t(R,[2,43]),{41:[2,51],45:137,51:Y},{16:39,17:40,19:138,60:E,86:T,100:m,102:_,103:S},t(y,[2,81],{13:[1,139]}),t(y,[2,83],{13:[1,141],77:[1,140]}),t(y,[2,87],{13:[1,142],80:[1,143]}),{13:[1,144]},t(y,[2,95],{61:et}),t(it,[2,97],{85:146,22:j,48:Q,60:z,82:H,86:X,87:q,88:W,89:J,90:V}),t(ut,[2,99]),t(ut,[2,101]),t(ut,[2,102]),t(ut,[2,103]),t(ut,[2,104]),t(ut,[2,105]),t(ut,[2,106]),t(ut,[2,107]),t(ut,[2,108]),t(ut,[2,109]),t(y,[2,96]),t(y,[2,61]),t(y,[2,63],{61:et}),{60:[1,147]},t(P,[2,14]),{15:148,16:84,17:85,60:E,86:T,100:m,102:_,103:S},{39:[2,12]},t(tt,[2,46]),{13:[1,149]},{1:[2,4]},t(st,[2,59]),t(st,[2,58]),{16:39,17:40,19:150,60:E,86:T,100:m,102:_,103:S},t(G,[2,70]),t(y,[2,34]),{41:[1,151]},{24:96,40:152,41:[2,38],43:23,46:a},{45:153,51:Y},t(R,[2,42]),{41:[2,52]},t(y,[2,50]),t(y,[2,82]),t(y,[2,84]),t(y,[2,85],{77:[1,154]}),t(y,[2,88]),t(y,[2,89],{13:[1,155]}),t(y,[2,91],{13:[1,157],77:[1,156]}),{22:j,48:Q,60:z,82:H,84:158,85:108,86:X,87:q,88:W,89:J,90:V},t(ut,[2,100]),t(Z,[2,65]),{39:[2,11]},{14:[1,159]},t(st,[2,60]),t(y,[2,35]),{41:[2,39]},{41:[1,160]},t(y,[2,86]),t(y,[2,90]),t(y,[2,92]),t(y,[2,93],{77:[1,161]}),t(it,[2,98],{85:146,22:j,48:Q,60:z,82:H,86:X,87:q,88:W,89:J,90:V}),t(tt,[2,8]),t(R,[2,44]),t(y,[2,94])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,36],85:[2,10],124:[2,12],127:[2,4],137:[2,52],148:[2,11],152:[2,39]},parseError:n(function(t,s){if(!s.recoverable){var e=new Error(t);throw e.hash=s,e}this.trace(t)},"parseError"),parse:n(function(t){var s=this,e=[0],i=[],u=[null],a=[],r=this.table,c="",h=0,o=0,l=a.slice.call(arguments,1),A=Object.create(this.lexer),E={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(E.yy[d]=this.yy[d]);A.setInput(t,E.yy),E.yy.lexer=A,E.yy.parser=this,void 0===A.yylloc&&(A.yylloc={});var C=A.yylloc;a.push(C);var p=A.options&&A.options.ranges;function F(){var t;return"number"!=typeof(t=i.pop()||A.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=s.symbols_[t]||t),t}"function"==typeof E.yy.parseError?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,n(function(t){e.length=e.length-2*t,u.length=u.length-t,a.length=a.length-t},"popStack"),n(F,"lex");for(var D,B,f,b,k,T,m,_,S={};;){if(B=e[e.length-1],this.defaultActions[B]?f=this.defaultActions[B]:(null==D&&(D=F()),f=r[B]&&r[B][D]),void 0===f||!f.length||!f[0]){var g="";for(k in _=[],r[B])this.terminals_[k]&&k>2&&_.push("'"+this.terminals_[k]+"'");g=A.showPosition?"Parse error on line "+(h+1)+":\n"+A.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[D]||D)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==D?"end of input":"'"+(this.terminals_[D]||D)+"'"),this.parseError(g,{text:A.match,token:this.terminals_[D]||D,line:A.yylineno,loc:C,expected:_})}if(f[0]instanceof Array&&f.length>1)throw new Error("Parse Error: multiple actions possible at state: "+B+", token: "+D);switch(f[0]){case 1:e.push(D),u.push(A.yytext),a.push(A.yylloc),e.push(f[1]),D=null,o=A.yyleng,c=A.yytext,h=A.yylineno,C=A.yylloc;break;case 2:if(T=this.productions_[f[1]][1],S.$=u[u.length-T],S._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},p&&(S._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(b=this.performAction.apply(S,[c,o,h,E.yy,f[1],u,a].concat(l))))return b;T&&(e=e.slice(0,-1*T*2),u=u.slice(0,-1*T),a=a.slice(0,-1*T)),e.push(this.productions_[f[1]][0]),u.push(S.$),a.push(S._$),m=r[e[e.length-2]][e[e.length-1]],e.push(m);break;case 3:return!0}}return!0},"parse")},at=function(){return{EOF:1,parseError:n(function(t,s){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,s)},"parseError"),setInput:n(function(t,s){return this.yy=s||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:n(function(t){var s=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var i=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),e.length-1&&(this.yylineno-=e.length-1);var u=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:e?(e.length===i.length?this.yylloc.first_column:0)+i[i.length-e.length].length-e[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:n(function(t){this.unput(this.match.slice(t))},"less"),pastInput:n(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var t=this.pastInput(),s=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+s+"^"},"showPosition"),test_match:n(function(t,s){var e,i,u;if(this.options.backtrack_lexer&&(u={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&&(u.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,s,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var n in u)this[n]=u[n];return!1}return!1},"test_match"),next:n(function(){if(this.done)return this.EOF;var t,s,e,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),n=0;n<u.length;n++)if((e=this._input.match(this.rules[u[n]]))&&(!s||e[0].length>s[0].length)){if(s=e,i=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,u[n])))return t;if(this._backtrack){s=!1;continue}return!1}if(!this.options.flex)break}return s?!1!==(t=this.test_match(s,u[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:n(function(){var t=this.next();return t||this.lex()},"lex"),begin:n(function(t){this.conditionStack.push(t)},"begin"),popState:n(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:n(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:n(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:n(function(t){this.begin(t)},"pushState"),stateStackSize:n(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:n(function(t,s,e,i){switch(e){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:case 5:case 14:case 31:case 36:case 40:case 47:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 19:case 22:case 24:case 58:case 61:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 35:return 8;case 15:case 16:return 7;case 17:case 37:case 45:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 23:return 80;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;case 30:case 39:return this.popState(),8;case 32:return this.begin("namespace-body"),39;case 33:case 43:return this.popState(),41;case 34:case 44:return"EOF_IN_STRUCT";case 38:return this.begin("class"),46;case 41:return this.popState(),this.popState(),41;case 42:return this.begin("class-body"),39;case 46:return"OPEN_IN_STRUCT";case 48:return"MEMBER";case 49:return 83;case 50:return 75;case 51:return 76;case 52:return 78;case 53:return 54;case 54:return 56;case 55:return 49;case 56:return 50;case 57:return 81;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:case 65:case 66:case 67:return 77;case 68:case 69:return 69;case 70:case 71:return 71;case 72:return 70;case 73:return 68;case 74:return 72;case 75:return 73;case 76:return 74;case 77:return 22;case 78:return 44;case 79:return 100;case 80:return 18;case 81:return"PLUS";case 82:return 87;case 83:return 61;case 84:case 85:return 89;case 86:return 90;case 87:case 88:return"EQUALS";case 89:return 60;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 86;case 94:return 102;case 95:case 96:return 48;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}}}();function rt(){this.yy={}}return nt.lexer=at,n(rt,"Parser"),rt.prototype=nt,nt.Parser=rt,new rt}();T.parser=T;var m=T,_=["#","+","~","-",""],S=(n(t=class{constructor(t,s){this.memberType=s,this.visibility="",this.classifier="",this.text="";const e=b(t,r());this.parseMember(e)}getDisplayDetails(){let t=this.visibility+k(this.id);"method"===this.memberType&&(t+=`(${k(this.parameters.trim())})`,this.returnType&&(t+=" : "+k(this.returnType))),t=t.trim();return{displayText:t,cssStyle:this.parseClassifier()}}parseMember(t){let s="";if("method"===this.memberType){const e=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(e){const t=e[1]?e[1].trim():"";if(_.includes(t)&&(this.visibility=t),this.id=e[2],this.parameters=e[3]?e[3].trim():"",s=e[4]?e[4].trim():"",this.returnType=e[5]?e[5].trim():"",""===s){const t=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(t)&&(s=t,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const e=t.length,i=t.substring(0,1),u=t.substring(e-1);_.includes(i)&&(this.visibility=i),/[$*]/.exec(u)&&(s=u),this.id=t.substring(""===this.visibility?0:1,""===s?e:e-1)}this.classifier=s,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const e=`${this.visibility?"\\"+this.visibility:""}${k(this.id)}${"method"===this.memberType?`(${k(this.parameters)})${this.returnType?" : "+k(this.returnType):""}`:""}`;this.text=e.replaceAll("<","&lt;").replaceAll(">","&gt;"),this.text.startsWith("\\&lt;")&&(this.text=this.text.replace("\\&lt;","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},"ClassMember"),t),g="classId-",y=0,N=n(t=>D.sanitizeText(t,r()),"sanitizeText"),L=(n(s=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=[],this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=n(t=>{let s=l(".mermaidTooltip");null===(s._groups||s)[0][0]&&(s=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0));l(t).select("svg").selectAll("g.node").on("mouseover",t=>{const e=l(t.currentTarget);if(null===e.attr("title"))return;const i=this.getBoundingClientRect();s.transition().duration(200).style("opacity",".9"),s.text(e.attr("title")).style("left",window.scrollX+i.left+(i.right-i.left)/2+"px").style("top",window.scrollY+i.top-14+document.body.scrollTop+"px"),s.html(s.html().replace(/&lt;br\/&gt;/g,"<br/>")),e.classed("hover",!0)}).on("mouseout",t=>{s.transition().duration(500).style("opacity",0);l(t.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=A,this.getAccTitle=E,this.setAccDescription=d,this.getAccDescription=C,this.setDiagramTitle=p,this.getDiagramTitle=F,this.getConfig=n(()=>r().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}splitClassNameAndType(t){const s=D.sanitizeText(t,r());let e="",i=s;if(s.indexOf("~")>0){const t=s.split("~");i=N(t[0]),e=N(t[1])}return{className:i,type:e}}setClassLabel(t,s){const e=D.sanitizeText(t,r());s&&(s=N(s));const{className:i}=this.splitClassNameAndType(e);this.classes.get(i).label=s,this.classes.get(i).text=`${s}${this.classes.get(i).type?`<${this.classes.get(i).type}>`:""}`}addClass(t){const s=D.sanitizeText(t,r()),{className:e,type:i}=this.splitClassNameAndType(s);if(this.classes.has(e))return;const u=D.sanitizeText(e,r());this.classes.set(u,{id:u,type:i,label:u,text:`${u}${i?`&lt;${i}&gt;`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:g+u+"-"+y}),y++}addInterface(t,s){const e={id:`interface${this.interfaces.length}`,label:t,classId:s};this.interfaces.push(e)}lookUpDomId(t){const s=D.sanitizeText(t,r());if(this.classes.has(s))return this.classes.get(s).domId;throw new Error("Class not found: "+s)}clear(){this.relations=[],this.classes=new Map,this.notes=[],this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.direction="TB",B()}getClass(t){return this.classes.get(t)}getClasses(){return this.classes}getRelations(){return this.relations}getNotes(){return this.notes}addRelation(t){a.debug("Adding relation: "+JSON.stringify(t));const s=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];t.relation.type1!==this.relationType.LOLLIPOP||s.includes(t.relation.type2)?t.relation.type2!==this.relationType.LOLLIPOP||s.includes(t.relation.type1)?(this.addClass(t.id1),this.addClass(t.id2)):(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2="interface"+(this.interfaces.length-1)):(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1="interface"+(this.interfaces.length-1)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=D.sanitizeText(t.relationTitle1.trim(),r()),t.relationTitle2=D.sanitizeText(t.relationTitle2.trim(),r()),this.relations.push(t)}addAnnotation(t,s){const e=this.splitClassNameAndType(t).className;this.classes.get(e).annotations.push(s)}addMember(t,s){this.addClass(t);const e=this.splitClassNameAndType(t).className,i=this.classes.get(e);if("string"==typeof s){const t=s.trim();t.startsWith("<<")&&t.endsWith(">>")?i.annotations.push(N(t.substring(2,t.length-2))):t.indexOf(")")>0?i.methods.push(new S(t,"method")):t&&i.members.push(new S(t,"attribute"))}}addMembers(t,s){Array.isArray(s)&&(s.reverse(),s.forEach(s=>this.addMember(t,s)))}addNote(t,s){const e={id:`note${this.notes.length}`,class:s,text:t};this.notes.push(e)}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),N(t.trim())}setCssClass(t,s){t.split(",").forEach(t=>{let e=t;/\d/.exec(t[0])&&(e=g+e);const i=this.classes.get(e);i&&(i.cssClasses+=" "+s)})}defineClass(t,s){for(const e of t){let t=this.styleClasses.get(e);void 0===t&&(t={id:e,styles:[],textStyles:[]},this.styleClasses.set(e,t)),s&&s.forEach(s=>{if(/color/.exec(s)){const e=s.replace("fill","bgFill");t.textStyles.push(e)}t.styles.push(s)}),this.classes.forEach(t=>{t.cssClasses.includes(e)&&t.styles.push(...s.flatMap(t=>t.split(",")))})}}setTooltip(t,s){t.split(",").forEach(t=>{void 0!==s&&(this.classes.get(t).tooltip=N(s))})}getTooltip(t,s){return s&&this.namespaces.has(s)?this.namespaces.get(s).classes.get(t).tooltip:this.classes.get(t).tooltip}setLink(t,s,e){const i=r();t.split(",").forEach(t=>{let u=t;/\d/.exec(t[0])&&(u=g+u);const n=this.classes.get(u);n&&(n.link=o.formatUrl(s,i),"sandbox"===i.securityLevel?n.linkTarget="_top":n.linkTarget="string"==typeof e?N(e):"_blank")}),this.setCssClass(t,"clickable")}setClickEvent(t,s,e){t.split(",").forEach(t=>{this.setClickFunc(t,s,e),this.classes.get(t).haveCallback=!0}),this.setCssClass(t,"clickable")}setClickFunc(t,s,e){const i=D.sanitizeText(t,r());if("loose"!==r().securityLevel)return;if(void 0===s)return;const u=i;if(this.classes.has(u)){const t=this.lookUpDomId(u);let i=[];if("string"==typeof e){i=e.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<i.length;t++){let s=i[t].trim();s.startsWith('"')&&s.endsWith('"')&&(s=s.substr(1,s.length-2)),i[t]=s}}0===i.length&&i.push(t),this.functions.push(()=>{const e=document.querySelector(`[id="${t}"]`);null!==e&&e.addEventListener("click",()=>{o.runFunc(s,...i)},!1)})}}bindFunctions(t){this.functions.forEach(s=>{s(t)})}getDirection(){return this.direction}setDirection(t){this.direction=t}addNamespace(t){this.namespaces.has(t)||(this.namespaces.set(t,{id:t,classes:new Map,children:{},domId:g+t+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(t){return this.namespaces.get(t)}getNamespaces(){return this.namespaces}addClassesToNamespace(t,s){if(this.namespaces.has(t))for(const e of s){const{className:s}=this.splitClassNameAndType(e);this.classes.get(s).parent=t,this.namespaces.get(t).classes.set(s,this.classes.get(s))}}setCssStyle(t,s){const e=this.classes.get(t);if(s&&e)for(const i of s)i.includes(",")?e.styles.push(...i.split(",")):e.styles.push(i)}getArrowMarker(t){let s;switch(t){case 0:s="aggregation";break;case 1:s="extension";break;case 2:s="composition";break;case 3:s="dependency";break;case 4:s="lollipop";break;default:s="none"}return s}getData(){var t;const s=[],e=[],i=r();for(const n of this.namespaces.keys()){const t=this.namespaces.get(n);if(t){const e={id:t.id,label:t.id,isGroup:!0,padding:i.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:i.look};s.push(e)}}for(const n of this.classes.keys()){const t=this.classes.get(n);if(t){const e=t;e.parentId=t.parent,e.look=i.look,s.push(e)}}let u=0;for(const n of this.notes){u++;const a={id:n.id,label:n.text,isGroup:!1,shape:"note",padding:i.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${i.themeVariables.noteBkgColor}`,`stroke: ${i.themeVariables.noteBorderColor}`],look:i.look};s.push(a);const r=(null==(t=this.classes.get(n.class))?void 0:t.id)??"";if(r){const t={id:`edgeNote${u}`,start:n.id,end:r,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:i.look};e.push(t)}}for(const n of this.interfaces){const t={id:n.id,label:n.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:i.look};s.push(t)}u=0;for(const n of this.relations){u++;const t={id:f(n.id1,n.id2,{prefix:"id",counter:u}),start:n.id1,end:n.id2,type:"normal",label:n.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(n.relation.type1),arrowTypeEnd:this.getArrowMarker(n.relation.type2),startLabelRight:"none"===n.relationTitle1?"":n.relationTitle1,endLabelLeft:"none"===n.relationTitle2?"":n.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:n.style||"",pattern:1==n.relation.lineType?"dashed":"solid",look:i.look};e.push(t)}return{nodes:s,edges:e,other:{},config:i,direction:this.getDirection()}}},"ClassDB"),s),v=n(t=>`g.classGroup text {\n fill: ${t.nodeBorder||t.classText};\n stroke: none;\n font-family: ${t.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.nodeLabel, .edgeLabel {\n color: ${t.classText};\n}\n.edgeLabel .label rect {\n fill: ${t.mainBkg};\n}\n.label text {\n fill: ${t.classText};\n}\n\n.labelBkg {\n background: ${t.mainBkg};\n}\n.edgeLabel .label span {\n background: ${t.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${t.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${t.lineColor};\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n#compositionStart, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopStart, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopEnd, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n line-height: initial;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n ${e()}\n`,"getStyles"),I=n((t,s="TB")=>{if(!t.doc)return s;let e=s;for(const i of t.doc)"dir"===i.stmt&&(e=i.value);return e},"getDir"),O={getClasses:n(function(t,s){return s.db.getClasses()},"getClasses"),draw:n(async function(t,s,e,n){a.info("REF0:"),a.info("Drawing class diagram (v3)",s);const{securityLevel:l,state:A,layout:E}=r(),d=n.db.getData(),C=i(s,l);d.type=n.type,d.layoutAlgorithm=c(E),d.nodeSpacing=(null==A?void 0:A.nodeSpacing)||50,d.rankSpacing=(null==A?void 0:A.rankSpacing)||50,d.markers=["aggregation","extension","composition","dependency","lollipop"],d.diagramId=s,await h(d,C);o.insertTitle(C,"classDiagramTitleText",(null==A?void 0:A.titleTopMargin)??25,n.db.getDiagramTitle()),u(C,8,"classDiagram",(null==A?void 0:A.useMaxWidth)??!0)},"draw"),getDir:I};export{L as C,m as a,O as c,v as s};