"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4025],{45021:function(t,e,n){var i;t.exports=(i=n(50969),function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=7)}([function(t,e){t.exports=i},function(t,e,n){var i=n(0).FDLayoutConstants;function o(){}for(var r in i)o[r]=i[r];o.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,o.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,o.DEFAULT_COMPONENT_SEPERATION=60,o.TILE=!0,o.TILING_PADDING_VERTICAL=10,o.TILING_PADDING_HORIZONTAL=10,o.TREE_REDUCTION_ON_INCREMENTAL=!1,t.exports=o},function(t,e,n){var i=n(0).FDLayoutEdge;function o(t,e,n){i.call(this,t,e,n)}for(var r in o.prototype=Object.create(i.prototype),i)o[r]=i[r];t.exports=o},function(t,e,n){var i=n(0).LGraph;function o(t,e,n){i.call(this,t,e,n)}for(var r in o.prototype=Object.create(i.prototype),i)o[r]=i[r];t.exports=o},function(t,e,n){var i=n(0).LGraphManager;function o(t){i.call(this,t)}for(var r in o.prototype=Object.create(i.prototype),i)o[r]=i[r];t.exports=o},function(t,e,n){var i=n(0).FDLayoutNode,o=n(0).IMath;function r(t,e,n,o){i.call(this,t,e,n,o)}for(var a in r.prototype=Object.create(i.prototype),i)r[a]=i[a];r.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*o.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*o.sign(this.displacementY)),null==this.child?this.moveBy(this.displacementX,this.displacementY):0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),t.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},r.prototype.propogateDisplacementToChildren=function(t,e){for(var n,i=this.getChild().getNodes(),o=0;o0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},E.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0){if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0}this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,i=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,i),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},E.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},n=0;n1)for(a=0;ai&&(i=Math.floor(a.y)),r=Math.floor(a.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new g(l.WORLD_CENTER_X-a.x/2,l.WORLD_CENTER_Y-a.y/2))},E.radialLayout=function(t,e,n){var i=Math.max(this.maxDiagonalInTree(t),c.DEFAULT_RADIAL_SEPARATION);E.branchRadialLayout(e,null,0,359,0,i);var o=f.calculateBounds(t),r=new m;r.setDeviceOrgX(o.getMinX()),r.setDeviceOrgY(o.getMinY()),r.setWorldOrgX(n.x),r.setWorldOrgY(n.y);for(var a=0;a1;){var m=f[0];f.splice(0,1);var N=d.indexOf(m);N>=0&&d.splice(N,1),u--,g--}a=null!=e?(d.indexOf(f[0])+1)%u:0;for(var _=Math.abs(i-n)/g,T=a;p!=g;T=++T%u){var L=d[T].getOtherEnd(t);if(L!=e){var v=(n+p*_)%360,w=(v+_)%360;E.branchRadialLayout(L,t,v,w,o+r,r),p++}}},E.maxDiagonalInTree=function(t){for(var e=u.MIN_VALUE,n=0;ne&&(e=i)}return e},E.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},E.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var n=[],i=this.graphManager.getAllNodes(),o=0;o1){var i="DummyCompound_"+n;t.memberGroups[i]=e[n];var o=e[n][0].getParent(),r=new a(t.graphManager);r.id=i,r.paddingLeft=o.paddingLeft||0,r.paddingRight=o.paddingRight||0,r.paddingBottom=o.paddingBottom||0,r.paddingTop=o.paddingTop||0,t.idToDummyNode[i]=r;var s=t.getGraphManager().add(t.newGraph(),r),c=o.getChild();c.add(r);for(var h=0;h=0;t--){var e=this.compoundOrder[t],n=e.id,i=e.paddingLeft,o=e.paddingTop;this.adjustLocations(this.tiledMemberPack[n],e.rect.x,e.rect.y,i,o)}},E.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach(function(n){var i=t.idToDummyNode[n],o=i.paddingLeft,r=i.paddingTop;t.adjustLocations(e[n],i.rect.x,i.rect.y,o,r)})},E.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var n=t.getChild();if(null==n)return this.toBeTiled[e]=!1,!1;for(var i=n.getNodes(),o=0;o0)return this.toBeTiled[e]=!1,!1;if(null==r.getChild()){this.toBeTiled[r.id]=!1;continue}if(!this.getToBeTiled(r))return this.toBeTiled[e]=!1,!1}return this.toBeTiled[e]=!0,!0},E.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),n=0,i=0;ic&&(c=l.rect.height)}n+=c+t.verticalPadding}},E.prototype.tileCompoundMembers=function(t,e){var n=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(i){var o=e[i];n.tiledMemberPack[i]=n.tileNodes(t[i],o.paddingLeft+o.paddingRight),o.rect.width=n.tiledMemberPack[i].width,o.rect.height=n.tiledMemberPack[i].height})},E.prototype.tileNodes=function(t,e){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:c.TILING_PADDING_VERTICAL,horizontalPadding:c.TILING_PADDING_HORIZONTAL};t.sort(function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:t.rect.width*t.rect.height0&&(o+=t.horizontalPadding),t.rowWidth[n]=o,t.width0&&(r+=t.verticalPadding);var a=0;r>t.rowHeight[n]&&(a=t.rowHeight[n],t.rowHeight[n]=r,a=t.rowHeight[n]-a),t.height+=a,t.rows[n].push(e)},E.prototype.getShortestRowIndex=function(t){for(var e=-1,n=Number.MAX_VALUE,i=0;in&&(e=i,n=t.rowWidth[i]);return e},E.prototype.canAddHorizontal=function(t,e,n){var i,o,r=this.getShortestRowIndex(t);if(r<0)return!0;var a=t.rowWidth[r];if(a+t.horizontalPadding+e<=t.width)return!0;var s=0;return t.rowHeight[r]0&&(s=n+t.verticalPadding-t.rowHeight[r]),i=t.width-a>=e+t.horizontalPadding?(t.height+s)/(a+e+t.horizontalPadding):(t.height+s)/t.width,s=n+t.verticalPadding,(o=t.widthr&&e!=n){i.splice(-1,1),t.rows[n].push(o),t.rowWidth[e]=t.rowWidth[e]-r,t.rowWidth[n]=t.rowWidth[n]+r,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var a=Number.MIN_VALUE,s=0;sa&&(a=i[s].height);e>0&&(a+=t.verticalPadding);var c=t.rowHeight[e]+t.rowHeight[n];t.rowHeight[e]=a,t.rowHeight[n]0)for(var g=a;g<=s;g++)d[0]+=this.grid[g][c-1].length+this.grid[g][c].length-1;if(s0)for(var g=c;g<=l;g++)d[3]+=this.grid[a-1][g].length+this.grid[a][g].length-1;for(var p=u.MAX_VALUE,y=0;y0&&(a=n.getGraphManager().add(n.newGraph(),r),this.processChildrenList(a,d,n))}},d.prototype.stop=function(){return this.stopped=!0,this};var p=function(t){t("layout","cose-bilkent",d)};"undefined"!=typeof cytoscape&&p(cytoscape),t.exports=p}]))},21390:function(t,e,n){n.d(e,{a:function(){return h},c:function(){return s}});var i=n(51893),o=n(56858),r=n(54525);function a(t,e,n){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*n-.1+"em").attr("dy",n+"em")}function s(t,e,n){var i;let o=t.append("text"),r=a(o,1,e);c(r,[{content:n,type:"normal"}]);let s=null==(i=r.node())?void 0:i.getBoundingClientRect();return s&&o.remove(),s}function c(t,e){t.text(""),e.forEach((e,n)=>{let i=t.append("tspan").attr("font-style","emphasis"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===n?i.text(e.content):i.text(" "+e.content)})}let h=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",{style:n="",isTitle:s=!1,classes:h="",useHtmlLabels:l=!0,isNode:d=!0,width:g=200,addSvgBackground:p=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(i.l.info("createText",e,n,s,h,l,d,p),!l)return function(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=e.append("g"),r=o.insert("rect").attr("class","background"),s=o.append("text").attr("y","-10.1"),h=0;for(let e of n){let n=e=>(function(t,e,n){let i=t.append("text"),o=a(i,1,1.1);c(o,n);let r=o.node().getComputedTextLength();return i.remove(),r})(o,0,e)<=t;for(let t of n(e)?[e]:function(t,e){if(t.some(t=>{let{content:e}=t;return e.includes("\n")}))throw Error("splitLineToFitWidth does not support newlines in the line");return function t(e,n){var i,o;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(0===e.length)return a.length>0&&r.push(a),r.length>0?r:[];let s="";" "===e[0].content&&(s=" ",e.shift());let c=null!==(i=e.shift())&&void 0!==i?i:{content:" ",type:"normal"},h=[...a];if(""!==s&&h.push({content:s,type:"normal"}),h.push(c),n(h))return t(e,n,r,h);if(a.length>0)r.push(a),e.unshift(c);else if(c.content){let[t,i]=function t(e,n,i,o){if(0===i.length)return[{content:n.join(""),type:o},{content:"",type:o}];let[r,...a]=i,s=[...n,r];return e([{content:s.join(""),type:o}])?t(e,s,a,o):(0===n.length&&r&&(n.push(r),i.shift()),[{content:n.join(""),type:o},{content:i.join(""),type:o}])}(n,[],(o=c.content,Intl.Segmenter?[...new Intl.Segmenter().segment(o)].map(t=>t.segment):[...o]),c.type);r.push([t]),i.content&&e.unshift(i)}return t(e,n,r)}(t,e)}(e,n))c(a(s,h,1.1),t),h++}if(!i)return s.node();{let t=s.node().getBBox();return r.attr("x",-2).attr("y",-2).attr("width",t.width+4).attr("height",t.height+4),o.node()}}(g,t,function(t){let e=function(t){let e=t.replace(/\n{2,}/g,"\n");return(0,r.Z)(e)}(t),{children:n}=(0,o.V)(e),i=[[]],a=0;return n.forEach(t=>{"paragraph"===t.type&&t.children.forEach(t=>{!function t(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal";"text"===e.type?e.value.split("\n").forEach((t,e)=>{0!==e&&(a++,i.push([])),t.split(" ").forEach(t=>{t&&i[a].push({content:t,type:n})})}):("strong"===e.type||"emphasis"===e.type)&&e.children.forEach(n=>{t(n,e.type)})}(t)})}),i}(e),p);{let r=function(t){let{children:e}=(0,o.V)(t);return e.map(function t(e){return"text"===e.type?e.value.replace(/\n/g,"
"):"strong"===e.type?"".concat(e.children.map(t).join(""),""):"emphasis"===e.type?"".concat(e.children.map(t).join(""),""):"paragraph"===e.type?"

".concat(e.children.map(t).join(""),"

"):"Unsupported markdown: ".concat(e.type)}).join("")}(e);return function(t,e,n,i){var o;let r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=t.append("foreignObject"),s=a.append("xhtml:div"),c=e.label,h=e.isNode?"nodeLabel":"edgeLabel";s.html('\n "+c+""),(o=e.labelStyle)&&s.attr("style",o),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("max-width",n+"px"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),r&&s.attr("class","labelBkg");let l=s.node().getBoundingClientRect();return l.width===n&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",n+"px"),l=s.node().getBoundingClientRect()),a.style("width",l.width),a.style("height",l.height),a.node()}(t,{isNode:d,label:(0,i.J)(r).replace(/fa[blrs]?:fa-[\w-]+/g,t=>"")),labelStyle:n.replace("fill:","color:")},g,h,p)}}},74025:function(t,e,n){let i;n.d(e,{diagram:function(){return R}});var o=n(51893),r=n(36783),a=n(21390),s=n(88105),c=n(56670),h=n(62985),l=n(11679),d=n(59554);n(89539),n(99824),n(68985);var g=function(){var t=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},e=[1,4],n=[1,13],i=[1,12],o=[1,15],r=[1,16],a=[1,20],s=[1,19],c=[6,7,8],h=[1,26],l=[1,24],d=[1,25],g=[6,7,11],p=[1,6,13,15,16,19,22],u=[1,33],y=[1,34],f=[1,6,7,11,13,15,16,19,22],m={trace:function(){},yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:function(t,e,n,i,o,r,a){var s=r.length-1;switch(o){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",r[s].id),i.addNode(r[s-1].length,r[s].id,r[s].descr,r[s].type);break;case 16:i.getLogger().trace("Icon: ",r[s]),i.decorateNode({icon:r[s]});break;case 17:case 21:i.decorateNode({class:r[s]});break;case 18:i.getLogger().trace("SPACELIST");break;case 19:i.getLogger().trace("Node: ",r[s].id),i.addNode(0,r[s].id,r[s].descr,r[s].type);break;case 20:i.decorateNode({icon:r[s]});break;case 25:i.getLogger().trace("node found ..",r[s-2]),this.$={id:r[s-1],descr:r[s-1],type:i.getType(r[s-2],r[s])};break;case 26:this.$={id:r[s],descr:r[s],type:i.nodeType.DEFAULT};break;case 27:i.getLogger().trace("node found ..",r[s-3]),this.$={id:r[s-3],descr:r[s-1],type:i.getType(r[s-2],r[s])}}},table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:n,7:[1,10],9:9,12:11,13:i,14:14,15:o,16:r,17:17,18:18,19:a,22:s},t(c,[2,3]),{1:[2,2]},t(c,[2,4]),t(c,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,15:o,16:r,17:17,18:18,19:a,22:s},{6:n,9:22,12:11,13:i,14:14,15:o,16:r,17:17,18:18,19:a,22:s},{6:h,7:l,10:23,11:d},t(g,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:a,22:s}),t(g,[2,18]),t(g,[2,19]),t(g,[2,20]),t(g,[2,21]),t(g,[2,23]),t(g,[2,24]),t(g,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:l,10:32,11:d},{1:[2,7],6:n,12:21,13:i,14:14,15:o,16:r,17:17,18:18,19:a,22:s},t(p,[2,14],{7:u,11:y}),t(f,[2,8]),t(f,[2,9]),t(f,[2,10]),t(g,[2,15]),t(g,[2,16]),t(g,[2,17]),{20:[1,35]},{21:[1,36]},t(p,[2,13],{7:u,11:y}),t(f,[2,11]),t(f,[2,12]),{21:[1,37]},t(g,[2,25]),t(g,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:function(t,e){if(e.recoverable)this.trace(t);else{var n=Error(t);throw n.hash=e,n}},parse:function(t){var e=this,n=[0],i=[],o=[null],r=[],a=this.table,s="",c=0,h=0,l=r.slice.call(arguments,1),d=Object.create(this.lexer),g={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(g.yy[p]=this.yy[p]);d.setInput(t,g.yy),g.yy.lexer=d,g.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var u=d.yylloc;r.push(u);var y=d.options&&d.options.ranges;"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var f,m,E,N,_,T,L,v,w={};;){if(m=n[n.length-1],this.defaultActions[m]?E=this.defaultActions[m]:(null==f&&(f=function(){var t;return"number"!=typeof(t=i.pop()||d.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}()),E=a[m]&&a[m][f]),void 0===E||!E.length||!E[0]){var A="";for(_ in v=[],a[m])this.terminals_[_]&&_>2&&v.push("'"+this.terminals_[_]+"'");A=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[f]||f,line:d.yylineno,loc:u,expected:v})}if(E[0]instanceof Array&&E.length>1)throw Error("Parse Error: multiple actions possible at state: "+m+", token: "+f);switch(E[0]){case 1:n.push(f),o.push(d.yytext),r.push(d.yylloc),n.push(E[1]),f=null,h=d.yyleng,s=d.yytext,c=d.yylineno,u=d.yylloc;break;case 2:if(T=this.productions_[E[1]][1],w.$=o[o.length-T],w._$={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},y&&(w._$.range=[r[r.length-(T||1)].range[0],r[r.length-1].range[1]]),void 0!==(N=this.performAction.apply(w,[s,h,c,g.yy,E[1],o,r].concat(l))))return N;T&&(n=n.slice(0,-1*T*2),o=o.slice(0,-1*T),r=r.slice(0,-1*T)),n.push(this.productions_[E[1]][0]),o.push(w.$),r.push(w._$),L=a[n[n.length-2]][n[n.length-1]],n.push(L);break;case 3:return!0}}return!0}};function E(){this.yy={}}return m.lexer={EOF:1,parseError:function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},setInput: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},input: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},unput:function(t){var e=t.length,n=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 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),n.length-1&&(this.yylineno-=n.length-1);var o=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput: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,"")},showPosition:function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,o;if(this.options.backtrack_lexer&&(o={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&&(o.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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack)for(var r in o)this[r]=o[r];return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,n,i,o=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,o[r])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,o[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})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return t.getLogger().trace("Found comment",e.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return t.getLogger().trace("Long description:",e.yytext),20}},rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}},E.prototype=m,m.Parser=E,new E}();g.parser=g;let p=t=>(0,o.d)(t,(0,o.c)()),u=[],y=0,f={},m=function(t){for(let e=u.length-1;e>=0;e--)if(u[e].level{f[t]=e},_=t=>{switch(t){case E.DEFAULT:return"no-border";case E.RECT:return"rect";case E.ROUNDED_RECT:return"rounded-rect";case E.CIRCLE:return"circle";case E.CLOUD:return"cloud";case E.BANG:return"bang";case E.HEXAGON:return"hexgon";default:return"no-border"}},T=t=>f[t],L=Object.freeze(Object.defineProperty({__proto__:null,addNode:(t,e,n,i)=>{o.l.info("addNode",t,e,n,i);let r=(0,o.c)(),a={id:y++,nodeId:p(e),level:t,descr:p(n),type:i,children:[],width:(0,o.c)().mindmap.maxNodeWidth};switch(a.type){case E.ROUNDED_RECT:case E.RECT:case E.HEXAGON:a.padding=2*r.mindmap.padding;break;default:a.padding=r.mindmap.padding}let s=m(t);if(s)s.children.push(a),u.push(a);else if(0===u.length)u.push(a);else{let t=Error('There can be only one root. No parent could be found for ("'+a.descr+'")');throw t.hash={text:"branch "+name,token:"branch "+name,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+name+'"']},t}},clear:()=>{u=[],y=0,f={}},decorateNode:t=>{let e=u[u.length-1];t&&t.icon&&(e.icon=p(t.icon)),t&&t.class&&(e.class=p(t.class))},getElementById:T,getLogger:()=>o.l,getMindmap:()=>u.length>0?u[0]:null,getNodeById:t=>u[t],getType:(t,e)=>{switch(o.l.debug("In get type",t,e),t){case"[":return E.RECT;case"(":return")"===e?E.ROUNDED_RECT:E.CLOUD;case"((":return E.CIRCLE;case")":return E.CLOUD;case"))":return E.BANG;case"{{":return E.HEXAGON;default:return E.DEFAULT}},nodeType:E,get parseError(){return i},sanitizeText:p,setElementForId:N,setErrorHandler:t=>{i=t},type2Str:_},Symbol.toStringTag,{value:"Module"})),v=function(t,e,n){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+_(e.type)).attr("d","M0 ".concat(e.height-5," v").concat(-e.height+10," q0,-5 5,-5 h").concat(e.width-10," q5,0 5,5 v").concat(e.height-5," H0 Z")),t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},w=function(t,e){t.append("rect").attr("id","node-"+e.id).attr("class","node-bkg node-"+_(e.type)).attr("height",e.height).attr("width",e.width)},A=function(t,e){let n=e.width,i=e.height,o=.15*n,r=.25*n,a=.35*n,s=.2*n;t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+_(e.type)).attr("d","M0 0 a".concat(o,",").concat(o," 0 0,1 ").concat(.25*n,",").concat(-1*n*.1,"\n a").concat(a,",").concat(a," 1 0,1 ").concat(.4*n,",").concat(-1*n*.1,"\n a").concat(r,",").concat(r," 1 0,1 ").concat(.35*n,",").concat(1*n*.2,"\n\n a").concat(o,",").concat(o," 1 0,1 ").concat(.15*n,",").concat(1*i*.35,"\n a").concat(s,",").concat(s," 1 0,1 ").concat(-1*n*.15,",").concat(1*i*.65,"\n\n a").concat(r,",").concat(o," 1 0,1 ").concat(-1*n*.25,",").concat(.15*n,"\n a").concat(a,",").concat(a," 1 0,1 ").concat(-1*n*.5,",",0,"\n a").concat(o,",").concat(o," 1 0,1 ").concat(-1*n*.25,",").concat(-1*n*.15,"\n\n a").concat(o,",").concat(o," 1 0,1 ").concat(-1*n*.1,",").concat(-1*i*.35,"\n a").concat(s,",").concat(s," 1 0,1 ").concat(.1*n,",").concat(-1*i*.65,"\n\n H0 V0 Z"))},D=function(t,e){let n=e.width,i=e.height,o=.15*n;t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+_(e.type)).attr("d","M0 0 a".concat(o,",").concat(o," 1 0,0 ").concat(.25*n,",").concat(-1*i*.1,"\n a").concat(o,",").concat(o," 1 0,0 ").concat(.25*n,",",0,"\n a").concat(o,",").concat(o," 1 0,0 ").concat(.25*n,",",0,"\n a").concat(o,",").concat(o," 1 0,0 ").concat(.25*n,",").concat(1*i*.1,"\n\n a").concat(o,",").concat(o," 1 0,0 ").concat(.15*n,",").concat(1*i*.33,"\n a").concat(.8*o,",").concat(.8*o," 1 0,0 ",0,",").concat(1*i*.34,"\n a").concat(o,",").concat(o," 1 0,0 ").concat(-1*n*.15,",").concat(1*i*.33,"\n\n a").concat(o,",").concat(o," 1 0,0 ").concat(-1*n*.25,",").concat(.15*i,"\n a").concat(o,",").concat(o," 1 0,0 ").concat(-1*n*.25,",",0,"\n a").concat(o,",").concat(o," 1 0,0 ").concat(-1*n*.25,",",0,"\n a").concat(o,",").concat(o," 1 0,0 ").concat(-1*n*.25,",").concat(-1*i*.15,"\n\n a").concat(o,",").concat(o," 1 0,0 ").concat(-1*n*.1,",").concat(-1*i*.33,"\n a").concat(.8*o,",").concat(.8*o," 1 0,0 ",0,",").concat(-1*i*.34,"\n a").concat(o,",").concat(o," 1 0,0 ").concat(.1*n,",").concat(-1*i*.33,"\n\n H0 V0 Z"))},C=function(t,e){t.append("circle").attr("id","node-"+e.id).attr("class","node-bkg node-"+_(e.type)).attr("r",e.width/2)},b=function(t,e){let n=e.height,i=n/4,o=e.width-e.padding+2*i;t.insert("polygon",":first-child").attr("points",[{x:i,y:0},{x:o-i,y:0},{x:o,y:-n/2},{x:o-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}].map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+(e.width-o)/2+", "+n+")")},I=function(t,e){t.append("rect").attr("id","node-"+e.id).attr("class","node-bkg node-"+_(e.type)).attr("height",e.height).attr("rx",e.padding).attr("ry",e.padding).attr("width",e.width)},O={drawNode:function(t,e,n,i){let o=i.htmlLabels,r=n%11,s=t.append("g");e.section=r;let c="section-"+r;r<0&&(c+=" section-root"),s.attr("class",(e.class?e.class+" ":"")+"mindmap-node "+c);let h=s.append("g"),l=s.append("g"),d=e.descr.replace(/()/g,"\n");(0,a.a)(l,d,{useHtmlLabels:o,width:e.width,classes:"mindmap-node-label"}),o||l.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");let g=l.node().getBBox(),p=i.fontSize.replace?i.fontSize.replace("px",""):i.fontSize;if(e.height=g.height+.55*p+e.padding,e.width=g.width+2*e.padding,e.icon){if(e.type===E.CIRCLE)e.height+=50,e.width+=50,s.append("foreignObject").attr("height","50px").attr("width",e.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+r+" "+e.icon),l.attr("transform","translate("+e.width/2+", "+(e.height/2-1.5*e.padding)+")");else{e.width+=50;let t=e.height;e.height=Math.max(t,60);let n=Math.abs(e.height-t);s.append("foreignObject").attr("width","60px").attr("height",e.height).attr("style","text-align: center;margin-top:"+n/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+r+" "+e.icon),l.attr("transform","translate("+(25+e.width/2)+", "+(n/2+e.padding/2)+")")}}else if(o){let t=(e.width-g.width)/2,n=(e.height-g.height)/2;l.attr("transform","translate("+t+", "+n+")")}else{let t=e.width/2,n=e.padding/2;l.attr("transform","translate("+t+", "+n+")")}switch(e.type){case E.DEFAULT:v(h,e,r);break;case E.ROUNDED_RECT:I(h,e);break;case E.RECT:w(h,e);break;case E.CIRCLE:h.attr("transform","translate("+e.width/2+", "+ +e.height/2+")"),C(h,e);break;case E.CLOUD:A(h,e);break;case E.BANG:D(h,e);break;case E.HEXAGON:b(h,e)}return N(e.id,s),e.height},positionNode:function(t){let e=T(t.id),n=t.x||0,i=t.y||0;e.attr("transform","translate("+n+","+i+")")},drawEdge:function(t,e,n,i,o){let r=n.x+n.width/2,a=n.y+n.height/2,s=e.x+e.width/2,c=e.y+e.height/2,h=s>r?r+Math.abs(r-s)/2:r-Math.abs(r-s)/2,l=c>a?a+Math.abs(a-c)/2:a-Math.abs(a-c)/2,d=s>r?Math.abs(r-h)/2+r:-Math.abs(r-h)/2+r,g=c>a?Math.abs(a-l)/2+a:-Math.abs(a-l)/2+a;t.append("path").attr("d","TB"===n.direction||"BT"===n.direction?"M".concat(r,",").concat(a," Q").concat(r,",").concat(g," ").concat(h,",").concat(l," T").concat(s,",").concat(c):"M".concat(r,",").concat(a," Q").concat(d,",").concat(a," ").concat(h,",").concat(l," T").concat(s,",").concat(c)).attr("class","edge section-edge-"+o%11+" edge-depth-"+i)}};s.use(c);let x=t=>{let e="";for(let e=0;e{let a;let c=(0,o.c)();c.htmlLabels=!1,o.l.debug("Rendering mindmap diagram\n"+t,i.parser);let h=(0,o.c)().securityLevel;"sandbox"===h&&(a=(0,r.Ys)("#i"+e));let l=("sandbox"===h?(0,r.Ys)(a.nodes()[0].contentDocument.body):(0,r.Ys)("body")).select("#"+e);l.append("g");let d=i.db.getMindmap(),g=l.append("g");g.attr("class","mindmap-edges");let p=l.append("g");p.attr("class","mindmap-nodes"),function t(e,n,i,o){O.drawNode(e,n,i,o),n.children&&n.children.forEach((n,r)=>{t(e,n,i<0?r:i,o)})}(p,d,-1,c);let u=await new Promise(t=>{let e=(0,r.Ys)("body").append("div").attr("id","cy").attr("style","display:none"),n=s({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});e.remove(),function t(e,n,i,o){n.add({group:"nodes",data:{id:e.id,labelText:e.descr,height:e.height,width:e.width,level:o,nodeId:e.id,padding:e.padding,type:e.type},position:{x:e.x,y:e.y}}),e.children&&e.children.forEach(r=>{t(r,n,i,o+1),n.add({group:"edges",data:{id:"".concat(e.id,"_").concat(r.id),source:e.id,target:r.id,depth:o,section:r.section}})})}(d,n,c,0),n.nodes().forEach(function(t){t.layoutDimensions=()=>{let e=t.data();return{w:e.width,h:e.height}}}),n.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),n.ready(e=>{o.l.info("Ready",e),t(n)})});!function(t,e){e.edges().map((e,n)=>{let i=e.data();if(e[0]._private.bodyBounds){let r=e[0]._private.rscratch;o.l.trace("Edge: ",n,i),t.insert("path").attr("d","M ".concat(r.startX,",").concat(r.startY," L ").concat(r.midX,",").concat(r.midY," L").concat(r.endX,",").concat(r.endY," ")).attr("class","edge section-edge-"+i.section+" edge-depth-"+i.depth)}})}(g,u),function(t){t.nodes().map((t,e)=>{let n=t.data();n.x=t.position().x,n.y=t.position().y,O.positionNode(n);let i=T(n.nodeId);o.l.info("Id:",e,"Position: (",t.position().x,", ",t.position().y,")",n),i.attr("transform","translate(".concat(t.position().x-n.width/2,", ").concat(t.position().y-n.height/2,")")),i.attr("attr","apa-".concat(e,")"))})}(u),(0,o.o)(void 0,l,c.mindmap.padding,c.mindmap.useMaxWidth)}},parser:g,styles:t=>"\n .edge {\n stroke-width: 3;\n }\n ".concat(x(t),"\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ").concat(t.git0,";\n }\n .section-root text {\n fill: ").concat(t.gitBranchLabel0,";\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n")}}}]);