diff --git a/dist/stixview.bundle.js b/dist/stixview.bundle.js index f4be442..4fa1ae8 100644 --- a/dist/stixview.bundle.js +++ b/dist/stixview.bundle.js @@ -1,2 +1,2 @@ /*! For license information please see stixview.bundle.js.LICENSE.txt */ -(()=>{var t={1781:function(t,e,n){var r;r=function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},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=6)}([function(e,n){e.exports=t},function(t,e,n){"use strict";var r=n(0).LGraph;function i(t,e,n){r.call(this,t,e,n),this.inOrder=void 0,this.currentIndex=0,this.nodeSeparation=void 0,this.stack=[],this.perimeter=0,this.centerX=0,this.centerY=0,this.radius=0}for(var o in i.prototype=Object.create(r.prototype),r)i[o]=r[o];i.prototype.initOrdering=function(){this.inOrder=[]},i.prototype.getOrder=function(){return this.inOrder},i.prototype.getCenterX=function(){return this.centerX},i.prototype.getCenterY=function(){return this.centerY},i.prototype.getRadius=function(){return this.radius},i.prototype.getSize=function(){return this.getNodes().length},i.prototype.getTotalCrossingOfCircle=function(){var t=0;for(var e in this.inOrder){var n=e.getTotalCrossingOfEdges();if(-1===n)return-1;t+=n}return t/4},i.prototype.hasFinishedOrdering=function(){return this.currentIndex===this.getNodes().length},i.prototype.getNodeSeparation=function(){return this.nodeSeparation},i.prototype.setNodeSeparation=function(t){this.nodeSeparation=t},i.prototype.correctAngles=function(){var t=this;t.currentIndex=0,t.inOrder.forEach((function(e){return t.putInOrder(e)}))},i.prototype.putInOrder=function(t){for(var e=this,n=e.getNodes(),r=!1,i=0;i=0;i--){var o=r[i];o.isOrdered()||t.stack.push(o)}return e},i.prototype.calculateRadius=function(){var t=this,e=0;t.getNodes().forEach((function(t){return e+=Math.sqrt(t.getWidth()*t.getWidth()+t.getHeight()*t.getHeight())})),t.perimeter=e+t.getNodes().length*t.nodeSeparation;var n=t.perimeter/(2*Math.PI);t.getParent().setWidth(2*n),t.getParent().setHeight(2*n),t.getParent().setCenter(t.getParent().getWidth(),t.getParent().getHeight()),t.centerX=t.getParent().getCenterX(),t.centerY=t.getParent().getCenterY(),t.radius=t.getParent().getHeight()/2},i.prototype.calculateEdgeCrossingsOfNodes=function(){this.getNodes().forEach((function(t){return t.calculateTotalCrossing()}))},i.prototype.loadOldIndicesOfNodes=function(){for(var t=0;tMath.min(a,s)&&0!==s&&0!==a},i.prototype.crossingWithEdge=function(t){return this.crossesWithEdge(t)?1:0},i.prototype.calculateTotalCrossingWithList=function(t){var e=this,n=0;return t.forEach((function(t){return n+=e.crossingWithEdge(t)})),n},t.exports=i},function(t,e,n){"use strict";var r=n(0).LNode;function i(t,e,n,i){void 0!==n&&void 0!==i?r.call(this,t,e,n,i):r.call(this,t,e),this.angle=0,this.circleIndex=-1,this.totalCrossingOfEdges=-1,this.isCrossingNumberValid=!1}for(var o in n(0).Quicksort,i.prototype=Object.create(r.prototype),r)i[o]=r[o];i.prototype.getCircle=function(){return this.getOwner()},i.prototype.setIndex=function(t){this.circleIndex=t,this.isCrossingNumberValid=!1},i.prototype.getIndex=function(){return this.circleIndex},i.prototype.getNeighborsSortedByDegree=function(){var t=Array.from(this.getNeighborsList());return(t=t.filter((function(t){return-1===t.getIndex()}))).sort((function(t,e){return t.getDegree()-e.getDegree()})),t},i.prototype.getDegree=function(){return this.getEdges().length},i.prototype.isOrdered=function(){return this.getIndex()>-1},i.prototype.setAngle=function(t){this.angle=t},i.prototype.getAngle=function(){return this.angle},i.prototype.getCircDistWithTheNode=function(t){var e=this,n=t.getIndex();if(-1===n||-1===e.getIndex())return-1;var r=e.getIndex()-n;return r<0&&(r+=e.getCircle().getSize()),r},i.prototype.getCrossingNumberWithNode=function(t){var e=0;return this.getEdges().forEach((function(n){t.getEdges().forEach((function(t){e+=n.crossingWithEdge(t)}))})),e},i.prototype.getTotalCrossingOfEdges=function(){var t=this;return t.isCrossingNumberValid||(t.calculateTotalCrossing(),t.isCrossingNumberValid=!0),t.totalCrossingOfEdges},i.prototype.calculateTotalCrossing=function(){var t=this,e=0,n=[];n.push.apply(n,t.getCircle().getEdges()),n=n.filter((function(e){return t.getEdges().indexOf(e)<0})),t.getEdges().forEach((function(t){return e+=t.calculateTotalCrossingWithList(n)})),t.totalCrossingOfEdges=e},t.exports=i},function(t,e,n){"use strict";var r=n(0).Layout,i=n(2),o=n(1),a=n(4),s=n(3);function c(){r.call(this),this.nodeSeparation=i.DEFAULT_NODE_SEPARATION}for(var u in c.prototype=Object.create(r.prototype),r)c[u]=r[u];c.prototype.newGraph=function(t){return this.avsdfCircle=new o(null,this.graphManager,t),this.avsdfCircle},c.prototype.newNode=function(t){return new a(this.graphManager,t)},c.prototype.newEdge=function(t){return new s(null,null,t)},c.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},n=0;n1)return!1;var t=this.avsdfCircle;for(t.setNodeSeparation(this.nodeSeparation),t.calculateRadius(),t.initOrdering();!t.hasFinishedOrdering();){var e=t.findNodeToPlace();t.putInOrder(e)}return!0},c.prototype.updateNodeAngles=function(){this.graphManager.getRoot().correctAngles()},c.prototype.updateNodeCoordinates=function(){var t=this.graphManager.getRoot();t.getNodes().forEach((function(e){e.setCenter(t.getCenterX()+t.getRadius()*Math.cos(e.getAngle()),t.getCenterY()+t.getRadius()*Math.sin(e.getAngle()))}))},c.prototype.initPostProcess=function(){this.avsdfCircle.calculateEdgeCrossingsOfNodes();var t=this.avsdfCircle.getNodes();return t.sort((function(t,e){return e.getTotalCrossingOfEdges()-t.getTotalCrossingOfEdges()})),t},c.prototype.oneStepPostProcess=function(t){for(var e=this,n=t.getTotalCrossingOfEdges(),r=void 0,i=Array.from(t.getNeighborsList()),o=0;o=n?e.avsdfCircle.loadOldIndicesOfNodes():(e.avsdfCircle.reOrderVertices(),n=r)}}},t.exports=c},function(t,e,n){"use strict";var r={};r.layoutBase=n(0),r.AVSDFConstants=n(2),r.AVSDFEdge=n(3),r.AVSDFCircle=n(1),r.AVSDFLayout=n(5),r.AVSDFNode=n(4),t.exports=r}])},t.exports=r(n(3143))},7799:function(t,e,n){var r;r=function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},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(e,n){e.exports=t},function(t,e,n){"use strict";var r=n(0).FDLayoutConstants;function i(){}for(var o in r)i[o]=r[o];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,t.exports=i},function(t,e,n){"use strict";var r=n(0).FDLayoutEdge;function i(t,e,n){r.call(this,t,e,n)}for(var o in i.prototype=Object.create(r.prototype),r)i[o]=r[o];t.exports=i},function(t,e,n){"use strict";var r=n(0).LGraph;function i(t,e,n){r.call(this,t,e,n)}for(var o in i.prototype=Object.create(r.prototype),r)i[o]=r[o];t.exports=i},function(t,e,n){"use strict";var r=n(0).LGraphManager;function i(t){r.call(this,t)}for(var o in i.prototype=Object.create(r.prototype),r)i[o]=r[o];t.exports=i},function(t,e,n){"use strict";var r=n(0).FDLayoutNode,i=n(0).IMath;function o(t,e,n,i){r.call(this,t,e,n,i)}for(var a in o.prototype=Object.create(r.prototype),r)o[a]=r[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,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*i.sign(this.displacementY)),null==this.child||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},o.prototype.propogateDisplacementToChildren=function(t,e){for(var n,r=this.getChild().getNodes(),i=0;i0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.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%u.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=u.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=u.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},n=0;n1)for(s=0;sr&&(r=Math.floor(a.y)),o=Math.floor(a.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new f(l.WORLD_CENTER_X-a.x/2,l.WORLD_CENTER_Y-a.y/2))},y.radialLayout=function(t,e,n){var r=Math.max(this.maxDiagonalInTree(t),c.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(e,null,0,359,0,r);var i=v.calculateBounds(t),o=new b;o.setDeviceOrgX(i.getMinX()),o.setDeviceOrgY(i.getMinY()),o.setWorldOrgX(n.x),o.setWorldOrgY(n.y);for(var a=0;a1;){var b=v[0];v.splice(0,1);var w=l.indexOf(b);w>=0&&l.splice(w,1),g--,h--}f=null!=e?(l.indexOf(v[0])+1)%g:0;for(var m=Math.abs(r-n)/h,x=f;d!=h;x=++x%g){var E=l[x].getOtherEnd(t);if(E!=e){var _=(n+d*m)%360,k=(_+m)%360;y.branchRadialLayout(E,t,_,k,i+o,o),d++}}},y.maxDiagonalInTree=function(t){for(var e=g.MIN_VALUE,n=0;ne&&(e=r)}return e},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){var r="DummyCompound_"+n;t.memberGroups[r]=e[n];var i=e[n][0].getParent(),o=new a(t.graphManager);o.id=r,o.paddingLeft=i.paddingLeft||0,o.paddingRight=i.paddingRight||0,o.paddingBottom=i.paddingBottom||0,o.paddingTop=i.paddingTop||0,t.idToDummyNode[r]=o;var s=t.getGraphManager().add(t.newGraph(),o),c=i.getChild();c.add(o);for(var u=0;u=0;t--){var e=this.compoundOrder[t],n=e.id,r=e.paddingLeft,i=e.paddingTop;this.adjustLocations(this.tiledMemberPack[n],e.rect.x,e.rect.y,r,i)}},y.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach((function(n){var r=t.idToDummyNode[n],i=r.paddingLeft,o=r.paddingTop;t.adjustLocations(e[n],r.rect.x,r.rect.y,i,o)}))},y.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 r=n.getNodes(),i=0;i0)return this.toBeTiled[e]=!1,!1;if(null!=o.getChild()){if(!this.getToBeTiled(o))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[o.id]=!1}return this.toBeTiled[e]=!0,!0},y.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),n=0,r=0;rc&&(c=l.rect.height)}n+=c+t.verticalPadding}},y.prototype.tileCompoundMembers=function(t,e){var n=this;this.tiledMemberPack=[],Object.keys(t).forEach((function(r){var i=e[r];n.tiledMemberPack[r]=n.tileNodes(t[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height}))},y.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&&(a+=t.verticalPadding);var s=0;a>t.rowHeight[n]&&(s=t.rowHeight[n],t.rowHeight[n]=a,s=t.rowHeight[n]-s),t.height+=s,t.rows[n].push(e)},y.prototype.getShortestRowIndex=function(t){for(var e=-1,n=Number.MAX_VALUE,r=0;rn&&(e=r,n=t.rowWidth[r]);return e},y.prototype.canAddHorizontal=function(t,e,n){var r=this.getShortestRowIndex(t);if(r<0)return!0;var i=t.rowWidth[r];if(i+t.horizontalPadding+e<=t.width)return!0;var o,a,s=0;return t.rowHeight[r]0&&(s=n+t.verticalPadding-t.rowHeight[r]),o=t.width-i>=e+t.horizontalPadding?(t.height+s)/(i+e+t.horizontalPadding):(t.height+s)/t.width,s=n+t.verticalPadding,(a=t.widtho&&e!=n){r.splice(-1,1),t.rows[n].push(i),t.rowWidth[e]=t.rowWidth[e]-o,t.rowWidth[n]=t.rowWidth[n]+o,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var a=Number.MIN_VALUE,s=0;sa&&(a=r[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 l=i;l<=o;l++)c[0]+=this.grid[l][a-1].length+this.grid[l][a].length-1;if(o0)for(l=a;l<=s;l++)c[3]+=this.grid[i-1][l].length+this.grid[i][l].length-1;for(var h,f,d=g.MAX_VALUE,p=0;p{"use strict";n.d(e,{A:()=>s});var r=n(1601),i=n.n(r),o=n(6314),a=n.n(o)()(i());a.push([t.id,".stix-viewer-block {\n display: block;\n overflow: auto;\n position: relative;\n font-size: 0.8em;\n font-family: sans-serif;\n margin: 10px 0px;\n}\n\n.stix-viewer-block .stix-viewer {\n position: relative;\n border: 1px solid #ddd;\n border-radius: 2px;\n}\n\n.stix-viewer-block .viewer-footer {\n padding: 8px;\n\n border-radius: 0 0 2px 2px;\n border-width: 0px 1px 1px 1px;\n border-style: solid;\n border-color: #ddd;\n\n background-color: #f7f7f7; \n line-height: 1.2em;\n}\n\n.stix-viewer-block .stix-viewer .stix-graph {\n width: 100%;\n height: 100%;\n position: relative;\n}\n\n\n.stix-viewer-block .viewer-header {\n padding: 8px;\n font-weight: bold;\n border-radius: 2px 2px 0 0;\n border-width: 1px 1px 0px 1px;\n border-style: solid;\n border-color: #ddd;\n background-color: #f7f7f7; \n color: #586069;\n line-height: 1.2em;\n}\n\n.stix-viewer-block .viewer-header a {\n color: #586069;\n}\n\n.stix-viewer .viewer-placeholder {\n top: 45%;\n position: relative;\n font-family: sans-serif;\n font-size: 2em;\n color: #d6d6d6;\n font-weight: lighter;\n text-align: center;\n}\n\n.stix-viewer-block .dragover-active {\n background-color: #eee;\n}\n\n.stix-viewer-block .loading {\n background-color: #f7f7f7; \n}\n\n.stix-viewer-block .sidebar {\n top: 0px;\n bottom: 0;\n right: 0;\n width: 40%;\n max-width: 400px;\n position: absolute;\n padding: 10px;\n display: none;\n border-width: 0px 0px 0px 1px;\n border-style: solid;\n border-color: #ddd;\n background-color: #f7f7f7;\n overflow: scroll;\n z-index: 9999;\n}\n\n.stix-viewer-block .sidebar p {\n line-height: 1.4em;\n}\n\n.stix-viewer-block .sidebar .sidebar-title {\n word-wrap: break-word;\n font-weight: normal;\n font-size: 20pt;\n}\n\n.stix-viewer-block .sidebar .sidebar-close-icon {\n float: right;\n font-size: 20pt;\n padding: 0px 10px;\n cursor: pointer;\n}\n\n.stix-viewer-block .sidebar img.sidebar-type-icon {\n height: 30px;\n vertical-align: middle;\n margin-right: 5px;\n}\n\n.stix-viewer-block .sidebar .sidebar-textarea {\n height: 400px;\n width: 100%;\n}\n\n.stix-viewer-block .viewer-footer {\n color: #586069;\n background-color: #f7f7f7;\n}\n\n.stix-viewer-block .viewer-footer a {\n color: #586069;\n}\n\n.marking-tag {\n\n /* https://floating-ui.com/docs/migration#positioning-function-change */\n width: max-content;\n position: absolute;\n top: 0;\n left: 0;\n\n font-size: 0.8em;\n font-family: sans-serif;\n padding: 0px 2px;\n border-radius: 2px;\n border-width: 1px;\n border-style: solid;\n user-select: none;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n/* tlp v1 */\n\n.marking-tag-tlp-white {\n color: black;\n background-color: white;\n border-color: black;\n}\n\n.marking-tag-tlp-green {\n color: white;\n background-color: green;\n border-color: green;\n}\n\n.marking-tag-tlp-amber {\n color: white;\n background-color: orange;\n border-color: orange;\n}\n\n.marking-tag-tlp-red {\n color: white;\n background-color: red;\n border-color: red;\n}\n\n/* tlp v2 */\n\n.marking-tag-tlpv2-clear {\n color: black;\n background-color: white;\n border-color: black;\n}\n\n.marking-tag-tlpv2-green {\n color: white;\n background-color: green;\n border-color: green;\n}\n\n.marking-tag-tlpv2-amber {\n color: white;\n background-color: orange;\n border-color: orange;\n}\n\n.marking-tag-tlpv2-amber-strict {\n color: white;\n background-color: orange;\n border-color: orange;\n}\n\n.marking-tag-tlpv2-red {\n color: white;\n background-color: red;\n border-color: red;\n}\n\n/* tlp unknown */\n\n.marking-tag-tlp-custom {\n color: black;\n background-color: white;\n border-color: black;\n}\n",""]);const s=a},6314:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(r)for(var s=0;s0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=o),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),e.push(l))}},e}},1601:t=>{"use strict";t.exports=function(t){return t[1]}},3519:(t,e,n)=>{var r;!function(){"use strict";var i=function(t){if(t){var e={enabled:!0,selector:"node",speed:1};t("core","autopanOnDrag",(function(t){var o=this,a=n(o,"eventFcns")||{};if(r(o,"eventFcns",a),"get"!==t){var s=function(t,e){var n={};for(var r in t)n[r]=t[r];for(var r in e)n[r]=e[r];return n}(e,t);r(o,"options",s),s.enabled&&(i(o),r(o,"enabled",!0))}return{enable:function(){i(o)},disable:function(){!function(t){if(n(t,"enabled")){var e=n(t,"eventFcns"),i=n(t,"options");t.off("tapstart",i.selector,e.tapstartFcn),t.off("tapdrag",e.tapdragFcn),t.off("tapend",e.tapendFcn),r(t,"enabled",void 0)}}(o)}}}))}function n(t,e){void 0===t.scratch("_autopanOnDrag")&&t.scratch("_autopanOnDrag",{});var n=t.scratch("_autopanOnDrag");return void 0===e?n:n[e]}function r(t,e,r){var i=n(t);i[e]=r,t.scratch("_autopanOnDrag",i)}function i(t,e){if(!n(t,"enabled")){var i=n(t,"eventFcns");e=n(t,"options"),t.on("tapstart",e.selector,i.tapstartFcn=function(){var e=this,n=e.renderedPosition(),i=e.renderedWidth(),o=e.renderedHeight(),a=t.width(),s=t.height(),c=n.x-i/2,u=n.y-o/2,l=n.x+i/2,h=n.y+o/2,f=!1;(l>=a||c<=0||h>=s||u<=0)&&(f=!0),f||r(t,"currentNode",e)}),t.on("tapdrag",i.tapdragFcn=function(){var r=n(t,"currentNode");if(void 0!==r){var i,o,a=r.renderedPosition(),s=r.renderedWidth(),c=r.renderedHeight(),u=t.width(),l=t.height(),h=a.x-s/2,f=a.y-c/2,d=a.x+s/2,g=a.y+c/2;d>=u&&(i=-d+u),h<=0&&(i=-h),g>=l&&(o=-g+l),f<=0&&(o=-f),i&&t.panBy({x:i*e.speed}),o&&t.panBy({y:o*e.speed})}}),t.on("tapend",i.tapendFcn=function(){r(t,"currentNode",void 0)}),r(t,"eventFcns",i),r(t,"enabled",!0)}}};t.exports&&(t.exports=i),void 0===(r=function(){return i}.call(e,n,e,t))||(t.exports=r),"undefined"!=typeof cytoscape&&i(cytoscape)}()},7593:function(t,e,n){var r;r=function(t,e){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},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=14)}([function(e,n){e.exports=t},function(t,e,n){"use strict";var r=n(0).layoutBase.FDLayoutConstants;function i(){}for(var o in r)i[o]=r[o];i.DEFAULT_SPRING_STRENGTH=1.5*r.DEFAULT_SPRING_STRENGTH,i.DEFAULT_NODE_SEPARATION=r.DEFAULT_EDGE_LENGTH/4,i.DEFAULT_IDEAL_INTER_CLUSTER_EDGE_LENGTH_COEFF=1.4,i.DEFAULT_ALLOW_NODES_INSIDE_CIRCLE=!1,i.DEFAULT_MAX_RATIO_OF_NODES_INSIDE_CIRCLE=.1,i.DEFAULT_INNER_EDGE_LENGTH=r.DEFAULT_EDGE_LENGTH/3,i.MAX_ROTATION_ANGLE=Math.PI/36,i.MIN_ROTATION_ANGLE=-i.MAX_ROTATION_ANGLE,i.SWAP_IDLE_DURATION=45,i.SWAP_PREPERATION_DURATION=5,i.SWAP_PERIOD=i.SWAP_IDLE_DURATION+i.SWAP_PREPERATION_DURATION,i.SWAP_HISTORY_CLEARANCE_PERIOD=6*i.SWAP_PERIOD,i.MIN_DISPLACEMENT_FOR_SWAP=6,i.REVERSE_PERIOD=25,i.CLUSTER_ENLARGEMENT_CHECK_PERIOD=50,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,t.exports=i},function(t,e,n){"use strict";t.exports=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;re&&(e=r.getWidth()),r.getHeight()>e&&(e=r.getHeight())}var i=2*(t.radius+t.margin)+e,o=t.getParent();o.setHeight(i),o.setWidth(i)},l.prototype.computeOrderMatrix=function(){var t=this.onCircleNodes.length;this.orderMatrix=new Array(t);for(var e=0;en){var o=this.onCircleNodes[r].getOnCircleNodeExt().getAngle()-this.onCircleNodes[n].getOnCircleNodeExt().getAngle();o<0&&(o+=i.TWO_PI),o<=Math.PI?(this.orderMatrix[n][r]=!0,this.orderMatrix[r][n]=!1):(this.orderMatrix[n][r]=!1,this.orderMatrix[r][n]=!0)}},l.prototype.rotate=function(){var t=this.getParent(),e=this.getOnCircleNodes().length,n=t.rotationAmount/e,r=this.getGraphManager().getLayout();if(0!==n){var i=n/this.radius;i>s.MAX_ROTATION_ANGLE?i=s.MAX_ROTATION_ANGLE:ie.getOnCircleNodeExt().getIndex()&&(n=e,r=t),n.getOnCircleNodeExt().getPrevNode()===r){var a=r;r=n,n=a}var s=n.getOnCircleNodeExt(),c=r.getOnCircleNodeExt(),u=s.getPrevNode(),l=this.getGraphManager().getLayout().getNodeSeparation()+this.getAdditionalNodeSeparation(),h=(u.getOnCircleNodeExt().getAngle()+(u.getHalfTheDiagonal()+r.getHalfTheDiagonal()+l)/this.radius)%(2*Math.PI);c.setAngle(h),h=(c.getAngle()+(r.getHalfTheDiagonal()+n.getHalfTheDiagonal()+l)/this.radius)%(2*Math.PI),s.setAngle(h),s.updatePosition(),c.updatePosition();var f=i.getIndex();i.setIndex(o.getIndex()),o.setIndex(f),this.getOnCircleNodes()[i.getIndex()]=t,this.getOnCircleNodes()[o.getIndex()]=e,i.updateSwappingConditions(),o.updateSwappingConditions(),i.getNextNode()===e?(i.getPrevNode().getOnCircleNodeExt().updateSwappingConditions(),o.getNextNode().getOnCircleNodeExt().updateSwappingConditions()):(i.getNextNode().getOnCircleNodeExt().updateSwappingConditions(),o.getPrevNode().getOnCircleNodeExt().updateSwappingConditions())},l.prototype.checkAndReverseIfReverseIsBetter=function(){for(var t=this.getInterClusterEdges(),e=new Array(t.length),n=void 0,r=this.getParent().getCenter(),o=void 0,a=void 0,s=void 0,l=this.onCircleNodes.length,h=new Array(l),f=0;f1&&d++;for(var p=this.onCircleNodes,v=l+d,b=new Array(2*v),y=new Array(2*v),w=void 0,m=-1,x=0;xN)return this.reverseNodes(),this.setMayNotBeReversed(),!0}return!1},l.prototype.computeAlignmentScore=function(t,e){return new o(t,e,20,-1,-2).getScore()},l.prototype.reverseNodes=function(){for(var t=this.getOnCircleNodes(),e=this.getOnCircleNodes().length,n=0;n-1&&this.onCircleNodes.splice(e,1),this.inCircleNodes.push(t);for(var n=0;n0&&void 0!==arguments[0]&&arguments[0],e=0,n=this.getOnCircleNodes(),r=0;rl&&(l=h[f].getDiagonal());l+=s.DEFAULT_INNER_EDGE_LENGTH;var d=u/Math.PI-l;h=this.getInCircleNodes(),l=0;for(var g=0;gl&&(l=h[g].getDiagonal());if((d-=l=1.2*l+s.DEFAULT_INNER_EDGE_LENGTH)Math.min(l,h)&&0!==h&&0!==l&&(e=!0)}return e},i.prototype.calculateTotalCrossingWithList=function(t){for(var e=0,n=0;nt.getAngle()||e.getAngle()===t.getAngle()&&t!==e&&this.ownerCircle.getOrder(this.ownerCircle.getThisEnd(t.getEdge()),this.ownerCircle.getThisEnd(e.getEdge()))}},{key:"_quicksort",value:function(t,e,n){if(e-1&&(o.getInNodes().splice(a,1),o.getOutNodes().push(e))}if(-1!==i){var s=n.getOwner(),c=s.getInNodes().indexOf(n);c>-1&&(s.getInNodes().splice(c,1),s.getOutNodes().push(n))}})),u},y.prototype.doStep1=function(t){this.step=y.STEP_1,this.phase=y.PHASE_OTHER;for(var e=new i,n=this.graphManager.getGraphs(),r=0;r0){var L=o.getParent(),S=s.getParent();L.setLocation(S.getLocation().x,S.getLocation().y),o.setRadius(s.getRadius()),o.calculateParentNodeDimension()}}}},y.prototype.doStep2=function(){this.step=y.STEP_2,this.phase=y.PHASE_OTHER;for(var t=[],e=[],n=new i,r=new i,o=new h,a=o.newGraphManager().addRoot(),s=this.graphManager.getNonOnCircleNodes(),c=0;cthis.maxIterations/4)&&this.isConverged())return!0;this.coolingFactor=this.initialCoolingFactor*((this.maxIterations-this.iterations)/this.maxIterations)}if(this.totalDisplacement=0,this.step===y.STEP_3)this.iterations%f.REVERSE_PERIOD==0&&this.checkAndReverseIfReverseIsBetter();else if(this.step===y.STEP_4){this.iterations%f.SWAP_HISTORY_CLEARANCE_PERIOD==0&&(this.swappedPairsInLastIteration=[]);var t=this.iterations%f.SWAP_PERIOD;t>=f.SWAP_IDLE_DURATION?this.phase=y.PHASE_SWAP_PREPERATION:this.phase=0===t?y.PHASE_PERFORM_SWAP:y.PHASE_OTHER}else!0===this.innerStepDone&&this.iterations%f.CLUSTER_ENLARGEMENT_CHECK_PERIOD==0&&this.clusterEnlargementCheck();return this.calcSpringForces(),this.calcRepulsionForces(),this.calcGravitationalForces(),this.calcTotalForces(),this.moveNodes(),this.iterations>=this.maxIterations},y.prototype.clusterEnlargementCheck=function(){for(var t=this.graphManager.getNonOnCircleNodes(),e=0;e300*n.getChild().getOnCircleNodes().length&&(n.getChild().setInnerNodePushCount(0),n.getChild().setAdditionalNodeSeparation(n.getChild().getAdditionalNodeSeparation()+6),n.getChild().reCalculateCircleSizeAndRadius(),n.getChild().reCalculateNodePositions(),n.reflectCenterChangeToChildren(r,i))}},y.prototype.prepareCirclesForReversal=function(){this.graphManager.getRoot().getNodes().forEach((function(t){var e=t.getChild();null!=e&&(e.getInterClusterEdges().length<2&&e.setMayNotBeReversed(),e.computeOrderMatrix())}))},y.prototype.calcIdealEdgeLengths=function(t){for(var e=this.graphManager.getAllEdges(),n=0;n0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.graphManager.getNonOnCircleNodes(),r=void 0;if(this.useFRGridVariant&&this.step>y.STEP_2){var i=this.graphManager.rootGraph,o=new Set;this.totalIterations%c.GRID_CALCULATION_CHECK_PERIOD==1&&t&&(this.innerStepDone?i.updateBounds(!1):i.updateBounds(!0),this.updateGrid());for(var a=0;ay.STEP_4;f++){var d=n[f];if(null!==d.getChild()&&void 0!==d.getChild())for(var g=d.getChild().getInCircleNodes(),p=0;p4){var a=4/r.getOnCircleNeighbors().length;r.displacementX=r.displacementX*a,r.displacementY=r.displacementY*a}var c=r.displacementX,u=r.displacementY,l=Math.sqrt(Math.pow(r.getCenterX()+r.displacementX-o.getCenterX(),2)+Math.pow(r.getCenterY()+r.displacementY-o.getCenterY(),2))+r.getDiagonal();if(l>o.getChild().getRadius()-f.DEFAULT_INNER_EDGE_LENGTH/5){o.getChild().setInnerNodePushCount(o.getChild().getInnerNodePushCount()+l-o.getChild().getRadius());var h=o.getCenterX(),d=o.getCenterY(),g=s.findCircleLineIntersections(r.getCenterX(),r.getCenterY(),r.getCenterX()+r.displacementX,r.getCenterY()+r.displacementY,h,d,o.getChild().getRadius()-f.DEFAULT_INNER_EDGE_LENGTH/5-r.getDiagonal());if(null!==g)if(g[0]>0){var p=Math.sqrt(Math.pow(r.displacementX,2)+Math.pow(r.displacementY,2));r.displacementX=g[0]*r.displacementX-r.displacementX/p,r.displacementY=g[0]*r.displacementY-r.displacementY/p}else r.displacementX=0,r.displacementY=0;else r.displacementX=0,r.displacementY=0}r.innerMove(c,u,this.coolingFactor)}}else{for(var v=this.graphManager.getOnCircleNodes(),w=v.length,m=[],x=[],E=[],_=[],k=void 0,N=void 0,C=void 0,T=void 0,A=void 0,O=void 0,I=void 0,L=0;L0&&O>0||A<0&&O<0);0===A||0===O?x.push(S):m.push(S)}var M=void 0,D=!0,P=void 0;for(m.sort((function(t,e){return t.getDiscrepancy()-e.getDiscrepancy()}));D&&m.length>0;)if(k=(M=m[m.length-1]).getFirstNode(),N=M.getSecondNode(),C=k.getOnCircleNodeExt(),T=N.getOnCircleNodeExt(),this.isSwappedPreviously(M))m.pop(),_.push(M);else{var R=C.getInterClusterIntersections(T);M.swap(),P=!1;var j=C.getInterClusterIntersections(T);(P=j>R)||j!==R||(P=M.inSameDirection()||M.getDiscrepancy()2;)a.push(o),this.setInnerNode(o),++r0&&this.moveInnerNode(a)}}this.innerStepDone=!0}},y.prototype.findInnerNode=function(t){var e=null,n=t.getOnCircleNodes().length,r=t.getOnCircleNodes();r.sort((function(t,e){return t.getEdges().length-e.getEdges().length}));for(var i=n-1;i>=0&&null==e;i--){var o=r[i];if(0===o.getOnCircleNodeExt().getInterClusterEdges().length){var a=this.findMinimalSpanningSegment(o);if(0!==a.length){for(var s=!1,c=0;c1&&(p=g-d,p+=n,p%=n),p>1){s=!0;break}}}}s||(e=o)}}}return e},y.prototype.setInnerNode=function(t){t.getOwner().setOnCircleNodeInner(t);var e=this.graphManager.getOnCircleNodes(),n=e.indexOf(t);n>-1&&e.splice(n,1),this.graphManager.inCircleNodes.push(t)},y.prototype.moveInnerNode=function(t){t[0].getOwner().moveOnCircleNodeInside(t)},y.prototype.findMinimalSpanningSegment=function(t){var e=[],n=t.getOnCircleNeighbors();if(0===n.length)return e;n.sort((function(t,e){return t.getOnCircleNodeExt().getIndex()-e.getOnCircleNodeExt().getIndex()}));var r=t.getOwner().getOnCircleNodes();r.sort((function(t,e){return t.getOnCircleNodeExt().getIndex()-e.getOnCircleNodeExt().getIndex()}));var i=null,o=null,a=r.length,s=r.length,c=n.length,u=void 0,l=void 0,h=void 0,f=void 0,d=void 0;for(u=0;uo.MAX_NODE_DISPLACEMENT&&(t=o.MAX_NODE_DISPLACEMENT*i.sign(t)),t},s.prototype.getOnCircleNeighbors=function(){for(var t=Array.from(this.getNeighborsList()),e=[],n=0;n0&&void 0!==arguments[0]?arguments[0]:1,e=this.getOwner().getGraphManager().getLayout();if(this.displacementX=this.getLimitedDisplacement(this.displacementX)*t,this.displacementY=this.getLimitedDisplacement(this.displacementY)*t,null!==this.getChild()&&void 0!==this.getChild()){var n=this.getChild().getNodes().length;this.displacementX/=n,this.displacementY/=n;for(var r=this.getChild().getNodes(),i=0;i2&&void 0!==arguments[2]?arguments[2]:1,r=this.getOwner().getGraphManager().getLayout();this.displacementX=this.getLimitedDisplacement(this.displacementX)*n,this.displacementY=this.getLimitedDisplacement(this.displacementY)*n,this.moveBy(this.displacementX,this.displacementY),r.totalDisplacement+=Math.abs(this.getLimitedDisplacement(t))+Math.abs(this.getLimitedDisplacement(e))},s.prototype.reset=function(){this.displacementX=0,this.displacementY=0},t.exports=s},function(t,e,n){"use strict";var r=n(0).layoutBase.IGeometry;function i(t){this.ciseNode=t,this.intraClusterEdges=null,this.interClusterEdges=null,this.angle=-1,this.orderIndex=-1,this.canSwapWithNext=null,this.canSwapWithPrevious=null,this.displacementForSwap=null}i.prototype=Object.create(null),i.prototype.getCiseNode=function(){return this.ciseNode},i.prototype.getAngle=function(){return this.angle},i.prototype.setAngle=function(t){this.angle=t%r.TWO_PI,this.angle<0&&(this.angle+=r.TWO_PI)},i.prototype.getIndex=function(){return this.orderIndex},i.prototype.setIndex=function(t){this.orderIndex=t},i.prototype.getCharCode=function(){return this.orderIndex<26?String.fromCharCode(97+this.orderIndex):this.orderIndex<52?String.fromCharCode(65+this.orderIndex):"?"},i.prototype.getNextNode=function(){var t=this.ciseNode.getOwner(),e=t.getOnCircleNodes().length,n=this.orderIndex+1;return n===e&&(n=0),t.getOnCircleNodes()[n]},i.prototype.getPrevNode=function(){var t=this.ciseNode.getOwner(),e=this.orderIndex-1;return-1===e&&(e=t.getOnCircleNodes().length-1),t.getOnCircleNodes()[e]},i.prototype.getNextNodeExt=function(){return this.getNextNode().getOnCircleNodeExt()},i.prototype.prevNextNodeExt=function(){return this.getPrevNode().getOnCircleNodeExt()},i.prototype.canSwapWithNext=function(){return this.canSwapWithNext},i.prototype.canSwapWithPrev=function(){return this.canSwapWithPrev},i.prototype.getDisplacementForSwap=function(){return this.displacementForSwap},i.prototype.setDisplacementForSwap=function(t){this.displacementForSwap=t},i.prototype.addDisplacementForSwap=function(t){this.displacementForSwap=t},i.prototype.updatePosition=function(){var t=this.ciseNode.getOwner(),e=t.getParent(),n=e.getCenterX(),r=e.getCenterY(),i=t.getRadius()*Math.cos(this.angle),o=t.getRadius()*Math.sin(this.angle);this.ciseNode.setCenter(n+i,r+o)},i.prototype.getCircDistWithTheNode=function(t){var e=t.getIndex();if(-1===e||-1===this.getIndex())return-1;var n=this.getIndex()-e;return n<0&&(n+=this.ciseNode.getOwner().getOnCircleNodes().length),n},i.prototype.calculateTotalCrossing=function(){var t=this.getIntraClusterEdges(),e=0,n=[];return this.ciseNode.getOwner().getIntraClusterEdges().forEach((function(t){n.push(t)})),this.ciseNode.getEdges().forEach((function(t){var e=n.indexOf(t);e>-1&&n.splice(e,1)})),t.forEach((function(t){e+=t.calculateTotalCrossingWithList(n)})),e},i.prototype.updateSwappingConditions=function(){var t=this.calculateTotalCrossing(),e=this.orderIndex,n=this.getNextNode().getOnCircleNodeExt();this.orderIndex=n.getIndex(),n.setIndex(e);var r=this.calculateTotalCrossing();this.canSwapWithNext=r<=t,n.setIndex(this.orderIndex),this.setIndex(e);var i=this.getPrevNode().getOnCircleNodeExt();this.orderIndex=i.getIndex(),i.setIndex(e),r=this.calculateTotalCrossing(),this.canSwapWithPrevious=r<=t,i.setIndex(this.orderIndex),this.setIndex(e)},i.prototype.swapWith=function(t){this.ciseNode.getOwner().swapNodes(this.ciseNode,t.ciseNode)},i.prototype.getInterClusterIntersections=function(t){for(var e=0,n=this.getInterClusterEdges(),i=t.getInterClusterEdges(),o=0;o0))throw"ERROR: Node information is invalid/undefined/null or simply empty. Please make sure nodes are passed properly. Can't layout an empty graph";n=t.nodes;var r=t.edges,i=this.ciseLayout=new o,a=this.graphManager=i.newGraphManager(),s=this.root=a.addRoot();this.idToLNode=i.convertToClusteredGraph(n,r,e,this.options),s.updateConnected(),s.calcEstimatedSize(),i.calcNoOfChildrenForAllNodes(),i.doStep1(!this.options.randomize),this.options.randomize&&i.doStep2(),s.updateBounds(!0),s.estimatedSize=Math.max(s.right-s.left,s.bottom-s.top),i.prepareCirclesForReversal(),i.calcIdealEdgeLengths(!1),this.initializerIndex=0,this.isDone=!1,this.isStepDone=!1,this.timeToSwitchNextStep=!0}},{key:"tick",value:function(t){var e=this,n=this;if(t.nodes.forEach((function(r){var i=e.getScratch(r,t.name),o=n.idToLNode[r.data("id")];i.x=o.getCenterX(),i.y=o.getCenterY()})),this.timeToSwitchNextStep){switch(this.initializerIndex){case 0:case 2:this.ciseLayout.step5Init();break;case 1:this.options.randomize&&this.ciseLayout.step3Init();break;case 3:this.ciseLayout.step4Init();break;case 4:this.ciseLayout.findAndMoveInnerNodes(),this.ciseLayout.calcIdealEdgeLengths(!0),this.ciseLayout.step5Init()}this.initializerIndex++,this.ciseLayout.iterations=0,this.ciseLayout.totalDisplacement=1e3,this.timeToSwitchNextStep=!1}return this.isStepDone=this.ciseLayout.runSpringEmbedderTick(),this.isStepDone&&this.initializerIndex<5&&(this.timeToSwitchNextStep=!0),this.isStepDone&&!1===this.timeToSwitchNextStep&&(this.isDone=!0),this.isDone}},{key:"postrun",value:function(){}},{key:"destroy",value:function(){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this),this}}]),e}(n(18));t.exports=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n=this.parents.length)throw"index should be in range [0, "+this.parents.length+") !"}},{key:"findSet",value:function(t){for(this.isValidIndex(t);t!=this.parents[t];)this.parents[t]=this.parents[this.parents[t]],t=this.parents[t];return t}},{key:"unite",value:function(t,e){this.isValidIndex(t),this.isValidIndex(e);var n=this.findSet(t),r=this.findSet(e);n!==r&&(this.cardinalities[n]>this.cardinalities[r]?(this.parents[r]=n,this.cardinalities[n]+=this.cardinalities[r]):(this.parents[n]=r,this.cardinalities[r]+=this.cardinalities[n]))}}]),t}()},function(t,e,n){"use strict";t.exports=Object.freeze({animate:!1,refresh:10,maxIterations:2500,maxSimulationTime:5e3,animationDuration:void 0,animationEasing:void 0,ungrabifyWhileSimulating:!1,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!0,packComponents:!1,nodeSeparation:12.5,idealInterClusterEdgeLengthCoefficient:1.4,allowNodesInsideCircle:!1,maxRatioOfNodesInsideCircle:.1,springCoeff:function(t){return.45},nodeRepulsion:function(t){return 4500},gravity:.25,gravityRange:3.8,ready:function(){},stop:function(){},infinite:!1})},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n0&&null!=l){var h=s.indexOf(l);h>-1?c[h].push(r.nodes[u].data("id")):(s.push(l),c.push([r.nodes[u].data("id")]))}}r.clusters=c}if(n.packComponents){if(null==this.state.clusters||null==this.state.clusters)throw"ERROR: Cluster information is invalid/undefined/null. Please create the 'clusters' variable as defined in the documentation";if(null==this.state.nodes&&null==this.state.nodes||0==this.state.nodes.length)throw"ERROR: Node information is invalid/undefined/null or simply empty. Please make sure nodes are passed properly. Can't layout an empty graph";var f=this.getDisjointSets(n.cy.$(),this.state.clusters);if(f.length>1){this.states=[];for(var d=0;d0&&i.push(l)}return i}},{key:"relocateComponent",value:function(t){for(var e=this,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,a=t.nodes,s=0;sr&&(r=f),do&&(o=g)}var p=t.componentCenter.x-(r+n)/2,v=t.componentCenter.y-(o+i)/2;t.nodes.forEach((function(n){var r=e.getScratch(n,t.name);r.x=r.x+p,r.y=r.y+v}))}},{key:"getScratch",value:function(t,e){var n=t.scratch(e);return n||(n={},t.scratch(e,n)),n}},{key:"run4state",value:function(t){var e=this;t.tickIndex=0,t.firstUpdate=!0,t.startTime=Date.now(),t.running=!0,t.currentBoundingBox=a(t.boundingBox,t.cy),t.ready&&e.one("ready",t.ready),t.stop&&e.one("stop",t.stop);for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r,o=!1,a=t,s=0;s{"use strict";var e={45:(t,e,n)=>{var r={};r.layoutBase=n(551),r.CoSEConstants=n(806),r.CoSEEdge=n(767),r.CoSEGraph=n(880),r.CoSEGraphManager=n(578),r.CoSELayout=n(765),r.CoSENode=n(991),r.ConstraintHandler=n(902),t.exports=r},806:(t,e,n)=>{var r=n(551).FDLayoutConstants;function i(){}for(var o in r)i[o]=r[o];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,t.exports=i},767:(t,e,n)=>{var r=n(551).FDLayoutEdge;function i(t,e,n){r.call(this,t,e,n)}for(var o in i.prototype=Object.create(r.prototype),r)i[o]=r[o];t.exports=i},880:(t,e,n)=>{var r=n(551).LGraph;function i(t,e,n){r.call(this,t,e,n)}for(var o in i.prototype=Object.create(r.prototype),r)i[o]=r[o];t.exports=i},578:(t,e,n)=>{var r=n(551).LGraphManager;function i(t){r.call(this,t)}for(var o in i.prototype=Object.create(r.prototype),r)i[o]=r[o];t.exports=i},765:(t,e,n)=>{var r=n(551).FDLayout,i=n(578),o=n(880),a=n(991),s=n(767),c=n(806),u=n(902),l=n(551).FDLayoutConstants,h=n(551).LayoutConstants,f=n(551).Point,d=n(551).PointD,g=n(551).DimensionD,p=n(551).Layout,v=n(551).Integer,b=n(551).IGeometry,y=n(551).LGraph,w=n(551).Transform,m=n(551).LinkedList;function x(){r.call(this),this.toBeTiled={},this.constraints={}}for(var E in x.prototype=Object.create(r.prototype),r)x[E]=r[E];x.prototype.newGraphManager=function(){var t=new i(this);return this.graphManager=t,t},x.prototype.newGraph=function(t){return new o(null,this.graphManager,t)},x.prototype.newNode=function(t){return new a(this.graphManager,t)},x.prototype.newEdge=function(t){return new s(null,null,t)},x.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(c.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},x.prototype.initSpringEmbedder=function(){r.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},x.prototype.layout=function(){return h.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental)c.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter((function(t){return e.has(t)})),this.graphManager.setAllNodesToApplyGravitation(n));else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(u.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),c.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},x.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%l.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(),c.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.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()),c.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},n=0;n0&&this.updateDisplacements(),e=0;e0&&(r.fixedNodeWeight=o)}if(this.constraints.relativePlacementConstraint){var a=new Map,s=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach((function(e){t.fixedNodesOnHorizontal.add(e),t.fixedNodesOnVertical.add(e)})),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var u=this.constraints.alignmentConstraint.vertical;for(n=0;n=2*t.length/3;r--)e=Math.floor(Math.random()*(r+1)),n=t[r],t[r]=t[e],t[e]=n;return t},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach((function(e){if(e.left){var n=a.has(e.left)?a.get(e.left):e.left,r=a.has(e.right)?a.get(e.right):e.right;t.nodesInRelativeHorizontal.includes(n)||(t.nodesInRelativeHorizontal.push(n),t.nodeToRelativeConstraintMapHorizontal.set(n,[]),t.dummyToNodeForVerticalAlignment.has(n)?t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(n).getCenterX())),t.nodesInRelativeHorizontal.includes(r)||(t.nodesInRelativeHorizontal.push(r),t.nodeToRelativeConstraintMapHorizontal.set(r,[]),t.dummyToNodeForVerticalAlignment.has(r)?t.nodeToTempPositionMapHorizontal.set(r,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(r,t.idToNodeMap.get(r).getCenterX())),t.nodeToRelativeConstraintMapHorizontal.get(n).push({right:r,gap:e.gap}),t.nodeToRelativeConstraintMapHorizontal.get(r).push({left:n,gap:e.gap})}else{var i=s.has(e.top)?s.get(e.top):e.top,o=s.has(e.bottom)?s.get(e.bottom):e.bottom;t.nodesInRelativeVertical.includes(i)||(t.nodesInRelativeVertical.push(i),t.nodeToRelativeConstraintMapVertical.set(i,[]),t.dummyToNodeForHorizontalAlignment.has(i)?t.nodeToTempPositionMapVertical.set(i,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(i)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(i,t.idToNodeMap.get(i).getCenterY())),t.nodesInRelativeVertical.includes(o)||(t.nodesInRelativeVertical.push(o),t.nodeToRelativeConstraintMapVertical.set(o,[]),t.dummyToNodeForHorizontalAlignment.has(o)?t.nodeToTempPositionMapVertical.set(o,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(o)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(o,t.idToNodeMap.get(o).getCenterY())),t.nodeToRelativeConstraintMapVertical.get(i).push({bottom:o,gap:e.gap}),t.nodeToRelativeConstraintMapVertical.get(o).push({top:i,gap:e.gap})}}));else{var h=new Map,f=new Map;this.constraints.relativePlacementConstraint.forEach((function(t){if(t.left){var e=a.has(t.left)?a.get(t.left):t.left,n=a.has(t.right)?a.get(t.right):t.right;h.has(e)?h.get(e).push(n):h.set(e,[n]),h.has(n)?h.get(n).push(e):h.set(n,[e])}else{var r=s.has(t.top)?s.get(t.top):t.top,i=s.has(t.bottom)?s.get(t.bottom):t.bottom;f.has(r)?f.get(r).push(i):f.set(r,[i]),f.has(i)?f.get(i).push(r):f.set(i,[r])}}));var d=function(t,e){var n=[],r=[],i=new m,o=new Set,a=0;return t.forEach((function(s,c){if(!o.has(c)){n[a]=[],r[a]=!1;var u=c;for(i.push(u),o.add(u),n[a].push(u);0!=i.length;)u=i.shift(),e.has(u)&&(r[a]=!0),t.get(u).forEach((function(t){o.has(t)||(i.push(t),o.add(t),n[a].push(t))}));a++}})),{components:n,isFixed:r}},g=d(h,t.fixedNodesOnHorizontal);this.componentsOnHorizontal=g.components,this.fixedComponentsOnHorizontal=g.isFixed;var p=d(f,t.fixedNodesOnVertical);this.componentsOnVertical=p.components,this.fixedComponentsOnVertical=p.isFixed}}},x.prototype.updateDisplacements=function(){var t=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach((function(e){var n=t.idToNodeMap.get(e.nodeId);n.displacementX=0,n.displacementY=0})),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var e=this.constraints.alignmentConstraint.vertical,n=0;n1)for(s=0;sr&&(r=Math.floor(a.y)),o=Math.floor(a.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(h.WORLD_CENTER_X-a.x/2,h.WORLD_CENTER_Y-a.y/2))},x.radialLayout=function(t,e,n){var r=Math.max(this.maxDiagonalInTree(t),c.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(e,null,0,359,0,r);var i=y.calculateBounds(t),o=new w;o.setDeviceOrgX(i.getMinX()),o.setDeviceOrgY(i.getMinY()),o.setWorldOrgX(n.x),o.setWorldOrgY(n.y);for(var a=0;a1;){var v=p[0];p.splice(0,1);var y=l.indexOf(v);y>=0&&l.splice(y,1),g--,h--}f=null!=e?(l.indexOf(p[0])+1)%g:0;for(var w=Math.abs(r-n)/h,m=f;d!=h;m=++m%g){var E=l[m].getOtherEnd(t);if(E!=e){var _=(n+d*w)%360,k=(_+w)%360;x.branchRadialLayout(E,t,_,k,i+o,o),d++}}},x.maxDiagonalInTree=function(t){for(var e=v.MIN_VALUE,n=0;ne&&(e=r)}return e},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){var r="DummyCompound_"+n;t.memberGroups[r]=e[n];var i=e[n][0].getParent(),o=new a(t.graphManager);o.id=r,o.paddingLeft=i.paddingLeft||0,o.paddingRight=i.paddingRight||0,o.paddingBottom=i.paddingBottom||0,o.paddingTop=i.paddingTop||0,t.idToDummyNode[r]=o;var s=t.getGraphManager().add(t.newGraph(),o),c=i.getChild();c.add(o);for(var u=0;ui?(r.rect.x-=(r.labelWidth-i)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-i)/2):"right"==r.labelPosHorizontal&&r.setWidth(i+r.labelWidth)),r.labelHeight&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(o+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>o?(r.rect.y-=(r.labelHeight-o)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-o)/2):"bottom"==r.labelPosVertical&&r.setHeight(o+r.labelHeight))}}))},x.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var e=this.compoundOrder[t],n=e.id,r=e.paddingLeft,i=e.paddingTop,o=e.labelMarginLeft,a=e.labelMarginTop;this.adjustLocations(this.tiledMemberPack[n],e.rect.x,e.rect.y,r,i,o,a)}},x.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach((function(n){var r=t.idToDummyNode[n],i=r.paddingLeft,o=r.paddingTop,a=r.labelMarginLeft,s=r.labelMarginTop;t.adjustLocations(e[n],r.rect.x,r.rect.y,i,o,a,s)}))},x.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 r=n.getNodes(),i=0;i0)return this.toBeTiled[e]=!1,!1;if(null!=o.getChild()){if(!this.getToBeTiled(o))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[o.id]=!1}return this.toBeTiled[e]=!0,!0},x.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),n=0,r=0;rl&&(l=f.rect.height)}n+=l+t.verticalPadding}},x.prototype.tileCompoundMembers=function(t,e){var n=this;this.tiledMemberPack=[],Object.keys(t).forEach((function(r){var i=e[r];if(n.tiledMemberPack[r]=n.tileNodes(t[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height,i.setCenter(n.tiledMemberPack[r].centerX,n.tiledMemberPack[r].centerY),i.labelMarginLeft=0,i.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var o=i.rect.width,a=i.rect.height;i.labelWidth&&("left"==i.labelPosHorizontal?(i.rect.x-=i.labelWidth,i.setWidth(o+i.labelWidth),i.labelMarginLeft=i.labelWidth):"center"==i.labelPosHorizontal&&i.labelWidth>o?(i.rect.x-=(i.labelWidth-o)/2,i.setWidth(i.labelWidth),i.labelMarginLeft=(i.labelWidth-o)/2):"right"==i.labelPosHorizontal&&i.setWidth(o+i.labelWidth)),i.labelHeight&&("top"==i.labelPosVertical?(i.rect.y-=i.labelHeight,i.setHeight(a+i.labelHeight),i.labelMarginTop=i.labelHeight):"center"==i.labelPosVertical&&i.labelHeight>a?(i.rect.y-=(i.labelHeight-a)/2,i.setHeight(i.labelHeight),i.labelMarginTop=(i.labelHeight-a)/2):"bottom"==i.labelPosVertical&&i.setHeight(a+i.labelHeight))}}))},x.prototype.tileNodes=function(t,e){var n=this.tileNodesByFavoringDim(t,e,!0),r=this.tileNodesByFavoringDim(t,e,!1),i=this.getOrgRatio(n);return this.getOrgRatio(r)s&&(s=t.getWidth())}));var u,l=o/i,h=a/i,f=Math.pow(n-r,2)+4*(l+r)*(h+n)*i,d=(r-n+Math.sqrt(f))/(2*(l+r));e?(u=Math.ceil(d))==d&&u++:u=Math.floor(d);var g=u*(l+r)-r;return s>g&&(g=s),g+2*r},x.prototype.tileNodesByFavoringDim=function(t,e,n){var r=c.TILING_PADDING_VERTICAL,i=c.TILING_PADDING_HORIZONTAL,o=c.TILING_COMPARE_BY,a={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:r,horizontalPadding:i,centerX:0,centerY:0};o&&(a.idealRowWidth=this.calcIdealRowWidth(t,n));var s=function(t){return t.rect.width*t.rect.height},u=function(t,e){return s(e)-s(t)};t.sort((function(t,e){var n=u;return a.idealRowWidth?(n=o)(t.id,e.id):n(t,e)}));for(var l=0,h=0,f=0;f0&&(o+=t.horizontalPadding),t.rowWidth[n]=o,t.width0&&(a+=t.verticalPadding);var s=0;a>t.rowHeight[n]&&(s=t.rowHeight[n],t.rowHeight[n]=a,s=t.rowHeight[n]-s),t.height+=s,t.rows[n].push(e)},x.prototype.getShortestRowIndex=function(t){for(var e=-1,n=Number.MAX_VALUE,r=0;rn&&(e=r,n=t.rowWidth[r]);return e},x.prototype.canAddHorizontal=function(t,e,n){if(t.idealRowWidth){var r=t.rows.length-1;return t.rowWidth[r]+e+t.horizontalPadding<=t.idealRowWidth}var i=this.getShortestRowIndex(t);if(i<0)return!0;var o=t.rowWidth[i];if(o+t.horizontalPadding+e<=t.width)return!0;var a,s,c=0;return t.rowHeight[i]0&&(c=n+t.verticalPadding-t.rowHeight[i]),a=t.width-o>=e+t.horizontalPadding?(t.height+c)/(o+e+t.horizontalPadding):(t.height+c)/t.width,c=n+t.verticalPadding,(s=t.widtho&&e!=n){r.splice(-1,1),t.rows[n].push(i),t.rowWidth[e]=t.rowWidth[e]-o,t.rowWidth[n]=t.rowWidth[n]+o,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var a=Number.MIN_VALUE,s=0;sa&&(a=r[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 h=i;h<=o;h++)u[0]+=this.grid[h][a-1].length+this.grid[h][a].length-1;if(o0)for(h=a;h<=s;h++)u[3]+=this.grid[i-1][h].length+this.grid[i][h].length-1;for(var f,d,g=v.MAX_VALUE,p=0;p{var r=n(551).FDLayoutNode,i=n(551).IMath;function o(t,e,n,i){r.call(this,t,e,n,i)}for(var a in o.prototype=Object.create(r.prototype),r)o[a]=r[a];o.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(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*i.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},o.prototype.propogateDisplacementToChildren=function(t,e){for(var n,r=this.getChild().getNodes(),i=0;i{function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e0){var o=0;r.forEach((function(t){"horizontal"==e?(h.set(t,c.has(t)?u[c.get(t)]:i.get(t)),o+=h.get(t)):(h.set(t,c.has(t)?l[c.get(t)]:i.get(t)),o+=h.get(t))})),o/=r.length,t.forEach((function(t){n.has(t)||h.set(t,o)}))}else{var a=0;t.forEach((function(t){a+="horizontal"==e?c.has(t)?u[c.get(t)]:i.get(t):c.has(t)?l[c.get(t)]:i.get(t)})),a/=t.length,t.forEach((function(t){h.set(t,a)}))}}));for(var g=function(){var r=d.shift();t.get(r).forEach((function(t){if(h.get(t.id)a&&(a=b),ws&&(s=w)}}catch(t){d=!0,g=t}finally{try{!f&&v.return&&v.return()}finally{if(d)throw g}}var m=(r+a)/2-(o+s)/2,x=!0,E=!1,_=void 0;try{for(var k,N=t[Symbol.iterator]();!(x=(k=N.next()).done);x=!0){var C=k.value;h.set(C,h.get(C)+m)}}catch(t){E=!0,_=t}finally{try{!x&&N.return&&N.return()}finally{if(E)throw _}}}))}return h},b=function(t){var e=0,n=0,r=0,i=0;if(t.forEach((function(t){t.left?u[c.get(t.left)]-u[c.get(t.right)]>=0?e++:n++:l[c.get(t.top)]-l[c.get(t.bottom)]>=0?r++:i++})),e>n&&r>i)for(var o=0;on)for(var a=0;ai)for(var s=0;s1)e.fixedNodeConstraint.forEach((function(t,e){x[e]=[t.position.x,t.position.y],E[e]=[u[c.get(t.nodeId)],l[c.get(t.nodeId)]]})),_=!0;else if(e.alignmentConstraint)!function(){var t=0;if(e.alignmentConstraint.vertical){for(var n=e.alignmentConstraint.vertical,i=function(e){var i=new Set;n[e].forEach((function(t){i.add(t)}));var o,a=new Set([].concat(r(i)).filter((function(t){return N.has(t)})));o=a.size>0?u[c.get(a.values().next().value)]:p(i).x,n[e].forEach((function(e){x[t]=[o,l[c.get(e)]],E[t]=[u[c.get(e)],l[c.get(e)]],t++}))},o=0;o0?u[c.get(o.values().next().value)]:p(n).y,a[e].forEach((function(e){x[t]=[u[c.get(e)],i],E[t]=[u[c.get(e)],l[c.get(e)]],t++}))},h=0;hO&&(O=A[L].length,I=L);if(O0){var W={x:0,y:0};e.fixedNodeConstraint.forEach((function(t,e){var n,r,i=(r={x:u[c.get(t.nodeId)],y:l[c.get(t.nodeId)]},{x:(n=t.position).x-r.x,y:n.y-r.y});W.x+=i.x,W.y+=i.y})),W.x/=e.fixedNodeConstraint.length,W.y/=e.fixedNodeConstraint.length,u.forEach((function(t,e){u[e]+=W.x})),l.forEach((function(t,e){l[e]+=W.y})),e.fixedNodeConstraint.forEach((function(t){u[c.get(t.nodeId)]=t.position.x,l[c.get(t.nodeId)]=t.position.y}))}if(e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var q=e.alignmentConstraint.vertical,Z=function(t){var e=new Set;q[t].forEach((function(t){e.add(t)}));var n,i=new Set([].concat(r(e)).filter((function(t){return N.has(t)})));n=i.size>0?u[c.get(i.values().next().value)]:p(e).x,e.forEach((function(t){N.has(t)||(u[c.get(t)]=n)}))},$=0;$0?l[c.get(i.values().next().value)]:p(e).y,e.forEach((function(t){N.has(t)||(l[c.get(t)]=n)}))},J=0;J{e.exports=t}},n={},r=function t(r){var i=n[r];if(void 0!==i)return i.exports;var o=n[r]={exports:{}};return e[r](o,o.exports,t),o.exports}(45);return r})()},t.exports=r(n(7471))},7471:function(t){var e;e=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},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=28)}([function(t,e,n){"use strict";function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,t.exports=r},function(t,e,n){"use strict";var r=n(2),i=n(8),o=n(9);function a(t,e,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=t,this.target=e}for(var s in a.prototype=Object.create(r.prototype),r)a[s]=r[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;if(this.target===t)return this.source;throw"Node is not incident with this edge"},a.prototype.getOtherEndInGraph=function(t,e){for(var n=this.getOtherEnd(t),r=e.getGraphManager().getRoot();;){if(n.getOwner()==e)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},a.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),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(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),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,n){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,n){"use strict";var r=n(2),i=n(10),o=n(13),a=n(0),s=n(16),c=n(5);function u(t,e,n,a){null==n&&null==a&&(a=e),r.call(this,a),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=a,this.edges=[],this.graphManager=t,this.rect=null!=n&&null!=e?new o(e.x,e.y,n.width,n.height):new o}for(var l in u.prototype=Object.create(r.prototype),r)u[l]=r[l];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(t){this.rect.width=t},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(t){this.rect.height=t},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.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},u.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},u.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},u.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},u.prototype.getEdgeListToNode=function(t){var e=[],n=this;return n.edges.forEach((function(r){if(r.target==t){if(r.source!=n)throw"Incorrect edge source!";e.push(r)}})),e},u.prototype.getEdgesBetween=function(t){var e=[],n=this;return n.edges.forEach((function(r){if(r.source!=n&&r.target!=n)throw"Incorrect edge source and/or target";r.target!=t&&r.source!=t||e.push(r)})),e},u.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach((function(n){if(n.source==e)t.add(n.target);else{if(n.target!=e)throw"Incorrect incidency!";t.add(n.source)}})),t},u.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),n=0;ne?(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(e+this.labelWidth)),this.labelHeight&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(n+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>n?(this.rect.y-=(this.labelHeight-n)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(n+this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(t){var e=this.rect.x;e>a.WORLD_BOUNDARY?e=a.WORLD_BOUNDARY:e<-a.WORLD_BOUNDARY&&(e=-a.WORLD_BOUNDARY);var n=this.rect.y;n>a.WORLD_BOUNDARY?n=a.WORLD_BOUNDARY:n<-a.WORLD_BOUNDARY&&(n=-a.WORLD_BOUNDARY);var r=new c(e,n),i=t.inverseTransformPoint(r);this.setLocation(i.x,i.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=u},function(t,e,n){"use strict";var r=n(0);function i(){}for(var o in r)i[o]=r[o];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=3*i.MAX_NODE_DISPLACEMENT_INCREMENTAL,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=i},function(t,e,n){"use strict";function r(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=r},function(t,e,n){"use strict";var r=n(2),i=n(10),o=n(0),a=n(7),s=n(3),c=n(1),u=n(13),l=n(12),h=n(11);function f(t,e,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof a?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var d in f.prototype=Object.create(r.prototype),r)f[d]=r[d];f.prototype.getNodes=function(){return this.nodes},f.prototype.getEdges=function(){return this.edges},f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getParent=function(){return this.parent},f.prototype.getLeft=function(){return this.left},f.prototype.getRight=function(){return this.right},f.prototype.getTop=function(){return this.top},f.prototype.getBottom=function(){return this.bottom},f.prototype.isConnected=function(){return this.isConnected},f.prototype.add=function(t,e,n){if(null==e&&null==n){var r=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var i=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(n)>-1))throw"Source or target not in graph!";if(e.owner!=n.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=n.owner?null:(i.source=e,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),e.edges.push(i),n!=e&&n.edges.push(i),i)},f.prototype.remove=function(t){var e=t;if(t instanceof s){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var n=e.edges.slice(),r=n.length,i=0;i-1&&l>-1))throw"Source and/or target doesn't know this edge!";if(o.source.edges.splice(u,1),o.target!=o.source&&o.target.edges.splice(l,1),-1==(a=o.source.owner.getEdges().indexOf(o)))throw"Not in owner's edge list!";o.source.owner.getEdges().splice(a,1)}},f.prototype.updateLeftTop=function(){for(var t,e,n,r=i.MAX_VALUE,o=i.MAX_VALUE,a=this.getNodes(),s=a.length,c=0;c(t=u.getTop())&&(r=t),o>(e=u.getLeft())&&(o=e)}return r==i.MAX_VALUE?null:(n=null!=a[0].getParent().paddingLeft?a[0].getParent().paddingLeft:this.margin,this.left=o-n,this.top=r-n,new l(this.left,this.top))},f.prototype.updateBounds=function(t){for(var e,n,r,o,a,s=i.MAX_VALUE,c=-i.MAX_VALUE,l=i.MAX_VALUE,h=-i.MAX_VALUE,f=this.nodes,d=f.length,g=0;g(e=p.getLeft())&&(s=e),c<(n=p.getRight())&&(c=n),l>(r=p.getTop())&&(l=r),h<(o=p.getBottom())&&(h=o)}var v=new u(s,l,c-s,h-l);s==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),a=null!=f[0].getParent().paddingLeft?f[0].getParent().paddingLeft:this.margin,this.left=v.x-a,this.right=v.x+v.width+a,this.top=v.y-a,this.bottom=v.y+v.height+a},f.calculateBounds=function(t){for(var e,n,r,o,a=i.MAX_VALUE,s=-i.MAX_VALUE,c=i.MAX_VALUE,l=-i.MAX_VALUE,h=t.length,f=0;f(e=d.getLeft())&&(a=e),s<(n=d.getRight())&&(s=n),c>(r=d.getTop())&&(c=r),l<(o=d.getBottom())&&(l=o)}return new u(a,c,s-a,l-c)},f.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},f.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},f.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,n=e.length,r=0;r=this.nodes.length){var c=0;i.forEach((function(e){e.owner==t&&c++})),c==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=f},function(t,e,n){"use strict";var r,i=n(1);function o(t){r=n(6),this.layout=t,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),n=this.add(t,e);return this.setRootGraph(n),this.rootGraph},o.prototype.add=function(t,e,n,r,i){if(null==n&&null==r&&null==i){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}i=n,n=t;var o=(r=e).getOwner(),a=i.getOwner();if(null==o||o.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==a||a.getGraphManager()!=this)throw"Target not in this graph mgr!";if(o==a)return n.isInterGraph=!1,o.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(n),null==n.source||null==n.target)throw"Edge source and/or target is null!";if(-1!=n.source.edges.indexOf(n)||-1!=n.target.edges.indexOf(n))throw"Edge already in source and/or target incidency list!";return n.source.edges.push(n),n.target.edges.push(n),n},o.prototype.remove=function(t){if(t instanceof r){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var n,o=[],a=(o=o.concat(e.getEdges())).length,s=0;s=e.getRight()?n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var o=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(o=1);var a=o*n[0],s=n[1]/o;n[0]a)return n[0]=r,n[1]=c,n[2]=o,n[3]=w,!1;if(io)return n[0]=s,n[1]=i,n[2]=b,n[3]=a,!1;if(ro?(n[0]=l,n[1]=h,_=!0):(n[0]=u,n[1]=c,_=!0):N===T&&(r>o?(n[0]=s,n[1]=c,_=!0):(n[0]=f,n[1]=h,_=!0)),-C===T?o>r?(n[2]=y,n[3]=w,k=!0):(n[2]=b,n[3]=v,k=!0):C===T&&(o>r?(n[2]=p,n[3]=v,k=!0):(n[2]=m,n[3]=w,k=!0)),_&&k)return!1;if(r>o?i>a?(A=this.getCardinalDirection(N,T,4),O=this.getCardinalDirection(C,T,2)):(A=this.getCardinalDirection(-N,T,3),O=this.getCardinalDirection(-C,T,1)):i>a?(A=this.getCardinalDirection(-N,T,1),O=this.getCardinalDirection(-C,T,3)):(A=this.getCardinalDirection(N,T,2),O=this.getCardinalDirection(C,T,4)),!_)switch(A){case 1:L=c,I=r+-g/T,n[0]=I,n[1]=L;break;case 2:I=f,L=i+d*T,n[0]=I,n[1]=L;break;case 3:L=h,I=r+g/T,n[0]=I,n[1]=L;break;case 4:I=l,L=i+-d*T,n[0]=I,n[1]=L}if(!k)switch(O){case 1:M=v,S=o+-E/T,n[2]=S,n[3]=M;break;case 2:S=m,M=a+x*T,n[2]=S,n[3]=M;break;case 3:M=w,S=o+E/T,n[2]=S,n[3]=M;break;case 4:S=y,M=a+-x*T,n[2]=S,n[3]=M}}return!1},i.getCardinalDirection=function(t,e,n){return t>e?n:1+n%4},i.getIntersection=function(t,e,n,i){if(null==i)return this.getIntersection2(t,e,n);var o,a,s,c,u,l,h,f=t.x,d=t.y,g=e.x,p=e.y,v=n.x,b=n.y,y=i.x,w=i.y;return 0==(h=(o=p-d)*(c=v-y)-(a=w-b)*(s=f-g))?null:new r((s*(l=y*b-v*w)-c*(u=g*d-f*p))/h,(a*u-o*l)/h)},i.angleOfVector=function(t,e,n,r){var i=void 0;return t!==n?(i=Math.atan((r-e)/(n-t)),n=0){var l=(-c+Math.sqrt(c*c-4*s*u))/(2*s),h=(-c-Math.sqrt(c*c-4*s*u))/(2*s);return l>=0&&l<=1?[l]:h>=0&&h<=1?[h]:null}return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,t.exports=i},function(t,e,n){"use strict";function r(){}r.sign=function(t){return t>0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=r},function(t,e,n){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,t.exports=r},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n0&&e;){for(s.push(u[0]);s.length>0&&e;){var l=s[0];s.splice(0,1),a.add(l);var h=l.getEdges();for(o=0;o-1&&u.splice(p,1)}a=new Set,c=new Map}else t=[]}return t},f.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],n=t.source,r=this.graphManager.calcLowestCommonAncestor(t.source,t.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(n),o=0;o=0&&e.splice(h,1),l.getNeighborsList().forEach((function(t){if(n.indexOf(t)<0){var e=r.get(t)-1;1==e&&c.push(t),r.set(t,e)}}))}n=n.concat(c),1!=e.length&&2!=e.length||(i=!0,o=e[0])}return o},f.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=f},function(t,e,n){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},t.exports=r},function(t,e,n){"use strict";var r=n(5);function i(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}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(t){this.lworldExtX=t},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(t){this.lworldExtY=t},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},i.prototype.transformX=function(t){var e=0,n=this.lworldExtX;return 0!=n&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/n),e},i.prototype.transformY=function(t){var e=0,n=this.lworldExtY;return 0!=n&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/n),e},i.prototype.inverseTransformX=function(t){var e=0,n=this.ldeviceExtX;return 0!=n&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/n),e},i.prototype.inverseTransformY=function(t){var e=0,n=this.ldeviceExtY;return 0!=n&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/n),e},i.prototype.inverseTransformPoint=function(t){return new r(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=i},function(t,e,n){"use strict";var r=n(15),i=n(4),o=n(0),a=n(8),s=n(9);function c(){r.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}for(var u in c.prototype=Object.create(r.prototype),r)c[u]=r[u];c.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},c.prototype.calcIdealEdgeLengths=function(){for(var t,e,n,r,a,s,c,u=this.getGraphManager().getAllEdges(),l=0;li.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},c.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),n=0;n0&&void 0!==arguments[0])||arguments[0],s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&a&&this.updateGrid(),o=new Set,t=0;t(c=e.getEstimatedSize()*this.gravityRangeFactor)||s>c)&&(t.gravitationForceX=-this.gravityConstant*i,t.gravitationForceY=-this.gravityConstant*o):(a>(c=e.getEstimatedSize()*this.compoundGravityRangeFactor)||s>c)&&(t.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},c.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=s.length||u>=s[0].length))for(var l=0;lt}}]),t}();t.exports=o},function(t,e,n){"use strict";function r(){}r.svd=function(t){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=t.length,this.n=t[0].length;var e=Math.min(this.m,this.n);this.s=function(t){for(var e=[];t-- >0;)e.push(0);return e}(Math.min(this.m+1,this.n)),this.U=function t(e){if(0==e.length)return 0;for(var n=[],r=0;r0;)e.push(0);return e}(this.n),a=function(t){for(var e=[];t-- >0;)e.push(0);return e}(this.m),s=Math.min(this.m-1,this.n),c=Math.max(0,Math.min(this.n-2,this.m)),u=0;u=0;O--)if(0!==this.s[O]){for(var I=O+1;I=0;j--){if(function(t,e){return t&&e}(j0;){var X=void 0,W=void 0;for(X=C-2;X>=-1&&-1!==X;X--)if(Math.abs(o[X])<=U+V*(Math.abs(this.s[X])+Math.abs(this.s[X+1]))){o[X]=0;break}if(X===C-2)W=4;else{var q=void 0;for(q=C-1;q>=X&&q!==X;q--){var Z=(q!==C?Math.abs(o[q]):0)+(q!==X+1?Math.abs(o[q-1]):0);if(Math.abs(this.s[q])<=U+V*Z){this.s[q]=0;break}}q===X?W=3:q===C-1?W=1:(W=2,X=q)}switch(X++,W){case 1:var $=o[C-2];o[C-2]=0;for(var K=C-2;K>=X;K--){var Q=r.hypot(this.s[K],$),J=this.s[K]/Q,tt=$/Q;this.s[K]=Q,K!==X&&($=-tt*o[K-1],o[K-1]=J*o[K-1]);for(var et=0;et=this.s[X+1]);){var Ct=this.s[X];if(this.s[X]=this.s[X+1],this.s[X+1]=Ct,XMath.abs(e)?(n=e/t,n=Math.abs(t)*Math.sqrt(1+n*n)):0!=e?(n=t/e,n=Math.abs(e)*Math.sqrt(1+n*n)):n=0,n},t.exports=r},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sequence1=e,this.sequence2=n,this.match_score=r,this.mismatch_penalty=i,this.gap_penalty=o,this.iMax=e.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var a=0;a=0;n--){var r=this.listeners[n];r.event===t&&r.callback===e&&this.listeners.splice(n,1)}},i.emit=function(t,e){for(var n=0;n0&&m.constraints(N),m.groups(d.map((function(t,n){var r=l(e.nodeSpacing,t),i=function(e){return parseFloat(t.style("padding-"+e))},o=i("left")+r,a=i("right")+r,s=i("top")+r,c=i("bottom")+r;return t.scratch().cola={index:n,padding:Math.max(o,a,s,c),leaves:t.children().intersection(g).map((function(t){return t[0].scratch().cola.index})),fixed:t.locked()},t})).map((function(t){return t.scratch().cola.groups=t.children().intersection(d).map((function(t){return t.scratch().cola.index})),t.scratch().cola})));var C=void 0,T=void 0;if(null!=e.edgeLength?(C=e.edgeLength,T="linkDistance"):null!=e.edgeSymDiffLength?(C=e.edgeSymDiffLength,T="symmetricDiffLinkLengths"):null!=e.edgeJaccardLength?(C=e.edgeJaccardLength,T="jaccardLinkLengths"):(C=100,T="linkDistance"),m.links(h.stdFilter((function(t){return g.contains(t.source())&&g.contains(t.target())})).map((function(t){var e=t.scratch().cola={source:t.source()[0].scratch().cola.index,target:t.target()[0].scratch().cola.index};return null!=C&&(e.calcLength=l(C,t)),e}))),m.size([p.w,p.h]),null!=C&&m[T]((function(t){return t.calcLength})),e.flow){var A=void 0;!function(t){return(void 0===t?"undefined":r(t))===r("")}(e.flow)?c(e.flow)?A={axis:"y",minSeparation:e.flow}:function(t){return null!=t&&(void 0===t?"undefined":r(t))===r({})}(e.flow)?((A=e.flow).axis=A.axis||"y",A.minSeparation=null!=A.minSeparation?A.minSeparation:50):A={axis:"y",minSeparation:50}:A={axis:e.flow,minSeparation:50},m.flowLayout(A.axis,A.minSeparation)}return t.trigger({type:"layoutstart",layout:t}),m.avoidOverlaps(e.avoidOverlap).handleDisconnected(e.handleDisconnected).start(e.unconstrIter,e.userConstIter,e.allConstIter,void 0,void 0,e.centerGraph),e.infinite||setTimeout((function(){t.manuallyStopped||m.stop()}),e.maxSimulationTime),this},h.prototype.stop=function(){return this.adaptor&&(this.manuallyStopped=!0,this.adaptor.stop()),this},t.exports=h},function(t,e,n){"use strict";t.exports=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r0&&(a=n.getGraphManager().add(n.newGraph(),o),this.processChildrenList(a,h,n))}},h.prototype.stop=function(){return this.stopped=!0,this};var d=function(t){t("layout","cose-bilkent",h)};"undefined"!=typeof cytoscape&&d(cytoscape),t.exports=d}])},t.exports=r(n(7799))},5111:function(t,e,n){var r;r=function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},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=0)}([function(t,e,n){var r=n(1),i=function(t){t&&t("layout","dagre",r)};"undefined"!=typeof cytoscape&&i(cytoscape),t.exports=i},function(t,e,n){function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}var i=function(t){return"function"==typeof t},o=n(2),a=n(3),s=n(4);function c(t){this.options=a({},o,t)}c.prototype.run=function(){var t=this.options,e=t.cy,n=t.eles,o=function(t,e){return i(e)?e.apply(t,[t]):e},a=t.boundingBox||{x1:0,y1:0,w:e.width(),h:e.height()};void 0===a.x2&&(a.x2=a.x1+a.w),void 0===a.w&&(a.w=a.x2-a.x1),void 0===a.y2&&(a.y2=a.y1+a.h),void 0===a.h&&(a.h=a.y2-a.y1);var c=new s.graphlib.Graph({multigraph:!0,compound:!0}),u={},l=function(t,e){null!=e&&(u[t]=e)};l("nodesep",t.nodeSep),l("edgesep",t.edgeSep),l("ranksep",t.rankSep),l("rankdir",t.rankDir),l("align",t.align),l("ranker",t.ranker),l("acyclicer",t.acyclicer),c.setGraph(u),c.setDefaultEdgeLabel((function(){return{}})),c.setDefaultNodeLabel((function(){return{}}));var h=n.nodes();i(t.sort)&&(h=h.sort(t.sort));for(var f=0;f1?e-1:0),r=1;r1?e-1:0),r=1;r1&&(c.velocity.x=l/f,c.velocity.y=h/f),r=e*c.velocity.x,o=e*c.velocity.y,c.pos.x+=r,c.pos.y+=o,i+=Math.abs(r),a+=Math.abs(o)}}return(i*i+a*a)/s}}},function(t,e,n){"use strict";var r=n(9),i=n(8),o=function(t,e){var n=Math.abs(t.x-e.x),r=Math.abs(t.y-e.y);return n<1e-8&&r<1e-8};function a(t,e){return 0===e?t.quad0:1===e?t.quad1:2===e?t.quad2:3===e?t.quad3:null}function s(t,e,n){0===e?t.quad0=n:1===e?t.quad1=n:2===e?t.quad2=n:3===e&&(t.quad3=n)}t.exports={makeQuadtree:function(){var t=[],e=new i,n=[],c=0,u=l();function l(){var t=n[c];return t?(t.quad0=null,t.quad1=null,t.quad2=null,t.quad3=null,t.body=null,t.mass=t.massX=t.massY=0,t.left=t.right=t.top=t.bottom=0):(t=new r,n[c]=t),++c,t}function h(t){for(e.reset(),e.push(u,t);!e.isEmpty();){var n=e.pop(),r=n.node,i=n.body;if(r.body){var c=r.body;if(r.body=null,o(c.pos,i.pos)){var h=3;do{var f=Math.random(),d=(r.right-r.left)*f,g=(r.bottom-r.top)*f;c.pos.x=r.left+d,c.pos.y=r.top+g,h-=1}while(h>0&&o(c.pos,i.pos));if(0===h&&o(c.pos,i.pos))return}e.push(r,c),e.push(r,i)}else{var p=i.pos.x,v=i.pos.y;r.mass=r.mass+i.mass,r.massX=r.massX+i.mass*p,r.massY=r.massY+i.mass*v;var b=0,y=r.left,w=(r.right+y)/2,m=r.top,x=(r.bottom+m)/2;p>w&&(b+=1,y=w,w=r.right),v>x&&(b+=2,m=x,x=r.bottom);var E=a(r,b);E?e.push(E,i):((E=l()).left=y,E.top=m,E.right=w,E.bottom=x,E.body=i,s(r,b,E))}}}return{insertBodies:function(t){if(0!==t.length){var e=Number.MAX_VALUE,n=Number.MAX_VALUE,r=Number.MIN_VALUE,i=Number.MIN_VALUE,o=void 0,a=t.length;for(o=a;o--;){var s=t[o].pos.x,f=t[o].pos.y;sr&&(r=s),fi&&(i=f)}var d=r-e,g=i-n;for(d>g?i=n+d:r=e+g,c=0,(u=l()).left=e,u.right=r,u.top=n,u.bottom=i,(o=a-1)>=0&&(u.body=t[o]);o--;)h(t[o])}},updateBodyForce:function(e,n,r,i){var o=t,a=void 0,s=void 0,c=void 0,l=void 0,h=0,f=0,d=1,g=0,p=1;o[0]=u,function(t){t.x=0,t.y=0}(e.force);var v=-e.pos.x,b=-e.pos.y,y=Math.sqrt(v*v+b*b),w=e.mass*i/y;for(h+=w*v,f+=w*b;d;){var m=o[g],x=m.body;d-=1,g+=1;var E=x!==e;x&&E?(s=x.pos.x-e.pos.x,c=x.pos.y-e.pos.y,0===(l=Math.sqrt(s*s+c*c))&&(s=(Math.random()-.5)/50,c=(Math.random()-.5)/50,l=Math.sqrt(s*s+c*c)),h+=(a=n*x.mass*e.mass/(l*l*l))*s,f+=a*c):E&&(s=m.massX/m.mass-e.pos.x,c=m.massY/m.mass-e.pos.y,0===(l=Math.sqrt(s*s+c*c))&&(s=(Math.random()-.5)/50,c=(Math.random()-.5)/50,l=Math.sqrt(s*s+c*c)),(m.right-m.left)/l0)return this.stack[--this.popIdx]},reset:function(){this.popIdx=0}}},function(t,e,n){"use strict";t.exports=function(){this.body=null,this.quad0=null,this.quad1=null,this.quad2=null,this.quad3=null,this.mass=0,this.massX=0,this.massY=0,this.left=0,this.top=0,this.bottom=0,this.right=0}},function(t,e,n){"use strict";var r=n(6).integrate,i=n(5).applyDrag,o=n(1).applySpring;t.exports={tick:function(t){var e=t.bodies,n=t.springs,a=t.quadtree,s=t.timeStep,c=t.gravity,u=t.theta,l=t.dragCoeff,h=t.pull;e.forEach((function(t){var e=t._scratch;e&&(t.locked=e.locked,t.grabbed=e.grabbed,t.pos.x=e.x,t.pos.y=e.y)})),a.insertBodies(e);for(var f=0;f=e.maxIterations||r>=e.maxSimulationTime)};t.exports={tick:i,multitick:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r,o=!1,a=t,s=0;s1?e-1:0),r=1;r1?e-1:0),r=1;r1&&(console.warn("Popper.js Extension should only be used on one element."),console.warn("Ignoring all subsequent elements"))}t.exports={popper:function(t){return s(this),i(this[0],a(this[0],t))},popperRef:function(t){return s(this),o(this[0],a(this[0],t))}}},function(t,e,n){"use strict";var r=n(1),i=n(2).getPopper,o=n(0).getRef;function a(t,e){return r({},{boundingBox:{top:0,left:0,right:0,bottom:0,w:3,h:3},renderedDimensions:function(){return{w:3,h:3}},renderedPosition:function(){return{x:0,y:0}},popper:{},cy:t},e)}t.exports={popper:function(t){return i(this,a(this,t))},popperRef:function(t){return o(this,a(this,t))}}},function(t,e,n){"use strict";t.exports={getBoundingBox:function(t,e){var n=e.renderedPosition,r=e.cy,i=e.renderedDimensions,o=r.container().getBoundingClientRect(),a=i(t),s=n(t);return{top:s.y+o.top,left:s.x+o.left,right:s.x+a.w+o.left,bottom:s.y+a.h+o.top,width:a.w,height:a.h}}}},function(t,e,n){"use strict";t.exports={getContent:function(t,e){var n;if("function"!=typeof e){if(e instanceof HTMLElement)return e;throw new Error("Can not create popper from 'target' with unknown type")}if(null===(n=e(t)))throw new Error("No 'target' specified to create popper");return n}}},function(t,e,n){"use strict";var r=n(4),i=n(3);t.exports=function(t){if("function"!=typeof t)throw new Error("Provide 'popperFactory' before registering the module");return function(e){e&&(e("core","popperFactory",t),e("collection","popperFactory",t),e("core","popper",r.popper),e("collection","popper",i.popper),e("core","popperRef",r.popperRef),e("collection","popperRef",i.popperRef))}}}])},t.exports=e()},6246:(t,e,n)=>{t.exports={graphlib:n(8191),layout:n(8202),debug:n(8909),util:{time:n(3988).time,notime:n(3988).notime},version:n(7038)}},6822:(t,e,n)=>{"use strict";var r=n(6857),i=n(2031);t.exports={run:function(t){var e="greedy"===t.graph().acyclicer?i(t,function(t){return function(e){return t.edge(e).weight}}(t)):function(t){var e=[],n={},i={};return r.forEach(t.nodes(),(function o(a){r.has(i,a)||(i[a]=!0,n[a]=!0,r.forEach(t.outEdges(a),(function(t){r.has(n,t.w)?e.push(t):o(t.w)})),delete n[a])})),e}(t);r.forEach(e,(function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,r.uniqueId("rev"))}))},undo:function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}}))}}},135:(t,e,n)=>{var r=n(6857),i=n(3988);function o(t,e,n,r,o,a){var s={width:0,height:0,rank:a,borderType:e},c=o[e][a-1],u=i.addDummyNode(t,"border",s,n);o[e][a]=u,t.setParent(u,r),c&&t.setEdge(c,u,{weight:1})}t.exports=function(t){r.forEach(t.children(),(function e(n){var i=t.children(n),a=t.node(n);if(i.length&&r.forEach(i,e),r.has(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var s=a.minRank,c=a.maxRank+1;s{"use strict";var r=n(6857);function i(t){r.forEach(t.nodes(),(function(e){o(t.node(e))})),r.forEach(t.edges(),(function(e){o(t.edge(e))}))}function o(t){var e=t.width;t.width=t.height,t.height=e}function a(t){t.y=-t.y}function s(t){var e=t.x;t.x=t.y,t.y=e}t.exports={adjust:function(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||i(t)},undo:function(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){r.forEach(t.nodes(),(function(e){a(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,a),r.has(n,"y")&&a(n)}))}(t),"lr"!==e&&"rl"!==e||(function(t){r.forEach(t.nodes(),(function(e){s(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,s),r.has(n,"x")&&s(n)}))}(t),i(t))}}},9859:t=>{function e(){var t={};t._next=t._prev=t,this._sentinel=t}function n(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function r(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=e,e.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return n(e),e},e.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&n(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},e.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,r)),n=n._prev;return"["+t.join(", ")+"]"}},8909:(t,e,n)=>{var r=n(6857),i=n(3988),o=n(8191).Graph;t.exports={debugOrdering:function(t){var e=i.buildLayerMatrix(t),n=new o({compound:!0,multigraph:!0}).setGraph({});return r.forEach(t.nodes(),(function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)})),r.forEach(t.edges(),(function(t){n.setEdge(t.v,t.w,{},t.name)})),r.forEach(e,(function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,(function(t,e){return n.setEdge(t,e,{style:"invis"}),e}))})),n}}},8191:(t,e,n)=>{var r;try{r=n(8362)}catch(t){}r||(r=window.graphlib),t.exports=r},2031:(t,e,n)=>{var r=n(6857),i=n(8191).Graph,o=n(9859);t.exports=function(t,e){if(t.nodeCount()<=1)return[];var n=function(t,e){var n=new i,a=0,s=0;r.forEach(t.nodes(),(function(t){n.setNode(t,{v:t,in:0,out:0})})),r.forEach(t.edges(),(function(t){var r=n.edge(t.v,t.w)||0,i=e(t),o=r+i;n.setEdge(t.v,t.w,o),s=Math.max(s,n.node(t.v).out+=i),a=Math.max(a,n.node(t.w).in+=i)}));var u=r.range(s+a+3).map((function(){return new o})),l=a+1;return r.forEach(n.nodes(),(function(t){c(u,l,n.node(t))})),{graph:n,buckets:u,zeroIdx:l}}(t,e||a),u=function(t,e,n){for(var r,i=[],o=e[e.length-1],a=e[0];t.nodeCount();){for(;r=a.dequeue();)s(t,e,n,r);for(;r=o.dequeue();)s(t,e,n,r);if(t.nodeCount())for(var c=e.length-2;c>0;--c)if(r=e[c].dequeue()){i=i.concat(s(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(u,(function(e){return t.outEdges(e.v,e.w)})),!0)};var a=r.constant(1);function s(t,e,n,i,o){var a=o?[]:void 0;return r.forEach(t.inEdges(i.v),(function(r){var i=t.edge(r),s=t.node(r.v);o&&a.push({v:r.v,w:r.w}),s.out-=i,c(e,n,s)})),r.forEach(t.outEdges(i.v),(function(r){var i=t.edge(r),o=r.w,a=t.node(o);a.in-=i,c(e,n,a)})),t.removeNode(i.v),a}function c(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},8202:(t,e,n)=>{"use strict";var r=n(6857),i=n(6822),o=n(8209),a=n(9361),s=n(3988).normalizeRanks,c=n(2948),u=n(3988).removeEmptyRanks,l=n(6353),h=n(135),f=n(4850),d=n(1453),g=n(3776),p=n(3988),v=n(8191).Graph;t.exports=function(t,e){var n=e&&e.debugTiming?p.time:p.notime;n("layout",(function(){var e=n(" buildLayoutGraph",(function(){return function(t){var e=new v({multigraph:!0,compound:!0}),n=C(t.graph());return e.setGraph(r.merge({},y,N(n,b),r.pick(n,w))),r.forEach(t.nodes(),(function(n){var i=C(t.node(n));e.setNode(n,r.defaults(N(i,m),x)),e.setParent(n,t.parent(n))})),r.forEach(t.edges(),(function(n){var i=C(t.edge(n));e.setEdge(n,r.merge({},_,N(i,E),r.pick(i,k)))})),e}(t)}));n(" runLayout",(function(){!function(t,e){e(" makeSpaceForEdgeLabels",(function(){!function(t){var e=t.graph();e.ranksep/=2,r.forEach(t.edges(),(function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t)})),e(" removeSelfEdges",(function(){!function(t){r.forEach(t.edges(),(function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}}))}(t)})),e(" acyclic",(function(){i.run(t)})),e(" nestingGraph.run",(function(){l.run(t)})),e(" rank",(function(){a(p.asNonCompoundGraph(t))})),e(" injectEdgeLabelProxies",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e};p.addDummyNode(t,"edge-proxy",i,"_ep")}}))}(t)})),e(" removeEmptyRanks",(function(){u(t)})),e(" nestingGraph.cleanup",(function(){l.cleanup(t)})),e(" normalizeRanks",(function(){s(t)})),e(" assignRankMinMax",(function(){!function(t){var e=0;r.forEach(t.nodes(),(function(n){var i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=r.max(e,i.maxRank))})),t.graph().maxRank=e}(t)})),e(" removeEdgeLabelProxies",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t)})),e(" normalize.run",(function(){o.run(t)})),e(" parentDummyChains",(function(){c(t)})),e(" addBorderSegments",(function(){h(t)})),e(" order",(function(){d(t)})),e(" insertSelfEdges",(function(){!function(t){var e=p.buildLayerMatrix(t);r.forEach(e,(function(e){var n=0;r.forEach(e,(function(e,i){var o=t.node(e);o.order=i+n,r.forEach(o.selfEdges,(function(e){p.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:o.rank,order:i+ ++n,e:e.e,label:e.label},"_se")})),delete o.selfEdges}))}))}(t)})),e(" adjustCoordinateSystem",(function(){f.adjust(t)})),e(" position",(function(){g(t)})),e(" positionSelfEdges",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,o=r.y,a=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*a/3,y:o-s},{x:i+5*a/6,y:o-s},{x:i+a,y:o},{x:i+5*a/6,y:o+s},{x:i+2*a/3,y:o+s}],n.label.x=n.x,n.label.y=n.y}}))}(t)})),e(" removeBorderNodes",(function(){!function(t){r.forEach(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),i=t.node(n.borderTop),o=t.node(n.borderBottom),a=t.node(r.last(n.borderLeft)),s=t.node(r.last(n.borderRight));n.width=Math.abs(s.x-a.x),n.height=Math.abs(o.y-i.y),n.x=a.x+n.width/2,n.y=i.y+n.height/2}})),r.forEach(t.nodes(),(function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}(t)})),e(" normalize.undo",(function(){o.undo(t)})),e(" fixupEdgeLabelCoords",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t)})),e(" undoCoordinateSystem",(function(){f.undo(t)})),e(" translateGraph",(function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,o=0,a=t.graph(),s=a.marginx||0,c=a.marginy||0;function u(t){var r=t.x,a=t.y,s=t.width,c=t.height;e=Math.min(e,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,a-c/2),o=Math.max(o,a+c/2)}r.forEach(t.nodes(),(function(e){u(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.has(n,"x")&&u(n)})),e-=s,i-=c,r.forEach(t.nodes(),(function(n){var r=t.node(n);r.x-=e,r.y-=i})),r.forEach(t.edges(),(function(n){var o=t.edge(n);r.forEach(o.points,(function(t){t.x-=e,t.y-=i})),r.has(o,"x")&&(o.x-=e),r.has(o,"y")&&(o.y-=i)})),a.width=n-e+s,a.height=o-i+c}(t)})),e(" assignNodeIntersects",(function(){!function(t){r.forEach(t.edges(),(function(e){var n,r,i=t.edge(e),o=t.node(e.v),a=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=a,r=o),i.points.unshift(p.intersectRect(o,n)),i.points.push(p.intersectRect(a,r))}))}(t)})),e(" reversePoints",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse()}))}(t)})),e(" acyclic.undo",(function(){i.undo(t)}))}(e,n)})),n(" updateInputGraph",(function(){!function(t,e){r.forEach(t.nodes(),(function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(t.edges(),(function(n){var i=t.edge(n),o=e.edge(n);i.points=o.points,r.has(o,"x")&&(i.x=o.x,i.y=o.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)}))}))};var b=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},w=["acyclicer","ranker","rankdir","align"],m=["width","height"],x={width:0,height:0},E=["minlen","weight","width","height","labeloffset"],_={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},k=["labelpos"];function N(t,e){return r.mapValues(r.pick(t,e),Number)}function C(t){var e={};return r.forEach(t,(function(t,n){e[n.toLowerCase()]=t})),e}},6857:(t,e,n)=>{var r;try{r={cloneDeep:n(8055),constant:n(7334),defaults:n(4684),each:n(6135),filter:n(7612),find:n(7309),flatten:n(5970),forEach:n(9754),forIn:n(2420),has:n(1448),isUndefined:n(2216),last:n(8090),map:n(5378),mapValues:n(3916),max:n(4506),merge:n(5364),min:n(1684),minBy:n(6533),now:n(124),pick:n(4383),range:n(3181),reduce:n(860),sortBy:n(3031),uniqueId:n(7200),values:n(5880),zipObject:n(7248)}}catch(t){}r||(r=window._),t.exports=r},6353:(t,e,n)=>{var r=n(6857),i=n(3988);function o(t,e,n,a,s,c,u){var l=t.children(u);if(l.length){var h=i.addBorderNode(t,"_bt"),f=i.addBorderNode(t,"_bb"),d=t.node(u);t.setParent(h,u),d.borderTop=h,t.setParent(f,u),d.borderBottom=f,r.forEach(l,(function(r){o(t,e,n,a,s,c,r);var i=t.node(r),l=i.borderTop?i.borderTop:r,d=i.borderBottom?i.borderBottom:r,g=i.borderTop?a:2*a,p=l!==d?1:s-c[u]+1;t.setEdge(h,l,{weight:g,minlen:p,nestingEdge:!0}),t.setEdge(d,f,{weight:g,minlen:p,nestingEdge:!0})})),t.parent(u)||t.setEdge(e,h,{weight:0,minlen:s+c[u]})}else u!==e&&t.setEdge(e,u,{weight:0,minlen:n})}t.exports={run:function(t){var e=i.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};function n(i,o){var a=t.children(i);a&&a.length&&r.forEach(a,(function(t){n(t,o+1)})),e[i]=o}return r.forEach(t.children(),(function(t){n(t,1)})),e}(t),a=r.max(r.values(n))-1,s=2*a+1;t.graph().nestingRoot=e,r.forEach(t.edges(),(function(e){t.edge(e).minlen*=s}));var c=function(t){return r.reduce(t.edges(),(function(e,n){return e+t.edge(n).weight}),0)}(t)+1;r.forEach(t.children(),(function(r){o(t,e,s,c,a,n,r)})),t.graph().nodeRankFactor=s},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,r.forEach(t.edges(),(function(e){t.edge(e).nestingEdge&&t.removeEdge(e)}))}}},8209:(t,e,n)=>{"use strict";var r=n(6857),i=n(3988);t.exports={run:function(t){t.graph().dummyChains=[],r.forEach(t.edges(),(function(e){!function(t,e){var n,r,o,a=e.v,s=t.node(a).rank,c=e.w,u=t.node(c).rank,l=e.name,h=t.edge(e),f=h.labelRank;if(u!==s+1){for(t.removeEdge(e),o=0,++s;s{var r=n(6857);t.exports=function(t,e,n){var i,o={};r.forEach(n,(function(n){for(var r,a,s=t.parent(n);s;){if((r=t.parent(s))?(a=o[r],o[r]=s):(a=i,i=s),a&&a!==s)return void e.setEdge(a,s);s=r}}))}},3860:(t,e,n)=>{var r=n(6857);t.exports=function(t,e){return r.map(e,(function(e){var n=t.inEdges(e);if(n.length){var i=r.reduce(n,(function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}}))}},7860:(t,e,n)=>{var r=n(6857),i=n(8191).Graph;t.exports=function(t,e,n){var o=function(t){for(var e;t.hasNode(e=r.uniqueId("_root")););return e}(t),a=new i({compound:!0}).setGraph({root:o}).setDefaultNodeLabel((function(e){return t.node(e)}));return r.forEach(t.nodes(),(function(i){var s=t.node(i),c=t.parent(i);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(a.setNode(i),a.setParent(i,c||o),r.forEach(t[n](i),(function(e){var n=e.v===i?e.w:e.v,o=a.edge(n,i),s=r.isUndefined(o)?0:o.weight;a.setEdge(n,i,{weight:t.edge(e).weight+s})})),r.has(s,"minRank")&&a.setNode(i,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))})),a}},6639:(t,e,n)=>{"use strict";var r=n(6857);function i(t,e,n){for(var i=r.zipObject(n,r.map(n,(function(t,e){return e}))),o=r.flatten(r.map(e,(function(e){return r.sortBy(r.map(t.outEdges(e),(function(e){return{pos:i[e.w],weight:t.edge(e).weight}})),"pos")})),!0),a=1;a0;)e%2&&(n+=c[e+1]),c[e=e-1>>1]+=t.weight;u+=t.weight*n}))),u}t.exports=function(t,e){for(var n=0,r=1;r{"use strict";var r=n(6857),i=n(8918),o=n(6639),a=n(4520),s=n(7860),c=n(4384),u=n(8191).Graph,l=n(3988);function h(t,e,n){return r.map(e,(function(e){return s(t,e,n)}))}function f(t,e){var n=new u;r.forEach(t,(function(t){var i=t.graph().root,o=a(t,i,n,e);r.forEach(o.vs,(function(e,n){t.node(e).order=n})),c(t,n,o.vs)}))}function d(t,e){r.forEach(e,(function(e){r.forEach(e,(function(e,n){t.node(e).order=n}))}))}t.exports=function(t){var e=l.maxRank(t),n=h(t,r.range(1,e+1),"inEdges"),a=h(t,r.range(e-1,-1,-1),"outEdges"),s=i(t);d(t,s);for(var c,u=Number.POSITIVE_INFINITY,g=0,p=0;p<4;++g,++p){f(g%2?n:a,g%4>=2),s=l.buildLayerMatrix(t);var v=o(t,s);v{"use strict";var r=n(6857);t.exports=function(t){var e={},n=r.filter(t.nodes(),(function(e){return!t.children(e).length})),i=r.max(r.map(n,(function(e){return t.node(e).rank}))),o=r.map(r.range(i+1),(function(){return[]})),a=r.sortBy(n,(function(e){return t.node(e).rank}));return r.forEach(a,(function n(i){if(!r.has(e,i)){e[i]=!0;var a=t.node(i);o[a.rank].push(i),r.forEach(t.successors(i),n)}})),o}},4959:(t,e,n)=>{"use strict";var r=n(6857);t.exports=function(t,e){var n={};return r.forEach(t,(function(t,e){var i=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};r.isUndefined(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)})),r.forEach(e.edges(),(function(t){var e=n[t.v],i=n[t.w];r.isUndefined(e)||r.isUndefined(i)||(i.indegree++,e.out.push(n[t.w]))})),function(t){var e=[];function n(t){return function(e){var n,i,o,a;e.merged||(r.isUndefined(e.barycenter)||r.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&(i=e,o=0,a=0,(n=t).weight&&(o+=n.barycenter*n.weight,a+=n.weight),i.weight&&(o+=i.barycenter*i.weight,a+=i.weight),n.vs=i.vs.concat(n.vs),n.barycenter=o/a,n.weight=a,n.i=Math.min(i.i,n.i),i.merged=!0)}}function i(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var o=t.pop();e.push(o),r.forEach(o.in.reverse(),n(o)),r.forEach(o.out,i(o))}return r.map(r.filter(e,(function(t){return!t.merged})),(function(t){return r.pick(t,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(t){return!t.indegree})))}},4520:(t,e,n)=>{var r=n(6857),i=n(3860),o=n(4959),a=n(5169);t.exports=function t(e,n,s,c){var u=e.children(n),l=e.node(n),h=l?l.borderLeft:void 0,f=l?l.borderRight:void 0,d={};h&&(u=r.filter(u,(function(t){return t!==h&&t!==f})));var g=i(e,u);r.forEach(g,(function(n){if(e.children(n.v).length){var i=t(e,n.v,s,c);d[n.v]=i,r.has(i,"barycenter")&&(o=n,a=i,r.isUndefined(o.barycenter)?(o.barycenter=a.barycenter,o.weight=a.weight):(o.barycenter=(o.barycenter*o.weight+a.barycenter*a.weight)/(o.weight+a.weight),o.weight+=a.weight))}var o,a}));var p=o(g,s);!function(t,e){r.forEach(t,(function(t){t.vs=r.flatten(t.vs.map((function(t){return e[t]?e[t].vs:t})),!0)}))}(p,d);var v=a(p,c);if(h&&(v.vs=r.flatten([h,v.vs,f],!0),e.predecessors(h).length)){var b=e.node(e.predecessors(h)[0]),y=e.node(e.predecessors(f)[0]);r.has(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+b.order+y.order)/(v.weight+2),v.weight+=2}return v}},5169:(t,e,n)=>{var r=n(6857),i=n(3988);function o(t,e,n){for(var i;e.length&&(i=r.last(e)).i<=n;)e.pop(),t.push(i.vs),n++;return n}t.exports=function(t,e){var n,a=i.partition(t,(function(t){return r.has(t,"barycenter")})),s=a.lhs,c=r.sortBy(a.rhs,(function(t){return-t.i})),u=[],l=0,h=0,f=0;s.sort((n=!!e,function(t,e){return t.barycentere.barycenter?1:n?e.i-t.i:t.i-e.i})),f=o(u,c,f),r.forEach(s,(function(t){f+=t.vs.length,u.push(t.vs),l+=t.barycenter*t.weight,h+=t.weight,f=o(u,c,f)}));var d={vs:r.flatten(u,!0)};return h&&(d.barycenter=l/h,d.weight=h),d}},2948:(t,e,n)=>{var r=n(6857);t.exports=function(t){var e=function(t){var e={},n=0;return r.forEach(t.children(),(function i(o){var a=n;r.forEach(t.children(o),i),e[o]={low:a,lim:n++}})),e}(t);r.forEach(t.graph().dummyChains,(function(n){for(var r=t.node(n),i=r.edgeObj,o=function(t,e,n,r){var i,o,a=[],s=[],c=Math.min(e[n].low,e[r].low),u=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),a.push(i)}while(i&&(e[i].low>c||u>e[i].lim));for(o=i,i=r;(i=t.parent(i))!==o;)s.push(i);return{path:a.concat(s.reverse()),lca:o}}(t,e,i.v,i.w),a=o.path,s=o.lca,c=0,u=a[c],l=!0;n!==i.w;){if(r=t.node(n),l){for(;(u=a[c])!==s&&t.node(u).maxRank{"use strict";var r=n(6857),i=n(8191).Graph,o=n(3988);function a(t,e){var n={};return r.reduce(e,(function(e,i){var o=0,a=0,s=e.length,u=r.last(i);return r.forEach(i,(function(e,l){var h=function(t,e){if(t.node(e).dummy)return r.find(t.predecessors(e),(function(e){return t.node(e).dummy}))}(t,e),f=h?t.node(h).order:s;(h||e===u)&&(r.forEach(i.slice(a,l+1),(function(e){r.forEach(t.predecessors(e),(function(r){var i=t.node(r),a=i.order;!(as)&&c(n,e,u)}))}))}return r.reduce(e,(function(e,n){var o,a=-1,s=0;return r.forEach(n,(function(r,c){if("border"===t.node(r).dummy){var u=t.predecessors(r);u.length&&(o=t.node(u[0]).order,i(n,s,c,a,o),s=c,a=o)}i(n,s,n.length,o,e.length)})),n})),n}function c(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function u(t,e,n){if(e>n){var i=e;e=n,n=i}return r.has(t[e],n)}function l(t,e,n,i){var o={},a={},s={};return r.forEach(e,(function(t){r.forEach(t,(function(t,e){o[t]=t,a[t]=t,s[t]=e}))})),r.forEach(e,(function(t){var e=-1;r.forEach(t,(function(t){var c=i(t);if(c.length){c=r.sortBy(c,(function(t){return s[t]}));for(var l=(c.length-1)/2,h=Math.floor(l),f=Math.ceil(l);h<=f;++h){var d=c[h];a[t]===t&&e{"use strict";var r=n(6857),i=n(3988),o=n(9741).positionX;t.exports=function(t){(function(t){var e=i.buildLayerMatrix(t),n=t.graph().ranksep,o=0;r.forEach(e,(function(e){var i=r.max(r.map(e,(function(e){return t.node(e).height})));r.forEach(e,(function(e){t.node(e).y=o+i/2})),o+=i+n}))})(t=i.asNonCompoundGraph(t)),r.forEach(o(t),(function(e,n){t.node(n).x=e}))}},8481:(t,e,n)=>{"use strict";var r=n(6857),i=n(8191).Graph,o=n(8073).slack;function a(t,e){return r.forEach(t.nodes(),(function n(i){r.forEach(e.nodeEdges(i),(function(r){var a=r.v,s=i===a?r.w:a;t.hasNode(s)||o(e,r)||(t.setNode(s,{}),t.setEdge(i,s,{}),n(s))}))})),t.nodeCount()}function s(t,e){return r.minBy(e.edges(),(function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return o(e,n)}))}function c(t,e,n){r.forEach(t.nodes(),(function(t){e.node(t).rank+=n}))}t.exports=function(t){var e,n,r=new i({directed:!1}),u=t.nodes()[0],l=t.nodeCount();for(r.setNode(u,{});a(r,t){"use strict";var r=n(8073).longestPath,i=n(8481),o=n(6860);t.exports=function(t){switch(t.graph().ranker){case"network-simplex":default:!function(t){o(t)}(t);break;case"tight-tree":!function(t){r(t),i(t)}(t);break;case"longest-path":a(t)}};var a=r},6860:(t,e,n)=>{"use strict";var r=n(6857),i=n(8481),o=n(8073).slack,a=n(8073).longestPath,s=n(8191).alg.preorder,c=n(8191).alg.postorder,u=n(3988).simplify;function l(t){t=u(t),a(t);var e,n=i(t);for(d(n),h(n,t);e=p(n);)b(n,t,e,v(n,t,e))}function h(t,e){var n=c(t,t.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=f(t,e,n)}(t,e,n)}))}function f(t,e,n){var i=t.node(n).parent,o=!0,a=e.edge(n,i),s=0;return a||(o=!1,a=e.edge(i,n)),s=a.weight,r.forEach(e.nodeEdges(n),(function(r){var a,c,u=r.v===n,l=u?r.w:r.v;if(l!==i){var h=u===o,f=e.edge(r).weight;if(s+=h?f:-f,a=n,c=l,t.hasEdge(a,c)){var d=t.edge(n,l).cutvalue;s+=h?-d:d}}})),s}function d(t,e){arguments.length<2&&(e=t.nodes()[0]),g(t,{},1,e)}function g(t,e,n,i,o){var a=n,s=t.node(i);return e[i]=!0,r.forEach(t.neighbors(i),(function(o){r.has(e,o)||(n=g(t,e,n,o,i))})),s.low=a,s.lim=n++,o?s.parent=o:delete s.parent,n}function p(t){return r.find(t.edges(),(function(e){return t.edge(e).cutvalue<0}))}function v(t,e,n){var i=n.v,a=n.w;e.hasEdge(i,a)||(i=n.w,a=n.v);var s=t.node(i),c=t.node(a),u=s,l=!1;s.lim>c.lim&&(u=c,l=!0);var h=r.filter(e.edges(),(function(e){return l===y(0,t.node(e.v),u)&&l!==y(0,t.node(e.w),u)}));return r.minBy(h,(function(t){return o(e,t)}))}function b(t,e,n,i){var o=n.v,a=n.w;t.removeEdge(o,a),t.setEdge(i.v,i.w,{}),d(t),h(t,e),function(t,e){var n=r.find(t.nodes(),(function(t){return!e.node(t).parent})),i=s(t,n);i=i.slice(1),r.forEach(i,(function(n){var r=t.node(n).parent,i=e.edge(n,r),o=!1;i||(i=e.edge(r,n),o=!0),e.node(n).rank=e.node(r).rank+(o?i.minlen:-i.minlen)}))}(t,e)}function y(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=l,l.initLowLimValues=d,l.initCutValues=h,l.calcCutValue=f,l.leaveEdge=p,l.enterEdge=v,l.exchangeEdges=b},8073:(t,e,n)=>{"use strict";var r=n(6857);t.exports={longestPath:function(t){var e={};r.forEach(t.sources(),(function n(i){var o=t.node(i);if(r.has(e,i))return o.rank;e[i]=!0;var a=r.min(r.map(t.outEdges(i),(function(e){return n(e.w)-t.edge(e).minlen})));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),o.rank=a}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},3988:(t,e,n)=>{"use strict";var r=n(6857),i=n(8191).Graph;function o(t,e,n,i){var o;do{o=r.uniqueId(i)}while(t.hasNode(o));return n.dummy=e,t.setNode(o,n),o}function a(t){return r.max(r.map(t.nodes(),(function(e){var n=t.node(e).rank;if(!r.isUndefined(n))return n})))}t.exports={addDummyNode:o,simplify:function(t){var e=(new i).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e},successorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,o=t.y,a=e.x-i,s=e.y-o,c=t.width/2,u=t.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*c>Math.abs(a)*u?(s<0&&(u=-u),n=u*a/s,r=u):(a<0&&(c=-c),n=c,r=c*s/a),{x:i+n,y:o+r}},buildLayerMatrix:function(t){var e=r.map(r.range(a(t)+1),(function(){return[]}));return r.forEach(t.nodes(),(function(n){var i=t.node(n),o=i.rank;r.isUndefined(o)||(e[o][i.order]=n)})),e},normalizeRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank})));r.forEach(t.nodes(),(function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)}))},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];r.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,o=t.graph().nodeRankFactor;r.forEach(n,(function(e,n){r.isUndefined(e)&&n%o!=0?--i:i&&r.forEach(e,(function(e){t.node(e).rank+=i}))}))},addBorderNode:function(t,e,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),o(t,"border",i,e)},maxRank:a,partition:function(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}},notime:function(t,e){return e()}}},7038:t=>{t.exports="0.8.5"},8362:(t,e,n)=>{var r=n(1166);t.exports={Graph:r.Graph,json:n(7494),alg:n(1667),version:r.version}},3619:(t,e,n)=>{var r=n(117);t.exports=function(t){var e,n={},i=[];function o(i){r.has(n,i)||(n[i]=!0,e.push(i),r.each(t.successors(i),o),r.each(t.predecessors(i),o))}return r.each(t.nodes(),(function(t){e=[],o(t),e.length&&i.push(e)})),i}},9276:(t,e,n)=>{var r=n(117);function i(t,e,n,o,a,s){r.has(o,e)||(o[e]=!0,n||s.push(e),r.each(a(e),(function(e){i(t,e,n,o,a,s)})),n&&s.push(e))}t.exports=function(t,e,n){r.isArray(e)||(e=[e]);var o=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],s={};return r.each(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);i(t,e,"post"===n,s,o,a)})),a}},4919:(t,e,n)=>{var r=n(8905),i=n(117);t.exports=function(t,e,n){return i.transform(t.nodes(),(function(i,o){i[o]=r(t,o,e,n)}),{})}},8905:(t,e,n)=>{var r=n(117),i=n(1737);t.exports=function(t,e,n,r){return function(t,e,n,r){var o,a,s={},c=new i,u=function(t){var e=t.v!==o?t.v:t.w,r=s[e],i=n(t),u=a.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);u0&&(o=c.removeMin(),(a=s[o]).distance!==Number.POSITIVE_INFINITY);)r(o).forEach(u);return s}(t,String(e),n||o,r||function(e){return t.outEdges(e)})};var o=r.constant(1)},6678:(t,e,n)=>{var r=n(117),i=n(6291);t.exports=function(t){return r.filter(i(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))}},3590:(t,e,n)=>{var r=n(117);t.exports=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,o=e(n);r[t][i]={distance:o,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var o=r[n];i.forEach((function(n){var r=o[t],i=e[n],a=o[n],s=r.distance+i.distance;s{t.exports={components:n(3619),dijkstra:n(8905),dijkstraAll:n(4919),findCycles:n(6678),floydWarshall:n(3590),isAcyclic:n(498),postorder:n(1045),preorder:n(6016),prim:n(4423),tarjan:n(6291),topsort:n(9888)}},498:(t,e,n)=>{var r=n(9888);t.exports=function(t){try{r(t)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},1045:(t,e,n)=>{var r=n(9276);t.exports=function(t,e){return r(t,e,"post")}},6016:(t,e,n)=>{var r=n(9276);t.exports=function(t,e){return r(t,e,"pre")}},4423:(t,e,n)=>{var r=n(117),i=n(6454),o=n(1737);t.exports=function(t,e){var n,a=new i,s={},c=new o;function u(t){var r=t.v===n?t.w:t.v,i=c.priority(r);if(void 0!==i){var o=e(t);o0;){if(n=c.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(n).forEach(u)}return a}},6291:(t,e,n)=>{var r=n(117);t.exports=function(t){var e=0,n=[],i={},o=[];function a(s){var c=i[s]={onStack:!0,lowlink:e,index:e++};if(n.push(s),t.successors(s).forEach((function(t){r.has(i,t)?i[t].onStack&&(c.lowlink=Math.min(c.lowlink,i[t].index)):(a(t),c.lowlink=Math.min(c.lowlink,i[t].lowlink))})),c.lowlink===c.index){var u,l=[];do{u=n.pop(),i[u].onStack=!1,l.push(u)}while(s!==u);o.push(l)}}return t.nodes().forEach((function(t){r.has(i,t)||a(t)})),o}},9888:(t,e,n)=>{var r=n(117);function i(t){var e={},n={},i=[];if(r.each(t.sinks(),(function a(s){if(r.has(n,s))throw new o;r.has(e,s)||(n[s]=!0,e[s]=!0,r.each(t.predecessors(s),a),delete n[s],i.push(s))})),r.size(e)!==t.nodeCount())throw new o;return i}function o(){}t.exports=i,i.CycleException=o,o.prototype=new Error},1737:(t,e,n)=>{var r=n(117);function i(){this._arr=[],this._keyIndices={}}t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},i.prototype.has=function(t){return r.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,o=i.length;return n[t]=o,i.push({key:t,priority:e}),this._decrease(o),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},i.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},i.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n>1].priority{"use strict";var r=n(117);t.exports=s;var i="\0",o="\0",a="";function s(t){this._isDirected=!r.has(t,"directed")||t.directed,this._isMultigraph=!!r.has(t,"multigraph")&&t.multigraph,this._isCompound=!!r.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[o]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function c(t,e){t[e]?t[e]++:t[e]=1}function u(t,e){--t[e]||delete t[e]}function l(t,e,n,o){var s=""+e,c=""+n;if(!t&&s>c){var u=s;s=c,c=u}return s+a+c+a+(r.isUndefined(o)?i:o)}function h(t,e){return l(t,e.v,e.w,e.name)}s.prototype._nodeCount=0,s.prototype._edgeCount=0,s.prototype.isDirected=function(){return this._isDirected},s.prototype.isMultigraph=function(){return this._isMultigraph},s.prototype.isCompound=function(){return this._isCompound},s.prototype.setGraph=function(t){return this._label=t,this},s.prototype.graph=function(){return this._label},s.prototype.setDefaultNodeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultNodeLabelFn=t,this},s.prototype.nodeCount=function(){return this._nodeCount},s.prototype.nodes=function(){return r.keys(this._nodes)},s.prototype.sources=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._in[e])}))},s.prototype.sinks=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._out[e])}))},s.prototype.setNodes=function(t,e){var n=arguments,i=this;return r.each(t,(function(t){n.length>1?i.setNode(t,e):i.setNode(t)})),this},s.prototype.setNode=function(t,e){return r.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=o,this._children[t]={},this._children[o][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},s.prototype.node=function(t){return this._nodes[t]},s.prototype.hasNode=function(t){return r.has(this._nodes,t)},s.prototype.removeNode=function(t){var e=this;if(r.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],r.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),r.each(r.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],r.each(r.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},s.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(e))e=o;else{for(var n=e+="";!r.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},s.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},s.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==o)return e}},s.prototype.children=function(t){if(r.isUndefined(t)&&(t=o),this._isCompound){var e=this._children[t];if(e)return r.keys(e)}else{if(t===o)return this.nodes();if(this.hasNode(t))return[]}},s.prototype.predecessors=function(t){var e=this._preds[t];if(e)return r.keys(e)},s.prototype.successors=function(t){var e=this._sucs[t];if(e)return r.keys(e)},s.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return r.union(e,this.successors(t))},s.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},s.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),r.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var i={};function o(t){var r=n.parent(t);return void 0===r||e.hasNode(r)?(i[t]=r,r):r in i?i[r]:o(r)}return this._isCompound&&r.each(e.nodes(),(function(t){e.setParent(t,o(t))})),e},s.prototype.setDefaultEdgeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultEdgeLabelFn=t,this},s.prototype.edgeCount=function(){return this._edgeCount},s.prototype.edges=function(){return r.values(this._edgeObjs)},s.prototype.setPath=function(t,e){var n=this,i=arguments;return r.reduce(t,(function(t,r){return i.length>1?n.setEdge(t,r,e):n.setEdge(t,r),r})),this},s.prototype.setEdge=function(){var t,e,n,i,o=!1,a=arguments[0];"object"==typeof a&&null!==a&&"v"in a?(t=a.v,e=a.w,n=a.name,2===arguments.length&&(i=arguments[1],o=!0)):(t=a,e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),t=""+t,e=""+e,r.isUndefined(n)||(n=""+n);var s=l(this._isDirected,t,e,n);if(r.has(this._edgeLabels,s))return o&&(this._edgeLabels[s]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[s]=o?i:this._defaultEdgeLabelFn(t,e,n);var u=function(t,e,n,r){var i=""+e,o=""+n;if(!t&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return r&&(s.name=r),s}(this._isDirected,t,e,n);return t=u.v,e=u.w,Object.freeze(u),this._edgeObjs[s]=u,c(this._preds[e],t),c(this._sucs[t],e),this._in[e][s]=u,this._out[t][s]=u,this._edgeCount++,this},s.prototype.edge=function(t,e,n){var r=1===arguments.length?h(this._isDirected,arguments[0]):l(this._isDirected,t,e,n);return this._edgeLabels[r]},s.prototype.hasEdge=function(t,e,n){var i=1===arguments.length?h(this._isDirected,arguments[0]):l(this._isDirected,t,e,n);return r.has(this._edgeLabels,i)},s.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?h(this._isDirected,arguments[0]):l(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],u(this._preds[e],t),u(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},s.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.v===e})):i}},s.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.w===e})):i}},s.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},1166:(t,e,n)=>{t.exports={Graph:n(6454),version:n(4458)}},7494:(t,e,n)=>{var r=n(117),i=n(6454);function o(t){return r.map(t.nodes(),(function(e){var n=t.node(e),i=t.parent(e),o={v:e};return r.isUndefined(n)||(o.value=n),r.isUndefined(i)||(o.parent=i),o}))}function a(t){return r.map(t.edges(),(function(e){var n=t.edge(e),i={v:e.v,w:e.w};return r.isUndefined(e.name)||(i.name=e.name),r.isUndefined(n)||(i.value=n),i}))}t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:o(t),edges:a(t)};return r.isUndefined(t.graph())||(e.value=r.clone(t.graph())),e},read:function(t){var e=new i(t.options).setGraph(t.value);return r.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),r.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}}},117:(t,e,n)=>{var r;try{r={clone:n(2629),constant:n(7334),each:n(6135),filter:n(7612),has:n(1448),isArray:n(6449),isEmpty:n(2193),isFunction:n(1882),isUndefined:n(2216),keys:n(5950),map:n(5378),reduce:n(860),size:n(7091),transform:n(9752),union:n(299),values:n(5880)}}catch(t){}r||(r=window._),t.exports=r},4458:t=>{t.exports="2.1.8"},6842:t=>{var e,n;!function(){var r;function i(){}function a(){}function s(){}function c(){}function u(){}function l(){}function h(){}function f(){}function d(){}function g(){}function p(){}function v(){}function b(){}function y(){}function w(){}function m(){}function x(){}function E(){}function _(){}function k(){}function N(){}function C(){}function T(){}function A(){}function O(){}function I(){}function L(){}function S(){}function M(){}function D(){}function P(){}function R(){}function j(){}function G(){}function F(){}function B(){}function H(){}function Y(){}function z(){}function V(){}function U(){}function X(){}function W(){}function q(){}function Z(){}function $(){}function K(){}function Q(){}function J(){}function tt(){}function et(){}function nt(){}function rt(){}function it(){}function ot(){}function at(){}function st(){}function ct(){}function ut(){}function lt(){}function ht(){}function ft(){}function dt(){}function gt(){}function pt(){}function vt(){}function bt(){}function yt(){}function wt(){}function mt(){}function xt(){}function Et(){}function _t(){}function kt(){}function Nt(){}function Ct(){}function Tt(){}function At(){}function Ot(){}function It(){}function Lt(){}function St(){}function Mt(){}function Dt(){}function Pt(){}function Rt(){}function jt(){}function Gt(){}function Ft(){}function Bt(){}function Ht(){}function Yt(){}function zt(){}function Vt(){}function Ut(){}function Xt(){}function Wt(){}function qt(){}function Zt(){}function $t(){}function Kt(){}function Qt(){}function Jt(){}function te(){}function ee(){}function ne(){}function re(){}function ie(){}function oe(){}function ae(){}function se(){}function ce(){}function ue(){}function le(){}function he(){}function fe(){}function de(){}function ge(){}function pe(){}function ve(){}function be(){}function ye(){}function we(){}function me(){Ff()}function xe(){CE()}function Ee(){Wd()}function _e(){Xp()}function ke(){no()}function Ne(){ro()}function Ce(){fa()}function Te(){Wp()}function Ae(){Pf()}function Oe(){Tk()}function Ie(){Rf()}function Le(){jf()}function Se(){lT()}function Me(){LN()}function De(){sh(this)}function Pe(){}function Re(){xu(this)}function je(){}function Ge(t){this.a=t}function Fe(t){this.a=t}function Be(t){this.a=t}function He(t){this.a=t}function Ye(t){this.a=t}function ze(t){this.a=t}function Ve(t){this.a=t}function Ue(t){this.a=t}function Xe(t){this.a=t}function We(t){this.b=t}function qe(t){this.a=t}function Ze(t){this.a=t}function $e(t){this.a=t}function Ke(t){this.a=t}function Qe(t){this.a=t}function Je(t){this.a=t}function tn(t){this.a=t}function en(t){this.a=t}function nn(t){this.a=t}function rn(t){this.a=t}function on(t){this.a=t}function an(t){this.a=t}function sn(t){this.a=t}function cn(t){this.a=t}function un(t){this.a=t}function ln(t){this.e=t}function hn(t){this.a=t}function fn(t){this.a=t}function dn(t){this.a=t}function gn(t){this.a=t}function pn(t){this.a=t}function vn(t){this.a=t}function bn(t){this.a=t}function yn(t){this.a=t}function wn(t){this.a=t}function mn(t){this.a=t}function xn(t){this.a=t}function En(t){this.a=t}function _n(t){this.a=t}function kn(t){this.a=t}function Nn(t){this.a=t}function Cn(t){this.a=t}function Tn(t){this.a=t}function An(t){this.a=t}function On(t){this.a=t}function In(t){this.a=t}function Ln(t){this.a=t}function Sn(t){this.c=t}function Mn(t){this.a=t}function Dn(t){this.a=t}function Pn(t){this.a=t}function Rn(t){this.a=t}function jn(t){this.a=t}function Gn(t){this.a=t}function Fn(t){this.a=t}function Bn(t){this.a=t}function Hn(t){this.a=t}function Yn(t){this.a=t}function zn(t){this.d=t}function Vn(t){this.a=t}function Un(t){this.a=t}function Xn(t){this.a=t}function Wn(t){this.a=t}function qn(t){this.b=t}function Zn(t){this.a=t}function $n(t){this.a=t}function Kn(t){this.c=t}function Qn(t){this.a=t}function Jn(t){this.a=t}function tr(t){this.a=t}function er(t){this.b=t}function nr(t){this.b=t}function rr(t){this.c=t}function ir(t){this.a=t}function or(t){this.a=t}function ar(t){this.a=t}function sr(){this.a=[]}function cr(t){this.a=t}function ur(t){this.a=t}function lr(t){t.b=t.a}function hr(t){t.c=t.d.d}function fr(t,e){t.g=e}function dr(t,e){t.k=e}function gr(t,e){t.e.k=e}function pr(t){return t.a}function vr(t){return t.a}function br(t){return t.a}function yr(t){return t.a}function wr(t){return t.a}function mr(){return null}function xr(){return null}function Er(){this.c=this}function _r(){sh(this)}function kr(){wy(this)}function Nr(t){!function(t,e){var n,r,i,o,a,s,c;for(c=0,r=0,i=e.length;r=t.length)return{done:!0};var r=t[n++];return{value:[r,e.get(r)],done:!1}}}},function(){if(!Object.create||!Object.getOwnPropertyNames)return!1;var t="__proto__",e=Object.create(null);return void 0===e[t]&&0==Object.getOwnPropertyNames(e).length&&(e[t]=42,42===e[t]&&0!=Object.getOwnPropertyNames(e).length)}()||(t.prototype.createObject=function(){return{}},t.prototype.get=function(t){return this.obj[":"+t]},t.prototype.set=function(t,e){this.obj[":"+t]=e},t.prototype[yP]=function(t){delete this.obj[":"+t]},t.prototype.keys=function(){var t=[];for(var e in this.obj)58==e.charCodeAt(0)&&t.push(e.substring(1));return t}),t}()}function So(t,e){Sx(),oS.dc(t,e)}function Mo(t,e){return Mv(t,e)}function Do(t,e){return t.a.B(e)}function Po(t,e){return t.g[e.e]}function Ro(t,e){return t.i[e.e]}function jo(t,e){return t.j[e.e]}function Go(t,e){return t.n[e.e]}function Fo(t,e){return t.o[e.e]}function Bo(t,e){return t>e?t:e}function Ho(t,e){return t>e?t:e}function Yo(t,e){return t>e?t:e}function zo(t,e){return te?1:0}function Bu(t){return null!=t?KE(t):0}function Hu(t){this.a=zc(),this.b=t}function Yu(t){this.a=zc(),this.b=t}function zu(t){this.a=t,td.call(this,t)}function Vu(){Ju(),this.b=new Nn(this)}function Uu(){var t;Uu=a,t=new co(", "),Pd(gS),HP=new Qf(t,t)}function Xu(){Xu=a,FP=new fu,GP=new Mu}function Wu(){Wu=a,zP=new p,VP=new v}function qu(){qu=a,XP=new $s,WP=new Eu}function Zu(){Zu=a,JP=new du,QP=new ml}function $u(){$u=a,vR=new w,bR=new m}function Ku(t){t.g=new Re,t.b=new Re}function Qu(t){t.a=new ye,t.c=new ye}function Ju(){Ju=a,_Y=new $t,EY=new ed}function tl(){Ha.call(this,"IS_NULL",2)}function el(){Gc.call(this,"Head",1)}function nl(){Gc.call(this,"Tail",3)}function rl(t,e){om.call(this,t,e,null)}function il(t,e){Hk(t,0,t.length,e)}function ol(t,e){return Lf(e.a,t.a),t.a}function al(t,e){return t.a*=e,t.b*=e,t}function sl(t,e){op(),this.a=t,this.b=e}function cl(t,e){return t.a[e.d.k][e.k]}function ul(t,e){return t.a[e.d.k][e.k]}function ll(t,e){return ua(function(t,e){var n,r;for(n=null,r=t.b;r;)t.a.$b(e,r.d)>=0?r=r.a[1]:(n=r,r=r.a[0]);return n}(t.a,e))}function hl(t,e){return ua(function(t,e){var n,r;for(n=null,r=t.b;r;)t.a.$b(e,r.d)<=0?r=r.a[0]:(n=r,r=r.a[1]);return n}(t.a,e))}function fl(t,e){return Vf(qN(t.a,e),20)}function dl(t,e){return null!=t&&Dk(t,e)}function gl(t){return t.a=e)throw new Ci}function Xf(t,e){return Pd(t),Pd(e),new cd(t,e)}function Wf(t,e){return Pd(t),Pd(e),new ud(t,e)}function qf(t,e,n){return t=e+1&&t.splice(0,e+1);break}return t}(oS.ec(t))}function _d(t,e){var n;return(n=Bg(t,e)).g=2,n}function kd(t,e){t.b=e.b,t.c=e.c,t.d=e.d,t.a=e.a}function Nd(t){t.a.b=t.b,t.b.a=t.a,t.a=t.b=null}function Cd(t){return t.b.c.length+t.e.c.length}function Td(t){return Array.isArray(t)&&t.ad===i}function Ad(t,e){return Wu(),-1!=Fx(new Kn(t),e)}function Od(t,e,n,r,i,o){return jN(t,e,n,r,i,0,o)}function Id(t,e,n){$u(),Qv.call(this,t.b,e,n,t.d)}function Ld(t,e){$u(),Qv.call(this,t.b,e,t.c,t.d)}function Sd(t,e,n){xy(e,t.c.length),Ac(t.c,e,n)}function Md(t,e){return Ey(e,t.a.length),t.a[e]}function Dd(t){t.sort((function(t,e){return t-e}))}function Pd(t){if(null==t)throw new $r;return t}function Rd(t){if(null==t)throw new $r;this.a=t}function jd(t,e,n){if(t.a!=e)throw new xi;t.a=n}function Gd(t,e){if(!t)throw new so((si(),e))}function Fd(t,e){if(!t)throw new _o((si(),e))}function Bd(t){if(null==t)throw new $r;return t}function Hd(t){cr.call(this,new ry),pm(this,t)}function Yd(t){this.a=new Ws(t.Y()),pm(this,t)}function zd(t){this.c=t,this.a=new Xs(this.c.a)}function Vd(t){op(),this.a=(zp(),new tr(Pd(t)))}function Ud(){(Ud=a)(),TW=!1,AW=!0}function Xd(){Xd=a,SW=Ny(TP,hS,24,256,0,1)}function Wd(){Wd=a,MY=vd(bd(new i_,(qL(),yH)),YH)}function qd(){qd=a,fB=new _,gB=new nd,dB=new k}function Zd(t){return null!=t&&Mg(t)&&!(t.ad===i)}function $d(t){return!Array.isArray(t)&&t.ad===i}function Kd(t,e){return Tl(e)?Dp(t,e):AT(t.d,e)}function Qd(t,e){return dl(e,17)&&Wl(t,Vf(e,17))}function Jd(t,e){return dl(e,17)&&function(t,e){return!(!e||t.b[e.e]!=e)&&(Yg(t.b,e.e,null),--t.c,!0)}(t,Vf(e,17))}function tg(t,e){var n;return sx(n=p_(t),e),n}function eg(t,e){return!t&&(t=[]),t[t.length]=e,t}function ng(t,e,n){if(!t)throw new so(function(t,e){var n,r,i,o;for(si(),(t=null==t?gS:t).length,e.length,n=new ea,o=0,r=0;r0),t.a.sb(t.c=--t.b)}function gg(t){t.b?gg(t.b):t.d.V()&&Kd(t.f.b,t.e)}function pg(t){if(n_(t.d),t.d.d!=t.c)throw new xi}function vg(t,e){if(e[gP]!=t[gP])throw new xi}function bg(t,e){return Wu(),Pd(t),Pd(e),new Ra(t,e)}function yg(t,e){op(),Xa.call(this,t,Lx(new Qn(e)))}function wg(t,e,n,r){this.a=t,Ty.call(this,t,e,n,r)}function mg(t){this.a=Math.cos(t),this.b=Math.sin(t)}function xg(t,e,n){zi.call(this,t),this.b=e,this.a=n}function Eg(t){this.b=new Re,this.a=new Re,this.c=t}function _g(t){this.c=new uo,this.a=new Re,this.b=t}function kg(){kg=a,oR=new nn(!1),aR=new nn(!0)}function Ng(t,e){return++t.d,t.c[t.c.length]=e,!0}function Cg(t,e){Mb(t.d,e,t.b.b,t.b),++t.a,t.c=null}function Tg(t,e){return null==t.a.db(e,t)}function Ag(t,e){return Fy(t.slice(0,e),t)}function Og(t,e){return Fy(new Array(e),t)}function Ig(t,e,n){var r;return r=t.b[e],t.b[e]=n,r}function Lg(t){return El(),Ef(function(t){return Vf(t.g||(t.g=new qe(t)),20)}(t.a).mb(),(qu(),XP))}function Sg(t){return Wu(),new Du(ju(Wf(t.a,new g)))}function Mg(t){return typeof t===lS||typeof t===bS}function Dg(t){r.setTimeout((function(){throw t}),0)}function Pg(t){return Pd(t),dl(t,345)?Vf(t,345):Vk(t)}function Rg(t,e){return null==Hx(t.a,e,(Ud(),TW))}function jg(t,e){var n;return function(t,e){if(t<0||t>=e)throw new ao(function(t,e){if(t<0)return PA(jS,Tx(Mo(NP,1),GS,1,4,["index",qE(t)]));if(e<0)throw new so(FS+e);return PA("%s (%s) must be less than size (%s)",Tx(Mo(NP,1),GS,1,4,["index",qE(t),qE(e)]))}(t,e))}(e,n=t.a.Y()),n-1-e}function Gg(t,e,n){var r;return r=Ow(t,e),function(t,e,n){if(n){var r=n.gc();n=r(n)}else n=void 0;t.a[e]=n}(t,e,n),r}function Fg(t,e,n){var r;return qw(n,r=Bg(t,e)),r}function Bg(t,e){var n;return(n=new qx).i=t,n.d=e,n}function Hg(t,e,n){this.a=t,Ib(n,e),this.c=e,this.b=n}function Yg(t,e,n){return function(t){if(!t)throw new qr}(null==n||function(t,e){switch(mw(t)){case 5:return Tl(e);case 6:return Cl(e);case 7:return vh(e);case 0:return Dk(e,t.__elementTypeId$);case 2:return Mg(e)&&!(e.ad===i);case 1:return Mg(e)&&!(e.ad===i)||Dk(e,t.__elementTypeId$);default:return!0}}(t,n)),t[e]=n}function zg(t){t.a=null,t.e=null,wy(t.b),t.d=0,++t.c}function Vg(t){return t.f||(t.f=new Js(t))}function Ug(t){return t.k||(t.k=new Ye(t))}function Xg(t){return t.e||(t.e=new Qa(t))}function Wg(t){var e;return!(e=t.e)&&(t.e=e=t.gb()),e}function qg(t){return t.c.f.d==t.d.f.d}function Zg(t,e){var n;return Hw(n=new Pb(t),e),n}function $g(t,e){return t.a+=String.fromCharCode(e),t}function Kg(t){return!t.a&&t.d?t.d.b:t.a}function Qg(t){return Xl(t)?0|t:t.l|t.m<<22}function Jg(t,e){return Tl(e)?wv(t,e):Kc(vv(t.d,e))}function tp(t){return dl(t,19)?Vf(t,19).Y():Jb(t.mb())}function ep(t){return t?new Yd((Uu(),t)):function(t){var e;return zw(e=new Ji,t),e}(null.mb())}function np(t,e){return $c(t)===$c(e)||null!=t&&sE(t,e)}function rp(t,e){return eo(),Ix(oo(Ih(t)),oo(Ih(e)))}function ip(t){return El(),Ef(t.a.bb().mb(),(qu(),WP))}function op(){op=a,lf(),YP=new sb((zp(),zp(),RW))}function ap(){ap=a,lf(),KP=new Ks((zp(),zp(),GW))}function sp(t,e){if(null==t)throw new Co((si(),e))}function cp(t,e,n,r){t.g[e.e][n.e]=r,t.g[n.e][e.e]=r}function up(t){Au(-1!=t.c),t.d.vb(t.c),t.b=t.c,t.c=-1}function lp(t){this.c=t,this.b=t.a.b.a,ql(t.a.c,this)}function hp(t){JO.call(this,new Qn(t)),this.a=new uo}function fp(){Li.call(this,new Ri(new kr)),this.a=this}function dp(){uw(),this.b=(El(),new kr),this.a=new kr}function gp(t){yp(t.a),t.b=Ny(NP,GS,1,t.b.length,4,1)}function pp(t){return!t.b&&(t.b=new Ko(t.c.W())),t.b}function vp(t,e){var n;return nL(t,e,n=new we),n.d}function bp(t,e){var n;return(n=Bg("",t)).k=e,n.g=1,n}function yp(t){var e;for(e=t.mb();e.G();)e.H(),e.I()}function wp(t,e){return dl(e,79)&&ji(t.b,Vf(e,79).mc())}function mp(t,e,n){return Tl(e)?Yv(t,e,n):YC(t.d,e,n)}function xp(t,e,n,r){this.d=t,this.b=e,this.a=n,this.c=r}function Ep(t,e,n,r){this.d=t,this.e=e,this.c=n,this.b=r}function _p(t,e,n,r){this.a=t,this.c=e,this.b=n,this.d=r}function kp(t,e,n,r){Da.call(this,t,e),this.a=n,this.b=r}function Np(t,e){return si(),t==e?0:t0?1:0}function Qp(t,e){return Vm(function(t,e){return Cf(t.l&e.l,t.m&e.m,t.h&e.h)}(Xl(t)?Jm(t):t,Xl(e)?Jm(e):e))}function Jp(t){return 0==t.b?null:(Lu(0!=t.b),Yw(t,t.a.a))}function tv(t){t.d=t.d-15,t.b=t.b-15,t.c=t.c+15,t.a=t.a+15}function ev(t){this.b=t,this.c=t,t.e=null,t.c=null,this.a=1}function nv(t,e,n){this.d=t,this.b=new Re,this.c=e,this.a=n}function rv(t,e){!function(t,e){t.a=e}(this,new ts(t.a,t.b)),function(t,e){t.b=e}(this,Yf(e))}function iv(t){gl(new Kn(Qk(t.e)))&&(function(t){var e,n,r;for(r=new zd(new ar(t.c).a);pl(r.a);)switch(r.b=Qb(r.a),e=Vf((n=new Fc(r.c,r.b)).b.b[n.a.e],62),Vf(n.a,67).e){case 0:e.d=0,e.e=-(e.b+t.d);break;case 1:e.d=(t.e.e.j.a-e.c)/2,e.e=-(e.b+t.d);break;case 2:e.d=t.e.e.j.a-e.c,e.e=-(e.b+t.d);break;case 3:e.d=0,e.e=t.e.e.j.b+t.d;break;case 4:e.d=(t.e.e.j.a-e.c)/2,e.e=t.e.e.j.b+t.d;break;case 5:e.d=t.e.e.j.a-e.c,e.e=t.e.e.j.b+t.d;break;case 6:e.d=-(e.c+t.d),e.e=0;break;case 7:e.d=-(e.c+t.d),e.e=(t.e.e.j.b-e.b)/2;break;case 8:e.d=-(e.c+t.d),e.e=t.e.e.j.b-e.b;break;case 9:e.d=t.e.e.j.a+t.d,e.e=0;break;case 10:e.d=t.e.e.j.a+t.d,e.e=(t.e.e.j.b-e.b)/2;break;case 11:e.d=t.e.e.j.a+t.d,e.e=t.e.e.j.b-e.b;break;case 12:e.d=t.q.b+t.d,e.e=t.q.d+t.d;break;case 13:e.d=(t.e.e.j.a-e.c)/2,e.e=t.q.d+t.d;break;case 14:e.d=t.e.e.j.a-t.q.c-e.c-t.d,e.e=t.q.d+t.d;break;case 15:e.d=t.q.b+t.d,e.e=(t.e.e.j.b-e.b)/2;break;case 16:e.d=(t.e.e.j.a-e.c)/2,e.e=(t.e.e.j.b-e.b)/2;break;case 17:e.d=t.e.e.j.a-t.q.c-e.c-t.d,e.e=(t.e.e.j.b-e.b)/2;break;case 18:e.d=t.q.b+t.d,e.e=t.e.e.j.b-t.q.a-e.b-t.d;break;case 19:e.d=(t.e.e.j.a-e.c)/2,e.e=t.e.e.j.b-t.q.a-e.b-t.d;break;case 20:e.d=t.e.e.j.a-t.q.c-e.c-t.d,e.e=t.e.e.j.b-t.q.a-e.b-t.d}}(t),function(t){var e,n,r,i,o;for(r=new Kn(Qk(t.e));r.a>>0).toString(16)}function wv(t,e){return null==e?Kc(vv(t.d,null)):Pc(t.e,e)}function mv(t){return 0|Math.max(Math.min(t,yS),-2147483648)}function xv(t){this.e=t,this.b=this.e.a.entries(),this.a=[]}function Ev(t){this.c=t,this.b=new Wx(new Yn(this.c.a).a)}function _v(t){this.b=(Wu(),Wu(),Wu(),zP),this.a=Vf(Pd(t),35)}function kv(t,e,n){$u(),Sf.call(this,t,e),null!=n&&(this.c=n)}function Nv(t,e,n){if(t<0||en)throw new ao(function(t,e,n){return t<0||t>n?zC(t,n,"start index"):e<0||e>n?zC(e,n,"end index"):PA("end index (%s) must not be less than start index (%s)",Tx(Mo(NP,1),GS,1,4,[qE(e),qE(t)]))}(t,e,n))}function Cv(t,e){if(null==t)throw new Co((si(),e));return t}function Tv(t){if(!t_(t))throw new _i;return t.c=t.b,t.b.H()}function Av(t){var e;return sx(e=new Oa(cx(t.length)),t),e}function Ov(t){var e;e=t.c.b.b,t.b=e,t.a=t.c.b,e.a=t.c.b.b=t}function Iv(t){this.b=null,!t&&(ec(),ec(),t=HW),this.a=t}function Lv(t){this.b=t,this.a=new Kv(this.b,this.b.c.length)}function Sv(t){return op(),Pd(t),function(t){var e;switch((e=Ag(t.c,t.c.length)).length){case 0:return YP;case 1:return new Vd(e[0]);default:return new sb(FE(e))}}(t||Hf(new Kn(null)))}function Mv(t,e){var n=t.a=t.a||[];return n[e]||(n[e]=t.Oc(e))}function Dv(t,e,n){var r;sN(e,n,t.c.length),r=n-e,xa(t.c,e,r)}function Pv(t,e,n){Ma.call(this,e.a),this.c=t,this.b=e,this.a=n}function Rv(t){return Xc(t.c),t.e=t.a=t.c,t.c=t.c.c,++t.d,t.a.f}function jv(t){return Xc(t.e),t.c=t.a=t.e,t.e=t.e.e,--t.d,t.a.f}function Gv(t){return Um(Tx(Mo(pR,1),KM,10,0,[t.f.i,t.i,t.a]))}function Fv(){Fv=a,LY=$x((Up(),Tx(Mo(jY,1),BS,193,0,[AY,OY])))}function Bv(){Bv=a,dY=$x((Tb(),Tx(Mo(mY,1),BS,175,0,[lY,hY])))}function Hv(){Hv=a,ZY=$x((lb(),Tx(Mo(QY,1),BS,192,0,[WY,XY])))}function Yv(t,e,n){return null==e?YC(t.d,null,n):s_(t.e,e,n)}function zv(t,e){return Jd(t.a,e)?Ig(t,Vf(e,17).e,null):null}function Vv(t){return Pd(t),nN((Wu(),new Du(ju(Wf(t.a,new g)))))}function Uv(t,e){var n,r;return r=rg(t,e),n=t.a.ub(r),new Va(t,n)}function Xv(t,e,n){var r;(r=new se).b=e,r.a=n,++e.b,Lf(t.d,r)}function Wv(t,e,n){t.d&&Gy(t.d.b,t),t.d=e,t.d&&Sd(t.d.b,n,t)}function qv(t,e,n){sN(e,n,t.Y()),this.c=t,this.a=e,this.b=n-e}function Zv(t,e,n,r){this.d=t,this.b=e,this.a=n,this.c=r}function $v(t,e){Li.call(this,fm(Pd(t),Pd(e))),this.b=t,this.c=e}function Kv(t,e){this.a=t,zn.call(this,t),xy(e,t.Y()),this.b=e}function Qv(t,e,n,r){$u(),kv.call(this,t,e,n),null!=r&&(this.d=r)}function Jv(t){return Lu(t.ae)throw new ao(zC(t,e,"index"));return t}function Lb(t,e,n){Pd(t),function(t){var e,n,r;for(xb(t.c,t.a),r=new Kn(t.c);r.a>22&mM,t<0?xM:0)}function hy(){hy=a,MR=$x((_E(),Tx(Mo(GR,1),BS,59,0,[IR,OR,AR,TR,LR])))}function fy(){fy=a,JG=$x((wL(),Tx(Mo(iF,1),BS,32,0,[$G,SG,LG,ZG,KG])))}function dy(){dy=a,bG=$x((I_(),Tx(Mo(kG,1),BS,100,0,[pG,gG,hG,fG,dG])))}function gy(){gy=a,KY=vd(md(md(md(wd(new i_,(qL(),SH)),FH),lH),mH),LH)}function py(t,e){var n;for(n=e.mb();n.G();)pO(t,Vf(n.H(),55),0,0)}function vy(t,e,n){var r;for(r=t.mb();r.G();)iO(Vf(r.H(),55),e,n)}function by(t,e,n){var r,i;for(r=0,i=0;ie)throw new ao("Index: "+t+", Size: "+e)}function Ey(t,e){if(t<0||t>=e)throw new ao("Index: "+t+", Size: "+e)}function _y(t,e){var n;return!!(n=tE(t,e.yb()))&&Ap(n.e,e.zb())}function ky(t,e){var n;return n=t.d,e>0?Vf(pd(n.a,e-1),9):null}function Ny(t,e,n,r,i,o){var a;return a=hN(i,r),9!=i&&Tx(Mo(t,o),e,n,i,a),a}function Cy(t){var e;if(!um(t))throw new _i;return t.d=1,e=t.c,t.c=null,e}function Ty(t,e,n,r){this.f=t,this.e=e,this.d=n,this.b=r,this.c=r?r.d:null}function Ay(t){var e;return e=Vf(pd(t.f,0),7),Vf(kx(e,(ZL(),oX)),7)}function Oy(t){var e;return e=Vf(pd(t.f,0),7),Vf(kx(e,(ZL(),oX)),7)}function Iy(){Iy=a,xW=$x((M_(),Tx(Mo(NW,1),BS,153,0,[bW,wW,yW])))}function Ly(){Ly=a,CW=$x((Fm(),Tx(Mo(OW,1),BS,172,0,[EW,_W,kW])))}function Sy(){Sy=a,CR=$x((fk(),Tx(Mo(SR,1),BS,103,0,[wR,ER,_R,kR,mR,xR])))}function My(){My=a,JR=$x((PN(),Tx(Mo(rj,1),BS,133,0,[$R,qR,KR,XR,ZR,WR])))}function Dy(){Dy=a,NG=$x((bN(),Tx(Mo(OG,1),BS,28,0,[_G,EG,xG,yG,mG,wG])))}function Py(){Py=a,xY=$x((gC(),Tx(Mo(kY,1),BS,125,0,[yY,pY,wY,bY,vY,gY])))}function Ry(){Ry=a,yR=new Sf("de.cau.cs.kieler.labels.labelManager",null)}function jy(t,e){var n;return(n=new we).c=!0,n.d=e.zb(),nL(t,e.yb(),n)}function Gy(t,e){var n;return-1!=(n=Qy(t,e,0))&&(t.vb(n),!0)}function Fy(t,e){return 9!=mw(e)&&Tx(ww(e),e._c,e.__elementTypeId$,mw(e),t),t}function By(t){return vg(t.c.a.c,t),Lu(t.b!=t.c.a.b),t.a=t.b,t.b=t.b.a,t.a}function Hy(t){Au(!!t.c),vg(t.e,t),t.c.I(),t.c=null,t.b=ix(t),ql(t.e,t)}function Yy(t,e,n){Li.call(this,fm(Pd(t),Pd(e))),this.b=t,this.c=e,this.a=n}function zy(t,e,n,r){this.b=new In(this),this.a=t,this.c=e,this.e=n,this.d=r}function Vy(t){Xx.call(this,t,0),bh(this),this.b.b=this.b,this.b.a=this.b}function Uy(t,e){Bc.call(this,t,e),this.a=Ny(KW,GS,183,2,0,1),this.b=!0}function Xy(t,e){return Tl(e)?null==e?!!vv(t.d,null):function(t,e){return!(void 0===Ca(t.a,e))}(t.e,e):!!vv(t.d,e)}function Wy(t,e){return Io(),(t-e>0?t-e:-(t-e))<=yM||t==e||isNaN(t)&&isNaN(e)}function qy(t,e){return Io(),(t-e>0?t-e:-(t-e))<=yM||t==e||isNaN(t)&&isNaN(e)}function Zy(t){var e,n;e=!0;do{n=e?o_(t):__(t),e=!e}while(n);ax(t,t.d)}function $y(t,e,n){var r;if(null==e)throw new $r;return r=Op(t,e),function(t,e,n){if(n){var r=n.gc();t.a[e]=r(n)}else delete t.a[e]}(t,e,n),r}function Ky(t,e,n){return!t.n&&(t.n=new kr),null==n?Kd(t.n,e):mp(t.n,e,n),t}function Qy(t,e,n){for(;n=t.a.c.length;)Lf(t.a,new lo);return Vf(pd(t.a,e),20)}function tw(t,e,n,r,i){var o;return qw(n,o=Bg(t,e)),o.g=i?8:0,o.f=r,o.e=i,o}function ew(t,e){var n;this.f=t,this.b=e,n=Vf(Jg(t.b,e),126),this.c=n?n.b:null}function nw(t,e){var n,r;for(n=0,r=e.length;n0&&(r+=function(t){var e,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,_;for(i=0,y=0,El(),b=new kr,r=new kr,function(t,e,n){var r,i,o,a,s,c,u,l,h,f,d;for(r=0,i=0,l=0;l0&&mp(e,o,qE(r+=o.b.c.length+o.e.c.length));else{for(s=wC(c,(wL(),LG)).mb();s.G();)r+=(o=Vf(s.H(),7)).b.c.length+o.e.c.length;for(a=wC(c,LG).mb();a.G();)(o=Vf(a.H(),7)).b.c.length+o.e.c.length>0&&mp(e,o,qE(r))}for(u=t.length-1;u>=0;u--)if(Ul(Vf(kx(c=t[u],(JL(),Hj)),28)))for(f=wC(c,(wL(),KG)).mb();f.G();)(h=Vf(f.H(),7)).b.c.length+h.e.c.length>0&&mp(n,h,qE(i+=h.b.c.length+h.e.c.length));else{for(d=wC(c,(wL(),KG)).mb();d.G();)i+=(h=Vf(d.H(),7)).b.c.length+h.e.c.length;for(f=wC(c,KG).mb();f.G();)(h=Vf(f.H(),7)).b.c.length+h.e.c.length>0&&mp(n,h,qE(i))}}(t,o=new kr,_=new kr),e=null,v=0,E=0,w=!0,c=!0,f=0,g=t.length;fu.k&&(++e,d=!0),g&&u&&g.k>u.k&&(++e,p=!0),f&&s&&f.ks.k&&(++e,c=!0),f&&s&&f.ku.k&&(++e,l=!0),c&&l&&s==u&&--e)}}return e}(e)),r}function ow(t,e){var n;return(n=Vf(Kd(t.c,e),176))?(Nd(n),n.e):null}function aw(t){return nE(t,yS)>0?yS:nE(t,kS)<0?kS:Qg(t)}function sw(t){sf.call(this,(si(),null==t?gS:Vk(t)),dl(t,46)?Vf(t,46):null)}function cw(t){xu(this),Gd(t>=0,"Initial capacity must not be negative")}function uw(){uw=a,oB=xd(md(md(new i_,(qL(),MH)),xH),AH),aB=wd(new i_,NH)}function lw(){lw=a,VB=new V,YB=new U,zB=new X,HB=new W,UB=new q,XB=new Z}function hw(){hw=a,WW=new Gc("All",0),qW=new el,ZW=new wl,$W=new nl}function fw(){fw=a,RY=new Gs(ZD,0),PY=new Gs("LONGEST_PATH",1),DY=new Gs(UD,2)}function dw(){dw=a,uR=Cf(mM,mM,524287),lR=Cf(0,0,524288),ly(1),ly(2),hR=ly(0)}function gw(){gw=a,cY=$x((nA(),Tx(Mo(fY,1),BS,109,0,[oY,tY,rY,eY,nY,JH,iY,aY])))}function pw(){pw=a,vz=$x((Uk(),Tx(Mo(mz,1),BS,141,0,[gz,hz,fz,lz,dz])))}function vw(){vw=a,VV=$x((wN(),Tx(Mo(KV,1),BS,115,0,[FV,GV,HV,BV,YV])))}function bw(){bw=a,DX=$x((Xk(),Tx(Mo(GX,1),BS,85,0,[SX,AX,OX,IX,LX])))}function yw(t){tC(),function(t,e,n){t.a=1502^e,t.b=n^wP}(this,Qg(Qp(Vm(function(t,e){var n,r,i,o;return(r=!!(524288&(n=t.h)))&&(n|=-1048576),o=r?xM:0,i=n>>2,Cf((t.m>>2|n<<20)&mM,i&mM,o&xM)}(Xl(t)?Jm(t):t)),xP)),Qg(Qp(t,xP)))}function ww(t){return Tl(t)?AP:Cl(t)?LW:vh(t)?IW:$d(t)||Td(t)?t.$c:t.$c||rR}function mw(t){return null==t.__elementTypeCategory$?9:t.__elementTypeCategory$}function xw(t){var e,n;for(oc(),n=OM,e=0;en&&(n=t[e]);return n}function Ew(t,e){var n;return(n=Vf(Jg(t.b,e),106))||(n=e.rc(),mp(t.b,e,n)),n}function _w(t,e){var n;return(n=Vf(Jg(t.c,e),176))?(Hl(t,n),n.e):null}function kw(t,e,n,r){var i;(i=Vf(_w(t.e,e),116)).b+=n,i.a+=r,Sk(t.e,e,i),t.d=!0}function Nw(t){var e;for(++t.a,e=t.c.a.length;t.a"+t.d.f+"("+t.d+")":"e_"+fh(t)}function Pw(){Pw=a,lG=$x((yT(),Tx(Mo(vG,1),BS,41,0,[eG,tG,rG,cG,sG,aG,iG,oG,nG])))}function Rw(){Rw=a,AG=new bs("OUTSIDE",0),TG=new bs("INSIDE",1),CG=new bs("FIXED",2)}function jw(){jw=a,xU=new Ec(FM,0),EU=new Ec("TOP",1),mU=new Ec("BOTTOM",2)}function Gw(){Gw=a,Nz=new fc("CLASSIC",0),Cz=new fc("IMPROVE_STRAIGHTNESS",1)}function Fw(){this.e=new uo,this.a=new Hp,this.d=new uo,this.b=new Re,this.c=new Re}function Bw(t,e,n){this.b=e,this.a=t,this.c=n,Lf(this.a.e,this),Lf(this.b.b,this)}function Hw(t,e){t.d=zo(t.d,e.d),t.c=Bo(t.c,e.c),t.a=Bo(t.a,e.a),t.b=zo(t.b,e.b)}function Yw(t,e){var n;return n=e.c,e.a.b=e.b,e.b.a=e.a,e.a=e.b=null,e.c=null,--t.b,n}function zw(t,e){var n;for(Wu(),Pd(t),Pd(e),n=!1;e.G();)n|=t.ib(e.H());return n}function Vw(t){var e;return vg(t.e,t),Lu(t.b),t.c=t.a,e=Vf(t.a.H(),21),t.b=ix(t),e}function Uw(t){return kM=0x8000000000000000?(dw(),uR):(r=!1,t<0&&(r=!0,t=-t),n=0,t>=_M&&(t-=(n=mv(t/_M))*_M),e=0,t>=EM&&(t-=(e=mv(t/EM))*EM),i=Cf(mv(t),e,n),r&&(o=1+~i.l&mM,a=~i.m+(0==o?1:0)&mM,s=~i.h+(0==o&&0==a?1:0)&xM,i.l=o,i.m=a,i.h=s),i)}(t))}function Xw(t){if(t){if(t.V())throw new _i;return t.sb(t.Y()-1)}return function(t){var e;for(Wu();;)if(e=t.H(),!t.G())return e}(null.mb())}function Ww(t,e){var n;return e<(n=t.d).a.c.length-1?Vf(pd(n.a,e+1),9):null}function qw(t,e){if(t){e.k=t;var n=function(t){if(t.Tc())return null;var e=t.k;return nS[e]}(e);n?n.$c=e:nS[t]=[e]}}function Zw(t,e){var n,r;r=!1;do{r|=n=t.i?xx(t,e):mx(t,e)}while(n);return r}function $w(t,e,n){var r,i;r=e;do{i=oo(t.n[r.k])+n,t.n[r.k]=i,r=t.a[r.k]}while(r!=e)}function Kw(t,e){return Cv(t,"set1"),Cv(e,"set2"),ic(),new gf(t,new La(e),e)}function Qw(t){var e=/function(?:\s+([\w$]+))?\s*\(/.exec(t);return e&&e[1]||pS}function Jw(){Jw=a,MV=$x((DN(),Tx(Mo(jV,1),BS,123,0,[LV,IV,OV,TV,CV,AV])))}function tm(){tm=a,QV=$x((MN(),Tx(Mo(uU,1),BS,124,0,[qV,WV,$V,XV,ZV,UV])))}function em(){em=a,MW=Tx(Mo(iq,1),vM,26,12,[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15])}function nm(){nm=a,jX=new Nc(GM,0),PX=new Nc("INPUT",1),RX=new Nc("OUTPUT",2)}function rm(t){this.c=t,this.b=new Wx(new Yn(t.b).a),this.a=null,this.d=(Wu(),Wu(),VP)}function im(t){this.e=t,this.d=new Oa(cx(ig(this.e).Y())),this.c=this.e.a,this.b=this.e.c}function om(t,e,n){this.c=t,Gb.call(this),this.b=e,this.j=new Ep(e.d,e.e,e.c,e.b),this.a=n}function am(t,e){t.j>0&&t.c0&&0!=t.e&&am(t.g,e/t.j*t.g.d))}function sm(t){return t.b.d.f.g==(RN(),PB)?Vf(kx(t.b.d.f,(ZL(),oX)),7):t.b.d}function cm(t){return t.b.c.f.g==(RN(),PB)?Vf(kx(t.b.c.f,(ZL(),oX)),7):t.b.c}function um(t){switch(Uc(3!=t.d),t.d){case 2:return!1;case 0:return!0}return function(t){return t.d=3,t.c=function(t){for(var e;t.b.G();)if(e=t.b.H(),t.a.D(e))return e;return t.d=2,null}(t),2!=t.d&&(t.d=0,!0)}(t)}function lm(t){switch(t.e){case 2:return wL(),KG;case 4:return wL(),LG;default:return t}}function hm(t){switch(t.e){case 1:return wL(),ZG;case 3:return wL(),SG;default:return t}}function fm(t,e){var n;return zp(),n=new Ws(1),Tl(t)?Yv(n,t,e):YC(n.d,t,e),new rr(n)}function dm(t,e){return t.g?(t.g=dm(t.g,e),--t.a,t.j=EE(t.j,e.c),ZN(t)):t.e}function gm(t,e){return t.e?(t.e=gm(t.e,e),--t.a,t.j=EE(t.j,e.c),ZN(t)):t.g}function pm(t,e){var n,r,i;for(Bd(e),n=!1,i=e.mb();i.G();)r=i.H(),n|=t.ib(r);return n}function vm(t){var e,n;for(n=new Br,e=t.b.mb();e.G();)If(n,Vf(e.H(),92).a);return n}function bm(t){var e,n,r;for(e=0,r=t.mb();r.G();)e+=(Bd(n=Ih(r.H())),n);return e/t.Y()}function ym(t,e){var n;return(n=Vf(Jg(t.c,e),200))||((n=new Jr).c=e,mp(t.c,n.c,n)),n}function wm(t,e){var n;return Bd(e),n=e.e,!t.b[n]&&(Yg(t.b,n,e),++t.c,!0)}function mm(t,e){var n,r;return n=1-e,r=t.a[n],t.a[n]=r.a[e],r.a[e]=t,t.b=!0,r.b=!1,r}function xm(t,e){var n;return!!dl(e,10)&&(n=Vf(e,10),t.a==n.a&&t.b==n.b)}function Em(t,e,n){return t.g=new Tm(e,n),Nh(t,t.g,t.i),t.d=Yo(2,t.d),++t.a,t.j=mE(t.j,n),t}function _m(t,e,n){return t.e=new Tm(e,n),Nh(t.f,t.e,t),t.d=Yo(2,t.d),++t.a,t.j=mE(t.j,n),t}function km(t,e){var n=t.a,r=0;for(var i in n)n.hasOwnProperty(i)&&(e[r++]=i);return e}function Nm(t,e){var n,r;for(Bd(e),r=e.bb().mb();r.G();)n=Vf(r.H(),21),t.db(n.yb(),n.zb())}function Cm(t,e,n){this.g=t,this.d=e,this.e=n,this.a=new Re,function(t){var e,n,r,i;for(i=bA(new zh(t.d,t.e));i.G();)for(r=Vf(i.H(),7),n=new Kn(t.e==(wL(),KG)?r.b:r.e);n.a0),this.b=t,this.c=e,this.j=e,this.a=1,this.d=1,this.e=null,this.g=null}function Am(t){return 1.4901161193847656e-8*LT(t,26)+11102230246251565e-32*LT(t,27)}function Om(t){return dl(t,87)?rb(Vf(t,87)):dl(t,88)?Vf(t,88).a:dl(t,63)?new Pi(t):new Ka(t)}function Im(t){var e;return e=Vf(kx(t,(ZL(),XU)),32),t.g==(RN(),PB)&&(e==(wL(),KG)||e==LG)}function Lm(t,e){return!!function(t,e){var n,r,i;for(n=Vf(kx(e,(ZL(),VU)),18),i=Vf(qN(OB,n),18).mb();i.G();)if(r=Vf(i.H(),18),!Vf(qN(t.a,r),20).V())return!1;return!0}(t,e)&&(dT(t.a,Vf(kx(e,(ZL(),VU)),18),e),!0)}function Sm(t,e){var n;if(e)for(n=0;n<6;n++)Vf(pd(t.a,n),18).jb(Vf(pd(e.a,n),19));return t}function Mm(t,e){var n;return t.b?null:(n=function(t,e){return new Ch(t>0?t-1:t,e)}(t.e,t.f),If(t.a,n),n.g=t,t.d=e,n)}function Dm(t,e){var n,r;for(r=Ok(t,0);r.b!=r.d.c;)(n=Vf(Ob(r),10)).a+=e.a,n.b+=e.b;return t}function Pm(t,e){var n,r;for(n=0;n0?t.g?Ym(t.g,e,n):0:t.c}function zm(t,e){var n,r;return!!t.c&&(r=t.g,(n=t.a.$b(e,r))>0|0==n&t.f==(Xu(),FP))}function Vm(t){var e;return 0==(e=t.h)?t.l+t.m*EM:e==xM?t.l+t.m*EM-_M:t}function Um(t){var e,n,r,i;for(e=new uo,r=0,i=t.length;r=i;o--)t[o+1]=t[o];t[i]=r}function Km(t,e,n,r){var i,o;for(i=function(t,e,n,r){var i,o,a,s;for(o=e,i=n-1;o<=i;)if((s=t[a=o+i>>>1])r))return a;i=a-1}return-(o+1)}(t,e,n,r),i<0&&(i=-i-1),o=n-1;o>=i;o--)t[o+1]=t[o];t[i]=r}function Qm(t,e){var n,r;for(Bd(e),r=e.mb();r.G();)if(n=r.H(),!t.kb(n))return!1;return!0}function Jm(t){var e,n,r;return n=0,(r=t)<0&&(r+=_M,n=xM),e=mv(r/EM),Cf(mv(r-e*EM),e,n)}function tx(t,e){return t.c.c=Ny(NP,GS,1,0,4,1),vC(t,t.e,e),vC(t,t.a,e),zp(),xb(t.c,null),function(t){var e,n,r;for(e=0,r=new Kn(t.c);r.a0;r--)n|=U_(t,e,r-1,r);return n}function xx(t,e){var n,r,i;for(n=!1,r=t.d[e].length,i=0;ie?1:t==e?0:isNaN(t)?isNaN(e)?0:1:-1}function Lx(t){switch(t.Y()){case 0:return YP;case 1:return new Vd(t.mb().H());default:return new sb(t)}}function Sx(){var t,e;Sx=a,e=!(Error.stackTraceLimit||"stack"in new Error),t=new me,oS=e?new u:t}function Mx(){Mx=a,UF=new Sf("intCoordinates",(Ud(),Ud(),TW)),XF=new fd("jsonObject"),WF=new ts(0,0)}function Dx(){Dx=a,$B=new Ss("MIRROR_X",0),KB=new Ss("TRANSPOSE",1),ZB=new Ss("MIRROR_AND_TRANSPOSE",2)}function Px(){Px=a,PV=new yc(FM,0),DV=new yc("INCOMING_ONLY",1),RV=new yc("OUTGOING_ONLY",2)}function Rx(){return CL(),Tx(Mo(NV,1),BS,60,0,[Zz,Xz,Uz,Qz,Kz,vV,pV,$z,Wz,qz,Jz,dV,gV])}function jx(){var t,e,n,r;for(jx=a,uY=new N_(NV),n=0,r=(e=Rx()).length;n0)return Uf(e-1,t.a.c.length),yy(t.a,e-1);throw new Ei}function Ux(t){t.b.c.length-t.e.c.length<0?(Bh(t,(wL(),LG)),t.a.a=t.j.a):(Bh(t,(wL(),KG)),t.a.a=0)}function Xx(t,e){Gd(t>=0,"Negative initial capacity"),Gd(e>=0,"Non-positive load factor"),wy(this)}function Wx(t){var e;this.e=t,this.d=new ty(this.e.e),this.a=this.d,this.b=ix(this),e=t[gP],this[gP]=e}function qx(){this.n=null,this.j=null,this.i=null,this.d=null,this.b=null,this.k=null,this.a=null}function Zx(t){var e,n,r,i;for(i=1,n=0,r=t.length;n=48&&t<58?t-48:t>=97&&t<97?t-97+10:t>=65&&t<65?t-65+10:-1}function wE(t){switch(lf(),t.Y()){case 0:return ap(),KP;case 1:return new la(t.mb().H());default:return new Ks(t)}}function mE(t,e){var n;return Xl(t)&&Xl(e)&&kM<(n=t+e)&&n<_M?n:Vm(function(t,e){var n,r,i;return n=t.l+e.l,r=t.m+e.m+(n>>22),i=t.h+e.h+(r>>22),Cf(n&mM,r&mM,i&xM)}(Xl(t)?Jm(t):t,Xl(e)?Jm(e):e))}function xE(t,e){var n;return Xl(t)&&Xl(e)&&kM<(n=t*e)&&n<_M?n:Vm(function(t,e){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w;return n=8191&t.l,r=t.l>>13|(15&t.m)<<9,i=t.m>>4&8191,o=t.m>>17|(255&t.h)<<5,a=(1048320&t.h)>>8,v=r*(s=8191&e.l),b=i*s,y=o*s,w=a*s,0!=(c=e.l>>13|(15&e.m)<<9)&&(v+=n*c,b+=r*c,y+=i*c,w+=o*c),0!=(u=e.m>>4&8191)&&(b+=n*u,y+=r*u,w+=i*u),0!=(l=e.m>>17|(255&e.h)<<5)&&(y+=n*l,w+=r*l),0!=(h=(1048320&e.h)>>8)&&(w+=n*h),d=((p=n*s)>>22)+(v>>9)+((262143&b)<<4)+((31&y)<<17),g=(b>>18)+(y>>5)+((4095&w)<<8),g+=(d+=(f=(p&mM)+((511&v)<<13))>>22)>>22,Cf(f&=mM,d&=mM,g&=xM)}(Xl(t)?Jm(t):t,Xl(e)?Jm(e):e))}function EE(t,e){var n;return Xl(t)&&Xl(e)&&kM<(n=t-e)&&n<_M?n:Vm(function(t,e){var n,r,i;return n=t.l-e.l,r=t.m-e.m+(n>>22),i=t.h-e.h+(r>>22),Cf(n&mM,r&mM,i&xM)}(Xl(t)?Jm(t):t,Xl(e)?Jm(e):e))}function _E(){_E=a,IR=new us(GM,0),OR=new us(PM,1),AR=new us(DM,2),TR=new us("DOWN",3),LR=new us("UP",4)}function kE(){kE=a,zR=new hs(GM,0),HR=new hs("POLYLINE",1),BR=new hs("ORTHOGONAL",2),YR=new hs("SPLINES",3)}function NE(){NE=a,ej=new ds("INHERIT",0),tj=new ds("INCLUDE_CHILDREN",1),nj=new ds("SEPARATE_CHILDREN",2)}function CE(){CE=a,FY=wd(bd(new i_,(qL(),cH)),TH),BY=vd(wd(yd(new i_,nH),tH),eH),HY=vd(md(new i_,rH),eH)}function TE(){TE=a,YY=wd(bd(new i_,(qL(),cH)),TH),zY=vd(wd(yd(new i_,nH),tH),eH),VY=vd(md(new i_,rH),eH)}function AE(t){this.a=new Su,this.d=new Su,this.b=new Su,this.c=new Su,this.g=new Su,this.i=new Su,this.f=t}function OE(t,e,n,r,i,o){this.e=new Re,this.f=(nm(),jX),Lf(this.e,t),this.d=e,this.a=n,this.b=r,this.f=i,this.c=o}function IE(t,e,n,r,i){var o,a;for(a=t.mb();a.G();)(o=Vf(a.H(),33)).i.a=e.a,o.i.b=i?e.b:e.b+r.b-o.j.b,e.a+=o.j.a+n}function LE(t,e){var n,r;for(Gf(),r=Sg(GN(t));t_(r);)if((n=Vf(Tv(r),12)).d.f==e||n.c.f==e)return n;return null}function SE(t,e,n){var r,i,o;for(r=0,o=Ok(t,0);o.b!=o.d.c&&!((i=oo(Ih(Ob(o))))>n);)i>=e&&++r;return r}function ME(t,e){var n;return e?((n=e.n?e.n:(zp(),zp(),jW)).V()||(t.n?Nm(t.n,n):t.n=new lu(n)),t):t}function DE(t,e,n){try{!function(t,e,n){if(Pd(e),n.G())for(nu(e,t.C(n.H()));n.G();)nu(e,t.c),nu(e,t.C(n.H()))}(t,e,n)}catch(t){throw dl(t=rE(t),181)?new sw(t):PE(t)}return e}function PE(t){var e;return dl(t,164)&&$c((e=Vf(t,164)).b)!==$c((ai(),iS))?$c(e.b)===$c(iS)?null:e.b:t}function RE(t,e){var n;for(n=Vf(kx(Kg(t),(ZL(),lX)),9);n;){if(n==e)return!0;n=Vf(kx(Kg(n),lX),9)}return!1}function jE(t){switch(Vf(kx(t,(ZL(),KU)),140).e){case 1:Ky(t,KU,(jw(),mU));break;case 2:Ky(t,KU,(jw(),EU))}}function GE(t){switch(lf(),t.c){case 0:return ap(),KP;case 1:return new la(DC(new Xs(t)));default:return new Si(t)}}function FE(t){var e,n;for(op(),e=0,n=t.length;e-129&&t<128?(e=t+128,!(n=(Xd(),SW)[e])&&(n=SW[e]=new Mn(t)),n):new Mn(t)}function ZE(t){var e,n;for(e=TN(t.b,t.d),n=yS;n>e;){if(ax(t,t.d),0==e){n=0;break}o_(t),__(t),n=e,e=TN(t.b,t.d)}t.c=n}function $E(){var t,e,n;tC(),n=XW+++(Date.now?Date.now():(new Date).getTime()),t=mv(Math.floor(n*KD))&xP,e=mv(n-t*mP),this.a=1502^t,this.b=e^wP}function KE(t){return Tl(t)?dk(t):Cl(t)?mv((Bd(t),t)):vh(t)?io((Bd(t),t))?1231:1237:$d(t)?t.v():(Td(t),fh(t))}function QE(t,e,n,r){var i,o,a;for(a=0,o=bA(new zh(e,r));o.G();)i=Vf(o.H(),7),mp(t.i,i,qE(a++));mp(n,e,qE(a))}function JE(t){var e;return(e=Vf(kx(t,(JL(),gj)),59))==(_E(),IR)?Vf(kx(t,(ZL(),AU)),15).a>=1?OR:TR:e}function t_(t){if(Pd(t.b),t.b.G())return!0;for(;t.a.G();)if(Pd(t.b=t.Wb(t.a.H())),t.b.G())return!0;return!1}function e_(t){return t.d==t.c.d&&t.i==t.g.d||(t.a.c=Ny(NP,GS,1,0,4,1),ox(t.a,t.c),ox(t.a,t.g),t.d=t.c.d,t.i=t.g.d),t.a}function n_(t){var e;if(t.b){if(n_(t.b),t.b.d!=t.c)throw new xi}else t.d.V()&&(e=Vf(Jg(t.f.b,t.e),19))&&(t.d=e)}function r_(t,e,n,r,i){var o,a,s,c;for(function(t,e,n,r,i){r?function(t,e){var n,r;for(r=new Kn(e);r.a1&&(xb(e,t.b),function(t,e){var n,r,i,o,a,s,c,u,l;for(i=new Re,c=new Kn(e);c.ae){tb(n);break}}Cg(n,e)}function s_(t,e,n){var r;return r=Ca(t.a,e),function(t,e,n){t.set(e,n)}(t.a,e,void 0===n?null:n),void 0===r?(++t.c,tf(t.b)):++t.d,r}function c_(t,e,n){return(e-t<=0?0-(e-t):e-t)BD?t-n>BD:n-t>BD)}function u_(t){switch(t.e){case 0:return GV;case 1:return FV;case 2:return BV;case 3:return HV;default:return YV}}function l_(t,e){switch(e.e){case 2:return t.b;case 1:return t.c;case 4:return t.d;case 3:return t.a;default:return!1}}function h_(t){switch(wL(),t.e){case 4:return SG;case 1:return LG;case 3:return ZG;case 2:return KG;default:return $G}}function f_(t,e){if(e==t.c)return t.d;if(e==t.d)return t.c;throw new so("Node "+e+" not part of edge "+t)}function d_(t,e){var n;return Wl(t.a,e)?Vf(Wl(t.a,e)?t.b[e.e]:null,62):(n=new Hr,wm(t.a,e),Ig(t,e.e,n),n)}function g_(t,e){var n,r,i;for(i=t.g.tb(),n=0;i.G();){if((r=oo(Ih(i.H()))-e)>uP)return n;r>lP&&++n}return n}function p_(t){var e,n,r,i;return wm(n=new $f(e=Vf(ia((i=(r=t.$c).f)==RP?r:i),11),Vf(Og(e,e.length),11),0),t),n}function v_(t,e){var n,r;for(r=new Kn(e);r.a %s",Tx(Mo(NP,1),GS,1,4,[qE(e),qE(n)])),sN(e,n=n<(r=t.length)?n:r,r),n-e}function E_(t,e){var n,r,i;for(n=t,i=0;;){if(n==e)return i;if(!(r=Vf(kx(n,(ZL(),lX)),9)))throw new Xr;n=Kg(r),++i}}function __(t){var e,n,r;for(r=!1,n=t.d.length-1;n>=0;n--)t.j=(e=new pC(t.e,t.d,n,1),new FN(n,t.d,e)),r|=Zw(t,n);return r}function k_(t){this.f=(El(),new kr),this.n=new kr,this.k=new kr,this.g=new Ji,this.i=new lk((ui(),ZP)),this.j=t,function(t,e){var n,r,i,o,a;for(n=0,a=0,i=0,o=e.length;i0?t-e:-(t-e))<=yM||t==e||isNaN(t)&&isNaN(e)?0:te?1:yu(isNaN(t),isNaN(e)))>0}function P_(t,e){return Io(),Io(),((t-e>0?t-e:-(t-e))<=yM||t==e||isNaN(t)&&isNaN(e)?0:te?1:yu(isNaN(t),isNaN(e)))<0}function R_(t){var e,n;for(t.d||function(t){var e,n,r,i,o,a;if(i=t.g.tb(),r=t.b.tb(),t.e)for(n=0;nuP;){for(o=e,a=0;(e-o<=0?0-(e-o):e-o)oE(t.a,r,i)+t.c.b+t.d.b)}(t.j,n,r)&&(function(t,e,n){!function(t,e,n){ZT(t,e,n,(wL(),LG),t.f),ZT(t,e,n,KG,t.n)}(t.c,e,n)}(t.j,t.d[e][n],t.d[e][r]),a=(o=t.d[e])[r],o[r]=o[n],o[n]=a,i=!0),i}function X_(t,e,n){var r,i,o,a,s;i=(s=Kg(t)).a,r=Vf(kx(s,(ZL(),DU)),15).a,o=s.d,a=t.i,e&&(a.a=a.a-i.b-r-o.a),n&&(a.b=a.b-i.d-r-o.b)}function W_(t,e){var n,r,i;for(r=Sg(GN(t));t_(r);)return n=Vf(Tv(r),12),new Be(Pd((i=Vf(e.B(n),9)).i.b+i.j.b/2));return ci(),ci(),kP}function q_(t){var e,n,r,i;for(n=vI(t),e=jD,i=0,r=0;e>.5&&i<50;)e=Ta(WN(n,r=fA(n),!0).b),++i;return WN(t,r,!1)}function Z_(t){var e,n,r,i;for(n=vI(t),e=jD,i=0,r=0;e>.5&&i<50;)e=Ta(WN(n,r=hA(n),!0).a),++i;return WN(t,r,!1)}function $_(t){var e,n,r;for(this.a=new Su,this.e=new Ji,this.f=0,n=0,r=t.length;n0),e.a.sb(e.c=--e.b))}function ik(t,e,n){H_(n,"Compound graph preprocessor",1),t.a=new Zs,oI(t,e,null),function(t,e){var n,r,i,o,a,s,c;for(a=ig(t.a).mb();a.G();){if((o=Vf(a.H(),12)).b.c.length>0)for(xb(r=new df(Vf(qN(t.a,o),18)),new cn(e)),i=new Kv(o.b,0);i.b=t.b>>1)for(r=t.c,n=t.b;n>e;--n)r=r.b;else for(r=t.a.a,n=0;n0&&(i.b+=e),i}function Lk(t,e){var n,r,i;for(i=new uo,r=t.mb();r.G();)iO(n=Vf(r.H(),55),0,i.b),i.b+=n.e.b+e,i.a=Bo(i.a,n.e.a);return i.a>0&&(i.a+=e),i}function Sk(t,e,n){var r,i,o;return(i=Vf(Jg(t.c,e),176))?(o=bf(i,n),Hl(t,i),o):(r=new sd(t,e,n),mp(t.c,e,r),Ov(r),null)}function Mk(t){switch(t.e){case 8:return wL(),SG;case 9:return wL(),ZG;case 10:return wL(),LG;case 11:return wL(),KG;default:return wL(),$G}}function Dk(t,e){return Tl(t)?!!cS[e]:t._c?!!t._c[e]:Cl(t)?!!sS[e]:!!vh(t)&&!!aS[e]}function Pk(){Mx(),this.i=(El(),new kr),this.a=new kr,this.k=new kr,this.j=new kr,this.b=new kr,this.n=new kr,this.f=new kr,this.e=new kr}function Rk(t,e){var n,r;e.a.R(t)||(r=Vf(kx(t,(ZL(),XU)),32),n=Vf(pd(t.f,0),7),r==(wL(),SG)?Bh(n,ZG):r==ZG&&Bh(n,SG),e.a.db(t,e))}function jk(t){return Yo(1,Vf(kx(t,(ZL(),pX)),24).a)*(t.c.f.g==(RN(),GB)&&t.d.f.g==GB?1:t.c.f.g==GB||t.d.f.g==GB?2:8)}function Gk(t){var e,n,r,i;for(i=Vf(kx(t,(ZL(),oX)),7),n=0,r=(e=Vf(Yk(t.b,Ny(SB,CD,12,t.b.c.length,0,1)),47)).length;nr&&Yg(e,r,null),e}function zk(t,e){var n,r;for(r=t.a.length,e.lengthr&&Yg(e,r,null),e}function Vk(t){return Tl(t)?t:Cl(t)?Aa((Bd(t),t)):vh(t)?yl(io((Bd(t),t))):$d(t)?t.w():Td(t)?yv(t):t.toString?t.toString():"[JavaScriptObject]"}function Uk(){Uk=a,gz=new cc("SIMPLE",0),hz=new cc(UD,1),fz=new cc("LINEAR_SEGMENTS",2),lz=new cc("BRANDES_KOEPF",3),dz=new cc(ZD,4)}function Xk(){Xk=a,SX=new kc(FM,0),AX=new kc("FIRST",1),OX=new kc("FIRST_SEPARATE",2),IX=new kc("LAST",3),LX=new kc("LAST_SEPARATE",4)}function Wk(){Wk=a,Hz=new le,Fz=wd(new i_,(qL(),wH)),Bz=vd(wd(new i_,RH),PH),jz=vd(md(wd(yd(new i_,EH),kH),CH),_H),Gz=vd(md(new i_,CH),uH)}function qk(t){var e,n,r;for(n=new Un(new Vn(t.d.a).a.bb().mb());n.a.G();)r=Vf(n.a.H(),21),Lf((e=Vf(r.yb(),12)).c.e,e),Lf(e.d.b,e)}function Zk(t,e){var n,r;if(Ou(e>0),(e&-e)==e)return mv(e*LT(t,31)*4.656612873077393e-10);do{r=(n=LT(t,31))%e}while(n-r+(e-1)<0);return mv(r)}function $k(t,e){if(t.c.f==e)return t.d.f;if(t.d.f==e)return t.c.f;throw new so("Node "+e+" is neither source nor target of edge "+t)}function Kk(t,e,n){return Ou(t>=0&&t<=1114111),t>=mS?(e[n++]=55296+(t-mS>>10&1023)&xS,e[n]=56320+(t-mS&1023)&xS,2):(e[n]=t&xS,1)}function Qk(t){var e,n;if(!t.a)for(t.a=Il(Vf(t.e,9).c.c.length),n=new Kn(Vf(t.e,9).c);n.ai&&Yg(e,i,null),e}function oN(t,e,n){if(n&&(e<0||e>n.a.c.length))throw new so("index must be >= 0 and <= layer node count");t.d&&Gy(t.d.a,t),t.d=n,n&&Sd(n.a,e,t)}function aN(t,e,n,r,i,o,a,s){var c,u;r&&((c=r.a[0])&&aN(t,e,n,c,i,o,a,s),function(t,e,n,r,i,o,a){var s,c;return!(e.Xc()&&(c=t.a.$b(n,r),c<0||!i&&0==c))&&!(e.Yc()&&(s=t.a.$b(n,o),s>0||!a&&0==s))}(t,n,r.d,i,o,a,s)&&e.ib(r),(u=r.a[1])&&aN(t,e,n,u,i,o,a,s))}function sN(t,e,n){if(t<0)throw new ao(OS+t+" < 0");if(e>n)throw new ao("toIndex: "+e+" > size "+n);if(t>e)throw new so(OS+t+" > toIndex: "+e)}function cN(t,e){var n,r,i;return n=e.yb(),i=e.zb(),r=t.cb(n),!(!($c(i)===$c(r)||null!=i&&sE(i,r))||null==r&&!t.R(n))}function uN(t,e,n){var r;(r=e.c.f).g==(RN(),jB)?(Ky(t,(ZL(),eX),Vf(kx(r,eX),7)),Ky(t,nX,Vf(kx(r,nX),7))):(Ky(t,(ZL(),eX),e.c),Ky(t,nX,n.d))}function lN(t,e,n){var r,i,o,a;for(function(t){var e,n;for(null==t.g&&(t.g=Ed(t)),e=0,n=t.g.length;er&&t.charCodeAt(e-1)<=32;)--e;return r>0||e>19)!=(s=e.h>>19)?s-a:(r=t.h)!=(o=e.h)?r-o:(n=t.m)!=(i=e.m)?n-i:t.l-e.l}function xN(t){var e,n,r;for(n=new Un(new Vn(t.p.a).a.bb().mb());n.a.G();)if(r=Vf(n.a.H(),21),(e=Vf(r.yb(),89)).e&&t.b[e.b]<0)return e;return null}function EN(t,e){var n,r,i,o,a;r=zo(t.d,e.d),o=zo(t.e,e.e),(i=Bo(t.d+t.c,e.d+e.c))=e.length)throw new ao("Greedy SwitchDecider: Free layer layer not in graph.");this.b=e[t],this.c=new qh(this.b),this.d=new Xm(this.b)}function BN(t,e){var n;if(this.f=t,this.b=this.f.c,Ib(e,n=t.d),e>=(n/2|0))for(this.e=t.e,this.d=n;e++0;)ib(this);this.a=null}function HN(t){var e,n,r;for(n=new Kn(t.a.b);n.a0&&(t.g=oC(t.g)),iC(t);case 2:return wu(t.e)<0&&(t.e=iC(t.e)),oC(t);default:return t.d=1+Yo(Fi(t.e),Fi(t.g)),t}}function $N(t,e){this.f=(El(),new kr),this.b=new kr,this.j=new kr,this.a=t,this.c=e,this.c>0&&rT(this,this.c-1,(wL(),LG)),this.c0&&hT(t,e,n),0):(Vc(0==n),0)}function JN(t,e){var n,r,i,o,a;for(i=Vf(kx(e,(ZL(),mX)),15).a*Vf(kx(e,($L(),ZX)),15).a,a=t[0].i.a+t[0].j.a,o=1;o=0;e--)UW[e]=r,r*=.5;for(n=1,t=24;t>=0;t--)VW[t]=n,n*=.5}function eC(t){for(;0!=t.g.c&&0!=t.d.c;)zl(t.g).c>zl(t.d).c?(t.i+=t.g.c,z_(t.d)):zl(t.d).c>zl(t.g).c?(t.e+=t.d.c,z_(t.g)):(t.i+=id(t.g),t.e+=id(t.d),z_(t.g),z_(t.d))}function nC(t){var e,n,r,i;for(i=new Zo("["),e=!1,r=t.mb();r.G();)n=r.H(),e?i.a+=", ":e=!0,iu(i,n===t?"(this Collection)":(si(),null==n?gS:Vk(n)));return i.a+="]",i.a}function rC(t){var e,n,r,i;for(i=new Zo("{"),e=!1,r=t.bb().mb();r.G();)n=Vf(r.H(),21),e?i.a+=", ":e=!0,iu(i,vb(t,n.yb())),i.a+="=",iu(i,vb(t,n.zb()));return i.a+="}",i.a}function iC(t){var e;return Uc(!!t.g),e=t.g,t.g=e.e,e.e=t,e.j=t.j,e.a=t.a,t.a=1+Gi(t.e)+Gi(t.g),t.j=mE(mE(t.c,Bi(t.e)),Bi(t.g)),t.d=1+Yo(Fi(t.e),Fi(t.g)),e.d=1+Yo(Fi(e.e),Fi(e.g)),e}function oC(t){var e;return Uc(!!t.e),e=t.e,t.e=e.g,e.g=t,e.j=t.j,e.a=t.a,t.a=1+Gi(t.e)+Gi(t.g),t.j=mE(mE(t.c,Bi(t.e)),Bi(t.g)),t.d=1+Yo(Fi(t.e),Fi(t.g)),e.d=1+Yo(Fi(e.e),Fi(e.g)),e}function aC(t){var e;gl(new Kn(fN(t.e)))&&((e=Vf(w_(t.e,(JL(),Hj)),28))==(bN(),wG)?function(t){var e,n,r,i,o;for(e=t.e.j,r=new Kn(fN(t));r.a=mS?(e=55296+(t-mS>>10&1023)&xS,n=56320+(t-mS&1023)&xS,String.fromCharCode(e)+""+String.fromCharCode(n)):String.fromCharCode(t&xS)}function kC(t,e,n,r){var i;Lf(t.c,new xp(t,n,r,Vf(Jg(t.k,n),24).a)),qg(r)&&(e==t.e?r.d.f!=t.a&&r.c.f!=t.a:r.d.f!=t.e&&r.c.f!=t.e)&&(i=n==r.c?r.d:r.c,Lf(t.c,new xp(t,i,r,Vf(Jg(t.k,i),24).a)))}function NC(t,e){var n,r,i;if(e===t)return!0;if(!dl(e,57))return!1;if(i=Vf(e,57),t.Y()!=i.Y())return!1;for(r=i.bb().mb();r.G();)if(n=Vf(r.H(),21),!t._(n))return!1;return!0}function CC(t,e){var n,r,i;return ME(r=new Nk(t),e),Ky(r,(ZL(),UU),e),Ky(r,(JL(),Hj),(bN(),wG)),Ky(r,sj,(fk(),xR)),fr(r,(RN(),PB)),cv(n=new NN,r),Bh(n,(wL(),KG)),cv(i=new NN,r),Bh(i,LG),r}function TC(t,e){var n,r,i;for(i=yS,r=new Kn(e_(e));r.a0&&LC(t,o,n));e.k=0}function SC(t,e){if(0>e)throw new so("Top must be smaller or equal to bottom.");if(0>t)throw new so("Left must be smaller or equal to right.");this.d=0,this.c=t,this.a=e,this.b=0}function MC(t){var e,n,r;if(0==t.length)throw new so(hP);for(n=0,r=t.length;n1)throw new so("In straight hyperEdges there may be only one edge.");If((i=new Vn(n.a).a.bb().mb(),r=Vf(new Un(i).a.H(),21),Vf(r.yb(),12)).a,new ts(e,t.b))}function qC(t,e,n){var r,i;if(this.f=t,Ib(n,i=(r=Vf(Jg(t.b,e),126))?r.a:0),n>=(i/2|0))for(this.e=r?r.c:null,this.d=i;n++0;)Rv(this);this.b=e,this.a=null}function ZC(e,r){typeof n===bS?n(r):((typeof document!==qM||"object"===lS&&t.exports)&&uq(e(r)),typeof document===qM&&typeof self!==qM&&self.postMessage(r))}function $C(t,e){var n,r,i,o;"x"in t.a&&(i=Vf(Op(t,"x"),104),e.i.a=i.a),"y"in t.a&&(o=Vf(Op(t,"y"),104),e.i.b=o.a),eD in t.a&&(r=Vf(Op(t,eD),104),e.j.a=r.a),nD in t.a&&(n=Vf(Op(t,nD),104),e.j.b=n.a)}function KC(t,e,n){var r;my(this),e==(gv(),_V)?Tg(this.g,t.c):Tg(this.o,t.c),Tg(n==_V?this.g:this.o,t.d),Tg(this.c,t),uk(this,Gv(t.c).b,r=Gv(t.d).b,r),this.f=function(t,e){return LN(),(t-e<=0?0-(t-e):t-e)<.2}(Gv(t.c).b,Gv(t.d).b)}function QC(t,e,n){var r,i,o,a,s;for(zp(),s=new cw((a=new Ko(Vf(pd(e.a,n),18))).b.Y()),i=new nr(a.b.mb());i.b.G();)r=Vf(i.b.H(),37),(o=Vf(Jg(t.a,r),31))||(o=YL(r),mp(t.a,r,o)),s.c[s.c.length]=o;return s}function JC(t){var e,n;if(Us(Vf(kx(t,(JL(),Hj)),28)))for(n=new Kn(t.f);n.ae&&r.$b(t[o-1],t[o])>0;--o)a=t[o],Yg(t,o,t[o-1]),Yg(t,o-1,a)}(e,n,r,o);else if(tT(e,t,s=n+i,c=s+((a=r+i)-s>>1),-i,o),tT(e,t,c,a,-i,o),o.$b(t[c-1],t[c])<=0)for(;n=r||e upperEndpoint (%s)",Tx(Mo(NP,1),GS,1,4,[e,n])))}((s=t.$b(n,o))<=0,n,o),0==s&&Vc(r!=(Xu(),FP)|a!=FP))}function uT(t){if(this.a=t,t.c.f.g==(RN(),PB))this.c=t.c,this.d=Vf(kx(t.c.f,(ZL(),XU)),32);else{if(t.d.f.g!=PB)throw new so("Edge "+t+" is not an external edge.");this.c=t.d,this.d=Vf(kx(t.d.f,(ZL(),XU)),32)}}function lT(){lT=a,Sz=md(new i_,(qL(),vH)),Dz=wd(new i_,wH),Pz=vd(wd(new i_,RH),PH),Lz=vd(md(wd(new i_,hH),fH),dH),Rz=wd(new i_,VH),Mz=vd(new i_,bH),Oz=vd(md(wd(yd(new i_,EH),kH),CH),_H),Iz=vd(md(new i_,CH),uH)}function hT(t,e,n){var r,i,o,a;return Cw(n,pM),0==n?ON(t,e):(Vc(hh(t.b,e)),(a=t.c.a)?(o=Ny(iq,vM,26,1,12,1),r=_O(a,t.d,e,n,o),jd(t.c,a,r),o[0]):(t.d.$b(e,e),i=new Tm(e,n),Nh(t.a,i,t.a),jd(t.c,null,i),0))}function fT(t,e,n){var r,i,o,a,s;for(r=0,s=n,e||(r=n*(t.c.length-1),s*=-1),o=new Kn(t);o.a0&&((!os(t.b.d)||!r.q.d)&&(!as(t.b.d)||!r.q.b)&&(r.j.e-=0>o/2-.5?0:o/2-.5),(!os(t.b.d)||!r.q.a)&&(!as(t.b.d)||!r.q.c)&&(r.j.b+=0>o-1?0:o-1))}(t,e,n),o=new Re,i=new Kn(t.b.a.b);i.a0&&((!os(t.b.d)||!r.q.d)&&(!as(t.b.d)||!r.q.b)&&(r.j.e+=0>o/2-.5?0:o/2-.5),(!os(t.b.d)||!r.q.a)&&(!as(t.b.d)||!r.q.c)&&(r.j.b-=o-1))}(t,e,n)}function pT(t,e){var n,r,i,o;for(t.c[e.k]=!0,Lf(t.a,e),o=new Kn(e.f);o.a(a=s+oo(t.b[t.f[i.k].k]))?n:a;return n-r}function ET(t){var e;return $y(e=new Ui,"type",new Rd((Fh(uB),uB.n))),$y(e,ZM,new Rd(t.f)),t.b&&$y(e,"value",t.b),t.a&&$y(e,"context",t.a),$y(e,$M,new Rd(kl(new co("\n"),new zn(new Qn((null==t.g&&(t.g=Ed(t)),t.g)))))),e}function _T(t,e){var n,r,i,o,a;if(e===t)return!0;if(!dl(e,20))return!1;if(a=Vf(e,20),t.Y()!=a.Y())return!1;for(o=a.mb(),r=t.mb();r.G();)if(n=r.H(),i=o.H(),!($c(n)===$c(i)||null!=n&&sE(n,i)))return!1;return!0}function kT(t){!nR&&((e=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F"])[34]='\\"',e[92]="\\\\",e[173]="\\u00ad",e[1536]="\\u0600",e[1537]="\\u0601",e[1538]="\\u0602",e[1539]="\\u0603",e[1757]="\\u06dd",e[1807]="\\u070f",e[6068]="\\u17b4",e[6069]="\\u17b5",e[8203]="\\u200b",e[8204]="\\u200c",e[8205]="\\u200d",e[8206]="\\u200e",e[8207]="\\u200f",e[8232]="\\u2028",e[8233]="\\u2029",e[8234]="\\u202a",e[8235]="\\u202b",e[8236]="\\u202c",e[8237]="\\u202d",e[8238]="\\u202e",e[8288]="\\u2060",e[8289]="\\u2061",e[8290]="\\u2062",e[8291]="\\u2063",e[8292]="\\u2064",e[8298]="\\u206a",e[8299]="\\u206b",e[8300]="\\u206c",e[8301]="\\u206d",e[8302]="\\u206e",e[8303]="\\u206f",e[65279]="\\ufeff",e[65529]="\\ufff9",e[65530]="\\ufffa",e[65531]="\\ufffb",nR=e);var e,n=t.replace(/[\x00-\x1f\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u2028-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb"\\]/g,(function(t){return function(t,e){var n=nR[t.charCodeAt(0)];return null==n?t:n}(t)}));return'"'+n+'"'}function NT(t,e){var n,r,i,o,a;for(r=new Un(new Vn((1==e?hB:lB).a).a.bb().mb());r.a.G();)for(i=Vf(r.a.H(),21),n=Vf(i.yb(),59),a=Vf(qN(t.f.c,n),18).mb();a.G();)o=Vf(a.H(),27),Gy(t.b.b,o.b),Gy(t.b.a,Vf(o.b,25).f)}function CT(t,e,n){var r,i,o,a;if(H_(n,"Recursive layout",2),0!=e.b.c.length){for(a=1/e.b.c.length,o=new Kn(e.b);o.a=2147483648&&(r-=4294967296),r)}function ST(t,e,n){var r,i,o;if(e!=n){r=e;do{Sh(t,r.d),(o=Vf(kx(r,(ZL(),lX)),9))&&(Rl(t,(i=r.a).b,i.d),Sh(t,o.i),r=Kg(o))}while(o);r=n;do{Mh(t,r.d),(o=Vf(kx(r,(ZL(),lX)),9))&&(jl(t,(i=r.a).b,i.d),Mh(t,o.i),r=Kg(o))}while(o)}}function MT(t,e){var n,r,i,o,a;for(n=new Re,a=new tc,i=new Un(new Vn(t.a).a.bb().mb());i.a.G();)o=Vf(i.a.H(),21),wO(a,(r=Vf(o.yb(),12)).c,r,null),wO(a,r.d,r,null);for(;a.a;)Lf(n,GO(a,e,Ul(Vf(kx(e,(JL(),Hj)),28))));return n}function DT(t,e){var n,r,i,o,a;for(r=new Un(new Vn((1==e?hB:lB).a).a.bb().mb());r.a.G();)for(i=Vf(r.a.H(),21),n=Vf(i.yb(),59),a=Vf(qN(t.f.c,n),18).mb();a.G();)o=Vf(a.H(),27),Lf(t.b.b,Vf(o.b,25)),Lf(t.b.a,Vf(o.b,25).f)}function PT(t){var e,n,r,i,o,a;for(Gf(),El(),n=new ry,r=new Kn(t.e.c);r.a0&&i0):i<0&&-i0)}function FT(t,e,n,r,i){var o,a;xm(Um(Tx(Mo(pR,1),KM,10,0,[i.f.i,i.i,i.a])),n)||(e.c==i?Yl(e.a,0,new Zc(n)):If(e.a,new Zc(n)),r&&!ka(t.a,n)&&((a=Vf(kx(e,(JL(),kj)),44))||(a=new Br,Ky(e,kj,a)),Mb(a,o=new Zc(n),a.c.b,a.c),Tg(t.a,o)))}function BT(t){var e,n,r,i,o,a;for(e=0,n=new Kn(t.a);n.a((a=Gv(r.d).b)-o<=0?0-(a-o):a-o)?e:a-o<=0?0-(a-o):a-o);return e}function HT(t,e){var n,r,i,o,a,s;if((r=t.b[e.k])>=0)return r;for(i=1,o=new Kn(e.f);o.a(a=HT(t,s))+1?i:a+1);return function(t,e,n){var r,i;for(r=(i=t.a.c).c.length;rc-n&&s=t.g.d?((e=t.f).e=dm(t.e,e),e.g=t.g,e.a=t.a-1,e.j=EE(t.j,n),ZN(e)):((e=t.i).g=gm(t.g,e),e.e=t.e,e.a=t.a-1,e.j=EE(t.j,n),ZN(e)):t.e:t.g}function XT(t){var e,n,r,i,o,a;for(i=new Kn(t.a);i.ao.k?Bh(a,ZG):a.g==ZG&&o.k>r.k&&Bh(a,SG))}function WT(t,e,n){var r,i,o;if(Cw(n,pM),0==n)return ON(t,e);o=t.c.a,i=Ny(iq,vM,26,1,12,1);try{if(!hh(t.b,e)||!o)return 0;r=YO(o,t.d,e,n,i)}catch(t){if(dl(t=rE(t),119))return 0;if(dl(t,76))return 0;throw PE(t)}return jd(t.c,o,r),i[0]}function qT(t){var e,n,r,i,o,a;for(il(a=Vf(Yk(t.a,Ny(BB,oD,9,t.a.c.length,0,1)),51),new ot),n=null,i=0,o=a.length;i0)return KT(t,e,n.g);if(0!=r)return mE(mE(e.ac(n.g),e._b(n)),KT(t,e,n.e));switch(t.b.f.e){case 0:return mE(e._b(n),e.ac(n.g));case 1:return e.ac(n.g);default:throw new _r}}function QT(t,e,n){var r;if(!n)return 0;if((r=t.d.$b(t.b.e,n.b))<0)return QT(t,e,n.e);if(0!=r)return mE(mE(e.ac(n.e),e._b(n)),QT(t,e,n.g));switch(t.b.d.e){case 0:return mE(e._b(n),e.ac(n.e));case 1:return e.ac(n.e);default:throw new _r}}function JT(t,e,n,r){var i,o,a,s;return fr(a=new Nk(t),(RN(),jB)),Ky(a,(ZL(),oX),e),Ky(a,(JL(),Hj),(bN(),wG)),Ky(a,eX,n),Ky(a,nX,r),Bh(o=new NN,(wL(),KG)),cv(o,a),Bh(s=new NN,LG),cv(s,a),lv(e,o),ME(i=new jp,e),Ky(i,kj,null),hv(i,s),lv(i,r),a}function tA(t,e){var n,r,i,o,a,s,c,u;for(n=0,a=0,s=(o=t.j).length;an.a&&(o=Yo(o,a.a-n.a-1));return o}function iA(t){var e,n;switch(e=Vf(kx(t,(JL(),Oj)),15).a,n=Vf(kx(t,Ij),15).a,Ky(t,Ij,new Hn(e)),Ky(t,Oj,new Hn(n)),Vf(kx(t,sj),103).e){case 1:Ky(t,sj,(fk(),kR));break;case 2:Ky(t,sj,(fk(),mR));break;case 3:Ky(t,sj,(fk(),ER));break;case 4:Ky(t,sj,(fk(),_R))}}function oA(t,e,n){var r,i,o;for(o=new Kn(t.e);o.a0&&(r.b.c-=r.c,r.b.c<=0&&r.b.f>0&&If(e,r.b));for(i=new Kn(t.b);i.a0&&(r.a.f-=r.c,r.a.f<=0&&r.a.c>0&&If(n,r.a))}function aA(t,e,n){var r,i,o;for(o=new Kn(t.j);o.a0&&(r.b.e-=r.c,r.b.e<=0&&r.b.k>0&&If(e,r.b));for(i=new Kn(t.d);i.a0&&(r.a.k-=r.c,r.a.k<=0&&r.a.e>0&&If(n,r.a))}function sA(t,e){switch(t.e){case 1:switch(e.e){case 1:return JD;case 4:return.5;case 3:return tP;case 2:return eP}break;case 2:switch(e.e){case 1:return JD;case 2:return.5;case 3:return tP;case 4:return eP}break;default:throw new so(QD)}return 0}function cA(t,e){var n,r,i,o;for(Lu((o=new Kv(t,0)).b0),o.a.sb(o.c=--o.b),ef(o,i),Lu(o.b1)&&(++o,++a);return!Ul(Vf(kx(n,(JL(),Hj)),28))&&s&&(++o,++a),mp(i,n,qE(o)),a}function hA(t){var e,n,r,i,o,a,s,c,u,l;for(u=(l=(s=Vf((a=t.b.mb()).H(),92)).a.a)>uP,c=luP)&&!c)return bm(s.b);if(i&&c||r&&u)return(e=o/(o-l))*bm(n.b)+(1-e)*bm(s.b)}return 0}function fA(t){var e,n,r,i,o,a,s,c,u,l;for(u=(l=(s=Vf((a=t.b.mb()).H(),92)).a.b)>uP,c=luP)&&!c)return bm(s.b);if(i&&c||r&&u)return(e=o/(o-l))*bm(n.b)+(1-e)*bm(s.b)}return 0}function dA(t,e,n){var r,i;return r=0,qg(e)?ka(t.g,e)?(WT(t.i,qE(Dh(t,e.c)),1),WT(t.i,qE(Dh(t,e.d)),1),vl(t.g,e),r+=vk(t,e,t.i)):(Tg(t.g,e),hT(t.i,qE(Dh(t,e.c)),1),hT(t.i,qE(Dh(t,e.d)),1)):(i=ON(t.i,qE(Vf(Jg(t.k,n),24).a)),r+=t.g.a.Y()-i),r}function gA(t){switch(t.e){case 0:return $z;case 1:return Zz;case 2:return Xz;case 3:return Uz;case 4:return Qz;case 5:return Kz;case 6:return vV;case 7:return pV;case 8:return qz;case 9:return Wz;case 10:return dV;case 11:return Jz;default:return gV}}function pA(t){switch(t.e){case 0:return Kz;case 1:return vV;case 2:return pV;case 3:return $z;case 4:return Zz;case 5:return Xz;case 6:return Uz;case 7:return Qz;case 8:return qz;case 9:return Wz;case 10:return dV;case 11:return Jz;default:return gV}}function vA(t){switch(t.e){case 0:return Xz;case 1:return Uz;case 2:return Qz;case 3:return Kz;case 4:return vV;case 5:return pV;case 6:return $z;case 7:return Zz;case 8:return qz;case 9:return Wz;case 10:return dV;case 11:return Jz;default:return gV}}function bA(t){var e;switch(e=t.a.f,t.b){case 0:return new Kn(t.a.f);case 1:return bg(new Lv(e),AN(t));case 2:switch(t.c.e){case 2:case 1:return bg(new Kn(e),AN(t));case 3:case 4:return bg(new Lv(e),AN(t))}}throw new To("PortOrder not implemented.")}function yA(t,e,n,r){this.e=t,this.j=Vf(kx(t,(ZL(),xX)),134),this.f=Ny(BB,oD,9,e,0,1),this.b=Ny(LW,hS,184,e,6,1),this.a=Ny(BB,oD,9,e,0,1),this.d=Ny(LW,hS,184,e,6,1),this.i=Ny(BB,oD,9,e,0,1),this.g=Ny(LW,hS,184,e,6,1),this.n=Ny(LW,hS,184,e,6,1),this.k=n,this.c=r}function wA(t){if(!t.a.c||!t.a.d)throw new ko((Fh(TY),TY.j+" must have a source and target "+(Fh(IY),IY.j+" specified.")));if(t.a.c==t.a.d)throw new ko("Network simplex does not support self-loops: "+t.a+" "+t.a.c+" "+t.a.d);return Ng(t.a.c.g,t.a),Ng(t.a.d.c,t.a),t.a}function mA(t,e,n,r,i){r==(wL(),LG)&&i==LG?qp(t,e)>qp(t,n)?t.d=Ek(t,n):t.b=Ek(t,e):r==KG&&i==KG?qp(t,e)qp(t,n)&&(t.d=Ek(t,n),t.b=Ek(t,e)):qp(t,e)0&&o>0?e++:r>0?n++:o>0?i++:n++}xb(t.f,new Rt)}function EA(t,e,n,r){var i,o,a,s,c;n.d.f!=e.f&&(fr(i=new Nk(t),(RN(),jB)),Ky(i,(ZL(),oX),n),Ky(i,(JL(),Hj),(bN(),wG)),r.c[r.c.length]=i,cv(a=new NN,i),Bh(a,(wL(),KG)),cv(s=new NN,i),Bh(s,LG),c=n.d,lv(n,a),ME(o=new jp,n),Ky(o,kj,null),hv(o,s),lv(o,c),bT(i,a,s))}function _A(t){var e,n,r,i,o,a,s;for(i=jD,a=jD,o=null,n=new lp(new ur(t.e));n.b!=n.c.a.b;)if(1==Vf((e=By(n)).d,60).c&&(r=Vf(e.e,116).a,s=Vf(e.e,116).b,(i-r>BD||r-iBD)&&(a=Vf(e.e,116).b,i=Vf(e.e,116).a,o=Vf(e.d,60),0==a&&0==i)))return o;return o}function kA(t,e){var n,r,i,o,a,s;return o=t.d,(s=Vf(kx(t,(JL(),Jj)),15).a)<0&&Ky(t,Jj,new Hn(s=0)),e.j.b=s,a=Math.floor(s/2),Bh(r=new NN,(wL(),KG)),cv(r,e),r.i.b=a,Bh(i=new NN,LG),cv(i,e),i.i.b=a,lv(t,r),ME(n=new jp,t),Ky(n,kj,null),hv(n,i),lv(n,o),function(t,e,n){var r;(r=e.c.f).g==(RN(),jB)?(Ky(t,(ZL(),eX),Vf(kx(r,eX),7)),Ky(t,nX,Vf(kx(r,nX),7))):(Ky(t,(ZL(),eX),e.c),Ky(t,nX,n.d))}(e,t,n),function(t,e){var n,r;for(r=new Kv(t.b,0);r.buP&&(this.b.ib(n),s=!1),this.b.ib(c);s&&this.b.ib(n)}function AA(t,e){var n,r,i,o,a,s,c;for(n=dD,RN(),s=GB,i=new Kn(e.a);i.a0?n:0,r.i.b=n+rf(t.a,o,s)):r.i.b=(Bd(a),a)),c=rf(t.a,o,s),r.i.bo?0:o)o?0:o:s,(0>(co?0:o)o?0:o:s)),o=c,c+=a,r=Vf(pd(t.c,i),9),(n=new _u(u)).j.b=e.j.b,dT(t.b,e,n),Lf(r.c,n);Gy(t.g.c,e),Lf(t.i,new Ls(t,e))}function GA(t,e,n){var r,i,o,a,s,c;for(e.k=1,i=e.d,c=y_(e,(nm(),RX)).mb();c.G();)for(r=new Kn(Vf(c.H(),7).e);r.ah+s&&r.I();for(a=new Kn(f);a.aBD||r-iBD)&&(a=Vf(e.e,116).b,i=Vf(e.e,116).a,o=Vf(e.d,60),0==a&&0==i)))return o;return o}function XA(){var t,e,n,r,i;for(this.e=(El(),new ry),this.b=new $f(n=Vf(ia(NV),11),Vf(Og(n,n.length),11),0),this.c=new $f(r=Vf(ia(NV),11),Vf(Og(r,r.length),11),0),this.a=new $f(i=Vf(ia(NV),11),Vf(Og(i,i.length),11),0),e=(CL(),CL(),Yz).mb();e.G();)t=Vf(e.H(),60),Sk(this.e,t,new Oo)}function WA(t,e,n){var r,i,o,a;Ta(t.k-t.a)<_D||Ta(e.k-e.a)<_D||(r=YT(t.n,e.j,n),i=YT(e.n,t.j,n),(o=16*r+(SE(t.n,e.k,e.a)+SE(e.j,t.k,t.a)))<(a=16*i+(SE(e.n,t.k,t.a)+SE(t.j,e.k,e.a)))?new Bw(t,e,a-o):o>a?new Bw(e,t,o-a):o>0&&a>0&&(new Bw(t,e,0),new Bw(e,t,0)))}function qA(t,e){var n,r,i,o,a,s,c,u;for(c=new Re,u=null,r=Vf(Tp(uY,t),20).mb();r.G();){for(s=new Un(new Vn((n=Vf(r.H(),75)).c.a).a.bb().mb());s.a.G();)i=Vf(s.a.H(),21),ef(e,o=Vf(i.yb(),7)),IT(o,t.b);ox(c,n.b),u=t.a}for(jC(c),Iw(c,u),a=new Kn(c);a.an.k&&s1&&(o=n?Sc(e.d)+1:Sc(a.d)-1,uv(a,Vf(pd(t.a.c,o),16))),JA(t,a,n));return e}function tO(t,e){var n,r,i,o;for(i=e.d?t.a.c==(dv(),wz)?XE(e.b):WE(e.b):t.a.c==(dv(),yz)?XE(e.b):WE(e.b),o=!1,Wu(),r=new Du(ju(Wf(i.a,new g)));t_(r);)if(n=Vf(Tv(r),12),t.c.a[n.c.f.d.k]!==t.c.a[n.d.f.d.k]&&(o=!0,ka(t.b,t.a.f[$k(n,e.b).k])))return e.c=!0,e.a=n,e;return e.c=o,e.a=null,e}function eO(t){var e,n,r,i,o,a,s;for(o=new Kn(t.a.a);o.a0&&Ax(this.n,!0,(_E(),OR)),t.g==(RN(),PB)&&Of(this.n,!1,!1,!1,!1)}function iO(t,e,n){var r,i,o,a,s,c,u,l;for(o=new ts(e,n),u=new Kn(t.b);u.ar?h:r)>t.j.a&&(u=(s-t.j.a)/2,a.b=Bo(a.b,u),a.c=Bo(a.c,u))}function pO(t,e,n,r){var i,o,a,s,c,u,l,h;for(a=Rl(e.d,n,r),l=new Kn(e.b);l.a=40)&&function(t){var e,n,r,i,o,a,s;for(t.o=new oi,r=new lo,a=new Kn(t.e.a);a.a0,s=f_(e,o),Pu(n?s.c:s.g,e),1==e_(s).c.length&&Mb(r,s,r.c.b,r.c),i=new es(o,e),uu(t.o,i),Gy(t.e.a,o))}(t),function(t){var e,n,r,i,o,a,s,c,u,l;for(u=t.e.a.c.length,o=new Kn(t.e.a);o.a0){for(qo(t.c);mT(t,Vf(Jv(new Kn(t.e.a)),61))0?(c=t.g)?(a=c.d,t.g=_O(c,e,n,r,i),0==i[0]&&++t.a,t.j=mE(t.j,r),t.g.d==a?t:ZN(t)):(i[0]=0,Em(t,n,r)):(i[0]=t.c,Vc(nE(mE(t.c,r),yS)<=0),t.c+=r,t.j=mE(t.j,r),t)}function kO(t,e,n){var r,i,o,a,s,c,u,l;for(i=!0,a=new Kn(e.c);a.au&&r>u)){i=!1,t.a&&Df();break}u=oo(n.n[s.k])+oo(n.d[s.k])+s.j.b+s.e.a}if(!i)break}return t.a&&Df(),i}function NO(t){var e,n,r,i,o,a;if(gl(new Kn(r=Jk(t)))){for(a=new Ep(0,0,t.e.j.a,t.e.j.b),n=new Kn(r);n.aa.i.b-a.e.d+u.a+h&&(f=c.i+u.i,u.a=(u.i*u.a+c.i*c.a)/f,u.i=f,c.g=u,n=!0)),o=a,c=u;return n}function LO(t){var e,n,r,i,o;if($c(kx(t,(JL(),Hj)))===$c((bN(),mG))||$c(kx(t,Hj))===$c(wG))for(o=new Kn(t.f);o.aa)return wL(),LG;break;case 4:case 3:if(l<0)return wL(),SG;if(l+n>o)return wL(),ZG}return(c=(u+s/2)/a)+(r=(l+n/2)/o)<=1&&c-r<=0?(wL(),KG):c+r>=1&&c-r>=0?(wL(),LG):r<.5?(wL(),SG):(wL(),ZG)}function MO(t,e,n,r,i,o,a){var s,c,u,l,h;for(h=new ac,c=e.mb();c.G();)for(l=new Kn(xk(Vf(c.H(),627)));l.a0&&If(t.e,o)):(t.c[a]-=u+1,t.c[a]<=0&&t.a[a]>0&&If(t.d,o))))}function PO(t){var e,n,r,i,o,a,s,c;for(jx(),this.b=new Kt,this.c=new Re,this.a=new Re,s=0,c=(a=Rx()).length;s0){for(i=s.length;i>0&&""==s[i-1];)--i;i0&&0==i[0]&&++t.a,t.j=mE(t.j,r-i[0]),ZN(t)):(i[0]=0,r>0?_m(t,n,r):t):o>0?(s=t.g)?(t.g=HO(s,e,n,r,i),0==r&&0!=i[0]?--t.a:r>0&&0==i[0]&&++t.a,t.j=mE(t.j,r-i[0]),ZN(t)):(i[0]=0,r>0?Em(t,n,r):t):(i[0]=t.c,0==r?UT(t):(t.j=mE(t.j,r-t.c),t.c=r,t))}function YO(t,e,n,r,i){var o,a,s;return(o=e.$b(n,t.b))<0?(a=t.e)?(t.e=YO(a,e,n,r,i),i[0]>0&&(r>=i[0]?(--t.a,t.j=EE(t.j,i[0])):t.j=EE(t.j,r)),0==i[0]?t:ZN(t)):(i[0]=0,t):o>0?(s=t.g)?(t.g=YO(s,e,n,r,i),i[0]>0&&(r>=i[0]?(--t.a,t.j=EE(t.j,i[0])):t.j=EE(t.j,r)),ZN(t)):(i[0]=0,t):(i[0]=t.c,r>=t.c?UT(t):(t.c-=r,t.j=EE(t.j,r),t))}function zO(t,e,n){var r,i,o,a,s,c,u,l;for(c=new Kn(n.b);c.a0&&u>0&&XI(b,new ts(N,u),!0))),p=Bo(p,b.i.a+b.j.a),v=Bo(v,b.i.b+b.j.b),d=new Kn(b.c);d.ae.a&&(r.kb((DN(),CV))?t.d.a+=(n.a-e.a)/2:r.kb(AV)&&(t.d.a+=n.a-e.a)),n.b>e.b&&(r.kb((DN(),IV))?t.d.b+=(n.b-e.b)/2:r.kb(OV)&&(t.d.b+=n.b-e.b)),Vf(kx(t,(ZL(),qU)),18).kb((KA(),nU))&&(n.a>e.a||n.b>e.b))for(s=new Kn(t.b);s.a0||0==n&&e.f==(Xu(),FP))&&(s=e.g,c=e.f):(i=e.c,s=e.g,c=e.f),r&&i&&((n=t.a.$b(o,s))>0||0==n&&a==(Xu(),FP)&&c==(Xu(),FP))&&(o=s,Xu(),a=FP,c=GP),new cT(t.a,r,o,a,i,s,c)}function $O(t,e,n,r){var i,o,a,s,c,u;if(n.c.f!=e.f)for(fr(i=new Nk(t),(RN(),jB)),Ky(i,(ZL(),oX),n),Ky(i,(JL(),Hj),(bN(),wG)),r.c[r.c.length]=i,cv(a=new NN,i),Bh(a,(wL(),KG)),cv(s=new NN,i),Bh(s,LG),lv(n,a),ME(o=new jp,n),Ky(o,kj,null),hv(o,s),lv(o,e),bT(i,a,s),u=new Kv(n.b,0);u.b=r&&u.a>=r&&(l.a=r),f.a<=n&&u.a<=n&&(d.a=n-10),1==e.c.a.Y()?nw(a.a,Tx(Mo(pR,1),KM,10,0,[l,h,g,d])):nw(a.a,Tx(Mo(pR,1),KM,10,0,[l,h,i,g,d]))}function QO(t,e){var n,r,i,o,a,s;for(o=t.c,a=t.d,hv(t,null),lv(t,null),e&&io(oo(Oh(kx(a,(ZL(),ZU)))))?hv(t,qO(a.f,(nm(),RX),(wL(),LG))):hv(t,a),e&&io(oo(Oh(kx(o,(ZL(),uX)))))?lv(t,qO(o.f,(nm(),PX),(wL(),KG))):lv(t,o),r=new Kn(t.b);r.aoo(ul(a.g,a.d[0]).a)?(Lu(c.b>0),c.a.sb(c.c=--c.b),ef(c,a),i=!0):s.e&&s.e.Y()>0&&(o=(!s.e&&(s.e=new Re),s.e).nb(e),u=(!s.e&&(s.e=new Re),s.e).nb(n),(o||u)&&((!s.e&&(s.e=new Re),s.e).ib(a),++a.c));i||(r.c[r.c.length]=a)}function nI(t,e,n,r){var i,o,a,s,c,u,l,h,f,d,g;n.d.f!=e.f&&(fr(i=new Nk(t),(RN(),jB)),Ky(i,(ZL(),oX),n),Ky(i,(JL(),Hj),(bN(),wG)),r.c[r.c.length]=i,cv(a=new NN,i),Bh(a,(wL(),KG)),cv(s=new NN,i),Bh(s,LG),c=n.d,lv(n,a),ME(o=new jp,n),Ky(o,kj,null),hv(o,s),lv(o,c),h=(l=(u=Vf(pd(a.b,0),12).c).f).g,g=(d=(f=Vf(pd(s.e,0),12).d).f).g,Ky(i,eX,h==jB?Vf(kx(l,eX),7):u),Ky(i,nX,g==jB?Vf(kx(d,nX),7):f))}function rI(t,e){var n,r,i,o,a,s,c,u,l,h,f,d,g;for(a=e,h=e.d,u=e.c.f,f=e.d.f,l=Sc(u.d),d=Sc(f.d),s=l;se&&(t.a=e),t.b<0?t.b=0:t.b>n&&(t.b=n)}(u,t.j.a,t.j.b),Bh(s,SO(s,o)),a=Vf(kx(r,(ZL(),qU)),18),c=s.g,o.e){case 2:case 1:(c==(wL(),SG)||c==ZG)&&a.ib((KA(),aU));break;case 4:case 3:(c==(wL(),LG)||c==KG)&&a.ib((KA(),aU))}else i=h_(o),s=qO(t,n,n==(nm(),RX)?i:vE(i));return s}function uI(t){var e,n,r,i,o,a,s,c;for(r=ch(qb(t.a)),i=new $f(e=Vf(ia(NV),11),Vf(Og(e,e.length),11),0);r.a.G()||r.b.mb().G();)s=(n=Vf(Tw(r),12)).c.g,c=n.d.g,s==(wL(),$G)?c!=$G&&(a=T_(c),Ky(n,(ZL(),_X),a),Bh(n.c,c),wm(i,a),r.a.I()):c==$G?(a=T_(s),Ky(n,(ZL(),_X),a),Bh(n.d,s),wm(i,a),r.a.I()):(a=iI(s,c),Ky(n,(ZL(),_X),a),wm(i,a),r.a.I());return 1==i.c?o=Vf(Qb(new Xs(i)),60):(CL(),o=gV),dC(t,o,!1),o}function lI(t,e,n){var r,i,o,a,s,c,u,l,h;for(c=n+e.d.c.a,h=new Kn(e.f);h.a1,s=Sg(vu((op(),new sb(FE(Tx(Mo(NP,1),GS,1,4,[l.b,l.e]))))));t_(s);)u=(a=Vf(Tv(s),12)).c==l?a.d:a.c,Ta(Um(Tx(Mo(pR,1),KM,10,0,[u.f.i,u.i,u.a])).b-o.b)>1&&FT(t,a,o,i,l)}}function hI(t,e){var n,r,i,o,a;for(a=new Wx(new Yn(t.f.b).a);a.b;){if(i=Vf((o=Vw(a)).yb(),251),1==e){if(i.yc()!=(_E(),LR)&&i.yc()!=TR)continue}else if(i.yc()!=(_E(),AR)&&i.yc()!=OR)continue;switch(r=Vf(Vf(o.zb(),27).b,25),n=Vf(Vf(o.zb(),27).a,78).c,i.yc().e){case 2:r.j.d=t.e.a,r.j.c=Bo(1,r.j.c+n);break;case 1:r.j.d=r.j.d+n,r.j.c=Bo(1,r.j.c-n);break;case 4:r.j.e=t.e.b,r.j.b=Bo(1,r.j.b+n);break;case 3:r.j.e=r.j.e+n,r.j.b=Bo(1,r.j.b-n)}}}function fI(t,e,n,r,i){var o,a,s,c,u,l,h,f;for(El(),h=new kr,a=new Re,XC(t,n,t.d.Mc(),a,h),XC(t,r,t.d.Nc(),a,h),s=new Kv(a,0);s.b=l&&(y>l&&(u.c=Ny(NP,GS,1,0,4,1),l=y),u.c[u.c.length]=g);0!=u.c.length&&(c=Vf(pd(u,Zk(e,u.c.length)),80),vp(T.a,c),c.d=h++,oA(c,N,E),u.c=Ny(NP,GS,1,0,4,1))}for(m=t.c.length+1,p=new Kn(t);p.aC.d&&(up(n),Gy(C.b,r),r.c>0&&(r.a=C,Lf(C.e,r),r.b=_,Lf(_.b,r)))}(a,Vf(kx(e,(ZL(),bX)),154)),function(t){var e,n,r,i,o,a,s,c,u;for(c=new Re,a=new Re,o=new Kn(t);o.a-1){for(i=new Kn(a);i.a0||(s.i=Uo(s.i,r.i-1),--s.f,0==s.f&&(a.c[a.c.length]=s))}}(a),f=-1,l=new Kn(a);l.ah||r+i>c)throw new Wr;if(1&u.g&&!(4&u.g)||l==s)i>0&&vN(t,e,n,r,i,!0);else if(t===n&&er;)n[a]=t[--e];else for(a=r+i;r0&&0==o[0]&&++t.a,t.j=mE(t.j,i-o[0])),ZN(t)):(o[0]=0,0==r&&i>0?_m(t,n,i):t);if(a>0)return(c=t.g)?(t.g=pI(c,e,n,r,i,o),o[0]==r&&(0==i&&0!=o[0]?--t.a:i>0&&0==o[0]&&++t.a,t.j=mE(t.j,i-o[0])),ZN(t)):(o[0]=0,0==r&&i>0?Em(t,n,i):t);if(o[0]=t.c,r==t.c){if(0==i)return UT(t);t.j=mE(t.j,i-t.c),t.c=i}return t}function vI(t){var e,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v;for(c=t.e,d=t.f,a=t.d,l=(g=t.c)-1,p=t.g,h=Yf(t.g.xb(1,t.g.Y()-1)),u=new Re,n=0;n0&&(c=t.i.a/o);break;case 2:case 4:(i=t.f.j.b)>0&&(c=t.i.b/i)}Ky(t,(ZL(),dX),c)}if(s=t.j,r)t.a.a=r.a,t.a.b=r.b;else if(e!=EG&&e!=_G&&a!=$G)switch(a.e){case 1:t.a.a=s.a/2;break;case 2:t.a.a=s.a,t.a.b=s.b/2;break;case 3:t.a.a=s.a/2,t.a.b=s.b;break;case 4:t.a.b=s.b/2}else t.a.a=s.a/2,t.a.b=s.b/2}(c,u,i,Vf(kx(c,Bj),10)),i.e){case 2:case 1:(c.g==(wL(),SG)||c.g==ZG)&&o.ib((KA(),aU));break;case 4:case 3:(c.g==(wL(),LG)||c.g==KG)&&o.ib((KA(),aU))}}function mI(t){var e,n,r,i,o;for(r=new Re,o=new Kn(t.c.f);o.a=(p=t.d.c.c.c.length)-1)return null;for((i=new Re).c[i.c.length]=e,b=e,a=n,d=-1,s=Vf(pd(t.d.c.c,n),16),f=0;f1&&a1&&a>1;)u=jO(t,y),s=Vf(pd(t.d.c.c,a),16),l=Vf(pd(t.d.c.c,a-1),16),oN(y,p=Uo(Vf(g.sb(h++),24).a,l.a.c.length),l),oN(u,b,s),b=p,y&&(i.c[i.c.length]=y),y=u,--w,++o,--a;for(v=(r-(i.c.length-1)*t.d.d)/i.c.length,c=new Kn(i);c.a=0)return!1;if(n.e&&r==(RN(),DB)&&r!=n.e)return!1;if(e.k=n.b,Lf(n.f,e),n.e=r,r==(RN(),jB)||r==FB||r==DB)for(i=new Kn(e.f);i.a0&&(Ax(t.n,!1,(_E(),AR)),Ax(t.n,!0,OR))}function _I(t,e,n){var r,i,o,a;switch(o=t.i,i=Um(Tx(Mo(pR,1),KM,10,0,[e.i,e.f.i])),r=Um(Tx(Mo(pR,1),KM,10,0,[e.f.i,e.i,e.a])),a=e.d,e.g.e){case 4:o.a=zo(i.a,r.a)-a.b-t.j.a-n,o.b=Um(Tx(Mo(pR,1),KM,10,0,[e.f.i,e.i,e.a])).b+n;break;case 2:o.a=Bo(i.a+e.j.a,r.a)+a.c+n,o.b=Um(Tx(Mo(pR,1),KM,10,0,[e.f.i,e.i,e.a])).b+n;break;case 1:o.a=Um(Tx(Mo(pR,1),KM,10,0,[e.f.i,e.i,e.a])).a+n,o.b=zo(i.b,r.b)-a.d-t.j.b-n;break;case 3:o.a=Um(Tx(Mo(pR,1),KM,10,0,[e.f.i,e.i,e.a])).a+n,o.b=Bo(i.b+e.j.b,r.b)+a.a+n}}function kI(t,e,n){var r,i,o,a;switch(o=t.i,i=Um(Tx(Mo(pR,1),KM,10,0,[e.i,e.f.i])),r=Um(Tx(Mo(pR,1),KM,10,0,[e.f.i,e.i,e.a])),a=e.d,e.g.e){case 4:o.a=zo(i.a,r.a)-a.b-t.j.a-n,o.b=Um(Tx(Mo(pR,1),KM,10,0,[e.f.i,e.i,e.a])).b-t.j.b-n;break;case 2:o.a=Bo(i.a+e.j.a,r.a)+a.c+n,o.b=Um(Tx(Mo(pR,1),KM,10,0,[e.f.i,e.i,e.a])).b-t.j.b-n;break;case 1:o.a=Um(Tx(Mo(pR,1),KM,10,0,[e.f.i,e.i,e.a])).a+n,o.b=zo(i.b,r.b)-a.d-t.j.b-n;break;case 3:o.a=Um(Tx(Mo(pR,1),KM,10,0,[e.f.i,e.i,e.a])).a+n,o.b=Bo(i.b+e.j.b,r.b)+a.a+n}}function NI(){NI=a,hU=new kb("ONE_SIDED",0,!0,!1,!1),pU=new kb("TWO_SIDED",1,!1,!1,!1),fU=new kb("ONE_SIDED_BEST_OF_UP_OR_DOWN",2,!0,!0,!1),vU=new kb("TWO_SIDED_BEST_OF_UP_OR_DOWN",3,!1,!0,!1),dU=new kb("ONE_SIDED_BEST_OF_UP_OR_DOWN_ORTHOGONAL_HYPEREDGES",4,!0,!0,!0),bU=new kb("TWO_SIDED_BEST_OF_UP_OR_DOWN_ORTHOGONAL_HYPEREDGES",5,!1,!0,!0),gU=new kb("ONE_SIDED_ORTHOGONAL_HYPEREDGES",6,!0,!1,!0),lU=new kb("OFF",7,!1,!1,!1)}function CI(t,e,n,r,i,o,a){var s,c,u,l,h,f,d;return h=io(oo(Oh(kx(e,($L(),rW))))),f=null,o==(nm(),PX)&&r.c.f==n?f=r.c:o==RX&&r.d.f==n&&(f=r.d),u=a,a&&h&&!f?(Lf(a.e,r),d=Ho(Vf(kx(a.d,(JL(),Jj)),15).a,Vf(kx(r,Jj),15).a),Ky(a.d,Jj,new Hn(d))):(wL(),l=$G,f?l=f.g:Us(Vf(kx(n,(JL(),Hj)),28))&&(l=o==PX?KG:LG),c=function(t,e,n,r,i,o){var a,s,c,u,l,h,f;return u=r==(nm(),PX)?o.c:o.d,c=JE(e),u.f==n?(a=Vf(Jg(t.b,u),9))||(Ky(a=bL(u,Vf(kx(n,(JL(),Hj)),28),i,r==PX?-1:1,u.j,c,e),(ZL(),oX),u),mp(t.b,u,a)):(l=Vf(kx(o,(JL(),Jj)),15).a,s=function(t,e,n,r){var i,o;switch(i=JE(Kg(n)),cv(o=new NN,n),r.e){case 1:Bh(o,vE(h_(i)));break;case 2:Bh(o,h_(i))}return Ky(o,(ZL(),iX),Vf(kx(e,iX),15)),Ky(e,oX,o),mp(t.b,o,e),o}(t,a=bL((h=new y,f=Vf(kx(e,(ZL(),mX)),15).a*Vf(kx(e,($L(),ZX)),15).a/2,Ky(h,iX,new Hn(f)),h),Vf(kx(n,Hj),28),i,r==PX?-1:1,new ts(l,l),c,e),n,r),Ky(a,oX,s),mp(t.b,s,a)),Vf(kx(e,(ZL(),qU)),18).ib((KA(),nU)),Us(Vf(kx(e,(JL(),Hj)),28))?Ky(e,Hj,(bN(),xG)):Ky(e,Hj,(bN(),EG)),a}(t,e,n,o,l,r),s=pb((Kg(n),r)),o==PX?(hv(s,Vf(pd(c.f,0),7)),lv(s,i)):(hv(s,i),lv(s,Vf(pd(c.f,0),7))),u=new OE(r,s,c,Vf(kx(c,(ZL(),oX)),7),o,!f)),dT(t.a,r,new vf(u.d,e,o)),u}function TI(t,e,n,r){var i,o,a,s,c,u,l;if(fr(o=new Nk(t),(RN(),FB)),Ky(o,(JL(),Hj),(bN(),wG)),i=0,e){for(Ky(a=new NN,(ZL(),oX),e),Ky(o,oX,e.f),Bh(a,(wL(),KG)),cv(a,o),c=0,u=(l=Vf(Yk(e.b,Ny(SB,CD,12,e.b.c.length,0,1)),47)).length;cf?l:f;for(uk(this,Um(Tx(Mo(pR,1),KM,10,0,[t.f.i,t.i,t.a])).b,h,l),a=new Un(new Vn(e.a).a.bb().mb());a.a.G();)i=Vf(a.a.H(),21),o=Vf(i.yb(),27),Tg(this.c,Vf(o.b,12));this.f=!1}function DI(t,e,n,r){var i,o,a,s,c;if(!((s=(JL(),Sj).b)in e.a)||!Op(e,s).ic().a){if(!(c=Op(e,ZM)))throw new xg("Labels must have a property 'text'.",null,e);if(!c.lc())throw new xg("A label's 'text' property must be a string.",c,e);if(Ky(o=new _u(c.lc().a),(ZL(),oX),e),mp(t.f,o,e),$C(e,o),_N(e,o),dl(n,9)?Lf(Vf(n,9).c,o):dl(n,12)?Lf(Vf(n,12).b,o):dl(n,7)&&Lf(Vf(n,7).c,o),dl(n,12))switch(a=Vf(kx(o,pj),107),$C(e,o),Ky(o,pj,a),i=Vf(kx(r,qU),18),a.e){case 2:case 3:i.ib((KA(),eU));case 1:case 0:i.ib((KA(),JV)),Ky(o,pj,(Gm(),DR))}}}function PI(t,e){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v;for(i=0,o=0,c=new Kn(t.a);c.a.5?v-=2*o*(d-.5):d<.5&&(v+=2*i*(.5-d)),v<(r=a.e.b)&&(v=r),g=a.e.c,v>p.a-g-u&&(v=p.a-g-u),a.i.a=e+v}}function RI(){RI=a,nB=new Ji,eB=bO(Tx(Mo(NR,1),GS,79,0,[(JL(),aj),wj])),QF=bO(Tx(Mo(NR,1),GS,79,0,[Dj,Yj,($L(),fW),mj,(ZL(),pX),pW,sW])),qF=bO(Tx(Mo(NR,1),GS,79,0,[cj,fj,Sj,yj,_j,Cj,Tj,qj,Zj,Ej,FX,UX,XX,nW,$X,rW,dW,cW,HX])),KF=bO(Tx(Mo(NR,1),GS,79,0,[Ij,Oj,Nj,Jj,Mj,gX,DU,AU,mX,uW,ZX,eW])),$F=bO(Tx(Mo(NR,1),GS,79,0,[Vj,sj,gj,vj,pj,bj,xj,Pj,Rj,jj,Gj,Fj,Hj,zj,BX,VX,iW,WX,zX,oW,aW,KX,QX,tW,lW,hW,gW,vW,JX])),ZF=bO(Tx(Mo(NR,1),GS,79,0,[Lj,$j,Kj,YX])),tB=bO(Tx(Mo(NR,1),GS,79,0,[oj,lj,kj,Aj,Bj,Xj])),JF=bO(Tx(Mo(NR,1),GS,79,0,[(Mx(),UF)]))}function jI(t){var e,n,r,i,o,a,s;for(e=0,o=new Kn(t.b.a);o.a0;){for(Ey(0,s.c.length),d=Vf(s.c[0],12),Ey(0,h.c.length),i=Qy((r=Vf(h.c[0],12)).d.b,r,0),Wv(d,r.d,i),hv(r,null),lv(r,null),f=d.a,e&&If(f,new Zc(v)),n=Ok(r.a,0);n.b!=n.d.c;)If(f,new Zc(Vf(Ob(n),10)));for(p=d.b,l=new Kn(r.b);l.a0?Lw(this,this.f/this.a):null!=ul(e.g,e.d[0]).a&&null!=ul(n.g,n.d[0]).a?Lw(this,(oo(ul(e.g,e.d[0]).a)+oo(ul(n.g,n.d[0]).a))/2):null!=ul(e.g,e.d[0]).a?Lw(this,ul(e.g,e.d[0]).a):null!=ul(n.g,n.d[0]).a&&Lw(this,ul(n.g,n.d[0]).a)}function HI(t,e){var n,r,i,o,a,s,c,u,l,h,f;switch(t.g.e){case 1:if(r=Vf(kx(t,(ZL(),oX)),12),(n=Vf(kx(r,aX),44))?io(oo(Oh(kx(r,wX))))&&(n=Nx(n)):n=new Br,u=Vf(kx(t,eX),7),e<=(l=Um(Tx(Mo(pR,1),KM,10,0,[u.f.i,u.i,u.a]))).a)return l.b;if(Mb(n,l,n.a,n.a.a),h=Vf(kx(t,nX),7),(f=Um(Tx(Mo(pR,1),KM,10,0,[h.f.i,h.i,h.a]))).a<=e)return f.b;for(Mb(n,f,n.c.b,n.c),a=Vf(Ob(c=Ok(n,0)),10),s=Vf(Ob(c),10);s.a=2)for(Mp(t.a),r=0,f=Ok(n,0);f.b!=f.d.c;)h=Vf(Ob(f),10),0==r?(e=Mh(Mh(new ts(h.a,h.b),t.c.i),t.c.f.i),t.c.a.a=e.a,t.c.a.b=e.b):r==n.b-1?(e=Mh(Mh(new ts(h.a,h.b),t.d.i),t.d.f.i),t.d.a.a=e.a,t.d.a.b=e.b):If(t.a,h),++r;if(l)for(c=Ok(t.a,0);c.b!=c.d.c;)s=Vf(Ob(c),10),a.a=Bo(a.a,s.a),a.b=Bo(a.b,s.b);for(o=new Kn(t.b);o.a0&&Ky(a,jU,(Ud(),Ud(),AW)),(s=Vf(kx(a,(JL(),Hj)),28))==(bN(),_G)||s!=EG&&r.ib((KA(),oU)),io(oo(Oh(kx(a,fj))))&&r.ib((KA(),tU)),io(oo(Oh(kx(a,Ej))))&&(r.ib((KA(),iU)),r.ib(rU),Ky(a,Hj,EG)),a}function VI(t,e){e.V()&&Of(t.n,!0,!0,!0,!0),e.t((wL(),GG))&&Of(t.n,!0,!0,!0,!1),e.t(MG)&&Of(t.n,!1,!0,!0,!0),e.t(XG)&&Of(t.n,!0,!0,!1,!0),e.t(qG)&&Of(t.n,!0,!1,!0,!0),e.t(FG)&&Of(t.n,!1,!0,!0,!1),e.t(DG)&&Of(t.n,!1,!0,!1,!0),e.t(WG)&&Of(t.n,!0,!1,!1,!0),e.t(UG)&&Of(t.n,!0,!1,!0,!1),e.t(zG)&&Of(t.n,!0,!0,!0,!0),e.t(RG)&&Of(t.n,!0,!0,!0,!0),e.t(zG)&&Of(t.n,!0,!0,!0,!0),e.t(PG)&&Of(t.n,!0,!0,!0,!0),e.t(VG)&&Of(t.n,!0,!0,!0,!0),e.t(YG)&&Of(t.n,!0,!0,!0,!0),e.t(HG)&&Of(t.n,!0,!0,!0,!0)}function UI(t,e){var n,r,i,o,a,s,c,u,l;for(s=!0,i=0,c=t.f[e.k],u=e.j.b+t.n,n=t.c[e.k][2],Kb(t.a,c,qE(Vf(pd(t.a,c),24).a-1+n)),Kb(t.b,c,oo(Ih(pd(t.b,c)))-u+n*t.e),++c>=t.i?(++t.i,Lf(t.a,qE(1)),Lf(t.b,u)):(r=t.c[e.k][1],Kb(t.a,c,qE(Vf(pd(t.a,c),24).a+1-r)),Kb(t.b,c,oo(Ih(pd(t.b,c)))+u-r*t.e)),(t.q==(nA(),tY)&&(Vf(pd(t.a,c),24).a>t.j||Vf(pd(t.a,c-1),24).a>t.j)||t.q==rY&&(oo(Ih(pd(t.b,c)))>t.k||oo(Ih(pd(t.b,c-1)))>t.k))&&(s=!1),o=Sg(XE(e));t_(o);)a=Vf(Tv(o),12).c.f,t.f[a.k]==c&&(i+=Vf((l=UI(t,a)).a,24).a,s=s&&io(oo(Oh(l.b))));return t.f[e.k]=c,new es(qE(i+=t.c[e.k][0]),(Ud(),s?AW:TW))}function XI(t,e,n){var r,i,o,a,s,c,u,l,h,f,d,g,p,v,b;if(f=new Zc(t.j),b=e.a/f.a,s=e.b/f.b,p=e.a-f.a,o=e.b-f.b,n)for(i=$c(kx(t,(JL(),Hj)))===$c((bN(),wG)),g=new Kn(t.f);g.a=1&&(v-a>0&&h>=0?(c.i.a+=p,c.i.b+=o*a):v-a<0&&l>=0&&(c.i.a+=p*v,c.i.b+=o));t.j.a=e.a,t.j.b=e.b,Ky(t,(JL(),$j),(L_(),new $f(r=Vf(ia(lF),11),Vf(Og(r,r.length),11),0)))}function WI(t){var e,n,r,i,o,a,s,c,u,l;for(r=new Re,a=new Kn(t.e.a);a.a-1){for(r=Ok(a,0);r.b!=r.d.c;)(n=Vf(Ob(r),77)).n=o;for(;0!=a.b;)for(e=new Kn((n=Vf(rN(a,0),77)).d);e.a0),o.a.sb(o.c=--o.b),ef(o,n),Cg(c,n),IT(n,s.g),tb(c),tb(c),r.a.eb(n)}}function JI(t){var e,n,r,i,o,a,s,c;for(e=null,r=new Kn(t);r.a0&&0==n.c&&(!e&&(e=new Re),e.c[e.c.length]=n);if(e)for(;0!=e.c.length;){if((n=Vf(yy(e,0),102)).b&&n.b.c.length>0)for(!n.b&&(n.b=new Re),o=new Kn(n.b);o.aQy(t,n,0))return new es(i,n)}else if(oo(ul(i.g,i.d[0]).a)>oo(ul(n.g,n.d[0]).a))return new es(i,n);for(s=(!n.e&&(n.e=new Re),n.e).mb();s.G();)!(a=Vf(s.H(),102)).b&&(a.b=new Re),xy(0,(c=a.b).c.length),Ac(c.c,0,n),a.c==c.c.length&&(e.c[e.c.length]=a)}return null}function tL(t,e){var n,r,i,o,a,s,c,u,l;if(1!=tp(WE(e))||Vf(Vv(WE(e)),12).d.f.g!=(RN(),jB))return null;for(fr(n=(o=Vf(Vv(WE(e)),12)).d.f,(RN(),DB)),Ky(n,(ZL(),eX),null),Ky(n,nX,null),Ky(n,(JL(),Hj),Vf(kx(e,Hj),28)),Ky(n,Lj,Vf(kx(e,Lj),86)),i=kx(o.c,oX),a=null,u=wC(n,(wL(),LG)).mb();u.G();)if(0!=(s=Vf(u.H(),7)).e.c.length){Ky(s,oX,i),l=o.c,s.j.a=l.j.a,s.j.b=l.j.b,s.a.a=l.a.a,s.a.b=l.a.b,ox(s.c,l.c),l.c.c=Ny(NP,GS,1,0,4,1),a=s;break}if(Ky(o.c,oX,null),!ab(wC(e,LG)))for(c=new Kn(qb(wC(e,LG)));c.a0?i+t.i[1]*e+t.n[1]:0,t.o[3]>0?i+t.i[3]*e+t.n[3]:0),Bo(t.o[4]>0?n+t.i[4]*e+t.n[4]:0,t.o[2]>0?n+t.i[2]*e+t.n[2]:0))}(t,t.k);break;case 4:r=new Zc(a);break;case 5:r=function(t,e){var n,r,i,o,a;for(a=new uo,o=new Kn(fN(t));o.a0&&(o.a=Bo(o.a,i+t.q.b+t.q.c)),n>0&&(o.b=Bo(o.b,n+t.q.d+t.q.a))):(i>0&&(o.a=Bo(o.a,i)),n>0&&(o.b=Bo(o.b,n)))),function(t,e){t.e.j.a=e.a,t.e.j.b=e.b}(t.e,o)}}function nL(t,e,n){var r,i,o,a,s,c,u,l,h,f,d;if(!t.b)return!1;for(a=null,f=null,i=1,(c=new Uy(null,null)).a[1]=t.b,h=c;h.a[i];)u=i,s=f,f=h,h=h.a[i],i=(r=t.a.$b(e,h.d))<0?0:1,0==r&&(!n.c||Ap(h.e,n.d))&&(a=h),h&&h.b||Xo(h.a[i])||(Xo(h.a[1-i])?f=f.a[u]=mm(h,i):Xo(h.a[1-i])||(d=f.a[1-u])&&(Xo(d.a[1-u])||Xo(d.a[u])?(o=s.a[1]==f?1:0,Xo(d.a[u])?s.a[o]=eb(f,u):Xo(d.a[1-u])&&(s.a[o]=mm(f,u)),h.b=s.a[o].b=!0,s.a[o].a[0].b=!1,s.a[o].a[1].b=!1):(f.b=!1,d.b=!0,h.b=!0)));return a&&(n.b=!0,n.d=a.e,h!=a&&(function(t,e,n,r){var i,o;for(i=null==(o=e).d||t.a.$b(n.d,o.d)>0?1:0;o.a[i]!=n;)o=o.a[i],i=t.a.$b(n.d,o.d)>0?1:0;o.a[i]=r,r.b=n.b,r.a[0]=n.a[0],r.a[1]=n.a[1],n.a[0]=null,n.a[1]=null}(t,c,a,l=new Uy(h.d,h.e)),f==a&&(f=l)),f.a[f.a[1]==h?1:0]=h.a[h.a[0]?0:1],--t.c),t.b=c.a[1],t.b&&(t.b.b=!1),n.b}function rL(t){var e,n,r,i,o,a,s,c,u,l,h,f,d,g;for(f=new Kn(t);f.a(b=r?Vf(kx(l,sz),24).a:kS)?c:b,w=new Kn(l.f);w.a=u&&x>=v&&(f+=g.i.b+p.i.b+p.a.b-m,++s));if(n)for(a=new Kn(y.b);a.a=u&&x>=v&&(f+=g.i.b+p.i.b+p.a.b-m,++s))}s>0&&(E+=f/s,++d)}d>0?(e.a=i*E/d,e.i=d):(e.a=0,e.i=0)}function sL(t,e){var n;if(t.e)throw new ko((Fh(vB),"The "+vB.j+vD));if(!function(t,e){return Wl(t.c,e)}(t.a,e))throw new Ai("The direction "+e+" is not supported by the CGraph instance.");if(e==t.d)return t;switch(n=t.d,t.d=e,n.e){case 0:switch(e.e){case 2:yx(t);break;case 1:nk(t),yx(t);break;case 4:HN(t),yx(t);break;case 3:HN(t),nk(t),yx(t)}break;case 2:switch(e.e){case 1:nk(t),uO(t);break;case 4:HN(t),yx(t);break;case 3:HN(t),nk(t),yx(t)}break;case 1:switch(e.e){case 2:nk(t),uO(t);break;case 4:nk(t),HN(t),yx(t);break;case 3:nk(t),HN(t),nk(t),yx(t)}break;case 4:switch(e.e){case 2:HN(t),yx(t);break;case 1:HN(t),nk(t),yx(t);break;case 3:nk(t),uO(t)}break;case 3:switch(e.e){case 2:nk(t),HN(t),yx(t);break;case 1:nk(t),HN(t),nk(t),yx(t);break;case 4:nk(t),uO(t)}}return t}function cL(t,e,n){var r,i,o,a,s,c,u,l;if(!t.a[e.d.k][e.k].e){for(t.a[e.d.k][e.k].e=!0,t.a[e.d.k][e.k].b=0,t.a[e.d.k][e.k].d=0,t.a[e.d.k][e.k].a=null,l=new Kn(e.f);l.a0&&(t.a[e.d.k][e.k].d+=LT(t.e,24)*KD*.07000000029802322-.03500000014901161,t.a[e.d.k][e.k].a=t.a[e.d.k][e.k].d/t.a[e.d.k][e.k].b)}}function uL(t,e){var n,r,i,o,a,s,c,u,l,h;for(r=new Kn(t.a.c);r.adD||e.k==xz&&uv?u:v}for(n.e.b+=u-s.b,h=new Kn(t.a);h.a1;)e=zo(i,t.c),fr(l=new Nk(t.e.c),(RN(),DB)),Ky(l,(JL(),Hj),Vf(kx(c,Hj),28)),Ky(l,Lj,Vf(kx(c,Lj),86)),l.k=t.e.b++,Lf(t.b,l),l.j.b=c.j.b,l.j.a=e,Bh(h=new NN,(wL(),LG)),cv(h,c),h.i.a=l.j.a,h.i.b=l.j.b/2,Bh(f=new NN,KG),cv(f,l),f.i.b=l.j.b/2,f.i.a=-f.j.a,hv(d=new jp,h),lv(d,f),c=l,Lf(t.e.c.b,c),--u,i-=t.c+t.e.d;for(new yN(t.d,t.b,t.c),a=new Kn(r);a.ae.a||e.p>t.a)){for(n=0,r=0,s=new Un(new Vn(t.o.a).a.bb().mb());s.a.G();)i=Vf(s.a.H(),21),o=Vf(i.yb(),7),c_(Um(Tx(Mo(pR,1),KM,10,0,[o.f.i,o.i,o.a])).b,e.p,e.a)&&++n;for(c=new Un(new Vn(t.g.a).a.bb().mb());c.a.G();)i=Vf(c.a.H(),21),o=Vf(i.yb(),7),c_(Um(Tx(Mo(pR,1),KM,10,0,[o.f.i,o.i,o.a])).b,e.p,e.a)&&--n;for(u=new Un(new Vn(e.o.a).a.bb().mb());u.a.G();)i=Vf(u.a.H(),21),o=Vf(i.yb(),7),c_(Um(Tx(Mo(pR,1),KM,10,0,[o.f.i,o.i,o.a])).b,t.p,t.a)&&++r;for(a=new Un(new Vn(e.g.a).a.bb().mb());a.a.G();)i=Vf(a.a.H(),21),o=Vf(i.yb(),7),c_(Um(Tx(Mo(pR,1),KM,10,0,[o.f.i,o.i,o.a])).b,t.p,t.a)&&--r;n1)for(c=Ok(Yf(wC(e,KG)),0);c.b!=c.d.c;)0==(s=Vf(Ob(c),7)).b.c.length?(Bh(i=new NN,KG),i.j.a=s.j.a,i.j.b=s.j.b,cv(i,r),Ky(i,oX,kx(s,oX)),cv(s,null)):cv(a,r);return Ky(e,oX,null),Ky(e,SU,TW),fr(e,DB),Ky(r,(JL(),Hj),Vf(kx(e,Hj),28)),Ky(r,Lj,Vf(kx(e,Lj),86)),Sd(t.b,0,r),r}function bL(t,e,n,r,i,o,a){var s,c,u,l,h,f;switch(h=n,fr(u=new Nk(a),(RN(),PB)),Ky(u,(ZL(),WU),i),Ky(u,(JL(),Hj),(bN(),wG)),Ky(u,iX,Vf(kx(t,Mj),15)),!(c=Vf(kx(t,Bj),10))&&(c=new ts(i.a/2,i.b/2)),Ky(u,Bj,c),cv(l=new NN,u),e!=EG&&e!=_G||(s=o!=(_E(),IR)?o:OR,h=r>0?h_(s):vE(h_(s)),Ky(t,Vj,h)),h.e){case 4:Ky(u,($L(),tW),(Xk(),OX)),Ky(u,YU,(Px(),RV)),u.j.b=i.b,Bh(l,(wL(),LG)),l.i.b=c.b;break;case 2:Ky(u,($L(),tW),(Xk(),LX)),Ky(u,YU,(Px(),DV)),u.j.b=i.b,Bh(l,(wL(),KG)),l.i.b=c.b;break;case 1:Ky(u,KU,(jw(),EU)),u.j.a=i.a,Bh(l,(wL(),ZG)),l.i.a=c.a;break;case 3:Ky(u,KU,(jw(),mU)),u.j.a=i.a,Bh(l,(wL(),SG)),l.i.a=c.a}if(e==yG||e==mG||e==wG){switch(f=0,h.e){case 4:case 2:case 1:case 3:f=null.cd,e==mG&&(f/=null.cd)}Ky(u,dX,f)}return Ky(u,XU,h),u}function yL(t){var e,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w;for(u=new Br,El(),mp(b=new kr,t,VN(t)),Cw(2,dM),r=new cw(2),t.c&&Lf(r,t.c),t.d&&Lf(r,t.d),d=new Kn(r);d.a1&&Mb(u,g,u.c.b,u.c),Mw(n)));g=p}return u}function wL(){var t;wL=a,$G=new ys(GM,0),SG=new ys("NORTH",1),LG=new ys("EAST",2),ZG=new ys("SOUTH",3),KG=new ys("WEST",4),zp(),jG=new Ko(new $f(t=Vf(ia(iF),11),Vf(Og(t,t.length),11),0)),GG=GE(tg(SG,Tx(Mo(iF,1),BS,32,0,[]))),MG=GE(tg(LG,Tx(Mo(iF,1),BS,32,0,[]))),XG=GE(tg(ZG,Tx(Mo(iF,1),BS,32,0,[]))),qG=GE(tg(KG,Tx(Mo(iF,1),BS,32,0,[]))),zG=GE(tg(SG,Tx(Mo(iF,1),BS,32,0,[ZG]))),RG=GE(tg(LG,Tx(Mo(iF,1),BS,32,0,[KG]))),UG=GE(tg(SG,Tx(Mo(iF,1),BS,32,0,[KG]))),FG=GE(tg(SG,Tx(Mo(iF,1),BS,32,0,[LG]))),WG=GE(tg(ZG,Tx(Mo(iF,1),BS,32,0,[KG]))),DG=GE(tg(LG,Tx(Mo(iF,1),BS,32,0,[ZG]))),YG=GE(tg(SG,Tx(Mo(iF,1),BS,32,0,[LG,KG]))),PG=GE(tg(LG,Tx(Mo(iF,1),BS,32,0,[ZG,KG]))),VG=GE(tg(SG,Tx(Mo(iF,1),BS,32,0,[ZG,KG]))),BG=GE(tg(SG,Tx(Mo(iF,1),BS,32,0,[LG,ZG]))),HG=GE(tg(SG,Tx(Mo(iF,1),BS,32,0,[LG,ZG,KG])))}function mL(t,e,n){var r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m;if(Ky(l=new Fw,XF,e),mp(t.e,e,l),Ky(l,(ZL(),lX),n),t.d&&fC(t.d,l,!1),_N(e,l),rD in e.a&&(v=l.a,b=Vf(Op(e,rD),69),(p=Vf(Op(b,"left"),104))&&(v.b=p.a),(w=Vf(Op(b,"top"),104))&&(v.d=w.a),(y=Vf(Op(b,"right"),104))&&(v.c=y.a),(i=Vf(Op(b,XM),104))&&(v.a=i.a)),h=new $f(r=Vf(ia(yU),11),Vf(Og(r,r.length),11),0),Ky(l,qU,h),null==t.g&&(t.g=Oh(kx(l,(Xp(),rB)))),iD in e.a){if(!(m=Op(e,iD)).hc())throw new xg("The 'children' property of nodes must be an array.",m,e);if((u=m.hc()).a.length>0){for(n&&Ky(n,rX,l),s=Ny(BB,oD,9,u.a.length,0,1),d=0;d1)for(Lf(o,new MI(d,y,n)),h=new Un(new Vn(y.a).a.bb().mb());h.a.G();)u=Vf(h.a.H(),21),Gy(i,Vf(u.yb(),27).b);if(a.a.Y()>1)for(Lf(o,new MI(d,a,n)),h=new Un(new Vn(a.a).a.bb().mb());h.a.G();)u=Vf(h.a.H(),21),Gy(i,Vf(u.yb(),27).b)}}function kL(t,e){var n,r,i,o,a,s,c,u,l;switch(xb(o=qb(Xf(e,new Jf(t))),new te),(i=t.b).c){case 2:Tg(e,new UC(r=function(t,e,n,r){var i,o,a,s,c;for(c=0,o=new Kn(t.a.b);o.a.5&&i<50;)e=Ta(WN(n,r=hA(n),!0).a),++i;return WN(t,(Bd(o=Ih(sk(Yf(t.g),Yf(t.g).b-1))),o-r),!1)}(h);break;case 2:case 4:h.a=w,y=function(t){var e,n,r,i,o;for(n=EO(vI(t)),e=jD,i=0,r=0;e>.5&&i<50;)e=Ta(WN(n,r=fA(n),!0).b),++i;return WN(t,(Bd(o=Ih(sk(Yf(t.g),Yf(t.g).b-1))),o-r),!1)}(h);break;default:return null}return dr(h,new MC(Tx(Mo(pR,1),KM,10,0,[c,w,y,g,v]))),h}(t.a.c,e,t.a.d,r,Mk(t.b),n),pm(t.a.a,R_(s)),a=sC(t.a.b,s.a,t.b),tv(i=new Pb((!s.k&&(s.k=new yC(vm(s))),s.k))),a?Zg(i,a):i}(t,a=um(n=Ru(Xf(o,new kn(i.a))))?Vf(Cy(n),91).b:15,um(n=Ru(Xf(o,new kn(Mk(i)))))?Vf(Cy(n),91).b:15,um(n=Ru(Xf(o,new kn(i.b))))?Vf(Cy(n),91).b:15),t.c,t.e,t.a.c.f,i.a)),Tg(e,new UC(r,t.c,t.e,t.a.c.f,Mk(i))),Tg(e,new UC(r,t.c,t.e,t.a.c.f,i.b));break;case 1:Tg(e,new UC(r=function(t,e,n){var r,i,o,a,s,c;for(c=t.b,o=0,i=new Kn(t.a.b);i.a0)if(r=l.Y(),c=mv(Math.floor((r+1)/2))-1,i=mv(Math.ceil((r+1)/2))-1,e.k==Ez)for(u=i;u>=c;u--)e.a[w.k]==w&&(g=Vf(l.sb(u),27),d=Vf(g.a,9),!ka(n,g.b)&&f>t.b.e[d.k]&&(e.a[d.k]=w,e.f[w.k]=e.f[d.k],e.a[w.k]=e.f[w.k],f=t.b.e[d.k]));else for(u=c;u<=i;u++)e.a[w.k]==w&&(v=Vf(l.sb(u),27),p=Vf(v.a,9),!ka(n,v.b)&&f0||n.k==Ez&&iv?d:v):n.n[e.k]=r>(d>v?d:v)?r:d>v?d:v)):(p=t.d.f,g=ym(t,n.i[e.k]),f=ym(t,n.i[h.k]),n.k==Ez?Xv(g,f,oo(n.n[e.k])+oo(n.d[a.k])+a.j.b+a.e.a+p-(oo(n.n[h.k])+oo(n.d[u.k])-u.e.d)):Xv(g,f,oo(n.n[e.k])+oo(n.d[a.k])-a.e.d-oo(n.n[h.k])-oo(n.d[u.k])-u.j.b-u.e.a-p))):v=t.e.Ic(v,e,a),a=n.a[a.k]}while(a!=e);!function(t,e){Tg(t.b,e)}(t.e,e)}}function LL(t,e,n,r){var i,o,a,s,c,u,l,h,f,d,g,p,v,b;if(f=!1,h=!1,Us(Vf(kx(r,(JL(),Hj)),28))){a=!1,s=!1;t:for(g=new Kn(r.f);g.a=r.j.b/2}b?(v=Vf(kx(r,(ZL(),TX)),20))?f?o=v:(i=Vf(kx(r,PU),20))?o=v.Y()<=i.Y()?v:i:(o=new Re,Ky(r,PU,o)):(o=new Re,Ky(r,TX,o)):(i=Vf(kx(r,(ZL(),PU)),20))?h?o=i:(v=Vf(kx(r,TX),20))?o=i.Y()<=v.Y()?i:v:(o=new Re,Ky(r,TX,o)):(o=new Re,Ky(r,PU,o)),o.ib(t),Ky(t,(ZL(),RU),n),e.d==n?(lv(e,null),n.b.c.length+n.e.c.length==0&&cv(n,null)):(hv(e,null),n.b.c.length+n.e.c.length==0&&cv(n,null)),Mp(e.a)}function SL(t,e){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y;for((n=new kk(e)).a||function(t){var e,n,r,i,o;switch(i=Vf(pd(t.b,0),9),e=new Nk(t),Lf(t.b,e),e.j.a=Bo(1,i.j.a),e.j.b=Bo(1,i.j.b),e.i.a=i.i.a,e.i.b=i.i.b,Vf(kx(i,(ZL(),XU)),32).e){case 4:e.i.a+=2;break;case 1:e.i.b+=2;break;case 2:e.i.a-=2;break;case 3:e.i.b-=2}cv(r=new NN,e),hv(n=new jp,o=Vf(pd(i.f,0),7)),lv(n,r),Sh(Lc(r.i),o.i),Sh(Lc(r.a),o.a)}(e),u=function(t){var e,n,r,i,o,a,s;for(s=new Cb,a=new Kn(t.b);a.a=s.b.c)&&(s.b=e),(!s.c||e.c<=s.c.c)&&(s.d=s.c,s.c=e),(!s.e||e.d>=s.e.d)&&(s.e=e),(!s.f||e.d<=s.f.d)&&(s.f=e);return r=new hk((jm(),yB)),Lb(t,CB,new Qn(Tx(Mo(bB,1),GS,160,0,[r]))),a=new hk(xB),Lb(t,NB,new Qn(Tx(Mo(bB,1),GS,160,0,[a]))),i=new hk(wB),Lb(t,kB,new Qn(Tx(Mo(bB,1),GS,160,0,[i]))),o=new hk(mB),Lb(t,_B,new Qn(Tx(Mo(bB,1),GS,160,0,[o]))),cA(r.c,yB),cA(i.c,wB),cA(o.c,mB),cA(a.c,xB),s.a.c=Ny(NP,GS,1,0,4,1),ox(s.a,r.c),ox(s.a,Om(i.c)),ox(s.a,o.c),ox(s.a,Om(a.c)),s}(u)),n}function ML(t,e){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,_,k,N,C;return h=function(t,e){var n,r,i,o,a,s,c,u,l,h,f;if(t.V())return new uo;for(c=0,l=0,r=t.mb();r.G();)c=Bo(c,(i=Vf(r.H(),55).e).a),l+=i.a*i.b;for(c=Bo(c,Math.sqrt(l)*Vf(kx(Vf(t.mb().H(),55),(ZL(),AU)),15).a),h=0,f=0,s=0,n=e,a=t.mb();a.G();)h+(u=(o=Vf(a.H(),55)).e).a>c&&(h=0,f+=s+e,s=0),iO(o,h,f),n=Bo(n,h+u.a),s=Bo(s,u.b),h+=u.a+e;return new ts(n+e,f+s+e)}(fl(t,(wL(),jG)),e),g=Ik(fl(t,GG),e),m=Ik(fl(t,XG),e),k=Lk(fl(t,qG),e),f=Lk(fl(t,MG),e),y=Ik(fl(t,UG),e),p=Ik(fl(t,FG),e),E=Ik(fl(t,WG),e),x=Ik(fl(t,DG),e),N=Lk(fl(t,RG),e),b=Ik(fl(t,zG),e),w=Ik(fl(t,YG),e),_=Ik(fl(t,PG),e),C=Lk(fl(t,VG),e),d=Lk(fl(t,BG),e),v=Ik(fl(t,HG),e),n=xw(Tx(Mo(sq,1),TS,26,12,[y.a,k.a,E.a,C.a])),r=xw(Tx(Mo(sq,1),TS,26,12,[g.a,h.a,m.a,v.a])),i=b.a,o=xw(Tx(Mo(sq,1),TS,26,12,[p.a,f.a,x.a,d.a])),u=xw(Tx(Mo(sq,1),TS,26,12,[y.b,g.b,p.b,w.b])),c=xw(Tx(Mo(sq,1),TS,26,12,[k.b,h.b,f.b,v.b])),l=N.b,s=xw(Tx(Mo(sq,1),TS,26,12,[E.b,m.b,x.b,_.b])),vy(fl(t,jG),n+i,u+l),vy(fl(t,HG),n+i,u+l),vy(fl(t,GG),n+i,0),vy(fl(t,XG),n+i,u+l+c),vy(fl(t,qG),0,u+l),vy(fl(t,MG),n+i+r,u+l),vy(fl(t,FG),n+i+r,0),vy(fl(t,WG),0,u+l+c),vy(fl(t,DG),n+i+r,u+l+c),vy(fl(t,RG),0,u),vy(fl(t,zG),n,0),vy(fl(t,PG),0,u+l+c),vy(fl(t,BG),n+i+r,0),(a=new uo).a=xw(Tx(Mo(sq,1),TS,26,12,[n+r+i+o,N.a,w.a,_.a])),a.b=xw(Tx(Mo(sq,1),TS,26,12,[u+c+l+s,b.b,C.b,d.b])),a}function DL(t,e){var n,r,i,o,a,s,c,u,l,h,f,d,g,p;if(r=new Br,u=null,(d=(g=t.c).f.g)!=(RN(),GB)&&d!=FB)throw new so("The target node of the edge must be a normal node or a northSouthPort.");for(d==FB&&(f=Vf(kx(g,(ZL(),oX)),7),u=new ts(Um(Tx(Mo(pR,1),KM,10,0,[f.f.i,f.i,f.a])).a,Um(Tx(Mo(pR,1),KM,10,0,[g.f.i,g.i,g.a])).b),g=f),cs(r,Um(Tx(Mo(pR,1),KM,10,0,[g.f.i,g.i,g.a]))),a=Bo(5,A_(g.f,g.g)),(h=new mg(eN(g.g))).a*=a,h.b*=a,If(r,Sh(h,Um(Tx(Mo(pR,1),KM,10,0,[g.f.i,g.i,g.a])))),u&&Mb(r,u,r.c.b,r.c),o=t,c=t,s=null,n=!1;o;)0!=(i=o.a).b&&(n?(If(r,al(Sh(s,(Lu(0!=i.b),Vf(i.a.a.c,10))),.5)),n=!1):n=!0,s=mu((Lu(0!=i.b),Vf(i.c.b.c,10))),pm(r,i),Mp(i)),c=o,o=Vf(Kc(vv(e.d,o)),12);(p=c.d).f.g==FB&&(f=Vf(kx(p,(ZL(),oX)),7),If(r,new ts(Um(Tx(Mo(pR,1),KM,10,0,[f.f.i,f.i,f.a])).a,Um(Tx(Mo(pR,1),KM,10,0,[p.f.i,p.i,p.a])).b)),p=f),a=Bo(5,A_(p.f,p.g)),al(h=new mg(eN(p.g)),a),If(r,Sh(h,Um(Tx(Mo(pR,1),KM,10,0,[p.f.i,p.i,p.a])))),cs(r,Um(Tx(Mo(pR,1),KM,10,0,[p.f.i,p.i,p.a]))),l=new JO(r),pm(t.a,R_(l))}function PL(t){var e,n,r,i,o,a,s,c,u,l,h,f,d,p;if($c(kx(t.c,(JL(),Hj)))===$c((bN(),mG))||$c(kx(t.c,Hj))===$c(wG))for(l=new Kn(t.c.f);l.a1&&(a=zo(a,Ta(Vf(sk(s.a,1),10).b-l.b)))));else for(g=new Kn(e.f);g.ai&&(o=f.a-i,a=yS,r.c=Ny(NP,GS,1,0,4,1),i=f.a),f.a>=i&&(r.c[r.c.length]=s,s.a.b>1&&(a=zo(a,Ta(Vf(sk(s.a,s.a.b-2),10).b-f.b)))));if(0!=r.c.length&&o>e.j.a/2&&a>e.j.b/2){for(cv(d=new NN,e),Bh(d,(wL(),SG)),d.i.a=e.j.a/2,cv(p=new NN,e),Bh(p,ZG),p.i.a=e.j.a/2,p.i.b=e.j.b,c=new Kn(r);c.a=u.b?hv(s,p):hv(s,d)):(u=Vf(xf(s.a),10),(0==s.a.b?Gv(s.c):Vf(Bl(s.a),10)).b>=u.b?lv(s,p):lv(s,d)),(h=Vf(kx(s,(JL(),kj)),44))&&m_(h,u,!0);e.i.a=i-e.j.a/2}}function jL(t,e){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w;for(b=new Re,y=new Re,w=new Re,o=new Kn(e);o.a50?b.c[b.c.length]=i:i.k>0?y.c[y.c.length]=i:w.c[w.c.length]=i;if(1==y.c.length&&0==b.c.length&&(ox(b,y),y.c=Ny(NP,GS,1,0,4,1)),0!=b.c.length&&Wl(su(t.a),(CL(),Zz))&&Wl(su(t.a),(CL(),Kz))?function(t,e){var n,r,i;for(r=new Kn(e);r.a1&&(dC(i,p=Vf(Tw(c),60),!0),fg(l),ov(t.a,p))}for(f=w.c.length,r=function(t){var e,n,r,i;switch(cu(t.a).c){case 4:return CL(),Kz;case 3:return Vf(function(t){var e;return CL(),CL(),e=Vz,t.d&&BC(t),function(){throw new Kr}(),e}(t.a).mb().H(),60);case 2:return e=Vf(Qb(n=new Xs(r=cu(t.a))),60),i=Vf(Qb(n),60),pA(e)==i?Wl(r,(CL(),Kz))?Uz:Kz:gA(gA(e))==i?gA(e):vA(e);case 1:return pA(Vf(Qb(new Xs(r=cu(t.a))),60));case 0:return CL(),Qz;default:return null}}(t),d=new Re,a=f/au(t.a).c|0,s=0;s3&&(ox(d,(CL(),CL(),zz)),g-=4),g){case 3:Lf(d,pA(r));case 2:v=gA(pA(r));do{v=gA(v)}while(!Wl(su(t.a),v));d.c[d.c.length]=v,v=vA(pA(r));do{v=vA(v)}while(!Wl(su(t.a),v));d.c[d.c.length]=v;break;case 1:Lf(d,pA(r))}for(h=new Kn(d),u=new Kn(w);h.ayM)&&s<10);po(t.c,new L),jI(t),function(t){sL(t,(_E(),AR)),t.e=!0}(t.c),function(t){var e,n,r,i,o,a,s;for(i=new Kn(t.a.b);i.a0,v=w.e.c.length>0,u&&v?f.c[f.c.length]=w:u?g.c[g.c.length]=w:v&&(y.c[y.c.length]=w);for(d=new Kn(g);d.a=p&&(w>p&&(g.c=Ny(NP,GS,1,0,4,1),p=w),g.c[g.c.length]=a);0!=g.c.length&&(d=Vf(pd(g,Zk(e,g.c.length)),77),A.a.eb(d),d.i=v++,aA(d,C,_),g.c=Ny(NP,GS,1,0,4,1))}for(x=t.c.length+1,s=new Kn(t);s.aT.i&&(up(n),Gy(T.d,r),r.c>0&&(r.a=T,Lf(T.j,r),r.b=k,Lf(k.d,r)))}function YL(t){switch(t.e){case 14:return new $;case 37:return new Q;case 8:return new Ki;case 30:return new Qi;case 38:return new tt;case 3:return new et;case 47:case 1:return new bn((Dx(),KB));case 4:return new nt;case 49:return new rt;case 23:return new ne;case 13:return new it;case 34:return new at;case 40:return new st;case 35:return new lt;case 44:return new Vu;case 28:return new ht;case 39:return new ft;case 27:return new dt;case 6:return new gt;case 31:return new yt;case 9:return new Ne;case 43:return new mt;case 17:return new xt;case 18:return new kt;case 29:return new Ce;case 11:return new St;case 12:return new Ct;case 36:return new Tt;case 46:case 0:return new bn((Dx(),$B));case 41:return new Ot;case 15:return new It;case 33:return new Lt;case 42:return new Dt;case 22:return new Pt;case 19:return new bt;case 10:return new At;case 7:return new jt;case 24:return new Gt;case 21:return new Ft;case 16:return new Ht;case 45:return new Yt;case 26:return new zt;case 20:return new Vt;case 25:return new Ut;case 5:return new Qt;case 32:return new Jt;case 48:case 2:return new bn((Dx(),ZB));default:throw new so("No implementation is available for the layout processor "+(null!=t.d?t.d:""+t.e))}}function zL(t,e,n){var r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,_,k,N,C,T,A,O;for(T=0,o=0,l=e[0].d,_=n[0].d,d=0,p=n.length;d0;){for(Lu(E.b>0),x=0,i=new Kn((w=Vf(E.a.sb(E.c=--E.b),7)).b);i.a0&&(w.g==(wL(),SG)?(t.a[w.k]=T,++T):(t.a[w.k]=T+b+y,++y),o+=x)}T+=y}else{for(v=0,m=new Kn(h.f);m.a0&&(++T,o+=v)}for(k=Ny(iq,vM,26,o,12,1),s=0,f=0,g=e.length;f0;)c%2>0&&(r+=A[c+1]),++A[c=(c-1)/2|0];return r}function VL(t,e){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,_,k,N,C,T,A,O,I;for(H_(e,"Compound graph postprocessor",1),n=io(oo(Oh(kx(t,($L(),FX))))),s=Vf(kx(t,(ZL(),BU)),144),h=new Ji,E=s.W().mb();E.G();){for(x=Vf(E.H(),12),xb(a=new df(s.U(x)),new cn(t)),C=cm((Ey(0,a.c.length),Vf(a.c[0],114))),A=sm(Vf(pd(a,a.c.length-1),114)),Mp(x.a),k=C.f,_=RE(A.f,k)?Vf(kx(k,rX),55):Kg(k),g=Vf(kx(x,(JL(),kj)),44),Ad(a,IB)?g?Mp(g):(g=new Br,Ky(x,kj,g)):g&&Ky(x,kj,null),v=null,o=new Kn(a);o.a_D,I=Ta(v.b-w.b)>_D,(!n&&O&&I||n&&(O||I))&&If(x.a,N)),pm(x.a,r),0==r.b?v=N:(Lu(0!=r.b),v=Vf(r.c.b.c,10)),(y=Vf(kx(b,kj),44))&&(Yx(d=new Br,0,y),Dm(d,m),pm(g,d)),sm(i)==A&&(Kg(A.f)!=i.a&&ST(m=new uo,Kg(A.f),_),Ky(x,CX,m)),p=new Kv(b.b,0);p.b1){x=Ny(DW,hS,15,t.a.length,0,1),u=Il(t.a.length),g=0,d=0,n=2*e.d.a.c.length+1;t:for(m=new Kn(e.f);m.a0?(x[w.k]=new Hn(C/(w.b.c.length+w.e.c.length)),g=Vo(g,x[w.k].a),d=Ho(d,x[w.k].a)):v&&(x[w.k]=new Hn(C))}for(p=(e.d?Qy(e.d.a,e,0):-1)+1,f=e.d.a.c.length+1,c=new Kn(u);c.an&&p.a.db(w,p);for(A=new Ji,v=new Ji,x=new Un(new Vn(T.a).a.bb().mb());x.a.G();)for(h=Vf(x.a.H(),21),w=Vf(h.yb(),9),a=1==e?WE(w):XE(w),Wu(),u=new Du(ju(Wf(a.a,new g)));t_(u);)c=Vf(Tv(u),12),Sc(w.d)!=Sc(c.d.f.d)&&Tg(A,c.d.f);for(E=new Un(new Vn(p.a).a.bb().mb());E.a.G();)for(h=Vf(E.a.H(),21),w=Vf(h.yb(),9),a=1==e?WE(w):XE(w),Wu(),u=new Du(ju(Wf(a.a,new g)));t_(u);)c=Vf(Tv(u),12),Sc(w.d)!=Sc(c.d.f.d)&&Tg(v,c.d.f);for(QB&&Df(),N=Vf(pd(t.d.c.c,r+(1==e?1:-1)),16),b=kS,y=yS,f=0;ff?b:f:v.a.R(w)&&(y=y1||tp(vu(new sb(FE(Tx(Mo(NP,1),GS,1,4,[y.b,y.e])))))>1)&&i.ib((KA(),rU)),$c(kx(g,($L(),zX)))===$c((lb(),XY))&&!(JM in e.a)){n=new Br;try{for(s=Op(e,JM).hc(),o=0;o0&&(t.a[F.k]=q++)}else{for(M=0,B=new Kn(C.f);B.a0&&++q}for(J=0,O=0,S=n.length;O0;){for(Lu(z.b>0),Y=0,s=new Kn((F=Vf(z.a.sb(z.c=--z.b),7)).b);s.a0&&(F.g==(wL(),SG)?(t.a[F.k]=J,++J):(t.a[F.k]=J+D+R,++R))}J+=R}else{for(M=0,B=new Kn(C.f);B.a0&&++J}for(El(),H=new kr,d=new Su,T=0,I=e.length;Tu.b&&(u.b=V)):F.f.d==W&&(Vu.c&&(u.c=V));for(Hk(g,0,g.length,(ec(),ec(),HW)),Q=Ny(iq,vM,26,g.length,12,1),r=Ny(iq,vM,26,J+1,12,1),v=0;v0;)E%2>0&&(i+=nt[E+1]),++nt[E=(E-1)/2|0];for(k=Ny(rz,GS,156,2*g.length,0,1),w=0;w0&&(45==t.charCodeAt(0)||43==t.charCodeAt(0))?1:0;eyS)throw new $o(_S+t+'"');return i}((si(),""+n.jc().a))),void Ky(t,f,p)}catch(t){throw dl(t=rE(t),130)?new zi("Invalid integer format for property '"+e+cD+n+")."):PE(t)}else{if(Vf(qF.a,18).kb(e)){if(!n.ic())throw new zi(sD+e+cD+n+").");return f=Vf(Vf(qF.b,57).cb(e),79),Ud(),void Ky(t,f,p=n.ic().a?AW:TW)}if(Vf(KF.a,18).kb(e)){if(!n.jc())throw new zi("Invalid float format for property '"+e+cD+n+").");return void Ky(t,f=Vf(Vf(KF.b,57).cb(e),79),p=new Bn(n.jc().a))}if(Vf($F.a,18).kb(e)){if(!n.lc())throw new zi(uD+e+cD+n+").");u=n.lc().a,l=null;try{cE((JL(),Vj),e)?(wL(),l=Vf(gE((fy(),JG),u),32)):cE(sj,e)?(fk(),l=Vf(gE((Sy(),CR),u),103)):cE(gj,e)?(_E(),l=Vf(gE((hy(),MR),u),59)):cE(vj,e)?(kE(),l=Vf(gE((zb(),UR),u),122)):cE(xj,e)?(NE(),l=Vf(gE((wb(),ij),u),166)):cE(Pj,e)||cE(Rj,e)||cE(jj,e)||cE(Gj,e)||cE(Fj,e)?(I_(),l=Vf(gE((dy(),bG),u),100)):cE(Hj,e)?(bN(),l=Vf(gE((Dy(),NG),u),28)):cE(zj,e)?(Rw(),l=Vf(gE((yb(),IG),u),149)):cE(bj,e)?(PN(),l=Vf(gE((My(),JR),u),133)):cE(pj,e)?(Gm(),l=Vf(gE((Yb(),FR),u),107)):cE(($L(),VX),e)?(Up(),l=Vf(gE((Fv(),LY),u),193)):cE(iW,e)?(fw(),l=Vf(gE((mb(),GY),u),173)):cE(WX,e)?(wN(),l=Vf(gE((vw(),VV),u),115)):cE(BX,e)?(Gw(),l=Vf(gE((Xb(),Az),u),194)):cE(zX,e)?(lb(),l=Vf(gE((Hv(),ZY),u),192)):cE(aW,e)?(nA(),l=Vf(gE((gw(),cY),u),109)):cE(oW,e)?(Uk(),l=Vf(gE((pw(),vz),u),141)):cE(lW,e)?(gC(),l=Vf(gE((Py(),xY),u),125)):cE(hW,e)?(Tb(),l=Vf(gE((Bv(),dY),u),175)):cE(KX,e)?(MN(),l=Vf(gE((tm(),QV),u),124)):cE(QX,e)?(NI(),l=Vf(gE((Bm(),wU),u),110)):cE(tW,e)?(Xk(),l=Vf(gE((bw(),DX),u),85)):cE(gW,e)?(M_(),l=Vf(gE((Iy(),xW),u),153)):cE(vW,e)?(Fm(),l=Vf(gE((Ly(),CW),u),172)):cE(JX,e)&&(cb(),l=Vf(gE((Wb(),TU),u),174))}catch(t){throw dl(t=rE(t),54)?new zi(uD+e+cD+n+")."):PE(t)}return void Ky(t,f=Vf(Vf($F.b,57).cb(e),79),l)}if(Vf(ZF.a,18).kb(e)){if(!n.lc())throw new zi(uD+e+cD+n+").");for(d=null,a=0,s=(c=FO(n.lc().a,"[\\[\\]\\s,]+")).length;a0&&Ex(e.charCodeAt(n-1),CM);)--n;if(r>=n)throw new so("The given string does not contain any numbers.");if(2!=(i=FO(e.substr(r,n-r),",|;|\r|\n")).length)throw new so("Exactly two numbers are expected, "+i.length+" were found.");try{t.a=SN(pN(i[0])),t.b=SN(pN(i[1]))}catch(t){throw dl(t=rE(t),130)?new so(TM+t):PE(t)}}(g=new uo,n.lc().a),void Ky(t,f=Vf(Vf(tB.b,57).cb(e),79),g)}catch(t){throw dl(t=rE(t),29)?new zi("Invalid KVector format for property '"+e+"' "+n+"."):PE(t)}else if(cE(lj,e)||cE(kj,e))try{return function(t,e){var n,r,i,o,a;r=FO(e,",|;|\\(|\\)|\\[|\\]|\\{|\\}| |\t|\n"),Mp(t);try{for(n=0,o=0,i=0,a=0;n0&&(o%2==0?i=SN(r[n]):a=SN(r[n]),o>0&&o%2!=0&&If(t,new ts(i,a)),++o),++n}catch(t){throw dl(t=rE(t),130)?new so("The given string does not match the expected format for vectors."+t):PE(t)}}(v=new Br,n.lc().a),void Ky(t,f=Vf(Vf(tB.b,57).cb(e),79),v)}catch(t){throw dl(t=rE(t),29)?new zi("Invalid KVectorChain format for property '"+e+"' "+n+"."):PE(t)}else if(cE(Aj,e)||cE(oj,e))try{return function(t,e){var n,r,i,o,a,s,c,u;for(o=0;o<(si(),e.length)&&_x(e.charCodeAt(o),NM);)++o;for(n=e.length;n>0&&_x(e.charCodeAt(n-1),CM);)--n;if(o1?Mv(this,t-1):this,e},eS.Pc=function(){return Fh(this),this.b},eS.Qc=function(){return na(this)},eS.Rc=function(){return ra(this)},eS.Sc=function(){return!!(4&this.g)},eS.Tc=function(){return!!(1&this.g)},eS.w=function(){return(2&this.g?"interface ":1&this.g?"":"class ")+(Fh(this),this.n)},eS.g=0,$T(119,72,{3:1,119:1,54:1,46:1},Ur),$T(29,72,ES,Xr,so),$T(95,72,dS,Wr,ao),$T(231,1,{3:1,231:1}),$T(24,231,{3:1,23:1,24:1,231:1},Mn),eS.F=function(t){return function(t,e){return Fu(t.a,e.a)}(this,Vf(t,24))},eS.t=function(t){return dl(t,24)&&Vf(t,24).a==this.a},eS.v=function(){return this.a},eS.w=function(){return ca(this.a)},eS.a=0,cS={3:1,345:1,23:1,2:1},$T(350,1,NS,ae),eS.$b=function(t,e){return function(t,e){return Np((si(),t.toLowerCase()),e.toLowerCase())}(Lh(t),Lh(e))},$T(257,95,dS,(function(t){ao.call(this,t)})),$T(145,1,{23:1,145:1}),eS.F=function(t){return function(t,e){return function(t,e){return Np((si(),t.toLowerCase()),e.toLowerCase())}(t.a,e.a)}(this,Vf(t,145))},eS.t=function(t){var e;return t===this||!!dl(t,145)&&(e=Vf(t,145),ji(this.a,e.a))},eS.v=function(){return dk(this.a)},eS.w=function(){return this.a},$T(358,29,ES,(function(t){so.call(this,(si(),null==t?gS:t))})),$T(256,29,{3:1,54:1,29:1,46:1,256:1},(function(t){so.call(this,(si(),null==t?gS:t))})),$T(185,145,CS),$T(289,185,CS,(function(t){Dn.call(this,t)})),eS.Zc=function(t,e,n){var r,i;for(r=Ny(aq,TS,26,n,12,1),i=0;in)throw new ao(AS)}for(a=Ny(aq,TS,26,o,12,1),l=0,s=0,c=0;c0;){if(128!=(192&(r=t[e+c++])))throw new so("Invalid UTF8 sequence at "+(e+c-1)+", byte="+(r>>>0).toString(16));i=i<<6|63&r}l+=Kk(i,a,l)}return a};var kP,NP=Fg(IS,"Object",1),CP=Fg(IS,"Throwable",46),TP=(Fg(IS,"Exception",54),Fg(IS,"RuntimeException",72),Fg(LS,"JavaScriptException",164),Fg(SS,"StackTraceCreator/Collector",642),Fg(SS,"StackTraceCreator/CollectorLegacy",356),Fg(SS,"StackTraceCreator/CollectorModern",643),Fg(SS,"StackTraceCreator/CollectorModernNoSourceMap",357),Fg(MS,"IOException",181),Fg(MS,"UnsupportedEncodingException",351),Fg(IS,"Class",288),Fg(IS,"ClassCastException",119),Fg(IS,"IllegalArgumentException",29),Fg(IS,"IndexOutOfBoundsException",95),Fg(IS,"Number",231),Fg(IS,"Integer",24)),AP=Fg(IS,"String",2);Fg(IS,"String/1",350),Fg(IS,"StringIndexOutOfBoundsException",257),Fg(DS,"Charset",145),Fg(DS,"IllegalCharsetNameException",358),Fg(DS,"UnsupportedCharsetException",256),Fg(PS,"EmulatedCharset",185),Fg(PS,"EmulatedCharset/LatinCharset",289),Fg(PS,"EmulatedCharset/UtfCharset",355),$T(669,1,{3:1}),Fg(RS,"Optional",669),$T(601,669,{3:1},c),eS.t=function(t){return t===this},eS.v=function(){return 2040732332},eS.w=function(){return"Optional.absent()"},eS.A=function(t){return Pd(t),ci(),kP},Fg(RS,"Absent",601);var OP=_d(RS,"Function");$T(208,1,{},co),eS.C=function(t){return Pg(t)},Fg(RS,"Joiner",208),$T(363,208,{},Qf),eS.C=function(t){return Nl(this,t)},Fg(RS,"Joiner/1",363),$T(362,1,{},nh),Fg(RS,"Joiner/MapJoiner",362);var IP,LP=_d(RS,"Predicate");$T(244,1,{68:1,244:1,3:1},Ge),eS.D=function(t){var e;for(e=0;e0},eS.H=function(){if(this.b>=this.c)throw new _i;return oa(this,this.b++)},eS.L=function(){return this.b},eS.M=function(){if(this.b<=0)throw new _i;return oa(this,--this.b)},eS.N=function(){return this.b-1},eS.b=0,eS.c=0,Fg(zS,"AbstractIndexedListIterator",378),$T(428,108,YS),eS.G=function(){return um(this)},eS.H=function(){return Cy(this)},eS.d=1,Fg(zS,"AbstractIterator",428),$T(653,1,{144:1}),eS.P=function(){return this.f||(this.f=this.S())},eS.T=function(){return new Sa(this.P())},eS.t=function(t){return zx(this,t)},eS.v=function(){return this.P().v()},eS.V=function(){return 0==this.Y()},eS.W=function(){return ig(this)},eS.w=function(){return this.P().w()},Fg(zS,"AbstractMultimap",653),$T(294,653,US),eS.Q=function(){Ak(this)},eS.R=function(t){return Xy(this.b,t)},eS.S=function(){return new Pa(this,this.b)},eS.T=function(){return new Ml(this,this.b)},eS.$=function(){return dl(t=this.Z(),137)?(zp(),new Ql(Vf(t,137))):dl(t,18)?(zp(),new Ko(Vf(t,18))):dl(t,20)?pv(Vf(t,20)):(zp(),new er(t));var t},eS.U=function(t){return qN(this,t)},eS.X=function(t){return iT(this,t)},eS.Y=function(){return this.c},eS.c=0,Fg(zS,"AbstractMapBasedMultimap",294),$T(600,294,US),eS.Z=function(){return new cw(this.a)},eS.$=function(){return op(),op(),YP},eS.U=function(t){return Vf(qN(this,t),20)},eS.X=function(t){return Vf(iT(this,t),20)},eS.P=function(){return this.f||(this.f=new Pa(this,this.b))},eS.t=function(t){return zx(this,t)},Fg(zS,"AbstractListMultimap",600),$T(388,1,XS),eS.G=function(){return this.b.b||this.d.G()},eS.H=function(){var t;return this.d.G()||((t=Vw(this.b)).yb(),this.a=Vf(t.zb(),19),this.d=this.a.mb()),this.d.H()},eS.I=function(){this.d.I(),this.a.V()&&Hy(this.b),--this.c.c},Fg(zS,"AbstractMapBasedMultimap/Itr",388),$T(389,388,XS,rm),Fg(zS,"AbstractMapBasedMultimap/1",389),$T(638,1,WS),eS.Q=function(){this.bb().Q()},eS._=function(t){return cN(this,t)},eS.R=function(t){return!!UN(this,t,!1)},eS.ab=function(t){var e,n;for(e=this.bb().mb();e.G();)if(n=Vf(e.H(),21).zb(),$c(t)===$c(n)||null!=t&&sE(t,n))return!0;return!1},eS.t=function(t){return NC(this,t)},eS.cb=function(t){return Kc(UN(this,t,!1))},eS.v=function(){return bx(this.bb())},eS.V=function(){return 0==this.Y()},eS.W=function(){return new Vn(this)},eS.db=function(t,e){throw new To("Put not supported on this map")},eS.eb=function(t){return Kc(UN(this,t,!0))},eS.Y=function(){return this.bb().Y()},eS.w=function(){return rC(this)},eS.fb=function(){return new Xn(this)},Fg(qS,"AbstractMap",638),$T(654,638,WS),eS.bb=function(){return og(this)},eS.W=function(){return this.d||(this.d=new Sa(this))},eS.fb=function(){return Xg(this)},Fg(zS,"Maps/ViewCachingAbstractMap",654),$T(262,654,WS,Pa),eS.cb=function(t){return function(t,e){var n;return(n=Vf(ck(t.a,e),19))?ak(t.b,e,n):null}(this,t)},eS.eb=function(t){return function(t,e){var n,r;return(n=Vf(Kd(t.a,e),19))?((r=t.b.Z()).jb(n),t.b.c-=n.Y(),n.Q(),r):null}(this,t)},eS.Q=function(){this.a==this.b.b?Ak(this.b):lg(new Ev(this))},eS.R=function(t){return bk(this.a,t)},eS.hb=function(){return new He(this)},eS.gb=function(){return this.hb()},eS.t=function(t){return this===t||NC(this.a,t)},eS.v=function(){return bx(new Yn(this.a))},eS.W=function(){return ig(this.b)},eS.Y=function(){return Hs(this.a)},eS.w=function(){return rC(this.a)},Fg(zS,"AbstractMapBasedMultimap/AsMap",262),$T(640,1,ZS),eS.ib=function(t){return function(){throw new To("Add not supported on this collection")}()},eS.jb=function(t){return pm(this,t)},eS.Q=function(){yp(this)},eS.kb=function(t){return m_(this,t,!1)},eS.lb=function(t){return Qm(this,t)},eS.V=function(){return 0==this.Y()},eS.nb=function(t){return m_(this,t,!0)},eS.ob=function(){return this.pb(Ny(NP,GS,1,this.Y(),4,1))},eS.pb=function(t){return iN(this,t)},eS.w=function(){return nC(this)},Fg(qS,"AbstractCollection",640),$T(641,640,$S),eS.t=function(t){return C_(this,t)},eS.v=function(){return bx(this)},Fg(qS,"AbstractSet",641),$T(649,641,$S),Fg(zS,"Sets/ImprovedAbstractSet",649),$T(655,649,$S),eS.Q=function(){this.qb().Q()},eS.kb=function(t){return G_(this,t)},eS.V=function(){return this.qb().V()},eS.nb=function(t){var e;return!!this.kb(t)&&(e=Vf(t,21),this.qb().W().nb(e.yb()))},eS.Y=function(){return this.qb().Y()},Fg(zS,"Maps/EntrySet",655),$T(387,655,$S,He),eS.kb=function(t){return yk(new Yn(this.a.a),t)},eS.mb=function(){return new Ev(this.a)},eS.qb=function(){return this.a},eS.nb=function(t){var e;return!!yk(new Yn(this.a.a),t)&&(e=Vf(t,21),function(t,e){var n,r;n=Vf(function(t,e){El(),Pd(t);try{return Tl(e)?Dp(t,e):AT(t.d,e)}catch(t){if(dl(t=rE(t),119))return null;if(dl(t,76))return null;throw PE(t)}}(t.b,e),19),n&&(r=n.Y(),n.Q(),t.c-=r)}(this.a.b,e.yb()),!0)},Fg(zS,"AbstractMapBasedMultimap/AsMap/AsMapEntries",387),$T(299,1,XS,Ev),eS.H=function(){var t;return t=Vw(this.b),this.a=Vf(t.zb(),19),function(t,e){var n;return n=e.yb(),El(),new Ga(n,ak(t.b,n,Vf(e.zb(),19)))}(this.c,t)},eS.G=function(){return this.b.b},eS.I=function(){Hy(this.b),this.c.b.c-=this.a.Y(),this.a.Q()},Fg(zS,"AbstractMapBasedMultimap/AsMap/AsMapIterator",299),$T(260,649,$S,Sa),eS.Q=function(){this.b.Q()},eS.kb=function(t){return this.b.R(t)},eS.V=function(){return this.b.V()},eS.mb=function(){return El(),Ef(this.b.bb().mb(),(qu(),XP))},eS.nb=function(t){return!!this.b.R(t)&&(this.b.eb(t),!0)},eS.Y=function(){return this.b.Y()},Fg(zS,"Maps/KeySet",260),$T(386,260,$S,Ml),eS.Q=function(){lg(new ja(this,this.b.bb().mb()))},eS.lb=function(t){return this.b.W().lb(t)},eS.t=function(t){return this===t||this.b.W().t(t)},eS.v=function(){return this.b.W().v()},eS.mb=function(){return new ja(this,this.b.bb().mb())},eS.nb=function(t){var e,n;return n=0,(e=Vf(this.b.eb(t),19))&&(n=e.Y(),e.Q(),this.a.c-=n),n>0},Fg(zS,"AbstractMapBasedMultimap/KeySet",386),$T(300,1,XS,ja),eS.G=function(){return this.c.G()},eS.H=function(){return this.a=Vf(this.c.H(),21),this.a.yb()},eS.I=function(){var t;gx(!!this.a),t=Vf(this.a.zb(),19),this.c.I(),this.b.a.c-=t.Y(),t.Q()},Fg(zS,"AbstractMapBasedMultimap/KeySet/1",300),$T(216,640,ZS,Ty),eS.ib=function(t){return function(t,e){var n,r;return n_(t),r=t.d.V(),(n=t.d.ib(e))&&(++t.f.c,r&&wf(t)),n}(this,t)},eS.jb=function(t){return function(t,e){var n,r,i;return!e.V()&&(i=t.Y(),(n=t.d.jb(e))&&(r=t.d.Y(),t.f.c+=r-i,0==i&&wf(t)),n)}(this,t)},eS.Q=function(){var t,e;0!=(e=(t=this).Y())&&(t.d.Q(),t.f.c-=e,gg(t))},eS.kb=function(t){return n_(this),this.d.kb(t)},eS.lb=function(t){return n_(this),this.d.lb(t)},eS.t=function(t){return function(t,e){return e===t||(n_(t),t.d.t(e))}(this,t)},eS.v=function(){return n_(this),this.d.v()},eS.mb=function(){return n_(this),new td(this)},eS.nb=function(t){return function(t,e){var n;return n_(t),(n=t.d.nb(e))&&(--t.f.c,gg(t)),n}(this,t)},eS.Y=function(){return n_(this),this.d.Y()},eS.w=function(){return n_(this),Vk(this.d)},Fg(zS,"AbstractMapBasedMultimap/WrappedCollection",216);var GP,FP,BP=_d(qS,"List");$T(297,216,KS,wg),eS.rb=function(t,e){var n;n_(this),n=this.d.V(),Vf(this.d,20).rb(t,e),++this.a.c,n&&wf(this)},eS.sb=function(t){return n_(this),Vf(this.d,20).sb(t)},eS.tb=function(){return n_(this),new zu(this)},eS.ub=function(t){return n_(this),new Gp(this,t)},eS.vb=function(t){var e;return n_(this),e=Vf(this.d,20).vb(t),--this.a.c,gg(this),e},eS.wb=function(t,e){return n_(this),Vf(this.d,20).wb(t,e)},eS.xb=function(t,e){return n_(this),bb(this.a,this.e,Vf(this.d,20).xb(t,e),this.b?this.b:this)},Fg(zS,"AbstractMapBasedMultimap/WrappedList",297),$T(385,297,QS,mh),Fg(zS,"AbstractMapBasedMultimap/RandomAccessWrappedList",385),$T(189,1,XS,td),eS.G=function(){return pg(this),this.b.G()},eS.H=function(){return pg(this),this.b.H()},eS.I=function(){this.b.I(),--this.d.f.c,gg(this.d)},Fg(zS,"AbstractMapBasedMultimap/WrappedCollection/WrappedIterator",189),$T(298,189,JS,zu,Gp),eS.J=function(t){var e;e=0==function(t){return n_(t),t.d.Y()}(this.a),(pg(this),Vf(this.b,96)).J(t),++this.a.a.c,e&&wf(this.a)},eS.K=function(){return(pg(this),Vf(this.b,96)).K()},eS.L=function(){return(pg(this),Vf(this.b,96)).L()},eS.M=function(){return(pg(this),Vf(this.b,96)).M()},eS.N=function(){return(pg(this),Vf(this.b,96)).N()},eS.O=function(t){(pg(this),Vf(this.b,96)).O(t)},Fg(zS,"AbstractMapBasedMultimap/WrappedList/WrappedListIterator",298),$T(295,216,$S,_h),Fg(zS,"AbstractMapBasedMultimap/WrappedSet",295),$T(296,216,tM,kh),Fg(zS,"AbstractMapBasedMultimap/WrappedSortedSet",296),$T(668,1,eM),eS.t=function(t){var e;return!!dl(t,21)&&(e=Vf(t,21),np(this.yb(),e.yb())&&np(this.zb(),e.zb()))},eS.v=function(){var t,e;return t=this.yb(),e=this.zb(),(null==t?0:KE(t))^(null==e?0:KE(e))},eS.Ab=function(t){throw new Kr},eS.w=function(){return this.yb()+"="+this.zb()},Fg(zS,nM,668),$T(390,640,ZS,Ye),eS.Q=function(){Ak(this.a)},eS.kb=function(t){return function(t,e){var n;for(n=ip(Xg(t.P()));n.b.G();)if(Vf(Do(n,n.b.H()),19).kb(e))return!0;return!1}(this.a,t)},eS.mb=function(){return new rm(this.a)},eS.Y=function(){return this.a.c},Fg(zS,"AbstractMultimap/Values",390),$T(656,640,rM),eS.ib=function(t){return this.Bb(t,1),!0},eS.Bb=function(t,e){throw new Kr},eS.jb=function(t){return function(t,e){var n,r;if(Ir(),e.V())return!1;if(dl(e,207))for(r=Vf(e,207).bb().mb();r.G();)n=Vf(r.H(),83),t.Bb(n.Zb(),n.Yb());else zw(t,e.mb());return!0}(this,t)},eS.Q=function(){lg(this.Eb())},eS.kb=function(t){return this.Cb(t)>0},eS.Cb=function(t){var e,n;for(n=Wg(this).mb();n.G();)if(np((e=Vf(n.H(),83)).Zb(),t))return e.Yb();return 0},eS.gb=function(){return new ze(this)},eS.bb=function(){return Wg(this)},eS.t=function(t){return function(t,e){var n,r,i;if(Ir(),e===t)return!0;if(dl(e,207)){if(i=Vf(e,207),t.Y()!=i.Y()||Wg(t).Y()!=i.bb().Y())return!1;for(r=i.bb().mb();r.G();)if(n=Vf(r.H(),83),t.Cb(n.Zb())!=n.Yb())return!1;return!0}return!1}(this,t)},eS.v=function(){return Wg(this).v()},eS.V=function(){return Wg(this).V()},eS.mb=function(){return Ir(),new Ua(this,Wg(this).mb())},eS.nb=function(t){return this.Fb(t,1)>0},eS.Fb=function(t,e){throw new Kr},eS.Gb=function(t,e){var n,r;return Ir(),Cw(e,"count"),(r=e-(n=this.Cb(t)))>0?this.Bb(t,r):r<0&&this.Fb(t,-r),n},eS.Hb=function(t,e,n){return function(t,e,n,r){return Ir(),Cw(n,"oldCount"),Cw(r,"newCount"),t.Cb(e)==n&&(t.Gb(e,r),!0)}(this,t,e,n)},eS.Y=function(){return function(t){var e,n;for(Ir(),n=0,e=Wg(t).mb();e.G();)n=mE(n,Vf(e.H(),83).Yb());return aw(n)}(this)},eS.w=function(){return Vk(Wg(this))},Fg(zS,"AbstractMultiset",656),$T(657,649,$S),eS.Q=function(){this.Ib().Q()},eS.kb=function(t){var e;return!(!dl(t,83)||(e=Vf(t,83)).Yb()<=0||this.Ib().Cb(e.Zb())!=e.Yb())},eS.nb=function(t){var e,n,r;return!(!dl(t,83)||(e=(n=Vf(t,83)).Zb(),0==(r=n.Yb())))&&this.Ib().Hb(e,r,0)},Fg(zS,"Multisets/EntrySet",657),$T(396,657,$S,ze),eS.mb=function(){return this.a.Eb()},eS.Ib=function(){return this.a},eS.Y=function(){return this.a.Db()},Fg(zS,"AbstractMultiset/EntrySet",396),$T(384,294,US),eS.Z=function(){return new Oa(cx(this.a))},eS.$=function(){return lf(),ap(),KP},eS.U=function(t){return Vf(qN(this,t),18)},eS.X=function(t){return Vf(iT(this,t),18)},eS.P=function(){return this.f||(this.f=new Pa(this,this.b))},eS.t=function(t){return zx(this,t)},Fg(zS,"AbstractSetMultimap",384),$T(342,656,rM),Fg(zS,"AbstractSortedMultiset",342),$T(280,600,US,Uh),eS.a=0,Fg(zS,"ArrayListMultimap",280),$T(159,17,iM);var HP,YP,zP,VP,UP,XP,WP,qP=tw(zS,"BoundType",159,RP,(function(){return Xu(),Tx(Mo(qP,1),BS,159,0,[FP,GP])}));$T(623,159,iM,fu),tw(zS,"BoundType/1",623,qP,null),$T(624,159,iM,Mu),tw(zS,"BoundType/2",624,qP,null),$T(234,1,aM),eS.w=function(){return t=this.c.mb(),Wu(),$g(DE((Uu(),HP),$g(new ta,91),t),93).a;var t},Fg(zS,"FluentIterable",234),$T(170,234,aM,Nu),eS.mb=function(){return Sg(this)},Fg(zS,"FluentIterable/2",170),$T(664,1,{}),eS.w=function(){return Vk(Lp(this.a.d).b)},Fg(zS,"ForwardingObject",664),$T(665,664,ZS),eS.ib=function(t){return Lp(this.a.d),ei()},eS.jb=function(t){return Lp(this.a.d),ni()},eS.Q=function(){Lp(this.a.d),ri()},eS.kb=function(t){return zs(Lp(this.a.d),t)},eS.lb=function(t){return Vs(Lp(this.a.d),t)},eS.V=function(){return Lp(this.a.d).b.V()},eS.mb=function(){return new ir(Lp(this.a.d).b.mb())},eS.nb=function(t){return Lp(this.a.d),ii()},eS.Y=function(){return Lp(this.a.d).b.Y()},eS.ob=function(){return $p(Lp(this.a.d))},eS.pb=function(t){return av(Lp(this.a.d),t)},Fg(zS,"ForwardingCollection",665),$T(660,640,sM),eS.mb=function(){return this.Kb()},eS.ib=function(t){return function(){throw new Kr}()},eS.jb=function(t){return function(){throw new Kr}()},eS.Q=function(){!function(){throw new Kr}()},eS.kb=function(t){return null!=t&&m_(this,t,!1)},eS.Jb=function(){switch(this.Y()){case 0:return op(),op(),YP;case 1:return op(),new Vd(this.Kb().H());default:return new yg(this,this.ob())}},eS.nb=function(t){return function(){throw new Kr}()},Fg(zS,"ImmutableCollection",660),$T(316,660,sM,bi),eS.mb=function(){return Aw(this.a.mb())},eS.kb=function(t){return null!=t&&this.a.kb(t)},eS.lb=function(t){return this.a.lb(t)},eS.V=function(){return this.a.V()},eS.Kb=function(){return Aw(this.a.mb())},eS.Y=function(){return this.a.Y()},eS.ob=function(){return this.a.ob()},eS.pb=function(t){return this.a.pb(t)},eS.w=function(){return Vk(this.a)},Fg(zS,"ForwardingImmutableCollection",316),$T(87,660,cM),eS.mb=function(){return this.Kb()},eS.tb=function(){return this.Lb(0)},eS.ub=function(t){return this.Lb(t)},eS.xb=function(t,e){return this.Mb(t,e)},eS.rb=function(t,e){throw new Kr},eS.t=function(t){return function(t,e){var n,r,i;if($c(e)===$c(Pd(t)))return!0;if(!dl(e,20))return!1;if(r=Vf(e,20),(i=t.Y())!=r.Y())return!1;if(dl(r,63)){for(n=0;n=(i=o.Y()))o.Q();else for(r=o.mb(),n=0;ne?1:0}(e.Yb(),t.Yb())}(Vf(t,83),Vf(e,83))},Fg(zS,"Multisets/1",398),$T(397,658,{83:1,3:1},ld),eS.Yb=function(){return this.a},eS.Zb=function(){return this.b},eS.a=0,Fg(zS,"Multisets/ImmutableEntry",397),$T(303,1,XS,Ua),eS.G=function(){return this.d>0||this.c.G()},eS.H=function(){if(!(this.d>0||this.c.G()))throw new _i;return 0==this.d&&(this.b=Vf(this.c.H(),83),this.f=this.d=this.b.Yb()),--this.d,this.a=!0,this.b.Zb()},eS.I=function(){gx(this.a),1==this.f?this.c.I():this.e.Fb(this.b.Zb(),1),--this.f,this.a=!1},eS.a=!1,eS.d=0,eS.f=0,Fg(zS,"Multisets/MultisetIteratorImpl",303),$T(622,659,{3:1,56:1},f),eS.$b=function(t,e){return function(t,e){return Pd(t),Pd(e),Hm(t,e)}(Vf(t,23),Vf(e,23))},eS.w=function(){return"Ordering.natural()"},Fg(zS,"NaturalOrdering",622),$T(343,661,cM,yg),eS.ub=function(t){return Al(this.b,t)},eS.Sb=function(){return this.a},eS.sb=function(t){return Qc(this.b,t)},eS.Lb=function(t){return Al(this.b,t)},Fg(zS,"RegularImmutableAsList",343),$T(559,275,uM,fp),eS.Tb=function(){return this.a},Fg(zS,"RegularImmutableBiMap",559),$T(53,667,cM,sb),eS.Nb=function(){return this.a},Fg(zS,"RegularImmutableList",53),$T(321,320,uM,Ri),Fg(zS,"RegularImmutableMap",321),$T(265,315,lM,Ks),Fg(zS,"RegularImmutableSet",265),$T(650,641,$S),Fg(zS,"Sets/SetView",650),$T(377,650,$S,gf),eS.kb=function(t){return ka(this.b,t)&&ka(this.c,t)},eS.lb=function(t){return Qm(this.b,t)&&Qm(this.c,t)},eS.V=function(){return Sw(this)},eS.mb=function(){return bg(new Un(new Vn(this.b.a).a.bb().mb()),this.a)},eS.Y=function(){return Jb(bg(new Un(new Vn(this.b.a).a.bb().mb()),this.a))},Fg(zS,"Sets/2",377),$T(328,275,uM,$v,Yy),eS.fb=function(){return lf(),new la(this.c)},eS.Tb=function(){return this.a||(this.a=new Yy(this.c,this.b,this))},eS.Ub=function(){return lf(),new la(this.c)},Fg(zS,"SingletonImmutableBiMap",328),$T(127,667,cM,Vd),eS.Nb=function(){return this.a},Fg(zS,"SingletonImmutableList",127),$T(135,663,lM,la),eS.mb=function(){return Wu(),new We(this.a)},eS.kb=function(t){return sE(this.a,t)},eS.Kb=function(){return Wu(),new We(this.a)},eS.Y=function(){return 1},Fg(zS,"SingletonImmutableSet",135),$T(285,342,{207:1,3:1,22:1,19:1},Pv,lk),eS.Bb=function(t,e){return hT(this,t,e)},eS.Cb=function(t){return ON(this,t)},eS.Db=function(){return aw(Bx(this,(Zu(),QP)))},eS.Eb=function(){return new Dl(this)},eS.Fb=function(t,e){return WT(this,t,e)},eS.Gb=function(t,e){return QN(this,t,e)},eS.Hb=function(t,e,n){var r,i,o;return Cw(n,"newCount"),Cw(e,"oldCount"),Vc(hh(this.b,t)),(o=this.c.a)?(i=Ny(iq,vM,26,1,12,1),r=pI(o,this.d,t,e,n,i),jd(this.c,o,r),i[0]==e):0==e&&(n>0&&hT(this,t,n),!0)},eS.Y=function(){return aw(Bx(this,(Zu(),JP)))},Fg(zS,"TreeMultiset",285),$T(619,658,{83:1},Wa),eS.Yb=function(){var t;return 0==(t=this.b.c)?ON(this.a,this.b.b):t},eS.Zb=function(){return this.b.b},Fg(zS,"TreeMultiset/1",619),$T(620,1,XS,Dl),eS.H=function(){return function(t){var e;if(!dx(t))throw new _i;return e=new Wa(t.c,t.a),t.b=e,t.a.i==t.c.a?t.a=null:t.a=t.a.i,e}(this)},eS.G=function(){return dx(this)},eS.I=function(){gx(!!this.b),QN(this.c,this.b.b.b,0),this.b=null},Fg(zS,"TreeMultiset/2",620),$T(205,17,bM);var eR=tw(zS,"TreeMultiset/Aggregate",205,RP,(function(){return Zu(),Tx(Mo(eR,1),BS,205,0,[JP,QP])}));$T(617,205,bM,du),eS._b=function(t){return t.c},eS.ac=function(t){return t?t.j:0},tw(zS,"TreeMultiset/Aggregate/1",617,eR,null),$T(618,205,bM,ml),eS._b=function(t){return 1},eS.ac=function(t){return t?t.a:0},tw(zS,"TreeMultiset/Aggregate/2",618,eR,null),$T(206,658,{83:1,206:1},Tm),eS.Yb=function(){return this.c},eS.Zb=function(){return this.b},eS.w=function(){return Ir(),Ab(new ld(this.b,this.c))},eS.a=0,eS.c=0,eS.d=0,eS.j=0,Fg(zS,"TreeMultiset/AvlNode",206),$T(616,1,{},d),Fg(zS,"TreeMultiset/Reference",616);var nR,rR=Fg(LS,"JavaScriptObject$",0);$T(628,1,{}),Fg(LS,"Scheduler",628);var iR,oR,aR,sR,cR,uR,lR,hR,fR=0,dR=0,gR=-1;$T(360,628,{},l),Fg(SS,"SchedulerImpl",360),$T(646,1,{}),eS.hc=function(){return null},eS.ic=function(){return null},eS.jc=function(){return null},eS.kc=function(){return null},eS.lc=function(){return null},Fg(wM,"JSONValue",646),$T(214,646,{214:1},sr,en),eS.t=function(t){return!!dl(t,214)&&this.a==Vf(t,214).a},eS.gc=function(){return pr},eS.v=function(){return fh(this.a)},eS.hc=function(){return this},eS.w=function(){var t,e,n;for(n=new Zo("["),e=0,t=this.a.length;e0&&(n.a+=","),ru(n,Ow(this,e));return n.a+="]",n.a},Fg(wM,"JSONArray",214),$T(292,646,{},nn),eS.gc=function(){return vr},eS.ic=function(){return this},eS.w=function(){return yl(this.a)},eS.a=!1,Fg(wM,"JSONBoolean",292),$T(371,72,dS,Hi),Fg(wM,"JSONException",371),$T(435,646,{},b),eS.gc=function(){return xr},eS.w=function(){return gS},Fg(wM,"JSONNull",435),$T(104,646,{104:1},rn),eS.t=function(t){return!!dl(t,104)&&this.a==Vf(t,104).a},eS.gc=function(){return br},eS.v=function(){return mv(oo(this.a))},eS.jc=function(){return this},eS.w=function(){return this.a+""},eS.a=0,Fg(wM,"JSONNumber",104),$T(69,646,{69:1},Ui,on),eS.t=function(t){return!!dl(t,69)&&this.a==Vf(t,69).a},eS.gc=function(){return yr},eS.v=function(){return fh(this.a)},eS.kc=function(){return this},eS.w=function(){var t,e,n,r,i,o;for(o=new Zo("{"),t=!0,n=0,r=(i=km(this,Ny(AP,hS,2,0,5,1))).length;n>>28]|e[t>>24&15]<<4|e[t>>20&15]<<8|e[t>>16&15]<<12|e[t>>12&15]<<16|e[t>>8&15]<<20|e[t>>4&15]<<24|e[15&t]<<28);var t,e},eS.w=function(){return"("+this.a+","+this.b+")"},eS.a=0,eS.b=0;var pR=Fg(AM,"KVector",10);$T(58,648,{3:1,5:1,22:1,19:1,58:1,20:1},lo),eS.ib=function(t){return If(this,t)},eS.Q=function(){Mp(this)},eS.ub=function(t){return Ok(this,t)},eS.Y=function(){return this.b},eS.b=0,Fg(qS,"LinkedList",58),$T(44,58,{44:1,286:1,3:1,5:1,22:1,19:1,58:1,20:1},Br,Ah),eS.w=function(){var t,e,n;for(t=new Zo("("),e=Ok(this,0);e.b!=e.d.c;)iu(t,(n=Vf(Ob(e),10)).a+","+n.b),e.b!=e.d.c&&(t.a+="; ");return t.a+=")",t.a},Fg(AM,"KVectorChain",44);var vR,bR,yR,wR,mR,xR,ER,_R,kR,NR=_d(IM,"IProperty");$T(131,1,{179:1,131:1,3:1},y),Fg(IM,"MapPropertyHolder",131),$T(14,1,LM,Ld,Id,fd,Sf,kv,Qv),eS.F=function(t){return function(t,e){return Np(t.b,e.mc())}(this,Vf(t,79))},eS.t=function(t){return wp(this,t)},eS.mc=function(){return this.b},eS.nc=function(){return this.c},eS.oc=function(){return this.d},eS.v=function(){return dk(this.b)},eS.w=function(){return this.b},Fg(IM,"Property",14),$T(366,1,{23:1},w),eS.F=function(t){return-1},Fg(IM,"Property/1",366),$T(367,1,{23:1},m),eS.F=function(t){return 1},Fg(IM,"Property/2",367),$T(27,1,{27:1,22:1},es),eS.t=function(t){var e,n,r;return!!dl(t,27)&&(n=Vf(t,27),e=null==this.a?null==n.a:sE(this.a,n.a),r=null==this.b?null==n.b:sE(this.b,n.b),e&&r)},eS.v=function(){var t,e,n;return t=-65536&(e=null==this.a?0:KE(this.a)),e&xS^(-65536&(n=null==this.b?0:KE(this.b)))>>16&xS|t^(n&xS)<<16},eS.mb=function(){return new an(this)},eS.w=function(){return null==this.a&&null==this.b?"pair(null,null)":null==this.a?"pair(null,"+Vk(this.b)+")":null==this.b?"pair("+Vk(this.a)+",null)":"pair("+Vk(this.a)+","+Vk(this.b)+")"},Fg(SM,"Pair",27),$T(431,1,XS,an),eS.G=function(){return!this.c&&(!this.b&&null!=this.a.a||null!=this.a.b)},eS.H=function(){if(!this.c&&!this.b&&null!=this.a.a)return this.b=!0,this.a.a;if(!this.c&&null!=this.a.b)return this.c=!0,this.a.b;throw new _i},eS.I=function(){throw this.c&&null!=this.a.b?this.a.b=null:this.b&&null!=this.a.a&&(this.a.a=null),new Zr},eS.b=!1,eS.c=!1,Fg(SM,"Pair/1",431),$T(228,72,dS,Yi),Fg(MM,"UnsupportedConfigurationException",228),$T(99,72,dS,zi),Fg(MM,"UnsupportedGraphException",99),$T(103,17,{103:1,3:1,23:1,17:1},ns);var CR,TR,AR,OR,IR,LR,SR=tw(jM,"Alignment",103,RP,(function(){return fk(),Tx(Mo(SR,1),BS,103,0,[wR,ER,_R,kR,mR,xR])}));$T(59,17,{59:1,3:1,23:1,17:1},us);var MR,DR,PR,RR,jR,GR=tw(jM,"Direction",59,RP,(function(){return _E(),Tx(Mo(GR,1),BS,59,0,[IR,OR,AR,TR,LR])}));$T(107,17,{107:1,3:1,23:1,17:1},ls);var FR,BR,HR,YR,zR,VR=tw(jM,"EdgeLabelPlacement",107,RP,(function(){return Gm(),Tx(Mo(VR,1),BS,107,0,[jR,DR,PR,RR])}));$T(122,17,{122:1,3:1,23:1,17:1},hs);var UR,XR,WR,qR,ZR,$R,KR,QR=tw(jM,"EdgeRouting",122,RP,(function(){return kE(),Tx(Mo(QR,1),BS,122,0,[zR,HR,BR,YR])}));$T(133,17,{133:1,3:1,23:1,17:1},fs);var JR,tj,ej,nj,rj=tw(jM,"EdgeType",133,RP,(function(){return PN(),Tx(Mo(rj,1),BS,133,0,[$R,qR,KR,XR,ZR,WR])}));$T(166,17,{166:1,3:1,23:1,17:1},ds);var ij,oj,aj,sj,cj,uj,lj,hj,fj,dj,gj,pj,vj,bj,yj,wj,mj,xj,Ej,_j,kj,Nj,Cj,Tj,Aj,Oj,Ij,Lj,Sj,Mj,Dj,Pj,Rj,jj,Gj,Fj,Bj,Hj,Yj,zj,Vj,Uj,Xj,Wj,qj,Zj,$j,Kj,Qj,Jj,tG,eG,nG,rG,iG,oG,aG,sG,cG,uG=tw(jM,"HierarchyHandling",166,RP,(function(){return NE(),Tx(Mo(uG,1),BS,166,0,[ej,tj,nj])}));$T(41,17,{41:1,3:1,23:1,17:1},gs);var lG,hG,fG,dG,gG,pG,vG=tw(jM,"NodeLabelPlacement",41,RP,(function(){return yT(),Tx(Mo(vG,1),BS,41,0,[eG,tG,rG,cG,sG,aG,iG,oG,nG])}));$T(100,17,{100:1,3:1,23:1,17:1},ps);var bG,yG,wG,mG,xG,EG,_G,kG=tw(jM,"PortAlignment",100,RP,(function(){return I_(),Tx(Mo(kG,1),BS,100,0,[pG,gG,hG,fG,dG])}));$T(28,17,{28:1,3:1,23:1,17:1},vs);var NG,CG,TG,AG,OG=tw(jM,"PortConstraints",28,RP,(function(){return bN(),Tx(Mo(OG,1),BS,28,0,[_G,EG,xG,yG,mG,wG])}));$T(149,17,{149:1,3:1,23:1,17:1},bs);var IG,LG,SG,MG,DG,PG,RG,jG,GG,FG,BG,HG,YG,zG,VG,UG,XG,WG,qG,ZG,$G,KG,QG=tw(jM,"PortLabelPlacement",149,RP,(function(){return Rw(),Tx(Mo(QG,1),BS,149,0,[AG,TG,CG])}));$T(32,17,{32:1,3:1,23:1,17:1},ys);var JG,tF,eF,nF,rF,iF=tw(jM,"PortSide",32,RP,(function(){return wL(),Tx(Mo(iF,1),BS,32,0,[$G,SG,LG,ZG,KG])}));$T(150,17,{150:1,3:1,23:1,17:1},ws);var oF,aF,sF,cF,uF,lF=tw(jM,"SizeConstraint",150,RP,(function(){return L_(),Tx(Mo(lF,1),BS,150,0,[nF,rF,eF,tF])}));$T(139,17,{139:1,3:1,23:1,17:1},ms);var hF,fF,dF,gF,pF,vF,bF,yF,wF,mF,xF,EF,_F,kF,NF,CF,TF,AF,OF,IF,LF,SF,MF,DF=tw(jM,"SizeOptions",139,RP,(function(){return zN(),Tx(Mo(DF,1),BS,139,0,[cF,uF,sF,aF])}));$T(62,1,{62:1},ac,Ep),eS.t=function(t){var e;return!(null==t||!dl(t,62))&&(e=Vf(t,62),Ap(this.d,e.d)&&Ap(this.e,e.e)&&Ap(this.c,e.c)&&Ap(this.b,e.b))},eS.v=function(){return Zx(Tx(Mo(NP,1),GS,1,4,[this.d,this.e,this.c,this.b]))},eS.w=function(){return"Rect[x="+this.d+",y="+this.e+",w="+this.c+",h="+this.b+"]"},eS.b=0,eS.c=0,eS.d=0,eS.e=0,Fg(YM,"Rectangle",62),$T(283,62,{283:1,62:1},Hr),eS.a=0,Fg(zM,"LabelGroup",283),$T(67,17,{67:1,3:1,23:1,17:1},kp);var PF,RF,jF,GF=tw(zM,"LabelLocation",67,RP,O_);$T(225,17,{225:1,3:1,23:1,17:1},xs);var FF,BF,HF,YF,zF,VF=tw(zM,"TextAlignment",225,RP,(function(){return Hb(),Tx(Mo(VF,1),BS,225,0,[RF,PF,jF])}));$T(589,1,{},bI),eS.a=0,eS.b=!1,eS.d=0,eS.f=0,eS.k=0,eS.r=0,eS.s=0,Fg(YM,"LabelAndNodeSizeProcessor/NodeData",589),$T(171,17,{171:1,3:1,23:1,17:1},Es);var UF,XF,WF,qF,ZF,$F,KF,QF,JF,tB,eB,nB,rB,iB=tw(YM,"LabelSide",171,RP,(function(){return S_(),Tx(Mo(iB,1),BS,171,0,[zF,BF,HF])}));$T(590,1,{},sn),eS.b=!0,eS.c=!0,eS.d=!0,eS.e=!0,Fg(YM,UM,590),$T(121,1,WM),eS.t=function(t){var e;return!!dl(t,121)&&(e=Vf(t,121),this.d==e.d&&this.a==e.a&&this.b==e.b&&this.c==e.c)},eS.v=function(){var t;return t=mv(oo(this.b))<<16,(t|=mv(oo(this.a))&xS)^(mv(oo(this.c))<<16|mv(oo(this.d))&xS)},eS.w=function(){return"[top="+this.d+",left="+this.b+",bottom="+this.a+",right="+this.c+"]"},eS.a=0,eS.b=0,eS.c=0,eS.d=0,Fg(YM,"Spacing",121),$T(232,121,WM,Yr,xh,Xh),Fg(YM,"Spacing/Insets",232),$T(65,121,{286:1,121:1,65:1,3:1,5:1},zr,Eh,Wh),Fg(YM,"Spacing/Margins",65),$T(364,1,{},Pk),eS.c=!1,eS.d=null,eS.g=null,Fg(aD,"JsonGraphImporter",364),$T(417,14,LM,hc),Fg(aD,"LayoutOptionResolver/DummyProperty",417),$T(348,1,{},_e),Fg(aD,"RecursiveLGraphLayout",348),$T(73,99,{73:1,3:1,54:1,46:1},Vi,Zl,xg);var oB,aB,sB,cB,uB=Fg(aD,"UnsupportedJsonGraphException",73);$T(380,1,{},dp),Fg(lD,"GraphConfigurator",380),$T(49,1,{},i_),Fg(lD,"IntermediateProcessingConfiguration",49),$T(365,1,{},jb),Fg(lD,"KlayLayered",365),$T(577,1,{},Wm),eS.i=0,Fg(gD,"ComponentsToCGraphTransformer",577),$T(578,1,{},A),eS.tc=function(t,e){return zo(t.wc(),e.wc())},eS.uc=function(t,e){return zo(t.xc(),e.xc())},Fg(gD,"ComponentsToCGraphTransformer/1",578),$T(25,1,{25:1}),eS.k=0,eS.o=null,eS.p=!0,eS.r=dD;var lB,hB,fB,dB,gB,pB=Fg(pD,"CNode",25);$T(198,25,{198:1,25:1},rl,om),eS.vc=function(){this.b.d=this.j.d,this.b.e=this.j.e},eS.wc=function(){return null!=this.a?oo(this.a):this.c.i},eS.xc=function(){return null!=this.a?oo(this.a):this.c.i},eS.w=function(){return""},Fg(gD,"ComponentsToCGraphTransformer/CRectNode",198),$T(549,1,{},O),Fg(gD,"OneDimensionalComponentsCompaction",549),$T(550,1,hM,I),eS.B=function(t){return vx(),Ud(),0!=Vf(Vf(t,27).a,25).f.f?AW:TW},Fg(gD,"OneDimensionalComponentsCompaction/lambda$0$Type",550),$T(551,1,hM,L),eS.B=function(t){return vx(),Ud(),l_(Vf(Vf(t,27).a,25).n,Vf(Vf(t,27).b,59))||0!=Vf(Vf(t,27).a,25).f.f&&l_(Vf(Vf(t,27).a,25).n,Vf(Vf(t,27).b,59))?AW:TW},Fg(gD,"OneDimensionalComponentsCompaction/lambda$1$Type",551),$T(324,1,{},Eg),Fg(pD,"CGraph",324),$T(78,1,{78:1},$_),eS.b=0,eS.c=0,eS.d=0,eS.f=0,eS.i=!0,eS.j=dD,Fg(pD,"CGroup",78),$T(470,1,{},S),eS.tc=function(t,e){return Bo(t.wc(),e.wc())},eS.uc=function(t,e){return Bo(t.xc(),e.xc())},Fg(pD,"ISpacingsHandler/1",470),$T(323,1,{},wT),eS.e=!1;var vB=Fg(pD,"OneDimensionalCompactor",323);$T(554,1,hM,E),eS.B=function(t){return qd(),Ud(),0!=Vf(Vf(t,27).a,25).f.f?AW:TW},Fg(pD,"OneDimensionalCompactor/lambda$0$Type",554),$T(335,1,{},Bf),eS.a=!1,eS.b=!1,eS.c=!1,eS.d=!1,Fg(pD,"Quadruplet",335),$T(587,1,{},_),eS.Cc=function(t){var e,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v;for(l=fD,r=new Kn(t.a.b);r.an.j.d||n.j.d==i.j.d&&n.j.c0&&(Lf(t.c,new pf(e.c,e.d,t.d)),t.b=e.d)}(this,Vf(t,48))},eS.b=0,Fg(yD,"RectilinearConvexHull/MaximalElementsEventHandler",243),$T(571,1,NS,M),eS.$b=function(t,e){return rp(t,e)},Fg(yD,"RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type",571),$T(570,1,{160:1},ey),eS.Ec=function(t){!function(t,e){var n;t.d&&(e.c!=t.e.c||function(t,e){return jm(),t==yB&&e==wB||t==yB&&e==mB||t==xB&&e==mB||t==xB&&e==wB}(t.e.b,e.b))&&(Lf(t.f,t.d),t.a=t.d.d+t.d.c,t.d=null,t.e=null),function(t){return t==yB||t==wB}(e.b)?t.c=e:t.b=e,(e.b==(jm(),yB)&&!e.a||e.b==wB&&e.a||e.b==mB&&e.a||e.b==xB&&!e.a)&&t.c&&t.b&&(n=new Ep(t.a,t.c.d,e.c-t.a,t.b.d-t.c.d),t.d=n,t.e=e)}(this,Vf(t,48))},eS.a=0,eS.b=null,eS.c=null,eS.d=null,eS.e=null,Fg(yD,"RectilinearConvexHull/RectangleEventHandler",570),$T(572,1,NS,D),eS.$b=function(t,e){return Bb(),Vf(t,48).c==Vf(e,48).c?Ix(Vf(e,48).d,Vf(t,48).d):Ix(Vf(t,48).c,Vf(e,48).c)},Fg(yD,"RectilinearConvexHull/lambda$0$Type",572),$T(573,1,NS,P),eS.$b=function(t,e){return Bb(),Vf(t,48).c==Vf(e,48).c?Ix(Vf(t,48).d,Vf(e,48).d):Ix(Vf(t,48).c,Vf(e,48).c)},Fg(yD,"RectilinearConvexHull/lambda$1$Type",573),$T(574,1,NS,R),eS.$b=function(t,e){return Bb(),Vf(t,48).c==Vf(e,48).c?Ix(Vf(e,48).d,Vf(t,48).d):Ix(Vf(e,48).c,Vf(t,48).c)},Fg(yD,"RectilinearConvexHull/lambda$2$Type",574),$T(575,1,NS,j),eS.$b=function(t,e){return Bb(),Vf(t,48).c==Vf(e,48).c?Ix(Vf(t,48).d,Vf(e,48).d):Ix(Vf(e,48).c,Vf(t,48).c)},Fg(yD,"RectilinearConvexHull/lambda$3$Type",575),$T(576,1,NS,G),eS.$b=function(t,e){return function(t,e){var n;if(Bb(),t.c==e.c){if(t.b==e.b||function(t,e){return jm(),t==yB&&e==xB||t==xB&&e==yB||t==mB&&e==wB||t==wB&&e==mB}(t.b,e.b)){if(n=function(t){return t==yB||t==xB}(t.b)?1:-1,t.a&&!e.a)return n;if(!t.a&&e.a)return-n}return Fu(t.b.e,e.b.e)}return Ix(t.c,e.c)}(t,e)},Fg(yD,"RectilinearConvexHull/lambda$4$Type",576),$T(469,1,{},Nb),Fg(yD,"Scanline",469),$T(662,1,{}),Fg(mD,"AbstractGraphPlacer",662),$T(222,1,{222:1},Kh),Fg(mD,"ComponentGroup",222),$T(434,662,{},Mr),eS.Fc=function(t,e){var n,r,i,o,a,s,c,u,l,h,f,d;if(this.a.c=Ny(NP,GS,1,0,4,1),e.b.c=Ny(NP,GS,1,0,4,1),t.V())return e.e.a=0,void(e.e.b=0);for(ME(e,i=Vf(t.sb(0),55)),r=t.mb();r.G();)zE(this,Vf(r.H(),55));for(f=new uo,d=2*Vf(kx(i,(ZL(),mX)),15).a,s=new Kn(this.a);s.ah&&(x=0,E+=l+w,l=0),iO(o,x+(g=o.d).a,E+g.b),g.a=0,g.b=0,n=Bo(n,x+b.a),l=Bo(l,b.b),x+=b.a+w;if(e.e.a=n,e.e.b=E+l,v=Vf(kx(e,mX),15).a,io(oo(Oh(kx(i,($L(),HX)))))){for(GL(r=new F,t,v),u=t.mb();u.G();)Sh(Lc(Vf(u.H(),55).d),r.e);Sh(Lc(e.e),r.a)}py(e,t)}else(y=Vf(t.sb(0),55))!=e&&(e.b.c=Ny(NP,GS,1,0,4,1),pO(e,y,0,0),ME(e,y),kd(e.a,y.a),e.e.a=y.e.a,e.e.b=y.e.b)},Fg(mD,"SimpleRowGraphPlacer",432),$T(433,1,NS,H),eS.$b=function(t,e){return function(t,e){var n;return 0==(n=e.k-t.k)?Ix(t.e.a*t.e.b,e.e.a*e.e.b):n}(Vf(t,55),Vf(e,55))},Fg(mD,"SimpleRowGraphPlacer/1",433),$T(369,1,kD,ke),eS.sc=function(t,e){VL(t,e)},Fg(ND,"CompoundGraphPostprocessor",369),$T(370,1,wD,Y),eS.D=function(t){var e;return!!(e=Vf(kx(Vf(t,114).b,(JL(),kj)),44))&&0!=e.b},Fg(ND,"CompoundGraphPostprocessor/1",370),$T(368,1,kD,Wc),eS.sc=function(t,e){ik(this,t,e)},Fg(ND,"CompoundGraphPreprocessor",368),$T(187,1,{187:1},OE),eS.c=!1,Fg(ND,"CompoundGraphPreprocessor/ExternalPort",187),$T(114,1,{114:1},vf),eS.w=function(){return gh(this.c)+":"+Dw(this.b)},Fg(ND,"CrossHierarchyEdge",114),$T(310,1,NS,cn),eS.$b=function(t,e){return function(t,e,n){var r,i;return e.c==(nm(),RX)&&n.c==PX?-1:e.c==PX&&n.c==RX?1:(r=E_(e.a,t.a),i=E_(n.a,t.a),e.c==RX?i-r:r-i)}(this,Vf(t,114),Vf(e,114))},Fg(ND,"CrossHierarchyEdgeComparator",310),$T(147,131,{179:1,131:1,147:1,3:1}),eS.k=0,Fg(TD,"LGraphElement",147),$T(12,147,{179:1,131:1,12:1,147:1,3:1},jp),eS.w=function(){return Dw(this)};var SB=Fg(TD,"LEdge",12);$T(55,147,{179:1,131:1,55:1,147:1,3:1,22:1},Fw),eS.mb=function(){return new Kn(this.c)},eS.w=function(){return 0==this.c.c.length?"G-unlayered"+nC(this.b):0==this.b.c.length?"G-layered"+nC(this.c):"G[layerless"+nC(this.b)+", layers"+nC(this.c)+"]"};var MB=Fg(TD,"LGraph",55);$T(273,1,{}),eS.pc=function(){return this.e.j},Fg(TD,"LGraphAdapters/AbstractLShapeAdapter",273),$T(240,1,{627:1},un),eS.b=null,Fg(TD,"LGraphAdapters/LEdgeAdapter",240),$T(325,1,{},Ns),eS.pc=function(){return this.a.e},eS.b=null,eS.c=!1,Fg(TD,"LGraphAdapters/LGraphAdapter",325),$T(224,273,{129:1,224:1},ln),Fg(TD,"LGraphAdapters/LLabelAdapter",224),$T(555,273,{626:1},Cs),eS.a=null,eS.b=null,eS.c=!1,Fg(TD,"LGraphAdapters/LNodeAdapter",555),$T(556,273,{161:1},Ts),eS.a=null,eS.b=null,eS.c=null,eS.d=!1,Fg(TD,"LGraphAdapters/LPortAdapter",556),$T(557,1,NS,z),eS.$b=function(t,e){return function(t,e){var n,r,i,o;if(0!=(o=t.g.e-e.g.e))return o;if(n=Vf(kx(t,(JL(),Yj)),24),r=Vf(kx(e,Yj),24),n&&r&&0!=(i=n.a-r.a))return i;switch(t.g.e){case 1:return Ix(t.i.a,e.i.a);case 2:return Ix(t.i.b,e.i.b);case 3:return Ix(e.i.a,t.i.a);case 4:return Ix(e.i.b,t.i.b);default:throw new ko(AD)}}(Vf(t,7),Vf(e,7))},Fg(TD,"LGraphAdapters/PortComparator",557),$T(168,1,{168:1},je,Hp),eS.t=function(t){var e;return!!dl(t,168)&&(e=Vf(t,168),this.d==e.d&&this.a==e.a&&this.b==e.b&&this.c==e.c)},eS.v=function(){var t;return t=mv(oo(this.b))<<16,(t|=mv(oo(this.a))&xS)^(mv(oo(this.c))<<16|mv(oo(this.d))&xS)},eS.w=function(){return"Insets[top="+this.d+",left="+this.b+",bottom="+this.a+",right="+this.c+"]"},eS.a=0,eS.b=0,eS.c=0,eS.d=0,Fg(TD,"LInsets",168),$T(165,147,{179:1,131:1,147:1,165:1,3:1}),Fg(TD,"LShape",165),$T(33,165,{179:1,131:1,147:1,33:1,165:1,3:1},_u),eS.w=function(){return null==this.a?"l_"+this.k:"l_"+this.a},Fg(TD,"LLabel",33),$T(9,165,{179:1,131:1,147:1,9:1,165:1,3:1},Nk),eS.w=function(){return bv(this)};var DB,PB,RB,jB,GB,FB,BB=Fg(TD,"LNode",9);$T(132,17,{132:1,3:1,23:1,17:1},Os);var HB,YB,zB,VB,UB,XB,WB=tw(TD,"LNode/NodeType",132,RP,(function(){return RN(),Tx(Mo(WB,1),BS,132,0,[GB,jB,PB,FB,RB,DB])}));$T(7,165,{179:1,131:1,147:1,7:1,165:1,3:1},NN),eS.w=function(){var t;return null==(t=ay(this))?"p_"+this.k:"p_"+t};var qB=Fg(TD,"LPort",7);$T(399,1,wD,V),eS.D=function(t){return jh(t)},Fg(TD,"LPort/1",399),$T(400,1,wD,U),eS.D=function(t){return Rh(t)},Fg(TD,"LPort/2",400),$T(401,1,wD,X),eS.D=function(t){return Vf(t,7).g==(wL(),SG)},Fg(TD,"LPort/3",401),$T(402,1,wD,W),eS.D=function(t){return Vf(t,7).g==(wL(),LG)},Fg(TD,"LPort/4",402),$T(403,1,wD,q),eS.D=function(t){return Vf(t,7).g==(wL(),ZG)},Fg(TD,"LPort/5",403),$T(404,1,wD,Z),eS.D=function(t){return Vf(t,7).g==(wL(),KG)},Fg(TD,"LPort/6",404),$T(190,1,aM,hn),eS.mb=function(){return new fn(new Kn(this.a.b))},Fg(TD,"LPort/7",190),$T(405,1,XS,fn),eS.H=function(){return Vf(Jv(this.a),12).c},eS.G=function(){return gl(this.a)},eS.I=function(){fg(this.a)},Fg(TD,"LPort/7/1",405),$T(169,1,aM,dn),eS.mb=function(){return new gn(new Kn(this.a.e))},Fg(TD,"LPort/8",169),$T(304,1,XS,gn),eS.H=function(){return Vf(Jv(this.a),12).d},eS.G=function(){return gl(this.a)},eS.I=function(){fg(this.a)},Fg(TD,"LPort/8/1",304),$T(16,147,{179:1,131:1,147:1,16:1,3:1,22:1},_g),eS.mb=function(){return new Kn(this.a)},eS.w=function(){return"L_"+Qy(this.b.c,this,0)+nC(this.a)},Fg(TD,"Layer",16),$T(437,1,kD,$),eS.sc=function(t,e){var n,r,i,o;for(H_(e,"Big nodes intermediate-processing",1),this.a=t,r=new Kn(this.a.c);r.ao?50:o,n=new Re,d=o+this.d,l=new Kn(h);l.ad){for(f=1,r=a.j.a;r>o;)++f,r=(a.j.a-(f-1)*this.d)/f;Lf(n,new Fb(this,a,f,r))}for(s=new Kn(n);s.aa?50:a,n=new Re,g=a+this.d,h=new Kn(f);h.ag){for(d=1,r=s.j.a;r>a;)++d,r=(s.j.a-(d-1)*this.d)/d;Lf(n,new nv(this,s,d))}for(c=new Kn(n);c.a0||l.g==KG&&l.b.c.length-l.e.c.length<0)){n=!1;break}if(l.g==KG)for(i=new Kn(l.e);i.a0&&(t.a=c+(f-1)*i,e.d.b+=t.a,e.e.b+=t.a),0!=d.a.Y()&&(f=fI(new mC(1,i),e,d,g,e.e.b+c-e.d.b))>0&&(e.e.b+=c+(f-1)*i)}(this,t,n),function(t){var e,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,_;for(y=new Re,l=new Kn(t.c);l.a0&&RO((Ey(0,n.c.length),Vf(n.c[0],16)),t),n.c.length>1&&RO(Vf(pd(n,n.c.length-1),16),t),HE(e)},Fg(OD,"HierarchicalPortPositionProcessor",454),$T(471,1,kD,ht),eS.sc=function(t,e){var n,r,i,o,a,s,c,u,l,h,f;for(H_(e,"Hyperedge merging",1),l=new Kv(t.c,0);l.b(d=f.c.length)+1?Lf(l,new es(c,(Ey(h=(s+d)/2|0,a.c.length),Vf(a.c[h],9)))):d>s+1&&Lf(l,new es(c,(Ey(h=((d-s)/2|0)-1,f.c.length),Vf(f.c[h],9))))}for(v=new Kn(l);v.a=2){for(c=!0,Ey(1,s.c.length),g=Vf(s.c[1],16),h=new Kn(r.a);h.a=2){for(c=!0,p=Vf(pd(s,s.c.length-2),16),h=new Kn(i.a);h.an?c:n}t.e.b=c-u,t.d.b-=u,HE(e)},Fg(OD,"LayerSizeAndGraphHeightCalculator",496),$T(497,1,kD,Ot),eS.sc=function(t,e){var n,r,i,o;for(H_(e,"Edge joining",1),n=io(oo(Oh(kx(t,($L(),FX))))),r=new Kn(t.c);r.a0&&Lf(t.p,l),Lf(t.o,l);d=c+(e-=r),u+=e*t.e,Kb(t.a,s,qE(d)),Kb(t.b,s,u),t.j=Yo(t.j,d),t.k=Bo(t.k,u),t.d+=e,e+=p}}(this),this.q=Vf(kx(t,($L(),aW)),109),c=Vf(kx(this.g,sW),24).a,i=new Mt,this.q.e){case 2:case 1:default:LI(this,i);break;case 3:for(this.q=(nA(),aY),LI(this,i),a=0,o=new Kn(this.a);o.athis.j&&(this.q=tY,LI(this,i));break;case 4:for(this.q=(nA(),aY),LI(this,i),s=0,r=new Kn(this.b);r.athis.k&&(this.q=rY,LI(this,i));break;case 6:LI(this,new En(mv(Mc(this.f.length*c/100))));break;case 5:LI(this,new _n(mv(Mc(this.d*c/100))))}!function(t,e){var n,r,i,o,a,s;for(i=new Re,n=0;n<=t.i;n++)(r=new _g(e)).k=t.i-n,i.c[i.c.length]=r;for(s=new Kn(t.o);s.a=2){for(g=!0,n=Vf(Jv(h=new Kn(o.f)),7);h.a(r-=t.a)?i:r}return i}(this,t),d=t.c.c.length,p=function(t,e){var n,r,i,o,a;for(r=0,n=new Kn(e.c);n.a(a=(i=Vf(Jv(o),9)).j.a+i.e.c+i.e.b+t.b)?r:a;return r}(this,t),T=d*p,(r=(i=Vf(kx(t,(JL(),gj)),59))==(_E(),AR)||i==OR||i==IR?Vf(kx(t,AU),15).a:1/Vf(kx(t,AU),15).a)>(n=T/g))HE(e);else{N=0,o=jD;do{f=o,o=(n=T/++N/(g*N))-r<=0?0-(n-r):n-r}while(n>r);for(fN?1:N)|0,m=_,I=!0;u=_&&(I=!0),++m,++u}for(l=new Kv(t.c,0);l.b "+this.a+" "+gh(this.c)},eS.a=0,eS.b=0,eS.d=0,Fg(OD,"SplineSelfLoopRouter/LoopPadding",91),$T(521,1,wD,Jf),eS.D=function(t){return function(t,e){return!!function(t){switch(t.e){case 0:return iV;case 1:return eV;case 2:return tV;case 3:return sV;case 4:return aV;case 5:return fV;case 6:return hV;case 7:return oV;case 8:return nV;case 9:return rV;case 11:return uV;case 10:return cV;default:return lV}}(t.b).kb(e.c)&&(function(t){return t==$z||t==Wz}(t.b)?!(qf(e.d,t.c,t.a)&&qf(e.a,t.c,t.a)):qf(e.d,t.c,t.a)&&qf(e.a,t.c,t.a))}(this,Vf(t,91))},eS.a=0,eS.c=0,Fg(OD,"SplineSelfLoopRouter/LoopPadding/EnclosingPredicate",521),$T(520,1,NS,te),eS.$b=function(t,e){return function(t,e){return Ix(e.b,t.b)}(Vf(t,91),Vf(e,91))},Fg(OD,"SplineSelfLoopRouter/LoopPadding/MarginComparator",520),$T(196,1,wD,kn),eS.D=function(t){return Vf(t,91).c==this.a},Fg(OD,"SplineSelfLoopRouter/LoopPadding/PortSidePredicate",196),$T(195,1,{195:1},Eb),eS.c=0,eS.d=0,eS.e=0,Fg(OD,"SplineSelfLoopRouter/SelfLoopEdge",195),$T(519,1,NS,ee),eS.$b=function(t,e){return function(t,e){return t.d-e.d}(Vf(t,195),Vf(e,195))},Fg(OD,"SplineSelfLoopRouter/SelfLoopEdge/StepSizeComparator",519),$T(82,25,{25:1,82:1},TT),eS.vc=function(){var t,e;for(t=Ok(this.a,0);t.b!=t.d.c;)Vf(Ob(t),10).a=this.j.d;for(e=Ok(this.c,0);e.b!=e.d.c;)Vf(Ob(e),10).a=this.j.d},eS.wc=function(){return this.b},eS.xc=function(){return this.e},eS.w=function(){return nC(new Vn(this.d.a))},eS.b=0,eS.e=0,Fg(HD,"CLEdge",82),$T(93,25,{25:1,93:1},rO),eS.vc=function(){this.b.i.a=this.j.d+this.b.e.b},eS.wc=function(){return this.b.g==(RN(),PB)?0:this.a},eS.xc=function(){return this.b.g==(RN(),PB)?0:this.c},eS.w=function(){return Vk(kx(this.b,(ZL(),oX)))},eS.a=0,eS.c=0,Fg(HD,"CLNode",93),$T(175,17,{175:1,3:1,23:1,17:1},Ps);var dY,gY,pY,vY,bY,yY,wY,mY=tw(HD,"ConstraintCalculationStrategy",175,RP,(function(){return Tb(),Tx(Mo(mY,1),BS,175,0,[lY,hY])}));$T(125,17,{125:1,3:1,23:1,17:1},Rs);var xY,EY,_Y,kY=tw(HD,"GraphCompactionStrategy",125,RP,(function(){return gC(),Tx(Mo(kY,1),BS,125,0,[yY,pY,wY,bY,vY,gY])}));$T(455,1,kD,Vu),eS.sc=function(t,e){var n,r,i;if((r=Vf(kx(t,($L(),lW)),125))!=(gC(),yY)){switch(H_(e,"Horizontal Compaction",1),this.a=t,vo(n=new wT(function(t,e){var n,r,i;t.d=e,wy(t.b),t.c=!1;t:for(n=new Kn(t.d.c);n.ao.j.e+o.j.b?d.d=!0:(d.d=!0,d.c=!0))),r.b!=r.d.c&&(e=n);d&&(a=Vf(Jg(y,c.d.f),25),e.ba.j.e+a.j.b?d.d=!0:(d.d=!0,d.c=!0))}for(u=Sg(XE(v));t_(u);)0!=(c=Vf(Tv(u),12)).a.b&&(e=Vf(Bl(c.a),10),c.d.g==(wL(),SG)&&((_=new LA(e,new ts(e.a,o.j.e),o,c)).c=!0,E.c[E.c.length]=_),c.d.g==ZG&&((_=new LA(e,new ts(e.a,o.j.e+o.j.b),o,c)).d=!0,E.c[E.c.length]=_))}if(0!=E.c.length){for(zp(),xb(E,null),Ey(0,E.c.length),i=new TT(Vf(E.c[0],142),t.d),f=1;f(r=Math.ceil(r))?0:r,e.o&&o.o&&dl(e,82)&&dl(o,82)&&!Sw(Kw(Vf(e,82).d,Vf(o,82).d))?(i=ol(new Gr,t.d),s=mv(Mc(o.g.a-e.g.a)),wA(pa(ba(ya(va(new jr,0>s?0:s),1),i),t.c[e.f.d])),wA(pa(ba(ya(va(new jr,0>-s?0:-s),1),i),t.c[o.f.d]))):(u=1,(dl(e,82)&&dl(o,93)||dl(o,82)&&dl(e,93))&&(u=2),wA(pa(ba(ya(va(new jr,mv(r)),u),t.c[e.f.d]),t.c[o.f.d]))))}(this),function(t){var e,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b;for(El(),l=new kr,c=new Zs,r=new Kn(t.a.a.b);r.ae.j.d){if((d=t.c[e.f.d])==(v=t.c[h.f.d]))continue;wA(pa(ba(ya(va(new jr,1),100),d),v))}}}(this),function(t){var e,n,r,i,o,a;for(i=new lo,r=new Kn(t.d.a);r.a1)for(e=ol(ma(new Gr,t.b++),t.d),a=Ok(i,0);a.b!=a.d.c;)o=Vf(Ob(a),61),wA(pa(ba(ya(va(new jr,1),0),e),o))}(this),vO(Jh(this.d),new Vh),i=new Kn(this.a.a.b);i.a0&&(this.a[F.k]=$++)}else{for(M=0,B=new Kn(C.f);B.a0&&++$}for(et=0,O=0,S=e.length;O0;){for(Lu(z.b>0),Y=0,a=new Kn((F=Vf(z.a.sb(z.c=--z.b),7)).b);a.a0&&(F.g==(wL(),SG)?(this.a[F.k]=et,++et):(this.a[F.k]=et+D+R,++R))}et+=R}else{for(M=0,B=new Kn(C.f);B.a0&&++et}for(H=new kr,g=new Ji,T=0,I=t.length;Tl.c&&(l.c=V)):F.f.d==Z&&(Vl.d&&(l.d=V));for(Hk(p,0,p.length,(ec(),ec(),HW)),tt=Ny(iq,vM,26,p.length,12,1),n=Ny(iq,vM,26,et+1,12,1),b=0;b0;)x%2>0&&(r+=it[x+1]),++it[x=(x-1)/2|0];for(k=Ny(CY,GS,158,2*p.length,0,1),m=0;me.f?1:t.ge.g?1:t.b-e.b}(this,Vf(t,204))},eS.b=0,eS.c=0,eS.d=0,eS.f=0,eS.g=0;var NY=Fg(YD,"BetweenLayerHyperedgeAllCrossingsCounter/Hyperedge",204);$T(158,1,{158:1,23:1},_p),eS.F=function(t){return function(t,e){return t.ce.c?1:t.be.b?1:t.a!=e.a?t.a.b-e.a.b:0==t.d&&1==e.d?-1:1==t.d&&0==e.d?1:0}(this,Vf(t,158))},eS.b=0,eS.c=0,eS.d=0;var CY=Fg(YD,"BetweenLayerHyperedgeAllCrossingsCounter/HyperedgeCorner",158);$T(611,339,{},Wi),eS.Gc=function(t,e){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,_;for(_=0,i=0,a=t[0].d,w=e[0].d,u=0,h=e.length;u0;){for(Lu(y.b>0),b=0,r=new Kn((p=Vf(y.a.sb(y.c=--y.b),7)).b);r.a0&&(p.g==(wL(),SG)?(this.a[p.k]=_,++_):(this.a[p.k]=_+d+g,++g),i+=b)}_+=g}else{for(f=0,v=new Kn(s.f);v.a0&&(++_,i+=f)}for(m=Ny(iq,vM,26,i,12,1),o=0,c=0,l=t.length;c0;)o%2>0&&(r+=s[o+1]),++s[o=(o-1)/2|0];return r}(_,i,m),n},Fg(YD,"BetweenLayerStraightEdgeAllCrossingsCounter",611),$T(338,1,{},pC),eS.b=0,eS.e=!1,Fg(YD,"CrossingMatrixFiller",338),$T(447,1,kD,ne),eS.sc=function(t,e){var n,r;H_(e,"Greedy switch crossing reduction",1),this.e=Vf(kx(t,($L(),QX)),110),t.c.c.length<2||this.e==(NI(),lU)||(function(t,e){var n,r,i,o,a,s,c,u;for(t.f=e,i=e.c.c.length,t.a=Ny(BB,hS,51,i,0,2),t.d=Ny(BB,hS,51,i,0,2),t.g=Ny(BB,hS,51,i,0,2),a=new Kv(e.c,0);a.bDh(t.d,Gu(e.a,e.b))?-1:t.c==e.c&&Gu(t.a,t.b)==Gu(t.a,t.b)?0:1}(this,Vf(t,226))},eS.w=function(){return"ComparableEdgeAndPort [port="+this.b+", edge="+this.a+", portPosition="+this.c+"]"},eS.c=0,Fg(YD,"InLayerEdgeTwoNodeCrossingCounter/ComparableEdgeAndPort",226),$T(612,1,{},tN),eS.e=!0,eS.f=0,eS.g=0,eS.k=!1,Fg(YD,"NorthSouthEdgeAllCrossingsCounter",612),$T(615,1,{},Xm),eS.b=0,eS.d=0,eS.e=!1,Fg(YD,"NorthSouthEdgeNeighbouringNodeCrossingsCounter",615),$T(143,1,aM,zh),eS.mb=function(){return bA(this)},eS.b=0,Fg(YD,"PortIterable",143),$T(344,1,XS,Lv),eS.H=function(){return Vf(dg(this.a),7)},eS.G=function(){return this.a.b>0},eS.I=function(){throw new Kr},Fg(YD,"PortIterable/1",344),$T(336,1,{},FN),Fg(YD,"SwitchDecider",336),$T(89,1,{89:1},re),eS.w=function(){return"NEdge[id="+this.b+" w="+this.f+" d="+this.a+"]"},eS.a=1,eS.b=0,eS.e=!1,eS.f=0;var TY=Fg(VD,"NEdge",89);$T(157,1,{},jr),Fg(VD,"NEdge/NEdgeBuilder",157),$T(278,1,{},Rr),Fg(VD,"NGraph",278),$T(61,1,{61:1},Rb),eS.b=0,eS.d=-1,eS.e=0,eS.i=-1,eS.j=!1;var AY,OY,IY=Fg(VD,"NNode",61);$T(333,13,xD,Vr),eS.rb=function(t,e){++this.d,xy(t,this.c.length),Ac(this.c,t,e)},eS.ib=function(t){return Ng(this,t)},eS.jb=function(t){return++this.d,ox(this,t)},eS.Q=function(){++this.d,this.c=Ny(NP,GS,1,0,4,1)},eS.vb=function(t){return++this.d,yy(this,t)},eS.nb=function(t){return Pu(this,t)},Fg(VD,"NNode/ChangeAwareArrayList",333),$T(199,1,{},Gr),Fg(VD,"NNode/NNodeBuilder",199),$T(595,1,{},ie),eS.a=!1,eS.f=yS,eS.j=0,Fg(VD,"NetworkSimplex",595),$T(193,17,{180:1,193:1,3:1,23:1,17:1},js),eS.rc=function(){switch(this.e){case 0:return new Mf;case 1:return new Ee;default:throw new so("No implementation is available for the cycle breaker "+(null!=this.d?this.d:""+this.e))}};var LY,SY,MY,DY,PY,RY,jY=tw(XD,"CycleBreakingStrategy",193,RP,(function(){return Up(),Tx(Mo(jY,1),BS,193,0,[AY,OY])}));$T(539,1,WD,Mf),eS.qc=function(t){return SY},eS.sc=function(t,e){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,_,k,N,C,T,A,O,I,L;for(H_(e,"Greedy cycle removal",1),L=(b=t.b).c.length,this.a=Ny(iq,vM,26,L,12,1),this.c=Ny(iq,vM,26,L,12,1),this.b=Ny(iq,vM,26,L,12,1),s=0,p=new Kn(b);p.a0?N+1:1);for(i=new Kn(m.e);i.a0?N+1:1)}0==this.c[s]?If(this.d,d):0==this.a[s]&&If(this.e,d),++s}for(f=-1,h=1,u=new Re,C=Vf(kx(t,(ZL(),bX)),154);L>0;){for(;0!=this.d.b;)A=Vf(mf(this.d),9),this.b[A.k]=f--,DO(this,A),--L;for(;0!=this.e.b;)O=Vf(mf(this.e),9),this.b[O.k]=h++,DO(this,O),--L;if(L>0){for(l=kS,v=new Kn(b);v.a=l&&(y>l&&(u.c=Ny(NP,GS,1,0,4,1),l=y),u.c[u.c.length]=d);c=Vf(pd(u,Zk(C,u.c.length)),9),this.b[c.k]=h++,DO(this,c),--L}}for(T=b.c.length+1,s=0;sthis.b[I]&&(QO(n,!0),Ky(t,HU,(Ud(),Ud(),AW)));this.a=null,this.c=null,this.b=null,Mp(this.e),Mp(this.d),HE(e)},Fg(XD,"GreedyCycleBreaker",539),$T(540,1,WD,Ee),eS.qc=function(t){return MY},eS.sc=function(t,e){var n,r,i,o,a,s,c,u,l,h,f,d;for(H_(e,"Interactive cycle breaking",1),u=new Re,h=new Kn(t.b);h.a0&&LC(this,a,u);for(r=new Kn(u);r.a(a=s+u.j.a)?s+1:a,p=new Kv(n,0),r=null;p.b=a){Lu(p.b>0),p.a.sb(p.c=--p.b);break}d.a>s&&(r?(ox(r.b,d.b),r.a=Bo(r.a,d.a),up(p)):(Lf(d.b,u),d.c=zo(d.c,s),d.a=Bo(d.a,a),r=d))}r||((r=new Fr).c=s,r.a=a,ef(p,r),Lf(r.b,u))}for(o=t.c,c=0,g=new Kn(n);g.a0&&(n+=a.i.a+a.j.a/2,++u),l=new Kn(a.f);l.a1&&(t.c[l]=!0):y.g==KG&&y.e.c.length+y.b.c.length>1&&(t.d[l]=!0)}p.g==(RN(),FB)&&(++s[l],o[l]=!0)}for(n=!0,g=!0,a=0;a0;T++){c=(u=0!=LT(C,1))?0:p-1,s=this.b[c],k=0!=LT(C,1)?E:y,r_(s,i,u,!1,!0),o=yS,a=!0;do{if(Pm(this.b,this.k),N=o,o=0,o+=iw(this.f,s,c),u){for(v=1;v=0;v--)l=this.b[v],by(k,s,(nm(),PX)),r_(l,i,!1,!a,!1),o+=iw(this.f,l,v),this.c[v]||this.d[v+1]?o+=QL(this.e,l,s):o+=zL(this.i,l,s),s=l;c=0}a=!1,u=!u}while(o0);(or?o:r;if(o>a){for(l=y_(t,n).mb();l.G();)f[(u=Vf(l.H(),7)).k]=e+zT(n,u.g)-a;return o-a}return 0}switch(n.e){case 1:for(i=0,s=0,h=new Kn(t.f);h.a"),te.e?1:t.fe.f?1:fh(t)-fh(e)}(this,Vf(t,197))},eS.b=0,eS.c=0,eS.e=0,eS.f=0;var tz=Fg(rP,"HyperedgeCrossingsCounter/Hyperedge",197);$T(156,1,{156:1,23:1},Fp),eS.F=function(t){return function(t,e){return t.ce.c?1:t.be.b?1:t.a!=e.a?fh(t.a)-fh(e.a):t.d==(hb(),nz)&&e.d==ez?-1:t.d==ez&&e.d==nz?1:0}(this,Vf(t,156))},eS.b=0,eS.c=0;var ez,nz,rz=Fg(rP,"HyperedgeCrossingsCounter/HyperedgeCorner",156);$T(242,17,{242:1,3:1,23:1,17:1},sc);var iz,oz,az,sz,cz=tw(rP,"HyperedgeCrossingsCounter/HyperedgeCorner/Type",242,RP,(function(){return hb(),Tx(Mo(cz,1),BS,242,0,[nz,ez])}));$T(545,1,WD,Ae),eS.qc=function(t){return Vf(kx(t,(ZL(),qU)),18).kb((KA(),nU))?iz:null},eS.sc=function(t,e){var n;for(H_(e,"Interactive node placement",1),this.a=Vf(kx(t,(ZL(),xX)),134),n=new Kn(t.c);n.a(C=Vf(kx(n,(ZL(),pX)),24).a)?h:C;for(r=new Kn(k.e);r.a(C=Vf(kx(n,(ZL(),pX)),24).a)?_:C}Ky(w,az,qE(h)),Ky(w,sz,qE(_))}for(v=0,f=new Kn(e.c);f.a=0){for(c=null,s=new Kv(l.a,u+1);s.b0&&u[r]&&(g=rf(t.b,u[r],c)),p=Bo(p,i.d.c.b+g);for(o=new Kn(l.f);o.am)?(c=2,a=yS):0==c?(c=1,a=E):(c=0,a=E):(f=E>=a||a-E0?(l=Vf(pd(h.d.a,o-1),9),_=Nf(t.b,h,l),p=h.i.b-h.e.d-(l.i.b+l.j.b+l.e.a+_)):p=h.i.b-h.e.d,c=p0?_:0,d.c=n,d.d=Vf(Jg(w,u.c.f),61),Ng(d.c.g,d),Ng(d.d.c,d),(C=new re).f=jk(u),C.a=_<0?-_:0,C.c=n,C.d=Vf(Jg(w,u.d.f),61),Ng(C.c.g,C),Ng(C.d.c,C));for(i=Vf(kx(t,($L(),pW)),24).a*mv(Math.sqrt(y)),vO(bo(yo(Jh(r),i),!1),Mm(e,1)),p=new Kn(r.a);p.aa&&(a=Vf(kx(n,pX),24).a);for(r=Sg(XE(s));t_(r);)n=Vf(Tv(r),12),s.d!=n.c.f.d&&Vf(kx(n,(ZL(),pX)),24).a==a&&Lf(u,new es(n.c.f,n));xb(u,t.c),Sd(t.b,s.k,u)}}(h,t),h.f=Il(h.d),function(t,e){var n,r,i,o,a,s,c,u;for(o=new Kn(e.c);o.aa&&(a=Vf(kx(n,pX),24).a);for(r=Sg(WE(s));t_(r);)n=Vf(Tv(r),12),s.d!=n.d.f.d&&Vf(kx(n,(ZL(),pX)),24).a==a&&Lf(u,new es(n.d.f,n));xb(u,t.c),Sd(t.f,s.k,u)}}(h,t),h}(t),this.a=io(oo(Oh(kx(t,($L(),UX))))),this.e=$c(kx(t,KX))===$c((MN(),UV)),function(t,e){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w;if(!((p=e.c.c.length)<3)){for(d=Ny(iq,vM,26,p,12,1),h=0,l=new Kn(e.c);l.aa)&&Tg(t.c,Vf(v.b,12));++s}o=a}}}(this,t),Cw(4,dM),f=new cw(4),Vf(kx(t,KX),124).e){case 3:d=new yA(t,this.d.d,(ub(),xz),(dv(),yz)),f.c[f.c.length]=d;break;case 1:g=new yA(t,this.d.d,(ub(),Ez),(dv(),yz)),f.c[f.c.length]=g;break;case 4:b=new yA(t,this.d.d,(ub(),xz),(dv(),wz)),f.c[f.c.length]=b;break;case 2:y=new yA(t,this.d.d,(ub(),Ez),(dv(),wz)),f.c[f.c.length]=y;break;default:d=new yA(t,this.d.d,(ub(),xz),(dv(),yz)),g=new yA(t,this.d.d,Ez,yz),b=new yA(t,this.d.d,xz,wz),y=new yA(t,this.d.d,Ez,wz),f.c[f.c.length]=b,f.c[f.c.length]=y,f.c[f.c.length]=d,f.c[f.c.length]=g}for(n=new gc(t,this.d),o=new Kn(f);o.aE[c]&&(g=c),l=new Kn(t.b.c);l.axT(r))&&(u=r);for(!u&&(Ey(0,f.c.length),u=Vf(f.c[0],81)),h=new Kn(t.c);h.a0?1:r<0?-1:0)}(this,Vf(t,27),Vf(e,27))},Fg(aP,"NeighborhoodInformation/NeighborComparator",598),$T(334,1,{}),Fg(aP,"ThresholdStrategy",334),$T(602,334,{},ki),eS.Ic=function(t,e,n){return this.a.k==(ub(),Ez)?fD:dD},eS.Jc=function(){},Fg(aP,"ThresholdStrategy/NullThresholdStrategy",602),$T(249,1,{249:1},pc),eS.c=!1,eS.d=!1,Fg(aP,"ThresholdStrategy/Postprocessable",249),$T(603,334,{},Ni),eS.Ic=function(t,e,n){var r,i,o;return i=e==n,r=this.a.a[n.k]==e,i||r?(o=t,this.a.c,dv(),i&&(o=sI(this,e,!0)),(o==1/0||o==-1/0)&&r&&(o=sI(this,n,!1)),o):t},eS.Jc=function(){for(var t,e,n;0!=this.d.b;)(e=tO(this,n=Vf(Jp(this.d),249))).a&&(t=e.a,this.c.a[t.c.f.d.k]!==this.c.a[t.d.f.d.k]&&(GT(this,n)||uu(this.e,n)));for(;0!=this.e.a.c.length;)GT(this,Vf(Vx(this.e),249))},Fg(aP,"ThresholdStrategy/SimpleThresholdStrategy",603),$T(423,1,{180:1},ue),eS.rc=function(){switch(this.a.e){case 1:return new Yc;case 3:return new Me;default:return new Se}},Fg(sP,"EdgeRouterFactory",423),$T(538,1,WD,Se),eS.qc=function(t){var e,n;return n=Vf(kx(t,(ZL(),qU)),18),e=new i_,n.kb((KA(),rU))&&(Sm(e,Sz),Sm(e,Dz)),(n.kb(oU)||io(oo(Oh(kx(t,($L(),$X))))))&&(Sm(e,Dz),n.kb(aU)&&Sm(e,Pz)),n.kb(nU)&&Sm(e,Lz),n.kb(cU)&&Sm(e,Rz),n.kb(iU)&&Sm(e,Mz),n.kb(JV)&&Sm(e,Oz),n.kb(eU)&&Sm(e,Iz),e},eS.sc=function(t,e){var n,r,i,o,a,s,c,u,l,h,f,d;H_(e,"Orthogonal edge routing",1),f=Vf(kx(t,(ZL(),xX)),134),io(oo(Oh(kx(t,(JL(),dj))))),l=new mC(0,f.a),d=0,o=new Kv(t.c,0),a=null,s=null;do{u=(c=o.b0?(n=f.b+(h-1)*f.a,c&&(n+=f.b),n"+this.b},eS.c=0,Fg(sP,"OrthogonalRoutingGenerator/Dependency",118),$T(80,1,{80:1,23:1},qm),eS.F=function(t){return function(t,e){return t.d-e.d}(this,Vf(t,80))},eS.t=function(t){var e;return!!dl(t,80)&&(e=Vf(t,80),this.d==e.d)},eS.v=function(){return this.d},eS.w=function(){var t,e,n,r;for(t=new Zo("{"),r=new Kn(this.g);r.a_D&&(i=new ts(c,h),If(n.a,i),ZA(this.a,n,t,i,!1),o=new ts(l,h),If(n.a,o),ZA(this.a,n,t,o,!1))},eS.Lc=function(t){return t.f.i.a+t.i.a+t.a.a},eS.Mc=function(){return wL(),ZG},eS.Nc=function(){return wL(),SG},Fg(sP,"OrthogonalRoutingGenerator/NorthToSouthRoutingStrategy",580),$T(581,1,{},jn),eS.Kc=function(t,e){var n,r,i,o,a,s,c,u,l,h;for(h=e-t.i*this.a.c,s=new Kn(t.g);s.a_D&&(i=new ts(c,h),If(n.a,i),ZA(this.a,n,t,i,!1),o=new ts(l,h),If(n.a,o),ZA(this.a,n,t,o,!1))},eS.Lc=function(t){return t.f.i.a+t.i.a+t.a.a},eS.Mc=function(){return wL(),SG},eS.Nc=function(){return wL(),ZG},Fg(sP,"OrthogonalRoutingGenerator/SouthToNorthRoutingStrategy",581),$T(579,1,{},Gn),eS.Kc=function(t,e){var n,r,i,o,a,s,c,u,l,h;for(h=e+t.i*this.a.c,s=new Kn(t.g);s.a_D&&(i=new ts(h,c),If(n.a,i),ZA(this.a,n,t,i,!0),o=new ts(h,l),If(n.a,o),ZA(this.a,n,t,o,!0))},eS.Lc=function(t){return t.f.i.b+t.i.b+t.a.b},eS.Mc=function(){return wL(),LG},eS.Nc=function(){return wL(),KG},Fg(sP,"OrthogonalRoutingGenerator/WestToEastRoutingStrategy",579),$T(535,1,WD,Yc),eS.qc=function(t){var e,n;return n=Vf(kx(t,(ZL(),qU)),18),e=new i_,(n.kb((KA(),oU))||io(oo(Oh(kx(t,($L(),$X))))))&&(Sm(e,Fz),n.kb(aU)&&Sm(e,Bz)),n.kb(JV)&&Sm(e,jz),n.kb(eU)&&Sm(e,Gz),e},eS.sc=function(t,e){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x;for(H_(e,"Polyline edge routing",1),h=Vf(kx(t,(ZL(),mX)),15).a,n=Vf(kx(t,($L(),ZX)),15).a,v=0,0!=t.c.c.length&&(v=.4*n*(b=BT(Vf(pd(t.c,0),16)))),o=new Kv(t.c,0);o.b0&&(v-=h),PI(i,v),c=0,l=new Kn(i.a);l.a(p-g<=0?0-(p-g):p-g)?s:p-g<=0?0-(p-g):p-g;switch(u.g.e){case 0:case 4:case 1:case 3:lI(this,u,v)}c=c>s?c:s}o.b(b=BT((Lu(o.b0),o.a.sb(o.c=--o.b)),a=.4*n*c,!r&&o.b0?((f=(b+1)*this.a)=0&&(I+=(b+2)*this.a)}p=m,c=u}while(m);for(r=new Kn(T);r.a("+this.c+") "+this.b},eS.c=0,Fg(cP,"SplineEdgeRouter/Dependency",117),$T(223,17,{223:1,3:1,23:1,17:1},vc);var CV,TV,AV,OV,IV,LV,SV=tw(cP,"SplineEdgeRouter/SideToProcess",223,RP,(function(){return gv(),Tx(Mo(SV,1),BS,223,0,[_V,kV])}));$T(77,1,{77:1,23:1},KC,MI),eS.F=function(t){return function(t,e){return t.i-e.i}(this,Vf(t,77))},eS.a=0,eS.b=0,eS.e=0,eS.f=!1,eS.i=0,eS.k=0,eS.n=0,eS.p=0,Fg(cP,"SplineEdgeRouter/SplineHyperEdge",77),$T(123,17,{123:1,3:1,23:1,17:1},bc);var MV,DV,PV,RV,jV=tw(dP,"ContentAlignment",123,RP,(function(){return DN(),Tx(Mo(jV,1),BS,123,0,[LV,IV,OV,TV,CV,AV])}));$T(218,17,{218:1,3:1,23:1,17:1},yc);var GV,FV,BV,HV,YV,zV=tw(dP,"EdgeConstraint",218,RP,(function(){return Px(),Tx(Mo(zV,1),BS,218,0,[PV,DV,RV])}));$T(115,17,{115:1,3:1,23:1,17:1},wc);var VV,UV,XV,WV,qV,ZV,$V,KV=tw(dP,"EdgeLabelSideSelection",115,RP,(function(){return wN(),Tx(Mo(KV,1),BS,115,0,[FV,GV,HV,BV,YV])}));$T(124,17,{124:1,3:1,23:1,17:1},mc);var QV,JV,tU,eU,nU,rU,iU,oU,aU,sU,cU,uU=tw(dP,"FixedAlignment",124,RP,(function(){return MN(),Tx(Mo(uU,1),BS,124,0,[qV,WV,$V,XV,ZV,UV])}));$T(113,17,{113:1,3:1,23:1,17:1},xc);var lU,hU,fU,dU,gU,pU,vU,bU,yU=tw(dP,"GraphProperties",113,RP,(function(){return KA(),Tx(Mo(yU,1),BS,113,0,[tU,nU,rU,iU,oU,aU,cU,JV,eU,sU])}));$T(110,17,{110:1,3:1,23:1,17:1},kb),eS.a=!1,eS.b=!1,eS.c=!1;var wU,mU,xU,EU,_U=tw(dP,"GreedySwitchType",110,RP,(function(){return NI(),Tx(Mo(_U,1),BS,110,0,[hU,pU,fU,vU,dU,bU,gU,lU])}));$T(140,17,{140:1,3:1,23:1,17:1},Ec);var kU,NU,CU=tw(dP,"InLayerConstraint",140,RP,(function(){return jw(),Tx(Mo(CU,1),BS,140,0,[xU,EU,mU])}));$T(174,17,{174:1,3:1,23:1,17:1},_c);var TU,AU,OU,IU,LU,SU,MU,DU,PU,RU,jU,GU,FU,BU,HU,YU,zU,VU,UU,XU,WU,qU,ZU,$U,KU,QU,JU,tX,eX,nX,rX,iX,oX,aX,sX,cX,uX,lX,hX,fX,dX,gX,pX,vX,bX,yX,wX,mX,xX,EX,_X,kX,NX,CX,TX,AX,OX,IX,LX,SX,MX=tw(dP,"InteractiveReferencePoint",174,RP,(function(){return cb(),Tx(Mo(MX,1),BS,174,0,[kU,NU])}));$T(85,17,{85:1,3:1,23:1,17:1},kc);var DX,PX,RX,jX,GX=tw(dP,"LayerConstraint",85,RP,(function(){return Xk(),Tx(Mo(GX,1),BS,85,0,[SX,AX,OX,IX,LX])}));$T(219,17,{219:1,3:1,23:1,17:1},Nc);var FX,BX,HX,YX,zX,VX,UX,XX,WX,qX,ZX,$X,KX,QX,JX,tW,eW,nW,rW,iW,oW,aW,sW,cW,uW,lW,hW,fW,dW,gW,pW,vW,bW,yW,wW,mW=tw(dP,"PortType",219,RP,(function(){return nm(),Tx(Mo(mW,1),BS,219,0,[jX,PX,RX])}));$T(153,17,{153:1,3:1,23:1,17:1},Cc);var xW,EW,_W,kW,NW=tw(dP,"SelfLoopPlacement",153,RP,(function(){return M_(),Tx(Mo(NW,1),BS,153,0,[bW,wW,yW])}));$T(134,1,{134:1},pL),eS.a=0,eS.b=0,eS.c=0,eS.d=0,eS.e=0,eS.f=0,Fg(dP,"Spacings",134),$T(172,17,{172:1,3:1,23:1,17:1},Tc);var CW,TW,AW,OW=tw(dP,"WideNodesStrategy",172,RP,(function(){return Fm(),Tx(Mo(OW,1),BS,172,0,[EW,_W,kW])}));$T(644,1,{}),Fg(MS,"OutputStream",644),$T(645,644,{}),Fg(MS,"FilterOutputStream",645),$T(291,645,{},he),Fg(MS,"PrintStream",291),$T(255,1,{}),eS.w=function(){return this.a},Fg(IS,"AbstractStringBuilder",255),$T(621,95,dS,Ci),Fg(IS,"ArrayIndexOutOfBoundsException",621),$T(290,72,dS,qr,_o),Fg(IS,"ArrayStoreException",290),$T(252,46,fS),Fg(IS,"Error",252),$T(84,252,fS,_r,sw),Fg(IS,"AssertionError",84),aS={3:1,349:1,23:1};var IW=Fg(IS,"Boolean",349);sS={3:1,23:1,184:1,231:1};var LW=Fg(IS,"Double",184);$T(15,231,{3:1,23:1,15:1,231:1},Bn,Hn),eS.F=function(t){return function(t,e){return Ix(t.a,e.a)}(this,Vf(t,15))},eS.t=function(t){return dl(t,15)&&Vf(t,15).a==this.a},eS.v=function(){return mv(this.a)},eS.w=function(){return t=this.a,si(),""+t;var t},eS.a=0;var SW,MW,DW=Fg(IS,"Float",15);$T(101,72,dS,Zr,ko),Fg(IS,"IllegalStateException",101),$T(608,72,dS,No),Fg(IS,"NegativeArraySizeException",608),$T(76,72,{3:1,54:1,76:1,46:1},$r,Co),Fg(IS,"NullPointerException",76),$T(130,29,{3:1,54:1,29:1,130:1,46:1},Ti,$o),Fg(IS,"NumberFormatException",130),$T(146,1,{3:1,146:1},Bp),eS.t=function(t){var e;return!!dl(t,146)&&(e=Vf(t,146),this.c==e.c&&Ap(this.d,e.d)&&Ap(this.a,e.a)&&Ap(this.b,e.b))},eS.v=function(){return Zx(Tx(Mo(NP,1),GS,1,4,[qE(this.c),this.a,this.d,this.b]))},eS.w=function(){return this.a+"."+this.d+"("+(null!=this.b?this.b:"Unknown Source")+(this.c>=0?":"+this.c:"")+")"},eS.c=0;var PW,RW,jW,GW,FW,BW,HW,YW,zW=Fg(IS,"StackTraceElement",146);$T(98,255,{345:1},ta,ea,Zo),Fg(IS,"StringBuilder",98),$T(45,72,{3:1,54:1,46:1,45:1},Kr,To),Fg(IS,"UnsupportedOperationException",45),$T(213,638,WS),eS.Q=function(){wy(this)},eS.R=function(t){return Xy(this,t)},eS.ab=function(t){return Jx(this,t,this.e)||Jx(this,t,this.d)},eS.bb=function(){return new Yn(this)},eS.cb=function(t){return Jg(this,t)},eS.db=function(t,e){return mp(this,t,e)},eS.eb=function(t){return Kd(this,t)},eS.Y=function(){return Hs(this)},Fg(qS,"AbstractHashMap",213),$T(120,641,$S,Yn),eS.Q=function(){this.a.Q()},eS.kb=function(t){return fb(this,t)},eS.mb=function(){return new Wx(this.a)},eS.nb=function(t){var e;return!!fb(this,t)&&(e=Vf(t,21).yb(),this.a.eb(e),!0)},eS.Y=function(){return this.a.Y()},Fg(qS,"AbstractHashMap/EntrySet",120),$T(148,1,XS,Wx),eS.H=function(){return Vw(this)},eS.G=function(){return this.b},eS.I=function(){Hy(this)},eS.b=!1,Fg(qS,"AbstractHashMap/EntrySetIterator",148),$T(162,1,XS,zn),eS.G=function(){return this.b0},eS.L=function(){return this.b},eS.M=function(){return dg(this)},eS.N=function(){return this.b-1},eS.O=function(t){nf(this,t)},Fg(qS,"AbstractList/ListIteratorImpl",43),$T(258,647,KS,qv),eS.rb=function(t,e){xy(t,this.b),this.c.rb(this.a+t,e),++this.b},eS.sb=function(t){return Ey(t,this.b),this.c.sb(this.a+t)},eS.vb=function(t){var e;return Ey(t,this.b),e=this.c.vb(this.a+t),--this.b,e},eS.wb=function(t,e){return Ey(t,this.b),this.c.wb(this.a+t,e)},eS.Y=function(){return this.b},eS.a=0,eS.b=0,Fg(qS,"AbstractList/SubList",258),$T(36,641,$S,Vn),eS.Q=function(){this.a.Q()},eS.kb=function(t){return this.a.R(t)},eS.mb=function(){return new Un(this.a.bb().mb())},eS.nb=function(t){return!!this.a.R(t)&&(this.a.eb(t),!0)},eS.Y=function(){return this.a.Y()},Fg(qS,"AbstractMap/1",36),$T(40,1,XS,Un),eS.G=function(){return this.a.G()},eS.H=function(){return Vf(this.a.H(),21).yb()},eS.I=function(){this.a.I()},Fg(qS,"AbstractMap/1/1",40),$T(211,640,ZS,Xn),eS.Q=function(){this.a.Q()},eS.kb=function(t){return this.a.ab(t)},eS.mb=function(){return new Wn(this.a.bb().mb())},eS.Y=function(){return this.a.Y()},Fg(qS,"AbstractMap/2",211),$T(212,1,XS,Wn),eS.G=function(){return this.a.G()},eS.H=function(){return Vf(this.a.H(),21).zb()},eS.I=function(){this.a.I()},Fg(qS,"AbstractMap/2/1",212),$T(210,1,{210:1,21:1}),eS.t=function(t){var e;return!!dl(t,21)&&(e=Vf(t,21),Ap(this.d,e.yb())&&Ap(this.e,e.zb()))},eS.yb=function(){return this.d},eS.zb=function(){return this.e},eS.v=function(){return Bu(this.d)^Bu(this.e)},eS.Ab=function(t){return bf(this,t)},eS.w=function(){return this.d+"="+this.e},Fg(qS,"AbstractMap/AbstractEntry",210),$T(163,210,{210:1,163:1,21:1},Bc),Fg(qS,"AbstractMap/SimpleEntry",163),$T(652,1,eM),eS.t=function(t){var e;return!!dl(t,21)&&(e=Vf(t,21),Ap(this.yb(),e.yb())&&Ap(this.zb(),e.zb()))},eS.v=function(){return Bu(this.yb())^Bu(this.zb())},eS.w=function(){return this.yb()+"="+this.zb()},Fg(qS,nM,652),$T(639,638,WS),eS._=function(t){return _y(this,t)},eS.R=function(t){return Rc(this,t)},eS.bb=function(){return new qn(this)},eS.cb=function(t){return Kc(tE(this,t))},eS.W=function(){return new Zn(this)},Fg(qS,"AbstractNavigableMap",639),$T(287,641,$S,qn),eS.kb=function(t){return dl(t,21)&&_y(this.b,Vf(t,21))},eS.mb=function(){return new ff(this.b)},eS.nb=function(t){var e;return!!dl(t,21)&&(e=Vf(t,21),jy(this.b,e))},eS.Y=function(){return this.b.c},Fg(qS,"AbstractNavigableMap/EntrySet",287),$T(229,641,tM,Zn),eS.Q=function(){fo(this.a)},eS.kb=function(t){return Rc(this.a,t)},eS.mb=function(){return new $n(new ff(new th(this.a).b))},eS.nb=function(t){return!!Rc(this.a,t)&&(vp(this.a,t),!0)},eS.Y=function(){return this.a.c},Fg(qS,"AbstractNavigableMap/NavigableKeySet",229),$T(230,1,XS,$n),eS.G=function(){return Bs(this.a.a)},eS.H=function(){return ph(this.a).yb()},eS.I=function(){rd(this.a)},Fg(qS,"AbstractNavigableMap/NavigableKeySet/1",230),$T(4,1,XS,Kn),eS.G=function(){return gl(this)},eS.H=function(){return Jv(this)},eS.I=function(){fg(this)},eS.a=0,eS.b=-1,Fg(qS,"ArrayList/1",4),$T(94,647,pP,Qn),eS.kb=function(t){return-1!=function(t,e){var n,r;for(n=0,r=t.Y();n2e3&&(dR=t,gR=r.setTimeout(da,10)),0==fR++&&(function(t){var e,n;if(t.a){n=null;do{e=t.a,t.a=null,n=OC(e,n)}while(t.a);t.a=n}}((hi(),iR)),!0)}();try{return function(t,e,n){return t.apply(e,n)}(t,e,n)}finally{!function(t){t&&function(t){var e,n;if(t.b){n=null;do{e=t.b,t.b=null,n=OC(e,n)}while(t.b);t.b=n}}((hi(),iR)),--fR,t&&-1!=gR&&(function(t){r.clearTimeout(t)}(gR),gR=-1)}(i)}}(t,this,arguments)}},lq=lq=function(t,e,n,r){ho();var i=rS;function o(){for(var t=0;te&&(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-n)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(t){var e=this.rect.x;e>a.WORLD_BOUNDARY?e=a.WORLD_BOUNDARY:e<-a.WORLD_BOUNDARY&&(e=-a.WORLD_BOUNDARY);var n=this.rect.y;n>a.WORLD_BOUNDARY?n=a.WORLD_BOUNDARY:n<-a.WORLD_BOUNDARY&&(n=-a.WORLD_BOUNDARY);var r=new c(e,n),i=t.inverseTransformPoint(r);this.setLocation(i.x,i.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=u},function(t,e,n){"use strict";function r(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=r},function(t,e,n){"use strict";var r=n(2),i=n(10),o=n(0),a=n(6),s=n(3),c=n(1),u=n(13),l=n(12),h=n(11);function f(t,e,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof a?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var d in f.prototype=Object.create(r.prototype),r)f[d]=r[d];f.prototype.getNodes=function(){return this.nodes},f.prototype.getEdges=function(){return this.edges},f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getParent=function(){return this.parent},f.prototype.getLeft=function(){return this.left},f.prototype.getRight=function(){return this.right},f.prototype.getTop=function(){return this.top},f.prototype.getBottom=function(){return this.bottom},f.prototype.isConnected=function(){return this.isConnected},f.prototype.add=function(t,e,n){if(null==e&&null==n){var r=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var i=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(n)>-1))throw"Source or target not in graph!";if(e.owner!=n.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=n.owner?null:(i.source=e,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),e.edges.push(i),n!=e&&n.edges.push(i),i)},f.prototype.remove=function(t){var e=t;if(t instanceof s){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var n=e.edges.slice(),r=n.length,i=0;i-1&&l>-1))throw"Source and/or target doesn't know this edge!";if(o.source.edges.splice(u,1),o.target!=o.source&&o.target.edges.splice(l,1),-1==(a=o.source.owner.getEdges().indexOf(o)))throw"Not in owner's edge list!";o.source.owner.getEdges().splice(a,1)}},f.prototype.updateLeftTop=function(){for(var t,e,n,r=i.MAX_VALUE,o=i.MAX_VALUE,a=this.getNodes(),s=a.length,c=0;c(t=u.getTop())&&(r=t),o>(e=u.getLeft())&&(o=e)}return r==i.MAX_VALUE?null:(n=null!=a[0].getParent().paddingLeft?a[0].getParent().paddingLeft:this.margin,this.left=o-n,this.top=r-n,new l(this.left,this.top))},f.prototype.updateBounds=function(t){for(var e,n,r,o,a,s=i.MAX_VALUE,c=-i.MAX_VALUE,l=i.MAX_VALUE,h=-i.MAX_VALUE,f=this.nodes,d=f.length,g=0;g(e=p.getLeft())&&(s=e),c<(n=p.getRight())&&(c=n),l>(r=p.getTop())&&(l=r),h<(o=p.getBottom())&&(h=o)}var v=new u(s,l,c-s,h-l);s==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),a=null!=f[0].getParent().paddingLeft?f[0].getParent().paddingLeft:this.margin,this.left=v.x-a,this.right=v.x+v.width+a,this.top=v.y-a,this.bottom=v.y+v.height+a},f.calculateBounds=function(t){for(var e,n,r,o,a=i.MAX_VALUE,s=-i.MAX_VALUE,c=i.MAX_VALUE,l=-i.MAX_VALUE,h=t.length,f=0;f(e=d.getLeft())&&(a=e),s<(n=d.getRight())&&(s=n),c>(r=d.getTop())&&(c=r),l<(o=d.getBottom())&&(l=o)}return new u(a,c,s-a,l-c)},f.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},f.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},f.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,n=e.length,r=0;r=this.nodes.length){var c=0;i.forEach((function(e){e.owner==t&&c++})),c==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=f},function(t,e,n){"use strict";var r,i=n(1);function o(t){r=n(5),this.layout=t,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),n=this.add(t,e);return this.setRootGraph(n),this.rootGraph},o.prototype.add=function(t,e,n,r,i){if(null==n&&null==r&&null==i){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}i=n,n=t;var o=(r=e).getOwner(),a=i.getOwner();if(null==o||o.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==a||a.getGraphManager()!=this)throw"Target not in this graph mgr!";if(o==a)return n.isInterGraph=!1,o.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(n),null==n.source||null==n.target)throw"Edge source and/or target is null!";if(-1!=n.source.edges.indexOf(n)||-1!=n.target.edges.indexOf(n))throw"Edge already in source and/or target incidency list!";return n.source.edges.push(n),n.target.edges.push(n),n},o.prototype.remove=function(t){if(t instanceof r){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var n,o=[],a=(o=o.concat(e.getEdges())).length,s=0;s=e.getRight()?n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var o=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(o=1);var a=o*n[0],s=n[1]/o;n[0]a)return n[0]=r,n[1]=c,n[2]=o,n[3]=w,!1;if(io)return n[0]=s,n[1]=i,n[2]=b,n[3]=a,!1;if(ro?(n[0]=l,n[1]=h,_=!0):(n[0]=u,n[1]=c,_=!0):N===T&&(r>o?(n[0]=s,n[1]=c,_=!0):(n[0]=f,n[1]=h,_=!0)),-C===T?o>r?(n[2]=y,n[3]=w,k=!0):(n[2]=b,n[3]=v,k=!0):C===T&&(o>r?(n[2]=p,n[3]=v,k=!0):(n[2]=m,n[3]=w,k=!0)),_&&k)return!1;if(r>o?i>a?(A=this.getCardinalDirection(N,T,4),O=this.getCardinalDirection(C,T,2)):(A=this.getCardinalDirection(-N,T,3),O=this.getCardinalDirection(-C,T,1)):i>a?(A=this.getCardinalDirection(-N,T,1),O=this.getCardinalDirection(-C,T,3)):(A=this.getCardinalDirection(N,T,2),O=this.getCardinalDirection(C,T,4)),!_)switch(A){case 1:L=c,I=r+-g/T,n[0]=I,n[1]=L;break;case 2:I=f,L=i+d*T,n[0]=I,n[1]=L;break;case 3:L=h,I=r+g/T,n[0]=I,n[1]=L;break;case 4:I=l,L=i+-d*T,n[0]=I,n[1]=L}if(!k)switch(O){case 1:M=v,S=o+-E/T,n[2]=S,n[3]=M;break;case 2:S=m,M=a+x*T,n[2]=S,n[3]=M;break;case 3:M=w,S=o+E/T,n[2]=S,n[3]=M;break;case 4:S=y,M=a+-x*T,n[2]=S,n[3]=M}}return!1},i.getCardinalDirection=function(t,e,n){return t>e?n:1+n%4},i.getIntersection=function(t,e,n,i){if(null==i)return this.getIntersection2(t,e,n);var o,a,s,c,u,l,h,f=t.x,d=t.y,g=e.x,p=e.y,v=n.x,b=n.y,y=i.x,w=i.y;return 0==(h=(o=p-d)*(c=v-y)-(a=w-b)*(s=f-g))?null:new r((s*(l=y*b-v*w)-c*(u=g*d-f*p))/h,(a*u-o*l)/h)},i.angleOfVector=function(t,e,n,r){var i=void 0;return t!==n?(i=Math.atan((r-e)/(n-t)),n0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=r},function(t,e,n){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,t.exports=r},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n0&&e;){for(s.push(u[0]);s.length>0&&e;){var l=s[0];s.splice(0,1),a.add(l);var h=l.getEdges();for(o=0;o-1&&u.splice(p,1)}a=new Set,c=new Map}else t=[]}return t},f.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],n=t.source,r=this.graphManager.calcLowestCommonAncestor(t.source,t.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(n),o=0;o=0&&e.splice(h,1),l.getNeighborsList().forEach((function(t){if(n.indexOf(t)<0){var e=r.get(t)-1;1==e&&c.push(t),r.set(t,e)}}))}n=n.concat(c),1!=e.length&&2!=e.length||(i=!0,o=e[0])}return o},f.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=f},function(t,e,n){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},t.exports=r},function(t,e,n){"use strict";var r=n(4);function i(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}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(t){this.lworldExtX=t},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(t){this.lworldExtY=t},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},i.prototype.transformX=function(t){var e=0,n=this.lworldExtX;return 0!=n&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/n),e},i.prototype.transformY=function(t){var e=0,n=this.lworldExtY;return 0!=n&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/n),e},i.prototype.inverseTransformX=function(t){var e=0,n=this.ldeviceExtX;return 0!=n&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/n),e},i.prototype.inverseTransformY=function(t){var e=0,n=this.ldeviceExtY;return 0!=n&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/n),e},i.prototype.inverseTransformPoint=function(t){return new r(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=i},function(t,e,n){"use strict";var r=n(15),i=n(7),o=n(0),a=n(8),s=n(9);function c(){r.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=i.DEFAULT_EDGE_LENGTH,this.springConstant=i.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=i.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}for(var u in c.prototype=Object.create(r.prototype),r)c[u]=r[u];c.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},c.prototype.calcIdealEdgeLengths=function(){for(var t,e,n,r,a,s,c=this.getGraphManager().getAllEdges(),u=0;ui.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},c.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),n=0;n0&&void 0!==arguments[0])||arguments[0],s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&a&&this.updateGrid(),o=new Set,t=0;t(c=e.getEstimatedSize()*this.gravityRangeFactor)||s>c)&&(t.gravitationForceX=-this.gravityConstant*i,t.gravitationForceY=-this.gravityConstant*o):(a>(c=e.getEstimatedSize()*this.compoundGravityRangeFactor)||s>c)&&(t.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},c.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=s.length||u>=s[0].length))for(var l=0;lt}}]),t}();t.exports=o},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sequence1=e,this.sequence2=n,this.match_score=r,this.mismatch_penalty=i,this.gap_penalty=o,this.iMax=e.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var a=0;a=0;n--){var r=this.listeners[n];r.event===t&&r.callback===e&&this.listeners.splice(n,1)}},i.emit=function(t,e){for(var n=0;n{var r=n(6110)(n(9325),"DataView");t.exports=r},1549:(t,e,n)=>{var r=n(2032),i=n(3862),o=n(6721),a=n(2749),s=n(5749);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var r=n(3702),i=n(80),o=n(4739),a=n(8655),s=n(1175);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var r=n(6110)(n(9325),"Map");t.exports=r},3661:(t,e,n)=>{var r=n(3040),i=n(7670),o=n(289),a=n(4509),s=n(2949);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var r=n(6110)(n(9325),"Promise");t.exports=r},6545:(t,e,n)=>{var r=n(6110)(n(9325),"Set");t.exports=r},8859:(t,e,n)=>{var r=n(3661),i=n(1380),o=n(1459);function a(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e{var r=n(79),i=n(1420),o=n(938),a=n(3605),s=n(9817),c=n(945);function u(t){var e=this.__data__=new r(t);this.size=e.size}u.prototype.clear=i,u.prototype.delete=o,u.prototype.get=a,u.prototype.has=s,u.prototype.set=c,t.exports=u},1873:(t,e,n)=>{var r=n(9325).Symbol;t.exports=r},7828:(t,e,n)=>{var r=n(9325).Uint8Array;t.exports=r},8303:(t,e,n)=>{var r=n(6110)(n(9325),"WeakMap");t.exports=r},1033:t=>{t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},3729:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n{var r=n(6131);t.exports=function(t,e){return!(null==t||!t.length)&&r(t,e,0)>-1}},9905:t=>{t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r{var r=n(8096),i=n(2428),o=n(6449),a=n(3656),s=n(361),c=n(7167),u=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),l=!n&&i(t),h=!n&&!l&&a(t),f=!n&&!l&&!h&&c(t),d=n||l||h||f,g=d?r(t.length,String):[],p=g.length;for(var v in t)!e&&!u.call(t,v)||d&&("length"==v||h&&("offset"==v||"parent"==v)||f&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,p))||g.push(v);return g}},4932:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n{t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n{t.exports=function(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n{var r=n(7237)("length");t.exports=r},7805:(t,e,n)=>{var r=n(3360),i=n(5288);t.exports=function(t,e,n){(void 0!==n&&!i(t[e],n)||void 0===n&&!(e in t))&&r(t,e,n)}},6547:(t,e,n)=>{var r=n(3360),i=n(5288),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];o.call(t,e)&&i(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},6025:(t,e,n)=>{var r=n(5288);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},4733:(t,e,n)=>{var r=n(1791),i=n(5950);t.exports=function(t,e){return t&&r(e,i(e),t)}},3838:(t,e,n)=>{var r=n(1791),i=n(7241);t.exports=function(t,e){return t&&r(e,i(e),t)}},3360:(t,e,n)=>{var r=n(3243);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},9999:(t,e,n)=>{var r=n(7217),i=n(3729),o=n(6547),a=n(4733),s=n(3838),c=n(3290),u=n(3007),l=n(2271),h=n(8948),f=n(2),d=n(3349),g=n(5861),p=n(6189),v=n(7199),b=n(5529),y=n(6449),w=n(3656),m=n(7730),x=n(3805),E=n(8440),_=n(5950),k=n(7241),N="[object Arguments]",C="[object Function]",T="[object Object]",A={};A[N]=A["[object Array]"]=A["[object ArrayBuffer]"]=A["[object DataView]"]=A["[object Boolean]"]=A["[object Date]"]=A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Map]"]=A["[object Number]"]=A[T]=A["[object RegExp]"]=A["[object Set]"]=A["[object String]"]=A["[object Symbol]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A["[object Error]"]=A[C]=A["[object WeakMap]"]=!1,t.exports=function t(e,n,O,I,L,S){var M,D=1&n,P=2&n,R=4&n;if(O&&(M=L?O(e,I,L,S):O(e)),void 0!==M)return M;if(!x(e))return e;var j=y(e);if(j){if(M=p(e),!D)return u(e,M)}else{var G=g(e),F=G==C||"[object GeneratorFunction]"==G;if(w(e))return c(e,D);if(G==T||G==N||F&&!L){if(M=P||F?{}:b(e),!D)return P?h(e,s(M,e)):l(e,a(M,e))}else{if(!A[G])return L?e:{};M=v(e,G,D)}}S||(S=new r);var B=S.get(e);if(B)return B;S.set(e,M),E(e)?e.forEach((function(r){M.add(t(r,n,O,r,e,S))})):m(e)&&e.forEach((function(r,i){M.set(i,t(r,n,O,i,e,S))}));var H=j?void 0:(R?P?d:f:P?k:_)(e);return i(H||e,(function(r,i){H&&(r=e[i=r]),o(M,i,t(r,n,O,i,e,S))})),M}},9344:(t,e,n)=>{var r=n(3805),i=Object.create,o=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=o},909:(t,e,n)=>{var r=n(641),i=n(8329)(r);t.exports=i},3599:(t,e,n)=>{var r=n(4394);t.exports=function(t,e,n){for(var i=-1,o=t.length;++i{var r=n(909);t.exports=function(t,e){var n=[];return r(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}},2523:t=>{t.exports=function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o{var r=n(4528),i=n(5891);t.exports=function t(e,n,o,a,s){var c=-1,u=e.length;for(o||(o=i),s||(s=[]);++c0&&o(l)?n>1?t(l,n-1,o,a,s):r(s,l):a||(s[s.length]=l)}return s}},6649:(t,e,n)=>{var r=n(3221)();t.exports=r},641:(t,e,n)=>{var r=n(6649),i=n(5950);t.exports=function(t,e){return t&&r(t,e,i)}},7422:(t,e,n)=>{var r=n(1769),i=n(7797);t.exports=function(t,e){for(var n=0,o=(e=r(e,t)).length;null!=t&&n{var r=n(4528),i=n(6449);t.exports=function(t,e,n){var o=e(t);return i(t)?o:r(o,n(t))}},2552:(t,e,n)=>{var r=n(1873),i=n(659),o=n(9350),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?i(t):o(t)}},3335:t=>{t.exports=function(t,e){return t>e}},426:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t,n){return null!=t&&e.call(t,n)}},8077:t=>{t.exports=function(t,e){return null!=t&&e in Object(t)}},6131:(t,e,n)=>{var r=n(2523),i=n(5463),o=n(6959);t.exports=function(t,e,n){return e==e?o(t,e,n):r(t,i,n)}},7534:(t,e,n)=>{var r=n(2552),i=n(346);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},270:(t,e,n)=>{var r=n(7068),i=n(346);t.exports=function t(e,n,o,a,s){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,o,a,t,s))}},7068:(t,e,n)=>{var r=n(7217),i=n(5911),o=n(1986),a=n(689),s=n(5861),c=n(6449),u=n(3656),l=n(7167),h="[object Arguments]",f="[object Array]",d="[object Object]",g=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,p,v,b){var y=c(t),w=c(e),m=y?f:s(t),x=w?f:s(e),E=(m=m==h?d:m)==d,_=(x=x==h?d:x)==d,k=m==x;if(k&&u(t)){if(!u(e))return!1;y=!0,E=!1}if(k&&!E)return b||(b=new r),y||l(t)?i(t,e,n,p,v,b):o(t,e,m,n,p,v,b);if(!(1&n)){var N=E&&g.call(t,"__wrapped__"),C=_&&g.call(e,"__wrapped__");if(N||C){var T=N?t.value():t,A=C?e.value():e;return b||(b=new r),v(T,A,n,p,b)}}return!!k&&(b||(b=new r),a(t,e,n,p,v,b))}},9172:(t,e,n)=>{var r=n(5861),i=n(346);t.exports=function(t){return i(t)&&"[object Map]"==r(t)}},1799:(t,e,n)=>{var r=n(7217),i=n(270);t.exports=function(t,e,n,o){var a=n.length,s=a,c=!o;if(null==t)return!s;for(t=Object(t);a--;){var u=n[a];if(c&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++a{t.exports=function(t){return t!=t}},5083:(t,e,n)=>{var r=n(1882),i=n(7296),o=n(3805),a=n(7473),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,h=u.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?f:s).test(a(t))}},6038:(t,e,n)=>{var r=n(5861),i=n(346);t.exports=function(t){return i(t)&&"[object Set]"==r(t)}},4901:(t,e,n)=>{var r=n(2552),i=n(294),o=n(346),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!a[r(t)]}},5389:(t,e,n)=>{var r=n(3663),i=n(7978),o=n(3488),a=n(6449),s=n(583);t.exports=function(t){return"function"==typeof t?t:null==t?o:"object"==typeof t?a(t)?i(t[0],t[1]):r(t):s(t)}},8984:(t,e,n)=>{var r=n(5527),i=n(3650),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e}},2903:(t,e,n)=>{var r=n(3805),i=n(5527),o=n(181),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=i(t),n=[];for(var s in t)("constructor"!=s||!e&&a.call(t,s))&&n.push(s);return n}},6176:t=>{t.exports=function(t,e){return t{var r=n(909),i=n(4894);t.exports=function(t,e){var n=-1,o=i(t)?Array(t.length):[];return r(t,(function(t,r,i){o[++n]=e(t,r,i)})),o}},3663:(t,e,n)=>{var r=n(1799),i=n(776),o=n(7197);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?o(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},7978:(t,e,n)=>{var r=n(270),i=n(8156),o=n(631),a=n(8586),s=n(756),c=n(7197),u=n(7797);t.exports=function(t,e){return a(t)&&s(e)?c(u(t),e):function(n){var a=i(n,t);return void 0===a&&a===e?o(n,t):r(e,a,3)}}},5250:(t,e,n)=>{var r=n(7217),i=n(7805),o=n(6649),a=n(2824),s=n(3805),c=n(7241),u=n(4974);t.exports=function t(e,n,l,h,f){e!==n&&o(n,(function(o,c){if(f||(f=new r),s(o))a(e,n,c,l,t,h,f);else{var d=h?h(u(e,c),o,c+"",e,n,f):void 0;void 0===d&&(d=o),i(e,c,d)}}),c)}},2824:(t,e,n)=>{var r=n(7805),i=n(3290),o=n(1961),a=n(3007),s=n(5529),c=n(2428),u=n(6449),l=n(3693),h=n(3656),f=n(1882),d=n(3805),g=n(1331),p=n(7167),v=n(4974),b=n(9884);t.exports=function(t,e,n,y,w,m,x){var E=v(t,n),_=v(e,n),k=x.get(_);if(k)r(t,n,k);else{var N=m?m(E,_,n+"",t,e,x):void 0,C=void 0===N;if(C){var T=u(_),A=!T&&h(_),O=!T&&!A&&p(_);N=_,T||A||O?u(E)?N=E:l(E)?N=a(E):A?(C=!1,N=i(_,!0)):O?(C=!1,N=o(_,!0)):N=[]:g(_)||c(_)?(N=E,c(E)?N=b(E):d(E)&&!f(E)||(N=s(_))):C=!1}C&&(x.set(_,N),w(N,_,y,m,x),x.delete(_)),r(t,n,N)}}},6155:(t,e,n)=>{var r=n(4932),i=n(7422),o=n(5389),a=n(5128),s=n(3937),c=n(7301),u=n(3714),l=n(3488),h=n(6449);t.exports=function(t,e,n){e=e.length?r(e,(function(t){return h(t)?function(e){return i(e,1===t.length?t[0]:t)}:t})):[l];var f=-1;e=r(e,c(o));var d=a(t,(function(t,n,i){return{criteria:r(e,(function(e){return e(t)})),index:++f,value:t}}));return s(d,(function(t,e){return u(t,e,n)}))}},6001:(t,e,n)=>{var r=n(7420),i=n(631);t.exports=function(t,e){return r(t,e,(function(e,n){return i(t,n)}))}},7420:(t,e,n)=>{var r=n(7422),i=n(3170),o=n(1769);t.exports=function(t,e,n){for(var a=-1,s=e.length,c={};++a{t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},7255:(t,e,n)=>{var r=n(7422);t.exports=function(t){return function(e){return r(e,t)}}},6151:t=>{var e=Math.ceil,n=Math.max;t.exports=function(t,r,i,o){for(var a=-1,s=n(e((r-t)/(i||1)),0),c=Array(s);s--;)c[o?s:++a]=t,t+=i;return c}},5558:t=>{t.exports=function(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}},9302:(t,e,n)=>{var r=n(3488),i=n(6757),o=n(2865);t.exports=function(t,e){return o(i(t,e,r),t+"")}},3170:(t,e,n)=>{var r=n(6547),i=n(1769),o=n(361),a=n(3805),s=n(7797);t.exports=function(t,e,n,c){if(!a(t))return t;for(var u=-1,l=(e=i(e,t)).length,h=l-1,f=t;null!=f&&++u{var r=n(7334),i=n(3243),o=n(3488),a=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:o;t.exports=a},3937:t=>{t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},8096:t=>{t.exports=function(t,e){for(var n=-1,r=Array(t);++n{var r=n(1873),i=n(4932),o=n(6449),a=n(4394),s=r?r.prototype:void 0,c=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(a(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},4128:(t,e,n)=>{var r=n(1800),i=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(i,""):t}},7301:t=>{t.exports=function(t){return function(e){return t(e)}}},5765:(t,e,n)=>{var r=n(8859),i=n(5325),o=n(9905),a=n(9219),s=n(4517),c=n(4247);t.exports=function(t,e,n){var u=-1,l=i,h=t.length,f=!0,d=[],g=d;if(n)f=!1,l=o;else if(h>=200){var p=e?null:s(t);if(p)return c(p);f=!1,l=a,g=new r}else g=e?[]:d;t:for(;++u{var r=n(4932);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},1234:t=>{t.exports=function(t,e,n){for(var r=-1,i=t.length,o=e.length,a={};++r{t.exports=function(t,e){return t.has(e)}},4066:(t,e,n)=>{var r=n(3488);t.exports=function(t){return"function"==typeof t?t:r}},1769:(t,e,n)=>{var r=n(6449),i=n(8586),o=n(1802),a=n(3222);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:o(a(t))}},9653:(t,e,n)=>{var r=n(7828);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},3290:(t,e,n)=>{t=n.nmd(t);var r=n(9325),i=e&&!e.nodeType&&e,o=i&&t&&!t.nodeType&&t,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r}},6169:(t,e,n)=>{var r=n(9653);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},3201:t=>{var e=/\w*$/;t.exports=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}},3736:(t,e,n)=>{var r=n(1873),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;t.exports=function(t){return o?Object(o.call(t)):{}}},1961:(t,e,n)=>{var r=n(9653);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},3730:(t,e,n)=>{var r=n(4394);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,o=t==t,a=r(t),s=void 0!==e,c=null===e,u=e==e,l=r(e);if(!c&&!l&&!a&&t>e||a&&s&&u&&!c&&!l||i&&s&&u||!n&&u||!o)return 1;if(!i&&!a&&!l&&t{var r=n(3730);t.exports=function(t,e,n){for(var i=-1,o=t.criteria,a=e.criteria,s=o.length,c=n.length;++i=c?u:u*("desc"==n[i]?-1:1)}return t.index-e.index}},3007:t=>{t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n{var r=n(6547),i=n(3360);t.exports=function(t,e,n,o){var a=!n;n||(n={});for(var s=-1,c=e.length;++s{var r=n(1791),i=n(4664);t.exports=function(t,e){return r(t,i(t),e)}},8948:(t,e,n)=>{var r=n(1791),i=n(6375);t.exports=function(t,e){return r(t,i(t),e)}},5481:(t,e,n)=>{var r=n(9325)["__core-js_shared__"];t.exports=r},999:(t,e,n)=>{var r=n(9302),i=n(6800);t.exports=function(t){return r((function(e,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++r{var r=n(4894);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var o=n.length,a=e?o:-1,s=Object(n);(e?a--:++a{t.exports=function(t){return function(e,n,r){for(var i=-1,o=Object(e),a=r(e),s=a.length;s--;){var c=a[t?s:++i];if(!1===n(o[c],c,o))break}return e}}},2006:(t,e,n)=>{var r=n(5389),i=n(4894),o=n(5950);t.exports=function(t){return function(e,n,a){var s=Object(e);if(!i(e)){var c=r(n,3);e=o(e),n=function(t){return c(s[t],t,s)}}var u=t(e,n,a);return u>-1?s[c?e[u]:u]:void 0}}},5508:(t,e,n)=>{var r=n(6151),i=n(6800),o=n(7400);t.exports=function(t){return function(e,n,a){return a&&"number"!=typeof a&&i(e,n,a)&&(n=a=void 0),e=o(e),void 0===n?(n=e,e=0):n=o(n),a=void 0===a?e{var r=n(6545),i=n(3950),o=n(4247),a=r&&1/o(new r([,-0]))[1]==1/0?function(t){return new r(t)}:i;t.exports=a},3243:(t,e,n)=>{var r=n(6110),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},5911:(t,e,n)=>{var r=n(8859),i=n(4248),o=n(9219);t.exports=function(t,e,n,a,s,c){var u=1&n,l=t.length,h=e.length;if(l!=h&&!(u&&h>l))return!1;var f=c.get(t),d=c.get(e);if(f&&d)return f==e&&d==t;var g=-1,p=!0,v=2&n?new r:void 0;for(c.set(t,e),c.set(e,t);++g{var r=n(1873),i=n(7828),o=n(5288),a=n(5911),s=n(317),c=n(4247),u=r?r.prototype:void 0,l=u?u.valueOf:void 0;t.exports=function(t,e,n,r,u,h,f){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!h(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var d=s;case"[object Set]":var g=1&r;if(d||(d=c),t.size!=e.size&&!g)return!1;var p=f.get(t);if(p)return p==e;r|=2,f.set(t,e);var v=a(d(t),d(e),r,u,h,f);return f.delete(t),v;case"[object Symbol]":if(l)return l.call(t)==l.call(e)}return!1}},689:(t,e,n)=>{var r=n(2),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,o,a,s){var c=1&n,u=r(t),l=u.length;if(l!=r(e).length&&!c)return!1;for(var h=l;h--;){var f=u[h];if(!(c?f in e:i.call(e,f)))return!1}var d=s.get(t),g=s.get(e);if(d&&g)return d==e&&g==t;var p=!0;s.set(t,e),s.set(e,t);for(var v=c;++h{var r=n(5970),i=n(6757),o=n(2865);t.exports=function(t){return o(i(t,void 0,r),t+"")}},4840:(t,e,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},2:(t,e,n)=>{var r=n(2199),i=n(4664),o=n(5950);t.exports=function(t){return r(t,o,i)}},3349:(t,e,n)=>{var r=n(2199),i=n(6375),o=n(7241);t.exports=function(t){return r(t,o,i)}},2651:(t,e,n)=>{var r=n(4218);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},776:(t,e,n)=>{var r=n(756),i=n(5950);t.exports=function(t){for(var e=i(t),n=e.length;n--;){var o=e[n],a=t[o];e[n]=[o,a,r(a)]}return e}},6110:(t,e,n)=>{var r=n(5083),i=n(392);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},8879:(t,e,n)=>{var r=n(4335)(Object.getPrototypeOf,Object);t.exports=r},659:(t,e,n)=>{var r=n(1873),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=a.call(t);return r&&(e?t[s]=n:delete t[s]),i}},4664:(t,e,n)=>{var r=n(9770),i=n(3345),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(t){return null==t?[]:(t=Object(t),r(a(t),(function(e){return o.call(t,e)})))}:i;t.exports=s},6375:(t,e,n)=>{var r=n(4528),i=n(8879),o=n(4664),a=n(3345),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,o(t)),t=i(t);return e}:a;t.exports=s},5861:(t,e,n)=>{var r=n(5580),i=n(8223),o=n(423),a=n(6545),s=n(8303),c=n(2552),u=n(7473),l="[object Map]",h="[object Promise]",f="[object Set]",d="[object WeakMap]",g="[object DataView]",p=u(r),v=u(i),b=u(o),y=u(a),w=u(s),m=c;(r&&m(new r(new ArrayBuffer(1)))!=g||i&&m(new i)!=l||o&&m(o.resolve())!=h||a&&m(new a)!=f||s&&m(new s)!=d)&&(m=function(t){var e=c(t),n="[object Object]"==e?t.constructor:void 0,r=n?u(n):"";if(r)switch(r){case p:return g;case v:return l;case b:return h;case y:return f;case w:return d}return e}),t.exports=m},392:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},9326:(t,e,n)=>{var r=n(1769),i=n(2428),o=n(6449),a=n(361),s=n(294),c=n(7797);t.exports=function(t,e,n){for(var u=-1,l=(e=r(e,t)).length,h=!1;++u{var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return e.test(t)}},2032:(t,e,n)=>{var r=n(1042);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},3862:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},6721:(t,e,n)=>{var r=n(1042),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},2749:(t,e,n)=>{var r=n(1042),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},5749:(t,e,n)=>{var r=n(1042);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},6189:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},7199:(t,e,n)=>{var r=n(9653),i=n(6169),o=n(3201),a=n(3736),s=n(1961);t.exports=function(t,e,n){var c=t.constructor;switch(e){case"[object ArrayBuffer]":return r(t);case"[object Boolean]":case"[object Date]":return new c(+t);case"[object DataView]":return i(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(t,n);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(t);case"[object RegExp]":return o(t);case"[object Symbol]":return a(t)}}},5529:(t,e,n)=>{var r=n(9344),i=n(8879),o=n(5527);t.exports=function(t){return"function"!=typeof t.constructor||o(t)?{}:r(i(t))}},5891:(t,e,n)=>{var r=n(1873),i=n(2428),o=n(6449),a=r?r.isConcatSpreadable:void 0;t.exports=function(t){return o(t)||i(t)||!!(a&&t&&t[a])}},361:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t{var r=n(5288),i=n(4894),o=n(361),a=n(3805);t.exports=function(t,e,n){if(!a(n))return!1;var s=typeof e;return!!("number"==s?i(n)&&o(e,n.length):"string"==s&&e in n)&&r(n[e],t)}},8586:(t,e,n)=>{var r=n(6449),i=n(4394),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||a.test(t)||!o.test(t)||null!=e&&t in Object(e)}},4218:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},7296:(t,e,n)=>{var r,i=n(5481),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!o&&o in t}},5527:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},756:(t,e,n)=>{var r=n(3805);t.exports=function(t){return t==t&&!r(t)}},3702:t=>{t.exports=function(){this.__data__=[],this.size=0}},80:(t,e,n)=>{var r=n(6025),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))}},4739:(t,e,n)=>{var r=n(6025);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},8655:(t,e,n)=>{var r=n(6025);t.exports=function(t){return r(this.__data__,t)>-1}},1175:(t,e,n)=>{var r=n(6025);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},3040:(t,e,n)=>{var r=n(1549),i=n(79),o=n(8223);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},7670:(t,e,n)=>{var r=n(2651);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},289:(t,e,n)=>{var r=n(2651);t.exports=function(t){return r(this,t).get(t)}},4509:(t,e,n)=>{var r=n(2651);t.exports=function(t){return r(this,t).has(t)}},2949:(t,e,n)=>{var r=n(2651);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},317:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},7197:t=>{t.exports=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}},2224:(t,e,n)=>{var r=n(104);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},1042:(t,e,n)=>{var r=n(6110)(Object,"create");t.exports=r},3650:(t,e,n)=>{var r=n(4335)(Object.keys,Object);t.exports=r},181:t=>{t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},6009:(t,e,n)=>{t=n.nmd(t);var r=n(4840),i=e&&!e.nodeType&&e,o=i&&t&&!t.nodeType&&t,a=o&&o.exports===i&&r.process,s=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=s},9350:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},4335:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},6757:(t,e,n)=>{var r=n(1033),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,s=i(o.length-e,0),c=Array(s);++a{var r=n(4840),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},4974:t=>{t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},1380:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},1459:t=>{t.exports=function(t){return this.__data__.has(t)}},4247:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},2865:(t,e,n)=>{var r=n(9570),i=n(1811)(r);t.exports=i},1811:t=>{var e=Date.now;t.exports=function(t){var n=0,r=0;return function(){var i=e(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},1420:(t,e,n)=>{var r=n(79);t.exports=function(){this.__data__=new r,this.size=0}},938:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},3605:t=>{t.exports=function(t){return this.__data__.get(t)}},9817:t=>{t.exports=function(t){return this.__data__.has(t)}},945:(t,e,n)=>{var r=n(79),i=n(8223),o=n(3661);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(t,e),this.size=n.size,this}},6959:t=>{t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r{var r=n(9811),i=n(9698),o=n(7927);t.exports=function(t){return i(t)?o(t):r(t)}},1802:(t,e,n)=>{var r=n(2224),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,n,r,i){e.push(r?i.replace(o,"$1"):n||t)})),e}));t.exports=a},7797:(t,e,n)=>{var r=n(4394);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},7473:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},1800:t=>{var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},7927:t=>{var e="\\ud800-\\udfff",n="["+e+"]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^"+e+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+r+"|"+i+")?",u="[\\ufe0e\\ufe0f]?",l=u+c+"(?:\\u200d(?:"+[o,a,s].join("|")+")"+u+c+")*",h="(?:"+[o+r+"?",r,a,s,n].join("|")+")",f=RegExp(i+"(?="+i+")|"+h+l,"g");t.exports=function(t){for(var e=f.lastIndex=0;f.test(t);)++e;return e}},2629:(t,e,n)=>{var r=n(9999);t.exports=function(t){return r(t,4)}},8055:(t,e,n)=>{var r=n(9999);t.exports=function(t){return r(t,5)}},7334:t=>{t.exports=function(t){return function(){return t}}},4684:(t,e,n)=>{var r=n(9302),i=n(5288),o=n(6800),a=n(7241),s=Object.prototype,c=s.hasOwnProperty,u=r((function(t,e){t=Object(t);var n=-1,r=e.length,u=r>2?e[2]:void 0;for(u&&o(e[0],e[1],u)&&(r=1);++n{t.exports=n(9754)},5288:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},7612:(t,e,n)=>{var r=n(9770),i=n(6574),o=n(5389),a=n(6449);t.exports=function(t,e){return(a(t)?r:i)(t,o(e,3))}},7309:(t,e,n)=>{var r=n(2006)(n(4713));t.exports=r},4713:(t,e,n)=>{var r=n(2523),i=n(5389),o=n(1489),a=Math.max;t.exports=function(t,e,n){var s=null==t?0:t.length;if(!s)return-1;var c=null==n?0:o(n);return c<0&&(c=a(s+c,0)),r(t,i(e,3),c)}},5970:(t,e,n)=>{var r=n(3120);t.exports=function(t){return null!=t&&t.length?r(t,1):[]}},9754:(t,e,n)=>{var r=n(3729),i=n(909),o=n(4066),a=n(6449);t.exports=function(t,e){return(a(t)?r:i)(t,o(e))}},2420:(t,e,n)=>{var r=n(6649),i=n(4066),o=n(7241);t.exports=function(t,e){return null==t?t:r(t,i(e),o)}},8156:(t,e,n)=>{var r=n(7422);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},1448:(t,e,n)=>{var r=n(426),i=n(9326);t.exports=function(t,e){return null!=t&&i(t,e,r)}},631:(t,e,n)=>{var r=n(8077),i=n(9326);t.exports=function(t,e){return null!=t&&i(t,e,r)}},3488:t=>{t.exports=function(t){return t}},2428:(t,e,n)=>{var r=n(7534),i=n(346),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return i(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=c},6449:t=>{var e=Array.isArray;t.exports=e},4894:(t,e,n)=>{var r=n(1882),i=n(294);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},3693:(t,e,n)=>{var r=n(4894),i=n(346);t.exports=function(t){return i(t)&&r(t)}},3656:(t,e,n)=>{t=n.nmd(t);var r=n(9325),i=n(9935),o=e&&!e.nodeType&&e,a=o&&t&&!t.nodeType&&t,s=a&&a.exports===o?r.Buffer:void 0,c=(s?s.isBuffer:void 0)||i;t.exports=c},2193:(t,e,n)=>{var r=n(8984),i=n(5861),o=n(2428),a=n(6449),s=n(4894),c=n(3656),u=n(5527),l=n(7167),h=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(s(t)&&(a(t)||"string"==typeof t||"function"==typeof t.splice||c(t)||l(t)||o(t)))return!t.length;var e=i(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(u(t))return!r(t).length;for(var n in t)if(h.call(t,n))return!1;return!0}},1882:(t,e,n)=>{var r=n(2552),i=n(3805);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},294:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},7730:(t,e,n)=>{var r=n(9172),i=n(7301),o=n(6009),a=o&&o.isMap,s=a?i(a):r;t.exports=s},3805:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},346:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},1331:(t,e,n)=>{var r=n(2552),i=n(8879),o=n(346),a=Function.prototype,s=Object.prototype,c=a.toString,u=s.hasOwnProperty,l=c.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=u.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==l}},8440:(t,e,n)=>{var r=n(6038),i=n(7301),o=n(6009),a=o&&o.isSet,s=a?i(a):r;t.exports=s},5015:(t,e,n)=>{var r=n(2552),i=n(6449),o=n(346);t.exports=function(t){return"string"==typeof t||!i(t)&&o(t)&&"[object String]"==r(t)}},4394:(t,e,n)=>{var r=n(2552),i=n(346);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},7167:(t,e,n)=>{var r=n(4901),i=n(7301),o=n(6009),a=o&&o.isTypedArray,s=a?i(a):r;t.exports=s},2216:t=>{t.exports=function(t){return void 0===t}},5950:(t,e,n)=>{var r=n(695),i=n(8984),o=n(4894);t.exports=function(t){return o(t)?r(t):i(t)}},7241:(t,e,n)=>{var r=n(695),i=n(2903),o=n(4894);t.exports=function(t){return o(t)?r(t,!0):i(t)}},8090:t=>{t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},5378:(t,e,n)=>{var r=n(4932),i=n(5389),o=n(5128),a=n(6449);t.exports=function(t,e){return(a(t)?r:o)(t,i(e,3))}},3916:(t,e,n)=>{var r=n(3360),i=n(641),o=n(5389);t.exports=function(t,e){var n={};return e=o(e,3),i(t,(function(t,i,o){r(n,i,e(t,i,o))})),n}},4506:(t,e,n)=>{var r=n(3599),i=n(3335),o=n(3488);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},104:(t,e,n)=>{var r=n(3661);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},5364:(t,e,n)=>{var r=n(5250),i=n(999)((function(t,e,n){r(t,e,n)}));t.exports=i},1684:(t,e,n)=>{var r=n(3599),i=n(6176),o=n(3488);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},6533:(t,e,n)=>{var r=n(3599),i=n(5389),o=n(6176);t.exports=function(t,e){return t&&t.length?r(t,i(e,2),o):void 0}},3950:t=>{t.exports=function(){}},124:(t,e,n)=>{var r=n(9325);t.exports=function(){return r.Date.now()}},4383:(t,e,n)=>{var r=n(6001),i=n(8816)((function(t,e){return null==t?{}:r(t,e)}));t.exports=i},583:(t,e,n)=>{var r=n(7237),i=n(7255),o=n(8586),a=n(7797);t.exports=function(t){return o(t)?r(a(t)):i(t)}},3181:(t,e,n)=>{var r=n(5508)();t.exports=r},860:(t,e,n)=>{var r=n(882),i=n(909),o=n(5389),a=n(5558),s=n(6449);t.exports=function(t,e,n){var c=s(t)?r:a,u=arguments.length<3;return c(t,o(e,4),n,u,i)}},7091:(t,e,n)=>{var r=n(8984),i=n(5861),o=n(4894),a=n(5015),s=n(1993);t.exports=function(t){if(null==t)return 0;if(o(t))return a(t)?s(t):t.length;var e=i(t);return"[object Map]"==e||"[object Set]"==e?t.size:r(t).length}},3031:(t,e,n)=>{var r=n(3120),i=n(6155),o=n(9302),a=n(6800),s=o((function(t,e){if(null==t)return[];var n=e.length;return n>1&&a(t,e[0],e[1])?e=[]:n>2&&a(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=s},3345:t=>{t.exports=function(){return[]}},9935:t=>{t.exports=function(){return!1}},7400:(t,e,n)=>{var r=n(9374),i=1/0;t.exports=function(t){return t?(t=r(t))===i||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},1489:(t,e,n)=>{var r=n(7400);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},9374:(t,e,n)=>{var r=n(4128),i=n(3805),o=n(4394),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(o(t))return NaN;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=s.test(t);return n||c.test(t)?u(t.slice(2),n?2:8):a.test(t)?NaN:+t}},9884:(t,e,n)=>{var r=n(1791),i=n(7241);t.exports=function(t){return r(t,i(t))}},3222:(t,e,n)=>{var r=n(7556);t.exports=function(t){return null==t?"":r(t)}},9752:(t,e,n)=>{var r=n(3729),i=n(9344),o=n(641),a=n(5389),s=n(8879),c=n(6449),u=n(3656),l=n(1882),h=n(3805),f=n(7167);t.exports=function(t,e,n){var d=c(t),g=d||u(t)||f(t);if(e=a(e,4),null==n){var p=t&&t.constructor;n=g?d?new p:[]:h(t)&&l(p)?i(s(t)):{}}return(g?r:o)(t,(function(t,r,i){return e(n,t,r,i)})),n}},299:(t,e,n)=>{var r=n(3120),i=n(9302),o=n(5765),a=n(3693),s=i((function(t){return o(r(t,1,a,!0))}));t.exports=s},7200:(t,e,n)=>{var r=n(3222),i=0;t.exports=function(t){var e=++i;return r(t)+e}},5880:(t,e,n)=>{var r=n(514),i=n(5950);t.exports=function(t){return null==t?[]:r(t,i(t))}},7248:(t,e,n)=>{var r=n(6547),i=n(1234);t.exports=function(t,e){return i(t||[],e||[],r)}},5072:t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},5056:(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},7825:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},1113:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},6529:t=>{t.exports=''},3174:t=>{t.exports=''},687:t=>{t.exports=''},6043:t=>{t.exports=''},2204:t=>{t.exports=''},865:t=>{t.exports=''},3573:t=>{t.exports=''},8609:t=>{t.exports=''},6298:t=>{t.exports=''},5833:t=>{t.exports=''},2568:t=>{t.exports=''},381:t=>{t.exports=''},7911:t=>{t.exports=''},2119:t=>{t.exports=''},7489:t=>{t.exports=''},7516:t=>{t.exports=''},1001:t=>{t.exports=''},178:t=>{t.exports=''},3594:t=>{t.exports=''},1002:t=>{t.exports=''},9701:t=>{t.exports=''},1586:t=>{t.exports=''},6872:t=>{t.exports=''},4722:t=>{t.exports=''},3016:t=>{t.exports=''},4723:t=>{t.exports=''},5936:t=>{t.exports=''},436:t=>{t.exports=''},5067:t=>{t.exports=''},9895:t=>{t.exports=''},3452:t=>{t.exports=''},6343:t=>{t.exports=''},5697:t=>{t.exports=''},3942:t=>{t.exports=''},9945:t=>{t.exports=''},8937:t=>{t.exports=''},6926:t=>{t.exports=''},9776:t=>{t.exports=''},7319:t=>{t.exports=''},4485:t=>{t.exports=''},6042:t=>{t.exports=''},6804:t=>{t.exports=''},7194:t=>{t.exports=''},1307:t=>{t.exports=''},6970:t=>{t.exports=''},2864:t=>{t.exports=''},5465:t=>{t.exports=''},8109:(t,e,n)=>{"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0}),r(n(7381)),r(n(7890)),r(n(3210)),r(n(1810)),r(n(9155)),r(n(1795)),r(n(2128)),r(n(6755)),r(n(8581)),r(n(9965)),r(n(9957)),r(n(6266)),r(n(2893)),r(n(5542)),r(n(8126)),r(n(2804))},7381:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(2128),a=function(t){function e(e){var n=t.call(this)||this,r=e;return r.trigger&&(n.trigger=r.trigger),r.kick&&(n.kick=r.kick),r.drag&&(n.drag=r.drag),r.on&&(n.on=r.on),n.dragstart=n.dragStart=o.Layout.dragStart,n.dragend=n.dragEnd=o.Layout.dragEnd,n}return i(e,t),e.prototype.trigger=function(t){},e.prototype.kick=function(){},e.prototype.drag=function(){},e.prototype.on=function(t,e){return this},e}(o.Layout);e.LayoutAdaptor=a,e.adaptor=function(t){return new a(t)}},2804:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2128),i=n(9155);e.gridify=function(t,e,n,r){return t.cola.start(0,0,0,10,!1),function(t,e,n,r){t.forEach((function(t){t.routerNode={name:t.name,bounds:t.bounds.inflate(-n)}})),e.forEach((function(e){e.routerNode={bounds:e.bounds.inflate(-r),children:(void 0!==e.groups?e.groups.map((function(e){return t.length+e.id})):[]).concat(void 0!==e.leaves?e.leaves.map((function(t){return t.index})):[])}}));var o=t.concat(e).map((function(t,e){return t.routerNode.id=e,t.routerNode}));return new i.GridRouter(o,{getChildren:function(t){return t.children},getBounds:function(t){return t.bounds}},n-r)}(t.cola.nodes(),t.cola.groups(),n,r).routeEdges(t.powerGraph.powerEdges,e,(function(t){return t.source.routerNode.id}),(function(t){return t.target.routerNode.id}))},e.powerGraphGridLayout=function(t,e,n){var i;t.nodes.forEach((function(t,e){return t.index=e})),(new r.Layout).avoidOverlaps(!1).nodes(t.nodes).links(t.links).powerGraphGroups((function(t){(i=t).groups.forEach((function(t){return t.padding=n}))}));var o=t.nodes.length,a=[],s=t.nodes.slice(0);return s.forEach((function(t,e){return t.index=e})),i.groups.forEach((function(t){var e=t.index=t.id+o;s.push(t),void 0!==t.leaves&&t.leaves.forEach((function(t){return a.push({source:e,target:t.index})})),void 0!==t.groups&&t.groups.forEach((function(t){return a.push({source:e,target:t.id+o})}))})),i.powerEdges.forEach((function(t){a.push({source:t.source.index,target:t.target.index})})),(new r.Layout).size(e).nodes(s).links(a).avoidOverlaps(!1).linkDistance(30).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(100,0,0,0,!1),{cola:(new r.Layout).convergenceThreshold(.001).size(e).avoidOverlaps(!0).nodes(t.nodes).links(t.links).groupCompactness(1e-4).linkDistance(30).symmetricDiffLinkLengths(5).powerGraphGroups((function(t){(i=t).groups.forEach((function(t){t.padding=n}))})).start(50,0,100,0,!1),powerGraph:i}}},7890:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9915),i=n(1924);e.d3adaptor=function(t){return!t||function(t){return t.version&&null!==t.version.match(/^3\./)}(t)?new r.D3StyleLayoutAdaptor:new i.D3StyleLayoutAdaptor(t)}},9915:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(2128),a=function(t){function e(){var e=t.call(this)||this;e.event=d3.dispatch(o.EventType[o.EventType.start],o.EventType[o.EventType.tick],o.EventType[o.EventType.end]);var n=e;return e.drag=function(){if(!t)var t=d3.behavior.drag().origin(o.Layout.dragOrigin).on("dragstart.d3adaptor",o.Layout.dragStart).on("drag.d3adaptor",(function(t){o.Layout.drag(t,d3.event),n.resume()})).on("dragend.d3adaptor",o.Layout.dragEnd);if(!arguments.length)return t;this.call(t)},e}return i(e,t),e.prototype.trigger=function(t){var e={type:o.EventType[t.type],alpha:t.alpha,stress:t.stress};this.event[e.type](e)},e.prototype.kick=function(){var e=this;d3.timer((function(){return t.prototype.tick.call(e)}))},e.prototype.on=function(t,e){return"string"==typeof t?this.event.on(t,e):this.event.on(o.EventType[t],e),this},e}(o.Layout);e.D3StyleLayoutAdaptor=a,e.d3adaptor=function(){return new a}},1924:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(2128),a=function(t){function e(e){var n=t.call(this)||this;n.d3Context=e,n.event=e.dispatch(o.EventType[o.EventType.start],o.EventType[o.EventType.tick],o.EventType[o.EventType.end]);var r=n;return n.drag=function(){if(!t)var t=e.drag().subject(o.Layout.dragOrigin).on("start.d3adaptor",o.Layout.dragStart).on("drag.d3adaptor",(function(t){o.Layout.drag(t,e.event),r.resume()})).on("end.d3adaptor",o.Layout.dragEnd);if(!arguments.length)return t;arguments[0].call(t)},n}return i(e,t),e.prototype.trigger=function(t){var e={type:o.EventType[t.type],alpha:t.alpha,stress:t.stress};this.event.call(e.type,e)},e.prototype.kick=function(){var e=this,n=this.d3Context.timer((function(){return t.prototype.tick.call(e)&&n.stop()}))},e.prototype.on=function(t,e){return"string"==typeof t?this.event.on(t,e):this.event.on(o.EventType[t],e),this},e}(o.Layout);e.D3StyleLayoutAdaptor=a},3210:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){this.locks={}}return t.prototype.add=function(t,e){this.locks[t]=e},t.prototype.clear=function(){this.locks={}},t.prototype.isEmpty=function(){for(var t in this.locks)return!1;return!0},t.prototype.apply=function(t){for(var e in this.locks)t(Number(e),this.locks[e])},t}();e.Locks=n;var r=function(){function t(t,e,r){void 0===r&&(r=null),this.D=e,this.G=r,this.threshold=1e-4,this.numGridSnapNodes=0,this.snapGridSize=100,this.snapStrength=1e3,this.scaleSnapByMaxH=!1,this.random=new i,this.project=null,this.x=t,this.k=t.length;var o=this.n=t[0].length;this.H=new Array(this.k),this.g=new Array(this.k),this.Hd=new Array(this.k),this.a=new Array(this.k),this.b=new Array(this.k),this.c=new Array(this.k),this.d=new Array(this.k),this.e=new Array(this.k),this.ia=new Array(this.k),this.ib=new Array(this.k),this.xtmp=new Array(this.k),this.locks=new n,this.minD=Number.MAX_VALUE;for(var a,s=o;s--;)for(a=o;--a>s;){var c=e[s][a];c>0&&c1e-9)break;var d=this.offsetDir();for(r=0;r1&&g>p||!isFinite(p))for(r=0;r1&&(v=1);var b=p*p,y=2*v*(g-p)/(b*g),w=g*g*g,m=2*-v/(b*w);for(isFinite(y)||console.log(y),r=0;r0?N-(A+1)*E:N-(A-1)*E)&&f<=x&&(this.scaleSnapByMaxH?(this.g[r][c]+=s*_*f,this.H[r][c][c]+=s*_):(this.g[r][c]+=_*f,this.H[r][c][c]+=_))}this.locks.isEmpty()||this.locks.apply((function(n,i){for(r=0;r0;)for(var i=e;i-- >0;)n(r,i)},t.prototype.matrixApply=function(e){t.mApply(this.k,this.n,e)},t.prototype.computeNextPosition=function(t,e){var n=this;this.computeDerivatives(t);var r=this.computeStepSize(this.g);if(this.stepAndProject(t,e,this.g,r),this.project){this.matrixApply((function(r,i){return n.e[r][i]=t[r][i]-e[r][i]}));var i=this.computeStepSize(this.e);i=Math.max(.2,Math.min(i,1)),this.stepAndProject(t,e,this.e,i)}},t.prototype.run=function(t){for(var e=Number.MAX_VALUE,n=!1;!n&&t-- >0;){var r=this.rungeKutta();n=Math.abs(e/r-1)>16)/this.range},t.prototype.getNextBetween=function(t,e){return t+this.getNext()*(e-t)},t}();e.PseudoRandom=i},1810:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(2893),a=function(){};e.Point=a;var s=function(t,e,n,r){this.x1=t,this.y1=e,this.x2=n,this.y2=r};e.LineSegment=s;var c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(a);function u(t,e,n){return(e.x-t.x)*(n.y-t.y)-(n.x-t.x)*(e.y-t.y)}function l(t,e,n){return u(t,e,n)>0}function h(t,e,n){return u(t,e,n)<0}function f(t,e){var n,r,i,o,a=e.length-1;if(h(t,e[1],e[0])&&!l(t,e[a-1],e[0]))return 0;for(n=0,r=a;;){if(r-n==1)return l(t,e[n],e[r])?n:r;if((o=h(t,e[(i=Math.floor((n+r)/2))+1],e[i]))&&!l(t,e[i-1],e[i]))return i;l(t,e[n+1],e[n])?o||l(t,e[n],e[i])?r=i:n=i:o&&h(t,e[n],e[i])?r=i:n=i}}function d(t,e){var n,r,i,o,a=e.length-1;if(l(t,e[a-1],e[0])&&!h(t,e[1],e[0]))return 0;for(n=0,r=a;;){if(r-n==1)return h(t,e[n],e[r])?n:r;if(o=h(t,e[(i=Math.floor((n+r)/2))+1],e[i]),l(t,e[i-1],e[i])&&!o)return i;h(t,e[n+1],e[n])?o?h(t,e[n],e[i])?r=i:n=i:r=i:o?n=i:l(t,e[n],e[i])?r=i:n=i}}function g(t,e,n,r,i,o){var a,s;s=r(t[a=n(e[0],t)],e);for(var c=!1;!c;){for(c=!0;a===t.length-1&&(a=0),!i(e[s],t[a],t[a+1]);)++a;for(;0===s&&(s=e.length-1),!o(t[a],e[s],e[s-1]);)--s,c=!1}return{t1:a,t2:s}}function p(t,e){return g(t,e,f,d,l,h)}e.PolyPoint=c,e.isLeft=u,e.ConvexHull=function(t){var e,n=t.slice(0).sort((function(t,e){return t.x!==e.x?e.x-t.x:e.y-t.y})),r=t.length,i=n[0].x;for(e=1;e=0&&n[e].x===l;e--);for(s=e+1,e=o;++e<=s;)if(!(u(n[0],n[s],n[e])>=0&&e1&&!(u(a[a.length-2],a[a.length-1],n[e])>0);)a.length-=1;0!=e&&a.push(n[e])}c!=s&&a.push(n[c]);var h=a.length;for(e=s;--e>=o;)if(!(u(n[c],n[o],n[e])>=0&&e>o)){for(;a.length>h&&!(u(a[a.length-2],a[a.length-1],n[e])>0);)a.length-=1;0!=e&&a.push(n[e])}}return a},e.clockwiseRadialSweep=function(t,e,n){e.slice(0).sort((function(e,n){return Math.atan2(e.y-t.y,e.x-t.x)-Math.atan2(n.y-t.y,n.x-t.x)})).forEach(n)},e.tangent_PolyPolyC=g,e.LRtangent_PolyPolyC=function(t,e){var n=p(e,t);return{t1:n.t2,t2:n.t1}},e.RLtangent_PolyPolyC=p,e.LLtangent_PolyPolyC=function(t,e){return g(t,e,d,d,h,h)},e.RRtangent_PolyPolyC=function(t,e){return g(t,e,f,f,l,l)};var v=function(t,e){this.t1=t,this.t2=e};e.BiTangent=v;var b=function(){};e.BiTangents=b;var y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(a);e.TVGPoint=y;var w=function(t,e,n,r){this.id=t,this.polyid=e,this.polyvertid=n,this.p=r,r.vv=this};e.VisibilityVertex=w;var m=function(){function t(t,e){this.source=t,this.target=e}return t.prototype.length=function(){var t=this.source.p.x-this.target.p.x,e=this.source.p.y-this.target.p.y;return Math.sqrt(t*t+e*e)},t}();e.VisibilityEdge=m;var x=function(){function t(t,e){if(this.P=t,this.V=[],this.E=[],e)this.V=e.V.slice(0),this.E=e.E.slice(0);else{for(var n=t.length,r=0;r0&&this.E.push(new m(i[o-1].vv,s))}i.length>1&&this.E.push(new m(i[0].vv,i[i.length-1].vv))}for(r=0;r0)return!0;return!1},t}();function E(t,e){for(var n=[],r=1,i=e.length;r=0&&p>=0&&y<0&&w>=0&&m>=0&&x<0?i.ll=new v(o,a):g<=0&&p<=0&&y>0&&w<=0&&m<=0&&x>0?i.rr=new v(o,a):g<=0&&p>0&&y<=0&&w>=0&&m<0&&x>=0?i.rl=new v(o,a):g>=0&&p<0&&y>=0&&w<=0&&m>0&&x<=0&&(i.lr=new v(o,a))}return i}function k(t,e){return!t.every((function(t){return!function(t,e){for(var n=1,r=e.length;n0)return!0}return!1}},9155:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2893),i=n(8126),o=n(5542),a=function(t,e,n){this.id=t,this.rect=e,this.children=n,this.leaf=void 0===n||0===n.length};e.NodeWrapper=a;var s=function(t,e,n,r,i){void 0===r&&(r=null),void 0===i&&(i=null),this.id=t,this.x=e,this.y=n,this.node=r,this.line=i};e.Vert=s;var c=function(){function t(e,n){this.s=e,this.t=n;var r=t.findMatch(e,n),i=n.slice(0).reverse(),o=t.findMatch(e,i);r.length>=o.length?(this.length=r.length,this.si=r.si,this.ti=r.ti,this.reversed=!1):(this.length=o.length,this.si=o.si,this.ti=n.length-o.ti-o.length,this.reversed=!0)}return t.findMatch=function(t,e){for(var n=t.length,r=e.length,i={length:0,si:-1,ti:-1},o=new Array(n),a=0;ai.length&&(i.length=c,i.si=a-c+1,i.ti=s-c+1)}else o[a][s]=0}return i},t.prototype.getSequence=function(){return this.length>=0?this.s.slice(this.si,this.si+this.length):[]},t}();e.LongestCommonSubsequence=c;var u=function(){function t(t,e,n){var i=this;void 0===n&&(n=12),this.originalnodes=t,this.groupPadding=n,this.leaves=null,this.nodes=t.map((function(t,n){return new a(n,e.getBounds(t),e.getChildren(t))})),this.leaves=this.nodes.filter((function(t){return t.leaf})),this.groups=this.nodes.filter((function(t){return!t.leaf})),this.cols=this.getGridLines("x"),this.rows=this.getGridLines("y"),this.groups.forEach((function(t){return t.children.forEach((function(e){return i.nodes[e].parent=t}))})),this.root={children:[]},this.nodes.forEach((function(t){void 0===t.parent&&(t.parent=i.root,i.root.children.push(t.id)),t.ports=[]})),this.backToFront=this.nodes.slice(0),this.backToFront.sort((function(t,e){return i.getDepth(t)-i.getDepth(e)})),this.backToFront.slice(0).reverse().filter((function(t){return!t.leaf})).forEach((function(t){var e=r.Rectangle.empty();t.children.forEach((function(t){return e=e.union(i.nodes[t].rect)})),t.rect=e.inflate(i.groupPadding)}));var o=this.midPoints(this.cols.map((function(t){return t.pos}))),c=this.midPoints(this.rows.map((function(t){return t.pos}))),u=o[0],l=o[o.length-1],h=c[0],f=c[c.length-1],d=this.rows.map((function(t){return{x1:u,x2:l,y1:t.pos,y2:t.pos}})).concat(c.map((function(t){return{x1:u,x2:l,y1:t,y2:t}}))),g=this.cols.map((function(t){return{x1:t.pos,x2:t.pos,y1:h,y2:f}})).concat(o.map((function(t){return{x1:t,x2:t,y1:h,y2:f}}))),p=d.concat(g);p.forEach((function(t){return t.verts=[]})),this.verts=[],this.edges=[],d.forEach((function(t){return g.forEach((function(e){var n=new s(i.verts.length,e.x1,t.y1);t.verts.push(n),e.verts.push(n),i.verts.push(n);for(var r=i.backToFront.length;r-- >0;){var o=i.backToFront[r],a=o.rect,c=Math.abs(n.x-a.cx()),u=Math.abs(n.y-a.cy());if(c0;){var r=n.filter((function(e){return e.rect["overlap"+t.toUpperCase()](n[0].rect)})),i={nodes:r,pos:this.avg(r.map((function(e){return e.rect["c"+t]()})))};e.push(i),i.nodes.forEach((function(t){return n.splice(n.indexOf(t),1)}))}return e.sort((function(t,e){return t.pos-e.pos})),e},t.prototype.getDepth=function(t){for(var e=0;t.parent!==this.root;)e++,t=t.parent;return e},t.prototype.midPoints=function(t){for(var e=t[1]-t[0],n=[t[0]-e/2],r=1;r.1)&&(u={pos:h[0][e],segments:[]},c.push(u)),u.segments.push(h)}return c},t.nudgeSegs=function(t,e,n,r,o,a){var s=r.length;if(!(s<=1)){for(var c=r.map((function(e){return new i.Variable(e[0][t])})),u=[],l=0;l=0&&u.push(new i.Constraint(c[v],c[b],a))}new i.Solver(c,u).solve(),c.forEach((function(e,i){var o=r[i],a=e.position();o[0][t]=o[1][t]=a;var s=n[o.edgeid];o.i>0&&(s[o.i-1][1][t]=a),o.iMath.PI||i<-Math.PI)&&(i=r-n),i},t.isLeft=function(t,e,n){return(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x)<=0},t.getOrder=function(t){for(var e={},n=0;n=u.length||h.ti+h.length>=l.length)?n.push({l:r,r:i}):(h.si+h.length>=u.length||h.ti+h.length>=l.length?(o=u[h.si+1],s=u[h.si-1],a=l[h.ti-1]):(o=u[h.si+h.length-2],a=u[h.si+h.length],s=l[h.ti+h.length]),t.isLeft(o,a,s)?n.push({l:i,r}):n.push({l:r,r:i})))}return t.getOrder(n)},t.makeSegments=function(t){function e(t){return{x:t.x,y:t.y}}for(var n=function(t,e,n){return Math.abs((e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x))<.001},r=[],i=e(t[0]),o=1;o1&&l>1?1e3:0})),h=l.reverse().map((function(t){return n.verts[t]}));return h.push(this.nodes[i.id].ports[0]),h.filter((function(t,e){return!(e0&&t.node===i&&h[e-1].node===i)}))},t.getRoutePath=function(e,n,r,i){var o,a,s,c={routepath:"M "+e[0][0].x+" "+e[0][0].y+" ",arrowpath:""};if(e.length>1)for(var u=0;u0?l-=f/Math.abs(f)*n:h-=d/Math.abs(d)*n,c.routepath+="L "+l+" "+h+" ";var g=e[u+1],p=g[0].x,v=g[0].y;f=g[1].x-p,d=g[1].y-v;var b,y,w=t.angleBetween2Lines(o,g)<0?1:0;Math.abs(f)>0?(b=p+f/Math.abs(f)*n,y=v):(b=p,y=v+d/Math.abs(d)*n);var m=Math.abs(b-l),x=Math.abs(y-h);c.routepath+="A "+m+" "+x+" 0 0 "+w+" "+b+" "+y+" "}else{var E=[l,h];Math.abs(f)>0?(a=[l-=f/Math.abs(f)*i,h+r],s=[l,h-r]):(a=[l+r,h-=d/Math.abs(d)*i],s=[l-r,h]),c.routepath+="L "+l+" "+h+" ",i>0&&(c.arrowpath="M "+E[0]+" "+E[1]+" L "+a[0]+" "+a[1]+" L "+s[0]+" "+s[1])}}else l=(o=e[0])[1].x,h=o[1].y,f=l-o[0].x,d=h-o[0].y,E=[l,h],Math.abs(f)>0?(a=[l-=f/Math.abs(f)*i,h+r],s=[l,h-r]):(a=[l+r,h-=d/Math.abs(d)*i],s=[l-r,h]),c.routepath+="L "+l+" "+h+" ",i>0&&(c.arrowpath="M "+E[0]+" "+E[1]+" L "+a[0]+" "+a[1]+" L "+s[0]+" "+s[1]);return c},t}();e.GridRouter=u},1795:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=10,r=(1+Math.sqrt(5))/2,i=1e-4;e.applyPacking=function(t,e,o,a,s,c){void 0===s&&(s=1),void 0===c&&(c=!0);var u=0,l=0,h=e,f=o,d=(s=void 0!==s?s:1,a=void 0!==a?a:0,0),g=0,p=0,v=0,b=[];function y(t,e){b=[],d=0,g=0,v=l;for(var n=0;n=t.height&&b[o].x+b[o].width+t.width+n-e<=i){r=b[o];break}b.push(t),void 0!==r?(t.x=r.x+r.width+n,t.y=r.bottom,t.space_left=t.height,t.bottom=t.y,r.space_left-=t.height+n,r.bottom+=t.height+n):(t.y=v,v+=t.height+n,t.x=u,t.bottom=t.y,t.space_left=t.height),t.y+t.height-g>-1e-4&&(g=t.y+t.height-l),t.x+t.width-d>-1e-4&&(d=t.x+t.width-u)}0!=t.length&&(function(t){t.forEach((function(t){var e,n,r,i,o;e=t,n=Number.MAX_VALUE,r=Number.MAX_VALUE,i=0,o=0,e.array.forEach((function(t){var e=void 0!==t.width?t.width:a,s=void 0!==t.height?t.height:a;e/=2,s/=2,i=Math.max(t.x+e,i),n=Math.min(t.x-e,n),o=Math.max(t.y+s,o),r=Math.min(t.y-s,r)})),e.width=i-n,e.height=o-r}))}(t),function(t,e){var o=Number.POSITIVE_INFINITY,a=0;t.sort((function(t,e){return e.height-t.height}));for(var s=v=p=t.reduce((function(t,e){return t.widthp||g>i;){if(1!=f){var v=c-(c-s)/r;l=y(t,v)}if(0!=f){var b=s+(c-s)/r;h=y(t,b)}if(d=Math.abs(v-b),g=Math.abs(l-h),lh?(s=v,v=b,l=h,f=1):(c=b,b=v,h=l,f=0),u++>100)break}y(t,a)}(t),c&&function(t){t.forEach((function(t){var e={x:0,y:0};t.array.forEach((function(t){e.x+=t.x,e.y+=t.y})),e.x/=t.array.length,e.y/=t.array.length;var n=e.x-t.width/2,r=e.y-t.height/2,i=t.x-n+h/2-d/2,o=t.y-r+f/2-g/2;t.array.forEach((function(t){t.x+=i,t.y+=o}))}))}(t))},e.separateGraphs=function(t,e){for(var n={},r={},i=[],o=0,a=0;a{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(9965),o=n(8581),a=n(3210),s=n(2893),c=n(5542),u=n(1810),l=n(1795);function h(t){return void 0!==t.leaves||void 0!==t.groups}!function(t){t[t.start=0]="start",t[t.tick=1]="tick",t[t.end=2]="end"}(r=e.EventType||(e.EventType={}));var f=function(){function t(){var e=this;this._canvasSize=[1,1],this._linkDistance=20,this._defaultNodeSize=10,this._linkLengthCalculator=null,this._linkType=null,this._avoidOverlaps=!1,this._handleDisconnected=!0,this._running=!1,this._nodes=[],this._groups=[],this._rootGroup=null,this._links=[],this._constraints=[],this._distanceMatrix=null,this._descent=null,this._directedLinkConstraints=null,this._threshold=.01,this._visibilityGraph=null,this._groupCompactness=1e-6,this.event=null,this.linkAccessor={getSourceIndex:t.getSourceIndex,getTargetIndex:t.getTargetIndex,setLength:t.setLinkLength,getType:function(t){return"function"==typeof e._linkType?e._linkType(t):0}}}return t.prototype.on=function(t,e){return this.event||(this.event={}),"string"==typeof t?this.event[r[t]]=e:this.event[t]=e,this},t.prototype.trigger=function(t){this.event&&void 0!==this.event[t.type]&&this.event[t.type](t)},t.prototype.kick=function(){for(;!this.tick(););},t.prototype.tick=function(){if(this._alpha0){var e=0;this._links.forEach((function(t){e=Math.max(e,t.source,t.target)})),this._nodes=new Array(++e);for(var n=0;n0?t:0:t>0&&(this._running||(this._running=!0,this.trigger({type:r.start,alpha:this._alpha=t}),this.kick())),this):this._alpha},t.prototype.getLinkLength=function(t){return"function"==typeof this._linkDistance?+this._linkDistance(t):this._linkDistance},t.setLinkLength=function(t,e){t.length=e},t.prototype.getLinkType=function(t){return"function"==typeof this._linkType?this._linkType(t):0},t.prototype.symmetricDiffLinkLengths=function(t,e){var n=this;return void 0===e&&(e=1),this.linkDistance((function(e){return t*e.length})),this._linkLengthCalculator=function(){return o.symmetricDiffLinkLengths(n._links,n.linkAccessor,e)},this},t.prototype.jaccardLinkLengths=function(t,e){var n=this;return void 0===e&&(e=1),this.linkDistance((function(e){return t*e.length})),this._linkLengthCalculator=function(){return o.jaccardLinkLengths(n._links,n.linkAccessor,e)},this},t.prototype.start=function(e,n,r,i,u,l){var h=this;void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=0),void 0===u&&(u=!0),void 0===l&&(l=!0);var f,d=this.nodes().length,g=d+2*this._groups.length,p=(this._links.length,this._canvasSize[0]),v=this._canvasSize[1],b=new Array(g),y=new Array(g),w=null,m=this._avoidOverlaps;this._nodes.forEach((function(t,e){t.index=e,void 0===t.x&&(t.x=p/2,t.y=v/2),b[e]=t.x,y[e]=t.y})),this._linkLengthCalculator&&this._linkLengthCalculator(),this._distanceMatrix?f=this._distanceMatrix:(f=new c.Calculator(g,this._links,t.getSourceIndex,t.getTargetIndex,(function(t){return h.getLinkLength(t)})).DistanceMatrix(),w=a.Descent.createSquareMatrix(g,(function(){return 2})),this._links.forEach((function(t){"number"==typeof t.source&&(t.source=h._nodes[t.source]),"number"==typeof t.target&&(t.target=h._nodes[t.target])})),this._links.forEach((function(e){var n=t.getSourceIndex(e),r=t.getTargetIndex(e);w[n][r]=w[r][n]=e.weight||1})));var x=a.Descent.createSquareMatrix(g,(function(t,e){return f[t][e]}));if(this._rootGroup&&void 0!==this._rootGroup.groups){var E=d;this._groups.forEach((function(t){!function(t,e,n,r){w[t][e]=w[e][t]=n,x[t][e]=x[e][t]=.1}(E,E+1,h._groupCompactness),b[E]=0,y[E++]=0,b[E]=0,y[E++]=0}))}else this._rootGroup={leaves:this._nodes,groups:[]};var _=this._constraints||[];for(this._directedLinkConstraints&&(this.linkAccessor.getMinSeparation=this._directedLinkConstraints.getMinSeparation,_=_.concat(o.generateDirectedEdgeConstraints(d,this._links,this._directedLinkConstraints.axis,this.linkAccessor))),this.avoidOverlaps(!1),this._descent=new a.Descent([b,y],x),this._descent.locks.clear(),E=0;E0&&(this._descent.project=new s.Projection(this._nodes,this._groups,this._rootGroup,_).projectFunctions()),this._descent.run(n),this.separateOverlappingComponents(p,v,l),this.avoidOverlaps(m),m&&(this._nodes.forEach((function(t,e){t.x=b[e],t.y=y[e]})),this._descent.project=new s.Projection(this._nodes,this._groups,this._rootGroup,_,!0).projectFunctions(),this._nodes.forEach((function(t,e){b[e]=t.x,y[e]=t.y}))),this._descent.G=w,this._descent.run(r),i){this._descent.snapStrength=1e3,this._descent.snapGridSize=this._nodes[0].width,this._descent.numGridSnapNodes=d,this._descent.scaleSnapByMaxH=d!=g;var C=a.Descent.createSquareMatrix(g,(function(t,e){return t>=d||e>=d?w[t][e]:0}));this._descent.G=C,this._descent.run(i)}return this.updateNodePositions(),this.separateOverlappingComponents(p,v,l),u?this.resume():this},t.prototype.initialLayout=function(e,n,r){if(this._groups.length>0&&e>0){var i=this._nodes.length,o=this._links.map((function(t){return{source:t.source.index,target:t.target.index}})),a=this._nodes.map((function(t){return{index:t.index}}));this._groups.forEach((function(t,e){a.push({index:t.index=i+e})})),this._groups.forEach((function(t,e){void 0!==t.leaves&&t.leaves.forEach((function(e){return o.push({source:t.index,target:e.index})})),void 0!==t.groups&&t.groups.forEach((function(e){return o.push({source:t.index,target:e.index})}))})),(new t).size(this.size()).nodes(a).links(o).avoidOverlaps(!1).linkDistance(this.linkDistance()).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(e,0,0,0,!1),this._nodes.forEach((function(t){n[t.index]=a[t.index].x,r[t.index]=a[t.index].y}))}else this._descent.run(e)},t.prototype.separateOverlappingComponents=function(t,e,n){var r=this;if(void 0===n&&(n=!0),!this._distanceMatrix&&this._handleDisconnected){var i=this._descent.x[0],o=this._descent.x[1];this._nodes.forEach((function(t,e){t.x=i[e],t.y=o[e]}));var a=l.separateGraphs(this._nodes,this._links);l.applyPacking(a,t,e,this._defaultNodeSize,1,n),this._nodes.forEach((function(t,e){r._descent.x[0][e]=t.x,r._descent.x[1][e]=t.y,t.bounds&&(t.bounds.setXCentre(t.x),t.bounds.setYCentre(t.y))}))}},t.prototype.resume=function(){return this.alpha(.1)},t.prototype.stop=function(){return this.alpha(0)},t.prototype.prepareEdgeRouting=function(t){void 0===t&&(t=0),this._visibilityGraph=new u.TangentVisibilityGraph(this._nodes.map((function(e){return e.bounds.inflate(-t).vertices()})))},t.prototype.routeEdge=function(t,e,n){void 0===e&&(e=5);var r=[],i=new u.TangentVisibilityGraph(this._visibilityGraph.P,{V:this._visibilityGraph.V,E:this._visibilityGraph.E}),o={x:t.source.x,y:t.source.y},a={x:t.target.x,y:t.target.y},l=i.addPoint(o,t.source.index),h=i.addPoint(a,t.target.index);i.addEdgeIfVisible(o,a,t.source.index,t.target.index),void 0!==n&&n(i);var f=new c.Calculator(i.V.length,i.E,(function(t){return t.source.id}),(function(t){return t.target.id}),(function(t){return t.length()})).PathFromNodeToNode(l.id,h.id);if(1===f.length||f.length===i.V.length){var d=s.makeEdgeBetween(t.source.innerBounds,t.target.innerBounds,e);r=[d.sourceIntersection,d.arrowStart]}else{for(var g=f.length-2,p=i.V[f[g]].p,v=i.V[f[0]].p,b=(r=[t.source.innerBounds.rayIntersection(p.x,p.y)],g);b>=0;--b)r.push(i.V[f[b]].p);r.push(s.makeEdgeTo(v,t.target.innerBounds,e))}return r},t.getSourceIndex=function(t){return"number"==typeof t.source?t.source:t.source.index},t.getTargetIndex=function(t){return"number"==typeof t.target?t.target:t.target.index},t.linkId=function(e){return t.getSourceIndex(e)+"-"+t.getTargetIndex(e)},t.dragStart=function(e){h(e)?t.storeOffset(e,t.dragOrigin(e)):(t.stopNode(e),e.fixed|=2)},t.stopNode=function(t){t.px=t.x,t.py=t.y},t.storeOffset=function(e,n){void 0!==e.leaves&&e.leaves.forEach((function(e){e.fixed|=2,t.stopNode(e),e._dragGroupOffsetX=e.x-n.x,e._dragGroupOffsetY=e.y-n.y})),void 0!==e.groups&&e.groups.forEach((function(e){return t.storeOffset(e,n)}))},t.dragOrigin=function(t){return h(t)?{x:t.bounds.cx(),y:t.bounds.cy()}:t},t.drag=function(e,n){h(e)?(void 0!==e.leaves&&e.leaves.forEach((function(t){e.bounds.setXCentre(n.x),e.bounds.setYCentre(n.y),t.px=t._dragGroupOffsetX+n.x,t.py=t._dragGroupOffsetY+n.y})),void 0!==e.groups&&e.groups.forEach((function(e){return t.drag(e,n)}))):(e.px=n.x,e.py=n.y)},t.dragEnd=function(e){h(e)?(void 0!==e.leaves&&e.leaves.forEach((function(e){t.dragEnd(e),delete e._dragGroupOffsetX,delete e._dragGroupOffsetY})),void 0!==e.groups&&e.groups.forEach(t.dragEnd)):e.fixed&=-7},t.mouseOver=function(t){t.fixed|=4,t.px=t.x,t.py=t.y},t.mouseOut=function(t){t.fixed&=-5},t}();e.Layout=f},6755:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5542),i=n(3210),o=n(2893),a=n(8581),s=function(){function t(t,e){this.source=t,this.target=e}return t.prototype.actualLength=function(t){var e=this;return Math.sqrt(t.reduce((function(t,n){var r=n[e.target]-n[e.source];return t+r*r}),0))},t}();e.Link3D=s;e.Node3D=function(t,e,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=n};var c=function(){function t(e,n,r){var i=this;void 0===r&&(r=1),this.nodes=e,this.links=n,this.idealLinkLength=r,this.constraints=null,this.useJaccardLinkLengths=!0,this.result=new Array(t.k);for(var o=0;o{"use strict";function n(t,e){var n={};for(var r in t)n[r]={};for(var r in e)n[r]={};return Object.keys(n).length}function r(t,e){var n=0;for(var r in t)void 0!==e[r]&&++n;return n}function i(t,e,n,r){var i=function(t,e){var n={},r=function(t,e){void 0===n[t]&&(n[t]={}),n[t][e]={}};return t.forEach((function(t){var n=e.getSourceIndex(t),i=e.getTargetIndex(t);r(n,i),r(i,n)})),n}(t,r);t.forEach((function(t){var o=i[r.getSourceIndex(t)],a=i[r.getTargetIndex(t)];r.setLength(t,1+e*n(o,a))}))}function o(t,e,n){var r=[],i=0,o=[],a=[];function s(t){t.index=t.lowlink=i++,o.push(t),t.onStack=!0;for(var e=0,n=t.out;e{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t,e,n){this.source=t,this.target=e,this.type=n};e.PowerEdge=n;var r=function(){function t(t,e,n,r){var i=this;if(this.linkAccessor=n,this.modules=new Array(t),this.roots=[],r)this.initModulesFromGroup(r);else{this.roots.push(new a);for(var s=0;s=this.R))return this.merge(e.a,e.b,t),!0}},t.prototype.nEdges=function(t,e){var n=t.incoming.intersection(e.incoming),r=t.outgoing.intersection(e.outgoing);return this.R-n.count()-r.count()},t.prototype.getGroupHierarchy=function(t){var e=this,r=[];return i(this.roots[0],{},r),this.allEdges().forEach((function(i){var o=e.modules[i.source],a=e.modules[i.target];t.push(new n(void 0===o.gid?i.source:r[o.gid],void 0===a.gid?i.target:r[a.gid],i.type))})),r},t.prototype.allEdges=function(){var e=[];return t.getEdges(this.roots[0],e),e},t.getEdges=function(e,n){e.forAll((function(e){e.getEdges(n),t.getEdges(e.children,n)}))},t}();function i(t,e,n){t.forAll((function(t){if(t.isLeaf())e.leaves||(e.leaves=[]),e.leaves.push(t.id);else{var r=e;if(t.gid=n.length,!t.isIsland()||t.isPredefined()){if(r={id:t.gid},t.isPredefined())for(var o in t.definition)r[o]=t.definition[o];e.groups||(e.groups=[]),e.groups.push(t.gid),n.push(r)}i(t.children,r,n)}}))}e.Configuration=r;var o=function(){function t(t,e,n,r,i){void 0===e&&(e=new s),void 0===n&&(n=new s),void 0===r&&(r=new a),this.id=t,this.outgoing=e,this.incoming=n,this.children=r,this.definition=i}return t.prototype.getEdges=function(t){var e=this;this.outgoing.forAll((function(r,i){r.forAll((function(r){t.push(new n(e.id,r.id,i))}))}))},t.prototype.isLeaf=function(){return 0===this.children.count()},t.prototype.isIsland=function(){return 0===this.outgoing.count()&&0===this.incoming.count()},t.prototype.isPredefined=function(){return void 0!==this.definition},t}();e.Module=o;var a=function(){function t(){this.table={}}return t.prototype.count=function(){return Object.keys(this.table).length},t.prototype.intersection=function(e){var n=new t;return n.table=function(t,e){var n={};for(var r in t)r in e&&(n[r]=t[r]);return n}(this.table,e.table),n},t.prototype.intersectionCount=function(t){return this.intersection(t).count()},t.prototype.contains=function(t){return t in this.table},t.prototype.add=function(t){this.table[t.id]=t},t.prototype.remove=function(t){delete this.table[t.id]},t.prototype.forAll=function(t){for(var e in this.table)t(this.table[e])},t.prototype.modules=function(){var t=[];return this.forAll((function(e){e.isPredefined()||t.push(e)})),t},t}();e.ModuleSet=a;var s=function(){function t(){this.sets={},this.n=0}return t.prototype.count=function(){return this.n},t.prototype.contains=function(t){var e=!1;return this.forAllModules((function(n){e||n.id!=t||(e=!0)})),e},t.prototype.add=function(t,e){(t in this.sets?this.sets[t]:this.sets[t]=new a).add(e),++this.n},t.prototype.remove=function(t,e){var n=this.sets[t];n.remove(e),0===n.count()&&delete this.sets[t],--this.n},t.prototype.forAll=function(t){for(var e in this.sets)t(this.sets[e],Number(e))},t.prototype.forAllModules=function(t){this.forAll((function(e,n){return e.forAll(t)}))},t.prototype.intersection=function(e){var n=new t;return this.forAll((function(t,r){if(r in e.sets){var i=t.intersection(e.sets[r]),o=i.count();o>0&&(n.sets[r]=i,n.n+=o)}})),n},t}();e.LinkSets=s,e.getGroups=function(t,e,n,i){for(var o=t.length,a=new r(o,e,n,i);a.greedyMerge(););var s=[],c=a.getGroupHierarchy(s);return s.forEach((function(e){var n=function(n){var r=e[n];"number"==typeof r&&(e[n]=t[r])};n("source"),n("target")})),{groups:c,powerEdges:s}}},9957:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.elem=t,this.subheaps=[]}return t.prototype.toString=function(t){for(var e="",n=!1,r=0;r0)}return null}}return t.prototype.clear=function(){this._root=null,this.size=0},t.prototype.find=function(t){for(var e=this._root;null!==e;){var n=this._comparator(t,e.data);if(0===n)return e.data;e=e.get_child(n>0)}return null},t.prototype.lowerBound=function(t){return this._bound(t,this._comparator)},t.prototype.upperBound=function(t){var e=this._comparator;return this._bound(t,(function(t,n){return e(n,t)}))},t.prototype.min=function(){var t=this._root;if(null===t)return null;for(;null!==t.left;)t=t.left;return t.data},t.prototype.max=function(){var t=this._root;if(null===t)return null;for(;null!==t.right;)t=t.right;return t.data},t.prototype.iterator=function(){return new o(this)},t.prototype.each=function(t){for(var e,n=this.iterator();null!==(e=n.next());)t(e)},t.prototype.reach=function(t){for(var e,n=this.iterator();null!==(e=n.prev());)t(e)},t.prototype._bound=function(t,e){for(var n=this._root,r=this.iterator();null!==n;){var i=this._comparator(t,n.data);if(0===i)return r._cursor=n,r;r._ancestors.push(n),n=n.get_child(i>0)}for(var o=r._ancestors.length-1;o>=0;--o)if(e(t,(n=r._ancestors[o]).data)>0)return r._cursor=n,r._ancestors.length=o,r;return r._ancestors.length=0,r},t}();e.TreeBase=i;var o=function(){function t(t){this._tree=t,this._ancestors=[],this._cursor=null}return t.prototype.data=function(){return null!==this._cursor?this._cursor.data:null},t.prototype.next=function(){if(null===this._cursor){var t=this._tree._root;null!==t&&this._minNode(t)}else{var e;if(null===this._cursor.right)do{if(e=this._cursor,!this._ancestors.length){this._cursor=null;break}this._cursor=this._ancestors.pop()}while(this._cursor.right===e);else this._ancestors.push(this._cursor),this._minNode(this._cursor.right)}return null!==this._cursor?this._cursor.data:null},t.prototype.prev=function(){if(null===this._cursor){var t=this._tree._root;null!==t&&this._maxNode(t)}else{var e;if(null===this._cursor.left)do{if(e=this._cursor,!this._ancestors.length){this._cursor=null;break}this._cursor=this._ancestors.pop()}while(this._cursor.left===e);else this._ancestors.push(this._cursor),this._maxNode(this._cursor.left)}return null!==this._cursor?this._cursor.data:null},t.prototype._minNode=function(t){for(;null!==t.left;)this._ancestors.push(t),t=t.left;this._cursor=t},t.prototype._maxNode=function(t){for(;null!==t.right;)this._ancestors.push(t),t=t.right;this._cursor=t},t}();e.Iterator=o;var a=function(){function t(t){this.data=t,this.left=null,this.right=null,this.red=!0}return t.prototype.get_child=function(t){return t?this.right:this.left},t.prototype.set_child=function(t,e){t?this.right=e:this.left=e},t}(),s=function(t){function e(e){var n=t.call(this)||this;return n._root=null,n._comparator=e,n.size=0,n}return r(e,t),e.prototype.insert=function(t){var n=!1;if(null===this._root)this._root=new a(t),n=!0,this.size++;else{var r=new a(void 0),i=!1,o=!1,s=null,c=r,u=null,l=this._root;for(c.right=this._root;;){if(null===l?(l=new a(t),u.set_child(i,l),n=!0,this.size++):e.is_red(l.left)&&e.is_red(l.right)&&(l.red=!0,l.left.red=!1,l.right.red=!1),e.is_red(l)&&e.is_red(u)){var h=c.right===s;l===u.get_child(o)?c.set_child(h,e.single_rotate(s,!o)):c.set_child(h,e.double_rotate(s,!o))}var f=this._comparator(l.data,t);if(0===f)break;o=i,i=f<0,null!==s&&(c=s),s=u,u=l,l=l.get_child(i)}this._root=r.right}return this._root.red=!1,n},e.prototype.remove=function(t){if(null===this._root)return!1;var n=new a(void 0),r=n;r.right=this._root;for(var i=null,o=null,s=null,c=!0;null!==r.get_child(c);){var u=c;o=i,i=r,r=r.get_child(c);var l=this._comparator(t,r.data);if(c=l>0,0===l&&(s=r),!e.is_red(r)&&!e.is_red(r.get_child(c)))if(e.is_red(r.get_child(!c))){var h=e.single_rotate(r,c);i.set_child(u,h),i=h}else if(!e.is_red(r.get_child(!c))){var f=i.get_child(!u);if(null!==f)if(e.is_red(f.get_child(!u))||e.is_red(f.get_child(u))){var d=o.right===i;e.is_red(f.get_child(u))?o.set_child(d,e.double_rotate(i,u)):e.is_red(f.get_child(!u))&&o.set_child(d,e.single_rotate(i,u));var g=o.get_child(d);g.red=!0,r.red=!0,g.left.red=!1,g.right.red=!1}else i.red=!1,f.red=!0,r.red=!0}}return null!==s&&(s.data=r.data,i.set_child(i.right===r,r.get_child(null===r.left)),this.size--),this._root=n.right,null!==this._root&&(this._root.red=!1),null!==s},e.is_red=function(t){return null!==t&&t.red},e.single_rotate=function(t,e){var n=t.get_child(!e);return t.set_child(!e,n.get_child(e)),n.set_child(e,t),t.red=!0,n.red=!1,n},e.double_rotate=function(t,n){return t.set_child(!n,e.single_rotate(t.get_child(!n),!n)),e.single_rotate(t,n)},e}(i);e.RBTree=s},2893:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(8126),a=n(6266);function s(t){return t.bounds=void 0!==t.leaves?t.leaves.reduce((function(t,e){return e.bounds.union(t)}),c.empty()):c.empty(),void 0!==t.groups&&(t.bounds=t.groups.reduce((function(t,e){return s(e).union(t)}),t.bounds)),t.bounds=t.bounds.inflate(t.padding),t.bounds}e.computeGroupBounds=s;var c=function(){function t(t,e,n,r){this.x=t,this.X=e,this.y=n,this.Y=r}return t.empty=function(){return new t(Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY)},t.prototype.cx=function(){return(this.x+this.X)/2},t.prototype.cy=function(){return(this.y+this.Y)/2},t.prototype.overlapX=function(t){var e=this.cx(),n=t.cx();return e<=n&&t.x0?n[0]:null},t.prototype.vertices=function(){return[{x:this.x,y:this.y},{x:this.X,y:this.y},{x:this.X,y:this.Y},{x:this.x,y:this.Y}]},t.lineIntersection=function(t,e,n,r,i,o,a,s){var c=n-t,u=a-i,l=r-e,h=s-o,f=h*c-u*l;if(0==f)return null;var d=t-i,g=e-o,p=(u*g-h*d)/f,v=(c*g-l*d)/f;return p>=0&&p<=1&&v>=0&&v<=1?{x:t+p*c,y:e+p*l}:null},t.prototype.inflate=function(e){return new t(this.x-e,this.X+e,this.y-e,this.Y+e)},t}();e.Rectangle=c,e.makeEdgeBetween=function(t,e,n){var r=t.rayIntersection(e.cx(),e.cy())||{x:t.cx(),y:t.cy()},i=e.rayIntersection(t.cx(),t.cy())||{x:e.cx(),y:e.cy()},o=i.x-r.x,a=i.y-r.y,s=Math.sqrt(o*o+a*a),c=s-n;return{sourceIntersection:r,targetIntersection:i,arrowStart:{x:r.x+c*o/s,y:r.y+c*a/s}}},e.makeEdgeTo=function(t,e,n){var r=e.rayIntersection(t.x,t.y);r||(r={x:e.cx(),y:e.cy()});var i=r.x-t.x,o=r.y-t.y,a=Math.sqrt(i*i+o*o);return{x:r.x-n*i/a,y:r.y-n*o/a}};var u=function(t,e,n){this.v=t,this.r=e,this.pos=n,this.prev=f(),this.next=f()},l=function(t,e,n){this.isOpen=t,this.v=e,this.pos=n};function h(t,e){return t.pos>e.pos?1:t.pos0&&(t[n].insert(i),i[r].insert(t))};n("next","prev"),n("prev","next")}};function p(t,e,n,r){void 0===r&&(r=!1);var i=t.padding,o=void 0!==t.groups?t.groups.length:0,a=void 0!==t.leaves?t.leaves.length:0,s=o?t.groups.reduce((function(t,r){return t.concat(p(r,e,n,!0))}),[]):[],c=(r?2:0)+a+o,u=new Array(c),l=new Array(c),h=0,f=function(t,e){l[h]=t,u[h++]=e};if(r){var d=t.bounds,g=e.getCentre(d),b=e.getSize(d)/2,y=e.getOpen(d),w=e.getClose(d),m=g-b+i/2,x=g+b-i/2;t.minVar.desiredPosition=m,f(e.makeRect(y,w,m,i),t.minVar),t.maxVar.desiredPosition=x,f(e.makeRect(y,w,x,i),t.maxVar)}a&&t.leaves.forEach((function(t){return f(t.bounds,t.variable)})),o&&t.groups.forEach((function(t){var n=t.bounds;f(e.makeRect(e.getOpen(n),e.getClose(n),e.getCentre(n),e.getSize(n)),t.minVar)}));var E=v(l,u,e,n);return o&&(u.forEach((function(t){t.cOut=[],t.cIn=[]})),E.forEach((function(t){t.left.cOut.push(t),t.right.cIn.push(t)})),t.groups.forEach((function(t){var n=(t.padding-e.getSize(t.bounds))/2;t.minVar.cIn.forEach((function(t){return t.gap+=n})),t.minVar.cOut.forEach((function(e){e.left=t.maxVar,e.gap+=n}))}))),s.concat(E)}function v(t,e,n,r){var i,a=t.length,s=2*a;console.assert(e.length>=a);var c=new Array(s);for(i=0;it[n]&&(t[n]=e)}o=t}))}},t.prototype.createAlignment=function(t){var e=this,n=this.nodes[t.offsets[0].node].variable;this.makeFeasible(t);var r="x"===t.axis?this.xConstraints:this.yConstraints;t.offsets.slice(1).forEach((function(t){var i=e.nodes[t.node].variable;r.push(new o.Constraint(n,i,t.offset,!0))}))},t.prototype.createConstraints=function(t){var e=this,n=function(t){return void 0===t.type||"separation"===t.type};this.xConstraints=t.filter((function(t){return"x"===t.axis&&n(t)})).map((function(t){return e.createSeparation(t)})),this.yConstraints=t.filter((function(t){return"y"===t.axis&&n(t)})).map((function(t){return e.createSeparation(t)})),t.filter((function(t){return"alignment"===t.type})).forEach((function(t){return e.createAlignment(t)}))},t.prototype.setupVariablesAndBounds=function(t,e,n,r){this.nodes.forEach((function(i,o){i.fixed?(i.variable.weight=i.fixedWeight?i.fixedWeight:1e3,n[o]=r(i)):i.variable.weight=1;var a=(i.width||0)/2,s=(i.height||0)/2,u=t[o],l=e[o];i.bounds=new c(u-a,u+a,l-s,l+s)}))},t.prototype.xProject=function(t,e,n){(this.rootGroup||this.avoidOverlaps||this.xConstraints)&&this.project(t,e,t,n,(function(t){return t.px}),this.xConstraints,w,(function(t){return t.bounds.setXCentre(n[t.variable.index]=t.variable.position())}),(function(t){var e=n[t.minVar.index]=t.minVar.position(),r=n[t.maxVar.index]=t.maxVar.position(),i=t.padding/2;t.bounds.x=e-i,t.bounds.X=r+i}))},t.prototype.yProject=function(t,e,n){(this.rootGroup||this.yConstraints)&&this.project(t,e,e,n,(function(t){return t.py}),this.yConstraints,m,(function(t){return t.bounds.setYCentre(n[t.variable.index]=t.variable.position())}),(function(t){var e=n[t.minVar.index]=t.minVar.position(),r=n[t.maxVar.index]=t.maxVar.position(),i=t.padding/2;t.bounds.y=e-i,t.bounds.Y=r+i}))},t.prototype.projectFunctions=function(){var t=this;return[function(e,n,r){return t.xProject(e,n,r)},function(e,n,r){return t.yProject(e,n,r)}]},t.prototype.project=function(t,e,n,r,i,o,a,c,u){this.setupVariablesAndBounds(t,e,r,i),this.rootGroup&&this.avoidOverlaps&&(s(this.rootGroup),o=o.concat(a(this.rootGroup))),this.solve(this.variables,o,n,r),this.nodes.forEach(c),this.rootGroup&&this.avoidOverlaps&&(this.groups.forEach(u),s(this.rootGroup))},t.prototype.solve=function(t,e,n,r){var i=new o.Solver(t,e);i.setStartingPositions(n),i.setDesiredPositions(r),i.solve()},t}();e.Projection=E},5542:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9957),i=function(t,e){this.id=t,this.distance=e},o=function(t){this.id=t,this.neighbours=[]},a=function(t,e,n){this.node=t,this.prev=e,this.d=n},s=function(){function t(t,e,n,r,a){this.n=t,this.es=e,this.neighbours=new Array(this.n);for(var s=this.n;s--;)this.neighbours[s]=new o(s);for(s=this.es.length;s--;){var c=this.es[s],u=n(c),l=r(c),h=a(c);this.neighbours[u].neighbours.push(new i(l,h)),this.neighbours[l].neighbours.push(new i(u,h))}}return t.prototype.DistanceMatrix=function(){for(var t=new Array(this.n),e=0;eh&&(u.d=h,u.prev=s,n.reduceKey(u.q,u,(function(t,e){return t.q=e})))}}return o},t}();e.Calculator=s},8126:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.scale=t,this.AB=0,this.AD=0,this.A2=0}return t.prototype.addVariable=function(t){var e=this.scale/t.scale,n=t.offset/t.scale,r=t.weight;this.AB+=r*e*n,this.AD+=r*e*t.desiredPosition,this.A2+=r*e*e},t.prototype.getPosn=function(){return(this.AD-this.AB)/this.A2},t}();e.PositionStats=n;var r=function(){function t(t,e,n,r){void 0===r&&(r=!1),this.left=t,this.right=e,this.gap=n,this.equality=r,this.active=!1,this.unsatisfiable=!1,this.left=t,this.right=e,this.gap=n,this.equality=r}return t.prototype.slack=function(){return this.unsatisfiable?Number.MAX_VALUE:this.right.scale*this.right.position()-this.gap-this.left.scale*this.left.position()},t}();e.Constraint=r;var i=function(){function t(t,e,n){void 0===e&&(e=1),void 0===n&&(n=1),this.desiredPosition=t,this.weight=e,this.scale=n,this.offset=0}return t.prototype.dfdv=function(){return 2*this.weight*(this.position()-this.desiredPosition)},t.prototype.position=function(){return(this.block.ps.scale*this.block.posn+this.offset)/this.scale},t.prototype.visitNeighbours=function(t,e){var n=function(n,r){return n.active&&t!==r&&e(n,r)};this.cOut.forEach((function(t){return n(t,t.right)})),this.cIn.forEach((function(t){return n(t,t.left)}))},t}();e.Variable=i;var o=function(){function t(t){this.vars=[],t.offset=0,this.ps=new n(t.scale),this.addVariable(t)}return t.prototype.addVariable=function(t){t.block=this,this.vars.push(t),this.ps.addVariable(t),this.posn=this.ps.getPosn()},t.prototype.updateWeightedPosition=function(){this.ps.AB=this.ps.AD=this.ps.A2=0;for(var t=0,e=this.vars.length;t=0?this.inactive.push(e):this.bs.merge(e)}}},t.prototype.solve=function(){this.satisfy();for(var t=Number.MAX_VALUE,e=this.bs.cost();Math.abs(t-e)>1e-4;)this.satisfy(),t=e,e=this.bs.cost();return e},t.LAGRANGIAN_TOLERANCE=-1e-4,t.ZERO_UPPERBOUND=-1e-10,t}();e.Solver=s,e.removeOverlapInOneDimension=function(t,e,n){for(var o=t.map((function(t){return new i(t.desiredCenter)})),a=[],c=t.length,u=0;u{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),n.nc=void 0,(()=>{"use strict";var t={};n.r(t),n.d(t,{VERSION:()=>e,after:()=>Se,all:()=>Qe,allKeys:()=>gt,any:()=>Je,assign:()=>St,before:()=>Me,bind:()=>me,bindAll:()=>_e,chain:()=>ve,chunk:()=>Rn,clone:()=>Rt,collect:()=>Xe,compact:()=>Nn,compose:()=>Le,constant:()=>$,contains:()=>tn,countBy:()=>pn,create:()=>Pt,debounce:()=>Ae,default:()=>Fn,defaults:()=>Mt,defer:()=>Ce,delay:()=>Ne,detect:()=>ze,difference:()=>Tn,drop:()=>_n,each:()=>Ue,escape:()=>ie,every:()=>Qe,extend:()=>Lt,extendOwn:()=>St,filter:()=>$e,find:()=>ze,findIndex:()=>je,findKey:()=>Pe,findLastIndex:()=>Ge,findWhere:()=>Ve,first:()=>En,flatten:()=>Cn,foldl:()=>qe,foldr:()=>Ze,forEach:()=>Ue,functions:()=>Ot,get:()=>Ht,groupBy:()=>dn,has:()=>Yt,head:()=>En,identity:()=>zt,include:()=>tn,includes:()=>tn,indexBy:()=>gn,indexOf:()=>He,initial:()=>xn,inject:()=>qe,intersection:()=>Ln,invert:()=>At,invoke:()=>en,isArguments:()=>W,isArray:()=>V,isArrayBuffer:()=>P,isBoolean:()=>C,isDataView:()=>z,isDate:()=>L,isElement:()=>T,isEmpty:()=>at,isEqual:()=>dt,isError:()=>M,isFinite:()=>q,isFunction:()=>G,isMap:()=>Et,isMatch:()=>st,isNaN:()=>Z,isNull:()=>k,isNumber:()=>I,isObject:()=>_,isRegExp:()=>S,isSet:()=>kt,isString:()=>O,isSymbol:()=>D,isTypedArray:()=>nt,isUndefined:()=>N,isWeakMap:()=>_t,isWeakSet:()=>Nt,iteratee:()=>qt,keys:()=>ot,last:()=>kn,lastIndexOf:()=>Ye,map:()=>Xe,mapObject:()=>$t,matcher:()=>Vt,matches:()=>Vt,max:()=>on,memoize:()=>ke,methods:()=>Ot,min:()=>an,mixin:()=>Gn,negate:()=>Ie,noop:()=>Kt,now:()=>ee,object:()=>Dn,omit:()=>mn,once:()=>De,pairs:()=>Tt,partial:()=>we,partition:()=>vn,pick:()=>wn,pluck:()=>nn,property:()=>Ut,propertyOf:()=>Qt,random:()=>te,range:()=>Pn,reduce:()=>qe,reduceRight:()=>Ze,reject:()=>Ke,rest:()=>_n,restArguments:()=>E,result:()=>de,sample:()=>un,select:()=>$e,shuffle:()=>ln,size:()=>bn,some:()=>Je,sortBy:()=>hn,sortedIndex:()=>Fe,tail:()=>_n,take:()=>En,tap:()=>jt,template:()=>fe,templateSettings:()=>ae,throttle:()=>Te,times:()=>Jt,toArray:()=>cn,toPath:()=>Gt,transpose:()=>Sn,unescape:()=>oe,union:()=>In,uniq:()=>On,unique:()=>On,uniqueId:()=>pe,unzip:()=>Sn,values:()=>Ct,where:()=>rn,without:()=>An,wrap:()=>Oe,zip:()=>Mn});var e="1.13.6",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},i=Array.prototype,o=Object.prototype,a="undefined"!=typeof Symbol?Symbol.prototype:null,s=i.push,c=i.slice,u=o.toString,l=o.hasOwnProperty,h="undefined"!=typeof ArrayBuffer,f="undefined"!=typeof DataView,d=Array.isArray,g=Object.keys,p=Object.create,v=h&&ArrayBuffer.isView,b=isNaN,y=isFinite,w=!{toString:null}.propertyIsEnumerable("toString"),m=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],x=Math.pow(2,53)-1;function E(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),r=Array(n),i=0;i=0&&n<=x}}function Q(t){return function(e){return null==e?void 0:e[t]}}const J=Q("byteLength"),tt=K(J);var et=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;const nt=h?function(t){return v?v(t)&&!z(t):tt(t)&&et.test(u.call(t))}:$(!1),rt=Q("length");function it(t,e){e=function(t){for(var e={},n=t.length,r=0;r":">",'"':""","'":"'","`":"`"},ie=ne(re),oe=ne(At(re)),ae=ct.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var se=/(.)^/,ce={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},ue=/\\|'|\r|\n|\u2028|\u2029/g;function le(t){return"\\"+ce[t]}var he=/^\s*(\w|\$)+\s*$/;function fe(t,e,n){!e&&n&&(e=n),e=Mt({},e,ct.templateSettings);var r=RegExp([(e.escape||se).source,(e.interpolate||se).source,(e.evaluate||se).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,(function(e,n,r,a,s){return o+=t.slice(i,s).replace(ue,le),i=s+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),e})),o+="';\n";var a,s=e.variable;if(s){if(!he.test(s))throw new Error("variable is not a bare identifier: "+s)}else o="with(obj||{}){\n"+o+"}\n",s="obj";o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{a=new Function(s,"_",o)}catch(t){throw t.source=o,t}var c=function(t){return a.call(this,t,ct)};return c.source="function("+s+"){\n"+o+"}",c}function de(t,e,n){var r=(e=Ft(e)).length;if(!r)return G(n)?n.call(t):n;for(var i=0;i1)Ee(s,e-1,n,r),i=r.length;else for(var c=0,u=s.length;ce?(r&&(clearTimeout(r),r=null),s=u,a=t.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(c,l)),a};return u.cancel=function(){clearTimeout(r),s=0,r=i=o=null},u}function Ae(t,e,n){var r,i,o,a,s,c=function(){var u=ee()-i;e>u?r=setTimeout(c,e-u):(r=null,n||(a=t.apply(s,o)),r||(o=s=null))},u=E((function(u){return s=this,o=u,i=ee(),r||(r=setTimeout(c,e),n&&(a=t.apply(s,o))),a}));return u.cancel=function(){clearTimeout(r),r=o=s=null},u}function Oe(t,e){return we(e,t)}function Ie(t){return function(){return!t.apply(this,arguments)}}function Le(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}}function Se(t,e){return function(){if(--t<1)return e.apply(this,arguments)}}function Me(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}}const De=we(Me,2);function Pe(t,e,n){e=Zt(e,n);for(var r,i=ot(t),o=0,a=i.length;o0?0:i-1;o>=0&&o0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=e(c.call(r,a,s),Z))>=0?o+a:-1;for(o=t>0?a:s-1;o>=0&&o=3;return function(e,n,r,i){var o=!xe(e)&&ot(e),a=(o||e).length,s=t>0?0:a-1;for(i||(r=e[o?o[s]:s],s+=t);s>=0&&s=0}const en=E((function(t,e,n){var r,i;return G(e)?i=e:(e=Ft(e),r=e.slice(0,-1),e=e[e.length-1]),Xe(t,(function(t){var o=i;if(!o){if(r&&r.length&&(t=Bt(t,r)),null==t)return;o=t[e]}return null==o?o:o.apply(t,n)}))}));function nn(t,e){return Xe(t,Ut(e))}function rn(t,e){return $e(t,Vt(e))}function on(t,e,n){var r,i,o=-1/0,a=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,c=(t=xe(t)?t:Ct(t)).length;so&&(o=r);else e=Zt(e,n),Ue(t,(function(t,n,r){((i=e(t,n,r))>a||i===-1/0&&o===-1/0)&&(o=t,a=i)}));return o}function an(t,e,n){var r,i,o=1/0,a=1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,c=(t=xe(t)?t:Ct(t)).length;sr||void 0===n)return 1;if(n1&&(r=Xt(r,e[1])),e=gt(t)):(r=yn,e=Ee(e,!1,!1),t=Object(t));for(var i=0,o=e.length;i1&&(n=e[1])):(e=Xe(Ee(e,!1,!1),String),r=function(t,n){return!tn(e,n)}),wn(t,r,n)}));function xn(t,e,n){return c.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))}function En(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[0]:xn(t,t.length-e)}function _n(t,e,n){return c.call(t,null==e||n?1:e)}function kn(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[t.length-1]:_n(t,Math.max(0,t.length-e))}function Nn(t){return $e(t,Boolean)}function Cn(t,e){return Ee(t,e,!1)}const Tn=E((function(t,e){return e=Ee(e,!0,!0),$e(t,(function(t){return!tn(e,t)}))})),An=E((function(t,e){return Tn(t,e)}));function On(t,e,n,r){C(e)||(r=n,n=e,e=!1),null!=n&&(n=Zt(n,r));for(var i=[],o=[],a=0,s=rt(t);at.length)&&(e=t.length);for(var n=0,r=new Array(e);ne?1:0},Tr=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments,n=1;n=e||n<0||h&&t-u>=o}function p(){var t=Rr();if(g(t))return v(t);s=setTimeout(p,function(t){var n=e-(t-c);return h?ei(n,o-(t-u)):n}(t))}function v(t){return s=void 0,f&&r?d(t):(r=i=void 0,a)}function b(){var t=Rr(),n=g(t);if(r=arguments,i=this,c=t,n){if(void 0===s)return function(t){return u=t,s=setTimeout(p,e),l?d(t):a}(c);if(h)return clearTimeout(s),s=setTimeout(p,e),d(c)}return void 0===s&&(s=setTimeout(p,e)),a}return e=Jr(e)||0,Lr(n)&&(l=!!n.leading,o=(h="maxWait"in n)?ti(Jr(n.maxWait)||0,e):o,f="trailing"in n?!!n.trailing:f),b.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=c=i=s=void 0},b.flush=function(){return void 0===s?a:v(Rr())},b},ri=$n?$n.performance:null,ii=ri&&ri.now?function(){return ri.now()}:function(){return Date.now()},oi=function(){if($n){if($n.requestAnimationFrame)return function(t){$n.requestAnimationFrame(t)};if($n.mozRequestAnimationFrame)return function(t){$n.mozRequestAnimationFrame(t)};if($n.webkitRequestAnimationFrame)return function(t){$n.webkitRequestAnimationFrame(t)};if($n.msRequestAnimationFrame)return function(t){$n.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout((function(){t(ii())}),1e3/60)}}(),ai=function(t){return oi(t)},si=ii,ci=9261,ui=5381,li=function(t){for(var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ci;!(e=t.next()).done;)n=65599*n+e.value|0;return n},hi=function(t){return 65599*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:ci)+t|0},fi=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ui;return(e<<5)+e+t|0},di=function(t){return 2097152*t[0]+t[1]},gi=function(t,e){return[hi(t[0],e[0]),fi(t[1],e[1])]},pi=function(t,e){var n={value:0,done:!1},r=0,i=t.length;return li({next:function(){return r=0&&(t[r]!==e||(t.splice(r,1),!n));r--);},Pi=function(t){t.splice(0,t.length)},Ri=function(t,e,n){return n&&(e=wr(n,e)),t[e]},ji=function(t,e,n,r){n&&(e=wr(n,e)),t[e]=r},Gi="undefined"!=typeof Map?Map:function(){function t(){zn(this,t),this._obj={}}return Un(t,[{key:"set",value:function(t,e){return this._obj[t]=e,this}},{key:"delete",value:function(t){return this._obj[t]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(t){return void 0!==this._obj[t]}},{key:"get",value:function(t){return this._obj[t]}}]),t}(),Fi=function(){function t(e){if(zn(this,t),this._obj=Object.create(null),this.size=0,null!=e){var n;n=null!=e.instanceString&&e.instanceString()===this.instanceString()?e.toArray():e;for(var r=0;r2&&void 0!==arguments[2])||arguments[2];if(void 0!==t&&void 0!==e&&fr(t)){var r=e.group;if(null==r&&(r=e.data&&null!=e.data.source&&null!=e.data.target?"edges":"nodes"),"nodes"===r||"edges"===r){this.length=1,this[0]=this;var i=this._private={cy:t,single:!0,data:e.data||{},position:e.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!e.selected,selectable:void 0===e.selectable||!!e.selectable,locked:!!e.locked,grabbed:!1,grabbable:void 0===e.grabbable||!!e.grabbable,pannable:void 0===e.pannable?"edges"===r:!!e.pannable,active:!1,classes:new Bi,animation:{current:[],queue:[]},rscratch:{},scratch:e.scratch||{},edges:[],children:[],parent:e.parent&&e.parent.isNode()?e.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==i.position.x&&(i.position.x=0),null==i.position.y&&(i.position.y=0),e.renderedPosition){var o=e.renderedPosition,a=t.pan(),s=t.zoom();i.position={x:(o.x-a.x)/s,y:(o.y-a.y)/s}}var c=[];or(e.classes)?c=e.classes:rr(e.classes)&&(c=e.classes.split(/\s+/));for(var u=0,l=c.length;ue?1:0},u=function(t,e,i,o,a){var s;if(null==i&&(i=0),null==a&&(a=n),i<0)throw new Error("lo must be non-negative");for(null==o&&(o=t.length);in;0<=n?e++:e--)u.push(e);return u}.apply(this).reverse()).length;op;0<=p?++f:--f)v.push(o(t,r));return v},g=function(t,e,r,i){var o,a,s;for(null==i&&(i=n),o=t[r];r>e&&i(o,a=t[s=r-1>>1])<0;)t[r]=a,r=s;return t[r]=o},p=function(t,e,r){var i,o,a,s,c;for(null==r&&(r=n),o=t.length,c=e,a=t[e],i=2*e+1;i0;){var x=b.pop(),E=p(x),_=x.id();if(h[_]=E,E!==1/0)for(var k=x.neighborhood().intersect(d),N=0;N0)for(n.unshift(e);l[i];){var o=l[i];n.unshift(o.edge),n.unshift(o.node),i=(r=o.node).id()}return a.spawn(n)}}}},Zi={kruskal:function(t){t=t||function(t){return 1};for(var e=this.byGroup(),n=e.nodes,r=e.edges,i=n.length,o=new Array(i),a=n,s=function(t){for(var e=0;e0;){if(u=(c=p.pop()).id(),v.delete(u),x++,u===h){for(var E=[],_=i,k=h,N=y[k];E.unshift(_),null!=N&&E.unshift(N),null!=(_=b[k]);)N=y[k=_.id()];return{found:!0,distance:f[u],path:this.spawn(E),steps:x}}g[u]=!0;for(var C=c._private.edges,T=0;TC&&(d[N]=C,b[N]=k,y[N]=m),!i){var T=k*u+_;!i&&d[T]>C&&(d[T]=C,b[T]=_,y[T]=m)}}}for(var A=0;A1&&void 0!==arguments[1]?arguments[1]:o,r=[],i=y(t);;){if(null==i)return e.spawn();var a=b(i),c=a.edge,u=a.pred;if(r.unshift(i[0]),i.same(n)&&r.length>0)break;null!=c&&r.unshift(c),i=u}return s.spawn(r)},hasNegativeWeightCycle:g,negativeWeightCycles:p}}},no=Math.sqrt(2),ro=function(t,e,n){0===n.length&&Ci("Karger-Stein must be run on a connected (sub)graph");for(var r=n[t],i=r[1],o=r[2],a=e[i],s=e[o],c=n,u=c.length-1;u>=0;u--){var l=c[u],h=l[1],f=l[2];(e[h]===a&&e[f]===s||e[h]===s&&e[f]===a)&&c.splice(u,1)}for(var d=0;dr;){var i=Math.floor(Math.random()*e.length);e=ro(i,t,e),n--}return e},oo={kargerStein:function(){var t=this,e=this.byGroup(),n=e.nodes,r=e.edges;r.unmergeBy((function(t){return t.isLoop()}));var i=n.length,o=r.length,a=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),s=Math.floor(i/no);if(!(i<2)){for(var c=[],u=0;u0?1:t<0?-1:0},fo=function(t,e){return Math.sqrt(go(t,e))},go=function(t,e){var n=e.x-t.x,r=e.y-t.y;return n*n+r*r},po=function(t){for(var e=t.length,n=0,r=0;r=t.x1&&t.y2>=t.y1)return{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,w:t.x2-t.x1,h:t.y2-t.y1};if(null!=t.w&&null!=t.h&&t.w>=0&&t.h>=0)return{x1:t.x1,y1:t.y1,x2:t.x1+t.w,y2:t.y1+t.h,w:t.w,h:t.h}}},mo=function(t,e){t.x1=Math.min(t.x1,e.x1),t.x2=Math.max(t.x2,e.x2),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,e.y1),t.y2=Math.max(t.y2,e.y2),t.h=t.y2-t.y1},xo=function(t,e,n){t.x1=Math.min(t.x1,e),t.x2=Math.max(t.x2,e),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,n),t.y2=Math.max(t.y2,n),t.h=t.y2-t.y1},Eo=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.x1-=e,t.x2+=e,t.y1-=e,t.y2+=e,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},_o=function(t){var e,n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===o.length)e=n=r=i=o[0];else if(2===o.length)e=r=o[0],i=n=o[1];else if(4===o.length){var a=Wn(o,4);e=a[0],n=a[1],r=a[2],i=a[3]}return t.x1-=i,t.x2+=n,t.y1-=e,t.y2+=r,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},ko=function(t,e){t.x1=e.x1,t.y1=e.y1,t.x2=e.x2,t.y2=e.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1},No=function(t,e){return!(t.x1>e.x2||e.x1>t.x2||t.x2e.y2||e.y1>t.y2)},Co=function(t,e,n){return t.x1<=e&&e<=t.x2&&t.y1<=n&&n<=t.y2},To=function(t,e){return Co(t,e.x1,e.y1)&&Co(t,e.x2,e.y2)},Ao=function(t,e,n,r,i,o,a){var s,c,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"auto",l="auto"===u?Xo(i,o):u,h=i/2,f=o/2,d=(l=Math.min(l,h,f))!==h,g=l!==f;if(d){var p=r-f-a;if((s=Bo(t,e,n,r,n-h+l-a,p,n+h-l+a,p,!1)).length>0)return s}if(g){var v=n+h+a;if((s=Bo(t,e,n,r,v,r-f+l-a,v,r+f-l+a,!1)).length>0)return s}if(d){var b=r+f+a;if((s=Bo(t,e,n,r,n-h+l-a,b,n+h-l+a,b,!1)).length>0)return s}if(g){var y=n-h-a;if((s=Bo(t,e,n,r,y,r-f+l-a,y,r+f-l+a,!1)).length>0)return s}var w=n-h+l,m=r-f+l;if((c=Go(t,e,n,r,w,m,l+a)).length>0&&c[0]<=w&&c[1]<=m)return[c[0],c[1]];var x=n+h-l,E=r-f+l;if((c=Go(t,e,n,r,x,E,l+a)).length>0&&c[0]>=x&&c[1]<=E)return[c[0],c[1]];var _=n+h-l,k=r+f-l;if((c=Go(t,e,n,r,_,k,l+a)).length>0&&c[0]>=_&&c[1]>=k)return[c[0],c[1]];var N=n-h+l,C=r+f-l;return(c=Go(t,e,n,r,N,C,l+a)).length>0&&c[0]<=N&&c[1]>=C?[c[0],c[1]]:[]},Oo=function(t,e,n,r,i,o,a){var s=a,c=Math.min(n,i),u=Math.max(n,i),l=Math.min(r,o),h=Math.max(r,o);return c-s<=t&&t<=u+s&&l-s<=e&&e<=h+s},Io=function(t,e,n,r,i,o,a,s,c){var u=Math.min(n,a,i)-c,l=Math.max(n,a,i)+c,h=Math.min(r,s,o)-c,f=Math.max(r,s,o)+c;return!(tl||ef)},Lo=function(t,e,n,r,i,o,a,s){var c=[];!function(t,e,n,r,i){var o,a,s,c,u,l,h,f;0===t&&(t=1e-5),s=-27*(r/=t)+(e/=t)*(9*(n/=t)-e*e*2),o=(a=(3*n-e*e)/9)*a*a+(s/=54)*s,i[1]=0,h=e/3,o>0?(u=(u=s+Math.sqrt(o))<0?-Math.pow(-u,1/3):Math.pow(u,1/3),l=(l=s-Math.sqrt(o))<0?-Math.pow(-l,1/3):Math.pow(l,1/3),i[0]=-h+u+l,h+=(u+l)/2,i[4]=i[2]=-h,h=Math.sqrt(3)*(-l+u)/2,i[3]=h,i[5]=-h):(i[5]=i[3]=0,0===o?(f=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3),i[0]=2*f-h,i[4]=i[2]=-(f+h)):(c=(a=-a)*a*a,c=Math.acos(s/Math.sqrt(c)),f=2*Math.sqrt(a),i[0]=-h+f*Math.cos(c/3),i[2]=-h+f*Math.cos((c+2*Math.PI)/3),i[4]=-h+f*Math.cos((c+4*Math.PI)/3)))}(1*n*n-4*n*i+2*n*a+4*i*i-4*i*a+a*a+r*r-4*r*o+2*r*s+4*o*o-4*o*s+s*s,9*n*i-3*n*n-3*n*a-6*i*i+3*i*a+9*r*o-3*r*r-3*r*s-6*o*o+3*o*s,3*n*n-6*n*i+n*a-n*t+2*i*i+2*i*t-a*t+3*r*r-6*r*o+r*s-r*e+2*o*o+2*o*e-s*e,1*n*i-n*n+n*t-i*t+r*o-r*r+r*e-o*e,c);for(var u=[],l=0;l<6;l+=2)Math.abs(c[l+1])<1e-7&&c[l]>=0&&c[l]<=1&&u.push(c[l]);u.push(1),u.push(0);for(var h,f,d,g=-1,p=0;p=0?dc?(t-i)*(t-i)+(e-o)*(e-o):u-h},Mo=function(t,e,n){for(var r,i,o,a,s=0,c=0;c=t&&t>=o||r<=t&&t<=o))continue;(t-r)/(o-r)*(a-i)+i>e&&s++}return s%2!=0},Do=function(t,e,n,r,i,o,a,s,c){var u,l=new Array(n.length);null!=s[0]?(u=Math.atan(s[1]/s[0]),s[0]<0?u+=Math.PI/2:u=-u-Math.PI/2):u=s;for(var h,f=Math.cos(-u),d=Math.sin(-u),g=0;g0){var p=Ro(l,-c);h=Po(p)}else h=l;return Mo(t,e,h)},Po=function(t){for(var e,n,r,i,o,a,s,c,u=new Array(t.length/2),l=0;l=0&&g<=1&&v.push(g),p>=0&&p<=1&&v.push(p),0===v.length)return[];var b=v[0]*s[0]+t,y=v[0]*s[1]+e;return v.length>1?v[0]==v[1]?[b,y]:[b,y,v[1]*s[0]+t,v[1]*s[1]+e]:[b,y]},Fo=function(t,e,n){return e<=t&&t<=n||n<=t&&t<=e?t:t<=e&&e<=n||n<=e&&e<=t?e:n},Bo=function(t,e,n,r,i,o,a,s,c){var u=t-i,l=n-t,h=a-i,f=e-o,d=r-e,g=s-o,p=h*f-g*u,v=l*f-d*u,b=g*l-h*d;if(0!==b){var y=p/b,w=v/b,m=-.001;return m<=y&&y<=1.001&&m<=w&&w<=1.001||c?[t+y*l,e+y*d]:[]}return 0===p||0===v?Fo(t,n,a)===a?[a,s]:Fo(t,n,i)===i?[i,o]:Fo(i,a,n)===n?[n,r]:[]:[]},Ho=function(t,e,n,r,i,o,a,s){var c,u,l,h,f,d,g=[],p=new Array(n.length),v=!0;if(null==o&&(v=!1),v){for(var b=0;b0){var y=Ro(p,-s);u=Po(y)}else u=p}else u=n;for(var w=0;wu&&(u=e)},h=function(t){return c[t]},f=0;f0?m.edgesTo(w)[0]:w.edgesTo(m)[0];var x=r(y);w=w.id(),f[w]>f[v]+x&&(f[w]=f[v]+x,d.nodes.indexOf(w)<0?d.push(w):d.updateItem(w),u[w]=0,c[w]=[]),f[w]==f[v]+x&&(u[w]=u[w]+u[v],c[w].push(v))}else for(var E=0;E0;){for(var C=n.pop(),T=0;T0&&a.push(n[s]);0!==a.length&&i.push(r.collection(a))}return i}(l,c,e,r);return w=function(t){for(var e=0;e5&&void 0!==arguments[5]?arguments[5]:da,a=r,s=0;s=2?wa(t,e,n,0,va,ba):wa(t,e,n,0,pa)},squaredEuclidean:function(t,e,n){return wa(t,e,n,0,va)},manhattan:function(t,e,n){return wa(t,e,n,0,pa)},max:function(t,e,n){return wa(t,e,n,-1/0,ya)}};function xa(t,e,n,r,i,o){var a;return a=ir(t)?t:ma[t]||ma.euclidean,0===e&&ir(t)?a(i,o):a(e,n,r,i,o)}ma["squared-euclidean"]=ma.squaredEuclidean,ma.squaredeuclidean=ma.squaredEuclidean;var Ea=Mi({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),_a=function(t){return Ea(t)},ka=function(t,e,n,r,i){var o="kMedoids"!==i?function(t){return n[t]}:function(t){return r[t](n)},a=n,s=e;return xa(t,r.length,o,(function(t){return r[t](e)}),a,s)},Na=function(t,e,n){for(var r=n.length,i=new Array(r),o=new Array(r),a=new Array(e),s=null,c=0;cn)return!1;return!0},Ia=function(t,e,n){for(var r=0;ri&&(i=e[c][u],o=u);a[o].push(t[c])}for(var l=0;l=i.threshold||"dendrogram"===i.mode&&1===t.length)return!1;var d,g=e[a],p=e[r[a]];d="dendrogram"===i.mode?{left:g,right:p,key:g.key}:{value:g.value.concat(p.value),key:g.key},t[g.index]=d,t.splice(p.index,1),e[g.key]=d;for(var v=0;vn[p.key][b.key]&&(o=n[p.key][b.key])):"max"===i.linkage?(o=n[g.key][b.key],n[g.key][b.key]a&&(o=c,a=e[i*t+c])}o>0&&r.push(o)}for(var u=0;u1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?(n0&&t.splice(0,e)):t=t.slice(e,n);for(var o=0,a=t.length-1;a>=0;a--){var s=t[a];i?isFinite(s)||(t[a]=-1/0,o++):t.splice(a,1)}r&&t.sort((function(t,e){return t-e}));var c=t.length,u=Math.floor(c/2);return c%2!=0?t[u+1+o]:(t[u-1+o]+t[u+o])/2}(t):"mean"===e?function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=0,i=0,o=e;o1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=1/0,i=e;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=-1/0,i=e;i=C?(T=C,C=O,A=I):O>T&&(T=O);for(var L=0;L0?1:0;_[E%u.minIterations*e+j]=G,R+=G}if(R>0&&(E>=u.minIterations-1||E==u.maxIterations-1)){for(var F=0,B=0;B0&&r.push(i);return r}(e,o,a),z=function(t,e,n){for(var r=Wa(t,e,n),i=0;ic&&(s=u,c=l)}n[i]=o[s]}return Wa(t,e,n)}(e,r,Y),V={},U=0;U1||a>1)&&(u=!0),l[e]=[],t.outgoers().forEach((function(t){t.isEdge()&&l[e].push(t.id())}))}else h[e]=[void 0,t.target().id()]})):c.forEach((function(t){var e=t.id();t.isNode()?(t.degree(!0)%2&&(n?r?u=!0:r=e:n=e),l[e]=[],t.connectedEdges().forEach((function(t){return l[e].push(t.id())}))):h[e]=[t.source().id(),t.target().id()]}));var f={found:!1,trail:void 0};if(u)return f;if(r&&n)if(s){if(i&&r!=i)return f;i=r}else{if(i&&r!=i&&n!=i)return f;i||(i=r)}else i||(i=c[0].id());var d=function(t){for(var e,n,r,i=t,o=[t];l[i].length;)e=l[i].shift(),n=h[e][0],i!=(r=h[e][1])?(l[r]=l[r].filter((function(t){return t!=e})),i=r):s||i==n||(l[n]=l[n].filter((function(t){return t!=e})),i=n),o.unshift(e),o.unshift(i);return o},g=[],p=[];for(p=d(i);1!=p.length;)0==l[p[0]].length?(g.unshift(c.getElementById(p.shift())),g.unshift(c.getElementById(p.shift()))):p=d(p.shift()).concat(p);for(var v in g.unshift(c.getElementById(p.shift())),l)if(l[v].length)return f;return f.found=!0,f.trail=this.spawn(g,!0),f}},Qa=function(){var t=this,e={},n=0,r=0,i=[],o=[],a={},s=function s(c,u,l){c===l&&(r+=1),e[u]={id:n,low:n++,cutVertex:!1};var h,f,d,g,p=t.getElementById(u).connectedEdges().intersection(t);0===p.size()?i.push(t.spawn(t.getElementById(u))):p.forEach((function(n){h=n.source().id(),f=n.target().id(),(d=h===u?f:h)!==l&&(g=n.id(),a[g]||(a[g]=!0,o.push({x:u,y:d,edge:n})),d in e?e[u].low=Math.min(e[u].low,e[d].id):(s(c,d,u),e[u].low=Math.min(e[u].low,e[d].low),e[u].id<=e[d].low&&(e[u].cutVertex=!0,function(n,r){for(var a=o.length-1,s=[],c=t.spawn();o[a].x!=n||o[a].y!=r;)s.push(o.pop().edge),a--;s.push(o.pop().edge),s.forEach((function(n){var r=n.connectedNodes().intersection(t);c.merge(n),r.forEach((function(n){var r=n.id(),i=n.connectedEdges().intersection(t);c.merge(n),e[r].cutVertex?c.merge(i.filter((function(t){return t.isLoop()}))):c.merge(i)}))})),i.push(c)}(u,d))))}))};t.forEach((function(t){if(t.isNode()){var n=t.id();n in e||(r=0,s(n,n),e[n].cutVertex=r>1)}}));var c=Object.keys(e).filter((function(t){return e[t].cutVertex})).map((function(e){return t.getElementById(e)}));return{cut:t.spawn(c),components:i}},Ja=function(){var t=this,e={},n=0,r=[],i=[],o=t.spawn(t),a=function a(s){if(i.push(s),e[s]={index:n,low:n++,explored:!1},t.getElementById(s).connectedEdges().intersection(t).forEach((function(t){var n=t.target().id();n!==s&&(n in e||a(n),e[n].explored||(e[s].low=Math.min(e[s].low,e[n].low)))})),e[s].index===e[s].low){for(var c=t.spawn();;){var u=i.pop();if(c.merge(t.getElementById(u)),e[u].low=e[s].index,e[u].explored=!0,u===s)break}var l=c.edgesWith(c),h=c.merge(l);r.push(h),o=o.difference(h)}};return t.forEach((function(t){if(t.isNode()){var n=t.id();n in e||a(n)}})),{cut:o,components:r}},ts={};[zi,qi,Zi,Ki,Ji,eo,oo,$o,Qo,ta,na,fa,Ra,Va,Za,Ka,{hopcroftTarjanBiconnected:Qa,htbc:Qa,htb:Qa,hopcroftTarjanBiconnectedComponents:Qa},{tarjanStronglyConnected:Ja,tsc:Ja,tscc:Ja,tarjanStronglyConnectedComponents:Ja}].forEach((function(t){Tr(ts,t)}));var es=function t(e){if(!(this instanceof t))return new t(e);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof e&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};es.prototype={fulfill:function(t){return ns(this,1,"fulfillValue",t)},reject:function(t){return ns(this,2,"rejectReason",t)},then:function(t,e){var n=this,r=new es;return n.onFulfilled.push(os(t,r,"fulfill")),n.onRejected.push(os(e,r,"reject")),rs(n),r.proxy}};var ns=function(t,e,n,r){return 0===t.state&&(t.state=e,t[n]=r,rs(t)),t},rs=function(t){1===t.state?is(t,"onFulfilled",t.fulfillValue):2===t.state&&is(t,"onRejected",t.rejectReason)},is=function(t,e,n){if(0!==t[e].length){var r=t[e];t[e]=[];var i=function(){for(var t=0;t0:void 0}},clearQueue:function(){return function(){var t=this,e=void 0!==t.length?t:[t];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n-1},Ds.prototype.set=function(t,e){var n=this.__data__,r=Ss(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Ps=Ds,Rs=Ns(Pr,"Map"),js=function(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map};function Gs(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t0&&this.spawn(r).updateStyle().emit("class"),e},addClass:function(t){return this.toggleClass(t,!0)},hasClass:function(t){var e=this[0];return null!=e&&e._private.classes.has(t)},toggleClass:function(t,e){or(t)||(t=t.match(/\S+/g)||[]);for(var n=this,r=void 0===e,i=[],o=0,a=n.length;o0&&this.spawn(i).updateStyle().emit("class"),n},removeClass:function(t){return this.toggleClass(t,!1)},flashClass:function(t,e){var n=this;if(null==e)e=250;else if(0===e)return n;return n.addClass(t),setTimeout((function(){n.removeClass(t)}),e),n}};hc.className=hc.classNames=hc.classes;var fc={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:xr,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};fc.variable="(?:[\\w-.]|(?:\\\\"+fc.metaChar+"))+",fc.className="(?:[\\w-]|(?:\\\\"+fc.metaChar+"))+",fc.value=fc.string+"|"+fc.number,fc.id=fc.variable,function(){var t,e,n;for(t=fc.comparatorOp.split("|"),n=0;n=0||"="!==e&&(fc.comparatorOp+="|\\!"+e)}();var dc=20,gc=[{selector:":selected",matches:function(t){return t.selected()}},{selector:":unselected",matches:function(t){return!t.selected()}},{selector:":selectable",matches:function(t){return t.selectable()}},{selector:":unselectable",matches:function(t){return!t.selectable()}},{selector:":locked",matches:function(t){return t.locked()}},{selector:":unlocked",matches:function(t){return!t.locked()}},{selector:":visible",matches:function(t){return t.visible()}},{selector:":hidden",matches:function(t){return!t.visible()}},{selector:":transparent",matches:function(t){return t.transparent()}},{selector:":grabbed",matches:function(t){return t.grabbed()}},{selector:":free",matches:function(t){return!t.grabbed()}},{selector:":removed",matches:function(t){return t.removed()}},{selector:":inside",matches:function(t){return!t.removed()}},{selector:":grabbable",matches:function(t){return t.grabbable()}},{selector:":ungrabbable",matches:function(t){return!t.grabbable()}},{selector:":animated",matches:function(t){return t.animated()}},{selector:":unanimated",matches:function(t){return!t.animated()}},{selector:":parent",matches:function(t){return t.isParent()}},{selector:":childless",matches:function(t){return t.isChildless()}},{selector:":child",matches:function(t){return t.isChild()}},{selector:":orphan",matches:function(t){return t.isOrphan()}},{selector:":nonorphan",matches:function(t){return t.isChild()}},{selector:":compound",matches:function(t){return t.isNode()?t.isParent():t.source().isParent()||t.target().isParent()}},{selector:":loop",matches:function(t){return t.isLoop()}},{selector:":simple",matches:function(t){return t.isSimple()}},{selector:":active",matches:function(t){return t.active()}},{selector:":inactive",matches:function(t){return!t.active()}},{selector:":backgrounding",matches:function(t){return t.backgrounding()}},{selector:":nonbackgrounding",matches:function(t){return!t.backgrounding()}}].sort((function(t,e){return function(t,e){return-1*Cr(t,e)}(t.selector,e.selector)})),pc=function(){for(var t,e={},n=0;n0&&u.edgeCount>0)return Ai("The selector `"+t+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(u.edgeCount>1)return Ai("The selector `"+t+"` is invalid because it uses multiple edge selectors"),!1;1===u.edgeCount&&Ai("The selector `"+t+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var t=function(t){return null==t?"":t},e=function(e){return rr(e)?'"'+e+'"':t(e)},n=function(t){return" "+t+" "},r=function(i,o){return i.checks.reduce((function(a,s,c){return a+(o===i&&0===c?"$":"")+function(i,o){var a=i.type,s=i.value;switch(a){case 0:var c=t(s);return c.substring(0,c.length-1);case 3:var u=i.field,l=i.operator;return"["+u+n(t(l))+e(s)+"]";case 5:var h=i.operator,f=i.field;return"["+t(h)+f+"]";case 4:return"["+i.field+"]";case 6:var d=i.operator;return"[["+i.field+n(t(d))+e(s)+"]]";case 7:return s;case 8:return"#"+s;case 9:return"."+s;case 17:case 15:return r(i.parent,o)+n(">")+r(i.child,o);case 18:case 16:return r(i.ancestor,o)+" "+r(i.descendant,o);case 19:var g=r(i.left,o),p=r(i.subject,o),v=r(i.right,o);return g+(g.length>0?" ":"")+p+v;case dc:return""}}(s,o)}),"")},i="",o=0;o1&&o=0&&(e=e.replace("!",""),l=!0),e.indexOf("@")>=0&&(e=e.replace("@",""),u=!0),(a||c||u)&&(i=a||s?""+t:"",o=""+n),u&&(t=i=i.toLowerCase(),n=o=o.toLowerCase()),e){case"*=":r=i.indexOf(o)>=0;break;case"$=":r=i.indexOf(o,i.length-o.length)>=0;break;case"^=":r=0===i.indexOf(o);break;case"=":r=t===n;break;case">":h=!0,r=t>n;break;case">=":h=!0,r=t>=n;break;case"<":h=!0,r=t0;){var u=i.shift();e(u),o.add(u.id()),a&&r(i,o,u)}return t}function Pc(t,e,n){if(n.isParent())for(var r=n._private.children,i=0;i1&&void 0!==arguments[1])||arguments[1],Pc)},Mc.forEachUp=function(t){return Dc(this,t,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],Rc)},Mc.forEachUpAndDown=function(t){return Dc(this,t,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],jc)},Mc.ancestors=Mc.parents,(Ic=Lc={data:uc.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:uc.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:uc.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:uc.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:uc.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:uc.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var t=this[0];if(t)return t._private.data.id}}).attr=Ic.data,Ic.removeAttr=Ic.removeData;var Gc,Fc,Bc=Lc,Hc={};function Yc(t){return function(e){var n=this;if(void 0===e&&(e=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,i=n[0],o=i._private.edges,a=0;ae})),minIndegree:zc("indegree",(function(t,e){return te})),minOutdegree:zc("outdegree",(function(t,e){return te}))}),Tr(Hc,{totalDegree:function(t){for(var e=0,n=this.nodes(),r=0;r0,l=u;u&&(c=c[0]);var h=l?c.position():{x:0,y:0};return i={x:s.x-h.x,y:s.y-h.y},void 0===t?i:i[t]}for(var f=0;f0,v=p;p&&(g=g[0]);var b=v?g.position():{x:0,y:0};void 0!==e?d.position(t,e+b[t]):void 0!==i&&d.position({x:i.x+b.x,y:i.y+b.y})}}else if(!o)return;return this}},Gc.modelPosition=Gc.point=Gc.position,Gc.modelPositions=Gc.points=Gc.positions,Gc.renderedPoint=Gc.renderedPosition,Gc.relativePoint=Gc.relativePosition;var Xc,Wc,qc=Fc;Xc=Wc={},Wc.renderedBoundingBox=function(t){var e=this.boundingBox(t),n=this.cy(),r=n.zoom(),i=n.pan(),o=e.x1*r+i.x,a=e.x2*r+i.x,s=e.y1*r+i.y,c=e.y2*r+i.y;return{x1:o,x2:a,y1:s,y2:c,w:a-o,h:c-s}},Wc.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.cy();return e.styleEnabled()&&e.hasCompoundNodes()?(this.forEachUp((function(e){if(e.isParent()){var n=e._private;n.compoundBoundsClean=!1,n.bbCache=null,t||e.emitAndNotify("bounds")}})),this):this},Wc.updateCompoundBounds=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function n(t){if(t.isParent()){var e=t._private,n=t.children(),r="include"===t.pstyle("compound-sizing-wrt-labels").value,i={width:{val:t.pstyle("min-width").pfValue,left:t.pstyle("min-width-bias-left"),right:t.pstyle("min-width-bias-right")},height:{val:t.pstyle("min-height").pfValue,top:t.pstyle("min-height-bias-top"),bottom:t.pstyle("min-height-bias-bottom")}},o=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),a=e.position;0!==o.w&&0!==o.h||((o={w:t.pstyle("width").pfValue,h:t.pstyle("height").pfValue}).x1=a.x-o.w/2,o.x2=a.x+o.w/2,o.y1=a.y-o.h/2,o.y2=a.y+o.h/2);var s=i.width.left.value;"px"===i.width.left.units&&i.width.val>0&&(s=100*s/i.width.val);var c=i.width.right.value;"px"===i.width.right.units&&i.width.val>0&&(c=100*c/i.width.val);var u=i.height.top.value;"px"===i.height.top.units&&i.height.val>0&&(u=100*u/i.height.val);var l=i.height.bottom.value;"px"===i.height.bottom.units&&i.height.val>0&&(l=100*l/i.height.val);var h=b(i.width.val-o.w,s,c),f=h.biasDiff,d=h.biasComplementDiff,g=b(i.height.val-o.h,u,l),p=g.biasDiff,v=g.biasComplementDiff;e.autoPadding=function(t,e,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return t>0?n.pfValue*t:0;case"height":return e>0?n.pfValue*e:0;case"average":return t>0&&e>0?n.pfValue*(t+e)/2:0;case"min":return t>0&&e>0?t>e?n.pfValue*e:n.pfValue*t:0;case"max":return t>0&&e>0?t>e?n.pfValue*t:n.pfValue*e:0;default:return 0}}(o.w,o.h,t.pstyle("padding"),t.pstyle("padding-relative-to").value),e.autoWidth=Math.max(o.w,i.width.val),a.x=(-f+o.x1+o.x2+d)/2,e.autoHeight=Math.max(o.h,i.height.val),a.y=(-p+o.y1+o.y2+v)/2}function b(t,e,n){var r=0,i=0,o=e+n;return t>0&&o>0&&(r=e/o*t,i=n/o*t),{biasDiff:r,biasComplementDiff:i}}}for(var r=0;rt.x2?r:t.x2,t.y1=nt.y2?i:t.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1)},Kc=function(t,e){return null==e?t:$c(t,e.x1,e.y1,e.x2,e.y2)},Qc=function(t,e,n){return Ri(t,e,n)},Jc=function(t,e,n){if(!e.cy().headless()){var r,i,o=e._private,a=o.rstyle,s=a.arrowWidth/2;if("none"!==e.pstyle(n+"-arrow-shape").value){"source"===n?(r=a.srcX,i=a.srcY):"target"===n?(r=a.tgtX,i=a.tgtY):(r=a.midX,i=a.midY);var c=o.arrowBounds=o.arrowBounds||{},u=c[n]=c[n]||{};u.x1=r-s,u.y1=i-s,u.x2=r+s,u.y2=i+s,u.w=u.x2-u.x1,u.h=u.y2-u.y1,Eo(u,1),$c(t,u.x1,u.y1,u.x2,u.y2)}}},tu=function(t,e,n){if(!e.cy().headless()){var r;r=n?n+"-":"";var i=e._private,o=i.rstyle;if(e.pstyle(r+"label").strValue){var a,s,c,u,l=e.pstyle("text-halign"),h=e.pstyle("text-valign"),f=Qc(o,"labelWidth",n),d=Qc(o,"labelHeight",n),g=Qc(o,"labelX",n),p=Qc(o,"labelY",n),v=e.pstyle(r+"text-margin-x").pfValue,b=e.pstyle(r+"text-margin-y").pfValue,y=e.isEdge(),w=e.pstyle(r+"text-rotation"),m=e.pstyle("text-outline-width").pfValue,x=e.pstyle("text-border-width").pfValue/2,E=e.pstyle("text-background-padding").pfValue,_=d,k=f,N=k/2,C=_/2;if(y)a=g-N,s=g+N,c=p-C,u=p+C;else{switch(l.value){case"left":a=g-k,s=g;break;case"center":a=g-N,s=g+N;break;case"right":a=g,s=g+k}switch(h.value){case"top":c=p-_,u=p;break;case"center":c=p-C,u=p+C;break;case"bottom":c=p,u=p+_}}a+=v-Math.max(m,x)-E-2,s+=v+Math.max(m,x)+E+2,c+=b-Math.max(m,x)-E-2,u+=b+Math.max(m,x)+E+2;var T=n||"main",A=i.labelBounds,O=A[T]=A[T]||{};O.x1=a,O.y1=c,O.x2=s,O.y2=u,O.w=s-a,O.h=u-c;var I=y&&"autorotate"===w.strValue,L=null!=w.pfValue&&0!==w.pfValue;if(I||L){var S=I?Qc(i.rstyle,"labelAngle",n):w.pfValue,M=Math.cos(S),D=Math.sin(S),P=(a+s)/2,R=(c+u)/2;if(!y){switch(l.value){case"left":P=s;break;case"right":P=a}switch(h.value){case"top":R=u;break;case"bottom":R=c}}var j=function(t,e){return{x:(t-=P)*M-(e-=R)*D+P,y:t*D+e*M+R}},G=j(a,c),F=j(a,u),B=j(s,c),H=j(s,u);a=Math.min(G.x,F.x,B.x,H.x),s=Math.max(G.x,F.x,B.x,H.x),c=Math.min(G.y,F.y,B.y,H.y),u=Math.max(G.y,F.y,B.y,H.y)}var Y=T+"Rot",z=A[Y]=A[Y]||{};z.x1=a,z.y1=c,z.x2=s,z.y2=u,z.w=s-a,z.h=u-c,$c(t,a,c,s,u),$c(i.labelBounds.all,a,c,s,u)}return t}},eu=function(t){var e=0,n=function(t){return(t?1:0)<0&&o>0){var a=e.pstyle("outline-offset").value,s=e.pstyle("shape").value,c=o+a,u=(t.w+2*c)/t.w,l=(t.h+2*c)/t.h,h=0;["diamond","pentagon","round-triangle"].includes(s)?(u=(t.w+2.4*c)/t.w,h=-c/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(s)?u=(t.w+2.4*c)/t.w:"star"===s?(u=(t.w+2.8*c)/t.w,l=(t.h+2.6*c)/t.h,h=-c/3.8):"triangle"===s?(u=(t.w+2.8*c)/t.w,l=(t.h+2.4*c)/t.h,h=-c/1.4):"vee"===s&&(u=(t.w+4.4*c)/t.w,l=(t.h+3.8*c)/t.h,h=.5*-c);var f=t.h*l-t.h,d=t.w*u-t.w;if(_o(t,[Math.ceil(f/2),Math.ceil(d/2)]),0!==h){var g=(r=h,{x1:(n=t).x1+0,x2:n.x2+0,y1:n.y1+r,y2:n.y2+r,w:n.w,h:n.h});mo(t,g)}}}}(f,t)}else if(p&&e.includeEdges)if(l&&!h){var T=t.pstyle("curve-style").strValue;if(n=Math.min(v.srcX,v.midX,v.tgtX),r=Math.max(v.srcX,v.midX,v.tgtX),i=Math.min(v.srcY,v.midY,v.tgtY),o=Math.max(v.srcY,v.midY,v.tgtY),$c(f,n-=_,i-=_,r+=_,o+=_),"haystack"===T){var A=v.haystackPts;if(A&&2===A.length){if(n=A[0].x,i=A[0].y,n>(r=A[1].x)){var O=n;n=r,r=O}if(i>(o=A[1].y)){var I=i;i=o,o=I}$c(f,n-_,i-_,r+_,o+_)}}else if("bezier"===T||"unbundled-bezier"===T||T.endsWith("segments")||T.endsWith("taxi")){var L;switch(T){case"bezier":case"unbundled-bezier":L=v.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":L=v.linePts}if(null!=L)for(var S=0;S(r=P.x)){var R=n;n=r,r=R}if((i=D.y)>(o=P.y)){var j=i;i=o,o=j}$c(f,n-=_,i-=_,r+=_,o+=_)}if(l&&e.includeEdges&&p&&(Jc(f,t,"mid-source"),Jc(f,t,"mid-target"),Jc(f,t,"source"),Jc(f,t,"target")),l&&"yes"===t.pstyle("ghost").value){var G=t.pstyle("ghost-offset-x").pfValue,F=t.pstyle("ghost-offset-y").pfValue;$c(f,f.x1+G,f.y1+F,f.x2+G,f.y2+F)}var B=d.bodyBounds=d.bodyBounds||{};ko(B,f),_o(B,b),Eo(B,1),l&&(n=f.x1,r=f.x2,i=f.y1,o=f.y2,$c(f,n-E,i-E,r+E,o+E));var H=d.overlayBounds=d.overlayBounds||{};ko(H,f),_o(H,b),Eo(H,1);var Y=d.labelBounds=d.labelBounds||{};null!=Y.all?((c=Y.all).x1=1/0,c.y1=1/0,c.x2=-1/0,c.y2=-1/0,c.w=0,c.h=0):Y.all=wo(),l&&e.includeLabels&&(e.includeMainLabels&&tu(f,t,null),p&&(e.includeSourceLabels&&tu(f,t,"source"),e.includeTargetLabels&&tu(f,t,"target")))}return f.x1=Zc(f.x1),f.y1=Zc(f.y1),f.x2=Zc(f.x2),f.y2=Zc(f.y2),f.w=Zc(f.x2-f.x1),f.h=Zc(f.y2-f.y1),f.w>0&&f.h>0&&w&&(_o(f,b),Eo(f,1)),f}(t,iu),r.bbCache=n,r.bbCachePosKey=a):n=r.bbCache,!o){var l=t.isNode();n=wo(),(e.includeNodes&&l||e.includeEdges&&!l)&&(e.includeOverlays?Kc(n,r.overlayBounds):Kc(n,r.bodyBounds)),e.includeLabels&&(e.includeMainLabels&&(!i||e.includeSourceLabels&&e.includeTargetLabels)?Kc(n,r.labelBounds.all):(e.includeMainLabels&&Kc(n,r.labelBounds.mainRot),e.includeSourceLabels&&Kc(n,r.labelBounds.sourceRot),e.includeTargetLabels&&Kc(n,r.labelBounds.targetRot))),n.w=n.x2-n.x1,n.h=n.y2-n.y1}return n},iu={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},ou=eu(iu),au=Mi(iu);Wc.boundingBox=function(t){var e;if(1!==this.length||null==this[0]._private.bbCache||this[0]._private.styleDirty||void 0!==t&&void 0!==t.useCache&&!0!==t.useCache){e=wo();var n=au(t=t||iu),r=this;if(r.cy().styleEnabled())for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:xu,e=arguments.length>1?arguments[1]:void 0,n=0;n=0;s--)a(s);return this},_u.removeAllListeners=function(){return this.removeListener("*")},_u.emit=_u.trigger=function(t,e,n){var r=this.listeners,i=r.length;return this.emitting++,or(e)||(e=[e]),function(t,e,n){if("event"!==nr(n))if(ar(n))e(t,Nu(t,n));else for(var r=or(n)?n:n.split(/\s+/),i=0;i1&&!r){var i=this.length-1,o=this[i],a=o._private.data.id;this[i]=void 0,this[t]=o,n.set(a,{ele:o,index:t})}return this.length--,this},unmergeOne:function(t){t=t[0];var e=this._private,n=t._private.data.id,r=e.map.get(n);if(!r)return this;var i=r.index;return this.unmergeAt(i),this},unmerge:function(t){var e=this._private.cy;if(!t)return this;if(t&&rr(t)){var n=t;t=e.mutableElements().filter(n)}for(var r=0;r=0;e--)t(this[e])&&this.unmergeAt(e);return this},map:function(t,e){for(var n=[],r=this,i=0;ir&&(r=s,n=a)}return{value:r,ele:n}},min:function(t,e){for(var n,r=1/0,i=this,o=0;o=0&&i1&&void 0!==arguments[1])||arguments[1],n=this[0],r=n.cy();if(r.styleEnabled()&&n){this.cleanStyle();var i=n._private.style[t];return null!=i?i:e?r.style().getDefaultProperty(t):null}},numericStyle:function(t){var e=this[0];if(e.cy().styleEnabled()&&e){var n=e.pstyle(t);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(t){var e=this[0];if(e.cy().styleEnabled())return e?e.pstyle(t).units:void 0},renderedStyle:function(t){var e=this.cy();if(!e.styleEnabled())return this;var n=this[0];return n?e.style().getRenderedStyle(n,t):void 0},style:function(t,e){var n=this.cy();if(!n.styleEnabled())return this;var r=!1,i=n.style();if(ar(t)){var o=t;i.applyBypass(this,o,r),this.emitAndNotify("style")}else if(rr(t)){if(void 0===e){var a=this[0];return a?i.getStylePropertyValue(a,t):void 0}i.applyBypass(this,t,e,r),this.emitAndNotify("style")}else if(void 0===t){var s=this[0];return s?i.getRawStyle(s):void 0}return this},removeStyle:function(t){var e=this.cy();if(!e.styleEnabled())return this;var n=!1,r=e.style(),i=this;if(void 0===t)for(var o=0;o0&&e.push(l[0]),e.push(s[0])}return this.spawn(e,!0).filter(t)}),"neighborhood"),closedNeighborhood:function(t){return this.neighborhood().add(this).filter(t)},openNeighborhood:function(t){return this.neighborhood(t)}}),$u.neighbourhood=$u.neighborhood,$u.closedNeighbourhood=$u.closedNeighborhood,$u.openNeighbourhood=$u.openNeighborhood,Tr($u,{source:Sc((function(t){var e,n=this[0];return n&&(e=n._private.source||n.cy().collection()),e&&t?e.filter(t):e}),"source"),target:Sc((function(t){var e,n=this[0];return n&&(e=n._private.target||n.cy().collection()),e&&t?e.filter(t):e}),"target"),sources:tl({attr:"source"}),targets:tl({attr:"target"})}),Tr($u,{edgesWith:Sc(el(),"edgesWith"),edgesTo:Sc(el({thisIsSrc:!0}),"edgesTo")}),Tr($u,{connectedEdges:Sc((function(t){for(var e=[],n=0;n0);return o},component:function(){var t=this[0];return t.cy().mutableElements().components(t)[0]}}),$u.componentsOf=$u.components;var rl=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==t){var i=new Gi,o=!1;if(e){if(e.length>0&&ar(e[0])&&!lr(e[0])){o=!0;for(var a=[],s=new Bi,c=0,u=e.length;c0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this,o=i.cy(),a=o._private,s=[],c=[],u=0,l=i.length;u0){for(var D=t.length===i.length?i:new rl(o,t),P=0;P0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=[],i={},o=n._private.cy;function a(t){var n=i[t.id()];e&&t.removed()||n||(i[t.id()]=!0,t.isNode()?(r.push(t),function(t){for(var e=t._private.edges,n=0;n0&&(t?_.emitAndNotify("remove"):e&&_.emit("remove"));for(var k=0;k=.001?function(e,r){for(var i=0;i<4;++i){var o=f(r,t,n);if(0===o)return r;r-=(h(r,t,n)-e)/o}return r}(e,a):0===c?a:function(e,r,i){var o,a,s=0;do{(o=h(a=r+(i-r)/2,t,n)-e)>0?i=a:r=a}while(Math.abs(o)>1e-7&&++s<10);return a}(e,r,r+i)}(o),e,r)};g.getControlPoints=function(){return[{x:t,y:e},{x:n,y:r}]};var p="generateBezier("+[t,e,n,r]+")";return g.toString=function(){return p},g}var sl=function(){function t(t){return-t.tension*t.x-t.friction*t.v}function e(e,n,r){var i={x:e.x+r.dx*n,v:e.v+r.dv*n,tension:e.tension,friction:e.friction};return{dx:i.v,dv:t(i)}}function n(n,r){var i={dx:n.v,dv:t(n)},o=e(n,.5*r,i),a=e(n,.5*r,o),s=e(n,r,a),c=1/6*(i.dx+2*(o.dx+a.dx)+s.dx),u=1/6*(i.dv+2*(o.dv+a.dv)+s.dv);return n.x=n.x+c*r,n.v=n.v+u*r,n}return function t(e,r,i){var o,a,s,c={x:-1,v:0,tension:null,friction:null},u=[0],l=0,h=1e-4;for(e=parseFloat(e)||500,r=parseFloat(r)||20,i=i||null,c.tension=e,c.friction=r,a=(o=null!==i)?(l=t(e,r))/i*.016:.016;s=n(s||c,a),u.push(1+s.x),l+=16,Math.abs(s.x)>h&&Math.abs(s.v)>h;);return o?function(t){return u[t*(u.length-1)|0]}:l}}(),cl=function(t,e,n,r){var i=al(t,e,n,r);return function(t,e,n){return t+(e-t)*i(n)}},ul={linear:function(t,e,n){return t+(e-t)*n},ease:cl(.25,.1,.25,1),"ease-in":cl(.42,0,1,1),"ease-out":cl(0,0,.58,1),"ease-in-out":cl(.42,0,.58,1),"ease-in-sine":cl(.47,0,.745,.715),"ease-out-sine":cl(.39,.575,.565,1),"ease-in-out-sine":cl(.445,.05,.55,.95),"ease-in-quad":cl(.55,.085,.68,.53),"ease-out-quad":cl(.25,.46,.45,.94),"ease-in-out-quad":cl(.455,.03,.515,.955),"ease-in-cubic":cl(.55,.055,.675,.19),"ease-out-cubic":cl(.215,.61,.355,1),"ease-in-out-cubic":cl(.645,.045,.355,1),"ease-in-quart":cl(.895,.03,.685,.22),"ease-out-quart":cl(.165,.84,.44,1),"ease-in-out-quart":cl(.77,0,.175,1),"ease-in-quint":cl(.755,.05,.855,.06),"ease-out-quint":cl(.23,1,.32,1),"ease-in-out-quint":cl(.86,0,.07,1),"ease-in-expo":cl(.95,.05,.795,.035),"ease-out-expo":cl(.19,1,.22,1),"ease-in-out-expo":cl(1,0,0,1),"ease-in-circ":cl(.6,.04,.98,.335),"ease-out-circ":cl(.075,.82,.165,1),"ease-in-out-circ":cl(.785,.135,.15,.86),spring:function(t,e,n){if(0===n)return ul.linear;var r=sl(t,e,n);return function(t,e,n){return t+(e-t)*r(n)}},"cubic-bezier":cl};function ll(t,e,n,r,i){if(1===r)return n;if(e===n)return n;var o=i(e,n,r);return null==t||((t.roundValue||t.color)&&(o=Math.round(o)),void 0!==t.min&&(o=Math.max(o,t.min)),void 0!==t.max&&(o=Math.min(o,t.max))),o}function hl(t,e){return null!=t.pfValue||null!=t.value?null==t.pfValue||null!=e&&"%"===e.type.units?t.value:t.pfValue:t}function fl(t,e,n,r,i){var o=null!=i?i.type:null;n<0?n=0:n>1&&(n=1);var a=hl(t,i),s=hl(e,i);if(sr(a)&&sr(s))return ll(o,a,s,n,r);if(or(a)&&or(s)){for(var c=[],u=0;u0?("spring"===h&&f.push(a.duration),a.easingImpl=ul[h].apply(null,f)):a.easingImpl=ul[h]}var d,g=a.easingImpl;if(d=0===a.duration?1:(n-c)/a.duration,a.applying&&(d=a.progress),d<0?d=0:d>1&&(d=1),null==a.delay){var p=a.startPosition,v=a.position;if(v&&i&&!t.locked()){var b={};gl(p.x,v.x)&&(b.x=fl(p.x,v.x,d,g)),gl(p.y,v.y)&&(b.y=fl(p.y,v.y,d,g)),t.position(b)}var y=a.startPan,w=a.pan,m=o.pan,x=null!=w&&r;x&&(gl(y.x,w.x)&&(m.x=fl(y.x,w.x,d,g)),gl(y.y,w.y)&&(m.y=fl(y.y,w.y,d,g)),t.emit("pan"));var E=a.startZoom,_=a.zoom,k=null!=_&&r;k&&(gl(E,_)&&(o.zoom=yo(o.minZoom,fl(E,_,d,g),o.maxZoom)),t.emit("zoom")),(x||k)&&t.emit("viewport");var N=a.style;if(N&&N.length>0&&i){for(var C=0;C=0;e--)(0,t[e])();t.splice(0,t.length)},l=o.length-1;l>=0;l--){var h=o[l],f=h._private;f.stopped?(o.splice(l,1),f.hooked=!1,f.playing=!1,f.started=!1,u(f.frames)):(f.playing||f.applying)&&(f.playing&&f.applying&&(f.applying=!1),f.started||pl(0,h,t),dl(e,h,t,n),f.applying&&(f.applying=!1),u(f.frames),null!=f.step&&f.step(t),h.completed()&&(o.splice(l,1),f.hooked=!1,f.playing=!1,f.started=!1,u(f.completes)),s=!0)}return n||0!==o.length||0!==a.length||r.push(e),s}for(var o=!1,a=0;a0?e.notify("draw",n):e.notify("draw")),n.unmerge(r),e.emit("step")}var bl={animate:uc.animate(),animation:uc.animation(),animated:uc.animated(),clearQueue:uc.clearQueue(),delay:uc.delay(),delayAnimation:uc.delayAnimation(),stop:uc.stop(),addToAnimationPool:function(t){this.styleEnabled()&&this._private.aniEles.merge(t)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var t=this;if(t._private.animationsRunning=!0,t.styleEnabled()){var e=t.renderer();e&&e.beforeRender?e.beforeRender((function(e,n){vl(n,t)}),e.beforeRenderPriorities.animations):function e(){t._private.animationsRunning&&ai((function(n){vl(n,t),e()}))}()}}},yl={qualifierCompare:function(t,e){return null==t||null==e?null==t&&null==e:t.sameText(e)},eventMatches:function(t,e,n){var r=e.qualifier;return null==r||t!==n.target&&lr(n.target)&&r.matches(n.target)},addEventFields:function(t,e){e.cy=t,e.target=t},callbackContext:function(t,e,n){return null!=e.qualifier?n.target:t}},wl=function(t){return rr(t)?new Tc(t):t},ml={createEmitter:function(){var t=this._private;return t.emitter||(t.emitter=new Eu(yl,this)),this},emitter:function(){return this._private.emitter},on:function(t,e,n){return this.emitter().on(t,wl(e),n),this},removeListener:function(t,e,n){return this.emitter().removeListener(t,wl(e),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(t,e,n){return this.emitter().one(t,wl(e),n),this},once:function(t,e,n){return this.emitter().one(t,wl(e),n),this},emit:function(t,e){return this.emitter().emit(t,e),this},emitAndNotify:function(t,e){return this.emit(t),this.notify(t,e),this}};uc.eventAliasesOn(ml);var xl={png:function(t){return t=t||{},this._private.renderer.png(t)},jpg:function(t){var e=this._private.renderer;return(t=t||{}).bg=t.bg||"#fff",e.jpg(t)}};xl.jpeg=xl.jpg;var El={layout:function(t){var e=this;if(null!=t)if(null!=t.name){var n,r=t.name,i=e.extension("layout",r);if(null!=i)return n=rr(t.eles)?e.$(t.eles):null!=t.eles?t.eles:e.$(),new i(Tr({},t,{cy:e,eles:n}));Ci("No such layout `"+r+"` found. Did you forget to import it and `cytoscape.use()` it?")}else Ci("A `name` must be specified to make a layout");else Ci("Layout options must be specified to make a layout")}};El.createLayout=El.makeLayout=El.layout;var _l={notify:function(t,e){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[t]=n.batchNotifications[t]||this.collection();null!=e&&r.merge(e)}else if(n.notificationsEnabled){var i=this.renderer();!this.destroyed()&&i&&i.notify(t,e)}},notifications:function(t){var e=this._private;return void 0===t?e.notificationsEnabled:(e.notificationsEnabled=!!t,this)},noNotifications:function(t){this.notifications(!1),t(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var t=this._private;return null==t.batchCount&&(t.batchCount=0),0===t.batchCount&&(t.batchStyleEles=this.collection(),t.batchNotifications={}),t.batchCount++,this},endBatch:function(){var t=this._private;if(0===t.batchCount)return this;if(t.batchCount--,0===t.batchCount){t.batchStyleEles.updateStyle();var e=this.renderer();Object.keys(t.batchNotifications).forEach((function(n){var r=t.batchNotifications[n];r.empty()?e.notify(n):e.notify(n,r)}))}return this},batch:function(t){return this.startBatch(),t(),this.endBatch(),this},batchData:function(t){var e=this;return this.batch((function(){for(var n=Object.keys(t),r=0;r0;)e.removeChild(e.childNodes[0]);t._private.renderer=null,t.mutableElements().forEach((function(t){var e=t._private;e.rscratch={},e.rstyle={},e.animation.current=[],e.animation.queue=[]}))},onRender:function(t){return this.on("render",t)},offRender:function(t){return this.off("render",t)}};Nl.invalidateDimensions=Nl.resize;var Cl={collection:function(t,e){return rr(t)?this.$(t):ur(t)?t.collection():or(t)?(e||(e={}),new rl(this,t,e.unique,e.removed)):new rl(this)},nodes:function(t){var e=this.$((function(t){return t.isNode()}));return t?e.filter(t):e},edges:function(t){var e=this.$((function(t){return t.isEdge()}));return t?e.filter(t):e},$:function(t){var e=this._private.elements;return t?e.filter(t):e.spawnSelf()},mutableElements:function(){return this._private.elements}};Cl.elements=Cl.filter=Cl.$;var Tl={},Al="t";Tl.apply=function(t){for(var e=this,n=e._private.cy.collection(),r=0;r0;if(f||h&&d){var g=void 0;f&&d||f?g=u.properties:d&&(g=u.mappedProperties);for(var p=0;p1&&(v=1),s.color){var x=i.valueMin[0],E=i.valueMax[0],_=i.valueMin[1],k=i.valueMax[1],N=i.valueMin[2],C=i.valueMax[2],T=null==i.valueMin[3]?1:i.valueMin[3],A=null==i.valueMax[3]?1:i.valueMax[3],O=[Math.round(x+(E-x)*v),Math.round(_+(k-_)*v),Math.round(N+(C-N)*v),Math.round(T+(A-T)*v)];n={bypass:i.bypass,name:i.name,value:O,strValue:"rgb("+O[0]+", "+O[1]+", "+O[2]+")"}}else{if(!s.number)return!1;var I=i.valueMin+(i.valueMax-i.valueMin)*v;n=this.parse(i.name,I,i.bypass,f)}if(!n)return p(),!1;n.mapping=i,i=n;break;case a.data:for(var L=i.field.split("."),S=h.data,M=0;M0&&o>0){for(var s={},c=!1,u=0;u0?t.delayAnimation(a).play().promise().then(e):e()})).then((function(){return t.animation({style:s,duration:o,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()})).then((function(){n.removeBypasses(t,i),t.emitAndNotify("style"),r.transitioning=!1}))}else r.transitioning&&(this.removeBypasses(t,i),t.emitAndNotify("style"),r.transitioning=!1)},Tl.checkTrigger=function(t,e,n,r,i,o){var a=this.properties[e],s=i(a);null!=s&&s(n,r)&&o(a)},Tl.checkZOrderTrigger=function(t,e,n,r){var i=this;this.checkTrigger(t,e,n,r,(function(t){return t.triggersZOrder}),(function(){i._private.cy.notify("zorder",t)}))},Tl.checkBoundsTrigger=function(t,e,n,r){this.checkTrigger(t,e,n,r,(function(t){return t.triggersBounds}),(function(i){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache(),!i.triggersBoundsOfParallelBeziers||"curve-style"!==e||"bezier"!==n&&"bezier"!==r||t.parallelEdges().forEach((function(t){t.isBundledBezier()&&t.dirtyBoundingBoxCache()})),!i.triggersBoundsOfConnectedEdges||"display"!==e||"none"!==n&&"none"!==r||t.connectedEdges().forEach((function(t){t.dirtyBoundingBoxCache()}))}))},Tl.checkTriggers=function(t,e,n,r){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,n,r),this.checkBoundsTrigger(t,e,n,r)};var Ol={applyBypass:function(t,e,n,r){var i=[];if("*"===e||"**"===e){if(void 0!==n)for(var o=0;oe.length?o.substr(e.length):""}function s(){n=n.length>r.length?n.substr(r.length):""}for(o=o.replace(/[/][*](\s|.)+?[*][/]/g,"");!o.match(/^\s*$/);){var c=o.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!c){Ai("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+o);break}e=c[0];var u=c[1];if("core"!==u&&new Tc(u).invalid)Ai("Skipping parsing of block: Invalid selector found in string stylesheet: "+u),a();else{var l=c[2],h=!1;n=l;for(var f=[];!n.match(/^\s*$/);){var d=n.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!d){Ai("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+l),h=!0;break}r=d[0];var g=d[1],p=d[2];this.properties[g]?i.parse(g,p)?(f.push({name:g,val:p}),s()):(Ai("Skipping property: Invalid property definition in: "+r),s()):(Ai("Skipping property: Invalid property name in: "+r),s())}if(h){a();break}i.selector(u);for(var v=0;v=7&&"d"===e[0]&&(u=new RegExp(s.data.regex).exec(e))){if(n)return!1;var f=s.data;return{name:t,value:u,strValue:""+e,mapped:f,field:u[1],bypass:n}}if(e.length>=10&&"m"===e[0]&&(l=new RegExp(s.mapData.regex).exec(e))){if(n)return!1;if(h.multiple)return!1;var d=s.mapData;if(!h.color&&!h.number)return!1;var g=this.parse(t,l[4]);if(!g||g.mapped)return!1;var p=this.parse(t,l[5]);if(!p||p.mapped)return!1;if(g.pfValue===p.pfValue||g.strValue===p.strValue)return Ai("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+g.strValue+"`"),this.parse(t,g.strValue);if(h.color){var v=g.value,b=p.value;if(!(v[0]!==b[0]||v[1]!==b[1]||v[2]!==b[2]||v[3]!==b[3]&&(null!=v[3]&&1!==v[3]||null!=b[3]&&1!==b[3])))return!1}return{name:t,value:l,strValue:""+e,mapped:d,field:l[1],fieldMin:parseFloat(l[2]),fieldMax:parseFloat(l[3]),valueMin:g.value,valueMax:p.value,bypass:n}}}if(h.multiple&&"multiple"!==r){var y;if(y=c?e.split(/\s+/):or(e)?e:[e],h.evenMultiple&&y.length%2!=0)return null;for(var w=[],m=[],x=[],E="",_=!1,k=0;k0?" ":"")+N.strValue}return h.validate&&!h.validate(w,m)?null:h.singleEnum&&_?1===w.length&&rr(w[0])?{name:t,value:w[0],strValue:w[0],bypass:n}:null:{name:t,value:w,pfValue:x,strValue:E,bypass:n,units:m}}var C,T,A,O=function(){for(var r=0;rh.max||h.strictMax&&e===h.max))return null;var D={name:t,value:e,strValue:""+e+(I||""),units:I,bypass:n};return h.unitless||"px"!==I&&"em"!==I?D.pfValue=e:D.pfValue="px"!==I&&I?this.getEmSizeInPixels()*e:e,"ms"!==I&&"s"!==I||(D.pfValue="ms"===I?e:1e3*e),"deg"!==I&&"rad"!==I||(D.pfValue="rad"===I?e:(C=e,Math.PI*C/180)),"%"===I&&(D.pfValue=e/100),D}if(h.propList){var P=[],R=""+e;if("none"===R);else{for(var j=R.split(/\s*,\s*|\s+/),G=0;G255)return;e.push(Math.floor(o))}var a=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(a&&!s)return;var c=n[4];if(void 0!==c){if((c=parseFloat(c))<0||c>1)return;e.push(c)}}return e}(A)||function(t){var e,n,r,i,o,a,s,c;function u(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var l=new RegExp("^"+kr+"$").exec(t);if(l){if((n=parseInt(l[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(r=parseFloat(l[2]))<0||r>100)return;if(r/=100,(i=parseFloat(l[3]))<0||i>100)return;if(i/=100,void 0!==(o=l[4])&&((o=parseFloat(o))<0||o>1))return;if(0===r)a=s=c=Math.round(255*i);else{var h=i<.5?i*(1+r):i+r-i*r,f=2*i-h;a=Math.round(255*u(f,h,n+1/3)),s=Math.round(255*u(f,h,n)),c=Math.round(255*u(f,h,n-1/3))}e=[a,s,c,o]}return e}(A);return B?{name:t,value:B,pfValue:B,strValue:"rgb("+B[0]+","+B[1]+","+B[2]+")",bypass:n}:null}if(h.regex||h.regexes){if(h.enums){var H=O();if(H)return H}for(var Y=h.regexes?h.regexes:[h.regex],z=0;z0&&c>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:a=(a=(a=Math.min((s-2*e)/n.w,(c-2*e)/n.h))>this._private.maxZoom?this._private.maxZoom:a)=n.minZoom&&(n.maxZoom=e),this},minZoom:function(t){return void 0===t?this._private.minZoom:this.zoomRange({min:t})},maxZoom:function(t){return void 0===t?this._private.maxZoom:this.zoomRange({max:t})},getZoomedViewport:function(t){var e,n,r=this._private,i=r.pan,o=r.zoom,a=!1;if(r.zoomingEnabled||(a=!0),sr(t)?n=t:ar(t)&&(n=t.level,null!=t.position?e=ao(t.position,o,i):null!=t.renderedPosition&&(e=t.renderedPosition),null==e||r.panningEnabled||(a=!0)),n=(n=n>r.maxZoom?r.maxZoom:n)e.maxZoom||!e.zoomingEnabled?o=!0:(e.zoom=s,i.push("zoom"))}if(r&&(!o||!t.cancelOnFailedZoom)&&e.panningEnabled){var c=t.pan;sr(c.x)&&(e.pan.x=c.x,a=!1),sr(c.y)&&(e.pan.y=c.y,a=!1),a||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(t){var e=this.getCenterPan(t);return e&&(this._private.pan=e,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(t,e){if(this._private.panningEnabled){if(rr(t)){var n=t;t=this.mutableElements().filter(n)}else ur(t)||(t=this.mutableElements());if(0!==t.length){var r=t.boundingBox(),i=this.width(),o=this.height();return{x:(i-(e=void 0===e?this._private.zoom:e)*(r.x1+r.x2))/2,y:(o-e*(r.y1+r.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var t,e,n=this._private,r=n.container;return n.sizeCache=n.sizeCache||(r?(t=this.window().getComputedStyle(r),e=function(e){return parseFloat(t.getPropertyValue(e))},{width:r.clientWidth-e("padding-left")-e("padding-right"),height:r.clientHeight-e("padding-top")-e("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var t=this._private.pan,e=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-t.x)/e,x2:(n.x2-t.x)/e,y1:(n.y1-t.y)/e,y2:(n.y2-t.y)/e};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var t=this.width(),e=this.height();return{x1:0,y1:0,x2:t,y2:e,w:t,h:e}},multiClickDebounceTime:function(t){return t?(this._private.multiClickDebounceTime=t,this):this._private.multiClickDebounceTime}};Fl.centre=Fl.center,Fl.autolockNodes=Fl.autolock,Fl.autoungrabifyNodes=Fl.autoungrabify;var Bl={data:uc.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:uc.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:uc.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:uc.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Bl.attr=Bl.data,Bl.removeAttr=Bl.removeData;var Hl=function(t){var e=this,n=(t=Tr({},t)).container;n&&!cr(n)&&cr(n[0])&&(n=n[0]);var r=n?n._cyreg:null;(r=r||{})&&r.cy&&(r.cy.destroy(),r={});var i=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=e;var o=void 0!==$n&&void 0!==n&&!t.headless,a=t;a.layout=Tr({name:o?"grid":"null"},a.layout),a.renderer=Tr({name:o?"canvas":"null"},a.renderer);var s=function(t,e,n){return void 0!==e?e:void 0!==n?n:t},c=this._private={container:n,ready:!1,options:a,elements:new rl(this),listeners:[],aniEles:new rl(this),data:a.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,a.zoomingEnabled),userZoomingEnabled:s(!0,a.userZoomingEnabled),panningEnabled:s(!0,a.panningEnabled),userPanningEnabled:s(!0,a.userPanningEnabled),boxSelectionEnabled:s(!0,a.boxSelectionEnabled),autolock:s(!1,a.autolock,a.autolockNodes),autoungrabify:s(!1,a.autoungrabify,a.autoungrabifyNodes),autounselectify:s(!1,a.autounselectify),styleEnabled:void 0===a.styleEnabled?o:a.styleEnabled,zoom:sr(a.zoom)?a.zoom:1,pan:{x:ar(a.pan)&&sr(a.pan.x)?a.pan.x:0,y:ar(a.pan)&&sr(a.pan.y)?a.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,a.multiClickDebounceTime)};this.createEmitter(),this.selectionType(a.selectionType),this.zoomRange({min:a.minZoom,max:a.maxZoom}),c.styleEnabled&&e.setStyle([]);var u=Tr({},a,a.renderer);e.initRenderer(u),function(t,e){if(t.some(pr))return ss.all(t).then(e);e(t)}([a.style,a.elements],(function(t){var n=t[0],o=t[1];c.styleEnabled&&e.style().append(n),function(t,n,r){e.notifications(!1);var i=e.mutableElements();i.length>0&&i.remove(),null!=t&&(ar(t)||or(t))&&e.add(t),e.one("layoutready",(function(t){e.notifications(!0),e.emit(t),e.one("load",n),e.emitAndNotify("load")})).one("layoutstop",(function(){e.one("done",r),e.emit("done")}));var o=Tr({},e._private.options.layout);o.eles=e.elements(),e.layout(o).run()}(o,(function(){e.startAnimationLoop(),c.ready=!0,ir(a.ready)&&e.on("ready",a.ready);for(var t=0;t0,u=wo(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(ur(n.roots))t=n.roots;else if(or(n.roots)){for(var l=[],h=0;h0;){var O=C.shift(),I=N(O,T);if(I)O.outgoers().filter((function(t){return t.isNode()&&i.has(t)})).forEach(A);else if(null===I){Ai("Detected double maximal shift for node `"+O.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}k();var L=0;if(n.avoidOverlap)for(var S=0;S0&&b[0].length<=3?c/2:0),h=2*Math.PI/b[r].length*i;return 0===r&&1===b[0].length&&(l=1),{x:V+l*Math.cos(h),y:U+l*Math.sin(h)}}return{x:V+(i+1-(o+1)/2)*a,y:(r+1)*s}})),this};var ql={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function Zl(t){this.options=Tr({},ql,t)}Zl.prototype.run=function(){var t=this.options,e=t,n=t.cy,r=e.eles,i=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise,o=r.nodes().not(":parent");e.sort&&(o=o.sort(e.sort));for(var a,s=wo(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),c=s.x1+s.w/2,u=s.y1+s.h/2,l=(void 0===e.sweep?2*Math.PI-2*Math.PI/o.length:e.sweep)/Math.max(1,o.length-1),h=0,f=0;f1&&e.avoidOverlap){h*=1.75;var v=Math.cos(l)-Math.cos(0),b=Math.sin(l)-Math.sin(0),y=Math.sqrt(h*h/(v*v+b*b));a=Math.max(y,a)}return r.nodes().layoutPositions(this,e,(function(t,n){var r=e.startAngle+n*l*(i?1:-1),o=a*Math.cos(r),s=a*Math.sin(r);return{x:c+o,y:u+s}})),this};var $l,Kl={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(t){return t.degree()},levelWidth:function(t){return t.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function Ql(t){this.options=Tr({},Kl,t)}Ql.prototype.run=function(){for(var t=this.options,e=t,n=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise,r=t.cy,i=e.eles,o=i.nodes().not(":parent"),a=wo(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s=a.x1+a.w/2,c=a.y1+a.h/2,u=[],l=0,h=0;h0&&Math.abs(y[0].value-m.value)>=v&&(y=[],b.push(y)),y.push(m)}var x=l+e.minNodeSpacing;if(!e.avoidOverlap){var E=b.length>0&&b[0].length>1,_=(Math.min(a.w,a.h)/2-x)/(b.length+E?1:0);x=Math.min(x,_)}for(var k=0,N=0;N1&&e.avoidOverlap){var O=Math.cos(A)-Math.cos(0),I=Math.sin(A)-Math.sin(0),L=Math.sqrt(x*x/(O*O+I*I));k=Math.max(L,k)}C.r=k,k+=x}if(e.equidistant){for(var S=0,M=0,D=0;D=t.numIter||(sh(r,t),r.temperature=r.temperature*t.coolingFactor,r.temperature=t.animationThreshold&&o(),ai(e)):(wh(r,t),s())}();else{for(;u;)u=a(c),c++;wh(r,t),s()}return this},th.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},th.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var eh=function(t,e,n){for(var r=n.eles.edges(),i=n.eles.nodes(),o=wo(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),a={isCompound:t.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:o.w,clientHeight:o.h,boundingBox:o},s=n.eles.components(),c={},u=0;u0)for(a.graphSet.push(x),u=0;ur.count?0:r.graph},rh=function t(e,n,r,i){var o=i.graphSet[r];if(-10)var s=(u=r.nodeOverlap*a)*i/(p=Math.sqrt(i*i+o*o)),c=u*o/p;else{var u,l=fh(t,i,o),h=fh(e,-1*i,-1*o),f=h.x-l.x,d=h.y-l.y,g=f*f+d*d,p=Math.sqrt(g);s=(u=(t.nodeRepulsion+e.nodeRepulsion)/g)*f/p,c=u*d/p}t.isLocked||(t.offsetX-=s,t.offsetY-=c),e.isLocked||(e.offsetX+=s,e.offsetY+=c)}},hh=function(t,e,n,r){if(n>0)var i=t.maxX-e.minX;else i=e.maxX-t.minX;if(r>0)var o=t.maxY-e.minY;else o=e.maxY-t.minY;return i>=0&&o>=0?Math.sqrt(i*i+o*o):0},fh=function(t,e,n){var r=t.positionX,i=t.positionY,o=t.height||1,a=t.width||1,s=n/e,c=o/a,u={};return 0===e&&0n?(u.x=r,u.y=i+o/2,u):0e&&-1*c<=s&&s<=c?(u.x=r-a/2,u.y=i-a*n/2/e,u):0=c)?(u.x=r+o*e/2/n,u.y=i+o/2,u):0>n&&(s<=-1*c||s>=c)?(u.x=r-o*e/2/n,u.y=i-o/2,u):u},dh=function(t,e){for(var n=0;n1){var g=e.gravity*h/d,p=e.gravity*f/d;l.offsetX+=g,l.offsetY+=p}}}}},ph=function(t,e){var n=[],r=0,i=-1;for(n.push.apply(n,t.graphSet[0]),i+=t.graphSet[0].length;r<=i;){var o=n[r++],a=t.idToIndex[o],s=t.layoutNodes[a],c=s.children;if(0n)var i={x:n*t/r,y:n*e/r};else i={x:t,y:e};return i},yh=function t(e,n){var r=e.parentId;if(null!=r){var i=n.layoutNodes[n.idToIndex[r]],o=!1;return(null==i.maxX||e.maxX+i.padRight>i.maxX)&&(i.maxX=e.maxX+i.padRight,o=!0),(null==i.minX||e.minX-i.padLefti.maxY)&&(i.maxY=e.maxY+i.padBottom,o=!0),(null==i.minY||e.minY-i.padTopg&&(h+=d+e.componentSpacing,l=0,f=0,d=0)}}},mh={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(t){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function xh(t){this.options=Tr({},mh,t)}xh.prototype.run=function(){var t=this.options,e=t,n=t.cy,r=e.eles,i=r.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));var o=wo(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===o.h||0===o.w)r.nodes().layoutPositions(this,e,(function(t){return{x:o.x1,y:o.y1}}));else{var a=i.size(),s=Math.sqrt(a*o.h/o.w),c=Math.round(s),u=Math.round(o.w/o.h*s),l=function(t){if(null==t)return Math.min(c,u);Math.min(c,u)==c?c=t:u=t},h=function(t){if(null==t)return Math.max(c,u);Math.max(c,u)==c?c=t:u=t},f=e.rows,d=null!=e.cols?e.cols:e.columns;if(null!=f&&null!=d)c=f,u=d;else if(null!=f&&null==d)c=f,u=Math.ceil(a/c);else if(null==f&&null!=d)u=d,c=Math.ceil(a/u);else if(u*c>a){var g=l(),p=h();(g-1)*p>=a?l(g-1):(p-1)*g>=a&&h(p-1)}else for(;u*c=a?h(b+1):l(v+1)}var y=o.w/u,w=o.h/c;if(e.condense&&(y=0,w=0),e.avoidOverlap)for(var m=0;m=u&&(L=0,I++)},M={},D=0;D(r=So(t,e,m[x],m[x+1],m[x+2],m[x+3])))return v(n,r),!0}else if("bezier"===o.edgeType||"multibezier"===o.edgeType||"self"===o.edgeType||"compound"===o.edgeType)for(m=o.allpts,x=0;x+5(r=Lo(t,e,m[x],m[x+1],m[x+2],m[x+3],m[x+4],m[x+5])))return v(n,r),!0;y=y||i.source,w=w||i.target;var E=a.getArrowWidth(c,l),_=[{name:"source",x:o.arrowStartX,y:o.arrowStartY,angle:o.srcArrowAngle},{name:"target",x:o.arrowEndX,y:o.arrowEndY,angle:o.tgtArrowAngle},{name:"mid-source",x:o.midX,y:o.midY,angle:o.midsrcArrowAngle},{name:"mid-target",x:o.midX,y:o.midY,angle:o.midtgtArrowAngle}];for(x=0;x<_.length;x++){var k=_[x],N=s.arrowShapes[n.pstyle(k.name+"-arrow-shape").value],C=n.pstyle("width").pfValue;if(N.roughCollide(t,e,E,k.angle,{x:k.x,y:k.y},C,f)&&N.collide(t,e,E,k.angle,{x:k.x,y:k.y},C,f))return v(n),!0}h&&u.length>0&&(b(y),b(w))}function w(t,e,n){return Ri(t,e,n)}function m(n,r){var i,o=n._private,a=g;i=r?r+"-":"",n.boundingBox();var s=o.labelBounds[r||"main"],c=n.pstyle(i+"label").value;if("yes"===n.pstyle("text-events").strValue&&c){var u=w(o.rscratch,"labelX",r),l=w(o.rscratch,"labelY",r),h=w(o.rscratch,"labelAngle",r),f=n.pstyle(i+"text-margin-x").pfValue,d=n.pstyle(i+"text-margin-y").pfValue,p=s.x1-a-f,b=s.x2+a-f,y=s.y1-a-d,m=s.y2+a-d;if(h){var x=Math.cos(h),E=Math.sin(h),_=function(t,e){return{x:(t-=u)*x-(e-=l)*E+u,y:t*E+e*x+l}},k=_(p,y),N=_(p,m),C=_(b,y),T=_(b,m),A=[k.x+f,k.y+d,C.x+f,C.y+d,T.x+f,T.y+d,N.x+f,N.y+d];if(Mo(t,e,A))return v(n),!0}else if(Co(s,t,e))return v(n),!0}}n&&(c=c.interactive);for(var x=c.length-1;x>=0;x--){var E=c[x];E.isNode()?b(E)||m(E):y(E)||m(E)||m(E,"source")||m(E,"target")}return u},getAllInBox:function(t,e,n,r){for(var i,o,a=this.getCachedZSortedEles().interactive,s=[],c=Math.min(t,n),u=Math.max(t,n),l=Math.min(e,r),h=Math.max(e,r),f=wo({x1:t=c,y1:e=l,x2:n=u,y2:r=h}),d=0;d4&&void 0!==arguments[4])||arguments[4];return 0===r||0===e.radius?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(function(t,e,n,r,i){var o,a;if(t!==Kh?tf(e,t,Qh):((a=Qh).x=-1*(o=Jh).x,a.y=-1*o.y,a.nx=-1*o.nx,a.ny=-1*o.ny,a.ang=o.ang>0?-(Math.PI-o.ang):Math.PI+o.ang),tf(e,n,Jh),jh=Qh.nx*Jh.ny-Qh.ny*Jh.nx,Gh=Qh.nx*Jh.nx-Qh.ny*-Jh.ny,Hh=Math.asin(Math.max(-1,Math.min(1,jh))),Math.abs(Hh)<1e-6)return Ph=e.x,Rh=e.y,void(zh=Uh=0);Fh=1,Bh=!1,Gh<0?Hh<0?Hh=Math.PI+Hh:(Hh=Math.PI-Hh,Fh=-1,Bh=!0):Hh>0&&(Fh=-1,Bh=!0),Uh=void 0!==e.radius?e.radius:r,Yh=Hh/2,Xh=Math.min(Qh.len/2,Jh.len/2),i?(Vh=Math.abs(Math.cos(Yh)*Uh/Math.sin(Yh)))>Xh?(Vh=Xh,zh=Math.abs(Vh*Math.sin(Yh)/Math.cos(Yh))):zh=Uh:(Vh=Math.min(Xh,Uh),zh=Math.abs(Vh*Math.sin(Yh)/Math.cos(Yh))),Zh=e.x+Jh.nx*Vh,$h=e.y+Jh.ny*Vh,Ph=Zh-Jh.ny*zh*Fh,Rh=$h+Jh.nx*zh*Fh,Wh=e.x+Qh.nx*Vh,qh=e.y+Qh.ny*Vh,Kh=e}(t,e,n,r,i),{cx:Ph,cy:Rh,radius:zh,startX:Wh,startY:qh,stopX:Zh,stopY:$h,startAngle:Qh.ang+Math.PI/2*Fh,endAngle:Jh.ang-Math.PI/2*Fh,counterClockwise:Bh})}var rf={};function of(t){var e=[];if(null!=t){for(var n=0;n0?Math.max(t-e,0):Math.min(t+e,0)},T=C(k,E),A=C(N,_),O=!1;"auto"===v?p=Math.abs(T)>Math.abs(A)?i:r:v===c||v===s?(p=r,O=!0):v!==o&&v!==a||(p=i,O=!0);var I,L=p===r,S=L?A:T,M=L?N:k,D=ho(M),P=!1;O&&(y||m)||!(v===s&&M<0||v===c&&M>0||v===o&&M>0||v===a&&M<0)||(S=(D*=-1)*Math.abs(S),P=!0);var R=function(t){return Math.abs(t)=Math.abs(S)},j=R(I=y?(w<0?1+w:w)*S:(w<0?S:0)+w*D),G=R(Math.abs(S)-Math.abs(I));if(!j&&!G||P)if(L){var F=u.y1+I+(g?h/2*D:0),B=u.x1,H=u.x2;n.segpts=[B,F,H,F]}else{var Y=u.x1+I+(g?l/2*D:0),z=u.y1,V=u.y2;n.segpts=[Y,z,Y,V]}else if(L){var U=Math.abs(M)<=h/2,X=Math.abs(k)<=f/2;if(U){var W=(u.x1+u.x2)/2,q=u.y1,Z=u.y2;n.segpts=[W,q,W,Z]}else if(X){var $=(u.y1+u.y2)/2,K=u.x1,Q=u.x2;n.segpts=[K,$,Q,$]}else n.segpts=[u.x1,u.y2]}else{var J=Math.abs(M)<=l/2,tt=Math.abs(N)<=d/2;if(J){var et=(u.y1+u.y2)/2,nt=u.x1,rt=u.x2;n.segpts=[nt,et,rt,et]}else if(tt){var it=(u.x1+u.x2)/2,ot=u.y1,at=u.y2;n.segpts=[it,ot,it,at]}else n.segpts=[u.x2,u.y1]}if(n.isRound){var st=t.pstyle("taxi-radius").value,ct="arc-radius"===t.pstyle("radius-type").value[0];n.radii=new Array(n.segpts.length/2).fill(st),n.isArcRadius=new Array(n.segpts.length/2).fill(ct)}},rf.tryToCorrectInvalidPoints=function(t,e){var n=t._private.rscratch;if("bezier"===n.edgeType){var r=e.srcPos,i=e.tgtPos,o=e.srcW,a=e.srcH,s=e.tgtW,c=e.tgtH,u=e.srcShape,l=e.tgtShape,h=e.srcCornerRadius,f=e.tgtCornerRadius,d=e.srcRs,g=e.tgtRs,p=!sr(n.startX)||!sr(n.startY),v=!sr(n.arrowStartX)||!sr(n.arrowStartY),b=!sr(n.endX)||!sr(n.endY),y=!sr(n.arrowEndX)||!sr(n.arrowEndY),w=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,m=fo({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),x=mf.poolIndex()){var d=h;h=f,f=d}var g=s.srcPos=h.position(),p=s.tgtPos=f.position(),v=s.srcW=h.outerWidth(),b=s.srcH=h.outerHeight(),y=s.tgtW=f.outerWidth(),w=s.tgtH=f.outerHeight(),m=s.srcShape=n.nodeShapes[e.getNodeShape(h)],x=s.tgtShape=n.nodeShapes[e.getNodeShape(f)],E=s.srcCornerRadius="auto"===h.pstyle("corner-radius").value?"auto":h.pstyle("corner-radius").pfValue,_=s.tgtCornerRadius="auto"===f.pstyle("corner-radius").value?"auto":f.pstyle("corner-radius").pfValue,k=s.tgtRs=f._private.rscratch,N=s.srcRs=h._private.rscratch;s.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var C=0;C0){var U=u,X=go(U,co(e)),W=go(U,co(V)),q=X;W2&&go(U,{x:V[2],y:V[3]})0){var st=l,ct=go(st,co(e)),ut=go(st,co(at)),lt=ct;ut2&&go(st,{x:at[2],y:at[3]})=u||y){l={cp:p,segment:b};break}}if(l)break}var w=l.cp,m=l.segment,x=(u-f)/m.length,E=m.t1-m.t0,_=s?m.t0+E*x:m.t1-E*x;_=yo(0,_,1),e=bo(w.p0,w.p1,w.p2,_),i=function(t,e,n,r){var i=yo(0,r-.001,1),o=yo(0,r+.001,1),a=bo(t,e,n,i),s=bo(t,e,n,o);return hf(a,s)}(w.p0,w.p1,w.p2,_);break;case"straight":case"segments":case"haystack":for(var k,N,C,T,A=0,O=r.allpts.length,I=0;I+3=u));I+=2);var L=(u-N)/k;L=yo(0,L,1),e=function(t,e,n,r){var i=e.x-t.x,o=e.y-t.y,a=fo(t,e),s=i/a,c=o/a;return n=null==n?0:n,r=null!=r?r:n*a,{x:t.x+s*r,y:t.y+c*r}}(C,T,L),i=hf(C,T)}a("labelX",n,e.x),a("labelY",n,e.y),a("labelAutoAngle",n,i)}};u("source"),u("target"),this.applyLabelDimensions(t)}},uf.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))},uf.applyPrefixedLabelDimensions=function(t,e){var n=t._private,r=this.getLabelText(t,e),i=this.calculateLabelDimensions(t,r),o=t.pstyle("line-height").pfValue,a=t.pstyle("text-wrap").strValue,s=Ri(n.rscratch,"labelWrapCachedLines",e)||[],c="wrap"!==a?1:Math.max(s.length,1),u=i.height/c,l=u*o,h=i.width,f=i.height+(c-1)*(o-1)*u;ji(n.rstyle,"labelWidth",e,h),ji(n.rscratch,"labelWidth",e,h),ji(n.rstyle,"labelHeight",e,f),ji(n.rscratch,"labelHeight",e,f),ji(n.rscratch,"labelLineHeight",e,l)},uf.getLabelText=function(t,e){var n=t._private,r=e?e+"-":"",i=t.pstyle(r+"label").strValue,o=t.pstyle("text-transform").value,a=function(t,r){return r?(ji(n.rscratch,t,e,r),r):Ri(n.rscratch,t,e)};if(!i)return"";"none"==o||("uppercase"==o?i=i.toUpperCase():"lowercase"==o&&(i=i.toLowerCase()));var s=t.pstyle("text-wrap").value;if("wrap"===s){var c=a("labelKey");if(null!=c&&a("labelWrapKey")===c)return a("labelWrapCachedText");for(var u=i.split("\n"),l=t.pstyle("text-max-width").pfValue,h="anywhere"===t.pstyle("text-overflow-wrap").value,f=[],d=/[\s\u200b]+/,g=h?"":" ",p=0;pl){for(var w=v.split(d),m="",x=0;xk);T++)N+=i[T],T===i.length-1&&(C=!0);return C||(N+="…"),N}return i},uf.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,n=t.pstyle("text-halign").strValue;if("auto"!==e)return e;if(!t.isNode())return"center";switch(n){case"left":return"right";case"right":return"left";default:return"center"}},uf.calculateLabelDimensions=function(t,e){var n=pi(e,t._private.labelDimsKey),r=this.labelDimCache||(this.labelDimCache=[]),i=r[n];if(null!=i)return i;var o=t.pstyle("font-style").strValue,a=t.pstyle("font-size").pfValue,s=t.pstyle("font-family").strValue,c=t.pstyle("font-weight").strValue,u=this.labelCalcCanvas,l=this.labelCalcCanvasContext;if(!u){u=this.labelCalcCanvas=document.createElement("canvas"),l=this.labelCalcCanvasContext=u.getContext("2d");var h=u.style;h.position="absolute",h.left="-9999px",h.top="-9999px",h.zIndex="-1",h.visibility="hidden",h.pointerEvents="none"}l.font="".concat(o," ").concat(c," ").concat(a,"px ").concat(s);for(var f=0,d=0,g=e.split("\n"),p=0;p1&&void 0!==arguments[1])||arguments[1];if(e.merge(t),n)for(var r=0;r=t.desktopTapThreshold2}var C=i(e);v&&(t.hoverData.tapholdCancelled=!0),n=!0,r(p,["mousemove","vmousemove","tapdrag"],e,{x:l[0],y:l[1]});var T=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||a.emit({originalEvent:e,type:"boxstart",position:{x:l[0],y:l[1]}}),g[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()};if(3===t.hoverData.which){if(v){var A={originalEvent:e,type:"cxtdrag",position:{x:l[0],y:l[1]}};y?y.emit(A):a.emit(A),t.hoverData.cxtDragged=!0,t.hoverData.cxtOver&&p===t.hoverData.cxtOver||(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit({originalEvent:e,type:"cxtdragout",position:{x:l[0],y:l[1]}}),t.hoverData.cxtOver=p,p&&p.emit({originalEvent:e,type:"cxtdragover",position:{x:l[0],y:l[1]}}))}}else if(t.hoverData.dragging){if(n=!0,a.panningEnabled()&&a.userPanningEnabled()){var O;if(t.hoverData.justStartedPan){var I=t.hoverData.mdownPos;O={x:(l[0]-I[0])*s,y:(l[1]-I[1])*s},t.hoverData.justStartedPan=!1}else O={x:w[0]*s,y:w[1]*s};a.panBy(O),a.emit("dragpan"),t.hoverData.dragged=!0}l=t.projectIntoViewport(e.clientX,e.clientY)}else if(1!=g[4]||null!=y&&!y.pannable()){if(y&&y.pannable()&&y.active()&&y.unactivate(),y&&y.grabbed()||p==b||(b&&r(b,["mouseout","tapdragout"],e,{x:l[0],y:l[1]}),p&&r(p,["mouseover","tapdragover"],e,{x:l[0],y:l[1]}),t.hoverData.last=p),y)if(v){if(a.boxSelectionEnabled()&&C)y&&y.grabbed()&&(h(m),y.emit("freeon"),m.emit("free"),t.dragData.didDrag&&(y.emit("dragfreeon"),m.emit("dragfree"))),T();else if(y&&y.grabbed()&&t.nodeIsDraggable(y)){var L=!t.dragData.didDrag;L&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||u(m,{inDragLayer:!0});var S={x:0,y:0};if(sr(w[0])&&sr(w[1])&&(S.x+=w[0],S.y+=w[1],L)){var M=t.hoverData.dragDelta;M&&sr(M[0])&&sr(M[1])&&(S.x+=M[0],S.y+=M[1])}t.hoverData.draggingEles=!0,m.silentShift(S).emit("position drag"),t.redrawHint("drag",!0),t.redraw()}}else!function(){var e=t.hoverData.dragDelta=t.hoverData.dragDelta||[];0===e.length?(e.push(w[0]),e.push(w[1])):(e[0]+=w[0],e[1]+=w[1])}();n=!0}else v&&(t.hoverData.dragging||!a.boxSelectionEnabled()||!C&&a.panningEnabled()&&a.userPanningEnabled()?!t.hoverData.selecting&&a.panningEnabled()&&a.userPanningEnabled()&&o(y,t.hoverData.downs)&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,g[4]=0,t.data.bgActivePosistion=co(f),t.redrawHint("select",!0),t.redraw()):T(),y&&y.pannable()&&y.active()&&y.unactivate());return g[2]=l[0],g[3]=l[1],n?(e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),!1):void 0}}),!1),t.registerBinding(e,"mouseup",(function(e){if(t.hoverData.capture){t.hoverData.capture=!1;var o=t.cy,a=t.projectIntoViewport(e.clientX,e.clientY),s=t.selection,c=t.findNearestElement(a[0],a[1],!0,!1),u=t.dragData.possibleDragElements,l=t.hoverData.down,f=i(e);if(t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,l&&l.unactivate(),3===t.hoverData.which){var d={originalEvent:e,type:"cxttapend",position:{x:a[0],y:a[1]}};if(l?l.emit(d):o.emit(d),!t.hoverData.cxtDragged){var g={originalEvent:e,type:"cxttap",position:{x:a[0],y:a[1]}};l?l.emit(g):o.emit(g)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(1===t.hoverData.which){if(r(c,["mouseup","tapend","vmouseup"],e,{x:a[0],y:a[1]}),t.dragData.didDrag||t.hoverData.dragged||t.hoverData.selecting||t.hoverData.isOverThresholdDrag||(r(l,["click","tap","vclick"],e,{x:a[0],y:a[1]}),w=!1,e.timeStamp-m<=o.multiClickDebounceTime()?(y&&clearTimeout(y),w=!0,m=null,r(l,["dblclick","dbltap","vdblclick"],e,{x:a[0],y:a[1]})):(y=setTimeout((function(){w||r(l,["oneclick","onetap","voneclick"],e,{x:a[0],y:a[1]})}),o.multiClickDebounceTime()),m=e.timeStamp)),null!=l||t.dragData.didDrag||t.hoverData.selecting||t.hoverData.dragged||i(e)||(o.$(n).unselect(["tapunselect"]),u.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=u=o.collection()),c!=l||t.dragData.didDrag||t.hoverData.selecting||null!=c&&c._private.selectable&&(t.hoverData.dragging||("additive"===o.selectionType()||f?c.selected()?c.unselect(["tapunselect"]):c.select(["tapselect"]):f||(o.$(n).unmerge(c).unselect(["tapunselect"]),c.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var p=o.collection(t.getAllInBox(s[0],s[1],s[2],s[3]));t.redrawHint("select",!0),p.length>0&&t.redrawHint("eles",!0),o.emit({type:"boxend",originalEvent:e,position:{x:a[0],y:a[1]}});"additive"===o.selectionType()||f||o.$(n).unmerge(p).unselect(),p.emit("box").stdFilter((function(t){return t.selectable()&&!t.selected()})).select().emit("boxselect"),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!s[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var v=l&&l.grabbed();h(u),v&&(l.emit("freeon"),u.emit("free"),t.dragData.didDrag&&(l.emit("dragfreeon"),u.emit("dragfree")))}}s[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null}}),!1);var E,_,k,N,C,T,A,O,I,L,S,M,D,P=function(e){if(!t.scrollingPage){var n=t.cy,r=n.zoom(),i=n.pan(),o=t.projectIntoViewport(e.clientX,e.clientY),a=[o[0]*r+i.x,o[1]*r+i.y];if(t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.cxtStarted||0!==t.selection[4])e.preventDefault();else if(n.panningEnabled()&&n.userPanningEnabled()&&n.zoomingEnabled()&&n.userZoomingEnabled()){var s;e.preventDefault(),t.data.wheelZooming=!0,clearTimeout(t.data.wheelTimeout),t.data.wheelTimeout=setTimeout((function(){t.data.wheelZooming=!1,t.redrawHint("eles",!0),t.redraw()}),150),s=null!=e.deltaY?e.deltaY/-250:null!=e.wheelDeltaY?e.wheelDeltaY/1e3:e.wheelDelta/1e3,s*=t.wheelSensitivity,1===e.deltaMode&&(s*=33);var c=n.zoom()*Math.pow(10,s);"gesturechange"===e.type&&(c=t.gestureStartZoom*e.scale),n.zoom({level:c,renderedPosition:{x:a[0],y:a[1]}}),n.emit("gesturechange"===e.type?"pinchzoom":"scrollzoom")}}};t.registerBinding(t.container,"wheel",P,!0),t.registerBinding(e,"scroll",(function(e){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout((function(){t.scrollingPage=!1}),250)}),!0),t.registerBinding(t.container,"gesturestart",(function(e){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||e.preventDefault()}),!0),t.registerBinding(t.container,"gesturechange",(function(e){t.hasTouchStarted||P(e)}),!0),t.registerBinding(t.container,"mouseout",(function(e){var n=t.projectIntoViewport(e.clientX,e.clientY);t.cy.emit({originalEvent:e,type:"mouseout",position:{x:n[0],y:n[1]}})}),!1),t.registerBinding(t.container,"mouseover",(function(e){var n=t.projectIntoViewport(e.clientX,e.clientY);t.cy.emit({originalEvent:e,type:"mouseover",position:{x:n[0],y:n[1]}})}),!1);var R,j,G,F,B,H,Y,z=function(t,e,n,r){return Math.sqrt((n-t)*(n-t)+(r-e)*(r-e))},V=function(t,e,n,r){return(n-t)*(n-t)+(r-e)*(r-e)};if(t.registerBinding(t.container,"touchstart",R=function(e){if(t.hasTouchStarted=!0,x(e)){d(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var n=t.cy,i=t.touchData.now,o=t.touchData.earlier;if(e.touches[0]){var a=t.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY);i[0]=a[0],i[1]=a[1]}if(e.touches[1]&&(a=t.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY),i[2]=a[0],i[3]=a[1]),e.touches[2]&&(a=t.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY),i[4]=a[0],i[5]=a[1]),e.touches[1]){t.touchData.singleTouchMoved=!0,h(t.dragData.touchDragEles);var c=t.findContainerClientCoords();I=c[0],L=c[1],S=c[2],M=c[3],E=e.touches[0].clientX-I,_=e.touches[0].clientY-L,k=e.touches[1].clientX-I,N=e.touches[1].clientY-L,D=0<=E&&E<=S&&0<=k&&k<=S&&0<=_&&_<=M&&0<=N&&N<=M;var f=n.pan(),g=n.zoom();if(C=z(E,_,k,N),T=V(E,_,k,N),O=[((A=[(E+k)/2,(_+N)/2])[0]-f.x)/g,(A[1]-f.y)/g],T<4e4&&!e.touches[2]){var p=t.findNearestElement(i[0],i[1],!0,!0),v=t.findNearestElement(i[2],i[3],!0,!0);return p&&p.isNode()?(p.activate().emit({originalEvent:e,type:"cxttapstart",position:{x:i[0],y:i[1]}}),t.touchData.start=p):v&&v.isNode()?(v.activate().emit({originalEvent:e,type:"cxttapstart",position:{x:i[0],y:i[1]}}),t.touchData.start=v):n.emit({originalEvent:e,type:"cxttapstart",position:{x:i[0],y:i[1]}}),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!0,t.touchData.cxtDragged=!1,t.data.bgActivePosistion=void 0,void t.redraw()}}if(e.touches[2])n.boxSelectionEnabled()&&e.preventDefault();else if(e.touches[1]);else if(e.touches[0]){var b=t.findNearestElements(i[0],i[1],!0,!0),y=b[0];if(null!=y&&(y.activate(),t.touchData.start=y,t.touchData.starts=b,t.nodeIsGrabbable(y))){var w=t.dragData.touchDragEles=n.collection(),m=null;t.redrawHint("eles",!0),t.redrawHint("drag",!0),y.selected()?(m=n.$((function(e){return e.selected()&&t.nodeIsGrabbable(e)})),u(m,{addToList:w})):l(y,{addToList:w}),s(y);var P=function(t){return{originalEvent:e,type:t,position:{x:i[0],y:i[1]}}};y.emit(P("grabon")),m?m.forEach((function(t){t.emit(P("grab"))})):y.emit(P("grab"))}r(y,["touchstart","tapstart","vmousedown"],e,{x:i[0],y:i[1]}),null==y&&(t.data.bgActivePosistion={x:a[0],y:a[1]},t.redrawHint("select",!0),t.redraw()),t.touchData.singleTouchMoved=!1,t.touchData.singleTouchStartTime=+new Date,clearTimeout(t.touchData.tapholdTimeout),t.touchData.tapholdTimeout=setTimeout((function(){!1!==t.touchData.singleTouchMoved||t.pinching||t.touchData.selecting||r(t.touchData.start,["taphold"],e,{x:i[0],y:i[1]})}),t.tapholdDuration)}if(e.touches.length>=1){for(var R=t.touchData.startPosition=[null,null,null,null,null,null],j=0;j=t.touchTapThreshold2}if(n&&t.touchData.cxt){e.preventDefault();var m=e.touches[0].clientX-I,A=e.touches[0].clientY-L,S=e.touches[1].clientX-I,M=e.touches[1].clientY-L,P=V(m,A,S,M);if(P/T>=2.25||P>=22500){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var R={originalEvent:e,type:"cxttapend",position:{x:s[0],y:s[1]}};t.touchData.start?(t.touchData.start.unactivate().emit(R),t.touchData.start=null):a.emit(R)}}if(n&&t.touchData.cxt){R={originalEvent:e,type:"cxtdrag",position:{x:s[0],y:s[1]}},t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit(R):a.emit(R),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var j=t.findNearestElement(s[0],s[1],!0,!0);t.touchData.cxtOver&&j===t.touchData.cxtOver||(t.touchData.cxtOver&&t.touchData.cxtOver.emit({originalEvent:e,type:"cxtdragout",position:{x:s[0],y:s[1]}}),t.touchData.cxtOver=j,j&&j.emit({originalEvent:e,type:"cxtdragover",position:{x:s[0],y:s[1]}}))}else if(n&&e.touches[2]&&a.boxSelectionEnabled())e.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||a.emit({originalEvent:e,type:"boxstart",position:{x:s[0],y:s[1]}}),t.touchData.selecting=!0,t.touchData.didSelect=!0,i[4]=1,i&&0!==i.length&&void 0!==i[0]?(i[2]=(s[0]+s[2]+s[4])/3,i[3]=(s[1]+s[3]+s[5])/3):(i[0]=(s[0]+s[2]+s[4])/3,i[1]=(s[1]+s[3]+s[5])/3,i[2]=(s[0]+s[2]+s[4])/3+1,i[3]=(s[1]+s[3]+s[5])/3+1),t.redrawHint("select",!0),t.redraw();else if(n&&e.touches[1]&&!t.touchData.didSelect&&a.zoomingEnabled()&&a.panningEnabled()&&a.userZoomingEnabled()&&a.userPanningEnabled()){if(e.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),J=t.dragData.touchDragEles){t.redrawHint("drag",!0);for(var G=0;G0&&!t.hoverData.draggingEles&&!t.swipePanning&&null!=t.data.bgActivePosistion&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},!1),t.registerBinding(e,"touchcancel",G=function(e){var n=t.touchData.start;t.touchData.capture=!1,n&&n.unactivate()}),t.registerBinding(e,"touchend",F=function(e){var i=t.touchData.start;if(t.touchData.capture){0===e.touches.length&&(t.touchData.capture=!1),e.preventDefault();var o=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var a,s=t.cy,c=s.zoom(),u=t.touchData.now,l=t.touchData.earlier;if(e.touches[0]){var f=t.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY);u[0]=f[0],u[1]=f[1]}if(e.touches[1]&&(f=t.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY),u[2]=f[0],u[3]=f[1]),e.touches[2]&&(f=t.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY),u[4]=f[0],u[5]=f[1]),i&&i.unactivate(),t.touchData.cxt){if(a={originalEvent:e,type:"cxttapend",position:{x:u[0],y:u[1]}},i?i.emit(a):s.emit(a),!t.touchData.cxtDragged){var d={originalEvent:e,type:"cxttap",position:{x:u[0],y:u[1]}};i?i.emit(d):s.emit(d)}return t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,void t.redraw()}if(!e.touches[2]&&s.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var g=s.collection(t.getAllInBox(o[0],o[1],o[2],o[3]));o[0]=void 0,o[1]=void 0,o[2]=void 0,o[3]=void 0,o[4]=0,t.redrawHint("select",!0),s.emit({type:"boxend",originalEvent:e,position:{x:u[0],y:u[1]}}),g.emit("box").stdFilter((function(t){return t.selectable()&&!t.selected()})).select().emit("boxselect"),g.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(null!=i&&i.unactivate(),e.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(e.touches[1]);else if(e.touches[0]);else if(!e.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var p=t.dragData.touchDragEles;if(null!=i){var v=i._private.grabbed;h(p),t.redrawHint("drag",!0),t.redrawHint("eles",!0),v&&(i.emit("freeon"),p.emit("free"),t.dragData.didDrag&&(i.emit("dragfreeon"),p.emit("dragfree"))),r(i,["touchend","tapend","vmouseup","tapdragout"],e,{x:u[0],y:u[1]}),i.unactivate(),t.touchData.start=null}else{var b=t.findNearestElement(u[0],u[1],!0,!0);r(b,["touchend","tapend","vmouseup","tapdragout"],e,{x:u[0],y:u[1]})}var y=t.touchData.startPosition[0]-u[0],w=y*y,m=t.touchData.startPosition[1]-u[1],x=(w+m*m)*c*c;t.touchData.singleTouchMoved||(i||s.$(":selected").unselect(["tapunselect"]),r(i,["tap","vclick"],e,{x:u[0],y:u[1]}),B=!1,e.timeStamp-Y<=s.multiClickDebounceTime()?(H&&clearTimeout(H),B=!0,Y=null,r(i,["dbltap","vdblclick"],e,{x:u[0],y:u[1]})):(H=setTimeout((function(){B||r(i,["onetap","voneclick"],e,{x:u[0],y:u[1]})}),s.multiClickDebounceTime()),Y=e.timeStamp)),null!=i&&!t.dragData.didDrag&&i._private.selectable&&x2){for(var d=[l[0],l[1]],g=Math.pow(d[0]-t,2)+Math.pow(d[1]-e,2),p=1;p0)return p[0]}return null},d=Object.keys(h),g=0;g0?u:Ao(i,o,t,e,n,r,a,s)},checkPoint:function(t,e,n,r,i,o,a,s){var c=2*(s="auto"===s?Xo(r,i):s);if(Do(t,e,this.points,o,a,r,i-c,[0,-1],n))return!0;if(Do(t,e,this.points,o,a,r-c,i,[0,-1],n))return!0;var u=r/2+2*n,l=i/2+2*n;return!!Mo(t,e,[o-u,a-l,o-u,a,o+u,a,o+u,a-l])||!!jo(t,e,c,c,o+r/2-s,a+i/2-s,n)||!!jo(t,e,c,c,o-r/2+s,a+i/2-s,n)}}},registerNodeShapes:function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",zo(3,0)),this.generateRoundPolygon("round-triangle",zo(3,0)),this.generatePolygon("rectangle",zo(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",n),this.generateRoundPolygon("round-diamond",n),this.generatePolygon("pentagon",zo(5,0)),this.generateRoundPolygon("round-pentagon",zo(5,0)),this.generatePolygon("hexagon",zo(6,0)),this.generateRoundPolygon("round-hexagon",zo(6,0)),this.generatePolygon("heptagon",zo(7,0)),this.generateRoundPolygon("round-heptagon",zo(7,0)),this.generatePolygon("octagon",zo(8,0)),this.generateRoundPolygon("round-octagon",zo(8,0));var r=new Array(20),i=Uo(5,0),o=Uo(5,Math.PI/5),a=.5*(3-Math.sqrt(5));a*=1.57;for(var s=0;s=t.deqFastCost*p)break}else if(i){if(d>=t.deqCost*c||d>=t.deqAvgCost*s)break}else if(g>=t.deqNoDrawCost*_f)break;var v=t.deq(e,h,l);if(!(v.length>0))break;for(var b=0;b0&&(t.onDeqd(e,u),!i&&t.shouldRedraw(e,u,h,l)&&r())}),i(e))}}},Nf=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_i;zn(this,t),this.idsByKey=new Gi,this.keyForId=new Gi,this.cachesByLvl=new Gi,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=n}return Un(t,[{key:"getIdsFor",value:function(t){null==t&&Ci("Can not get id list for null key");var e=this.idsByKey,n=this.idsByKey.get(t);return n||(n=new Bi,e.set(t,n)),n}},{key:"addIdForKey",value:function(t,e){null!=t&&this.getIdsFor(t).add(e)}},{key:"deleteIdForKey",value:function(t,e){null!=t&&this.getIdsFor(t).delete(e)}},{key:"getNumberOfIdsForKey",value:function(t){return null==t?0:this.getIdsFor(t).size}},{key:"updateKeyMappingFor",value:function(t){var e=t.id(),n=this.keyForId.get(e),r=this.getKey(t);this.deleteIdForKey(n,e),this.addIdForKey(r,e),this.keyForId.set(e,r)}},{key:"deleteKeyMappingFor",value:function(t){var e=t.id(),n=this.keyForId.get(e);this.deleteIdForKey(n,e),this.keyForId.delete(e)}},{key:"keyHasChangedFor",value:function(t){var e=t.id();return this.keyForId.get(e)!==this.getKey(t)}},{key:"isInvalid",value:function(t){return this.keyHasChangedFor(t)||this.doesEleInvalidateKey(t)}},{key:"getCachesAt",value:function(t){var e=this.cachesByLvl,n=this.lvls,r=e.get(t);return r||(r=new Gi,e.set(t,r),n.push(t)),r}},{key:"getCache",value:function(t,e){return this.getCachesAt(e).get(t)}},{key:"get",value:function(t,e){var n=this.getKey(t),r=this.getCache(n,e);return null!=r&&this.updateKeyMappingFor(t),r}},{key:"getForCachedKey",value:function(t,e){var n=this.keyForId.get(t.id());return this.getCache(n,e)}},{key:"hasCache",value:function(t,e){return this.getCachesAt(e).has(t)}},{key:"has",value:function(t,e){var n=this.getKey(t);return this.hasCache(n,e)}},{key:"setCache",value:function(t,e,n){n.key=t,this.getCachesAt(e).set(t,n)}},{key:"set",value:function(t,e,n){var r=this.getKey(t);this.setCache(r,e,n),this.updateKeyMappingFor(t)}},{key:"deleteCache",value:function(t,e){this.getCachesAt(e).delete(t)}},{key:"delete",value:function(t,e){var n=this.getKey(t);this.deleteCache(n,e)}},{key:"invalidateKey",value:function(t){var e=this;this.lvls.forEach((function(n){return e.deleteCache(t,n)}))}},{key:"invalidate",value:function(t){var e=t.id(),n=this.keyForId.get(e);this.deleteKeyMappingFor(t);var r=this.doesEleInvalidateKey(t);return r&&this.invalidateKey(n),r||0===this.getNumberOfIdsForKey(n)}}]),t}(),Cf={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},Tf=Mi({getKey:null,doesEleInvalidateKey:_i,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Ei,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),Af=function(t,e){var n=this;n.renderer=t,n.onDequeues=[];var r=Tf(e);Tr(n,r),n.lookup=new Nf(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},Of=Af.prototype;Of.reasons=Cf,Of.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]},Of.getRetiredTextureQueue=function(t){var e=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return e[t]=e[t]||[]},Of.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new Xi((function(t,e){return e.reqs-t.reqs}))},Of.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},Of.getElement=function(t,e,n,r,i){var o=this,a=this.renderer,s=a.cy.zoom(),c=this.lookup;if(!e||0===e.w||0===e.h||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed())return null;if(!o.allowEdgeTxrCaching&&t.isEdge()||!o.allowParentTxrCaching&&t.isParent())return null;if(null==r&&(r=Math.ceil(lo(s*n))),r<-4)r=-4;else if(s>=7.99||r>3)return null;var u=Math.pow(2,r),l=e.h*u,h=e.w*u,f=a.eleTextBiggerThanMin(t,u);if(!this.isVisible(t,f))return null;var d,g=c.get(t,r);if(g&&g.invalidated&&(g.invalidated=!1,g.texture.invalidatedWidth-=g.width),g)return g;if(d=l<=25?25:l<=50?50:50*Math.ceil(l/50),l>1024||h>1024)return null;var p=o.getTextureQueue(d),v=p[p.length-2],b=function(){return o.recycleTexture(d,h)||o.addTexture(d,h)};v||(v=p[p.length-1]),v||(v=b()),v.width-v.usedWidthr;T--)N=o.getElement(t,e,n,T,Cf.downscale);C()}else{var A;if(!m&&!x&&!E)for(var O=r-1;O>=-4;O--){var I=c.get(t,O);if(I){A=I;break}}if(w(A))return o.queueElement(t,r),A;v.context.translate(v.usedWidth,0),v.context.scale(u,u),this.drawElement(v.context,t,e,f,!1),v.context.scale(1/u,1/u),v.context.translate(-v.usedWidth,0)}return g={x:v.usedWidth,texture:v,level:r,scale:u,width:h,height:l,scaledLabelShown:f},v.usedWidth+=Math.ceil(h+8),v.eleCaches.push(g),c.set(t,r,g),o.checkTextureFullness(v),g},Of.invalidateElements=function(t){for(var e=0;e=.2*t.width&&this.retireTexture(t)},Of.checkTextureFullness=function(t){var e=this.getTextureQueue(t.height);t.usedWidth/t.width>.8&&t.fullnessChecks>=10?Di(e,t):t.fullnessChecks++},Of.retireTexture=function(t){var e=t.height,n=this.getTextureQueue(e),r=this.lookup;Di(n,t),t.retired=!0;for(var i=t.eleCaches,o=0;o=e)return o.retired=!1,o.usedWidth=0,o.invalidatedWidth=0,o.fullnessChecks=0,Pi(o.eleCaches),o.context.setTransform(1,0,0,1,0,0),o.context.clearRect(0,0,o.width,o.height),Di(r,o),n.push(o),o}},Of.queueElement=function(t,e){var n=this.getElementQueue(),r=this.getElementKeyToQueue(),i=this.getKey(t),o=r[i];if(o)o.level=Math.max(o.level,e),o.eles.merge(t),o.reqs++,n.updateItem(o);else{var a={eles:t.spawn().merge(t),level:e,reqs:1,key:i};n.push(a),r[i]=a}},Of.dequeue=function(t){for(var e=this,n=e.getElementQueue(),r=e.getElementKeyToQueue(),i=[],o=e.lookup,a=0;a<1&&n.size()>0;a++){var s=n.pop(),c=s.key,u=s.eles[0],l=o.hasCache(u,s.level);if(r[c]=null,!l){i.push(s);var h=e.getBoundingBox(u);e.getElement(u,h,t,s.level,Cf.dequeue)}}return i},Of.removeFromQueue=function(t){var e=this.getElementQueue(),n=this.getElementKeyToQueue(),r=this.getKey(t),i=n[r];null!=i&&(1===i.eles.length?(i.reqs=xi,e.updateItem(i),e.pop(),n[r]=null):i.eles.unmerge(t))},Of.onDequeue=function(t){this.onDequeues.push(t)},Of.offDequeue=function(t){Di(this.onDequeues,t)},Of.setupDequeueing=kf({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(t,e,n){return t.dequeue(e,n)},onDeqd:function(t,e){for(var n=0;n=3.99||n>2)return null;r.validateLayersElesOrdering(n,t);var a,s,c=r.layersByLevel,u=Math.pow(2,n),l=c[n]=c[n]||[];if(r.levelIsComplete(n,t))return l;!function(){var e=function(e){if(r.validateLayersElesOrdering(e,t),r.levelIsComplete(e,t))return s=c[e],!0},i=function(t){if(!s)for(var r=n+t;-4<=r&&r<=2&&!e(r);r+=t);};i(1),i(-1);for(var o=l.length-1;o>=0;o--){var a=l[o];a.invalid&&Di(l,a)}}();var h=function(e){var i=(e=e||{}).after;if(function(){if(!a){a=wo();for(var e=0;e16e6)return null;var o=r.makeLayer(a,n);if(null!=i){var s=l.indexOf(i)+1;l.splice(s,0,o)}else(void 0===e.insert||e.insert)&&l.unshift(o);return o};if(r.skipping&&!o)return null;for(var f=null,d=t.length/1,g=!o,p=0;p=d||!To(f.bb,v.boundingBox()))&&!(f=h({insert:!0,after:f})))return null;s||g?r.queueLayer(f,v):r.drawEleInLayer(f,v,n,e),f.eles.push(v),y[n]=f}}return s||(g?null:l)},Lf.getEleLevelForLayerLevel=function(t,e){return t},Lf.drawEleInLayer=function(t,e,n,r){var i=this.renderer,o=t.context,a=e.boundingBox();0!==a.w&&0!==a.h&&e.visible()&&(n=this.getEleLevelForLayerLevel(n,r),i.setImgSmoothing(o,!1),i.drawCachedElement(o,e,null,null,n,!0),i.setImgSmoothing(o,!0))},Lf.levelIsComplete=function(t,e){var n=this.layersByLevel[t];if(!n||0===n.length)return!1;for(var r=0,i=0;i0)return!1;if(o.invalid)return!1;r+=o.eles.length}return r===e.length},Lf.validateLayersElesOrdering=function(t,e){var n=this.layersByLevel[t];if(n)for(var r=0;r0){t=!0;break}}return t},Lf.invalidateElements=function(t){var e=this;0!==t.length&&(e.lastInvalidationTime=si(),0!==t.length&&e.haveLayers()&&e.updateElementsInLayers(t,(function(t,n,r){e.invalidateLayer(t)})))},Lf.invalidateLayer=function(t){if(this.lastInvalidationTime=si(),!t.invalid){var e=t.level,n=t.eles,r=this.layersByLevel[e];Di(r,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var i=0;i3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],a=this,s=e._private.rscratch;if((!o||e.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var c;n&&(c=n,t.translate(-c.x1,-c.y1));var u=o?e.pstyle("opacity").value:1,l=o?e.pstyle("line-opacity").value:1,h=e.pstyle("curve-style").value,f=e.pstyle("line-style").value,d=e.pstyle("width").pfValue,g=e.pstyle("line-cap").value,p=u*l,v=u*l,b=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p;"straight-triangle"===h?(a.eleStrokeStyle(t,e,n),a.drawEdgeTrianglePath(e,t,s.allpts)):(t.lineWidth=d,t.lineCap=g,a.eleStrokeStyle(t,e,n),a.drawEdgePath(e,t,s.allpts,f),t.lineCap="butt")},y=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;a.drawArrowheads(t,e,n)};if(t.lineJoin="round","yes"===e.pstyle("ghost").value){var w=e.pstyle("ghost-offset-x").pfValue,m=e.pstyle("ghost-offset-y").pfValue,x=e.pstyle("ghost-opacity").value,E=p*x;t.translate(w,m),b(E),y(E),t.translate(-w,-m)}i&&a.drawEdgeUnderlay(t,e),b(),y(),i&&a.drawEdgeOverlay(t,e),a.drawElementText(t,e,null,r),n&&t.translate(c.x1,c.y1)}}},Zf=function(t){if(!["overlay","underlay"].includes(t))throw new Error("Invalid state");return function(e,n){if(n.visible()){var r=n.pstyle("".concat(t,"-opacity")).value;if(0!==r){var i=this,o=i.usePaths(),a=n._private.rscratch,s=2*n.pstyle("".concat(t,"-padding")).pfValue,c=n.pstyle("".concat(t,"-color")).value;e.lineWidth=s,"self"!==a.edgeType||o?e.lineCap="round":e.lineCap="butt",i.colorStrokeStyle(e,c[0],c[1],c[2],r),i.drawEdgePath(n,e,a.allpts,"solid")}}}};qf.drawEdgeOverlay=Zf("overlay"),qf.drawEdgeUnderlay=Zf("underlay"),qf.drawEdgePath=function(t,e,n,r){var i,o=t._private.rscratch,a=e,s=!1,c=this.usePaths(),u=t.pstyle("line-dash-pattern").pfValue,l=t.pstyle("line-dash-offset").pfValue;if(c){var h=n.join("$");o.pathCacheKey&&o.pathCacheKey===h?(i=e=o.pathCache,s=!0):(i=e=new Path2D,o.pathCacheKey=h,o.pathCache=i)}if(a.setLineDash)switch(r){case"dotted":a.setLineDash([1,1]);break;case"dashed":a.setLineDash(u),a.lineDashOffset=l;break;case"solid":a.setLineDash([])}if(!s&&!o.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(n[0],n[1]),o.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var f=2;f+3=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(o.roundCorners);try{for(p.s();!(g=p.n()).done;)ef(e,g.value)}catch(t){p.e(t)}finally{p.f()}e.lineTo(n[n.length-2],n[n.length-1])}else for(var v=2;v+15&&void 0!==arguments[5]?arguments[5]:5,a=arguments.length>6?arguments[6]:void 0;t.beginPath(),t.moveTo(e+o,n),t.lineTo(e+r-o,n),t.quadraticCurveTo(e+r,n,e+r,n+o),t.lineTo(e+r,n+i-o),t.quadraticCurveTo(e+r,n+i,e+r-o,n+i),t.lineTo(e+o,n+i),t.quadraticCurveTo(e,n+i,e,n+i-o),t.lineTo(e,n+o),t.quadraticCurveTo(e,n,e+o,n),t.closePath(),a?t.stroke():t.fill()}Kf.eleTextBiggerThanMin=function(t,e){if(!e){var n=t.cy().zoom(),r=this.getPixelRatio(),i=Math.ceil(lo(n*r));e=Math.pow(2,i)}return!(t.pstyle("font-size").pfValue*e5&&void 0!==arguments[5])||arguments[5],a=this;if(null==r){if(o&&!a.eleTextBiggerThanMin(e))return}else if(!1===r)return;if(e.isNode()){var s=e.pstyle("label");if(!s||!s.value)return;var c=a.getLabelJustification(e);t.textAlign=c,t.textBaseline="bottom"}else{var u=e.element()._private.rscratch.badLine,l=e.pstyle("label"),h=e.pstyle("source-label"),f=e.pstyle("target-label");if(u||(!l||!l.value)&&(!h||!h.value)&&(!f||!f.value))return;t.textAlign="center",t.textBaseline="bottom"}var d,g=!n;n&&(d=n,t.translate(-d.x1,-d.y1)),null==i?(a.drawText(t,e,null,g,o),e.isEdge()&&(a.drawText(t,e,"source",g,o),a.drawText(t,e,"target",g,o))):a.drawText(t,e,i,g,o),n&&t.translate(d.x1,d.y1)},Kf.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var n=0;n2&&void 0!==arguments[2])||arguments[2],r=e.pstyle("font-style").strValue,i=e.pstyle("font-size").pfValue+"px",o=e.pstyle("font-family").strValue,a=e.pstyle("font-weight").strValue,s=n?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,c=e.pstyle("text-outline-opacity").value*s,u=e.pstyle("color").value,l=e.pstyle("text-outline-color").value;t.font=r+" "+a+" "+i+" "+o,t.lineJoin="round",this.colorFillStyle(t,u[0],u[1],u[2],s),this.colorStrokeStyle(t,l[0],l[1],l[2],c)},Kf.getTextAngle=function(t,e){var n=t._private.rscratch,r=e?e+"-":"",i=t.pstyle(r+"text-rotation"),o=Ri(n,"labelAngle",e);return"autorotate"===i.strValue?t.isEdge()?o:0:"none"===i.strValue?0:i.pfValue},Kf.drawText=function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=e._private.rscratch,a=i?e.effectiveOpacity():1;if(!i||0!==a&&0!==e.pstyle("text-opacity").value){"main"===n&&(n=null);var s,c,u=Ri(o,"labelX",n),l=Ri(o,"labelY",n),h=this.getLabelText(e,n);if(null!=h&&""!==h&&!isNaN(u)&&!isNaN(l)){this.setupTextStyle(t,e,i);var f,d=n?n+"-":"",g=Ri(o,"labelWidth",n),p=Ri(o,"labelHeight",n),v=e.pstyle(d+"text-margin-x").pfValue,b=e.pstyle(d+"text-margin-y").pfValue,y=e.isEdge(),w=e.pstyle("text-halign").value,m=e.pstyle("text-valign").value;switch(y&&(w="center",m="center"),u+=v,l+=b,0!==(f=r?this.getTextAngle(e,n):0)&&(s=u,c=l,t.translate(s,c),t.rotate(f),u=0,l=0),m){case"top":break;case"center":l+=p/2;break;case"bottom":l+=p}var x=e.pstyle("text-background-opacity").value,E=e.pstyle("text-border-opacity").value,_=e.pstyle("text-border-width").pfValue,k=e.pstyle("text-background-padding").pfValue,N=0===e.pstyle("text-background-shape").strValue.indexOf("round");if(x>0||_>0&&E>0){var C=u-k;switch(w){case"left":C-=g;break;case"center":C-=g/2}var T=l-p-k,A=g+2*k,O=p+2*k;if(x>0){var I=t.fillStyle,L=e.pstyle("text-background-color").value;t.fillStyle="rgba("+L[0]+","+L[1]+","+L[2]+","+x*a+")",N?Qf(t,C,T,A,O,2):t.fillRect(C,T,A,O),t.fillStyle=I}if(_>0&&E>0){var S=t.strokeStyle,M=t.lineWidth,D=e.pstyle("text-border-color").value,P=e.pstyle("text-border-style").value;if(t.strokeStyle="rgba("+D[0]+","+D[1]+","+D[2]+","+E*a+")",t.lineWidth=_,t.setLineDash)switch(P){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=_/4,t.setLineDash([]);break;case"solid":t.setLineDash([])}if(N?Qf(t,C,T,A,O,2,"stroke"):t.strokeRect(C,T,A,O),"double"===P){var R=_/2;N?Qf(t,C+R,T+R,A-2*R,O-2*R,2,"stroke"):t.strokeRect(C+R,T+R,A-2*R,O-2*R)}t.setLineDash&&t.setLineDash([]),t.lineWidth=M,t.strokeStyle=S}}var j=2*e.pstyle("text-outline-width").pfValue;if(j>0&&(t.lineWidth=j),"wrap"===e.pstyle("text-wrap").value){var G=Ri(o,"labelWrapCachedLines",n),F=Ri(o,"labelLineHeight",n),B=g/2,H=this.getLabelJustification(e);switch("auto"===H||("left"===w?"left"===H?u+=-g:"center"===H&&(u+=-B):"center"===w?"left"===H?u+=-B:"right"===H&&(u+=B):"right"===w&&("center"===H?u+=B:"right"===H&&(u+=g))),m){case"top":case"center":case"bottom":l-=(G.length-1)*F}for(var Y=0;Y0&&t.strokeText(G[Y],u,l),t.fillText(G[Y],u,l),l+=F}else j>0&&t.strokeText(h,u,l),t.fillText(h,u,l);0!==f&&(t.rotate(-f),t.translate(-s,-c))}}};var Jf={drawNode:function(t,e,n){var r,i,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],c=this,u=e._private,l=u.rscratch,h=e.position();if(sr(h.x)&&sr(h.y)&&(!s||e.visible())){var f,d,g=s?e.effectiveOpacity():1,p=c.usePaths(),v=!1,b=e.padding();r=e.width()+2*b,i=e.height()+2*b,n&&(d=n,t.translate(-d.x1,-d.y1));for(var y=e.pstyle("background-image").value,w=new Array(y.length),m=new Array(y.length),x=0,E=0;E0&&void 0!==arguments[0]?arguments[0]:T;c.eleFillStyle(t,e,n)},z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P;c.colorStrokeStyle(t,A[0],A[1],A[2],e)},V=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:F;c.colorStrokeStyle(t,j[0],j[1],j[2],e)},U=function(t,e,n,r){var i,o=c.nodePathCache=c.nodePathCache||[],a=vi("polygon"===n?n+","+r.join(","):n,""+e,""+t,""+H),s=o[a],u=!1;return null!=s?(i=s,u=!0,l.pathCache=i):(i=new Path2D,o[a]=l.pathCache=i),{path:i,cacheHit:u}},X=e.pstyle("shape").strValue,W=e.pstyle("shape-polygon-points").pfValue;if(p){t.translate(h.x,h.y);var q=U(r,i,X,W);f=q.path,v=q.cacheHit}var Z=function(){if(!v){var n=h;p&&(n={x:0,y:0}),c.nodeShapes[c.getNodeShape(e)].draw(f||t,n.x,n.y,r,i,H,l)}p?t.fill(f):t.fill()},$=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=u.backgrounding,o=0,a=0;a0&&void 0!==arguments[0]&&arguments[0],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g;c.hasPie(e)&&(c.drawPie(t,e,o),n&&(p||c.nodeShapes[c.getNodeShape(e)].draw(t,h.x,h.y,r,i,H,l)))},Q=function(){var e=(N>0?N:-N)*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:g),n=N>0?0:255;0!==N&&(c.colorFillStyle(t,n,n,n,e),p?t.fill(f):t.fill())},J=function(){if(C>0){if(t.lineWidth=C,t.lineCap=L,t.lineJoin=I,t.setLineDash)switch(O){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(M),t.lineDashOffset=D;break;case"solid":case"double":t.setLineDash([])}if("center"!==S){if(t.save(),t.lineWidth*=2,"inside"===S)p?t.clip(f):t.clip();else{var e=new Path2D;e.rect(-r/2-C,-i/2-C,r+2*C,i+2*C),e.addPath(f),t.clip(e,"evenodd")}p?t.stroke(f):t.stroke(),t.restore()}else p?t.stroke(f):t.stroke();if("double"===O){t.lineWidth=C/3;var n=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",p?t.stroke(f):t.stroke(),t.globalCompositeOperation=n}t.setLineDash&&t.setLineDash([])}},tt=function(){if(R>0){if(t.lineWidth=R,t.lineCap="butt",t.setLineDash)switch(G){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([])}var n=h;p&&(n={x:0,y:0});var o=c.getNodeShape(e),a=C;"inside"===S&&(a=0),"outside"===S&&(a*=2);var s,u=(r+a+(R+B))/r,l=(i+a+(R+B))/i,f=r*u,d=i*l,g=c.nodeShapes[o].points;if(p&&(s=U(f,d,o,g).path),"ellipse"===o)c.drawEllipsePath(s||t,n.x,n.y,f,d);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(o)){var v=0,b=0,y=0;"round-diamond"===o?v=1.4*(a+B+R):"round-heptagon"===o?(v=1.075*(a+B+R),y=-(a/2+B+R)/35):"round-hexagon"===o?v=1.12*(a+B+R):"round-pentagon"===o?(v=1.13*(a+B+R),y=-(a/2+B+R)/15):"round-tag"===o?(v=1.12*(a+B+R),b=.07*(a/2+R+B)):"round-triangle"===o&&(v=(a+B+R)*(Math.PI/2),y=-(a+B/2+R)/Math.PI),0!==v&&(f=r*(u=(r+v)/r),["round-hexagon","round-tag"].includes(o)||(d=i*(l=(i+v)/i)));for(var w=f/2,m=d/2,x=(H="auto"===H?Wo(f,d):H)+(a+R+B)/2,E=new Array(g.length/2),_=new Array(g.length/2),k=0;k0){if(r=r||n.position(),null==i||null==o){var h=n.padding();i=n.width()+2*h,o=n.height()+2*h}this.colorFillStyle(e,c[0],c[1],c[2],s),this.nodeShapes[u].draw(e,r.x,r.y,i+2*a,o+2*a,l),e.fill()}}}};Jf.drawNodeOverlay=td("overlay"),Jf.drawNodeUnderlay=td("underlay"),Jf.hasPie=function(t){return(t=t[0])._private.hasPie},Jf.drawPie=function(t,e,n,r){e=e[0],r=r||e.position();var i=e.cy().style(),o=e.pstyle("pie-size"),a=r.x,s=r.y,c=e.width(),u=e.height(),l=Math.min(c,u)/2,h=0;this.usePaths()&&(a=0,s=0),"%"===o.units?l*=o.pfValue:void 0!==o.pfValue&&(l=o.pfValue/2);for(var f=1;f<=i.pieBackgroundN;f++){var d=e.pstyle("pie-"+f+"-background-size").value,g=e.pstyle("pie-"+f+"-background-color").value,p=e.pstyle("pie-"+f+"-background-opacity").value*n,v=d/100;v+h>1&&(v=1-h);var b=1.5*Math.PI+2*Math.PI*h,y=b+2*Math.PI*v;0===d||h>=1||h+v>1||(t.beginPath(),t.moveTo(a,s),t.arc(a,s,l,b,y),t.closePath(),this.colorFillStyle(t,g[0],g[1],g[2],p),t.fill(),h+=v)}};for(var ed={getPixelRatio:function(){var t=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var e=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/e},paintCache:function(t){for(var e,n=this.paintCaches=this.paintCaches||[],r=!0,i=0;ia.minMbLowQualFrames&&(a.motionBlurPxRatio=a.mbPxRBlurry)),a.clearingMotionBlur&&(a.motionBlurPxRatio=1),a.textureDrawLastFrame&&!h&&(l[a.NODE]=!0,l[a.SELECT_BOX]=!0);var y=c.style(),w=c.zoom(),m=void 0!==i?i:w,x=c.pan(),E={x:x.x,y:x.y},_={zoom:w,pan:{x:x.x,y:x.y}},k=a.prevViewport;void 0===k||_.zoom!==k.zoom||_.pan.x!==k.pan.x||_.pan.y!==k.pan.y||p&&!g||(a.motionBlurPxRatio=1),o&&(E=o),m*=s,E.x*=s,E.y*=s;var N=a.getCachedZSortedEles();function C(t,e,n,r,i){var o=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",a.colorFillStyle(t,255,255,255,a.motionBlurTransparency),t.fillRect(e,n,r,i),t.globalCompositeOperation=o}function T(t,r){var s,c,l,h;a.clearingMotionBlur||t!==u.bufferContexts[a.MOTIONBLUR_BUFFER_NODE]&&t!==u.bufferContexts[a.MOTIONBLUR_BUFFER_DRAG]?(s=E,c=m,l=a.canvasWidth,h=a.canvasHeight):(s={x:x.x*d,y:x.y*d},c=w*d,l=a.canvasWidth*d,h=a.canvasHeight*d),t.setTransform(1,0,0,1,0,0),"motionBlur"===r?C(t,0,0,l,h):e||void 0!==r&&!r||t.clearRect(0,0,l,h),n||(t.translate(s.x,s.y),t.scale(c,c)),o&&t.translate(o.x,o.y),i&&t.scale(i,i)}if(h||(a.textureDrawLastFrame=!1),h){if(a.textureDrawLastFrame=!0,!a.textureCache){a.textureCache={},a.textureCache.bb=c.mutableElements().boundingBox(),a.textureCache.texture=a.data.bufferCanvases[a.TEXTURE_BUFFER];var A=a.data.bufferContexts[a.TEXTURE_BUFFER];A.setTransform(1,0,0,1,0,0),A.clearRect(0,0,a.canvasWidth*a.textureMult,a.canvasHeight*a.textureMult),a.render({forcedContext:A,drawOnlyNodeLayer:!0,forcedPxRatio:s*a.textureMult}),(_=a.textureCache.viewport={zoom:c.zoom(),pan:c.pan(),width:a.canvasWidth,height:a.canvasHeight}).mpan={x:(0-_.pan.x)/_.zoom,y:(0-_.pan.y)/_.zoom}}l[a.DRAG]=!1,l[a.NODE]=!1;var O=u.contexts[a.NODE],I=a.textureCache.texture;_=a.textureCache.viewport,O.setTransform(1,0,0,1,0,0),f?C(O,0,0,_.width,_.height):O.clearRect(0,0,_.width,_.height);var L=y.core("outside-texture-bg-color").value,S=y.core("outside-texture-bg-opacity").value;a.colorFillStyle(O,L[0],L[1],L[2],S),O.fillRect(0,0,_.width,_.height),w=c.zoom(),T(O,!1),O.clearRect(_.mpan.x,_.mpan.y,_.width/_.zoom/s,_.height/_.zoom/s),O.drawImage(I,_.mpan.x,_.mpan.y,_.width/_.zoom/s,_.height/_.zoom/s)}else a.textureOnViewport&&!e&&(a.textureCache=null);var M=c.extent(),D=a.pinching||a.hoverData.dragging||a.swipePanning||a.data.wheelZooming||a.hoverData.draggingEles||a.cy.animated(),P=a.hideEdgesOnViewport&&D,R=[];if(R[a.NODE]=!l[a.NODE]&&f&&!a.clearedForMotionBlur[a.NODE]||a.clearingMotionBlur,R[a.NODE]&&(a.clearedForMotionBlur[a.NODE]=!0),R[a.DRAG]=!l[a.DRAG]&&f&&!a.clearedForMotionBlur[a.DRAG]||a.clearingMotionBlur,R[a.DRAG]&&(a.clearedForMotionBlur[a.DRAG]=!0),l[a.NODE]||n||r||R[a.NODE]){var j=f&&!R[a.NODE]&&1!==d;T(O=e||(j?a.data.bufferContexts[a.MOTIONBLUR_BUFFER_NODE]:u.contexts[a.NODE]),f&&!j?"motionBlur":void 0),P?a.drawCachedNodes(O,N.nondrag,s,M):a.drawLayeredElements(O,N.nondrag,s,M),a.debug&&a.drawDebugPoints(O,N.nondrag),n||f||(l[a.NODE]=!1)}if(!r&&(l[a.DRAG]||n||R[a.DRAG])&&(j=f&&!R[a.DRAG]&&1!==d,T(O=e||(j?a.data.bufferContexts[a.MOTIONBLUR_BUFFER_DRAG]:u.contexts[a.DRAG]),f&&!j?"motionBlur":void 0),P?a.drawCachedNodes(O,N.drag,s,M):a.drawCachedElements(O,N.drag,s,M),a.debug&&a.drawDebugPoints(O,N.drag),n||f||(l[a.DRAG]=!1)),a.showFps||!r&&l[a.SELECT_BOX]&&!n){if(T(O=e||u.contexts[a.SELECT_BOX]),1==a.selection[4]&&(a.hoverData.selecting||a.touchData.selecting)){w=a.cy.zoom();var G=y.core("selection-box-border-width").value/w;O.lineWidth=G,O.fillStyle="rgba("+y.core("selection-box-color").value[0]+","+y.core("selection-box-color").value[1]+","+y.core("selection-box-color").value[2]+","+y.core("selection-box-opacity").value+")",O.fillRect(a.selection[0],a.selection[1],a.selection[2]-a.selection[0],a.selection[3]-a.selection[1]),G>0&&(O.strokeStyle="rgba("+y.core("selection-box-border-color").value[0]+","+y.core("selection-box-border-color").value[1]+","+y.core("selection-box-border-color").value[2]+","+y.core("selection-box-opacity").value+")",O.strokeRect(a.selection[0],a.selection[1],a.selection[2]-a.selection[0],a.selection[3]-a.selection[1]))}if(u.bgActivePosistion&&!a.hoverData.selecting){w=a.cy.zoom();var F=u.bgActivePosistion;O.fillStyle="rgba("+y.core("active-bg-color").value[0]+","+y.core("active-bg-color").value[1]+","+y.core("active-bg-color").value[2]+","+y.core("active-bg-opacity").value+")",O.beginPath(),O.arc(F.x,F.y,y.core("active-bg-size").pfValue/w,0,2*Math.PI),O.fill()}var B=a.lastRedrawTime;if(a.showFps&&B){B=Math.round(B);var H=Math.round(1e3/B);O.setTransform(1,0,0,1,0,0),O.fillStyle="rgba(255, 0, 0, 0.75)",O.strokeStyle="rgba(255, 0, 0, 0.75)",O.lineWidth=1,O.fillText("1 frame = "+B+" ms = "+H+" fps",0,20),O.strokeRect(0,30,250,20),O.fillRect(0,30,250*Math.min(H/60,1),20)}n||(l[a.SELECT_BOX]=!1)}if(f&&1!==d){var Y=u.contexts[a.NODE],z=a.data.bufferCanvases[a.MOTIONBLUR_BUFFER_NODE],V=u.contexts[a.DRAG],U=a.data.bufferCanvases[a.MOTIONBLUR_BUFFER_DRAG],X=function(t,e,n){t.setTransform(1,0,0,1,0,0),n||!b?t.clearRect(0,0,a.canvasWidth,a.canvasHeight):C(t,0,0,a.canvasWidth,a.canvasHeight);var r=d;t.drawImage(e,0,0,a.canvasWidth*r,a.canvasHeight*r,0,0,a.canvasWidth,a.canvasHeight)};(l[a.NODE]||R[a.NODE])&&(X(Y,z,R[a.NODE]),l[a.NODE]=!1),(l[a.DRAG]||R[a.DRAG])&&(X(V,U,R[a.DRAG]),l[a.DRAG]=!1)}a.prevViewport=_,a.clearingMotionBlur&&(a.clearingMotionBlur=!1,a.motionBlurCleared=!0,a.motionBlur=!0),f&&(a.motionBlurTimeout=setTimeout((function(){a.motionBlurTimeout=null,a.clearedForMotionBlur[a.NODE]=!1,a.clearedForMotionBlur[a.DRAG]=!1,a.motionBlur=!1,a.clearingMotionBlur=!h,a.mbFrames=0,l[a.NODE]=!0,l[a.DRAG]=!0,a.redraw()}),100)),e||c.emit("render")}},nd={drawPolygonPath:function(t,e,n,r,i,o){var a=r/2,s=i/2;t.beginPath&&t.beginPath(),t.moveTo(e+a*o[0],n+s*o[1]);for(var c=1;c0&&o>0){f.clearRect(0,0,i,o),f.globalCompositeOperation="source-over";var d=this.getCachedZSortedEles();if(t.full)f.translate(-n.x1*c,-n.y1*c),f.scale(c,c),this.drawElements(f,d),f.scale(1/c,1/c),f.translate(n.x1*c,n.y1*c);else{var g=e.pan(),p={x:g.x*c,y:g.y*c};c*=e.zoom(),f.translate(p.x,p.y),f.scale(c,c),this.drawElements(f,d),f.scale(1/c,1/c),f.translate(-p.x,-p.y)}t.bg&&(f.globalCompositeOperation="destination-over",f.fillStyle=t.bg,f.rect(0,0,i,o),f.fill())}return h},ud.png=function(t){return hd(t,this.bufferCanvasImage(t),"image/png")},ud.jpg=function(t){return hd(t,this.bufferCanvasImage(t),"image/jpeg")};var fd=gd,dd=gd.prototype;function gd(t){var e=this;e.data={canvases:new Array(dd.CANVAS_LAYERS),contexts:new Array(dd.CANVAS_LAYERS),canvasNeedsRedraw:new Array(dd.CANVAS_LAYERS),bufferCanvases:new Array(dd.BUFFER_COUNT),bufferContexts:new Array(dd.CANVAS_LAYERS)};var n="-webkit-tap-highlight-color",r="rgba(0,0,0,0)";e.data.canvasContainer=document.createElement("div");var i=e.data.canvasContainer.style;e.data.canvasContainer.style[n]=r,i.position="relative",i.zIndex="0",i.overflow="hidden";var o=t.cy.container();o.appendChild(e.data.canvasContainer),o.style[n]=r;var a={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};Kn&&Kn.userAgent.match(/msie|trident|edge/i)&&(a["-ms-touch-action"]="none",a["touch-action"]="none");for(var s=0;s\n\n \n \n <%= letter %>\n \n\n\n',Ug={red:"red",amber:"orange",green:"green",white:"#f0ead6",none:"#008080"},Xg=["name","display_name","path","value","subject","command_line","key","av_result","region","country","abstract","opinion","type"];function Wg(t,e){return $g({id:t,type:"idref",name:t,original_relationship:e,raw:{}})}function qg(t){return $g({id:t.id,name:"TLP:"+t.value.toUpperCase(),type:"marking-definition",definition_type:"tlp",definition:{tlp:t.value}})}function Zg(t){const e=$g({id:t.data.id,name:t.data.name||t.data.id,type:"relationship",raw:t.data});return{node:e,edges:[Kg({id:"rel-"+t.data.source+"-"+e.data.id,source_ref:t.data.source,target_ref:e.data.id,relationship_type:t.data.label}),Kg({id:"rel-"+e.data.id+"-"+t.data.targer,source_ref:e.data.id,target_ref:t.data.target,relationship_type:t.data.label})]}}function $g(t){const e=Jg(t);return{group:"nodes",data:{id:t.id,label:Qg(t),shape:"ellipse",type:t.type,tags:[],raw:t,...e},selectable:!0,grabbable:!0,classes:[t.type,"icon-"+t.type]}}function Kg(t){return{group:"edges",data:{id:t.id,source:t.source_ref,target:t.target_ref,label:t.relationship_type,arrow:"triangle",raw:t},classes:["autorotate"]}}function Qg(t){if("marking-definition"==t.type){if("tlp"==t.definition_type)return t.name;if("statement"==t.definition_type)return t.definition.statement}for(let e=0;e({x:t,y:t}));function ip(t){return t.split("-")[0]}function op(t){return["top","bottom"].includes(ip(t))?"y":"x"}function ap(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function sp(t,e,n){let{reference:r,floating:i}=t;const o=op(e),a=function(t){return"x"===op(t)?"y":"x"}(e),s="y"===a?"height":"width",c=ip(e),u="y"===o,l=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2;let d;switch(c){case"top":d={x:l,y:r.y-i.height};break;case"bottom":d={x:l,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:h};break;case"left":d={x:r.x-i.width,y:h};break;default:d={x:r.x,y:r.y}}switch(function(t){return t.split("-")[1]}(e)){case"start":d[a]-=f*(n&&u?-1:1);break;case"end":d[a]+=f*(n&&u?-1:1)}return d}function cp(t){return hp(t)?(t.nodeName||"").toLowerCase():"#document"}function up(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function lp(t){var e;return null==(e=(hp(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function hp(t){return t instanceof Node||t instanceof up(t).Node}function fp(t){return t instanceof Element||t instanceof up(t).Element}function dp(t){return t instanceof HTMLElement||t instanceof up(t).HTMLElement}function gp(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof up(t).ShadowRoot)}function pp(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=xp(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function vp(t){return["table","td","th"].includes(cp(t))}function bp(t){return[":popover-open",":modal"].some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function yp(t){const e=wp(),n=xp(t);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((t=>(n.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(n.contain||"").includes(t)))}function wp(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function mp(t){return["html","body","#document"].includes(cp(t))}function xp(t){return up(t).getComputedStyle(t)}function Ep(t){return fp(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function _p(t){if("html"===cp(t))return t;const e=t.assignedSlot||t.parentNode||gp(t)&&t.host||lp(t);return gp(e)?e.host:e}function kp(t){const e=_p(t);return mp(e)?t.ownerDocument?t.ownerDocument.body:t.body:dp(e)&&pp(e)?e:kp(e)}function Np(t,e,n){var r;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=kp(t),o=i===(null==(r=t.ownerDocument)?void 0:r.body),a=up(i);return o?e.concat(a,a.visualViewport||[],pp(i)?i:[],a.frameElement&&n?Np(a.frameElement):[]):e.concat(i,Np(i,[],n))}function Cp(t){const e=xp(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=dp(t),o=i?t.offsetWidth:n,a=i?t.offsetHeight:r,s=np(n)!==o||np(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function Tp(t){return fp(t)?t:t.contextElement}function Ap(t){const e=Tp(t);if(!dp(e))return rp(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=Cp(e);let a=(o?np(n.width):n.width)/r,s=(o?np(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Op=rp(0);function Ip(t){const e=up(t);return wp()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Op}function Lp(t,e,n,r){void 0===e&&(e=!1),void 0===n&&(n=!1);const i=t.getBoundingClientRect(),o=Tp(t);let a=rp(1);e&&(r?fp(r)&&(a=Ap(r)):a=Ap(t));const s=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==up(t))&&e}(o,n,r)?Ip(o):rp(0);let c=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,l=i.width/a.x,h=i.height/a.y;if(o){const t=up(o),e=r&&fp(r)?up(r):r;let n=t,i=n.frameElement;for(;i&&r&&e!==n;){const t=Ap(i),e=i.getBoundingClientRect(),r=xp(i),o=e.left+(i.clientLeft+parseFloat(r.paddingLeft))*t.x,a=e.top+(i.clientTop+parseFloat(r.paddingTop))*t.y;c*=t.x,u*=t.y,l*=t.x,h*=t.y,c+=o,u+=a,n=up(i),i=n.frameElement}}return ap({width:l,height:h,x:c,y:u})}function Sp(t){return Lp(lp(t)).left+Ep(t).scrollLeft}function Mp(t,e,n){let r;if("viewport"===e)r=function(t,e){const n=up(t),r=lp(t),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,c=0;if(i){o=i.width,a=i.height;const t=wp();(!t||t&&"fixed"===e)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:s,y:c}}(t,n);else if("document"===e)r=function(t){const e=lp(t),n=Ep(t),r=t.ownerDocument.body,i=ep(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=ep(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Sp(t);const s=-n.scrollTop;return"rtl"===xp(r).direction&&(a+=ep(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}(lp(t));else if(fp(e))r=function(t,e){const n=Lp(t,!0,"fixed"===e),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=dp(t)?Ap(t):rp(1);return{width:t.clientWidth*o.x,height:t.clientHeight*o.y,x:i*o.x,y:r*o.y}}(e,n);else{const n=Ip(t);r={...e,x:e.x-n.x,y:e.y-n.y}}return ap(r)}function Dp(t,e){const n=_p(t);return!(n===e||!fp(n)||mp(n))&&("fixed"===xp(n).position||Dp(n,e))}function Pp(t,e,n){const r=dp(e),i=lp(e),o="fixed"===n,a=Lp(t,!0,o,e);let s={scrollLeft:0,scrollTop:0};const c=rp(0);if(r||!r&&!o)if(("body"!==cp(e)||pp(i))&&(s=Ep(e)),r){const t=Lp(e,!0,o,e);c.x=t.x+e.clientLeft,c.y=t.y+e.clientTop}else i&&(c.x=Sp(i));return{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function Rp(t){return"static"===xp(t).position}function jp(t,e){return dp(t)&&"fixed"!==xp(t).position?e?e(t):t.offsetParent:null}function Gp(t,e){const n=up(t);if(bp(t))return n;if(!dp(t)){let e=_p(t);for(;e&&!mp(e);){if(fp(e)&&!Rp(e))return e;e=_p(e)}return n}let r=jp(t,e);for(;r&&vp(r)&&Rp(r);)r=jp(r,e);return r&&mp(r)&&Rp(r)&&!yp(r)?n:r||function(t){let e=_p(t);for(;dp(e)&&!mp(e);){if(bp(e))return null;if(yp(e))return e;e=_p(e)}return null}(t)||n}const Fp={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o="fixed"===i,a=lp(r),s=!!e&&bp(e.floating);if(r===a||s&&o)return n;let c={scrollLeft:0,scrollTop:0},u=rp(1);const l=rp(0),h=dp(r);if((h||!h&&!o)&&(("body"!==cp(r)||pp(a))&&(c=Ep(r)),dp(r))){const t=Lp(r);u=Ap(r),l.x=t.x+r.clientLeft,l.y=t.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+l.x,y:n.y*u.y-c.scrollTop*u.y+l.y}},getDocumentElement:lp,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o="clippingAncestors"===n?bp(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let r=Np(t,[],!1).filter((t=>fp(t)&&"body"!==cp(t))),i=null;const o="fixed"===xp(t).position;let a=o?_p(t):t;for(;fp(a)&&!mp(a);){const e=xp(a),n=yp(a);n||"fixed"!==e.position||(i=null),(o?!n&&!i:!n&&"static"===e.position&&i&&["absolute","fixed"].includes(i.position)||pp(a)&&!n&&Dp(t,a))?r=r.filter((t=>t!==a)):i=e,a=_p(a)}return e.set(t,r),r}(e,this._c):[].concat(n),a=[...o,r],s=a[0],c=a.reduce(((t,n)=>{const r=Mp(e,n,i);return t.top=ep(r.top,t.top),t.right=tp(r.right,t.right),t.bottom=tp(r.bottom,t.bottom),t.left=ep(r.left,t.left),t}),Mp(e,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:Gp,getElementRects:async function(t){const e=this.getOffsetParent||Gp,n=this.getDimensions,r=await n(t.floating);return{reference:Pp(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=Cp(t);return{width:e,height:n}},getScale:Ap,isElement:fp,isRTL:function(t){return"rtl"===xp(t).direction}};Cd.use(Ad()),Cd.use(Id()),Cd.use(Sd()),Cd.use(Dd()),Cd.use(Rd()),Cd.use(Gd()),Cd.use(Bd()((function(t,e,n){function r(){((t,e,n)=>{const r=new Map,i={platform:Fp,...n},o={...i.platform,_c:r};return(async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),c=await(null==a.isRTL?void 0:a.isRTL(e));let u=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:l,y:h}=sp(u,r,c),f=r,d={},g=0;for(let n=0;n{Object.assign(e.style,{left:`${t}px`,top:`${n}px`})}))}return r(),{update:r}}))),Yd()(Cd);const Bp="cola",Hp={euler:{pull:.006,mass:t=>10,animation:!1,dragCoeff:.3},"cose-bilkent":{animate:"end",animationEasing:"ease-out",animationDuration:300,nodeRepulsion:200,idealEdgeLength:90,gravityRange:50,gravity:8.2,padding:50},cola:{convergenceThreshold:100,animate:!1}},Yp=[{selector:"node",style:{shape:"data(shape)",width:30,height:30,"background-color":"data(color)","background-width":"90%","background-height":"90%","background-position-x":"50%","text-valign":"bottom","text-halign":"center",label:"","font-size":"10pt","text-max-width":"300px","text-wrap":"ellipsis"}},{selector:"node[image]",style:{"background-image":"data(image)"}},{selector:'node[type="relationship"]',style:{"background-image":"data(image)",width:15,height:15,"font-size":"8pt"}},{selector:'node[type="marking-definition"]',style:{width:15,height:15,"font-size":"8pt"}},{selector:'node[type="extension-definition"]',style:{width:15,height:15,"font-size":"8pt"}},{selector:'node[type="language-content"]',style:{width:15,height:15,"font-size":"8pt"}},{selector:'node[type="idref"]',style:{width:15,height:15,"font-size":"8pt"}},{selector:"edge",style:{width:1,opacity:.5,label:"data(label)","curve-style":"bezier","line-color":"#bbb","target-arrow-color":"#ccc","target-arrow-shape":"triangle","min-zoomed-font-size":"5pt"}},{selector:'edge[label="x_eclecticiq_alternative_hypothesis_refs"]',style:{"curve-style":"bezier","control-point-step-size":40,"line-color":"#ccc"}},{selector:".bleak",style:{opacity:.1}},{selector:"edge.autorotate",style:{"font-size":"9pt",color:"#222","edge-text-rotation":"autorotate"}},{selector:"node:selected",style:{"background-color":"black"}}];function zp(t,e){const n={};"cise"===e&&(n.clusters=function(t){const e=t.elements().markovClustering({});for(let t=0;t"relationship"!=t.type)),h=t.objects.filter((t=>"relationship"==t.type)),f=function(t){const e={"marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9":{id:"marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9",value:"white",css:"marking-tag-tlp-white"},"marking-definition--34098fce-860f-48ae-8e50-ebd3cc5e41da":{id:"marking-definition--34098fce-860f-48ae-8e50-ebd3cc5e41da",value:"green",css:"marking-tag-tlp-green"},"marking-definition--f88d31f6-486f-44da-b317-01333bde0b82":{id:"marking-definition--f88d31f6-486f-44da-b317-01333bde0b82",value:"amber",css:"marking-tag-tlp-amber"},"marking-definition--5e57c739-391a-4eb3-b6be-7d15ca92d5ed":{id:"marking-definition--5e57c739-391a-4eb3-b6be-7d15ca92d5ed",value:"red",css:"marking-tag-tlp-red"},"marking-definition--94868c89-83c2-464b-929b-a1a8aa3c8487":{id:"marking-definition--94868c89-83c2-464b-929b-a1a8aa3c8487",value:"clear",css:"marking-tag-tlpv2-clear"},"marking-definition--bab4a63c-aed9-4cf5-a766-dfca5abac2bb":{id:"marking-definition--bab4a63c-aed9-4cf5-a766-dfca5abac2bb",value:"green",css:"marking-tag-tlpv2-green"},"marking-definition--55d920b0-5e8b-4f79-9ee9-91f868d9b421":{id:"marking-definition--55d920b0-5e8b-4f79-9ee9-91f868d9b421",value:"amber",css:"marking-tag-tlpv2-amber"},"marking-definition--939a9414-2ddd-4d32-a0cd-375ea402b003":{id:"marking-definition--939a9414-2ddd-4d32-a0cd-375ea402b003",value:"amber+strict",css:"marking-tag-tlpv2-amber-strict"},"marking-definition--e828b379-4e03-4974-9ac4-e53a884c97c1":{id:"marking-definition--e828b379-4e03-4974-9ac4-e53a884c97c1",value:"red",css:"marking-tag-tlpv2-red"}};return t.objects.filter((t=>"marking-definition"==t.type&&t.definition&&t.definition.tlp)).forEach((t=>{t.id in e||(e[t.id]={value:t.name,css:"marking-tag-tlp-custom"})})),e}(t);function d(t){t.data.id in c||(s.push(t),c[t.data.id]=t)}l.forEach((t=>d($g(t))));let g=[];const p={};function v(t){t.data.id in p||(g.push(t),p[t.data.id]=t)}if(h.forEach((t=>v(Kg(t)))),s.forEach((t=>function(t){const e=t.data.raw,n=[];if(!e)return n;function r(t,r){(r.endsWith("_ref")||r.endsWith("_refs"))&&("string"==typeof t?[t]:t).forEach((t=>{const i=Kg({id:"rel-"+e.id+"-"+t,source_ref:e.id,target_ref:t,relationship_type:r});n.push(i)}))}return Hn.forEach(e,r),e.extensions&&e.extensions["archive-ext"]&&e.extensions["archive-ext"].contains_refs&&r(e.extensions["archive-ext"].contains_refs,"contains_refs"),e.granular_markings&&e.granular_markings.forEach((t=>r(t.marking_ref,"marking_ref"))),n}(t).forEach(v))),g.filter((t=>!(c[t.data.source]&&c[t.data.target]))).forEach((t=>{t.data.source in f&&!(t.data.source in c)&&d(qg(f[t.data.source])),t.data.target in f&&!(t.data.target in c)&&d(qg(f[t.data.target]))})),a){const t=[],e=[];g.filter((t=>!(c[t.data.source]&&c[t.data.target]))).forEach((n=>{const{newNodes:r,newEdges:i,edgesToDelete:o}=function(t,e,n){let r=t[n.data.source],i=t[n.data.target];const o=[],a=[];let s=[];if(!r){if(n.data.source.startsWith("relationship")){const t=e[n.data.source];if(t){a.push(t);const{node:e,edges:n}=Zg(t);r=e,s=s.concat(n)}}r=r||Wg(n.data.source,n.data.raw),o.push(r)}if(!i){if(n.data.target.startsWith("relationship")){const t=e[n.data.target];if(t){a.push(t);const{node:e,edges:n}=Zg(t);i=e,s=s.concat(n)}}i=i||Wg(n.data.target,n.data.raw),o.push(i)}return{newNodes:o,newEdges:s,edgesToDelete:a}}(c,p,n);e.push(...o),t.push(...i),r.forEach(d)})),g=Hn.difference(g,e),t.forEach(v)}else g=g.filter((t=>c[t.data.source]&&c[t.data.target]));return s=s.filter((t=>!(t.data.id in u||(n.length>0&&-1==n.indexOf(t.data.id)||r.length>0&&r.indexOf(t.data.id)>-1||t.data.id.startsWith("marking-definition")&&t.data.raw.definition&&"tlp"in t.data.raw.definition&&i||t.data.id.startsWith("marking-definition")&&!o)&&(u[t.data.id]=t,1)))),g=g.filter((t=>!(u[t.data.source]||u[t.data.target]))),function(t,e,n,r){n.showTlpAsTags&&t.forEach((t=>{const e=(n=r,(i=t.data.raw).object_marking_refs&&i.object_marking_refs.length?i.object_marking_refs.filter((t=>t in n)).map((t=>n[t])):[]);var n,i;if(0==e.length)return;let o=null;e.length>1?(console.warn("More than one TLP marking for "+t.data.id+", showing the most relaxed one"),o=function(t){if(0==t.length)return;const e=["white","green","amber","red","v2-clear","v2-green","v2-amber","v2-amber-strict","v2-red"],n=t.map((t=>e.indexOf(t.value.toLowerCase()))).filter((t=>t>-1)).sort()[0],r=e[n];return t.filter((t=>t.value.toLowerCase()==r))[0]}(e)):o=e[0],o&&t.data.tags.push(o)})),n.showAttackAsTags&&t.forEach((t=>{const e=(t.data.raw,[]);if(0==e.length)return;const n=e.sort().join(", ");t.data.tags.push(n)}))}(s,0,{showTlpAsTags:i,showAttackAsTags:!0},f),s.concat(g)}(e,{highlightedObjects:i,hiddenObjects:o,showTlpAsTags:a,showMarkingNodes:s,showIdrefs:c});u.add(l),u.bundle=e,u.once("layoutstop",(()=>r&&r(t))),u.tags&&(u.tags.forEach((t=>{t.removeListeners();const e=t.element;e.parentNode&&e.parentNode.removeChild(e)})),u.tags=[]),a&&(u.tags=[],u.nodes().forEach((t=>{const e=t.data();if(!e.tags||!e.tags.length)return;const n=["right-start","right","right-end"];e.tags.slice(0,3).forEach(((e,r)=>{const i=function(t,e,n,r){const i=document.createElement("div");i.innerHTML=n.value.toUpperCase(),i.classList.add("marking-tag"),i.classList.add(n.css),r=r||"right-start";const o=e.popper({content:()=>(t.element.appendChild(i),i),popper:{placement:r}}),a=()=>{o.update();const e=Math.min(Math.max(8*t.zoom(),2),10);i.style.fontSize=e+"pt",i.style.lineHeight=Math.ceil(e)+"pt"};return e.on("position",a),t.on("pan zoom resize",a),{element:i,removeListeners:()=>{t.off("pan zoom resize",a)}}}(u,t,e,n[r]);u.tags.push(i)}))}))),t.toggleLabels(t.viewProps.showLabels),l||r&&r(t),function(t){const e=t.element.querySelector(".download-json");e&&(e.onclick=function(e){e.preventDefault(),function(t){const e=document.createElement("a");e.href="data:application/json,"+encodeURIComponent(JSON.stringify(t,null,4)),e.download=t.id+".json",e.target="_blank",e.click()}(t.bundle)});const n=t.element.querySelector(".download-png");n&&(n.onclick=function(e){e.preventDefault(),function(t,e){const n=document.createElement("a");n.href=e,n.download="graph-"+t.id+".png",n.target="_blank",n.click()}(t.bundle,t.png())})}(u),zp(u,u.layoutName||Bp),u.sidebar&&function(t){t.nodes().on("click",(e=>{e.preventDefault();const n=e.target.data();t.sidebar.innerHTML=t.sidebarRender?t.sidebarRender(n):function(t){const e=t.raw,n=Hn.template("\n \n <%= obj.type %>\n ×\n \n

<%= obj.description %>

\n

Labels: <%- (obj.labels || []).join(', ') %>

\n

External references:\n <%= (obj.external_references || [])\n .map((x) => ((x.description ? x.description + \": \": \"\")\n + (x.url || x.source_name || \"\")))\n .join('; ') %>\n

\n

Created: <%= obj.created %>

\n

ID: <%= obj.id %>

\n

\n JSON:
\n \n

\n "),r=Jg(e);return n({obj:e,nodeLabel:Qg(e),icon:r.image,color:r.color})}(n);const r=t.sidebar.querySelector(".sidebar-close-icon");r&&(r.onclick=()=>{t.sidebar.style.display="none"}),t.sidebar.style.display="block"}))}(u)}var Xp=n(5072),Wp=n.n(Xp),qp=n(7825),Zp=n.n(qp),$p=n(7659),Kp=n.n($p),Qp=n(5056),Jp=n.n(Qp),tv=n(540),ev=n.n(tv),nv=n(1113),rv=n.n(nv),iv=n(7568),ov={};ov.styleTagTransform=rv(),ov.setAttributes=Jp(),ov.insert=Kp().bind(null,"head"),ov.domAPI=Zp(),ov.insertStyleElement=ev(),Wp()(iv.A,ov),iv.A&&iv.A.locals&&iv.A.locals;const av={},sv={},cv={};function uv(t,e,n,r,i){if(t.stixViewId&&t.stixViewId in av)return av[t.stixViewId];const o=t.dataset.stixGistId,a=t.dataset.gistFile,s=t.dataset.stixUrl;let c={showIdrefs:Wd(Xd(t.dataset.showIdrefs,!1)),highlightedObjects:t.dataset.highlightedObjects?t.dataset.highlightedObjects.split(","):[],hiddenObjects:t.dataset.hiddenObjects?t.dataset.hiddenObjects.split(","):[],showTlpAsTags:Wd(Xd(t.dataset.showTlpAsTags,!0)),showMarkingNodes:Wd(Xd(t.dataset.showMarkingNodes,!0)),...r};const u={layout:t.dataset.graphLayout,caption:t.dataset.caption,showFooter:Wd(Xd(t.dataset.showFooter,!0)),showSidebar:Wd(Xd(t.dataset.showSidebar,!0)),showLabels:Wd(Xd(t.dataset.showLabels,!0)),allowDragDrop:Wd(Xd(t.dataset.stixAllowDragdrop,!1)),enableMouseZoom:Wd(Xd(t.dataset.enableMouseZoom,!0)),enablePanning:Wd(Xd(t.dataset.enablePanning,!0)),graphWidth:t.dataset.graphWidth||t.clientWidth||800,graphHeight:t.dataset.graphHeight||600,minZoom:t.dataset.minZoom,maxZoom:t.dataset.maxZoom,...i},l=t=>{Up(h,t,c,(t=>{t.toggleLoading(!1),n&&n(t)}))};let h=function(t,e,n){const{layout:r,caption:i,showFooter:o,showSidebar:a,showLabels:s,allowDragDrop:c,enableMouseZoom:u,enablePanning:l,graphWidth:h,graphHeight:f,minZoom:d,maxZoom:g,graphStyle:p,onClickNode:v,sidebarRender:b}=e,y=h||t.clientWidth||800;t=function(t,e){const{caption:n,width:r,height:i,showFooter:o}=e;t.classList.add("stix-viewer-block");const a=document.createElement("div");a.classList.add("stix-viewer"),t.appendChild(a);const s=document.createElement("div");if(s.classList.add("stix-graph"),a.appendChild(s),t.style.width=isNaN(r)&&r||r+"px",s.style.width="100%",s.style.height=isNaN(i)&&i||i+"px",n){const e=document.createElement("div");e.setAttribute("class","viewer-header"),e.innerText=n,t.insertBefore(e,t.firstChild)}if(o){const e=document.createElement("div");e.setAttribute("class","viewer-footer"),e.innerHTML='\n made with Stixview\n \n STIX2 \n PNG\n \n ',t.appendChild(e)}return t}(t,{width:y,height:f||600,caption:i,showFooter:o});const w=t.querySelector(".stix-viewer");var m,x;c&&(w.querySelector(".stix-graph").innerHTML="
Drag and drop STIX2 json file here
",x=t=>n(t),(m=t).addEventListener("dragover",(t=>{t.stopPropagation(),t.preventDefault(),m.classList.add("dragover-active"),t.dataTransfer.dropEffect="copy"})),m.addEventListener("dragleave",(t=>{t.stopPropagation(),t.preventDefault(),m.classList.remove("dragover-active")})),m.addEventListener("drop",(t=>{t.stopPropagation(),t.preventDefault(),m.classList.remove("dragover-active");const e=t.dataTransfer.files;e.length>1&&console.error("More than 1 file dropped, picking the first one",e),0!=e.lengh&&qd(e[0],x)})));const E=Cd({style:p||Yp,userZoomingEnabled:u,userPanningEnabled:l});if(E.stixviewContainer=w.querySelector(".stix-graph"),E.minZoom(d||.3),E.maxZoom(g||2.5),a){const t=document.createElement("div");t.setAttribute("class","sidebar"),w.appendChild(t),E.sidebar=t}v&&E.on("click","node",(t=>{t.preventDefault();const e=t.target.data();v(e)})),E.layoutName=r,E.stixId=t.dataset.stixViewId,E.element=t,E.sidebarRender=b;const _={cy:E,element:t,viewProps:{showLabels:s},runLayout:t=>zp(E,t),toggleLabels:t=>{E.style().selector("node").style("label",t?"data(label)":"").update()},fit:()=>E.fit(),toggleLoading:e=>{e?(t.classList.add("loading"),Vp(t)):t.classList.remove("loading")},setSidebarRender:()=>{E.sidebarRender=b}};return E.resize(),_}(t,u,l);return h={...h,dataProps:c,viewProps:u,loadData:l,loadDataFromFile:function(t){t&&"application/json"==t.type&&(h.toggleLoading(!0),qd(t,l))},loadDataFromParamUrl:function(t){h.toggleLoading(!0),function(t){return Ud(new URL(window.location.href).searchParams.get(t))}(t).then(l,(e=>{h.toggleLoading(!1),console.error("Can not load a url from a parameter "+t,e)}))},loadDataFromGist:function(t,e){h.toggleLoading(!0),function(t,e){const n="https://api.github.com/gists/"+t,r=zd[n]||new Promise((function(t,r){Vd(n,(function(n){e=e||Object.keys(n.files)[0];const r=n.files[e];t(JSON.parse(r.content))}),r)}));return zd[n]=r,r}(t,e).then(l,(e=>{h.toggleLoading(!1),console.error("Can not load gist "+t,e)}))},loadDataFromUrl:function(t){h.toggleLoading(!0),Ud(t).then(l,(e=>{h.toggleLoading(!1),console.error("Can not load data from url "+t,e)}))},reloadData:function(t,e,r){setTimeout((()=>{e=e||h.cy.bundle,c={...c,...t},Up(h,e,c,n),r&&r()}),20)},setSidebarRender:function(t){h.setSidebarRender(t)}},e&&e(h),(o||s)&&setTimeout((()=>{o?h.loadDataFromGist(o,a):s&&h.loadDataFromUrl(s)}),20),t.dataset.stixViewId=Math.random().toString(16).slice(2),av[t.dataset.stixViewId]=h,t.stixViewId=t.dataset.stixViewId,h}function lv(t,e){const n=[];return Hn.keys(t).forEach((function(r){e.matches(r)&&n.push(t[r])})),n}"undefined"!=typeof window&&(window.addEventListener("load",(()=>{document.querySelectorAll("[data-stix-gist-id],[data-stix-url],[data-stix-allow-dragdrop]").forEach((t=>{uv(t,(e=>lv(sv,t).forEach((t=>t(e)))),(e=>lv(cv,t).forEach((t=>t(e)))))}))})),window.stixview={registry:av,onInit:function(t,e){sv[t]=e},onLoad:function(t,e){cv[t]=e},init:uv})})()})(); \ No newline at end of file +(()=>{var t={2:(t,e,n)=>{var r=n(2199),i=n(4664),o=n(5950);t.exports=function(t){return r(t,o,i)}},79:(t,e,n)=>{var r=n(3702),i=n(80),o=n(4739),a=n(8655),s=n(1175);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var r=n(6025),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))}},104:(t,e,n)=>{var r=n(3661);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},117:(t,e,n)=>{var r;try{r={clone:n(2629),constant:n(7334),each:n(6135),filter:n(7612),has:n(1448),isArray:n(6449),isEmpty:n(2193),isFunction:n(1882),isUndefined:n(2216),keys:n(5950),map:n(5378),reduce:n(860),size:n(7091),transform:n(9752),union:n(299),values:n(5880)}}catch(t){}r||(r=window._),t.exports=r},124:(t,e,n)=>{var r=n(9325);t.exports=function(){return r.Date.now()}},135:(t,e,n)=>{var r=n(6857),i=n(3988);function o(t,e,n,r,o,a){var s={width:0,height:0,rank:a,borderType:e},c=o[e][a-1],u=i.addDummyNode(t,"border",s,n);o[e][a]=u,t.setParent(u,r),c&&t.setEdge(c,u,{weight:1})}t.exports=function(t){r.forEach(t.children(),function e(n){var i=t.children(n),a=t.node(n);if(i.length&&r.forEach(i,e),r.has(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var s=a.minRank,c=a.maxRank+1;s{t.exports=''},181:t=>{t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},270:(t,e,n)=>{var r=n(7068),i=n(346);t.exports=function t(e,n,o,a,s){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,o,a,t,s))}},289:(t,e,n)=>{var r=n(2651);t.exports=function(t){return r(this,t).get(t)}},294:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},299:(t,e,n)=>{var r=n(3120),i=n(9302),o=n(5765),a=n(3693),s=i(function(t){return o(r(t,1,a,!0))});t.exports=s},317:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}},346:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},361:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t{t.exports=''},392:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},423:(t,e,n)=>{var r=n(6110)(n(9325),"Promise");t.exports=r},426:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t,n){return null!=t&&e.call(t,n)}},436:t=>{t.exports=''},498:(t,e,n)=>{var r=n(9888);t.exports=function(t){try{r(t)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},514:(t,e,n)=>{var r=n(4932);t.exports=function(t,e){return r(e,function(e){return t[e]})}},540:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},583:(t,e,n)=>{var r=n(7237),i=n(7255),o=n(8586),a=n(7797);t.exports=function(t){return o(t)?r(a(t)):i(t)}},631:(t,e,n)=>{var r=n(8077),i=n(9326);t.exports=function(t,e){return null!=t&&i(t,e,r)}},641:(t,e,n)=>{var r=n(6649),i=n(5950);t.exports=function(t,e){return t&&r(t,e,i)}},659:(t,e,n)=>{var r=n(1873),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=a.call(t);return r&&(e?t[s]=n:delete t[s]),i}},687:t=>{t.exports=''},689:(t,e,n)=>{var r=n(2),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,o,a,s){var c=1&n,u=r(t),l=u.length;if(l!=r(e).length&&!c)return!1;for(var h=l;h--;){var f=u[h];if(!(c?f in e:i.call(e,f)))return!1}var d=s.get(t),g=s.get(e);if(d&&g)return d==e&&g==t;var p=!0;s.set(t,e),s.set(e,t);for(var v=c;++h{var r=n(8096),i=n(2428),o=n(6449),a=n(3656),s=n(361),c=n(7167),u=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),l=!n&&i(t),h=!n&&!l&&a(t),f=!n&&!l&&!h&&c(t),d=n||l||h||f,g=d?r(t.length,String):[],p=g.length;for(var v in t)!e&&!u.call(t,v)||d&&("length"==v||h&&("offset"==v||"parent"==v)||f&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,p))||g.push(v);return g}},756:(t,e,n)=>{var r=n(3805);t.exports=function(t){return t==t&&!r(t)}},776:(t,e,n)=>{var r=n(756),i=n(5950);t.exports=function(t){for(var e=i(t),n=e.length;n--;){var o=e[n],a=t[o];e[n]=[o,a,r(a)]}return e}},860:(t,e,n)=>{var r=n(882),i=n(909),o=n(5389),a=n(5558),s=n(6449);t.exports=function(t,e,n){var c=s(t)?r:a,u=arguments.length<3;return c(t,o(e,4),n,u,i)}},865:t=>{t.exports=''},882:t=>{t.exports=function(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i{var r=n(641),i=n(8329)(r);t.exports=i},938:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},945:(t,e,n)=>{var r=n(79),i=n(8223),o=n(3661);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(t,e),this.size=n.size,this}},999:(t,e,n)=>{var r=n(9302),i=n(6800);t.exports=function(t){return r(function(e,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++r{t.exports=''},1002:t=>{t.exports=''},1033:t=>{t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},1042:(t,e,n)=>{var r=n(6110)(Object,"create");t.exports=r},1045:(t,e,n)=>{var r=n(9276);t.exports=function(t,e){return r(t,e,"post")}},1095:function(t,e,n){var r;r=function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},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=3)}([function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(1),o=n(2),a=n(5)||("undefined"!=typeof window?window.cola:null),s=n(4),c=function(t){return(void 0===t?"undefined":r(t))===r(0)},u=function(){},l=function(t,e){return function(t){return null!=t&&(void 0===t?"undefined":r(t))===r(function(){})}(t)?t.apply(e,[e]):t};function h(t){this.options=i({},o,t)}h.prototype.run=function(){var t=this,e=this.options;t.manuallyStopped=!1;var n=e.cy,i=e.eles,o=i.nodes(),h=i.edges(),f=!1,d=o.filter(function(t){return t.isParent()}),g=o.subtract(d),p=e.boundingBox||{x1:0,y1:0,w:n.width(),h:n.height()};void 0===p.x2&&(p.x2=p.x1+p.w),void 0===p.w&&(p.w=p.x2-p.x1),void 0===p.y2&&(p.y2=p.y1+p.h),void 0===p.h&&(p.h=p.y2-p.y1);var v=function(){for(var t=0;t0&&m.constraints(N),m.groups(d.map(function(t,n){var r=l(e.nodeSpacing,t),i=function(e){return parseFloat(t.style("padding-"+e))},o=i("left")+r,a=i("right")+r,s=i("top")+r,c=i("bottom")+r;return t.scratch().cola={index:n,padding:Math.max(o,a,s,c),leaves:t.children().intersection(g).map(function(t){return t[0].scratch().cola.index}),fixed:t.locked()},t}).map(function(t){return t.scratch().cola.groups=t.children().intersection(d).map(function(t){return t.scratch().cola.index}),t.scratch().cola}));var C=void 0,T=void 0;if(null!=e.edgeLength?(C=e.edgeLength,T="linkDistance"):null!=e.edgeSymDiffLength?(C=e.edgeSymDiffLength,T="symmetricDiffLinkLengths"):null!=e.edgeJaccardLength?(C=e.edgeJaccardLength,T="jaccardLinkLengths"):(C=100,T="linkDistance"),m.links(h.stdFilter(function(t){return g.contains(t.source())&&g.contains(t.target())}).map(function(t){var e=t.scratch().cola={source:t.source()[0].scratch().cola.index,target:t.target()[0].scratch().cola.index};return null!=C&&(e.calcLength=l(C,t)),e})),m.size([p.w,p.h]),null!=C&&m[T](function(t){return t.calcLength}),e.flow){var A=void 0;!function(t){return(void 0===t?"undefined":r(t))===r("")}(e.flow)?c(e.flow)?A={axis:"y",minSeparation:e.flow}:function(t){return null!=t&&(void 0===t?"undefined":r(t))===r({})}(e.flow)?((A=e.flow).axis=A.axis||"y",A.minSeparation=null!=A.minSeparation?A.minSeparation:50):A={axis:"y",minSeparation:50}:A={axis:e.flow,minSeparation:50},m.flowLayout(A.axis,A.minSeparation)}return t.trigger({type:"layoutstart",layout:t}),m.avoidOverlaps(e.avoidOverlap).handleDisconnected(e.handleDisconnected).start(e.unconstrIter,e.userConstIter,e.allConstIter,void 0,void 0,e.centerGraph),e.infinite||setTimeout(function(){t.manuallyStopped||m.stop()},e.maxSimulationTime),this},h.prototype.stop=function(){return this.adaptor&&(this.manuallyStopped=!0,this.adaptor.stop()),this},t.exports=h},function(t,e,n){"use strict";t.exports=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},1166:(t,e,n)=>{t.exports={Graph:n(6454),version:n(4458)}},1175:(t,e,n)=>{var r=n(6025);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},1203:function(t){var e;e=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},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=11)}([function(t,e,n){"use strict";t.exports=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r1&&(c.velocity.x=l/f,c.velocity.y=h/f),r=e*c.velocity.x,o=e*c.velocity.y,c.pos.x+=r,c.pos.y+=o,i+=Math.abs(r),a+=Math.abs(o)}}return(i*i+a*a)/s}}},function(t,e,n){"use strict";var r=n(9),i=n(8),o=function(t,e){var n=Math.abs(t.x-e.x),r=Math.abs(t.y-e.y);return n<1e-8&&r<1e-8};function a(t,e){return 0===e?t.quad0:1===e?t.quad1:2===e?t.quad2:3===e?t.quad3:null}function s(t,e,n){0===e?t.quad0=n:1===e?t.quad1=n:2===e?t.quad2=n:3===e&&(t.quad3=n)}t.exports={makeQuadtree:function(){var t=[],e=new i,n=[],c=0,u=l();function l(){var t=n[c];return t?(t.quad0=null,t.quad1=null,t.quad2=null,t.quad3=null,t.body=null,t.mass=t.massX=t.massY=0,t.left=t.right=t.top=t.bottom=0):(t=new r,n[c]=t),++c,t}function h(t){for(e.reset(),e.push(u,t);!e.isEmpty();){var n=e.pop(),r=n.node,i=n.body;if(r.body){var c=r.body;if(r.body=null,o(c.pos,i.pos)){var h=3;do{var f=Math.random(),d=(r.right-r.left)*f,g=(r.bottom-r.top)*f;c.pos.x=r.left+d,c.pos.y=r.top+g,h-=1}while(h>0&&o(c.pos,i.pos));if(0===h&&o(c.pos,i.pos))return}e.push(r,c),e.push(r,i)}else{var p=i.pos.x,v=i.pos.y;r.mass=r.mass+i.mass,r.massX=r.massX+i.mass*p,r.massY=r.massY+i.mass*v;var b=0,y=r.left,w=(r.right+y)/2,m=r.top,x=(r.bottom+m)/2;p>w&&(b+=1,y=w,w=r.right),v>x&&(b+=2,m=x,x=r.bottom);var E=a(r,b);E?e.push(E,i):((E=l()).left=y,E.top=m,E.right=w,E.bottom=x,E.body=i,s(r,b,E))}}}return{insertBodies:function(t){if(0!==t.length){var e=Number.MAX_VALUE,n=Number.MAX_VALUE,r=Number.MIN_VALUE,i=Number.MIN_VALUE,o=void 0,a=t.length;for(o=a;o--;){var s=t[o].pos.x,f=t[o].pos.y;sr&&(r=s),fi&&(i=f)}var d=r-e,g=i-n;for(d>g?i=n+d:r=e+g,c=0,(u=l()).left=e,u.right=r,u.top=n,u.bottom=i,(o=a-1)>=0&&(u.body=t[o]);o--;)h(t[o])}},updateBodyForce:function(e,n,r,i){var o=t,a=void 0,s=void 0,c=void 0,l=void 0,h=0,f=0,d=1,g=0,p=1;o[0]=u,function(t){t.x=0,t.y=0}(e.force);var v=-e.pos.x,b=-e.pos.y,y=Math.sqrt(v*v+b*b),w=e.mass*i/y;for(h+=w*v,f+=w*b;d;){var m=o[g],x=m.body;d-=1,g+=1;var E=x!==e;x&&E?(s=x.pos.x-e.pos.x,c=x.pos.y-e.pos.y,0===(l=Math.sqrt(s*s+c*c))&&(s=(Math.random()-.5)/50,c=(Math.random()-.5)/50,l=Math.sqrt(s*s+c*c)),h+=(a=n*x.mass*e.mass/(l*l*l))*s,f+=a*c):E&&(s=m.massX/m.mass-e.pos.x,c=m.massY/m.mass-e.pos.y,0===(l=Math.sqrt(s*s+c*c))&&(s=(Math.random()-.5)/50,c=(Math.random()-.5)/50,l=Math.sqrt(s*s+c*c)),(m.right-m.left)/l0)return this.stack[--this.popIdx]},reset:function(){this.popIdx=0}}},function(t,e,n){"use strict";t.exports=function(){this.body=null,this.quad0=null,this.quad1=null,this.quad2=null,this.quad3=null,this.mass=0,this.massX=0,this.massY=0,this.left=0,this.top=0,this.bottom=0,this.right=0}},function(t,e,n){"use strict";var r=n(6).integrate,i=n(5).applyDrag,o=n(1).applySpring;t.exports={tick:function(t){var e=t.bodies,n=t.springs,a=t.quadtree,s=t.timeStep,c=t.gravity,u=t.theta,l=t.dragCoeff,h=t.pull;e.forEach(function(t){var e=t._scratch;e&&(t.locked=e.locked,t.grabbed=e.grabbed,t.pos.x=e.x,t.pos.y=e.y)}),a.insertBodies(e);for(var f=0;f=e.maxIterations||r>=e.maxSimulationTime)};t.exports={tick:i,multitick:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r,o=!1,a=t,s=0;s{t.exports=function(t,e,n){for(var r=-1,i=t.length,o=e.length,a={};++r{t.exports=''},1331:(t,e,n)=>{var r=n(2552),i=n(8879),o=n(346),a=Function.prototype,s=Object.prototype,c=a.toString,u=s.hasOwnProperty,l=c.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=u.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==l}},1380:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},1420:(t,e,n)=>{var r=n(79);t.exports=function(){this.__data__=new r,this.size=0}},1448:(t,e,n)=>{var r=n(426),i=n(9326);t.exports=function(t,e){return null!=t&&i(t,e,r)}},1453:(t,e,n)=>{"use strict";var r=n(6857),i=n(8918),o=n(6639),a=n(4520),s=n(7860),c=n(4384),u=n(8191).Graph,l=n(3988);function h(t,e,n){return r.map(e,function(e){return s(t,e,n)})}function f(t,e){var n=new u;r.forEach(t,function(t){var i=t.graph().root,o=a(t,i,n,e);r.forEach(o.vs,function(e,n){t.node(e).order=n}),c(t,n,o.vs)})}function d(t,e){r.forEach(e,function(e){r.forEach(e,function(e,n){t.node(e).order=n})})}t.exports=function(t){var e=l.maxRank(t),n=h(t,r.range(1,e+1),"inEdges"),a=h(t,r.range(e-1,-1,-1),"outEdges"),s=i(t);d(t,s);for(var c,u=Number.POSITIVE_INFINITY,g=0,p=0;p<4;++g,++p){f(g%2?n:a,g%4>=2),s=l.buildLayerMatrix(t);var v=o(t,s);v{t.exports=function(t){return this.__data__.has(t)}},1489:(t,e,n)=>{var r=n(7400);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},1549:(t,e,n)=>{var r=n(2032),i=n(3862),o=n(6721),a=n(2749),s=n(5749);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{t.exports=''},1601:t=>{"use strict";t.exports=function(t){return t[1]}},1667:(t,e,n)=>{t.exports={components:n(3619),dijkstra:n(8905),dijkstraAll:n(4919),findCycles:n(6678),floydWarshall:n(3590),isAcyclic:n(498),postorder:n(1045),preorder:n(6016),prim:n(4423),tarjan:n(6291),topsort:n(9888)}},1684:(t,e,n)=>{var r=n(3599),i=n(6176),o=n(3488);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},1737:(t,e,n)=>{var r=n(117);function i(){this._arr=[],this._keyIndices={}}t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map(function(t){return t.key})},i.prototype.has=function(t){return r.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,o=i.length;return n[t]=o,i.push({key:t,priority:e}),this._decrease(o),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},i.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},i.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n>1].priority{var r=n(6449),i=n(8586),o=n(1802),a=n(3222);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:o(a(t))}},1781:function(t,e,n){var r;r=function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},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=6)}([function(e,n){e.exports=t},function(t,e,n){"use strict";var r=n(0).LGraph;function i(t,e,n){r.call(this,t,e,n),this.inOrder=void 0,this.currentIndex=0,this.nodeSeparation=void 0,this.stack=[],this.perimeter=0,this.centerX=0,this.centerY=0,this.radius=0}for(var o in i.prototype=Object.create(r.prototype),r)i[o]=r[o];i.prototype.initOrdering=function(){this.inOrder=[]},i.prototype.getOrder=function(){return this.inOrder},i.prototype.getCenterX=function(){return this.centerX},i.prototype.getCenterY=function(){return this.centerY},i.prototype.getRadius=function(){return this.radius},i.prototype.getSize=function(){return this.getNodes().length},i.prototype.getTotalCrossingOfCircle=function(){var t=0;for(var e in this.inOrder){var n=e.getTotalCrossingOfEdges();if(-1===n)return-1;t+=n}return t/4},i.prototype.hasFinishedOrdering=function(){return this.currentIndex===this.getNodes().length},i.prototype.getNodeSeparation=function(){return this.nodeSeparation},i.prototype.setNodeSeparation=function(t){this.nodeSeparation=t},i.prototype.correctAngles=function(){var t=this;t.currentIndex=0,t.inOrder.forEach(function(e){return t.putInOrder(e)})},i.prototype.putInOrder=function(t){for(var e=this,n=e.getNodes(),r=!1,i=0;i=0;i--){var o=r[i];o.isOrdered()||t.stack.push(o)}return e},i.prototype.calculateRadius=function(){var t=this,e=0;t.getNodes().forEach(function(t){return e+=Math.sqrt(t.getWidth()*t.getWidth()+t.getHeight()*t.getHeight())}),t.perimeter=e+t.getNodes().length*t.nodeSeparation;var n=t.perimeter/(2*Math.PI);t.getParent().setWidth(2*n),t.getParent().setHeight(2*n),t.getParent().setCenter(t.getParent().getWidth(),t.getParent().getHeight()),t.centerX=t.getParent().getCenterX(),t.centerY=t.getParent().getCenterY(),t.radius=t.getParent().getHeight()/2},i.prototype.calculateEdgeCrossingsOfNodes=function(){this.getNodes().forEach(function(t){return t.calculateTotalCrossing()})},i.prototype.loadOldIndicesOfNodes=function(){for(var t=0;tMath.min(a,s)&&0!==s&&0!==a},i.prototype.crossingWithEdge=function(t){return this.crossesWithEdge(t)?1:0},i.prototype.calculateTotalCrossingWithList=function(t){var e=this,n=0;return t.forEach(function(t){return n+=e.crossingWithEdge(t)}),n},t.exports=i},function(t,e,n){"use strict";var r=n(0).LNode;function i(t,e,n,i){void 0!==n&&void 0!==i?r.call(this,t,e,n,i):r.call(this,t,e),this.angle=0,this.circleIndex=-1,this.totalCrossingOfEdges=-1,this.isCrossingNumberValid=!1}for(var o in n(0).Quicksort,i.prototype=Object.create(r.prototype),r)i[o]=r[o];i.prototype.getCircle=function(){return this.getOwner()},i.prototype.setIndex=function(t){this.circleIndex=t,this.isCrossingNumberValid=!1},i.prototype.getIndex=function(){return this.circleIndex},i.prototype.getNeighborsSortedByDegree=function(){var t=Array.from(this.getNeighborsList());return(t=t.filter(function(t){return-1===t.getIndex()})).sort(function(t,e){return t.getDegree()-e.getDegree()}),t},i.prototype.getDegree=function(){return this.getEdges().length},i.prototype.isOrdered=function(){return this.getIndex()>-1},i.prototype.setAngle=function(t){this.angle=t},i.prototype.getAngle=function(){return this.angle},i.prototype.getCircDistWithTheNode=function(t){var e=this,n=t.getIndex();if(-1===n||-1===e.getIndex())return-1;var r=e.getIndex()-n;return r<0&&(r+=e.getCircle().getSize()),r},i.prototype.getCrossingNumberWithNode=function(t){var e=0;return this.getEdges().forEach(function(n){t.getEdges().forEach(function(t){e+=n.crossingWithEdge(t)})}),e},i.prototype.getTotalCrossingOfEdges=function(){var t=this;return t.isCrossingNumberValid||(t.calculateTotalCrossing(),t.isCrossingNumberValid=!0),t.totalCrossingOfEdges},i.prototype.calculateTotalCrossing=function(){var t=this,e=0,n=[];n.push.apply(n,t.getCircle().getEdges()),n=n.filter(function(e){return t.getEdges().indexOf(e)<0}),t.getEdges().forEach(function(t){return e+=t.calculateTotalCrossingWithList(n)}),t.totalCrossingOfEdges=e},t.exports=i},function(t,e,n){"use strict";var r=n(0).Layout,i=n(2),o=n(1),a=n(4),s=n(3);function c(){r.call(this),this.nodeSeparation=i.DEFAULT_NODE_SEPARATION}for(var u in c.prototype=Object.create(r.prototype),r)c[u]=r[u];c.prototype.newGraph=function(t){return this.avsdfCircle=new o(null,this.graphManager,t),this.avsdfCircle},c.prototype.newNode=function(t){return new a(this.graphManager,t)},c.prototype.newEdge=function(t){return new s(null,null,t)},c.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},n=0;n1)return!1;var t=this.avsdfCircle;for(t.setNodeSeparation(this.nodeSeparation),t.calculateRadius(),t.initOrdering();!t.hasFinishedOrdering();){var e=t.findNodeToPlace();t.putInOrder(e)}return!0},c.prototype.updateNodeAngles=function(){this.graphManager.getRoot().correctAngles()},c.prototype.updateNodeCoordinates=function(){var t=this.graphManager.getRoot();t.getNodes().forEach(function(e){e.setCenter(t.getCenterX()+t.getRadius()*Math.cos(e.getAngle()),t.getCenterY()+t.getRadius()*Math.sin(e.getAngle()))})},c.prototype.initPostProcess=function(){this.avsdfCircle.calculateEdgeCrossingsOfNodes();var t=this.avsdfCircle.getNodes();return t.sort(function(t,e){return e.getTotalCrossingOfEdges()-t.getTotalCrossingOfEdges()}),t},c.prototype.oneStepPostProcess=function(t){for(var e=this,n=t.getTotalCrossingOfEdges(),r=void 0,i=Array.from(t.getNeighborsList()),o=0;o=n?e.avsdfCircle.loadOldIndicesOfNodes():(e.avsdfCircle.reOrderVertices(),n=r)}}},t.exports=c},function(t,e,n){"use strict";var r={};r.layoutBase=n(0),r.AVSDFConstants=n(2),r.AVSDFEdge=n(3),r.AVSDFCircle=n(1),r.AVSDFLayout=n(5),r.AVSDFNode=n(4),t.exports=r}])},t.exports=r(n(3143))},1791:(t,e,n)=>{var r=n(6547),i=n(3360);t.exports=function(t,e,n,o){var a=!n;n||(n={});for(var s=-1,c=e.length;++s{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=10,r=(1+Math.sqrt(5))/2,i=1e-4;e.applyPacking=function(t,e,o,a,s,c){void 0===s&&(s=1),void 0===c&&(c=!0);var u=e,l=o,h=(s=void 0!==s?s:1,a=void 0!==a?a:0,0),f=0,d=0,g=0,p=[];function v(t,e){p=[],h=0,f=0,g=0;for(var n=0;n=t.height&&p[o].x+p[o].width+t.width+n-e<=i){r=p[o];break}p.push(t),void 0!==r?(t.x=r.x+r.width+n,t.y=r.bottom,t.space_left=t.height,t.bottom=t.y,r.space_left-=t.height+n,r.bottom+=t.height+n):(t.y=g,g+=t.height+n,t.x=0,t.bottom=t.y,t.space_left=t.height),t.y+t.height-f>-1e-4&&(f=t.y+t.height-0),t.x+t.width-h>-1e-4&&(h=t.x+t.width-0)}0!=t.length&&(function(t){t.forEach(function(t){var e,n,r,i,o;e=t,n=Number.MAX_VALUE,r=Number.MAX_VALUE,i=0,o=0,e.array.forEach(function(t){var e=void 0!==t.width?t.width:a,s=void 0!==t.height?t.height:a;e/=2,s/=2,i=Math.max(t.x+e,i),n=Math.min(t.x-e,n),o=Math.max(t.y+s,o),r=Math.min(t.y-s,r)}),e.width=i-n,e.height=o-r})}(t),function(t){var e=Number.POSITIVE_INFINITY,o=0;t.sort(function(t,e){return e.height-t.height});for(var a=p=d=t.reduce(function(t,e){return t.widthd||g>i;){if(1!=h){var p=s-(s-a)/r;u=v(t,p)}if(0!=h){var b=a+(s-a)/r;l=v(t,b)}if(f=Math.abs(p-b),g=Math.abs(u-l),ul?(a=p,p=b,u=l,h=1):(s=b,b=p,l=u,h=0),c++>100)break}v(t,o)}(t),c&&function(t){t.forEach(function(t){var e={x:0,y:0};t.array.forEach(function(t){e.x+=t.x,e.y+=t.y}),e.x/=t.array.length,e.y/=t.array.length;var n=e.x-t.width/2,r=e.y-t.height/2,i=t.x-n+u/2-h/2,o=t.y-r+l/2-f/2;t.array.forEach(function(t){t.x+=i,t.y+=o})})}(t))},e.separateGraphs=function(t,e){for(var n={},r={},i=[],o=0,a=0;a{var r=n(7217),i=n(270);t.exports=function(t,e,n,o){var a=n.length,s=a,c=!o;if(null==t)return!s;for(t=Object(t);a--;){var u=n[a];if(c&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++a{var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},1802:(t,e,n)=>{var r=n(2224),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=r(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,function(t,n,r,i){e.push(r?i.replace(o,"$1"):n||t)}),e});t.exports=a},1810:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(2893),a=function(){};e.Point=a;var s=function(t,e,n,r){this.x1=t,this.y1=e,this.x2=n,this.y2=r};e.LineSegment=s;var c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(a);function u(t,e,n){return(e.x-t.x)*(n.y-t.y)-(n.x-t.x)*(e.y-t.y)}function l(t,e,n){return u(t,e,n)>0}function h(t,e,n){return u(t,e,n)<0}function f(t,e){var n=e.slice(0);return n.push(e[0]),{rtan:d(t,n),ltan:g(t,n)}}function d(t,e){var n,r,i,o,a=e.length-1;if(h(t,e[1],e[0])&&!l(t,e[a-1],e[0]))return 0;for(n=0,r=a;;){if(r-n===1)return l(t,e[n],e[r])?n:r;if((o=h(t,e[(i=Math.floor((n+r)/2))+1],e[i]))&&!l(t,e[i-1],e[i]))return i;l(t,e[n+1],e[n])?o||l(t,e[n],e[i])?r=i:n=i:o&&h(t,e[n],e[i])?r=i:n=i}}function g(t,e){var n,r,i,o,a=e.length-1;if(l(t,e[a-1],e[0])&&!h(t,e[1],e[0]))return 0;for(n=0,r=a;;){if(r-n===1)return h(t,e[n],e[r])?n:r;if(o=h(t,e[(i=Math.floor((n+r)/2))+1],e[i]),l(t,e[i-1],e[i])&&!o)return i;h(t,e[n+1],e[n])?o?h(t,e[n],e[i])?r=i:n=i:r=i:o?n=i:l(t,e[n],e[i])?r=i:n=i}}function p(t,e,n,r,i,o){var a,s;s=r(t[a=n(e[0],t)],e);for(var c=!1;!c;){for(c=!0;a===t.length-1&&(a=0),!i(e[s],t[a],t[a+1]);)++a;for(;0===s&&(s=e.length-1),!o(t[a],e[s],e[s-1]);)--s,c=!1}return{t1:a,t2:s}}function v(t,e){return p(t,e,d,g,l,h)}e.PolyPoint=c,e.isLeft=u,e.ConvexHull=function(t){var e,n=t.slice(0).sort(function(t,e){return t.x!==e.x?e.x-t.x:e.y-t.y}),r=t.length,i=n[0].x;for(e=1;e=0&&n[e].x===l;e--);for(s=e+1,e=o;++e<=s;)if(!(u(n[0],n[s],n[e])>=0&&e1&&!(u(a[a.length-2],a[a.length-1],n[e])>0);)a.length-=1;0!=e&&a.push(n[e])}c!=s&&a.push(n[c]);var h=a.length;for(e=s;--e>=o;)if(!(u(n[c],n[o],n[e])>=0&&e>o)){for(;a.length>h&&!(u(a[a.length-2],a[a.length-1],n[e])>0);)a.length-=1;0!=e&&a.push(n[e])}}return a},e.clockwiseRadialSweep=function(t,e,n){e.slice(0).sort(function(e,n){return Math.atan2(e.y-t.y,e.x-t.x)-Math.atan2(n.y-t.y,n.x-t.x)}).forEach(n)},e.tangent_PolyPolyC=p,e.LRtangent_PolyPolyC=function(t,e){var n=v(e,t);return{t1:n.t2,t2:n.t1}},e.RLtangent_PolyPolyC=v,e.LLtangent_PolyPolyC=function(t,e){return p(t,e,g,g,h,h)},e.RRtangent_PolyPolyC=function(t,e){return p(t,e,d,d,l,l)};var b=function(t,e){this.t1=t,this.t2=e};e.BiTangent=b;var y=function(){};e.BiTangents=y;var w=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(a);e.TVGPoint=w;var m=function(t,e,n,r){this.id=t,this.polyid=e,this.polyvertid=n,this.p=r,r.vv=this};e.VisibilityVertex=m;var x=function(){function t(t,e){this.source=t,this.target=e}return t.prototype.length=function(){var t=this.source.p.x-this.target.p.x,e=this.source.p.y-this.target.p.y;return Math.sqrt(t*t+e*e)},t}();e.VisibilityEdge=x;var E=function(){function t(t,e){if(this.P=t,this.V=[],this.E=[],e)this.V=e.V.slice(0),this.E=e.E.slice(0);else{for(var n=t.length,r=0;r0&&this.E.push(new x(i[o-1].vv,s))}i.length>1&&this.E.push(new x(i[0].vv,i[i.length-1].vv))}for(r=0;r0)return!0;return!1},t}();function _(t,e){for(var n=[],r=1,i=e.length;r=0&&p>=0&&v<0&&w>=0&&m>=0&&x<0?i.ll=new b(o,a):g<=0&&p<=0&&v>0&&w<=0&&m<=0&&x>0?i.rr=new b(o,a):g<=0&&p>0&&v<=0&&w>=0&&m<0&&x>=0?i.rl=new b(o,a):g>=0&&p<0&&v>=0&&w<=0&&m>0&&x<=0&&(i.lr=new b(o,a))}return i}function N(t,e){return!t.every(function(t){return!function(t,e){for(var n=1,r=e.length;n0)return!0}return!1}},1811:t=>{var e=Date.now;t.exports=function(t){var n=0,r=0;return function(){var i=e(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},1873:(t,e,n)=>{var r=n(9325).Symbol;t.exports=r},1882:(t,e,n)=>{var r=n(2552),i=n(3805);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1924:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(2128),a=function(t){function e(e){var n=t.call(this)||this;n.d3Context=e,n.event=e.dispatch(o.EventType[o.EventType.start],o.EventType[o.EventType.tick],o.EventType[o.EventType.end]);var r=n;return n.drag=function(){if(!t)var t=e.drag().subject(o.Layout.dragOrigin).on("start.d3adaptor",o.Layout.dragStart).on("drag.d3adaptor",function(t){o.Layout.drag(t,e.event),r.resume()}).on("end.d3adaptor",o.Layout.dragEnd);if(!arguments.length)return t;arguments[0].call(t)},n}return i(e,t),e.prototype.trigger=function(t){var e={type:o.EventType[t.type],alpha:t.alpha,stress:t.stress};this.event.call(e.type,e)},e.prototype.kick=function(){var e=this,n=this.d3Context.timer(function(){return t.prototype.tick.call(e)&&n.stop()})},e.prototype.on=function(t,e){return"string"==typeof t?this.event.on(t,e):this.event.on(o.EventType[t],e),this},e}(o.Layout);e.D3StyleLayoutAdaptor=a},1961:(t,e,n)=>{var r=n(9653);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},1986:(t,e,n)=>{var r=n(1873),i=n(7828),o=n(5288),a=n(5911),s=n(317),c=n(4247),u=r?r.prototype:void 0,l=u?u.valueOf:void 0;t.exports=function(t,e,n,r,u,h,f){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!h(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var d=s;case"[object Set]":var g=1&r;if(d||(d=c),t.size!=e.size&&!g)return!1;var p=f.get(t);if(p)return p==e;r|=2,f.set(t,e);var v=a(d(t),d(e),r,u,h,f);return f.delete(t),v;case"[object Symbol]":if(l)return l.call(t)==l.call(e)}return!1}},1993:(t,e,n)=>{var r=n(9811),i=n(9698),o=n(7927);t.exports=function(t){return i(t)?o(t):r(t)}},2006:(t,e,n)=>{var r=n(5389),i=n(4894),o=n(5950);t.exports=function(t){return function(e,n,a){var s=Object(e);if(!i(e)){var c=r(n,3);e=o(e),n=function(t){return c(s[t],t,s)}}var u=t(e,n,a);return u>-1?s[c?e[u]:u]:void 0}}},2031:(t,e,n)=>{var r=n(6857),i=n(8191).Graph,o=n(9859);t.exports=function(t,e){if(t.nodeCount()<=1)return[];var n=function(t,e){var n=new i,a=0,s=0;r.forEach(t.nodes(),function(t){n.setNode(t,{v:t,in:0,out:0})}),r.forEach(t.edges(),function(t){var r=n.edge(t.v,t.w)||0,i=e(t),o=r+i;n.setEdge(t.v,t.w,o),s=Math.max(s,n.node(t.v).out+=i),a=Math.max(a,n.node(t.w).in+=i)});var u=r.range(s+a+3).map(function(){return new o}),l=a+1;return r.forEach(n.nodes(),function(t){c(u,l,n.node(t))}),{graph:n,buckets:u,zeroIdx:l}}(t,e||a),u=function(t,e,n){for(var r,i=[],o=e[e.length-1],a=e[0];t.nodeCount();){for(;r=a.dequeue();)s(t,e,n,r);for(;r=o.dequeue();)s(t,e,n,r);if(t.nodeCount())for(var c=e.length-2;c>0;--c)if(r=e[c].dequeue()){i=i.concat(s(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(u,function(e){return t.outEdges(e.v,e.w)}),!0)};var a=r.constant(1);function s(t,e,n,i,o){var a=o?[]:void 0;return r.forEach(t.inEdges(i.v),function(r){var i=t.edge(r),s=t.node(r.v);o&&a.push({v:r.v,w:r.w}),s.out-=i,c(e,n,s)}),r.forEach(t.outEdges(i.v),function(r){var i=t.edge(r),o=r.w,a=t.node(o);a.in-=i,c(e,n,a)}),t.removeNode(i.v),a}function c(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},2032:(t,e,n)=>{var r=n(1042);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},2119:t=>{t.exports=''},2128:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(9965),o=n(8581),a=n(3210),s=n(2893),c=n(5542),u=n(1810),l=n(1795);function h(t){return void 0!==t.leaves||void 0!==t.groups}!function(t){t[t.start=0]="start",t[t.tick=1]="tick",t[t.end=2]="end"}(r=e.EventType||(e.EventType={}));var f=function(){function t(){var e=this;this._canvasSize=[1,1],this._linkDistance=20,this._defaultNodeSize=10,this._linkLengthCalculator=null,this._linkType=null,this._avoidOverlaps=!1,this._handleDisconnected=!0,this._running=!1,this._nodes=[],this._groups=[],this._rootGroup=null,this._links=[],this._constraints=[],this._distanceMatrix=null,this._descent=null,this._directedLinkConstraints=null,this._threshold=.01,this._visibilityGraph=null,this._groupCompactness=1e-6,this.event=null,this.linkAccessor={getSourceIndex:t.getSourceIndex,getTargetIndex:t.getTargetIndex,setLength:t.setLinkLength,getType:function(t){return"function"==typeof e._linkType?e._linkType(t):0}}}return t.prototype.on=function(t,e){return this.event||(this.event={}),"string"==typeof t?this.event[r[t]]=e:this.event[t]=e,this},t.prototype.trigger=function(t){this.event&&void 0!==this.event[t.type]&&this.event[t.type](t)},t.prototype.kick=function(){for(;!this.tick(););},t.prototype.tick=function(){if(this._alpha0){var e=0;this._links.forEach(function(t){e=Math.max(e,t.source,t.target)}),this._nodes=new Array(++e);for(var n=0;n0?t:0:t>0&&(this._running||(this._running=!0,this.trigger({type:r.start,alpha:this._alpha=t}),this.kick())),this):this._alpha},t.prototype.getLinkLength=function(t){return"function"==typeof this._linkDistance?+this._linkDistance(t):this._linkDistance},t.setLinkLength=function(t,e){t.length=e},t.prototype.getLinkType=function(t){return"function"==typeof this._linkType?this._linkType(t):0},t.prototype.symmetricDiffLinkLengths=function(t,e){var n=this;return void 0===e&&(e=1),this.linkDistance(function(e){return t*e.length}),this._linkLengthCalculator=function(){return o.symmetricDiffLinkLengths(n._links,n.linkAccessor,e)},this},t.prototype.jaccardLinkLengths=function(t,e){var n=this;return void 0===e&&(e=1),this.linkDistance(function(e){return t*e.length}),this._linkLengthCalculator=function(){return o.jaccardLinkLengths(n._links,n.linkAccessor,e)},this},t.prototype.start=function(e,n,r,i,u,l){var h=this;void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=0),void 0===u&&(u=!0),void 0===l&&(l=!0);var f,d=this.nodes().length,g=d+2*this._groups.length,p=(this._links.length,this._canvasSize[0]),v=this._canvasSize[1],b=new Array(g),y=new Array(g),w=null,m=this._avoidOverlaps;this._nodes.forEach(function(t,e){t.index=e,void 0===t.x&&(t.x=p/2,t.y=v/2),b[e]=t.x,y[e]=t.y}),this._linkLengthCalculator&&this._linkLengthCalculator(),this._distanceMatrix?f=this._distanceMatrix:(f=new c.Calculator(g,this._links,t.getSourceIndex,t.getTargetIndex,function(t){return h.getLinkLength(t)}).DistanceMatrix(),w=a.Descent.createSquareMatrix(g,function(){return 2}),this._links.forEach(function(t){"number"==typeof t.source&&(t.source=h._nodes[t.source]),"number"==typeof t.target&&(t.target=h._nodes[t.target])}),this._links.forEach(function(e){var n=t.getSourceIndex(e),r=t.getTargetIndex(e);w[n][r]=w[r][n]=e.weight||1}));var x=a.Descent.createSquareMatrix(g,function(t,e){return f[t][e]});if(this._rootGroup&&void 0!==this._rootGroup.groups){var E=d;this._groups.forEach(function(t){!function(t,e,n){w[t][e]=w[e][t]=n,x[t][e]=x[e][t]=.1}(E,E+1,h._groupCompactness),b[E]=0,y[E++]=0,b[E]=0,y[E++]=0})}else this._rootGroup={leaves:this._nodes,groups:[]};var _=this._constraints||[];for(this._directedLinkConstraints&&(this.linkAccessor.getMinSeparation=this._directedLinkConstraints.getMinSeparation,_=_.concat(o.generateDirectedEdgeConstraints(d,this._links,this._directedLinkConstraints.axis,this.linkAccessor))),this.avoidOverlaps(!1),this._descent=new a.Descent([b,y],x),this._descent.locks.clear(),E=0;E0&&(this._descent.project=new s.Projection(this._nodes,this._groups,this._rootGroup,_).projectFunctions()),this._descent.run(n),this.separateOverlappingComponents(p,v,l),this.avoidOverlaps(m),m&&(this._nodes.forEach(function(t,e){t.x=b[e],t.y=y[e]}),this._descent.project=new s.Projection(this._nodes,this._groups,this._rootGroup,_,!0).projectFunctions(),this._nodes.forEach(function(t,e){b[e]=t.x,y[e]=t.y})),this._descent.G=w,this._descent.run(r),i){this._descent.snapStrength=1e3,this._descent.snapGridSize=this._nodes[0].width,this._descent.numGridSnapNodes=d,this._descent.scaleSnapByMaxH=d!=g;var C=a.Descent.createSquareMatrix(g,function(t,e){return t>=d||e>=d?w[t][e]:0});this._descent.G=C,this._descent.run(i)}return this.updateNodePositions(),this.separateOverlappingComponents(p,v,l),u?this.resume():this},t.prototype.initialLayout=function(e,n,r){if(this._groups.length>0&&e>0){var i=this._nodes.length,o=this._links.map(function(t){return{source:t.source.index,target:t.target.index}}),a=this._nodes.map(function(t){return{index:t.index}});this._groups.forEach(function(t,e){a.push({index:t.index=i+e})}),this._groups.forEach(function(t,e){void 0!==t.leaves&&t.leaves.forEach(function(e){return o.push({source:t.index,target:e.index})}),void 0!==t.groups&&t.groups.forEach(function(e){return o.push({source:t.index,target:e.index})})}),(new t).size(this.size()).nodes(a).links(o).avoidOverlaps(!1).linkDistance(this.linkDistance()).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(e,0,0,0,!1),this._nodes.forEach(function(t){n[t.index]=a[t.index].x,r[t.index]=a[t.index].y})}else this._descent.run(e)},t.prototype.separateOverlappingComponents=function(t,e,n){var r=this;if(void 0===n&&(n=!0),!this._distanceMatrix&&this._handleDisconnected){var i=this._descent.x[0],o=this._descent.x[1];this._nodes.forEach(function(t,e){t.x=i[e],t.y=o[e]});var a=l.separateGraphs(this._nodes,this._links);l.applyPacking(a,t,e,this._defaultNodeSize,1,n),this._nodes.forEach(function(t,e){r._descent.x[0][e]=t.x,r._descent.x[1][e]=t.y,t.bounds&&(t.bounds.setXCentre(t.x),t.bounds.setYCentre(t.y))})}},t.prototype.resume=function(){return this.alpha(.1)},t.prototype.stop=function(){return this.alpha(0)},t.prototype.prepareEdgeRouting=function(t){void 0===t&&(t=0),this._visibilityGraph=new u.TangentVisibilityGraph(this._nodes.map(function(e){return e.bounds.inflate(-t).vertices()}))},t.prototype.routeEdge=function(t,e,n){void 0===e&&(e=5);var r=[],i=new u.TangentVisibilityGraph(this._visibilityGraph.P,{V:this._visibilityGraph.V,E:this._visibilityGraph.E}),o={x:t.source.x,y:t.source.y},a={x:t.target.x,y:t.target.y},l=i.addPoint(o,t.source.index),h=i.addPoint(a,t.target.index);i.addEdgeIfVisible(o,a,t.source.index,t.target.index),void 0!==n&&n(i);var f=new c.Calculator(i.V.length,i.E,function(t){return t.source.id},function(t){return t.target.id},function(t){return t.length()}).PathFromNodeToNode(l.id,h.id);if(1===f.length||f.length===i.V.length){var d=s.makeEdgeBetween(t.source.innerBounds,t.target.innerBounds,e);r=[d.sourceIntersection,d.arrowStart]}else{for(var g=f.length-2,p=i.V[f[g]].p,v=i.V[f[0]].p,b=(r=[t.source.innerBounds.rayIntersection(p.x,p.y)],g);b>=0;--b)r.push(i.V[f[b]].p);r.push(s.makeEdgeTo(v,t.target.innerBounds,e))}return r},t.getSourceIndex=function(t){return"number"==typeof t.source?t.source:t.source.index},t.getTargetIndex=function(t){return"number"==typeof t.target?t.target:t.target.index},t.linkId=function(e){return t.getSourceIndex(e)+"-"+t.getTargetIndex(e)},t.dragStart=function(e){h(e)?t.storeOffset(e,t.dragOrigin(e)):(t.stopNode(e),e.fixed|=2)},t.stopNode=function(t){t.px=t.x,t.py=t.y},t.storeOffset=function(e,n){void 0!==e.leaves&&e.leaves.forEach(function(e){e.fixed|=2,t.stopNode(e),e._dragGroupOffsetX=e.x-n.x,e._dragGroupOffsetY=e.y-n.y}),void 0!==e.groups&&e.groups.forEach(function(e){return t.storeOffset(e,n)})},t.dragOrigin=function(t){return h(t)?{x:t.bounds.cx(),y:t.bounds.cy()}:t},t.drag=function(e,n){h(e)?(void 0!==e.leaves&&e.leaves.forEach(function(t){e.bounds.setXCentre(n.x),e.bounds.setYCentre(n.y),t.px=t._dragGroupOffsetX+n.x,t.py=t._dragGroupOffsetY+n.y}),void 0!==e.groups&&e.groups.forEach(function(e){return t.drag(e,n)})):(e.px=n.x,e.py=n.y)},t.dragEnd=function(e){h(e)?(void 0!==e.leaves&&e.leaves.forEach(function(e){t.dragEnd(e),delete e._dragGroupOffsetX,delete e._dragGroupOffsetY}),void 0!==e.groups&&e.groups.forEach(t.dragEnd)):e.fixed&=-7},t.mouseOver=function(t){t.fixed|=4,t.px=t.x,t.py=t.y},t.mouseOut=function(t){t.fixed&=-5},t}();e.Layout=f},2193:(t,e,n)=>{var r=n(8984),i=n(5861),o=n(2428),a=n(6449),s=n(4894),c=n(3656),u=n(5527),l=n(7167),h=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(s(t)&&(a(t)||"string"==typeof t||"function"==typeof t.splice||c(t)||l(t)||o(t)))return!t.length;var e=i(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(u(t))return!r(t).length;for(var n in t)if(h.call(t,n))return!1;return!0}},2199:(t,e,n)=>{var r=n(4528),i=n(6449);t.exports=function(t,e,n){var o=e(t);return i(t)?o:r(o,n(t))}},2204:t=>{t.exports=''},2216:t=>{t.exports=function(t){return void 0===t}},2224:(t,e,n)=>{var r=n(104);t.exports=function(t){var e=r(t,function(t){return 500===n.size&&n.clear(),t}),n=e.cache;return e}},2271:(t,e,n)=>{var r=n(1791),i=n(4664);t.exports=function(t,e){return r(t,i(t),e)}},2420:(t,e,n)=>{var r=n(6649),i=n(4066),o=n(7241);t.exports=function(t,e){return null==t?t:r(t,i(e),o)}},2428:(t,e,n)=>{var r=n(7534),i=n(346),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return i(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=c},2523:t=>{t.exports=function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o{var r=n(1873),i=n(659),o=n(9350),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?i(t):o(t)}},2568:t=>{t.exports=''},2629:(t,e,n)=>{var r=n(9999);t.exports=function(t){return r(t,4)}},2651:(t,e,n)=>{var r=n(4218);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},2749:(t,e,n)=>{var r=n(1042),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},2804:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2128),i=n(9155);e.gridify=function(t,e,n,r){return t.cola.start(0,0,0,10,!1),function(t,e,n,r){t.forEach(function(t){t.routerNode={name:t.name,bounds:t.bounds.inflate(-n)}}),e.forEach(function(e){e.routerNode={bounds:e.bounds.inflate(-r),children:(void 0!==e.groups?e.groups.map(function(e){return t.length+e.id}):[]).concat(void 0!==e.leaves?e.leaves.map(function(t){return t.index}):[])}});var o=t.concat(e).map(function(t,e){return t.routerNode.id=e,t.routerNode});return new i.GridRouter(o,{getChildren:function(t){return t.children},getBounds:function(t){return t.bounds}},n-r)}(t.cola.nodes(),t.cola.groups(),n,r).routeEdges(t.powerGraph.powerEdges,e,function(t){return t.source.routerNode.id},function(t){return t.target.routerNode.id})},e.powerGraphGridLayout=function(t,e,n){var i;t.nodes.forEach(function(t,e){return t.index=e}),(new r.Layout).avoidOverlaps(!1).nodes(t.nodes).links(t.links).powerGraphGroups(function(t){(i=t).groups.forEach(function(t){return t.padding=n})});var o=t.nodes.length,a=[],s=t.nodes.slice(0);return s.forEach(function(t,e){return t.index=e}),i.groups.forEach(function(t){var e=t.index=t.id+o;s.push(t),void 0!==t.leaves&&t.leaves.forEach(function(t){return a.push({source:e,target:t.index})}),void 0!==t.groups&&t.groups.forEach(function(t){return a.push({source:e,target:t.id+o})})}),i.powerEdges.forEach(function(t){a.push({source:t.source.index,target:t.target.index})}),(new r.Layout).size(e).nodes(s).links(a).avoidOverlaps(!1).linkDistance(30).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(100,0,0,0,!1),{cola:(new r.Layout).convergenceThreshold(.001).size(e).avoidOverlaps(!0).nodes(t.nodes).links(t.links).groupCompactness(1e-4).linkDistance(30).symmetricDiffLinkLengths(5).powerGraphGroups(function(t){(i=t).groups.forEach(function(t){t.padding=n})}).start(50,0,100,0,!1),powerGraph:i}}},2824:(t,e,n)=>{var r=n(7805),i=n(3290),o=n(1961),a=n(3007),s=n(5529),c=n(2428),u=n(6449),l=n(3693),h=n(3656),f=n(1882),d=n(3805),g=n(1331),p=n(7167),v=n(4974),b=n(9884);t.exports=function(t,e,n,y,w,m,x){var E=v(t,n),_=v(e,n),k=x.get(_);if(k)r(t,n,k);else{var N=m?m(E,_,n+"",t,e,x):void 0,C=void 0===N;if(C){var T=u(_),A=!T&&h(_),I=!T&&!A&&p(_);N=_,T||A||I?u(E)?N=E:l(E)?N=a(E):A?(C=!1,N=i(_,!0)):I?(C=!1,N=o(_,!0)):N=[]:g(_)||c(_)?(N=E,c(E)?N=b(E):d(E)&&!f(E)||(N=s(_))):C=!1}C&&(x.set(_,N),w(N,_,y,m,x),x.delete(_)),r(t,n,N)}}},2864:t=>{t.exports=''},2865:(t,e,n)=>{var r=n(9570),i=n(1811)(r);t.exports=i},2893:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(8126),a=n(6266);function s(t){return t.bounds=void 0!==t.leaves?t.leaves.reduce(function(t,e){return e.bounds.union(t)},c.empty()):c.empty(),void 0!==t.groups&&(t.bounds=t.groups.reduce(function(t,e){return s(e).union(t)},t.bounds)),t.bounds=t.bounds.inflate(t.padding),t.bounds}e.computeGroupBounds=s;var c=function(){function t(t,e,n,r){this.x=t,this.X=e,this.y=n,this.Y=r}return t.empty=function(){return new t(Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY)},t.prototype.cx=function(){return(this.x+this.X)/2},t.prototype.cy=function(){return(this.y+this.Y)/2},t.prototype.overlapX=function(t){var e=this.cx(),n=t.cx();return e<=n&&t.x0?n[0]:null},t.prototype.vertices=function(){return[{x:this.x,y:this.y},{x:this.X,y:this.y},{x:this.X,y:this.Y},{x:this.x,y:this.Y}]},t.lineIntersection=function(t,e,n,r,i,o,a,s){var c=n-t,u=a-i,l=r-e,h=s-o,f=h*c-u*l;if(0==f)return null;var d=t-i,g=e-o,p=(u*g-h*d)/f,v=(c*g-l*d)/f;return p>=0&&p<=1&&v>=0&&v<=1?{x:t+p*c,y:e+p*l}:null},t.prototype.inflate=function(e){return new t(this.x-e,this.X+e,this.y-e,this.Y+e)},t}();e.Rectangle=c,e.makeEdgeBetween=function(t,e,n){var r=t.rayIntersection(e.cx(),e.cy())||{x:t.cx(),y:t.cy()},i=e.rayIntersection(t.cx(),t.cy())||{x:e.cx(),y:e.cy()},o=i.x-r.x,a=i.y-r.y,s=Math.sqrt(o*o+a*a),c=s-n;return{sourceIntersection:r,targetIntersection:i,arrowStart:{x:r.x+c*o/s,y:r.y+c*a/s}}},e.makeEdgeTo=function(t,e,n){var r=e.rayIntersection(t.x,t.y);r||(r={x:e.cx(),y:e.cy()});var i=r.x-t.x,o=r.y-t.y,a=Math.sqrt(i*i+o*o);return{x:r.x-n*i/a,y:r.y-n*o/a}};var u=function(t,e,n){this.v=t,this.r=e,this.pos=n,this.prev=f(),this.next=f()},l=function(t,e,n){this.isOpen=t,this.v=e,this.pos=n};function h(t,e){return t.pos>e.pos?1:t.pos0&&(t[n].insert(i),i[r].insert(t))};n("next","prev"),n("prev","next")}};function p(t,e,n,r){void 0===r&&(r=!1);var i=t.padding,o=void 0!==t.groups?t.groups.length:0,a=void 0!==t.leaves?t.leaves.length:0,s=o?t.groups.reduce(function(t,r){return t.concat(p(r,e,n,!0))},[]):[],c=(r?2:0)+a+o,u=new Array(c),l=new Array(c),h=0,f=function(t,e){l[h]=t,u[h++]=e};if(r){var d=t.bounds,g=e.getCentre(d),b=e.getSize(d)/2,y=e.getOpen(d),w=e.getClose(d),m=g-b+i/2,x=g+b-i/2;t.minVar.desiredPosition=m,f(e.makeRect(y,w,m,i),t.minVar),t.maxVar.desiredPosition=x,f(e.makeRect(y,w,x,i),t.maxVar)}a&&t.leaves.forEach(function(t){return f(t.bounds,t.variable)}),o&&t.groups.forEach(function(t){var n=t.bounds;f(e.makeRect(e.getOpen(n),e.getClose(n),e.getCentre(n),e.getSize(n)),t.minVar)});var E=v(l,u,e,n);return o&&(u.forEach(function(t){t.cOut=[],t.cIn=[]}),E.forEach(function(t){t.left.cOut.push(t),t.right.cIn.push(t)}),t.groups.forEach(function(t){var n=(t.padding-e.getSize(t.bounds))/2;t.minVar.cIn.forEach(function(t){return t.gap+=n}),t.minVar.cOut.forEach(function(e){e.left=t.maxVar,e.gap+=n})})),s.concat(E)}function v(t,e,n,r){var i,a=t.length,s=2*a;console.assert(e.length>=a);var c=new Array(s);for(i=0;it[n]&&(t[n]=e)}o=t})}},t.prototype.createAlignment=function(t){var e=this,n=this.nodes[t.offsets[0].node].variable;this.makeFeasible(t);var r="x"===t.axis?this.xConstraints:this.yConstraints;t.offsets.slice(1).forEach(function(t){var i=e.nodes[t.node].variable;r.push(new o.Constraint(n,i,t.offset,!0))})},t.prototype.createConstraints=function(t){var e=this,n=function(t){return void 0===t.type||"separation"===t.type};this.xConstraints=t.filter(function(t){return"x"===t.axis&&n(t)}).map(function(t){return e.createSeparation(t)}),this.yConstraints=t.filter(function(t){return"y"===t.axis&&n(t)}).map(function(t){return e.createSeparation(t)}),t.filter(function(t){return"alignment"===t.type}).forEach(function(t){return e.createAlignment(t)})},t.prototype.setupVariablesAndBounds=function(t,e,n,r){this.nodes.forEach(function(i,o){i.fixed?(i.variable.weight=i.fixedWeight?i.fixedWeight:1e3,n[o]=r(i)):i.variable.weight=1;var a=(i.width||0)/2,s=(i.height||0)/2,u=t[o],l=e[o];i.bounds=new c(u-a,u+a,l-s,l+s)})},t.prototype.xProject=function(t,e,n){(this.rootGroup||this.avoidOverlaps||this.xConstraints)&&this.project(t,e,t,n,function(t){return t.px},this.xConstraints,w,function(t){return t.bounds.setXCentre(n[t.variable.index]=t.variable.position())},function(t){var e=n[t.minVar.index]=t.minVar.position(),r=n[t.maxVar.index]=t.maxVar.position(),i=t.padding/2;t.bounds.x=e-i,t.bounds.X=r+i})},t.prototype.yProject=function(t,e,n){(this.rootGroup||this.yConstraints)&&this.project(t,e,e,n,function(t){return t.py},this.yConstraints,m,function(t){return t.bounds.setYCentre(n[t.variable.index]=t.variable.position())},function(t){var e=n[t.minVar.index]=t.minVar.position(),r=n[t.maxVar.index]=t.maxVar.position(),i=t.padding/2;t.bounds.y=e-i,t.bounds.Y=r+i})},t.prototype.projectFunctions=function(){var t=this;return[function(e,n,r){return t.xProject(e,n,r)},function(e,n,r){return t.yProject(e,n,r)}]},t.prototype.project=function(t,e,n,r,i,o,a,c,u){this.setupVariablesAndBounds(t,e,r,i),this.rootGroup&&this.avoidOverlaps&&(s(this.rootGroup),o=o.concat(a(this.rootGroup))),this.solve(this.variables,o,n,r),this.nodes.forEach(c),this.rootGroup&&this.avoidOverlaps&&(this.groups.forEach(u),s(this.rootGroup))},t.prototype.solve=function(t,e,n,r){var i=new o.Solver(t,e);i.setStartingPositions(n),i.setDesiredPositions(r),i.solve()},t}();e.Projection=E},2903:(t,e,n)=>{var r=n(3805),i=n(5527),o=n(181),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=i(t),n=[];for(var s in t)("constructor"!=s||!e&&a.call(t,s))&&n.push(s);return n}},2948:(t,e,n)=>{var r=n(6857);t.exports=function(t){var e=function(t){var e={},n=0;return r.forEach(t.children(),function i(o){var a=n;r.forEach(t.children(o),i),e[o]={low:a,lim:n++}}),e}(t);r.forEach(t.graph().dummyChains,function(n){for(var r=t.node(n),i=r.edgeObj,o=function(t,e,n,r){var i,o,a=[],s=[],c=Math.min(e[n].low,e[r].low),u=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),a.push(i)}while(i&&(e[i].low>c||u>e[i].lim));for(o=i,i=r;(i=t.parent(i))!==o;)s.push(i);return{path:a.concat(s.reverse()),lca:o}}(t,e,i.v,i.w),a=o.path,s=o.lca,c=0,u=a[c],l=!0;n!==i.w;){if(r=t.node(n),l){for(;(u=a[c])!==s&&t.node(u).maxRank{var r=n(2651);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},3007:t=>{t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n{t.exports=''},3031:(t,e,n)=>{var r=n(3120),i=n(6155),o=n(9302),a=n(6800),s=o(function(t,e){if(null==t)return[];var n=e.length;return n>1&&a(t,e[0],e[1])?e=[]:n>2&&a(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])});t.exports=s},3040:(t,e,n)=>{var r=n(1549),i=n(79),o=n(8223);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},3113:function(t){var e;e=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},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,n){"use strict";var r=n(5).getBoundingBox;t.exports={getRef:function(t,e){return{getBoundingClientRect:function(){return r(t,e)}}}}},function(t,e,n){"use strict";t.exports=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r1&&(console.warn("Popper.js Extension should only be used on one element."),console.warn("Ignoring all subsequent elements"))}t.exports={popper:function(t){return s(this),i(this[0],a(this[0],t))},popperRef:function(t){return s(this),o(this[0],a(this[0],t))}}},function(t,e,n){"use strict";var r=n(1),i=n(2).getPopper,o=n(0).getRef;function a(t,e){return r({},{boundingBox:{top:0,left:0,right:0,bottom:0,w:3,h:3},renderedDimensions:function(){return{w:3,h:3}},renderedPosition:function(){return{x:0,y:0}},popper:{},cy:t},e)}t.exports={popper:function(t){return i(this,a(this,t))},popperRef:function(t){return o(this,a(this,t))}}},function(t,e,n){"use strict";t.exports={getBoundingBox:function(t,e){var n=e.renderedPosition,r=e.cy,i=e.renderedDimensions,o=r.container().getBoundingClientRect(),a=i(t),s=n(t);return{top:s.y+o.top,left:s.x+o.left,right:s.x+a.w+o.left,bottom:s.y+a.h+o.top,width:a.w,height:a.h}}}},function(t,e,n){"use strict";t.exports={getContent:function(t,e){var n;if("function"!=typeof e){if(e instanceof HTMLElement)return e;throw new Error("Can not create popper from 'target' with unknown type")}if(null===(n=e(t)))throw new Error("No 'target' specified to create popper");return n}}},function(t,e,n){"use strict";var r=n(4),i=n(3);t.exports=function(t){if("function"!=typeof t)throw new Error("Provide 'popperFactory' before registering the module");return function(e){e&&(e("core","popperFactory",t),e("collection","popperFactory",t),e("core","popper",r.popper),e("collection","popper",i.popper),e("core","popperRef",r.popperRef),e("collection","popperRef",i.popperRef))}}}])},t.exports=e()},3120:(t,e,n)=>{var r=n(4528),i=n(5891);t.exports=function t(e,n,o,a,s){var c=-1,u=e.length;for(o||(o=i),s||(s=[]);++c0&&o(l)?n>1?t(l,n-1,o,a,s):r(s,l):a||(s[s.length]=l)}return s}},3143:function(t){var e;e=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},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=26)}([function(t,e,n){"use strict";function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,t.exports=r},function(t,e,n){"use strict";var r=n(2),i=n(8),o=n(9);function a(t,e,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=t,this.target=e}for(var s in a.prototype=Object.create(r.prototype),r)a[s]=r[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;if(this.target===t)return this.source;throw"Node is not incident with this edge"},a.prototype.getOtherEndInGraph=function(t,e){for(var n=this.getOtherEnd(t),r=e.getGraphManager().getRoot();;){if(n.getOwner()==e)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},a.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),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(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),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,n){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,n){"use strict";var r=n(2),i=n(10),o=n(13),a=n(0),s=n(16),c=n(4);function u(t,e,n,a){null==n&&null==a&&(a=e),r.call(this,a),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=a,this.edges=[],this.graphManager=t,this.rect=null!=n&&null!=e?new o(e.x,e.y,n.width,n.height):new o}for(var l in u.prototype=Object.create(r.prototype),r)u[l]=r[l];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(t){this.rect.width=t},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(t){this.rect.height=t},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.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},u.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},u.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},u.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},u.prototype.getEdgeListToNode=function(t){var e=[],n=this;return n.edges.forEach(function(r){if(r.target==t){if(r.source!=n)throw"Incorrect edge source!";e.push(r)}}),e},u.prototype.getEdgesBetween=function(t){var e=[],n=this;return n.edges.forEach(function(r){if(r.source!=n&&r.target!=n)throw"Incorrect edge source and/or target";r.target!=t&&r.source!=t||e.push(r)}),e},u.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach(function(n){if(n.source==e)t.add(n.target);else{if(n.target!=e)throw"Incorrect incidency!";t.add(n.source)}}),t},u.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),n=0;ne&&(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-n)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(t){var e=this.rect.x;e>a.WORLD_BOUNDARY?e=a.WORLD_BOUNDARY:e<-a.WORLD_BOUNDARY&&(e=-a.WORLD_BOUNDARY);var n=this.rect.y;n>a.WORLD_BOUNDARY?n=a.WORLD_BOUNDARY:n<-a.WORLD_BOUNDARY&&(n=-a.WORLD_BOUNDARY);var r=new c(e,n),i=t.inverseTransformPoint(r);this.setLocation(i.x,i.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=u},function(t,e,n){"use strict";function r(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=r},function(t,e,n){"use strict";var r=n(2),i=n(10),o=n(0),a=n(6),s=n(3),c=n(1),u=n(13),l=n(12),h=n(11);function f(t,e,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof a?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var d in f.prototype=Object.create(r.prototype),r)f[d]=r[d];f.prototype.getNodes=function(){return this.nodes},f.prototype.getEdges=function(){return this.edges},f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getParent=function(){return this.parent},f.prototype.getLeft=function(){return this.left},f.prototype.getRight=function(){return this.right},f.prototype.getTop=function(){return this.top},f.prototype.getBottom=function(){return this.bottom},f.prototype.isConnected=function(){return this.isConnected},f.prototype.add=function(t,e,n){if(null==e&&null==n){var r=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var i=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(n)>-1))throw"Source or target not in graph!";if(e.owner!=n.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=n.owner?null:(i.source=e,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),e.edges.push(i),n!=e&&n.edges.push(i),i)},f.prototype.remove=function(t){var e=t;if(t instanceof s){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var n=e.edges.slice(),r=n.length,i=0;i-1&&l>-1))throw"Source and/or target doesn't know this edge!";if(o.source.edges.splice(u,1),o.target!=o.source&&o.target.edges.splice(l,1),-1==(a=o.source.owner.getEdges().indexOf(o)))throw"Not in owner's edge list!";o.source.owner.getEdges().splice(a,1)}},f.prototype.updateLeftTop=function(){for(var t,e,n,r=i.MAX_VALUE,o=i.MAX_VALUE,a=this.getNodes(),s=a.length,c=0;c(t=u.getTop())&&(r=t),o>(e=u.getLeft())&&(o=e)}return r==i.MAX_VALUE?null:(n=null!=a[0].getParent().paddingLeft?a[0].getParent().paddingLeft:this.margin,this.left=o-n,this.top=r-n,new l(this.left,this.top))},f.prototype.updateBounds=function(t){for(var e,n,r,o,a,s=i.MAX_VALUE,c=-i.MAX_VALUE,l=i.MAX_VALUE,h=-i.MAX_VALUE,f=this.nodes,d=f.length,g=0;g(e=p.getLeft())&&(s=e),c<(n=p.getRight())&&(c=n),l>(r=p.getTop())&&(l=r),h<(o=p.getBottom())&&(h=o)}var v=new u(s,l,c-s,h-l);s==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),a=null!=f[0].getParent().paddingLeft?f[0].getParent().paddingLeft:this.margin,this.left=v.x-a,this.right=v.x+v.width+a,this.top=v.y-a,this.bottom=v.y+v.height+a},f.calculateBounds=function(t){for(var e,n,r,o,a=i.MAX_VALUE,s=-i.MAX_VALUE,c=i.MAX_VALUE,l=-i.MAX_VALUE,h=t.length,f=0;f(e=d.getLeft())&&(a=e),s<(n=d.getRight())&&(s=n),c>(r=d.getTop())&&(c=r),l<(o=d.getBottom())&&(l=o)}return new u(a,c,s-a,l-c)},f.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},f.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},f.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,n=e.length,r=0;r=this.nodes.length){var c=0;i.forEach(function(e){e.owner==t&&c++}),c==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=f},function(t,e,n){"use strict";var r,i=n(1);function o(t){r=n(5),this.layout=t,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),n=this.add(t,e);return this.setRootGraph(n),this.rootGraph},o.prototype.add=function(t,e,n,r,i){if(null==n&&null==r&&null==i){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}i=n,n=t;var o=(r=e).getOwner(),a=i.getOwner();if(null==o||o.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==a||a.getGraphManager()!=this)throw"Target not in this graph mgr!";if(o==a)return n.isInterGraph=!1,o.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(n),null==n.source||null==n.target)throw"Edge source and/or target is null!";if(-1!=n.source.edges.indexOf(n)||-1!=n.target.edges.indexOf(n))throw"Edge already in source and/or target incidency list!";return n.source.edges.push(n),n.target.edges.push(n),n},o.prototype.remove=function(t){if(t instanceof r){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var n,o=[],a=(o=o.concat(e.getEdges())).length,s=0;s=e.getRight()?n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var o=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(o=1);var a=o*n[0],s=n[1]/o;n[0]a)return n[0]=r,n[1]=c,n[2]=o,n[3]=w,!1;if(io)return n[0]=s,n[1]=i,n[2]=b,n[3]=a,!1;if(ro?(n[0]=l,n[1]=h,_=!0):(n[0]=u,n[1]=c,_=!0):N===T&&(r>o?(n[0]=s,n[1]=c,_=!0):(n[0]=f,n[1]=h,_=!0)),-C===T?o>r?(n[2]=y,n[3]=w,k=!0):(n[2]=b,n[3]=v,k=!0):C===T&&(o>r?(n[2]=p,n[3]=v,k=!0):(n[2]=m,n[3]=w,k=!0)),_&&k)return!1;if(r>o?i>a?(A=this.getCardinalDirection(N,T,4),I=this.getCardinalDirection(C,T,2)):(A=this.getCardinalDirection(-N,T,3),I=this.getCardinalDirection(-C,T,1)):i>a?(A=this.getCardinalDirection(-N,T,1),I=this.getCardinalDirection(-C,T,3)):(A=this.getCardinalDirection(N,T,2),I=this.getCardinalDirection(C,T,4)),!_)switch(A){case 1:S=c,O=r+-g/T,n[0]=O,n[1]=S;break;case 2:O=f,S=i+d*T,n[0]=O,n[1]=S;break;case 3:S=h,O=r+g/T,n[0]=O,n[1]=S;break;case 4:O=l,S=i+-d*T,n[0]=O,n[1]=S}if(!k)switch(I){case 1:M=v,L=o+-E/T,n[2]=L,n[3]=M;break;case 2:L=m,M=a+x*T,n[2]=L,n[3]=M;break;case 3:M=w,L=o+E/T,n[2]=L,n[3]=M;break;case 4:L=y,M=a+-x*T,n[2]=L,n[3]=M}}return!1},i.getCardinalDirection=function(t,e,n){return t>e?n:1+n%4},i.getIntersection=function(t,e,n,i){if(null==i)return this.getIntersection2(t,e,n);var o,a,s,c,u,l,h,f=t.x,d=t.y,g=e.x,p=e.y,v=n.x,b=n.y,y=i.x,w=i.y;return 0===(h=(o=p-d)*(c=v-y)-(a=w-b)*(s=f-g))?null:new r((s*(l=y*b-v*w)-c*(u=g*d-f*p))/h,(a*u-o*l)/h)},i.angleOfVector=function(t,e,n,r){var i=void 0;return t!==n?(i=Math.atan((r-e)/(n-t)),n0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=r},function(t,e,n){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,t.exports=r},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n0&&e;){for(s.push(u[0]);s.length>0&&e;){var l=s[0];s.splice(0,1),a.add(l);var h=l.getEdges();for(o=0;o-1&&u.splice(p,1)}a=new Set,c=new Map}else t=[]}return t},f.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],n=t.source,r=this.graphManager.calcLowestCommonAncestor(t.source,t.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(n),o=0;o=0&&e.splice(h,1),l.getNeighborsList().forEach(function(t){if(n.indexOf(t)<0){var e=r.get(t)-1;1==e&&c.push(t),r.set(t,e)}})}n=n.concat(c),1!=e.length&&2!=e.length||(i=!0,o=e[0])}return o},f.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=f},function(t,e,n){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},t.exports=r},function(t,e,n){"use strict";var r=n(4);function i(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}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(t){this.lworldExtX=t},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(t){this.lworldExtY=t},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},i.prototype.transformX=function(t){var e=0,n=this.lworldExtX;return 0!=n&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/n),e},i.prototype.transformY=function(t){var e=0,n=this.lworldExtY;return 0!=n&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/n),e},i.prototype.inverseTransformX=function(t){var e=0,n=this.ldeviceExtX;return 0!=n&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/n),e},i.prototype.inverseTransformY=function(t){var e=0,n=this.ldeviceExtY;return 0!=n&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/n),e},i.prototype.inverseTransformPoint=function(t){return new r(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=i},function(t,e,n){"use strict";var r=n(15),i=n(7),o=n(0),a=n(8),s=n(9);function c(){r.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=i.DEFAULT_EDGE_LENGTH,this.springConstant=i.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=i.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}for(var u in c.prototype=Object.create(r.prototype),r)c[u]=r[u];c.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},c.prototype.calcIdealEdgeLengths=function(){for(var t,e,n,r,a,s,c=this.getGraphManager().getAllEdges(),u=0;ui.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},c.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),n=0;n0&&void 0!==arguments[0])||arguments[0],s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&a&&this.updateGrid(),o=new Set,t=0;t(c=e.getEstimatedSize()*this.gravityRangeFactor)||s>c)&&(t.gravitationForceX=-this.gravityConstant*i,t.gravitationForceY=-this.gravityConstant*o):(a>(c=e.getEstimatedSize()*this.compoundGravityRangeFactor)||s>c)&&(t.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},c.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=s.length||u>=s[0].length))for(var l=0;lt}}]),t}();t.exports=o},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sequence1=e,this.sequence2=n,this.match_score=r,this.mismatch_penalty=i,this.gap_penalty=o,this.iMax=e.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var a=0;a=0;n--){var r=this.listeners[n];r.event===t&&r.callback===e&&this.listeners.splice(n,1)}},i.emit=function(t,e){for(var n=0;n{var r=n(6547),i=n(1769),o=n(361),a=n(3805),s=n(7797);t.exports=function(t,e,n,c){if(!a(t))return t;for(var u=-1,l=(e=i(e,t)).length,h=l-1,f=t;null!=f&&++u{t.exports=''},3181:(t,e,n)=>{var r=n(5508)();t.exports=r},3201:t=>{var e=/\w*$/;t.exports=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}},3210:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){this.locks={}}return t.prototype.add=function(t,e){this.locks[t]=e},t.prototype.clear=function(){this.locks={}},t.prototype.isEmpty=function(){for(var t in this.locks)return!1;return!0},t.prototype.apply=function(t){for(var e in this.locks)t(Number(e),this.locks[e])},t}();e.Locks=n;var r=function(){function t(t,e,r){void 0===r&&(r=null),this.D=e,this.G=r,this.threshold=1e-4,this.numGridSnapNodes=0,this.snapGridSize=100,this.snapStrength=1e3,this.scaleSnapByMaxH=!1,this.random=new i,this.project=null,this.x=t,this.k=t.length;var o=this.n=t[0].length;this.H=new Array(this.k),this.g=new Array(this.k),this.Hd=new Array(this.k),this.a=new Array(this.k),this.b=new Array(this.k),this.c=new Array(this.k),this.d=new Array(this.k),this.e=new Array(this.k),this.ia=new Array(this.k),this.ib=new Array(this.k),this.xtmp=new Array(this.k),this.locks=new n,this.minD=Number.MAX_VALUE;for(var a,s=o;s--;)for(a=o;--a>s;){var c=e[s][a];c>0&&c1e-9)break;var d=this.offsetDir();for(r=0;r1&&g>p||!isFinite(p))for(r=0;r1&&(v=1);var b=p*p,y=2*v*(g-p)/(b*g),w=g*g*g,m=2*-v/(b*w);for(isFinite(y)||console.log(y),r=0;r0?N-(A+1)*E:N-(A-1)*E)&&f<=x&&(this.scaleSnapByMaxH?(this.g[r][c]+=s*_*f,this.H[r][c][c]+=s*_):(this.g[r][c]+=_*f,this.H[r][c][c]+=_))}this.locks.isEmpty()||this.locks.apply(function(n,i){for(r=0;r0;)for(var i=e;i-- >0;)n(r,i)},t.prototype.matrixApply=function(e){t.mApply(this.k,this.n,e)},t.prototype.computeNextPosition=function(t,e){var n=this;this.computeDerivatives(t);var r=this.computeStepSize(this.g);if(this.stepAndProject(t,e,this.g,r),this.project){this.matrixApply(function(r,i){return n.e[r][i]=t[r][i]-e[r][i]});var i=this.computeStepSize(this.e);i=Math.max(.2,Math.min(i,1)),this.stepAndProject(t,e,this.e,i)}},t.prototype.run=function(t){for(var e=Number.MAX_VALUE,n=!1;!n&&t-- >0;){var r=this.rungeKutta();n=Math.abs(e/r-1)>16)/this.range},t.prototype.getNextBetween=function(t,e){return t+this.getNext()*(e-t)},t}();e.PseudoRandom=i},3221:t=>{t.exports=function(t){return function(e,n,r){for(var i=-1,o=Object(e),a=r(e),s=a.length;s--;){var c=a[t?s:++i];if(!1===n(o[c],c,o))break}return e}}},3222:(t,e,n)=>{var r=n(7556);t.exports=function(t){return null==t?"":r(t)}},3243:(t,e,n)=>{var r=n(6110),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},3290:(t,e,n)=>{t=n.nmd(t);var r=n(9325),i=e&&!e.nodeType&&e,o=i&&t&&!t.nodeType&&t,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r}},3335:t=>{t.exports=function(t,e){return t>e}},3345:t=>{t.exports=function(){return[]}},3349:(t,e,n)=>{var r=n(2199),i=n(6375),o=n(7241);t.exports=function(t){return r(t,o,i)}},3360:(t,e,n)=>{var r=n(3243);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},3452:t=>{t.exports=''},3457:function(t,e,n){var r;r=function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},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=1)}([function(e,n){e.exports=t},function(t,e,n){"use strict";var r=n(0).layoutBase.LayoutConstants,i=n(0).layoutBase.FDLayoutConstants,o=n(0).CoSEConstants,a=n(0).CoSELayout,s=n(0).CoSENode,c=n(0).layoutBase.PointD,u=n(0).layoutBase.DimensionD,l={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function h(t){this.options=function(t,e){var n={};for(var r in t)n[r]=t[r];for(var r in e)n[r]=e[r];return n}(l,t),f(this.options)}var f=function(t){null!=t.nodeRepulsion&&(o.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=t.nodeRepulsion),null!=t.idealEdgeLength&&(o.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=t.idealEdgeLength),null!=t.edgeElasticity&&(o.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=t.edgeElasticity),null!=t.nestingFactor&&(o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(o.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(o.MAX_ITERATIONS=i.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(o.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(o.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),"draft"==t.quality?r.QUALITY=0:"proof"==t.quality?r.QUALITY=2:r.QUALITY=1,o.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,o.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!t.randomize,o.ANIMATE=i.ANIMATE=r.ANIMATE=t.animate,o.TILE=t.tile,o.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,o.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal};h.prototype.run=function(){var t,e,n=this.options,r=(this.idToLNode={},this.layout=new a),i=this;i.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var o=r.newGraphManager();this.gm=o;var s=this.options.eles.nodes(),c=this.options.eles.edges();this.root=o.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(s),r);for(var u=0;u0&&(a=n.getGraphManager().add(n.newGraph(),o),this.processChildrenList(a,h,n))}},h.prototype.stop=function(){return this.stopped=!0,this};var d=function(t){t("layout","cose-bilkent",h)};"undefined"!=typeof cytoscape&&d(cytoscape),t.exports=d}])},t.exports=r(n(7461))},3488:t=>{t.exports=function(t){return t}},3519:(t,e,n)=>{var r;!function(){"use strict";var i=function(t){if(t){var e={enabled:!0,selector:"node",speed:1};t("core","autopanOnDrag",function(t){var o=this,a=n(o,"eventFcns")||{};if(r(o,"eventFcns",a),"get"!==t){var s=function(t,e){var n={};for(var r in t)n[r]=t[r];for(var r in e)n[r]=e[r];return n}(e,t);r(o,"options",s),s.enabled&&(i(o),r(o,"enabled",!0))}return{enable:function(){i(o)},disable:function(){!function(t){if(n(t,"enabled")){var e=n(t,"eventFcns"),i=n(t,"options");t.off("tapstart",i.selector,e.tapstartFcn),t.off("tapdrag",e.tapdragFcn),t.off("tapend",e.tapendFcn),r(t,"enabled",void 0)}}(o)}}})}function n(t,e){void 0===t.scratch("_autopanOnDrag")&&t.scratch("_autopanOnDrag",{});var n=t.scratch("_autopanOnDrag");return void 0===e?n:n[e]}function r(t,e,r){var i=n(t);i[e]=r,t.scratch("_autopanOnDrag",i)}function i(t,e){if(!n(t,"enabled")){var i=n(t,"eventFcns");e=n(t,"options"),t.on("tapstart",e.selector,i.tapstartFcn=function(){var e=this,n=e.renderedPosition(),i=e.renderedWidth(),o=e.renderedHeight(),a=t.width(),s=t.height(),c=n.x-i/2,u=n.y-o/2,l=n.x+i/2,h=n.y+o/2,f=!1;(l>=a||c<=0||h>=s||u<=0)&&(f=!0),f||r(t,"currentNode",e)}),t.on("tapdrag",i.tapdragFcn=function(){var r=n(t,"currentNode");if(void 0!==r){var i,o,a=r.renderedPosition(),s=r.renderedWidth(),c=r.renderedHeight(),u=t.width(),l=t.height(),h=a.x-s/2,f=a.y-c/2,d=a.x+s/2,g=a.y+c/2;d>=u&&(i=-d+u),h<=0&&(i=-h),g>=l&&(o=-g+l),f<=0&&(o=-f),i&&t.panBy({x:i*e.speed}),o&&t.panBy({y:o*e.speed})}}),t.on("tapend",i.tapendFcn=function(){r(t,"currentNode",void 0)}),r(t,"eventFcns",i),r(t,"enabled",!0)}}};t.exports&&(t.exports=i),void 0===(r=function(){return i}.call(e,n,e,t))||(t.exports=r),"undefined"!=typeof cytoscape&&i(cytoscape)}()},3573:t=>{t.exports=''},3590:(t,e,n)=>{var r=n(117);t.exports=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach(function(t){r[t]={},r[t][t]={distance:0},i.forEach(function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})}),n(t).forEach(function(n){var i=n.v===t?n.w:n.v,o=e(n);r[t][i]={distance:o,predecessor:t}})}),i.forEach(function(t){var e=r[t];i.forEach(function(n){var o=r[n];i.forEach(function(n){var r=o[t],i=e[n],a=o[n],s=r.distance+i.distance;s{t.exports=''},3599:(t,e,n)=>{var r=n(4394);t.exports=function(t,e,n){for(var i=-1,o=t.length;++i{t.exports=function(t){return this.__data__.get(t)}},3619:(t,e,n)=>{var r=n(117);t.exports=function(t){var e,n={},i=[];function o(i){r.has(n,i)||(n[i]=!0,e.push(i),r.each(t.successors(i),o),r.each(t.predecessors(i),o))}return r.each(t.nodes(),function(t){e=[],o(t),e.length&&i.push(e)}),i}},3650:(t,e,n)=>{var r=n(4335)(Object.keys,Object);t.exports=r},3656:(t,e,n)=>{t=n.nmd(t);var r=n(9325),i=n(9935),o=e&&!e.nodeType&&e,a=o&&t&&!t.nodeType&&t,s=a&&a.exports===o?r.Buffer:void 0,c=(s?s.isBuffer:void 0)||i;t.exports=c},3661:(t,e,n)=>{var r=n(3040),i=n(7670),o=n(289),a=n(4509),s=n(2949);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var r=n(1799),i=n(776),o=n(7197);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?o(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},3693:(t,e,n)=>{var r=n(4894),i=n(346);t.exports=function(t){return i(t)&&r(t)}},3702:t=>{t.exports=function(){this.__data__=[],this.size=0}},3714:(t,e,n)=>{var r=n(3730);t.exports=function(t,e,n){for(var i=-1,o=t.criteria,a=e.criteria,s=o.length,c=n.length;++i=c?u:u*("desc"==n[i]?-1:1)}return t.index-e.index}},3729:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n{var r=n(4394);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,o=t==t,a=r(t),s=void 0!==e,c=null===e,u=e==e,l=r(e);if(!c&&!l&&!a&&t>e||a&&s&&u&&!c&&!l||i&&s&&u||!n&&u||!o)return 1;if(!i&&!a&&!l&&t{var r=n(1873),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;t.exports=function(t){return o?Object(o.call(t)):{}}},3776:(t,e,n)=>{"use strict";var r=n(6857),i=n(3988),o=n(9741).positionX;t.exports=function(t){(function(t){var e=i.buildLayerMatrix(t),n=t.graph().ranksep,o=0;r.forEach(e,function(e){var i=r.max(r.map(e,function(e){return t.node(e).height}));r.forEach(e,function(e){t.node(e).y=o+i/2}),o+=i+n})})(t=i.asNonCompoundGraph(t)),r.forEach(o(t),function(e,n){t.node(n).x=e})}},3805:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},3838:(t,e,n)=>{var r=n(1791),i=n(7241);t.exports=function(t,e){return t&&r(e,i(e),t)}},3860:(t,e,n)=>{var r=n(6857);t.exports=function(t,e){return r.map(e,function(e){var n=t.inEdges(e);if(n.length){var i=r.reduce(n,function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}},{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}})}},3862:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},3916:(t,e,n)=>{var r=n(3360),i=n(641),o=n(5389);t.exports=function(t,e){var n={};return e=o(e,3),i(t,function(t,i,o){r(n,i,e(t,i,o))}),n}},3937:t=>{t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},3942:t=>{t.exports=''},3950:t=>{t.exports=function(){}},3988:(t,e,n)=>{"use strict";var r=n(6857),i=n(8191).Graph;function o(t,e,n,i){var o;do{o=r.uniqueId(i)}while(t.hasNode(o));return n.dummy=e,t.setNode(o,n),o}function a(t){return r.max(r.map(t.nodes(),function(e){var n=t.node(e).rank;if(!r.isUndefined(n))return n}))}t.exports={addDummyNode:o,simplify:function(t){var e=(new i).setGraph(t.graph());return r.forEach(t.nodes(),function(n){e.setNode(n,t.node(n))}),r.forEach(t.edges(),function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),function(n){t.children(n).length||e.setNode(n,t.node(n))}),r.forEach(t.edges(),function(n){e.setEdge(n,t.edge(n))}),e},successorWeights:function(t){var e=r.map(t.nodes(),function(e){var n={};return r.forEach(t.outEdges(e),function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight}),n});return r.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=r.map(t.nodes(),function(e){var n={};return r.forEach(t.inEdges(e),function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight}),n});return r.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,o=t.y,a=e.x-i,s=e.y-o,c=t.width/2,u=t.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*c>Math.abs(a)*u?(s<0&&(u=-u),n=u*a/s,r=u):(a<0&&(c=-c),n=c,r=c*s/a),{x:i+n,y:o+r}},buildLayerMatrix:function(t){var e=r.map(r.range(a(t)+1),function(){return[]});return r.forEach(t.nodes(),function(n){var i=t.node(n),o=i.rank;r.isUndefined(o)||(e[o][i.order]=n)}),e},normalizeRanks:function(t){var e=r.min(r.map(t.nodes(),function(e){return t.node(e).rank}));r.forEach(t.nodes(),function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)})},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),function(e){return t.node(e).rank})),n=[];r.forEach(t.nodes(),function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)});var i=0,o=t.graph().nodeRankFactor;r.forEach(n,function(e,n){r.isUndefined(e)&&n%o!==0?--i:i&&r.forEach(e,function(e){t.node(e).rank+=i})})},addBorderNode:function(t,e,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),o(t,"border",i,e)},maxRank:a,partition:function(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,function(t){e(t)?n.lhs.push(t):n.rhs.push(t)}),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}},notime:function(t,e){return e()}}},4066:(t,e,n)=>{var r=n(3488);t.exports=function(t){return"function"==typeof t?t:r}},4128:(t,e,n)=>{var r=n(1800),i=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(i,""):t}},4218:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},4247:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}},4248:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n{t.exports=function(t,e){return function(n){return t(e(n))}}},4383:(t,e,n)=>{var r=n(6001),i=n(8816)(function(t,e){return null==t?{}:r(t,e)});t.exports=i},4384:(t,e,n)=>{var r=n(6857);t.exports=function(t,e,n){var i,o={};r.forEach(n,function(n){for(var r,a,s=t.parent(n);s;){if((r=t.parent(s))?(a=o[r],o[r]=s):(a=i,i=s),a&&a!==s)return void e.setEdge(a,s);s=r}})}},4394:(t,e,n)=>{var r=n(2552),i=n(346);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},4423:(t,e,n)=>{var r=n(117),i=n(6454),o=n(1737);t.exports=function(t,e){var n,a=new i,s={},c=new o;function u(t){var r=t.v===n?t.w:t.v,i=c.priority(r);if(void 0!==i){var o=e(t);o0;){if(n=c.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(n).forEach(u)}return a}},4458:t=>{t.exports="2.1.8"},4485:t=>{t.exports=''},4506:(t,e,n)=>{var r=n(3599),i=n(3335),o=n(3488);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},4509:(t,e,n)=>{var r=n(2651);t.exports=function(t){return r(this,t).has(t)}},4517:(t,e,n)=>{var r=n(6545),i=n(3950),o=n(4247),a=r&&1/o(new r([,-0]))[1]==1/0?function(t){return new r(t)}:i;t.exports=a},4520:(t,e,n)=>{var r=n(6857),i=n(3860),o=n(4959),a=n(5169);t.exports=function t(e,n,s,c){var u=e.children(n),l=e.node(n),h=l?l.borderLeft:void 0,f=l?l.borderRight:void 0,d={};h&&(u=r.filter(u,function(t){return t!==h&&t!==f}));var g=i(e,u);r.forEach(g,function(n){if(e.children(n.v).length){var i=t(e,n.v,s,c);d[n.v]=i,r.has(i,"barycenter")&&(o=n,a=i,r.isUndefined(o.barycenter)?(o.barycenter=a.barycenter,o.weight=a.weight):(o.barycenter=(o.barycenter*o.weight+a.barycenter*a.weight)/(o.weight+a.weight),o.weight+=a.weight))}var o,a});var p=o(g,s);!function(t,e){r.forEach(t,function(t){t.vs=r.flatten(t.vs.map(function(t){return e[t]?e[t].vs:t}),!0)})}(p,d);var v=a(p,c);if(h&&(v.vs=r.flatten([h,v.vs,f],!0),e.predecessors(h).length)){var b=e.node(e.predecessors(h)[0]),y=e.node(e.predecessors(f)[0]);r.has(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+b.order+y.order)/(v.weight+2),v.weight+=2}return v}},4528:t=>{t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n{var r=n(9770),i=n(3345),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(t){return null==t?[]:(t=Object(t),r(a(t),function(e){return o.call(t,e)}))}:i;t.exports=s},4684:(t,e,n)=>{var r=n(9302),i=n(5288),o=n(6800),a=n(7241),s=Object.prototype,c=s.hasOwnProperty,u=r(function(t,e){t=Object(t);var n=-1,r=e.length,u=r>2?e[2]:void 0;for(u&&o(e[0],e[1],u)&&(r=1);++n{var r=n(2523),i=n(5389),o=n(1489),a=Math.max;t.exports=function(t,e,n){var s=null==t?0:t.length;if(!s)return-1;var c=null==n?0:o(n);return c<0&&(c=a(s+c,0)),r(t,i(e,3),c)}},4722:t=>{t.exports=''},4723:t=>{t.exports=''},4733:(t,e,n)=>{var r=n(1791),i=n(5950);t.exports=function(t,e){return t&&r(e,i(e),t)}},4739:(t,e,n)=>{var r=n(6025);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},4840:(t,e,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},4850:(t,e,n)=>{"use strict";var r=n(6857);function i(t){r.forEach(t.nodes(),function(e){o(t.node(e))}),r.forEach(t.edges(),function(e){o(t.edge(e))})}function o(t){var e=t.width;t.width=t.height,t.height=e}function a(t){t.y=-t.y}function s(t){var e=t.x;t.x=t.y,t.y=e}t.exports={adjust:function(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||i(t)},undo:function(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){r.forEach(t.nodes(),function(e){a(t.node(e))}),r.forEach(t.edges(),function(e){var n=t.edge(e);r.forEach(n.points,a),r.has(n,"y")&&a(n)})}(t),"lr"!==e&&"rl"!==e||(function(t){r.forEach(t.nodes(),function(e){s(t.node(e))}),r.forEach(t.edges(),function(e){var n=t.edge(e);r.forEach(n.points,s),r.has(n,"x")&&s(n)})}(t),i(t))}}},4894:(t,e,n)=>{var r=n(1882),i=n(294);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},4901:(t,e,n)=>{var r=n(2552),i=n(294),o=n(346),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!a[r(t)]}},4919:(t,e,n)=>{var r=n(8905),i=n(117);t.exports=function(t,e,n){return i.transform(t.nodes(),function(i,o){i[o]=r(t,o,e,n)},{})}},4932:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n{"use strict";var r=n(6857);t.exports=function(t,e){var n={};return r.forEach(t,function(t,e){var i=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};r.isUndefined(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)}),r.forEach(e.edges(),function(t){var e=n[t.v],i=n[t.w];r.isUndefined(e)||r.isUndefined(i)||(i.indegree++,e.out.push(n[t.w]))}),function(t){var e=[];function n(t){return function(e){var n,i,o,a;e.merged||(r.isUndefined(e.barycenter)||r.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&(i=e,o=0,a=0,(n=t).weight&&(o+=n.barycenter*n.weight,a+=n.weight),i.weight&&(o+=i.barycenter*i.weight,a+=i.weight),n.vs=i.vs.concat(n.vs),n.barycenter=o/a,n.weight=a,n.i=Math.min(i.i,n.i),i.merged=!0)}}function i(e){return function(n){n.in.push(e),0===--n.indegree&&t.push(n)}}for(;t.length;){var o=t.pop();e.push(o),r.forEach(o.in.reverse(),n(o)),r.forEach(o.out,i(o))}return r.map(r.filter(e,function(t){return!t.merged}),function(t){return r.pick(t,["vs","i","barycenter","weight"])})}(r.filter(n,function(t){return!t.indegree}))}},4974:t=>{t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},5015:(t,e,n)=>{var r=n(2552),i=n(6449),o=n(346);t.exports=function(t){return"string"==typeof t||!i(t)&&o(t)&&"[object String]"==r(t)}},5056:(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},5067:t=>{t.exports=''},5072:t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r{var r=n(1882),i=n(7296),o=n(3805),a=n(7473),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,h=u.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?f:s).test(a(t))}},5111:function(t,e,n){var r;r=function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},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=0)}([function(t,e,n){var r=n(1),i=function(t){t&&t("layout","dagre",r)};"undefined"!=typeof cytoscape&&i(cytoscape),t.exports=i},function(t,e,n){function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}var i=function(t){return"function"==typeof t},o=n(2),a=n(3),s=n(4);function c(t){this.options=a({},o,t)}c.prototype.run=function(){var t=this.options,e=t.cy,n=t.eles,o=function(t,e){return i(e)?e.apply(t,[t]):e},a=t.boundingBox||{x1:0,y1:0,w:e.width(),h:e.height()};void 0===a.x2&&(a.x2=a.x1+a.w),void 0===a.w&&(a.w=a.x2-a.x1),void 0===a.y2&&(a.y2=a.y1+a.h),void 0===a.h&&(a.h=a.y2-a.y1);var c=new s.graphlib.Graph({multigraph:!0,compound:!0}),u={},l=function(t,e){null!=e&&(u[t]=e)};l("nodesep",t.nodeSep),l("edgesep",t.edgeSep),l("ranksep",t.rankSep),l("rankdir",t.rankDir),l("align",t.align),l("ranker",t.ranker),l("acyclicer",t.acyclicer),c.setGraph(u),c.setDefaultEdgeLabel(function(){return{}}),c.setDefaultNodeLabel(function(){return{}});var h=n.nodes();i(t.sort)&&(h=h.sort(t.sort));for(var f=0;f1?e-1:0),r=1;r{var r=n(909),i=n(4894);t.exports=function(t,e){var n=-1,o=i(t)?Array(t.length):[];return r(t,function(t,r,i){o[++n]=e(t,r,i)}),o}},5169:(t,e,n)=>{var r=n(6857),i=n(3988);function o(t,e,n){for(var i;e.length&&(i=r.last(e)).i<=n;)e.pop(),t.push(i.vs),n++;return n}t.exports=function(t,e){var n,a=i.partition(t,function(t){return r.has(t,"barycenter")}),s=a.lhs,c=r.sortBy(a.rhs,function(t){return-t.i}),u=[],l=0,h=0,f=0;s.sort((n=!!e,function(t,e){return t.barycentere.barycenter?1:n?e.i-t.i:t.i-e.i})),f=o(u,c,f),r.forEach(s,function(t){f+=t.vs.length,u.push(t.vs),l+=t.barycenter*t.weight,h+=t.weight,f=o(u,c,f)});var d={vs:r.flatten(u,!0)};return h&&(d.barycenter=l/h,d.weight=h),d}},5250:(t,e,n)=>{var r=n(7217),i=n(7805),o=n(6649),a=n(2824),s=n(3805),c=n(7241),u=n(4974);t.exports=function t(e,n,l,h,f){e!==n&&o(n,function(o,c){if(f||(f=new r),s(o))a(e,n,c,l,t,h,f);else{var d=h?h(u(e,c),o,c+"",e,n,f):void 0;void 0===d&&(d=o),i(e,c,d)}},c)}},5288:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},5325:(t,e,n)=>{var r=n(6131);t.exports=function(t,e){return!(null==t||!t.length)&&r(t,e,0)>-1}},5364:(t,e,n)=>{var r=n(5250),i=n(999)(function(t,e,n){r(t,e,n)});t.exports=i},5378:(t,e,n)=>{var r=n(4932),i=n(5389),o=n(5128),a=n(6449);t.exports=function(t,e){return(a(t)?r:o)(t,i(e,3))}},5389:(t,e,n)=>{var r=n(3663),i=n(7978),o=n(3488),a=n(6449),s=n(583);t.exports=function(t){return"function"==typeof t?t:null==t?o:"object"==typeof t?a(t)?i(t[0],t[1]):r(t):s(t)}},5463:t=>{t.exports=function(t){return t!=t}},5465:t=>{t.exports=''},5481:(t,e,n)=>{var r=n(9325)["__core-js_shared__"];t.exports=r},5508:(t,e,n)=>{var r=n(6151),i=n(6800),o=n(7400);t.exports=function(t){return function(e,n,a){return a&&"number"!=typeof a&&i(e,n,a)&&(n=a=void 0),e=o(e),void 0===n?(n=e,e=0):n=o(n),a=void 0===a?e{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},5529:(t,e,n)=>{var r=n(9344),i=n(8879),o=n(5527);t.exports=function(t){return"function"!=typeof t.constructor||o(t)?{}:r(i(t))}},5542:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9957),i=function(t,e){this.id=t,this.distance=e},o=function(t){this.id=t,this.neighbours=[]},a=function(t,e,n){this.node=t,this.prev=e,this.d=n},s=function(){function t(t,e,n,r,a){this.n=t,this.es=e,this.neighbours=new Array(this.n);for(var s=this.n;s--;)this.neighbours[s]=new o(s);for(s=this.es.length;s--;){var c=this.es[s],u=n(c),l=r(c),h=a(c);this.neighbours[u].neighbours.push(new i(l,h)),this.neighbours[l].neighbours.push(new i(u,h))}}return t.prototype.DistanceMatrix=function(){for(var t=new Array(this.n),e=0;eh&&(u.d=h,u.prev=s,n.reduceKey(u.q,u,function(t,e){return t.q=e}))}}return o},t}();e.Calculator=s},5558:t=>{t.exports=function(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}},5580:(t,e,n)=>{var r=n(6110)(n(9325),"DataView");t.exports=r},5697:t=>{t.exports=''},5749:(t,e,n)=>{var r=n(1042);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},5765:(t,e,n)=>{var r=n(8859),i=n(5325),o=n(9905),a=n(9219),s=n(4517),c=n(4247);t.exports=function(t,e,n){var u=-1,l=i,h=t.length,f=!0,d=[],g=d;if(n)f=!1,l=o;else if(h>=200){var p=e?null:s(t);if(p)return c(p);f=!1,l=a,g=new r}else g=e?[]:d;t:for(;++u{t.exports=''},5861:(t,e,n)=>{var r=n(5580),i=n(8223),o=n(423),a=n(6545),s=n(8303),c=n(2552),u=n(7473),l="[object Map]",h="[object Promise]",f="[object Set]",d="[object WeakMap]",g="[object DataView]",p=u(r),v=u(i),b=u(o),y=u(a),w=u(s),m=c;(r&&m(new r(new ArrayBuffer(1)))!=g||i&&m(new i)!=l||o&&m(o.resolve())!=h||a&&m(new a)!=f||s&&m(new s)!=d)&&(m=function(t){var e=c(t),n="[object Object]"==e?t.constructor:void 0,r=n?u(n):"";if(r)switch(r){case p:return g;case v:return l;case b:return h;case y:return f;case w:return d}return e}),t.exports=m},5880:(t,e,n)=>{var r=n(514),i=n(5950);t.exports=function(t){return null==t?[]:r(t,i(t))}},5891:(t,e,n)=>{var r=n(1873),i=n(2428),o=n(6449),a=r?r.isConcatSpreadable:void 0;t.exports=function(t){return o(t)||i(t)||!!(a&&t&&t[a])}},5911:(t,e,n)=>{var r=n(8859),i=n(4248),o=n(9219);t.exports=function(t,e,n,a,s,c){var u=1&n,l=t.length,h=e.length;if(l!=h&&!(u&&h>l))return!1;var f=c.get(t),d=c.get(e);if(f&&d)return f==e&&d==t;var g=-1,p=!0,v=2&n?new r:void 0;for(c.set(t,e),c.set(e,t);++g{t.exports=''},5950:(t,e,n)=>{var r=n(695),i=n(8984),o=n(4894);t.exports=function(t){return o(t)?r(t):i(t)}},5970:(t,e,n)=>{var r=n(3120);t.exports=function(t){return null!=t&&t.length?r(t,1):[]}},6001:(t,e,n)=>{var r=n(7420),i=n(631);t.exports=function(t,e){return r(t,e,function(e,n){return i(t,n)})}},6009:(t,e,n)=>{t=n.nmd(t);var r=n(4840),i=e&&!e.nodeType&&e,o=i&&t&&!t.nodeType&&t,a=o&&o.exports===i&&r.process,s=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=s},6016:(t,e,n)=>{var r=n(9276);t.exports=function(t,e){return r(t,e,"pre")}},6025:(t,e,n)=>{var r=n(5288);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},6038:(t,e,n)=>{var r=n(5861),i=n(346);t.exports=function(t){return i(t)&&"[object Set]"==r(t)}},6042:t=>{t.exports=''},6043:t=>{t.exports=''},6110:(t,e,n)=>{var r=n(5083),i=n(392);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},6131:(t,e,n)=>{var r=n(2523),i=n(5463),o=n(6959);t.exports=function(t,e,n){return e==e?o(t,e,n):r(t,i,n)}},6135:(t,e,n)=>{t.exports=n(9754)},6151:t=>{var e=Math.ceil,n=Math.max;t.exports=function(t,r,i,o){for(var a=-1,s=n(e((r-t)/(i||1)),0),c=Array(s);s--;)c[o?s:++a]=t,t+=i;return c}},6155:(t,e,n)=>{var r=n(4932),i=n(7422),o=n(5389),a=n(5128),s=n(3937),c=n(7301),u=n(3714),l=n(3488),h=n(6449);t.exports=function(t,e,n){e=e.length?r(e,function(t){return h(t)?function(e){return i(e,1===t.length?t[0]:t)}:t}):[l];var f=-1;e=r(e,c(o));var d=a(t,function(t,n,i){return{criteria:r(e,function(e){return e(t)}),index:++f,value:t}});return s(d,function(t,e){return u(t,e,n)})}},6169:(t,e,n)=>{var r=n(9653);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},6176:t=>{t.exports=function(t,e){return t{var e=Object.prototype.hasOwnProperty;t.exports=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},6246:(t,e,n)=>{t.exports={graphlib:n(8191),layout:n(8202),debug:n(8909),util:{time:n(3988).time,notime:n(3988).notime},version:n(7038)}},6266:function(t,e){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){this.findIter=function(t){for(var e=this._root,n=this.iterator();null!==e;){var r=this._comparator(t,e.data);if(0===r)return n._cursor=e,n;n._ancestors.push(e),e=e.get_child(r>0)}return null}}return t.prototype.clear=function(){this._root=null,this.size=0},t.prototype.find=function(t){for(var e=this._root;null!==e;){var n=this._comparator(t,e.data);if(0===n)return e.data;e=e.get_child(n>0)}return null},t.prototype.lowerBound=function(t){return this._bound(t,this._comparator)},t.prototype.upperBound=function(t){var e=this._comparator;return this._bound(t,function(t,n){return e(n,t)})},t.prototype.min=function(){var t=this._root;if(null===t)return null;for(;null!==t.left;)t=t.left;return t.data},t.prototype.max=function(){var t=this._root;if(null===t)return null;for(;null!==t.right;)t=t.right;return t.data},t.prototype.iterator=function(){return new o(this)},t.prototype.each=function(t){for(var e,n=this.iterator();null!==(e=n.next());)t(e)},t.prototype.reach=function(t){for(var e,n=this.iterator();null!==(e=n.prev());)t(e)},t.prototype._bound=function(t,e){for(var n=this._root,r=this.iterator();null!==n;){var i=this._comparator(t,n.data);if(0===i)return r._cursor=n,r;r._ancestors.push(n),n=n.get_child(i>0)}for(var o=r._ancestors.length-1;o>=0;--o)if(e(t,(n=r._ancestors[o]).data)>0)return r._cursor=n,r._ancestors.length=o,r;return r._ancestors.length=0,r},t}();e.TreeBase=i;var o=function(){function t(t){this._tree=t,this._ancestors=[],this._cursor=null}return t.prototype.data=function(){return null!==this._cursor?this._cursor.data:null},t.prototype.next=function(){if(null===this._cursor){var t=this._tree._root;null!==t&&this._minNode(t)}else{var e;if(null===this._cursor.right)do{if(e=this._cursor,!this._ancestors.length){this._cursor=null;break}this._cursor=this._ancestors.pop()}while(this._cursor.right===e);else this._ancestors.push(this._cursor),this._minNode(this._cursor.right)}return null!==this._cursor?this._cursor.data:null},t.prototype.prev=function(){if(null===this._cursor){var t=this._tree._root;null!==t&&this._maxNode(t)}else{var e;if(null===this._cursor.left)do{if(e=this._cursor,!this._ancestors.length){this._cursor=null;break}this._cursor=this._ancestors.pop()}while(this._cursor.left===e);else this._ancestors.push(this._cursor),this._maxNode(this._cursor.left)}return null!==this._cursor?this._cursor.data:null},t.prototype._minNode=function(t){for(;null!==t.left;)this._ancestors.push(t),t=t.left;this._cursor=t},t.prototype._maxNode=function(t){for(;null!==t.right;)this._ancestors.push(t),t=t.right;this._cursor=t},t}();e.Iterator=o;var a=function(){function t(t){this.data=t,this.left=null,this.right=null,this.red=!0}return t.prototype.get_child=function(t){return t?this.right:this.left},t.prototype.set_child=function(t,e){t?this.right=e:this.left=e},t}(),s=function(t){function e(e){var n=t.call(this)||this;return n._root=null,n._comparator=e,n.size=0,n}return r(e,t),e.prototype.insert=function(t){var n=!1;if(null===this._root)this._root=new a(t),n=!0,this.size++;else{var r=new a(void 0),i=!1,o=!1,s=null,c=r,u=null,l=this._root;for(c.right=this._root;;){if(null===l?(l=new a(t),u.set_child(i,l),n=!0,this.size++):e.is_red(l.left)&&e.is_red(l.right)&&(l.red=!0,l.left.red=!1,l.right.red=!1),e.is_red(l)&&e.is_red(u)){var h=c.right===s;l===u.get_child(o)?c.set_child(h,e.single_rotate(s,!o)):c.set_child(h,e.double_rotate(s,!o))}var f=this._comparator(l.data,t);if(0===f)break;o=i,i=f<0,null!==s&&(c=s),s=u,u=l,l=l.get_child(i)}this._root=r.right}return this._root.red=!1,n},e.prototype.remove=function(t){if(null===this._root)return!1;var n=new a(void 0),r=n;r.right=this._root;for(var i=null,o=null,s=null,c=!0;null!==r.get_child(c);){var u=c;o=i,i=r,r=r.get_child(c);var l=this._comparator(t,r.data);if(c=l>0,0===l&&(s=r),!e.is_red(r)&&!e.is_red(r.get_child(c)))if(e.is_red(r.get_child(!c))){var h=e.single_rotate(r,c);i.set_child(u,h),i=h}else if(!e.is_red(r.get_child(!c))){var f=i.get_child(!u);if(null!==f)if(e.is_red(f.get_child(!u))||e.is_red(f.get_child(u))){var d=o.right===i;e.is_red(f.get_child(u))?o.set_child(d,e.double_rotate(i,u)):e.is_red(f.get_child(!u))&&o.set_child(d,e.single_rotate(i,u));var g=o.get_child(d);g.red=!0,r.red=!0,g.left.red=!1,g.right.red=!1}else i.red=!1,f.red=!0,r.red=!0}}return null!==s&&(s.data=r.data,i.set_child(i.right===r,r.get_child(null===r.left)),this.size--),this._root=n.right,null!==this._root&&(this._root.red=!1),null!==s},e.is_red=function(t){return null!==t&&t.red},e.single_rotate=function(t,e){var n=t.get_child(!e);return t.set_child(!e,n.get_child(e)),n.set_child(e,t),t.red=!0,n.red=!1,n},e.double_rotate=function(t,n){return t.set_child(!n,e.single_rotate(t.get_child(!n),!n)),e.single_rotate(t,n)},e}(i);e.RBTree=s},6291:(t,e,n)=>{var r=n(117);t.exports=function(t){var e=0,n=[],i={},o=[];function a(s){var c=i[s]={onStack:!0,lowlink:e,index:e++};if(n.push(s),t.successors(s).forEach(function(t){r.has(i,t)?i[t].onStack&&(c.lowlink=Math.min(c.lowlink,i[t].index)):(a(t),c.lowlink=Math.min(c.lowlink,i[t].lowlink))}),c.lowlink===c.index){var u,l=[];do{u=n.pop(),i[u].onStack=!1,l.push(u)}while(s!==u);o.push(l)}}return t.nodes().forEach(function(t){r.has(i,t)||a(t)}),o}},6298:t=>{t.exports=''},6314:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n}).join("")},e.i=function(t,n,r,i,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(r)for(var s=0;s0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=o),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),e.push(l))}},e}},6343:t=>{t.exports=''},6353:(t,e,n)=>{var r=n(6857),i=n(3988);function o(t,e,n,a,s,c,u){var l=t.children(u);if(l.length){var h=i.addBorderNode(t,"_bt"),f=i.addBorderNode(t,"_bb"),d=t.node(u);t.setParent(h,u),d.borderTop=h,t.setParent(f,u),d.borderBottom=f,r.forEach(l,function(r){o(t,e,n,a,s,c,r);var i=t.node(r),l=i.borderTop?i.borderTop:r,d=i.borderBottom?i.borderBottom:r,g=i.borderTop?a:2*a,p=l!==d?1:s-c[u]+1;t.setEdge(h,l,{weight:g,minlen:p,nestingEdge:!0}),t.setEdge(d,f,{weight:g,minlen:p,nestingEdge:!0})}),t.parent(u)||t.setEdge(e,h,{weight:0,minlen:s+c[u]})}else u!==e&&t.setEdge(e,u,{weight:0,minlen:n})}t.exports={run:function(t){var e=i.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};function n(i,o){var a=t.children(i);a&&a.length&&r.forEach(a,function(t){n(t,o+1)}),e[i]=o}return r.forEach(t.children(),function(t){n(t,1)}),e}(t),a=r.max(r.values(n))-1,s=2*a+1;t.graph().nestingRoot=e,r.forEach(t.edges(),function(e){t.edge(e).minlen*=s});var c=function(t){return r.reduce(t.edges(),function(e,n){return e+t.edge(n).weight},0)}(t)+1;r.forEach(t.children(),function(r){o(t,e,s,c,a,n,r)}),t.graph().nodeRankFactor=s},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,r.forEach(t.edges(),function(e){t.edge(e).nestingEdge&&t.removeEdge(e)})}}},6375:(t,e,n)=>{var r=n(4528),i=n(8879),o=n(4664),a=n(3345),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,o(t)),t=i(t);return e}:a;t.exports=s},6449:t=>{var e=Array.isArray;t.exports=e},6454:(t,e,n)=>{"use strict";var r=n(117);t.exports=o;var i="\0";function o(t){this._isDirected=!r.has(t,"directed")||t.directed,this._isMultigraph=!!r.has(t,"multigraph")&&t.multigraph,this._isCompound=!!r.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[i]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function a(t,e){t[e]?t[e]++:t[e]=1}function s(t,e){--t[e]||delete t[e]}function c(t,e,n,i){var o=""+e,a=""+n;if(!t&&o>a){var s=o;o=a,a=s}return o+""+a+""+(r.isUndefined(i)?"\0":i)}function u(t,e){return c(t,e.v,e.w,e.name)}o.prototype._nodeCount=0,o.prototype._edgeCount=0,o.prototype.isDirected=function(){return this._isDirected},o.prototype.isMultigraph=function(){return this._isMultigraph},o.prototype.isCompound=function(){return this._isCompound},o.prototype.setGraph=function(t){return this._label=t,this},o.prototype.graph=function(){return this._label},o.prototype.setDefaultNodeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultNodeLabelFn=t,this},o.prototype.nodeCount=function(){return this._nodeCount},o.prototype.nodes=function(){return r.keys(this._nodes)},o.prototype.sources=function(){var t=this;return r.filter(this.nodes(),function(e){return r.isEmpty(t._in[e])})},o.prototype.sinks=function(){var t=this;return r.filter(this.nodes(),function(e){return r.isEmpty(t._out[e])})},o.prototype.setNodes=function(t,e){var n=arguments,i=this;return r.each(t,function(t){n.length>1?i.setNode(t,e):i.setNode(t)}),this},o.prototype.setNode=function(t,e){return r.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=i,this._children[t]={},this._children[i][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},o.prototype.node=function(t){return this._nodes[t]},o.prototype.hasNode=function(t){return r.has(this._nodes,t)},o.prototype.removeNode=function(t){var e=this;if(r.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],r.each(this.children(t),function(t){e.setParent(t)}),delete this._children[t]),r.each(r.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],r.each(r.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},o.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(e))e=i;else{for(var n=e+="";!r.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},o.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},o.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==i)return e}},o.prototype.children=function(t){if(r.isUndefined(t)&&(t=i),this._isCompound){var e=this._children[t];if(e)return r.keys(e)}else{if(t===i)return this.nodes();if(this.hasNode(t))return[]}},o.prototype.predecessors=function(t){var e=this._preds[t];if(e)return r.keys(e)},o.prototype.successors=function(t){var e=this._sucs[t];if(e)return r.keys(e)},o.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return r.union(e,this.successors(t))},o.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},o.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;r.each(this._nodes,function(n,r){t(r)&&e.setNode(r,n)}),r.each(this._edgeObjs,function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))});var i={};function o(t){var r=n.parent(t);return void 0===r||e.hasNode(r)?(i[t]=r,r):r in i?i[r]:o(r)}return this._isCompound&&r.each(e.nodes(),function(t){e.setParent(t,o(t))}),e},o.prototype.setDefaultEdgeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultEdgeLabelFn=t,this},o.prototype.edgeCount=function(){return this._edgeCount},o.prototype.edges=function(){return r.values(this._edgeObjs)},o.prototype.setPath=function(t,e){var n=this,i=arguments;return r.reduce(t,function(t,r){return i.length>1?n.setEdge(t,r,e):n.setEdge(t,r),r}),this},o.prototype.setEdge=function(){var t,e,n,i,o=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(t=s.v,e=s.w,n=s.name,2===arguments.length&&(i=arguments[1],o=!0)):(t=s,e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),t=""+t,e=""+e,r.isUndefined(n)||(n=""+n);var u=c(this._isDirected,t,e,n);if(r.has(this._edgeLabels,u))return o&&(this._edgeLabels[u]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[u]=o?i:this._defaultEdgeLabelFn(t,e,n);var l=function(t,e,n,r){var i=""+e,o=""+n;if(!t&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return r&&(s.name=r),s}(this._isDirected,t,e,n);return t=l.v,e=l.w,Object.freeze(l),this._edgeObjs[u]=l,a(this._preds[e],t),a(this._sucs[t],e),this._in[e][u]=l,this._out[t][u]=l,this._edgeCount++,this},o.prototype.edge=function(t,e,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):c(this._isDirected,t,e,n);return this._edgeLabels[r]},o.prototype.hasEdge=function(t,e,n){var i=1===arguments.length?u(this._isDirected,arguments[0]):c(this._isDirected,t,e,n);return r.has(this._edgeLabels,i)},o.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):c(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[e],t),s(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},o.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var i=r.values(n);return e?r.filter(i,function(t){return t.v===e}):i}},o.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var i=r.values(n);return e?r.filter(i,function(t){return t.w===e}):i}},o.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},6529:t=>{t.exports=''},6533:(t,e,n)=>{var r=n(3599),i=n(5389),o=n(6176);t.exports=function(t,e){return t&&t.length?r(t,i(e,2),o):void 0}},6545:(t,e,n)=>{var r=n(6110)(n(9325),"Set");t.exports=r},6547:(t,e,n)=>{var r=n(3360),i=n(5288),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];o.call(t,e)&&i(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},6574:(t,e,n)=>{var r=n(909);t.exports=function(t,e){var n=[];return r(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}},6639:(t,e,n)=>{"use strict";var r=n(6857);function i(t,e,n){for(var i=r.zipObject(n,r.map(n,function(t,e){return e})),o=r.flatten(r.map(e,function(e){return r.sortBy(r.map(t.outEdges(e),function(e){return{pos:i[e.w],weight:t.edge(e).weight}}),"pos")}),!0),a=1;a0;)e%2&&(n+=c[e+1]),c[e=e-1>>1]+=t.weight;u+=t.weight*n})),u}t.exports=function(t,e){for(var n=0,r=1;r{var r=n(3221)();t.exports=r},6678:(t,e,n)=>{var r=n(117),i=n(6291);t.exports=function(t){return r.filter(i(t),function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])})}},6721:(t,e,n)=>{var r=n(1042),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},6755:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5542),i=n(3210),o=n(2893),a=n(8581),s=function(){function t(t,e){this.source=t,this.target=e}return t.prototype.actualLength=function(t){var e=this;return Math.sqrt(t.reduce(function(t,n){var r=n[e.target]-n[e.source];return t+r*r},0))},t}();e.Link3D=s;e.Node3D=function(t,e,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=n};var c=function(){function t(e,n,r){var i=this;void 0===r&&(r=1),this.nodes=e,this.links=n,this.idealLinkLength=r,this.constraints=null,this.useJaccardLinkLengths=!0,this.result=new Array(t.k);for(var o=0;o{var r=n(1033),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,s=i(o.length-e,0),c=Array(s);++a{var r=n(5288),i=n(4894),o=n(361),a=n(3805);t.exports=function(t,e,n){if(!a(n))return!1;var s=typeof e;return!!("number"==s?i(n)&&o(e,n.length):"string"==s&&e in n)&&r(n[e],t)}},6804:t=>{t.exports=''},6822:(t,e,n)=>{"use strict";var r=n(6857),i=n(2031);t.exports={run:function(t){var e="greedy"===t.graph().acyclicer?i(t,function(t){return function(e){return t.edge(e).weight}}(t)):function(t){var e=[],n={},i={};return r.forEach(t.nodes(),function o(a){r.has(i,a)||(i[a]=!0,n[a]=!0,r.forEach(t.outEdges(a),function(t){r.has(n,t.w)?e.push(t):o(t.w)}),delete n[a])}),e}(t);r.forEach(e,function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,r.uniqueId("rev"))})},undo:function(t){r.forEach(t.edges(),function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}})}}},6842:t=>{var e,n;!function(){var r;function i(){}function a(){}function s(){}function c(){}function u(){}function l(){}function h(){}function f(){}function d(){}function g(){}function p(){}function v(){}function b(){}function y(){}function w(){}function m(){}function x(){}function E(){}function _(){}function k(){}function N(){}function C(){}function T(){}function A(){}function I(){}function O(){}function S(){}function L(){}function M(){}function P(){}function D(){}function R(){}function j(){}function B(){}function G(){}function F(){}function H(){}function Y(){}function z(){}function V(){}function U(){}function X(){}function W(){}function q(){}function Z(){}function K(){}function $(){}function Q(){}function J(){}function tt(){}function et(){}function nt(){}function rt(){}function it(){}function ot(){}function at(){}function st(){}function ct(){}function ut(){}function lt(){}function ht(){}function ft(){}function dt(){}function gt(){}function pt(){}function vt(){}function bt(){}function yt(){}function wt(){}function mt(){}function xt(){}function Et(){}function _t(){}function kt(){}function Nt(){}function Ct(){}function Tt(){}function At(){}function It(){}function Ot(){}function St(){}function Lt(){}function Mt(){}function Pt(){}function Dt(){}function Rt(){}function jt(){}function Bt(){}function Gt(){}function Ft(){}function Ht(){}function Yt(){}function zt(){}function Vt(){}function Ut(){}function Xt(){}function Wt(){}function qt(){}function Zt(){}function Kt(){}function $t(){}function Qt(){}function Jt(){}function te(){}function ee(){}function ne(){}function re(){}function ie(){}function oe(){}function ae(){}function se(){}function ce(){}function ue(){}function le(){}function he(){}function fe(){}function de(){}function ge(){}function pe(){}function ve(){}function be(){}function ye(){}function we(){}function me(){Bf()}function xe(){NE()}function Ee(){Xd()}function _e(){Up()}function ke(){eo()}function Ne(){no()}function Ce(){ha()}function Te(){Xp()}function Ae(){Pf()}function Ie(){Ck()}function Oe(){Df()}function Se(){Rf()}function Le(){uT()}function Me(){ON()}function Pe(){ah(this)}function De(){}function Re(){mu(this)}function je(){}function Be(t){this.a=t}function Ge(t){this.a=t}function Fe(t){this.a=t}function He(t){this.a=t}function Ye(t){this.a=t}function ze(t){this.a=t}function Ve(t){this.a=t}function Ue(t){this.a=t}function Xe(t){this.a=t}function We(t){this.b=t}function qe(t){this.a=t}function Ze(t){this.a=t}function Ke(t){this.a=t}function $e(t){this.a=t}function Qe(t){this.a=t}function Je(t){this.a=t}function tn(t){this.a=t}function en(t){this.a=t}function nn(t){this.a=t}function rn(t){this.a=t}function on(t){this.a=t}function an(t){this.a=t}function sn(t){this.a=t}function cn(t){this.a=t}function un(t){this.a=t}function ln(t){this.e=t}function hn(t){this.a=t}function fn(t){this.a=t}function dn(t){this.a=t}function gn(t){this.a=t}function pn(t){this.a=t}function vn(t){this.a=t}function bn(t){this.a=t}function yn(t){this.a=t}function wn(t){this.a=t}function mn(t){this.a=t}function xn(t){this.a=t}function En(t){this.a=t}function _n(t){this.a=t}function kn(t){this.a=t}function Nn(t){this.a=t}function Cn(t){this.a=t}function Tn(t){this.a=t}function An(t){this.a=t}function In(t){this.a=t}function On(t){this.a=t}function Sn(t){this.a=t}function Ln(t){this.c=t}function Mn(t){this.a=t}function Pn(t){this.a=t}function Dn(t){this.a=t}function Rn(t){this.a=t}function jn(t){this.a=t}function Bn(t){this.a=t}function Gn(t){this.a=t}function Fn(t){this.a=t}function Hn(t){this.a=t}function Yn(t){this.a=t}function zn(t){this.d=t}function Vn(t){this.a=t}function Un(t){this.a=t}function Xn(t){this.a=t}function Wn(t){this.a=t}function qn(t){this.b=t}function Zn(t){this.a=t}function Kn(t){this.a=t}function $n(t){this.c=t}function Qn(t){this.a=t}function Jn(t){this.a=t}function tr(t){this.a=t}function er(t){this.b=t}function nr(t){this.b=t}function rr(t){this.c=t}function ir(t){this.a=t}function or(t){this.a=t}function ar(t){this.a=t}function sr(){this.a=[]}function cr(t){this.a=t}function ur(t){this.a=t}function lr(t){t.b=t.a}function hr(t){t.c=t.d.d}function fr(t,e){t.g=e}function dr(t,e){t.k=e}function gr(t,e){t.e.k=e}function pr(t){return t.a}function vr(t){return t.a}function br(t){return t.a}function yr(t){return t.a}function wr(t){return t.a}function mr(){return null}function xr(){return null}function Er(){this.c=this}function _r(){ah(this)}function kr(){yy(this)}function Nr(t){!function(t,e){var n,r,i,o,a,s,c;for(c=0,r=0,i=e.length;r=t.length)return{done:!0};var r=t[n++];return{value:[r,e.get(r)],done:!1}}}},function(){if(!Object.create||!Object.getOwnPropertyNames)return!1;var t="__proto__",e=Object.create(null);return void 0===e[t]&&0==Object.getOwnPropertyNames(e).length&&(e[t]=42,42===e[t]&&0!=Object.getOwnPropertyNames(e).length)}()||(t.prototype.createObject=function(){return{}},t.prototype.get=function(t){return this.obj[":"+t]},t.prototype.set=function(t,e){this.obj[":"+t]=e},t.prototype[bD]=function(t){delete this.obj[":"+t]},t.prototype.keys=function(){var t=[];for(var e in this.obj)58==e.charCodeAt(0)&&t.push(e.substring(1));return t}),t}()}function So(t,e){Sx(),iL.dc(t,e)}function Lo(t,e){return Lv(t,e)}function Mo(t,e){return t.a.B(e)}function Po(t,e){return t.g[e.e]}function Do(t,e){return t.i[e.e]}function Ro(t,e){return t.j[e.e]}function jo(t,e){return t.n[e.e]}function Bo(t,e){return t.o[e.e]}function Go(t,e){return t>e?t:e}function Fo(t,e){return t>e?t:e}function Ho(t,e){return t>e?t:e}function Yo(t,e){return te?1:0}function Gu(t){return null!=t?KE(t):0}function Fu(t){this.a=Yc(),this.b=t}function Hu(t){this.a=Yc(),this.b=t}function Yu(t){this.a=t,Jf.call(this,t)}function zu(){Qu(),this.b=new Nn(this)}function Vu(){var t;Vu=a,t=new so(", "),Pd(dL),FD=new $f(t,t)}function Uu(){Uu=a,BD=new hu,jD=new Lu}function Xu(){Xu=a,YD=new p,zD=new v}function Wu(){Wu=a,UD=new Zs,XD=new xu}function qu(){qu=a,QD=new fu,$D=new wl}function Zu(){Zu=a,pR=new w,vR=new m}function Ku(t){t.g=new Re,t.b=new Re}function $u(t){t.a=new ye,t.c=new ye}function Qu(){Qu=a,EY=new Kt,xY=new td}function Ju(){Fa.call(this,"IS_NULL",2)}function tl(){jc.call(this,"Head",1)}function el(){jc.call(this,"Tail",3)}function nl(t,e){im.call(this,t,e,null)}function rl(t,e){Fk(t,0,t.length,e)}function il(t,e){return Of(e.a,t.a),t.a}function ol(t,e){return t.a*=e,t.b*=e,t}function al(t,e){ip(),this.a=t,this.b=e}function sl(t,e){return t.a[e.d.k][e.k]}function cl(t,e){return t.a[e.d.k][e.k]}function ul(t,e){return ca(function(t,e){var n,r;for(n=null,r=t.b;r;)t.a.$b(e,r.d)>=0?r=r.a[1]:(n=r,r=r.a[0]);return n}(t.a,e))}function ll(t,e){return ca(function(t,e){var n,r;for(n=null,r=t.b;r;)t.a.$b(e,r.d)<=0?r=r.a[0]:(n=r,r=r.a[1]);return n}(t.a,e))}function hl(t,e){return zf(WN(t.a,e),20)}function fl(t,e){return null!=t&&Mk(t,e)}function dl(t){return t.a=e)throw new Ni}function Uf(t,e){return Pd(t),Pd(e),new sd(t,e)}function Xf(t,e){return Pd(t),Pd(e),new cd(t,e)}function Wf(t,e,n){return t=e+1&&t.splice(0,e+1);break}return t}(iL.ec(t))}function Ed(t,e){var n;return(n=Gg(t,e)).g=2,n}function _d(t,e){t.b=e.b,t.c=e.c,t.d=e.d,t.a=e.a}function kd(t){t.a.b=t.b,t.b.a=t.a,t.a=t.b=null}function Nd(t){return t.b.c.length+t.e.c.length}function Cd(t){return Array.isArray(t)&&t.ad===i}function Td(t,e){return Xu(),-1!=Bx(new $n(t),e)}function Ad(t,e,n,r,i,o){return RN(t,e,n,r,i,0,o)}function Id(t,e,n){Zu(),$v.call(this,t.b,e,n,t.d)}function Od(t,e){Zu(),$v.call(this,t.b,e,t.c,t.d)}function Sd(t,e,n){my(e,t.c.length),Tc(t.c,e,n)}function Ld(t,e){return xy(e,t.a.length),t.a[e]}function Md(t){t.sort(function(t,e){return t-e})}function Pd(t){if(null==t)throw new Zr;return t}function Dd(t){if(null==t)throw new Zr;this.a=t}function Rd(t,e,n){if(t.a!=e)throw new mi;t.a=n}function jd(t,e){if(!t)throw new ao((ai(),e))}function Bd(t,e){if(!t)throw new Eo((ai(),e))}function Gd(t){if(null==t)throw new Zr;return t}function Fd(t){cr.call(this,new ny),gm(this,t)}function Hd(t){this.a=new Xs(t.Y()),gm(this,t)}function Yd(t){this.c=t,this.a=new Us(this.c.a)}function zd(t){ip(),this.a=(Yp(),new tr(Pd(t)))}function Vd(){(Vd=a)(),CW=!1,TW=!0}function Ud(){Ud=a,SW=ky(CD,lL,24,256,0,1)}function Xd(){Xd=a,LY=pd(vd(new r_,(WS(),bH)),HH)}function Wd(){Wd=a,hF=new _,dF=new ed,fF=new k}function qd(t){return null!=t&&Lg(t)&&!(t.ad===i)}function Zd(t){return!Array.isArray(t)&&t.ad===i}function Kd(t,e){return Cl(e)?Mp(t,e):TT(t.d,e)}function $d(t,e){return fl(e,17)&&Xl(t,zf(e,17))}function Qd(t,e){return fl(e,17)&&function(t,e){return!(!e||t.b[e.e]!=e)&&(Hg(t.b,e.e,null),--t.c,!0)}(t,zf(e,17))}function Jd(t,e){var n;return ax(n=g_(t),e),n}function tg(t,e){return!t&&(t=[]),t[t.length]=e,t}function eg(t,e,n){if(!t)throw new ao(function(t,e){var n,r,i,o;for(ai(),(t=null==t?dL:t).length,e.length,n=new ta,o=0,r=0;r0),t.a.sb(t.c=--t.b)}function dg(t){t.b?dg(t.b):t.d.V()&&Kd(t.f.b,t.e)}function gg(t){if(e_(t.d),t.d.d!=t.c)throw new mi}function pg(t,e){if(e[dD]!=t[dD])throw new mi}function vg(t,e){return Xu(),Pd(t),Pd(e),new Da(t,e)}function bg(t,e){ip(),Ua.call(this,t,Ox(new Qn(e)))}function yg(t,e,n,r){this.a=t,Cy.call(this,t,e,n,r)}function wg(t){this.a=Math.cos(t),this.b=Math.sin(t)}function mg(t,e,n){Yi.call(this,t),this.b=e,this.a=n}function xg(t){this.b=new Re,this.a=new Re,this.c=t}function Eg(t){this.c=new co,this.a=new Re,this.b=t}function _g(){_g=a,iR=new nn(!1),oR=new nn(!0)}function kg(t,e){return++t.d,t.c[t.c.length]=e,!0}function Ng(t,e){Lb(t.d,e,t.b.b,t.b),++t.a,t.c=null}function Cg(t,e){return null==t.a.db(e,t)}function Tg(t,e){return By(t.slice(0,e),t)}function Ag(t,e){return By(new Array(e),t)}function Ig(t,e,n){var r;return r=t.b[e],t.b[e]=n,r}function Og(t){return xl(),xf(function(t){return zf(t.g||(t.g=new qe(t)),20)}(t.a).mb(),(Wu(),UD))}function Sg(t){return Xu(),new Mu(Ru(Xf(t.a,new g)))}function Lg(t){return typeof t===uL||typeof t===vL}function Mg(t){r.setTimeout(function(){throw t},0)}function Pg(t){return Pd(t),fl(t,345)?zf(t,345):zk(t)}function Dg(t,e){return null==Fx(t.a,e,(Vd(),CW))}function Rg(t,e){var n;return function(t,e){if(t<0||t>=e)throw new oo(function(t,e){if(t<0)return PA(RL,Cx(Lo(kD,1),jL,1,4,["index",WE(t)]));if(e<0)throw new ao(BL+e);return PA("%s (%s) must be less than size (%s)",Cx(Lo(kD,1),jL,1,4,["index",WE(t),WE(e)]))}(t,e))}(e,n=t.a.Y()),n-1-e}function jg(t,e,n){var r;return r=Aw(t,e),function(t,e,n){if(n){var r=n.gc();n=r(n)}else n=void 0;t.a[e]=n}(t,e,n),r}function Bg(t,e,n){var r;return Ww(n,r=Gg(t,e)),r}function Gg(t,e){var n;return(n=new Wx).i=t,n.d=e,n}function Fg(t,e,n){this.a=t,Ib(n,e),this.c=e,this.b=n}function Hg(t,e,n){return function(t){if(!t)throw new Wr}(null==n||function(t,e){switch(ww(t)){case 5:return Cl(e);case 6:return Nl(e);case 7:return ph(e);case 0:return Mk(e,t.__elementTypeId$);case 2:return Lg(e)&&!(e.ad===i);case 1:return Lg(e)&&!(e.ad===i)||Mk(e,t.__elementTypeId$);default:return!0}}(t,n)),t[e]=n}function Yg(t){t.a=null,t.e=null,yy(t.b),t.d=0,++t.c}function zg(t){return t.f||(t.f=new Qs(t))}function Vg(t){return t.k||(t.k=new Ye(t))}function Ug(t){return t.e||(t.e=new $a(t))}function Xg(t){var e;return!(e=t.e)&&(t.e=e=t.gb()),e}function Wg(t){return t.c.f.d==t.d.f.d}function qg(t,e){var n;return Fw(n=new Pb(t),e),n}function Zg(t,e){return t.a+=String.fromCharCode(e),t}function Kg(t){return!t.a&&t.d?t.d.b:t.a}function $g(t){return Ul(t)?0|t:t.l|t.m<<22}function Qg(t,e){return Cl(e)?yv(t,e):Kc(pv(t.d,e))}function Jg(t){return fl(t,19)?zf(t,19).Y():Qb(t.mb())}function tp(t){return t?new Hd((Vu(),t)):function(t){var e;return Yw(e=new Qi,t),e}(null.mb())}function ep(t,e){return Zc(t)===Zc(e)||null!=t&&aE(t,e)}function np(t,e){return to(),Ix(io(Ih(t)),io(Ih(e)))}function rp(t){return xl(),xf(t.a.bb().mb(),(Wu(),XD))}function ip(){ip=a,uf(),HD=new ab((Yp(),Yp(),DW))}function op(){op=a,uf(),KD=new Ks((Yp(),Yp(),jW))}function ap(t,e){if(null==t)throw new No((ai(),e))}function sp(t,e,n,r){t.g[e.e][n.e]=r,t.g[n.e][e.e]=r}function cp(t){Tu(-1!=t.c),t.d.vb(t.c),t.b=t.c,t.c=-1}function up(t){this.c=t,this.b=t.a.b.a,Wl(t.a.c,this)}function lp(t){QI.call(this,new Qn(t)),this.a=new co}function hp(){Oi.call(this,new Di(new kr)),this.a=this}function fp(){cw(),this.b=(xl(),new kr),this.a=new kr}function dp(t){bp(t.a),t.b=ky(kD,jL,1,t.b.length,4,1)}function gp(t){return!t.b&&(t.b=new Ko(t.c.W())),t.b}function pp(t,e){var n;return eS(t,e,n=new we),n.d}function vp(t,e){var n;return(n=Gg("",t)).k=e,n.g=1,n}function bp(t){var e;for(e=t.mb();e.G();)e.H(),e.I()}function yp(t,e){return fl(e,79)&&Ri(t.b,zf(e,79).mc())}function wp(t,e,n){return Cl(e)?Hv(t,e,n):HC(t.d,e,n)}function mp(t,e,n,r){this.d=t,this.b=e,this.a=n,this.c=r}function xp(t,e,n,r){this.d=t,this.e=e,this.c=n,this.b=r}function Ep(t,e,n,r){this.a=t,this.c=e,this.b=n,this.d=r}function _p(t,e,n,r){Ma.call(this,t,e),this.a=n,this.b=r}function kp(t,e){return ai(),t==e?0:t0?1:0}function $p(t,e){return zm(function(t,e){return Nf(t.l&e.l,t.m&e.m,t.h&e.h)}(Ul(t)?Qm(t):t,Ul(e)?Qm(e):e))}function Qp(t){return 0==t.b?null:(Ou(0!=t.b),Hw(t,t.a.a))}function Jp(t){t.d=t.d-15,t.b=t.b-15,t.c=t.c+15,t.a=t.a+15}function tv(t){this.b=t,this.c=t,t.e=null,t.c=null,this.a=1}function ev(t,e,n){this.d=t,this.b=new Re,this.c=e,this.a=n}function nv(t,e){!function(t,e){t.a=e}(this,new Ja(t.a,t.b)),function(t,e){t.b=e}(this,Hf(e))}function rv(t){dl(new $n($k(t.e)))&&(function(t){var e,n,r;for(r=new Yd(new ar(t.c).a);gl(r.a);)switch(r.b=$b(r.a),e=zf((n=new Bc(r.c,r.b)).b.b[n.a.e],62),zf(n.a,67).e){case 0:e.d=0,e.e=-(e.b+t.d);break;case 1:e.d=(t.e.e.j.a-e.c)/2,e.e=-(e.b+t.d);break;case 2:e.d=t.e.e.j.a-e.c,e.e=-(e.b+t.d);break;case 3:e.d=0,e.e=t.e.e.j.b+t.d;break;case 4:e.d=(t.e.e.j.a-e.c)/2,e.e=t.e.e.j.b+t.d;break;case 5:e.d=t.e.e.j.a-e.c,e.e=t.e.e.j.b+t.d;break;case 6:e.d=-(e.c+t.d),e.e=0;break;case 7:e.d=-(e.c+t.d),e.e=(t.e.e.j.b-e.b)/2;break;case 8:e.d=-(e.c+t.d),e.e=t.e.e.j.b-e.b;break;case 9:e.d=t.e.e.j.a+t.d,e.e=0;break;case 10:e.d=t.e.e.j.a+t.d,e.e=(t.e.e.j.b-e.b)/2;break;case 11:e.d=t.e.e.j.a+t.d,e.e=t.e.e.j.b-e.b;break;case 12:e.d=t.q.b+t.d,e.e=t.q.d+t.d;break;case 13:e.d=(t.e.e.j.a-e.c)/2,e.e=t.q.d+t.d;break;case 14:e.d=t.e.e.j.a-t.q.c-e.c-t.d,e.e=t.q.d+t.d;break;case 15:e.d=t.q.b+t.d,e.e=(t.e.e.j.b-e.b)/2;break;case 16:e.d=(t.e.e.j.a-e.c)/2,e.e=(t.e.e.j.b-e.b)/2;break;case 17:e.d=t.e.e.j.a-t.q.c-e.c-t.d,e.e=(t.e.e.j.b-e.b)/2;break;case 18:e.d=t.q.b+t.d,e.e=t.e.e.j.b-t.q.a-e.b-t.d;break;case 19:e.d=(t.e.e.j.a-e.c)/2,e.e=t.e.e.j.b-t.q.a-e.b-t.d;break;case 20:e.d=t.e.e.j.a-t.q.c-e.c-t.d,e.e=t.e.e.j.b-t.q.a-e.b-t.d}}(t),function(t){var e,n,r,i,o;for(r=new $n($k(t.e));r.a>>0).toString(16)}function yv(t,e){return null==e?Kc(pv(t.d,null)):Pc(t.e,e)}function wv(t){return 0|Math.max(Math.min(t,bL),-2147483648)}function mv(t){this.e=t,this.b=this.e.a.entries(),this.a=[]}function xv(t){this.c=t,this.b=new Xx(new Yn(this.c.a).a)}function Ev(t){this.b=(Xu(),Xu(),Xu(),YD),this.a=zf(Pd(t),35)}function _v(t,e,n){Zu(),Sf.call(this,t,e),null!=n&&(this.c=n)}function kv(t,e,n){if(t<0||en)throw new oo(function(t,e,n){return t<0||t>n?YC(t,n,"start index"):e<0||e>n?YC(e,n,"end index"):PA("end index (%s) must not be less than start index (%s)",Cx(Lo(kD,1),jL,1,4,[WE(e),WE(t)]))}(t,e,n))}function Nv(t,e){if(null==t)throw new No((ai(),e));return t}function Cv(t){if(!JE(t))throw new Ei;return t.c=t.b,t.b.H()}function Tv(t){var e;return ax(e=new Aa(sx(t.length)),t),e}function Av(t){var e;e=t.c.b.b,t.b=e,t.a=t.c.b,e.a=t.c.b.b=t}function Iv(t){this.b=null,!t&&(tc(),tc(),t=FW),this.a=t}function Ov(t){this.b=t,this.a=new Kv(this.b,this.b.c.length)}function Sv(t){return ip(),Pd(t),function(t){var e;switch((e=Tg(t.c,t.c.length)).length){case 0:return HD;case 1:return new zd(e[0]);default:return new ab(BE(e))}}(t||Ff(new $n(null)))}function Lv(t,e){var n=t.a=t.a||[];return n[e]||(n[e]=t.Oc(e))}function Mv(t,e,n){var r;aN(e,n,t.c.length),r=n-e,ma(t.c,e,r)}function Pv(t,e,n){La.call(this,e.a),this.c=t,this.b=e,this.a=n}function Dv(t){return Uc(t.c),t.e=t.a=t.c,t.c=t.c.c,++t.d,t.a.f}function Rv(t){return Uc(t.e),t.c=t.a=t.e,t.e=t.e.e,--t.d,t.a.f}function jv(t){return Vm(Cx(Lo(gR,1),KM,10,0,[t.f.i,t.i,t.a]))}function Bv(){Bv=a,OY=Zx((Vp(),Cx(Lo(RY,1),GL,193,0,[TY,AY])))}function Gv(){Gv=a,fY=Zx((Cb(),Cx(Lo(wY,1),GL,175,0,[uY,lY])))}function Fv(){Fv=a,qY=Zx((ub(),Cx(Lo($Y,1),GL,192,0,[XY,UY])))}function Hv(t,e,n){return null==e?HC(t.d,null,n):a_(t.e,e,n)}function Yv(t,e){return Qd(t.a,e)?Ig(t,zf(e,17).e,null):null}function zv(t){return Pd(t),eN((Xu(),new Mu(Ru(Xf(t.a,new g)))))}function Vv(t,e){var n,r;return r=ng(t,e),n=t.a.ub(r),new za(t,n)}function Uv(t,e,n){var r;(r=new se).b=e,r.a=n,++e.b,Of(t.d,r)}function Xv(t,e,n){t.d&&jy(t.d.b,t),t.d=e,t.d&&Sd(t.d.b,n,t)}function Wv(t,e,n){aN(e,n,t.Y()),this.c=t,this.a=e,this.b=n-e}function qv(t,e,n,r){this.d=t,this.b=e,this.a=n,this.c=r}function Zv(t,e){Oi.call(this,hm(Pd(t),Pd(e))),this.b=t,this.c=e}function Kv(t,e){this.a=t,zn.call(this,t),my(e,t.Y()),this.b=e}function $v(t,e,n,r){Zu(),_v.call(this,t,e,n),null!=r&&(this.d=r)}function Qv(t){return Ou(t.ae)throw new oo(YC(t,e,"index"));return t}function Ob(t,e,n){Pd(t),function(t){var e,n,r;for(mb(t.c,t.a),r=new $n(t.c);r.a>22&wM,t<0?mM:0)}function ly(){ly=a,LR=Zx((EE(),Cx(Lo(jR,1),GL,59,0,[IR,AR,TR,CR,OR])))}function hy(){hy=a,QB=Zx((yS(),Cx(Lo(rG,1),GL,32,0,[ZB,SB,OB,qB,KB])))}function fy(){fy=a,vB=Zx((I_(),Cx(Lo(_B,1),GL,100,0,[gB,dB,lB,hB,fB])))}function dy(){dy=a,KY=pd(wd(wd(wd(yd(new r_,(WS(),SH)),BH),uH),wH),OH)}function gy(t,e){var n;for(n=e.mb();n.G();)gI(t,zf(n.H(),55),0,0)}function py(t,e,n){var r;for(r=t.mb();r.G();)rI(zf(r.H(),55),e,n)}function vy(t,e,n){var r,i;for(r=0,i=0;ie)throw new oo("Index: "+t+", Size: "+e)}function xy(t,e){if(t<0||t>=e)throw new oo("Index: "+t+", Size: "+e)}function Ey(t,e){var n;return!!(n=Jx(t,e.yb()))&&Tp(n.e,e.zb())}function _y(t,e){var n;return n=t.d,e>0?zf(gd(n.a,e-1),9):null}function ky(t,e,n,r,i,o){var a;return a=lN(i,r),9!=i&&Cx(Lo(t,o),e,n,i,a),a}function Ny(t){var e;if(!cm(t))throw new Ei;return t.d=1,e=t.c,t.c=null,e}function Cy(t,e,n,r){this.f=t,this.e=e,this.d=n,this.b=r,this.c=r?r.d:null}function Ty(t){var e;return e=zf(gd(t.f,0),7),zf(_x(e,(qS(),iX)),7)}function Ay(t){var e;return e=zf(gd(t.f,0),7),zf(_x(e,(qS(),iX)),7)}function Iy(){Iy=a,mW=Zx((L_(),Cx(Lo(kW,1),GL,153,0,[vW,yW,bW])))}function Oy(){Oy=a,NW=Zx((Bm(),Cx(Lo(AW,1),GL,172,0,[xW,EW,_W])))}function Sy(){Sy=a,NR=Zx((hk(),Cx(Lo(SR,1),GL,103,0,[yR,xR,ER,_R,wR,mR])))}function Ly(){Ly=a,QR=Zx((PN(),Cx(Lo(nj,1),GL,133,0,[ZR,WR,KR,UR,qR,XR])))}function My(){My=a,kB=Zx((vN(),Cx(Lo(AB,1),GL,28,0,[EB,xB,mB,bB,wB,yB])))}function Py(){Py=a,mY=Zx((dC(),Cx(Lo(_Y,1),GL,125,0,[bY,gY,yY,vY,pY,dY])))}function Dy(){Dy=a,bR=new Sf("de.cau.cs.kieler.labels.labelManager",null)}function Ry(t,e){var n;return(n=new we).c=!0,n.d=e.zb(),eS(t,e.yb(),n)}function jy(t,e){var n;return-1!=(n=$y(t,e,0))&&(t.vb(n),!0)}function By(t,e){return 9!=ww(e)&&Cx(yw(e),e._c,e.__elementTypeId$,ww(e),t),t}function Gy(t){return pg(t.c.a.c,t),Ou(t.b!=t.c.a.b),t.a=t.b,t.b=t.b.a,t.a}function Fy(t){Tu(!!t.c),pg(t.e,t),t.c.I(),t.c=null,t.b=rx(t),Wl(t.e,t)}function Hy(t,e,n){Oi.call(this,hm(Pd(t),Pd(e))),this.b=t,this.c=e,this.a=n}function Yy(t,e,n,r){this.b=new On(this),this.a=t,this.c=e,this.e=n,this.d=r}function zy(t){Ux.call(this,t,0),vh(this),this.b.b=this.b,this.b.a=this.b}function Vy(t,e){Gc.call(this,t,e),this.a=ky(KW,jL,183,2,0,1),this.b=!0}function Uy(t,e){return Cl(e)?null==e?!!pv(t.d,null):function(t,e){return!(void 0===Na(t.a,e))}(t.e,e):!!pv(t.d,e)}function Xy(t,e){return Io(),(t-e>0?t-e:-(t-e))<=bM||t==e||isNaN(t)&&isNaN(e)}function Wy(t,e){return Io(),(t-e>0?t-e:-(t-e))<=bM||t==e||isNaN(t)&&isNaN(e)}function qy(t){var e,n;e=!0;do{n=e?i_(t):E_(t),e=!e}while(n);ox(t,t.d)}function Zy(t,e,n){var r;if(null==e)throw new Zr;return r=Ap(t,e),function(t,e,n){if(n){var r=n.gc();t.a[e]=r(n)}else delete t.a[e]}(t,e,n),r}function Ky(t,e,n){return!t.n&&(t.n=new kr),null==n?Kd(t.n,e):wp(t.n,e,n),t}function $y(t,e,n){for(;n=t.a.c.length;)Of(t.a,new uo);return zf(gd(t.a,e),20)}function Jy(t,e,n,r,i){var o;return Ww(n,o=Gg(t,e)),o.g=i?8:0,o.f=r,o.e=i,o}function tw(t,e){var n;this.f=t,this.b=e,n=zf(Qg(t.b,e),126),this.c=n?n.b:null}function ew(t,e){var n,r;for(n=0,r=e.length;n0&&(r+=function(t){var e,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,_;for(i=0,y=0,xl(),b=new kr,r=new kr,function(t,e,n){var r,i,o,a,s,c,u,l,h,f,d;for(r=0,i=0,l=0;l0&&wp(e,o,WE(r+=o.b.c.length+o.e.c.length));else{for(s=yC(c,(yS(),OB)).mb();s.G();)r+=(o=zf(s.H(),7)).b.c.length+o.e.c.length;for(a=yC(c,OB).mb();a.G();)(o=zf(a.H(),7)).b.c.length+o.e.c.length>0&&wp(e,o,WE(r))}for(u=t.length-1;u>=0;u--)if(Vl(zf(_x(c=t[u],(QS(),Fj)),28)))for(f=yC(c,(yS(),KB)).mb();f.G();)(h=zf(f.H(),7)).b.c.length+h.e.c.length>0&&wp(n,h,WE(i+=h.b.c.length+h.e.c.length));else{for(d=yC(c,(yS(),KB)).mb();d.G();)i+=(h=zf(d.H(),7)).b.c.length+h.e.c.length;for(f=yC(c,KB).mb();f.G();)(h=zf(f.H(),7)).b.c.length+h.e.c.length>0&&wp(n,h,WE(i))}}(t,o=new kr,_=new kr),e=null,v=0,E=0,w=!0,c=!0,f=0,g=t.length;fu.k&&(++e,d=!0),g&&u&&g.k>u.k&&(++e,p=!0),f&&s&&f.ks.k&&(++e,c=!0),f&&s&&f.ku.k&&(++e,l=!0),c&&l&&s==u&&--e)}}return e}(e)),r}function iw(t,e){var n;return(n=zf(Kd(t.c,e),176))?(kd(n),n.e):null}function ow(t){return eE(t,bL)>0?bL:eE(t,_L)<0?_L:$g(t)}function aw(t){af.call(this,(ai(),null==t?dL:zk(t)),fl(t,46)?zf(t,46):null)}function sw(t){mu(this),jd(t>=0,"Initial capacity must not be negative")}function cw(){cw=a,iF=md(wd(wd(new r_,(WS(),LH)),mH),TH),oF=yd(new r_,kH)}function uw(){uw=a,zF=new V,HF=new U,YF=new X,FF=new W,VF=new q,UF=new Z}function lw(){lw=a,XW=new jc("All",0),WW=new tl,qW=new yl,ZW=new el}function hw(){hw=a,DY=new js(qP,0),PY=new js("LONGEST_PATH",1),MY=new js(VP,2)}function fw(){fw=a,cR=Nf(wM,wM,524287),uR=Nf(0,0,524288),uy(1),uy(2),lR=uy(0)}function dw(){dw=a,sY=Zx((eA(),Cx(Lo(hY,1),GL,109,0,[iY,JH,nY,tY,eY,QH,rY,oY])))}function gw(){gw=a,pz=Zx((Vk(),Cx(Lo(wz,1),GL,141,0,[dz,lz,hz,uz,fz])))}function pw(){pw=a,zV=Zx((yN(),Cx(Lo(KV,1),GL,115,0,[BV,jV,FV,GV,HV])))}function vw(){vw=a,MX=Zx((Uk(),Cx(Lo(jX,1),GL,85,0,[SX,TX,AX,IX,OX])))}function bw(t){JN(),function(t,e,n){t.a=1502^e,t.b=n^yD}(this,$g($p(zm(function(t){var e,n,r,i;return(n=!!(524288&(e=t.h)))&&(e|=-1048576),i=n?mM:0,r=e>>2,Nf((t.m>>2|e<<20)&wM,r&wM,i&mM)}(Ul(t)?Qm(t):t)),mD)),$g($p(t,mD)))}function yw(t){return Cl(t)?TD:Nl(t)?OW:ph(t)?IW:Zd(t)||Cd(t)?t.$c:t.$c||nR}function ww(t){return null==t.__elementTypeCategory$?9:t.__elementTypeCategory$}function mw(t){var e,n;for(ic(),n=AM,e=0;en&&(n=t[e]);return n}function xw(t,e){var n;return(n=zf(Qg(t.b,e),106))||(n=e.rc(),wp(t.b,e,n)),n}function Ew(t,e){var n;return(n=zf(Qg(t.c,e),176))?(Fl(t,n),n.e):null}function _w(t,e,n,r){var i;(i=zf(Ew(t.e,e),116)).b+=n,i.a+=r,Sk(t.e,e,i),t.d=!0}function kw(t){var e;for(++t.a,e=t.c.a.length;t.a"+t.d.f+"("+t.d+")":"e_"+hh(t)}function Pw(){Pw=a,uB=Zx((bT(),Cx(Lo(pB,1),GL,41,0,[tB,Jj,nB,sB,aB,oB,rB,iB,eB])))}function Dw(){Dw=a,TB=new vs("OUTSIDE",0),CB=new vs("INSIDE",1),NB=new vs("FIXED",2)}function Rw(){Rw=a,mU=new xc(BM,0),xU=new xc("TOP",1),wU=new xc("BOTTOM",2)}function jw(){jw=a,kz=new hc("CLASSIC",0),Nz=new hc("IMPROVE_STRAIGHTNESS",1)}function Bw(){this.e=new co,this.a=new Fp,this.d=new co,this.b=new Re,this.c=new Re}function Gw(t,e,n){this.b=e,this.a=t,this.c=n,Of(this.a.e,this),Of(this.b.b,this)}function Fw(t,e){t.d=Yo(t.d,e.d),t.c=Go(t.c,e.c),t.a=Go(t.a,e.a),t.b=Yo(t.b,e.b)}function Hw(t,e){var n;return n=e.c,e.a.b=e.b,e.b.a=e.a,e.a=e.b=null,e.c=null,--t.b,n}function Yw(t,e){var n;for(Xu(),Pd(t),Pd(e),n=!1;e.G();)n|=t.ib(e.H());return n}function zw(t){var e;return pg(t.e,t),Ou(t.b),t.c=t.a,e=zf(t.a.H(),21),t.b=rx(t),e}function Vw(t){return _M=0x8000000000000000?(fw(),cR):(r=!1,t<0&&(r=!0,t=-t),n=0,t>=EM&&(t-=(n=wv(t/EM))*EM),e=0,t>=xM&&(t-=(e=wv(t/xM))*xM),i=Nf(wv(t),e,n),r&&(o=1+~i.l&wM,a=~i.m+(0==o?1:0)&wM,s=~i.h+(0==o&&0==a?1:0)&mM,i.l=o,i.m=a,i.h=s),i)}(t))}function Uw(t){if(t){if(t.V())throw new Ei;return t.sb(t.Y()-1)}return function(t){var e;for(Xu();;)if(e=t.H(),!t.G())return e}(null.mb())}function Xw(t,e){var n;return e<(n=t.d).a.c.length-1?zf(gd(n.a,e+1),9):null}function Ww(t,e){if(t){e.k=t;var n=function(t){if(t.Tc())return null;var e=t.k;return eL[e]}(e);n?n.$c=e:eL[t]=[e]}}function qw(t,e){var n,r;r=!1;do{r|=n=t.i?mx(t,e):wx(t,e)}while(n);return r}function Zw(t,e,n){var r,i;r=e;do{i=io(t.n[r.k])+n,t.n[r.k]=i,r=t.a[r.k]}while(r!=e)}function Kw(t,e){return Nv(t,"set1"),Nv(e,"set2"),rc(),new df(t,new Oa(e),e)}function $w(t){var e=/function(?:\s+([\w$]+))?\s*\(/.exec(t);return e&&e[1]||gL}function Qw(){Qw=a,LV=Zx((MN(),Cx(Lo(RV,1),GL,123,0,[OV,IV,AV,CV,NV,TV])))}function Jw(){Jw=a,$V=Zx((LN(),Cx(Lo(cU,1),GL,124,0,[WV,XV,ZV,UV,qV,VV])))}function tm(){tm=a,LW=Cx(Lo(rq,1),pM,26,12,[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15])}function em(){em=a,RX=new kc(jM,0),PX=new kc("INPUT",1),DX=new kc("OUTPUT",2)}function nm(t){this.c=t,this.b=new Xx(new Yn(t.b).a),this.a=null,this.d=(Xu(),Xu(),zD)}function rm(t){this.e=t,this.d=new Aa(sx(rg(this.e).Y())),this.c=this.e.a,this.b=this.e.c}function im(t,e,n){this.c=t,jb.call(this),this.b=e,this.j=new xp(e.d,e.e,e.c,e.b),this.a=n}function om(t,e){t.j>0&&t.c0&&0!=t.e&&om(t.g,e/t.j*t.g.d))}function am(t){return t.b.d.f.g==(DN(),PF)?zf(_x(t.b.d.f,(qS(),iX)),7):t.b.d}function sm(t){return t.b.c.f.g==(DN(),PF)?zf(_x(t.b.c.f,(qS(),iX)),7):t.b.c}function cm(t){switch(Vc(3!=t.d),t.d){case 2:return!1;case 0:return!0}return function(t){return t.d=3,t.c=function(t){for(var e;t.b.G();)if(e=t.b.H(),t.a.D(e))return e;return t.d=2,null}(t),2!=t.d&&(t.d=0,!0)}(t)}function um(t){switch(t.e){case 2:return yS(),KB;case 4:return yS(),OB;default:return t}}function lm(t){switch(t.e){case 1:return yS(),qB;case 3:return yS(),SB;default:return t}}function hm(t,e){var n;return Yp(),n=new Xs(1),Cl(t)?Hv(n,t,e):HC(n.d,t,e),new rr(n)}function fm(t,e){return t.g?(t.g=fm(t.g,e),--t.a,t.j=xE(t.j,e.c),qN(t)):t.e}function dm(t,e){return t.e?(t.e=dm(t.e,e),--t.a,t.j=xE(t.j,e.c),qN(t)):t.g}function gm(t,e){var n,r,i;for(Gd(e),n=!1,i=e.mb();i.G();)r=i.H(),n|=t.ib(r);return n}function pm(t){var e,n;for(n=new Gr,e=t.b.mb();e.G();)If(n,zf(e.H(),92).a);return n}function vm(t){var e,n,r;for(e=0,r=t.mb();r.G();)e+=(Gd(n=Ih(r.H())),n);return e/t.Y()}function bm(t,e){var n;return(n=zf(Qg(t.c,e),200))||((n=new Qr).c=e,wp(t.c,n.c,n)),n}function ym(t,e){var n;return Gd(e),n=e.e,!t.b[n]&&(Hg(t.b,n,e),++t.c,!0)}function wm(t,e){var n,r;return n=1-e,r=t.a[n],t.a[n]=r.a[e],r.a[e]=t,t.b=!0,r.b=!1,r}function mm(t,e){var n;return!!fl(e,10)&&(n=zf(e,10),t.a==n.a&&t.b==n.b)}function xm(t,e,n){return t.g=new Cm(e,n),kh(t,t.g,t.i),t.d=Ho(2,t.d),++t.a,t.j=wE(t.j,n),t}function Em(t,e,n){return t.e=new Cm(e,n),kh(t.f,t.e,t),t.d=Ho(2,t.d),++t.a,t.j=wE(t.j,n),t}function _m(t,e){var n=t.a,r=0;for(var i in n)n.hasOwnProperty(i)&&(e[r++]=i);return e}function km(t,e){var n,r;for(Gd(e),r=e.bb().mb();r.G();)n=zf(r.H(),21),t.db(n.yb(),n.zb())}function Nm(t,e,n){this.g=t,this.d=e,this.e=n,this.a=new Re,function(t){var e,n,r,i;for(i=vA(new Yh(t.d,t.e));i.G();)for(r=zf(i.H(),7),n=new $n(t.e==(yS(),KB)?r.b:r.e);n.a0),this.b=t,this.c=e,this.j=e,this.a=1,this.d=1,this.e=null,this.g=null}function Tm(t){return 1.4901161193847656e-8*OT(t,26)+11102230246251565e-32*OT(t,27)}function Am(t){return fl(t,87)?nb(zf(t,87)):fl(t,88)?zf(t,88).a:fl(t,63)?new Pi(t):new Ka(t)}function Im(t){var e;return e=zf(_x(t,(qS(),UU)),32),t.g==(DN(),PF)&&(e==(yS(),KB)||e==OB)}function Om(t,e){return!!function(t,e){var n,r,i;for(n=zf(_x(e,(qS(),zU)),18),i=zf(WN(AF,n),18).mb();i.G();)if(r=zf(i.H(),18),!zf(WN(t.a,r),20).V())return!1;return!0}(t,e)&&(fT(t.a,zf(_x(e,(qS(),zU)),18),e),!0)}function Sm(t,e){var n;if(e)for(n=0;n<6;n++)zf(gd(t.a,n),18).jb(zf(gd(e.a,n),19));return t}function Lm(t,e){var n;return t.b?null:(n=function(t,e){return new Nh(t>0?t-1:t,e)}(t.e,t.f),If(t.a,n),n.g=t,t.d=e,n)}function Mm(t,e){var n,r;for(r=Ak(t,0);r.b!=r.d.c;)(n=zf(Ab(r),10)).a+=e.a,n.b+=e.b;return t}function Pm(t,e){var n,r;for(n=0;n0?t.g?Hm(t.g,e,n):0:t.c}function Ym(t,e){var n,r;return!!t.c&&(r=t.g,(n=t.a.$b(e,r))>0|0==n&t.f==(Uu(),BD))}function zm(t){var e;return 0==(e=t.h)?t.l+t.m*xM:e==mM?t.l+t.m*xM-EM:t}function Vm(t){var e,n,r,i;for(e=new co,r=0,i=t.length;r=i;o--)t[o+1]=t[o];t[i]=r}function Km(t,e,n,r){var i,o;for(i=function(t,e,n,r){var i,o,a,s;for(o=e,i=n-1;o<=i;)if((s=t[a=o+i>>>1])r))return a;i=a-1}return-(o+1)}(t,e,n,r),i<0&&(i=-i-1),o=n-1;o>=i;o--)t[o+1]=t[o];t[i]=r}function $m(t,e){var n,r;for(Gd(e),r=e.mb();r.G();)if(n=r.H(),!t.kb(n))return!1;return!0}function Qm(t){var e,n,r;return n=0,(r=t)<0&&(r+=EM,n=mM),e=wv(r/xM),Nf(wv(r-e*xM),e,n)}function Jm(t,e){return t.c.c=ky(kD,jL,1,0,4,1),pC(t,t.e,e),pC(t,t.a,e),Yp(),mb(t.c,null),function(t){var e,n,r;for(e=0,r=new $n(t.c);r.a0;r--)n|=V_(t,e,r-1,r);return n}function mx(t,e){var n,r,i;for(n=!1,r=t.d[e].length,i=0;ie?1:t==e?0:isNaN(t)?isNaN(e)?0:1:-1}function Ox(t){switch(t.Y()){case 0:return HD;case 1:return new zd(t.mb().H());default:return new ab(t)}}function Sx(){var t,e;Sx=a,e=!(Error.stackTraceLimit||"stack"in new Error),t=new me,iL=e?new u:t}function Lx(){Lx=a,VG=new Sf("intCoordinates",(Vd(),Vd(),CW)),UG=new hd("jsonObject"),XG=new Ja(0,0)}function Mx(){Mx=a,ZF=new Ss("MIRROR_X",0),KF=new Ss("TRANSPOSE",1),qF=new Ss("MIRROR_AND_TRANSPOSE",2)}function Px(){Px=a,PV=new bc(BM,0),MV=new bc("INCOMING_ONLY",1),DV=new bc("OUTGOING_ONLY",2)}function Dx(){return NS(),Cx(Lo(kV,1),GL,60,0,[qz,Uz,Vz,$z,Kz,pV,gV,Zz,Xz,Wz,Qz,fV,dV])}function Rx(){var t,e,n,r;for(Rx=a,cY=new k_(kV),n=0,r=(e=Dx()).length;n0)return Vf(e-1,t.a.c.length),by(t.a,e-1);throw new xi}function Vx(t){t.b.c.length-t.e.c.length<0?(Gh(t,(yS(),OB)),t.a.a=t.j.a):(Gh(t,(yS(),KB)),t.a.a=0)}function Ux(t,e){jd(t>=0,"Negative initial capacity"),jd(e>=0,"Non-positive load factor"),yy(this)}function Xx(t){var e;this.e=t,this.d=new Jb(this.e.e),this.a=this.d,this.b=rx(this),e=t[dD],this[dD]=e}function Wx(){this.n=null,this.j=null,this.i=null,this.d=null,this.b=null,this.k=null,this.a=null}function qx(t){var e,n,r,i;for(i=1,n=0,r=t.length;n=48&&t<58?t-48:t>=97&&t<97?t-97+10:t>=65&&t<65?t-65+10:-1}function yE(t){switch(uf(),t.Y()){case 0:return op(),KD;case 1:return new ua(t.mb().H());default:return new Ks(t)}}function wE(t,e){var n;return Ul(t)&&Ul(e)&&_M<(n=t+e)&&n>22),i=t.h+e.h+(r>>22),Nf(n&wM,r&wM,i&mM)}(Ul(t)?Qm(t):t,Ul(e)?Qm(e):e))}function mE(t,e){var n;return Ul(t)&&Ul(e)&&_M<(n=t*e)&&n>13|(15&t.m)<<9,i=t.m>>4&8191,o=t.m>>17|(255&t.h)<<5,a=(1048320&t.h)>>8,v=r*(s=8191&e.l),b=i*s,y=o*s,w=a*s,0!=(c=e.l>>13|(15&e.m)<<9)&&(v+=n*c,b+=r*c,y+=i*c,w+=o*c),0!=(u=e.m>>4&8191)&&(b+=n*u,y+=r*u,w+=i*u),0!=(l=e.m>>17|(255&e.h)<<5)&&(y+=n*l,w+=r*l),0!=(h=(1048320&e.h)>>8)&&(w+=n*h),d=((p=n*s)>>22)+(v>>9)+((262143&b)<<4)+((31&y)<<17),g=(b>>18)+(y>>5)+((4095&w)<<8),g+=(d+=(f=(p&wM)+((511&v)<<13))>>22)>>22,Nf(f&=wM,d&=wM,g&=mM)}(Ul(t)?Qm(t):t,Ul(e)?Qm(e):e))}function xE(t,e){var n;return Ul(t)&&Ul(e)&&_M<(n=t-e)&&n>22),i=t.h-e.h+(r>>22),Nf(n&wM,r&wM,i&mM)}(Ul(t)?Qm(t):t,Ul(e)?Qm(e):e))}function EE(){EE=a,IR=new cs(jM,0),AR=new cs(PM,1),TR=new cs(MM,2),CR=new cs("DOWN",3),OR=new cs("UP",4)}function _E(){_E=a,YR=new ls(jM,0),FR=new ls("POLYLINE",1),GR=new ls("ORTHOGONAL",2),HR=new ls("SPLINES",3)}function kE(){kE=a,tj=new fs("INHERIT",0),JR=new fs("INCLUDE_CHILDREN",1),ej=new fs("SEPARATE_CHILDREN",2)}function NE(){NE=a,BY=yd(vd(new r_,(WS(),sH)),CH),GY=pd(yd(bd(new r_,eH),JF),tH),FY=pd(wd(new r_,nH),tH)}function CE(){CE=a,HY=yd(vd(new r_,(WS(),sH)),CH),YY=pd(yd(bd(new r_,eH),JF),tH),zY=pd(wd(new r_,nH),tH)}function TE(t){this.a=new Su,this.d=new Su,this.b=new Su,this.c=new Su,this.g=new Su,this.i=new Su,this.f=t}function AE(t,e,n,r,i,o){this.e=new Re,this.f=(em(),RX),Of(this.e,t),this.d=e,this.a=n,this.b=r,this.f=i,this.c=o}function IE(t,e,n,r,i){var o,a;for(a=t.mb();a.G();)(o=zf(a.H(),33)).i.a=e.a,o.i.b=i?e.b:e.b+r.b-o.j.b,e.a+=o.j.a+n}function OE(t,e){var n,r;for(jf(),r=Sg(jN(t));JE(r);)if((n=zf(Cv(r),12)).d.f==e||n.c.f==e)return n;return null}function SE(t,e,n){var r,i,o;for(r=0,o=Ak(t,0);o.b!=o.d.c&&!((i=io(Ih(Ab(o))))>n);)i>=e&&++r;return r}function LE(t,e){var n;return e?((n=e.n?e.n:(Yp(),Yp(),RW)).V()||(t.n?km(t.n,n):t.n=new uu(n)),t):t}function ME(t,e,n){try{!function(t,e,n){if(Pd(e),n.G())for(eu(e,t.C(n.H()));n.G();)eu(e,t.c),eu(e,t.C(n.H()))}(t,e,n)}catch(t){throw fl(t=nE(t),181)?new aw(t):PE(t)}return e}function PE(t){var e;return fl(t,164)&&Zc((e=zf(t,164)).b)!==Zc((oi(),rL))?Zc(e.b)===Zc(rL)?null:e.b:t}function DE(t,e){var n;for(n=zf(_x(Kg(t),(qS(),uX)),9);n;){if(n==e)return!0;n=zf(_x(Kg(n),uX),9)}return!1}function RE(t){switch(zf(_x(t,(qS(),KU)),140).e){case 1:Ky(t,KU,(Rw(),wU));break;case 2:Ky(t,KU,(Rw(),xU))}}function jE(t){switch(uf(),t.c){case 0:return op(),KD;case 1:return new ua(MC(new Us(t)));default:return new Si(t)}}function BE(t){var e,n;for(ip(),e=0,n=t.length;e-129&&t<128?(e=t+128,!(n=(Ud(),SW)[e])&&(n=SW[e]=new Mn(t)),n):new Mn(t)}function qE(t){var e,n;for(e=CN(t.b,t.d),n=bL;n>e;){if(ox(t,t.d),0==e){n=0;break}i_(t),E_(t),n=e,e=CN(t.b,t.d)}t.c=n}function ZE(){var t,e,n;JN(),n=UW+++(Date.now?Date.now():(new Date).getTime()),t=wv(Math.floor(n*KP))&mD,e=wv(n-t*wD),this.a=1502^t,this.b=e^yD}function KE(t){return Cl(t)?fk(t):Nl(t)?wv((Gd(t),t)):ph(t)?ro((Gd(t),t))?1231:1237:Zd(t)?t.v():(Cd(t),hh(t))}function $E(t,e,n,r){var i,o,a;for(a=0,o=vA(new Yh(e,r));o.G();)i=zf(o.H(),7),wp(t.i,i,WE(a++));wp(n,e,WE(a))}function QE(t){var e;return(e=zf(_x(t,(QS(),dj)),59))==(EE(),IR)?zf(_x(t,(qS(),TU)),15).a>=1?AR:CR:e}function JE(t){if(Pd(t.b),t.b.G())return!0;for(;t.a.G();)if(Pd(t.b=t.Wb(t.a.H())),t.b.G())return!0;return!1}function t_(t){return t.d==t.c.d&&t.i==t.g.d||(t.a.c=ky(kD,jL,1,0,4,1),ix(t.a,t.c),ix(t.a,t.g),t.d=t.c.d,t.i=t.g.d),t.a}function e_(t){var e;if(t.b){if(e_(t.b),t.b.d!=t.c)throw new mi}else t.d.V()&&(e=zf(Qg(t.f.b,t.e),19))&&(t.d=e)}function n_(t,e,n,r,i){var o,a,s,c;for(function(t,e,n,r,i){r?function(t,e){var n,r;for(r=new $n(e);r.a1&&(mb(e,t.b),function(t,e){var n,r,i,o,a,s,c,u,l;for(i=new Re,c=new $n(e);c.ae){Jv(n);break}}Ng(n,e)}function a_(t,e,n){var r;return r=Na(t.a,e),function(t,e,n){t.set(e,n)}(t.a,e,void 0===n?null:n),void 0===r?(++t.c,Jh(t.b)):++t.d,r}function s_(t,e,n){return(e-t<=0?0-(e-t):e-t)GP?t-n>GP:n-t>GP)}function c_(t){switch(t.e){case 0:return jV;case 1:return BV;case 2:return GV;case 3:return FV;default:return HV}}function u_(t,e){switch(e.e){case 2:return t.b;case 1:return t.c;case 4:return t.d;case 3:return t.a;default:return!1}}function l_(t){switch(yS(),t.e){case 4:return SB;case 1:return OB;case 3:return qB;case 2:return KB;default:return ZB}}function h_(t,e){if(e==t.c)return t.d;if(e==t.d)return t.c;throw new ao("Node "+e+" not part of edge "+t)}function f_(t,e){var n;return Xl(t.a,e)?zf(Xl(t.a,e)?t.b[e.e]:null,62):(n=new Fr,ym(t.a,e),Ig(t,e.e,n),n)}function d_(t,e){var n,r,i;for(i=t.g.tb(),n=0;i.G();){if((r=io(Ih(i.H()))-e)>cD)return n;r>uD&&++n}return n}function g_(t){var e,n,r,i;return ym(n=new Zf(e=zf(ra((i=(r=t.$c).f)==DD?r:i),11),zf(Ag(e,e.length),11),0),t),n}function p_(t,e){var n,r;for(r=new $n(e);r.a %s",Cx(Lo(kD,1),jL,1,4,[WE(e),WE(n)])),aN(e,n=n<(r=t.length)?n:r,r),n-e}function x_(t,e){var n,r,i;for(n=t,i=0;;){if(n==e)return i;if(!(r=zf(_x(n,(qS(),uX)),9)))throw new Ur;n=Kg(r),++i}}function E_(t){var e,n,r;for(r=!1,n=t.d.length-1;n>=0;n--)t.j=(e=new gC(t.e,t.d,n,1),new BN(n,t.d,e)),r|=qw(t,n);return r}function __(t){this.f=(xl(),new kr),this.n=new kr,this.k=new kr,this.g=new Qi,this.i=new uk((ci(),qD)),this.j=t,function(t,e){var n,r,i,o,a;for(n=0,a=0,i=0,o=e.length;i0?t-e:-(t-e))<=bM||t==e||isNaN(t)&&isNaN(e)?0:te?1:bu(isNaN(t),isNaN(e)))>0}function P_(t,e){return Io(),Io(),((t-e>0?t-e:-(t-e))<=bM||t==e||isNaN(t)&&isNaN(e)?0:te?1:bu(isNaN(t),isNaN(e)))<0}function D_(t){var e,n;for(t.d||function(t){var e,n,r,i,o,a;if(i=t.g.tb(),r=t.b.tb(),t.e)for(n=0;ncD;){for(o=e,a=0;(e-o<=0?0-(e-o):e-o)iE(t.a,r,i)+t.c.b+t.d.b)}(t.j,n,r)&&(function(t,e,n){!function(t,e,n){qT(t,e,n,(yS(),OB),t.f),qT(t,e,n,KB,t.n)}(t.c,e,n)}(t.j,t.d[e][n],t.d[e][r]),a=(o=t.d[e])[r],o[r]=o[n],o[n]=a,i=!0),i}function U_(t,e,n){var r,i,o,a,s;i=(s=Kg(t)).a,r=zf(_x(s,(qS(),MU)),15).a,o=s.d,a=t.i,e&&(a.a=a.a-i.b-r-o.a),n&&(a.b=a.b-i.d-r-o.b)}function X_(t,e){var n,r,i;for(r=Sg(jN(t));JE(r);)return n=zf(Cv(r),12),new Fe(Pd((i=zf(e.B(n),9)).i.b+i.j.b/2));return si(),si(),_D}function W_(t){var e,n,r,i;for(n=pO(t),e=RP,i=0,r=0;e>.5&&i<50;)e=Ca(XN(n,r=hA(n),!0).b),++i;return XN(t,r,!1)}function q_(t){var e,n,r,i;for(n=pO(t),e=RP,i=0,r=0;e>.5&&i<50;)e=Ca(XN(n,r=lA(n),!0).a),++i;return XN(t,r,!1)}function Z_(t){var e,n,r;for(this.a=new Su,this.e=new Qi,this.f=0,n=0,r=t.length;n0),e.a.sb(e.c=--e.b))}function rk(t,e,n){F_(n,"Compound graph preprocessor",1),t.a=new qs,iO(t,e,null),function(t,e){var n,r,i,o,a,s,c;for(a=rg(t.a).mb();a.G();){if((o=zf(a.H(),12)).b.c.length>0)for(mb(r=new ff(zf(WN(t.a,o),18)),new cn(e)),i=new Kv(o.b,0);i.b=t.b>>1)for(r=t.c,n=t.b;n>e;--n)r=r.b;else for(r=t.a.a,n=0;n0&&(i.b+=e),i}function Ok(t,e){var n,r,i;for(i=new co,r=t.mb();r.G();)rI(n=zf(r.H(),55),0,i.b),i.b+=n.e.b+e,i.a=Go(i.a,n.e.a);return i.a>0&&(i.a+=e),i}function Sk(t,e,n){var r,i,o;return(i=zf(Qg(t.c,e),176))?(o=vf(i,n),Fl(t,i),o):(r=new ad(t,e,n),wp(t.c,e,r),Av(r),null)}function Lk(t){switch(t.e){case 8:return yS(),SB;case 9:return yS(),qB;case 10:return yS(),OB;case 11:return yS(),KB;default:return yS(),ZB}}function Mk(t,e){return Cl(t)?!!sL[e]:t._c?!!t._c[e]:Nl(t)?!!aL[e]:!!ph(t)&&!!oL[e]}function Pk(){Lx(),this.i=(xl(),new kr),this.a=new kr,this.k=new kr,this.j=new kr,this.b=new kr,this.n=new kr,this.f=new kr,this.e=new kr}function Dk(t,e){var n,r;e.a.R(t)||(r=zf(_x(t,(qS(),UU)),32),n=zf(gd(t.f,0),7),r==(yS(),SB)?Gh(n,qB):r==qB&&Gh(n,SB),e.a.db(t,e))}function Rk(t){return Ho(1,zf(_x(t,(qS(),gX)),24).a)*(t.c.f.g==(DN(),jF)&&t.d.f.g==jF?1:t.c.f.g==jF||t.d.f.g==jF?2:8)}function jk(t){var e,n,r,i;for(i=zf(_x(t,(qS(),iX)),7),n=0,r=(e=zf(Hk(t.b,ky(SF,NP,12,t.b.c.length,0,1)),47)).length;nr&&Hg(e,r,null),e}function Yk(t,e){var n,r;for(r=t.a.length,e.lengthr&&Hg(e,r,null),e}function zk(t){return Cl(t)?t:Nl(t)?Ta((Gd(t),t)):ph(t)?bl(ro((Gd(t),t))):Zd(t)?t.w():Cd(t)?bv(t):t.toString?t.toString():"[JavaScriptObject]"}function Vk(){Vk=a,dz=new sc("SIMPLE",0),lz=new sc(VP,1),hz=new sc("LINEAR_SEGMENTS",2),uz=new sc("BRANDES_KOEPF",3),fz=new sc(qP,4)}function Uk(){Uk=a,SX=new _c(BM,0),TX=new _c("FIRST",1),AX=new _c("FIRST_SEPARATE",2),IX=new _c("LAST",3),OX=new _c("LAST_SEPARATE",4)}function Xk(){Xk=a,Fz=new le,Bz=yd(new r_,(WS(),yH)),Gz=pd(yd(new r_,DH),PH),Rz=pd(wd(yd(bd(new r_,xH),_H),NH),EH),jz=pd(wd(new r_,NH),cH)}function Wk(t){var e,n,r;for(n=new Un(new Vn(t.d.a).a.bb().mb());n.a.G();)r=zf(n.a.H(),21),Of((e=zf(r.yb(),12)).c.e,e),Of(e.d.b,e)}function qk(t,e){var n,r;if(Au(e>0),(e&-e)==e)return wv(e*OT(t,31)*4.656612873077393e-10);do{r=(n=OT(t,31))%e}while(n-r+(e-1)<0);return wv(r)}function Zk(t,e){if(t.c.f==e)return t.d.f;if(t.d.f==e)return t.c.f;throw new ao("Node "+e+" is neither source nor target of edge "+t)}function Kk(t,e,n){return Au(t>=0&&t<=1114111),t>=wL?(e[n++]=55296+(t-wL>>10&1023)&mL,e[n]=56320+(t-wL&1023)&mL,2):(e[n]=t&mL,1)}function $k(t){var e,n;if(!t.a)for(t.a=Il(zf(t.e,9).c.c.length),n=new $n(zf(t.e,9).c);n.ai&&Hg(e,i,null),e}function iN(t,e,n){if(n&&(e<0||e>n.a.c.length))throw new ao("index must be >= 0 and <= layer node count");t.d&&jy(t.d.a,t),t.d=n,n&&Sd(n.a,e,t)}function oN(t,e,n,r,i,o,a,s){var c,u;r&&((c=r.a[0])&&oN(t,e,n,c,i,o,a,s),function(t,e,n,r,i,o,a){var s,c;return!(e.Xc()&&(c=t.a.$b(n,r),c<0||!i&&0==c))&&!(e.Yc()&&(s=t.a.$b(n,o),s>0||!a&&0==s))}(t,n,r.d,i,o,a,s)&&e.ib(r),(u=r.a[1])&&oN(t,e,n,u,i,o,a,s))}function aN(t,e,n){if(t<0)throw new oo(AL+t+" < 0");if(e>n)throw new oo("toIndex: "+e+" > size "+n);if(t>e)throw new ao(AL+t+" > toIndex: "+e)}function sN(t,e){var n,r,i;return n=e.yb(),i=e.zb(),r=t.cb(n),!(!(Zc(i)===Zc(r)||null!=i&&aE(i,r))||null==r&&!t.R(n))}function cN(t,e,n){var r;(r=e.c.f).g==(DN(),RF)?(Ky(t,(qS(),tX),zf(_x(r,tX),7)),Ky(t,eX,zf(_x(r,eX),7))):(Ky(t,(qS(),tX),e.c),Ky(t,eX,n.d))}function uN(t,e,n){var r,i,o,a;for(function(t){var e,n;for(null==t.g&&(t.g=xd(t)),e=0,n=t.g.length;er&&t.charCodeAt(e-1)<=32;)--e;return r>0||e>19)!=(s=e.h>>19)?s-a:(r=t.h)!=(o=e.h)?r-o:(n=t.m)!=(i=e.m)?n-i:t.l-e.l}function mN(t){var e,n,r;for(n=new Un(new Vn(t.p.a).a.bb().mb());n.a.G();)if(r=zf(n.a.H(),21),(e=zf(r.yb(),89)).e&&t.b[e.b]<0)return e;return null}function xN(t,e){var n,r,i,o,a;r=Yo(t.d,e.d),o=Yo(t.e,e.e),(i=Go(t.d+t.c,e.d+e.c))=e.length)throw new oo("Greedy SwitchDecider: Free layer layer not in graph.");this.b=e[t],this.c=new Wh(this.b),this.d=new Um(this.b)}function GN(t,e){var n;if(this.f=t,this.b=this.f.c,Ib(e,n=t.d),e>=(n/2|0))for(this.e=t.e,this.d=n;e++0;)rb(this);this.a=null}function FN(t){var e,n,r;for(n=new $n(t.a.b);n.a0&&(t.g=iC(t.g)),rC(t);case 2:return yu(t.e)<0&&(t.e=rC(t.e)),iC(t);default:return t.d=1+Ho(Bi(t.e),Bi(t.g)),t}}function ZN(t,e){this.f=(xl(),new kr),this.b=new kr,this.j=new kr,this.a=t,this.c=e,this.c>0&&nT(this,this.c-1,(yS(),OB)),this.c0&&lT(t,e,n),0):(zc(0==n),0)}function QN(t,e){var n,r,i,o,a;for(i=zf(_x(e,(qS(),wX)),15).a*zf(_x(e,(ZS(),qX)),15).a,a=t[0].i.a+t[0].j.a,o=1;o=0;e--)VW[e]=r,r*=.5;for(n=1,t=24;t>=0;t--)zW[t]=n,n*=.5}function tC(t){for(;0!=t.g.c&&0!=t.d.c;)Yl(t.g).c>Yl(t.d).c?(t.i+=t.g.c,Y_(t.d)):Yl(t.d).c>Yl(t.g).c?(t.e+=t.d.c,Y_(t.g)):(t.i+=rd(t.g),t.e+=rd(t.d),Y_(t.g),Y_(t.d))}function eC(t){var e,n,r,i;for(i=new qo("["),e=!1,r=t.mb();r.G();)n=r.H(),e?i.a+=", ":e=!0,ru(i,n===t?"(this Collection)":(ai(),null==n?dL:zk(n)));return i.a+="]",i.a}function nC(t){var e,n,r,i;for(i=new qo("{"),e=!1,r=t.bb().mb();r.G();)n=zf(r.H(),21),e?i.a+=", ":e=!0,ru(i,pb(t,n.yb())),i.a+="=",ru(i,pb(t,n.zb()));return i.a+="}",i.a}function rC(t){var e;return Vc(!!t.g),e=t.g,t.g=e.e,e.e=t,e.j=t.j,e.a=t.a,t.a=1+ji(t.e)+ji(t.g),t.j=wE(wE(t.c,Gi(t.e)),Gi(t.g)),t.d=1+Ho(Bi(t.e),Bi(t.g)),e.d=1+Ho(Bi(e.e),Bi(e.g)),e}function iC(t){var e;return Vc(!!t.e),e=t.e,t.e=e.g,e.g=t,e.j=t.j,e.a=t.a,t.a=1+ji(t.e)+ji(t.g),t.j=wE(wE(t.c,Gi(t.e)),Gi(t.g)),t.d=1+Ho(Bi(t.e),Bi(t.g)),e.d=1+Ho(Bi(e.e),Bi(e.g)),e}function oC(t){var e;dl(new $n(hN(t.e)))&&((e=zf(y_(t.e,(QS(),Fj)),28))==(vN(),yB)?function(t){var e,n,r,i,o;for(e=t.e.j,r=new $n(hN(t));r.a=wL?(e=55296+(t-wL>>10&1023)&mL,n=56320+(t-wL&1023)&mL,String.fromCharCode(e)+""+String.fromCharCode(n)):String.fromCharCode(t&mL)}function _C(t,e,n,r){var i;Of(t.c,new mp(t,n,r,zf(Qg(t.k,n),24).a)),Wg(r)&&(e==t.e?r.d.f!=t.a&&r.c.f!=t.a:r.d.f!=t.e&&r.c.f!=t.e)&&(i=n==r.c?r.d:r.c,Of(t.c,new mp(t,i,r,zf(Qg(t.k,i),24).a)))}function kC(t,e){var n,r,i;if(e===t)return!0;if(!fl(e,57))return!1;if(i=zf(e,57),t.Y()!=i.Y())return!1;for(r=i.bb().mb();r.G();)if(n=zf(r.H(),21),!t._(n))return!1;return!0}function NC(t,e){var n,r,i;return LE(r=new kk(t),e),Ky(r,(qS(),VU),e),Ky(r,(QS(),Fj),(vN(),yB)),Ky(r,aj,(hk(),mR)),fr(r,(DN(),PF)),sv(n=new kN,r),Gh(n,(yS(),KB)),sv(i=new kN,r),Gh(i,OB),r}function CC(t,e){var n,r,i;for(i=bL,r=new $n(t_(e));r.a0&&OC(t,o,n));e.k=0}function SC(t,e){if(0>e)throw new ao("Top must be smaller or equal to bottom.");if(0>t)throw new ao("Left must be smaller or equal to right.");this.d=0,this.c=t,this.a=e,this.b=0}function LC(t){var e,n,r;if(0==t.length)throw new ao(lD);for(n=0,r=t.length;n1)throw new ao("In straight hyperEdges there may be only one edge.");If((i=new Vn(n.a).a.bb().mb(),r=zf(new Un(i).a.H(),21),zf(r.yb(),12)).a,new Ja(e,t.b))}function WC(t,e,n){var r,i;if(this.f=t,Ib(n,i=(r=zf(Qg(t.b,e),126))?r.a:0),n>=(i/2|0))for(this.e=r?r.c:null,this.d=i;n++0;)Dv(this);this.b=e,this.a=null}function qC(e,r){typeof n===vL?n(r):((typeof document!==WM||"object"===uL&&t.exports)&&cq(e(r)),typeof document===WM&&typeof self!==WM&&self.postMessage(r))}function ZC(t,e){var n,r,i,o;"x"in t.a&&(i=zf(Ap(t,"x"),104),e.i.a=i.a),"y"in t.a&&(o=zf(Ap(t,"y"),104),e.i.b=o.a),tP in t.a&&(r=zf(Ap(t,tP),104),e.j.a=r.a),eP in t.a&&(n=zf(Ap(t,eP),104),e.j.b=n.a)}function KC(t,e,n){var r;wy(this),e==(dv(),EV)?Cg(this.g,t.c):Cg(this.o,t.c),Cg(n==EV?this.g:this.o,t.d),Cg(this.c,t),ck(this,jv(t.c).b,r=jv(t.d).b,r),this.f=function(t,e){return ON(),(t-e<=0?0-(t-e):t-e)<.2}(jv(t.c).b,jv(t.d).b)}function $C(t,e,n){var r,i,o,a,s;for(Yp(),s=new sw((a=new Ko(zf(gd(e.a,n),18))).b.Y()),i=new nr(a.b.mb());i.b.G();)r=zf(i.b.H(),37),(o=zf(Qg(t.a,r),31))||(o=HS(r),wp(t.a,r,o)),s.c[s.c.length]=o;return s}function QC(t){var e,n;if(Vs(zf(_x(t,(QS(),Fj)),28)))for(n=new $n(t.f);n.ae&&r.$b(t[o-1],t[o])>0;--o)a=t[o],Hg(t,o,t[o-1]),Hg(t,o-1,a)}(e,n,r,o);else if(JC(e,t,s=n+i,c=s+((a=r+i)-s>>1),-i,o),JC(e,t,c,a,-i,o),o.$b(t[c-1],t[c])<=0)for(;n=r||e upperEndpoint (%s)",Cx(Lo(kD,1),jL,1,4,[e,n])))}((s=t.$b(n,o))<=0,n,o),0==s&&zc(r!=(Uu(),BD)|a!=BD))}function cT(t){if(this.a=t,t.c.f.g==(DN(),PF))this.c=t.c,this.d=zf(_x(t.c.f,(qS(),UU)),32);else{if(t.d.f.g!=PF)throw new ao("Edge "+t+" is not an external edge.");this.c=t.d,this.d=zf(_x(t.d.f,(qS(),UU)),32)}}function uT(){uT=a,Sz=wd(new r_,(WS(),pH)),Mz=yd(new r_,yH),Pz=pd(yd(new r_,DH),PH),Oz=pd(wd(yd(new r_,lH),hH),fH),Dz=yd(new r_,zH),Lz=pd(new r_,vH),Az=pd(wd(yd(bd(new r_,xH),_H),NH),EH),Iz=pd(wd(new r_,NH),cH)}function lT(t,e,n){var r,i,o,a;return Nw(n,gM),0==n?AN(t,e):(zc(lh(t.b,e)),(a=t.c.a)?(o=ky(rq,pM,26,1,12,1),r=EI(a,t.d,e,n,o),Rd(t.c,a,r),o[0]):(t.d.$b(e,e),i=new Cm(e,n),kh(t.a,i,t.a),Rd(t.c,null,i),0))}function hT(t,e,n){var r,i,o,a,s;for(r=0,s=n,e||(r=n*(t.c.length-1),s*=-1),o=new $n(t);o.a0&&((!is(t.b.d)||!r.q.d)&&(!os(t.b.d)||!r.q.b)&&(r.j.e-=0>o/2-.5?0:o/2-.5),(!is(t.b.d)||!r.q.a)&&(!os(t.b.d)||!r.q.c)&&(r.j.b+=0>o-1?0:o-1))}(t,e,n),o=new Re,i=new $n(t.b.a.b);i.a0&&((!is(t.b.d)||!r.q.d)&&(!os(t.b.d)||!r.q.b)&&(r.j.e+=0>o/2-.5?0:o/2-.5),(!is(t.b.d)||!r.q.a)&&(!os(t.b.d)||!r.q.c)&&(r.j.b-=o-1))}(t,e,n)}function gT(t,e){var n,r,i,o;for(t.c[e.k]=!0,Of(t.a,e),o=new $n(e.f);o.a(a=s+io(t.b[t.f[i.k].k]))?n:a;return n-r}function xT(t){var e;return Zy(e=new Vi,"type",new Dd((Bh(cF),cF.n))),Zy(e,qM,new Dd(t.f)),t.b&&Zy(e,"value",t.b),t.a&&Zy(e,"context",t.a),Zy(e,ZM,new Dd(_l(new so("\n"),new zn(new Qn((null==t.g&&(t.g=xd(t)),t.g)))))),e}function ET(t,e){var n,r,i,o,a;if(e===t)return!0;if(!fl(e,20))return!1;if(a=zf(e,20),t.Y()!=a.Y())return!1;for(o=a.mb(),r=t.mb();r.G();)if(n=r.H(),i=o.H(),!(Zc(n)===Zc(i)||null!=n&&aE(n,i)))return!1;return!0}function _T(t){!eR&&((e=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F"])[34]='\\"',e[92]="\\\\",e[173]="\\u00ad",e[1536]="\\u0600",e[1537]="\\u0601",e[1538]="\\u0602",e[1539]="\\u0603",e[1757]="\\u06dd",e[1807]="\\u070f",e[6068]="\\u17b4",e[6069]="\\u17b5",e[8203]="\\u200b",e[8204]="\\u200c",e[8205]="\\u200d",e[8206]="\\u200e",e[8207]="\\u200f",e[8232]="\\u2028",e[8233]="\\u2029",e[8234]="\\u202a",e[8235]="\\u202b",e[8236]="\\u202c",e[8237]="\\u202d",e[8238]="\\u202e",e[8288]="\\u2060",e[8289]="\\u2061",e[8290]="\\u2062",e[8291]="\\u2063",e[8292]="\\u2064",e[8298]="\\u206a",e[8299]="\\u206b",e[8300]="\\u206c",e[8301]="\\u206d",e[8302]="\\u206e",e[8303]="\\u206f",e[65279]="\\ufeff",e[65529]="\\ufff9",e[65530]="\\ufffa",e[65531]="\\ufffb",eR=e);var e,n=t.replace(/[\x00-\x1f\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u2028-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb"\\]/g,function(t){return function(t){var e=eR[t.charCodeAt(0)];return null==e?t:e}(t)});return'"'+n+'"'}function kT(t,e){var n,r,i,o,a;for(r=new Un(new Vn((1==e?lF:uF).a).a.bb().mb());r.a.G();)for(i=zf(r.a.H(),21),n=zf(i.yb(),59),a=zf(WN(t.f.c,n),18).mb();a.G();)o=zf(a.H(),27),jy(t.b.b,o.b),jy(t.b.a,zf(o.b,25).f)}function NT(t,e,n){var r,i,o,a;if(F_(n,"Recursive layout",2),0!=e.b.c.length){for(a=1/e.b.c.length,o=new $n(e.b);o.a=2147483648&&(r-=4294967296),r)}function ST(t,e,n){var r,i,o;if(e!=n){r=e;do{Sh(t,r.d),(o=zf(_x(r,(qS(),uX)),9))&&(Dl(t,(i=r.a).b,i.d),Sh(t,o.i),r=Kg(o))}while(o);r=n;do{Lh(t,r.d),(o=zf(_x(r,(qS(),uX)),9))&&(Rl(t,(i=r.a).b,i.d),Lh(t,o.i),r=Kg(o))}while(o)}}function LT(t,e){var n,r,i,o,a;for(n=new Re,a=new Js,i=new Un(new Vn(t.a).a.bb().mb());i.a.G();)o=zf(i.a.H(),21),yI(a,(r=zf(o.yb(),12)).c,r,null),yI(a,r.d,r,null);for(;a.a;)Of(n,jI(a,e,Vl(zf(_x(e,(QS(),Fj)),28))));return n}function MT(t,e){var n,r,i,o,a;for(r=new Un(new Vn((1==e?lF:uF).a).a.bb().mb());r.a.G();)for(i=zf(r.a.H(),21),n=zf(i.yb(),59),a=zf(WN(t.f.c,n),18).mb();a.G();)o=zf(a.H(),27),Of(t.b.b,zf(o.b,25)),Of(t.b.a,zf(o.b,25).f)}function PT(t){var e,n,r,i,o,a;for(jf(),xl(),n=new ny,r=new $n(t.e.c);r.a0&&i0):i<0&&-i0)}function BT(t,e,n,r,i){var o,a;mm(Vm(Cx(Lo(gR,1),KM,10,0,[i.f.i,i.i,i.a])),n)||(e.c==i?Hl(e.a,0,new qc(n)):If(e.a,new qc(n)),r&&!_a(t.a,n)&&((a=zf(_x(e,(QS(),_j)),44))||(a=new Gr,Ky(e,_j,a)),Lb(a,o=new qc(n),a.c.b,a.c),Cg(t.a,o)))}function GT(t){var e,n,r,i,o,a;for(e=0,n=new $n(t.a);n.a((a=jv(r.d).b)-o<=0?0-(a-o):a-o)?e:a-o<=0?0-(a-o):a-o);return e}function FT(t,e){var n,r,i,o,a,s;if((r=t.b[e.k])>=0)return r;for(i=1,o=new $n(e.f);o.a(a=FT(t,s))+1?i:a+1);return function(t,e,n){var r,i;for(r=(i=t.a.c).c.length;rc-n&&s=t.g.d?((e=t.f).e=fm(t.e,e),e.g=t.g,e.a=t.a-1,e.j=xE(t.j,n),qN(e)):((e=t.i).g=dm(t.g,e),e.e=t.e,e.a=t.a-1,e.j=xE(t.j,n),qN(e)):t.e:t.g}function UT(t){var e,n,r,i,o,a;for(i=new $n(t.a);i.ao.k?Gh(a,qB):a.g==qB&&o.k>r.k&&Gh(a,SB))}function XT(t,e,n){var r,i,o;if(Nw(n,gM),0==n)return AN(t,e);o=t.c.a,i=ky(rq,pM,26,1,12,1);try{if(!lh(t.b,e)||!o)return 0;r=HI(o,t.d,e,n,i)}catch(t){if(fl(t=nE(t),119))return 0;if(fl(t,76))return 0;throw PE(t)}return Rd(t.c,o,r),i[0]}function WT(t){var e,n,r,i,o,a;for(rl(a=zf(Hk(t.a,ky(GF,iP,9,t.a.c.length,0,1)),51),new ot),n=null,i=0,o=a.length;i0)return KT(t,e,n.g);if(0!=r)return wE(wE(e.ac(n.g),e._b(n)),KT(t,e,n.e));switch(t.b.f.e){case 0:return wE(e._b(n),e.ac(n.g));case 1:return e.ac(n.g);default:throw new _r}}function $T(t,e,n){var r;if(!n)return 0;if((r=t.d.$b(t.b.e,n.b))<0)return $T(t,e,n.e);if(0!=r)return wE(wE(e.ac(n.e),e._b(n)),$T(t,e,n.g));switch(t.b.d.e){case 0:return wE(e._b(n),e.ac(n.e));case 1:return e.ac(n.e);default:throw new _r}}function QT(t,e,n,r){var i,o,a,s;return fr(a=new kk(t),(DN(),RF)),Ky(a,(qS(),iX),e),Ky(a,(QS(),Fj),(vN(),yB)),Ky(a,tX,n),Ky(a,eX,r),Gh(o=new kN,(yS(),KB)),sv(o,a),Gh(s=new kN,OB),sv(s,a),uv(e,o),LE(i=new Rp,e),Ky(i,_j,null),lv(i,s),uv(i,r),a}function JT(t,e){var n,r,i,o,a,s,c,u;for(n=0,a=0,s=(o=t.j).length;an.a&&(o=Ho(o,a.a-n.a-1));return o}function rA(t){var e,n;switch(e=zf(_x(t,(QS(),Aj)),15).a,n=zf(_x(t,Ij),15).a,Ky(t,Ij,new Hn(e)),Ky(t,Aj,new Hn(n)),zf(_x(t,aj),103).e){case 1:Ky(t,aj,(hk(),_R));break;case 2:Ky(t,aj,(hk(),wR));break;case 3:Ky(t,aj,(hk(),xR));break;case 4:Ky(t,aj,(hk(),ER))}}function iA(t,e,n){var r,i,o;for(o=new $n(t.e);o.a0&&(r.b.c-=r.c,r.b.c<=0&&r.b.f>0&&If(e,r.b));for(i=new $n(t.b);i.a0&&(r.a.f-=r.c,r.a.f<=0&&r.a.c>0&&If(n,r.a))}function oA(t,e,n){var r,i,o;for(o=new $n(t.j);o.a0&&(r.b.e-=r.c,r.b.e<=0&&r.b.k>0&&If(e,r.b));for(i=new $n(t.d);i.a0&&(r.a.k-=r.c,r.a.k<=0&&r.a.e>0&&If(n,r.a))}function aA(t,e){switch(t.e){case 1:switch(e.e){case 1:return QP;case 4:return.5;case 3:return JP;case 2:return tD}break;case 2:switch(e.e){case 1:return QP;case 2:return.5;case 3:return JP;case 4:return tD}break;default:throw new ao($P)}return 0}function sA(t,e){var n,r,i,o;for(Ou((o=new Kv(t,0)).b0),o.a.sb(o.c=--o.b),tf(o,i),Ou(o.b1)&&(++o,++a);return!Vl(zf(_x(n,(QS(),Fj)),28))&&s&&(++o,++a),wp(i,n,WE(o)),a}function lA(t){var e,n,r,i,o,a,s,c,u,l;for(u=(l=(s=zf((a=t.b.mb()).H(),92)).a.a)>cD,c=lcD)&&!c)return vm(s.b);if(i&&c||r&&u)return(e=o/(o-l))*vm(n.b)+(1-e)*vm(s.b)}return 0}function hA(t){var e,n,r,i,o,a,s,c,u,l;for(u=(l=(s=zf((a=t.b.mb()).H(),92)).a.b)>cD,c=lcD)&&!c)return vm(s.b);if(i&&c||r&&u)return(e=o/(o-l))*vm(n.b)+(1-e)*vm(s.b)}return 0}function fA(t,e,n){var r,i;return r=0,Wg(e)?_a(t.g,e)?(XT(t.i,WE(Mh(t,e.c)),1),XT(t.i,WE(Mh(t,e.d)),1),pl(t.g,e),r+=pk(t,e,t.i)):(Cg(t.g,e),lT(t.i,WE(Mh(t,e.c)),1),lT(t.i,WE(Mh(t,e.d)),1)):(i=AN(t.i,WE(zf(Qg(t.k,n),24).a)),r+=t.g.a.Y()-i),r}function dA(t){switch(t.e){case 0:return Zz;case 1:return qz;case 2:return Uz;case 3:return Vz;case 4:return $z;case 5:return Kz;case 6:return pV;case 7:return gV;case 8:return Wz;case 9:return Xz;case 10:return fV;case 11:return Qz;default:return dV}}function gA(t){switch(t.e){case 0:return Kz;case 1:return pV;case 2:return gV;case 3:return Zz;case 4:return qz;case 5:return Uz;case 6:return Vz;case 7:return $z;case 8:return Wz;case 9:return Xz;case 10:return fV;case 11:return Qz;default:return dV}}function pA(t){switch(t.e){case 0:return Uz;case 1:return Vz;case 2:return $z;case 3:return Kz;case 4:return pV;case 5:return gV;case 6:return Zz;case 7:return qz;case 8:return Wz;case 9:return Xz;case 10:return fV;case 11:return Qz;default:return dV}}function vA(t){var e;switch(e=t.a.f,t.b){case 0:return new $n(t.a.f);case 1:return vg(new Ov(e),TN(t));case 2:switch(t.c.e){case 2:case 1:return vg(new $n(e),TN(t));case 3:case 4:return vg(new Ov(e),TN(t))}}throw new Co("PortOrder not implemented.")}function bA(t,e,n,r){this.e=t,this.j=zf(_x(t,(qS(),mX)),134),this.f=ky(GF,iP,9,e,0,1),this.b=ky(OW,lL,184,e,6,1),this.a=ky(GF,iP,9,e,0,1),this.d=ky(OW,lL,184,e,6,1),this.i=ky(GF,iP,9,e,0,1),this.g=ky(OW,lL,184,e,6,1),this.n=ky(OW,lL,184,e,6,1),this.k=n,this.c=r}function yA(t){if(!t.a.c||!t.a.d)throw new _o((Bh(CY),CY.j+" must have a source and target "+(Bh(IY),IY.j+" specified.")));if(t.a.c==t.a.d)throw new _o("Network simplex does not support self-loops: "+t.a+" "+t.a.c+" "+t.a.d);return kg(t.a.c.g,t.a),kg(t.a.d.c,t.a),t.a}function wA(t,e,n,r,i){r==(yS(),OB)&&i==OB?Wp(t,e)>Wp(t,n)?t.d=xk(t,n):t.b=xk(t,e):r==KB&&i==KB?Wp(t,e)Wp(t,n)&&(t.d=xk(t,n),t.b=xk(t,e)):Wp(t,e)0&&o>0?e++:r>0?n++:o>0?i++:n++}mb(t.f,new Rt)}function xA(t,e,n,r){var i,o,a,s,c;n.d.f!=e.f&&(fr(i=new kk(t),(DN(),RF)),Ky(i,(qS(),iX),n),Ky(i,(QS(),Fj),(vN(),yB)),r.c[r.c.length]=i,sv(a=new kN,i),Gh(a,(yS(),KB)),sv(s=new kN,i),Gh(s,OB),c=n.d,uv(n,a),LE(o=new Rp,n),Ky(o,_j,null),lv(o,s),uv(o,c),vT(i,a,s))}function EA(t){var e,n,r,i,o,a,s;for(i=RP,a=RP,o=null,n=new up(new ur(t.e));n.b!=n.c.a.b;)if(1==zf((e=Gy(n)).d,60).c&&(r=zf(e.e,116).a,s=zf(e.e,116).b,(i-r>GP||r-iGP)&&(a=zf(e.e,116).b,i=zf(e.e,116).a,o=zf(e.d,60),0==a&&0==i)))return o;return o}function _A(t,e){var n,r,i,o,a,s;return o=t.d,(s=zf(_x(t,(QS(),Qj)),15).a)<0&&Ky(t,Qj,new Hn(s=0)),e.j.b=s,a=Math.floor(s/2),Gh(r=new kN,(yS(),KB)),sv(r,e),r.i.b=a,Gh(i=new kN,OB),sv(i,e),i.i.b=a,uv(t,r),LE(n=new Rp,t),Ky(n,_j,null),lv(n,i),uv(n,o),function(t,e,n){var r;(r=e.c.f).g==(DN(),RF)?(Ky(t,(qS(),tX),zf(_x(r,tX),7)),Ky(t,eX,zf(_x(r,eX),7))):(Ky(t,(qS(),tX),e.c),Ky(t,eX,n.d))}(e,t,n),function(t,e){var n,r;for(r=new Kv(t.b,0);r.bcD&&(this.b.ib(n),s=!1),this.b.ib(c);s&&this.b.ib(n)}function TA(t,e){var n,r,i,o,a,s,c;for(n=fP,DN(),s=jF,i=new $n(e.a);i.a0?n:0,r.i.b=n+nf(t.a,o,s)):r.i.b=(Gd(a),a)),c=nf(t.a,o,s),r.i.bo?0:o)o?0:o:s,(0>(co?0:o)o?0:o:s)),o=c,c+=a,r=zf(gd(t.c,i),9),(n=new Eu(u)).j.b=e.j.b,fT(t.b,e,n),Of(r.c,n);jy(t.g.c,e),Of(t.i,new Os(t,e))}function jA(t,e,n){var r,i,o,a,s,c;for(e.k=1,i=e.d,c=b_(e,(em(),DX)).mb();c.G();)for(r=new $n(zf(c.H(),7).e);r.ah+s&&r.I();for(a=new $n(f);a.aGP||r-iGP)&&(a=zf(e.e,116).b,i=zf(e.e,116).a,o=zf(e.d,60),0==a&&0==i)))return o;return o}function UA(){var t,e,n,r,i;for(this.e=(xl(),new ny),this.b=new Zf(n=zf(ra(kV),11),zf(Ag(n,n.length),11),0),this.c=new Zf(r=zf(ra(kV),11),zf(Ag(r,r.length),11),0),this.a=new Zf(i=zf(ra(kV),11),zf(Ag(i,i.length),11),0),e=(NS(),NS(),Hz).mb();e.G();)t=zf(e.H(),60),Sk(this.e,t,new Ao)}function XA(t,e,n){var r,i,o,a;Ca(t.k-t.a)a?new Gw(e,t,o-a):o>0&&a>0&&(new Gw(t,e,0),new Gw(e,t,0)))}function WA(t,e){var n,r,i,o,a,s,c,u;for(c=new Re,u=null,r=zf(Cp(cY,t),20).mb();r.G();){for(s=new Un(new Vn((n=zf(r.H(),75)).c.a).a.bb().mb());s.a.G();)i=zf(s.a.H(),21),tf(e,o=zf(i.yb(),7)),IT(o,t.b);ix(c,n.b),u=t.a}for(RC(c),Iw(c,u),a=new $n(c);a.an.k&&s1&&(o=n?Sc(e.d)+1:Sc(a.d)-1,cv(a,zf(gd(t.a.c,o),16))),QA(t,a,n));return e}function JA(t,e){var n,r,i,o;for(i=e.d?t.a.c==(fv(),yz)?UE(e.b):XE(e.b):t.a.c==(fv(),bz)?UE(e.b):XE(e.b),o=!1,Xu(),r=new Mu(Ru(Xf(i.a,new g)));JE(r);)if(n=zf(Cv(r),12),t.c.a[n.c.f.d.k]!==t.c.a[n.d.f.d.k]&&(o=!0,_a(t.b,t.a.f[Zk(n,e.b).k])))return e.c=!0,e.a=n,e;return e.c=o,e.a=null,e}function tI(t){var e,n,r,i,o,a,s;for(o=new $n(t.a.a);o.a0&&Tx(this.n,!0,(EE(),AR)),t.g==(DN(),PF)&&Af(this.n,!1,!1,!1,!1)}function rI(t,e,n){var r,i,o,a,s,c,u,l;for(o=new Ja(e,n),u=new $n(t.b);u.ar?h:r)>t.j.a&&(u=(s-t.j.a)/2,a.b=Go(a.b,u),a.c=Go(a.c,u))}function gI(t,e,n,r){var i,o,a,s,c,u,l,h;for(a=Dl(e.d,n,r),l=new $n(e.b);l.a=40)&&function(t){var e,n,r,i,o,a,s;for(t.o=new ii,r=new uo,a=new $n(t.e.a);a.a0,s=h_(e,o),Pu(n?s.c:s.g,e),1==t_(s).c.length&&Lb(r,s,r.c.b,r.c),i=new ts(o,e),cu(t.o,i),jy(t.e.a,o))}(t),function(t){var e,n,r,i,o,a,s,c,u,l;for(u=t.e.a.c.length,o=new $n(t.e.a);o.a0){for(Wo(t.c);wT(t,zf(Qv(new $n(t.e.a)),61))0?(c=t.g)?(a=c.d,t.g=EI(c,e,n,r,i),0==i[0]&&++t.a,t.j=wE(t.j,r),t.g.d==a?t:qN(t)):(i[0]=0,xm(t,n,r)):(i[0]=t.c,zc(eE(wE(t.c,r),bL)<=0),t.c+=r,t.j=wE(t.j,r),t)}function _I(t,e,n){var r,i,o,a,s,c,u,l;for(i=!0,a=new $n(e.c);a.au&&r>u)){i=!1,t.a&&Mf();break}u=io(n.n[s.k])+io(n.d[s.k])+s.j.b+s.e.a}if(!i)break}return t.a&&Mf(),i}function kI(t){var e,n,r,i,o,a;if(dl(new $n(r=Qk(t)))){for(a=new xp(0,0,t.e.j.a,t.e.j.b),n=new $n(r);n.aa.i.b-a.e.d+u.a+h&&(f=c.i+u.i,u.a=(u.i*u.a+c.i*c.a)/f,u.i=f,c.g=u,n=!0)),o=a,c=u;return n}function OI(t){var e,n,r,i,o;if(Zc(_x(t,(QS(),Fj)))===Zc((vN(),wB))||Zc(_x(t,Fj))===Zc(yB))for(o=new $n(t.f);o.aa)return yS(),OB;break;case 4:case 3:if(l<0)return yS(),SB;if(l+n>o)return yS(),qB}return(c=(u+s/2)/a)+(r=(l+n/2)/o)<=1&&c-r<=0?(yS(),KB):c+r>=1&&c-r>=0?(yS(),OB):r<.5?(yS(),SB):(yS(),qB)}function LI(t,e,n,r,i,o,a){var s,c,u,l,h;for(h=new oc,c=e.mb();c.G();)for(l=new $n(mk(zf(c.H(),627)));l.a0&&If(t.e,o)):(t.c[a]-=u+1,t.c[a]<=0&&t.a[a]>0&&If(t.d,o))))}function PI(t){var e,n,r,i,o,a,s,c;for(Rx(),this.b=new $t,this.c=new Re,this.a=new Re,s=0,c=(a=Dx()).length;s0){for(i=s.length;i>0&&""==s[i-1];)--i;i0&&0==i[0]&&++t.a,t.j=wE(t.j,r-i[0]),qN(t)):(i[0]=0,r>0?Em(t,n,r):t):o>0?(s=t.g)?(t.g=FI(s,e,n,r,i),0==r&&0!=i[0]?--t.a:r>0&&0==i[0]&&++t.a,t.j=wE(t.j,r-i[0]),qN(t)):(i[0]=0,r>0?xm(t,n,r):t):(i[0]=t.c,0==r?VT(t):(t.j=wE(t.j,r-t.c),t.c=r,t))}function HI(t,e,n,r,i){var o,a,s;return(o=e.$b(n,t.b))<0?(a=t.e)?(t.e=HI(a,e,n,r,i),i[0]>0&&(r>=i[0]?(--t.a,t.j=xE(t.j,i[0])):t.j=xE(t.j,r)),0==i[0]?t:qN(t)):(i[0]=0,t):o>0?(s=t.g)?(t.g=HI(s,e,n,r,i),i[0]>0&&(r>=i[0]?(--t.a,t.j=xE(t.j,i[0])):t.j=xE(t.j,r)),qN(t)):(i[0]=0,t):(i[0]=t.c,r>=t.c?VT(t):(t.c-=r,t.j=xE(t.j,r),t))}function YI(t,e,n){var r,i,o,a,s,c,u,l;for(c=new $n(n.b);c.a0&&u>0&&UO(b,new Ja(N,u),!0))),p=Go(p,b.i.a+b.j.a),v=Go(v,b.i.b+b.j.b),d=new $n(b.c);d.ae.a&&(r.kb((MN(),NV))?t.d.a+=(n.a-e.a)/2:r.kb(TV)&&(t.d.a+=n.a-e.a)),n.b>e.b&&(r.kb((MN(),IV))?t.d.b+=(n.b-e.b)/2:r.kb(AV)&&(t.d.b+=n.b-e.b)),zf(_x(t,(qS(),WU)),18).kb((KA(),eU))&&(n.a>e.a||n.b>e.b))for(s=new $n(t.b);s.a0||0==n&&e.f==(Uu(),BD))&&(s=e.g,c=e.f):(i=e.c,s=e.g,c=e.f),r&&i&&((n=t.a.$b(o,s))>0||0==n&&a==(Uu(),BD)&&c==(Uu(),BD))&&(o=s,Uu(),a=BD,c=jD),new sT(t.a,r,o,a,i,s,c)}function ZI(t,e,n,r){var i,o,a,s,c,u;if(n.c.f!=e.f)for(fr(i=new kk(t),(DN(),RF)),Ky(i,(qS(),iX),n),Ky(i,(QS(),Fj),(vN(),yB)),r.c[r.c.length]=i,sv(a=new kN,i),Gh(a,(yS(),KB)),sv(s=new kN,i),Gh(s,OB),uv(n,a),LE(o=new Rp,n),Ky(o,_j,null),lv(o,s),uv(o,e),vT(i,a,s),u=new Kv(n.b,0);u.b=r&&u.a>=r&&(l.a=r),f.a<=n&&u.a<=n&&(d.a=n-10),1==e.c.a.Y()?ew(a.a,Cx(Lo(gR,1),KM,10,0,[l,h,g,d])):ew(a.a,Cx(Lo(gR,1),KM,10,0,[l,h,i,g,d]))}function $I(t,e){var n,r,i,o,a,s;for(o=t.c,a=t.d,lv(t,null),uv(t,null),e&&ro(io(Ah(_x(a,(qS(),qU)))))?lv(t,WI(a.f,(em(),DX),(yS(),OB))):lv(t,a),e&&ro(io(Ah(_x(o,(qS(),cX)))))?uv(t,WI(o.f,(em(),PX),(yS(),KB))):uv(t,o),r=new $n(t.b);r.aio(cl(a.g,a.d[0]).a)?(Ou(c.b>0),c.a.sb(c.c=--c.b),tf(c,a),i=!0):s.e&&s.e.Y()>0&&(o=(!s.e&&(s.e=new Re),s.e).nb(e),u=(!s.e&&(s.e=new Re),s.e).nb(n),(o||u)&&((!s.e&&(s.e=new Re),s.e).ib(a),++a.c));i||(r.c[r.c.length]=a)}function eO(t,e,n,r){var i,o,a,s,c,u,l,h,f,d,g;n.d.f!=e.f&&(fr(i=new kk(t),(DN(),RF)),Ky(i,(qS(),iX),n),Ky(i,(QS(),Fj),(vN(),yB)),r.c[r.c.length]=i,sv(a=new kN,i),Gh(a,(yS(),KB)),sv(s=new kN,i),Gh(s,OB),c=n.d,uv(n,a),LE(o=new Rp,n),Ky(o,_j,null),lv(o,s),uv(o,c),h=(l=(u=zf(gd(a.b,0),12).c).f).g,g=(d=(f=zf(gd(s.e,0),12).d).f).g,Ky(i,tX,h==RF?zf(_x(l,tX),7):u),Ky(i,eX,g==RF?zf(_x(d,eX),7):f))}function nO(t,e){var n,r,i,o,a,s,c,u,l,h,f,d,g;for(a=e,h=e.d,u=e.c.f,f=e.d.f,l=Sc(u.d),d=Sc(f.d),s=l;se&&(t.a=e),t.b<0?t.b=0:t.b>n&&(t.b=n)}(u,t.j.a,t.j.b),Gh(s,SI(s,o)),a=zf(_x(r,(qS(),WU)),18),c=s.g,o.e){case 2:case 1:(c==(yS(),SB)||c==qB)&&a.ib((KA(),oU));break;case 4:case 3:(c==(yS(),OB)||c==KB)&&a.ib((KA(),oU))}else i=l_(o),s=WI(t,n,n==(em(),DX)?i:pE(i));return s}function cO(t){var e,n,r,i,o,a,s,c;for(r=sh(Wb(t.a)),i=new Zf(e=zf(ra(kV),11),zf(Ag(e,e.length),11),0);r.a.G()||r.b.mb().G();)s=(n=zf(Cw(r),12)).c.g,c=n.d.g,s==(yS(),ZB)?c!=ZB&&(a=C_(c),Ky(n,(qS(),EX),a),Gh(n.c,c),ym(i,a),r.a.I()):c==ZB?(a=C_(s),Ky(n,(qS(),EX),a),Gh(n.d,s),ym(i,a),r.a.I()):(a=rO(s,c),Ky(n,(qS(),EX),a),ym(i,a),r.a.I());return 1==i.c?o=zf($b(new Us(i)),60):(NS(),o=dV),fC(t,o,!1),o}function uO(t,e,n){var r,i,o,a,s,c,u,l,h;for(c=n+e.d.c.a,h=new $n(e.f);h.a1,s=Sg(pu((ip(),new ab(BE(Cx(Lo(kD,1),jL,1,4,[l.b,l.e]))))));JE(s);)u=(a=zf(Cv(s),12)).c==l?a.d:a.c,Ca(Vm(Cx(Lo(gR,1),KM,10,0,[u.f.i,u.i,u.a])).b-o.b)>1&&BT(t,a,o,i,l)}}function lO(t,e){var n,r,i,o,a;for(a=new Xx(new Yn(t.f.b).a);a.b;){if(i=zf((o=zw(a)).yb(),251),1==e){if(i.yc()!=(EE(),OR)&&i.yc()!=CR)continue}else if(i.yc()!=(EE(),TR)&&i.yc()!=AR)continue;switch(r=zf(zf(o.zb(),27).b,25),n=zf(zf(o.zb(),27).a,78).c,i.yc().e){case 2:r.j.d=t.e.a,r.j.c=Go(1,r.j.c+n);break;case 1:r.j.d=r.j.d+n,r.j.c=Go(1,r.j.c-n);break;case 4:r.j.e=t.e.b,r.j.b=Go(1,r.j.b+n);break;case 3:r.j.e=r.j.e+n,r.j.b=Go(1,r.j.b-n)}}}function hO(t,e,n,r,i){var o,a,s,c,u,l,h,f;for(xl(),h=new kr,a=new Re,UC(t,n,t.d.Mc(),a,h),UC(t,r,t.d.Nc(),a,h),s=new Kv(a,0);s.b=l&&(y>l&&(u.c=ky(kD,jL,1,0,4,1),l=y),u.c[u.c.length]=g);0!=u.c.length&&(c=zf(gd(u,qk(e,u.c.length)),80),pp(T.a,c),c.d=h++,iA(c,N,E),u.c=ky(kD,jL,1,0,4,1))}for(m=t.c.length+1,p=new $n(t);p.aC.d&&(cp(n),jy(C.b,r),r.c>0&&(r.a=C,Of(C.e,r),r.b=_,Of(_.b,r)))}(a,zf(_x(e,(qS(),vX)),154)),function(t){var e,n,r,i,o,a,s,c,u;for(c=new Re,a=new Re,o=new $n(t);o.a-1){for(i=new $n(a);i.a0||(s.i=Vo(s.i,r.i-1),--s.f,0==s.f&&(a.c[a.c.length]=s))}}(a),f=-1,l=new $n(a);l.ah||r+i>c)throw new Xr;if(1&u.g&&!(4&u.g)||l==s)i>0&&pN(t,e,n,r,i,!0);else if(t===n&&er;)n[a]=t[--e];else for(a=r+i;r0&&0==o[0]&&++t.a,t.j=wE(t.j,i-o[0])),qN(t)):(o[0]=0,0==r&&i>0?Em(t,n,i):t);if(a>0)return(c=t.g)?(t.g=gO(c,e,n,r,i,o),o[0]==r&&(0==i&&0!=o[0]?--t.a:i>0&&0==o[0]&&++t.a,t.j=wE(t.j,i-o[0])),qN(t)):(o[0]=0,0==r&&i>0?xm(t,n,i):t);if(o[0]=t.c,r==t.c){if(0==i)return VT(t);t.j=wE(t.j,i-t.c),t.c=i}return t}function pO(t){var e,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v;for(c=t.e,d=t.f,a=t.d,l=(g=t.c)-1,p=t.g,h=Hf(t.g.xb(1,t.g.Y()-1)),u=new Re,n=0;n0&&(c=t.i.a/o);break;case 2:case 4:(i=t.f.j.b)>0&&(c=t.i.b/i)}Ky(t,(qS(),fX),c)}if(s=t.j,r)t.a.a=r.a,t.a.b=r.b;else if(e!=xB&&e!=EB&&a!=ZB)switch(a.e){case 1:t.a.a=s.a/2;break;case 2:t.a.a=s.a,t.a.b=s.b/2;break;case 3:t.a.a=s.a/2,t.a.b=s.b;break;case 4:t.a.b=s.b/2}else t.a.a=s.a/2,t.a.b=s.b/2}(c,u,i,zf(_x(c,Gj),10)),i.e){case 2:case 1:(c.g==(yS(),SB)||c.g==qB)&&o.ib((KA(),oU));break;case 4:case 3:(c.g==(yS(),OB)||c.g==KB)&&o.ib((KA(),oU))}}function wO(t){var e,n,r,i,o;for(r=new Re,o=new $n(t.c.f);o.a=(p=t.d.c.c.c.length)-1)return null;for((i=new Re).c[i.c.length]=e,b=e,a=n,d=-1,s=zf(gd(t.d.c.c,n),16),f=0;f1&&a1&&a>1;)u=RI(t,y),s=zf(gd(t.d.c.c,a),16),l=zf(gd(t.d.c.c,a-1),16),iN(y,p=Vo(zf(g.sb(h++),24).a,l.a.c.length),l),iN(u,b,s),b=p,y&&(i.c[i.c.length]=y),y=u,--w,++o,--a;for(v=(r-(i.c.length-1)*t.d.d)/i.c.length,c=new $n(i);c.a=0)return!1;if(n.e&&r==(DN(),MF)&&r!=n.e)return!1;if(e.k=n.b,Of(n.f,e),n.e=r,r==(DN(),RF)||r==BF||r==MF)for(i=new $n(e.f);i.a0&&(Tx(t.n,!1,(EE(),TR)),Tx(t.n,!0,AR))}function EO(t,e,n){var r,i,o,a;switch(o=t.i,i=Vm(Cx(Lo(gR,1),KM,10,0,[e.i,e.f.i])),r=Vm(Cx(Lo(gR,1),KM,10,0,[e.f.i,e.i,e.a])),a=e.d,e.g.e){case 4:o.a=Yo(i.a,r.a)-a.b-t.j.a-n,o.b=Vm(Cx(Lo(gR,1),KM,10,0,[e.f.i,e.i,e.a])).b+n;break;case 2:o.a=Go(i.a+e.j.a,r.a)+a.c+n,o.b=Vm(Cx(Lo(gR,1),KM,10,0,[e.f.i,e.i,e.a])).b+n;break;case 1:o.a=Vm(Cx(Lo(gR,1),KM,10,0,[e.f.i,e.i,e.a])).a+n,o.b=Yo(i.b,r.b)-a.d-t.j.b-n;break;case 3:o.a=Vm(Cx(Lo(gR,1),KM,10,0,[e.f.i,e.i,e.a])).a+n,o.b=Go(i.b+e.j.b,r.b)+a.a+n}}function _O(t,e,n){var r,i,o,a;switch(o=t.i,i=Vm(Cx(Lo(gR,1),KM,10,0,[e.i,e.f.i])),r=Vm(Cx(Lo(gR,1),KM,10,0,[e.f.i,e.i,e.a])),a=e.d,e.g.e){case 4:o.a=Yo(i.a,r.a)-a.b-t.j.a-n,o.b=Vm(Cx(Lo(gR,1),KM,10,0,[e.f.i,e.i,e.a])).b-t.j.b-n;break;case 2:o.a=Go(i.a+e.j.a,r.a)+a.c+n,o.b=Vm(Cx(Lo(gR,1),KM,10,0,[e.f.i,e.i,e.a])).b-t.j.b-n;break;case 1:o.a=Vm(Cx(Lo(gR,1),KM,10,0,[e.f.i,e.i,e.a])).a+n,o.b=Yo(i.b,r.b)-a.d-t.j.b-n;break;case 3:o.a=Vm(Cx(Lo(gR,1),KM,10,0,[e.f.i,e.i,e.a])).a+n,o.b=Go(i.b+e.j.b,r.b)+a.a+n}}function kO(){kO=a,lU=new _b("ONE_SIDED",0,!0,!1,!1),gU=new _b("TWO_SIDED",1,!1,!1,!1),hU=new _b("ONE_SIDED_BEST_OF_UP_OR_DOWN",2,!0,!0,!1),pU=new _b("TWO_SIDED_BEST_OF_UP_OR_DOWN",3,!1,!0,!1),fU=new _b("ONE_SIDED_BEST_OF_UP_OR_DOWN_ORTHOGONAL_HYPEREDGES",4,!0,!0,!0),vU=new _b("TWO_SIDED_BEST_OF_UP_OR_DOWN_ORTHOGONAL_HYPEREDGES",5,!1,!0,!0),dU=new _b("ONE_SIDED_ORTHOGONAL_HYPEREDGES",6,!0,!1,!0),uU=new _b("OFF",7,!1,!1,!1)}function NO(t,e,n,r,i,o,a){var s,c,u,l,h,f,d;return h=ro(io(Ah(_x(e,(ZS(),nW))))),f=null,o==(em(),PX)&&r.c.f==n?f=r.c:o==DX&&r.d.f==n&&(f=r.d),u=a,a&&h&&!f?(Of(a.e,r),d=Fo(zf(_x(a.d,(QS(),Qj)),15).a,zf(_x(r,Qj),15).a),Ky(a.d,Qj,new Hn(d))):(yS(),l=ZB,f?l=f.g:Vs(zf(_x(n,(QS(),Fj)),28))&&(l=o==PX?KB:OB),c=function(t,e,n,r,i,o){var a,s,c,u,l,h,f;return u=r==(em(),PX)?o.c:o.d,c=QE(e),u.f==n?(a=zf(Qg(t.b,u),9))||(Ky(a=vS(u,zf(_x(n,(QS(),Fj)),28),i,r==PX?-1:1,u.j,c,e),(qS(),iX),u),wp(t.b,u,a)):(l=zf(_x(o,(QS(),Qj)),15).a,s=function(t,e,n,r){var i,o;switch(i=QE(Kg(n)),sv(o=new kN,n),r.e){case 1:Gh(o,pE(l_(i)));break;case 2:Gh(o,l_(i))}return Ky(o,(qS(),rX),zf(_x(e,rX),15)),Ky(e,iX,o),wp(t.b,o,e),o}(t,a=vS((h=new y,f=zf(_x(e,(qS(),wX)),15).a*zf(_x(e,(ZS(),qX)),15).a/2,Ky(h,rX,new Hn(f)),h),zf(_x(n,Fj),28),i,r==PX?-1:1,new Ja(l,l),c,e),n,r),Ky(a,iX,s),wp(t.b,s,a)),zf(_x(e,(qS(),WU)),18).ib((KA(),eU)),Vs(zf(_x(e,(QS(),Fj)),28))?Ky(e,Fj,(vN(),mB)):Ky(e,Fj,(vN(),xB)),a}(t,e,n,o,l,r),s=gb((Kg(n),r)),o==PX?(lv(s,zf(gd(c.f,0),7)),uv(s,i)):(lv(s,i),uv(s,zf(gd(c.f,0),7))),u=new AE(r,s,c,zf(_x(c,(qS(),iX)),7),o,!f)),fT(t.a,r,new pf(u.d,e,o)),u}function CO(t,e,n,r){var i,o,a,s,c,u,l;if(fr(o=new kk(t),(DN(),BF)),Ky(o,(QS(),Fj),(vN(),yB)),i=0,e){for(Ky(a=new kN,(qS(),iX),e),Ky(o,iX,e.f),Gh(a,(yS(),KB)),sv(a,o),c=0,u=(l=zf(Hk(e.b,ky(SF,NP,12,e.b.c.length,0,1)),47)).length;cf?l:f;for(ck(this,Vm(Cx(Lo(gR,1),KM,10,0,[t.f.i,t.i,t.a])).b,h,l),a=new Un(new Vn(e.a).a.bb().mb());a.a.G();)i=zf(a.a.H(),21),o=zf(i.yb(),27),Cg(this.c,zf(o.b,12));this.f=!1}function MO(t,e,n,r){var i,o,a,s,c;if(!((s=(QS(),Sj).b)in e.a)||!Ap(e,s).ic().a){if(!(c=Ap(e,qM)))throw new mg("Labels must have a property 'text'.",null,e);if(!c.lc())throw new mg("A label's 'text' property must be a string.",c,e);if(Ky(o=new Eu(c.lc().a),(qS(),iX),e),wp(t.f,o,e),ZC(e,o),EN(e,o),fl(n,9)?Of(zf(n,9).c,o):fl(n,12)?Of(zf(n,12).b,o):fl(n,7)&&Of(zf(n,7).c,o),fl(n,12))switch(a=zf(_x(o,gj),107),ZC(e,o),Ky(o,gj,a),i=zf(_x(r,WU),18),a.e){case 2:case 3:i.ib((KA(),tU));case 1:case 0:i.ib((KA(),QV)),Ky(o,gj,(jm(),MR))}}}function PO(t,e){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v;for(i=0,o=0,c=new $n(t.a);c.a.5?v-=2*o*(d-.5):d<.5&&(v+=2*i*(.5-d)),v<(r=a.e.b)&&(v=r),g=a.e.c,v>p.a-g-u&&(v=p.a-g-u),a.i.a=e+v}}function DO(){DO=a,eF=new Qi,tF=vI(Cx(Lo(kR,1),jL,79,0,[(QS(),oj),yj])),$G=vI(Cx(Lo(kR,1),jL,79,0,[Mj,Hj,(ZS(),hW),wj,(qS(),gX),gW,aW])),WG=vI(Cx(Lo(kR,1),jL,79,0,[sj,hj,Sj,bj,Ej,Nj,Cj,Wj,qj,xj,BX,VX,UX,eW,ZX,nW,fW,sW,FX])),KG=vI(Cx(Lo(kR,1),jL,79,0,[Ij,Aj,kj,Qj,Lj,dX,MU,TU,wX,cW,qX,tW])),ZG=vI(Cx(Lo(kR,1),jL,79,0,[zj,aj,dj,pj,gj,vj,mj,Pj,Dj,Rj,jj,Bj,Fj,Yj,GX,zX,rW,XX,YX,iW,oW,KX,$X,JX,uW,lW,dW,pW,QX])),qG=vI(Cx(Lo(kR,1),jL,79,0,[Oj,Zj,Kj,HX])),JG=vI(Cx(Lo(kR,1),jL,79,0,[ij,uj,_j,Tj,Gj,Uj])),QG=vI(Cx(Lo(kR,1),jL,79,0,[(Lx(),VG)]))}function RO(t){var e,n,r,i,o,a,s;for(e=0,o=new $n(t.b.a);o.a0;){for(xy(0,s.c.length),d=zf(s.c[0],12),xy(0,h.c.length),i=$y((r=zf(h.c[0],12)).d.b,r,0),Xv(d,r.d,i),lv(r,null),uv(r,null),f=d.a,e&&If(f,new qc(v)),n=Ak(r.a,0);n.b!=n.d.c;)If(f,new qc(zf(Ab(n),10)));for(p=d.b,l=new $n(r.b);l.a0?Ow(this,this.f/this.a):null!=cl(e.g,e.d[0]).a&&null!=cl(n.g,n.d[0]).a?Ow(this,(io(cl(e.g,e.d[0]).a)+io(cl(n.g,n.d[0]).a))/2):null!=cl(e.g,e.d[0]).a?Ow(this,cl(e.g,e.d[0]).a):null!=cl(n.g,n.d[0]).a&&Ow(this,cl(n.g,n.d[0]).a)}function FO(t,e){var n,r,i,o,a,s,c,u,l,h,f;switch(t.g.e){case 1:if(r=zf(_x(t,(qS(),iX)),12),(n=zf(_x(r,oX),44))?ro(io(Ah(_x(r,yX))))&&(n=kx(n)):n=new Gr,u=zf(_x(t,tX),7),e<=(l=Vm(Cx(Lo(gR,1),KM,10,0,[u.f.i,u.i,u.a]))).a)return l.b;if(Lb(n,l,n.a,n.a.a),h=zf(_x(t,eX),7),(f=Vm(Cx(Lo(gR,1),KM,10,0,[h.f.i,h.i,h.a]))).a<=e)return f.b;for(Lb(n,f,n.c.b,n.c),a=zf(Ab(c=Ak(n,0)),10),s=zf(Ab(c),10);s.a=2)for(Lp(t.a),r=0,f=Ak(n,0);f.b!=f.d.c;)h=zf(Ab(f),10),0==r?(e=Lh(Lh(new Ja(h.a,h.b),t.c.i),t.c.f.i),t.c.a.a=e.a,t.c.a.b=e.b):r==n.b-1?(e=Lh(Lh(new Ja(h.a,h.b),t.d.i),t.d.f.i),t.d.a.a=e.a,t.d.a.b=e.b):If(t.a,h),++r;if(l)for(c=Ak(t.a,0);c.b!=c.d.c;)s=zf(Ab(c),10),a.a=Go(a.a,s.a),a.b=Go(a.b,s.b);for(o=new $n(t.b);o.a0&&Ky(a,RU,(Vd(),Vd(),TW)),(s=zf(_x(a,(QS(),Fj)),28))==(vN(),EB)||s!=xB&&r.ib((KA(),iU)),ro(io(Ah(_x(a,hj))))&&r.ib((KA(),JV)),ro(io(Ah(_x(a,xj))))&&(r.ib((KA(),rU)),r.ib(nU),Ky(a,Fj,xB)),a}function zO(t,e){e.V()&&Af(t.n,!0,!0,!0,!0),e.t((yS(),jB))&&Af(t.n,!0,!0,!0,!1),e.t(LB)&&Af(t.n,!1,!0,!0,!0),e.t(UB)&&Af(t.n,!0,!0,!1,!0),e.t(WB)&&Af(t.n,!0,!1,!0,!0),e.t(BB)&&Af(t.n,!1,!0,!0,!1),e.t(MB)&&Af(t.n,!1,!0,!1,!0),e.t(XB)&&Af(t.n,!0,!1,!1,!0),e.t(VB)&&Af(t.n,!0,!1,!0,!1),e.t(YB)&&Af(t.n,!0,!0,!0,!0),e.t(DB)&&Af(t.n,!0,!0,!0,!0),e.t(YB)&&Af(t.n,!0,!0,!0,!0),e.t(PB)&&Af(t.n,!0,!0,!0,!0),e.t(zB)&&Af(t.n,!0,!0,!0,!0),e.t(HB)&&Af(t.n,!0,!0,!0,!0),e.t(FB)&&Af(t.n,!0,!0,!0,!0)}function VO(t,e){var n,r,i,o,a,s,c,u,l;for(s=!0,i=0,c=t.f[e.k],u=e.j.b+t.n,n=t.c[e.k][2],Kb(t.a,c,WE(zf(gd(t.a,c),24).a-1+n)),Kb(t.b,c,io(Ih(gd(t.b,c)))-u+n*t.e),++c>=t.i?(++t.i,Of(t.a,WE(1)),Of(t.b,u)):(r=t.c[e.k][1],Kb(t.a,c,WE(zf(gd(t.a,c),24).a+1-r)),Kb(t.b,c,io(Ih(gd(t.b,c)))+u-r*t.e)),(t.q==(eA(),JH)&&(zf(gd(t.a,c),24).a>t.j||zf(gd(t.a,c-1),24).a>t.j)||t.q==nY&&(io(Ih(gd(t.b,c)))>t.k||io(Ih(gd(t.b,c-1)))>t.k))&&(s=!1),o=Sg(UE(e));JE(o);)a=zf(Cv(o),12).c.f,t.f[a.k]==c&&(i+=zf((l=VO(t,a)).a,24).a,s=s&&ro(io(Ah(l.b))));return t.f[e.k]=c,new ts(WE(i+=t.c[e.k][0]),(Vd(),s?TW:CW))}function UO(t,e,n){var r,i,o,a,s,c,u,l,h,f,d,g,p,v,b;if(f=new qc(t.j),b=e.a/f.a,s=e.b/f.b,p=e.a-f.a,o=e.b-f.b,n)for(i=Zc(_x(t,(QS(),Fj)))===Zc((vN(),yB)),g=new $n(t.f);g.a=1&&(v-a>0&&h>=0?(c.i.a+=p,c.i.b+=o*a):v-a<0&&l>=0&&(c.i.a+=p*v,c.i.b+=o));t.j.a=e.a,t.j.b=e.b,Ky(t,(QS(),Zj),(O_(),new Zf(r=zf(ra(uG),11),zf(Ag(r,r.length),11),0)))}function XO(t){var e,n,r,i,o,a,s,c,u,l;for(r=new Re,a=new $n(t.e.a);a.a-1){for(r=Ak(a,0);r.b!=r.d.c;)(n=zf(Ab(r),77)).n=o;for(;0!=a.b;)for(e=new $n((n=zf(nN(a,0),77)).d);e.a0),o.a.sb(o.c=--o.b),tf(o,n),Ng(c,n),IT(n,s.g),Jv(c),Jv(c),r.a.eb(n)}}function QO(t){var e,n,r,i,o,a,s,c;for(e=null,r=new $n(t);r.a0&&0==n.c&&(!e&&(e=new Re),e.c[e.c.length]=n);if(e)for(;0!=e.c.length;){if((n=zf(by(e,0),102)).b&&n.b.c.length>0)for(!n.b&&(n.b=new Re),o=new $n(n.b);o.a$y(t,n,0))return new ts(i,n)}else if(io(cl(i.g,i.d[0]).a)>io(cl(n.g,n.d[0]).a))return new ts(i,n);for(s=(!n.e&&(n.e=new Re),n.e).mb();s.G();)!(a=zf(s.H(),102)).b&&(a.b=new Re),my(0,(c=a.b).c.length),Tc(c.c,0,n),a.c==c.c.length&&(e.c[e.c.length]=a)}return null}function JO(t,e){var n,r,i,o,a,s,c,u,l;if(1!=Jg(XE(e))||zf(zv(XE(e)),12).d.f.g!=(DN(),RF))return null;for(fr(n=(o=zf(zv(XE(e)),12)).d.f,(DN(),MF)),Ky(n,(qS(),tX),null),Ky(n,eX,null),Ky(n,(QS(),Fj),zf(_x(e,Fj),28)),Ky(n,Oj,zf(_x(e,Oj),86)),i=_x(o.c,iX),a=null,u=yC(n,(yS(),OB)).mb();u.G();)if(0!=(s=zf(u.H(),7)).e.c.length){Ky(s,iX,i),l=o.c,s.j.a=l.j.a,s.j.b=l.j.b,s.a.a=l.a.a,s.a.b=l.a.b,ix(s.c,l.c),l.c.c=ky(kD,jL,1,0,4,1),a=s;break}if(Ky(o.c,iX,null),!ob(yC(e,OB)))for(c=new $n(Wb(yC(e,OB)));c.a0?i+t.i[1]*e+t.n[1]:0,t.o[3]>0?i+t.i[3]*e+t.n[3]:0),Go(t.o[4]>0?n+t.i[4]*e+t.n[4]:0,t.o[2]>0?n+t.i[2]*e+t.n[2]:0))}(t,t.k);break;case 4:r=new qc(a);break;case 5:r=function(t,e){var n,r,i,o,a;for(a=new co,o=new $n(hN(t));o.a0&&(o.a=Go(o.a,i+t.q.b+t.q.c)),n>0&&(o.b=Go(o.b,n+t.q.d+t.q.a))):(i>0&&(o.a=Go(o.a,i)),n>0&&(o.b=Go(o.b,n)))),function(t,e){t.e.j.a=e.a,t.e.j.b=e.b}(t.e,o)}}function eS(t,e,n){var r,i,o,a,s,c,u,l,h,f,d;if(!t.b)return!1;for(a=null,f=null,i=1,(c=new Vy(null,null)).a[1]=t.b,h=c;h.a[i];)u=i,s=f,f=h,h=h.a[i],i=(r=t.a.$b(e,h.d))<0?0:1,0==r&&(!n.c||Tp(h.e,n.d))&&(a=h),h&&h.b||Uo(h.a[i])||(Uo(h.a[1-i])?f=f.a[u]=wm(h,i):Uo(h.a[1-i])||(d=f.a[1-u])&&(Uo(d.a[1-u])||Uo(d.a[u])?(o=s.a[1]==f?1:0,Uo(d.a[u])?s.a[o]=tb(f,u):Uo(d.a[1-u])&&(s.a[o]=wm(f,u)),h.b=s.a[o].b=!0,s.a[o].a[0].b=!1,s.a[o].a[1].b=!1):(f.b=!1,d.b=!0,h.b=!0)));return a&&(n.b=!0,n.d=a.e,h!=a&&(function(t,e,n,r){var i,o;for(i=null==(o=e).d||t.a.$b(n.d,o.d)>0?1:0;o.a[i]!=n;)o=o.a[i],i=t.a.$b(n.d,o.d)>0?1:0;o.a[i]=r,r.b=n.b,r.a[0]=n.a[0],r.a[1]=n.a[1],n.a[0]=null,n.a[1]=null}(t,c,a,l=new Vy(h.d,h.e)),f==a&&(f=l)),f.a[f.a[1]==h?1:0]=h.a[h.a[0]?0:1],--t.c),t.b=c.a[1],t.b&&(t.b.b=!1),n.b}function nS(t){var e,n,r,i,o,a,s,c,u,l,h,f,d,g;for(f=new $n(t);f.a(b=r?zf(_x(l,az),24).a:_L)?c:b,w=new $n(l.f);w.a=u&&x>=v&&(f+=g.i.b+p.i.b+p.a.b-m,++s));if(n)for(a=new $n(y.b);a.a=u&&x>=v&&(f+=g.i.b+p.i.b+p.a.b-m,++s))}s>0&&(E+=f/s,++d)}d>0?(e.a=i*E/d,e.i=d):(e.a=0,e.i=0)}function aS(t,e){var n;if(t.e)throw new _o((Bh(pF),"The "+pF.j+pP));if(!function(t,e){return Xl(t.c,e)}(t.a,e))throw new Ti("The direction "+e+" is not supported by the CGraph instance.");if(e==t.d)return t;switch(n=t.d,t.d=e,n.e){case 0:switch(e.e){case 2:bx(t);break;case 1:ek(t),bx(t);break;case 4:FN(t),bx(t);break;case 3:FN(t),ek(t),bx(t)}break;case 2:switch(e.e){case 1:ek(t),cI(t);break;case 4:FN(t),bx(t);break;case 3:FN(t),ek(t),bx(t)}break;case 1:switch(e.e){case 2:ek(t),cI(t);break;case 4:ek(t),FN(t),bx(t);break;case 3:ek(t),FN(t),ek(t),bx(t)}break;case 4:switch(e.e){case 2:FN(t),bx(t);break;case 1:FN(t),ek(t),bx(t);break;case 3:ek(t),cI(t)}break;case 3:switch(e.e){case 2:ek(t),FN(t),bx(t);break;case 1:ek(t),FN(t),ek(t),bx(t);break;case 4:ek(t),cI(t)}}return t}function sS(t,e,n){var r,i,o,a,s,c,u,l;if(!t.a[e.d.k][e.k].e){for(t.a[e.d.k][e.k].e=!0,t.a[e.d.k][e.k].b=0,t.a[e.d.k][e.k].d=0,t.a[e.d.k][e.k].a=null,l=new $n(e.f);l.a0&&(t.a[e.d.k][e.k].d+=OT(t.e,24)*KP*.07000000029802322-.03500000014901161,t.a[e.d.k][e.k].a=t.a[e.d.k][e.k].d/t.a[e.d.k][e.k].b)}}function cS(t,e){var n,r,i,o,a,s,c,u,l,h;for(r=new $n(t.a.c);r.afP||e.k==mz&&uv?u:v}for(n.e.b+=u-s.b,h=new $n(t.a);h.a1;)e=Yo(i,t.c),fr(l=new kk(t.e.c),(DN(),MF)),Ky(l,(QS(),Fj),zf(_x(c,Fj),28)),Ky(l,Oj,zf(_x(c,Oj),86)),l.k=t.e.b++,Of(t.b,l),l.j.b=c.j.b,l.j.a=e,Gh(h=new kN,(yS(),OB)),sv(h,c),h.i.a=l.j.a,h.i.b=l.j.b/2,Gh(f=new kN,KB),sv(f,l),f.i.b=l.j.b/2,f.i.a=-f.j.a,lv(d=new Rp,h),uv(d,f),c=l,Of(t.e.c.b,c),--u,i-=t.c+t.e.d;for(new bN(t.d,t.b,t.c),a=new $n(r);a.ae.a||e.p>t.a)){for(n=0,r=0,s=new Un(new Vn(t.o.a).a.bb().mb());s.a.G();)i=zf(s.a.H(),21),o=zf(i.yb(),7),s_(Vm(Cx(Lo(gR,1),KM,10,0,[o.f.i,o.i,o.a])).b,e.p,e.a)&&++n;for(c=new Un(new Vn(t.g.a).a.bb().mb());c.a.G();)i=zf(c.a.H(),21),o=zf(i.yb(),7),s_(Vm(Cx(Lo(gR,1),KM,10,0,[o.f.i,o.i,o.a])).b,e.p,e.a)&&--n;for(u=new Un(new Vn(e.o.a).a.bb().mb());u.a.G();)i=zf(u.a.H(),21),o=zf(i.yb(),7),s_(Vm(Cx(Lo(gR,1),KM,10,0,[o.f.i,o.i,o.a])).b,t.p,t.a)&&++r;for(a=new Un(new Vn(e.g.a).a.bb().mb());a.a.G();)i=zf(a.a.H(),21),o=zf(i.yb(),7),s_(Vm(Cx(Lo(gR,1),KM,10,0,[o.f.i,o.i,o.a])).b,t.p,t.a)&&--r;n1)for(c=Ak(Hf(yC(e,KB)),0);c.b!=c.d.c;)0==(s=zf(Ab(c),7)).b.c.length?(Gh(i=new kN,KB),i.j.a=s.j.a,i.j.b=s.j.b,sv(i,r),Ky(i,iX,_x(s,iX)),sv(s,null)):sv(a,r);return Ky(e,iX,null),Ky(e,SU,CW),fr(e,MF),Ky(r,(QS(),Fj),zf(_x(e,Fj),28)),Ky(r,Oj,zf(_x(e,Oj),86)),Sd(t.b,0,r),r}function vS(t,e,n,r,i,o,a){var s,c,u,l,h,f;switch(h=n,fr(u=new kk(a),(DN(),PF)),Ky(u,(qS(),XU),i),Ky(u,(QS(),Fj),(vN(),yB)),Ky(u,rX,zf(_x(t,Lj),15)),!(c=zf(_x(t,Gj),10))&&(c=new Ja(i.a/2,i.b/2)),Ky(u,Gj,c),sv(l=new kN,u),e!=xB&&e!=EB||(s=o!=(EE(),IR)?o:AR,h=r>0?l_(s):pE(l_(s)),Ky(t,zj,h)),h.e){case 4:Ky(u,(ZS(),JX),(Uk(),AX)),Ky(u,HU,(Px(),DV)),u.j.b=i.b,Gh(l,(yS(),OB)),l.i.b=c.b;break;case 2:Ky(u,(ZS(),JX),(Uk(),OX)),Ky(u,HU,(Px(),MV)),u.j.b=i.b,Gh(l,(yS(),KB)),l.i.b=c.b;break;case 1:Ky(u,KU,(Rw(),xU)),u.j.a=i.a,Gh(l,(yS(),qB)),l.i.a=c.a;break;case 3:Ky(u,KU,(Rw(),wU)),u.j.a=i.a,Gh(l,(yS(),SB)),l.i.a=c.a}if(e==bB||e==wB||e==yB){switch(f=0,h.e){case 4:case 2:case 1:case 3:f=null.cd,e==wB&&(f/=null.cd)}Ky(u,fX,f)}return Ky(u,UU,h),u}function bS(t){var e,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w;for(u=new Gr,xl(),wp(b=new kr,t,zN(t)),Nw(2,fM),r=new sw(2),t.c&&Of(r,t.c),t.d&&Of(r,t.d),d=new $n(r);d.a1&&Lb(u,g,u.c.b,u.c),Lw(n)));g=p}return u}function yS(){var t;yS=a,ZB=new bs(jM,0),SB=new bs("NORTH",1),OB=new bs("EAST",2),qB=new bs("SOUTH",3),KB=new bs("WEST",4),Yp(),RB=new Ko(new Zf(t=zf(ra(rG),11),zf(Ag(t,t.length),11),0)),jB=jE(Jd(SB,Cx(Lo(rG,1),GL,32,0,[]))),LB=jE(Jd(OB,Cx(Lo(rG,1),GL,32,0,[]))),UB=jE(Jd(qB,Cx(Lo(rG,1),GL,32,0,[]))),WB=jE(Jd(KB,Cx(Lo(rG,1),GL,32,0,[]))),YB=jE(Jd(SB,Cx(Lo(rG,1),GL,32,0,[qB]))),DB=jE(Jd(OB,Cx(Lo(rG,1),GL,32,0,[KB]))),VB=jE(Jd(SB,Cx(Lo(rG,1),GL,32,0,[KB]))),BB=jE(Jd(SB,Cx(Lo(rG,1),GL,32,0,[OB]))),XB=jE(Jd(qB,Cx(Lo(rG,1),GL,32,0,[KB]))),MB=jE(Jd(OB,Cx(Lo(rG,1),GL,32,0,[qB]))),HB=jE(Jd(SB,Cx(Lo(rG,1),GL,32,0,[OB,KB]))),PB=jE(Jd(OB,Cx(Lo(rG,1),GL,32,0,[qB,KB]))),zB=jE(Jd(SB,Cx(Lo(rG,1),GL,32,0,[qB,KB]))),GB=jE(Jd(SB,Cx(Lo(rG,1),GL,32,0,[OB,qB]))),FB=jE(Jd(SB,Cx(Lo(rG,1),GL,32,0,[OB,qB,KB])))}function wS(t,e,n){var r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m;if(Ky(l=new Bw,UG,e),wp(t.e,e,l),Ky(l,(qS(),uX),n),t.d&&hC(t.d,l,!1),EN(e,l),nP in e.a&&(v=l.a,b=zf(Ap(e,nP),69),(p=zf(Ap(b,"left"),104))&&(v.b=p.a),(w=zf(Ap(b,"top"),104))&&(v.d=w.a),(y=zf(Ap(b,"right"),104))&&(v.c=y.a),(i=zf(Ap(b,UM),104))&&(v.a=i.a)),h=new Zf(r=zf(ra(bU),11),zf(Ag(r,r.length),11),0),Ky(l,WU,h),null==t.g&&(t.g=Ah(_x(l,(Up(),nF)))),rP in e.a){if(!(m=Ap(e,rP)).hc())throw new mg("The 'children' property of nodes must be an array.",m,e);if((u=m.hc()).a.length>0){for(n&&Ky(n,nX,l),s=ky(GF,iP,9,u.a.length,0,1),d=0;d1)for(Of(o,new LO(d,y,n)),h=new Un(new Vn(y.a).a.bb().mb());h.a.G();)u=zf(h.a.H(),21),jy(i,zf(u.yb(),27).b);if(a.a.Y()>1)for(Of(o,new LO(d,a,n)),h=new Un(new Vn(a.a).a.bb().mb());h.a.G();)u=zf(h.a.H(),21),jy(i,zf(u.yb(),27).b)}}function _S(t,e){var n,r,i,o,a,s,c,u,l;switch(mb(o=Wb(Uf(e,new Qf(t))),new te),(i=t.b).c){case 2:Cg(e,new VC(r=function(t,e,n,r){var i,o,a,s,c;for(c=0,o=new $n(t.a.b);o.a.5&&i<50;)e=Ca(XN(n,r=lA(n),!0).a),++i;return XN(t,(Gd(o=Ih(ak(Hf(t.g),Hf(t.g).b-1))),o-r),!1)}(h);break;case 2:case 4:h.a=w,y=function(t){var e,n,r,i,o;for(n=xI(pO(t)),e=RP,i=0,r=0;e>.5&&i<50;)e=Ca(XN(n,r=hA(n),!0).b),++i;return XN(t,(Gd(o=Ih(ak(Hf(t.g),Hf(t.g).b-1))),o-r),!1)}(h);break;default:return null}return dr(h,new LC(Cx(Lo(gR,1),KM,10,0,[c,w,y,g,v]))),h}(t.a.c,e,t.a.d,r,Lk(t.b),n),gm(t.a.a,D_(s)),a=aC(t.a.b,s.a,t.b),Jp(i=new Pb((!s.k&&(s.k=new bC(pm(s))),s.k))),a?qg(i,a):i}(t,a=cm(n=Du(Uf(o,new kn(i.a))))?zf(Ny(n),91).b:15,cm(n=Du(Uf(o,new kn(Lk(i)))))?zf(Ny(n),91).b:15,cm(n=Du(Uf(o,new kn(i.b))))?zf(Ny(n),91).b:15),t.c,t.e,t.a.c.f,i.a)),Cg(e,new VC(r,t.c,t.e,t.a.c.f,Lk(i))),Cg(e,new VC(r,t.c,t.e,t.a.c.f,i.b));break;case 1:Cg(e,new VC(r=function(t,e,n){var r,i,o,a,s,c;for(c=t.b,o=0,i=new $n(t.a.b);i.a0)if(r=l.Y(),c=wv(Math.floor((r+1)/2))-1,i=wv(Math.ceil((r+1)/2))-1,e.k==xz)for(u=i;u>=c;u--)e.a[w.k]==w&&(g=zf(l.sb(u),27),d=zf(g.a,9),!_a(n,g.b)&&f>t.b.e[d.k]&&(e.a[d.k]=w,e.f[w.k]=e.f[d.k],e.a[w.k]=e.f[w.k],f=t.b.e[d.k]));else for(u=c;u<=i;u++)e.a[w.k]==w&&(v=zf(l.sb(u),27),p=zf(v.a,9),!_a(n,v.b)&&f0||n.k==xz&&iv?d:v):n.n[e.k]=r>(d>v?d:v)?r:d>v?d:v)):(p=t.d.f,g=bm(t,n.i[e.k]),f=bm(t,n.i[h.k]),n.k==xz?Uv(g,f,io(n.n[e.k])+io(n.d[a.k])+a.j.b+a.e.a+p-(io(n.n[h.k])+io(n.d[u.k])-u.e.d)):Uv(g,f,io(n.n[e.k])+io(n.d[a.k])-a.e.d-io(n.n[h.k])-io(n.d[u.k])-u.j.b-u.e.a-p))):v=t.e.Ic(v,e,a),a=n.a[a.k]}while(a!=e);!function(t,e){Cg(t.b,e)}(t.e,e)}}function OS(t,e,n,r){var i,o,a,s,c,u,l,h,f,d,g,p,v,b;if(f=!1,h=!1,Vs(zf(_x(r,(QS(),Fj)),28))){a=!1,s=!1;t:for(g=new $n(r.f);g.a=r.j.b/2}b?(v=zf(_x(r,(qS(),CX)),20))?f?o=v:(i=zf(_x(r,PU),20))?o=v.Y()<=i.Y()?v:i:(o=new Re,Ky(r,PU,o)):(o=new Re,Ky(r,CX,o)):(i=zf(_x(r,(qS(),PU)),20))?h?o=i:(v=zf(_x(r,CX),20))?o=i.Y()<=v.Y()?i:v:(o=new Re,Ky(r,CX,o)):(o=new Re,Ky(r,PU,o)),o.ib(t),Ky(t,(qS(),DU),n),e.d==n?(uv(e,null),n.b.c.length+n.e.c.length==0&&sv(n,null)):(lv(e,null),n.b.c.length+n.e.c.length==0&&sv(n,null)),Lp(e.a)}function SS(t,e){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y;for((n=new _k(e)).a||function(t){var e,n,r,i,o;switch(i=zf(gd(t.b,0),9),e=new kk(t),Of(t.b,e),e.j.a=Go(1,i.j.a),e.j.b=Go(1,i.j.b),e.i.a=i.i.a,e.i.b=i.i.b,zf(_x(i,(qS(),UU)),32).e){case 4:e.i.a+=2;break;case 1:e.i.b+=2;break;case 2:e.i.a-=2;break;case 3:e.i.b-=2}sv(r=new kN,e),lv(n=new Rp,o=zf(gd(i.f,0),7)),uv(n,r),Sh(Oc(r.i),o.i),Sh(Oc(r.a),o.a)}(e),u=function(t){var e,n,r,i,o,a,s;for(s=new Nb,a=new $n(t.b);a.a=s.b.c)&&(s.b=e),(!s.c||e.c<=s.c.c)&&(s.d=s.c,s.c=e),(!s.e||e.d>=s.e.d)&&(s.e=e),(!s.f||e.d<=s.f.d)&&(s.f=e);return r=new lk((Rm(),bF)),Ob(t,NF,new Qn(Cx(Lo(vF,1),jL,160,0,[r]))),a=new lk(mF),Ob(t,kF,new Qn(Cx(Lo(vF,1),jL,160,0,[a]))),i=new lk(yF),Ob(t,_F,new Qn(Cx(Lo(vF,1),jL,160,0,[i]))),o=new lk(wF),Ob(t,EF,new Qn(Cx(Lo(vF,1),jL,160,0,[o]))),sA(r.c,bF),sA(i.c,yF),sA(o.c,wF),sA(a.c,mF),s.a.c=ky(kD,jL,1,0,4,1),ix(s.a,r.c),ix(s.a,Am(i.c)),ix(s.a,o.c),ix(s.a,Am(a.c)),s}(u)),n}function LS(t,e){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,_,k,N,C;return h=function(t,e){var n,r,i,o,a,s,c,u,l,h,f;if(t.V())return new co;for(c=0,l=0,r=t.mb();r.G();)c=Go(c,(i=zf(r.H(),55).e).a),l+=i.a*i.b;for(c=Go(c,Math.sqrt(l)*zf(_x(zf(t.mb().H(),55),(qS(),TU)),15).a),h=0,f=0,s=0,n=e,a=t.mb();a.G();)h+(u=(o=zf(a.H(),55)).e).a>c&&(h=0,f+=s+e,s=0),rI(o,h,f),n=Go(n,h+u.a),s=Go(s,u.b),h+=u.a+e;return new Ja(n+e,f+s+e)}(hl(t,(yS(),RB)),e),g=Ik(hl(t,jB),e),m=Ik(hl(t,UB),e),k=Ok(hl(t,WB),e),f=Ok(hl(t,LB),e),y=Ik(hl(t,VB),e),p=Ik(hl(t,BB),e),E=Ik(hl(t,XB),e),x=Ik(hl(t,MB),e),N=Ok(hl(t,DB),e),b=Ik(hl(t,YB),e),w=Ik(hl(t,HB),e),_=Ik(hl(t,PB),e),C=Ok(hl(t,zB),e),d=Ok(hl(t,GB),e),v=Ik(hl(t,FB),e),n=mw(Cx(Lo(aq,1),CL,26,12,[y.a,k.a,E.a,C.a])),r=mw(Cx(Lo(aq,1),CL,26,12,[g.a,h.a,m.a,v.a])),i=b.a,o=mw(Cx(Lo(aq,1),CL,26,12,[p.a,f.a,x.a,d.a])),u=mw(Cx(Lo(aq,1),CL,26,12,[y.b,g.b,p.b,w.b])),c=mw(Cx(Lo(aq,1),CL,26,12,[k.b,h.b,f.b,v.b])),l=N.b,s=mw(Cx(Lo(aq,1),CL,26,12,[E.b,m.b,x.b,_.b])),py(hl(t,RB),n+i,u+l),py(hl(t,FB),n+i,u+l),py(hl(t,jB),n+i,0),py(hl(t,UB),n+i,u+l+c),py(hl(t,WB),0,u+l),py(hl(t,LB),n+i+r,u+l),py(hl(t,BB),n+i+r,0),py(hl(t,XB),0,u+l+c),py(hl(t,MB),n+i+r,u+l+c),py(hl(t,DB),0,u),py(hl(t,YB),n,0),py(hl(t,PB),0,u+l+c),py(hl(t,GB),n+i+r,0),(a=new co).a=mw(Cx(Lo(aq,1),CL,26,12,[n+r+i+o,N.a,w.a,_.a])),a.b=mw(Cx(Lo(aq,1),CL,26,12,[u+c+l+s,b.b,C.b,d.b])),a}function MS(t,e){var n,r,i,o,a,s,c,u,l,h,f,d,g,p;if(r=new Gr,u=null,(d=(g=t.c).f.g)!=(DN(),jF)&&d!=BF)throw new ao("The target node of the edge must be a normal node or a northSouthPort.");for(d==BF&&(f=zf(_x(g,(qS(),iX)),7),u=new Ja(Vm(Cx(Lo(gR,1),KM,10,0,[f.f.i,f.i,f.a])).a,Vm(Cx(Lo(gR,1),KM,10,0,[g.f.i,g.i,g.a])).b),g=f),ss(r,Vm(Cx(Lo(gR,1),KM,10,0,[g.f.i,g.i,g.a]))),a=Go(5,T_(g.f,g.g)),(h=new wg(tN(g.g))).a*=a,h.b*=a,If(r,Sh(h,Vm(Cx(Lo(gR,1),KM,10,0,[g.f.i,g.i,g.a])))),u&&Lb(r,u,r.c.b,r.c),o=t,c=t,s=null,n=!1;o;)0!=(i=o.a).b&&(n?(If(r,ol(Sh(s,(Ou(0!=i.b),zf(i.a.a.c,10))),.5)),n=!1):n=!0,s=wu((Ou(0!=i.b),zf(i.c.b.c,10))),gm(r,i),Lp(i)),c=o,o=zf(Kc(pv(e.d,o)),12);(p=c.d).f.g==BF&&(f=zf(_x(p,(qS(),iX)),7),If(r,new Ja(Vm(Cx(Lo(gR,1),KM,10,0,[f.f.i,f.i,f.a])).a,Vm(Cx(Lo(gR,1),KM,10,0,[p.f.i,p.i,p.a])).b)),p=f),a=Go(5,T_(p.f,p.g)),ol(h=new wg(tN(p.g)),a),If(r,Sh(h,Vm(Cx(Lo(gR,1),KM,10,0,[p.f.i,p.i,p.a])))),ss(r,Vm(Cx(Lo(gR,1),KM,10,0,[p.f.i,p.i,p.a]))),l=new QI(r),gm(t.a,D_(l))}function PS(t){var e,n,r,i,o,a,s,c,u,l,h,f,d,p;if(Zc(_x(t.c,(QS(),Fj)))===Zc((vN(),wB))||Zc(_x(t.c,Fj))===Zc(yB))for(l=new $n(t.c.f);l.a1&&(a=Yo(a,Ca(zf(ak(s.a,1),10).b-l.b)))));else for(g=new $n(e.f);g.ai&&(o=f.a-i,a=bL,r.c=ky(kD,jL,1,0,4,1),i=f.a),f.a>=i&&(r.c[r.c.length]=s,s.a.b>1&&(a=Yo(a,Ca(zf(ak(s.a,s.a.b-2),10).b-f.b)))));if(0!=r.c.length&&o>e.j.a/2&&a>e.j.b/2){for(sv(d=new kN,e),Gh(d,(yS(),SB)),d.i.a=e.j.a/2,sv(p=new kN,e),Gh(p,qB),p.i.a=e.j.a/2,p.i.b=e.j.b,c=new $n(r);c.a=u.b?lv(s,p):lv(s,d)):(u=zf(mf(s.a),10),(0==s.a.b?jv(s.c):zf(Gl(s.a),10)).b>=u.b?uv(s,p):uv(s,d)),(h=zf(_x(s,(QS(),_j)),44))&&w_(h,u,!0);e.i.a=i-e.j.a/2}}function RS(t,e){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w;for(b=new Re,y=new Re,w=new Re,o=new $n(e);o.a50?b.c[b.c.length]=i:i.k>0?y.c[y.c.length]=i:w.c[w.c.length]=i;if(1==y.c.length&&0==b.c.length&&(ix(b,y),y.c=ky(kD,jL,1,0,4,1)),0!=b.c.length&&Xl(au(t.a),(NS(),qz))&&Xl(au(t.a),(NS(),Kz))?function(t,e){var n,r,i;for(r=new $n(e);r.a1&&(fC(i,p=zf(Cw(c),60),!0),hg(l),iv(t.a,p))}for(f=w.c.length,r=function(t){var e,n,r,i;switch(su(t.a).c){case 4:return NS(),Kz;case 3:return zf(function(t){var e;return NS(),NS(),e=zz,t.d&&GC(t),function(){throw new Kr}(),e}(t.a).mb().H(),60);case 2:return e=zf($b(n=new Us(r=su(t.a))),60),i=zf($b(n),60),gA(e)==i?Xl(r,(NS(),Kz))?Vz:Kz:dA(dA(e))==i?dA(e):pA(e);case 1:return gA(zf($b(new Us(r=su(t.a))),60));case 0:return NS(),$z;default:return null}}(t),d=new Re,a=f/ou(t.a).c|0,s=0;s3&&(ix(d,(NS(),NS(),Yz)),g-=4),g){case 3:Of(d,gA(r));case 2:v=dA(gA(r));do{v=dA(v)}while(!Xl(au(t.a),v));d.c[d.c.length]=v,v=pA(gA(r));do{v=pA(v)}while(!Xl(au(t.a),v));d.c[d.c.length]=v;break;case 1:Of(d,gA(r))}for(h=new $n(d),u=new $n(w);h.abM)&&s<10);go(t.c,new S),RO(t),function(t){aS(t,(EE(),TR)),t.e=!0}(t.c),function(t){var e,n,r,i,o,a,s;for(i=new $n(t.a.b);i.a0,v=w.e.c.length>0,u&&v?f.c[f.c.length]=w:u?g.c[g.c.length]=w:v&&(y.c[y.c.length]=w);for(d=new $n(g);d.a=p&&(w>p&&(g.c=ky(kD,jL,1,0,4,1),p=w),g.c[g.c.length]=a);0!=g.c.length&&(d=zf(gd(g,qk(e,g.c.length)),77),A.a.eb(d),d.i=v++,oA(d,C,_),g.c=ky(kD,jL,1,0,4,1))}for(x=t.c.length+1,s=new $n(t);s.aT.i&&(cp(n),jy(T.d,r),r.c>0&&(r.a=T,Of(T.j,r),r.b=k,Of(k.d,r)))}function HS(t){switch(t.e){case 14:return new K;case 37:return new Q;case 8:return new Ki;case 30:return new $i;case 38:return new tt;case 3:return new et;case 47:case 1:return new bn((Mx(),KF));case 4:return new nt;case 49:return new rt;case 23:return new ne;case 13:return new it;case 34:return new at;case 40:return new st;case 35:return new lt;case 44:return new zu;case 28:return new ht;case 39:return new ft;case 27:return new dt;case 6:return new gt;case 31:return new yt;case 9:return new Ne;case 43:return new mt;case 17:return new xt;case 18:return new kt;case 29:return new Ce;case 11:return new Lt;case 12:return new Ct;case 36:return new Tt;case 46:case 0:return new bn((Mx(),ZF));case 41:return new It;case 15:return new Ot;case 33:return new St;case 42:return new Pt;case 22:return new Dt;case 19:return new bt;case 10:return new At;case 7:return new jt;case 24:return new Bt;case 21:return new Gt;case 16:return new Ht;case 45:return new Yt;case 26:return new zt;case 20:return new Vt;case 25:return new Ut;case 5:return new Qt;case 32:return new Jt;case 48:case 2:return new bn((Mx(),qF));default:throw new ao("No implementation is available for the layout processor "+(null!=t.d?t.d:""+t.e))}}function YS(t,e,n){var r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,_,k,N,C,T,A,I;for(T=0,o=0,l=e[0].d,_=n[0].d,d=0,p=n.length;d0;){for(Ou(E.b>0),x=0,i=new $n((w=zf(E.a.sb(E.c=--E.b),7)).b);i.a0&&(w.g==(yS(),SB)?(t.a[w.k]=T,++T):(t.a[w.k]=T+b+y,++y),o+=x)}T+=y}else{for(v=0,m=new $n(h.f);m.a0&&(++T,o+=v)}for(k=ky(rq,pM,26,o,12,1),s=0,f=0,g=e.length;f0;)c%2>0&&(r+=A[c+1]),++A[c=(c-1)/2|0];return r}function zS(t,e){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,_,k,N,C,T,A,I,O;for(F_(e,"Compound graph postprocessor",1),n=ro(io(Ah(_x(t,(ZS(),BX))))),s=zf(_x(t,(qS(),GU)),144),h=new Qi,E=s.W().mb();E.G();){for(x=zf(E.H(),12),mb(a=new ff(s.U(x)),new cn(t)),C=sm((xy(0,a.c.length),zf(a.c[0],114))),A=am(zf(gd(a,a.c.length-1),114)),Lp(x.a),k=C.f,_=DE(A.f,k)?zf(_x(k,nX),55):Kg(k),g=zf(_x(x,(QS(),_j)),44),Td(a,IF)?g?Lp(g):(g=new Gr,Ky(x,_j,g)):g&&Ky(x,_j,null),v=null,o=new $n(a);o.aEP,O=Ca(v.b-w.b)>EP,(!n&&I&&O||n&&(I||O))&&If(x.a,N)),gm(x.a,r),0==r.b?v=N:(Ou(0!=r.b),v=zf(r.c.b.c,10)),(y=zf(_x(b,_j),44))&&(Hx(d=new Gr,0,y),Mm(d,m),gm(g,d)),am(i)==A&&(Kg(A.f)!=i.a&&ST(m=new co,Kg(A.f),_),Ky(x,NX,m)),p=new Kv(b.b,0);p.b1){x=ky(MW,lL,15,t.a.length,0,1),u=Il(t.a.length),g=0,d=0,n=2*e.d.a.c.length+1;t:for(m=new $n(e.f);m.a0?(x[w.k]=new Hn(C/(w.b.c.length+w.e.c.length)),g=zo(g,x[w.k].a),d=Fo(d,x[w.k].a)):v&&(x[w.k]=new Hn(C))}for(p=(e.d?$y(e.d.a,e,0):-1)+1,f=e.d.a.c.length+1,c=new $n(u);c.an&&p.a.db(w,p);for(A=new Qi,v=new Qi,x=new Un(new Vn(T.a).a.bb().mb());x.a.G();)for(h=zf(x.a.H(),21),w=zf(h.yb(),9),a=1==e?XE(w):UE(w),Xu(),u=new Mu(Ru(Xf(a.a,new g)));JE(u);)c=zf(Cv(u),12),Sc(w.d)!=Sc(c.d.f.d)&&Cg(A,c.d.f);for(E=new Un(new Vn(p.a).a.bb().mb());E.a.G();)for(h=zf(E.a.H(),21),w=zf(h.yb(),9),a=1==e?XE(w):UE(w),Xu(),u=new Mu(Ru(Xf(a.a,new g)));JE(u);)c=zf(Cv(u),12),Sc(w.d)!=Sc(c.d.f.d)&&Cg(v,c.d.f);for($F&&Mf(),N=zf(gd(t.d.c.c,r+(1==e?1:-1)),16),b=_L,y=bL,f=0;ff?b:f:v.a.R(w)&&(y=y1||Jg(pu(new ab(BE(Cx(Lo(kD,1),jL,1,4,[y.b,y.e])))))>1)&&i.ib((KA(),nU)),Zc(_x(g,(ZS(),YX)))===Zc((ub(),UY))&&!(QM in e.a)){n=new Gr;try{for(s=Ap(e,QM).hc(),o=0;o0&&(t.a[G.k]=q++)}else{for(M=0,F=new $n(C.f);F.a0&&++q}for(J=0,I=0,L=n.length;I0;){for(Ou(z.b>0),Y=0,s=new $n((G=zf(z.a.sb(z.c=--z.b),7)).b);s.a0&&(G.g==(yS(),SB)?(t.a[G.k]=J,++J):(t.a[G.k]=J+P+R,++R))}J+=R}else{for(M=0,F=new $n(C.f);F.a0&&++J}for(xl(),H=new kr,d=new Su,T=0,O=e.length;Tu.b&&(u.b=V)):G.f.d==W&&(Vu.c&&(u.c=V));for(Fk(g,0,g.length,(tc(),tc(),FW)),Q=ky(rq,pM,26,g.length,12,1),r=ky(rq,pM,26,J+1,12,1),v=0;v0;)E%2>0&&(i+=nt[E+1]),++nt[E=(E-1)/2|0];for(k=ky(nz,jL,156,2*g.length,0,1),w=0;w0&&(45==t.charCodeAt(0)||43==t.charCodeAt(0))?1:0;ebL)throw new Zo(EL+t+'"');return i}((ai(),""+n.jc().a))),void Ky(t,f,p)}catch(t){throw fl(t=nE(t),130)?new Yi("Invalid integer format for property '"+e+sP+n+")."):PE(t)}else{if(zf(WG.a,18).kb(e)){if(!n.ic())throw new Yi(aP+e+sP+n+").");return f=zf(zf(WG.b,57).cb(e),79),Vd(),void Ky(t,f,p=n.ic().a?TW:CW)}if(zf(KG.a,18).kb(e)){if(!n.jc())throw new Yi("Invalid float format for property '"+e+sP+n+").");return void Ky(t,f=zf(zf(KG.b,57).cb(e),79),p=new Fn(n.jc().a))}if(zf(ZG.a,18).kb(e)){if(!n.lc())throw new Yi(cP+e+sP+n+").");u=n.lc().a,l=null;try{sE((QS(),zj),e)?(yS(),l=zf(dE((hy(),QB),u),32)):sE(aj,e)?(hk(),l=zf(dE((Sy(),NR),u),103)):sE(dj,e)?(EE(),l=zf(dE((ly(),LR),u),59)):sE(pj,e)?(_E(),l=zf(dE((Yb(),VR),u),122)):sE(mj,e)?(kE(),l=zf(dE((yb(),rj),u),166)):sE(Pj,e)||sE(Dj,e)||sE(Rj,e)||sE(jj,e)||sE(Bj,e)?(I_(),l=zf(dE((fy(),vB),u),100)):sE(Fj,e)?(vN(),l=zf(dE((My(),kB),u),28)):sE(Yj,e)?(Dw(),l=zf(dE((bb(),IB),u),149)):sE(vj,e)?(PN(),l=zf(dE((Ly(),QR),u),133)):sE(gj,e)?(jm(),l=zf(dE((Hb(),BR),u),107)):sE((ZS(),zX),e)?(Vp(),l=zf(dE((Bv(),OY),u),193)):sE(rW,e)?(hw(),l=zf(dE((wb(),jY),u),173)):sE(XX,e)?(yN(),l=zf(dE((pw(),zV),u),115)):sE(GX,e)?(jw(),l=zf(dE((Ub(),Tz),u),194)):sE(YX,e)?(ub(),l=zf(dE((Fv(),qY),u),192)):sE(oW,e)?(eA(),l=zf(dE((dw(),sY),u),109)):sE(iW,e)?(Vk(),l=zf(dE((gw(),pz),u),141)):sE(uW,e)?(dC(),l=zf(dE((Py(),mY),u),125)):sE(lW,e)?(Cb(),l=zf(dE((Gv(),fY),u),175)):sE(KX,e)?(LN(),l=zf(dE((Jw(),$V),u),124)):sE($X,e)?(kO(),l=zf(dE((Gm(),yU),u),110)):sE(JX,e)?(Uk(),l=zf(dE((vw(),MX),u),85)):sE(dW,e)?(L_(),l=zf(dE((Iy(),mW),u),153)):sE(pW,e)?(Bm(),l=zf(dE((Oy(),NW),u),172)):sE(QX,e)&&(sb(),l=zf(dE((Xb(),CU),u),174))}catch(t){throw fl(t=nE(t),54)?new Yi(cP+e+sP+n+")."):PE(t)}return void Ky(t,f=zf(zf(ZG.b,57).cb(e),79),l)}if(zf(qG.a,18).kb(e)){if(!n.lc())throw new Yi(cP+e+sP+n+").");for(d=null,a=0,s=(c=BI(n.lc().a,"[\\[\\]\\s,]+")).length;a0&&xx(e.charCodeAt(n-1),NM);)--n;if(r>=n)throw new ao("The given string does not contain any numbers.");if(2!=(i=BI(e.substr(r,n-r),",|;|\r|\n")).length)throw new ao("Exactly two numbers are expected, "+i.length+" were found.");try{t.a=SN(gN(i[0])),t.b=SN(gN(i[1]))}catch(t){throw fl(t=nE(t),130)?new ao(CM+t):PE(t)}}(g=new co,n.lc().a),void Ky(t,f=zf(zf(JG.b,57).cb(e),79),g)}catch(t){throw fl(t=nE(t),29)?new Yi("Invalid KVector format for property '"+e+"' "+n+"."):PE(t)}else if(sE(uj,e)||sE(_j,e))try{return function(t,e){var n,r,i,o,a;r=BI(e,",|;|\\(|\\)|\\[|\\]|\\{|\\}| |\t|\n"),Lp(t);try{for(n=0,o=0,i=0,a=0;n0&&(o%2==0?i=SN(r[n]):a=SN(r[n]),o>0&&o%2!=0&&If(t,new Ja(i,a)),++o),++n}catch(t){throw fl(t=nE(t),130)?new ao("The given string does not match the expected format for vectors."+t):PE(t)}}(v=new Gr,n.lc().a),void Ky(t,f=zf(zf(JG.b,57).cb(e),79),v)}catch(t){throw fl(t=nE(t),29)?new Yi("Invalid KVectorChain format for property '"+e+"' "+n+"."):PE(t)}else if(sE(Tj,e)||sE(ij,e))try{return function(t,e){var n,r,i,o,a,s,c,u;for(o=0;o<(ai(),e.length)&&Ex(e.charCodeAt(o),kM);)++o;for(n=e.length;n>0&&Ex(e.charCodeAt(n-1),NM);)--n;if(o1?Lv(this,t-1):this,e},tL.Pc=function(){return Bh(this),this.b},tL.Qc=function(){return ea(this)},tL.Rc=function(){return na(this)},tL.Sc=function(){return!!(4&this.g)},tL.Tc=function(){return!!(1&this.g)},tL.w=function(){return(2&this.g?"interface ":1&this.g?"":"class ")+(Bh(this),this.n)},tL.g=0,ZT(119,72,{3:1,119:1,54:1,46:1},Vr),ZT(29,72,xL,Ur,ao),ZT(95,72,fL,Xr,oo),ZT(231,1,{3:1,231:1}),ZT(24,231,{3:1,23:1,24:1,231:1},Mn),tL.F=function(t){return function(t,e){return Bu(t.a,e.a)}(this,zf(t,24))},tL.t=function(t){return fl(t,24)&&zf(t,24).a==this.a},tL.v=function(){return this.a},tL.w=function(){return sa(this.a)},tL.a=0,sL={3:1,345:1,23:1,2:1},ZT(350,1,kL,ae),tL.$b=function(t,e){return function(t,e){return kp((ai(),t.toLowerCase()),e.toLowerCase())}(Oh(t),Oh(e))},ZT(257,95,fL,function(t){oo.call(this,t)}),ZT(145,1,{23:1,145:1}),tL.F=function(t){return function(t,e){return function(t,e){return kp((ai(),t.toLowerCase()),e.toLowerCase())}(t.a,e.a)}(this,zf(t,145))},tL.t=function(t){var e;return t===this||!!fl(t,145)&&(e=zf(t,145),Ri(this.a,e.a))},tL.v=function(){return fk(this.a)},tL.w=function(){return this.a},ZT(358,29,xL,function(t){ao.call(this,(ai(),null==t?dL:t))}),ZT(256,29,{3:1,54:1,29:1,46:1,256:1},function(t){ao.call(this,(ai(),null==t?dL:t))}),ZT(185,145,NL),ZT(289,185,NL,function(t){Pn.call(this,t)}),tL.Zc=function(t,e,n){var r,i;for(r=ky(oq,CL,26,n,12,1),i=0;in)throw new oo(TL)}for(a=ky(oq,CL,26,o,12,1),l=0,s=0,c=0;c0;){if(128!=(192&(r=t[e+c++])))throw new ao("Invalid UTF8 sequence at "+(e+c-1)+", byte="+(r>>>0).toString(16));i=i<<6|63&r}l+=Kk(i,a,l)}return a};var _D,kD=Bg(IL,"Object",1),ND=Bg(IL,"Throwable",46),CD=(Bg(IL,"Exception",54),Bg(IL,"RuntimeException",72),Bg(OL,"JavaScriptException",164),Bg(SL,"StackTraceCreator/Collector",642),Bg(SL,"StackTraceCreator/CollectorLegacy",356),Bg(SL,"StackTraceCreator/CollectorModern",643),Bg(SL,"StackTraceCreator/CollectorModernNoSourceMap",357),Bg(LL,"IOException",181),Bg(LL,"UnsupportedEncodingException",351),Bg(IL,"Class",288),Bg(IL,"ClassCastException",119),Bg(IL,"IllegalArgumentException",29),Bg(IL,"IndexOutOfBoundsException",95),Bg(IL,"Number",231),Bg(IL,"Integer",24)),TD=Bg(IL,"String",2);Bg(IL,"String/1",350),Bg(IL,"StringIndexOutOfBoundsException",257),Bg(ML,"Charset",145),Bg(ML,"IllegalCharsetNameException",358),Bg(ML,"UnsupportedCharsetException",256),Bg(PL,"EmulatedCharset",185),Bg(PL,"EmulatedCharset/LatinCharset",289),Bg(PL,"EmulatedCharset/UtfCharset",355),ZT(669,1,{3:1}),Bg(DL,"Optional",669),ZT(601,669,{3:1},c),tL.t=function(t){return t===this},tL.v=function(){return 2040732332},tL.w=function(){return"Optional.absent()"},tL.A=function(t){return Pd(t),si(),_D},Bg(DL,"Absent",601);var AD=Ed(DL,"Function");ZT(208,1,{},so),tL.C=function(t){return Pg(t)},Bg(DL,"Joiner",208),ZT(363,208,{},$f),tL.C=function(t){return kl(this,t)},Bg(DL,"Joiner/1",363),ZT(362,1,{},eh),Bg(DL,"Joiner/MapJoiner",362);var ID,OD=Ed(DL,"Predicate");ZT(244,1,{68:1,244:1,3:1},Be),tL.D=function(t){var e;for(e=0;e0},tL.H=function(){if(this.b>=this.c)throw new Ei;return ia(this,this.b++)},tL.L=function(){return this.b},tL.M=function(){if(this.b<=0)throw new Ei;return ia(this,--this.b)},tL.N=function(){return this.b-1},tL.b=0,tL.c=0,Bg(YL,"AbstractIndexedListIterator",378),ZT(428,108,HL),tL.G=function(){return cm(this)},tL.H=function(){return Ny(this)},tL.d=1,Bg(YL,"AbstractIterator",428),ZT(653,1,{144:1}),tL.P=function(){return this.f||(this.f=this.S())},tL.T=function(){return new Sa(this.P())},tL.t=function(t){return Yx(this,t)},tL.v=function(){return this.P().v()},tL.V=function(){return 0==this.Y()},tL.W=function(){return rg(this)},tL.w=function(){return this.P().w()},Bg(YL,"AbstractMultimap",653),ZT(294,653,VL),tL.Q=function(){Tk(this)},tL.R=function(t){return Uy(this.b,t)},tL.S=function(){return new Pa(this,this.b)},tL.T=function(){return new Ll(this,this.b)},tL.$=function(){return fl(t=this.Z(),137)?(Yp(),new $l(zf(t,137))):fl(t,18)?(Yp(),new Ko(zf(t,18))):fl(t,20)?gv(zf(t,20)):(Yp(),new er(t));var t},tL.U=function(t){return WN(this,t)},tL.X=function(t){return rT(this,t)},tL.Y=function(){return this.c},tL.c=0,Bg(YL,"AbstractMapBasedMultimap",294),ZT(600,294,VL),tL.Z=function(){return new sw(this.a)},tL.$=function(){return ip(),ip(),HD},tL.U=function(t){return zf(WN(this,t),20)},tL.X=function(t){return zf(rT(this,t),20)},tL.P=function(){return this.f||(this.f=new Pa(this,this.b))},tL.t=function(t){return Yx(this,t)},Bg(YL,"AbstractListMultimap",600),ZT(388,1,UL),tL.G=function(){return this.b.b||this.d.G()},tL.H=function(){var t;return this.d.G()||((t=zw(this.b)).yb(),this.a=zf(t.zb(),19),this.d=this.a.mb()),this.d.H()},tL.I=function(){this.d.I(),this.a.V()&&Fy(this.b),--this.c.c},Bg(YL,"AbstractMapBasedMultimap/Itr",388),ZT(389,388,UL,nm),Bg(YL,"AbstractMapBasedMultimap/1",389),ZT(638,1,XL),tL.Q=function(){this.bb().Q()},tL._=function(t){return sN(this,t)},tL.R=function(t){return!!VN(this,t,!1)},tL.ab=function(t){var e,n;for(e=this.bb().mb();e.G();)if(n=zf(e.H(),21).zb(),Zc(t)===Zc(n)||null!=t&&aE(t,n))return!0;return!1},tL.t=function(t){return kC(this,t)},tL.cb=function(t){return Kc(VN(this,t,!1))},tL.v=function(){return vx(this.bb())},tL.V=function(){return 0==this.Y()},tL.W=function(){return new Vn(this)},tL.db=function(t,e){throw new Co("Put not supported on this map")},tL.eb=function(t){return Kc(VN(this,t,!0))},tL.Y=function(){return this.bb().Y()},tL.w=function(){return nC(this)},tL.fb=function(){return new Xn(this)},Bg(WL,"AbstractMap",638),ZT(654,638,XL),tL.bb=function(){return ig(this)},tL.W=function(){return this.d||(this.d=new Sa(this))},tL.fb=function(){return Ug(this)},Bg(YL,"Maps/ViewCachingAbstractMap",654),ZT(262,654,XL,Pa),tL.cb=function(t){return function(t,e){var n;return(n=zf(sk(t.a,e),19))?ok(t.b,e,n):null}(this,t)},tL.eb=function(t){return function(t,e){var n,r;return(n=zf(Kd(t.a,e),19))?((r=t.b.Z()).jb(n),t.b.c-=n.Y(),n.Q(),r):null}(this,t)},tL.Q=function(){this.a==this.b.b?Tk(this.b):ug(new xv(this))},tL.R=function(t){return vk(this.a,t)},tL.hb=function(){return new He(this)},tL.gb=function(){return this.hb()},tL.t=function(t){return this===t||kC(this.a,t)},tL.v=function(){return vx(new Yn(this.a))},tL.W=function(){return rg(this.b)},tL.Y=function(){return Fs(this.a)},tL.w=function(){return nC(this.a)},Bg(YL,"AbstractMapBasedMultimap/AsMap",262),ZT(640,1,qL),tL.ib=function(t){return function(){throw new Co("Add not supported on this collection")}()},tL.jb=function(t){return gm(this,t)},tL.Q=function(){bp(this)},tL.kb=function(t){return w_(this,t,!1)},tL.lb=function(t){return $m(this,t)},tL.V=function(){return 0==this.Y()},tL.nb=function(t){return w_(this,t,!0)},tL.ob=function(){return this.pb(ky(kD,jL,1,this.Y(),4,1))},tL.pb=function(t){return rN(this,t)},tL.w=function(){return eC(this)},Bg(WL,"AbstractCollection",640),ZT(641,640,ZL),tL.t=function(t){return N_(this,t)},tL.v=function(){return vx(this)},Bg(WL,"AbstractSet",641),ZT(649,641,ZL),Bg(YL,"Sets/ImprovedAbstractSet",649),ZT(655,649,ZL),tL.Q=function(){this.qb().Q()},tL.kb=function(t){return j_(this,t)},tL.V=function(){return this.qb().V()},tL.nb=function(t){var e;return!!this.kb(t)&&(e=zf(t,21),this.qb().W().nb(e.yb()))},tL.Y=function(){return this.qb().Y()},Bg(YL,"Maps/EntrySet",655),ZT(387,655,ZL,He),tL.kb=function(t){return bk(new Yn(this.a.a),t)},tL.mb=function(){return new xv(this.a)},tL.qb=function(){return this.a},tL.nb=function(t){var e;return!!bk(new Yn(this.a.a),t)&&(e=zf(t,21),function(t,e){var n,r;n=zf(function(t,e){xl(),Pd(t);try{return Cl(e)?Mp(t,e):TT(t.d,e)}catch(t){if(fl(t=nE(t),119))return null;if(fl(t,76))return null;throw PE(t)}}(t.b,e),19),n&&(r=n.Y(),n.Q(),t.c-=r)}(this.a.b,e.yb()),!0)},Bg(YL,"AbstractMapBasedMultimap/AsMap/AsMapEntries",387),ZT(299,1,UL,xv),tL.H=function(){var t;return t=zw(this.b),this.a=zf(t.zb(),19),function(t,e){var n;return n=e.yb(),xl(),new ja(n,ok(t.b,n,zf(e.zb(),19)))}(this.c,t)},tL.G=function(){return this.b.b},tL.I=function(){Fy(this.b),this.c.b.c-=this.a.Y(),this.a.Q()},Bg(YL,"AbstractMapBasedMultimap/AsMap/AsMapIterator",299),ZT(260,649,ZL,Sa),tL.Q=function(){this.b.Q()},tL.kb=function(t){return this.b.R(t)},tL.V=function(){return this.b.V()},tL.mb=function(){return xl(),xf(this.b.bb().mb(),(Wu(),UD))},tL.nb=function(t){return!!this.b.R(t)&&(this.b.eb(t),!0)},tL.Y=function(){return this.b.Y()},Bg(YL,"Maps/KeySet",260),ZT(386,260,ZL,Ll),tL.Q=function(){ug(new Ra(this,this.b.bb().mb()))},tL.lb=function(t){return this.b.W().lb(t)},tL.t=function(t){return this===t||this.b.W().t(t)},tL.v=function(){return this.b.W().v()},tL.mb=function(){return new Ra(this,this.b.bb().mb())},tL.nb=function(t){var e,n;return n=0,(e=zf(this.b.eb(t),19))&&(n=e.Y(),e.Q(),this.a.c-=n),n>0},Bg(YL,"AbstractMapBasedMultimap/KeySet",386),ZT(300,1,UL,Ra),tL.G=function(){return this.c.G()},tL.H=function(){return this.a=zf(this.c.H(),21),this.a.yb()},tL.I=function(){var t;dx(!!this.a),t=zf(this.a.zb(),19),this.c.I(),this.b.a.c-=t.Y(),t.Q()},Bg(YL,"AbstractMapBasedMultimap/KeySet/1",300),ZT(216,640,qL,Cy),tL.ib=function(t){return function(t,e){var n,r;return e_(t),r=t.d.V(),(n=t.d.ib(e))&&(++t.f.c,r&&yf(t)),n}(this,t)},tL.jb=function(t){return function(t,e){var n,r,i;return!e.V()&&(i=t.Y(),(n=t.d.jb(e))&&(r=t.d.Y(),t.f.c+=r-i,0==i&&yf(t)),n)}(this,t)},tL.Q=function(){var t,e;0!=(e=(t=this).Y())&&(t.d.Q(),t.f.c-=e,dg(t))},tL.kb=function(t){return e_(this),this.d.kb(t)},tL.lb=function(t){return e_(this),this.d.lb(t)},tL.t=function(t){return function(t,e){return e===t||(e_(t),t.d.t(e))}(this,t)},tL.v=function(){return e_(this),this.d.v()},tL.mb=function(){return e_(this),new Jf(this)},tL.nb=function(t){return function(t,e){var n;return e_(t),(n=t.d.nb(e))&&(--t.f.c,dg(t)),n}(this,t)},tL.Y=function(){return e_(this),this.d.Y()},tL.w=function(){return e_(this),zk(this.d)},Bg(YL,"AbstractMapBasedMultimap/WrappedCollection",216);var jD,BD,GD=Ed(WL,"List");ZT(297,216,KL,yg),tL.rb=function(t,e){var n;e_(this),n=this.d.V(),zf(this.d,20).rb(t,e),++this.a.c,n&&yf(this)},tL.sb=function(t){return e_(this),zf(this.d,20).sb(t)},tL.tb=function(){return e_(this),new Yu(this)},tL.ub=function(t){return e_(this),new jp(this,t)},tL.vb=function(t){var e;return e_(this),e=zf(this.d,20).vb(t),--this.a.c,dg(this),e},tL.wb=function(t,e){return e_(this),zf(this.d,20).wb(t,e)},tL.xb=function(t,e){return e_(this),vb(this.a,this.e,zf(this.d,20).xb(t,e),this.b?this.b:this)},Bg(YL,"AbstractMapBasedMultimap/WrappedList",297),ZT(385,297,$L,wh),Bg(YL,"AbstractMapBasedMultimap/RandomAccessWrappedList",385),ZT(189,1,UL,Jf),tL.G=function(){return gg(this),this.b.G()},tL.H=function(){return gg(this),this.b.H()},tL.I=function(){this.b.I(),--this.d.f.c,dg(this.d)},Bg(YL,"AbstractMapBasedMultimap/WrappedCollection/WrappedIterator",189),ZT(298,189,QL,Yu,jp),tL.J=function(t){var e;e=0==function(t){return e_(t),t.d.Y()}(this.a),(gg(this),zf(this.b,96)).J(t),++this.a.a.c,e&&yf(this.a)},tL.K=function(){return(gg(this),zf(this.b,96)).K()},tL.L=function(){return(gg(this),zf(this.b,96)).L()},tL.M=function(){return(gg(this),zf(this.b,96)).M()},tL.N=function(){return(gg(this),zf(this.b,96)).N()},tL.O=function(t){(gg(this),zf(this.b,96)).O(t)},Bg(YL,"AbstractMapBasedMultimap/WrappedList/WrappedListIterator",298),ZT(295,216,ZL,Eh),Bg(YL,"AbstractMapBasedMultimap/WrappedSet",295),ZT(296,216,JL,_h),Bg(YL,"AbstractMapBasedMultimap/WrappedSortedSet",296),ZT(668,1,tM),tL.t=function(t){var e;return!!fl(t,21)&&(e=zf(t,21),ep(this.yb(),e.yb())&&ep(this.zb(),e.zb()))},tL.v=function(){var t,e;return t=this.yb(),e=this.zb(),(null==t?0:KE(t))^(null==e?0:KE(e))},tL.Ab=function(t){throw new Kr},tL.w=function(){return this.yb()+"="+this.zb()},Bg(YL,eM,668),ZT(390,640,qL,Ye),tL.Q=function(){Tk(this.a)},tL.kb=function(t){return function(t,e){var n;for(n=rp(Ug(t.P()));n.b.G();)if(zf(Mo(n,n.b.H()),19).kb(e))return!0;return!1}(this.a,t)},tL.mb=function(){return new nm(this.a)},tL.Y=function(){return this.a.c},Bg(YL,"AbstractMultimap/Values",390),ZT(656,640,nM),tL.ib=function(t){return this.Bb(t,1),!0},tL.Bb=function(t,e){throw new Kr},tL.jb=function(t){return function(t,e){var n,r;if(Ir(),e.V())return!1;if(fl(e,207))for(r=zf(e,207).bb().mb();r.G();)n=zf(r.H(),83),t.Bb(n.Zb(),n.Yb());else Yw(t,e.mb());return!0}(this,t)},tL.Q=function(){ug(this.Eb())},tL.kb=function(t){return this.Cb(t)>0},tL.Cb=function(t){var e,n;for(n=Xg(this).mb();n.G();)if(ep((e=zf(n.H(),83)).Zb(),t))return e.Yb();return 0},tL.gb=function(){return new ze(this)},tL.bb=function(){return Xg(this)},tL.t=function(t){return function(t,e){var n,r,i;if(Ir(),e===t)return!0;if(fl(e,207)){if(i=zf(e,207),t.Y()!=i.Y()||Xg(t).Y()!=i.bb().Y())return!1;for(r=i.bb().mb();r.G();)if(n=zf(r.H(),83),t.Cb(n.Zb())!=n.Yb())return!1;return!0}return!1}(this,t)},tL.v=function(){return Xg(this).v()},tL.V=function(){return Xg(this).V()},tL.mb=function(){return Ir(),new Va(this,Xg(this).mb())},tL.nb=function(t){return this.Fb(t,1)>0},tL.Fb=function(t,e){throw new Kr},tL.Gb=function(t,e){var n,r;return Ir(),Nw(e,"count"),(r=e-(n=this.Cb(t)))>0?this.Bb(t,r):r<0&&this.Fb(t,-r),n},tL.Hb=function(t,e,n){return function(t,e,n,r){return Ir(),Nw(n,"oldCount"),Nw(r,"newCount"),t.Cb(e)==n&&(t.Gb(e,r),!0)}(this,t,e,n)},tL.Y=function(){return function(t){var e,n;for(Ir(),n=0,e=Xg(t).mb();e.G();)n=wE(n,zf(e.H(),83).Yb());return ow(n)}(this)},tL.w=function(){return zk(Xg(this))},Bg(YL,"AbstractMultiset",656),ZT(657,649,ZL),tL.Q=function(){this.Ib().Q()},tL.kb=function(t){var e;return!(!fl(t,83)||(e=zf(t,83)).Yb()<=0||this.Ib().Cb(e.Zb())!=e.Yb())},tL.nb=function(t){var e,n,r;return!(!fl(t,83)||(e=(n=zf(t,83)).Zb(),0==(r=n.Yb())))&&this.Ib().Hb(e,r,0)},Bg(YL,"Multisets/EntrySet",657),ZT(396,657,ZL,ze),tL.mb=function(){return this.a.Eb()},tL.Ib=function(){return this.a},tL.Y=function(){return this.a.Db()},Bg(YL,"AbstractMultiset/EntrySet",396),ZT(384,294,VL),tL.Z=function(){return new Aa(sx(this.a))},tL.$=function(){return uf(),op(),KD},tL.U=function(t){return zf(WN(this,t),18)},tL.X=function(t){return zf(rT(this,t),18)},tL.P=function(){return this.f||(this.f=new Pa(this,this.b))},tL.t=function(t){return Yx(this,t)},Bg(YL,"AbstractSetMultimap",384),ZT(342,656,nM),Bg(YL,"AbstractSortedMultiset",342),ZT(280,600,VL,Vh),tL.a=0,Bg(YL,"ArrayListMultimap",280),ZT(159,17,rM);var FD,HD,YD,zD,VD,UD,XD,WD=Jy(YL,"BoundType",159,DD,function(){return Uu(),Cx(Lo(WD,1),GL,159,0,[BD,jD])});ZT(623,159,rM,hu),Jy(YL,"BoundType/1",623,WD,null),ZT(624,159,rM,Lu),Jy(YL,"BoundType/2",624,WD,null),ZT(234,1,oM),tL.w=function(){return t=this.c.mb(),Xu(),Zg(ME((Vu(),FD),Zg(new Jo,91),t),93).a;var t},Bg(YL,"FluentIterable",234),ZT(170,234,oM,ku),tL.mb=function(){return Sg(this)},Bg(YL,"FluentIterable/2",170),ZT(664,1,{}),tL.w=function(){return zk(Op(this.a.d).b)},Bg(YL,"ForwardingObject",664),ZT(665,664,qL),tL.ib=function(t){return Op(this.a.d),ti()},tL.jb=function(t){return Op(this.a.d),ei()},tL.Q=function(){Op(this.a.d),ni()},tL.kb=function(t){return Ys(Op(this.a.d),t)},tL.lb=function(t){return zs(Op(this.a.d),t)},tL.V=function(){return Op(this.a.d).b.V()},tL.mb=function(){return new ir(Op(this.a.d).b.mb())},tL.nb=function(t){return Op(this.a.d),ri()},tL.Y=function(){return Op(this.a.d).b.Y()},tL.ob=function(){return Zp(Op(this.a.d))},tL.pb=function(t){return ov(Op(this.a.d),t)},Bg(YL,"ForwardingCollection",665),ZT(660,640,aM),tL.mb=function(){return this.Kb()},tL.ib=function(t){return function(){throw new Kr}()},tL.jb=function(t){return function(){throw new Kr}()},tL.Q=function(){!function(){throw new Kr}()},tL.kb=function(t){return null!=t&&w_(this,t,!1)},tL.Jb=function(){switch(this.Y()){case 0:return ip(),ip(),HD;case 1:return ip(),new zd(this.Kb().H());default:return new bg(this,this.ob())}},tL.nb=function(t){return function(){throw new Kr}()},Bg(YL,"ImmutableCollection",660),ZT(316,660,aM,vi),tL.mb=function(){return Tw(this.a.mb())},tL.kb=function(t){return null!=t&&this.a.kb(t)},tL.lb=function(t){return this.a.lb(t)},tL.V=function(){return this.a.V()},tL.Kb=function(){return Tw(this.a.mb())},tL.Y=function(){return this.a.Y()},tL.ob=function(){return this.a.ob()},tL.pb=function(t){return this.a.pb(t)},tL.w=function(){return zk(this.a)},Bg(YL,"ForwardingImmutableCollection",316),ZT(87,660,sM),tL.mb=function(){return this.Kb()},tL.tb=function(){return this.Lb(0)},tL.ub=function(t){return this.Lb(t)},tL.xb=function(t,e){return this.Mb(t,e)},tL.rb=function(t,e){throw new Kr},tL.t=function(t){return function(t,e){var n,r,i;if(Zc(e)===Zc(Pd(t)))return!0;if(!fl(e,20))return!1;if(r=zf(e,20),(i=t.Y())!=r.Y())return!1;if(fl(r,63)){for(n=0;n=(i=o.Y()))o.Q();else for(r=o.mb(),n=0;ne?1:0}(e.Yb(),t.Yb())}(zf(t,83),zf(e,83))},Bg(YL,"Multisets/1",398),ZT(397,658,{83:1,3:1},ud),tL.Yb=function(){return this.a},tL.Zb=function(){return this.b},tL.a=0,Bg(YL,"Multisets/ImmutableEntry",397),ZT(303,1,UL,Va),tL.G=function(){return this.d>0||this.c.G()},tL.H=function(){if(!(this.d>0||this.c.G()))throw new Ei;return 0==this.d&&(this.b=zf(this.c.H(),83),this.f=this.d=this.b.Yb()),--this.d,this.a=!0,this.b.Zb()},tL.I=function(){dx(this.a),1==this.f?this.c.I():this.e.Fb(this.b.Zb(),1),--this.f,this.a=!1},tL.a=!1,tL.d=0,tL.f=0,Bg(YL,"Multisets/MultisetIteratorImpl",303),ZT(622,659,{3:1,56:1},f),tL.$b=function(t,e){return function(t,e){return Pd(t),Pd(e),Fm(t,e)}(zf(t,23),zf(e,23))},tL.w=function(){return"Ordering.natural()"},Bg(YL,"NaturalOrdering",622),ZT(343,661,sM,bg),tL.ub=function(t){return Tl(this.b,t)},tL.Sb=function(){return this.a},tL.sb=function(t){return $c(this.b,t)},tL.Lb=function(t){return Tl(this.b,t)},Bg(YL,"RegularImmutableAsList",343),ZT(559,275,cM,hp),tL.Tb=function(){return this.a},Bg(YL,"RegularImmutableBiMap",559),ZT(53,667,sM,ab),tL.Nb=function(){return this.a},Bg(YL,"RegularImmutableList",53),ZT(321,320,cM,Di),Bg(YL,"RegularImmutableMap",321),ZT(265,315,uM,Ks),Bg(YL,"RegularImmutableSet",265),ZT(650,641,ZL),Bg(YL,"Sets/SetView",650),ZT(377,650,ZL,df),tL.kb=function(t){return _a(this.b,t)&&_a(this.c,t)},tL.lb=function(t){return $m(this.b,t)&&$m(this.c,t)},tL.V=function(){return Sw(this)},tL.mb=function(){return vg(new Un(new Vn(this.b.a).a.bb().mb()),this.a)},tL.Y=function(){return Qb(vg(new Un(new Vn(this.b.a).a.bb().mb()),this.a))},Bg(YL,"Sets/2",377),ZT(328,275,cM,Zv,Hy),tL.fb=function(){return uf(),new ua(this.c)},tL.Tb=function(){return this.a||(this.a=new Hy(this.c,this.b,this))},tL.Ub=function(){return uf(),new ua(this.c)},Bg(YL,"SingletonImmutableBiMap",328),ZT(127,667,sM,zd),tL.Nb=function(){return this.a},Bg(YL,"SingletonImmutableList",127),ZT(135,663,uM,ua),tL.mb=function(){return Xu(),new We(this.a)},tL.kb=function(t){return aE(this.a,t)},tL.Kb=function(){return Xu(),new We(this.a)},tL.Y=function(){return 1},Bg(YL,"SingletonImmutableSet",135),ZT(285,342,{207:1,3:1,22:1,19:1},Pv,uk),tL.Bb=function(t,e){return lT(this,t,e)},tL.Cb=function(t){return AN(this,t)},tL.Db=function(){return ow(Gx(this,(qu(),$D)))},tL.Eb=function(){return new Ml(this)},tL.Fb=function(t,e){return XT(this,t,e)},tL.Gb=function(t,e){return $N(this,t,e)},tL.Hb=function(t,e,n){var r,i,o;return Nw(n,"newCount"),Nw(e,"oldCount"),zc(lh(this.b,t)),(o=this.c.a)?(i=ky(rq,pM,26,1,12,1),r=gO(o,this.d,t,e,n,i),Rd(this.c,o,r),i[0]==e):0==e&&(n>0&&lT(this,t,n),!0)},tL.Y=function(){return ow(Gx(this,(qu(),QD)))},Bg(YL,"TreeMultiset",285),ZT(619,658,{83:1},Xa),tL.Yb=function(){var t;return 0==(t=this.b.c)?AN(this.a,this.b.b):t},tL.Zb=function(){return this.b.b},Bg(YL,"TreeMultiset/1",619),ZT(620,1,UL,Ml),tL.H=function(){return function(t){var e;if(!fx(t))throw new Ei;return e=new Xa(t.c,t.a),t.b=e,t.a.i==t.c.a?t.a=null:t.a=t.a.i,e}(this)},tL.G=function(){return fx(this)},tL.I=function(){dx(!!this.b),$N(this.c,this.b.b.b,0),this.b=null},Bg(YL,"TreeMultiset/2",620),ZT(205,17,vM);var tR=Jy(YL,"TreeMultiset/Aggregate",205,DD,function(){return qu(),Cx(Lo(tR,1),GL,205,0,[QD,$D])});ZT(617,205,vM,fu),tL._b=function(t){return t.c},tL.ac=function(t){return t?t.j:0},Jy(YL,"TreeMultiset/Aggregate/1",617,tR,null),ZT(618,205,vM,wl),tL._b=function(t){return 1},tL.ac=function(t){return t?t.a:0},Jy(YL,"TreeMultiset/Aggregate/2",618,tR,null),ZT(206,658,{83:1,206:1},Cm),tL.Yb=function(){return this.c},tL.Zb=function(){return this.b},tL.w=function(){return Ir(),Tb(new ud(this.b,this.c))},tL.a=0,tL.c=0,tL.d=0,tL.j=0,Bg(YL,"TreeMultiset/AvlNode",206),ZT(616,1,{},d),Bg(YL,"TreeMultiset/Reference",616);var eR,nR=Bg(OL,"JavaScriptObject$",0);ZT(628,1,{}),Bg(OL,"Scheduler",628);var rR,iR,oR,aR,sR,cR,uR,lR,hR=0,fR=0,dR=-1;ZT(360,628,{},l),Bg(SL,"SchedulerImpl",360),ZT(646,1,{}),tL.hc=function(){return null},tL.ic=function(){return null},tL.jc=function(){return null},tL.kc=function(){return null},tL.lc=function(){return null},Bg(yM,"JSONValue",646),ZT(214,646,{214:1},sr,en),tL.t=function(t){return!!fl(t,214)&&this.a==zf(t,214).a},tL.gc=function(){return pr},tL.v=function(){return hh(this.a)},tL.hc=function(){return this},tL.w=function(){var t,e,n;for(n=new qo("["),e=0,t=this.a.length;e0&&(n.a+=","),nu(n,Aw(this,e));return n.a+="]",n.a},Bg(yM,"JSONArray",214),ZT(292,646,{},nn),tL.gc=function(){return vr},tL.ic=function(){return this},tL.w=function(){return bl(this.a)},tL.a=!1,Bg(yM,"JSONBoolean",292),ZT(371,72,fL,Fi),Bg(yM,"JSONException",371),ZT(435,646,{},b),tL.gc=function(){return xr},tL.w=function(){return dL},Bg(yM,"JSONNull",435),ZT(104,646,{104:1},rn),tL.t=function(t){return!!fl(t,104)&&this.a==zf(t,104).a},tL.gc=function(){return br},tL.v=function(){return wv(io(this.a))},tL.jc=function(){return this},tL.w=function(){return this.a+""},tL.a=0,Bg(yM,"JSONNumber",104),ZT(69,646,{69:1},Vi,on),tL.t=function(t){return!!fl(t,69)&&this.a==zf(t,69).a},tL.gc=function(){return yr},tL.v=function(){return hh(this.a)},tL.kc=function(){return this},tL.w=function(){var t,e,n,r,i,o;for(o=new qo("{"),t=!0,n=0,r=(i=_m(this,ky(TD,lL,2,0,5,1))).length;n>>28]|e[t>>24&15]<<4|e[t>>20&15]<<8|e[t>>16&15]<<12|e[t>>12&15]<<16|e[t>>8&15]<<20|e[t>>4&15]<<24|e[15&t]<<28);var t,e},tL.w=function(){return"("+this.a+","+this.b+")"},tL.a=0,tL.b=0;var gR=Bg(TM,"KVector",10);ZT(58,648,{3:1,5:1,22:1,19:1,58:1,20:1},uo),tL.ib=function(t){return If(this,t)},tL.Q=function(){Lp(this)},tL.ub=function(t){return Ak(this,t)},tL.Y=function(){return this.b},tL.b=0,Bg(WL,"LinkedList",58),ZT(44,58,{44:1,286:1,3:1,5:1,22:1,19:1,58:1,20:1},Gr,Th),tL.w=function(){var t,e,n;for(t=new qo("("),e=Ak(this,0);e.b!=e.d.c;)ru(t,(n=zf(Ab(e),10)).a+","+n.b),e.b!=e.d.c&&(t.a+="; ");return t.a+=")",t.a},Bg(TM,"KVectorChain",44);var pR,vR,bR,yR,wR,mR,xR,ER,_R,kR=Ed(IM,"IProperty");ZT(131,1,{179:1,131:1,3:1},y),Bg(IM,"MapPropertyHolder",131),ZT(14,1,OM,Od,Id,hd,Sf,_v,$v),tL.F=function(t){return function(t,e){return kp(t.b,e.mc())}(this,zf(t,79))},tL.t=function(t){return yp(this,t)},tL.mc=function(){return this.b},tL.nc=function(){return this.c},tL.oc=function(){return this.d},tL.v=function(){return fk(this.b)},tL.w=function(){return this.b},Bg(IM,"Property",14),ZT(366,1,{23:1},w),tL.F=function(t){return-1},Bg(IM,"Property/1",366),ZT(367,1,{23:1},m),tL.F=function(t){return 1},Bg(IM,"Property/2",367),ZT(27,1,{27:1,22:1},ts),tL.t=function(t){var e,n,r;return!!fl(t,27)&&(n=zf(t,27),e=null==this.a?null==n.a:aE(this.a,n.a),r=null==this.b?null==n.b:aE(this.b,n.b),e&&r)},tL.v=function(){var t,e,n;return t=-65536&(e=null==this.a?0:KE(this.a)),e&mL^(-65536&(n=null==this.b?0:KE(this.b)))>>16&mL|t^(n&mL)<<16},tL.mb=function(){return new an(this)},tL.w=function(){return null==this.a&&null==this.b?"pair(null,null)":null==this.a?"pair(null,"+zk(this.b)+")":null==this.b?"pair("+zk(this.a)+",null)":"pair("+zk(this.a)+","+zk(this.b)+")"},Bg(SM,"Pair",27),ZT(431,1,UL,an),tL.G=function(){return!this.c&&(!this.b&&null!=this.a.a||null!=this.a.b)},tL.H=function(){if(!this.c&&!this.b&&null!=this.a.a)return this.b=!0,this.a.a;if(!this.c&&null!=this.a.b)return this.c=!0,this.a.b;throw new Ei},tL.I=function(){throw this.c&&null!=this.a.b?this.a.b=null:this.b&&null!=this.a.a&&(this.a.a=null),new qr},tL.b=!1,tL.c=!1,Bg(SM,"Pair/1",431),ZT(228,72,fL,Hi),Bg(LM,"UnsupportedConfigurationException",228),ZT(99,72,fL,Yi),Bg(LM,"UnsupportedGraphException",99),ZT(103,17,{103:1,3:1,23:1,17:1},es);var NR,CR,TR,AR,IR,OR,SR=Jy(RM,"Alignment",103,DD,function(){return hk(),Cx(Lo(SR,1),GL,103,0,[yR,xR,ER,_R,wR,mR])});ZT(59,17,{59:1,3:1,23:1,17:1},cs);var LR,MR,PR,DR,RR,jR=Jy(RM,"Direction",59,DD,function(){return EE(),Cx(Lo(jR,1),GL,59,0,[IR,AR,TR,CR,OR])});ZT(107,17,{107:1,3:1,23:1,17:1},us);var BR,GR,FR,HR,YR,zR=Jy(RM,"EdgeLabelPlacement",107,DD,function(){return jm(),Cx(Lo(zR,1),GL,107,0,[RR,MR,PR,DR])});ZT(122,17,{122:1,3:1,23:1,17:1},ls);var VR,UR,XR,WR,qR,ZR,KR,$R=Jy(RM,"EdgeRouting",122,DD,function(){return _E(),Cx(Lo($R,1),GL,122,0,[YR,FR,GR,HR])});ZT(133,17,{133:1,3:1,23:1,17:1},hs);var QR,JR,tj,ej,nj=Jy(RM,"EdgeType",133,DD,function(){return PN(),Cx(Lo(nj,1),GL,133,0,[ZR,WR,KR,UR,qR,XR])});ZT(166,17,{166:1,3:1,23:1,17:1},fs);var rj,ij,oj,aj,sj,cj,uj,lj,hj,fj,dj,gj,pj,vj,bj,yj,wj,mj,xj,Ej,_j,kj,Nj,Cj,Tj,Aj,Ij,Oj,Sj,Lj,Mj,Pj,Dj,Rj,jj,Bj,Gj,Fj,Hj,Yj,zj,Vj,Uj,Xj,Wj,qj,Zj,Kj,$j,Qj,Jj,tB,eB,nB,rB,iB,oB,aB,sB,cB=Jy(RM,"HierarchyHandling",166,DD,function(){return kE(),Cx(Lo(cB,1),GL,166,0,[tj,JR,ej])});ZT(41,17,{41:1,3:1,23:1,17:1},ds);var uB,lB,hB,fB,dB,gB,pB=Jy(RM,"NodeLabelPlacement",41,DD,function(){return bT(),Cx(Lo(pB,1),GL,41,0,[tB,Jj,nB,sB,aB,oB,rB,iB,eB])});ZT(100,17,{100:1,3:1,23:1,17:1},gs);var vB,bB,yB,wB,mB,xB,EB,_B=Jy(RM,"PortAlignment",100,DD,function(){return I_(),Cx(Lo(_B,1),GL,100,0,[gB,dB,lB,hB,fB])});ZT(28,17,{28:1,3:1,23:1,17:1},ps);var kB,NB,CB,TB,AB=Jy(RM,"PortConstraints",28,DD,function(){return vN(),Cx(Lo(AB,1),GL,28,0,[EB,xB,mB,bB,wB,yB])});ZT(149,17,{149:1,3:1,23:1,17:1},vs);var IB,OB,SB,LB,MB,PB,DB,RB,jB,BB,GB,FB,HB,YB,zB,VB,UB,XB,WB,qB,ZB,KB,$B=Jy(RM,"PortLabelPlacement",149,DD,function(){return Dw(),Cx(Lo($B,1),GL,149,0,[TB,CB,NB])});ZT(32,17,{32:1,3:1,23:1,17:1},bs);var QB,JB,tG,eG,nG,rG=Jy(RM,"PortSide",32,DD,function(){return yS(),Cx(Lo(rG,1),GL,32,0,[ZB,SB,OB,qB,KB])});ZT(150,17,{150:1,3:1,23:1,17:1},ys);var iG,oG,aG,sG,cG,uG=Jy(RM,"SizeConstraint",150,DD,function(){return O_(),Cx(Lo(uG,1),GL,150,0,[eG,nG,tG,JB])});ZT(139,17,{139:1,3:1,23:1,17:1},ws);var lG,hG,fG,dG,gG,pG,vG,bG,yG,wG,mG,xG,EG,_G,kG,NG,CG,TG,AG,IG,OG,SG,LG,MG=Jy(RM,"SizeOptions",139,DD,function(){return YN(),Cx(Lo(MG,1),GL,139,0,[sG,cG,aG,oG])});ZT(62,1,{62:1},oc,xp),tL.t=function(t){var e;return!(null==t||!fl(t,62))&&(e=zf(t,62),Tp(this.d,e.d)&&Tp(this.e,e.e)&&Tp(this.c,e.c)&&Tp(this.b,e.b))},tL.v=function(){return qx(Cx(Lo(kD,1),jL,1,4,[this.d,this.e,this.c,this.b]))},tL.w=function(){return"Rect[x="+this.d+",y="+this.e+",w="+this.c+",h="+this.b+"]"},tL.b=0,tL.c=0,tL.d=0,tL.e=0,Bg(HM,"Rectangle",62),ZT(283,62,{283:1,62:1},Fr),tL.a=0,Bg(YM,"LabelGroup",283),ZT(67,17,{67:1,3:1,23:1,17:1},_p);var PG,DG,RG,jG=Jy(YM,"LabelLocation",67,DD,A_);ZT(225,17,{225:1,3:1,23:1,17:1},ms);var BG,GG,FG,HG,YG,zG=Jy(YM,"TextAlignment",225,DD,function(){return Fb(),Cx(Lo(zG,1),GL,225,0,[DG,PG,RG])});ZT(589,1,{},vO),tL.a=0,tL.b=!1,tL.d=0,tL.f=0,tL.k=0,tL.r=0,tL.s=0,Bg(HM,"LabelAndNodeSizeProcessor/NodeData",589),ZT(171,17,{171:1,3:1,23:1,17:1},xs);var VG,UG,XG,WG,qG,ZG,KG,$G,QG,JG,tF,eF,nF,rF=Jy(HM,"LabelSide",171,DD,function(){return S_(),Cx(Lo(rF,1),GL,171,0,[YG,GG,FG])});ZT(590,1,{},sn),tL.b=!0,tL.c=!0,tL.d=!0,tL.e=!0,Bg(HM,VM,590),ZT(121,1,XM),tL.t=function(t){var e;return!!fl(t,121)&&(e=zf(t,121),this.d==e.d&&this.a==e.a&&this.b==e.b&&this.c==e.c)},tL.v=function(){var t;return t=wv(io(this.b))<<16,(t|=wv(io(this.a))&mL)^(wv(io(this.c))<<16|wv(io(this.d))&mL)},tL.w=function(){return"[top="+this.d+",left="+this.b+",bottom="+this.a+",right="+this.c+"]"},tL.a=0,tL.b=0,tL.c=0,tL.d=0,Bg(HM,"Spacing",121),ZT(232,121,XM,Hr,mh,Uh),Bg(HM,"Spacing/Insets",232),ZT(65,121,{286:1,121:1,65:1,3:1,5:1},Yr,xh,Xh),Bg(HM,"Spacing/Margins",65),ZT(364,1,{},Pk),tL.c=!1,tL.d=null,tL.g=null,Bg(oP,"JsonGraphImporter",364),ZT(417,14,OM,lc),Bg(oP,"LayoutOptionResolver/DummyProperty",417),ZT(348,1,{},_e),Bg(oP,"RecursiveLGraphLayout",348),ZT(73,99,{73:1,3:1,54:1,46:1},zi,ql,mg);var iF,oF,aF,sF,cF=Bg(oP,"UnsupportedJsonGraphException",73);ZT(380,1,{},fp),Bg(uP,"GraphConfigurator",380),ZT(49,1,{},r_),Bg(uP,"IntermediateProcessingConfiguration",49),ZT(365,1,{},Rb),Bg(uP,"KlayLayered",365),ZT(577,1,{},Xm),tL.i=0,Bg(dP,"ComponentsToCGraphTransformer",577),ZT(578,1,{},A),tL.tc=function(t,e){return Yo(t.wc(),e.wc())},tL.uc=function(t,e){return Yo(t.xc(),e.xc())},Bg(dP,"ComponentsToCGraphTransformer/1",578),ZT(25,1,{25:1}),tL.k=0,tL.o=null,tL.p=!0,tL.r=fP;var uF,lF,hF,fF,dF,gF=Bg(gP,"CNode",25);ZT(198,25,{198:1,25:1},nl,im),tL.vc=function(){this.b.d=this.j.d,this.b.e=this.j.e},tL.wc=function(){return null!=this.a?io(this.a):this.c.i},tL.xc=function(){return null!=this.a?io(this.a):this.c.i},tL.w=function(){return""},Bg(dP,"ComponentsToCGraphTransformer/CRectNode",198),ZT(549,1,{},I),Bg(dP,"OneDimensionalComponentsCompaction",549),ZT(550,1,lM,O),tL.B=function(t){return px(),Vd(),0!=zf(zf(t,27).a,25).f.f?TW:CW},Bg(dP,"OneDimensionalComponentsCompaction/lambda$0$Type",550),ZT(551,1,lM,S),tL.B=function(t){return px(),Vd(),u_(zf(zf(t,27).a,25).n,zf(zf(t,27).b,59))||0!=zf(zf(t,27).a,25).f.f&&u_(zf(zf(t,27).a,25).n,zf(zf(t,27).b,59))?TW:CW},Bg(dP,"OneDimensionalComponentsCompaction/lambda$1$Type",551),ZT(324,1,{},xg),Bg(gP,"CGraph",324),ZT(78,1,{78:1},Z_),tL.b=0,tL.c=0,tL.d=0,tL.f=0,tL.i=!0,tL.j=fP,Bg(gP,"CGroup",78),ZT(470,1,{},L),tL.tc=function(t,e){return Go(t.wc(),e.wc())},tL.uc=function(t,e){return Go(t.xc(),e.xc())},Bg(gP,"ISpacingsHandler/1",470),ZT(323,1,{},yT),tL.e=!1;var pF=Bg(gP,"OneDimensionalCompactor",323);ZT(554,1,lM,E),tL.B=function(t){return Wd(),Vd(),0!=zf(zf(t,27).a,25).f.f?TW:CW},Bg(gP,"OneDimensionalCompactor/lambda$0$Type",554),ZT(335,1,{},Gf),tL.a=!1,tL.b=!1,tL.c=!1,tL.d=!1,Bg(gP,"Quadruplet",335),ZT(587,1,{},_),tL.Cc=function(t){var e,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v;for(l=hP,r=new $n(t.a.b);r.an.j.d||n.j.d==i.j.d&&n.j.c0&&(Of(t.c,new gf(e.c,e.d,t.d)),t.b=e.d)}(this,zf(t,48))},tL.b=0,Bg(bP,"RectilinearConvexHull/MaximalElementsEventHandler",243),ZT(571,1,kL,M),tL.$b=function(t,e){return np(t,e)},Bg(bP,"RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type",571),ZT(570,1,{160:1},ty),tL.Ec=function(t){!function(t,e){var n;t.d&&(e.c!=t.e.c||function(t,e){return Rm(),t==bF&&e==yF||t==bF&&e==wF||t==mF&&e==wF||t==mF&&e==yF}(t.e.b,e.b))&&(Of(t.f,t.d),t.a=t.d.d+t.d.c,t.d=null,t.e=null),function(t){return t==bF||t==yF}(e.b)?t.c=e:t.b=e,(e.b==(Rm(),bF)&&!e.a||e.b==yF&&e.a||e.b==wF&&e.a||e.b==mF&&!e.a)&&t.c&&t.b&&(n=new xp(t.a,t.c.d,e.c-t.a,t.b.d-t.c.d),t.d=n,t.e=e)}(this,zf(t,48))},tL.a=0,tL.b=null,tL.c=null,tL.d=null,tL.e=null,Bg(bP,"RectilinearConvexHull/RectangleEventHandler",570),ZT(572,1,kL,P),tL.$b=function(t,e){return Gb(),zf(t,48).c==zf(e,48).c?Ix(zf(e,48).d,zf(t,48).d):Ix(zf(t,48).c,zf(e,48).c)},Bg(bP,"RectilinearConvexHull/lambda$0$Type",572),ZT(573,1,kL,D),tL.$b=function(t,e){return Gb(),zf(t,48).c==zf(e,48).c?Ix(zf(t,48).d,zf(e,48).d):Ix(zf(t,48).c,zf(e,48).c)},Bg(bP,"RectilinearConvexHull/lambda$1$Type",573),ZT(574,1,kL,R),tL.$b=function(t,e){return Gb(),zf(t,48).c==zf(e,48).c?Ix(zf(e,48).d,zf(t,48).d):Ix(zf(e,48).c,zf(t,48).c)},Bg(bP,"RectilinearConvexHull/lambda$2$Type",574),ZT(575,1,kL,j),tL.$b=function(t,e){return Gb(),zf(t,48).c==zf(e,48).c?Ix(zf(t,48).d,zf(e,48).d):Ix(zf(e,48).c,zf(t,48).c)},Bg(bP,"RectilinearConvexHull/lambda$3$Type",575),ZT(576,1,kL,B),tL.$b=function(t,e){return function(t,e){var n;if(Gb(),t.c==e.c){if(t.b==e.b||function(t,e){return Rm(),t==bF&&e==mF||t==mF&&e==bF||t==wF&&e==yF||t==yF&&e==wF}(t.b,e.b)){if(n=function(t){return t==bF||t==mF}(t.b)?1:-1,t.a&&!e.a)return n;if(!t.a&&e.a)return-n}return Bu(t.b.e,e.b.e)}return Ix(t.c,e.c)}(t,e)},Bg(bP,"RectilinearConvexHull/lambda$4$Type",576),ZT(469,1,{},kb),Bg(bP,"Scanline",469),ZT(662,1,{}),Bg(wP,"AbstractGraphPlacer",662),ZT(222,1,{222:1},Kh),Bg(wP,"ComponentGroup",222),ZT(434,662,{},Lr),tL.Fc=function(t,e){var n,r,i,o,a,s,c,u,l,h,f,d;if(this.a.c=ky(kD,jL,1,0,4,1),e.b.c=ky(kD,jL,1,0,4,1),t.V())return e.e.a=0,void(e.e.b=0);for(LE(e,i=zf(t.sb(0),55)),r=t.mb();r.G();)YE(this,zf(r.H(),55));for(f=new co,d=2*zf(_x(i,(qS(),wX)),15).a,s=new $n(this.a);s.ah&&(x=0,E+=l+w,l=0),rI(o,x+(g=o.d).a,E+g.b),g.a=0,g.b=0,n=Go(n,x+b.a),l=Go(l,b.b),x+=b.a+w;if(e.e.a=n,e.e.b=E+l,v=zf(_x(e,wX),15).a,ro(io(Ah(_x(i,(ZS(),FX)))))){for(jS(r=new G,t,v),u=t.mb();u.G();)Sh(Oc(zf(u.H(),55).d),r.e);Sh(Oc(e.e),r.a)}gy(e,t)}else(y=zf(t.sb(0),55))!=e&&(e.b.c=ky(kD,jL,1,0,4,1),gI(e,y,0,0),LE(e,y),_d(e.a,y.a),e.e.a=y.e.a,e.e.b=y.e.b)},Bg(wP,"SimpleRowGraphPlacer",432),ZT(433,1,kL,H),tL.$b=function(t,e){return function(t,e){var n;return 0==(n=e.k-t.k)?Ix(t.e.a*t.e.b,e.e.a*e.e.b):n}(zf(t,55),zf(e,55))},Bg(wP,"SimpleRowGraphPlacer/1",433),ZT(369,1,_P,ke),tL.sc=function(t,e){zS(t,e)},Bg(kP,"CompoundGraphPostprocessor",369),ZT(370,1,yP,Y),tL.D=function(t){var e;return!!(e=zf(_x(zf(t,114).b,(QS(),_j)),44))&&0!=e.b},Bg(kP,"CompoundGraphPostprocessor/1",370),ZT(368,1,_P,Xc),tL.sc=function(t,e){rk(this,t,e)},Bg(kP,"CompoundGraphPreprocessor",368),ZT(187,1,{187:1},AE),tL.c=!1,Bg(kP,"CompoundGraphPreprocessor/ExternalPort",187),ZT(114,1,{114:1},pf),tL.w=function(){return dh(this.c)+":"+Mw(this.b)},Bg(kP,"CrossHierarchyEdge",114),ZT(310,1,kL,cn),tL.$b=function(t,e){return function(t,e,n){var r,i;return e.c==(em(),DX)&&n.c==PX?-1:e.c==PX&&n.c==DX?1:(r=x_(e.a,t.a),i=x_(n.a,t.a),e.c==DX?i-r:r-i)}(this,zf(t,114),zf(e,114))},Bg(kP,"CrossHierarchyEdgeComparator",310),ZT(147,131,{179:1,131:1,147:1,3:1}),tL.k=0,Bg(CP,"LGraphElement",147),ZT(12,147,{179:1,131:1,12:1,147:1,3:1},Rp),tL.w=function(){return Mw(this)};var SF=Bg(CP,"LEdge",12);ZT(55,147,{179:1,131:1,55:1,147:1,3:1,22:1},Bw),tL.mb=function(){return new $n(this.c)},tL.w=function(){return 0==this.c.c.length?"G-unlayered"+eC(this.b):0==this.b.c.length?"G-layered"+eC(this.c):"G[layerless"+eC(this.b)+", layers"+eC(this.c)+"]"};var LF=Bg(CP,"LGraph",55);ZT(273,1,{}),tL.pc=function(){return this.e.j},Bg(CP,"LGraphAdapters/AbstractLShapeAdapter",273),ZT(240,1,{627:1},un),tL.b=null,Bg(CP,"LGraphAdapters/LEdgeAdapter",240),ZT(325,1,{},ks),tL.pc=function(){return this.a.e},tL.b=null,tL.c=!1,Bg(CP,"LGraphAdapters/LGraphAdapter",325),ZT(224,273,{129:1,224:1},ln),Bg(CP,"LGraphAdapters/LLabelAdapter",224),ZT(555,273,{626:1},Ns),tL.a=null,tL.b=null,tL.c=!1,Bg(CP,"LGraphAdapters/LNodeAdapter",555),ZT(556,273,{161:1},Cs),tL.a=null,tL.b=null,tL.c=null,tL.d=!1,Bg(CP,"LGraphAdapters/LPortAdapter",556),ZT(557,1,kL,z),tL.$b=function(t,e){return function(t,e){var n,r,i,o;if(0!=(o=t.g.e-e.g.e))return o;if(n=zf(_x(t,(QS(),Hj)),24),r=zf(_x(e,Hj),24),n&&r&&0!=(i=n.a-r.a))return i;switch(t.g.e){case 1:return Ix(t.i.a,e.i.a);case 2:return Ix(t.i.b,e.i.b);case 3:return Ix(e.i.a,t.i.a);case 4:return Ix(e.i.b,t.i.b);default:throw new _o(TP)}}(zf(t,7),zf(e,7))},Bg(CP,"LGraphAdapters/PortComparator",557),ZT(168,1,{168:1},je,Fp),tL.t=function(t){var e;return!!fl(t,168)&&(e=zf(t,168),this.d==e.d&&this.a==e.a&&this.b==e.b&&this.c==e.c)},tL.v=function(){var t;return t=wv(io(this.b))<<16,(t|=wv(io(this.a))&mL)^(wv(io(this.c))<<16|wv(io(this.d))&mL)},tL.w=function(){return"Insets[top="+this.d+",left="+this.b+",bottom="+this.a+",right="+this.c+"]"},tL.a=0,tL.b=0,tL.c=0,tL.d=0,Bg(CP,"LInsets",168),ZT(165,147,{179:1,131:1,147:1,165:1,3:1}),Bg(CP,"LShape",165),ZT(33,165,{179:1,131:1,147:1,33:1,165:1,3:1},Eu),tL.w=function(){return null==this.a?"l_"+this.k:"l_"+this.a},Bg(CP,"LLabel",33),ZT(9,165,{179:1,131:1,147:1,9:1,165:1,3:1},kk),tL.w=function(){return vv(this)};var MF,PF,DF,RF,jF,BF,GF=Bg(CP,"LNode",9);ZT(132,17,{132:1,3:1,23:1,17:1},As);var FF,HF,YF,zF,VF,UF,XF=Jy(CP,"LNode/NodeType",132,DD,function(){return DN(),Cx(Lo(XF,1),GL,132,0,[jF,RF,PF,BF,DF,MF])});ZT(7,165,{179:1,131:1,147:1,7:1,165:1,3:1},kN),tL.w=function(){var t;return null==(t=oy(this))?"p_"+this.k:"p_"+t};var WF=Bg(CP,"LPort",7);ZT(399,1,yP,V),tL.D=function(t){return Rh(t)},Bg(CP,"LPort/1",399),ZT(400,1,yP,U),tL.D=function(t){return Dh(t)},Bg(CP,"LPort/2",400),ZT(401,1,yP,X),tL.D=function(t){return zf(t,7).g==(yS(),SB)},Bg(CP,"LPort/3",401),ZT(402,1,yP,W),tL.D=function(t){return zf(t,7).g==(yS(),OB)},Bg(CP,"LPort/4",402),ZT(403,1,yP,q),tL.D=function(t){return zf(t,7).g==(yS(),qB)},Bg(CP,"LPort/5",403),ZT(404,1,yP,Z),tL.D=function(t){return zf(t,7).g==(yS(),KB)},Bg(CP,"LPort/6",404),ZT(190,1,oM,hn),tL.mb=function(){return new fn(new $n(this.a.b))},Bg(CP,"LPort/7",190),ZT(405,1,UL,fn),tL.H=function(){return zf(Qv(this.a),12).c},tL.G=function(){return dl(this.a)},tL.I=function(){hg(this.a)},Bg(CP,"LPort/7/1",405),ZT(169,1,oM,dn),tL.mb=function(){return new gn(new $n(this.a.e))},Bg(CP,"LPort/8",169),ZT(304,1,UL,gn),tL.H=function(){return zf(Qv(this.a),12).d},tL.G=function(){return dl(this.a)},tL.I=function(){hg(this.a)},Bg(CP,"LPort/8/1",304),ZT(16,147,{179:1,131:1,147:1,16:1,3:1,22:1},Eg),tL.mb=function(){return new $n(this.a)},tL.w=function(){return"L_"+$y(this.b.c,this,0)+eC(this.a)},Bg(CP,"Layer",16),ZT(437,1,_P,K),tL.sc=function(t,e){var n,r,i,o;for(F_(e,"Big nodes intermediate-processing",1),this.a=t,r=new $n(this.a.c);r.ao?50:o,n=new Re,d=o+this.d,l=new $n(h);l.ad){for(f=1,r=a.j.a;r>o;)++f,r=(a.j.a-(f-1)*this.d)/f;Of(n,new Bb(this,a,f,r))}for(s=new $n(n);s.aa?50:a,n=new Re,g=a+this.d,h=new $n(f);h.ag){for(d=1,r=s.j.a;r>a;)++d,r=(s.j.a-(d-1)*this.d)/d;Of(n,new ev(this,s,d))}for(c=new $n(n);c.a0||l.g==KB&&l.b.c.length-l.e.c.length<0)){n=!1;break}if(l.g==KB)for(i=new $n(l.e);i.a0&&(t.a=c+(f-1)*i,e.d.b+=t.a,e.e.b+=t.a),0!=d.a.Y()&&(f=hO(new wC(1,i),e,d,g,e.e.b+c-e.d.b))>0&&(e.e.b+=c+(f-1)*i)}(this,t,n),function(t){var e,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,_;for(y=new Re,l=new $n(t.c);l.a0&&DI((xy(0,n.c.length),zf(n.c[0],16)),t),n.c.length>1&&DI(zf(gd(n,n.c.length-1),16),t),FE(e)},Bg(AP,"HierarchicalPortPositionProcessor",454),ZT(471,1,_P,ht),tL.sc=function(t,e){var n,r,i,o,a,s,c,u,l,h,f;for(F_(e,"Hyperedge merging",1),l=new Kv(t.c,0);l.b(d=f.c.length)+1?Of(l,new ts(c,(xy(h=(s+d)/2|0,a.c.length),zf(a.c[h],9)))):d>s+1&&Of(l,new ts(c,(xy(h=((d-s)/2|0)-1,f.c.length),zf(f.c[h],9))))}for(v=new $n(l);v.a=2){for(c=!0,xy(1,s.c.length),g=zf(s.c[1],16),h=new $n(r.a);h.a=2){for(c=!0,p=zf(gd(s,s.c.length-2),16),h=new $n(i.a);h.an?c:n}t.e.b=c-u,t.d.b-=u,FE(e)},Bg(AP,"LayerSizeAndGraphHeightCalculator",496),ZT(497,1,_P,It),tL.sc=function(t,e){var n,r,i,o;for(F_(e,"Edge joining",1),n=ro(io(Ah(_x(t,(ZS(),BX))))),r=new $n(t.c);r.a0&&Of(t.p,l),Of(t.o,l);d=c+(e-=r),u+=e*t.e,Kb(t.a,s,WE(d)),Kb(t.b,s,u),t.j=Ho(t.j,d),t.k=Go(t.k,u),t.d+=e,e+=p}}(this),this.q=zf(_x(t,(ZS(),oW)),109),c=zf(_x(this.g,aW),24).a,i=new Mt,this.q.e){case 2:case 1:default:OO(this,i);break;case 3:for(this.q=(eA(),oY),OO(this,i),a=0,o=new $n(this.a);o.athis.j&&(this.q=JH,OO(this,i));break;case 4:for(this.q=(eA(),oY),OO(this,i),s=0,r=new $n(this.b);r.athis.k&&(this.q=nY,OO(this,i));break;case 6:OO(this,new En(wv(Lc(this.f.length*c/100))));break;case 5:OO(this,new _n(wv(Lc(this.d*c/100))))}!function(t,e){var n,r,i,o,a,s;for(i=new Re,n=0;n<=t.i;n++)(r=new Eg(e)).k=t.i-n,i.c[i.c.length]=r;for(s=new $n(t.o);s.a=2){for(g=!0,n=zf(Qv(h=new $n(o.f)),7);h.a(r-=t.a)?i:r}return i}(this,t),d=t.c.c.length,p=function(t,e){var n,r,i,o,a;for(r=0,n=new $n(e.c);n.a(a=(i=zf(Qv(o),9)).j.a+i.e.c+i.e.b+t.b)?r:a;return r}(this,t),T=d*p,(r=(i=zf(_x(t,(QS(),dj)),59))==(EE(),TR)||i==AR||i==IR?zf(_x(t,TU),15).a:1/zf(_x(t,TU),15).a)>(n=T/g))FE(e);else{N=0,o=RP;do{f=o,o=(n=T/++N/(g*N))-r<=0?0-(n-r):n-r}while(n>r);for(fN?1:N)|0,m=_,O=!0;u=_&&(O=!0),++m,++u}for(l=new Kv(t.c,0);l.b "+this.a+" "+dh(this.c)},tL.a=0,tL.b=0,tL.d=0,Bg(AP,"SplineSelfLoopRouter/LoopPadding",91),ZT(521,1,yP,Qf),tL.D=function(t){return function(t,e){return!!function(t){switch(t.e){case 0:return rV;case 1:return tV;case 2:return Jz;case 3:return aV;case 4:return oV;case 5:return hV;case 6:return lV;case 7:return iV;case 8:return eV;case 9:return nV;case 11:return cV;case 10:return sV;default:return uV}}(t.b).kb(e.c)&&(function(t){return t==Zz||t==Xz}(t.b)?!(Wf(e.d,t.c,t.a)&&Wf(e.a,t.c,t.a)):Wf(e.d,t.c,t.a)&&Wf(e.a,t.c,t.a))}(this,zf(t,91))},tL.a=0,tL.c=0,Bg(AP,"SplineSelfLoopRouter/LoopPadding/EnclosingPredicate",521),ZT(520,1,kL,te),tL.$b=function(t,e){return function(t,e){return Ix(e.b,t.b)}(zf(t,91),zf(e,91))},Bg(AP,"SplineSelfLoopRouter/LoopPadding/MarginComparator",520),ZT(196,1,yP,kn),tL.D=function(t){return zf(t,91).c==this.a},Bg(AP,"SplineSelfLoopRouter/LoopPadding/PortSidePredicate",196),ZT(195,1,{195:1},xb),tL.c=0,tL.d=0,tL.e=0,Bg(AP,"SplineSelfLoopRouter/SelfLoopEdge",195),ZT(519,1,kL,ee),tL.$b=function(t,e){return function(t,e){return t.d-e.d}(zf(t,195),zf(e,195))},Bg(AP,"SplineSelfLoopRouter/SelfLoopEdge/StepSizeComparator",519),ZT(82,25,{25:1,82:1},CT),tL.vc=function(){var t,e;for(t=Ak(this.a,0);t.b!=t.d.c;)zf(Ab(t),10).a=this.j.d;for(e=Ak(this.c,0);e.b!=e.d.c;)zf(Ab(e),10).a=this.j.d},tL.wc=function(){return this.b},tL.xc=function(){return this.e},tL.w=function(){return eC(new Vn(this.d.a))},tL.b=0,tL.e=0,Bg(FP,"CLEdge",82),ZT(93,25,{25:1,93:1},nI),tL.vc=function(){this.b.i.a=this.j.d+this.b.e.b},tL.wc=function(){return this.b.g==(DN(),PF)?0:this.a},tL.xc=function(){return this.b.g==(DN(),PF)?0:this.c},tL.w=function(){return zk(_x(this.b,(qS(),iX)))},tL.a=0,tL.c=0,Bg(FP,"CLNode",93),ZT(175,17,{175:1,3:1,23:1,17:1},Ps);var fY,dY,gY,pY,vY,bY,yY,wY=Jy(FP,"ConstraintCalculationStrategy",175,DD,function(){return Cb(),Cx(Lo(wY,1),GL,175,0,[uY,lY])});ZT(125,17,{125:1,3:1,23:1,17:1},Ds);var mY,xY,EY,_Y=Jy(FP,"GraphCompactionStrategy",125,DD,function(){return dC(),Cx(Lo(_Y,1),GL,125,0,[bY,gY,yY,vY,pY,dY])});ZT(455,1,_P,zu),tL.sc=function(t,e){var n,r,i;if((r=zf(_x(t,(ZS(),uW)),125))!=(dC(),bY)){switch(F_(e,"Horizontal Compaction",1),this.a=t,po(n=new yT(function(t,e){var n,r,i;t.d=e,yy(t.b),t.c=!1;t:for(n=new $n(t.d.c);n.ao.j.e+o.j.b?d.d=!0:(d.d=!0,d.c=!0))),r.b!=r.d.c&&(e=n);d&&(a=zf(Qg(y,c.d.f),25),e.ba.j.e+a.j.b?d.d=!0:(d.d=!0,d.c=!0))}for(u=Sg(UE(v));JE(u);)0!=(c=zf(Cv(u),12)).a.b&&(e=zf(Gl(c.a),10),c.d.g==(yS(),SB)&&((_=new OA(e,new Ja(e.a,o.j.e),o,c)).c=!0,E.c[E.c.length]=_),c.d.g==qB&&((_=new OA(e,new Ja(e.a,o.j.e+o.j.b),o,c)).d=!0,E.c[E.c.length]=_))}if(0!=E.c.length){for(Yp(),mb(E,null),xy(0,E.c.length),i=new CT(zf(E.c[0],142),t.d),f=1;f(r=Math.ceil(r))?0:r,e.o&&o.o&&fl(e,82)&&fl(o,82)&&!Sw(Kw(zf(e,82).d,zf(o,82).d))?(i=il(new jr,t.d),s=wv(Lc(o.g.a-e.g.a)),yA(ga(va(ba(pa(new Rr,0>s?0:s),1),i),t.c[e.f.d])),yA(ga(va(ba(pa(new Rr,0>-s?0:-s),1),i),t.c[o.f.d]))):(u=1,(fl(e,82)&&fl(o,93)||fl(o,82)&&fl(e,93))&&(u=2),yA(ga(va(ba(pa(new Rr,wv(r)),u),t.c[e.f.d]),t.c[o.f.d]))))}(this),function(t){var e,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b;for(xl(),l=new kr,c=new qs,r=new $n(t.a.a.b);r.ae.j.d){if((d=t.c[e.f.d])==(v=t.c[h.f.d]))continue;yA(ga(va(ba(pa(new Rr,1),100),d),v))}}}(this),function(t){var e,n,r,i,o,a;for(i=new uo,r=new $n(t.d.a);r.a1)for(e=il(wa(new jr,t.b++),t.d),a=Ak(i,0);a.b!=a.d.c;)o=zf(Ab(a),61),yA(ga(va(ba(pa(new Rr,1),0),e),o))}(this),pI(Qh(this.d),new zh),i=new $n(this.a.a.b);i.a0&&(this.a[G.k]=K++)}else{for(M=0,F=new $n(C.f);F.a0&&++K}for(et=0,I=0,L=e.length;I0;){for(Ou(z.b>0),Y=0,a=new $n((G=zf(z.a.sb(z.c=--z.b),7)).b);a.a0&&(G.g==(yS(),SB)?(this.a[G.k]=et,++et):(this.a[G.k]=et+P+R,++R))}et+=R}else{for(M=0,F=new $n(C.f);F.a0&&++et}for(H=new kr,g=new Qi,T=0,O=t.length;Tl.c&&(l.c=V)):G.f.d==Z&&(Vl.d&&(l.d=V));for(Fk(p,0,p.length,(tc(),tc(),FW)),tt=ky(rq,pM,26,p.length,12,1),n=ky(rq,pM,26,et+1,12,1),b=0;b0;)x%2>0&&(r+=it[x+1]),++it[x=(x-1)/2|0];for(k=ky(NY,jL,158,2*p.length,0,1),m=0;me.f?1:t.ge.g?1:t.b-e.b}(this,zf(t,204))},tL.b=0,tL.c=0,tL.d=0,tL.f=0,tL.g=0;var kY=Bg(HP,"BetweenLayerHyperedgeAllCrossingsCounter/Hyperedge",204);ZT(158,1,{158:1,23:1},Ep),tL.F=function(t){return function(t,e){return t.ce.c?1:t.be.b?1:t.a!=e.a?t.a.b-e.a.b:0==t.d&&1==e.d?-1:1==t.d&&0==e.d?1:0}(this,zf(t,158))},tL.b=0,tL.c=0,tL.d=0;var NY=Bg(HP,"BetweenLayerHyperedgeAllCrossingsCounter/HyperedgeCorner",158);ZT(611,339,{},Xi),tL.Gc=function(t,e){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,_;for(_=0,i=0,a=t[0].d,w=e[0].d,u=0,h=e.length;u0;){for(Ou(y.b>0),b=0,r=new $n((p=zf(y.a.sb(y.c=--y.b),7)).b);r.a0&&(p.g==(yS(),SB)?(this.a[p.k]=_,++_):(this.a[p.k]=_+d+g,++g),i+=b)}_+=g}else{for(f=0,v=new $n(s.f);v.a0&&(++_,i+=f)}for(m=ky(rq,pM,26,i,12,1),o=0,c=0,l=t.length;c0;)o%2>0&&(r+=s[o+1]),++s[o=(o-1)/2|0];return r}(_,i,m),n},Bg(HP,"BetweenLayerStraightEdgeAllCrossingsCounter",611),ZT(338,1,{},gC),tL.b=0,tL.e=!1,Bg(HP,"CrossingMatrixFiller",338),ZT(447,1,_P,ne),tL.sc=function(t,e){var n,r;F_(e,"Greedy switch crossing reduction",1),this.e=zf(_x(t,(ZS(),$X)),110),t.c.c.length<2||this.e==(kO(),uU)||(function(t,e){var n,r,i,o,a,s,c,u;for(t.f=e,i=e.c.c.length,t.a=ky(GF,lL,51,i,0,2),t.d=ky(GF,lL,51,i,0,2),t.g=ky(GF,lL,51,i,0,2),a=new Kv(e.c,0);a.bMh(t.d,ju(e.a,e.b))?-1:t.c==e.c&&ju(t.a,t.b)==ju(t.a,t.b)?0:1}(this,zf(t,226))},tL.w=function(){return"ComparableEdgeAndPort [port="+this.b+", edge="+this.a+", portPosition="+this.c+"]"},tL.c=0,Bg(HP,"InLayerEdgeTwoNodeCrossingCounter/ComparableEdgeAndPort",226),ZT(612,1,{},Jk),tL.e=!0,tL.f=0,tL.g=0,tL.k=!1,Bg(HP,"NorthSouthEdgeAllCrossingsCounter",612),ZT(615,1,{},Um),tL.b=0,tL.d=0,tL.e=!1,Bg(HP,"NorthSouthEdgeNeighbouringNodeCrossingsCounter",615),ZT(143,1,oM,Yh),tL.mb=function(){return vA(this)},tL.b=0,Bg(HP,"PortIterable",143),ZT(344,1,UL,Ov),tL.H=function(){return zf(fg(this.a),7)},tL.G=function(){return this.a.b>0},tL.I=function(){throw new Kr},Bg(HP,"PortIterable/1",344),ZT(336,1,{},BN),Bg(HP,"SwitchDecider",336),ZT(89,1,{89:1},re),tL.w=function(){return"NEdge[id="+this.b+" w="+this.f+" d="+this.a+"]"},tL.a=1,tL.b=0,tL.e=!1,tL.f=0;var CY=Bg(zP,"NEdge",89);ZT(157,1,{},Rr),Bg(zP,"NEdge/NEdgeBuilder",157),ZT(278,1,{},Dr),Bg(zP,"NGraph",278),ZT(61,1,{61:1},Db),tL.b=0,tL.d=-1,tL.e=0,tL.i=-1,tL.j=!1;var TY,AY,IY=Bg(zP,"NNode",61);ZT(333,13,mP,zr),tL.rb=function(t,e){++this.d,my(t,this.c.length),Tc(this.c,t,e)},tL.ib=function(t){return kg(this,t)},tL.jb=function(t){return++this.d,ix(this,t)},tL.Q=function(){++this.d,this.c=ky(kD,jL,1,0,4,1)},tL.vb=function(t){return++this.d,by(this,t)},tL.nb=function(t){return Pu(this,t)},Bg(zP,"NNode/ChangeAwareArrayList",333),ZT(199,1,{},jr),Bg(zP,"NNode/NNodeBuilder",199),ZT(595,1,{},ie),tL.a=!1,tL.f=bL,tL.j=0,Bg(zP,"NetworkSimplex",595),ZT(193,17,{180:1,193:1,3:1,23:1,17:1},Rs),tL.rc=function(){switch(this.e){case 0:return new Lf;case 1:return new Ee;default:throw new ao("No implementation is available for the cycle breaker "+(null!=this.d?this.d:""+this.e))}};var OY,SY,LY,MY,PY,DY,RY=Jy(UP,"CycleBreakingStrategy",193,DD,function(){return Vp(),Cx(Lo(RY,1),GL,193,0,[TY,AY])});ZT(539,1,XP,Lf),tL.qc=function(t){return SY},tL.sc=function(t,e){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,_,k,N,C,T,A,I,O,S;for(F_(e,"Greedy cycle removal",1),S=(b=t.b).c.length,this.a=ky(rq,pM,26,S,12,1),this.c=ky(rq,pM,26,S,12,1),this.b=ky(rq,pM,26,S,12,1),s=0,p=new $n(b);p.a0?N+1:1);for(i=new $n(m.e);i.a0?N+1:1)}0==this.c[s]?If(this.d,d):0==this.a[s]&&If(this.e,d),++s}for(f=-1,h=1,u=new Re,C=zf(_x(t,(qS(),vX)),154);S>0;){for(;0!=this.d.b;)A=zf(wf(this.d),9),this.b[A.k]=f--,MI(this,A),--S;for(;0!=this.e.b;)I=zf(wf(this.e),9),this.b[I.k]=h++,MI(this,I),--S;if(S>0){for(l=_L,v=new $n(b);v.a=l&&(y>l&&(u.c=ky(kD,jL,1,0,4,1),l=y),u.c[u.c.length]=d);c=zf(gd(u,qk(C,u.c.length)),9),this.b[c.k]=h++,MI(this,c),--S}}for(T=b.c.length+1,s=0;sthis.b[O]&&($I(n,!0),Ky(t,FU,(Vd(),Vd(),TW)));this.a=null,this.c=null,this.b=null,Lp(this.e),Lp(this.d),FE(e)},Bg(UP,"GreedyCycleBreaker",539),ZT(540,1,XP,Ee),tL.qc=function(t){return LY},tL.sc=function(t,e){var n,r,i,o,a,s,c,u,l,h,f,d;for(F_(e,"Interactive cycle breaking",1),u=new Re,h=new $n(t.b);h.a0&&OC(this,a,u);for(r=new $n(u);r.a(a=s+u.j.a)?s+1:a,p=new Kv(n,0),r=null;p.b=a){Ou(p.b>0),p.a.sb(p.c=--p.b);break}d.a>s&&(r?(ix(r.b,d.b),r.a=Go(r.a,d.a),cp(p)):(Of(d.b,u),d.c=Yo(d.c,s),d.a=Go(d.a,a),r=d))}r||((r=new Br).c=s,r.a=a,tf(p,r),Of(r.b,u))}for(o=t.c,c=0,g=new $n(n);g.a0&&(n+=a.i.a+a.j.a/2,++u),l=new $n(a.f);l.a1&&(t.c[l]=!0):y.g==KB&&y.e.c.length+y.b.c.length>1&&(t.d[l]=!0)}p.g==(DN(),BF)&&(++s[l],o[l]=!0)}for(n=!0,g=!0,a=0;a0;T++){c=(u=0!=OT(C,1))?0:p-1,s=this.b[c],k=0!=OT(C,1)?E:y,n_(s,i,u,!1,!0),o=bL,a=!0;do{if(Pm(this.b,this.k),N=o,o=0,o+=rw(this.f,s,c),u){for(v=1;v=0;v--)l=this.b[v],vy(k,s,(em(),PX)),n_(l,i,!1,!a,!1),o+=rw(this.f,l,v),this.c[v]||this.d[v+1]?o+=$S(this.e,l,s):o+=YS(this.i,l,s),s=l;c=0}a=!1,u=!u}while(o0);(or?o:r;if(o>a){for(l=b_(t,n).mb();l.G();)f[(u=zf(l.H(),7)).k]=e+YT(n,u.g)-a;return o-a}return 0}switch(n.e){case 1:for(i=0,s=0,h=new $n(t.f);h.a"),te.e?1:t.fe.f?1:hh(t)-hh(e)}(this,zf(t,197))},tL.b=0,tL.c=0,tL.e=0,tL.f=0;var JY=Bg(nD,"HyperedgeCrossingsCounter/Hyperedge",197);ZT(156,1,{156:1,23:1},Bp),tL.F=function(t){return function(t,e){return t.ce.c?1:t.be.b?1:t.a!=e.a?hh(t.a)-hh(e.a):t.d==(lb(),ez)&&e.d==tz?-1:t.d==tz&&e.d==ez?1:0}(this,zf(t,156))},tL.b=0,tL.c=0;var tz,ez,nz=Bg(nD,"HyperedgeCrossingsCounter/HyperedgeCorner",156);ZT(242,17,{242:1,3:1,23:1,17:1},ac);var rz,iz,oz,az,sz=Jy(nD,"HyperedgeCrossingsCounter/HyperedgeCorner/Type",242,DD,function(){return lb(),Cx(Lo(sz,1),GL,242,0,[ez,tz])});ZT(545,1,XP,Ae),tL.qc=function(t){return zf(_x(t,(qS(),WU)),18).kb((KA(),eU))?rz:null},tL.sc=function(t,e){var n;for(F_(e,"Interactive node placement",1),this.a=zf(_x(t,(qS(),mX)),134),n=new $n(t.c);n.a(C=zf(_x(n,(qS(),gX)),24).a)?h:C;for(r=new $n(k.e);r.a(C=zf(_x(n,(qS(),gX)),24).a)?_:C}Ky(w,oz,WE(h)),Ky(w,az,WE(_))}for(v=0,f=new $n(e.c);f.a=0){for(c=null,s=new Kv(l.a,u+1);s.b0&&u[r]&&(g=nf(t.b,u[r],c)),p=Go(p,i.d.c.b+g);for(o=new $n(l.f);o.am)?(c=2,a=bL):0==c?(c=1,a=E):(c=0,a=E):(f=E>=a||a-E0?(l=zf(gd(h.d.a,o-1),9),_=kf(t.b,h,l),p=h.i.b-h.e.d-(l.i.b+l.j.b+l.e.a+_)):p=h.i.b-h.e.d,c=p0?_:0,d.c=n,d.d=zf(Qg(w,u.c.f),61),kg(d.c.g,d),kg(d.d.c,d),(C=new re).f=Rk(u),C.a=_<0?-_:0,C.c=n,C.d=zf(Qg(w,u.d.f),61),kg(C.c.g,C),kg(C.d.c,C));for(i=zf(_x(t,(ZS(),gW)),24).a*wv(Math.sqrt(y)),pI(vo(bo(Qh(r),i),!1),Lm(e,1)),p=new $n(r.a);p.aa&&(a=zf(_x(n,gX),24).a);for(r=Sg(UE(s));JE(r);)n=zf(Cv(r),12),s.d!=n.c.f.d&&zf(_x(n,(qS(),gX)),24).a==a&&Of(u,new ts(n.c.f,n));mb(u,t.c),Sd(t.b,s.k,u)}}(h,t),h.f=Il(h.d),function(t,e){var n,r,i,o,a,s,c,u;for(o=new $n(e.c);o.aa&&(a=zf(_x(n,gX),24).a);for(r=Sg(XE(s));JE(r);)n=zf(Cv(r),12),s.d!=n.d.f.d&&zf(_x(n,(qS(),gX)),24).a==a&&Of(u,new ts(n.d.f,n));mb(u,t.c),Sd(t.f,s.k,u)}}(h,t),h}(t),this.a=ro(io(Ah(_x(t,(ZS(),VX))))),this.e=Zc(_x(t,KX))===Zc((LN(),VV)),function(t,e){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w;if(!((p=e.c.c.length)<3)){for(d=ky(rq,pM,26,p,12,1),h=0,l=new $n(e.c);l.aa)&&Cg(t.c,zf(v.b,12));++s}o=a}}}(this,t),Nw(4,fM),f=new sw(4),zf(_x(t,KX),124).e){case 3:d=new bA(t,this.d.d,(cb(),mz),(fv(),bz)),f.c[f.c.length]=d;break;case 1:g=new bA(t,this.d.d,(cb(),xz),(fv(),bz)),f.c[f.c.length]=g;break;case 4:b=new bA(t,this.d.d,(cb(),mz),(fv(),yz)),f.c[f.c.length]=b;break;case 2:y=new bA(t,this.d.d,(cb(),xz),(fv(),yz)),f.c[f.c.length]=y;break;default:d=new bA(t,this.d.d,(cb(),mz),(fv(),bz)),g=new bA(t,this.d.d,xz,bz),b=new bA(t,this.d.d,mz,yz),y=new bA(t,this.d.d,xz,yz),f.c[f.c.length]=b,f.c[f.c.length]=y,f.c[f.c.length]=d,f.c[f.c.length]=g}for(n=new dc(t,this.d),o=new $n(f);o.aE[c]&&(g=c),l=new $n(t.b.c);l.amT(r))&&(u=r);for(!u&&(xy(0,f.c.length),u=zf(f.c[0],81)),h=new $n(t.c);h.a0?1:r<0?-1:0)}(this,zf(t,27),zf(e,27))},Bg(oD,"NeighborhoodInformation/NeighborComparator",598),ZT(334,1,{}),Bg(oD,"ThresholdStrategy",334),ZT(602,334,{},_i),tL.Ic=function(t,e,n){return this.a.k==(cb(),xz)?hP:fP},tL.Jc=function(){},Bg(oD,"ThresholdStrategy/NullThresholdStrategy",602),ZT(249,1,{249:1},gc),tL.c=!1,tL.d=!1,Bg(oD,"ThresholdStrategy/Postprocessable",249),ZT(603,334,{},ki),tL.Ic=function(t,e,n){var r,i,o;return i=e==n,r=this.a.a[n.k]==e,i||r?(o=t,this.a.c,fv(),i&&(o=aO(this,e,!0)),(o==1/0||o==-1/0)&&r&&(o=aO(this,n,!1)),o):t},tL.Jc=function(){for(var t,e,n;0!=this.d.b;)(e=JA(this,n=zf(Qp(this.d),249))).a&&(t=e.a,this.c.a[t.c.f.d.k]!==this.c.a[t.d.f.d.k]&&(jT(this,n)||cu(this.e,n)));for(;0!=this.e.a.c.length;)jT(this,zf(zx(this.e),249))},Bg(oD,"ThresholdStrategy/SimpleThresholdStrategy",603),ZT(423,1,{180:1},ue),tL.rc=function(){switch(this.a.e){case 1:return new Hc;case 3:return new Me;default:return new Le}},Bg(aD,"EdgeRouterFactory",423),ZT(538,1,XP,Le),tL.qc=function(t){var e,n;return n=zf(_x(t,(qS(),WU)),18),e=new r_,n.kb((KA(),nU))&&(Sm(e,Sz),Sm(e,Mz)),(n.kb(iU)||ro(io(Ah(_x(t,(ZS(),ZX))))))&&(Sm(e,Mz),n.kb(oU)&&Sm(e,Pz)),n.kb(eU)&&Sm(e,Oz),n.kb(sU)&&Sm(e,Dz),n.kb(rU)&&Sm(e,Lz),n.kb(QV)&&Sm(e,Az),n.kb(tU)&&Sm(e,Iz),e},tL.sc=function(t,e){var n,r,i,o,a,s,c,u,l,h,f,d;F_(e,"Orthogonal edge routing",1),f=zf(_x(t,(qS(),mX)),134),ro(io(Ah(_x(t,(QS(),fj))))),l=new wC(0,f.a),d=0,o=new Kv(t.c,0),a=null,s=null;do{u=(c=o.b0?(n=f.b+(h-1)*f.a,c&&(n+=f.b),n"+this.b},tL.c=0,Bg(aD,"OrthogonalRoutingGenerator/Dependency",118),ZT(80,1,{80:1,23:1},Wm),tL.F=function(t){return function(t,e){return t.d-e.d}(this,zf(t,80))},tL.t=function(t){var e;return!!fl(t,80)&&(e=zf(t,80),this.d==e.d)},tL.v=function(){return this.d},tL.w=function(){var t,e,n,r;for(t=new qo("{"),r=new $n(this.g);r.aEP&&(i=new Ja(c,h),If(n.a,i),qA(this.a,n,t,i,!1),o=new Ja(l,h),If(n.a,o),qA(this.a,n,t,o,!1))},tL.Lc=function(t){return t.f.i.a+t.i.a+t.a.a},tL.Mc=function(){return yS(),qB},tL.Nc=function(){return yS(),SB},Bg(aD,"OrthogonalRoutingGenerator/NorthToSouthRoutingStrategy",580),ZT(581,1,{},jn),tL.Kc=function(t,e){var n,r,i,o,a,s,c,u,l,h;for(h=e-t.i*this.a.c,s=new $n(t.g);s.aEP&&(i=new Ja(c,h),If(n.a,i),qA(this.a,n,t,i,!1),o=new Ja(l,h),If(n.a,o),qA(this.a,n,t,o,!1))},tL.Lc=function(t){return t.f.i.a+t.i.a+t.a.a},tL.Mc=function(){return yS(),SB},tL.Nc=function(){return yS(),qB},Bg(aD,"OrthogonalRoutingGenerator/SouthToNorthRoutingStrategy",581),ZT(579,1,{},Bn),tL.Kc=function(t,e){var n,r,i,o,a,s,c,u,l,h;for(h=e+t.i*this.a.c,s=new $n(t.g);s.aEP&&(i=new Ja(h,c),If(n.a,i),qA(this.a,n,t,i,!0),o=new Ja(h,l),If(n.a,o),qA(this.a,n,t,o,!0))},tL.Lc=function(t){return t.f.i.b+t.i.b+t.a.b},tL.Mc=function(){return yS(),OB},tL.Nc=function(){return yS(),KB},Bg(aD,"OrthogonalRoutingGenerator/WestToEastRoutingStrategy",579),ZT(535,1,XP,Hc),tL.qc=function(t){var e,n;return n=zf(_x(t,(qS(),WU)),18),e=new r_,(n.kb((KA(),iU))||ro(io(Ah(_x(t,(ZS(),ZX))))))&&(Sm(e,Bz),n.kb(oU)&&Sm(e,Gz)),n.kb(QV)&&Sm(e,Rz),n.kb(tU)&&Sm(e,jz),e},tL.sc=function(t,e){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x;for(F_(e,"Polyline edge routing",1),h=zf(_x(t,(qS(),wX)),15).a,n=zf(_x(t,(ZS(),qX)),15).a,v=0,0!=t.c.c.length&&(v=.4*n*(b=GT(zf(gd(t.c,0),16)))),o=new Kv(t.c,0);o.b0&&(v-=h),PO(i,v),c=0,l=new $n(i.a);l.a(p-g<=0?0-(p-g):p-g)?s:p-g<=0?0-(p-g):p-g;switch(u.g.e){case 0:case 4:case 1:case 3:uO(this,u,v)}c=c>s?c:s}o.b(b=GT((Ou(o.b0),o.a.sb(o.c=--o.b)),a=.4*n*c,!r&&o.b0?((f=(b+1)*this.a)=0&&(O+=(b+2)*this.a)}p=m,c=u}while(m);for(r=new $n(T);r.a("+this.c+") "+this.b},tL.c=0,Bg(sD,"SplineEdgeRouter/Dependency",117),ZT(223,17,{223:1,3:1,23:1,17:1},pc);var NV,CV,TV,AV,IV,OV,SV=Jy(sD,"SplineEdgeRouter/SideToProcess",223,DD,function(){return dv(),Cx(Lo(SV,1),GL,223,0,[EV,_V])});ZT(77,1,{77:1,23:1},KC,LO),tL.F=function(t){return function(t,e){return t.i-e.i}(this,zf(t,77))},tL.a=0,tL.b=0,tL.e=0,tL.f=!1,tL.i=0,tL.k=0,tL.n=0,tL.p=0,Bg(sD,"SplineEdgeRouter/SplineHyperEdge",77),ZT(123,17,{123:1,3:1,23:1,17:1},vc);var LV,MV,PV,DV,RV=Jy(fD,"ContentAlignment",123,DD,function(){return MN(),Cx(Lo(RV,1),GL,123,0,[OV,IV,AV,CV,NV,TV])});ZT(218,17,{218:1,3:1,23:1,17:1},bc);var jV,BV,GV,FV,HV,YV=Jy(fD,"EdgeConstraint",218,DD,function(){return Px(),Cx(Lo(YV,1),GL,218,0,[PV,MV,DV])});ZT(115,17,{115:1,3:1,23:1,17:1},yc);var zV,VV,UV,XV,WV,qV,ZV,KV=Jy(fD,"EdgeLabelSideSelection",115,DD,function(){return yN(),Cx(Lo(KV,1),GL,115,0,[BV,jV,FV,GV,HV])});ZT(124,17,{124:1,3:1,23:1,17:1},wc);var $V,QV,JV,tU,eU,nU,rU,iU,oU,aU,sU,cU=Jy(fD,"FixedAlignment",124,DD,function(){return LN(),Cx(Lo(cU,1),GL,124,0,[WV,XV,ZV,UV,qV,VV])});ZT(113,17,{113:1,3:1,23:1,17:1},mc);var uU,lU,hU,fU,dU,gU,pU,vU,bU=Jy(fD,"GraphProperties",113,DD,function(){return KA(),Cx(Lo(bU,1),GL,113,0,[JV,eU,nU,rU,iU,oU,sU,QV,tU,aU])});ZT(110,17,{110:1,3:1,23:1,17:1},_b),tL.a=!1,tL.b=!1,tL.c=!1;var yU,wU,mU,xU,EU=Jy(fD,"GreedySwitchType",110,DD,function(){return kO(),Cx(Lo(EU,1),GL,110,0,[lU,gU,hU,pU,fU,vU,dU,uU])});ZT(140,17,{140:1,3:1,23:1,17:1},xc);var _U,kU,NU=Jy(fD,"InLayerConstraint",140,DD,function(){return Rw(),Cx(Lo(NU,1),GL,140,0,[mU,xU,wU])});ZT(174,17,{174:1,3:1,23:1,17:1},Ec);var CU,TU,AU,IU,OU,SU,LU,MU,PU,DU,RU,jU,BU,GU,FU,HU,YU,zU,VU,UU,XU,WU,qU,ZU,KU,$U,QU,JU,tX,eX,nX,rX,iX,oX,aX,sX,cX,uX,lX,hX,fX,dX,gX,pX,vX,bX,yX,wX,mX,xX,EX,_X,kX,NX,CX,TX,AX,IX,OX,SX,LX=Jy(fD,"InteractiveReferencePoint",174,DD,function(){return sb(),Cx(Lo(LX,1),GL,174,0,[_U,kU])});ZT(85,17,{85:1,3:1,23:1,17:1},_c);var MX,PX,DX,RX,jX=Jy(fD,"LayerConstraint",85,DD,function(){return Uk(),Cx(Lo(jX,1),GL,85,0,[SX,TX,AX,IX,OX])});ZT(219,17,{219:1,3:1,23:1,17:1},kc);var BX,GX,FX,HX,YX,zX,VX,UX,XX,WX,qX,ZX,KX,$X,QX,JX,tW,eW,nW,rW,iW,oW,aW,sW,cW,uW,lW,hW,fW,dW,gW,pW,vW,bW,yW,wW=Jy(fD,"PortType",219,DD,function(){return em(),Cx(Lo(wW,1),GL,219,0,[RX,PX,DX])});ZT(153,17,{153:1,3:1,23:1,17:1},Nc);var mW,xW,EW,_W,kW=Jy(fD,"SelfLoopPlacement",153,DD,function(){return L_(),Cx(Lo(kW,1),GL,153,0,[vW,yW,bW])});ZT(134,1,{134:1},gS),tL.a=0,tL.b=0,tL.c=0,tL.d=0,tL.e=0,tL.f=0,Bg(fD,"Spacings",134),ZT(172,17,{172:1,3:1,23:1,17:1},Cc);var NW,CW,TW,AW=Jy(fD,"WideNodesStrategy",172,DD,function(){return Bm(),Cx(Lo(AW,1),GL,172,0,[xW,EW,_W])});ZT(644,1,{}),Bg(LL,"OutputStream",644),ZT(645,644,{}),Bg(LL,"FilterOutputStream",645),ZT(291,645,{},he),Bg(LL,"PrintStream",291),ZT(255,1,{}),tL.w=function(){return this.a},Bg(IL,"AbstractStringBuilder",255),ZT(621,95,fL,Ni),Bg(IL,"ArrayIndexOutOfBoundsException",621),ZT(290,72,fL,Wr,Eo),Bg(IL,"ArrayStoreException",290),ZT(252,46,hL),Bg(IL,"Error",252),ZT(84,252,hL,_r,aw),Bg(IL,"AssertionError",84),oL={3:1,349:1,23:1};var IW=Bg(IL,"Boolean",349);aL={3:1,23:1,184:1,231:1};var OW=Bg(IL,"Double",184);ZT(15,231,{3:1,23:1,15:1,231:1},Fn,Hn),tL.F=function(t){return function(t,e){return Ix(t.a,e.a)}(this,zf(t,15))},tL.t=function(t){return fl(t,15)&&zf(t,15).a==this.a},tL.v=function(){return wv(this.a)},tL.w=function(){return t=this.a,ai(),""+t;var t},tL.a=0;var SW,LW,MW=Bg(IL,"Float",15);ZT(101,72,fL,qr,_o),Bg(IL,"IllegalStateException",101),ZT(608,72,fL,ko),Bg(IL,"NegativeArraySizeException",608),ZT(76,72,{3:1,54:1,76:1,46:1},Zr,No),Bg(IL,"NullPointerException",76),ZT(130,29,{3:1,54:1,29:1,130:1,46:1},Ci,Zo),Bg(IL,"NumberFormatException",130),ZT(146,1,{3:1,146:1},Gp),tL.t=function(t){var e;return!!fl(t,146)&&(e=zf(t,146),this.c==e.c&&Tp(this.d,e.d)&&Tp(this.a,e.a)&&Tp(this.b,e.b))},tL.v=function(){return qx(Cx(Lo(kD,1),jL,1,4,[WE(this.c),this.a,this.d,this.b]))},tL.w=function(){return this.a+"."+this.d+"("+(null!=this.b?this.b:"Unknown Source")+(this.c>=0?":"+this.c:"")+")"},tL.c=0;var PW,DW,RW,jW,BW,GW,FW,HW,YW=Bg(IL,"StackTraceElement",146);ZT(98,255,{345:1},Jo,ta,qo),Bg(IL,"StringBuilder",98),ZT(45,72,{3:1,54:1,46:1,45:1},Kr,Co),Bg(IL,"UnsupportedOperationException",45),ZT(213,638,XL),tL.Q=function(){yy(this)},tL.R=function(t){return Uy(this,t)},tL.ab=function(t){return Qx(this,t,this.e)||Qx(this,t,this.d)},tL.bb=function(){return new Yn(this)},tL.cb=function(t){return Qg(this,t)},tL.db=function(t,e){return wp(this,t,e)},tL.eb=function(t){return Kd(this,t)},tL.Y=function(){return Fs(this)},Bg(WL,"AbstractHashMap",213),ZT(120,641,ZL,Yn),tL.Q=function(){this.a.Q()},tL.kb=function(t){return hb(this,t)},tL.mb=function(){return new Xx(this.a)},tL.nb=function(t){var e;return!!hb(this,t)&&(e=zf(t,21).yb(),this.a.eb(e),!0)},tL.Y=function(){return this.a.Y()},Bg(WL,"AbstractHashMap/EntrySet",120),ZT(148,1,UL,Xx),tL.H=function(){return zw(this)},tL.G=function(){return this.b},tL.I=function(){Fy(this)},tL.b=!1,Bg(WL,"AbstractHashMap/EntrySetIterator",148),ZT(162,1,UL,zn),tL.G=function(){return this.b0},tL.L=function(){return this.b},tL.M=function(){return fg(this)},tL.N=function(){return this.b-1},tL.O=function(t){ef(this,t)},Bg(WL,"AbstractList/ListIteratorImpl",43),ZT(258,647,KL,Wv),tL.rb=function(t,e){my(t,this.b),this.c.rb(this.a+t,e),++this.b},tL.sb=function(t){return xy(t,this.b),this.c.sb(this.a+t)},tL.vb=function(t){var e;return xy(t,this.b),e=this.c.vb(this.a+t),--this.b,e},tL.wb=function(t,e){return xy(t,this.b),this.c.wb(this.a+t,e)},tL.Y=function(){return this.b},tL.a=0,tL.b=0,Bg(WL,"AbstractList/SubList",258),ZT(36,641,ZL,Vn),tL.Q=function(){this.a.Q()},tL.kb=function(t){return this.a.R(t)},tL.mb=function(){return new Un(this.a.bb().mb())},tL.nb=function(t){return!!this.a.R(t)&&(this.a.eb(t),!0)},tL.Y=function(){return this.a.Y()},Bg(WL,"AbstractMap/1",36),ZT(40,1,UL,Un),tL.G=function(){return this.a.G()},tL.H=function(){return zf(this.a.H(),21).yb()},tL.I=function(){this.a.I()},Bg(WL,"AbstractMap/1/1",40),ZT(211,640,qL,Xn),tL.Q=function(){this.a.Q()},tL.kb=function(t){return this.a.ab(t)},tL.mb=function(){return new Wn(this.a.bb().mb())},tL.Y=function(){return this.a.Y()},Bg(WL,"AbstractMap/2",211),ZT(212,1,UL,Wn),tL.G=function(){return this.a.G()},tL.H=function(){return zf(this.a.H(),21).zb()},tL.I=function(){this.a.I()},Bg(WL,"AbstractMap/2/1",212),ZT(210,1,{210:1,21:1}),tL.t=function(t){var e;return!!fl(t,21)&&(e=zf(t,21),Tp(this.d,e.yb())&&Tp(this.e,e.zb()))},tL.yb=function(){return this.d},tL.zb=function(){return this.e},tL.v=function(){return Gu(this.d)^Gu(this.e)},tL.Ab=function(t){return vf(this,t)},tL.w=function(){return this.d+"="+this.e},Bg(WL,"AbstractMap/AbstractEntry",210),ZT(163,210,{210:1,163:1,21:1},Gc),Bg(WL,"AbstractMap/SimpleEntry",163),ZT(652,1,tM),tL.t=function(t){var e;return!!fl(t,21)&&(e=zf(t,21),Tp(this.yb(),e.yb())&&Tp(this.zb(),e.zb()))},tL.v=function(){return Gu(this.yb())^Gu(this.zb())},tL.w=function(){return this.yb()+"="+this.zb()},Bg(WL,eM,652),ZT(639,638,XL),tL._=function(t){return Ey(this,t)},tL.R=function(t){return Dc(this,t)},tL.bb=function(){return new qn(this)},tL.cb=function(t){return Kc(Jx(this,t))},tL.W=function(){return new Zn(this)},Bg(WL,"AbstractNavigableMap",639),ZT(287,641,ZL,qn),tL.kb=function(t){return fl(t,21)&&Ey(this.b,zf(t,21))},tL.mb=function(){return new hf(this.b)},tL.nb=function(t){var e;return!!fl(t,21)&&(e=zf(t,21),Ry(this.b,e))},tL.Y=function(){return this.b.c},Bg(WL,"AbstractNavigableMap/EntrySet",287),ZT(229,641,JL,Zn),tL.Q=function(){ho(this.a)},tL.kb=function(t){return Dc(this.a,t)},tL.mb=function(){return new Kn(new hf(new Jl(this.a).b))},tL.nb=function(t){return!!Dc(this.a,t)&&(pp(this.a,t),!0)},tL.Y=function(){return this.a.c},Bg(WL,"AbstractNavigableMap/NavigableKeySet",229),ZT(230,1,UL,Kn),tL.G=function(){return Gs(this.a.a)},tL.H=function(){return gh(this.a).yb()},tL.I=function(){nd(this.a)},Bg(WL,"AbstractNavigableMap/NavigableKeySet/1",230),ZT(4,1,UL,$n),tL.G=function(){return dl(this)},tL.H=function(){return Qv(this)},tL.I=function(){hg(this)},tL.a=0,tL.b=-1,Bg(WL,"ArrayList/1",4),ZT(94,647,gD,Qn),tL.kb=function(t){return-1!=function(t,e){var n,r;for(n=0,r=t.Y();n2e3&&(fR=t,dR=r.setTimeout(fa,10)),0==hR++&&(function(t){var e,n;if(t.a){n=null;do{e=t.a,t.a=null,n=AC(e,n)}while(t.a);t.a=n}}((li(),rR)),!0)}();try{return function(t,e,n){return t.apply(e,n)}(t,e,n)}finally{!function(t){t&&function(t){var e,n;if(t.b){n=null;do{e=t.b,t.b=null,n=AC(e,n)}while(t.b);t.b=n}}((li(),rR)),--hR,t&&-1!=dR&&(function(t){r.clearTimeout(t)}(dR),dR=-1)}(i)}}(t,this,arguments)}},uq=uq=function(t,e,n,r){lo();var i=nL;function o(){for(var t=0;t{var r;try{r={cloneDeep:n(8055),constant:n(7334),defaults:n(4684),each:n(6135),filter:n(7612),find:n(7309),flatten:n(5970),forEach:n(9754),forIn:n(2420),has:n(1448),isUndefined:n(2216),last:n(8090),map:n(5378),mapValues:n(3916),max:n(4506),merge:n(5364),min:n(1684),minBy:n(6533),now:n(124),pick:n(4383),range:n(3181),reduce:n(860),sortBy:n(3031),uniqueId:n(7200),values:n(5880),zipObject:n(7248)}}catch(t){}r||(r=window._),t.exports=r},6860:(t,e,n)=>{"use strict";var r=n(6857),i=n(8481),o=n(8073).slack,a=n(8073).longestPath,s=n(8191).alg.preorder,c=n(8191).alg.postorder,u=n(3988).simplify;function l(t){t=u(t),a(t);var e,n=i(t);for(d(n),h(n,t);e=p(n);)b(n,t,e,v(n,t,e))}function h(t,e){var n=c(t,t.nodes());n=n.slice(0,n.length-1),r.forEach(n,function(n){!function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=f(t,e,n)}(t,e,n)})}function f(t,e,n){var i=t.node(n).parent,o=!0,a=e.edge(n,i),s=0;return a||(o=!1,a=e.edge(i,n)),s=a.weight,r.forEach(e.nodeEdges(n),function(r){var a,c,u=r.v===n,l=u?r.w:r.v;if(l!==i){var h=u===o,f=e.edge(r).weight;if(s+=h?f:-f,a=n,c=l,t.hasEdge(a,c)){var d=t.edge(n,l).cutvalue;s+=h?-d:d}}}),s}function d(t,e){arguments.length<2&&(e=t.nodes()[0]),g(t,{},1,e)}function g(t,e,n,i,o){var a=n,s=t.node(i);return e[i]=!0,r.forEach(t.neighbors(i),function(o){r.has(e,o)||(n=g(t,e,n,o,i))}),s.low=a,s.lim=n++,o?s.parent=o:delete s.parent,n}function p(t){return r.find(t.edges(),function(e){return t.edge(e).cutvalue<0})}function v(t,e,n){var i=n.v,a=n.w;e.hasEdge(i,a)||(i=n.w,a=n.v);var s=t.node(i),c=t.node(a),u=s,l=!1;s.lim>c.lim&&(u=c,l=!0);var h=r.filter(e.edges(),function(e){return l===y(0,t.node(e.v),u)&&l!==y(0,t.node(e.w),u)});return r.minBy(h,function(t){return o(e,t)})}function b(t,e,n,i){var o=n.v,a=n.w;t.removeEdge(o,a),t.setEdge(i.v,i.w,{}),d(t),h(t,e),function(t,e){var n=r.find(t.nodes(),function(t){return!e.node(t).parent}),i=s(t,n);i=i.slice(1),r.forEach(i,function(n){var r=t.node(n).parent,i=e.edge(n,r),o=!1;i||(i=e.edge(r,n),o=!0),e.node(n).rank=e.node(r).rank+(o?i.minlen:-i.minlen)})}(t,e)}function y(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=l,l.initLowLimValues=d,l.initCutValues=h,l.calcCutValue=f,l.leaveEdge=p,l.enterEdge=v,l.exchangeEdges=b},6872:t=>{t.exports=''},6926:t=>{t.exports=''},6959:t=>{t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r{t.exports=''},7038:t=>{t.exports="0.8.5"},7068:(t,e,n)=>{var r=n(7217),i=n(5911),o=n(1986),a=n(689),s=n(5861),c=n(6449),u=n(3656),l=n(7167),h="[object Arguments]",f="[object Array]",d="[object Object]",g=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,p,v,b){var y=c(t),w=c(e),m=y?f:s(t),x=w?f:s(e),E=(m=m==h?d:m)==d,_=(x=x==h?d:x)==d,k=m==x;if(k&&u(t)){if(!u(e))return!1;y=!0,E=!1}if(k&&!E)return b||(b=new r),y||l(t)?i(t,e,n,p,v,b):o(t,e,m,n,p,v,b);if(!(1&n)){var N=E&&g.call(t,"__wrapped__"),C=_&&g.call(e,"__wrapped__");if(N||C){var T=N?t.value():t,A=C?e.value():e;return b||(b=new r),v(T,A,n,p,b)}}return!!k&&(b||(b=new r),a(t,e,n,p,v,b))}},7091:(t,e,n)=>{var r=n(8984),i=n(5861),o=n(4894),a=n(5015),s=n(1993);t.exports=function(t){if(null==t)return 0;if(o(t))return a(t)?s(t):t.length;var e=i(t);return"[object Map]"==e||"[object Set]"==e?t.size:r(t).length}},7167:(t,e,n)=>{var r=n(4901),i=n(7301),o=n(6009),a=o&&o.isTypedArray,s=a?i(a):r;t.exports=s},7194:t=>{t.exports=''},7197:t=>{t.exports=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}},7199:(t,e,n)=>{var r=n(9653),i=n(6169),o=n(3201),a=n(3736),s=n(1961);t.exports=function(t,e,n){var c=t.constructor;switch(e){case"[object ArrayBuffer]":return r(t);case"[object Boolean]":case"[object Date]":return new c(+t);case"[object DataView]":return i(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(t,n);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(t);case"[object RegExp]":return o(t);case"[object Symbol]":return a(t)}}},7200:(t,e,n)=>{var r=n(3222),i=0;t.exports=function(t){var e=++i;return r(t)+e}},7217:(t,e,n)=>{var r=n(79),i=n(1420),o=n(938),a=n(3605),s=n(9817),c=n(945);function u(t){var e=this.__data__=new r(t);this.size=e.size}u.prototype.clear=i,u.prototype.delete=o,u.prototype.get=a,u.prototype.has=s,u.prototype.set=c,t.exports=u},7237:t=>{t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},7241:(t,e,n)=>{var r=n(695),i=n(2903),o=n(4894);t.exports=function(t){return o(t)?r(t,!0):i(t)}},7248:(t,e,n)=>{var r=n(6547),i=n(1234);t.exports=function(t,e){return i(t||[],e||[],r)}},7255:(t,e,n)=>{var r=n(7422);t.exports=function(t){return function(e){return r(e,t)}}},7296:(t,e,n)=>{var r,i=n(5481),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!o&&o in t}},7301:t=>{t.exports=function(t){return function(e){return t(e)}}},7309:(t,e,n)=>{var r=n(2006)(n(4713));t.exports=r},7319:t=>{t.exports=''},7334:t=>{t.exports=function(t){return function(){return t}}},7381:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(2128),a=function(t){function e(e){var n=t.call(this)||this,r=e;return r.trigger&&(n.trigger=r.trigger),r.kick&&(n.kick=r.kick),r.drag&&(n.drag=r.drag),r.on&&(n.on=r.on),n.dragstart=n.dragStart=o.Layout.dragStart,n.dragend=n.dragEnd=o.Layout.dragEnd,n}return i(e,t),e.prototype.trigger=function(t){},e.prototype.kick=function(){},e.prototype.drag=function(){},e.prototype.on=function(t,e){return this},e}(o.Layout);e.LayoutAdaptor=a,e.adaptor=function(t){return new a(t)}},7400:(t,e,n)=>{var r=n(9374),i=1/0;t.exports=function(t){return t?(t=r(t))===i||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},7420:(t,e,n)=>{var r=n(7422),i=n(3170),o=n(1769);t.exports=function(t,e,n){for(var a=-1,s=e.length,c={};++a{var r=n(1769),i=n(7797);t.exports=function(t,e){for(var n=0,o=(e=r(e,t)).length;null!=t&&nt.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*i.sign(this.displacementY)),null==this.child||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},o.prototype.propogateDisplacementToChildren=function(t,e){for(var n,r=this.getChild().getNodes(),i=0;i0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.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%u.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=u.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=u.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},n=0;n1)for(s=0;sr&&(r=Math.floor(a.y)),o=Math.floor(a.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new f(l.WORLD_CENTER_X-a.x/2,l.WORLD_CENTER_Y-a.y/2))},y.radialLayout=function(t,e,n){var r=Math.max(this.maxDiagonalInTree(t),c.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(e,null,0,359,0,r);var i=v.calculateBounds(t),o=new b;o.setDeviceOrgX(i.getMinX()),o.setDeviceOrgY(i.getMinY()),o.setWorldOrgX(n.x),o.setWorldOrgY(n.y);for(var a=0;a1;){var b=v[0];v.splice(0,1);var w=l.indexOf(b);w>=0&&l.splice(w,1),g--,h--}f=null!=e?(l.indexOf(v[0])+1)%g:0;for(var m=Math.abs(r-n)/h,x=f;d!=h;x=++x%g){var E=l[x].getOtherEnd(t);if(E!=e){var _=(n+d*m)%360,k=(_+m)%360;y.branchRadialLayout(E,t,_,k,i+o,o),d++}}},y.maxDiagonalInTree=function(t){for(var e=g.MIN_VALUE,n=0;ne&&(e=r)}return e},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){var r="DummyCompound_"+n;t.memberGroups[r]=e[n];var i=e[n][0].getParent(),o=new a(t.graphManager);o.id=r,o.paddingLeft=i.paddingLeft||0,o.paddingRight=i.paddingRight||0,o.paddingBottom=i.paddingBottom||0,o.paddingTop=i.paddingTop||0,t.idToDummyNode[r]=o;var s=t.getGraphManager().add(t.newGraph(),o),c=i.getChild();c.add(o);for(var u=0;u=0;t--){var e=this.compoundOrder[t],n=e.id,r=e.paddingLeft,i=e.paddingTop;this.adjustLocations(this.tiledMemberPack[n],e.rect.x,e.rect.y,r,i)}},y.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach(function(n){var r=t.idToDummyNode[n],i=r.paddingLeft,o=r.paddingTop;t.adjustLocations(e[n],r.rect.x,r.rect.y,i,o)})},y.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 r=n.getNodes(),i=0;i0)return this.toBeTiled[e]=!1,!1;if(null!=o.getChild()){if(!this.getToBeTiled(o))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[o.id]=!1}return this.toBeTiled[e]=!0,!0},y.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),n=0,r=0;rc&&(c=l.rect.height)}n+=c+t.verticalPadding}},y.prototype.tileCompoundMembers=function(t,e){var n=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(r){var i=e[r];n.tiledMemberPack[r]=n.tileNodes(t[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height})},y.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&&(a+=t.verticalPadding);var s=0;a>t.rowHeight[n]&&(s=t.rowHeight[n],t.rowHeight[n]=a,s=t.rowHeight[n]-s),t.height+=s,t.rows[n].push(e)},y.prototype.getShortestRowIndex=function(t){for(var e=-1,n=Number.MAX_VALUE,r=0;rn&&(e=r,n=t.rowWidth[r]);return e},y.prototype.canAddHorizontal=function(t,e,n){var r=this.getShortestRowIndex(t);if(r<0)return!0;var i=t.rowWidth[r];if(i+t.horizontalPadding+e<=t.width)return!0;var o,a,s=0;return t.rowHeight[r]0&&(s=n+t.verticalPadding-t.rowHeight[r]),o=t.width-i>=e+t.horizontalPadding?(t.height+s)/(i+e+t.horizontalPadding):(t.height+s)/t.width,s=n+t.verticalPadding,(a=t.widtho&&e!=n){r.splice(-1,1),t.rows[n].push(i),t.rowWidth[e]=t.rowWidth[e]-o,t.rowWidth[n]=t.rowWidth[n]+o,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var a=Number.MIN_VALUE,s=0;sa&&(a=r[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 l=i;l<=o;l++)c[0]+=this.grid[l][a-1].length+this.grid[l][a].length-1;if(o0)for(l=a;l<=s;l++)c[3]+=this.grid[i-1][l].length+this.grid[i][l].length-1;for(var h,f,d=g.MAX_VALUE,p=0;p{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},7489:t=>{t.exports=''},7494:(t,e,n)=>{var r=n(117),i=n(6454);function o(t){return r.map(t.nodes(),function(e){var n=t.node(e),i=t.parent(e),o={v:e};return r.isUndefined(n)||(o.value=n),r.isUndefined(i)||(o.parent=i),o})}function a(t){return r.map(t.edges(),function(e){var n=t.edge(e),i={v:e.v,w:e.w};return r.isUndefined(e.name)||(i.name=e.name),r.isUndefined(n)||(i.value=n),i})}t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:o(t),edges:a(t)};return r.isUndefined(t.graph())||(e.value=r.clone(t.graph())),e},read:function(t){var e=new i(t.options).setGraph(t.value);return r.each(t.nodes,function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)}),r.each(t.edges,function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)}),e}}},7503:function(t,e,n){var r;r=function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},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=3)}([function(t,e,n){"use strict";var r=n(4),i=n(1),o=n(2),a={addUnnecessaryBendpoints:"de.cau.cs.kieler.klay.layered.unnecessaryBendpoints",alignment:"de.cau.cs.kieler.alignment",aspectRatio:"de.cau.cs.kieler.aspectRatio",borderSpacing:"borderSpacing",compactComponents:"de.cau.cs.kieler.klay.layered.components.compact",compactionStrategy:"de.cau.cs.kieler.klay.layered.nodeplace.compactionStrategy",contentAlignment:"de.cau.cs.kieler.klay.layered.contentAlignment",crossingMinimization:"de.cau.cs.kieler.klay.layered.crossMin",cycleBreaking:"de.cau.cs.kieler.klay.layered.cycleBreaking",debugMode:"de.cau.cs.kieler.debugMode",direction:"de.cau.cs.kieler.direction",edgeLabelSideSelection:"de.cau.cs.kieler.klay.layered.edgeLabelSideSelection",edgeRouting:"de.cau.cs.kieler.edgeRouting",edgeSpacingFactor:"de.cau.cs.kieler.klay.layered.edgeSpacingFactor",feedbackEdges:"de.cau.cs.kieler.klay.layered.feedBackEdges",fixedAlignment:"de.cau.cs.kieler.klay.layered.fixedAlignment",greedySwitchCrossingMinimization:"de.cau.cs.kieler.klay.layered.greedySwitch",hierarchyHandling:"de.cau.cs.kieler.hierarchyHandling",inLayerSpacingFactor:"de.cau.cs.kieler.klay.layered.inLayerSpacingFactor",interactiveReferencePoint:"de.cau.cs.kieler.klay.layered.interactiveReferencePoint",layerConstraint:"de.cau.cs.kieler.klay.layered.layerConstraint",layoutHierarchy:"de.cau.cs.kieler.layoutHierarchy",linearSegmentsDeflectionDampening:"de.cau.cs.kieler.klay.layered.linearSegmentsDeflectionDampening",mergeEdges:"de.cau.cs.kieler.klay.layered.mergeEdges",mergeHierarchyCrossingEdges:"de.cau.cs.kieler.klay.layered.mergeHierarchyEdges",noLayout:"de.cau.cs.kieler.noLayout",nodeLabelPlacement:"de.cau.cs.kieler.nodeLabelPlacement",nodeLayering:"de.cau.cs.kieler.klay.layered.nodeLayering",nodePlacement:"de.cau.cs.kieler.klay.layered.nodePlace",portAlignment:"de.cau.cs.kieler.portAlignment",portAlignmentEastern:"de.cau.cs.kieler.portAlignment.east",portAlignmentNorth:"de.cau.cs.kieler.portAlignment.north",portAlignmentSouth:"de.cau.cs.kieler.portAlignment.south",portAlignmentWest:"de.cau.cs.kieler.portAlignment.west",portConstraints:"de.cau.cs.kieler.portConstraints",portLabelPlacement:"de.cau.cs.kieler.portLabelPlacement",portOffset:"de.cau.cs.kieler.offset",portSide:"de.cau.cs.kieler.portSide",portSpacing:"de.cau.cs.kieler.portSpacing",postCompaction:"de.cau.cs.kieler.klay.layered.postCompaction",priority:"de.cau.cs.kieler.priority",randomizationSeed:"de.cau.cs.kieler.randomSeed",routeSelfLoopInside:"de.cau.cs.kieler.selfLoopInside",separateConnectedComponents:"de.cau.cs.kieler.separateConnComp",sizeConstraint:"de.cau.cs.kieler.sizeConstraint",sizeOptions:"de.cau.cs.kieler.sizeOptions",spacing:"de.cau.cs.kieler.spacing",splineSelfLoopPlacement:"de.cau.cs.kieler.klay.layered.splines.selfLoopPlacement",thoroughness:"de.cau.cs.kieler.klay.layered.thoroughness",wideNodesOnMultipleLayers:"de.cau.cs.kieler.klay.layered.wideNodesOnMultipleLayers"},s=function(t){for(var e=Object.keys(t),n={},r=0;r1?e-1:0),r=1;r{t.exports=''},7534:(t,e,n)=>{var r=n(2552),i=n(346);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},7556:(t,e,n)=>{var r=n(1873),i=n(4932),o=n(6449),a=n(4394),s=r?r.prototype:void 0,c=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(a(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},7568:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(1601),i=n.n(r),o=n(6314),a=n.n(o)()(i());a.push([t.id,".stix-viewer-block {\n display: block;\n overflow: auto;\n position: relative;\n font-size: 0.8em;\n font-family: sans-serif;\n margin: 10px 0px;\n}\n\n.stix-viewer-block .stix-viewer {\n position: relative;\n border: 1px solid #ddd;\n border-radius: 2px;\n}\n\n.stix-viewer-block .viewer-footer {\n padding: 8px;\n\n border-radius: 0 0 2px 2px;\n border-width: 0px 1px 1px 1px;\n border-style: solid;\n border-color: #ddd;\n\n background-color: #f7f7f7; \n line-height: 1.2em;\n}\n\n.stix-viewer-block .stix-viewer .stix-graph {\n width: 100%;\n height: 100%;\n position: relative;\n}\n\n\n.stix-viewer-block .viewer-header {\n padding: 8px;\n font-weight: bold;\n border-radius: 2px 2px 0 0;\n border-width: 1px 1px 0px 1px;\n border-style: solid;\n border-color: #ddd;\n background-color: #f7f7f7; \n color: #586069;\n line-height: 1.2em;\n}\n\n.stix-viewer-block .viewer-header a {\n color: #586069;\n}\n\n.stix-viewer .viewer-placeholder {\n top: 45%;\n position: relative;\n font-family: sans-serif;\n font-size: 2em;\n color: #d6d6d6;\n font-weight: lighter;\n text-align: center;\n}\n\n.stix-viewer-block .dragover-active {\n background-color: #eee;\n}\n\n.stix-viewer-block .loading {\n background-color: #f7f7f7; \n}\n\n.stix-viewer-block .sidebar {\n top: 0px;\n bottom: 0;\n right: 0;\n width: 40%;\n max-width: 400px;\n position: absolute;\n padding: 10px;\n display: none;\n border-width: 0px 0px 0px 1px;\n border-style: solid;\n border-color: #ddd;\n background-color: #f7f7f7;\n overflow: scroll;\n z-index: 9999;\n}\n\n.stix-viewer-block .sidebar p {\n line-height: 1.4em;\n}\n\n.stix-viewer-block .sidebar .sidebar-title {\n word-wrap: break-word;\n font-weight: normal;\n font-size: 20pt;\n}\n\n.stix-viewer-block .sidebar .sidebar-close-icon {\n float: right;\n font-size: 20pt;\n padding: 0px 10px;\n cursor: pointer;\n}\n\n.stix-viewer-block .sidebar img.sidebar-type-icon {\n height: 30px;\n vertical-align: middle;\n margin-right: 5px;\n}\n\n.stix-viewer-block .sidebar .sidebar-textarea {\n height: 400px;\n width: 100%;\n}\n\n.stix-viewer-block .viewer-footer {\n color: #586069;\n background-color: #f7f7f7;\n}\n\n.stix-viewer-block .viewer-footer a {\n color: #586069;\n}\n\n.marking-tag {\n\n /* https://floating-ui.com/docs/migration#positioning-function-change */\n width: max-content;\n position: absolute;\n top: 0;\n left: 0;\n\n font-size: 0.8em;\n font-family: sans-serif;\n padding: 0px 2px;\n border-radius: 2px;\n border-width: 1px;\n border-style: solid;\n user-select: none;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n/* tlp v1 */\n\n.marking-tag-tlp-white {\n color: black;\n background-color: white;\n border-color: black;\n}\n\n.marking-tag-tlp-green {\n color: white;\n background-color: green;\n border-color: green;\n}\n\n.marking-tag-tlp-amber {\n color: white;\n background-color: orange;\n border-color: orange;\n}\n\n.marking-tag-tlp-red {\n color: white;\n background-color: red;\n border-color: red;\n}\n\n/* tlp v2 */\n\n.marking-tag-tlpv2-clear {\n color: black;\n background-color: white;\n border-color: black;\n}\n\n.marking-tag-tlpv2-green {\n color: white;\n background-color: green;\n border-color: green;\n}\n\n.marking-tag-tlpv2-amber {\n color: white;\n background-color: orange;\n border-color: orange;\n}\n\n.marking-tag-tlpv2-amber-strict {\n color: white;\n background-color: orange;\n border-color: orange;\n}\n\n.marking-tag-tlpv2-red {\n color: white;\n background-color: red;\n border-color: red;\n}\n\n/* tlp unknown */\n\n.marking-tag-tlp-custom {\n color: black;\n background-color: white;\n border-color: black;\n}\n",""]);const s=a},7593:function(t,e,n){var r;r=function(t,e){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},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=14)}([function(e,n){e.exports=t},function(t,e,n){"use strict";var r=n(0).layoutBase.FDLayoutConstants;function i(){}for(var o in r)i[o]=r[o];i.DEFAULT_SPRING_STRENGTH=1.5*r.DEFAULT_SPRING_STRENGTH,i.DEFAULT_NODE_SEPARATION=r.DEFAULT_EDGE_LENGTH/4,i.DEFAULT_IDEAL_INTER_CLUSTER_EDGE_LENGTH_COEFF=1.4,i.DEFAULT_ALLOW_NODES_INSIDE_CIRCLE=!1,i.DEFAULT_MAX_RATIO_OF_NODES_INSIDE_CIRCLE=.1,i.DEFAULT_INNER_EDGE_LENGTH=r.DEFAULT_EDGE_LENGTH/3,i.MAX_ROTATION_ANGLE=Math.PI/36,i.MIN_ROTATION_ANGLE=-i.MAX_ROTATION_ANGLE,i.SWAP_IDLE_DURATION=45,i.SWAP_PREPERATION_DURATION=5,i.SWAP_PERIOD=i.SWAP_IDLE_DURATION+i.SWAP_PREPERATION_DURATION,i.SWAP_HISTORY_CLEARANCE_PERIOD=6*i.SWAP_PERIOD,i.MIN_DISPLACEMENT_FOR_SWAP=6,i.REVERSE_PERIOD=25,i.CLUSTER_ENLARGEMENT_CHECK_PERIOD=50,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,t.exports=i},function(t,e,n){"use strict";t.exports=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;re&&(e=r.getWidth()),r.getHeight()>e&&(e=r.getHeight())}var i=2*(t.radius+t.margin)+e,o=t.getParent();o.setHeight(i),o.setWidth(i)},l.prototype.computeOrderMatrix=function(){var t=this.onCircleNodes.length;this.orderMatrix=new Array(t);for(var e=0;en){var o=this.onCircleNodes[r].getOnCircleNodeExt().getAngle()-this.onCircleNodes[n].getOnCircleNodeExt().getAngle();o<0&&(o+=i.TWO_PI),o<=Math.PI?(this.orderMatrix[n][r]=!0,this.orderMatrix[r][n]=!1):(this.orderMatrix[n][r]=!1,this.orderMatrix[r][n]=!0)}},l.prototype.rotate=function(){var t=this.getParent(),e=this.getOnCircleNodes().length,n=t.rotationAmount/e,r=this.getGraphManager().getLayout();if(0!==n){var i=n/this.radius;i>s.MAX_ROTATION_ANGLE?i=s.MAX_ROTATION_ANGLE:ie.getOnCircleNodeExt().getIndex()&&(n=e,r=t),n.getOnCircleNodeExt().getPrevNode()===r){var a=r;r=n,n=a}var s=n.getOnCircleNodeExt(),c=r.getOnCircleNodeExt(),u=s.getPrevNode(),l=this.getGraphManager().getLayout().getNodeSeparation()+this.getAdditionalNodeSeparation(),h=(u.getOnCircleNodeExt().getAngle()+(u.getHalfTheDiagonal()+r.getHalfTheDiagonal()+l)/this.radius)%(2*Math.PI);c.setAngle(h),h=(c.getAngle()+(r.getHalfTheDiagonal()+n.getHalfTheDiagonal()+l)/this.radius)%(2*Math.PI),s.setAngle(h),s.updatePosition(),c.updatePosition();var f=i.getIndex();i.setIndex(o.getIndex()),o.setIndex(f),this.getOnCircleNodes()[i.getIndex()]=t,this.getOnCircleNodes()[o.getIndex()]=e,i.updateSwappingConditions(),o.updateSwappingConditions(),i.getNextNode()===e?(i.getPrevNode().getOnCircleNodeExt().updateSwappingConditions(),o.getNextNode().getOnCircleNodeExt().updateSwappingConditions()):(i.getNextNode().getOnCircleNodeExt().updateSwappingConditions(),o.getPrevNode().getOnCircleNodeExt().updateSwappingConditions())},l.prototype.checkAndReverseIfReverseIsBetter=function(){for(var t=this.getInterClusterEdges(),e=new Array(t.length),n=void 0,r=this.getParent().getCenter(),o=void 0,a=void 0,s=void 0,l=this.onCircleNodes.length,h=new Array(l),f=0;f1&&d++;for(var p=this.onCircleNodes,v=l+d,b=new Array(2*v),y=new Array(2*v),w=void 0,m=-1,x=0;xN)return this.reverseNodes(),this.setMayNotBeReversed(),!0}return!1},l.prototype.computeAlignmentScore=function(t,e){return new o(t,e,20,-1,-2).getScore()},l.prototype.reverseNodes=function(){for(var t=this.getOnCircleNodes(),e=this.getOnCircleNodes().length,n=0;n-1&&this.onCircleNodes.splice(e,1),this.inCircleNodes.push(t);for(var n=0;n0&&void 0!==arguments[0]&&arguments[0],e=0,n=this.getOnCircleNodes(),r=0;rl&&(l=h[f].getDiagonal());l+=s.DEFAULT_INNER_EDGE_LENGTH;var d=u/Math.PI-l;h=this.getInCircleNodes(),l=0;for(var g=0;gl&&(l=h[g].getDiagonal());if((d-=l=1.2*l+s.DEFAULT_INNER_EDGE_LENGTH)Math.min(l,h)&&0!==h&&0!==l&&(e=!0)}return e},i.prototype.calculateTotalCrossingWithList=function(t){for(var e=0,n=0;nt.getAngle()||e.getAngle()===t.getAngle()&&t!==e&&this.ownerCircle.getOrder(this.ownerCircle.getThisEnd(t.getEdge()),this.ownerCircle.getThisEnd(e.getEdge()))}},{key:"_quicksort",value:function(t,e,n){if(e-1&&(o.getInNodes().splice(a,1),o.getOutNodes().push(e))}if(-1!==i){var s=n.getOwner(),c=s.getInNodes().indexOf(n);c>-1&&(s.getInNodes().splice(c,1),s.getOutNodes().push(n))}}),u},y.prototype.doStep1=function(t){this.step=y.STEP_1,this.phase=y.PHASE_OTHER;for(var e=new i,n=this.graphManager.getGraphs(),r=0;r0){var S=o.getParent(),L=s.getParent();S.setLocation(L.getLocation().x,L.getLocation().y),o.setRadius(s.getRadius()),o.calculateParentNodeDimension()}}}},y.prototype.doStep2=function(){this.step=y.STEP_2,this.phase=y.PHASE_OTHER;for(var t=[],e=[],n=new i,r=new i,o=new h,a=o.newGraphManager().addRoot(),s=this.graphManager.getNonOnCircleNodes(),c=0;cthis.maxIterations/4)&&this.isConverged())return!0;this.coolingFactor=this.initialCoolingFactor*((this.maxIterations-this.iterations)/this.maxIterations)}if(this.totalDisplacement=0,this.step===y.STEP_3)this.iterations%f.REVERSE_PERIOD===0&&this.checkAndReverseIfReverseIsBetter();else if(this.step===y.STEP_4){this.iterations%f.SWAP_HISTORY_CLEARANCE_PERIOD===0&&(this.swappedPairsInLastIteration=[]);var t=this.iterations%f.SWAP_PERIOD;t>=f.SWAP_IDLE_DURATION?this.phase=y.PHASE_SWAP_PREPERATION:this.phase=0===t?y.PHASE_PERFORM_SWAP:y.PHASE_OTHER}else!0===this.innerStepDone&&this.iterations%f.CLUSTER_ENLARGEMENT_CHECK_PERIOD===0&&this.clusterEnlargementCheck();return this.calcSpringForces(),this.calcRepulsionForces(),this.calcGravitationalForces(),this.calcTotalForces(),this.moveNodes(),this.iterations>=this.maxIterations},y.prototype.clusterEnlargementCheck=function(){for(var t=this.graphManager.getNonOnCircleNodes(),e=0;e300*n.getChild().getOnCircleNodes().length&&(n.getChild().setInnerNodePushCount(0),n.getChild().setAdditionalNodeSeparation(n.getChild().getAdditionalNodeSeparation()+6),n.getChild().reCalculateCircleSizeAndRadius(),n.getChild().reCalculateNodePositions(),n.reflectCenterChangeToChildren(r,i))}},y.prototype.prepareCirclesForReversal=function(){this.graphManager.getRoot().getNodes().forEach(function(t){var e=t.getChild();null!=e&&(e.getInterClusterEdges().length<2&&e.setMayNotBeReversed(),e.computeOrderMatrix())})},y.prototype.calcIdealEdgeLengths=function(t){for(var e=this.graphManager.getAllEdges(),n=0;n0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.graphManager.getNonOnCircleNodes(),r=void 0;if(this.useFRGridVariant&&this.step>y.STEP_2){var i=this.graphManager.rootGraph,o=new Set;this.totalIterations%c.GRID_CALCULATION_CHECK_PERIOD===1&&t&&(this.innerStepDone?i.updateBounds(!1):i.updateBounds(!0),this.updateGrid());for(var a=0;ay.STEP_4;f++){var d=n[f];if(null!==d.getChild()&&void 0!==d.getChild())for(var g=d.getChild().getInCircleNodes(),p=0;p4){var a=4/r.getOnCircleNeighbors().length;r.displacementX=r.displacementX*a,r.displacementY=r.displacementY*a}var c=r.displacementX,u=r.displacementY,l=Math.sqrt(Math.pow(r.getCenterX()+r.displacementX-o.getCenterX(),2)+Math.pow(r.getCenterY()+r.displacementY-o.getCenterY(),2))+r.getDiagonal();if(l>o.getChild().getRadius()-f.DEFAULT_INNER_EDGE_LENGTH/5){o.getChild().setInnerNodePushCount(o.getChild().getInnerNodePushCount()+l-o.getChild().getRadius());var h=o.getCenterX(),d=o.getCenterY(),g=s.findCircleLineIntersections(r.getCenterX(),r.getCenterY(),r.getCenterX()+r.displacementX,r.getCenterY()+r.displacementY,h,d,o.getChild().getRadius()-f.DEFAULT_INNER_EDGE_LENGTH/5-r.getDiagonal());if(null!==g)if(g[0]>0){var p=Math.sqrt(Math.pow(r.displacementX,2)+Math.pow(r.displacementY,2));r.displacementX=g[0]*r.displacementX-r.displacementX/p,r.displacementY=g[0]*r.displacementY-r.displacementY/p}else r.displacementX=0,r.displacementY=0;else r.displacementX=0,r.displacementY=0}r.innerMove(c,u,this.coolingFactor)}}else{for(var v=this.graphManager.getOnCircleNodes(),w=v.length,m=[],x=[],E=[],_=[],k=void 0,N=void 0,C=void 0,T=void 0,A=void 0,I=void 0,O=void 0,S=0;S0&&I>0||A<0&&I<0);0===A||0===I?x.push(L):m.push(L)}var M=void 0,P=!0,D=void 0;for(m.sort(function(t,e){return t.getDiscrepancy()-e.getDiscrepancy()});P&&m.length>0;)if(k=(M=m[m.length-1]).getFirstNode(),N=M.getSecondNode(),C=k.getOnCircleNodeExt(),T=N.getOnCircleNodeExt(),this.isSwappedPreviously(M))m.pop(),_.push(M);else{var R=C.getInterClusterIntersections(T);M.swap(),D=!1;var j=C.getInterClusterIntersections(T);(D=j>R)||j!==R||(D=M.inSameDirection()||M.getDiscrepancy()2;)a.push(o),this.setInnerNode(o),++r0&&this.moveInnerNode(a)}}this.innerStepDone=!0}},y.prototype.findInnerNode=function(t){var e=null,n=t.getOnCircleNodes().length,r=t.getOnCircleNodes();r.sort(function(t,e){return t.getEdges().length-e.getEdges().length});for(var i=n-1;i>=0&&null==e;i--){var o=r[i];if(0===o.getOnCircleNodeExt().getInterClusterEdges().length){var a=this.findMinimalSpanningSegment(o);if(0!==a.length){for(var s=!1,c=0;c1&&(p=g-d,p+=n,p%=n),p>1){s=!0;break}}}}s||(e=o)}}}return e},y.prototype.setInnerNode=function(t){t.getOwner().setOnCircleNodeInner(t);var e=this.graphManager.getOnCircleNodes(),n=e.indexOf(t);n>-1&&e.splice(n,1),this.graphManager.inCircleNodes.push(t)},y.prototype.moveInnerNode=function(t){t[0].getOwner().moveOnCircleNodeInside(t)},y.prototype.findMinimalSpanningSegment=function(t){var e=[],n=t.getOnCircleNeighbors();if(0===n.length)return e;n.sort(function(t,e){return t.getOnCircleNodeExt().getIndex()-e.getOnCircleNodeExt().getIndex()});var r=t.getOwner().getOnCircleNodes();r.sort(function(t,e){return t.getOnCircleNodeExt().getIndex()-e.getOnCircleNodeExt().getIndex()});var i=null,o=null,a=r.length,s=r.length,c=n.length,u=void 0,l=void 0,h=void 0,f=void 0,d=void 0;for(u=0;uo.MAX_NODE_DISPLACEMENT&&(t=o.MAX_NODE_DISPLACEMENT*i.sign(t)),t},s.prototype.getOnCircleNeighbors=function(){for(var t=Array.from(this.getNeighborsList()),e=[],n=0;n0&&void 0!==arguments[0]?arguments[0]:1,e=this.getOwner().getGraphManager().getLayout();if(this.displacementX=this.getLimitedDisplacement(this.displacementX)*t,this.displacementY=this.getLimitedDisplacement(this.displacementY)*t,null!==this.getChild()&&void 0!==this.getChild()){var n=this.getChild().getNodes().length;this.displacementX/=n,this.displacementY/=n;for(var r=this.getChild().getNodes(),i=0;i2&&void 0!==arguments[2]?arguments[2]:1,r=this.getOwner().getGraphManager().getLayout();this.displacementX=this.getLimitedDisplacement(this.displacementX)*n,this.displacementY=this.getLimitedDisplacement(this.displacementY)*n,this.moveBy(this.displacementX,this.displacementY),r.totalDisplacement+=Math.abs(this.getLimitedDisplacement(t))+Math.abs(this.getLimitedDisplacement(e))},s.prototype.reset=function(){this.displacementX=0,this.displacementY=0},t.exports=s},function(t,e,n){"use strict";var r=n(0).layoutBase.IGeometry;function i(t){this.ciseNode=t,this.intraClusterEdges=null,this.interClusterEdges=null,this.angle=-1,this.orderIndex=-1,this.canSwapWithNext=null,this.canSwapWithPrevious=null,this.displacementForSwap=null}i.prototype=Object.create(null),i.prototype.getCiseNode=function(){return this.ciseNode},i.prototype.getAngle=function(){return this.angle},i.prototype.setAngle=function(t){this.angle=t%r.TWO_PI,this.angle<0&&(this.angle+=r.TWO_PI)},i.prototype.getIndex=function(){return this.orderIndex},i.prototype.setIndex=function(t){this.orderIndex=t},i.prototype.getCharCode=function(){return this.orderIndex<26?String.fromCharCode(97+this.orderIndex):this.orderIndex<52?String.fromCharCode(65+this.orderIndex):"?"},i.prototype.getNextNode=function(){var t=this.ciseNode.getOwner(),e=t.getOnCircleNodes().length,n=this.orderIndex+1;return n===e&&(n=0),t.getOnCircleNodes()[n]},i.prototype.getPrevNode=function(){var t=this.ciseNode.getOwner(),e=this.orderIndex-1;return-1===e&&(e=t.getOnCircleNodes().length-1),t.getOnCircleNodes()[e]},i.prototype.getNextNodeExt=function(){return this.getNextNode().getOnCircleNodeExt()},i.prototype.prevNextNodeExt=function(){return this.getPrevNode().getOnCircleNodeExt()},i.prototype.canSwapWithNext=function(){return this.canSwapWithNext},i.prototype.canSwapWithPrev=function(){return this.canSwapWithPrev},i.prototype.getDisplacementForSwap=function(){return this.displacementForSwap},i.prototype.setDisplacementForSwap=function(t){this.displacementForSwap=t},i.prototype.addDisplacementForSwap=function(t){this.displacementForSwap=t},i.prototype.updatePosition=function(){var t=this.ciseNode.getOwner(),e=t.getParent(),n=e.getCenterX(),r=e.getCenterY(),i=t.getRadius()*Math.cos(this.angle),o=t.getRadius()*Math.sin(this.angle);this.ciseNode.setCenter(n+i,r+o)},i.prototype.getCircDistWithTheNode=function(t){var e=t.getIndex();if(-1===e||-1===this.getIndex())return-1;var n=this.getIndex()-e;return n<0&&(n+=this.ciseNode.getOwner().getOnCircleNodes().length),n},i.prototype.calculateTotalCrossing=function(){var t=this.getIntraClusterEdges(),e=0,n=[];return this.ciseNode.getOwner().getIntraClusterEdges().forEach(function(t){n.push(t)}),this.ciseNode.getEdges().forEach(function(t){var e=n.indexOf(t);e>-1&&n.splice(e,1)}),t.forEach(function(t){e+=t.calculateTotalCrossingWithList(n)}),e},i.prototype.updateSwappingConditions=function(){var t=this.calculateTotalCrossing(),e=this.orderIndex,n=this.getNextNode().getOnCircleNodeExt();this.orderIndex=n.getIndex(),n.setIndex(e);var r=this.calculateTotalCrossing();this.canSwapWithNext=r<=t,n.setIndex(this.orderIndex),this.setIndex(e);var i=this.getPrevNode().getOnCircleNodeExt();this.orderIndex=i.getIndex(),i.setIndex(e),r=this.calculateTotalCrossing(),this.canSwapWithPrevious=r<=t,i.setIndex(this.orderIndex),this.setIndex(e)},i.prototype.swapWith=function(t){this.ciseNode.getOwner().swapNodes(this.ciseNode,t.ciseNode)},i.prototype.getInterClusterIntersections=function(t){for(var e=0,n=this.getInterClusterEdges(),i=t.getInterClusterEdges(),o=0;o0))throw"ERROR: Node information is invalid/undefined/null or simply empty. Please make sure nodes are passed properly. Can't layout an empty graph";n=t.nodes;var r=t.edges,i=this.ciseLayout=new o,a=this.graphManager=i.newGraphManager(),s=this.root=a.addRoot();this.idToLNode=i.convertToClusteredGraph(n,r,e,this.options),s.updateConnected(),s.calcEstimatedSize(),i.calcNoOfChildrenForAllNodes(),i.doStep1(!this.options.randomize),this.options.randomize&&i.doStep2(),s.updateBounds(!0),s.estimatedSize=Math.max(s.right-s.left,s.bottom-s.top),i.prepareCirclesForReversal(),i.calcIdealEdgeLengths(!1),this.initializerIndex=0,this.isDone=!1,this.isStepDone=!1,this.timeToSwitchNextStep=!0}},{key:"tick",value:function(t){var e=this,n=this;if(t.nodes.forEach(function(r){var i=e.getScratch(r,t.name),o=n.idToLNode[r.data("id")];i.x=o.getCenterX(),i.y=o.getCenterY()}),this.timeToSwitchNextStep){switch(this.initializerIndex){case 0:case 2:this.ciseLayout.step5Init();break;case 1:this.options.randomize&&this.ciseLayout.step3Init();break;case 3:this.ciseLayout.step4Init();break;case 4:this.ciseLayout.findAndMoveInnerNodes(),this.ciseLayout.calcIdealEdgeLengths(!0),this.ciseLayout.step5Init()}this.initializerIndex++,this.ciseLayout.iterations=0,this.ciseLayout.totalDisplacement=1e3,this.timeToSwitchNextStep=!1}return this.isStepDone=this.ciseLayout.runSpringEmbedderTick(),this.isStepDone&&this.initializerIndex<5&&(this.timeToSwitchNextStep=!0),this.isStepDone&&!1===this.timeToSwitchNextStep&&(this.isDone=!0),this.isDone}},{key:"postrun",value:function(){}},{key:"destroy",value:function(){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this),this}}]),e}(n(18));t.exports=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n=this.parents.length)throw"index should be in range [0, "+this.parents.length+") !"}},{key:"findSet",value:function(t){for(this.isValidIndex(t);t!=this.parents[t];)this.parents[t]=this.parents[this.parents[t]],t=this.parents[t];return t}},{key:"unite",value:function(t,e){this.isValidIndex(t),this.isValidIndex(e);var n=this.findSet(t),r=this.findSet(e);n!==r&&(this.cardinalities[n]>this.cardinalities[r]?(this.parents[r]=n,this.cardinalities[n]+=this.cardinalities[r]):(this.parents[n]=r,this.cardinalities[r]+=this.cardinalities[n]))}}]),t}()},function(t,e,n){"use strict";t.exports=Object.freeze({animate:!1,refresh:10,maxIterations:2500,maxSimulationTime:5e3,animationDuration:void 0,animationEasing:void 0,ungrabifyWhileSimulating:!1,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!0,packComponents:!1,nodeSeparation:12.5,idealInterClusterEdgeLengthCoefficient:1.4,allowNodesInsideCircle:!1,maxRatioOfNodesInsideCircle:.1,springCoeff:function(t){return.45},nodeRepulsion:function(t){return 4500},gravity:.25,gravityRange:3.8,ready:function(){},stop:function(){},infinite:!1})},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n0&&null!=l){var h=s.indexOf(l);h>-1?c[h].push(r.nodes[u].data("id")):(s.push(l),c.push([r.nodes[u].data("id")]))}}r.clusters=c}if(n.packComponents){if(null==this.state.clusters||null==this.state.clusters)throw"ERROR: Cluster information is invalid/undefined/null. Please create the 'clusters' variable as defined in the documentation";if(null==this.state.nodes&&null==this.state.nodes||0==this.state.nodes.length)throw"ERROR: Node information is invalid/undefined/null or simply empty. Please make sure nodes are passed properly. Can't layout an empty graph";var f=this.getDisjointSets(n.cy.$(),this.state.clusters);if(f.length>1){this.states=[];for(var d=0;d0&&i.push(l)}return i}},{key:"relocateComponent",value:function(t){for(var e=this,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,a=t.nodes,s=0;sr&&(r=f),do&&(o=g)}var p=t.componentCenter.x-(r+n)/2,v=t.componentCenter.y-(o+i)/2;t.nodes.forEach(function(n){var r=e.getScratch(n,t.name);r.x=r.x+p,r.y=r.y+v})}},{key:"getScratch",value:function(t,e){var n=t.scratch(e);return n||(n={},t.scratch(e,n)),n}},{key:"run4state",value:function(t){var e=this;t.tickIndex=0,t.firstUpdate=!0,t.startTime=Date.now(),t.running=!0,t.currentBoundingBox=a(t.boundingBox,t.cy),t.ready&&e.one("ready",t.ready),t.stop&&e.one("stop",t.stop);for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r,o=!1,a=t,s=0;s{var r=n(9770),i=n(6574),o=n(5389),a=n(6449);t.exports=function(t,e){return(a(t)?r:i)(t,o(e,3))}},7659:t=>{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},7670:(t,e,n)=>{var r=n(2651);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},7689:function(t){var e;e=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},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=28)}([function(t,e,n){"use strict";function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,t.exports=r},function(t,e,n){"use strict";var r=n(2),i=n(8),o=n(9);function a(t,e,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=t,this.target=e}for(var s in a.prototype=Object.create(r.prototype),r)a[s]=r[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;if(this.target===t)return this.source;throw"Node is not incident with this edge"},a.prototype.getOtherEndInGraph=function(t,e){for(var n=this.getOtherEnd(t),r=e.getGraphManager().getRoot();;){if(n.getOwner()==e)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},a.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),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(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),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,n){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,n){"use strict";var r=n(2),i=n(10),o=n(13),a=n(0),s=n(16),c=n(5);function u(t,e,n,a){null==n&&null==a&&(a=e),r.call(this,a),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=a,this.edges=[],this.graphManager=t,this.rect=null!=n&&null!=e?new o(e.x,e.y,n.width,n.height):new o}for(var l in u.prototype=Object.create(r.prototype),r)u[l]=r[l];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(t){this.rect.width=t},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(t){this.rect.height=t},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.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},u.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},u.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},u.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},u.prototype.getEdgeListToNode=function(t){var e=[],n=this;return n.edges.forEach(function(r){if(r.target==t){if(r.source!=n)throw"Incorrect edge source!";e.push(r)}}),e},u.prototype.getEdgesBetween=function(t){var e=[],n=this;return n.edges.forEach(function(r){if(r.source!=n&&r.target!=n)throw"Incorrect edge source and/or target";r.target!=t&&r.source!=t||e.push(r)}),e},u.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach(function(n){if(n.source==e)t.add(n.target);else{if(n.target!=e)throw"Incorrect incidency!";t.add(n.source)}}),t},u.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),n=0;ne?(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(e+this.labelWidth)),this.labelHeight&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(n+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>n?(this.rect.y-=(this.labelHeight-n)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(n+this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(t){var e=this.rect.x;e>a.WORLD_BOUNDARY?e=a.WORLD_BOUNDARY:e<-a.WORLD_BOUNDARY&&(e=-a.WORLD_BOUNDARY);var n=this.rect.y;n>a.WORLD_BOUNDARY?n=a.WORLD_BOUNDARY:n<-a.WORLD_BOUNDARY&&(n=-a.WORLD_BOUNDARY);var r=new c(e,n),i=t.inverseTransformPoint(r);this.setLocation(i.x,i.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=u},function(t,e,n){"use strict";var r=n(0);function i(){}for(var o in r)i[o]=r[o];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=3*i.MAX_NODE_DISPLACEMENT_INCREMENTAL,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=i},function(t,e,n){"use strict";function r(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=r},function(t,e,n){"use strict";var r=n(2),i=n(10),o=n(0),a=n(7),s=n(3),c=n(1),u=n(13),l=n(12),h=n(11);function f(t,e,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof a?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var d in f.prototype=Object.create(r.prototype),r)f[d]=r[d];f.prototype.getNodes=function(){return this.nodes},f.prototype.getEdges=function(){return this.edges},f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getParent=function(){return this.parent},f.prototype.getLeft=function(){return this.left},f.prototype.getRight=function(){return this.right},f.prototype.getTop=function(){return this.top},f.prototype.getBottom=function(){return this.bottom},f.prototype.isConnected=function(){return this.isConnected},f.prototype.add=function(t,e,n){if(null==e&&null==n){var r=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var i=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(n)>-1))throw"Source or target not in graph!";if(e.owner!=n.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=n.owner?null:(i.source=e,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),e.edges.push(i),n!=e&&n.edges.push(i),i)},f.prototype.remove=function(t){var e=t;if(t instanceof s){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var n=e.edges.slice(),r=n.length,i=0;i-1&&l>-1))throw"Source and/or target doesn't know this edge!";if(o.source.edges.splice(u,1),o.target!=o.source&&o.target.edges.splice(l,1),-1==(a=o.source.owner.getEdges().indexOf(o)))throw"Not in owner's edge list!";o.source.owner.getEdges().splice(a,1)}},f.prototype.updateLeftTop=function(){for(var t,e,n,r=i.MAX_VALUE,o=i.MAX_VALUE,a=this.getNodes(),s=a.length,c=0;c(t=u.getTop())&&(r=t),o>(e=u.getLeft())&&(o=e)}return r==i.MAX_VALUE?null:(n=null!=a[0].getParent().paddingLeft?a[0].getParent().paddingLeft:this.margin,this.left=o-n,this.top=r-n,new l(this.left,this.top))},f.prototype.updateBounds=function(t){for(var e,n,r,o,a,s=i.MAX_VALUE,c=-i.MAX_VALUE,l=i.MAX_VALUE,h=-i.MAX_VALUE,f=this.nodes,d=f.length,g=0;g(e=p.getLeft())&&(s=e),c<(n=p.getRight())&&(c=n),l>(r=p.getTop())&&(l=r),h<(o=p.getBottom())&&(h=o)}var v=new u(s,l,c-s,h-l);s==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),a=null!=f[0].getParent().paddingLeft?f[0].getParent().paddingLeft:this.margin,this.left=v.x-a,this.right=v.x+v.width+a,this.top=v.y-a,this.bottom=v.y+v.height+a},f.calculateBounds=function(t){for(var e,n,r,o,a=i.MAX_VALUE,s=-i.MAX_VALUE,c=i.MAX_VALUE,l=-i.MAX_VALUE,h=t.length,f=0;f(e=d.getLeft())&&(a=e),s<(n=d.getRight())&&(s=n),c>(r=d.getTop())&&(c=r),l<(o=d.getBottom())&&(l=o)}return new u(a,c,s-a,l-c)},f.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},f.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},f.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,n=e.length,r=0;r=this.nodes.length){var c=0;i.forEach(function(e){e.owner==t&&c++}),c==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=f},function(t,e,n){"use strict";var r,i=n(1);function o(t){r=n(6),this.layout=t,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),n=this.add(t,e);return this.setRootGraph(n),this.rootGraph},o.prototype.add=function(t,e,n,r,i){if(null==n&&null==r&&null==i){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}i=n,n=t;var o=(r=e).getOwner(),a=i.getOwner();if(null==o||o.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==a||a.getGraphManager()!=this)throw"Target not in this graph mgr!";if(o==a)return n.isInterGraph=!1,o.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(n),null==n.source||null==n.target)throw"Edge source and/or target is null!";if(-1!=n.source.edges.indexOf(n)||-1!=n.target.edges.indexOf(n))throw"Edge already in source and/or target incidency list!";return n.source.edges.push(n),n.target.edges.push(n),n},o.prototype.remove=function(t){if(t instanceof r){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var n,o=[],a=(o=o.concat(e.getEdges())).length,s=0;s=e.getRight()?n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var o=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(o=1);var a=o*n[0],s=n[1]/o;n[0]a)return n[0]=r,n[1]=c,n[2]=o,n[3]=w,!1;if(io)return n[0]=s,n[1]=i,n[2]=b,n[3]=a,!1;if(ro?(n[0]=l,n[1]=h,_=!0):(n[0]=u,n[1]=c,_=!0):N===T&&(r>o?(n[0]=s,n[1]=c,_=!0):(n[0]=f,n[1]=h,_=!0)),-C===T?o>r?(n[2]=y,n[3]=w,k=!0):(n[2]=b,n[3]=v,k=!0):C===T&&(o>r?(n[2]=p,n[3]=v,k=!0):(n[2]=m,n[3]=w,k=!0)),_&&k)return!1;if(r>o?i>a?(A=this.getCardinalDirection(N,T,4),I=this.getCardinalDirection(C,T,2)):(A=this.getCardinalDirection(-N,T,3),I=this.getCardinalDirection(-C,T,1)):i>a?(A=this.getCardinalDirection(-N,T,1),I=this.getCardinalDirection(-C,T,3)):(A=this.getCardinalDirection(N,T,2),I=this.getCardinalDirection(C,T,4)),!_)switch(A){case 1:S=c,O=r+-g/T,n[0]=O,n[1]=S;break;case 2:O=f,S=i+d*T,n[0]=O,n[1]=S;break;case 3:S=h,O=r+g/T,n[0]=O,n[1]=S;break;case 4:O=l,S=i+-d*T,n[0]=O,n[1]=S}if(!k)switch(I){case 1:M=v,L=o+-E/T,n[2]=L,n[3]=M;break;case 2:L=m,M=a+x*T,n[2]=L,n[3]=M;break;case 3:M=w,L=o+E/T,n[2]=L,n[3]=M;break;case 4:L=y,M=a+-x*T,n[2]=L,n[3]=M}}return!1},i.getCardinalDirection=function(t,e,n){return t>e?n:1+n%4},i.getIntersection=function(t,e,n,i){if(null==i)return this.getIntersection2(t,e,n);var o,a,s,c,u,l,h,f=t.x,d=t.y,g=e.x,p=e.y,v=n.x,b=n.y,y=i.x,w=i.y;return 0===(h=(o=p-d)*(c=v-y)-(a=w-b)*(s=f-g))?null:new r((s*(l=y*b-v*w)-c*(u=g*d-f*p))/h,(a*u-o*l)/h)},i.angleOfVector=function(t,e,n,r){var i=void 0;return t!==n?(i=Math.atan((r-e)/(n-t)),n=0){var l=(-c+Math.sqrt(c*c-4*s*u))/(2*s),h=(-c-Math.sqrt(c*c-4*s*u))/(2*s);return l>=0&&l<=1?[l]:h>=0&&h<=1?[h]:null}return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,t.exports=i},function(t,e,n){"use strict";function r(){}r.sign=function(t){return t>0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=r},function(t,e,n){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,t.exports=r},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n0&&e;){for(s.push(u[0]);s.length>0&&e;){var l=s[0];s.splice(0,1),a.add(l);var h=l.getEdges();for(o=0;o-1&&u.splice(p,1)}a=new Set,c=new Map}else t=[]}return t},f.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],n=t.source,r=this.graphManager.calcLowestCommonAncestor(t.source,t.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(n),o=0;o=0&&e.splice(h,1),l.getNeighborsList().forEach(function(t){if(n.indexOf(t)<0){var e=r.get(t)-1;1==e&&c.push(t),r.set(t,e)}})}n=n.concat(c),1!=e.length&&2!=e.length||(i=!0,o=e[0])}return o},f.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=f},function(t,e,n){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},t.exports=r},function(t,e,n){"use strict";var r=n(5);function i(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}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(t){this.lworldExtX=t},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(t){this.lworldExtY=t},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},i.prototype.transformX=function(t){var e=0,n=this.lworldExtX;return 0!=n&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/n),e},i.prototype.transformY=function(t){var e=0,n=this.lworldExtY;return 0!=n&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/n),e},i.prototype.inverseTransformX=function(t){var e=0,n=this.ldeviceExtX;return 0!=n&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/n),e},i.prototype.inverseTransformY=function(t){var e=0,n=this.ldeviceExtY;return 0!=n&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/n),e},i.prototype.inverseTransformPoint=function(t){return new r(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=i},function(t,e,n){"use strict";var r=n(15),i=n(4),o=n(0),a=n(8),s=n(9);function c(){r.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}for(var u in c.prototype=Object.create(r.prototype),r)c[u]=r[u];c.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},c.prototype.calcIdealEdgeLengths=function(){for(var t,e,n,r,a,s,c,u=this.getGraphManager().getAllEdges(),l=0;li.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},c.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),n=0;n0&&void 0!==arguments[0])||arguments[0],s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&a&&this.updateGrid(),o=new Set,t=0;t(c=e.getEstimatedSize()*this.gravityRangeFactor)||s>c)&&(t.gravitationForceX=-this.gravityConstant*i,t.gravitationForceY=-this.gravityConstant*o):(a>(c=e.getEstimatedSize()*this.compoundGravityRangeFactor)||s>c)&&(t.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},c.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=s.length||u>=s[0].length))for(var l=0;lt}}]),t}();t.exports=o},function(t,e,n){"use strict";function r(){}r.svd=function(t){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=t.length,this.n=t[0].length;var e=Math.min(this.m,this.n);this.s=function(t){for(var e=[];t-- >0;)e.push(0);return e}(Math.min(this.m+1,this.n)),this.U=function t(e){if(0==e.length)return 0;for(var n=[],r=0;r0;)e.push(0);return e}(this.n),i=function(t){for(var e=[];t-- >0;)e.push(0);return e}(this.m),o=Math.min(this.m-1,this.n),a=Math.max(0,Math.min(this.n-2,this.m)),s=0;s=0;T--)if(0!==this.s[T]){for(var A=T+1;A=0;D--){if(function(t,e){return t&&e}(D0;){var V=void 0,U=void 0;for(V=k-2;V>=-1&&-1!==V;V--)if(Math.abs(n[V])<=z+Y*(Math.abs(this.s[V])+Math.abs(this.s[V+1]))){n[V]=0;break}if(V===k-2)U=4;else{var X=void 0;for(X=k-1;X>=V&&X!==V;X--){var W=(X!==k?Math.abs(n[X]):0)+(X!==V+1?Math.abs(n[X-1]):0);if(Math.abs(this.s[X])<=z+Y*W){this.s[X]=0;break}}X===V?U=3:X===k-1?U=1:(U=2,V=X)}switch(V++,U){case 1:var q=n[k-2];n[k-2]=0;for(var Z=k-2;Z>=V;Z--){var K=r.hypot(this.s[Z],q),$=this.s[Z]/K,Q=q/K;this.s[Z]=K,Z!==V&&(q=-Q*n[Z-1],n[Z-1]=$*n[Z-1]);for(var J=0;J=this.s[V+1]);){var kt=this.s[V];if(this.s[V]=this.s[V+1],this.s[V+1]=kt,VMath.abs(e)?(n=e/t,n=Math.abs(t)*Math.sqrt(1+n*n)):0!=e?(n=t/e,n=Math.abs(e)*Math.sqrt(1+n*n)):n=0,n},t.exports=r},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sequence1=e,this.sequence2=n,this.match_score=r,this.mismatch_penalty=i,this.gap_penalty=o,this.iMax=e.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var a=0;a=0;n--){var r=this.listeners[n];r.event===t&&r.callback===e&&this.listeners.splice(n,1)}},i.emit=function(t,e){for(var n=0;n{var r=n(9172),i=n(7301),o=n(6009),a=o&&o.isMap,s=a?i(a):r;t.exports=s},7797:(t,e,n)=>{var r=n(4394);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},7799:function(t,e,n){var r;r=function(t){return(()=>{"use strict";var e={45:(t,e,n)=>{var r={};r.layoutBase=n(551),r.CoSEConstants=n(806),r.CoSEEdge=n(767),r.CoSEGraph=n(880),r.CoSEGraphManager=n(578),r.CoSELayout=n(765),r.CoSENode=n(991),r.ConstraintHandler=n(902),t.exports=r},806:(t,e,n)=>{var r=n(551).FDLayoutConstants;function i(){}for(var o in r)i[o]=r[o];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,t.exports=i},767:(t,e,n)=>{var r=n(551).FDLayoutEdge;function i(t,e,n){r.call(this,t,e,n)}for(var o in i.prototype=Object.create(r.prototype),r)i[o]=r[o];t.exports=i},880:(t,e,n)=>{var r=n(551).LGraph;function i(t,e,n){r.call(this,t,e,n)}for(var o in i.prototype=Object.create(r.prototype),r)i[o]=r[o];t.exports=i},578:(t,e,n)=>{var r=n(551).LGraphManager;function i(t){r.call(this,t)}for(var o in i.prototype=Object.create(r.prototype),r)i[o]=r[o];t.exports=i},765:(t,e,n)=>{var r=n(551).FDLayout,i=n(578),o=n(880),a=n(991),s=n(767),c=n(806),u=n(902),l=n(551).FDLayoutConstants,h=n(551).LayoutConstants,f=n(551).Point,d=n(551).PointD,g=n(551).DimensionD,p=n(551).Layout,v=n(551).Integer,b=n(551).IGeometry,y=n(551).LGraph,w=n(551).Transform,m=n(551).LinkedList;function x(){r.call(this),this.toBeTiled={},this.constraints={}}for(var E in x.prototype=Object.create(r.prototype),r)x[E]=r[E];x.prototype.newGraphManager=function(){var t=new i(this);return this.graphManager=t,t},x.prototype.newGraph=function(t){return new o(null,this.graphManager,t)},x.prototype.newNode=function(t){return new a(this.graphManager,t)},x.prototype.newEdge=function(t){return new s(null,null,t)},x.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(c.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},x.prototype.initSpringEmbedder=function(){r.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},x.prototype.layout=function(){return h.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental)c.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(n));else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(u.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),c.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},x.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%l.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(),c.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.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()),c.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},n=0;n0&&this.updateDisplacements(),e=0;e0&&(r.fixedNodeWeight=o)}if(this.constraints.relativePlacementConstraint){var a=new Map,s=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(e){t.fixedNodesOnHorizontal.add(e),t.fixedNodesOnVertical.add(e)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var u=this.constraints.alignmentConstraint.vertical;for(n=0;n=2*t.length/3;r--)e=Math.floor(Math.random()*(r+1)),n=t[r],t[r]=t[e],t[e]=n;return t},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(e){if(e.left){var n=a.has(e.left)?a.get(e.left):e.left,r=a.has(e.right)?a.get(e.right):e.right;t.nodesInRelativeHorizontal.includes(n)||(t.nodesInRelativeHorizontal.push(n),t.nodeToRelativeConstraintMapHorizontal.set(n,[]),t.dummyToNodeForVerticalAlignment.has(n)?t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(n).getCenterX())),t.nodesInRelativeHorizontal.includes(r)||(t.nodesInRelativeHorizontal.push(r),t.nodeToRelativeConstraintMapHorizontal.set(r,[]),t.dummyToNodeForVerticalAlignment.has(r)?t.nodeToTempPositionMapHorizontal.set(r,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(r,t.idToNodeMap.get(r).getCenterX())),t.nodeToRelativeConstraintMapHorizontal.get(n).push({right:r,gap:e.gap}),t.nodeToRelativeConstraintMapHorizontal.get(r).push({left:n,gap:e.gap})}else{var i=s.has(e.top)?s.get(e.top):e.top,o=s.has(e.bottom)?s.get(e.bottom):e.bottom;t.nodesInRelativeVertical.includes(i)||(t.nodesInRelativeVertical.push(i),t.nodeToRelativeConstraintMapVertical.set(i,[]),t.dummyToNodeForHorizontalAlignment.has(i)?t.nodeToTempPositionMapVertical.set(i,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(i)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(i,t.idToNodeMap.get(i).getCenterY())),t.nodesInRelativeVertical.includes(o)||(t.nodesInRelativeVertical.push(o),t.nodeToRelativeConstraintMapVertical.set(o,[]),t.dummyToNodeForHorizontalAlignment.has(o)?t.nodeToTempPositionMapVertical.set(o,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(o)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(o,t.idToNodeMap.get(o).getCenterY())),t.nodeToRelativeConstraintMapVertical.get(i).push({bottom:o,gap:e.gap}),t.nodeToRelativeConstraintMapVertical.get(o).push({top:i,gap:e.gap})}});else{var h=new Map,f=new Map;this.constraints.relativePlacementConstraint.forEach(function(t){if(t.left){var e=a.has(t.left)?a.get(t.left):t.left,n=a.has(t.right)?a.get(t.right):t.right;h.has(e)?h.get(e).push(n):h.set(e,[n]),h.has(n)?h.get(n).push(e):h.set(n,[e])}else{var r=s.has(t.top)?s.get(t.top):t.top,i=s.has(t.bottom)?s.get(t.bottom):t.bottom;f.has(r)?f.get(r).push(i):f.set(r,[i]),f.has(i)?f.get(i).push(r):f.set(i,[r])}});var d=function(t,e){var n=[],r=[],i=new m,o=new Set,a=0;return t.forEach(function(s,c){if(!o.has(c)){n[a]=[],r[a]=!1;var u=c;for(i.push(u),o.add(u),n[a].push(u);0!=i.length;)u=i.shift(),e.has(u)&&(r[a]=!0),t.get(u).forEach(function(t){o.has(t)||(i.push(t),o.add(t),n[a].push(t))});a++}}),{components:n,isFixed:r}},g=d(h,t.fixedNodesOnHorizontal);this.componentsOnHorizontal=g.components,this.fixedComponentsOnHorizontal=g.isFixed;var p=d(f,t.fixedNodesOnVertical);this.componentsOnVertical=p.components,this.fixedComponentsOnVertical=p.isFixed}}},x.prototype.updateDisplacements=function(){var t=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(e){var n=t.idToNodeMap.get(e.nodeId);n.displacementX=0,n.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var e=this.constraints.alignmentConstraint.vertical,n=0;n1)for(s=0;sr&&(r=Math.floor(a.y)),o=Math.floor(a.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(h.WORLD_CENTER_X-a.x/2,h.WORLD_CENTER_Y-a.y/2))},x.radialLayout=function(t,e,n){var r=Math.max(this.maxDiagonalInTree(t),c.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(e,null,0,359,0,r);var i=y.calculateBounds(t),o=new w;o.setDeviceOrgX(i.getMinX()),o.setDeviceOrgY(i.getMinY()),o.setWorldOrgX(n.x),o.setWorldOrgY(n.y);for(var a=0;a1;){var v=p[0];p.splice(0,1);var y=l.indexOf(v);y>=0&&l.splice(y,1),g--,h--}f=null!=e?(l.indexOf(p[0])+1)%g:0;for(var w=Math.abs(r-n)/h,m=f;d!=h;m=++m%g){var E=l[m].getOtherEnd(t);if(E!=e){var _=(n+d*w)%360,k=(_+w)%360;x.branchRadialLayout(E,t,_,k,i+o,o),d++}}},x.maxDiagonalInTree=function(t){for(var e=v.MIN_VALUE,n=0;ne&&(e=r)}return e},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){var r="DummyCompound_"+n;t.memberGroups[r]=e[n];var i=e[n][0].getParent(),o=new a(t.graphManager);o.id=r,o.paddingLeft=i.paddingLeft||0,o.paddingRight=i.paddingRight||0,o.paddingBottom=i.paddingBottom||0,o.paddingTop=i.paddingTop||0,t.idToDummyNode[r]=o;var s=t.getGraphManager().add(t.newGraph(),o),c=i.getChild();c.add(o);for(var u=0;ui?(r.rect.x-=(r.labelWidth-i)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-i)/2):"right"==r.labelPosHorizontal&&r.setWidth(i+r.labelWidth)),r.labelHeight&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(o+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>o?(r.rect.y-=(r.labelHeight-o)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-o)/2):"bottom"==r.labelPosVertical&&r.setHeight(o+r.labelHeight))}})},x.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var e=this.compoundOrder[t],n=e.id,r=e.paddingLeft,i=e.paddingTop,o=e.labelMarginLeft,a=e.labelMarginTop;this.adjustLocations(this.tiledMemberPack[n],e.rect.x,e.rect.y,r,i,o,a)}},x.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach(function(n){var r=t.idToDummyNode[n],i=r.paddingLeft,o=r.paddingTop,a=r.labelMarginLeft,s=r.labelMarginTop;t.adjustLocations(e[n],r.rect.x,r.rect.y,i,o,a,s)})},x.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 r=n.getNodes(),i=0;i0)return this.toBeTiled[e]=!1,!1;if(null!=o.getChild()){if(!this.getToBeTiled(o))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[o.id]=!1}return this.toBeTiled[e]=!0,!0},x.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),n=0,r=0;rl&&(l=f.rect.height)}n+=l+t.verticalPadding}},x.prototype.tileCompoundMembers=function(t,e){var n=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(r){var i=e[r];if(n.tiledMemberPack[r]=n.tileNodes(t[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height,i.setCenter(n.tiledMemberPack[r].centerX,n.tiledMemberPack[r].centerY),i.labelMarginLeft=0,i.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var o=i.rect.width,a=i.rect.height;i.labelWidth&&("left"==i.labelPosHorizontal?(i.rect.x-=i.labelWidth,i.setWidth(o+i.labelWidth),i.labelMarginLeft=i.labelWidth):"center"==i.labelPosHorizontal&&i.labelWidth>o?(i.rect.x-=(i.labelWidth-o)/2,i.setWidth(i.labelWidth),i.labelMarginLeft=(i.labelWidth-o)/2):"right"==i.labelPosHorizontal&&i.setWidth(o+i.labelWidth)),i.labelHeight&&("top"==i.labelPosVertical?(i.rect.y-=i.labelHeight,i.setHeight(a+i.labelHeight),i.labelMarginTop=i.labelHeight):"center"==i.labelPosVertical&&i.labelHeight>a?(i.rect.y-=(i.labelHeight-a)/2,i.setHeight(i.labelHeight),i.labelMarginTop=(i.labelHeight-a)/2):"bottom"==i.labelPosVertical&&i.setHeight(a+i.labelHeight))}})},x.prototype.tileNodes=function(t,e){var n=this.tileNodesByFavoringDim(t,e,!0),r=this.tileNodesByFavoringDim(t,e,!1),i=this.getOrgRatio(n);return this.getOrgRatio(r)s&&(s=t.getWidth())});var u,l=o/i,h=a/i,f=Math.pow(n-r,2)+4*(l+r)*(h+n)*i,d=(r-n+Math.sqrt(f))/(2*(l+r));e?(u=Math.ceil(d))==d&&u++:u=Math.floor(d);var g=u*(l+r)-r;return s>g&&(g=s),g+2*r},x.prototype.tileNodesByFavoringDim=function(t,e,n){var r=c.TILING_PADDING_VERTICAL,i=c.TILING_PADDING_HORIZONTAL,o=c.TILING_COMPARE_BY,a={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:r,horizontalPadding:i,centerX:0,centerY:0};o&&(a.idealRowWidth=this.calcIdealRowWidth(t,n));var s=function(t){return t.rect.width*t.rect.height},u=function(t,e){return s(e)-s(t)};t.sort(function(t,e){var n=u;return a.idealRowWidth?(n=o)(t.id,e.id):n(t,e)});for(var l=0,h=0,f=0;f0&&(o+=t.horizontalPadding),t.rowWidth[n]=o,t.width0&&(a+=t.verticalPadding);var s=0;a>t.rowHeight[n]&&(s=t.rowHeight[n],t.rowHeight[n]=a,s=t.rowHeight[n]-s),t.height+=s,t.rows[n].push(e)},x.prototype.getShortestRowIndex=function(t){for(var e=-1,n=Number.MAX_VALUE,r=0;rn&&(e=r,n=t.rowWidth[r]);return e},x.prototype.canAddHorizontal=function(t,e,n){if(t.idealRowWidth){var r=t.rows.length-1;return t.rowWidth[r]+e+t.horizontalPadding<=t.idealRowWidth}var i=this.getShortestRowIndex(t);if(i<0)return!0;var o=t.rowWidth[i];if(o+t.horizontalPadding+e<=t.width)return!0;var a,s,c=0;return t.rowHeight[i]0&&(c=n+t.verticalPadding-t.rowHeight[i]),a=t.width-o>=e+t.horizontalPadding?(t.height+c)/(o+e+t.horizontalPadding):(t.height+c)/t.width,c=n+t.verticalPadding,(s=t.widtho&&e!=n){r.splice(-1,1),t.rows[n].push(i),t.rowWidth[e]=t.rowWidth[e]-o,t.rowWidth[n]=t.rowWidth[n]+o,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var a=Number.MIN_VALUE,s=0;sa&&(a=r[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 h=i;h<=o;h++)u[0]+=this.grid[h][a-1].length+this.grid[h][a].length-1;if(o0)for(h=a;h<=s;h++)u[3]+=this.grid[i-1][h].length+this.grid[i][h].length-1;for(var f,d,g=v.MAX_VALUE,p=0;p{var r=n(551).FDLayoutNode,i=n(551).IMath;function o(t,e,n,i){r.call(this,t,e,n,i)}for(var a in o.prototype=Object.create(r.prototype),r)o[a]=r[a];o.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(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*i.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},o.prototype.propogateDisplacementToChildren=function(t,e){for(var n,r=this.getChild().getNodes(),i=0;i{function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e0){var o=0;r.forEach(function(t){"horizontal"==e?(h.set(t,c.has(t)?u[c.get(t)]:i.get(t)),o+=h.get(t)):(h.set(t,c.has(t)?l[c.get(t)]:i.get(t)),o+=h.get(t))}),o/=r.length,t.forEach(function(t){n.has(t)||h.set(t,o)})}else{var a=0;t.forEach(function(t){a+="horizontal"==e?c.has(t)?u[c.get(t)]:i.get(t):c.has(t)?l[c.get(t)]:i.get(t)}),a/=t.length,t.forEach(function(t){h.set(t,a)})}});for(var g=function(){var r=d.shift();t.get(r).forEach(function(t){if(h.get(t.id)a&&(a=b),ws&&(s=w)}}catch(t){d=!0,g=t}finally{try{!f&&v.return&&v.return()}finally{if(d)throw g}}var m=(r+a)/2-(o+s)/2,x=!0,E=!1,_=void 0;try{for(var k,N=t[Symbol.iterator]();!(x=(k=N.next()).done);x=!0){var C=k.value;h.set(C,h.get(C)+m)}}catch(t){E=!0,_=t}finally{try{!x&&N.return&&N.return()}finally{if(E)throw _}}})}return h},b=function(t){var e=0,n=0,r=0,i=0;if(t.forEach(function(t){t.left?u[c.get(t.left)]-u[c.get(t.right)]>=0?e++:n++:l[c.get(t.top)]-l[c.get(t.bottom)]>=0?r++:i++}),e>n&&r>i)for(var o=0;on)for(var a=0;ai)for(var s=0;s1)e.fixedNodeConstraint.forEach(function(t,e){x[e]=[t.position.x,t.position.y],E[e]=[u[c.get(t.nodeId)],l[c.get(t.nodeId)]]}),_=!0;else if(e.alignmentConstraint)!function(){var t=0;if(e.alignmentConstraint.vertical){for(var n=e.alignmentConstraint.vertical,i=function(e){var i=new Set;n[e].forEach(function(t){i.add(t)});var o,a=new Set([].concat(r(i)).filter(function(t){return N.has(t)}));o=a.size>0?u[c.get(a.values().next().value)]:p(i).x,n[e].forEach(function(e){x[t]=[o,l[c.get(e)]],E[t]=[u[c.get(e)],l[c.get(e)]],t++})},o=0;o0?u[c.get(o.values().next().value)]:p(n).y,a[e].forEach(function(e){x[t]=[u[c.get(e)],i],E[t]=[u[c.get(e)],l[c.get(e)]],t++})},h=0;hI&&(I=A[S].length,O=S);if(I0){var W={x:0,y:0};e.fixedNodeConstraint.forEach(function(t,e){var n,r,i=(r={x:u[c.get(t.nodeId)],y:l[c.get(t.nodeId)]},{x:(n=t.position).x-r.x,y:n.y-r.y});W.x+=i.x,W.y+=i.y}),W.x/=e.fixedNodeConstraint.length,W.y/=e.fixedNodeConstraint.length,u.forEach(function(t,e){u[e]+=W.x}),l.forEach(function(t,e){l[e]+=W.y}),e.fixedNodeConstraint.forEach(function(t){u[c.get(t.nodeId)]=t.position.x,l[c.get(t.nodeId)]=t.position.y})}if(e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var q=e.alignmentConstraint.vertical,Z=function(t){var e=new Set;q[t].forEach(function(t){e.add(t)});var n,i=new Set([].concat(r(e)).filter(function(t){return N.has(t)}));n=i.size>0?u[c.get(i.values().next().value)]:p(e).x,e.forEach(function(t){N.has(t)||(u[c.get(t)]=n)})},K=0;K0?l[c.get(i.values().next().value)]:p(e).y,e.forEach(function(t){N.has(t)||(l[c.get(t)]=n)})},J=0;J<$.length;J++)Q(J)}e.relativePlacementConstraint&&function(){var t=new Map,n=new Map,r=new Map,i=new Map,o=new Map,a=new Map,s=new Set,h=new Set;if(N.forEach(function(t){s.add(t),h.add(t)}),e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var f=e.alignmentConstraint.vertical,d=function(e){r.set("dummy"+e,[]),f[e].forEach(function(n){t.set(n,"dummy"+e),r.get("dummy"+e).push(n),N.has(n)&&s.add("dummy"+e)}),o.set("dummy"+e,u[c.get(f[e][0])])},g=0;g{e.exports=t}},n={},r=function t(r){var i=n[r];if(void 0!==i)return i.exports;var o=n[r]={exports:{}};return e[r](o,o.exports,t),o.exports}(45);return r})()},t.exports=r(n(7689))},7805:(t,e,n)=>{var r=n(3360),i=n(5288);t.exports=function(t,e,n){(void 0!==n&&!i(t[e],n)||void 0===n&&!(e in t))&&r(t,e,n)}},7825:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},7828:(t,e,n)=>{var r=n(9325).Uint8Array;t.exports=r},7860:(t,e,n)=>{var r=n(6857),i=n(8191).Graph;t.exports=function(t,e,n){var o=function(t){for(var e;t.hasNode(e=r.uniqueId("_root")););return e}(t),a=new i({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(e){return t.node(e)});return r.forEach(t.nodes(),function(i){var s=t.node(i),c=t.parent(i);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(a.setNode(i),a.setParent(i,c||o),r.forEach(t[n](i),function(e){var n=e.v===i?e.w:e.v,o=a.edge(n,i),s=r.isUndefined(o)?0:o.weight;a.setEdge(n,i,{weight:t.edge(e).weight+s})}),r.has(s,"minRank")&&a.setNode(i,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))}),a}},7890:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9915),i=n(1924);e.d3adaptor=function(t){return!t||function(t){return t.version&&null!==t.version.match(/^3\./)}(t)?new r.D3StyleLayoutAdaptor:new i.D3StyleLayoutAdaptor(t)}},7911:t=>{t.exports=''},7927:t=>{var e="\\ud800-\\udfff",n="["+e+"]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^"+e+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+r+"|"+i+")?",u="[\\ufe0e\\ufe0f]?",l=u+c+"(?:\\u200d(?:"+[o,a,s].join("|")+")"+u+c+")*",h="(?:"+[o+r+"?",r,a,s,n].join("|")+")",f=RegExp(i+"(?="+i+")|"+h+l,"g");t.exports=function(t){for(var e=f.lastIndex=0;f.test(t);)++e;return e}},7978:(t,e,n)=>{var r=n(270),i=n(8156),o=n(631),a=n(8586),s=n(756),c=n(7197),u=n(7797);t.exports=function(t,e){return a(t)&&s(e)?c(u(t),e):function(n){var a=i(n,t);return void 0===a&&a===e?o(n,t):r(e,a,3)}}},8055:(t,e,n)=>{var r=n(9999);t.exports=function(t){return r(t,5)}},8073:(t,e,n)=>{"use strict";var r=n(6857);t.exports={longestPath:function(t){var e={};r.forEach(t.sources(),function n(i){var o=t.node(i);if(r.has(e,i))return o.rank;e[i]=!0;var a=r.min(r.map(t.outEdges(i),function(e){return n(e.w)-t.edge(e).minlen}));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),o.rank=a})},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},8077:t=>{t.exports=function(t,e){return null!=t&&e in Object(t)}},8090:t=>{t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},8096:t=>{t.exports=function(t,e){for(var n=-1,r=Array(t);++n{"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0}),r(n(7381)),r(n(7890)),r(n(3210)),r(n(1810)),r(n(9155)),r(n(1795)),r(n(2128)),r(n(6755)),r(n(8581)),r(n(9965)),r(n(9957)),r(n(6266)),r(n(2893)),r(n(5542)),r(n(8126)),r(n(2804))},8126:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.scale=t,this.AB=0,this.AD=0,this.A2=0}return t.prototype.addVariable=function(t){var e=this.scale/t.scale,n=t.offset/t.scale,r=t.weight;this.AB+=r*e*n,this.AD+=r*e*t.desiredPosition,this.A2+=r*e*e},t.prototype.getPosn=function(){return(this.AD-this.AB)/this.A2},t}();e.PositionStats=n;var r=function(){function t(t,e,n,r){void 0===r&&(r=!1),this.left=t,this.right=e,this.gap=n,this.equality=r,this.active=!1,this.unsatisfiable=!1,this.left=t,this.right=e,this.gap=n,this.equality=r}return t.prototype.slack=function(){return this.unsatisfiable?Number.MAX_VALUE:this.right.scale*this.right.position()-this.gap-this.left.scale*this.left.position()},t}();e.Constraint=r;var i=function(){function t(t,e,n){void 0===e&&(e=1),void 0===n&&(n=1),this.desiredPosition=t,this.weight=e,this.scale=n,this.offset=0}return t.prototype.dfdv=function(){return 2*this.weight*(this.position()-this.desiredPosition)},t.prototype.position=function(){return(this.block.ps.scale*this.block.posn+this.offset)/this.scale},t.prototype.visitNeighbours=function(t,e){var n=function(n,r){return n.active&&t!==r&&e(n,r)};this.cOut.forEach(function(t){return n(t,t.right)}),this.cIn.forEach(function(t){return n(t,t.left)})},t}();e.Variable=i;var o=function(){function t(t){this.vars=[],t.offset=0,this.ps=new n(t.scale),this.addVariable(t)}return t.prototype.addVariable=function(t){t.block=this,this.vars.push(t),this.ps.addVariable(t),this.posn=this.ps.getPosn()},t.prototype.updateWeightedPosition=function(){this.ps.AB=this.ps.AD=this.ps.A2=0;for(var t=0,e=this.vars.length;t=0?this.inactive.push(e):this.bs.merge(e)}}},t.prototype.solve=function(){this.satisfy();for(var t=Number.MAX_VALUE,e=this.bs.cost();Math.abs(t-e)>1e-4;)this.satisfy(),t=e,e=this.bs.cost();return e},t.LAGRANGIAN_TOLERANCE=-1e-4,t.ZERO_UPPERBOUND=-1e-10,t}();e.Solver=s,e.removeOverlapInOneDimension=function(t,e,n){for(var o=t.map(function(t){return new i(t.desiredCenter)}),a=[],c=t.length,u=0;u{var r=n(7422);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},8191:(t,e,n)=>{var r;try{r=n(8362)}catch(t){}r||(r=window.graphlib),t.exports=r},8202:(t,e,n)=>{"use strict";var r=n(6857),i=n(6822),o=n(8209),a=n(9361),s=n(3988).normalizeRanks,c=n(2948),u=n(3988).removeEmptyRanks,l=n(6353),h=n(135),f=n(4850),d=n(1453),g=n(3776),p=n(3988),v=n(8191).Graph;t.exports=function(t,e){var n=e&&e.debugTiming?p.time:p.notime;n("layout",function(){var e=n(" buildLayoutGraph",function(){return function(t){var e=new v({multigraph:!0,compound:!0}),n=C(t.graph());return e.setGraph(r.merge({},y,N(n,b),r.pick(n,w))),r.forEach(t.nodes(),function(n){var i=C(t.node(n));e.setNode(n,r.defaults(N(i,m),x)),e.setParent(n,t.parent(n))}),r.forEach(t.edges(),function(n){var i=C(t.edge(n));e.setEdge(n,r.merge({},_,N(i,E),r.pick(i,k)))}),e}(t)});n(" runLayout",function(){!function(t,e){e(" makeSpaceForEdgeLabels",function(){!function(t){var e=t.graph();e.ranksep/=2,r.forEach(t.edges(),function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)})}(t)}),e(" removeSelfEdges",function(){!function(t){r.forEach(t.edges(),function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}(t)}),e(" acyclic",function(){i.run(t)}),e(" nestingGraph.run",function(){l.run(t)}),e(" rank",function(){a(p.asNonCompoundGraph(t))}),e(" injectEdgeLabelProxies",function(){!function(t){r.forEach(t.edges(),function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e};p.addDummyNode(t,"edge-proxy",i,"_ep")}})}(t)}),e(" removeEmptyRanks",function(){u(t)}),e(" nestingGraph.cleanup",function(){l.cleanup(t)}),e(" normalizeRanks",function(){s(t)}),e(" assignRankMinMax",function(){!function(t){var e=0;r.forEach(t.nodes(),function(n){var i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=r.max(e,i.maxRank))}),t.graph().maxRank=e}(t)}),e(" removeEdgeLabelProxies",function(){!function(t){r.forEach(t.nodes(),function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))})}(t)}),e(" normalize.run",function(){o.run(t)}),e(" parentDummyChains",function(){c(t)}),e(" addBorderSegments",function(){h(t)}),e(" order",function(){d(t)}),e(" insertSelfEdges",function(){!function(t){var e=p.buildLayerMatrix(t);r.forEach(e,function(e){var n=0;r.forEach(e,function(e,i){var o=t.node(e);o.order=i+n,r.forEach(o.selfEdges,function(e){p.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:o.rank,order:i+ ++n,e:e.e,label:e.label},"_se")}),delete o.selfEdges})})}(t)}),e(" adjustCoordinateSystem",function(){f.adjust(t)}),e(" position",function(){g(t)}),e(" positionSelfEdges",function(){!function(t){r.forEach(t.nodes(),function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,o=r.y,a=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*a/3,y:o-s},{x:i+5*a/6,y:o-s},{x:i+a,y:o},{x:i+5*a/6,y:o+s},{x:i+2*a/3,y:o+s}],n.label.x=n.x,n.label.y=n.y}})}(t)}),e(" removeBorderNodes",function(){!function(t){r.forEach(t.nodes(),function(e){if(t.children(e).length){var n=t.node(e),i=t.node(n.borderTop),o=t.node(n.borderBottom),a=t.node(r.last(n.borderLeft)),s=t.node(r.last(n.borderRight));n.width=Math.abs(s.x-a.x),n.height=Math.abs(o.y-i.y),n.x=a.x+n.width/2,n.y=i.y+n.height/2}}),r.forEach(t.nodes(),function(e){"border"===t.node(e).dummy&&t.removeNode(e)})}(t)}),e(" normalize.undo",function(){o.undo(t)}),e(" fixupEdgeLabelCoords",function(){!function(t){r.forEach(t.edges(),function(e){var n=t.edge(e);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}})}(t)}),e(" undoCoordinateSystem",function(){f.undo(t)}),e(" translateGraph",function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,o=0,a=t.graph(),s=a.marginx||0,c=a.marginy||0;function u(t){var r=t.x,a=t.y,s=t.width,c=t.height;e=Math.min(e,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,a-c/2),o=Math.max(o,a+c/2)}r.forEach(t.nodes(),function(e){u(t.node(e))}),r.forEach(t.edges(),function(e){var n=t.edge(e);r.has(n,"x")&&u(n)}),e-=s,i-=c,r.forEach(t.nodes(),function(n){var r=t.node(n);r.x-=e,r.y-=i}),r.forEach(t.edges(),function(n){var o=t.edge(n);r.forEach(o.points,function(t){t.x-=e,t.y-=i}),r.has(o,"x")&&(o.x-=e),r.has(o,"y")&&(o.y-=i)}),a.width=n-e+s,a.height=o-i+c}(t)}),e(" assignNodeIntersects",function(){!function(t){r.forEach(t.edges(),function(e){var n,r,i=t.edge(e),o=t.node(e.v),a=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=a,r=o),i.points.unshift(p.intersectRect(o,n)),i.points.push(p.intersectRect(a,r))})}(t)}),e(" reversePoints",function(){!function(t){r.forEach(t.edges(),function(e){var n=t.edge(e);n.reversed&&n.points.reverse()})}(t)}),e(" acyclic.undo",function(){i.undo(t)})}(e,n)}),n(" updateInputGraph",function(){!function(t,e){r.forEach(t.nodes(),function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))}),r.forEach(t.edges(),function(n){var i=t.edge(n),o=e.edge(n);i.points=o.points,r.has(o,"x")&&(i.x=o.x,i.y=o.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)})})};var b=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},w=["acyclicer","ranker","rankdir","align"],m=["width","height"],x={width:0,height:0},E=["minlen","weight","width","height","labeloffset"],_={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},k=["labelpos"];function N(t,e){return r.mapValues(r.pick(t,e),Number)}function C(t){var e={};return r.forEach(t,function(t,n){e[n.toLowerCase()]=t}),e}},8209:(t,e,n)=>{"use strict";var r=n(6857),i=n(3988);t.exports={run:function(t){t.graph().dummyChains=[],r.forEach(t.edges(),function(e){!function(t,e){var n,r,o,a=e.v,s=t.node(a).rank,c=e.w,u=t.node(c).rank,l=e.name,h=t.edge(e),f=h.labelRank;if(u!==s+1){for(t.removeEdge(e),o=0,++s;s{var r=n(6110)(n(9325),"Map");t.exports=r},8303:(t,e,n)=>{var r=n(6110)(n(9325),"WeakMap");t.exports=r},8329:(t,e,n)=>{var r=n(4894);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var o=n.length,a=e?o:-1,s=Object(n);(e?a--:++a{var r=n(1166);t.exports={Graph:r.Graph,json:n(7494),alg:n(1667),version:r.version}},8440:(t,e,n)=>{var r=n(6038),i=n(7301),o=n(6009),a=o&&o.isSet,s=a?i(a):r;t.exports=s},8481:(t,e,n)=>{"use strict";var r=n(6857),i=n(8191).Graph,o=n(8073).slack;function a(t,e){return r.forEach(t.nodes(),function n(i){r.forEach(e.nodeEdges(i),function(r){var a=r.v,s=i===a?r.w:a;t.hasNode(s)||o(e,r)||(t.setNode(s,{}),t.setEdge(i,s,{}),n(s))})}),t.nodeCount()}function s(t,e){return r.minBy(e.edges(),function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return o(e,n)})}function c(t,e,n){r.forEach(t.nodes(),function(t){e.node(t).rank+=n})}t.exports=function(t){var e,n,r=new i({directed:!1}),u=t.nodes()[0],l=t.nodeCount();for(r.setNode(u,{});a(r,t){"use strict";function n(t,e){var n={};for(var r in t)n[r]={};for(var r in e)n[r]={};return Object.keys(n).length}function r(t,e){var n=0;for(var r in t)void 0!==e[r]&&++n;return n}function i(t,e,n,r){var i=function(t,e){var n={},r=function(t,e){void 0===n[t]&&(n[t]={}),n[t][e]={}};return t.forEach(function(t){var n=e.getSourceIndex(t),i=e.getTargetIndex(t);r(n,i),r(i,n)}),n}(t,r);t.forEach(function(t){var o=i[r.getSourceIndex(t)],a=i[r.getTargetIndex(t)];r.setLength(t,1+e*n(o,a))})}function o(t,e,n){var r=[],i=0,o=[],a=[];function s(t){t.index=t.lowlink=i++,o.push(t),t.onStack=!0;for(var e=0,n=t.out;e{var r=n(6449),i=n(4394),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||a.test(t)||!o.test(t)||null!=e&&t in Object(e)}},8609:t=>{t.exports=''},8655:(t,e,n)=>{var r=n(6025);t.exports=function(t){return r(this.__data__,t)>-1}},8816:(t,e,n)=>{var r=n(5970),i=n(6757),o=n(2865);t.exports=function(t){return o(i(t,void 0,r),t+"")}},8859:(t,e,n)=>{var r=n(3661),i=n(1380),o=n(1459);function a(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e{var r=n(4335)(Object.getPrototypeOf,Object);t.exports=r},8905:(t,e,n)=>{var r=n(117),i=n(1737);t.exports=function(t,e,n,r){return function(t,e,n,r){var o,a,s={},c=new i,u=function(t){var e=t.v!==o?t.v:t.w,r=s[e],i=n(t),u=a.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);u0&&(o=c.removeMin(),(a=s[o]).distance!==Number.POSITIVE_INFINITY);)r(o).forEach(u);return s}(t,String(e),n||o,r||function(e){return t.outEdges(e)})};var o=r.constant(1)},8909:(t,e,n)=>{var r=n(6857),i=n(3988),o=n(8191).Graph;t.exports={debugOrdering:function(t){var e=i.buildLayerMatrix(t),n=new o({compound:!0,multigraph:!0}).setGraph({});return r.forEach(t.nodes(),function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)}),r.forEach(t.edges(),function(t){n.setEdge(t.v,t.w,{},t.name)}),r.forEach(e,function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,function(t,e){return n.setEdge(t,e,{style:"invis"}),e})}),n}}},8918:(t,e,n)=>{"use strict";var r=n(6857);t.exports=function(t){var e={},n=r.filter(t.nodes(),function(e){return!t.children(e).length}),i=r.max(r.map(n,function(e){return t.node(e).rank})),o=r.map(r.range(i+1),function(){return[]}),a=r.sortBy(n,function(e){return t.node(e).rank});return r.forEach(a,function n(i){if(!r.has(e,i)){e[i]=!0;var a=t.node(i);o[a.rank].push(i),r.forEach(t.successors(i),n)}}),o}},8937:t=>{t.exports=''},8948:(t,e,n)=>{var r=n(1791),i=n(6375);t.exports=function(t,e){return r(t,i(t),e)}},8984:(t,e,n)=>{var r=n(5527),i=n(3650),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e}},9155:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2893),i=n(8126),o=n(5542),a=function(t,e,n){this.id=t,this.rect=e,this.children=n,this.leaf=void 0===n||0===n.length};e.NodeWrapper=a;var s=function(t,e,n,r,i){void 0===r&&(r=null),void 0===i&&(i=null),this.id=t,this.x=e,this.y=n,this.node=r,this.line=i};e.Vert=s;var c=function(){function t(e,n){this.s=e,this.t=n;var r=t.findMatch(e,n),i=n.slice(0).reverse(),o=t.findMatch(e,i);r.length>=o.length?(this.length=r.length,this.si=r.si,this.ti=r.ti,this.reversed=!1):(this.length=o.length,this.si=o.si,this.ti=n.length-o.ti-o.length,this.reversed=!0)}return t.findMatch=function(t,e){for(var n=t.length,r=e.length,i={length:0,si:-1,ti:-1},o=new Array(n),a=0;ai.length&&(i.length=c,i.si=a-c+1,i.ti=s-c+1)}else o[a][s]=0}return i},t.prototype.getSequence=function(){return this.length>=0?this.s.slice(this.si,this.si+this.length):[]},t}();e.LongestCommonSubsequence=c;var u=function(){function t(t,e,n){var i=this;void 0===n&&(n=12),this.originalnodes=t,this.groupPadding=n,this.leaves=null,this.nodes=t.map(function(t,n){return new a(n,e.getBounds(t),e.getChildren(t))}),this.leaves=this.nodes.filter(function(t){return t.leaf}),this.groups=this.nodes.filter(function(t){return!t.leaf}),this.cols=this.getGridLines("x"),this.rows=this.getGridLines("y"),this.groups.forEach(function(t){return t.children.forEach(function(e){return i.nodes[e].parent=t})}),this.root={children:[]},this.nodes.forEach(function(t){void 0===t.parent&&(t.parent=i.root,i.root.children.push(t.id)),t.ports=[]}),this.backToFront=this.nodes.slice(0),this.backToFront.sort(function(t,e){return i.getDepth(t)-i.getDepth(e)}),this.backToFront.slice(0).reverse().filter(function(t){return!t.leaf}).forEach(function(t){var e=r.Rectangle.empty();t.children.forEach(function(t){return e=e.union(i.nodes[t].rect)}),t.rect=e.inflate(i.groupPadding)});var o=this.midPoints(this.cols.map(function(t){return t.pos})),c=this.midPoints(this.rows.map(function(t){return t.pos})),u=o[0],l=o[o.length-1],h=c[0],f=c[c.length-1],d=this.rows.map(function(t){return{x1:u,x2:l,y1:t.pos,y2:t.pos}}).concat(c.map(function(t){return{x1:u,x2:l,y1:t,y2:t}})),g=this.cols.map(function(t){return{x1:t.pos,x2:t.pos,y1:h,y2:f}}).concat(o.map(function(t){return{x1:t,x2:t,y1:h,y2:f}})),p=d.concat(g);p.forEach(function(t){return t.verts=[]}),this.verts=[],this.edges=[],d.forEach(function(t){return g.forEach(function(e){var n=new s(i.verts.length,e.x1,t.y1);t.verts.push(n),e.verts.push(n),i.verts.push(n);for(var r=i.backToFront.length;r-- >0;){var o=i.backToFront[r],a=o.rect,c=Math.abs(n.x-a.cx()),u=Math.abs(n.y-a.cy());if(c0;){var r=n.filter(function(e){return e.rect["overlap"+t.toUpperCase()](n[0].rect)}),i={nodes:r,pos:this.avg(r.map(function(e){return e.rect["c"+t]()}))};e.push(i),i.nodes.forEach(function(t){return n.splice(n.indexOf(t),1)})}return e.sort(function(t,e){return t.pos-e.pos}),e},t.prototype.getDepth=function(t){for(var e=0;t.parent!==this.root;)e++,t=t.parent;return e},t.prototype.midPoints=function(t){for(var e=t[1]-t[0],n=[t[0]-e/2],r=1;r.1)&&(u={pos:h[0][e],segments:[]},c.push(u)),u.segments.push(h)}return c},t.nudgeSegs=function(t,e,n,r,o,a){var s=r.length;if(!(s<=1)){for(var c=r.map(function(e){return new i.Variable(e[0][t])}),u=[],l=0;l=0&&u.push(new i.Constraint(c[v],c[b],a))}new i.Solver(c,u).solve(),c.forEach(function(e,i){var o=r[i],a=e.position();o[0][t]=o[1][t]=a;var s=n[o.edgeid];o.i>0&&(s[o.i-1][1][t]=a),o.iMath.PI||i<-Math.PI)&&(i=r-n),i},t.isLeft=function(t,e,n){return(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x)<=0},t.getOrder=function(t){for(var e={},n=0;n=u.length||h.ti+h.length>=l.length)?n.push({l:r,r:i}):(h.si+h.length>=u.length||h.ti+h.length>=l.length?(o=u[h.si+1],s=u[h.si-1],a=l[h.ti-1]):(o=u[h.si+h.length-2],a=u[h.si+h.length],s=l[h.ti+h.length]),t.isLeft(o,a,s)?n.push({l:i,r}):n.push({l:r,r:i})))}return t.getOrder(n)},t.makeSegments=function(t){function e(t){return{x:t.x,y:t.y}}for(var n=function(t,e,n){return Math.abs((e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x))<.001},r=[],i=e(t[0]),o=1;o1&&l>1?1e3:0}),h=l.reverse().map(function(t){return n.verts[t]});return h.push(this.nodes[i.id].ports[0]),h.filter(function(t,e){return!(e0&&t.node===i&&h[e-1].node===i)})},t.getRoutePath=function(e,n,r,i){var o,a,s,c={routepath:"M "+e[0][0].x+" "+e[0][0].y+" ",arrowpath:""};if(e.length>1)for(var u=0;u0?l-=f/Math.abs(f)*n:h-=d/Math.abs(d)*n,c.routepath+="L "+l+" "+h+" ";var g=e[u+1],p=g[0].x,v=g[0].y;f=g[1].x-p,d=g[1].y-v;var b,y,w=t.angleBetween2Lines(o,g)<0?1:0;Math.abs(f)>0?(b=p+f/Math.abs(f)*n,y=v):(b=p,y=v+d/Math.abs(d)*n);var m=Math.abs(b-l),x=Math.abs(y-h);c.routepath+="A "+m+" "+x+" 0 0 "+w+" "+b+" "+y+" "}else{var E=[l,h];Math.abs(f)>0?(a=[l-=f/Math.abs(f)*i,h+r],s=[l,h-r]):(a=[l+r,h-=d/Math.abs(d)*i],s=[l-r,h]),c.routepath+="L "+l+" "+h+" ",i>0&&(c.arrowpath="M "+E[0]+" "+E[1]+" L "+a[0]+" "+a[1]+" L "+s[0]+" "+s[1])}}else l=(o=e[0])[1].x,h=o[1].y,f=l-o[0].x,d=h-o[0].y,E=[l,h],Math.abs(f)>0?(a=[l-=f/Math.abs(f)*i,h+r],s=[l,h-r]):(a=[l+r,h-=d/Math.abs(d)*i],s=[l-r,h]),c.routepath+="L "+l+" "+h+" ",i>0&&(c.arrowpath="M "+E[0]+" "+E[1]+" L "+a[0]+" "+a[1]+" L "+s[0]+" "+s[1]);return c},t}();e.GridRouter=u},9172:(t,e,n)=>{var r=n(5861),i=n(346);t.exports=function(t){return i(t)&&"[object Map]"==r(t)}},9219:t=>{t.exports=function(t,e){return t.has(e)}},9276:(t,e,n)=>{var r=n(117);function i(t,e,n,o,a,s){r.has(o,e)||(o[e]=!0,n||s.push(e),r.each(a(e),function(e){i(t,e,n,o,a,s)}),n&&s.push(e))}t.exports=function(t,e,n){r.isArray(e)||(e=[e]);var o=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],s={};return r.each(e,function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);i(t,e,"post"===n,s,o,a)}),a}},9302:(t,e,n)=>{var r=n(3488),i=n(6757),o=n(2865);t.exports=function(t,e){return o(i(t,e,r),t+"")}},9325:(t,e,n)=>{var r=n(4840),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},9326:(t,e,n)=>{var r=n(1769),i=n(2428),o=n(6449),a=n(361),s=n(294),c=n(7797);t.exports=function(t,e,n){for(var u=-1,l=(e=r(e,t)).length,h=!1;++u{var r=n(3805),i=Object.create,o=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=o},9350:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},9361:(t,e,n)=>{"use strict";var r=n(8073).longestPath,i=n(8481),o=n(6860);t.exports=function(t){switch(t.graph().ranker){case"network-simplex":default:!function(t){o(t)}(t);break;case"tight-tree":!function(t){r(t),i(t)}(t);break;case"longest-path":a(t)}};var a=r},9374:(t,e,n)=>{var r=n(4128),i=n(3805),o=n(4394),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(o(t))return NaN;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=s.test(t);return n||c.test(t)?u(t.slice(2),n?2:8):a.test(t)?NaN:+t}},9570:(t,e,n)=>{var r=n(7334),i=n(3243),o=n(3488),a=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:o;t.exports=a},9653:(t,e,n)=>{var r=n(7828);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},9698:t=>{var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return e.test(t)}},9701:t=>{t.exports=''},9741:(t,e,n)=>{"use strict";var r=n(6857),i=n(8191).Graph,o=n(3988);function a(t,e){var n={};return r.reduce(e,function(e,i){var o=0,a=0,s=e.length,u=r.last(i);return r.forEach(i,function(e,l){var h=function(t,e){if(t.node(e).dummy)return r.find(t.predecessors(e),function(e){return t.node(e).dummy})}(t,e),f=h?t.node(h).order:s;(h||e===u)&&(r.forEach(i.slice(a,l+1),function(e){r.forEach(t.predecessors(e),function(r){var i=t.node(r),a=i.order;!(as)&&c(n,e,u)})})}return r.reduce(e,function(e,n){var o,a=-1,s=0;return r.forEach(n,function(r,c){if("border"===t.node(r).dummy){var u=t.predecessors(r);u.length&&(o=t.node(u[0]).order,i(n,s,c,a,o),s=c,a=o)}i(n,s,n.length,o,e.length)}),n}),n}function c(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function u(t,e,n){if(e>n){var i=e;e=n,n=i}return r.has(t[e],n)}function l(t,e,n,i){var o={},a={},s={};return r.forEach(e,function(t){r.forEach(t,function(t,e){o[t]=t,a[t]=t,s[t]=e})}),r.forEach(e,function(t){var e=-1;r.forEach(t,function(t){var c=i(t);if(c.length){c=r.sortBy(c,function(t){return s[t]});for(var l=(c.length-1)/2,h=Math.floor(l),f=Math.ceil(l);h<=f;++h){var d=c[h];a[t]===t&&e{var r=n(3729),i=n(9344),o=n(641),a=n(5389),s=n(8879),c=n(6449),u=n(3656),l=n(1882),h=n(3805),f=n(7167);t.exports=function(t,e,n){var d=c(t),g=d||u(t)||f(t);if(e=a(e,4),null==n){var p=t&&t.constructor;n=g?d?new p:[]:h(t)&&l(p)?i(s(t)):{}}return(g?r:o)(t,function(t,r,i){return e(n,t,r,i)}),n}},9754:(t,e,n)=>{var r=n(3729),i=n(909),o=n(4066),a=n(6449);t.exports=function(t,e){return(a(t)?r:i)(t,o(e))}},9770:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n{t.exports=''},9811:(t,e,n)=>{var r=n(7237)("length");t.exports=r},9817:t=>{t.exports=function(t){return this.__data__.has(t)}},9859:t=>{function e(){var t={};t._next=t._prev=t,this._sentinel=t}function n(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function r(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=e,e.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return n(e),e},e.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&n(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},e.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,r)),n=n._prev;return"["+t.join(", ")+"]"}},9884:(t,e,n)=>{var r=n(1791),i=n(7241);t.exports=function(t){return r(t,i(t))}},9888:(t,e,n)=>{var r=n(117);function i(t){var e={},n={},i=[];if(r.each(t.sinks(),function a(s){if(r.has(n,s))throw new o;r.has(e,s)||(n[s]=!0,e[s]=!0,r.each(t.predecessors(s),a),delete n[s],i.push(s))}),r.size(e)!==t.nodeCount())throw new o;return i}function o(){}t.exports=i,i.CycleException=o,o.prototype=new Error},9895:t=>{t.exports=''},9905:t=>{t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r{t.exports=function(){return!1}},9945:t=>{t.exports=''},9957:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.elem=t,this.subheaps=[]}return t.prototype.toString=function(t){for(var e="",n=!1,r=0;r{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t,e,n){this.source=t,this.target=e,this.type=n};e.PowerEdge=n;var r=function(){function t(t,e,n,r){var i=this;if(this.linkAccessor=n,this.modules=new Array(t),this.roots=[],r)this.initModulesFromGroup(r);else{this.roots.push(new a);for(var s=0;s=this.R))return this.merge(e.a,e.b,t),!0}},t.prototype.nEdges=function(t,e){var n=t.incoming.intersection(e.incoming),r=t.outgoing.intersection(e.outgoing);return this.R-n.count()-r.count()},t.prototype.getGroupHierarchy=function(t){var e=this,r=[];return i(this.roots[0],{},r),this.allEdges().forEach(function(i){var o=e.modules[i.source],a=e.modules[i.target];t.push(new n(void 0===o.gid?i.source:r[o.gid],void 0===a.gid?i.target:r[a.gid],i.type))}),r},t.prototype.allEdges=function(){var e=[];return t.getEdges(this.roots[0],e),e},t.getEdges=function(e,n){e.forAll(function(e){e.getEdges(n),t.getEdges(e.children,n)})},t}();function i(t,e,n){t.forAll(function(t){if(t.isLeaf())e.leaves||(e.leaves=[]),e.leaves.push(t.id);else{var r=e;if(t.gid=n.length,!t.isIsland()||t.isPredefined()){if(r={id:t.gid},t.isPredefined())for(var o in t.definition)r[o]=t.definition[o];e.groups||(e.groups=[]),e.groups.push(t.gid),n.push(r)}i(t.children,r,n)}})}e.Configuration=r;var o=function(){function t(t,e,n,r,i){void 0===e&&(e=new s),void 0===n&&(n=new s),void 0===r&&(r=new a),this.id=t,this.outgoing=e,this.incoming=n,this.children=r,this.definition=i}return t.prototype.getEdges=function(t){var e=this;this.outgoing.forAll(function(r,i){r.forAll(function(r){t.push(new n(e.id,r.id,i))})})},t.prototype.isLeaf=function(){return 0===this.children.count()},t.prototype.isIsland=function(){return 0===this.outgoing.count()&&0===this.incoming.count()},t.prototype.isPredefined=function(){return void 0!==this.definition},t}();e.Module=o;var a=function(){function t(){this.table={}}return t.prototype.count=function(){return Object.keys(this.table).length},t.prototype.intersection=function(e){var n=new t;return n.table=function(t,e){var n={};for(var r in t)r in e&&(n[r]=t[r]);return n}(this.table,e.table),n},t.prototype.intersectionCount=function(t){return this.intersection(t).count()},t.prototype.contains=function(t){return t in this.table},t.prototype.add=function(t){this.table[t.id]=t},t.prototype.remove=function(t){delete this.table[t.id]},t.prototype.forAll=function(t){for(var e in this.table)t(this.table[e])},t.prototype.modules=function(){var t=[];return this.forAll(function(e){e.isPredefined()||t.push(e)}),t},t}();e.ModuleSet=a;var s=function(){function t(){this.sets={},this.n=0}return t.prototype.count=function(){return this.n},t.prototype.contains=function(t){var e=!1;return this.forAllModules(function(n){e||n.id!=t||(e=!0)}),e},t.prototype.add=function(t,e){(t in this.sets?this.sets[t]:this.sets[t]=new a).add(e),++this.n},t.prototype.remove=function(t,e){var n=this.sets[t];n.remove(e),0===n.count()&&delete this.sets[t],--this.n},t.prototype.forAll=function(t){for(var e in this.sets)t(this.sets[e],Number(e))},t.prototype.forAllModules=function(t){this.forAll(function(e,n){return e.forAll(t)})},t.prototype.intersection=function(e){var n=new t;return this.forAll(function(t,r){if(r in e.sets){var i=t.intersection(e.sets[r]),o=i.count();o>0&&(n.sets[r]=i,n.n+=o)}}),n},t}();e.LinkSets=s,e.getGroups=function(t,e,n,i){for(var o=t.length,a=new r(o,e,n,i);a.greedyMerge(););var s=[],c=a.getGroupHierarchy(s);return s.forEach(function(e){var n=function(n){var r=e[n];"number"==typeof r&&(e[n]=t[r])};n("source"),n("target")}),{groups:c,powerEdges:s}}},9999:(t,e,n)=>{var r=n(7217),i=n(3729),o=n(6547),a=n(4733),s=n(3838),c=n(3290),u=n(3007),l=n(2271),h=n(8948),f=n(2),d=n(3349),g=n(5861),p=n(6189),v=n(7199),b=n(5529),y=n(6449),w=n(3656),m=n(7730),x=n(3805),E=n(8440),_=n(5950),k=n(7241),N="[object Arguments]",C="[object Function]",T="[object Object]",A={};A[N]=A["[object Array]"]=A["[object ArrayBuffer]"]=A["[object DataView]"]=A["[object Boolean]"]=A["[object Date]"]=A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Map]"]=A["[object Number]"]=A[T]=A["[object RegExp]"]=A["[object Set]"]=A["[object String]"]=A["[object Symbol]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A["[object Error]"]=A[C]=A["[object WeakMap]"]=!1,t.exports=function t(e,n,I,O,S,L){var M,P=1&n,D=2&n,R=4&n;if(I&&(M=S?I(e,O,S,L):I(e)),void 0!==M)return M;if(!x(e))return e;var j=y(e);if(j){if(M=p(e),!P)return u(e,M)}else{var B=g(e),G=B==C||"[object GeneratorFunction]"==B;if(w(e))return c(e,P);if(B==T||B==N||G&&!S){if(M=D||G?{}:b(e),!P)return D?h(e,s(M,e)):l(e,a(M,e))}else{if(!A[B])return S?e:{};M=v(e,B,P)}}L||(L=new r);var F=L.get(e);if(F)return F;L.set(e,M),E(e)?e.forEach(function(r){M.add(t(r,n,I,r,e,L))}):m(e)&&e.forEach(function(r,i){M.set(i,t(r,n,I,i,e,L))});var H=j?void 0:(R?D?d:f:D?k:_)(e);return i(H||e,function(r,i){H&&(r=e[i=r]),o(M,i,t(r,n,I,i,e,L))}),M}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),n.nc=void 0,(()=>{"use strict";var t={};n.r(t),n.d(t,{VERSION:()=>e,after:()=>Le,all:()=>Qe,allKeys:()=>gt,any:()=>Je,assign:()=>Lt,before:()=>Me,bind:()=>me,bindAll:()=>_e,chain:()=>ve,chunk:()=>Rn,clone:()=>Rt,collect:()=>Xe,compact:()=>Nn,compose:()=>Se,constant:()=>K,contains:()=>tn,countBy:()=>pn,create:()=>Dt,debounce:()=>Ae,default:()=>Gn,defaults:()=>Mt,defer:()=>Ce,delay:()=>Ne,detect:()=>ze,difference:()=>Tn,drop:()=>_n,each:()=>Ue,escape:()=>ie,every:()=>Qe,extend:()=>St,extendOwn:()=>Lt,filter:()=>Ke,find:()=>ze,findIndex:()=>je,findKey:()=>De,findLastIndex:()=>Be,findWhere:()=>Ve,first:()=>En,flatten:()=>Cn,foldl:()=>qe,foldr:()=>Ze,forEach:()=>Ue,functions:()=>It,get:()=>Ht,groupBy:()=>dn,has:()=>Yt,head:()=>En,identity:()=>zt,include:()=>tn,includes:()=>tn,indexBy:()=>gn,indexOf:()=>He,initial:()=>xn,inject:()=>qe,intersection:()=>Sn,invert:()=>At,invoke:()=>en,isArguments:()=>W,isArray:()=>V,isArrayBuffer:()=>D,isBoolean:()=>C,isDataView:()=>z,isDate:()=>S,isElement:()=>T,isEmpty:()=>at,isEqual:()=>dt,isError:()=>M,isFinite:()=>q,isFunction:()=>B,isMap:()=>Et,isMatch:()=>st,isNaN:()=>Z,isNull:()=>k,isNumber:()=>O,isObject:()=>_,isRegExp:()=>L,isSet:()=>kt,isString:()=>I,isSymbol:()=>P,isTypedArray:()=>nt,isUndefined:()=>N,isWeakMap:()=>_t,isWeakSet:()=>Nt,iteratee:()=>qt,keys:()=>ot,last:()=>kn,lastIndexOf:()=>Ye,map:()=>Xe,mapObject:()=>Kt,matcher:()=>Vt,matches:()=>Vt,max:()=>on,memoize:()=>ke,methods:()=>It,min:()=>an,mixin:()=>Bn,negate:()=>Oe,noop:()=>$t,now:()=>ee,object:()=>Pn,omit:()=>mn,once:()=>Pe,pairs:()=>Tt,partial:()=>we,partition:()=>vn,pick:()=>wn,pluck:()=>nn,property:()=>Ut,propertyOf:()=>Qt,random:()=>te,range:()=>Dn,reduce:()=>qe,reduceRight:()=>Ze,reject:()=>$e,rest:()=>_n,restArguments:()=>E,result:()=>de,sample:()=>un,select:()=>Ke,shuffle:()=>ln,size:()=>bn,some:()=>Je,sortBy:()=>hn,sortedIndex:()=>Ge,tail:()=>_n,take:()=>En,tap:()=>jt,template:()=>fe,templateSettings:()=>ae,throttle:()=>Te,times:()=>Jt,toArray:()=>cn,toPath:()=>Bt,transpose:()=>Ln,unescape:()=>oe,union:()=>On,uniq:()=>In,unique:()=>In,uniqueId:()=>pe,unzip:()=>Ln,values:()=>Ct,where:()=>rn,without:()=>An,wrap:()=>Ie,zip:()=>Mn});var e="1.13.7",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},i=Array.prototype,o=Object.prototype,a="undefined"!=typeof Symbol?Symbol.prototype:null,s=i.push,c=i.slice,u=o.toString,l=o.hasOwnProperty,h="undefined"!=typeof ArrayBuffer,f="undefined"!=typeof DataView,d=Array.isArray,g=Object.keys,p=Object.create,v=h&&ArrayBuffer.isView,b=isNaN,y=isFinite,w=!{toString:null}.propertyIsEnumerable("toString"),m=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],x=Math.pow(2,53)-1;function E(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),r=Array(n),i=0;i=0&&n<=x}}function Q(t){return function(e){return null==e?void 0:e[t]}}const J=Q("byteLength"),tt=$(J);var et=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;const nt=h?function(t){return v?v(t)&&!z(t):tt(t)&&et.test(u.call(t))}:K(!1),rt=Q("length");function it(t,e){e=function(t){for(var e={},n=t.length,r=0;r":">",'"':""","'":"'","`":"`"},ie=ne(re),oe=ne(At(re)),ae=ct.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var se=/(.)^/,ce={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},ue=/\\|'|\r|\n|\u2028|\u2029/g;function le(t){return"\\"+ce[t]}var he=/^\s*(\w|\$)+\s*$/;function fe(t,e,n){!e&&n&&(e=n),e=Mt({},e,ct.templateSettings);var r=RegExp([(e.escape||se).source,(e.interpolate||se).source,(e.evaluate||se).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,function(e,n,r,a,s){return o+=t.slice(i,s).replace(ue,le),i=s+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),e}),o+="';\n";var a,s=e.variable;if(s){if(!he.test(s))throw new Error("variable is not a bare identifier: "+s)}else o="with(obj||{}){\n"+o+"}\n",s="obj";o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{a=new Function(s,"_",o)}catch(t){throw t.source=o,t}var c=function(t){return a.call(this,t,ct)};return c.source="function("+s+"){\n"+o+"}",c}function de(t,e,n){var r=(e=Gt(e)).length;if(!r)return B(n)?n.call(t):n;for(var i=0;i1)Ee(s,e-1,n,r),i=r.length;else for(var c=0,u=s.length;ce?(r&&(clearTimeout(r),r=null),s=u,a=t.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(c,l)),a};return u.cancel=function(){clearTimeout(r),s=0,r=i=o=null},u}function Ae(t,e,n){var r,i,o,a,s,c=function(){var u=ee()-i;e>u?r=setTimeout(c,e-u):(r=null,n||(a=t.apply(s,o)),r||(o=s=null))},u=E(function(u){return s=this,o=u,i=ee(),r||(r=setTimeout(c,e),n&&(a=t.apply(s,o))),a});return u.cancel=function(){clearTimeout(r),r=o=s=null},u}function Ie(t,e){return we(e,t)}function Oe(t){return function(){return!t.apply(this,arguments)}}function Se(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}}function Le(t,e){return function(){if(--t<1)return e.apply(this,arguments)}}function Me(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}}const Pe=we(Me,2);function De(t,e,n){e=Zt(e,n);for(var r,i=ot(t),o=0,a=i.length;o0?0:i-1;o>=0&&o0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=e(c.call(r,a,s),Z))>=0?o+a:-1;for(o=t>0?a:s-1;o>=0&&o=3;return function(e,n,r,i){var o=!xe(e)&&ot(e),a=(o||e).length,s=t>0?0:a-1;for(i||(r=e[o?o[s]:s],s+=t);s>=0&&s=0}const en=E(function(t,e,n){var r,i;return B(e)?i=e:(e=Gt(e),r=e.slice(0,-1),e=e[e.length-1]),Xe(t,function(t){var o=i;if(!o){if(r&&r.length&&(t=Ft(t,r)),null==t)return;o=t[e]}return null==o?o:o.apply(t,n)})});function nn(t,e){return Xe(t,Ut(e))}function rn(t,e){return Ke(t,Vt(e))}function on(t,e,n){var r,i,o=-1/0,a=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,c=(t=xe(t)?t:Ct(t)).length;so&&(o=r);else e=Zt(e,n),Ue(t,function(t,n,r){((i=e(t,n,r))>a||i===-1/0&&o===-1/0)&&(o=t,a=i)});return o}function an(t,e,n){var r,i,o=1/0,a=1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,c=(t=xe(t)?t:Ct(t)).length;sr||void 0===n)return 1;if(n1&&(r=Xt(r,e[1])),e=gt(t)):(r=yn,e=Ee(e,!1,!1),t=Object(t));for(var i=0,o=e.length;i1&&(n=e[1])):(e=Xe(Ee(e,!1,!1),String),r=function(t,n){return!tn(e,n)}),wn(t,r,n)});function xn(t,e,n){return c.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))}function En(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[0]:xn(t,t.length-e)}function _n(t,e,n){return c.call(t,null==e||n?1:e)}function kn(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[t.length-1]:_n(t,Math.max(0,t.length-e))}function Nn(t){return Ke(t,Boolean)}function Cn(t,e){return Ee(t,e,!1)}const Tn=E(function(t,e){return e=Ee(e,!0,!0),Ke(t,function(t){return!tn(e,t)})}),An=E(function(t,e){return Tn(t,e)});function In(t,e,n,r){C(e)||(r=n,n=e,e=!1),null!=n&&(n=Zt(n,r));for(var i=[],o=[],a=0,s=rt(t);at.length)&&(e=t.length);for(var n=0,r=Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Xn(t,e,n){return(e=Zn(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Wn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);c=!0);}catch(t){u=!0,i=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(t,e)||$n(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qn(t){return function(t){if(Array.isArray(t))return Yn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||$n(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zn(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}function Kn(t){return Kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kn(t)}function $n(t,e){if(t){if("string"==typeof t)return Yn(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yn(t,e):void 0}}var Qn="undefined"==typeof window?null:window,Jn=Qn?Qn.navigator:null;Qn&&Qn.document;var tr,er,nr,rr,ir,or,ar,sr,cr,ur,lr,hr,fr,dr,gr,pr,vr,br,yr,wr,mr,xr,Er,_r,kr,Nr,Cr,Tr,Ar=Kn(""),Ir=Kn({}),Or=Kn(function(){}),Sr="undefined"==typeof HTMLElement?"undefined":Kn(HTMLElement),Lr=function(t){return t&&t.instanceString&&Pr(t.instanceString)?t.instanceString():null},Mr=function(t){return null!=t&&Kn(t)==Ar},Pr=function(t){return null!=t&&Kn(t)===Or},Dr=function(t){return!Gr(t)&&(Array.isArray?Array.isArray(t):null!=t&&t instanceof Array)},Rr=function(t){return null!=t&&Kn(t)===Ir&&!Dr(t)&&t.constructor===Object},jr=function(t){return null!=t&&Kn(t)===Kn(1)&&!isNaN(t)},Br=function(t){return"undefined"===Sr?void 0:null!=t&&t instanceof HTMLElement},Gr=function(t){return Fr(t)||Hr(t)},Fr=function(t){return"collection"===Lr(t)&&t._private.single},Hr=function(t){return"collection"===Lr(t)&&!t._private.single},Yr=function(t){return"core"===Lr(t)},zr=function(t){return"stylesheet"===Lr(t)},Vr=function(t){return null==t||!(""!==t&&!t.match(/^\s+$/))},Ur=function(t){return function(t){return null!=t&&Kn(t)===Ir}(t)&&Pr(t.then)},Xr=function(t,e){e||(e=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var t=[],e=0;ee?1:0},ri=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments,n=1;n255)return;e.push(Math.floor(o))}var a=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(a&&!s)return;var c=n[4];if(void 0!==c){if((c=parseFloat(c))<0||c>1)return;e.push(c)}}return e}(t)||function(t){var e,n,r,i,o,a,s,c;function u(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var l=new RegExp("^"+ti+"$").exec(t);if(l){if((n=parseInt(l[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(r=parseFloat(l[2]))<0||r>100)return;if(r/=100,(i=parseFloat(l[3]))<0||i>100)return;if(i/=100,void 0!==(o=l[4])&&((o=parseFloat(o))<0||o>1))return;if(0===r)a=s=c=Math.round(255*i);else{var h=i<.5?i*(1+r):i+r-i*r,f=2*i-h;a=Math.round(255*u(f,h,n+1/3)),s=Math.round(255*u(f,h,n)),c=Math.round(255*u(f,h,n-1/3))}e=[a,s,c,o]}return e}(t)},oi={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},ai=function(t){for(var e=t.map,n=t.keys,r=n.length,i=0;i=a||e<0||v&&t-g>=l}function m(){var t=e();if(w(t))return x(t);f=setTimeout(m,function(t){var e=a-(t-d);return v?i(e,l-(t-g)):e}(t))}function x(t){return f=void 0,b&&c?y(t):(c=u=void 0,h)}function E(){var t=e(),n=w(t);if(c=arguments,u=this,d=t,n){if(void 0===f)return function(t){return g=t,f=setTimeout(m,a),p?y(t):h}(d);if(v)return clearTimeout(f),f=setTimeout(m,a),y(d)}return void 0===f&&(f=setTimeout(m,a)),h}return a=n(a)||0,t(s)&&(p=!!s.leading,l=(v="maxWait"in s)?r(n(s.maxWait)||0,a):l,b="trailing"in s?!!s.trailing:b),E.cancel=function(){void 0!==f&&clearTimeout(f),g=0,c=d=u=f=void 0},E.flush=function(){return void 0===f?h:x(e())},E},Cr}(),vi=ui(pi),bi=Qn?Qn.performance:null,yi=bi&&bi.now?function(){return bi.now()}:function(){return Date.now()},wi=function(){if(Qn){if(Qn.requestAnimationFrame)return function(t){Qn.requestAnimationFrame(t)};if(Qn.mozRequestAnimationFrame)return function(t){Qn.mozRequestAnimationFrame(t)};if(Qn.webkitRequestAnimationFrame)return function(t){Qn.webkitRequestAnimationFrame(t)};if(Qn.msRequestAnimationFrame)return function(t){Qn.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(yi())},1e3/60)}}(),mi=function(t){return wi(t)},xi=yi,Ei=9261,_i=5381,ki=function(t){for(var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ei;!(e=t.next()).done;)n=65599*n+e.value|0;return n},Ni=function(t){return 65599*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ei)+t|0},Ci=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_i;return(e<<5)+e+t|0},Ti=function(t){return 2097152*t[0]+t[1]},Ai=function(t,e){return[Ni(t[0],e[0]),Ci(t[1],e[1])]},Ii=function(t,e){var n={value:0,done:!1},r=0,i=t.length;return ki({next:function(){return r=0;r--)t[r]===e&&t.splice(r,1)},Ki=function(t){t.splice(0,t.length)},$i=function(t,e,n){return n&&(e=Zr(n,e)),t[e]},Qi=function(t,e,n,r){n&&(e=Zr(n,e)),t[e]=r},Ji="undefined"!=typeof Map?Map:function(){return Vn(function t(){zn(this,t),this._obj={}},[{key:"set",value:function(t,e){return this._obj[t]=e,this}},{key:"delete",value:function(t){return this._obj[t]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(t){return void 0!==this._obj[t]}},{key:"get",value:function(t){return this._obj[t]}}])}(),to=function(){return Vn(function t(e){if(zn(this,t),this._obj=Object.create(null),this.size=0,null!=e){var n;n=null!=e.instanceString&&e.instanceString()===this.instanceString()?e.toArray():e;for(var r=0;r2&&void 0!==arguments[2])||arguments[2];if(void 0!==t&&void 0!==e&&Yr(t)){var r=e.group;if(null==r&&(r=e.data&&null!=e.data.source&&null!=e.data.target?"edges":"nodes"),"nodes"===r||"edges"===r){this.length=1,this[0]=this;var i=this._private={cy:t,single:!0,data:e.data||{},position:e.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!e.selected,selectable:void 0===e.selectable||!!e.selectable,locked:!!e.locked,grabbed:!1,grabbable:void 0===e.grabbable||!!e.grabbable,pannable:void 0===e.pannable?"edges"===r:!!e.pannable,active:!1,classes:new eo,animation:{current:[],queue:[]},rscratch:{},scratch:e.scratch||{},edges:[],children:[],parent:e.parent&&e.parent.isNode()?e.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==i.position.x&&(i.position.x=0),null==i.position.y&&(i.position.y=0),e.renderedPosition){var o=e.renderedPosition,a=t.pan(),s=t.zoom();i.position={x:(o.x-a.x)/s,y:(o.y-a.y)/s}}var c=[];Dr(e.classes)?c=e.classes:Mr(e.classes)&&(c=e.classes.split(/\s+/));for(var u=0,l=c.length;ue?1:0},c=function(t,r,i,o,a){var s;if(null==i&&(i=0),null==a&&(a=e),i<0)throw new Error("lo must be non-negative");for(null==o&&(o=t.length);ir;0<=r?e++:e--)u.push(e);return u}.apply(this).reverse()).length;op;0<=p?++f:--f)v.push(i(t,o));return v},d=function(t,n,r,i){var o,a,s;for(null==i&&(i=e),o=t[r];r>n&&i(o,a=t[s=r-1>>1])<0;)t[r]=a,r=s;return t[r]=o},g=function(t,n,r){var i,o,a,s,c;for(null==r&&(r=e),o=t.length,c=n,a=t[n],i=2*n+1;i0;){var x=b.pop(),E=p(x),_=x.id();if(h[_]=E,E!==1/0)for(var k=x.neighborhood().intersect(d),N=0;N0)for(n.unshift(e);l[i];){var o=l[i];n.unshift(o.edge),n.unshift(o.node),i=(r=o.node).id()}return a.spawn(n)}}}},go={kruskal:function(t){t=t||function(t){return 1};for(var e=this.byGroup(),n=e.nodes,r=e.edges,i=n.length,o=new Array(i),a=n,s=function(t){for(var e=0;e0;){if(m(),E++,u===h){for(var _=[],k=i,N=h,C=y[N];_.unshift(k),null!=C&&_.unshift(C),null!=(k=b[N]);)C=y[N=k.id()];return{found:!0,distance:f[u],path:this.spawn(_),steps:E}}g[u]=!0;for(var T=c._private.edges,A=0;AC&&(d[N]=C,b[N]=k,y[N]=m),!i){var T=k*u+_;!i&&d[T]>C&&(d[T]=C,b[T]=_,y[T]=m)}}}for(var A=0;A1&&void 0!==arguments[1]?arguments[1]:o,r=[],i=y(t);;){if(null==i)return e.spawn();var a=b(i),c=a.edge,u=a.pred;if(r.unshift(i[0]),i.same(n)&&r.length>0)break;null!=c&&r.unshift(c),i=u}return s.spawn(r)},hasNegativeWeightCycle:g,negativeWeightCycles:p}}},xo=Math.sqrt(2),Eo=function(t,e,n){0===n.length&&Hi("Karger-Stein must be run on a connected (sub)graph");for(var r=n[t],i=r[1],o=r[2],a=e[i],s=e[o],c=n,u=c.length-1;u>=0;u--){var l=c[u],h=l[1],f=l[2];(e[h]===a&&e[f]===s||e[h]===s&&e[f]===a)&&c.splice(u,1)}for(var d=0;dr;){var i=Math.floor(Math.random()*e.length);e=Eo(i,t,e),n--}return e},ko={kargerStein:function(){var t=this,e=this.byGroup(),n=e.nodes,r=e.edges;r.unmergeBy(function(t){return t.isLoop()});var i=n.length,o=r.length,a=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),s=Math.floor(i/xo);if(!(i<2)){for(var c=[],u=0;u0?1:t<0?-1:0},So=function(t,e){return Math.sqrt(Lo(t,e))},Lo=function(t,e){var n=e.x-t.x,r=e.y-t.y;return n*n+r*r},Mo=function(t){for(var e=t.length,n=0,r=0;r=t.x1&&t.y2>=t.y1)return{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,w:t.x2-t.x1,h:t.y2-t.y1};if(null!=t.w&&null!=t.h&&t.w>=0&&t.h>=0)return{x1:t.x1,y1:t.y1,x2:t.x1+t.w,y2:t.y1+t.h,w:t.w,h:t.h}}},Bo=function(t,e){t.x1=Math.min(t.x1,e.x1),t.x2=Math.max(t.x2,e.x2),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,e.y1),t.y2=Math.max(t.y2,e.y2),t.h=t.y2-t.y1},Go=function(t,e,n){t.x1=Math.min(t.x1,e),t.x2=Math.max(t.x2,e),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,n),t.y2=Math.max(t.y2,n),t.h=t.y2-t.y1},Fo=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.x1-=e,t.x2+=e,t.y1-=e,t.y2+=e,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},Ho=function(t){var e,n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===o.length)e=n=r=i=o[0];else if(2===o.length)e=r=o[0],i=n=o[1];else if(4===o.length){var a=Wn(o,4);e=a[0],n=a[1],r=a[2],i=a[3]}return t.x1-=i,t.x2+=n,t.y1-=e,t.y2+=r,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},Yo=function(t,e){t.x1=e.x1,t.y1=e.y1,t.x2=e.x2,t.y2=e.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1},zo=function(t,e){return!(t.x1>e.x2||e.x1>t.x2||t.x2e.y2||e.y1>t.y2)},Vo=function(t,e,n){return t.x1<=e&&e<=t.x2&&t.y1<=n&&n<=t.y2},Uo=function(t,e){return Vo(t,e.x,e.y)},Xo=function(t,e){return Vo(t,e.x1,e.y1)&&Vo(t,e.x2,e.y2)},Wo=function(t,e,n,r,i,o,a){var s,c,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"auto",l="auto"===u?ha(i,o):u,h=i/2,f=o/2,d=(l=Math.min(l,h,f))!==h,g=l!==f;if(d){var p=r-f-a;if((s=oa(t,e,n,r,n-h+l-a,p,n+h-l+a,p,!1)).length>0)return s}if(g){var v=n+h+a;if((s=oa(t,e,n,r,v,r-f+l-a,v,r+f-l+a,!1)).length>0)return s}if(d){var b=r+f+a;if((s=oa(t,e,n,r,n-h+l-a,b,n+h-l+a,b,!1)).length>0)return s}if(g){var y=n-h-a;if((s=oa(t,e,n,r,y,r-f+l-a,y,r+f-l+a,!1)).length>0)return s}var w=n-h+l,m=r-f+l;if((c=ra(t,e,n,r,w,m,l+a)).length>0&&c[0]<=w&&c[1]<=m)return[c[0],c[1]];var x=n+h-l,E=r-f+l;if((c=ra(t,e,n,r,x,E,l+a)).length>0&&c[0]>=x&&c[1]<=E)return[c[0],c[1]];var _=n+h-l,k=r+f-l;if((c=ra(t,e,n,r,_,k,l+a)).length>0&&c[0]>=_&&c[1]>=k)return[c[0],c[1]];var N=n-h+l,C=r+f-l;return(c=ra(t,e,n,r,N,C,l+a)).length>0&&c[0]<=N&&c[1]>=C?[c[0],c[1]]:[]},qo=function(t,e,n,r,i,o,a){var s=a,c=Math.min(n,i),u=Math.max(n,i),l=Math.min(r,o),h=Math.max(r,o);return c-s<=t&&t<=u+s&&l-s<=e&&e<=h+s},Zo=function(t,e,n,r,i,o,a,s,c){var u=Math.min(n,a,i)-c,l=Math.max(n,a,i)+c,h=Math.min(r,s,o)-c,f=Math.max(r,s,o)+c;return!(tl||ef)},Ko=function(t,e,n,r,i,o,a,s){var c=[];!function(t,e,n,r,i){var o,a,s,c,u,l,h,f;0===t&&(t=1e-5),s=-27*(r/=t)+(e/=t)*(9*(n/=t)-e*e*2),o=(a=(3*n-e*e)/9)*a*a+(s/=54)*s,i[1]=0,h=e/3,o>0?(u=(u=s+Math.sqrt(o))<0?-Math.pow(-u,1/3):Math.pow(u,1/3),l=(l=s-Math.sqrt(o))<0?-Math.pow(-l,1/3):Math.pow(l,1/3),i[0]=-h+u+l,h+=(u+l)/2,i[4]=i[2]=-h,h=Math.sqrt(3)*(-l+u)/2,i[3]=h,i[5]=-h):(i[5]=i[3]=0,0===o?(f=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3),i[0]=2*f-h,i[4]=i[2]=-(f+h)):(c=(a=-a)*a*a,c=Math.acos(s/Math.sqrt(c)),f=2*Math.sqrt(a),i[0]=-h+f*Math.cos(c/3),i[2]=-h+f*Math.cos((c+2*Math.PI)/3),i[4]=-h+f*Math.cos((c+4*Math.PI)/3)))}(1*n*n-4*n*i+2*n*a+4*i*i-4*i*a+a*a+r*r-4*r*o+2*r*s+4*o*o-4*o*s+s*s,9*n*i-3*n*n-3*n*a-6*i*i+3*i*a+9*r*o-3*r*r-3*r*s-6*o*o+3*o*s,3*n*n-6*n*i+n*a-n*t+2*i*i+2*i*t-a*t+3*r*r-6*r*o+r*s-r*e+2*o*o+2*o*e-s*e,1*n*i-n*n+n*t-i*t+r*o-r*r+r*e-o*e,c);for(var u=[],l=0;l<6;l+=2)Math.abs(c[l+1])<1e-7&&c[l]>=0&&c[l]<=1&&u.push(c[l]);u.push(1),u.push(0);for(var h,f,d,g=-1,p=0;p=0?dc?(t-i)*(t-i)+(e-o)*(e-o):u-h},Qo=function(t,e,n){for(var r,i,o,a,s=0,c=0;c=t&&t>=o||r<=t&&t<=o))continue;(t-r)/(o-r)*(a-i)+i>e&&s++}return s%2!=0},Jo=function(t,e,n,r,i,o,a,s,c){var u,l=new Array(n.length);null!=s[0]?(u=Math.atan(s[1]/s[0]),s[0]<0?u+=Math.PI/2:u=-u-Math.PI/2):u=s;for(var h,f=Math.cos(-u),d=Math.sin(-u),g=0;g0){var p=ea(l,-c);h=ta(p)}else h=l;return Qo(t,e,h)},ta=function(t){for(var e,n,r,i,o,a,s,c,u=new Array(t.length/2),l=0;l=0&&g<=1&&v.push(g),p>=0&&p<=1&&v.push(p),0===v.length)return[];var b=v[0]*s[0]+t,y=v[0]*s[1]+e;return v.length>1?v[0]==v[1]?[b,y]:[b,y,v[1]*s[0]+t,v[1]*s[1]+e]:[b,y]},ia=function(t,e,n){return e<=t&&t<=n||n<=t&&t<=e?t:t<=e&&e<=n||n<=e&&e<=t?e:n},oa=function(t,e,n,r,i,o,a,s,c){var u=t-i,l=n-t,h=a-i,f=e-o,d=r-e,g=s-o,p=h*f-g*u,v=l*f-d*u,b=g*l-h*d;if(0!==b){var y=p/b,w=v/b,m=-.001;return m<=y&&y<=1.001&&m<=w&&w<=1.001||c?[t+y*l,e+y*d]:[]}return 0===p||0===v?ia(t,n,a)===a?[a,s]:ia(t,n,i)===i?[i,o]:ia(i,a,n)===n?[n,r]:[]:[]},aa=function(t,e,n,r,i,o,a,s){var c,u,l,h,f,d,g=[],p=new Array(n.length),v=!0;if(null==o&&(v=!1),v){for(var b=0;b0){var y=ea(p,-s);u=ta(y)}else u=p}else u=n;for(var w=0;wu&&(u=e)},h=function(t){return c[t]},f=0;f0?m.edgesTo(w)[0]:w.edgesTo(m)[0];var x=r(y);w=w.id(),u[w]>u[p]+x&&(u[w]=u[p]+x,f.nodes.indexOf(w)<0?f.push(w):f.updateItem(w),c[w]=0,n[w]=[]),u[w]==u[p]+x&&(c[w]=c[w]+c[p],n[w].push(p))}else for(var E=0;E0;){for(var C=e.pop(),T=0;T0&&a.push(n[s]);0!==a.length&&i.push(r.collection(a))}return i}(l,c,e,r);return w=function(t){for(var e=0;e5&&void 0!==arguments[5]?arguments[5]:Ma,a=r,s=0;s=2?Ga(t,e,n,0,Ra,ja):Ga(t,e,n,0,Da)},squaredEuclidean:function(t,e,n){return Ga(t,e,n,0,Ra)},manhattan:function(t,e,n){return Ga(t,e,n,0,Da)},max:function(t,e,n){return Ga(t,e,n,-1/0,Ba)}};function Ha(t,e,n,r,i,o){var a;return a=Pr(t)?t:Fa[t]||Fa.euclidean,0===e&&Pr(t)?a(i,o):a(e,n,r,i,o)}Fa["squared-euclidean"]=Fa.squaredEuclidean,Fa.squaredeuclidean=Fa.squaredEuclidean;var Ya=qi({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),za=function(t){return Ya(t)},Va=function(t,e,n,r,i){var o="kMedoids"!==i?function(t){return n[t]}:function(t){return r[t](n)},a=n,s=e;return Ha(t,r.length,o,function(t){return r[t](e)},a,s)},Ua=function(t,e,n){for(var r=n.length,i=new Array(r),o=new Array(r),a=new Array(e),s=null,c=0;cn)return!1;return!0},Ka=function(t,e,n){for(var r=0;ri&&(i=e[c][u],o=u);a[o].push(t[c])}for(var l=0;l=i.threshold||"dendrogram"===i.mode&&1===t.length)return!1;var d,g=e[a],p=e[r[a]];d="dendrogram"===i.mode?{left:g,right:p,key:g.key}:{value:g.value.concat(p.value),key:g.key},t[g.index]=d,t.splice(p.index,1),e[g.key]=d;for(var v=0;vn[p.key][b.key]&&(o=n[p.key][b.key])):"max"===i.linkage?(o=n[g.key][b.key],n[g.key][b.key]a&&(o=c,a=e[i*t+c])}o>0&&r.push(o)}for(var u=0;u1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?(n0&&t.splice(0,e)):t=t.slice(e,n);for(var o=0,a=t.length-1;a>=0;a--){var s=t[a];i?isFinite(s)||(t[a]=-1/0,o++):t.splice(a,1)}r&&t.sort(function(t,e){return t-e});var c=t.length,u=Math.floor(c/2);return c%2!=0?t[u+1+o]:(t[u-1+o]+t[u+o])/2}(t):"mean"===e?function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=0,i=0,o=e;o1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=1/0,i=e;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=-1/0,i=e;i=C?(T=C,C=I,A=O):I>T&&(T=I);for(var S=0;S0?1:0;_[E%u.minIterations*e+j]=B,R+=B}if(R>0&&(E>=u.minIterations-1||E==u.maxIterations-1)){for(var G=0,F=0;F0&&r.push(i);return r}(e,o,a),z=function(t,e,n){for(var r=ds(t,e,n),i=0;ic&&(s=u,c=l)}n[i]=o[s]}return ds(t,e,n)}(e,r,Y),V={},U=0;U1||a>1)&&(u=!0),l[e]=[],t.outgoers().forEach(function(t){t.isEdge()&&l[e].push(t.id())})}else h[e]=[void 0,t.target().id()]}):c.forEach(function(t){var e=t.id();t.isNode()?(t.degree(!0)%2&&(n?r?u=!0:r=e:n=e),l[e]=[],t.connectedEdges().forEach(function(t){return l[e].push(t.id())})):h[e]=[t.source().id(),t.target().id()]});var f={found:!1,trail:void 0};if(u)return f;if(r&&n)if(s){if(i&&r!=i)return f;i=r}else{if(i&&r!=i&&n!=i)return f;i||(i=r)}else i||(i=c[0].id());var d=function(t){for(var e,n,r,i=t,o=[t];l[i].length;)e=l[i].shift(),n=h[e][0],i!=(r=h[e][1])?(l[r]=l[r].filter(function(t){return t!=e}),i=r):s||i==n||(l[n]=l[n].filter(function(t){return t!=e}),i=n),o.unshift(e),o.unshift(i);return o},g=[],p=[];for(p=d(i);1!=p.length;)0==l[p[0]].length?(g.unshift(c.getElementById(p.shift())),g.unshift(c.getElementById(p.shift()))):p=d(p.shift()).concat(p);for(var v in g.unshift(c.getElementById(p.shift())),l)if(l[v].length)return f;return f.found=!0,f.trail=this.spawn(g,!0),f}},ys=function(){var t=this,e={},n=0,r=0,i=[],o=[],a={},s=function(c,u,l){c===l&&(r+=1),e[u]={id:n,low:n++,cutVertex:!1};var h,f,d,g,p=t.getElementById(u).connectedEdges().intersection(t);0===p.size()?i.push(t.spawn(t.getElementById(u))):p.forEach(function(n){h=n.source().id(),f=n.target().id(),(d=h===u?f:h)!==l&&(g=n.id(),a[g]||(a[g]=!0,o.push({x:u,y:d,edge:n})),d in e?e[u].low=Math.min(e[u].low,e[d].id):(s(c,d,u),e[u].low=Math.min(e[u].low,e[d].low),e[u].id<=e[d].low&&(e[u].cutVertex=!0,function(n,r){for(var a=o.length-1,s=[],c=t.spawn();o[a].x!=n||o[a].y!=r;)s.push(o.pop().edge),a--;s.push(o.pop().edge),s.forEach(function(n){var r=n.connectedNodes().intersection(t);c.merge(n),r.forEach(function(n){var r=n.id(),i=n.connectedEdges().intersection(t);c.merge(n),e[r].cutVertex?c.merge(i.filter(function(t){return t.isLoop()})):c.merge(i)})}),i.push(c)}(u,d))))})};t.forEach(function(t){if(t.isNode()){var n=t.id();n in e||(r=0,s(n,n),e[n].cutVertex=r>1)}});var c=Object.keys(e).filter(function(t){return e[t].cutVertex}).map(function(e){return t.getElementById(e)});return{cut:t.spawn(c),components:i}},ws=function(){var t=this,e={},n=0,r=[],i=[],o=t.spawn(t),a=function(s){if(i.push(s),e[s]={index:n,low:n++,explored:!1},t.getElementById(s).connectedEdges().intersection(t).forEach(function(t){var n=t.target().id();n!==s&&(n in e||a(n),e[n].explored||(e[s].low=Math.min(e[s].low,e[n].low)))}),e[s].index===e[s].low){for(var c=t.spawn();;){var u=i.pop();if(c.merge(t.getElementById(u)),e[u].low=e[s].index,e[u].explored=!0,u===s)break}var l=c.edgesWith(c),h=c.merge(l);r.push(h),o=o.difference(h)}};return t.forEach(function(t){if(t.isNode()){var n=t.id();n in e||a(n)}}),{cut:o,components:r}},ms={};[io,fo,go,vo,yo,mo,ko,va,ya,ma,Ea,La,ns,ls,ps,bs,{hopcroftTarjanBiconnected:ys,htbc:ys,htb:ys,hopcroftTarjanBiconnectedComponents:ys},{tarjanStronglyConnected:ws,tsc:ws,tscc:ws,tarjanStronglyConnectedComponents:ws}].forEach(function(t){ri(ms,t)});var xs=function(t){if(!(this instanceof xs))return new xs(t);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof t&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))};xs.prototype={fulfill:function(t){return Es(this,1,"fulfillValue",t)},reject:function(t){return Es(this,2,"rejectReason",t)},then:function(t,e){var n=this,r=new xs;return n.onFulfilled.push(Ns(t,r,"fulfill")),n.onRejected.push(Ns(e,r,"reject")),_s(n),r.proxy}};var Es=function(t,e,n,r){return 0===t.state&&(t.state=e,t[n]=r,_s(t)),t},_s=function(t){1===t.state?ks(t,"onFulfilled",t.fulfillValue):2===t.state&&ks(t,"onRejected",t.rejectReason)},ks=function(t,e,n){if(0!==t[e].length){var r=t[e];t[e]=[];var i=function(){for(var t=0;t0:void 0}},clearQueue:function(){return function(){var t=this,e=void 0!==t.length?t:[t];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n-1}}(),i=function(){if(xc)return mc;xc=1;var t=gu();return mc=function(e,n){var r=this.__data__,i=t(r,e);return i<0?(++this.size,r.push([e,n])):r[i][1]=n,this},mc}();function o(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&e%1==0&&e0&&this.spawn(r).updateStyle().emit("class"),e},addClass:function(t){return this.toggleClass(t,!0)},hasClass:function(t){var e=this[0];return null!=e&&e._private.classes.has(t)},toggleClass:function(t,e){Dr(t)||(t=t.match(/\S+/g)||[]);for(var n=this,r=void 0===e,i=[],o=0,a=n.length;o0&&this.spawn(i).updateStyle().emit("class"),n},removeClass:function(t){return this.toggleClass(t,!1)},flashClass:function(t,e){var n=this;if(null==e)e=250;else if(0===e)return n;return n.addClass(t),setTimeout(function(){n.removeClass(t)},e),n}};Ku.className=Ku.classNames=Ku.classes;var $u={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:$r,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};$u.variable="(?:[\\w-.]|(?:\\\\"+$u.metaChar+"))+",$u.className="(?:[\\w-]|(?:\\\\"+$u.metaChar+"))+",$u.value=$u.string+"|"+$u.number,$u.id=$u.variable,function(){var t,e,n;for(t=$u.comparatorOp.split("|"),n=0;n=0||"="!==e&&($u.comparatorOp+="|\\!"+e)}();var Qu=20,Ju=[{selector:":selected",matches:function(t){return t.selected()}},{selector:":unselected",matches:function(t){return!t.selected()}},{selector:":selectable",matches:function(t){return t.selectable()}},{selector:":unselectable",matches:function(t){return!t.selectable()}},{selector:":locked",matches:function(t){return t.locked()}},{selector:":unlocked",matches:function(t){return!t.locked()}},{selector:":visible",matches:function(t){return t.visible()}},{selector:":hidden",matches:function(t){return!t.visible()}},{selector:":transparent",matches:function(t){return t.transparent()}},{selector:":grabbed",matches:function(t){return t.grabbed()}},{selector:":free",matches:function(t){return!t.grabbed()}},{selector:":removed",matches:function(t){return t.removed()}},{selector:":inside",matches:function(t){return!t.removed()}},{selector:":grabbable",matches:function(t){return t.grabbable()}},{selector:":ungrabbable",matches:function(t){return!t.grabbable()}},{selector:":animated",matches:function(t){return t.animated()}},{selector:":unanimated",matches:function(t){return!t.animated()}},{selector:":parent",matches:function(t){return t.isParent()}},{selector:":childless",matches:function(t){return t.isChildless()}},{selector:":child",matches:function(t){return t.isChild()}},{selector:":orphan",matches:function(t){return t.isOrphan()}},{selector:":nonorphan",matches:function(t){return t.isChild()}},{selector:":compound",matches:function(t){return t.isNode()?t.isParent():t.source().isParent()||t.target().isParent()}},{selector:":loop",matches:function(t){return t.isLoop()}},{selector:":simple",matches:function(t){return t.isSimple()}},{selector:":active",matches:function(t){return t.active()}},{selector:":inactive",matches:function(t){return!t.active()}},{selector:":backgrounding",matches:function(t){return t.backgrounding()}},{selector:":nonbackgrounding",matches:function(t){return!t.backgrounding()}}].sort(function(t,e){return function(t,e){return-1*ni(t,e)}(t.selector,e.selector)}),tl=function(){for(var t,e={},n=0;n0&&u.edgeCount>0)return zi("The selector `"+t+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(u.edgeCount>1)return zi("The selector `"+t+"` is invalid because it uses multiple edge selectors"),!1;1===u.edgeCount&&zi("The selector `"+t+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var t=function(t){return null==t?"":t},e=function(e){return Mr(e)?'"'+e+'"':t(e)},n=function(t){return" "+t+" "},r=function(i,o){return i.checks.reduce(function(a,s,c){return a+(o===i&&0===c?"$":"")+function(i,o){var a=i.type,s=i.value;switch(a){case 0:var c=t(s);return c.substring(0,c.length-1);case 3:var u=i.field,l=i.operator;return"["+u+n(t(l))+e(s)+"]";case 5:var h=i.operator,f=i.field;return"["+t(h)+f+"]";case 4:return"["+i.field+"]";case 6:var d=i.operator;return"[["+i.field+n(t(d))+e(s)+"]]";case 7:return s;case 8:return"#"+s;case 9:return"."+s;case 17:case 15:return r(i.parent,o)+n(">")+r(i.child,o);case 18:case 16:return r(i.ancestor,o)+" "+r(i.descendant,o);case 19:var g=r(i.left,o),p=r(i.subject,o),v=r(i.right,o);return g+(g.length>0?" ":"")+p+v;case Qu:return""}}(s,o)},"")},i="",o=0;o1&&o=0&&(e=e.replace("!",""),l=!0),e.indexOf("@")>=0&&(e=e.replace("@",""),u=!0),(a||c||u)&&(i=a||s?""+t:"",o=""+n),u&&(t=i=i.toLowerCase(),n=o=o.toLowerCase()),e){case"*=":r=i.indexOf(o)>=0;break;case"$=":r=i.indexOf(o,i.length-o.length)>=0;break;case"^=":r=0===i.indexOf(o);break;case"=":r=t===n;break;case">":h=!0,r=t>n;break;case">=":h=!0,r=t>=n;break;case"<":h=!0,r=t0;){var u=i.shift();e(u),o.add(u.id()),a&&r(i,o,u)}return t}function ml(t,e,n){if(n.isParent())for(var r=n._private.children,i=0;i1&&void 0!==arguments[1])||arguments[1],ml)},yl.forEachUp=function(t){return wl(this,t,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],xl)},yl.forEachUpAndDown=function(t){return wl(this,t,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],El)},yl.ancestors=yl.parents,(pl=vl={data:qu.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:qu.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:qu.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:qu.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:qu.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:qu.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var t=this[0];if(t)return t._private.data.id}}).attr=pl.data,pl.removeAttr=pl.removeData;var _l,kl,Nl=vl,Cl={};function Tl(t){return function(e){var n=this;if(void 0===e&&(e=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,i=n[0],o=i._private.edges,a=0;ae}),minIndegree:Al("indegree",function(t,e){return te}),minOutdegree:Al("outdegree",function(t,e){return te})}),ri(Cl,{totalDegree:function(t){for(var e=0,n=this.nodes(),r=0;r0,l=u;u&&(c=c[0]);var h=l?c.position():{x:0,y:0};return i={x:s.x-h.x,y:s.y-h.y},void 0===t?i:i[t]}for(var f=0;f0,v=p;p&&(g=g[0]);var b=v?g.position():{x:0,y:0};void 0!==e?d.position(t,e+b[t]):void 0!==i&&d.position({x:i.x+b.x,y:i.y+b.y})}}else if(!o)return;return this}},_l.modelPosition=_l.point=_l.position,_l.modelPositions=_l.points=_l.positions,_l.renderedPoint=_l.renderedPosition,_l.relativePoint=_l.relativePosition;var Sl,Ll,Ml=kl;Sl=Ll={},Ll.renderedBoundingBox=function(t){var e=this.boundingBox(t),n=this.cy(),r=n.zoom(),i=n.pan(),o=e.x1*r+i.x,a=e.x2*r+i.x,s=e.y1*r+i.y,c=e.y2*r+i.y;return{x1:o,x2:a,y1:s,y2:c,w:a-o,h:c-s}},Ll.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.cy();return e.styleEnabled()&&e.hasCompoundNodes()?(this.forEachUp(function(e){if(e.isParent()){var n=e._private;n.compoundBoundsClean=!1,n.bbCache=null,t||e.emitAndNotify("bounds")}}),this):this},Ll.updateCompoundBounds=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function n(t){if(t.isParent()){var e=t._private,n=t.children(),r="include"===t.pstyle("compound-sizing-wrt-labels").value,i={width:{val:t.pstyle("min-width").pfValue,left:t.pstyle("min-width-bias-left"),right:t.pstyle("min-width-bias-right")},height:{val:t.pstyle("min-height").pfValue,top:t.pstyle("min-height-bias-top"),bottom:t.pstyle("min-height-bias-bottom")}},o=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),a=e.position;0!==o.w&&0!==o.h||((o={w:t.pstyle("width").pfValue,h:t.pstyle("height").pfValue}).x1=a.x-o.w/2,o.x2=a.x+o.w/2,o.y1=a.y-o.h/2,o.y2=a.y+o.h/2);var s=i.width.left.value;"px"===i.width.left.units&&i.width.val>0&&(s=100*s/i.width.val);var c=i.width.right.value;"px"===i.width.right.units&&i.width.val>0&&(c=100*c/i.width.val);var u=i.height.top.value;"px"===i.height.top.units&&i.height.val>0&&(u=100*u/i.height.val);var l=i.height.bottom.value;"px"===i.height.bottom.units&&i.height.val>0&&(l=100*l/i.height.val);var h=b(i.width.val-o.w,s,c),f=h.biasDiff,d=h.biasComplementDiff,g=b(i.height.val-o.h,u,l),p=g.biasDiff,v=g.biasComplementDiff;e.autoPadding=function(t,e,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return t>0?n.pfValue*t:0;case"height":return e>0?n.pfValue*e:0;case"average":return t>0&&e>0?n.pfValue*(t+e)/2:0;case"min":return t>0&&e>0?t>e?n.pfValue*e:n.pfValue*t:0;case"max":return t>0&&e>0?t>e?n.pfValue*t:n.pfValue*e:0;default:return 0}}(o.w,o.h,t.pstyle("padding"),t.pstyle("padding-relative-to").value),e.autoWidth=Math.max(o.w,i.width.val),a.x=(-f+o.x1+o.x2+d)/2,e.autoHeight=Math.max(o.h,i.height.val),a.y=(-p+o.y1+o.y2+v)/2}function b(t,e,n){var r=0,i=0,o=e+n;return t>0&&o>0&&(r=e/o*t,i=n/o*t),{biasDiff:r,biasComplementDiff:i}}}for(var r=0;rt.x2?r:t.x2,t.y1=nt.y2?i:t.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1)},Rl=function(t,e){return null==e?t:Dl(t,e.x1,e.y1,e.x2,e.y2)},jl=function(t,e,n){return $i(t,e,n)},Bl=function(t,e,n){if(!e.cy().headless()){var r,i,o=e._private,a=o.rstyle,s=a.arrowWidth/2;if("none"!==e.pstyle(n+"-arrow-shape").value){"source"===n?(r=a.srcX,i=a.srcY):"target"===n?(r=a.tgtX,i=a.tgtY):(r=a.midX,i=a.midY);var c=o.arrowBounds=o.arrowBounds||{},u=c[n]=c[n]||{};u.x1=r-s,u.y1=i-s,u.x2=r+s,u.y2=i+s,u.w=u.x2-u.x1,u.h=u.y2-u.y1,Fo(u,1),Dl(t,u.x1,u.y1,u.x2,u.y2)}}},Gl=function(t,e,n){if(!e.cy().headless()){var r;r=n?n+"-":"";var i=e._private,o=i.rstyle;if(e.pstyle(r+"label").strValue){var a,s,c,u,l=e.pstyle("text-halign"),h=e.pstyle("text-valign"),f=jl(o,"labelWidth",n),d=jl(o,"labelHeight",n),g=jl(o,"labelX",n),p=jl(o,"labelY",n),v=e.pstyle(r+"text-margin-x").pfValue,b=e.pstyle(r+"text-margin-y").pfValue,y=e.isEdge(),w=e.pstyle(r+"text-rotation"),m=e.pstyle("text-outline-width").pfValue,x=e.pstyle("text-border-width").pfValue/2,E=e.pstyle("text-background-padding").pfValue,_=d,k=f,N=k/2,C=_/2;if(y)a=g-N,s=g+N,c=p-C,u=p+C;else{switch(l.value){case"left":a=g-k,s=g;break;case"center":a=g-N,s=g+N;break;case"right":a=g,s=g+k}switch(h.value){case"top":c=p-_,u=p;break;case"center":c=p-C,u=p+C;break;case"bottom":c=p,u=p+_}}var T=v-Math.max(m,x)-E-2,A=v+Math.max(m,x)+E+2,I=b-Math.max(m,x)-E-2,O=b+Math.max(m,x)+E+2;a+=T,s+=A,c+=I,u+=O;var S=n||"main",L=i.labelBounds,M=L[S]=L[S]||{};M.x1=a,M.y1=c,M.x2=s,M.y2=u,M.w=s-a,M.h=u-c,M.leftPad=T,M.rightPad=A,M.topPad=I,M.botPad=O;var P=y&&"autorotate"===w.strValue,D=null!=w.pfValue&&0!==w.pfValue;if(P||D){var R=P?jl(i.rstyle,"labelAngle",n):w.pfValue,j=Math.cos(R),B=Math.sin(R),G=(a+s)/2,F=(c+u)/2;if(!y){switch(l.value){case"left":G=s;break;case"right":G=a}switch(h.value){case"top":F=u;break;case"bottom":F=c}}var H=function(t,e){return{x:(t-=G)*j-(e-=F)*B+G,y:t*B+e*j+F}},Y=H(a,c),z=H(a,u),V=H(s,c),U=H(s,u);a=Math.min(Y.x,z.x,V.x,U.x),s=Math.max(Y.x,z.x,V.x,U.x),c=Math.min(Y.y,z.y,V.y,U.y),u=Math.max(Y.y,z.y,V.y,U.y)}var X=S+"Rot",W=L[X]=L[X]||{};W.x1=a,W.y1=c,W.x2=s,W.y2=u,W.w=s-a,W.h=u-c,Dl(t,a,c,s,u),Dl(i.labelBounds.all,a,c,s,u)}return t}},Fl=function(t){var e=0,n=function(t){return(t?1:0)<0&&o>0){var a=e.pstyle("outline-offset").value,s=e.pstyle("shape").value,c=o+a,u=(t.w+2*c)/t.w,l=(t.h+2*c)/t.h,h=0;["diamond","pentagon","round-triangle"].includes(s)?(u=(t.w+2.4*c)/t.w,h=-c/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(s)?u=(t.w+2.4*c)/t.w:"star"===s?(u=(t.w+2.8*c)/t.w,l=(t.h+2.6*c)/t.h,h=-c/3.8):"triangle"===s?(u=(t.w+2.8*c)/t.w,l=(t.h+2.4*c)/t.h,h=-c/1.4):"vee"===s&&(u=(t.w+4.4*c)/t.w,l=(t.h+3.8*c)/t.h,h=.5*-c);var f=t.h*l-t.h,d=t.w*u-t.w;if(Ho(t,[Math.ceil(f/2),Math.ceil(d/2)]),0!==h){var g=(r=h,{x1:(n=t).x1+0,x2:n.x2+0,y1:n.y1+r,y2:n.y2+r,w:n.w,h:n.h});Bo(t,g)}}}}(f,t)}else if(p&&e.includeEdges)if(l&&!h){var T=t.pstyle("curve-style").strValue;if(n=Math.min(v.srcX,v.midX,v.tgtX),r=Math.max(v.srcX,v.midX,v.tgtX),i=Math.min(v.srcY,v.midY,v.tgtY),o=Math.max(v.srcY,v.midY,v.tgtY),Dl(f,n-=_,i-=_,r+=_,o+=_),"haystack"===T){var A=v.haystackPts;if(A&&2===A.length){if(n=A[0].x,i=A[0].y,n>(r=A[1].x)){var I=n;n=r,r=I}if(i>(o=A[1].y)){var O=i;i=o,o=O}Dl(f,n-_,i-_,r+_,o+_)}}else if("bezier"===T||"unbundled-bezier"===T||T.endsWith("segments")||T.endsWith("taxi")){var S;switch(T){case"bezier":case"unbundled-bezier":S=v.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":S=v.linePts}if(null!=S)for(var L=0;L(r=D.x)){var R=n;n=r,r=R}if((i=P.y)>(o=D.y)){var j=i;i=o,o=j}Dl(f,n-=_,i-=_,r+=_,o+=_)}if(l&&e.includeEdges&&p&&(Bl(f,t,"mid-source"),Bl(f,t,"mid-target"),Bl(f,t,"source"),Bl(f,t,"target")),l&&"yes"===t.pstyle("ghost").value){var B=t.pstyle("ghost-offset-x").pfValue,G=t.pstyle("ghost-offset-y").pfValue;Dl(f,f.x1+B,f.y1+G,f.x2+B,f.y2+G)}var F=d.bodyBounds=d.bodyBounds||{};Yo(F,f),Ho(F,b),Fo(F,1),l&&(n=f.x1,r=f.x2,i=f.y1,o=f.y2,Dl(f,n-E,i-E,r+E,o+E));var H=d.overlayBounds=d.overlayBounds||{};Yo(H,f),Ho(H,b),Fo(H,1);var Y=d.labelBounds=d.labelBounds||{};null!=Y.all?((c=Y.all).x1=1/0,c.y1=1/0,c.x2=-1/0,c.y2=-1/0,c.w=0,c.h=0):Y.all=jo(),l&&e.includeLabels&&(e.includeMainLabels&&Gl(f,t,null),p&&(e.includeSourceLabels&&Gl(f,t,"source"),e.includeTargetLabels&&Gl(f,t,"target")))}return f.x1=Pl(f.x1),f.y1=Pl(f.y1),f.x2=Pl(f.x2),f.y2=Pl(f.y2),f.w=Pl(f.x2-f.x1),f.h=Pl(f.y2-f.y1),f.w>0&&f.h>0&&w&&(Ho(f,b),Fo(f,1)),f}(t,zl),r.bbCache=n,r.bbCachePosKey=Hl(t)):n=r.bbCache,!o){var a=t.isNode();n=jo(),(e.includeNodes&&a||e.includeEdges&&!a)&&(e.includeOverlays?Rl(n,r.overlayBounds):Rl(n,r.bodyBounds)),e.includeLabels&&(e.includeMainLabels&&(!i||e.includeSourceLabels&&e.includeTargetLabels)?Rl(n,r.labelBounds.all):(e.includeMainLabels&&Rl(n,r.labelBounds.mainRot),e.includeSourceLabels&&Rl(n,r.labelBounds.sourceRot),e.includeTargetLabels&&Rl(n,r.labelBounds.targetRot))),n.w=n.x2-n.x1,n.h=n.y2-n.y1}return n},zl={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},Vl=Fl(zl),Ul=qi(zl);Ll.boundingBox=function(t){var e,n=void 0===t||void 0===t.useCache||!0===t.useCache,r=Xr(function(t){var e=t._private;return null==e.bbCache||e.styleDirty||e.bbCachePosKey!==Hl(t)},function(t){return t.id()});if(n&&1===this.length&&!r(this[0]))t=void 0===t?zl:Ul(t),e=Yl(this[0],t);else{e=jo();var i=Ul(t=t||zl),o=this,a=o.cy().styleEnabled();this.edges().forEach(r),this.nodes().forEach(r),a&&this.recalculateRenderedStyle(n),this.updateCompoundBounds(!n);for(var s=0;s0&&void 0!==arguments[0]?arguments[0]:ah,e=arguments.length>1?arguments[1]:void 0,n=0;n=0;s--)a(s);return this},ch.removeAllListeners=function(){return this.removeListener("*")},ch.emit=ch.trigger=function(t,e,n){var r=this.listeners,i=r.length;return this.emitting++,Dr(e)||(e=[e]),function(t,e,n){if("event"!==Lr(n))if(Rr(n))e(t,lh(t,n));else for(var r=Dr(n)?n:n.split(/\s+/),i=0;i1&&!r){var i=this.length-1,o=this[i],a=o._private.data.id;this[i]=void 0,this[t]=o,n.set(a,{ele:o,index:t})}return this.length--,this},unmergeOne:function(t){t=t[0];var e=this._private,n=t._private.data.id,r=e.map.get(n);if(!r)return this;var i=r.index;return this.unmergeAt(i),this},unmerge:function(t){var e=this._private.cy;if(!t)return this;if(t&&Mr(t)){var n=t;t=e.mutableElements().filter(n)}for(var r=0;r=0;e--)t(this[e])&&this.unmergeAt(e);return this},map:function(t,e){for(var n=[],r=this,i=0;ir&&(r=s,n=a)}return{value:r,ele:n}},min:function(t,e){for(var n,r=1/0,i=this,o=0;o=0&&i1&&void 0!==arguments[1])||arguments[1],n=this[0],r=n.cy();if(r.styleEnabled()&&n){n._private.styleDirty&&(n._private.styleDirty=!1,r.style().apply(n));var i=n._private.style[t];return null!=i?i:e?r.style().getDefaultProperty(t):null}},numericStyle:function(t){var e=this[0];if(e.cy().styleEnabled()&&e){var n=e.pstyle(t);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(t){var e=this[0];if(e.cy().styleEnabled())return e?e.pstyle(t).units:void 0},renderedStyle:function(t){var e=this.cy();if(!e.styleEnabled())return this;var n=this[0];return n?e.style().getRenderedStyle(n,t):void 0},style:function(t,e){var n=this.cy();if(!n.styleEnabled())return this;var r=!1,i=n.style();if(Rr(t)){var o=t;i.applyBypass(this,o,r),this.emitAndNotify("style")}else if(Mr(t)){if(void 0===e){var a=this[0];return a?i.getStylePropertyValue(a,t):void 0}i.applyBypass(this,t,e,r),this.emitAndNotify("style")}else if(void 0===t){var s=this[0];return s?i.getRawStyle(s):void 0}return this},removeStyle:function(t){var e=this.cy();if(!e.styleEnabled())return this;var n=!1,r=e.style(),i=this;if(void 0===t)for(var o=0;o0&&e.push(l[0]),e.push(s[0])}return this.spawn(e,!0).filter(t)},"neighborhood"),closedNeighborhood:function(t){return this.neighborhood().add(this).filter(t)},openNeighborhood:function(t){return this.neighborhood(t)}}),Dh.neighbourhood=Dh.neighborhood,Dh.closedNeighbourhood=Dh.closedNeighborhood,Dh.openNeighbourhood=Dh.openNeighborhood,ri(Dh,{source:bl(function(t){var e,n=this[0];return n&&(e=n._private.source||n.cy().collection()),e&&t?e.filter(t):e},"source"),target:bl(function(t){var e,n=this[0];return n&&(e=n._private.target||n.cy().collection()),e&&t?e.filter(t):e},"target"),sources:Gh({attr:"source"}),targets:Gh({attr:"target"})}),ri(Dh,{edgesWith:bl(Fh(),"edgesWith"),edgesTo:bl(Fh({thisIsSrc:!0}),"edgesTo")}),ri(Dh,{connectedEdges:bl(function(t){for(var e=[],n=0;n0);return o},component:function(){var t=this[0];return t.cy().mutableElements().components(t)[0]}}),Dh.componentsOf=Dh.components;var Yh=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==t){var i=new Ji,o=!1;if(e){if(e.length>0&&Rr(e[0])&&!Fr(e[0])){o=!0;for(var a=[],s=new eo,c=0,u=e.length;c0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this,o=i.cy(),a=o._private,s=[],c=[],u=0,l=i.length;u0){for(var P=t.length===i.length?i:new Yh(o,t),D=0;D0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=[],i={},o=n._private.cy;function a(t){var n=i[t.id()];e&&t.removed()||n||(i[t.id()]=!0,t.isNode()?(r.push(t),function(t){for(var e=t._private.edges,n=0;n0&&(t?_.emitAndNotify("remove"):e&&_.emit("remove"));for(var k=0;k=.001?function(e,r){for(var i=0;i<4;++i){var o=f(r,t,n);if(0===o)return r;r-=(h(r,t,n)-e)/o}return r}(e,a):0===c?a:function(e,r,i){var o,a,s=0;do{(o=h(a=r+(i-r)/2,t,n)-e)>0?i=a:r=a}while(Math.abs(o)>1e-7&&++s<10);return a}(e,r,r+i)}(o),e,r)};g.getControlPoints=function(){return[{x:t,y:e},{x:n,y:r}]};var p="generateBezier("+[t,e,n,r]+")";return g.toString=function(){return p},g}var Xh=function(){function t(t){return-t.tension*t.x-t.friction*t.v}function e(e,n,r){var i={x:e.x+r.dx*n,v:e.v+r.dv*n,tension:e.tension,friction:e.friction};return{dx:i.v,dv:t(i)}}function n(n,r){var i={dx:n.v,dv:t(n)},o=e(n,.5*r,i),a=e(n,.5*r,o),s=e(n,r,a),c=1/6*(i.dx+2*(o.dx+a.dx)+s.dx),u=1/6*(i.dv+2*(o.dv+a.dv)+s.dv);return n.x=n.x+c*r,n.v=n.v+u*r,n}return function t(e,r,i){var o,a,s,c={x:-1,v:0,tension:null,friction:null},u=[0],l=0,h=1e-4;for(e=parseFloat(e)||500,r=parseFloat(r)||20,i=i||null,c.tension=e,c.friction=r,a=(o=null!==i)?(l=t(e,r))/i*.016:.016;s=n(s||c,a),u.push(1+s.x),l+=16,Math.abs(s.x)>h&&Math.abs(s.v)>h;);return o?function(t){return u[t*(u.length-1)|0]}:l}}(),Wh=function(t,e,n,r){var i=Uh(t,e,n,r);return function(t,e,n){return t+(e-t)*i(n)}},qh={linear:function(t,e,n){return t+(e-t)*n},ease:Wh(.25,.1,.25,1),"ease-in":Wh(.42,0,1,1),"ease-out":Wh(0,0,.58,1),"ease-in-out":Wh(.42,0,.58,1),"ease-in-sine":Wh(.47,0,.745,.715),"ease-out-sine":Wh(.39,.575,.565,1),"ease-in-out-sine":Wh(.445,.05,.55,.95),"ease-in-quad":Wh(.55,.085,.68,.53),"ease-out-quad":Wh(.25,.46,.45,.94),"ease-in-out-quad":Wh(.455,.03,.515,.955),"ease-in-cubic":Wh(.55,.055,.675,.19),"ease-out-cubic":Wh(.215,.61,.355,1),"ease-in-out-cubic":Wh(.645,.045,.355,1),"ease-in-quart":Wh(.895,.03,.685,.22),"ease-out-quart":Wh(.165,.84,.44,1),"ease-in-out-quart":Wh(.77,0,.175,1),"ease-in-quint":Wh(.755,.05,.855,.06),"ease-out-quint":Wh(.23,1,.32,1),"ease-in-out-quint":Wh(.86,0,.07,1),"ease-in-expo":Wh(.95,.05,.795,.035),"ease-out-expo":Wh(.19,1,.22,1),"ease-in-out-expo":Wh(1,0,0,1),"ease-in-circ":Wh(.6,.04,.98,.335),"ease-out-circ":Wh(.075,.82,.165,1),"ease-in-out-circ":Wh(.785,.135,.15,.86),spring:function(t,e,n){if(0===n)return qh.linear;var r=Xh(t,e,n);return function(t,e,n){return t+(e-t)*r(n)}},"cubic-bezier":Wh};function Zh(t,e,n,r,i){if(1===r)return n;if(e===n)return n;var o=i(e,n,r);return null==t||((t.roundValue||t.color)&&(o=Math.round(o)),void 0!==t.min&&(o=Math.max(o,t.min)),void 0!==t.max&&(o=Math.min(o,t.max))),o}function Kh(t,e){return null!=t.pfValue||null!=t.value?null==t.pfValue||null!=e&&"%"===e.type.units?t.value:t.pfValue:t}function $h(t,e,n,r,i){var o=null!=i?i.type:null;n<0?n=0:n>1&&(n=1);var a=Kh(t,i),s=Kh(e,i);if(jr(a)&&jr(s))return Zh(o,a,s,n,r);if(Dr(a)&&Dr(s)){for(var c=[],u=0;u0?("spring"===h&&f.push(a.duration),a.easingImpl=qh[h].apply(null,f)):a.easingImpl=qh[h]}var d,g=a.easingImpl;if(d=0===a.duration?1:(n-c)/a.duration,a.applying&&(d=a.progress),d<0?d=0:d>1&&(d=1),null==a.delay){var p=a.startPosition,v=a.position;if(v&&i&&!t.locked()){var b={};Jh(p.x,v.x)&&(b.x=$h(p.x,v.x,d,g)),Jh(p.y,v.y)&&(b.y=$h(p.y,v.y,d,g)),t.position(b)}var y=a.startPan,w=a.pan,m=o.pan,x=null!=w&&r;x&&(Jh(y.x,w.x)&&(m.x=$h(y.x,w.x,d,g)),Jh(y.y,w.y)&&(m.y=$h(y.y,w.y,d,g)),t.emit("pan"));var E=a.startZoom,_=a.zoom,k=null!=_&&r;k&&(Jh(E,_)&&(o.zoom=Ro(o.minZoom,$h(E,_,d,g),o.maxZoom)),t.emit("zoom")),(x||k)&&t.emit("viewport");var N=a.style;if(N&&N.length>0&&i){for(var C=0;C=0;e--)(0,t[e])();t.splice(0,t.length)},l=o.length-1;l>=0;l--){var h=o[l],f=h._private;f.stopped?(o.splice(l,1),f.hooked=!1,f.playing=!1,f.started=!1,u(f.frames)):(f.playing||f.applying)&&(f.playing&&f.applying&&(f.applying=!1),f.started||tf(0,h,t),Qh(e,h,t,n),f.applying&&(f.applying=!1),u(f.frames),null!=f.step&&f.step(t),h.completed()&&(o.splice(l,1),f.hooked=!1,f.playing=!1,f.started=!1,u(f.completes)),s=!0)}return n||0!==o.length||0!==a.length||r.push(e),s}for(var o=!1,a=0;a0?e.notify("draw",n):e.notify("draw")),n.unmerge(r),e.emit("step")}var nf={animate:qu.animate(),animation:qu.animation(),animated:qu.animated(),clearQueue:qu.clearQueue(),delay:qu.delay(),delayAnimation:qu.delayAnimation(),stop:qu.stop(),addToAnimationPool:function(t){this.styleEnabled()&&this._private.aniEles.merge(t)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var t=this;if(t._private.animationsRunning=!0,t.styleEnabled()){var e=t.renderer();e&&e.beforeRender?e.beforeRender(function(e,n){ef(n,t)},e.beforeRenderPriorities.animations):function e(){t._private.animationsRunning&&mi(function(n){ef(n,t),e()})}()}}},rf={qualifierCompare:function(t,e){return null==t||null==e?null==t&&null==e:t.sameText(e)},eventMatches:function(t,e,n){var r=e.qualifier;return null==r||t!==n.target&&Fr(n.target)&&r.matches(n.target)},addEventFields:function(t,e){e.cy=t,e.target=t},callbackContext:function(t,e,n){return null!=e.qualifier?n.target:t}},of=function(t){return Mr(t)?new fl(t):t},af={createEmitter:function(){var t=this._private;return t.emitter||(t.emitter=new sh(rf,this)),this},emitter:function(){return this._private.emitter},on:function(t,e,n){return this.emitter().on(t,of(e),n),this},removeListener:function(t,e,n){return this.emitter().removeListener(t,of(e),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(t,e,n){return this.emitter().one(t,of(e),n),this},once:function(t,e,n){return this.emitter().one(t,of(e),n),this},emit:function(t,e){return this.emitter().emit(t,e),this},emitAndNotify:function(t,e){return this.emit(t),this.notify(t,e),this}};qu.eventAliasesOn(af);var sf={png:function(t){return t=t||{},this._private.renderer.png(t)},jpg:function(t){var e=this._private.renderer;return(t=t||{}).bg=t.bg||"#fff",e.jpg(t)}};sf.jpeg=sf.jpg;var cf={layout:function(t){var e=this;if(null!=t)if(null!=t.name){var n,r=t.name,i=e.extension("layout",r);if(null!=i)return n=Mr(t.eles)?e.$(t.eles):null!=t.eles?t.eles:e.$(),new i(ri({},t,{cy:e,eles:n}));Hi("No such layout `"+r+"` found. Did you forget to import it and `cytoscape.use()` it?")}else Hi("A `name` must be specified to make a layout");else Hi("Layout options must be specified to make a layout")}};cf.createLayout=cf.makeLayout=cf.layout;var uf={notify:function(t,e){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[t]=n.batchNotifications[t]||this.collection();null!=e&&r.merge(e)}else if(n.notificationsEnabled){var i=this.renderer();!this.destroyed()&&i&&i.notify(t,e)}},notifications:function(t){var e=this._private;return void 0===t?e.notificationsEnabled:(e.notificationsEnabled=!!t,this)},noNotifications:function(t){this.notifications(!1),t(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var t=this._private;return null==t.batchCount&&(t.batchCount=0),0===t.batchCount&&(t.batchStyleEles=this.collection(),t.batchNotifications={}),t.batchCount++,this},endBatch:function(){var t=this._private;if(0===t.batchCount)return this;if(t.batchCount--,0===t.batchCount){t.batchStyleEles.updateStyle();var e=this.renderer();Object.keys(t.batchNotifications).forEach(function(n){var r=t.batchNotifications[n];r.empty()?e.notify(n):e.notify(n,r)})}return this},batch:function(t){return this.startBatch(),t(),this.endBatch(),this},batchData:function(t){var e=this;return this.batch(function(){for(var n=Object.keys(t),r=0;r0;)e.removeChild(e.childNodes[0]);t._private.renderer=null,t.mutableElements().forEach(function(t){var e=t._private;e.rscratch={},e.rstyle={},e.animation.current=[],e.animation.queue=[]})},onRender:function(t){return this.on("render",t)},offRender:function(t){return this.off("render",t)}};hf.invalidateDimensions=hf.resize;var ff={collection:function(t,e){return Mr(t)?this.$(t):Gr(t)?t.collection():Dr(t)?(e||(e={}),new Yh(this,t,e.unique,e.removed)):new Yh(this)},nodes:function(t){var e=this.$(function(t){return t.isNode()});return t?e.filter(t):e},edges:function(t){var e=this.$(function(t){return t.isEdge()});return t?e.filter(t):e},$:function(t){var e=this._private.elements;return t?e.filter(t):e.spawnSelf()},mutableElements:function(){return this._private.elements}};ff.elements=ff.filter=ff.$;var df={},gf="t";df.apply=function(t){for(var e=this,n=e._private.cy.collection(),r=0;r0;if(f||h&&d){var g=void 0;f&&d||f?g=u.properties:d&&(g=u.mappedProperties);for(var p=0;p1&&(v=1),s.color){var x=i.valueMin[0],E=i.valueMax[0],_=i.valueMin[1],k=i.valueMax[1],N=i.valueMin[2],C=i.valueMax[2],T=null==i.valueMin[3]?1:i.valueMin[3],A=null==i.valueMax[3]?1:i.valueMax[3],I=[Math.round(x+(E-x)*v),Math.round(_+(k-_)*v),Math.round(N+(C-N)*v),Math.round(T+(A-T)*v)];n={bypass:i.bypass,name:i.name,value:I,strValue:"rgb("+I[0]+", "+I[1]+", "+I[2]+")"}}else{if(!s.number)return!1;var O=i.valueMin+(i.valueMax-i.valueMin)*v;n=this.parse(i.name,O,i.bypass,f)}if(!n)return p(),!1;n.mapping=i,i=n;break;case a.data:for(var S=i.field.split("."),L=h.data,M=0;M0&&o>0){for(var s={},c=!1,u=0;u0?t.delayAnimation(a).play().promise().then(e):e()}).then(function(){return t.animation({style:s,duration:o,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){n.removeBypasses(t,i),t.emitAndNotify("style"),r.transitioning=!1})}else r.transitioning&&(this.removeBypasses(t,i),t.emitAndNotify("style"),r.transitioning=!1)},df.checkTrigger=function(t,e,n,r,i,o){var a=this.properties[e],s=i(a);t.removed()||null!=s&&s(n,r,t)&&o(a)},df.checkZOrderTrigger=function(t,e,n,r){var i=this;this.checkTrigger(t,e,n,r,function(t){return t.triggersZOrder},function(){i._private.cy.notify("zorder",t)})},df.checkBoundsTrigger=function(t,e,n,r){this.checkTrigger(t,e,n,r,function(t){return t.triggersBounds},function(e){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache()})},df.checkConnectedEdgesBoundsTrigger=function(t,e,n,r){this.checkTrigger(t,e,n,r,function(t){return t.triggersBoundsOfConnectedEdges},function(e){t.connectedEdges().forEach(function(t){t.dirtyBoundingBoxCache()})})},df.checkParallelEdgesBoundsTrigger=function(t,e,n,r){this.checkTrigger(t,e,n,r,function(t){return t.triggersBoundsOfParallelEdges},function(e){t.parallelEdges().forEach(function(t){t.dirtyBoundingBoxCache()})})},df.checkTriggers=function(t,e,n,r){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,n,r),this.checkBoundsTrigger(t,e,n,r),this.checkConnectedEdgesBoundsTrigger(t,e,n,r),this.checkParallelEdgesBoundsTrigger(t,e,n,r)};var pf={applyBypass:function(t,e,n,r){var i=[];if("*"===e||"**"===e){if(void 0!==n)for(var o=0;oe.length?o.substr(e.length):""}function s(){n=n.length>r.length?n.substr(r.length):""}for(o=o.replace(/[/][*](\s|.)+?[*][/]/g,"");!o.match(/^\s*$/);){var c=o.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!c){zi("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+o);break}e=c[0];var u=c[1];if("core"!==u&&new fl(u).invalid)zi("Skipping parsing of block: Invalid selector found in string stylesheet: "+u),a();else{var l=c[2],h=!1;n=l;for(var f=[];!n.match(/^\s*$/);){var d=n.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!d){zi("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+l),h=!0;break}r=d[0];var g=d[1],p=d[2];this.properties[g]?i.parse(g,p)?(f.push({name:g,val:p}),s()):(zi("Skipping property: Invalid property definition in: "+r),s()):(zi("Skipping property: Invalid property name in: "+r),s())}if(h){a();break}i.selector(u);for(var v=0;v=7&&"d"===e[0]&&(u=new RegExp(s.data.regex).exec(e))){if(n)return!1;var f=s.data;return{name:t,value:u,strValue:""+e,mapped:f,field:u[1],bypass:n}}if(e.length>=10&&"m"===e[0]&&(l=new RegExp(s.mapData.regex).exec(e))){if(n)return!1;if(h.multiple)return!1;var d=s.mapData;if(!h.color&&!h.number)return!1;var g=this.parse(t,l[4]);if(!g||g.mapped)return!1;var p=this.parse(t,l[5]);if(!p||p.mapped)return!1;if(g.pfValue===p.pfValue||g.strValue===p.strValue)return zi("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+g.strValue+"`"),this.parse(t,g.strValue);if(h.color){var v=g.value,b=p.value;if(!(v[0]!==b[0]||v[1]!==b[1]||v[2]!==b[2]||v[3]!==b[3]&&(null!=v[3]&&1!==v[3]||null!=b[3]&&1!==b[3])))return!1}return{name:t,value:l,strValue:""+e,mapped:d,field:l[1],fieldMin:parseFloat(l[2]),fieldMax:parseFloat(l[3]),valueMin:g.value,valueMax:p.value,bypass:n}}}if(h.multiple&&"multiple"!==r){var y;if(y=c?e.split(/\s+/):Dr(e)?e:[e],h.evenMultiple&&y.length%2!=0)return null;for(var w=[],m=[],x=[],E="",_=!1,k=0;k0?" ":"")+N.strValue}return h.validate&&!h.validate(w,m)?null:h.singleEnum&&_?1===w.length&&Mr(w[0])?{name:t,value:w[0],strValue:w[0],bypass:n}:null:{name:t,value:w,pfValue:x,strValue:E,bypass:n,units:m}}var C,T,A=function(){for(var r=0;rh.max||h.strictMax&&e===h.max))return null;var M={name:t,value:e,strValue:""+e+(I||""),units:I,bypass:n};return h.unitless||"px"!==I&&"em"!==I?M.pfValue=e:M.pfValue="px"!==I&&I?this.getEmSizeInPixels()*e:e,"ms"!==I&&"s"!==I||(M.pfValue="ms"===I?e:1e3*e),"deg"!==I&&"rad"!==I||(M.pfValue="rad"===I?e:(C=e,Math.PI*C/180)),"%"===I&&(M.pfValue=e/100),M}if(h.propList){var P=[],D=""+e;if("none"===D);else{for(var R=D.split(/\s*,\s*|\s+/),j=0;j0&&c>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:a=(a=(a=Math.min((s-2*e)/n.w,(c-2*e)/n.h))>this._private.maxZoom?this._private.maxZoom:a)=n.minZoom&&(n.maxZoom=e),this},minZoom:function(t){return void 0===t?this._private.minZoom:this.zoomRange({min:t})},maxZoom:function(t){return void 0===t?this._private.maxZoom:this.zoomRange({max:t})},getZoomedViewport:function(t){var e,n,r=this._private,i=r.pan,o=r.zoom,a=!1;if(r.zoomingEnabled||(a=!0),jr(t)?n=t:Rr(t)&&(n=t.level,null!=t.position?e=No(t.position,o,i):null!=t.renderedPosition&&(e=t.renderedPosition),null==e||r.panningEnabled||(a=!0)),n=(n=n>r.maxZoom?r.maxZoom:n)e.maxZoom||!e.zoomingEnabled?o=!0:(e.zoom=s,i.push("zoom"))}if(r&&(!o||!t.cancelOnFailedZoom)&&e.panningEnabled){var c=t.pan;jr(c.x)&&(e.pan.x=c.x,a=!1),jr(c.y)&&(e.pan.y=c.y,a=!1),a||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(t){var e=this.getCenterPan(t);return e&&(this._private.pan=e,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(t,e){if(this._private.panningEnabled){if(Mr(t)){var n=t;t=this.mutableElements().filter(n)}else Gr(t)||(t=this.mutableElements());if(0!==t.length){var r=t.boundingBox(),i=this.width(),o=this.height();return{x:(i-(e=void 0===e?this._private.zoom:e)*(r.x1+r.x2))/2,y:(o-e*(r.y1+r.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var t,e,n=this._private,r=n.container;return n.sizeCache=n.sizeCache||(r?(t=this.window().getComputedStyle(r),e=function(e){return parseFloat(t.getPropertyValue(e))},{width:r.clientWidth-e("padding-left")-e("padding-right"),height:r.clientHeight-e("padding-top")-e("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var t=this._private.pan,e=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-t.x)/e,x2:(n.x2-t.x)/e,y1:(n.y1-t.y)/e,y2:(n.y2-t.y)/e};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var t=this.width(),e=this.height();return{x1:0,y1:0,x2:t,y2:e,w:t,h:e}},multiClickDebounceTime:function(t){return t?(this._private.multiClickDebounceTime=t,this):this._private.multiClickDebounceTime}};Nf.centre=Nf.center,Nf.autolockNodes=Nf.autolock,Nf.autoungrabifyNodes=Nf.autoungrabify;var Cf={data:qu.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:qu.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:qu.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:qu.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Cf.attr=Cf.data,Cf.removeAttr=Cf.removeData;var Tf=function(t){var e=this,n=(t=ri({},t)).container;n&&!Br(n)&&Br(n[0])&&(n=n[0]);var r=n?n._cyreg:null;(r=r||{})&&r.cy&&(r.cy.destroy(),r={});var i=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=e;var o=void 0!==Qn&&void 0!==n&&!t.headless,a=t;a.layout=ri({name:o?"grid":"null"},a.layout),a.renderer=ri({name:o?"canvas":"null"},a.renderer);var s=function(t,e,n){return void 0!==e?e:void 0!==n?n:t},c=this._private={container:n,ready:!1,options:a,elements:new Yh(this),listeners:[],aniEles:new Yh(this),data:a.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,a.zoomingEnabled),userZoomingEnabled:s(!0,a.userZoomingEnabled),panningEnabled:s(!0,a.panningEnabled),userPanningEnabled:s(!0,a.userPanningEnabled),boxSelectionEnabled:s(!0,a.boxSelectionEnabled),autolock:s(!1,a.autolock,a.autolockNodes),autoungrabify:s(!1,a.autoungrabify,a.autoungrabifyNodes),autounselectify:s(!1,a.autounselectify),styleEnabled:void 0===a.styleEnabled?o:a.styleEnabled,zoom:jr(a.zoom)?a.zoom:1,pan:{x:Rr(a.pan)&&jr(a.pan.x)?a.pan.x:0,y:Rr(a.pan)&&jr(a.pan.y)?a.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,a.multiClickDebounceTime)};this.createEmitter(),this.selectionType(a.selectionType),this.zoomRange({min:a.minZoom,max:a.maxZoom}),c.styleEnabled&&e.setStyle([]);var u=ri({},a,a.renderer);e.initRenderer(u),function(t,e){if(t.some(Ur))return Ts.all(t).then(e);e(t)}([a.style,a.elements],function(t){var n=t[0],o=t[1];c.styleEnabled&&e.style().append(n),function(t,n,r){e.notifications(!1);var i=e.mutableElements();i.length>0&&i.remove(),null!=t&&(Rr(t)||Dr(t))&&e.add(t),e.one("layoutready",function(t){e.notifications(!0),e.emit(t),e.one("load",n),e.emitAndNotify("load")}).one("layoutstop",function(){e.one("done",r),e.emit("done")});var o=ri({},e._private.options.layout);o.eles=e.elements(),e.layout(o).run()}(o,function(){e.startAnimationLoop(),c.ready=!0,Pr(a.ready)&&e.on("ready",a.ready);for(var t=0;t0,c=!!e.boundingBox,u=n.extent(),l=jo(c?e.boundingBox:{x1:u.x1,y1:u.y1,w:u.w,h:u.h});if(Gr(e.roots))t=e.roots;else if(Dr(e.roots)){for(var h=[],f=0;f0;){var O=I(),S=N(O,T);if(S)O.outgoers().filter(function(t){return t.isNode()&&r.has(t)}).forEach(A);else if(null===S){zi("Detected double maximal shift for node `"+O.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var L=0;if(e.avoidOverlap)for(var M=0;M0&&y[0].length<=3?o/2:0),s=2*Math.PI/y[r].length*i;return 0===r&&1===y[0].length&&(a=1),{x:X+a*Math.cos(s),y:W+a*Math.sin(s)}}var u=y[r].length,h=Math.max(1===u?0:c?(l.w-2*e.padding-q.w)/((e.grid?K:u)-1):(l.w-2*e.padding-q.w)/((e.grid?K:u)+1),L);return{x:X+(i+1-(u+1)/2)*h,y:W+(r+1-(F+1)/2)*Z}}),this};var Pf={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function Df(t){this.options=ri({},Pf,t)}Df.prototype.run=function(){var t=this.options,e=t,n=t.cy,r=e.eles,i=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise,o=r.nodes().not(":parent");e.sort&&(o=o.sort(e.sort));for(var a,s=jo(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),c=s.x1+s.w/2,u=s.y1+s.h/2,l=(void 0===e.sweep?2*Math.PI-2*Math.PI/o.length:e.sweep)/Math.max(1,o.length-1),h=0,f=0;f1&&e.avoidOverlap){h*=1.75;var v=Math.cos(l)-Math.cos(0),b=Math.sin(l)-Math.sin(0),y=Math.sqrt(h*h/(v*v+b*b));a=Math.max(y,a)}return r.nodes().layoutPositions(this,e,function(t,n){var r=e.startAngle+n*l*(i?1:-1),o=a*Math.cos(r),s=a*Math.sin(r);return{x:c+o,y:u+s}}),this};var Rf,jf={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(t){return t.degree()},levelWidth:function(t){return t.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function Bf(t){this.options=ri({},jf,t)}Bf.prototype.run=function(){for(var t=this.options,e=t,n=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise,r=t.cy,i=e.eles,o=i.nodes().not(":parent"),a=jo(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s=a.x1+a.w/2,c=a.y1+a.h/2,u=[],l=0,h=0;h0&&Math.abs(y[0].value-m.value)>=v&&(y=[],b.push(y)),y.push(m)}var x=l+e.minNodeSpacing;if(!e.avoidOverlap){var E=b.length>0&&b[0].length>1,_=(Math.min(a.w,a.h)/2-x)/(b.length+E?1:0);x=Math.min(x,_)}for(var k=0,N=0;N1&&e.avoidOverlap){var I=Math.cos(A)-Math.cos(0),O=Math.sin(A)-Math.sin(0),S=Math.sqrt(x*x/(I*I+O*O));k=Math.max(S,k)}C.r=k,k+=x}if(e.equidistant){for(var L=0,M=0,P=0;P=t.numIter||(Wf(r,t),r.temperature=r.temperature*t.coolingFactor,r.temperature=t.animationThreshold&&o(),mi(l)):(od(r,t),s())};l()}else{for(;u;)u=a(c),c++;od(r,t),s()}return this},Ff.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},Ff.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var Hf=function(t,e,n){for(var r=n.eles.edges(),i=n.eles.nodes(),o=jo(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),a={isCompound:t.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:o.w,clientHeight:o.h,boundingBox:o},s=n.eles.components(),c={},u=0;u0)for(a.graphSet.push(x),u=0;ur.count?0:r.graph},zf=function(t,e,n,r){var i=r.graphSet[n];if(-10)var s=(u=r.nodeOverlap*a)*i/(p=Math.sqrt(i*i+o*o)),c=u*o/p;else{var u,l=Qf(t,i,o),h=Qf(e,-1*i,-1*o),f=h.x-l.x,d=h.y-l.y,g=f*f+d*d,p=Math.sqrt(g);s=(u=(t.nodeRepulsion+e.nodeRepulsion)/g)*f/p,c=u*d/p}t.isLocked||(t.offsetX-=s,t.offsetY-=c),e.isLocked||(e.offsetX+=s,e.offsetY+=c)}},$f=function(t,e,n,r){if(n>0)var i=t.maxX-e.minX;else i=e.maxX-t.minX;if(r>0)var o=t.maxY-e.minY;else o=e.maxY-t.minY;return i>=0&&o>=0?Math.sqrt(i*i+o*o):0},Qf=function(t,e,n){var r=t.positionX,i=t.positionY,o=t.height||1,a=t.width||1,s=n/e,c=o/a,u={};return 0===e&&0n?(u.x=r,u.y=i+o/2,u):0e&&-1*c<=s&&s<=c?(u.x=r-a/2,u.y=i-a*n/2/e,u):0=c)?(u.x=r+o*e/2/n,u.y=i+o/2,u):0>n&&(s<=-1*c||s>=c)?(u.x=r-o*e/2/n,u.y=i-o/2,u):u},Jf=function(t,e){for(var n=0;n1){var g=e.gravity*h/d,p=e.gravity*f/d;l.offsetX+=g,l.offsetY+=p}}}}},ed=function(t,e){var n=[],r=0,i=-1;for(n.push.apply(n,t.graphSet[0]),i+=t.graphSet[0].length;r<=i;){var o=n[r++],a=t.idToIndex[o],s=t.layoutNodes[a],c=s.children;if(0n)var i={x:n*t/r,y:n*e/r};else i={x:t,y:e};return i},id=function(t,e){var n=t.parentId;if(null!=n){var r=e.layoutNodes[e.idToIndex[n]],i=!1;return(null==r.maxX||t.maxX+r.padRight>r.maxX)&&(r.maxX=t.maxX+r.padRight,i=!0),(null==r.minX||t.minX-r.padLeftr.maxY)&&(r.maxY=t.maxY+r.padBottom,i=!0),(null==r.minY||t.minY-r.padTopg&&(h+=d+e.componentSpacing,l=0,f=0,d=0)}}},ad={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(t){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function sd(t){this.options=ri({},ad,t)}sd.prototype.run=function(){var t=this.options,e=t,n=t.cy,r=e.eles,i=r.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));var o=jo(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===o.h||0===o.w)r.nodes().layoutPositions(this,e,function(t){return{x:o.x1,y:o.y1}});else{var a=i.size(),s=Math.sqrt(a*o.h/o.w),c=Math.round(s),u=Math.round(o.w/o.h*s),l=function(t){if(null==t)return Math.min(c,u);Math.min(c,u)==c?c=t:u=t},h=function(t){if(null==t)return Math.max(c,u);Math.max(c,u)==c?c=t:u=t},f=e.rows,d=null!=e.cols?e.cols:e.columns;if(null!=f&&null!=d)c=f,u=d;else if(null!=f&&null==d)c=f,u=Math.ceil(a/c);else if(null==f&&null!=d)u=d,c=Math.ceil(a/u);else if(u*c>a){var g=l(),p=h();(g-1)*p>=a?l(g-1):(p-1)*g>=a&&h(p-1)}else for(;u*c=a?h(b+1):l(v+1)}var y=o.w/u,w=o.h/c;if(e.condense&&(y=0,w=0),e.avoidOverlap)for(var m=0;m=u&&(S=0,O++)},M={},P=0;P(r=$o(t,e,m[x],m[x+1],m[x+2],m[x+3])))return v(n,r),!0}else if("bezier"===o.edgeType||"multibezier"===o.edgeType||"self"===o.edgeType||"compound"===o.edgeType)for(m=o.allpts,x=0;x+5(r=Ko(t,e,m[x],m[x+1],m[x+2],m[x+3],m[x+4],m[x+5])))return v(n,r),!0;y=y||i.source,w=w||i.target;var E=a.getArrowWidth(c,l),_=[{name:"source",x:o.arrowStartX,y:o.arrowStartY,angle:o.srcArrowAngle},{name:"target",x:o.arrowEndX,y:o.arrowEndY,angle:o.tgtArrowAngle},{name:"mid-source",x:o.midX,y:o.midY,angle:o.midsrcArrowAngle},{name:"mid-target",x:o.midX,y:o.midY,angle:o.midtgtArrowAngle}];for(x=0;x<_.length;x++){var k=_[x],N=s.arrowShapes[n.pstyle(k.name+"-arrow-shape").value],C=n.pstyle("width").pfValue;if(N.roughCollide(t,e,E,k.angle,{x:k.x,y:k.y},C,f)&&N.collide(t,e,E,k.angle,{x:k.x,y:k.y},C,f))return v(n),!0}h&&u.length>0&&(b(y),b(w))}function w(t,e,n){return $i(t,e,n)}function m(n,r){var i,o=n._private,a=g;i=r?r+"-":"",n.boundingBox();var s=o.labelBounds[r||"main"],c=n.pstyle(i+"label").value;if("yes"===n.pstyle("text-events").strValue&&c){var u=w(o.rscratch,"labelX",r),l=w(o.rscratch,"labelY",r),h=w(o.rscratch,"labelAngle",r),f=n.pstyle(i+"text-margin-x").pfValue,d=n.pstyle(i+"text-margin-y").pfValue,p=s.x1-a-f,b=s.x2+a-f,y=s.y1-a-d,m=s.y2+a-d;if(h){var x=Math.cos(h),E=Math.sin(h),_=function(t,e){return{x:(t-=u)*x-(e-=l)*E+u,y:t*E+e*x+l}},k=_(p,y),N=_(p,m),C=_(b,y),T=_(b,m),A=[k.x+f,k.y+d,C.x+f,C.y+d,T.x+f,T.y+d,N.x+f,N.y+d];if(Qo(t,e,A))return v(n),!0}else if(Vo(s,t,e))return v(n),!0}}n&&(c=c.interactive);for(var x=c.length-1;x>=0;x--){var E=c[x];E.isNode()?b(E)||m(E):y(E)||m(E)||m(E,"source")||m(E,"target")}return u},getAllInBox:function(t,e,n,r){var i=this.getCachedZSortedEles().interactive,o=2/this.cy.zoom(),a=[],s=Math.min(t,n),c=Math.max(t,n),u=Math.min(e,r),l=Math.max(e,r),h=jo({x1:t=s,y1:e=u,x2:n=c,y2:r=l});function f(t,e,n){return $i(t,e,n)}function d(t,e){var n=t._private,r=o;t.boundingBox();var i=n.labelBounds.main,a=f(n.rscratch,"labelX",e),s=f(n.rscratch,"labelY",e),c=f(n.rscratch,"labelAngle",e),u=t.pstyle("text-margin-x").pfValue,l=t.pstyle("text-margin-y").pfValue,h=i.x1-r-u,d=i.x2+r-u,g=i.y1-r-l,p=i.y2+r-l;if(c){var v=Math.cos(c),b=Math.sin(c),y=function(t,e){return{x:(t-=a)*v-(e-=s)*b+a,y:t*b+e*v+s}};return[y(h,g),y(d,g),y(d,p),y(h,p)]}return[{x:h,y:g},{x:d,y:g},{x:d,y:p},{x:h,y:p}]}for(var g=0;g4&&void 0!==arguments[4])||arguments[4];return 0===r||0===e.radius?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(function(t,e,n,r,i){var o,a;if(t!==jd?Fd(e,t,Bd):((a=Bd).x=-1*(o=Gd).x,a.y=-1*o.y,a.nx=-1*o.nx,a.ny=-1*o.ny,a.ang=o.ang>0?-(Math.PI-o.ang):Math.PI+o.ang),Fd(e,n,Gd),_d=Bd.nx*Gd.ny-Bd.ny*Gd.nx,kd=Bd.nx*Gd.nx-Bd.ny*-Gd.ny,Td=Math.asin(Math.max(-1,Math.min(1,_d))),Math.abs(Td)<1e-6)return xd=e.x,Ed=e.y,void(Id=Sd=0);Nd=1,Cd=!1,kd<0?Td<0?Td=Math.PI+Td:(Td=Math.PI-Td,Nd=-1,Cd=!0):Td>0&&(Nd=-1,Cd=!0),Sd=void 0!==e.radius?e.radius:r,Ad=Td/2,Ld=Math.min(Bd.len/2,Gd.len/2),i?(Od=Math.abs(Math.cos(Ad)*Sd/Math.sin(Ad)))>Ld?(Od=Ld,Id=Math.abs(Od*Math.sin(Ad)/Math.cos(Ad))):Id=Sd:(Od=Math.min(Ld,Sd),Id=Math.abs(Od*Math.sin(Ad)/Math.cos(Ad))),Dd=e.x+Gd.nx*Od,Rd=e.y+Gd.ny*Od,xd=Dd-Gd.ny*Id*Nd,Ed=Rd+Gd.nx*Id*Nd,Md=e.x+Bd.nx*Od,Pd=e.y+Bd.ny*Od,jd=e}(t,e,n,r,i),{cx:xd,cy:Ed,radius:Id,startX:Md,startY:Pd,stopX:Dd,stopY:Rd,startAngle:Bd.ang+Math.PI/2*Nd,endAngle:Gd.ang-Math.PI/2*Nd,counterClockwise:Cd})}var zd=.01,Vd=Math.sqrt(.02),Ud={};function Xd(t){var e=[];if(null!=t){for(var n=0;n0?Math.max(t-e,0):Math.min(t+e,0)},T=C(k,E),A=C(N,_),I=!1;"auto"===v?p=Math.abs(T)>Math.abs(A)?i:r:v===c||v===s?(p=r,I=!0):v!==o&&v!==a||(p=i,I=!0);var O,S=p===r,L=S?A:T,M=S?N:k,P=Oo(M),D=!1;I&&(y||m)||!(v===s&&M<0||v===c&&M>0||v===o&&M>0||v===a&&M<0)||(L=(P*=-1)*Math.abs(L),D=!0);var R=function(t){return Math.abs(t)=Math.abs(L)},j=R(O=y?(w<0?1+w:w)*L:(w<0?L:0)+w*P),B=R(Math.abs(L)-Math.abs(O));if(!j&&!B||D)if(S){var G=u.y1+O+(g?h/2*P:0),F=u.x1,H=u.x2;n.segpts=[F,G,H,G]}else{var Y=u.x1+O+(g?l/2*P:0),z=u.y1,V=u.y2;n.segpts=[Y,z,Y,V]}else if(S){var U=Math.abs(M)<=h/2,X=Math.abs(k)<=f/2;if(U){var W=(u.x1+u.x2)/2,q=u.y1,Z=u.y2;n.segpts=[W,q,W,Z]}else if(X){var K=(u.y1+u.y2)/2,$=u.x1,Q=u.x2;n.segpts=[$,K,Q,K]}else n.segpts=[u.x1,u.y2]}else{var J=Math.abs(M)<=l/2,tt=Math.abs(N)<=d/2;if(J){var et=(u.y1+u.y2)/2,nt=u.x1,rt=u.x2;n.segpts=[nt,et,rt,et]}else if(tt){var it=(u.x1+u.x2)/2,ot=u.y1,at=u.y2;n.segpts=[it,ot,it,at]}else n.segpts=[u.x2,u.y1]}if(n.isRound){var st=t.pstyle("taxi-radius").value,ct="arc-radius"===t.pstyle("radius-type").value[0];n.radii=new Array(n.segpts.length/2).fill(st),n.isArcRadius=new Array(n.segpts.length/2).fill(ct)}},Ud.tryToCorrectInvalidPoints=function(t,e){var n=t._private.rscratch;if("bezier"===n.edgeType){var r=e.srcPos,i=e.tgtPos,o=e.srcW,a=e.srcH,s=e.tgtW,c=e.tgtH,u=e.srcShape,l=e.tgtShape,h=e.srcCornerRadius,f=e.tgtCornerRadius,d=e.srcRs,g=e.tgtRs,p=!jr(n.startX)||!jr(n.startY),v=!jr(n.arrowStartX)||!jr(n.arrowStartY),b=!jr(n.endX)||!jr(n.endY),y=!jr(n.arrowEndX)||!jr(n.arrowEndY),w=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,m=So({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),x=mp.poolIndex()){var v=g;g=p,p=v}var b=h.srcPos=g.position(),y=h.tgtPos=p.position(),w=h.srcW=g.outerWidth(),x=h.srcH=g.outerHeight(),E=h.tgtW=p.outerWidth(),_=h.tgtH=p.outerHeight(),k=h.srcShape=n.nodeShapes[e.getNodeShape(g)],N=h.tgtShape=n.nodeShapes[e.getNodeShape(p)],C=h.srcCornerRadius="auto"===g.pstyle("corner-radius").value?"auto":g.pstyle("corner-radius").pfValue,T=h.tgtCornerRadius="auto"===p.pstyle("corner-radius").value?"auto":p.pstyle("corner-radius").pfValue,A=h.tgtRs=p._private.rscratch,I=h.srcRs=g._private.rscratch;h.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var O=0;O=Vd||(V=Math.sqrt(Math.max(z*z,zd)+Math.max(Y*Y,zd)));var U=h.vector={x:z,y:Y},X=h.vectorNorm={x:U.x/V,y:U.y/V},W={x:-X.y,y:X.x};h.nodesOverlap=!jr(V)||N.checkPoint(R[0],R[1],0,E,_,y.x,y.y,T,A)||k.checkPoint(B[0],B[1],0,w,x,b.x,b.y,C,I),h.vectorNormInverse=W,t={nodesOverlap:h.nodesOverlap,dirCounts:h.dirCounts,calculatedIntersection:!0,hasBezier:h.hasBezier,hasUnbundled:h.hasUnbundled,eles:h.eles,srcPos:y,srcRs:A,tgtPos:b,tgtRs:I,srcW:E,srcH:_,tgtW:w,tgtH:x,srcIntn:G,tgtIntn:j,srcShape:N,tgtShape:k,posPts:{x1:H.x2,y1:H.y2,x2:H.x1,y2:H.y1},intersectionPts:{x1:F.x2,y1:F.y2,x2:F.x1,y2:F.y1},vector:{x:-U.x,y:-U.y},vectorNorm:{x:-X.x,y:-X.y},vectorNormInverse:{x:-W.x,y:-W.y}}}var q=D?t:h;L.nodesOverlap=q.nodesOverlap,L.srcIntn=q.srcIntn,L.tgtIntn=q.tgtIntn,L.isRound=M.startsWith("round"),r&&(g.isParent()||g.isChild()||p.isParent()||p.isChild())&&(g.parents().anySame(p)||p.parents().anySame(g)||g.same(p)&&g.isParent())?e.findCompoundLoopPoints(S,q,O,P):g===p?e.findLoopPoints(S,q,O,P):M.endsWith("segments")?e.findSegmentsPoints(S,q):M.endsWith("taxi")?e.findTaxiPoints(S,q):"straight"===M||!P&&h.eles.length%2==1&&O===Math.floor(h.eles.length/2)?e.findStraightEdgePoints(S):e.findBezierPoints(S,q,O,P,D),e.findEndpoints(S),e.tryToCorrectInvalidPoints(S,q),e.checkForInvalidEdgeWarning(S),e.storeAllpts(S),e.storeEdgeProjections(S),e.calculateArrowAngles(S),e.recalculateEdgeLabelProjections(S),e.calculateLabelAngles(S)}},m=0;m0){var U=u,X=Lo(U,To(e)),W=Lo(U,To(V)),q=X;W2&&Lo(U,{x:V[2],y:V[3]})0){var st=l,ct=Lo(st,To(e)),ut=Lo(st,To(at)),lt=ct;ut2&&Lo(st,{x:at[2],y:at[3]})=u||y){l={cp:p,segment:b};break}}if(l)break}var w=l.cp,m=l.segment,x=(u-f)/m.length,E=m.t1-m.t0,_=s?m.t0+E*x:m.t1-E*x;_=Ro(0,_,1),e=Do(w.p0,w.p1,w.p2,_),i=function(t,e,n,r){var i=Ro(0,r-.001,1),o=Ro(0,r+.001,1),a=Do(t,e,n,i),s=Do(t,e,n,o);return Qd(a,s)}(w.p0,w.p1,w.p2,_);break;case"straight":case"segments":case"haystack":for(var k,N,C,T,A=0,I=r.allpts.length,O=0;O+3=u));O+=2);var S=(u-N)/k;S=Ro(0,S,1),e=function(t,e,n,r){var i=e.x-t.x,o=e.y-t.y,a=So(t,e),s=i/a,c=o/a;return n=null==n?0:n,r=null!=r?r:n*a,{x:t.x+s*r,y:t.y+c*r}}(C,T,S),i=Qd(C,T)}a("labelX",n,e.x),a("labelY",n,e.y),a("labelAutoAngle",n,i)}};u("source"),u("target"),this.applyLabelDimensions(t)}},Kd.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))},Kd.applyPrefixedLabelDimensions=function(t,e){var n=t._private,r=this.getLabelText(t,e),i=Oi(r,t._private.labelDimsKey);if($i(n.rscratch,"prefixedLabelDimsKey",e)!==i){Qi(n.rscratch,"prefixedLabelDimsKey",e,i);var o=this.calculateLabelDimensions(t,r),a=t.pstyle("line-height").pfValue,s=t.pstyle("text-wrap").strValue,c=$i(n.rscratch,"labelWrapCachedLines",e)||[],u="wrap"!==s?1:Math.max(c.length,1),l=o.height/u,h=l*a,f=o.width,d=o.height+(u-1)*(a-1)*l;Qi(n.rstyle,"labelWidth",e,f),Qi(n.rscratch,"labelWidth",e,f),Qi(n.rstyle,"labelHeight",e,d),Qi(n.rscratch,"labelHeight",e,d),Qi(n.rscratch,"labelLineHeight",e,h)}},Kd.getLabelText=function(t,e){var n=t._private,r=e?e+"-":"",i=t.pstyle(r+"label").strValue,o=t.pstyle("text-transform").value,a=function(t,r){return r?(Qi(n.rscratch,t,e,r),r):$i(n.rscratch,t,e)};if(!i)return"";"none"==o||("uppercase"==o?i=i.toUpperCase():"lowercase"==o&&(i=i.toLowerCase()));var s=t.pstyle("text-wrap").value;if("wrap"===s){var c=a("labelKey");if(null!=c&&a("labelWrapKey")===c)return a("labelWrapCachedText");for(var u=i.split("\n"),l=t.pstyle("text-max-width").pfValue,h="anywhere"===t.pstyle("text-overflow-wrap").value,f=[],d=/[\s\u200b]+|$/g,g=0;gl){var y,w="",m=0,x=Un(p.matchAll(d));try{for(x.s();!(y=x.n()).done;){var E=y.value,_=E[0],k=p.substring(m,E.index);m=E.index+_.length;var N=0===w.length?k:w+k+_;this.calculateLabelDimensions(t,N).width<=l?w+=k+_:(w&&f.push(w),w=k+_)}}catch(t){x.e(t)}finally{x.f()}w.match(/^[\s\u200b]+$/)||f.push(w)}else f.push(p)}a("labelWrapCachedLines",f),i=a("labelWrapCachedText",f.join("\n")),a("labelWrapKey",c)}else if("ellipsis"===s){var C=t.pstyle("text-max-width").pfValue,T="",A=!1;if(this.calculateLabelDimensions(t,i).widthC);I++)T+=i[I],I===i.length-1&&(A=!0);return A||(T+="…"),T}return i},Kd.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,n=t.pstyle("text-halign").strValue;if("auto"!==e)return e;if(!t.isNode())return"center";switch(n){case"left":return"right";case"right":return"left";default:return"center"}},Kd.calculateLabelDimensions=function(t,e){var n=this.cy.window().document,r=t.pstyle("font-style").strValue,i=t.pstyle("font-size").pfValue,o=t.pstyle("font-family").strValue,a=t.pstyle("font-weight").strValue,s=this.labelCalcCanvas,c=this.labelCalcCanvasContext;if(!s){s=this.labelCalcCanvas=n.createElement("canvas"),c=this.labelCalcCanvasContext=s.getContext("2d");var u=s.style;u.position="absolute",u.left="-9999px",u.top="-9999px",u.zIndex="-1",u.visibility="hidden",u.pointerEvents="none"}c.font="".concat(r," ").concat(a," ").concat(i,"px ").concat(o);for(var l=0,h=0,f=e.split("\n"),d=0;d1&&void 0!==arguments[1])||arguments[1];if(e.merge(t),n)for(var r=0;r=t.desktopTapThreshold2}var C=i(e);v&&(t.hoverData.tapholdCancelled=!0),n=!0,r(p,["mousemove","vmousemove","tapdrag"],e,{x:l[0],y:l[1]});var T=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||a.emit({originalEvent:e,type:"boxstart",position:{x:l[0],y:l[1]}}),g[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()};if(3===t.hoverData.which){if(v){var A={originalEvent:e,type:"cxtdrag",position:{x:l[0],y:l[1]}};w?w.emit(A):a.emit(A),t.hoverData.cxtDragged=!0,t.hoverData.cxtOver&&p===t.hoverData.cxtOver||(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit({originalEvent:e,type:"cxtdragout",position:{x:l[0],y:l[1]}}),t.hoverData.cxtOver=p,p&&p.emit({originalEvent:e,type:"cxtdragover",position:{x:l[0],y:l[1]}}))}}else if(t.hoverData.dragging){if(n=!0,a.panningEnabled()&&a.userPanningEnabled()){var I;if(t.hoverData.justStartedPan){var O=t.hoverData.mdownPos;I={x:(l[0]-O[0])*s,y:(l[1]-O[1])*s},t.hoverData.justStartedPan=!1}else I={x:m[0]*s,y:m[1]*s};a.panBy(I),a.emit("dragpan"),t.hoverData.dragged=!0}l=t.projectIntoViewport(e.clientX,e.clientY)}else if(1!=g[4]||null!=w&&!w.pannable()){if(w&&w.pannable()&&w.active()&&w.unactivate(),w&&w.grabbed()||p==b||(b&&r(b,["mouseout","tapdragout"],e,{x:l[0],y:l[1]}),p&&r(p,["mouseover","tapdragover"],e,{x:l[0],y:l[1]}),t.hoverData.last=p),w)if(v){if(a.boxSelectionEnabled()&&C)w&&w.grabbed()&&(h(x),w.emit("freeon"),x.emit("free"),t.dragData.didDrag&&(w.emit("dragfreeon"),x.emit("dragfree"))),T();else if(w&&w.grabbed()&&t.nodeIsDraggable(w)){var S=!t.dragData.didDrag;S&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||u(x,{inDragLayer:!0});var L={x:0,y:0};if(jr(m[0])&&jr(m[1])&&(L.x+=m[0],L.y+=m[1],S)){var M=t.hoverData.dragDelta;M&&jr(M[0])&&jr(M[1])&&(L.x+=M[0],L.y+=M[1])}t.hoverData.draggingEles=!0,x.silentShift(L).emit("position drag"),t.redrawHint("drag",!0),t.redraw()}}else!function(){var e=t.hoverData.dragDelta=t.hoverData.dragDelta||[];0===e.length?(e.push(m[0]),e.push(m[1])):(e[0]+=m[0],e[1]+=m[1])}();n=!0}else v&&(t.hoverData.dragging||!a.boxSelectionEnabled()||!C&&a.panningEnabled()&&a.userPanningEnabled()?!t.hoverData.selecting&&a.panningEnabled()&&a.userPanningEnabled()&&o(w,t.hoverData.downs)&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,g[4]=0,t.data.bgActivePosistion=To(f),t.redrawHint("select",!0),t.redraw()):T(),w&&w.pannable()&&w.active()&&w.unactivate());return g[2]=l[0],g[3]=l[1],n?(e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),!1):void 0}},!1),t.registerBinding(e,"mouseup",function(e){if((1!==t.hoverData.which||1===e.which||!t.hoverData.capture)&&t.hoverData.capture){t.hoverData.capture=!1;var o=t.cy,a=t.projectIntoViewport(e.clientX,e.clientY),s=t.selection,c=t.findNearestElement(a[0],a[1],!0,!1),u=t.dragData.possibleDragElements,l=t.hoverData.down,f=i(e);if(t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,l&&l.unactivate(),3===t.hoverData.which){var d={originalEvent:e,type:"cxttapend",position:{x:a[0],y:a[1]}};if(l?l.emit(d):o.emit(d),!t.hoverData.cxtDragged){var g={originalEvent:e,type:"cxttap",position:{x:a[0],y:a[1]}};l?l.emit(g):o.emit(g)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(1===t.hoverData.which){if(r(c,["mouseup","tapend","vmouseup"],e,{x:a[0],y:a[1]}),t.dragData.didDrag||t.hoverData.dragged||t.hoverData.selecting||t.hoverData.isOverThresholdDrag||(r(l,["click","tap","vclick"],e,{x:a[0],y:a[1]}),m=!1,e.timeStamp-x<=o.multiClickDebounceTime()?(w&&clearTimeout(w),m=!0,x=null,r(l,["dblclick","dbltap","vdblclick"],e,{x:a[0],y:a[1]})):(w=setTimeout(function(){m||r(l,["oneclick","onetap","voneclick"],e,{x:a[0],y:a[1]})},o.multiClickDebounceTime()),x=e.timeStamp)),null!=l||t.dragData.didDrag||t.hoverData.selecting||t.hoverData.dragged||i(e)||(o.$(n).unselect(["tapunselect"]),u.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=u=o.collection()),c!=l||t.dragData.didDrag||t.hoverData.selecting||null!=c&&c._private.selectable&&(t.hoverData.dragging||("additive"===o.selectionType()||f?c.selected()?c.unselect(["tapunselect"]):c.select(["tapselect"]):f||(o.$(n).unmerge(c).unselect(["tapunselect"]),c.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var p=o.collection(t.getAllInBox(s[0],s[1],s[2],s[3]));t.redrawHint("select",!0),p.length>0&&t.redrawHint("eles",!0),o.emit({type:"boxend",originalEvent:e,position:{x:a[0],y:a[1]}});"additive"===o.selectionType()||f||o.$(n).unmerge(p).unselect(),p.emit("box").stdFilter(function(t){return t.selectable()&&!t.selected()}).select().emit("boxselect"),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!s[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var v=l&&l.grabbed();h(u),v&&(l.emit("freeon"),u.emit("free"),t.dragData.didDrag&&(l.emit("dragfreeon"),u.emit("dragfree")))}}s[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null,t.hoverData.which=null}},!1);var _,k,N,C,T,A,I,O,S,L,M,P,D,R,j=[],B=1e5,G=function(e){var n=!1,r=e.deltaY;if(null==r&&(null!=e.wheelDeltaY?r=e.wheelDeltaY/4:null!=e.wheelDelta&&(r=e.wheelDelta/4)),null==_)if(j.length>=4){var i=j;if(_=function(t){for(var e=0;e5}if(_)for(var a=0;a5&&(r=5*Oo(r)),f=r/-250,_&&(f/=B,f*=3),f*=t.wheelSensitivity,1===e.deltaMode&&(f*=33);var d=s.zoom()*Math.pow(10,f);"gesturechange"===e.type&&(d=t.gestureStartZoom*e.scale),s.zoom({level:d,renderedPosition:{x:h[0],y:h[1]}}),s.emit("gesturechange"===e.type?"pinchzoom":"scrollzoom")}}};t.registerBinding(t.container,"wheel",G,!0),t.registerBinding(e,"scroll",function(e){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1},250)},!0),t.registerBinding(t.container,"gesturestart",function(e){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||e.preventDefault()},!0),t.registerBinding(t.container,"gesturechange",function(e){t.hasTouchStarted||G(e)},!0),t.registerBinding(t.container,"mouseout",function(e){var n=t.projectIntoViewport(e.clientX,e.clientY);t.cy.emit({originalEvent:e,type:"mouseout",position:{x:n[0],y:n[1]}})},!1),t.registerBinding(t.container,"mouseover",function(e){var n=t.projectIntoViewport(e.clientX,e.clientY);t.cy.emit({originalEvent:e,type:"mouseover",position:{x:n[0],y:n[1]}})},!1);var F,H,Y,z,V,U,X,W=function(t,e,n,r){return Math.sqrt((n-t)*(n-t)+(r-e)*(r-e))},q=function(t,e,n,r){return(n-t)*(n-t)+(r-e)*(r-e)};if(t.registerBinding(t.container,"touchstart",F=function(e){if(t.hasTouchStarted=!0,y(e)){d(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var n=t.cy,i=t.touchData.now,o=t.touchData.earlier;if(e.touches[0]){var a=t.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY);i[0]=a[0],i[1]=a[1]}if(e.touches[1]&&(a=t.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY),i[2]=a[0],i[3]=a[1]),e.touches[2]&&(a=t.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY),i[4]=a[0],i[5]=a[1]),e.touches[1]){t.touchData.singleTouchMoved=!0,h(t.dragData.touchDragEles);var c=t.findContainerClientCoords();L=c[0],M=c[1],P=c[2],D=c[3],k=e.touches[0].clientX-L,N=e.touches[0].clientY-M,C=e.touches[1].clientX-L,T=e.touches[1].clientY-M,R=0<=k&&k<=P&&0<=C&&C<=P&&0<=N&&N<=D&&0<=T&&T<=D;var f=n.pan(),g=n.zoom();if(A=W(k,N,C,T),I=q(k,N,C,T),S=[((O=[(k+C)/2,(N+T)/2])[0]-f.x)/g,(O[1]-f.y)/g],I<4e4&&!e.touches[2]){var p=t.findNearestElement(i[0],i[1],!0,!0),v=t.findNearestElement(i[2],i[3],!0,!0);return p&&p.isNode()?(p.activate().emit({originalEvent:e,type:"cxttapstart",position:{x:i[0],y:i[1]}}),t.touchData.start=p):v&&v.isNode()?(v.activate().emit({originalEvent:e,type:"cxttapstart",position:{x:i[0],y:i[1]}}),t.touchData.start=v):n.emit({originalEvent:e,type:"cxttapstart",position:{x:i[0],y:i[1]}}),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!0,t.touchData.cxtDragged=!1,t.data.bgActivePosistion=void 0,void t.redraw()}}if(e.touches[2])n.boxSelectionEnabled()&&e.preventDefault();else if(e.touches[1]);else if(e.touches[0]){var b=t.findNearestElements(i[0],i[1],!0,!0),w=b[0];if(null!=w&&(w.activate(),t.touchData.start=w,t.touchData.starts=b,t.nodeIsGrabbable(w))){var m=t.dragData.touchDragEles=n.collection(),x=null;t.redrawHint("eles",!0),t.redrawHint("drag",!0),w.selected()?(x=n.$(function(e){return e.selected()&&t.nodeIsGrabbable(e)}),u(x,{addToList:m})):l(w,{addToList:m}),s(w);var E=function(t){return{originalEvent:e,type:t,position:{x:i[0],y:i[1]}}};w.emit(E("grabon")),x?x.forEach(function(t){t.emit(E("grab"))}):w.emit(E("grab"))}r(w,["touchstart","tapstart","vmousedown"],e,{x:i[0],y:i[1]}),null==w&&(t.data.bgActivePosistion={x:a[0],y:a[1]},t.redrawHint("select",!0),t.redraw()),t.touchData.singleTouchMoved=!1,t.touchData.singleTouchStartTime=+new Date,clearTimeout(t.touchData.tapholdTimeout),t.touchData.tapholdTimeout=setTimeout(function(){!1!==t.touchData.singleTouchMoved||t.pinching||t.touchData.selecting||r(t.touchData.start,["taphold"],e,{x:i[0],y:i[1]})},t.tapholdDuration)}if(e.touches.length>=1){for(var _=t.touchData.startPosition=[null,null,null,null,null,null],j=0;j=t.touchTapThreshold2}if(n&&t.touchData.cxt){e.preventDefault();var x=e.touches[0].clientX-L,E=e.touches[0].clientY-M,_=e.touches[1].clientX-L,O=e.touches[1].clientY-M,P=q(x,E,_,O);if(P/I>=2.25||P>=22500){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var D={originalEvent:e,type:"cxttapend",position:{x:s[0],y:s[1]}};t.touchData.start?(t.touchData.start.unactivate().emit(D),t.touchData.start=null):a.emit(D)}}if(n&&t.touchData.cxt){D={originalEvent:e,type:"cxtdrag",position:{x:s[0],y:s[1]}},t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit(D):a.emit(D),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var j=t.findNearestElement(s[0],s[1],!0,!0);t.touchData.cxtOver&&j===t.touchData.cxtOver||(t.touchData.cxtOver&&t.touchData.cxtOver.emit({originalEvent:e,type:"cxtdragout",position:{x:s[0],y:s[1]}}),t.touchData.cxtOver=j,j&&j.emit({originalEvent:e,type:"cxtdragover",position:{x:s[0],y:s[1]}}))}else if(n&&e.touches[2]&&a.boxSelectionEnabled())e.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||a.emit({originalEvent:e,type:"boxstart",position:{x:s[0],y:s[1]}}),t.touchData.selecting=!0,t.touchData.didSelect=!0,i[4]=1,i&&0!==i.length&&void 0!==i[0]?(i[2]=(s[0]+s[2]+s[4])/3,i[3]=(s[1]+s[3]+s[5])/3):(i[0]=(s[0]+s[2]+s[4])/3,i[1]=(s[1]+s[3]+s[5])/3,i[2]=(s[0]+s[2]+s[4])/3+1,i[3]=(s[1]+s[3]+s[5])/3+1),t.redrawHint("select",!0),t.redraw();else if(n&&e.touches[1]&&!t.touchData.didSelect&&a.zoomingEnabled()&&a.panningEnabled()&&a.userZoomingEnabled()&&a.userPanningEnabled()){if(e.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),J=t.dragData.touchDragEles){t.redrawHint("drag",!0);for(var B=0;B0&&!t.hoverData.draggingEles&&!t.swipePanning&&null!=t.data.bgActivePosistion&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},!1),t.registerBinding(e,"touchcancel",Y=function(e){var n=t.touchData.start;t.touchData.capture=!1,n&&n.unactivate()}),t.registerBinding(e,"touchend",z=function(e){var i=t.touchData.start;if(t.touchData.capture){0===e.touches.length&&(t.touchData.capture=!1),e.preventDefault();var o=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var a,s=t.cy,c=s.zoom(),u=t.touchData.now,l=t.touchData.earlier;if(e.touches[0]){var f=t.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY);u[0]=f[0],u[1]=f[1]}if(e.touches[1]&&(f=t.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY),u[2]=f[0],u[3]=f[1]),e.touches[2]&&(f=t.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY),u[4]=f[0],u[5]=f[1]),i&&i.unactivate(),t.touchData.cxt){if(a={originalEvent:e,type:"cxttapend",position:{x:u[0],y:u[1]}},i?i.emit(a):s.emit(a),!t.touchData.cxtDragged){var d={originalEvent:e,type:"cxttap",position:{x:u[0],y:u[1]}};i?i.emit(d):s.emit(d)}return t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,void t.redraw()}if(!e.touches[2]&&s.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var g=s.collection(t.getAllInBox(o[0],o[1],o[2],o[3]));o[0]=void 0,o[1]=void 0,o[2]=void 0,o[3]=void 0,o[4]=0,t.redrawHint("select",!0),s.emit({type:"boxend",originalEvent:e,position:{x:u[0],y:u[1]}}),g.emit("box").stdFilter(function(t){return t.selectable()&&!t.selected()}).select().emit("boxselect"),g.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(null!=i&&i.unactivate(),e.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(e.touches[1]);else if(e.touches[0]);else if(!e.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var p=t.dragData.touchDragEles;if(null!=i){var v=i._private.grabbed;h(p),t.redrawHint("drag",!0),t.redrawHint("eles",!0),v&&(i.emit("freeon"),p.emit("free"),t.dragData.didDrag&&(i.emit("dragfreeon"),p.emit("dragfree"))),r(i,["touchend","tapend","vmouseup","tapdragout"],e,{x:u[0],y:u[1]}),i.unactivate(),t.touchData.start=null}else{var b=t.findNearestElement(u[0],u[1],!0,!0);r(b,["touchend","tapend","vmouseup","tapdragout"],e,{x:u[0],y:u[1]})}var y=t.touchData.startPosition[0]-u[0],w=y*y,m=t.touchData.startPosition[1]-u[1],x=(w+m*m)*c*c;t.touchData.singleTouchMoved||(i||s.$(":selected").unselect(["tapunselect"]),r(i,["tap","vclick"],e,{x:u[0],y:u[1]}),V=!1,e.timeStamp-X<=s.multiClickDebounceTime()?(U&&clearTimeout(U),V=!0,X=null,r(i,["dbltap","vdblclick"],e,{x:u[0],y:u[1]})):(U=setTimeout(function(){V||r(i,["onetap","voneclick"],e,{x:u[0],y:u[1]})},s.multiClickDebounceTime()),X=e.timeStamp)),null!=i&&!t.dragData.didDrag&&i._private.selectable&&x2){for(var d=[l[0],l[1]],g=Math.pow(d[0]-t,2)+Math.pow(d[1]-e,2),p=1;p0)return p[0]}return null},d=Object.keys(h),g=0;g0?u:Wo(i,o,t,e,n,r,a,s)},checkPoint:function(t,e,n,r,i,o,a,s){var c=2*(s="auto"===s?ha(r,i):s);if(Jo(t,e,this.points,o,a,r,i-c,[0,-1],n))return!0;if(Jo(t,e,this.points,o,a,r-c,i,[0,-1],n))return!0;var u=r/2+2*n,l=i/2+2*n;return!!Qo(t,e,[o-u,a-l,o-u,a,o+u,a,o+u,a-l])||!!na(t,e,c,c,o+r/2-s,a+i/2-s,n)||!!na(t,e,c,c,o-r/2+s,a+i/2-s,n)}}},registerNodeShapes:function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",ca(3,0)),this.generateRoundPolygon("round-triangle",ca(3,0)),this.generatePolygon("rectangle",ca(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",n),this.generateRoundPolygon("round-diamond",n),this.generatePolygon("pentagon",ca(5,0)),this.generateRoundPolygon("round-pentagon",ca(5,0)),this.generatePolygon("hexagon",ca(6,0)),this.generateRoundPolygon("round-hexagon",ca(6,0)),this.generatePolygon("heptagon",ca(7,0)),this.generateRoundPolygon("round-heptagon",ca(7,0)),this.generatePolygon("octagon",ca(8,0)),this.generateRoundPolygon("round-octagon",ca(8,0));var r=new Array(20),i=la(5,0),o=la(5,Math.PI/5),a=.5*(3-Math.sqrt(5));a*=1.57;for(var s=0;s=t.deqFastCost*p)break}else if(i){if(d>=t.deqCost*c||d>=t.deqAvgCost*s)break}else if(g>=t.deqNoDrawCost*lg)break;var v=t.deq(e,h,l);if(!(v.length>0))break;for(var b=0;b0&&(t.onDeqd(e,u),!i&&t.shouldRedraw(e,u,h,l)&&r())},i(e))}}},fg=function(){return Vn(function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Bi;zn(this,t),this.idsByKey=new Ji,this.keyForId=new Ji,this.cachesByLvl=new Ji,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=n},[{key:"getIdsFor",value:function(t){null==t&&Hi("Can not get id list for null key");var e=this.idsByKey,n=this.idsByKey.get(t);return n||(n=new eo,e.set(t,n)),n}},{key:"addIdForKey",value:function(t,e){null!=t&&this.getIdsFor(t).add(e)}},{key:"deleteIdForKey",value:function(t,e){null!=t&&this.getIdsFor(t).delete(e)}},{key:"getNumberOfIdsForKey",value:function(t){return null==t?0:this.getIdsFor(t).size}},{key:"updateKeyMappingFor",value:function(t){var e=t.id(),n=this.keyForId.get(e),r=this.getKey(t);this.deleteIdForKey(n,e),this.addIdForKey(r,e),this.keyForId.set(e,r)}},{key:"deleteKeyMappingFor",value:function(t){var e=t.id(),n=this.keyForId.get(e);this.deleteIdForKey(n,e),this.keyForId.delete(e)}},{key:"keyHasChangedFor",value:function(t){var e=t.id();return this.keyForId.get(e)!==this.getKey(t)}},{key:"isInvalid",value:function(t){return this.keyHasChangedFor(t)||this.doesEleInvalidateKey(t)}},{key:"getCachesAt",value:function(t){var e=this.cachesByLvl,n=this.lvls,r=e.get(t);return r||(r=new Ji,e.set(t,r),n.push(t)),r}},{key:"getCache",value:function(t,e){return this.getCachesAt(e).get(t)}},{key:"get",value:function(t,e){var n=this.getKey(t),r=this.getCache(n,e);return null!=r&&this.updateKeyMappingFor(t),r}},{key:"getForCachedKey",value:function(t,e){var n=this.keyForId.get(t.id());return this.getCache(n,e)}},{key:"hasCache",value:function(t,e){return this.getCachesAt(e).has(t)}},{key:"has",value:function(t,e){var n=this.getKey(t);return this.hasCache(n,e)}},{key:"setCache",value:function(t,e,n){n.key=t,this.getCachesAt(e).set(t,n)}},{key:"set",value:function(t,e,n){var r=this.getKey(t);this.setCache(r,e,n),this.updateKeyMappingFor(t)}},{key:"deleteCache",value:function(t,e){this.getCachesAt(e).delete(t)}},{key:"delete",value:function(t,e){var n=this.getKey(t);this.deleteCache(n,e)}},{key:"invalidateKey",value:function(t){var e=this;this.lvls.forEach(function(n){return e.deleteCache(t,n)})}},{key:"invalidate",value:function(t){var e=t.id(),n=this.keyForId.get(e);this.deleteKeyMappingFor(t);var r=this.doesEleInvalidateKey(t);return r&&this.invalidateKey(n),r||0===this.getNumberOfIdsForKey(n)}}])}(),dg={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},gg=qi({getKey:null,doesEleInvalidateKey:Bi,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:ji,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),pg=function(t,e){var n=this;n.renderer=t,n.onDequeues=[];var r=gg(e);ri(n,r),n.lookup=new fg(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},vg=pg.prototype;vg.reasons=dg,vg.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]},vg.getRetiredTextureQueue=function(t){var e=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return e[t]=e[t]||[]},vg.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new lo(function(t,e){return e.reqs-t.reqs})},vg.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},vg.getElement=function(t,e,n,r,i){var o=this,a=this.renderer,s=a.cy.zoom(),c=this.lookup;if(!e||0===e.w||0===e.h||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed())return null;if(!o.allowEdgeTxrCaching&&t.isEdge()||!o.allowParentTxrCaching&&t.isParent())return null;if(null==r&&(r=Math.ceil(Io(s*n))),r<-4)r=-4;else if(s>=7.99||r>3)return null;var u=Math.pow(2,r),l=e.h*u,h=e.w*u,f=a.eleTextBiggerThanMin(t,u);if(!this.isVisible(t,f))return null;var d,g=c.get(t,r);if(g&&g.invalidated&&(g.invalidated=!1,g.texture.invalidatedWidth-=g.width),g)return g;if(d=l<=25?25:l<=50?50:50*Math.ceil(l/50),l>1024||h>1024)return null;var p=o.getTextureQueue(d),v=p[p.length-2],b=function(){return o.recycleTexture(d,h)||o.addTexture(d,h)};v||(v=p[p.length-1]),v||(v=b()),v.width-v.usedWidthr;T--)N=o.getElement(t,e,n,T,dg.downscale);C()}else{var A;if(!m&&!x&&!E)for(var I=r-1;I>=-4;I--){var O=c.get(t,I);if(O){A=O;break}}if(w(A))return o.queueElement(t,r),A;v.context.translate(v.usedWidth,0),v.context.scale(u,u),this.drawElement(v.context,t,e,f,!1),v.context.scale(1/u,1/u),v.context.translate(-v.usedWidth,0)}return g={x:v.usedWidth,texture:v,level:r,scale:u,width:h,height:l,scaledLabelShown:f},v.usedWidth+=Math.ceil(h+8),v.eleCaches.push(g),c.set(t,r,g),o.checkTextureFullness(v),g},vg.invalidateElements=function(t){for(var e=0;e=.2*t.width&&this.retireTexture(t)},vg.checkTextureFullness=function(t){var e=this.getTextureQueue(t.height);t.usedWidth/t.width>.8&&t.fullnessChecks>=10?Zi(e,t):t.fullnessChecks++},vg.retireTexture=function(t){var e=t.height,n=this.getTextureQueue(e),r=this.lookup;Zi(n,t),t.retired=!0;for(var i=t.eleCaches,o=0;o=e)return o.retired=!1,o.usedWidth=0,o.invalidatedWidth=0,o.fullnessChecks=0,Ki(o.eleCaches),o.context.setTransform(1,0,0,1,0,0),o.context.clearRect(0,0,o.width,o.height),Zi(r,o),n.push(o),o}},vg.queueElement=function(t,e){var n=this.getElementQueue(),r=this.getElementKeyToQueue(),i=this.getKey(t),o=r[i];if(o)o.level=Math.max(o.level,e),o.eles.merge(t),o.reqs++,n.updateItem(o);else{var a={eles:t.spawn().merge(t),level:e,reqs:1,key:i};n.push(a),r[i]=a}},vg.dequeue=function(t){for(var e=this,n=e.getElementQueue(),r=e.getElementKeyToQueue(),i=[],o=e.lookup,a=0;a<1&&n.size()>0;a++){var s=n.pop(),c=s.key,u=s.eles[0],l=o.hasCache(u,s.level);if(r[c]=null,!l){i.push(s);var h=e.getBoundingBox(u);e.getElement(u,h,t,s.level,dg.dequeue)}}return i},vg.removeFromQueue=function(t){var e=this.getElementQueue(),n=this.getElementKeyToQueue(),r=this.getKey(t),i=n[r];null!=i&&(1===i.eles.length?(i.reqs=Ri,e.updateItem(i),e.pop(),n[r]=null):i.eles.unmerge(t))},vg.onDequeue=function(t){this.onDequeues.push(t)},vg.offDequeue=function(t){Zi(this.onDequeues,t)},vg.setupDequeueing=hg({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(t,e,n){return t.dequeue(e,n)},onDeqd:function(t,e){for(var n=0;n=3.99||n>2)return null;r.validateLayersElesOrdering(n,t);var a,s,c=r.layersByLevel,u=Math.pow(2,n),l=c[n]=c[n]||[];if(r.levelIsComplete(n,t))return l;!function(){var e=function(e){if(r.validateLayersElesOrdering(e,t),r.levelIsComplete(e,t))return s=c[e],!0},i=function(t){if(!s)for(var r=n+t;-4<=r&&r<=2&&!e(r);r+=t);};i(1),i(-1);for(var o=l.length-1;o>=0;o--){var a=l[o];a.invalid&&Zi(l,a)}}();var h=function(e){var i=(e=e||{}).after;!function(){if(!a){a=jo();for(var e=0;e32767||s>32767)return null;if(o*s>16e6)return null;var c=r.makeLayer(a,n);if(null!=i){var h=l.indexOf(i)+1;l.splice(h,0,c)}else(void 0===e.insert||e.insert)&&l.unshift(c);return c};if(r.skipping&&!o)return null;for(var f=null,d=t.length/1,g=!o,p=0;p=d||!Xo(f.bb,v.boundingBox()))&&!(f=h({insert:!0,after:f})))return null;s||g?r.queueLayer(f,v):r.drawEleInLayer(f,v,n,e),f.eles.push(v),y[n]=f}}return s||(g?null:l)},yg.getEleLevelForLayerLevel=function(t,e){return t},yg.drawEleInLayer=function(t,e,n,r){var i=this.renderer,o=t.context,a=e.boundingBox();0!==a.w&&0!==a.h&&e.visible()&&(n=this.getEleLevelForLayerLevel(n,r),i.setImgSmoothing(o,!1),i.drawCachedElement(o,e,null,null,n,!0),i.setImgSmoothing(o,!0))},yg.levelIsComplete=function(t,e){var n=this.layersByLevel[t];if(!n||0===n.length)return!1;for(var r=0,i=0;i0)return!1;if(o.invalid)return!1;r+=o.eles.length}return r===e.length},yg.validateLayersElesOrdering=function(t,e){var n=this.layersByLevel[t];if(n)for(var r=0;r0){t=!0;break}}return t},yg.invalidateElements=function(t){var e=this;0!==t.length&&(e.lastInvalidationTime=xi(),0!==t.length&&e.haveLayers()&&e.updateElementsInLayers(t,function(t,n,r){e.invalidateLayer(t)}))},yg.invalidateLayer=function(t){if(this.lastInvalidationTime=xi(),!t.invalid){var e=t.level,n=t.eles,r=this.layersByLevel[e];Zi(r,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var i=0;i3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],a=this,s=e._private.rscratch;if((!o||e.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var c;n&&(c=n,t.translate(-c.x1,-c.y1));var u=o?e.pstyle("opacity").value:1,l=o?e.pstyle("line-opacity").value:1,h=e.pstyle("curve-style").value,f=e.pstyle("line-style").value,d=e.pstyle("width").pfValue,g=e.pstyle("line-cap").value,p=e.pstyle("line-outline-width").value,v=e.pstyle("line-outline-color").value,b=u*l,y=u*l,w=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b;"straight-triangle"===h?(a.eleStrokeStyle(t,e,n),a.drawEdgeTrianglePath(e,t,s.allpts)):(t.lineWidth=d,t.lineCap=g,a.eleStrokeStyle(t,e,n),a.drawEdgePath(e,t,s.allpts,f),t.lineCap="butt")},m=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;a.drawArrowheads(t,e,n)};if(t.lineJoin="round","yes"===e.pstyle("ghost").value){var x=e.pstyle("ghost-offset-x").pfValue,E=e.pstyle("ghost-offset-y").pfValue,_=e.pstyle("ghost-opacity").value,k=b*_;t.translate(x,E),w(k),m(k),t.translate(-x,-E)}else!function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b;t.lineWidth=d+p,t.lineCap=g,p>0?(a.colorStrokeStyle(t,v[0],v[1],v[2],n),"straight-triangle"===h?a.drawEdgeTrianglePath(e,t,s.allpts):(a.drawEdgePath(e,t,s.allpts,f),t.lineCap="butt")):t.lineCap="butt"}();i&&a.drawEdgeUnderlay(t,e),w(),m(),i&&a.drawEdgeOverlay(t,e),a.drawElementText(t,e,null,r),n&&t.translate(c.x1,c.y1)}}},Rg=function(t){if(!["overlay","underlay"].includes(t))throw new Error("Invalid state");return function(e,n){if(n.visible()){var r=n.pstyle("".concat(t,"-opacity")).value;if(0!==r){var i=this,o=i.usePaths(),a=n._private.rscratch,s=2*n.pstyle("".concat(t,"-padding")).pfValue,c=n.pstyle("".concat(t,"-color")).value;e.lineWidth=s,"self"!==a.edgeType||o?e.lineCap="round":e.lineCap="butt",i.colorStrokeStyle(e,c[0],c[1],c[2],r),i.drawEdgePath(n,e,a.allpts,"solid")}}}};Dg.drawEdgeOverlay=Rg("overlay"),Dg.drawEdgeUnderlay=Rg("underlay"),Dg.drawEdgePath=function(t,e,n,r){var i,o=t._private.rscratch,a=e,s=!1,c=this.usePaths(),u=t.pstyle("line-dash-pattern").pfValue,l=t.pstyle("line-dash-offset").pfValue;if(c){var h=n.join("$");o.pathCacheKey&&o.pathCacheKey===h?(i=e=o.pathCache,s=!0):(i=e=new Path2D,o.pathCacheKey=h,o.pathCache=i)}if(a.setLineDash)switch(r){case"dotted":a.setLineDash([1,1]);break;case"dashed":a.setLineDash(u),a.lineDashOffset=l;break;case"solid":a.setLineDash([])}if(!s&&!o.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(n[0],n[1]),o.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var f=2;f+35&&void 0!==arguments[5]?arguments[5]:5,a=arguments.length>6?arguments[6]:void 0;t.beginPath(),t.moveTo(e+o,n),t.lineTo(e+r-o,n),t.quadraticCurveTo(e+r,n,e+r,n+o),t.lineTo(e+r,n+i-o),t.quadraticCurveTo(e+r,n+i,e+r-o,n+i),t.lineTo(e+o,n+i),t.quadraticCurveTo(e,n+i,e,n+i-o),t.lineTo(e,n+o),t.quadraticCurveTo(e,n,e+o,n),t.closePath(),a?t.stroke():t.fill()}Bg.eleTextBiggerThanMin=function(t,e){if(!e){var n=t.cy().zoom(),r=this.getPixelRatio(),i=Math.ceil(Io(n*r));e=Math.pow(2,i)}return!(t.pstyle("font-size").pfValue*e5&&void 0!==arguments[5])||arguments[5],a=this;if(null==r){if(o&&!a.eleTextBiggerThanMin(e))return}else if(!1===r)return;if(e.isNode()){var s=e.pstyle("label");if(!s||!s.value)return;var c=a.getLabelJustification(e);t.textAlign=c,t.textBaseline="bottom"}else{var u=e.element()._private.rscratch.badLine,l=e.pstyle("label"),h=e.pstyle("source-label"),f=e.pstyle("target-label");if(u||(!l||!l.value)&&(!h||!h.value)&&(!f||!f.value))return;t.textAlign="center",t.textBaseline="bottom"}var d,g=!n;n&&(d=n,t.translate(-d.x1,-d.y1)),null==i?(a.drawText(t,e,null,g,o),e.isEdge()&&(a.drawText(t,e,"source",g,o),a.drawText(t,e,"target",g,o))):a.drawText(t,e,i,g,o),n&&t.translate(d.x1,d.y1)},Bg.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var n=0;n2&&void 0!==arguments[2])||arguments[2],r=e.pstyle("font-style").strValue,i=e.pstyle("font-size").pfValue+"px",o=e.pstyle("font-family").strValue,a=e.pstyle("font-weight").strValue,s=n?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,c=e.pstyle("text-outline-opacity").value*s,u=e.pstyle("color").value,l=e.pstyle("text-outline-color").value;t.font=r+" "+a+" "+i+" "+o,t.lineJoin="round",this.colorFillStyle(t,u[0],u[1],u[2],s),this.colorStrokeStyle(t,l[0],l[1],l[2],c)},Bg.getTextAngle=function(t,e){var n,r=t._private.rscratch,i=e?e+"-":"",o=t.pstyle(i+"text-rotation");if("autorotate"===o.strValue){var a=$i(r,"labelAngle",e);n=t.isEdge()?a:0}else n="none"===o.strValue?0:o.pfValue;return n},Bg.drawText=function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=e._private.rscratch,a=i?e.effectiveOpacity():1;if(!i||0!==a&&0!==e.pstyle("text-opacity").value){"main"===n&&(n=null);var s,c,u=$i(o,"labelX",n),l=$i(o,"labelY",n),h=this.getLabelText(e,n);if(null!=h&&""!==h&&!isNaN(u)&&!isNaN(l)){this.setupTextStyle(t,e,i);var f,d=n?n+"-":"",g=$i(o,"labelWidth",n),p=$i(o,"labelHeight",n),v=e.pstyle(d+"text-margin-x").pfValue,b=e.pstyle(d+"text-margin-y").pfValue,y=e.isEdge(),w=e.pstyle("text-halign").value,m=e.pstyle("text-valign").value;switch(y&&(w="center",m="center"),u+=v,l+=b,0!==(f=r?this.getTextAngle(e,n):0)&&(s=u,c=l,t.translate(s,c),t.rotate(f),u=0,l=0),m){case"top":break;case"center":l+=p/2;break;case"bottom":l+=p}var x=e.pstyle("text-background-opacity").value,E=e.pstyle("text-border-opacity").value,_=e.pstyle("text-border-width").pfValue,k=e.pstyle("text-background-padding").pfValue,N=0===e.pstyle("text-background-shape").strValue.indexOf("round");if(x>0||_>0&&E>0){var C=u-k;switch(w){case"left":C-=g;break;case"center":C-=g/2}var T=l-p-k,A=g+2*k,I=p+2*k;if(x>0){var O=t.fillStyle,S=e.pstyle("text-background-color").value;t.fillStyle="rgba("+S[0]+","+S[1]+","+S[2]+","+x*a+")",N?Gg(t,C,T,A,I,2):t.fillRect(C,T,A,I),t.fillStyle=O}if(_>0&&E>0){var L=t.strokeStyle,M=t.lineWidth,P=e.pstyle("text-border-color").value,D=e.pstyle("text-border-style").value;if(t.strokeStyle="rgba("+P[0]+","+P[1]+","+P[2]+","+E*a+")",t.lineWidth=_,t.setLineDash)switch(D){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=_/4,t.setLineDash([]);break;case"solid":t.setLineDash([])}if(N?Gg(t,C,T,A,I,2,"stroke"):t.strokeRect(C,T,A,I),"double"===D){var R=_/2;N?Gg(t,C+R,T+R,A-2*R,I-2*R,2,"stroke"):t.strokeRect(C+R,T+R,A-2*R,I-2*R)}t.setLineDash&&t.setLineDash([]),t.lineWidth=M,t.strokeStyle=L}}var j=2*e.pstyle("text-outline-width").pfValue;if(j>0&&(t.lineWidth=j),"wrap"===e.pstyle("text-wrap").value){var B=$i(o,"labelWrapCachedLines",n),G=$i(o,"labelLineHeight",n),F=g/2,H=this.getLabelJustification(e);switch("auto"===H||("left"===w?"left"===H?u+=-g:"center"===H&&(u+=-F):"center"===w?"left"===H?u+=-F:"right"===H&&(u+=F):"right"===w&&("center"===H?u+=F:"right"===H&&(u+=g))),m){case"top":case"center":case"bottom":l-=(B.length-1)*G}for(var Y=0;Y0&&t.strokeText(B[Y],u,l),t.fillText(B[Y],u,l),l+=G}else j>0&&t.strokeText(h,u,l),t.fillText(h,u,l);0!==f&&(t.rotate(-f),t.translate(-s,-c))}}};var Fg={drawNode:function(t,e,n){var r,i,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],c=this,u=e._private,l=u.rscratch,h=e.position();if(jr(h.x)&&jr(h.y)&&(!s||e.visible())){var f,d,g=s?e.effectiveOpacity():1,p=c.usePaths(),v=!1,b=e.padding();r=e.width()+2*b,i=e.height()+2*b,n&&(d=n,t.translate(-d.x1,-d.y1));for(var y=e.pstyle("background-image").value,w=new Array(y.length),m=new Array(y.length),x=0,E=0;E0&&void 0!==arguments[0]?arguments[0]:T;c.eleFillStyle(t,e,n)},z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D;c.colorStrokeStyle(t,A[0],A[1],A[2],e)},V=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:G;c.colorStrokeStyle(t,j[0],j[1],j[2],e)},U=function(t,e,n,r){var i,o=c.nodePathCache=c.nodePathCache||[],a=Si("polygon"===n?n+","+r.join(","):n,""+e,""+t,""+H),s=o[a],u=!1;return null!=s?(i=s,u=!0,l.pathCache=i):(i=new Path2D,o[a]=l.pathCache=i),{path:i,cacheHit:u}},X=e.pstyle("shape").strValue,W=e.pstyle("shape-polygon-points").pfValue;if(p){t.translate(h.x,h.y);var q=U(r,i,X,W);f=q.path,v=q.cacheHit}var Z=function(){if(!v){var n=h;p&&(n={x:0,y:0}),c.nodeShapes[c.getNodeShape(e)].draw(f||t,n.x,n.y,r,i,H,l)}p?t.fill(f):t.fill()},K=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=u.backgrounding,o=0,a=0;a0&&void 0!==arguments[0]&&arguments[0],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g;c.hasPie(e)&&(c.drawPie(t,e,o),n&&(p||c.nodeShapes[c.getNodeShape(e)].draw(t,h.x,h.y,r,i,H,l)))},Q=function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g;c.hasStripe(e)&&(t.save(),p?t.clip(l.pathCache):(c.nodeShapes[c.getNodeShape(e)].draw(t,h.x,h.y,r,i,H,l),t.clip()),c.drawStripe(t,e,o),t.restore(),n&&(p||c.nodeShapes[c.getNodeShape(e)].draw(t,h.x,h.y,r,i,H,l)))},J=function(){var e=(N>0?N:-N)*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:g),n=N>0?0:255;0!==N&&(c.colorFillStyle(t,n,n,n,e),p?t.fill(f):t.fill())},tt=function(){if(C>0){if(t.lineWidth=C,t.lineCap=S,t.lineJoin=O,t.setLineDash)switch(I){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(M),t.lineDashOffset=P;break;case"solid":case"double":t.setLineDash([])}if("center"!==L){if(t.save(),t.lineWidth*=2,"inside"===L)p?t.clip(f):t.clip();else{var e=new Path2D;e.rect(-r/2-C,-i/2-C,r+2*C,i+2*C),e.addPath(f),t.clip(e,"evenodd")}p?t.stroke(f):t.stroke(),t.restore()}else p?t.stroke(f):t.stroke();if("double"===I){t.lineWidth=C/3;var n=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",p?t.stroke(f):t.stroke(),t.globalCompositeOperation=n}t.setLineDash&&t.setLineDash([])}},et=function(){if(R>0){if(t.lineWidth=R,t.lineCap="butt",t.setLineDash)switch(B){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([])}var n=h;p&&(n={x:0,y:0});var o=c.getNodeShape(e),a=C;"inside"===L&&(a=0),"outside"===L&&(a*=2);var s,u=(r+a+(R+F))/r,l=(i+a+(R+F))/i,f=r*u,d=i*l,g=c.nodeShapes[o].points;if(p&&(s=U(f,d,o,g).path),"ellipse"===o)c.drawEllipsePath(s||t,n.x,n.y,f,d);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(o)){var v=0,b=0,y=0;"round-diamond"===o?v=1.4*(a+F+R):"round-heptagon"===o?(v=1.075*(a+F+R),y=-(a/2+F+R)/35):"round-hexagon"===o?v=1.12*(a+F+R):"round-pentagon"===o?(v=1.13*(a+F+R),y=-(a/2+F+R)/15):"round-tag"===o?(v=1.12*(a+F+R),b=.07*(a/2+R+F)):"round-triangle"===o&&(v=(a+F+R)*(Math.PI/2),y=-(a+F/2+R)/Math.PI),0!==v&&(f=r*(u=(r+v)/r),["round-hexagon","round-tag"].includes(o)||(d=i*(l=(i+v)/i)));for(var w=f/2,m=d/2,x=(H="auto"===H?fa(f,d):H)+(a+R+F)/2,E=new Array(g.length/2),_=new Array(g.length/2),k=0;k0){if(r=r||n.position(),null==i||null==o){var h=n.padding();i=n.width()+2*h,o=n.height()+2*h}this.colorFillStyle(e,c[0],c[1],c[2],s),this.nodeShapes[u].draw(e,r.x,r.y,i+2*a,o+2*a,l),e.fill()}}}};Fg.drawNodeOverlay=Hg("overlay"),Fg.drawNodeUnderlay=Hg("underlay"),Fg.hasPie=function(t){return(t=t[0])._private.hasPie},Fg.hasStripe=function(t){return(t=t[0])._private.hasStripe},Fg.drawPie=function(t,e,n,r){e=e[0],r=r||e.position();var i,o=e.cy().style(),a=e.pstyle("pie-size"),s=e.pstyle("pie-hole"),c=e.pstyle("pie-start-angle").pfValue,u=r.x,l=r.y,h=e.width(),f=e.height(),d=Math.min(h,f)/2,g=0;if(this.usePaths()&&(u=0,l=0),"%"===a.units?d*=a.pfValue:void 0!==a.pfValue&&(d=a.pfValue/2),"%"===s.units?i=d*s.pfValue:void 0!==s.pfValue&&(i=s.pfValue/2),!(i>=d))for(var p=1;p<=o.pieBackgroundN;p++){var v=e.pstyle("pie-"+p+"-background-size").value,b=e.pstyle("pie-"+p+"-background-color").value,y=e.pstyle("pie-"+p+"-background-opacity").value*n,w=v/100;w+g>1&&(w=1-g);var m=1.5*Math.PI+2*Math.PI*g,x=(m+=c)+2*Math.PI*w;0===v||g>=1||g+w>1||(0===i?(t.beginPath(),t.moveTo(u,l),t.arc(u,l,d,m,x),t.closePath()):(t.beginPath(),t.arc(u,l,d,m,x),t.arc(u,l,i,x,m,!0),t.closePath()),this.colorFillStyle(t,b[0],b[1],b[2],y),t.fill(),g+=w)}},Fg.drawStripe=function(t,e,n,r){e=e[0],r=r||e.position();var i=e.cy().style(),o=r.x,a=r.y,s=e.width(),c=e.height(),u=0,l=this.usePaths();t.save();var h=e.pstyle("stripe-direction").value,f=e.pstyle("stripe-size");switch(h){case"vertical":break;case"righward":t.rotate(-Math.PI/2)}var d=s,g=c;"%"===f.units?(d*=f.pfValue,g*=f.pfValue):void 0!==f.pfValue&&(d=f.pfValue,g=f.pfValue),l&&(o=0,a=0),a-=d/2,o-=g/2;for(var p=1;p<=i.stripeBackgroundN;p++){var v=e.pstyle("stripe-"+p+"-background-size").value,b=e.pstyle("stripe-"+p+"-background-color").value,y=e.pstyle("stripe-"+p+"-background-opacity").value*n,w=v/100;w+u>1&&(w=1-u),0===v||u>=1||u+w>1||(t.beginPath(),t.rect(o,a+g*u,d,g*w),t.closePath(),this.colorFillStyle(t,b[0],b[1],b[2],y),t.fill(),u+=w)}t.restore()};var Yg,zg={};function Vg(t,e,n){var r=t.createShader(e);if(t.shaderSource(r,n),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS))throw new Error(t.getShaderInfoLog(r));return r}function Ug(t,e,n){void 0===n&&(n=e);var r=t.makeOffscreenCanvas(e,n),i=r.context=r.getContext("2d");return r.clear=function(){return i.clearRect(0,0,r.width,r.height)},r.clear(),r}function Xg(t){var e=t.pixelRatio,n=t.cy.zoom(),r=t.cy.pan();return{zoom:n*e,pan:{x:r.x*e,y:r.y*e}}}function Wg(t){return"solid"===t.pstyle("background-fill").value&&"none"===t.pstyle("background-image").strValue&&(0===t.pstyle("border-width").value||0===t.pstyle("border-opacity").value||"solid"===t.pstyle("border-style").value)}function qg(t,e){if(t.length!==e.length)return!1;for(var n=0;n>8&255)/255,n[2]=(t>>16&255)/255,n[3]=(t>>24&255)/255,n}function $g(t){return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]<<24)}function Qg(t,e){switch(e){case"float":return[1,t.FLOAT,4];case"vec2":return[2,t.FLOAT,4];case"vec3":return[3,t.FLOAT,4];case"vec4":return[4,t.FLOAT,4];case"int":return[1,t.INT,4];case"ivec2":return[2,t.INT,4]}}function Jg(t,e,n){switch(e){case t.FLOAT:return new Float32Array(n);case t.INT:return new Int32Array(n)}}function tp(t,e,n,r,i,o){switch(e){case t.FLOAT:return new Float32Array(n.buffer,o*r,i);case t.INT:return new Int32Array(n.buffer,o*r,i)}}function ep(t,e,n,r){var i=Wn(Qg(t,n),3),o=i[0],a=i[1],s=i[2],c=Jg(t,a,e*o),u=o*s,l=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,l),t.bufferData(t.ARRAY_BUFFER,e*u,t.DYNAMIC_DRAW),t.enableVertexAttribArray(r),a===t.FLOAT?t.vertexAttribPointer(r,o,a,!1,u,0):a===t.INT&&t.vertexAttribIPointer(r,o,a,u,0),t.vertexAttribDivisor(r,1),t.bindBuffer(t.ARRAY_BUFFER,null);for(var h=new Array(e),f=0;fe.minMbLowQualFrames&&(e.motionBlurPxRatio=e.mbPxRBlurry)),e.clearingMotionBlur&&(e.motionBlurPxRatio=1),e.textureDrawLastFrame&&!h&&(l[e.NODE]=!0,l[e.SELECT_BOX]=!0);var y=n.style(),w=n.zoom(),m=void 0!==a?a:w,x=n.pan(),E={x:x.x,y:x.y},_={zoom:w,pan:{x:x.x,y:x.y}},k=e.prevViewport;void 0===k||_.zoom!==k.zoom||_.pan.x!==k.pan.x||_.pan.y!==k.pan.y||p&&!g||(e.motionBlurPxRatio=1),s&&(E=s),m*=c,E.x*=c,E.y*=c;var N=e.getCachedZSortedEles();function C(t,n,r,i,o){var a=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",e.colorFillStyle(t,255,255,255,e.motionBlurTransparency),t.fillRect(n,r,i,o),t.globalCompositeOperation=a}function T(t,n){var o,c,l,h;e.clearingMotionBlur||t!==u.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]&&t!==u.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]?(o=E,c=m,l=e.canvasWidth,h=e.canvasHeight):(o={x:x.x*d,y:x.y*d},c=w*d,l=e.canvasWidth*d,h=e.canvasHeight*d),t.setTransform(1,0,0,1,0,0),"motionBlur"===n?C(t,0,0,l,h):r||void 0!==n&&!n||t.clearRect(0,0,l,h),i||(t.translate(o.x,o.y),t.scale(c,c)),s&&t.translate(s.x,s.y),a&&t.scale(a,a)}if(h||(e.textureDrawLastFrame=!1),h){if(e.textureDrawLastFrame=!0,!e.textureCache){e.textureCache={},e.textureCache.bb=n.mutableElements().boundingBox(),e.textureCache.texture=e.data.bufferCanvases[e.TEXTURE_BUFFER];var A=e.data.bufferContexts[e.TEXTURE_BUFFER];A.setTransform(1,0,0,1,0,0),A.clearRect(0,0,e.canvasWidth*e.textureMult,e.canvasHeight*e.textureMult),e.render({forcedContext:A,drawOnlyNodeLayer:!0,forcedPxRatio:c*e.textureMult}),(_=e.textureCache.viewport={zoom:n.zoom(),pan:n.pan(),width:e.canvasWidth,height:e.canvasHeight}).mpan={x:(0-_.pan.x)/_.zoom,y:(0-_.pan.y)/_.zoom}}l[e.DRAG]=!1,l[e.NODE]=!1;var I=u.contexts[e.NODE],O=e.textureCache.texture;_=e.textureCache.viewport,I.setTransform(1,0,0,1,0,0),f?C(I,0,0,_.width,_.height):I.clearRect(0,0,_.width,_.height);var S=y.core("outside-texture-bg-color").value,L=y.core("outside-texture-bg-opacity").value;e.colorFillStyle(I,S[0],S[1],S[2],L),I.fillRect(0,0,_.width,_.height),w=n.zoom(),T(I,!1),I.clearRect(_.mpan.x,_.mpan.y,_.width/_.zoom/c,_.height/_.zoom/c),I.drawImage(O,_.mpan.x,_.mpan.y,_.width/_.zoom/c,_.height/_.zoom/c)}else e.textureOnViewport&&!r&&(e.textureCache=null);var M=n.extent(),P=e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming||e.hoverData.draggingEles||e.cy.animated(),D=e.hideEdgesOnViewport&&P,R=[];if(R[e.NODE]=!l[e.NODE]&&f&&!e.clearedForMotionBlur[e.NODE]||e.clearingMotionBlur,R[e.NODE]&&(e.clearedForMotionBlur[e.NODE]=!0),R[e.DRAG]=!l[e.DRAG]&&f&&!e.clearedForMotionBlur[e.DRAG]||e.clearingMotionBlur,R[e.DRAG]&&(e.clearedForMotionBlur[e.DRAG]=!0),l[e.NODE]||i||o||R[e.NODE]){var j=f&&!R[e.NODE]&&1!==d;T(I=r||(j?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]:u.contexts[e.NODE]),f&&!j?"motionBlur":void 0),D?e.drawCachedNodes(I,N.nondrag,c,M):e.drawLayeredElements(I,N.nondrag,c,M),e.debug&&e.drawDebugPoints(I,N.nondrag),i||f||(l[e.NODE]=!1)}if(!o&&(l[e.DRAG]||i||R[e.DRAG])&&(j=f&&!R[e.DRAG]&&1!==d,T(I=r||(j?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]:u.contexts[e.DRAG]),f&&!j?"motionBlur":void 0),D?e.drawCachedNodes(I,N.drag,c,M):e.drawCachedElements(I,N.drag,c,M),e.debug&&e.drawDebugPoints(I,N.drag),i||f||(l[e.DRAG]=!1)),this.drawSelectionRectangle(t,T),f&&1!==d){var B=u.contexts[e.NODE],G=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE],F=u.contexts[e.DRAG],H=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG],Y=function(t,n,r){t.setTransform(1,0,0,1,0,0),r||!b?t.clearRect(0,0,e.canvasWidth,e.canvasHeight):C(t,0,0,e.canvasWidth,e.canvasHeight);var i=d;t.drawImage(n,0,0,e.canvasWidth*i,e.canvasHeight*i,0,0,e.canvasWidth,e.canvasHeight)};(l[e.NODE]||R[e.NODE])&&(Y(B,G,R[e.NODE]),l[e.NODE]=!1),(l[e.DRAG]||R[e.DRAG])&&(Y(F,H,R[e.DRAG]),l[e.DRAG]=!1)}e.prevViewport=_,e.clearingMotionBlur&&(e.clearingMotionBlur=!1,e.motionBlurCleared=!0,e.motionBlur=!0),f&&(e.motionBlurTimeout=setTimeout(function(){e.motionBlurTimeout=null,e.clearedForMotionBlur[e.NODE]=!1,e.clearedForMotionBlur[e.DRAG]=!1,e.motionBlur=!1,e.clearingMotionBlur=!h,e.mbFrames=0,l[e.NODE]=!0,l[e.DRAG]=!0,e.redraw()},100)),r||n.emit("render")},zg.drawSelectionRectangle=function(t,e){var n=this,r=n.cy,i=n.data,o=r.style(),a=t.drawOnlyNodeLayer,s=t.drawAllLayers,c=i.canvasNeedsRedraw,u=t.forcedContext;if(n.showFps||!a&&c[n.SELECT_BOX]&&!s){var l=u||i.contexts[n.SELECT_BOX];if(e(l),1==n.selection[4]&&(n.hoverData.selecting||n.touchData.selecting)){var h=n.cy.zoom(),f=o.core("selection-box-border-width").value/h;l.lineWidth=f,l.fillStyle="rgba("+o.core("selection-box-color").value[0]+","+o.core("selection-box-color").value[1]+","+o.core("selection-box-color").value[2]+","+o.core("selection-box-opacity").value+")",l.fillRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]),f>0&&(l.strokeStyle="rgba("+o.core("selection-box-border-color").value[0]+","+o.core("selection-box-border-color").value[1]+","+o.core("selection-box-border-color").value[2]+","+o.core("selection-box-opacity").value+")",l.strokeRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]))}if(i.bgActivePosistion&&!n.hoverData.selecting){h=n.cy.zoom();var d=i.bgActivePosistion;l.fillStyle="rgba("+o.core("active-bg-color").value[0]+","+o.core("active-bg-color").value[1]+","+o.core("active-bg-color").value[2]+","+o.core("active-bg-opacity").value+")",l.beginPath(),l.arc(d.x,d.y,o.core("active-bg-size").pfValue/h,0,2*Math.PI),l.fill()}var g=n.lastRedrawTime;if(n.showFps&&g){g=Math.round(g);var p=Math.round(1e3/g),v="1 frame = "+g+" ms = "+p+" fps";if(l.setTransform(1,0,0,1,0,0),l.fillStyle="rgba(255, 0, 0, 0.75)",l.strokeStyle="rgba(255, 0, 0, 0.75)",l.font="30px Arial",!Yg){var b=l.measureText(v);Yg=b.actualBoundingBoxAscent}l.fillText(v,0,Yg),l.strokeRect(0,Yg+10,250,20),l.fillRect(0,Yg+10,250*Math.min(p/60,1),20)}s||(c[n.SELECT_BOX]=!1)}};var np="undefined"!=typeof Float32Array?Float32Array:Array;function rp(){var t=new np(9);return np!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function ip(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function op(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],c=e[5],u=e[6],l=e[7],h=e[8],f=n[0],d=n[1];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=c,t[6]=f*r+d*a+u,t[7]=f*i+d*s+l,t[8]=f*o+d*c+h,t}function ap(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],c=e[5],u=e[6],l=e[7],h=e[8],f=Math.sin(n),d=Math.cos(n);return t[0]=d*r+f*a,t[1]=d*i+f*s,t[2]=d*o+f*c,t[3]=d*a-f*r,t[4]=d*s-f*i,t[5]=d*c-f*o,t[6]=u,t[7]=l,t[8]=h,t}function sp(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var cp=function(){return Vn(function t(e,n,r,i){zn(this,t),this.debugID=Math.floor(1e4*Math.random()),this.r=e,this.texSize=n,this.texRows=r,this.texHeight=Math.floor(n/r),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=i(e,n,n),this.scratch=i(e,n,this.texHeight,"scratch")},[{key:"lock",value:function(){this.locked=!0}},{key:"getKeys",value:function(){return new Set(this.keyToLocation.keys())}},{key:"getScale",value:function(t){var e=t.w,n=t.h,r=this.texHeight,i=this.texSize,o=r/n,a=e*o,s=n*o;return a>i&&(a=e*(o=i/e),s=n*o),{scale:o,texW:a,texH:s}}},{key:"draw",value:function(t,e,n){var r=this;if(this.locked)throw new Error("can't draw, atlas is locked");var i=this.texSize,o=this.texRows,a=this.texHeight,s=this.getScale(e),c=s.scale,u=s.texW,l=s.texH,h=function(t,r){if(n&&r){var i=r.context,o=t.x,s=t.row,u=o,l=a*s;i.save(),i.translate(u,l),i.scale(c,c),n(i,e),i.restore()}},f=[null,null],d=function(){h(r.freePointer,r.canvas),f[0]={x:r.freePointer.x,y:r.freePointer.row*a,w:u,h:l},f[1]={x:r.freePointer.x+u,y:r.freePointer.row*a,w:0,h:l},r.freePointer.x+=u,r.freePointer.x==i&&(r.freePointer.x=0,r.freePointer.row++)},g=function(){r.freePointer.x=0,r.freePointer.row++};if(this.freePointer.x+u<=i)d();else{if(this.freePointer.row>=o-1)return!1;this.freePointer.x===i?(g(),d()):this.enableWrapping?function(){var t=r.scratch,e=r.canvas;t.clear(),h({x:0,row:0},t);var n=i-r.freePointer.x,o=u-n,s=a,c=r.freePointer.x,d=r.freePointer.row*a,g=n;e.context.drawImage(t,0,0,g,s,c,d,g,s),f[0]={x:c,y:d,w:g,h:l};var p=n,v=(r.freePointer.row+1)*a,b=o;e&&e.context.drawImage(t,p,0,b,s,0,v,b,s),f[1]={x:0,y:v,w:b,h:l},r.freePointer.x=o,r.freePointer.row++}():(g(),d())}return this.keyToLocation.set(t,f),this.needsBuffer=!0,f}},{key:"getOffsets",value:function(t){return this.keyToLocation.get(t)}},{key:"isEmpty",value:function(){return 0===this.freePointer.x&&0===this.freePointer.row}},{key:"canFit",value:function(t){if(this.locked)return!1;var e=this.texSize,n=this.texRows,r=this.getScale(t).texW;return!(this.freePointer.x+r>e)||this.freePointer.row1&&void 0!==arguments[1]?arguments[1]:{},i=r.forceRedraw,o=void 0!==i&&i,a=r.filterEle,s=void 0===a?function(){return!0}:a,c=r.filterType,u=void 0===c?function(){return!0}:c,l=!1,h=!1,f=Un(t);try{for(f.s();!(e=f.n()).done;){var d=e.value;if(s(d)){var g,p=Un(this.renderTypes.values());try{var v=function(){var t=g.value,e=t.type;if(u(e)){var r=n.collections.get(t.collection),i=t.getKey(d),a=Array.isArray(i)?i:[i];if(o)a.forEach(function(t){return r.markKeyForGC(t)}),h=!0;else{var s=t.getID?t.getID(d):d.id(),c=n._key(e,s),f=n.typeAndIdToKey.get(c);void 0===f||qg(a,f)||(l=!0,n.typeAndIdToKey.delete(c),f.forEach(function(t){return r.markKeyForGC(t)}))}}};for(p.s();!(g=p.n()).done;)v()}catch(t){p.e(t)}finally{p.f()}}}}catch(t){f.e(t)}finally{f.f()}return h&&(this.gc(),l=!1),l}},{key:"gc",value:function(){var t,e=Un(this.collections.values());try{for(e.s();!(t=e.n()).done;)t.value.gc()}catch(t){e.e(t)}finally{e.f()}}},{key:"getOrCreateAtlas",value:function(t,e,n,r){var i=this.renderTypes.get(e),o=this.collections.get(i.collection),a=!1,s=o.draw(r,n,function(e){i.drawClipped?(e.save(),e.beginPath(),e.rect(0,0,n.w,n.h),e.clip(),i.drawElement(e,t,n,!0,!0),e.restore()):i.drawElement(e,t,n,!0,!0),a=!0});if(a){var c=i.getID?i.getID(t):t.id(),u=this._key(e,c);this.typeAndIdToKey.has(u)?this.typeAndIdToKey.get(u).push(r):this.typeAndIdToKey.set(u,[r])}return s}},{key:"getAtlasInfo",value:function(t,e){var n=this,r=this.renderTypes.get(e),i=r.getKey(t);return(Array.isArray(i)?i:[i]).map(function(i){var o=r.getBoundingBox(t,i),a=n.getOrCreateAtlas(t,e,o,i),s=Wn(a.getOffsets(i),2),c=s[0];return{atlas:a,tex:c,tex1:c,tex2:s[1],bb:o}})}},{key:"getDebugInfo",value:function(){var t,e=[],n=Un(this.collections);try{for(n.s();!(t=n.n()).done;){var r=Wn(t.value,2),i=r[0],o=r[1].getCounts(),a=o.keyCount,s=o.atlasCount;e.push({type:i,keyCount:a,atlasCount:s})}}catch(t){n.e(t)}finally{n.f()}return e}}])}(),hp=function(){return Vn(function t(e){zn(this,t),this.globalOptions=e,this.atlasSize=e.webglTexSize,this.maxAtlasesPerBatch=e.webglTexPerBatch,this.batchAtlases=[]},[{key:"getMaxAtlasesPerBatch",value:function(){return this.maxAtlasesPerBatch}},{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(t,e){return e})}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(t){return this.batchAtlases.length!==this.maxAtlasesPerBatch||this.batchAtlases.includes(t)}},{key:"getAtlasIndexForBatch",value:function(t){var e=this.batchAtlases.indexOf(t);if(e<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(t),e=this.batchAtlases.length-1}return e}}])}(),fp={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},dp=function(){return Vn(function t(e,n,r){zn(this,t),this.r=e,this.gl=n,this.maxInstances=r.webglBatchSize,this.atlasSize=r.webglTexSize,this.bgColor=r.bgColor,this.debug=r.webglDebug,this.batchDebugInfo=[],r.enableWrapping=!0,r.createTextureCanvas=Ug,this.atlasManager=new lp(e,r),this.batchManager=new hp(r),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(fp.SCREEN),this.pickingProgram=this._createShaderProgram(fp.PICKING),this.vao=this._createVAO()},[{key:"addAtlasCollection",value:function(t,e){this.atlasManager.addAtlasCollection(t,e)}},{key:"addTextureAtlasRenderType",value:function(t,e){this.atlasManager.addRenderType(t,e)}},{key:"addSimpleShapeRenderType",value:function(t,e){this.simpleShapeOptions.set(t,e)}},{key:"invalidate",value:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).type,n=this.atlasManager;return e?n.invalidate(t,{filterType:function(t){return t===e},forceRedraw:!0}):n.invalidate(t)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(t){var e=this.gl,n="#version 300 es\n precision highp float;\n\n uniform mat3 uPanZoomMatrix;\n uniform int uAtlasSize;\n \n // instanced\n in vec2 aPosition; // a vertex from the unit square\n \n in mat3 aTransform; // used to transform verticies, eg into a bounding box\n in int aVertType; // the type of thing we are rendering\n\n // the z-index that is output when using picking mode\n in vec4 aIndex;\n \n // For textures\n in int aAtlasId; // which shader unit/atlas to use\n in vec4 aTex; // x/y/w/h of texture in atlas\n\n // for edges\n in vec4 aPointAPointB;\n in vec4 aPointCPointD;\n in vec2 aLineWidth; // also used for node border width\n\n // simple shapes\n in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left]\n in vec4 aColor; // also used for edges\n in vec4 aBorderColor; // aLineWidth is used for border width\n\n // output values passed to the fragment shader\n out vec2 vTexCoord;\n out vec4 vColor;\n out vec2 vPosition;\n // flat values are not interpolated\n flat out int vAtlasId; \n flat out int vVertType;\n flat out vec2 vTopRight;\n flat out vec2 vBotLeft;\n flat out vec4 vCornerRadius;\n flat out vec4 vBorderColor;\n flat out vec2 vBorderWidth;\n flat out vec4 vIndex;\n \n void main(void) {\n int vid = gl_VertexID;\n vec2 position = aPosition; // TODO make this a vec3, simplifies some code below\n\n if(aVertType == ".concat(0,") {\n float texX = aTex.x; // texture coordinates\n float texY = aTex.y;\n float texW = aTex.z;\n float texH = aTex.w;\n\n if(vid == 1 || vid == 2 || vid == 4) {\n texX += texW;\n }\n if(vid == 2 || vid == 4 || vid == 5) {\n texY += texH;\n }\n\n float d = float(uAtlasSize);\n vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n }\n else if(aVertType == ").concat(4," || aVertType == ").concat(7," \n || aVertType == ").concat(5," || aVertType == ").concat(6,") { // simple shapes\n\n // the bounding box is needed by the fragment shader\n vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat\n vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat\n vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated\n\n // calculations are done in the fragment shader, just pass these along\n vColor = aColor;\n vCornerRadius = aCornerRadius;\n vBorderColor = aBorderColor;\n vBorderWidth = aLineWidth;\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n }\n else if(aVertType == ").concat(1,") {\n vec2 source = aPointAPointB.xy;\n vec2 target = aPointAPointB.zw;\n\n // adjust the geometry so that the line is centered on the edge\n position.y = position.y - 0.5;\n\n // stretch the unit square into a long skinny rectangle\n vec2 xBasis = target - source;\n vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));\n vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y;\n\n gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0);\n vColor = aColor;\n } \n else if(aVertType == ").concat(2,") {\n vec2 pointA = aPointAPointB.xy;\n vec2 pointB = aPointAPointB.zw;\n vec2 pointC = aPointCPointD.xy;\n vec2 pointD = aPointCPointD.zw;\n\n // adjust the geometry so that the line is centered on the edge\n position.y = position.y - 0.5;\n\n vec2 p0, p1, p2, pos;\n if(position.x == 0.0) { // The left side of the unit square\n p0 = pointA;\n p1 = pointB;\n p2 = pointC;\n pos = position;\n } else { // The right side of the unit square, use same approach but flip the geometry upside down\n p0 = pointD;\n p1 = pointC;\n p2 = pointB;\n pos = vec2(0.0, -position.y);\n }\n\n vec2 p01 = p1 - p0;\n vec2 p12 = p2 - p1;\n vec2 p21 = p1 - p2;\n\n // Find the normal vector.\n vec2 tangent = normalize(normalize(p12) + normalize(p01));\n vec2 normal = vec2(-tangent.y, tangent.x);\n\n // Find the vector perpendicular to p0 -> p1.\n vec2 p01Norm = normalize(vec2(-p01.y, p01.x));\n\n // Determine the bend direction.\n float sigma = sign(dot(p01 + p21, normal));\n float width = aLineWidth[0];\n\n if(sign(pos.y) == -sigma) {\n // This is an intersecting vertex. Adjust the position so that there's no overlap.\n vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm);\n gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);\n } else {\n // This is a non-intersecting vertex. Treat it like a mitre join.\n vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm);\n gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);\n }\n\n vColor = aColor;\n } \n else if(aVertType == ").concat(3," && vid < 3) {\n // massage the first triangle into an edge arrow\n if(vid == 0)\n position = vec2(-0.15, -0.3);\n if(vid == 1)\n position = vec2( 0.0, 0.0);\n if(vid == 2)\n position = vec2( 0.15, -0.3);\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n vColor = aColor;\n }\n else {\n gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space\n }\n\n vAtlasId = aAtlasId;\n vVertType = aVertType;\n vIndex = aIndex;\n }\n "),r=this.batchManager.getIndexArray(),i="#version 300 es\n precision highp float;\n\n // declare texture unit for each texture atlas in the batch\n ".concat(r.map(function(t){return"uniform sampler2D uTexture".concat(t,";")}).join("\n\t"),"\n\n uniform vec4 uBGColor;\n uniform float uZoom;\n\n in vec2 vTexCoord;\n in vec4 vColor;\n in vec2 vPosition; // model coordinates\n\n flat in int vAtlasId;\n flat in vec4 vIndex;\n flat in int vVertType;\n flat in vec2 vTopRight;\n flat in vec2 vBotLeft;\n flat in vec4 vCornerRadius;\n flat in vec4 vBorderColor;\n flat in vec2 vBorderWidth;\n\n out vec4 outColor;\n\n ").concat("\n float circleSD(vec2 p, float r) {\n return distance(vec2(0), p) - r; // signed distance\n }\n","\n ").concat("\n float rectangleSD(vec2 p, vec2 b) {\n vec2 d = abs(p)-b;\n return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0);\n }\n","\n ").concat("\n float roundRectangleSD(vec2 p, vec2 b, vec4 cr) {\n cr.xy = (p.x > 0.0) ? cr.xy : cr.zw;\n cr.x = (p.y > 0.0) ? cr.x : cr.y;\n vec2 q = abs(p) - b + cr.x;\n return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x;\n }\n","\n ").concat("\n float ellipseSD(vec2 p, vec2 ab) {\n p = abs( p ); // symmetry\n\n // find root with Newton solver\n vec2 q = ab*(p-ab);\n float w = (q.x1.0) ? d : -d;\n }\n","\n\n vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha\n return vec4( \n top.rgb + (bot.rgb * (1.0 - top.a)),\n top.a + (bot.a * (1.0 - top.a)) \n );\n }\n\n vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance\n // scale to the zoom level so that borders don't look blurry when zoomed in\n // note 1.5 is an aribitrary value chosen because it looks good\n return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d))); \n }\n\n void main(void) {\n if(vVertType == ").concat(0,") {\n // look up the texel from the texture unit\n ").concat(r.map(function(t){return"if(vAtlasId == ".concat(t,") outColor = texture(uTexture").concat(t,", vTexCoord);")}).join("\n\telse "),"\n } \n else if(vVertType == ").concat(3,") {\n // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out';\n outColor = blend(vColor, uBGColor);\n outColor.a = 1.0; // make opaque, masks out line under arrow\n }\n else if(vVertType == ").concat(4," && vBorderWidth == vec2(0.0)) { // simple rectangle with no border\n outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done\n }\n else if(vVertType == ").concat(4," || vVertType == ").concat(7," \n || vVertType == ").concat(5," || vVertType == ").concat(6,") { // use SDF\n\n float outerBorder = vBorderWidth[0];\n float innerBorder = vBorderWidth[1];\n float borderPadding = outerBorder * 2.0;\n float w = vTopRight.x - vBotLeft.x - borderPadding;\n float h = vTopRight.y - vBotLeft.y - borderPadding;\n vec2 b = vec2(w/2.0, h/2.0); // half width, half height\n vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center\n\n float d; // signed distance\n if(vVertType == ").concat(4,") {\n d = rectangleSD(p, b);\n } else if(vVertType == ").concat(7," && w == h) {\n d = circleSD(p, b.x); // faster than ellipse\n } else if(vVertType == ").concat(7,") {\n d = ellipseSD(p, b);\n } else {\n d = roundRectangleSD(p, b, vCornerRadius.wzyx);\n }\n\n // use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling\n // we must smooth colors inwards, because we can't change pixels outside the shape's bounding box\n if(d > 0.0) {\n if(d > outerBorder) {\n discard;\n } else {\n outColor = distInterp(vBorderColor, vec4(0), d - outerBorder);\n }\n } else {\n if(d > innerBorder) {\n vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor;\n vec4 innerBorderColor = blend(vBorderColor, vColor);\n outColor = distInterp(innerBorderColor, outerColor, d);\n } \n else {\n vec4 outerColor;\n if(innerBorder == 0.0 && outerBorder == 0.0) {\n outerColor = vec4(0);\n } else if(innerBorder == 0.0) {\n outerColor = vBorderColor;\n } else {\n outerColor = blend(vBorderColor, vColor);\n }\n outColor = distInterp(vColor, outerColor, d - innerBorder);\n }\n }\n }\n else {\n outColor = vColor;\n }\n\n ").concat(t.picking?"if(outColor.a == 0.0) discard;\n else outColor = vIndex;":"","\n }\n "),o=function(t,e,n){var r=Vg(t,t.VERTEX_SHADER,e),i=Vg(t,t.FRAGMENT_SHADER,n),o=t.createProgram();if(t.attachShader(o,r),t.attachShader(o,i),t.linkProgram(o),!t.getProgramParameter(o,t.LINK_STATUS))throw new Error("Could not initialize shaders");return o}(e,n,i);o.aPosition=e.getAttribLocation(o,"aPosition"),o.aIndex=e.getAttribLocation(o,"aIndex"),o.aVertType=e.getAttribLocation(o,"aVertType"),o.aTransform=e.getAttribLocation(o,"aTransform"),o.aAtlasId=e.getAttribLocation(o,"aAtlasId"),o.aTex=e.getAttribLocation(o,"aTex"),o.aPointAPointB=e.getAttribLocation(o,"aPointAPointB"),o.aPointCPointD=e.getAttribLocation(o,"aPointCPointD"),o.aLineWidth=e.getAttribLocation(o,"aLineWidth"),o.aColor=e.getAttribLocation(o,"aColor"),o.aCornerRadius=e.getAttribLocation(o,"aCornerRadius"),o.aBorderColor=e.getAttribLocation(o,"aBorderColor"),o.uPanZoomMatrix=e.getUniformLocation(o,"uPanZoomMatrix"),o.uAtlasSize=e.getUniformLocation(o,"uAtlasSize"),o.uBGColor=e.getUniformLocation(o,"uBGColor"),o.uZoom=e.getUniformLocation(o,"uZoom"),o.uTextures=[];for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:fp.SCREEN;this.panZoomMatrix=t,this.renderTarget=e,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(t,e){return!!t.visible()&&(!e||!e.isVisible||e.isVisible(t))}},{key:"drawTexture",value:function(t,e,n){var r=this.atlasManager,i=this.batchManager,o=r.getRenderTypeOpts(n);if(this._isVisible(t,o)){if(this.renderTarget.picking&&o.getTexPickingMode){var a=o.getTexPickingMode(t);if(1===a)return;if(2==a)return void this.drawPickingRectangle(t,e,n)}var s,c=Un(r.getAtlasInfo(t,n));try{for(c.s();!(s=c.n()).done;){var u=s.value,l=u.atlas,h=u.tex1,f=u.tex2;i.canAddToCurrentBatch(l)||this.endBatch();for(var d=i.getAtlasIndexForBatch(l),g=0,p=[[h,!0],[f,!1]];g=this.maxInstances&&this.endBatch()}}}}catch(t){c.e(t)}finally{c.f()}}}},{key:"setTransformMatrix",value:function(t,e,n,r){var i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=0;if(n.shapeProps&&n.shapeProps.padding&&(o=t.pstyle(n.shapeProps.padding).pfValue),r){var a=r.bb,s=r.tex1,c=r.tex2,u=s.w/(s.w+c.w);i||(u=1-u);var l=this._getAdjustedBB(a,o,i,u);this._applyTransformMatrix(e,l,n,t)}else{var h=n.getBoundingBox(t),f=this._getAdjustedBB(h,o,!0,1);this._applyTransformMatrix(e,f,n,t)}}},{key:"_applyTransformMatrix",value:function(t,e,n,r){var i,o;ip(t);var a=n.getRotation?n.getRotation(r):0;if(0!==a){var s=n.getRotationPoint(r);op(t,t,[s.x,s.y]),ap(t,t,a);var c=n.getRotationOffset(r);i=c.x+(e.xOffset||0),o=c.y+(e.yOffset||0)}else i=e.x1,o=e.y1;op(t,t,[i,o]),sp(t,t,[e.w,e.h])}},{key:"_getAdjustedBB",value:function(t,e,n,r){var i=t.x1,o=t.y1,a=t.w,s=t.h;e&&(i-=e,o-=e,a+=2*e,s+=2*e);var c=0,u=a*r;return n&&r<1?a=u:!n&&r<1&&(i+=c=a-u,a=u),{x1:i,y1:o,w:a,h:s,xOffset:c,yOffset:t.yOffset}}},{key:"drawPickingRectangle",value:function(t,e,n){var r=this.atlasManager.getRenderTypeOpts(n),i=this.instanceCount;this.vertTypeBuffer.getView(i)[0]=4,Kg(e,this.indexBuffer.getView(i)),Zg([0,0,0],1,this.colorBuffer.getView(i));var o=this.transformBuffer.getMatrixView(i);this.setTransformMatrix(t,o,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(t,e,n){var r=this.simpleShapeOptions.get(n);if(this._isVisible(t,r)){var i=r.shapeProps,o=this._getVertTypeForShape(t,i.shape);if(void 0===o||r.isSimple&&!r.isSimple(t))this.drawTexture(t,e,n);else{var a=this.instanceCount;if(this.vertTypeBuffer.getView(a)[0]=o,5===o||6===o){var s=r.getBoundingBox(t),c=this._getCornerRadius(t,i.radius,s),u=this.cornerRadiusBuffer.getView(a);u[0]=c,u[1]=c,u[2]=c,u[3]=c,6===o&&(u[0]=0,u[2]=0)}Kg(e,this.indexBuffer.getView(a)),Zg(t.pstyle(i.color).value,t.pstyle(i.opacity).value,this.colorBuffer.getView(a));var l=this.lineWidthBuffer.getView(a);if(l[0]=0,l[1]=0,i.border){var h=t.pstyle("border-width").value;if(h>0){Zg(t.pstyle("border-color").value,t.pstyle("border-opacity").value,this.borderColorBuffer.getView(a));var f=t.pstyle("border-position").value;if("inside"===f)l[0]=0,l[1]=-h;else if("outside"===f)l[0]=h,l[1]=0;else{var d=h/2;l[0]=d,l[1]=-d}}}var g=this.transformBuffer.getMatrixView(a);this.setTransformMatrix(t,g,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:"_getVertTypeForShape",value:function(t,e){switch(t.pstyle(e).value){case"rectangle":return 4;case"ellipse":return 7;case"roundrectangle":case"round-rectangle":return 5;case"bottom-round-rectangle":return 6;default:return}}},{key:"_getCornerRadius",value:function(t,e,n){var r=n.w,i=n.h;if("auto"===t.pstyle(e).value)return ha(r,i);var o=t.pstyle(e).pfValue,a=r/2,s=i/2;return Math.min(o,s,a)}},{key:"drawEdgeArrow",value:function(t,e,n){if(t.visible()){var r,i,o,a=t._private.rscratch;if(!("source"===n?(r=a.arrowStartX,i=a.arrowStartY,o=a.srcArrowAngle):(r=a.arrowEndX,i=a.arrowEndY,o=a.tgtArrowAngle),isNaN(r)||null==r||isNaN(i)||null==i||isNaN(o)||null==o||"none"===t.pstyle(n+"-arrow-shape").value)){var s=t.pstyle(n+"-arrow-color").value,c=t.pstyle("opacity").value*t.pstyle("line-opacity").value,u=t.pstyle("width").pfValue,l=t.pstyle("arrow-scale").value,h=this.r.getArrowWidth(u,l),f=this.instanceCount,d=this.transformBuffer.getMatrixView(f);ip(d),op(d,d,[r,i]),sp(d,d,[h,h]),ap(d,d,o),this.vertTypeBuffer.getView(f)[0]=3,Kg(e,this.indexBuffer.getView(f)),Zg(s,c,this.colorBuffer.getView(f)),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:"drawEdgeLine",value:function(t,e){if(t.visible()){var n=this._getEdgePoints(t);if(n){var r=t.pstyle("opacity").value,i=t.pstyle("line-opacity").value,o=t.pstyle("width").pfValue,a=t.pstyle("line-color").value,s=r*i;if(n.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),4==n.length){var c=this.instanceCount;this.vertTypeBuffer.getView(c)[0]=1,Kg(e,this.indexBuffer.getView(c)),Zg(a,s,this.colorBuffer.getView(c)),this.lineWidthBuffer.getView(c)[0]=o;var u=this.pointAPointBBuffer.getView(c);u[0]=n[0],u[1]=n[1],u[2]=n[2],u[3]=n[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var l=0;l=this.maxInstances&&this.endBatch()}}}}},{key:"_getEdgePoints",value:function(t){var e=t._private.rscratch;if(!e.badLine&&null!=e.allpts&&!isNaN(e.allpts[0])){var n=e.allpts;if(4==n.length)return n;var r=this._getNumSegments(t);return this._getCurveSegmentPoints(n,r)}}},{key:"_getNumSegments",value:function(t){return Math.min(Math.max(15,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(t,e){if(4==t.length)return t;for(var n=Array(2*(e+1)),r=0;r<=e;r++)if(0==r)n[0]=t[0],n[1]=t[1];else if(r==e)n[2*r]=t[t.length-2],n[2*r+1]=t[t.length-1];else{var i=r/e;this._setCurvePoint(t,i,n,2*r)}return n}},{key:"_setCurvePoint",value:function(t,e,n,r){if(!(t.length<=2)){for(var i=Array(t.length-2),o=0;o0}},s=function(t){return"yes"===t.pstyle("text-events").strValue?2:1},c=function(t){var e=t.position(),n=e.x,r=e.y,i=t.outerWidth(),o=t.outerHeight();return{w:i,h:o,x1:n-i/2,y1:r-o/2}};n.drawing.addAtlasCollection("node",{texRows:t.webglTexRowsNodes}),n.drawing.addAtlasCollection("label",{texRows:t.webglTexRows}),n.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement}),n.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:c,isSimple:Wg,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),n.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:c,isVisible:a("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),n.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:c,isVisible:a("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),n.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:s,getKey:vp(e.getLabelKey,null),getBoundingBox:bp(e.getLabelBox,null),drawClipped:!0,drawElement:e.drawLabel,getRotation:i(null),getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:o("label")}),n.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:s,getKey:vp(e.getSourceLabelKey,"source"),getBoundingBox:bp(e.getSourceLabelBox,"source"),drawClipped:!0,drawElement:e.drawSourceLabel,getRotation:i("source"),getRotationPoint:e.getSourceLabelRotationPoint,getRotationOffset:e.getSourceLabelRotationOffset,isVisible:o("source-label")}),n.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:s,getKey:vp(e.getTargetLabelKey,"target"),getBoundingBox:bp(e.getTargetLabelBox,"target"),drawClipped:!0,drawElement:e.drawTargetLabel,getRotation:i("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:o("target-label")});var u=vi(function(){console.log("garbage collect flag set"),n.data.gc=!0},1e4);n.onUpdateEleCalcs(function(t,e){var r=!1;e&&e.length>0&&(r|=n.drawing.invalidate(e)),r&&u()}),function(t){var e=t.render;t.render=function(n){n=n||{};var r=t.cy;t.webgl&&(r.zoom()>7.99?(function(t){var e=t.data.contexts[t.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}(t),e.call(t,n)):(function(t){var e=function(e){e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,t.canvasWidth,t.canvasHeight),e.restore()};e(t.data.contexts[t.NODE]),e(t.data.contexts[t.DRAG])}(t),mp(t,n,fp.SCREEN)))};var n=t.matchCanvasSize;t.matchCanvasSize=function(e){n.call(t,e),t.pickingFrameBuffer.setFramebufferAttachmentSizes(t.canvasWidth,t.canvasHeight),t.pickingFrameBuffer.needsDraw=!0},t.findNearestElements=function(e,n,r,i){return function(t,e,n){var r,i,o,a=function(t,e,n){var r,i,o=Xg(t),a=function(t,e,n,r,i){var o=r*n+e.x,a=i*n+e.y;return[o,a=Math.round(t.canvasHeight-a)]}(t,o.pan,o.zoom,e,n),s=Wn(a,2);if(r=s[0]-3,i=s[1]-3,0==6)return[];var c=t.data.contexts[t.WEBGL];c.bindFramebuffer(c.FRAMEBUFFER,t.pickingFrameBuffer),t.pickingFrameBuffer.needsDraw&&(c.viewport(0,0,c.canvas.width,c.canvas.height),mp(t,null,fp.PICKING),t.pickingFrameBuffer.needsDraw=!1);var u=new Uint8Array(144);c.readPixels(r,i,6,6,c.RGBA,c.UNSIGNED_BYTE,u),c.bindFramebuffer(c.FRAMEBUFFER,null);for(var l=new Set,h=0;h<36;h++){var f=$g(u.slice(4*h,4*h+4))-1;f>=0&&l.add(f)}return l}(t,e,n),s=t.getCachedZSortedEles(),c=Un(a);try{for(c.s();!(o=c.n()).done;){var u=s[o.value];if(!r&&u.isNode()&&(r=u),!i&&u.isEdge()&&(i=u),r&&i)break}}catch(t){c.e(t)}finally{c.f()}return[r,i].filter(Boolean)}(t,e,n)};var r=t.invalidateCachedZSortedEles;t.invalidateCachedZSortedEles=function(){r.call(t),t.pickingFrameBuffer.needsDraw=!0};var i=t.notify;t.notify=function(e,n){i.call(t,e,n),"viewport"===e||"bounds"===e?t.pickingFrameBuffer.needsDraw=!0:"background"===e&&t.drawing.invalidate(n,{type:"node-body"})}}(n)};var vp=function(t,e){return function(n){var r=t(n),i=pp(n,e);return i.length>1?i.map(function(t,e){return"".concat(r,"_").concat(e)}):r}},bp=function(t,e){return function(n,r){var i=t(n);if("string"==typeof r){var o=r.indexOf("_");if(o>0){var a=Number(r.substring(o+1)),s=pp(n,e),c=i.h/s.length,u=c*a,l=i.y1+u;return{x1:i.x1,w:i.w,y1:l,h:c,yOffset:u}}}return i}};function yp(t,e){var n=t.canvasWidth,r=t.canvasHeight,i=Xg(t),o=i.pan,a=i.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,n,r),e.translate(o.x,o.y),e.scale(a,a)}function wp(t,e,n){var r=t.drawing;e+=1,n.isNode()?(r.drawNode(n,e,"node-underlay"),r.drawNode(n,e,"node-body"),r.drawTexture(n,e,"label"),r.drawNode(n,e,"node-overlay")):(r.drawEdgeLine(n,e),r.drawEdgeArrow(n,e,"source"),r.drawEdgeArrow(n,e,"target"),r.drawTexture(n,e,"label"),r.drawTexture(n,e,"edge-source-label"),r.drawTexture(n,e,"edge-target-label"))}function mp(t,e,n){var r;t.webglDebug&&(r=performance.now());var i=t.drawing,o=0;if(n.screen&&t.data.canvasNeedsRedraw[t.SELECT_BOX]&&function(t,e){t.drawSelectionRectangle(e,function(e){return yp(t,e)})}(t,e),t.data.canvasNeedsRedraw[t.NODE]||n.picking){var a=t.data.contexts[t.WEBGL];n.screen?(a.clearColor(0,0,0,0),a.enable(a.BLEND),a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA)):a.disable(a.BLEND),a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),a.viewport(0,0,a.canvas.width,a.canvas.height);var s=function(t){var e=t.canvasWidth,n=t.canvasHeight,r=Xg(t),i=r.pan,o=r.zoom,a=rp();op(a,a,[i.x,i.y]),sp(a,a,[o,o]);var s=rp();!function(t,e,n){t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1}(s,e,n);var c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,_,k,N,C,T,A,I=rp();return c=I,l=a,h=(u=s)[0],f=u[1],d=u[2],g=u[3],p=u[4],v=u[5],b=u[6],y=u[7],w=u[8],m=l[0],x=l[1],E=l[2],_=l[3],k=l[4],N=l[5],C=l[6],T=l[7],A=l[8],c[0]=m*h+x*g+E*b,c[1]=m*f+x*p+E*y,c[2]=m*d+x*v+E*w,c[3]=_*h+k*g+N*b,c[4]=_*f+k*p+N*y,c[5]=_*d+k*v+N*w,c[6]=C*h+T*g+A*b,c[7]=C*f+T*p+A*y,c[8]=C*d+T*v+A*w,I}(t),c=t.getCachedZSortedEles();if(o=c.length,i.startFrame(s,n),n.screen){for(var u=0;u0&&o>0){f.clearRect(0,0,i,o),f.globalCompositeOperation="source-over";var d=this.getCachedZSortedEles();if(t.full)f.translate(-n.x1*c,-n.y1*c),f.scale(c,c),this.drawElements(f,d),f.scale(1/c,1/c),f.translate(n.x1*c,n.y1*c);else{var g=e.pan(),p={x:g.x*c,y:g.y*c};c*=e.zoom(),f.translate(p.x,p.y),f.scale(c,c),this.drawElements(f,d),f.scale(1/c,1/c),f.translate(-p.x,-p.y)}t.bg&&(f.globalCompositeOperation="destination-over",f.fillStyle=t.bg,f.rect(0,0,i,o),f.fill())}return h},Ap.png=function(t){return Op(t,this.bufferCanvasImage(t),"image/png")},Ap.jpg=function(t){return Op(t,this.bufferCanvasImage(t),"image/jpeg")};var Sp=Mp,Lp=Mp.prototype;function Mp(t){var e=this,n=e.cy.window().document;t.webgl&&(Lp.CANVAS_LAYERS=e.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),e.data={canvases:new Array(Lp.CANVAS_LAYERS),contexts:new Array(Lp.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Lp.CANVAS_LAYERS),bufferCanvases:new Array(Lp.BUFFER_COUNT),bufferContexts:new Array(Lp.CANVAS_LAYERS)};var r="-webkit-tap-highlight-color",i="rgba(0,0,0,0)";e.data.canvasContainer=n.createElement("div");var o=e.data.canvasContainer.style;e.data.canvasContainer.style[r]=i,o.position="relative",o.zIndex="0",o.overflow="hidden";var a=t.cy.container();a.appendChild(e.data.canvasContainer),a.style[r]=i;var s={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};Jn&&Jn.userAgent.match(/msie|trident|edge/i)&&(s["-ms-touch-action"]="none",s["touch-action"]="none");for(var c=0;c\n\n \n \n <%= letter %>\n \n\n\n'),n=t.charAt(0).toUpperCase(),r="#B99435";return{color:r,shape:"ellipse",image:sb(e({nodeType:t,color:r,letter:n}))}}(t.type);if("marking-definition"===t.type)if(t.definition&&t.definition.tlp){const n=t.definition.tlp.toLowerCase();e.color=ub[n]||"#2E8BC0"}else e.color="#2E8BC0";return e}const yb=Math.min,wb=Math.max,mb=Math.round,xb=(Math.floor,t=>({x:t,y:t}));function Eb(t){return t.split("-")[0]}function _b(t){return["top","bottom"].includes(Eb(t))?"y":"x"}function kb(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function Nb(t,e,n){let{reference:r,floating:i}=t;const o=_b(e),a=function(t){return"x"===_b(t)?"y":"x"}(e),s="y"===a?"height":"width",c=Eb(e),u="y"===o,l=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2;let d;switch(c){case"top":d={x:l,y:r.y-i.height};break;case"bottom":d={x:l,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:h};break;case"left":d={x:r.x-i.width,y:h};break;default:d={x:r.x,y:r.y}}switch(function(t){return t.split("-")[1]}(e)){case"start":d[a]-=f*(n&&u?-1:1);break;case"end":d[a]+=f*(n&&u?-1:1)}return d}function Cb(){return"undefined"!=typeof window}function Tb(t){return Ob(t)?(t.nodeName||"").toLowerCase():"#document"}function Ab(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function Ib(t){var e;return null==(e=(Ob(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function Ob(t){return!!Cb()&&(t instanceof Node||t instanceof Ab(t).Node)}function Sb(t){return!!Cb()&&(t instanceof Element||t instanceof Ab(t).Element)}function Lb(t){return!!Cb()&&(t instanceof HTMLElement||t instanceof Ab(t).HTMLElement)}function Mb(t){return!(!Cb()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof Ab(t).ShadowRoot)}function Pb(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Fb(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function Db(t){return["table","td","th"].includes(Tb(t))}function Rb(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch(t){return!1}})}function jb(t){const e=Bb(),n=Sb(t)?Fb(t):t;return["transform","translate","scale","rotate","perspective"].some(t=>!!n[t]&&"none"!==n[t])||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some(t=>(n.willChange||"").includes(t))||["paint","layout","strict","content"].some(t=>(n.contain||"").includes(t))}function Bb(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Gb(t){return["html","body","#document"].includes(Tb(t))}function Fb(t){return Ab(t).getComputedStyle(t)}function Hb(t){return Sb(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Yb(t){if("html"===Tb(t))return t;const e=t.assignedSlot||t.parentNode||Mb(t)&&t.host||Ib(t);return Mb(e)?e.host:e}function zb(t){const e=Yb(t);return Gb(e)?t.ownerDocument?t.ownerDocument.body:t.body:Lb(e)&&Pb(e)?e:zb(e)}function Vb(t,e,n){var r;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=zb(t),o=i===(null==(r=t.ownerDocument)?void 0:r.body),a=Ab(i);if(o){const t=Ub(a);return e.concat(a,a.visualViewport||[],Pb(i)?i:[],t&&n?Vb(t):[])}return e.concat(i,Vb(i,[],n))}function Ub(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Xb(t){const e=Fb(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=Lb(t),o=i?t.offsetWidth:n,a=i?t.offsetHeight:r,s=mb(n)!==o||mb(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function Wb(t){return Sb(t)?t:t.contextElement}function qb(t){const e=Wb(t);if(!Lb(e))return xb(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=Xb(e);let a=(o?mb(n.width):n.width)/r,s=(o?mb(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Zb=xb(0);function Kb(t){const e=Ab(t);return Bb()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Zb}function $b(t,e,n,r){void 0===e&&(e=!1),void 0===n&&(n=!1);const i=t.getBoundingClientRect(),o=Wb(t);let a=xb(1);e&&(r?Sb(r)&&(a=qb(r)):a=qb(t));const s=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==Ab(t))&&e}(o,n,r)?Kb(o):xb(0);let c=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,l=i.width/a.x,h=i.height/a.y;if(o){const t=Ab(o),e=r&&Sb(r)?Ab(r):r;let n=t,i=Ub(n);for(;i&&r&&e!==n;){const t=qb(i),e=i.getBoundingClientRect(),r=Fb(i),o=e.left+(i.clientLeft+parseFloat(r.paddingLeft))*t.x,a=e.top+(i.clientTop+parseFloat(r.paddingTop))*t.y;c*=t.x,u*=t.y,l*=t.x,h*=t.y,c+=o,u+=a,n=Ab(i),i=Ub(n)}}return kb({width:l,height:h,x:c,y:u})}function Qb(t,e){const n=Hb(t).scrollLeft;return e?e.left+n:$b(Ib(t)).left+n}function Jb(t,e,n){void 0===n&&(n=!1);const r=t.getBoundingClientRect();return{x:r.left+e.scrollLeft-(n?0:Qb(t,r)),y:r.top+e.scrollTop}}function ty(t,e,n){let r;if("viewport"===e)r=function(t,e){const n=Ab(t),r=Ib(t),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,c=0;if(i){o=i.width,a=i.height;const t=Bb();(!t||t&&"fixed"===e)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:s,y:c}}(t,n);else if("document"===e)r=function(t){const e=Ib(t),n=Hb(t),r=t.ownerDocument.body,i=wb(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=wb(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Qb(t);const s=-n.scrollTop;return"rtl"===Fb(r).direction&&(a+=wb(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}(Ib(t));else if(Sb(e))r=function(t,e){const n=$b(t,!0,"fixed"===e),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=Lb(t)?qb(t):xb(1);return{width:t.clientWidth*o.x,height:t.clientHeight*o.y,x:i*o.x,y:r*o.y}}(e,n);else{const n=Kb(t);r={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return kb(r)}function ey(t,e){const n=Yb(t);return!(n===e||!Sb(n)||Gb(n))&&("fixed"===Fb(n).position||ey(n,e))}function ny(t,e,n){const r=Lb(e),i=Ib(e),o="fixed"===n,a=$b(t,!0,o,e);let s={scrollLeft:0,scrollTop:0};const c=xb(0);function u(){c.x=Qb(i)}if(r||!r&&!o)if(("body"!==Tb(e)||Pb(i))&&(s=Hb(e)),r){const t=$b(e,!0,o,e);c.x=t.x+e.clientLeft,c.y=t.y+e.clientTop}else i&&u();o&&!r&&i&&u();const l=!i||r||o?xb(0):Jb(i,s);return{x:a.left+s.scrollLeft-c.x-l.x,y:a.top+s.scrollTop-c.y-l.y,width:a.width,height:a.height}}function ry(t){return"static"===Fb(t).position}function iy(t,e){if(!Lb(t)||"fixed"===Fb(t).position)return null;if(e)return e(t);let n=t.offsetParent;return Ib(t)===n&&(n=n.ownerDocument.body),n}function oy(t,e){const n=Ab(t);if(Rb(t))return n;if(!Lb(t)){let e=Yb(t);for(;e&&!Gb(e);){if(Sb(e)&&!ry(e))return e;e=Yb(e)}return n}let r=iy(t,e);for(;r&&Db(r)&&ry(r);)r=iy(r,e);return r&&Gb(r)&&ry(r)&&!jb(r)?n:r||function(t){let e=Yb(t);for(;Lb(e)&&!Gb(e);){if(jb(e))return e;if(Rb(e))return null;e=Yb(e)}return null}(t)||n}const ay={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o="fixed"===i,a=Ib(r),s=!!e&&Rb(e.floating);if(r===a||s&&o)return n;let c={scrollLeft:0,scrollTop:0},u=xb(1);const l=xb(0),h=Lb(r);if((h||!h&&!o)&&(("body"!==Tb(r)||Pb(a))&&(c=Hb(r)),Lb(r))){const t=$b(r);u=qb(r),l.x=t.x+r.clientLeft,l.y=t.y+r.clientTop}const f=!a||h||o?xb(0):Jb(a,c,!0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+l.x+f.x,y:n.y*u.y-c.scrollTop*u.y+l.y+f.y}},getDocumentElement:Ib,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o="clippingAncestors"===n?Rb(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let r=Vb(t,[],!1).filter(t=>Sb(t)&&"body"!==Tb(t)),i=null;const o="fixed"===Fb(t).position;let a=o?Yb(t):t;for(;Sb(a)&&!Gb(a);){const e=Fb(a),n=jb(a);n||"fixed"!==e.position||(i=null),(o?!n&&!i:!n&&"static"===e.position&&i&&["absolute","fixed"].includes(i.position)||Pb(a)&&!n&&ey(t,a))?r=r.filter(t=>t!==a):i=e,a=Yb(a)}return e.set(t,r),r}(e,this._c):[].concat(n),a=[...o,r],s=a[0],c=a.reduce((t,n)=>{const r=ty(e,n,i);return t.top=wb(r.top,t.top),t.right=yb(r.right,t.right),t.bottom=yb(r.bottom,t.bottom),t.left=wb(r.left,t.left),t},ty(e,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:oy,getElementRects:async function(t){const e=this.getOffsetParent||oy,n=this.getDimensions,r=await n(t.floating);return{reference:ny(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=Xb(t);return{width:e,height:n}},getScale:qb,isElement:Sb,isRTL:function(t){return"rtl"===Fb(t).direction}};Up.use(Wp()),Up.use(Zp()),Up.use($p()),Up.use(Jp()),Up.use(ev()),Up.use(rv()),Up.use(ov()(function(t,e,n){function r(){((t,e,n)=>{const r=new Map,i={platform:ay,...n},o={...i.platform,_c:r};return(async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),c=await(null==a.isRTL?void 0:a.isRTL(e));let u=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:l,y:h}=Nb(u,r,c),f=r,d={},g=0;for(let n=0;n{Object.assign(e.style,{left:`${t}px`,top:`${n}px`})})}return r(),{update:r}})),sv()(Up);const sy={euler:{pull:.006,mass:t=>10,animation:!1,dragCoeff:.3},"cose-bilkent":{animate:"end",animationEasing:"ease-out",animationDuration:300,nodeRepulsion:200,idealEdgeLength:90,gravityRange:50,gravity:8.2,padding:50},cola:{convergenceThreshold:100,animate:!1}},cy=[{selector:"node",style:{shape:"data(shape)",width:30,height:30,"background-color":"data(color)","background-width":"90%","background-height":"90%","background-position-x":"50%","text-valign":"bottom","text-halign":"center",label:"","font-size":"10pt","text-max-width":"300px","text-wrap":"ellipsis"}},{selector:"node[image]",style:{"background-image":"data(image)"}},{selector:'node[type="relationship"]',style:{"background-image":"data(image)",width:15,height:15,"font-size":"8pt"}},{selector:'node[type="marking-definition"]',style:{width:15,height:15,"font-size":"8pt"}},{selector:'node[type="extension-definition"]',style:{width:15,height:15,"font-size":"8pt"}},{selector:'node[type="language-content"]',style:{width:15,height:15,"font-size":"8pt"}},{selector:'node[type="idref"]',style:{width:15,height:15,"font-size":"8pt"}},{selector:"edge",style:{width:1,opacity:.5,label:"data(label)","curve-style":"bezier","line-color":"#bbb","target-arrow-color":"#ccc","target-arrow-shape":"triangle","min-zoomed-font-size":"5pt"}},{selector:'edge[label="x_eclecticiq_alternative_hypothesis_refs"]',style:{"curve-style":"bezier","control-point-step-size":40,"line-color":"#ccc"}},{selector:".bleak",style:{opacity:.1}},{selector:"edge.autorotate",style:{"font-size":"9pt",color:"#222","edge-text-rotation":"autorotate"}},{selector:"node:selected",style:{"background-color":"black"}}];function uy(t,e){const n={};"cise"===e&&(n.clusters=function(t){const e=t.elements().markovClustering({});for(let t=0;t"relationship"!=t.type),h=t.objects.filter(t=>"relationship"==t.type),f=function(t){const e={"marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9":{id:"marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9",value:"white",css:"marking-tag-tlp-white"},"marking-definition--34098fce-860f-48ae-8e50-ebd3cc5e41da":{id:"marking-definition--34098fce-860f-48ae-8e50-ebd3cc5e41da",value:"green",css:"marking-tag-tlp-green"},"marking-definition--f88d31f6-486f-44da-b317-01333bde0b82":{id:"marking-definition--f88d31f6-486f-44da-b317-01333bde0b82",value:"amber",css:"marking-tag-tlp-amber"},"marking-definition--5e57c739-391a-4eb3-b6be-7d15ca92d5ed":{id:"marking-definition--5e57c739-391a-4eb3-b6be-7d15ca92d5ed",value:"red",css:"marking-tag-tlp-red"},"marking-definition--94868c89-83c2-464b-929b-a1a8aa3c8487":{id:"marking-definition--94868c89-83c2-464b-929b-a1a8aa3c8487",value:"clear",css:"marking-tag-tlpv2-clear"},"marking-definition--bab4a63c-aed9-4cf5-a766-dfca5abac2bb":{id:"marking-definition--bab4a63c-aed9-4cf5-a766-dfca5abac2bb",value:"green",css:"marking-tag-tlpv2-green"},"marking-definition--55d920b0-5e8b-4f79-9ee9-91f868d9b421":{id:"marking-definition--55d920b0-5e8b-4f79-9ee9-91f868d9b421",value:"amber",css:"marking-tag-tlpv2-amber"},"marking-definition--939a9414-2ddd-4d32-a0cd-375ea402b003":{id:"marking-definition--939a9414-2ddd-4d32-a0cd-375ea402b003",value:"amber+strict",css:"marking-tag-tlpv2-amber-strict"},"marking-definition--e828b379-4e03-4974-9ac4-e53a884c97c1":{id:"marking-definition--e828b379-4e03-4974-9ac4-e53a884c97c1",value:"red",css:"marking-tag-tlpv2-red"}};return t.objects.filter(t=>"marking-definition"==t.type&&t.definition&&t.definition.tlp).forEach(t=>{t.id in e||(e[t.id]={value:t.name,css:"marking-tag-tlp-custom"})}),e}(t);function d(t){t.data.id in c||(s.push(t),c[t.data.id]=t)}l.forEach(t=>d(gb(t)));let g=[];const p={};function v(t){t.data.id in p||(g.push(t),p[t.data.id]=t)}if(h.forEach(t=>v(pb(t))),s.forEach(t=>function(t){const e=t.data.raw,n=[];if(!e)return n;function r(t,r){(r.endsWith("_ref")||r.endsWith("_refs"))&&("string"==typeof t?[t]:t).forEach(t=>{const i=pb({id:"rel-"+e.id+"-"+t,source_ref:e.id,target_ref:t,relationship_type:r});n.push(i)})}return Hn.forEach(e,r),e.extensions&&e.extensions["archive-ext"]&&e.extensions["archive-ext"].contains_refs&&r(e.extensions["archive-ext"].contains_refs,"contains_refs"),e.granular_markings&&e.granular_markings.forEach(t=>r(t.marking_ref,"marking_ref")),n}(t).forEach(v)),g.filter(t=>!(c[t.data.source]&&c[t.data.target])).forEach(t=>{t.data.source in f&&!(t.data.source in c)&&d(fb(f[t.data.source])),t.data.target in f&&!(t.data.target in c)&&d(fb(f[t.data.target]))}),a){const t=[],e=[];g.filter(t=>!(c[t.data.source]&&c[t.data.target])).forEach(n=>{const{newNodes:r,newEdges:i,edgesToDelete:o}=function(t,e,n){let r=t[n.data.source],i=t[n.data.target];const o=[],a=[];let s=[];if(!r){if(n.data.source.startsWith("relationship")){const t=e[n.data.source];if(t){a.push(t);const{node:e,edges:n}=db(t);r=e,s=s.concat(n)}}r=r||hb(n.data.source,n.data.raw),o.push(r)}if(!i){if(n.data.target.startsWith("relationship")){const t=e[n.data.target];if(t){a.push(t);const{node:e,edges:n}=db(t);i=e,s=s.concat(n)}}i=i||hb(n.data.target,n.data.raw),o.push(i)}return{newNodes:o,newEdges:s,edgesToDelete:a}}(c,p,n);e.push(...o),t.push(...i),r.forEach(d)}),g=Hn.difference(g,e),t.forEach(v)}else g=g.filter(t=>c[t.data.source]&&c[t.data.target]);return s=s.filter(t=>!(t.data.id in u||(n.length>0&&-1==n.indexOf(t.data.id)||r.length>0&&r.indexOf(t.data.id)>-1||t.data.id.startsWith("marking-definition")&&t.data.raw.definition&&"tlp"in t.data.raw.definition&&i||t.data.id.startsWith("marking-definition")&&!o)&&(u[t.data.id]=t,1))),g=g.filter(t=>!(u[t.data.source]||u[t.data.target])),function(t,e,n,r){n.showTlpAsTags&&t.forEach(t=>{const e=(n=r,(i=t.data.raw).object_marking_refs&&i.object_marking_refs.length?i.object_marking_refs.filter(t=>t in n).map(t=>n[t]):[]);var n,i;if(0==e.length)return;let o=null;e.length>1?(console.warn("More than one TLP marking for "+t.data.id+", showing the most relaxed one"),o=function(t){if(0==t.length)return;const e=["white","green","amber","red","v2-clear","v2-green","v2-amber","v2-amber-strict","v2-red"],n=t.map(t=>e.indexOf(t.value.toLowerCase())).filter(t=>t>-1).sort()[0],r=e[n];return t.filter(t=>t.value.toLowerCase()==r)[0]}(e)):o=e[0],o&&t.data.tags.push(o)}),n.showAttackAsTags&&t.forEach(t=>{const e=(t.data.raw,[]);if(0==e.length)return;const n=e.sort().join(", ");t.data.tags.push(n)})}(s,0,{showTlpAsTags:i,showAttackAsTags:!0},f),s.concat(g)}(e,{highlightedObjects:i,hiddenObjects:o,showTlpAsTags:a,showMarkingNodes:s,showIdrefs:c});u.add(l),u.bundle=e,u.once("layoutstop",()=>r&&r(t)),u.tags&&(u.tags.forEach(t=>{t.removeListeners();const e=t.element;e.parentNode&&e.parentNode.removeChild(e)}),u.tags=[]),a&&(u.tags=[],u.nodes().forEach(t=>{const e=t.data();if(!e.tags||!e.tags.length)return;const n=["right-start","right","right-end"];e.tags.slice(0,3).forEach((e,r)=>{const i=function(t,e,n,r){const i=document.createElement("div");i.innerHTML=n.value.toUpperCase(),i.classList.add("marking-tag"),i.classList.add(n.css),r=r||"right-start";const o=e.popper({content:()=>(t.element.appendChild(i),i),popper:{placement:r}}),a=()=>{o.update();const e=Math.min(Math.max(8*t.zoom(),2),10);i.style.fontSize=e+"pt",i.style.lineHeight=Math.ceil(e)+"pt"};return e.on("position",a),t.on("pan zoom resize",a),{element:i,removeListeners:()=>{t.off("pan zoom resize",a)}}}(u,t,e,n[r]);u.tags.push(i)})})),t.toggleLabels(t.viewProps.showLabels),l||r&&r(t),function(t){const e=t.element.querySelector(".download-json");e&&(e.onclick=function(e){e.preventDefault(),function(t){const e=document.createElement("a");e.href="data:application/json,"+encodeURIComponent(JSON.stringify(t,null,4)),e.download=t.id+".json",e.target="_blank",e.click()}(t.bundle)});const n=t.element.querySelector(".download-png");n&&(n.onclick=function(e){e.preventDefault(),function(t,e){const n=document.createElement("a");n.href=e,n.download="graph-"+t.id+".png",n.target="_blank",n.click()}(t.bundle,t.png())})}(u),uy(u,u.layoutName||"cola"),u.sidebar&&function(t){t.nodes().on("click",e=>{e.preventDefault();const n=e.target.data();t.sidebar.innerHTML=t.sidebarRender?t.sidebarRender(n):function(t){const e=t.raw,n=Hn.template("\n \n <%= obj.type %>\n ×\n \n

<%= obj.description %>

\n

Labels: <%- (obj.labels || []).join(', ') %>

\n

External references:\n <%= (obj.external_references || [])\n .map((x) => ((x.description ? x.description + \": \": \"\")\n + (x.url || x.source_name || \"\")))\n .join('; ') %>\n

\n

Created: <%= obj.created %>

\n

ID: <%= obj.id %>

\n

\n JSON:
\n \n

\n "),r=bb(e);return n({obj:e,nodeLabel:vb(e),icon:r.image,color:r.color})}(n);const r=t.sidebar.querySelector(".sidebar-close-icon");r&&(r.onclick=()=>{t.sidebar.style.display="none"}),t.sidebar.style.display="block"})}(u)}var fy=n(5072),dy=n.n(fy),gy=n(7825),py=n.n(gy),vy=n(7659),by=n.n(vy),yy=n(5056),wy=n.n(yy),my=n(540),xy=n.n(my),Ey=n(1113),_y=n.n(Ey),ky=n(7568),Ny={};Ny.styleTagTransform=_y(),Ny.setAttributes=wy(),Ny.insert=by().bind(null,"head"),Ny.domAPI=py(),Ny.insertStyleElement=xy(),dy()(ky.A,Ny),ky.A&&ky.A.locals&&ky.A.locals;const Cy={},Ty={},Ay={};function Iy(t,e,n,r,i){if(t.stixViewId&&t.stixViewId in Cy)return Cy[t.stixViewId];const o=t.dataset.stixGistId,a=t.dataset.gistFile,s=t.dataset.stixUrl;let c={showIdrefs:fv(hv(t.dataset.showIdrefs,!1)),highlightedObjects:t.dataset.highlightedObjects?t.dataset.highlightedObjects.split(","):[],hiddenObjects:t.dataset.hiddenObjects?t.dataset.hiddenObjects.split(","):[],showTlpAsTags:fv(hv(t.dataset.showTlpAsTags,!0)),showMarkingNodes:fv(hv(t.dataset.showMarkingNodes,!0)),...r};const u={layout:t.dataset.graphLayout,caption:t.dataset.caption,showFooter:fv(hv(t.dataset.showFooter,!0)),showSidebar:fv(hv(t.dataset.showSidebar,!0)),showLabels:fv(hv(t.dataset.showLabels,!0)),allowDragDrop:fv(hv(t.dataset.stixAllowDragdrop,!1)),enableMouseZoom:fv(hv(t.dataset.enableMouseZoom,!0)),enablePanning:fv(hv(t.dataset.enablePanning,!0)),graphWidth:t.dataset.graphWidth||t.clientWidth||800,graphHeight:t.dataset.graphHeight||600,minZoom:t.dataset.minZoom,maxZoom:t.dataset.maxZoom,...i},l=t=>{hy(h,t,c,t=>{t.toggleLoading(!1),n&&n(t)})};let h=function(t,e,n){const{layout:r,caption:i,showFooter:o,showSidebar:a,showLabels:s,allowDragDrop:c,enableMouseZoom:u,enablePanning:l,graphWidth:h,graphHeight:f,minZoom:d,maxZoom:g,graphStyle:p,onClickNode:v,sidebarRender:b}=e,y=h||t.clientWidth||800;t=function(t,e){const{caption:n,width:r,height:i,showFooter:o}=e;t.classList.add("stix-viewer-block");const a=document.createElement("div");a.classList.add("stix-viewer"),t.appendChild(a);const s=document.createElement("div");if(s.classList.add("stix-graph"),a.appendChild(s),t.style.width=isNaN(r)&&r||r+"px",s.style.width="100%",s.style.height=isNaN(i)&&i||i+"px",n){const e=document.createElement("div");e.setAttribute("class","viewer-header"),e.innerText=n,t.insertBefore(e,t.firstChild)}if(o){const e=document.createElement("div");e.setAttribute("class","viewer-footer"),e.innerHTML='\n made with Stixview\n \n STIX2 \n PNG\n \n ',t.appendChild(e)}return t}(t,{width:y,height:f||600,caption:i,showFooter:o});const w=t.querySelector(".stix-viewer");var m,x;c&&(w.querySelector(".stix-graph").innerHTML="
Drag and drop STIX2 json file here
",x=t=>n(t),(m=t).addEventListener("dragover",t=>{t.stopPropagation(),t.preventDefault(),m.classList.add("dragover-active"),t.dataTransfer.dropEffect="copy"}),m.addEventListener("dragleave",t=>{t.stopPropagation(),t.preventDefault(),m.classList.remove("dragover-active")}),m.addEventListener("drop",t=>{t.stopPropagation(),t.preventDefault(),m.classList.remove("dragover-active");const e=t.dataTransfer.files;e.length>1&&console.error("More than 1 file dropped, picking the first one",e),0!=e.lengh&&dv(e[0],x)}));const E=w.querySelector(".stix-graph");E||console.info("NO CONTAINER");const _=Up({container:E,style:p||cy,userZoomingEnabled:u,userPanningEnabled:l,renderer:{name:"canvas",webgl:!0}});if(_.stixviewContainer=w.querySelector(".stix-graph"),_.minZoom(d||.3),_.maxZoom(g||2.5),a){const t=document.createElement("div");t.setAttribute("class","sidebar"),w.appendChild(t),_.sidebar=t}v&&_.on("click","node",t=>{t.preventDefault();const e=t.target.data();v(e)}),_.layoutName=r,_.stixId=t.dataset.stixViewId,_.element=t,_.sidebarRender=b;const k={cy:_,element:t,viewProps:{showLabels:s},runLayout:t=>uy(_,t),toggleLabels:t=>{_.style().selector("node").style("label",t?"data(label)":"").update()},fit:()=>_.fit(),toggleLoading:e=>{e?(t.classList.add("loading"),ly(t)):t.classList.remove("loading")},setSidebarRender:()=>{_.sidebarRender=b}};return _.resize(),k}(t,u,l);return h={...h,dataProps:c,viewProps:u,loadData:l,loadDataFromFile:function(t){t&&"application/json"==t.type&&(h.toggleLoading(!0),dv(t,l))},loadDataFromParamUrl:function(t){h.toggleLoading(!0),function(t){return lv(new URL(window.location.href).searchParams.get(t))}(t).then(l,e=>{h.toggleLoading(!1),console.error("Can not load a url from a parameter "+t,e)})},loadDataFromGist:function(t,e){h.toggleLoading(!0),function(t,e){const n="https://api.github.com/gists/"+t,r=cv[n]||new Promise(function(t,r){uv(n,function(n){e=e||Object.keys(n.files)[0];const r=n.files[e];t(JSON.parse(r.content))},r)});return cv[n]=r,r}(t,e).then(l,e=>{h.toggleLoading(!1),console.error("Can not load gist "+t,e)})},loadDataFromUrl:function(t){h.toggleLoading(!0),lv(t).then(l,e=>{h.toggleLoading(!1),console.error("Can not load data from url "+t,e)})},reloadData:function(t,e,r){setTimeout(()=>{e=e||h.cy.bundle,c={...c,...t},hy(h,e,c,n),r&&r()},20)},setSidebarRender:function(t){h.setSidebarRender(t)}},e&&e(h),(o||s)&&setTimeout(()=>{o?h.loadDataFromGist(o,a):s&&h.loadDataFromUrl(s)},20),t.dataset.stixViewId=Math.random().toString(16).slice(2),Cy[t.dataset.stixViewId]=h,t.stixViewId=t.dataset.stixViewId,h}function Oy(t,e){const n=[];return Hn.keys(t).forEach(function(r){e.matches(r)&&n.push(t[r])}),n}"undefined"!=typeof window&&(window.addEventListener("load",()=>{document.querySelectorAll("[data-stix-gist-id],[data-stix-url],[data-stix-allow-dragdrop]").forEach(t=>{Iy(t,e=>Oy(Ty,t).forEach(t=>t(e)),e=>Oy(Ay,t).forEach(t=>t(e)))})}),window.stixview={registry:Cy,onInit:function(t,e){Ty[t]=e},onLoad:function(t,e){Ay[t]=e},init:Iy})})()})(); \ No newline at end of file diff --git a/icons/artifact.svg b/icons/artifact.svg index 815117b..578f86e 100644 --- a/icons/artifact.svg +++ b/icons/artifact.svg @@ -1,5 +1,4 @@ - diff --git a/icons/attack-pattern.svg b/icons/attack-pattern.svg index 88b70bd..32ccef8 100644 --- a/icons/attack-pattern.svg +++ b/icons/attack-pattern.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/autonomous-system.svg b/icons/autonomous-system.svg index 82fce06..5f84d33 100644 --- a/icons/autonomous-system.svg +++ b/icons/autonomous-system.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/bank-account.svg b/icons/bank-account.svg index 8fff154..35530a0 100644 --- a/icons/bank-account.svg +++ b/icons/bank-account.svg @@ -1,5 +1,4 @@ - diff --git a/icons/bank-card.svg b/icons/bank-card.svg index 4ab4403..bb86732 100644 --- a/icons/bank-card.svg +++ b/icons/bank-card.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/campaign.svg b/icons/campaign.svg index 5b661ec..21a170f 100644 --- a/icons/campaign.svg +++ b/icons/campaign.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/course-of-action.svg b/icons/course-of-action.svg index 67489e2..90af8d9 100644 --- a/icons/course-of-action.svg +++ b/icons/course-of-action.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/cryptocurrency-exchange.svg b/icons/cryptocurrency-exchange.svg index a1e7ffe..96a968a 100644 --- a/icons/cryptocurrency-exchange.svg +++ b/icons/cryptocurrency-exchange.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/cryptocurrency-transaction.svg b/icons/cryptocurrency-transaction.svg index b62cdd5..ed9cfae 100644 --- a/icons/cryptocurrency-transaction.svg +++ b/icons/cryptocurrency-transaction.svg @@ -1,5 +1,4 @@ - diff --git a/icons/cryptocurrency-wallet.svg b/icons/cryptocurrency-wallet.svg index e1bb98f..949f517 100644 --- a/icons/cryptocurrency-wallet.svg +++ b/icons/cryptocurrency-wallet.svg @@ -1,5 +1,4 @@ - diff --git a/icons/directory.svg b/icons/directory.svg index 50eead9..42eb165 100644 --- a/icons/directory.svg +++ b/icons/directory.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/domain-name.svg b/icons/domain-name.svg index 5a88cc5..8c8005c 100644 --- a/icons/domain-name.svg +++ b/icons/domain-name.svg @@ -1,5 +1,4 @@ - diff --git a/icons/email-addr.svg b/icons/email-addr.svg index 8d7ec14..6eb4aab 100644 --- a/icons/email-addr.svg +++ b/icons/email-addr.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/email-message.svg b/icons/email-message.svg index 14e493b..a63d054 100644 --- a/icons/email-message.svg +++ b/icons/email-message.svg @@ -1,5 +1,4 @@ - diff --git a/icons/file.svg b/icons/file.svg index ba73f97..b7da0eb 100644 --- a/icons/file.svg +++ b/icons/file.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/grouping.svg b/icons/grouping.svg index aba81be..8fe8e8a 100644 --- a/icons/grouping.svg +++ b/icons/grouping.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/identity.svg b/icons/identity.svg index 54cbb8e..da9b9f6 100644 --- a/icons/identity.svg +++ b/icons/identity.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/incident.svg b/icons/incident.svg index 73bfc5c..fcf1ba8 100644 --- a/icons/incident.svg +++ b/icons/incident.svg @@ -1,5 +1,4 @@ - diff --git a/icons/indicator.svg b/icons/indicator.svg index fbc3e67..6babd37 100644 --- a/icons/indicator.svg +++ b/icons/indicator.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/infrastructure.svg b/icons/infrastructure.svg index 1d64e93..2438766 100644 --- a/icons/infrastructure.svg +++ b/icons/infrastructure.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/intrusion-set.svg b/icons/intrusion-set.svg index 34ff2e9..bf0650c 100644 --- a/icons/intrusion-set.svg +++ b/icons/intrusion-set.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/ipv4-addr.svg b/icons/ipv4-addr.svg index 63319ef..0390f45 100644 --- a/icons/ipv4-addr.svg +++ b/icons/ipv4-addr.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/ipv6-addr.svg b/icons/ipv6-addr.svg index 503155a..49055f4 100644 --- a/icons/ipv6-addr.svg +++ b/icons/ipv6-addr.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/location.svg b/icons/location.svg index 62ede37..2034fce 100644 --- a/icons/location.svg +++ b/icons/location.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/mac-addr.svg b/icons/mac-addr.svg index e014157..53bd409 100644 --- a/icons/mac-addr.svg +++ b/icons/mac-addr.svg @@ -1,5 +1,4 @@ - diff --git a/icons/malware-analysis.svg b/icons/malware-analysis.svg index 5cbd110..2871f17 100644 --- a/icons/malware-analysis.svg +++ b/icons/malware-analysis.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/malware.svg b/icons/malware.svg index c8f23f1..9acabbd 100644 --- a/icons/malware.svg +++ b/icons/malware.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/mutex.svg b/icons/mutex.svg index ae947f6..6968dfc 100644 --- a/icons/mutex.svg +++ b/icons/mutex.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/network-traffic.svg b/icons/network-traffic.svg index 2264dec..6925df3 100644 --- a/icons/network-traffic.svg +++ b/icons/network-traffic.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/note.svg b/icons/note.svg index 80b41ba..5befff3 100644 --- a/icons/note.svg +++ b/icons/note.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/observed-data.svg b/icons/observed-data.svg index f8c5727..c80bc90 100644 --- a/icons/observed-data.svg +++ b/icons/observed-data.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/opinion.svg b/icons/opinion.svg index a8527d6..51bd37f 100644 --- a/icons/opinion.svg +++ b/icons/opinion.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/phone-number.svg b/icons/phone-number.svg index 623f39c..d8ff407 100644 --- a/icons/phone-number.svg +++ b/icons/phone-number.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/process.svg b/icons/process.svg index cd57fb4..0e3e9a0 100644 --- a/icons/process.svg +++ b/icons/process.svg @@ -1,5 +1,4 @@ - diff --git a/icons/relationship.svg b/icons/relationship.svg index de53cf7..0fc3a20 100644 --- a/icons/relationship.svg +++ b/icons/relationship.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/report.svg b/icons/report.svg index e75e680..2c6305f 100644 --- a/icons/report.svg +++ b/icons/report.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/sighting.svg b/icons/sighting.svg index 7c17e73..68c4584 100644 --- a/icons/sighting.svg +++ b/icons/sighting.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/software.svg b/icons/software.svg index 4853bf7..b6d6728 100644 --- a/icons/software.svg +++ b/icons/software.svg @@ -1,5 +1,4 @@ - diff --git a/icons/threat-actor.svg b/icons/threat-actor.svg index befc932..f1da8da 100644 --- a/icons/threat-actor.svg +++ b/icons/threat-actor.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/tool.svg b/icons/tool.svg index 4b3ba75..e2d768c 100644 --- a/icons/tool.svg +++ b/icons/tool.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/url.svg b/icons/url.svg index 8b68ecb..d836604 100644 --- a/icons/url.svg +++ b/icons/url.svg @@ -1,5 +1,4 @@ - diff --git a/icons/user-account.svg b/icons/user-account.svg index 7cff4af..4b3f2d3 100644 --- a/icons/user-account.svg +++ b/icons/user-account.svg @@ -1,5 +1,4 @@ - diff --git a/icons/user-agent.svg b/icons/user-agent.svg index 196fe47..b768dfb 100644 --- a/icons/user-agent.svg +++ b/icons/user-agent.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/vulnerability.svg b/icons/vulnerability.svg index c2ea33f..3f095a5 100644 --- a/icons/vulnerability.svg +++ b/icons/vulnerability.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/icons/weakness.svg b/icons/weakness.svg index 0d12e33..a3bce74 100644 --- a/icons/weakness.svg +++ b/icons/weakness.svg @@ -1,5 +1,4 @@ - diff --git a/icons/windows-registry-key.svg b/icons/windows-registry-key.svg index b729c18..64ae990 100644 --- a/icons/windows-registry-key.svg +++ b/icons/windows-registry-key.svg @@ -1,5 +1,4 @@ - diff --git a/icons/x509-certificate.svg b/icons/x509-certificate.svg index b3fa4fa..12093cf 100644 --- a/icons/x509-certificate.svg +++ b/icons/x509-certificate.svg @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/src/tests/allobjects.json b/src/tests/allobjects.json index 5210733..2523ce9 100644 --- a/src/tests/allobjects.json +++ b/src/tests/allobjects.json @@ -23,7 +23,7 @@ "created": "2020-01-01T00:00:00.000Z", "definition_type": "statement", "definition": { - "statement": "This object was created using: https://github.com/muchdogesec/txt2stix" + "statement": "This object was created using txt2stix" }, "object_marking_refs": [ "marking-definition--94868c89-83c2-464b-929b-a1a8aa3c8487", @@ -38,7 +38,7 @@ "created": "2020-01-01T00:00:00.000Z", "modified": "2020-01-01T00:00:00.000Z", "name": "txt2stix", - "description": "https://github.com/muchdogsec/txt2stix", + "description": "txt2stix", "object_marking_refs": [ "marking-definition--94868c89-83c2-464b-929b-a1a8aa3c8487", "marking-definition--97ba4e8b-04f6-57e8-8f6e-3a0f0a7dc0fb" @@ -47,7 +47,7 @@ "sectors": [ "technology" ], - "contact_information": "https://www.dogesec.com/contact/" + "contact_information": "https://example.localhost" }, { "type": "report", @@ -7377,4 +7377,4 @@ ] } ] -} \ No newline at end of file +}