(self["webpackChunk_jupyterlab_application_top"]=self["webpackChunk_jupyterlab_application_top"]||[]).push([[4915],{87799:function(t,e,r){(function e(i,n){if(true)t.exports=n(r(23143));else{}})(this,(function(t){return function(t){var e={};function r(i){if(e[i]){return e[i].exports}var n=e[i]={i,l:false,exports:{}};t[i].call(n.exports,n,n.exports,r);n.l=true;return n.exports}r.m=t;r.c=e;r.i=function(t){return t};r.d=function(t,e,i){if(!r.o(t,e)){Object.defineProperty(t,e,{configurable:false,enumerable:true,get:i})}};r.n=function(t){var e=t&&t.__esModule?function e(){return t["default"]}:function e(){return t};r.d(e,"a",e);return e};r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};r.p="";return r(r.s=7)}([function(e,r){e.exports=t},function(t,e,r){"use strict";var i=r(0).FDLayoutConstants;function n(){}for(var o in i){n[o]=i[o]}n.DEFAULT_USE_MULTI_LEVEL_SCALING=false;n.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH;n.DEFAULT_COMPONENT_SEPERATION=60;n.TILE=true;n.TILING_PADDING_VERTICAL=10;n.TILING_PADDING_HORIZONTAL=10;n.TREE_REDUCTION_ON_INCREMENTAL=false;t.exports=n},function(t,e,r){"use strict";var i=r(0).FDLayoutEdge;function n(t,e,r){i.call(this,t,e,r)}n.prototype=Object.create(i.prototype);for(var o in i){n[o]=i[o]}t.exports=n},function(t,e,r){"use strict";var i=r(0).LGraph;function n(t,e,r){i.call(this,t,e,r)}n.prototype=Object.create(i.prototype);for(var o in i){n[o]=i[o]}t.exports=n},function(t,e,r){"use strict";var i=r(0).LGraphManager;function n(t){i.call(this,t)}n.prototype=Object.create(i.prototype);for(var o in i){n[o]=i[o]}t.exports=n},function(t,e,r){"use strict";var i=r(0).FDLayoutNode;var n=r(0).IMath;function o(t,e,r,n){i.call(this,t,e,r,n)}o.prototype=Object.create(i.prototype);for(var a in i){o[a]=i[a]}o.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;if(Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement){this.displacementX=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementX)}if(Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement){this.displacementY=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementY)}if(this.child==null){this.moveBy(this.displacementX,this.displacementY)}else if(this.child.getNodes().length==0){this.moveBy(this.displacementX,this.displacementY)}else{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};o.prototype.propogateDisplacementToChildren=function(t,e){var r=this.getChild().getNodes();var i;for(var n=0;n0){this.positionNodesRadially(t)}else{this.reduceTrees();this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes());var r=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(r);this.positionNodesRandomly()}}else{if(h.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees();this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes());var r=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(r)}}this.initSpringEmbedder();this.runSpringEmbedder();return true};E.prototype.tick=function(){this.totalIterations++;if(this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.prunedNodesAll.length>0){this.isTreeGrowing=true}else{return true}}if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(this.prunedNodesAll.length>0){this.isTreeGrowing=true}else{return true}}this.coolingCycle++;if(this.layoutQuality==0){this.coolingAdjuster=this.coolingCycle}else if(this.layoutQuality==1){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());var e=this.nodesWithGravity.filter((function(e){return t.has(e)}));this.graphManager.setAllNodesToApplyGravitation(e);this.graphManager.updateBounds();this.updateGrid();this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else{this.isTreeGrowing=false;this.isGrowthFinished=true}}this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged()){return true}if(this.afterGrowthIterations%10==0){this.graphManager.updateBounds();this.updateGrid()}this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100);this.afterGrowthIterations++}var r=!this.isTreeGrowing&&!this.isGrowthFinished;var i=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;this.totalDisplacement=0;this.graphManager.updateBounds();this.calcSpringForces();this.calcRepulsionForces(r,i);this.calcGravitationalForces();this.moveNodes();this.animate();return false};E.prototype.getPositionsData=function(){var t=this.graphManager.getAllNodes();var e={};for(var r=0;r1){var s;for(s=0;si){i=Math.floor(a.y)}o=Math.floor(a.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new g(c.WORLD_CENTER_X-a.x/2,c.WORLD_CENTER_Y-a.y/2))};E.radialLayout=function(t,e,r){var i=Math.max(this.maxDiagonalInTree(t),h.DEFAULT_RADIAL_SEPARATION);E.branchRadialLayout(e,null,0,359,0,i);var n=v.calculateBounds(t);var o=new y;o.setDeviceOrgX(n.getMinX());o.setDeviceOrgY(n.getMinY());o.setWorldOrgX(r.x);o.setWorldOrgY(r.y);for(var a=0;a1){var m=_[0];_.splice(0,1);var N=g.indexOf(m);if(N>=0){g.splice(N,1)}v--;d--}if(e!=null){y=(g.indexOf(_[0])+1)%v}else{y=0}var A=Math.abs(i-r)/d;for(var T=y;p!=d;T=++T%v){var L=g[T].getOtherEnd(t);if(L==e){continue}var D=(r+p*A)%360;var O=(D+A)%360;E.branchRadialLayout(L,t,D,O,n+o,o);p++}};E.maxDiagonalInTree=function(t){var e=p.MIN_VALUE;for(var r=0;re){e=n}}return e};E.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength};E.prototype.groupZeroDegreeMembers=function(){var t=this;var e={};this.memberGroups={};this.idToDummyNode={};var r=[];var i=this.graphManager.getAllNodes();for(var n=0;n1){var i="DummyCompound_"+r;t.memberGroups[i]=e[r];var n=e[r][0].getParent();var o=new a(t.graphManager);o.id=i;o.paddingLeft=n.paddingLeft||0;o.paddingRight=n.paddingRight||0;o.paddingBottom=n.paddingBottom||0;o.paddingTop=n.paddingTop||0;t.idToDummyNode[i]=o;var s=t.getGraphManager().add(t.newGraph(),o);var h=n.getChild();h.add(o);for(var l=0;l=0;t--){var e=this.compoundOrder[t];var r=e.id;var i=e.paddingLeft;var n=e.paddingTop;this.adjustLocations(this.tiledMemberPack[r],e.rect.x,e.rect.y,i,n)}};E.prototype.repopulateZeroDegreeMembers=function(){var t=this;var e=this.tiledZeroDegreePack;Object.keys(e).forEach((function(r){var i=t.idToDummyNode[r];var n=i.paddingLeft;var o=i.paddingTop;t.adjustLocations(e[r],i.rect.x,i.rect.y,n,o)}))};E.prototype.getToBeTiled=function(t){var e=t.id;if(this.toBeTiled[e]!=null){return this.toBeTiled[e]}var r=t.getChild();if(r==null){this.toBeTiled[e]=false;return false}var i=r.getNodes();for(var n=0;n0){this.toBeTiled[e]=false;return false}if(o.getChild()==null){this.toBeTiled[o.id]=false;continue}if(!this.getToBeTiled(o)){this.toBeTiled[e]=false;return false}}this.toBeTiled[e]=true;return true};E.prototype.getNodeDegree=function(t){var e=t.id;var r=t.getEdges();var i=0;for(var n=0;nh)h=c.rect.height}r+=h+t.verticalPadding}};E.prototype.tileCompoundMembers=function(t,e){var r=this;this.tiledMemberPack=[];Object.keys(t).forEach((function(i){var n=e[i];r.tiledMemberPack[i]=r.tileNodes(t[i],n.paddingLeft+n.paddingRight);n.rect.width=r.tiledMemberPack[i].width;n.rect.height=r.tiledMemberPack[i].height}))};E.prototype.tileNodes=function(t,e){var r=h.TILING_PADDING_VERTICAL;var i=h.TILING_PADDING_HORIZONTAL;var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:r,horizontalPadding:i};t.sort((function(t,e){if(t.rect.width*t.rect.height>e.rect.width*e.rect.height)return-1;if(t.rect.width*t.rect.height0){a+=t.horizontalPadding}t.rowWidth[r]=a;if(t.width0)s+=t.verticalPadding;var h=0;if(s>t.rowHeight[r]){h=t.rowHeight[r];t.rowHeight[r]=s;h=t.rowHeight[r]-h}t.height+=h;t.rows[r].push(e)};E.prototype.getShortestRowIndex=function(t){var e=-1;var r=Number.MAX_VALUE;for(var i=0;ir){e=i;r=t.rowWidth[i]}}return e};E.prototype.canAddHorizontal=function(t,e,r){var i=this.getShortestRowIndex(t);if(i<0){return true}var n=t.rowWidth[i];if(n+t.horizontalPadding+e<=t.width)return true;var o=0;if(t.rowHeight[i]0)o=r+t.verticalPadding-t.rowHeight[i]}var a;if(t.width-n>=e+t.horizontalPadding){a=(t.height+o)/(n+e+t.horizontalPadding)}else{a=(t.height+o)/t.width}o=r+t.verticalPadding;var s;if(t.widtho&&e!=r){i.splice(-1,1);t.rows[r].push(n);t.rowWidth[e]=t.rowWidth[e]-o;t.rowWidth[r]=t.rowWidth[r]+o;t.width=t.rowWidth[instance.getLongestRowIndex(t)];var a=Number.MIN_VALUE;for(var s=0;sa)a=i[s].height}if(e>0)a+=t.verticalPadding;var h=t.rowHeight[e]+t.rowHeight[r];t.rowHeight[e]=a;if(t.rowHeight[r]0){for(var f=n;f<=o;f++){d[0]+=this.grid[f][a-1].length+this.grid[f][a].length-1}}if(o0){for(var f=a;f<=s;f++){d[3]+=this.grid[n-1][f].length+this.grid[n][f].length-1}}var v=p.MAX_VALUE;var y;var E;for(var _=0;_0){var f;f=r.getGraphManager().add(r.newGraph(),c);this.processChildrenList(f,a,r)}}};g.prototype.stop=function(){this.stopped=true;return this};var p=function t(e){e("layout","cose-bilkent",g)};if(typeof cytoscape!=="undefined"){p(cytoscape)}t.exports=p}])}))},23143:function(t){(function e(r,i){if(true)t.exports=i();else{}})(this,(function(){return function(t){var e={};function r(i){if(e[i]){return e[i].exports}var n=e[i]={i,l:false,exports:{}};t[i].call(n.exports,n,n.exports,r);n.l=true;return n.exports}r.m=t;r.c=e;r.i=function(t){return t};r.d=function(t,e,i){if(!r.o(t,e)){Object.defineProperty(t,e,{configurable:false,enumerable:true,get:i})}};r.n=function(t){var e=t&&t.__esModule?function e(){return t["default"]}:function e(){return t};r.d(e,"a",e);return e};r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};r.p="";return r(r.s=26)}([function(t,e,r){"use strict";function i(){}i.QUALITY=1;i.DEFAULT_CREATE_BENDS_AS_NEEDED=false;i.DEFAULT_INCREMENTAL=false;i.DEFAULT_ANIMATION_ON_LAYOUT=true;i.DEFAULT_ANIMATION_DURING_LAYOUT=false;i.DEFAULT_ANIMATION_PERIOD=50;i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=false;i.DEFAULT_GRAPH_MARGIN=15;i.NODE_DIMENSIONS_INCLUDE_LABELS=false;i.SIMPLE_NODE_SIZE=40;i.SIMPLE_NODE_HALF_SIZE=i.SIMPLE_NODE_SIZE/2;i.EMPTY_COMPOUND_NODE_SIZE=40;i.MIN_EDGE_LENGTH=1;i.WORLD_BOUNDARY=1e6;i.INITIAL_WORLD_BOUNDARY=i.WORLD_BOUNDARY/1e3;i.WORLD_CENTER_X=1200;i.WORLD_CENTER_Y=900;t.exports=i},function(t,e,r){"use strict";var i=r(2);var n=r(8);var o=r(9);function a(t,e,r){i.call(this,r);this.isOverlapingSourceAndTarget=false;this.vGraphObject=r;this.bendpoints=[];this.source=t;this.target=e}a.prototype=Object.create(i.prototype);for(var s in i){a[s]=i[s]}a.prototype.getSource=function(){return this.source};a.prototype.getTarget=function(){return this.target};a.prototype.isInterGraph=function(){return this.isInterGraph};a.prototype.getLength=function(){return this.length};a.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget};a.prototype.getBendpoints=function(){return this.bendpoints};a.prototype.getLca=function(){return this.lca};a.prototype.getSourceInLca=function(){return this.sourceInLca};a.prototype.getTargetInLca=function(){return this.targetInLca};a.prototype.getOtherEnd=function(t){if(this.source===t){return this.target}else if(this.target===t){return this.source}else{throw"Node is not incident with this edge"}};a.prototype.getOtherEndInGraph=function(t,e){var r=this.getOtherEnd(t);var i=e.getGraphManager().getRoot();while(true){if(r.getOwner()==e){return r}if(r.getOwner()==i){break}r=r.getOwner().getParent()}return null};a.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=n.getIntersection(this.target.getRect(),this.source.getRect(),t);if(!this.isOverlapingSourceAndTarget){this.lengthX=t[0]-t[2];this.lengthY=t[1]-t[3];if(Math.abs(this.lengthX)<1){this.lengthX=o.sign(this.lengthX)}if(Math.abs(this.lengthY)<1){this.lengthY=o.sign(this.lengthY)}this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)}};a.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX();this.lengthY=this.target.getCenterY()-this.source.getCenterY();if(Math.abs(this.lengthX)<1){this.lengthX=o.sign(this.lengthX)}if(Math.abs(this.lengthY)<1){this.lengthY=o.sign(this.lengthY)}this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)};t.exports=a},function(t,e,r){"use strict";function i(t){this.vGraphObject=t}t.exports=i},function(t,e,r){"use strict";var i=r(2);var n=r(10);var o=r(13);var a=r(0);var s=r(16);var h=r(4);function l(t,e,r,a){if(r==null&&a==null){a=e}i.call(this,a);if(t.graphManager!=null)t=t.graphManager;this.estimatedSize=n.MIN_VALUE;this.inclusionTreeDepth=n.MAX_VALUE;this.vGraphObject=a;this.edges=[];this.graphManager=t;if(r!=null&&e!=null)this.rect=new o(e.x,e.y,r.width,r.height);else this.rect=new o}l.prototype=Object.create(i.prototype);for(var c in i){l[c]=i[c]}l.prototype.getEdges=function(){return this.edges};l.prototype.getChild=function(){return this.child};l.prototype.getOwner=function(){return this.owner};l.prototype.getWidth=function(){return this.rect.width};l.prototype.setWidth=function(t){this.rect.width=t};l.prototype.getHeight=function(){return this.rect.height};l.prototype.setHeight=function(t){this.rect.height=t};l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2};l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2};l.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)};l.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)};l.prototype.getRect=function(){return this.rect};l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)};l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2};l.prototype.setRect=function(t,e){this.rect.x=t.x;this.rect.y=t.y;this.rect.width=e.width;this.rect.height=e.height};l.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2;this.rect.y=e-this.rect.height/2};l.prototype.setLocation=function(t,e){this.rect.x=t;this.rect.y=e};l.prototype.moveBy=function(t,e){this.rect.x+=t;this.rect.y+=e};l.prototype.getEdgeListToNode=function(t){var e=[];var r;var i=this;i.edges.forEach((function(r){if(r.target==t){if(r.source!=i)throw"Incorrect edge source!";e.push(r)}}));return e};l.prototype.getEdgesBetween=function(t){var e=[];var r;var i=this;i.edges.forEach((function(r){if(!(r.source==i||r.target==i))throw"Incorrect edge source and/or target";if(r.target==t||r.source==t){e.push(r)}}));return e};l.prototype.getNeighborsList=function(){var t=new Set;var e=this;e.edges.forEach((function(r){if(r.source==e){t.add(r.target)}else{if(r.target!=e){throw"Incorrect incidency!"}t.add(r.source)}}));return t};l.prototype.withChildren=function(){var t=new Set;var e;var r;t.add(this);if(this.child!=null){var i=this.child.getNodes();for(var n=0;ne){this.rect.x-=(this.labelWidth-e)/2;this.setWidth(this.labelWidth)}if(this.labelHeight>r){if(this.labelPos=="center"){this.rect.y-=(this.labelHeight-r)/2}else if(this.labelPos=="top"){this.rect.y-=this.labelHeight-r}this.setHeight(this.labelHeight)}}}};l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==n.MAX_VALUE){throw"assert failed"}return this.inclusionTreeDepth};l.prototype.transform=function(t){var e=this.rect.x;if(e>a.WORLD_BOUNDARY){e=a.WORLD_BOUNDARY}else if(e<-a.WORLD_BOUNDARY){e=-a.WORLD_BOUNDARY}var r=this.rect.y;if(r>a.WORLD_BOUNDARY){r=a.WORLD_BOUNDARY}else if(r<-a.WORLD_BOUNDARY){r=-a.WORLD_BOUNDARY}var i=new h(e,r);var n=t.inverseTransformPoint(i);this.setLocation(n.x,n.y)};l.prototype.getLeft=function(){return this.rect.x};l.prototype.getRight=function(){return this.rect.x+this.rect.width};l.prototype.getTop=function(){return this.rect.y};l.prototype.getBottom=function(){return this.rect.y+this.rect.height};l.prototype.getParent=function(){if(this.owner==null){return null}return this.owner.getParent()};t.exports=l},function(t,e,r){"use strict";function i(t,e){if(t==null&&e==null){this.x=0;this.y=0}else{this.x=t;this.y=e}}i.prototype.getX=function(){return this.x};i.prototype.getY=function(){return this.y};i.prototype.setX=function(t){this.x=t};i.prototype.setY=function(t){this.y=t};i.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)};i.prototype.getCopy=function(){return new i(this.x,this.y)};i.prototype.translate=function(t){this.x+=t.width;this.y+=t.height;return this};t.exports=i},function(t,e,r){"use strict";var i=r(2);var n=r(10);var o=r(0);var a=r(6);var s=r(3);var h=r(1);var l=r(13);var c=r(12);var u=r(11);function g(t,e,r){i.call(this,r);this.estimatedSize=n.MIN_VALUE;this.margin=o.DEFAULT_GRAPH_MARGIN;this.edges=[];this.nodes=[];this.isConnected=false;this.parent=t;if(e!=null&&e instanceof a){this.graphManager=e}else if(e!=null&&e instanceof Layout){this.graphManager=e.graphManager}}g.prototype=Object.create(i.prototype);for(var d in i){g[d]=i[d]}g.prototype.getNodes=function(){return this.nodes};g.prototype.getEdges=function(){return this.edges};g.prototype.getGraphManager=function(){return this.graphManager};g.prototype.getParent=function(){return this.parent};g.prototype.getLeft=function(){return this.left};g.prototype.getRight=function(){return this.right};g.prototype.getTop=function(){return this.top};g.prototype.getBottom=function(){return this.bottom};g.prototype.isConnected=function(){return this.isConnected};g.prototype.add=function(t,e,r){if(e==null&&r==null){var i=t;if(this.graphManager==null){throw"Graph has no graph mgr!"}if(this.getNodes().indexOf(i)>-1){throw"Node already in graph!"}i.owner=this;this.getNodes().push(i);return i}else{var n=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(r)>-1)){throw"Source or target not in graph!"}if(!(e.owner==r.owner&&e.owner==this)){throw"Both owners must be this graph!"}if(e.owner!=r.owner){return null}n.source=e;n.target=r;n.isInterGraph=false;this.getEdges().push(n);e.edges.push(n);if(r!=e){r.edges.push(n)}return n}};g.prototype.remove=function(t){var e=t;if(t instanceof s){if(e==null){throw"Node is null!"}if(!(e.owner!=null&&e.owner==this)){throw"Owner graph is invalid!"}if(this.graphManager==null){throw"Owner graph manager is invalid!"}var r=e.edges.slice();var i;var n=r.length;for(var o=0;o-1&&c>-1)){throw"Source and/or target doesn't know this edge!"}i.source.edges.splice(l,1);if(i.target!=i.source){i.target.edges.splice(c,1)}var a=i.source.owner.getEdges().indexOf(i);if(a==-1){throw"Not in owner's edge list!"}i.source.owner.getEdges().splice(a,1)}};g.prototype.updateLeftTop=function(){var t=n.MAX_VALUE;var e=n.MAX_VALUE;var r;var i;var o;var a=this.getNodes();var s=a.length;for(var h=0;hr){t=r}if(e>i){e=i}}if(t==n.MAX_VALUE){return null}if(a[0].getParent().paddingLeft!=undefined){o=a[0].getParent().paddingLeft}else{o=this.margin}this.left=e-o;this.top=t-o;return new c(this.left,this.top)};g.prototype.updateBounds=function(t){var e=n.MAX_VALUE;var r=-n.MAX_VALUE;var i=n.MAX_VALUE;var o=-n.MAX_VALUE;var a;var s;var h;var c;var u;var g=this.nodes;var d=g.length;for(var p=0;pa){e=a}if(rh){i=h}if(oa){e=a}if(rh){i=h}if(o=this.nodes.length){var g=0;r.forEach((function(e){if(e.owner==t){g++}}));if(g==this.nodes.length){this.isConnected=true}}};t.exports=g},function(t,e,r){"use strict";var i;var n=r(1);function o(t){i=r(5);this.layout=t;this.graphs=[];this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph();var e=this.layout.newNode(null);var r=this.add(t,e);this.setRootGraph(r);return this.rootGraph};o.prototype.add=function(t,e,r,i,n){if(r==null&&i==null&&n==null){if(t==null){throw"Graph is null!"}if(e==null){throw"Parent node is null!"}if(this.graphs.indexOf(t)>-1){throw"Graph already in this graph mgr!"}this.graphs.push(t);if(t.parent!=null){throw"Already has a parent!"}if(e.child!=null){throw"Already has a child!"}t.parent=e;e.child=t;return t}else{n=r;i=e;r=t;var o=i.getOwner();var a=n.getOwner();if(!(o!=null&&o.getGraphManager()==this)){throw"Source not in this graph mgr!"}if(!(a!=null&&a.getGraphManager()==this)){throw"Target not in this graph mgr!"}if(o==a){r.isInterGraph=false;return o.add(r,i,n)}else{r.isInterGraph=true;r.source=i;r.target=n;if(this.edges.indexOf(r)>-1){throw"Edge already in inter-graph edge list!"}this.edges.push(r);if(!(r.source!=null&&r.target!=null)){throw"Edge source and/or target is null!"}if(!(r.source.edges.indexOf(r)==-1&&r.target.edges.indexOf(r)==-1)){throw"Edge already in source and/or target incidency list!"}r.source.edges.push(r);r.target.edges.push(r);return r}}};o.prototype.remove=function(t){if(t instanceof i){var e=t;if(e.getGraphManager()!=this){throw"Graph not in this graph mgr"}if(!(e==this.rootGraph||e.parent!=null&&e.parent.graphManager==this)){throw"Invalid parent node!"}var r=[];r=r.concat(e.getEdges());var o;var a=r.length;for(var s=0;s=e.getRight()){r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())}else if(e.getX()<=t.getX()&&e.getRight()>=t.getRight()){r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())}if(t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()){r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom())}else if(e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()){r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom())}var o=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));if(e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()){o=1}var a=o*r[0];var s=r[1]/o;if(r[0]a){r[0]=i;r[1]=h;r[2]=o;r[3]=_;return false}else if(no){r[0]=s;r[1]=n;r[2]=y;r[3]=a;return false}else if(io){r[0]=c;r[1]=u;T=true}else{r[0]=l;r[1]=h;T=true}}else if(D===I){if(i>o){r[0]=s;r[1]=h;T=true}else{r[0]=g;r[1]=u;T=true}}if(-O===I){if(o>i){r[2]=E;r[3]=_;L=true}else{r[2]=y;r[3]=v;L=true}}else if(O===I){if(o>i){r[2]=f;r[3]=v;L=true}else{r[2]=m;r[3]=_;L=true}}if(T&&L){return false}if(i>o){if(n>a){w=this.getCardinalDirection(D,I,4);R=this.getCardinalDirection(O,I,2)}else{w=this.getCardinalDirection(-D,I,3);R=this.getCardinalDirection(-O,I,1)}}else{if(n>a){w=this.getCardinalDirection(-D,I,1);R=this.getCardinalDirection(-O,I,3)}else{w=this.getCardinalDirection(D,I,2);R=this.getCardinalDirection(O,I,4)}}if(!T){switch(w){case 1:M=h;C=i+-p/I;r[0]=C;r[1]=M;break;case 2:C=g;M=n+d*I;r[0]=C;r[1]=M;break;case 3:M=u;C=i+p/I;r[0]=C;r[1]=M;break;case 4:C=c;M=n+-d*I;r[0]=C;r[1]=M;break}}if(!L){switch(R){case 1:b=v;x=o+-A/I;r[2]=x;r[3]=b;break;case 2:x=m;b=a+N*I;r[2]=x;r[3]=b;break;case 3:b=_;x=o+A/I;r[2]=x;r[3]=b;break;case 4:x=E;b=a+-N*I;r[2]=x;r[3]=b;break}}}return false};n.getCardinalDirection=function(t,e,r){if(t>e){return r}else{return 1+r%4}};n.getIntersection=function(t,e,r,n){if(n==null){return this.getIntersection2(t,e,r)}var o=t.x;var a=t.y;var s=e.x;var h=e.y;var l=r.x;var c=r.y;var u=n.x;var g=n.y;var d=void 0,p=void 0;var f=void 0,v=void 0,y=void 0,E=void 0,_=void 0,m=void 0;var N=void 0;f=h-a;y=o-s;_=s*a-o*h;v=g-c;E=l-u;m=u*c-l*g;N=f*E-v*y;if(N===0){return null}d=(y*m-E*_)/N;p=(v*_-f*m)/N;return new i(d,p)};n.angleOfVector=function(t,e,r,i){var n=void 0;if(t!==r){n=Math.atan((i-e)/(r-t));if(r0){return 1}else if(t<0){return-1}else{return 0}};i.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)};i.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)};t.exports=i},function(t,e,r){"use strict";function i(){}i.MAX_VALUE=2147483647;i.MIN_VALUE=-2147483648;t.exports=i},function(t,e,r){"use strict";var i=function(){function t(t,e){for(var r=0;r0&&e){s.push(l[0]);while(s.length>0&&e){var c=s[0];s.splice(0,1);a.add(c);var u=c.getEdges();for(var o=0;o-1){l.splice(f,1)}}a=new Set;h=new Map}}return t};g.prototype.createDummyNodesForBendpoints=function(t){var e=[];var r=t.source;var i=this.graphManager.calcLowestCommonAncestor(t.source,t.target);for(var n=0;n0){var n=this.edgeToDummyNodes.get(r);for(var o=0;o=0){e.splice(u,1)}var g=s.getNeighborsList();g.forEach((function(t){if(r.indexOf(t)<0){var e=i.get(t);var n=e-1;if(n==1){l.push(t)}i.set(t,n)}}))}r=r.concat(l);if(e.length==1||e.length==2){n=true;o=e[0]}}return o};g.prototype.setGraphManager=function(t){this.graphManager=t};t.exports=g},function(t,e,r){"use strict";function i(){}i.seed=1;i.x=0;i.nextDouble=function(){i.x=Math.sin(i.seed++)*1e4;return i.x-Math.floor(i.x)};t.exports=i},function(t,e,r){"use strict";var i=r(4);function n(t,e){this.lworldOrgX=0;this.lworldOrgY=0;this.ldeviceOrgX=0;this.ldeviceOrgY=0;this.lworldExtX=1;this.lworldExtY=1;this.ldeviceExtX=1;this.ldeviceExtY=1}n.prototype.getWorldOrgX=function(){return this.lworldOrgX};n.prototype.setWorldOrgX=function(t){this.lworldOrgX=t};n.prototype.getWorldOrgY=function(){return this.lworldOrgY};n.prototype.setWorldOrgY=function(t){this.lworldOrgY=t};n.prototype.getWorldExtX=function(){return this.lworldExtX};n.prototype.setWorldExtX=function(t){this.lworldExtX=t};n.prototype.getWorldExtY=function(){return this.lworldExtY};n.prototype.setWorldExtY=function(t){this.lworldExtY=t};n.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX};n.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t};n.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY};n.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t};n.prototype.getDeviceExtX=function(){return this.ldeviceExtX};n.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t};n.prototype.getDeviceExtY=function(){return this.ldeviceExtY};n.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t};n.prototype.transformX=function(t){var e=0;var r=this.lworldExtX;if(r!=0){e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/r}return e};n.prototype.transformY=function(t){var e=0;var r=this.lworldExtY;if(r!=0){e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/r}return e};n.prototype.inverseTransformX=function(t){var e=0;var r=this.ldeviceExtX;if(r!=0){e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/r}return e};n.prototype.inverseTransformY=function(t){var e=0;var r=this.ldeviceExtY;if(r!=0){e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/r}return e};n.prototype.inverseTransformPoint=function(t){var e=new i(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return e};t.exports=n},function(t,e,r){"use strict";function i(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);eo.ADAPTATION_LOWER_NODE_LIMIT){this.coolingFactor=Math.max(this.coolingFactor*o.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-o.COOLING_ADAPTATION_FACTOR))}this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT_INCREMENTAL}else{if(t>o.ADAPTATION_LOWER_NODE_LIMIT){this.coolingFactor=Math.max(o.COOLING_ADAPTATION_FACTOR,1-(t-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*(1-o.COOLING_ADAPTATION_FACTOR))}else{this.coolingFactor=1}this.initialCoolingFactor=this.coolingFactor;this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT}this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations);this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length;this.repulsionRange=this.calcRepulsionRange()};l.prototype.calcSpringForces=function(){var t=this.getAllEdges();var e;for(var r=0;r0&&arguments[0]!==undefined?arguments[0]:true;var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var r,i;var n,a;var s=this.getAllNodes();var h;if(this.useFRGridVariant){if(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&t){this.updateGrid()}h=new Set;for(r=0;rh||s>h){t.gravitationForceX=-this.gravityConstant*n;t.gravitationForceY=-this.gravityConstant*o}}else{h=e.getEstimatedSize()*this.compoundGravityRangeFactor;if(a>h||s>h){t.gravitationForceX=-this.gravityConstant*n*this.compoundGravityConstant;t.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant}}};l.prototype.isConverged=function(){var t;var e=false;if(this.totalIterations>this.maxIterations/3){e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2}t=this.totalDisplacement=h.length||c>=h[0].length)){for(var u=0;ue}}]);return t}();t.exports=a},function(t,e,r){"use strict";var i=function(){function t(t,e){for(var r=0;r2&&arguments[2]!==undefined?arguments[2]:1;var o=arguments.length>3&&arguments[3]!==undefined?arguments[3]:-1;var a=arguments.length>4&&arguments[4]!==undefined?arguments[4]:-1;n(this,t);this.sequence1=e;this.sequence2=r;this.match_score=i;this.mismatch_penalty=o;this.gap_penalty=a;this.iMax=e.length+1;this.jMax=r.length+1;this.grid=new Array(this.iMax);for(var s=0;s=0;r--){var i=this.listeners[r];if(i.event===t&&i.callback===e){this.listeners.splice(r,1)}}};n.emit=function(t,e){for(var r=0;r{"use strict";r.d(e,{diagram:()=>U});var i=r(56273);var n=r(52724);var o=r(84222);var a=r(6047);var s=r(76405);var h=r(43457);var l=r.n(h);var c=r(1218);var u=r(63170);var g=r(77470);var d=r(48750);var p=function(){var t=(0,a.K2)((function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r}),"o"),e=[1,4],r=[1,13],i=[1,12],n=[1,15],o=[1,16],s=[1,20],h=[1,19],l=[6,7,8],c=[1,26],u=[1,24],g=[1,25],d=[6,7,11],p=[1,6,13,15,16,19,22],f=[1,33],v=[1,34],y=[1,6,7,11,13,15,16,19,22];var E={trace:(0,a.K2)((function t(){}),"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:(0,a.K2)((function t(e,r,i,n,o,a,s){var h=a.length-1;switch(o){case 6:case 7:return n;break;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",a[h].id);n.addNode(a[h-1].length,a[h].id,a[h].descr,a[h].type);break;case 16:n.getLogger().trace("Icon: ",a[h]);n.decorateNode({icon:a[h]});break;case 17:case 21:n.decorateNode({class:a[h]});break;case 18:n.getLogger().trace("SPACELIST");break;case 19:n.getLogger().trace("Node: ",a[h].id);n.addNode(0,a[h].id,a[h].descr,a[h].type);break;case 20:n.decorateNode({icon:a[h]});break;case 25:n.getLogger().trace("node found ..",a[h-2]);this.$={id:a[h-1],descr:a[h-1],type:n.getType(a[h-2],a[h])};break;case 26:this.$={id:a[h],descr:a[h],type:n.nodeType.DEFAULT};break;case 27:n.getLogger().trace("node found ..",a[h-3]);this.$={id:a[h-3],descr:a[h-1],type:n.getType(a[h-2],a[h])};break}}),"anonymous"),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:r,7:[1,10],9:9,12:11,13:i,14:14,15:n,16:o,17:17,18:18,19:s,22:h},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,15:n,16:o,17:17,18:18,19:s,22:h},{6:r,9:22,12:11,13:i,14:14,15:n,16:o,17:17,18:18,19:s,22:h},{6:c,7:u,10:23,11:g},t(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:h}),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,23]),t(d,[2,24]),t(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:c,7:u,10:32,11:g},{1:[2,7],6:r,12:21,13:i,14:14,15:n,16:o,17:17,18:18,19:s,22:h},t(p,[2,14],{7:f,11:v}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(d,[2,15]),t(d,[2,16]),t(d,[2,17]),{20:[1,35]},{21:[1,36]},t(p,[2,13],{7:f,11:v}),t(y,[2,11]),t(y,[2,12]),{21:[1,37]},t(d,[2,25]),t(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,a.K2)((function t(e,r){if(r.recoverable){this.trace(e)}else{var i=new Error(e);i.hash=r;throw i}}),"parseError"),parse:(0,a.K2)((function t(e){var r=this,i=[0],n=[],o=[null],s=[],h=this.table,l="",c=0,u=0,g=0,d=2,p=1;var f=s.slice.call(arguments,1);var v=Object.create(this.lexer);var y={yy:{}};for(var E in this.yy){if(Object.prototype.hasOwnProperty.call(this.yy,E)){y.yy[E]=this.yy[E]}}v.setInput(e,y.yy);y.yy.lexer=v;y.yy.parser=this;if(typeof v.yylloc=="undefined"){v.yylloc={}}var _=v.yylloc;s.push(_);var m=v.options&&v.options.ranges;if(typeof y.yy.parseError==="function"){this.parseError=y.yy.parseError}else{this.parseError=Object.getPrototypeOf(this).parseError}function N(t){i.length=i.length-2*t;o.length=o.length-t;s.length=s.length-t}(0,a.K2)(N,"popStack");function A(){var t;t=n.pop()||v.lex()||p;if(typeof t!=="number"){if(t instanceof Array){n=t;t=n.pop()}t=r.symbols_[t]||t}return t}(0,a.K2)(A,"lex");var T,L,D,O,I,w,R={},C,M,x,b;while(true){D=i[i.length-1];if(this.defaultActions[D]){O=this.defaultActions[D]}else{if(T===null||typeof T=="undefined"){T=A()}O=h[D]&&h[D][T]}if(typeof O==="undefined"||!O.length||!O[0]){var G="";b=[];for(C in h[D]){if(this.terminals_[C]&&C>d){b.push("'"+this.terminals_[C]+"'")}}if(v.showPosition){G="Parse error on line "+(c+1)+":\n"+v.showPosition()+"\nExpecting "+b.join(", ")+", got '"+(this.terminals_[T]||T)+"'"}else{G="Parse error on line "+(c+1)+": Unexpected "+(T==p?"end of input":"'"+(this.terminals_[T]||T)+"'")}this.parseError(G,{text:v.match,token:this.terminals_[T]||T,line:v.yylineno,loc:_,expected:b})}if(O[0]instanceof Array&&O.length>1){throw new Error("Parse Error: multiple actions possible at state: "+D+", token: "+T)}switch(O[0]){case 1:i.push(T);o.push(v.yytext);s.push(v.yylloc);i.push(O[1]);T=null;if(!L){u=v.yyleng;l=v.yytext;c=v.yylineno;_=v.yylloc;if(g>0){g--}}else{T=L;L=null}break;case 2:M=this.productions_[O[1]][1];R.$=o[o.length-M];R._$={first_line:s[s.length-(M||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(M||1)].first_column,last_column:s[s.length-1].last_column};if(m){R._$.range=[s[s.length-(M||1)].range[0],s[s.length-1].range[1]]}w=this.performAction.apply(R,[l,u,c,y.yy,O[1],o,s].concat(f));if(typeof w!=="undefined"){return w}if(M){i=i.slice(0,-1*M*2);o=o.slice(0,-1*M);s=s.slice(0,-1*M)}i.push(this.productions_[O[1]][0]);o.push(R.$);s.push(R._$);x=h[i[i.length-2]][i[i.length-1]];i.push(x);break;case 3:return true}}return true}),"parse")};var _=function(){var t={EOF:1,parseError:(0,a.K2)((function t(e,r){if(this.yy.parser){this.yy.parser.parseError(e,r)}else{throw new Error(e)}}),"parseError"),setInput:(0,a.K2)((function(t,e){this.yy=e||this.yy||{};this._input=t;this._more=this._backtrack=this.done=false;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};if(this.options.ranges){this.yylloc.range=[0,0]}this.offset=0;return this}),"setInput"),input:(0,a.K2)((function(){var t=this._input[0];this.yytext+=t;this.yyleng++;this.offset++;this.match+=t;this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);if(e){this.yylineno++;this.yylloc.last_line++}else{this.yylloc.last_column++}if(this.options.ranges){this.yylloc.range[1]++}this._input=this._input.slice(1);return t}),"input"),unput:(0,a.K2)((function(t){var e=t.length;var 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 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);if(r.length-1){this.yylineno-=r.length-1}var n=this.yylloc.range;this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===i.length?this.yylloc.first_column:0)+i[i.length-r.length].length-r[0].length:this.yylloc.first_column-e};if(this.options.ranges){this.yylloc.range=[n[0],n[0]+this.yyleng-e]}this.yyleng=this.yytext.length;return this}),"unput"),more:(0,a.K2)((function(){this._more=true;return this}),"more"),reject:(0,a.K2)((function(){if(this.options.backtrack_lexer){this._backtrack=true}else{return this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}return this}),"reject"),less:(0,a.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,a.K2)((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:(0,a.K2)((function(){var t=this.match;if(t.length<20){t+=this._input.substr(0,20-t.length)}return(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,a.K2)((function(){var t=this.pastInput();var e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,a.K2)((function(t,e){var r,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};if(this.options.ranges){n.yylloc.range=this.yylloc.range.slice(0)}}i=t[0].match(/(?:\r\n?|\n).*/g);if(i){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;if(this.options.ranges){this.yylloc.range=[this.offset,this.offset+=this.yyleng]}this._more=false;this._backtrack=false;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]);if(this.done&&this._input){this.done=false}if(r){return r}else if(this._backtrack){for(var o in n){this[o]=n[o]}return false}return false}),"test_match"),next:(0,a.K2)((function(){if(this.done){return this.EOF}if(!this._input){this.done=true}var t,e,r,i;if(!this._more){this.yytext="";this.match=""}var n=this._currentRules();for(var o=0;oe[0].length)){e=r;i=o;if(this.options.backtrack_lexer){t=this.test_match(r,n[o]);if(t!==false){return t}else if(this._backtrack){e=false;continue}else{return false}}else if(!this.options.flex){break}}}if(e){t=this.test_match(e,n[i]);if(t!==false){return t}return false}if(this._input===""){return this.EOF}else{return this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}}),"next"),lex:(0,a.K2)((function t(){var e=this.next();if(e){return e}else{return this.lex()}}),"lex"),begin:(0,a.K2)((function t(e){this.conditionStack.push(e)}),"begin"),popState:(0,a.K2)((function t(){var e=this.conditionStack.length-1;if(e>0){return this.conditionStack.pop()}else{return this.conditionStack[0]}}),"popState"),_currentRules:(0,a.K2)((function t(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules}else{return this.conditions["INITIAL"].rules}}),"_currentRules"),topState:(0,a.K2)((function t(e){e=this.conditionStack.length-1-Math.abs(e||0);if(e>=0){return this.conditionStack[e]}else{return"INITIAL"}}),"topState"),pushState:(0,a.K2)((function t(e){this.begin(e)}),"pushState"),stateStackSize:(0,a.K2)((function t(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":true},performAction:(0,a.K2)((function t(e,r,i,n){var o=n;switch(i){case 0:e.getLogger().trace("Found comment",r.yytext);return 6;break;case 1:return 8;break;case 2:this.begin("CLASS");break;case 3:this.popState();return 16;break;case 4:this.popState();break;case 5:e.getLogger().trace("Begin icon");this.begin("ICON");break;case 6:e.getLogger().trace("SPACELINE");return 6;break;case 7:return 7;break;case 8:return 15;break;case 9:e.getLogger().trace("end icon");this.popState();break;case 10:e.getLogger().trace("Exploding node");this.begin("NODE");return 19;break;case 11:e.getLogger().trace("Cloud");this.begin("NODE");return 19;break;case 12:e.getLogger().trace("Explosion Bang");this.begin("NODE");return 19;break;case 13:e.getLogger().trace("Cloud Bang");this.begin("NODE");return 19;break;case 14:this.begin("NODE");return 19;break;case 15:this.begin("NODE");return 19;break;case 16:this.begin("NODE");return 19;break;case 17:this.begin("NODE");return 19;break;case 18:return 13;break;case 19:return 22;break;case 20:return 11;break;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";break;case 23:this.popState();break;case 24:e.getLogger().trace("Starting NSTR");this.begin("NSTR");break;case 25:e.getLogger().trace("description:",r.yytext);return"NODE_DESCR";break;case 26:this.popState();break;case 27:this.popState();e.getLogger().trace("node end ))");return"NODE_DEND";break;case 28:this.popState();e.getLogger().trace("node end )");return"NODE_DEND";break;case 29:this.popState();e.getLogger().trace("node end ...",r.yytext);return"NODE_DEND";break;case 30:this.popState();e.getLogger().trace("node end ((");return"NODE_DEND";break;case 31:this.popState();e.getLogger().trace("node end (-");return"NODE_DEND";break;case 32:this.popState();e.getLogger().trace("node end (-");return"NODE_DEND";break;case 33:this.popState();e.getLogger().trace("node end ((");return"NODE_DEND";break;case 34:this.popState();e.getLogger().trace("node end ((");return"NODE_DEND";break;case 35:e.getLogger().trace("Long description:",r.yytext);return 20;break;case 36:e.getLogger().trace("Long description:",r.yytext);return 20;break}}),"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:false},ICON:{rules:[8,9],inclusive:false},NSTR2:{rules:[22,23],inclusive:false},NSTR:{rules:[25,26],inclusive:false},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:false},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:true}}};return t}();E.lexer=_;function m(){this.yy={}}(0,a.K2)(m,"Parser");m.prototype=E;E.Parser=m;return new m}();p.parser=p;var f=p;var v={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6};var y=class{constructor(){this.nodes=[];this.count=0;this.elements={};this.getLogger=this.getLogger.bind(this);this.nodeType=v;this.clear();this.getType=this.getType.bind(this);this.getMindmap=this.getMindmap.bind(this);this.getElementById=this.getElementById.bind(this);this.getParent=this.getParent.bind(this);this.getMindmap=this.getMindmap.bind(this);this.addNode=this.addNode.bind(this);this.decorateNode=this.decorateNode.bind(this)}static{(0,a.K2)(this,"MindmapDB")}clear(){this.nodes=[];this.count=0;this.elements={}}getParent(t){for(let e=this.nodes.length-1;e>=0;e--){if(this.nodes[e].level0?this.nodes[0]:null}addNode(t,e,r,i){a.Rm.info("addNode",t,e,r,i);const n=(0,a.D7)();let o=n.mindmap?.padding??a.UI.mindmap.padding;switch(i){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:o*=2;break}const s={id:this.count++,nodeId:(0,a.jZ)(e,n),level:t,descr:(0,a.jZ)(r,n),type:i,children:[],width:n.mindmap?.maxNodeWidth??a.UI.mindmap.maxNodeWidth,padding:o};const h=this.getParent(t);if(h){h.children.push(s);this.nodes.push(s)}else{if(this.nodes.length===0){this.nodes.push(s)}else{throw new Error(`There can be only one root. No parent could be found for ("${s.descr}")`)}}}getType(t,e){a.Rm.debug("In get type",t,e);switch(t){case"[":return this.nodeType.RECT;case"(":return e===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}decorateNode(t){if(!t){return}const e=(0,a.D7)();const r=this.nodes[this.nodes.length-1];if(t.icon){r.icon=(0,a.jZ)(t.icon,e)}if(t.class){r.class=(0,a.jZ)(t.class,e)}}type2Str(t){switch(t){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}getLogger(){return a.Rm}};var E=12;var _=(0,a.K2)((function(t,e,r,i){const n=5;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 ${r.height-n} v${-r.height+2*n} q0,-5 5,-5 h${r.width-2*n} q5,0 5,5 v${r.height-n} H0 Z`);e.append("line").attr("class","node-line-"+i).attr("x1",0).attr("y1",r.height).attr("x2",r.width).attr("y2",r.height)}),"defaultBkg");var m=(0,a.K2)((function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("width",r.width)}),"rectBkg");var N=(0,a.K2)((function(t,e,r){const i=r.width;const n=r.height;const o=.15*i;const a=.25*i;const s=.35*i;const h=.2*i;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${o},${o} 0 0,1 ${i*.25},${-1*i*.1}\n a${s},${s} 1 0,1 ${i*.4},${-1*i*.1}\n a${a},${a} 1 0,1 ${i*.35},${1*i*.2}\n\n a${o},${o} 1 0,1 ${i*.15},${1*n*.35}\n a${h},${h} 1 0,1 ${-1*i*.15},${1*n*.65}\n\n a${a},${o} 1 0,1 ${-1*i*.25},${i*.15}\n a${s},${s} 1 0,1 ${-1*i*.5},${0}\n a${o},${o} 1 0,1 ${-1*i*.25},${-1*i*.15}\n\n a${o},${o} 1 0,1 ${-1*i*.1},${-1*n*.35}\n a${h},${h} 1 0,1 ${i*.1},${-1*n*.65}\n\n H0 V0 Z`)}),"cloudBkg");var A=(0,a.K2)((function(t,e,r){const i=r.width;const n=r.height;const o=.15*i;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${o},${o} 1 0,0 ${i*.25},${-1*n*.1}\n a${o},${o} 1 0,0 ${i*.25},${0}\n a${o},${o} 1 0,0 ${i*.25},${0}\n a${o},${o} 1 0,0 ${i*.25},${1*n*.1}\n\n a${o},${o} 1 0,0 ${i*.15},${1*n*.33}\n a${o*.8},${o*.8} 1 0,0 ${0},${1*n*.34}\n a${o},${o} 1 0,0 ${-1*i*.15},${1*n*.33}\n\n a${o},${o} 1 0,0 ${-1*i*.25},${n*.15}\n a${o},${o} 1 0,0 ${-1*i*.25},${0}\n a${o},${o} 1 0,0 ${-1*i*.25},${0}\n a${o},${o} 1 0,0 ${-1*i*.25},${-1*n*.15}\n\n a${o},${o} 1 0,0 ${-1*i*.1},${-1*n*.33}\n a${o*.8},${o*.8} 1 0,0 ${0},${-1*n*.34}\n a${o},${o} 1 0,0 ${i*.1},${-1*n*.33}\n\n H0 V0 Z`)}),"bangBkg");var T=(0,a.K2)((function(t,e,r){e.append("circle").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("r",r.width/2)}),"circleBkg");function L(t,e,r,i,n){return t.insert("polygon",":first-child").attr("points",i.map((function(t){return t.x+","+t.y})).join(" ")).attr("transform","translate("+(n.width-e)/2+", "+r+")")}(0,a.K2)(L,"insertPolygonShape");var D=(0,a.K2)((function(t,e,r){const i=r.height;const n=4;const o=i/n;const a=r.width-r.padding+2*o;const s=[{x:o,y:0},{x:a-o,y:0},{x:a,y:-i/2},{x:a-o,y:-i},{x:o,y:-i},{x:0,y:-i/2}];L(e,a,i,s,r)}),"hexagonBkg");var O=(0,a.K2)((function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("rx",r.padding).attr("ry",r.padding).attr("width",r.width)}),"roundedRectBkg");var I=(0,a.K2)((async function(t,e,r,o,a){const s=a.htmlLabels;const h=o%(E-1);const l=e.append("g");r.section=h;let c="section-"+h;if(h<0){c+=" section-root"}l.attr("class",(r.class?r.class+" ":"")+"mindmap-node "+c);const u=l.append("g");const g=l.append("g");const d=r.descr.replace(/()/g,"\n");await(0,i.GZ)(g,d,{useHtmlLabels:s,width:r.width,classes:"mindmap-node-label"},a);if(!s){g.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle")}const p=g.node().getBBox();const[f]=(0,n.I5)(a.fontSize);r.height=p.height+f*1.1*.5+r.padding;r.width=p.width+2*r.padding;if(r.icon){if(r.type===t.nodeType.CIRCLE){r.height+=50;r.width+=50;const t=l.append("foreignObject").attr("height","50px").attr("width",r.width).attr("style","text-align: center;");t.append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+h+" "+r.icon);g.attr("transform","translate("+r.width/2+", "+(r.height/2-1.5*r.padding)+")")}else{r.width+=50;const t=r.height;r.height=Math.max(t,60);const e=Math.abs(r.height-t);const i=l.append("foreignObject").attr("width","60px").attr("height",r.height).attr("style","text-align: center;margin-top:"+e/2+"px;");i.append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+h+" "+r.icon);g.attr("transform","translate("+(25+r.width/2)+", "+(e/2+r.padding/2)+")")}}else{if(!s){const t=r.width/2;const e=r.padding/2;g.attr("transform","translate("+t+", "+e+")")}else{const t=(r.width-p.width)/2;const e=(r.height-p.height)/2;g.attr("transform","translate("+t+", "+e+")")}}switch(r.type){case t.nodeType.DEFAULT:_(t,u,r,h);break;case t.nodeType.ROUNDED_RECT:O(t,u,r,h);break;case t.nodeType.RECT:m(t,u,r,h);break;case t.nodeType.CIRCLE:u.attr("transform","translate("+r.width/2+", "+ +r.height/2+")");T(t,u,r,h);break;case t.nodeType.CLOUD:N(t,u,r,h);break;case t.nodeType.BANG:A(t,u,r,h);break;case t.nodeType.HEXAGON:D(t,u,r,h);break}t.setElementForId(r.id,l);return r.height}),"drawNode");var w=(0,a.K2)((function(t,e){const r=t.getElementById(e.id);const i=e.x||0;const n=e.y||0;r.attr("transform","translate("+i+","+n+")")}),"positionNode");s.A.use(l());async function R(t,e,r,i,n){await I(t,e,r,i,n);if(r.children){await Promise.all(r.children.map(((r,o)=>R(t,e,r,i<0?o:i,n))))}}(0,a.K2)(R,"drawNodes");function C(t,e){e.edges().map(((e,r)=>{const i=e.data();if(e[0]._private.bodyBounds){const n=e[0]._private.rscratch;a.Rm.trace("Edge: ",r,i);t.insert("path").attr("d",`M ${n.startX},${n.startY} L ${n.midX},${n.midY} L${n.endX},${n.endY} `).attr("class","edge section-edge-"+i.section+" edge-depth-"+i.depth)}}))}(0,a.K2)(C,"drawEdges");function M(t,e,r,i){e.add({group:"nodes",data:{id:t.id.toString(),labelText:t.descr,height:t.height,width:t.width,level:i,nodeId:t.id,padding:t.padding,type:t.type},position:{x:t.x,y:t.y}});if(t.children){t.children.forEach((n=>{M(n,e,r,i+1);e.add({group:"edges",data:{id:`${t.id}_${n.id}`,source:t.id,target:n.id,depth:i,section:n.section}})}))}}(0,a.K2)(M,"addNodes");function x(t,e){return new Promise((r=>{const i=(0,c.Ltv)("body").append("div").attr("id","cy").attr("style","display:none");const n=(0,s.A)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});i.remove();M(t,n,e,0);n.nodes().forEach((function(t){t.layoutDimensions=()=>{const e=t.data();return{w:e.width,h:e.height}}}));n.layout({name:"cose-bilkent",quality:"proof",styleEnabled:false,animate:false}).run();n.ready((t=>{a.Rm.info("Ready",t);r(n)}))}))}(0,a.K2)(x,"layoutMindmap");function b(t,e){e.nodes().map(((e,r)=>{const i=e.data();i.x=e.position().x;i.y=e.position().y;w(t,i);const n=t.getElementById(i.nodeId);a.Rm.info("id:",r,"Position: (",e.position().x,", ",e.position().y,")",i);n.attr("transform",`translate(${e.position().x-i.width/2}, ${e.position().y-i.height/2})`);n.attr("attr",`apa-${r})`)}))}(0,a.K2)(b,"positionNodes");var G=(0,a.K2)((async(t,e,r,i)=>{a.Rm.debug("Rendering mindmap diagram\n"+t);const n=i.db;const s=n.getMindmap();if(!s){return}const h=(0,a.D7)();h.htmlLabels=false;const l=(0,o.D)(e);const c=l.append("g");c.attr("class","mindmap-edges");const u=l.append("g");u.attr("class","mindmap-nodes");await R(n,u,s,-1,h);const g=await x(s,h);C(c,g);b(n,g);(0,a.ot)(void 0,l,h.mindmap?.padding??a.UI.mindmap.padding,h.mindmap?.useMaxWidth??a.UI.mindmap.useMaxWidth)}),"draw");var S={draw:G};var F=(0,a.K2)((t=>{let e="";for(let r=0;r`\n .edge {\n stroke-width: 3;\n }\n ${F(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${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`),"getStyles");var k=P;var U={get db(){return new y},renderer:S,parser:f,styles:k}}}]);