@agent-workshop/adoc-webapp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +5 -0
- package/THIRD_PARTY_NOTICES.md +49 -0
- package/dist/assets/app.css +406 -0
- package/dist/assets/app.js +201 -0
- package/dist/assets/chunks/abnfDiagram-YUKMZFIV-UTBMKFXS.js +1 -0
- package/dist/assets/chunks/architecture-WOLXFQ4H-S6WNHT5H.js +1 -0
- package/dist/assets/chunks/architectureDiagram-47P4ROYG-SQCOEPXG.js +36 -0
- package/dist/assets/chunks/blockDiagram-E7TT5TSB-F5DSMBHI.js +140 -0
- package/dist/assets/chunks/c4Diagram-CRA5TL53-G4W35RYC.js +38 -0
- package/dist/assets/chunks/chunk-2TCGAX73.js +1 -0
- package/dist/assets/chunks/chunk-35SWHG2Z.js +1 -0
- package/dist/assets/chunks/chunk-4UKVVSLZ.js +2 -0
- package/dist/assets/chunks/chunk-56PLA4MI.js +1 -0
- package/dist/assets/chunks/chunk-6QSLXF4I.js +1 -0
- package/dist/assets/chunks/chunk-7DQROAU7.js +1 -0
- package/dist/assets/chunks/chunk-7FXP6RHI.js +1 -0
- package/dist/assets/chunks/chunk-7ITQOSYJ.js +15 -0
- package/dist/assets/chunks/chunk-7W3KTJUJ.js +1 -0
- package/dist/assets/chunks/chunk-ABLFMIK7.js +1 -0
- package/dist/assets/chunks/chunk-AVITUR4K.js +1 -0
- package/dist/assets/chunks/chunk-AVJJGJEF.js +1 -0
- package/dist/assets/chunks/chunk-BYKZQKZN.js +1 -0
- package/dist/assets/chunks/chunk-CBAFHIQV.js +213 -0
- package/dist/assets/chunks/chunk-CMFTFM5L.js +1 -0
- package/dist/assets/chunks/chunk-E2AIA637.js +14 -0
- package/dist/assets/chunks/chunk-ENUKY65A.js +72 -0
- package/dist/assets/chunks/chunk-EPS7YYLR.js +2 -0
- package/dist/assets/chunks/chunk-FDHLSHAZ.js +1 -0
- package/dist/assets/chunks/chunk-GBOXGTKU.js +1 -0
- package/dist/assets/chunks/chunk-GDF64WIG.js +1 -0
- package/dist/assets/chunks/chunk-GTJDAHEV.js +2 -0
- package/dist/assets/chunks/chunk-H57PPMTP.js +1 -0
- package/dist/assets/chunks/chunk-HHYS5L3R.js +1 -0
- package/dist/assets/chunks/chunk-INV6BDXO.js +2 -0
- package/dist/assets/chunks/chunk-IR3NHMOO.js +1 -0
- package/dist/assets/chunks/chunk-KLF2A562.js +1 -0
- package/dist/assets/chunks/chunk-LZTAJOGZ.js +1 -0
- package/dist/assets/chunks/chunk-M3XBBO6R.js +135 -0
- package/dist/assets/chunks/chunk-NBZPV65B.js +62 -0
- package/dist/assets/chunks/chunk-NCTJNXDF.js +1 -0
- package/dist/assets/chunks/chunk-O4U2B2FP.js +339 -0
- package/dist/assets/chunks/chunk-OB665XPY.js +1 -0
- package/dist/assets/chunks/chunk-OFD4YTIR.js +10 -0
- package/dist/assets/chunks/chunk-PHKIAKHS.js +1 -0
- package/dist/assets/chunks/chunk-R4OZRASH.js +32 -0
- package/dist/assets/chunks/chunk-UAGOPMXU.js +1 -0
- package/dist/assets/chunks/chunk-UAQETDSH.js +3 -0
- package/dist/assets/chunks/chunk-UORYZEAD.js +1 -0
- package/dist/assets/chunks/chunk-W4ELJFHG.js +1 -0
- package/dist/assets/chunks/chunk-WBPRABWA.js +136 -0
- package/dist/assets/chunks/chunk-XISCFCXG.js +88 -0
- package/dist/assets/chunks/chunk-XLJVPE6C.js +1 -0
- package/dist/assets/chunks/chunk-XQHNSJKC.js +1 -0
- package/dist/assets/chunks/chunk-XYDA52BE.js +1 -0
- package/dist/assets/chunks/chunk-YAHQK6MQ.js +1 -0
- package/dist/assets/chunks/chunk-ZGUCZDEK.js +1 -0
- package/dist/assets/chunks/chunk-ZRBDUQXP.js +1 -0
- package/dist/assets/chunks/classDiagram-v2-K4WV4PDN-EMBTPOHC.js +217 -0
- package/dist/assets/chunks/cose-bilkent-JH36ORCC-CNYFETCT.js +1 -0
- package/dist/assets/chunks/cynefin-EF2NZ3EQ-2AP5N5QY.js +1 -0
- package/dist/assets/chunks/cynefinDiagram-3GCD6N5R-WVTLESK3.js +62 -0
- package/dist/assets/chunks/dagre-W4DXFKR2-FPRZGQVB.js +4 -0
- package/dist/assets/chunks/diagram-2UJZ2QOL-VPSSQLZN.js +200 -0
- package/dist/assets/chunks/diagram-OVF4WLC6-PZ2RN37Y.js +24 -0
- package/dist/assets/chunks/diagram-PFPMY2P6-5GPN6RRZ.js +30 -0
- package/dist/assets/chunks/diagram-UMYRVEAY-OHFOPEFR.js +24 -0
- package/dist/assets/chunks/diagram-YEKJPTXX-PFA7KRZC.js +41 -0
- package/dist/assets/chunks/diagram-ZIFT7M5P-XOPZR7XN.js +3 -0
- package/dist/assets/chunks/ebnfDiagram-VR2GEFS7-MAGCN3HN.js +1 -0
- package/dist/assets/chunks/elk-IJKZMXRS-FZ2NQWIX.js +27 -0
- package/dist/assets/chunks/erDiagram-O2IAPWRE-746JHX2P.js +99 -0
- package/dist/assets/chunks/eventmodeling-K75KTNOO-FKRVI4N2.js +1 -0
- package/dist/assets/chunks/flowDiagram-OXPTDLAJ-XYHRK7XD.js +1 -0
- package/dist/assets/chunks/ganttDiagram-R7TSEDQI-DN5XENJA.js +292 -0
- package/dist/assets/chunks/gitGraph-VSP46ZUC-YT36MSRW.js +1 -0
- package/dist/assets/chunks/gitGraphDiagram-XJZIOB7I-NXP267LJ.js +106 -0
- package/dist/assets/chunks/info-OHQRW6UA-BRTC44VB.js +1 -0
- package/dist/assets/chunks/infoDiagram-5W2HQ5XZ-RT6YEU7N.js +2 -0
- package/dist/assets/chunks/ishikawaDiagram-K3B6WC7H-EJP5H2KV.js +70 -0
- package/dist/assets/chunks/journeyDiagram-COXZFDF6-M6MBFVND.js +139 -0
- package/dist/assets/chunks/kanban-definition-P3RFRI5V-WBYRNWVT.js +89 -0
- package/dist/assets/chunks/katex-42FXWECD.js +257 -0
- package/dist/assets/chunks/mermaid.core-SMXJOLYJ.js +18 -0
- package/dist/assets/chunks/mindmap-definition-LZFPQGKD-KVJVOCR5.js +96 -0
- package/dist/assets/chunks/packet-JDAUHWVQ-SGFXPYMB.js +1 -0
- package/dist/assets/chunks/pegDiagram-BGZESJAR-ECEGDREM.js +1 -0
- package/dist/assets/chunks/pie-XZMESJXO-LSQBPXPC.js +1 -0
- package/dist/assets/chunks/pieDiagram-CAPJLFHJ-D75MPXOK.js +39 -0
- package/dist/assets/chunks/quadrantDiagram-GDMTTRAM-HMUXMSEH.js +7 -0
- package/dist/assets/chunks/radar-ABXABTNO-TPYHBLNO.js +1 -0
- package/dist/assets/chunks/railroad-I3PHUGI6-WWIXL3LY.js +1 -0
- package/dist/assets/chunks/railroad-abnf-LNEFI6M7-DHJUY4R6.js +1 -0
- package/dist/assets/chunks/railroad-ebnf-DWYD2UWJ-4OJ4ECXX.js +1 -0
- package/dist/assets/chunks/railroad-peg-JR7BVNR7-VUOBDVLQ.js +1 -0
- package/dist/assets/chunks/railroadDiagram-SM67HX2B-Z757I54E.js +1 -0
- package/dist/assets/chunks/requirementDiagram-X7JNWC4A-7BW46JLY.js +84 -0
- package/dist/assets/chunks/sankeyDiagram-UM26HJRW-273BIID3.js +40 -0
- package/dist/assets/chunks/sequenceDiagram-ZO4K6R2Y-KG23HXTI.js +169 -0
- package/dist/assets/chunks/sizeCapture-INFHLROL-5N3POCQZ.js +1 -0
- package/dist/assets/chunks/stateDiagram-v2-TBUQTH76-AIML3PSW.js +291 -0
- package/dist/assets/chunks/swimlanes-N4OXWK64-TBFQZWAR.js +1 -0
- package/dist/assets/chunks/swimlanesDiagram-K3J5GTZL-TREAP6RB.js +8 -0
- package/dist/assets/chunks/timeline-definition-YOQAKGHF-QHTD5EBR.js +120 -0
- package/dist/assets/chunks/treeView-D4JQ5SDB-JJEYBPMW.js +1 -0
- package/dist/assets/chunks/treemap-SAJKECNS-I3YRCM2B.js +1 -0
- package/dist/assets/chunks/usecaseDiagram-VIAY4XPW-GNNFV4RS.js +370 -0
- package/dist/assets/chunks/vennDiagram-BLWOH2XV-YE23JXYX.js +34 -0
- package/dist/assets/chunks/wardley-7MLQ67FV-AKOGXXNF.js +1 -0
- package/dist/assets/chunks/wardleyDiagram-YMQ3BMBF-D7XYLZCZ.js +78 -0
- package/dist/assets/chunks/xychartDiagram-TAQBALBS-AT4Y7JWY.js +7 -0
- package/dist/assets/fonts/D2Coding-Bold.woff2 +0 -0
- package/dist/assets/fonts/D2Coding-OFL.txt +97 -0
- package/dist/assets/fonts/D2Coding.woff2 +0 -0
- package/dist/assets/fonts/Pretendard-LICENSE.txt +94 -0
- package/dist/assets/fonts/PretendardVariable.woff2 +0 -0
- package/dist/assets/fonts/SymbolsNerdFont-LICENSE.txt +21 -0
- package/dist/assets/fonts/SymbolsNerdFontMono.woff2 +0 -0
- package/dist/assets/xterm.css +285 -0
- package/dist/index.html +14 -0
- package/dist/licenses/@braintree__sanitize-url@7.1.2/LICENSE +21 -0
- package/dist/licenses/@chevrotain__cst-dts-gen@13.2.0/LICENSE.txt +202 -0
- package/dist/licenses/@chevrotain__gast@13.2.0/LICENSE.txt +202 -0
- package/dist/licenses/@chevrotain__regexp-to-ast@13.2.0/LICENSE.txt +202 -0
- package/dist/licenses/@chevrotain__utils@13.2.0/LICENSE.txt +202 -0
- package/dist/licenses/@iconify__utils@3.1.7/license.txt +21 -0
- package/dist/licenses/@mermaid-js__parser@2.0.1/LICENSE +21 -0
- package/dist/licenses/@remix-run__route-pattern@0.22.1/LICENSE +21 -0
- package/dist/licenses/@upsetjs__venn.js@2.0.0/LICENSE +22 -0
- package/dist/licenses/@xterm__addon-fit@0.11.0/LICENSE +19 -0
- package/dist/licenses/@xterm__xterm@6.0.0/LICENSE +21 -0
- package/dist/licenses/chevrotain@13.2.0/LICENSE.txt +202 -0
- package/dist/licenses/cookie-es@3.1.1/LICENSE +28 -0
- package/dist/licenses/cose-base@1.0.3/LICENSE +21 -0
- package/dist/licenses/cose-base@2.2.0/LICENSE +21 -0
- package/dist/licenses/cytoscape-cose-bilkent@4.1.0/LICENSE +21 -0
- package/dist/licenses/cytoscape-fcose@2.2.0/LICENSE +19 -0
- package/dist/licenses/cytoscape@3.34.3/LICENSE +19 -0
- package/dist/licenses/cytoscape@3.34.3/license-update.mjs +32 -0
- package/dist/licenses/d3-array@2.12.1/LICENSE +27 -0
- package/dist/licenses/d3-array@3.2.4/LICENSE +13 -0
- package/dist/licenses/d3-axis@3.0.0/LICENSE +13 -0
- package/dist/licenses/d3-brush@3.0.0/LICENSE +13 -0
- package/dist/licenses/d3-chord@3.0.1/LICENSE +13 -0
- package/dist/licenses/d3-color@3.1.0/LICENSE +13 -0
- package/dist/licenses/d3-contour@4.0.2/LICENSE +13 -0
- package/dist/licenses/d3-delaunay@6.0.4/LICENSE +14 -0
- package/dist/licenses/d3-dispatch@3.0.1/LICENSE +13 -0
- package/dist/licenses/d3-drag@3.0.0/LICENSE +13 -0
- package/dist/licenses/d3-dsv@3.0.1/LICENSE +13 -0
- package/dist/licenses/d3-ease@3.0.1/LICENSE +28 -0
- package/dist/licenses/d3-fetch@3.0.1/LICENSE +13 -0
- package/dist/licenses/d3-force@3.0.0/LICENSE +13 -0
- package/dist/licenses/d3-format@3.1.2/LICENSE +13 -0
- package/dist/licenses/d3-geo@3.1.1/LICENSE +34 -0
- package/dist/licenses/d3-hierarchy@3.1.2/LICENSE +13 -0
- package/dist/licenses/d3-interpolate@3.0.1/LICENSE +13 -0
- package/dist/licenses/d3-path@1.0.9/LICENSE +27 -0
- package/dist/licenses/d3-path@3.1.0/LICENSE +13 -0
- package/dist/licenses/d3-polygon@3.0.1/LICENSE +13 -0
- package/dist/licenses/d3-quadtree@3.0.1/LICENSE +13 -0
- package/dist/licenses/d3-random@3.0.1/LICENSE +13 -0
- package/dist/licenses/d3-sankey@0.12.3/LICENSE +27 -0
- package/dist/licenses/d3-scale-chromatic@3.1.0/LICENSE +28 -0
- package/dist/licenses/d3-scale@4.0.2/LICENSE +13 -0
- package/dist/licenses/d3-selection@3.0.0/LICENSE +13 -0
- package/dist/licenses/d3-shape@1.3.7/LICENSE +27 -0
- package/dist/licenses/d3-shape@3.2.0/LICENSE +13 -0
- package/dist/licenses/d3-time-format@4.1.0/LICENSE +13 -0
- package/dist/licenses/d3-time@3.1.0/LICENSE +13 -0
- package/dist/licenses/d3-timer@3.0.1/LICENSE +13 -0
- package/dist/licenses/d3-transition@3.0.1/LICENSE +13 -0
- package/dist/licenses/d3-zoom@3.0.0/LICENSE +13 -0
- package/dist/licenses/d3@7.9.0/LICENSE +13 -0
- package/dist/licenses/dagre-d3-es@7.0.14/LICENSE.md +23 -0
- package/dist/licenses/dayjs@1.11.23/LICENSE +21 -0
- package/dist/licenses/delaunator@5.1.0/LICENSE +15 -0
- package/dist/licenses/dompurify@3.4.16/LICENSE +202 -0
- package/dist/licenses/dompurify@3.4.16/LICENSE-MPL +373 -0
- package/dist/licenses/elkjs@0.9.3/LICENSE.md +264 -0
- package/dist/licenses/es-toolkit@1.52.0/LICENSE +21 -0
- package/dist/licenses/es-toolkit@1.52.0/NOTICE +39 -0
- package/dist/licenses/internmap@1.0.1/LICENSE +13 -0
- package/dist/licenses/internmap@2.0.3/LICENSE +13 -0
- package/dist/licenses/katex@0.16.47/LICENSE +21 -0
- package/dist/licenses/khroma@2.1.0/license +21 -0
- package/dist/licenses/layout-base@1.0.2/LICENSE +21 -0
- package/dist/licenses/layout-base@2.0.1/LICENSE +21 -0
- package/dist/licenses/lodash-es@4.18.1/LICENSE +47 -0
- package/dist/licenses/lucide-react@1.50.0/LICENSE +43 -0
- package/dist/licenses/lucide-react@1.50.0/copyright.mjs +22 -0
- package/dist/licenses/marked@16.4.2/LICENSE.md +44 -0
- package/dist/licenses/mermaid@12.1.0/LICENSE +21 -0
- package/dist/licenses/packages.json +945 -0
- package/dist/licenses/pretendard@1.3.9/LICENSE.txt +94 -0
- package/dist/licenses/react-dom@19.3.0/LICENSE +21 -0
- package/dist/licenses/react-router@8.4.0/LICENSE.md +23 -0
- package/dist/licenses/react@19.3.0/LICENSE +21 -0
- package/dist/licenses/robust-predicates@3.0.3/LICENSE +24 -0
- package/dist/licenses/roughjs@4.6.6/LICENSE +21 -0
- package/dist/licenses/scheduler@0.28.0/LICENSE +21 -0
- package/dist/licenses/stylis@4.4.0/LICENSE +21 -0
- package/dist/licenses/ts-dedent@2.3.0/LICENSE +21 -0
- package/dist/licenses/uuid@14.0.2/LICENSE.md +9 -0
- package/package.json +44 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as j}from"./chunk-O4U2B2FP.js";import{b as V,h as it}from"./chunk-W4ELJFHG.js";import{a as W}from"./chunk-UAGOPMXU.js";import{b as $,c as pt}from"./chunk-PHKIAKHS.js";var q=$((k,K)=>{(function(C,v){typeof k=="object"&&typeof K=="object"?K.exports=v():typeof define=="function"&&define.amd?define([],v):typeof k=="object"?k.layoutBase=v():C.layoutBase=v()})(k,function(){return(function(N){var C={};function v(n){if(C[n])return C[n].exports;var e=C[n]={i:n,l:!1,exports:{}};return N[n].call(e.exports,e,e.exports,v),e.l=!0,e.exports}return v.m=N,v.c=C,v.i=function(n){return n},v.d=function(n,e,t){v.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:t})},v.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return v.d(e,"a",e),e},v.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},v.p="",v(v.s=26)})([(function(N,C,v){"use strict";function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,N.exports=n}),(function(N,C,v){"use strict";var n=v(2),e=v(8),t=v(9);function r(u,s,p){n.call(this,p),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=p,this.bendpoints=[],this.source=u,this.target=s}r.prototype=Object.create(n.prototype);for(var a in n)r[a]=n[a];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(u){if(this.source===u)return this.target;if(this.target===u)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(u,s){for(var p=this.getOtherEnd(u),i=s.getGraphManager().getRoot();;){if(p.getOwner()==s)return p;if(p.getOwner()==i)break;p=p.getOwner().getParent()}return null},r.prototype.updateLength=function(){var u=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),u),this.isOverlapingSourceAndTarget||(this.lengthX=u[0]-u[2],this.lengthY=u[1]-u[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.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=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=r}),(function(N,C,v){"use strict";function n(e){this.vGraphObject=e}N.exports=n}),(function(N,C,v){"use strict";var n=v(2),e=v(10),t=v(13),r=v(0),a=v(16),u=v(4);function s(i,h,l,d){l==null&&d==null&&(d=h),n.call(this,d),i.graphManager!=null&&(i=i.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=d,this.edges=[],this.graphManager=i,l!=null&&h!=null?this.rect=new t(h.x,h.y,l.width,l.height):this.rect=new t}s.prototype=Object.create(n.prototype);for(var p in n)s[p]=n[p];s.prototype.getEdges=function(){return this.edges},s.prototype.getChild=function(){return this.child},s.prototype.getOwner=function(){return this.owner},s.prototype.getWidth=function(){return this.rect.width},s.prototype.setWidth=function(i){this.rect.width=i},s.prototype.getHeight=function(){return this.rect.height},s.prototype.setHeight=function(i){this.rect.height=i},s.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},s.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},s.prototype.getCenter=function(){return new u(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},s.prototype.getLocation=function(){return new u(this.rect.x,this.rect.y)},s.prototype.getRect=function(){return this.rect},s.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},s.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},s.prototype.setRect=function(i,h){this.rect.x=i.x,this.rect.y=i.y,this.rect.width=h.width,this.rect.height=h.height},s.prototype.setCenter=function(i,h){this.rect.x=i-this.rect.width/2,this.rect.y=h-this.rect.height/2},s.prototype.setLocation=function(i,h){this.rect.x=i,this.rect.y=h},s.prototype.moveBy=function(i,h){this.rect.x+=i,this.rect.y+=h},s.prototype.getEdgeListToNode=function(i){var h=[],l,d=this;return d.edges.forEach(function(y){if(y.target==i){if(y.source!=d)throw"Incorrect edge source!";h.push(y)}}),h},s.prototype.getEdgesBetween=function(i){var h=[],l,d=this;return d.edges.forEach(function(y){if(!(y.source==d||y.target==d))throw"Incorrect edge source and/or target";(y.target==i||y.source==i)&&h.push(y)}),h},s.prototype.getNeighborsList=function(){var i=new Set,h=this;return h.edges.forEach(function(l){if(l.source==h)i.add(l.target);else{if(l.target!=h)throw"Incorrect incidency!";i.add(l.source)}}),i},s.prototype.withChildren=function(){var i=new Set,h,l;if(i.add(this),this.child!=null)for(var d=this.child.getNodes(),y=0;y<d.length;y++)h=d[y],l=h.withChildren(),l.forEach(function(T){i.add(T)});return i},s.prototype.getNoOfChildren=function(){var i=0,h;if(this.child==null)i=1;else for(var l=this.child.getNodes(),d=0;d<l.length;d++)h=l[d],i+=h.getNoOfChildren();return i==0&&(i=1),i},s.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},s.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},s.prototype.scatter=function(){var i,h,l=-r.INITIAL_WORLD_BOUNDARY,d=r.INITIAL_WORLD_BOUNDARY;i=r.WORLD_CENTER_X+a.nextDouble()*(d-l)+l;var y=-r.INITIAL_WORLD_BOUNDARY,T=r.INITIAL_WORLD_BOUNDARY;h=r.WORLD_CENTER_Y+a.nextDouble()*(T-y)+y,this.rect.x=i,this.rect.y=h},s.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var i=this.getChild();if(i.updateBounds(!0),this.rect.x=i.getLeft(),this.rect.y=i.getTop(),this.setWidth(i.getRight()-i.getLeft()),this.setHeight(i.getBottom()-i.getTop()),r.NODE_DIMENSIONS_INCLUDE_LABELS){var h=i.getRight()-i.getLeft(),l=i.getBottom()-i.getTop();this.labelWidth>h&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>l&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-l)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-l),this.setHeight(this.labelHeight))}}},s.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},s.prototype.transform=function(i){var h=this.rect.x;h>r.WORLD_BOUNDARY?h=r.WORLD_BOUNDARY:h<-r.WORLD_BOUNDARY&&(h=-r.WORLD_BOUNDARY);var l=this.rect.y;l>r.WORLD_BOUNDARY?l=r.WORLD_BOUNDARY:l<-r.WORLD_BOUNDARY&&(l=-r.WORLD_BOUNDARY);var d=new u(h,l),y=i.inverseTransformPoint(d);this.setLocation(y.x,y.y)},s.prototype.getLeft=function(){return this.rect.x},s.prototype.getRight=function(){return this.rect.x+this.rect.width},s.prototype.getTop=function(){return this.rect.y},s.prototype.getBottom=function(){return this.rect.y+this.rect.height},s.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=s}),(function(N,C,v){"use strict";function n(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(e){this.x=e},n.prototype.setY=function(e){this.y=e},n.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=n}),(function(N,C,v){"use strict";var n=v(2),e=v(10),t=v(0),r=v(6),a=v(3),u=v(1),s=v(13),p=v(12),i=v(11);function h(d,y,T){n.call(this,T),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=d,y!=null&&y instanceof r?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}h.prototype=Object.create(n.prototype);for(var l in n)h[l]=n[l];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(d,y,T){if(y==null&&T==null){var c=d;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(c)>-1)throw"Node already in graph!";return c.owner=this,this.getNodes().push(c),c}else{var D=d;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(y.owner==T.owner&&y.owner==this))throw"Both owners must be this graph!";return y.owner!=T.owner?null:(D.source=y,D.target=T,D.isInterGraph=!1,this.getEdges().push(D),y.edges.push(D),T!=y&&T.edges.push(D),D)}},h.prototype.remove=function(d){var y=d;if(d instanceof a){if(y==null)throw"Node is null!";if(!(y.owner!=null&&y.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=y.edges.slice(),c,D=T.length,E=0;E<D;E++)c=T[E],c.isInterGraph?this.graphManager.remove(c):c.source.owner.remove(c);var O=this.nodes.indexOf(y);if(O==-1)throw"Node not in owner node list!";this.nodes.splice(O,1)}else if(d instanceof u){var c=d;if(c==null)throw"Edge is null!";if(!(c.source!=null&&c.target!=null))throw"Source and/or target is null!";if(!(c.source.owner!=null&&c.target.owner!=null&&c.source.owner==this&&c.target.owner==this))throw"Source and/or target owner is invalid!";var o=c.source.edges.indexOf(c),g=c.target.edges.indexOf(c);if(!(o>-1&&g>-1))throw"Source and/or target doesn't know this edge!";c.source.edges.splice(o,1),c.target!=c.source&&c.target.edges.splice(g,1);var O=c.source.owner.getEdges().indexOf(c);if(O==-1)throw"Not in owner's edge list!";c.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var d=e.MAX_VALUE,y=e.MAX_VALUE,T,c,D,E=this.getNodes(),O=E.length,o=0;o<O;o++){var g=E[o];T=g.getTop(),c=g.getLeft(),d>T&&(d=T),y>c&&(y=c)}return d==e.MAX_VALUE?null:(E[0].getParent().paddingLeft!=null?D=E[0].getParent().paddingLeft:D=this.margin,this.left=y-D,this.top=d-D,new p(this.left,this.top))},h.prototype.updateBounds=function(d){for(var y=e.MAX_VALUE,T=-e.MAX_VALUE,c=e.MAX_VALUE,D=-e.MAX_VALUE,E,O,o,g,f,L=this.nodes,A=L.length,I=0;I<A;I++){var m=L[I];d&&m.child!=null&&m.updateBounds(),E=m.getLeft(),O=m.getRight(),o=m.getTop(),g=m.getBottom(),y>E&&(y=E),T<O&&(T=O),c>o&&(c=o),D<g&&(D=g)}var R=new s(y,c,T-y,D-c);y==e.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),L[0].getParent().paddingLeft!=null?f=L[0].getParent().paddingLeft:f=this.margin,this.left=R.x-f,this.right=R.x+R.width+f,this.top=R.y-f,this.bottom=R.y+R.height+f},h.calculateBounds=function(d){for(var y=e.MAX_VALUE,T=-e.MAX_VALUE,c=e.MAX_VALUE,D=-e.MAX_VALUE,E,O,o,g,f=d.length,L=0;L<f;L++){var A=d[L];E=A.getLeft(),O=A.getRight(),o=A.getTop(),g=A.getBottom(),y>E&&(y=E),T<O&&(T=O),c>o&&(c=o),D<g&&(D=g)}var I=new s(y,c,T-y,D-c);return I},h.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){for(var d=0,y=this.nodes,T=y.length,c=0;c<T;c++){var D=y[c];d+=D.calcEstimatedSize()}return d==0?this.estimatedSize=t.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=d/Math.sqrt(this.nodes.length),this.estimatedSize},h.prototype.updateConnected=function(){var d=this;if(this.nodes.length==0){this.isConnected=!0;return}var y=new i,T=new Set,c=this.nodes[0],D,E,O=c.withChildren();for(O.forEach(function(I){y.push(I),T.add(I)});y.length!==0;){c=y.shift(),D=c.getEdges();for(var o=D.length,g=0;g<o;g++){var f=D[g];if(E=f.getOtherEndInGraph(c,this),E!=null&&!T.has(E)){var L=E.withChildren();L.forEach(function(I){y.push(I),T.add(I)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var A=0;T.forEach(function(I){I.owner==d&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h}),(function(N,C,v){"use strict";var n,e=v(1);function t(r){n=v(5),this.layout=r,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var r=this.layout.newGraph(),a=this.layout.newNode(null),u=this.add(r,a);return this.setRootGraph(u),this.rootGraph},t.prototype.add=function(r,a,u,s,p){if(u==null&&s==null&&p==null){if(r==null)throw"Graph is null!";if(a==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(a.child!=null)throw"Already has a child!";return r.parent=a,a.child=r,r}else{p=u,s=a,u=r;var i=s.getOwner(),h=p.getOwner();if(!(i!=null&&i.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(i==h)return u.isInterGraph=!1,i.add(u,s,p);if(u.isInterGraph=!0,u.source=s,u.target=p,this.edges.indexOf(u)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(u),!(u.source!=null&&u.target!=null))throw"Edge source and/or target is null!";if(!(u.source.edges.indexOf(u)==-1&&u.target.edges.indexOf(u)==-1))throw"Edge already in source and/or target incidency list!";return u.source.edges.push(u),u.target.edges.push(u),u}},t.prototype.remove=function(r){if(r instanceof n){var a=r;if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(a==this.rootGraph||a.parent!=null&&a.parent.graphManager==this))throw"Invalid parent node!";var u=[];u=u.concat(a.getEdges());for(var s,p=u.length,i=0;i<p;i++)s=u[i],a.remove(s);var h=[];h=h.concat(a.getNodes());var l;p=h.length;for(var i=0;i<p;i++)l=h[i],a.remove(l);a==this.rootGraph&&this.setRootGraph(null);var d=this.graphs.indexOf(a);this.graphs.splice(d,1),a.parent=null}else if(r instanceof e){if(s=r,s==null)throw"Edge is null!";if(!s.isInterGraph)throw"Not an inter-graph edge!";if(!(s.source!=null&&s.target!=null))throw"Source and/or target is null!";if(!(s.source.edges.indexOf(s)!=-1&&s.target.edges.indexOf(s)!=-1))throw"Source and/or target doesn't know this edge!";var d=s.source.edges.indexOf(s);if(s.source.edges.splice(d,1),d=s.target.edges.indexOf(s),s.target.edges.splice(d,1),!(s.source.owner!=null&&s.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(s.source.owner.getGraphManager().edges.indexOf(s)==-1)throw"Not in owner graph manager's edge list!";var d=s.source.owner.getGraphManager().edges.indexOf(s);s.source.owner.getGraphManager().edges.splice(d,1)}},t.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},t.prototype.getGraphs=function(){return this.graphs},t.prototype.getAllNodes=function(){if(this.allNodes==null){for(var r=[],a=this.getGraphs(),u=a.length,s=0;s<u;s++)r=r.concat(a[s].getNodes());this.allNodes=r}return this.allNodes},t.prototype.resetAllNodes=function(){this.allNodes=null},t.prototype.resetAllEdges=function(){this.allEdges=null},t.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},t.prototype.getAllEdges=function(){if(this.allEdges==null){for(var r=[],a=this.getGraphs(),u=a.length,s=0;s<a.length;s++)r=r.concat(a[s].getEdges());r=r.concat(this.edges),this.allEdges=r}return this.allEdges},t.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},t.prototype.setAllNodesToApplyGravitation=function(r){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=r},t.prototype.getRoot=function(){return this.rootGraph},t.prototype.setRootGraph=function(r){if(r.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=r,r.parent==null&&(r.parent=this.layout.newNode("Root node"))},t.prototype.getLayout=function(){return this.layout},t.prototype.isOneAncestorOfOther=function(r,a){if(!(r!=null&&a!=null))throw"assert failed";if(r==a)return!0;var u=r.getOwner(),s;do{if(s=u.getParent(),s==null)break;if(s==a)return!0;if(u=s.getOwner(),u==null)break}while(!0);u=a.getOwner();do{if(s=u.getParent(),s==null)break;if(s==r)return!0;if(u=s.getOwner(),u==null)break}while(!0);return!1},t.prototype.calcLowestCommonAncestors=function(){for(var r,a,u,s,p,i=this.getAllEdges(),h=i.length,l=0;l<h;l++){if(r=i[l],a=r.source,u=r.target,r.lca=null,r.sourceInLca=a,r.targetInLca=u,a==u){r.lca=a.getOwner();continue}for(s=a.getOwner();r.lca==null;){for(r.targetInLca=u,p=u.getOwner();r.lca==null;){if(p==s){r.lca=p;break}if(p==this.rootGraph)break;if(r.lca!=null)throw"assert failed";r.targetInLca=p.getParent(),p=r.targetInLca.getOwner()}if(s==this.rootGraph)break;r.lca==null&&(r.sourceInLca=s.getParent(),s=r.sourceInLca.getOwner())}if(r.lca==null)throw"assert failed"}},t.prototype.calcLowestCommonAncestor=function(r,a){if(r==a)return r.getOwner();var u=r.getOwner();do{if(u==null)break;var s=a.getOwner();do{if(s==null)break;if(s==u)return s;s=s.getParent().getOwner()}while(!0);u=u.getParent().getOwner()}while(!0);return u},t.prototype.calcInclusionTreeDepths=function(r,a){r==null&&a==null&&(r=this.rootGraph,a=1);for(var u,s=r.getNodes(),p=s.length,i=0;i<p;i++)u=s[i],u.inclusionTreeDepth=a,u.child!=null&&this.calcInclusionTreeDepths(u.child,a+1)},t.prototype.includesInvalidEdge=function(){for(var r,a=this.edges.length,u=0;u<a;u++)if(r=this.edges[u],this.isOneAncestorOfOther(r.source,r.target))return!0;return!1},N.exports=t}),(function(N,C,v){"use strict";var n=v(0);function e(){}for(var t in n)e[t]=n[t];e.MAX_ITERATIONS=2500,e.DEFAULT_EDGE_LENGTH=50,e.DEFAULT_SPRING_STRENGTH=.45,e.DEFAULT_REPULSION_STRENGTH=4500,e.DEFAULT_GRAVITY_STRENGTH=.4,e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,e.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,e.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,e.COOLING_ADAPTATION_FACTOR=.33,e.ADAPTATION_LOWER_NODE_LIMIT=1e3,e.ADAPTATION_UPPER_NODE_LIMIT=5e3,e.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,e.MAX_NODE_DISPLACEMENT=e.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,e.MIN_REPULSION_DIST=e.DEFAULT_EDGE_LENGTH/10,e.CONVERGENCE_CHECK_PERIOD=100,e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,e.MIN_EDGE_LENGTH=1,e.GRID_CALCULATION_CHECK_PERIOD=10,N.exports=e}),(function(N,C,v){"use strict";var n=v(12);function e(){}e.calcSeparationAmount=function(t,r,a,u){if(!t.intersects(r))throw"assert failed";var s=new Array(2);this.decideDirectionsForOverlappingNodes(t,r,s),a[0]=Math.min(t.getRight(),r.getRight())-Math.max(t.x,r.x),a[1]=Math.min(t.getBottom(),r.getBottom())-Math.max(t.y,r.y),t.getX()<=r.getX()&&t.getRight()>=r.getRight()?a[0]+=Math.min(r.getX()-t.getX(),t.getRight()-r.getRight()):r.getX()<=t.getX()&&r.getRight()>=t.getRight()&&(a[0]+=Math.min(t.getX()-r.getX(),r.getRight()-t.getRight())),t.getY()<=r.getY()&&t.getBottom()>=r.getBottom()?a[1]+=Math.min(r.getY()-t.getY(),t.getBottom()-r.getBottom()):r.getY()<=t.getY()&&r.getBottom()>=t.getBottom()&&(a[1]+=Math.min(t.getY()-r.getY(),r.getBottom()-t.getBottom()));var p=Math.abs((r.getCenterY()-t.getCenterY())/(r.getCenterX()-t.getCenterX()));r.getCenterY()===t.getCenterY()&&r.getCenterX()===t.getCenterX()&&(p=1);var i=p*a[0],h=a[1]/p;a[0]<h?h=a[0]:i=a[1],a[0]=-1*s[0]*(h/2+u),a[1]=-1*s[1]*(i/2+u)},e.decideDirectionsForOverlappingNodes=function(t,r,a){t.getCenterX()<r.getCenterX()?a[0]=-1:a[0]=1,t.getCenterY()<r.getCenterY()?a[1]=-1:a[1]=1},e.getIntersection2=function(t,r,a){var u=t.getCenterX(),s=t.getCenterY(),p=r.getCenterX(),i=r.getCenterY();if(t.intersects(r))return a[0]=u,a[1]=s,a[2]=p,a[3]=i,!0;var h=t.getX(),l=t.getY(),d=t.getRight(),y=t.getX(),T=t.getBottom(),c=t.getRight(),D=t.getWidthHalf(),E=t.getHeightHalf(),O=r.getX(),o=r.getY(),g=r.getRight(),f=r.getX(),L=r.getBottom(),A=r.getRight(),I=r.getWidthHalf(),m=r.getHeightHalf(),R=!1,w=!1;if(u===p){if(s>i)return a[0]=u,a[1]=l,a[2]=p,a[3]=L,!1;if(s<i)return a[0]=u,a[1]=T,a[2]=p,a[3]=o,!1}else if(s===i){if(u>p)return a[0]=h,a[1]=s,a[2]=g,a[3]=i,!1;if(u<p)return a[0]=d,a[1]=s,a[2]=O,a[3]=i,!1}else{var F=t.height/t.width,Y=r.height/r.width,x=(i-s)/(p-u),M=void 0,G=void 0,S=void 0,P=void 0,_=void 0,U=void 0;if(-F===x?u>p?(a[0]=y,a[1]=T,R=!0):(a[0]=d,a[1]=l,R=!0):F===x&&(u>p?(a[0]=h,a[1]=l,R=!0):(a[0]=c,a[1]=T,R=!0)),-Y===x?p>u?(a[2]=f,a[3]=L,w=!0):(a[2]=g,a[3]=o,w=!0):Y===x&&(p>u?(a[2]=O,a[3]=o,w=!0):(a[2]=A,a[3]=L,w=!0)),R&&w)return!1;if(u>p?s>i?(M=this.getCardinalDirection(F,x,4),G=this.getCardinalDirection(Y,x,2)):(M=this.getCardinalDirection(-F,x,3),G=this.getCardinalDirection(-Y,x,1)):s>i?(M=this.getCardinalDirection(-F,x,1),G=this.getCardinalDirection(-Y,x,3)):(M=this.getCardinalDirection(F,x,2),G=this.getCardinalDirection(Y,x,4)),!R)switch(M){case 1:P=l,S=u+-E/x,a[0]=S,a[1]=P;break;case 2:S=c,P=s+D*x,a[0]=S,a[1]=P;break;case 3:P=T,S=u+E/x,a[0]=S,a[1]=P;break;case 4:S=y,P=s+-D*x,a[0]=S,a[1]=P;break}if(!w)switch(G){case 1:U=o,_=p+-m/x,a[2]=_,a[3]=U;break;case 2:_=A,U=i+I*x,a[2]=_,a[3]=U;break;case 3:U=L,_=p+m/x,a[2]=_,a[3]=U;break;case 4:_=f,U=i+-I*x,a[2]=_,a[3]=U;break}}return!1},e.getCardinalDirection=function(t,r,a){return t>r?a:1+a%4},e.getIntersection=function(t,r,a,u){if(u==null)return this.getIntersection2(t,r,a);var s=t.x,p=t.y,i=r.x,h=r.y,l=a.x,d=a.y,y=u.x,T=u.y,c=void 0,D=void 0,E=void 0,O=void 0,o=void 0,g=void 0,f=void 0,L=void 0,A=void 0;return E=h-p,o=s-i,f=i*p-s*h,O=T-d,g=l-y,L=y*d-l*T,A=E*g-O*o,A===0?null:(c=(o*L-g*f)/A,D=(O*f-E*L)/A,new n(c,D))},e.angleOfVector=function(t,r,a,u){var s=void 0;return t!==a?(s=Math.atan((u-r)/(a-t)),a<t?s+=Math.PI:u<r&&(s+=this.TWO_PI)):u<r?s=this.ONE_AND_HALF_PI:s=this.HALF_PI,s},e.doIntersect=function(t,r,a,u){var s=t.x,p=t.y,i=r.x,h=r.y,l=a.x,d=a.y,y=u.x,T=u.y,c=(i-s)*(T-d)-(y-l)*(h-p);if(c===0)return!1;var D=((T-d)*(y-s)+(l-y)*(T-p))/c,E=((p-h)*(y-s)+(i-s)*(T-p))/c;return 0<D&&D<1&&0<E&&E<1},e.HALF_PI=.5*Math.PI,e.ONE_AND_HALF_PI=1.5*Math.PI,e.TWO_PI=2*Math.PI,e.THREE_PI=3*Math.PI,N.exports=e}),(function(N,C,v){"use strict";function n(){}n.sign=function(e){return e>0?1:e<0?-1:0},n.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},n.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=n}),(function(N,C,v){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,N.exports=n}),(function(N,C,v){"use strict";var n=(function(){function s(p,i){for(var h=0;h<i.length;h++){var l=i[h];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(p,l.key,l)}}return function(p,i,h){return i&&s(p.prototype,i),h&&s(p,h),p}})();function e(s,p){if(!(s instanceof p))throw new TypeError("Cannot call a class as a function")}var t=function(p){return{value:p,next:null,prev:null}},r=function(p,i,h,l){return p!==null?p.next=i:l.head=i,h!==null?h.prev=i:l.tail=i,i.prev=p,i.next=h,l.length++,i},a=function(p,i){var h=p.prev,l=p.next;return h!==null?h.next=l:i.head=l,l!==null?l.prev=h:i.tail=h,p.prev=p.next=null,i.length--,p},u=(function(){function s(p){var i=this;e(this,s),this.length=0,this.head=null,this.tail=null,p?.forEach(function(h){return i.push(h)})}return n(s,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(i,h){return r(h.prev,t(i),h,this)}},{key:"insertAfter",value:function(i,h){return r(h,t(i),h.next,this)}},{key:"insertNodeBefore",value:function(i,h){return r(h.prev,i,h,this)}},{key:"insertNodeAfter",value:function(i,h){return r(h,i,h.next,this)}},{key:"push",value:function(i){return r(this.tail,t(i),null,this)}},{key:"unshift",value:function(i){return r(null,t(i),this.head,this)}},{key:"remove",value:function(i){return a(i,this)}},{key:"pop",value:function(){return a(this.tail,this).value}},{key:"popNode",value:function(){return a(this.tail,this)}},{key:"shift",value:function(){return a(this.head,this).value}},{key:"shiftNode",value:function(){return a(this.head,this)}},{key:"get_object_at",value:function(i){if(i<=this.length()){for(var h=1,l=this.head;h<i;)l=l.next,h++;return l.value}}},{key:"set_object_at",value:function(i,h){if(i<=this.length()){for(var l=1,d=this.head;l<i;)d=d.next,l++;d.value=h}}}]),s})();N.exports=u}),(function(N,C,v){"use strict";function n(e,t,r){this.x=null,this.y=null,e==null&&t==null&&r==null?(this.x=0,this.y=0):typeof e=="number"&&typeof t=="number"&&r==null?(this.x=e,this.y=t):e.constructor.name=="Point"&&t==null&&r==null&&(r=e,this.x=r.x,this.y=r.y)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.getLocation=function(){return new n(this.x,this.y)},n.prototype.setLocation=function(e,t,r){e.constructor.name=="Point"&&t==null&&r==null?(r=e,this.setLocation(r.x,r.y)):typeof e=="number"&&typeof t=="number"&&r==null&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},n.prototype.move=function(e,t){this.x=e,this.y=t},n.prototype.translate=function(e,t){this.x+=e,this.y+=t},n.prototype.equals=function(e){if(e.constructor.name=="Point"){var t=e;return this.x==t.x&&this.y==t.y}return this==e},n.prototype.toString=function(){return new n().constructor.name+"[x="+this.x+",y="+this.y+"]"},N.exports=n}),(function(N,C,v){"use strict";function n(e,t,r,a){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&r!=null&&a!=null&&(this.x=e,this.y=t,this.width=r,this.height=a)}n.prototype.getX=function(){return this.x},n.prototype.setX=function(e){this.x=e},n.prototype.getY=function(){return this.y},n.prototype.setY=function(e){this.y=e},n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(e){this.width=e},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(e){this.height=e},n.prototype.getRight=function(){return this.x+this.width},n.prototype.getBottom=function(){return this.y+this.height},n.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},n.prototype.getCenterX=function(){return this.x+this.width/2},n.prototype.getMinX=function(){return this.getX()},n.prototype.getMaxX=function(){return this.getX()+this.width},n.prototype.getCenterY=function(){return this.y+this.height/2},n.prototype.getMinY=function(){return this.getY()},n.prototype.getMaxY=function(){return this.getY()+this.height},n.prototype.getWidthHalf=function(){return this.width/2},n.prototype.getHeightHalf=function(){return this.height/2},N.exports=n}),(function(N,C,v){"use strict";var n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function e(){}e.lastID=0,e.createID=function(t){return e.isPrimitive(t)?t:(t.uniqueID!=null||(t.uniqueID=e.getString(),e.lastID++),t.uniqueID)},e.getString=function(t){return t==null&&(t=e.lastID),"Object#"+t},e.isPrimitive=function(t){var r=typeof t>"u"?"undefined":n(t);return t==null||r!="object"&&r!="function"},N.exports=e}),(function(N,C,v){"use strict";function n(l){if(Array.isArray(l)){for(var d=0,y=Array(l.length);d<l.length;d++)y[d]=l[d];return y}else return Array.from(l)}var e=v(0),t=v(6),r=v(3),a=v(1),u=v(5),s=v(4),p=v(17),i=v(27);function h(l){i.call(this),this.layoutQuality=e.QUALITY,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=e.DEFAULT_INCREMENTAL,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new t(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,l!=null&&(this.isRemoteUse=l)}h.RANDOM_SEED=1,h.prototype=Object.create(i.prototype),h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},h.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},h.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},h.prototype.newGraphManager=function(){var l=new t(this);return this.graphManager=l,l},h.prototype.newGraph=function(l){return new u(null,this.graphManager,l)},h.prototype.newNode=function(l){return new r(this.graphManager,l)},h.prototype.newEdge=function(l){return new a(null,null,l)},h.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},h.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var l;return this.checkLayoutSuccess()?l=!1:l=this.layout(),e.ANIMATE==="during"?!1:(l&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,l)},h.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},h.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var l,d=this.graphManager.getAllEdges(),y=0;y<d.length;y++)l=d[y];for(var T,c=this.graphManager.getRoot().getNodes(),y=0;y<c.length;y++)T=c[y];this.update(this.graphManager.getRoot())}},h.prototype.update=function(l){if(l==null)this.update2();else if(l instanceof r){var d=l;if(d.getChild()!=null)for(var y=d.getChild().getNodes(),T=0;T<y.length;T++)update(y[T]);if(d.vGraphObject!=null){var c=d.vGraphObject;c.update(d)}}else if(l instanceof a){var D=l;if(D.vGraphObject!=null){var E=D.vGraphObject;E.update(D)}}else if(l instanceof u){var O=l;if(O.vGraphObject!=null){var o=O.vGraphObject;o.update(O)}}},h.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=e.QUALITY,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=e.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},h.prototype.transform=function(l){if(l==null)this.transform(new s(0,0));else{var d=new p,y=this.graphManager.getRoot().updateLeftTop();if(y!=null){d.setWorldOrgX(l.x),d.setWorldOrgY(l.y),d.setDeviceOrgX(y.x),d.setDeviceOrgY(y.y);for(var T=this.getAllNodes(),c,D=0;D<T.length;D++)c=T[D],c.transform(d)}}},h.prototype.positionNodesRandomly=function(l){if(l==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var d,y,T=l.getNodes(),c=0;c<T.length;c++)d=T[c],y=d.getChild(),y==null||y.getNodes().length==0?d.scatter():(this.positionNodesRandomly(y),d.updateBounds())},h.prototype.getFlatForest=function(){for(var l=[],d=!0,y=this.graphManager.getRoot().getNodes(),T=!0,c=0;c<y.length;c++)y[c].getChild()!=null&&(T=!1);if(!T)return l;var D=new Set,E=[],O=new Map,o=[];for(o=o.concat(y);o.length>0&&d;){for(E.push(o[0]);E.length>0&&d;){var g=E[0];E.splice(0,1),D.add(g);for(var f=g.getEdges(),c=0;c<f.length;c++){var L=f[c].getOtherEnd(g);if(O.get(g)!=L)if(!D.has(L))E.push(L),O.set(L,g);else{d=!1;break}}}if(!d)l=[];else{var A=[].concat(n(D));l.push(A);for(var c=0;c<A.length;c++){var I=A[c],m=o.indexOf(I);m>-1&&o.splice(m,1)}D=new Set,O=new Map}}return l},h.prototype.createDummyNodesForBendpoints=function(l){for(var d=[],y=l.source,T=this.graphManager.calcLowestCommonAncestor(l.source,l.target),c=0;c<l.bendpoints.length;c++){var D=this.newNode(null);D.setRect(new Point(0,0),new Dimension(1,1)),T.add(D);var E=this.newEdge(null);this.graphManager.add(E,y,D),d.add(D),y=D}var E=this.newEdge(null);return this.graphManager.add(E,y,l.target),this.edgeToDummyNodes.set(l,d),l.isInterGraph()?this.graphManager.remove(l):T.remove(l),d},h.prototype.createBendpointsFromDummyNodes=function(){var l=[];l=l.concat(this.graphManager.getAllEdges()),l=[].concat(n(this.edgeToDummyNodes.keys())).concat(l);for(var d=0;d<l.length;d++){var y=l[d];if(y.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(y),c=0;c<T.length;c++){var D=T[c],E=new s(D.getCenterX(),D.getCenterY()),O=y.bendpoints.get(c);O.x=E.x,O.y=E.y,D.getOwner().remove(D)}this.graphManager.add(y,y.source,y.target)}}},h.transform=function(l,d,y,T){if(y!=null&&T!=null){var c=d;if(l<=50){var D=d/y;c-=(d-D)/50*(50-l)}else{var E=d*T;c+=(E-d)/50*(l-50)}return c}else{var O,o;return l<=50?(O=9*d/500,o=d/10):(O=9*d/50,o=-8*d),O*l+o}},h.findCenterOfTree=function(l){var d=[];d=d.concat(l);var y=[],T=new Map,c=!1,D=null;(d.length==1||d.length==2)&&(c=!0,D=d[0]);for(var E=0;E<d.length;E++){var O=d[E],o=O.getNeighborsList().size;T.set(O,O.getNeighborsList().size),o==1&&y.push(O)}var g=[];for(g=g.concat(y);!c;){var f=[];f=f.concat(g),g=[];for(var E=0;E<d.length;E++){var O=d[E],L=d.indexOf(O);L>=0&&d.splice(L,1);var A=O.getNeighborsList();A.forEach(function(R){if(y.indexOf(R)<0){var w=T.get(R),F=w-1;F==1&&g.push(R),T.set(R,F)}})}y=y.concat(g),(d.length==1||d.length==2)&&(c=!0,D=d[0])}return D},h.prototype.setGraphManager=function(l){this.graphManager=l},N.exports=h}),(function(N,C,v){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},N.exports=n}),(function(N,C,v){"use strict";var n=v(4);function e(t,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var r=0,a=this.lworldExtX;return a!=0&&(r=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/a),r},e.prototype.transformY=function(t){var r=0,a=this.lworldExtY;return a!=0&&(r=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/a),r},e.prototype.inverseTransformX=function(t){var r=0,a=this.ldeviceExtX;return a!=0&&(r=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/a),r},e.prototype.inverseTransformY=function(t){var r=0,a=this.ldeviceExtY;return a!=0&&(r=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/a),r},e.prototype.inverseTransformPoint=function(t){var r=new n(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return r},N.exports=e}),(function(N,C,v){"use strict";function n(i){if(Array.isArray(i)){for(var h=0,l=Array(i.length);h<i.length;h++)l[h]=i[h];return l}else return Array.from(i)}var e=v(15),t=v(7),r=v(0),a=v(8),u=v(9);function s(){e.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}s.prototype=Object.create(e.prototype);for(var p in e)s[p]=e[p];s.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},s.prototype.calcIdealEdgeLengths=function(){for(var i,h,l,d,y,T,c=this.getGraphManager().getAllEdges(),D=0;D<c.length;D++)i=c[D],i.idealLength=this.idealEdgeLength,i.isInterGraph&&(l=i.getSource(),d=i.getTarget(),y=i.getSourceInLca().getEstimatedSize(),T=i.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(i.idealLength+=y+T-2*r.SIMPLE_NODE_SIZE),h=i.getLca().getInclusionTreeDepth(),i.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(l.getInclusionTreeDepth()+d.getInclusionTreeDepth()-2*h))},s.prototype.initSpringEmbedder=function(){var i=this.getAllNodes().length;this.incremental?(i>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(i-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(i>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(i-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},s.prototype.calcSpringForces=function(){for(var i=this.getAllEdges(),h,l=0;l<i.length;l++)h=i[l],this.calcSpringForce(h,h.idealLength)},s.prototype.calcRepulsionForces=function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,l,d,y,T,c=this.getAllNodes(),D;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&i&&this.updateGrid(),D=new Set,l=0;l<c.length;l++)y=c[l],this.calculateRepulsionForceOfANode(y,D,i,h),D.add(y);else for(l=0;l<c.length;l++)for(y=c[l],d=l+1;d<c.length;d++)T=c[d],y.getOwner()==T.getOwner()&&this.calcRepulsionForce(y,T)},s.prototype.calcGravitationalForces=function(){for(var i,h=this.getAllNodesToApplyGravitation(),l=0;l<h.length;l++)i=h[l],this.calcGravitationalForce(i)},s.prototype.moveNodes=function(){for(var i=this.getAllNodes(),h,l=0;l<i.length;l++)h=i[l],h.move()},s.prototype.calcSpringForce=function(i,h){var l=i.getSource(),d=i.getTarget(),y,T,c,D;if(this.uniformLeafNodeSizes&&l.getChild()==null&&d.getChild()==null)i.updateLengthSimple();else if(i.updateLength(),i.isOverlapingSourceAndTarget)return;y=i.getLength(),y!=0&&(T=this.springConstant*(y-h),c=T*(i.lengthX/y),D=T*(i.lengthY/y),l.springForceX+=c,l.springForceY+=D,d.springForceX-=c,d.springForceY-=D)},s.prototype.calcRepulsionForce=function(i,h){var l=i.getRect(),d=h.getRect(),y=new Array(2),T=new Array(4),c,D,E,O,o,g,f;if(l.intersects(d)){a.calcSeparationAmount(l,d,y,t.DEFAULT_EDGE_LENGTH/2),g=2*y[0],f=2*y[1];var L=i.noOfChildren*h.noOfChildren/(i.noOfChildren+h.noOfChildren);i.repulsionForceX-=L*g,i.repulsionForceY-=L*f,h.repulsionForceX+=L*g,h.repulsionForceY+=L*f}else this.uniformLeafNodeSizes&&i.getChild()==null&&h.getChild()==null?(c=d.getCenterX()-l.getCenterX(),D=d.getCenterY()-l.getCenterY()):(a.getIntersection(l,d,T),c=T[2]-T[0],D=T[3]-T[1]),Math.abs(c)<t.MIN_REPULSION_DIST&&(c=u.sign(c)*t.MIN_REPULSION_DIST),Math.abs(D)<t.MIN_REPULSION_DIST&&(D=u.sign(D)*t.MIN_REPULSION_DIST),E=c*c+D*D,O=Math.sqrt(E),o=this.repulsionConstant*i.noOfChildren*h.noOfChildren/E,g=o*c/O,f=o*D/O,i.repulsionForceX-=g,i.repulsionForceY-=f,h.repulsionForceX+=g,h.repulsionForceY+=f},s.prototype.calcGravitationalForce=function(i){var h,l,d,y,T,c,D,E;h=i.getOwner(),l=(h.getRight()+h.getLeft())/2,d=(h.getTop()+h.getBottom())/2,y=i.getCenterX()-l,T=i.getCenterY()-d,c=Math.abs(y)+i.getWidth()/2,D=Math.abs(T)+i.getHeight()/2,i.getOwner()==this.graphManager.getRoot()?(E=h.getEstimatedSize()*this.gravityRangeFactor,(c>E||D>E)&&(i.gravitationForceX=-this.gravityConstant*y,i.gravitationForceY=-this.gravityConstant*T)):(E=h.getEstimatedSize()*this.compoundGravityRangeFactor,(c>E||D>E)&&(i.gravitationForceX=-this.gravityConstant*y*this.compoundGravityConstant,i.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},s.prototype.isConverged=function(){var i,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),i=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,i||h},s.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},s.prototype.calcNoOfChildrenForAllNodes=function(){for(var i,h=this.graphManager.getAllNodes(),l=0;l<h.length;l++)i=h[l],i.noOfChildren=i.getNoOfChildren()},s.prototype.calcGrid=function(i){var h=0,l=0;h=parseInt(Math.ceil((i.getRight()-i.getLeft())/this.repulsionRange)),l=parseInt(Math.ceil((i.getBottom()-i.getTop())/this.repulsionRange));for(var d=new Array(h),y=0;y<h;y++)d[y]=new Array(l);for(var y=0;y<h;y++)for(var T=0;T<l;T++)d[y][T]=new Array;return d},s.prototype.addNodeToGrid=function(i,h,l){var d=0,y=0,T=0,c=0;d=parseInt(Math.floor((i.getRect().x-h)/this.repulsionRange)),y=parseInt(Math.floor((i.getRect().width+i.getRect().x-h)/this.repulsionRange)),T=parseInt(Math.floor((i.getRect().y-l)/this.repulsionRange)),c=parseInt(Math.floor((i.getRect().height+i.getRect().y-l)/this.repulsionRange));for(var D=d;D<=y;D++)for(var E=T;E<=c;E++)this.grid[D][E].push(i),i.setGridCoordinates(d,y,T,c)},s.prototype.updateGrid=function(){var i,h,l=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),i=0;i<l.length;i++)h=l[i],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},s.prototype.calculateRepulsionForceOfANode=function(i,h,l,d){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&l||d){var y=new Set;i.surrounding=new Array;for(var T,c=this.grid,D=i.startX-1;D<i.finishX+2;D++)for(var E=i.startY-1;E<i.finishY+2;E++)if(!(D<0||E<0||D>=c.length||E>=c[0].length)){for(var O=0;O<c[D][E].length;O++)if(T=c[D][E][O],!(i.getOwner()!=T.getOwner()||i==T)&&!h.has(T)&&!y.has(T)){var o=Math.abs(i.getCenterX()-T.getCenterX())-(i.getWidth()/2+T.getWidth()/2),g=Math.abs(i.getCenterY()-T.getCenterY())-(i.getHeight()/2+T.getHeight()/2);o<=this.repulsionRange&&g<=this.repulsionRange&&y.add(T)}}i.surrounding=[].concat(n(y))}for(D=0;D<i.surrounding.length;D++)this.calcRepulsionForce(i,i.surrounding[D])},s.prototype.calcRepulsionRange=function(){return 0},N.exports=s}),(function(N,C,v){"use strict";var n=v(1),e=v(7);function t(a,u,s){n.call(this,a,u,s),this.idealLength=e.DEFAULT_EDGE_LENGTH}t.prototype=Object.create(n.prototype);for(var r in n)t[r]=n[r];N.exports=t}),(function(N,C,v){"use strict";var n=v(3);function e(r,a,u,s){n.call(this,r,a,u,s),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}e.prototype=Object.create(n.prototype);for(var t in n)e[t]=n[t];e.prototype.setGridCoordinates=function(r,a,u,s){this.startX=r,this.finishX=a,this.startY=u,this.finishY=s},N.exports=e}),(function(N,C,v){"use strict";function n(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=e)}n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(e){this.width=e},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(e){this.height=e},N.exports=n}),(function(N,C,v){"use strict";var n=v(14);function e(){this.map={},this.keys=[]}e.prototype.put=function(t,r){var a=n.createID(t);this.contains(a)||(this.map[a]=r,this.keys.push(t))},e.prototype.contains=function(t){var r=n.createID(t);return this.map[t]!=null},e.prototype.get=function(t){var r=n.createID(t);return this.map[r]},e.prototype.keySet=function(){return this.keys},N.exports=e}),(function(N,C,v){"use strict";var n=v(14);function e(){this.set={}}e.prototype.add=function(t){var r=n.createID(t);this.contains(r)||(this.set[r]=t)},e.prototype.remove=function(t){delete this.set[n.createID(t)]},e.prototype.clear=function(){this.set={}},e.prototype.contains=function(t){return this.set[n.createID(t)]==t},e.prototype.isEmpty=function(){return this.size()===0},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAllTo=function(t){for(var r=Object.keys(this.set),a=r.length,u=0;u<a;u++)t.push(this.set[r[u]])},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAll=function(t){for(var r=t.length,a=0;a<r;a++){var u=t[a];this.add(u)}},N.exports=e}),(function(N,C,v){"use strict";var n=(function(){function a(u,s){for(var p=0;p<s.length;p++){var i=s[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,i.key,i)}}return function(u,s,p){return s&&a(u.prototype,s),p&&a(u,p),u}})();function e(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}var t=v(11),r=(function(){function a(u,s){e(this,a),(s!==null||s!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var p=void 0;u instanceof t?p=u.size():p=u.length,this._quicksort(u,0,p-1)}return n(a,[{key:"_quicksort",value:function(s,p,i){if(p<i){var h=this._partition(s,p,i);this._quicksort(s,p,h),this._quicksort(s,h+1,i)}}},{key:"_partition",value:function(s,p,i){for(var h=this._get(s,p),l=p,d=i;;){for(;this.compareFunction(h,this._get(s,d));)d--;for(;this.compareFunction(this._get(s,l),h);)l++;if(l<d)this._swap(s,l,d),l++,d--;else return d}}},{key:"_get",value:function(s,p){return s instanceof t?s.get_object_at(p):s[p]}},{key:"_set",value:function(s,p,i){s instanceof t?s.set_object_at(p,i):s[p]=i}},{key:"_swap",value:function(s,p,i){var h=this._get(s,p);this._set(s,p,this._get(s,i)),this._set(s,i,h)}},{key:"_defaultCompareFunction",value:function(s,p){return p>s}}]),a})();N.exports=r}),(function(N,C,v){"use strict";var n=(function(){function r(a,u){for(var s=0;s<u.length;s++){var p=u[s];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,u,s){return u&&r(a.prototype,u),s&&r(a,s),a}})();function e(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}var t=(function(){function r(a,u){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,r),this.sequence1=a,this.sequence2=u,this.match_score=s,this.mismatch_penalty=p,this.gap_penalty=i,this.iMax=a.length+1,this.jMax=u.length+1,this.grid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.grid[h][l]=0}this.tracebackGrid=new Array(this.iMax);for(var d=0;d<this.iMax;d++){this.tracebackGrid[d]=new Array(this.jMax);for(var y=0;y<this.jMax;y++)this.tracebackGrid[d][y]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return n(r,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var u=1;u<this.jMax;u++)this.grid[0][u]=this.grid[0][u-1]+this.gap_penalty,this.tracebackGrid[0][u]=[!1,!1,!0];for(var s=1;s<this.iMax;s++)this.grid[s][0]=this.grid[s-1][0]+this.gap_penalty,this.tracebackGrid[s][0]=[!1,!0,!1];for(var p=1;p<this.iMax;p++)for(var i=1;i<this.jMax;i++){var h=void 0;this.sequence1[p-1]===this.sequence2[i-1]?h=this.grid[p-1][i-1]+this.match_score:h=this.grid[p-1][i-1]+this.mismatch_penalty;var l=this.grid[p-1][i]+this.gap_penalty,d=this.grid[p][i-1]+this.gap_penalty,y=[h,l,d],T=this.arrayAllMaxIndexes(y);this.grid[p][i]=y[T[0]],this.tracebackGrid[p][i]=[T.includes(0),T.includes(1),T.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var u=[];for(u.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});u[0];){var s=u[0],p=this.tracebackGrid[s.pos[0]][s.pos[1]];p[0]&&u.push({pos:[s.pos[0]-1,s.pos[1]-1],seq1:this.sequence1[s.pos[0]-1]+s.seq1,seq2:this.sequence2[s.pos[1]-1]+s.seq2}),p[1]&&u.push({pos:[s.pos[0]-1,s.pos[1]],seq1:this.sequence1[s.pos[0]-1]+s.seq1,seq2:"-"+s.seq2}),p[2]&&u.push({pos:[s.pos[0],s.pos[1]-1],seq1:"-"+s.seq1,seq2:this.sequence2[s.pos[1]-1]+s.seq2}),s.pos[0]===0&&s.pos[1]===0&&this.alignments.push({sequence1:s.seq1,sequence2:s.seq2}),u.shift()}return this.alignments}},{key:"getAllIndexes",value:function(u,s){for(var p=[],i=-1;(i=u.indexOf(s,i+1))!==-1;)p.push(i);return p}},{key:"arrayAllMaxIndexes",value:function(u){return this.getAllIndexes(u,Math.max.apply(null,u))}}]),r})();N.exports=t}),(function(N,C,v){"use strict";var n=function(){};n.FDLayout=v(18),n.FDLayoutConstants=v(7),n.FDLayoutEdge=v(19),n.FDLayoutNode=v(20),n.DimensionD=v(21),n.HashMap=v(22),n.HashSet=v(23),n.IGeometry=v(8),n.IMath=v(9),n.Integer=v(10),n.Point=v(12),n.PointD=v(4),n.RandomSeed=v(16),n.RectangleD=v(13),n.Transform=v(17),n.UniqueIDGeneretor=v(14),n.Quicksort=v(24),n.LinkedList=v(11),n.LGraphObject=v(2),n.LGraph=v(5),n.LEdge=v(1),n.LGraphManager=v(6),n.LNode=v(3),n.Layout=v(15),n.LayoutConstants=v(0),n.NeedlemanWunsch=v(25),N.exports=n}),(function(N,C,v){"use strict";function n(){this.listeners=[]}var e=n.prototype;e.addListener=function(t,r){this.listeners.push({event:t,callback:r})},e.removeListener=function(t,r){for(var a=this.listeners.length;a>=0;a--){var u=this.listeners[a];u.event===t&&u.callback===r&&this.listeners.splice(a,1)}},e.emit=function(t,r){for(var a=0;a<this.listeners.length;a++){var u=this.listeners[a];t===u.event&&u.callback(r)}},N.exports=n})])})});var J=$((Z,z)=>{(function(C,v){typeof Z=="object"&&typeof z=="object"?z.exports=v(q()):typeof define=="function"&&define.amd?define(["layout-base"],v):typeof Z=="object"?Z.coseBase=v(q()):C.coseBase=v(C.layoutBase)})(Z,function(N){return(function(C){var v={};function n(e){if(v[e])return v[e].exports;var t=v[e]={i:e,l:!1,exports:{}};return C[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}return n.m=C,n.c=v,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)})([(function(C,v){C.exports=N}),(function(C,v,n){"use strict";var e=n(0).FDLayoutConstants;function t(){}for(var r in e)t[r]=e[r];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,C.exports=t}),(function(C,v,n){"use strict";var e=n(0).FDLayoutEdge;function t(a,u,s){e.call(this,a,u,s)}t.prototype=Object.create(e.prototype);for(var r in e)t[r]=e[r];C.exports=t}),(function(C,v,n){"use strict";var e=n(0).LGraph;function t(a,u,s){e.call(this,a,u,s)}t.prototype=Object.create(e.prototype);for(var r in e)t[r]=e[r];C.exports=t}),(function(C,v,n){"use strict";var e=n(0).LGraphManager;function t(a){e.call(this,a)}t.prototype=Object.create(e.prototype);for(var r in e)t[r]=e[r];C.exports=t}),(function(C,v,n){"use strict";var e=n(0).FDLayoutNode,t=n(0).IMath;function r(u,s,p,i){e.call(this,u,s,p,i)}r.prototype=Object.create(e.prototype);for(var a in e)r[a]=e[a];r.prototype.move=function(){var u=this.graphManager.getLayout();this.displacementX=u.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=u.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>u.coolingFactor*u.maxNodeDisplacement&&(this.displacementX=u.coolingFactor*u.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>u.coolingFactor*u.maxNodeDisplacement&&(this.displacementY=u.coolingFactor*u.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),u.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},r.prototype.propogateDisplacementToChildren=function(u,s){for(var p=this.getChild().getNodes(),i,h=0;h<p.length;h++)i=p[h],i.getChild()==null?(i.moveBy(u,s),i.displacementX+=u,i.displacementY+=s):i.propogateDisplacementToChildren(u,s)},r.prototype.setPred1=function(u){this.pred1=u},r.prototype.getPred1=function(){return pred1},r.prototype.getPred2=function(){return pred2},r.prototype.setNext=function(u){this.next=u},r.prototype.getNext=function(){return next},r.prototype.setProcessed=function(u){this.processed=u},r.prototype.isProcessed=function(){return processed},C.exports=r}),(function(C,v,n){"use strict";var e=n(0).FDLayout,t=n(4),r=n(3),a=n(5),u=n(2),s=n(1),p=n(0).FDLayoutConstants,i=n(0).LayoutConstants,h=n(0).Point,l=n(0).PointD,d=n(0).Layout,y=n(0).Integer,T=n(0).IGeometry,c=n(0).LGraph,D=n(0).Transform;function E(){e.call(this),this.toBeTiled={}}E.prototype=Object.create(e.prototype);for(var O in e)E[O]=e[O];E.prototype.newGraphManager=function(){var o=new t(this);return this.graphManager=o,o},E.prototype.newGraph=function(o){return new r(null,this.graphManager,o)},E.prototype.newNode=function(o){return new a(this.graphManager,o)},E.prototype.newEdge=function(o){return new u(null,null,o)},E.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(s.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=s.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=p.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=p.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=p.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=p.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=p.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=p.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/p.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=p.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},E.prototype.layout=function(){var o=i.DEFAULT_CREATE_BENDS_AS_NEEDED;return o&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},E.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){if(s.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var g=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(I){return g.has(I)});this.graphManager.setAllNodesToApplyGravitation(f)}}else{var o=this.getFlatForest();if(o.length>0)this.positionNodesRadially(o);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var g=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(L){return g.has(L)});this.graphManager.setAllNodesToApplyGravitation(f),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},E.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%p.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var o=new Set(this.getAllNodes()),g=this.nodesWithGravity.filter(function(A){return o.has(A)});this.graphManager.setAllNodesToApplyGravitation(g),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=p.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=p.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var f=!this.isTreeGrowing&&!this.isGrowthFinished,L=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(f,L),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},E.prototype.getPositionsData=function(){for(var o=this.graphManager.getAllNodes(),g={},f=0;f<o.length;f++){var L=o[f].rect,A=o[f].id;g[A]={id:A,x:L.getCenterX(),y:L.getCenterY(),w:L.width,h:L.height}}return g},E.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var o=!1;if(p.ANIMATE==="during")this.emit("layoutstarted");else{for(;!o;)o=this.tick();this.graphManager.updateBounds()}},E.prototype.calculateNodesToApplyGravitationTo=function(){var o=[],g,f=this.graphManager.getGraphs(),L=f.length,A;for(A=0;A<L;A++)g=f[A],g.updateConnected(),g.isConnected||(o=o.concat(g.getNodes()));return o},E.prototype.createBendpoints=function(){var o=[];o=o.concat(this.graphManager.getAllEdges());var g=new Set,f;for(f=0;f<o.length;f++){var L=o[f];if(!g.has(L)){var A=L.getSource(),I=L.getTarget();if(A==I)L.getBendpoints().push(new l),L.getBendpoints().push(new l),this.createDummyNodesForBendpoints(L),g.add(L);else{var m=[];if(m=m.concat(A.getEdgeListToNode(I)),m=m.concat(I.getEdgeListToNode(A)),!g.has(m[0])){if(m.length>1){var R;for(R=0;R<m.length;R++){var w=m[R];w.getBendpoints().push(new l),this.createDummyNodesForBendpoints(w)}}m.forEach(function(F){g.add(F)})}}}if(g.size==o.length)break}},E.prototype.positionNodesRadially=function(o){for(var g=new h(0,0),f=Math.ceil(Math.sqrt(o.length)),L=0,A=0,I=0,m=new l(0,0),R=0;R<o.length;R++){R%f==0&&(I=0,A=L,R!=0&&(A+=s.DEFAULT_COMPONENT_SEPERATION),L=0);var w=o[R],F=d.findCenterOfTree(w);g.x=I,g.y=A,m=E.radialLayout(w,F,g),m.y>L&&(L=Math.floor(m.y)),I=Math.floor(m.x+s.DEFAULT_COMPONENT_SEPERATION)}this.transform(new l(i.WORLD_CENTER_X-m.x/2,i.WORLD_CENTER_Y-m.y/2))},E.radialLayout=function(o,g,f){var L=Math.max(this.maxDiagonalInTree(o),s.DEFAULT_RADIAL_SEPARATION);E.branchRadialLayout(g,null,0,359,0,L);var A=c.calculateBounds(o),I=new D;I.setDeviceOrgX(A.getMinX()),I.setDeviceOrgY(A.getMinY()),I.setWorldOrgX(f.x),I.setWorldOrgY(f.y);for(var m=0;m<o.length;m++){var R=o[m];R.transform(I)}var w=new l(A.getMaxX(),A.getMaxY());return I.inverseTransformPoint(w)},E.branchRadialLayout=function(o,g,f,L,A,I){var m=(L-f+1)/2;m<0&&(m+=180);var R=(m+f)%360,w=R*T.TWO_PI/360,F=Math.cos(w),Y=A*Math.cos(w),x=A*Math.sin(w);o.setCenter(Y,x);var M=[];M=M.concat(o.getEdges());var G=M.length;g!=null&&G--;for(var S=0,P=M.length,_,U=o.getEdgesBetween(g);U.length>1;){var X=U[0];U.splice(0,1);var B=M.indexOf(X);B>=0&&M.splice(B,1),P--,G--}g!=null?_=(M.indexOf(U[0])+1)%P:_=0;for(var b=Math.abs(L-f)/G,H=_;S!=G;H=++H%P){var et=M[H].getOtherEnd(o);if(et!=g){var rt=(f+S*b)%360,ct=(rt+b)%360;E.branchRadialLayout(et,o,rt,ct,A+I,I),S++}}},E.maxDiagonalInTree=function(o){for(var g=y.MIN_VALUE,f=0;f<o.length;f++){var L=o[f],A=L.getDiagonal();A>g&&(g=A)}return g},E.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},E.prototype.groupZeroDegreeMembers=function(){var o=this,g={};this.memberGroups={},this.idToDummyNode={};for(var f=[],L=this.graphManager.getAllNodes(),A=0;A<L.length;A++){var I=L[A],m=I.getParent();this.getNodeDegreeWithChildren(I)===0&&(m.id==null||!this.getToBeTiled(m))&&f.push(I)}for(var A=0;A<f.length;A++){var I=f[A],R=I.getParent().id;typeof g[R]>"u"&&(g[R]=[]),g[R]=g[R].concat(I)}Object.keys(g).forEach(function(w){if(g[w].length>1){var F="DummyCompound_"+w;o.memberGroups[F]=g[w];var Y=g[w][0].getParent(),x=new a(o.graphManager);x.id=F,x.paddingLeft=Y.paddingLeft||0,x.paddingRight=Y.paddingRight||0,x.paddingBottom=Y.paddingBottom||0,x.paddingTop=Y.paddingTop||0,o.idToDummyNode[F]=x;var M=o.getGraphManager().add(o.newGraph(),x),G=Y.getChild();G.add(x);for(var S=0;S<g[w].length;S++){var P=g[w][S];G.remove(P),M.add(P)}}})},E.prototype.clearCompounds=function(){var o={},g={};this.performDFSOnCompounds();for(var f=0;f<this.compoundOrder.length;f++)g[this.compoundOrder[f].id]=this.compoundOrder[f],o[this.compoundOrder[f].id]=[].concat(this.compoundOrder[f].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[f].getChild()),this.compoundOrder[f].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(o,g)},E.prototype.clearZeroDegreeMembers=function(){var o=this,g=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(f){var L=o.idToDummyNode[f];g[f]=o.tileNodes(o.memberGroups[f],L.paddingLeft+L.paddingRight),L.rect.width=g[f].width,L.rect.height=g[f].height})},E.prototype.repopulateCompounds=function(){for(var o=this.compoundOrder.length-1;o>=0;o--){var g=this.compoundOrder[o],f=g.id,L=g.paddingLeft,A=g.paddingTop;this.adjustLocations(this.tiledMemberPack[f],g.rect.x,g.rect.y,L,A)}},E.prototype.repopulateZeroDegreeMembers=function(){var o=this,g=this.tiledZeroDegreePack;Object.keys(g).forEach(function(f){var L=o.idToDummyNode[f],A=L.paddingLeft,I=L.paddingTop;o.adjustLocations(g[f],L.rect.x,L.rect.y,A,I)})},E.prototype.getToBeTiled=function(o){var g=o.id;if(this.toBeTiled[g]!=null)return this.toBeTiled[g];var f=o.getChild();if(f==null)return this.toBeTiled[g]=!1,!1;for(var L=f.getNodes(),A=0;A<L.length;A++){var I=L[A];if(this.getNodeDegree(I)>0)return this.toBeTiled[g]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[g]=!1,!1}return this.toBeTiled[g]=!0,!0},E.prototype.getNodeDegree=function(o){for(var g=o.id,f=o.getEdges(),L=0,A=0;A<f.length;A++){var I=f[A];I.getSource().id!==I.getTarget().id&&(L=L+1)}return L},E.prototype.getNodeDegreeWithChildren=function(o){var g=this.getNodeDegree(o);if(o.getChild()==null)return g;for(var f=o.getChild().getNodes(),L=0;L<f.length;L++){var A=f[L];g+=this.getNodeDegreeWithChildren(A)}return g},E.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},E.prototype.fillCompexOrderByDFS=function(o){for(var g=0;g<o.length;g++){var f=o[g];f.getChild()!=null&&this.fillCompexOrderByDFS(f.getChild().getNodes()),this.getToBeTiled(f)&&this.compoundOrder.push(f)}},E.prototype.adjustLocations=function(o,g,f,L,A){g+=L,f+=A;for(var I=g,m=0;m<o.rows.length;m++){var R=o.rows[m];g=I;for(var w=0,F=0;F<R.length;F++){var Y=R[F];Y.rect.x=g,Y.rect.y=f,g+=Y.rect.width+o.horizontalPadding,Y.rect.height>w&&(w=Y.rect.height)}f+=w+o.verticalPadding}},E.prototype.tileCompoundMembers=function(o,g){var f=this;this.tiledMemberPack=[],Object.keys(o).forEach(function(L){var A=g[L];f.tiledMemberPack[L]=f.tileNodes(o[L],A.paddingLeft+A.paddingRight),A.rect.width=f.tiledMemberPack[L].width,A.rect.height=f.tiledMemberPack[L].height})},E.prototype.tileNodes=function(o,g){var f=s.TILING_PADDING_VERTICAL,L=s.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:g,verticalPadding:f,horizontalPadding:L};o.sort(function(R,w){return R.rect.width*R.rect.height>w.rect.width*w.rect.height?-1:R.rect.width*R.rect.height<w.rect.width*w.rect.height?1:0});for(var I=0;I<o.length;I++){var m=o[I];A.rows.length==0?this.insertNodeToRow(A,m,0,g):this.canAddHorizontal(A,m.rect.width,m.rect.height)?this.insertNodeToRow(A,m,this.getShortestRowIndex(A),g):this.insertNodeToRow(A,m,A.rows.length,g),this.shiftToLastRow(A)}return A},E.prototype.insertNodeToRow=function(o,g,f,L){var A=L;if(f==o.rows.length){var I=[];o.rows.push(I),o.rowWidth.push(A),o.rowHeight.push(0)}var m=o.rowWidth[f]+g.rect.width;o.rows[f].length>0&&(m+=o.horizontalPadding),o.rowWidth[f]=m,o.width<m&&(o.width=m);var R=g.rect.height;f>0&&(R+=o.verticalPadding);var w=0;R>o.rowHeight[f]&&(w=o.rowHeight[f],o.rowHeight[f]=R,w=o.rowHeight[f]-w),o.height+=w,o.rows[f].push(g)},E.prototype.getShortestRowIndex=function(o){for(var g=-1,f=Number.MAX_VALUE,L=0;L<o.rows.length;L++)o.rowWidth[L]<f&&(g=L,f=o.rowWidth[L]);return g},E.prototype.getLongestRowIndex=function(o){for(var g=-1,f=Number.MIN_VALUE,L=0;L<o.rows.length;L++)o.rowWidth[L]>f&&(g=L,f=o.rowWidth[L]);return g},E.prototype.canAddHorizontal=function(o,g,f){var L=this.getShortestRowIndex(o);if(L<0)return!0;var A=o.rowWidth[L];if(A+o.horizontalPadding+g<=o.width)return!0;var I=0;o.rowHeight[L]<f&&L>0&&(I=f+o.verticalPadding-o.rowHeight[L]);var m;o.width-A>=g+o.horizontalPadding?m=(o.height+I)/(A+g+o.horizontalPadding):m=(o.height+I)/o.width,I=f+o.verticalPadding;var R;return o.width<g?R=(o.height+I)/g:R=(o.height+I)/o.width,R<1&&(R=1/R),m<1&&(m=1/m),m<R},E.prototype.shiftToLastRow=function(o){var g=this.getLongestRowIndex(o),f=o.rowWidth.length-1,L=o.rows[g],A=L[L.length-1],I=A.width+o.horizontalPadding;if(o.width-o.rowWidth[f]>I&&g!=f){L.splice(-1,1),o.rows[f].push(A),o.rowWidth[g]=o.rowWidth[g]-I,o.rowWidth[f]=o.rowWidth[f]+I,o.width=o.rowWidth[instance.getLongestRowIndex(o)];for(var m=Number.MIN_VALUE,R=0;R<L.length;R++)L[R].height>m&&(m=L[R].height);g>0&&(m+=o.verticalPadding);var w=o.rowHeight[g]+o.rowHeight[f];o.rowHeight[g]=m,o.rowHeight[f]<A.height+o.verticalPadding&&(o.rowHeight[f]=A.height+o.verticalPadding);var F=o.rowHeight[g]+o.rowHeight[f];o.height+=F-w,this.shiftToLastRow(o)}},E.prototype.tilingPreLayout=function(){s.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},E.prototype.tilingPostLayout=function(){s.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},E.prototype.reduceTrees=function(){for(var o=[],g=!0,f;g;){var L=this.graphManager.getAllNodes(),A=[];g=!1;for(var I=0;I<L.length;I++)f=L[I],f.getEdges().length==1&&!f.getEdges()[0].isInterGraph&&f.getChild()==null&&(A.push([f,f.getEdges()[0],f.getOwner()]),g=!0);if(g==!0){for(var m=[],R=0;R<A.length;R++)A[R][0].getEdges().length==1&&(m.push(A[R]),A[R][0].getOwner().remove(A[R][0]));o.push(m),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=o},E.prototype.growTree=function(o){for(var g=o.length,f=o[g-1],L,A=0;A<f.length;A++)L=f[A],this.findPlaceforPrunedNode(L),L[2].add(L[0]),L[2].add(L[1],L[1].source,L[1].target);o.splice(o.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},E.prototype.findPlaceforPrunedNode=function(o){var g,f,L=o[0];L==o[1].source?f=o[1].target:f=o[1].source;var A=f.startX,I=f.finishX,m=f.startY,R=f.finishY,w=0,F=0,Y=0,x=0,M=[w,Y,F,x];if(m>0)for(var G=A;G<=I;G++)M[0]+=this.grid[G][m-1].length+this.grid[G][m].length-1;if(I<this.grid.length-1)for(var G=m;G<=R;G++)M[1]+=this.grid[I+1][G].length+this.grid[I][G].length-1;if(R<this.grid[0].length-1)for(var G=A;G<=I;G++)M[2]+=this.grid[G][R+1].length+this.grid[G][R].length-1;if(A>0)for(var G=m;G<=R;G++)M[3]+=this.grid[A-1][G].length+this.grid[A][G].length-1;for(var S=y.MAX_VALUE,P,_,U=0;U<M.length;U++)M[U]<S?(S=M[U],P=1,_=U):M[U]==S&&P++;if(P==3&&S==0)M[0]==0&&M[1]==0&&M[2]==0?g=1:M[0]==0&&M[1]==0&&M[3]==0?g=0:M[0]==0&&M[2]==0&&M[3]==0?g=3:M[1]==0&&M[2]==0&&M[3]==0&&(g=2);else if(P==2&&S==0){var X=Math.floor(Math.random()*2);M[0]==0&&M[1]==0?X==0?g=0:g=1:M[0]==0&&M[2]==0?X==0?g=0:g=2:M[0]==0&&M[3]==0?X==0?g=0:g=3:M[1]==0&&M[2]==0?X==0?g=1:g=2:M[1]==0&&M[3]==0?X==0?g=1:g=3:X==0?g=2:g=3}else if(P==4&&S==0){var X=Math.floor(Math.random()*4);g=X}else g=_;g==0?L.setCenter(f.getCenterX(),f.getCenterY()-f.getHeight()/2-p.DEFAULT_EDGE_LENGTH-L.getHeight()/2):g==1?L.setCenter(f.getCenterX()+f.getWidth()/2+p.DEFAULT_EDGE_LENGTH+L.getWidth()/2,f.getCenterY()):g==2?L.setCenter(f.getCenterX(),f.getCenterY()+f.getHeight()/2+p.DEFAULT_EDGE_LENGTH+L.getHeight()/2):L.setCenter(f.getCenterX()-f.getWidth()/2-p.DEFAULT_EDGE_LENGTH-L.getWidth()/2,f.getCenterY())},C.exports=E}),(function(C,v,n){"use strict";var e={};e.layoutBase=n(0),e.CoSEConstants=n(1),e.CoSEEdge=n(2),e.CoSEGraph=n(3),e.CoSEGraphManager=n(4),e.CoSELayout=n(6),e.CoSENode=n(5),C.exports=e})])})});var nt=$((Q,tt)=>{(function(C,v){typeof Q=="object"&&typeof tt=="object"?tt.exports=v(J()):typeof define=="function"&&define.amd?define(["cose-base"],v):typeof Q=="object"?Q.cytoscapeCoseBilkent=v(J()):C.cytoscapeCoseBilkent=v(C.coseBase)})(Q,function(N){return(function(C){var v={};function n(e){if(v[e])return v[e].exports;var t=v[e]={i:e,l:!1,exports:{}};return C[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}return n.m=C,n.c=v,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)})([(function(C,v){C.exports=N}),(function(C,v,n){"use strict";var e=n(0).layoutBase.LayoutConstants,t=n(0).layoutBase.FDLayoutConstants,r=n(0).CoSEConstants,a=n(0).CoSELayout,u=n(0).CoSENode,s=n(0).layoutBase.PointD,p=n(0).layoutBase.DimensionD,i={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,c){var D={};for(var E in T)D[E]=T[E];for(var E in c)D[E]=c[E];return D}function l(T){this.options=h(i,T),d(this.options)}var d=function(c){c.nodeRepulsion!=null&&(r.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=c.nodeRepulsion),c.idealEdgeLength!=null&&(r.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=c.idealEdgeLength),c.edgeElasticity!=null&&(r.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=c.edgeElasticity),c.nestingFactor!=null&&(r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.nestingFactor),c.gravity!=null&&(r.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=c.gravity),c.numIter!=null&&(r.MAX_ITERATIONS=t.MAX_ITERATIONS=c.numIter),c.gravityRange!=null&&(r.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=c.gravityRange),c.gravityCompound!=null&&(r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.gravityCompound),c.gravityRangeCompound!=null&&(r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.gravityRangeCompound),c.initialEnergyOnIncremental!=null&&(r.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.initialEnergyOnIncremental),c.quality=="draft"?e.QUALITY=0:c.quality=="proof"?e.QUALITY=2:e.QUALITY=1,r.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=c.nodeDimensionsIncludeLabels,r.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=!c.randomize,r.ANIMATE=t.ANIMATE=e.ANIMATE=c.animate,r.TILE=c.tile,r.TILING_PADDING_VERTICAL=typeof c.tilingPaddingVertical=="function"?c.tilingPaddingVertical.call():c.tilingPaddingVertical,r.TILING_PADDING_HORIZONTAL=typeof c.tilingPaddingHorizontal=="function"?c.tilingPaddingHorizontal.call():c.tilingPaddingHorizontal};l.prototype.run=function(){var T,c,D=this.options,E=this.idToLNode={},O=this.layout=new a,o=this;o.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var g=O.newGraphManager();this.gm=g;var f=this.options.eles.nodes(),L=this.options.eles.edges();this.root=g.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(f),O);for(var A=0;A<L.length;A++){var I=L[A],m=this.idToLNode[I.data("source")],R=this.idToLNode[I.data("target")];if(m!==R&&m.getEdgesBetween(R).length==0){var w=g.add(O.newEdge(),m,R);w.id=I.id()}}var F=function(M,G){typeof M=="number"&&(M=G);var S=M.data("id"),P=o.idToLNode[S];return{x:P.getRect().getCenterX(),y:P.getRect().getCenterY()}},Y=function x(){for(var M=function(){D.fit&&D.cy.fit(D.eles,D.padding),T||(T=!0,o.cy.one("layoutready",D.ready),o.cy.trigger({type:"layoutready",layout:o}))},G=o.options.refresh,S,P=0;P<G&&!S;P++)S=o.stopped||o.layout.tick();if(S){O.checkLayoutSuccess()&&!O.isSubLayout&&O.doPostLayout(),O.tilingPostLayout&&O.tilingPostLayout(),O.isLayoutFinished=!0,o.options.eles.nodes().positions(F),M(),o.cy.one("layoutstop",o.options.stop),o.cy.trigger({type:"layoutstop",layout:o}),c&&cancelAnimationFrame(c),T=!1;return}var _=o.layout.getPositionsData();D.eles.nodes().positions(function(U,X){if(typeof U=="number"&&(U=X),!U.isParent()){for(var B=U.id(),b=_[B],H=U;b==null&&(b=_[H.data("parent")]||_["DummyCompound_"+H.data("parent")],_[B]=b,H=H.parent()[0],H!=null););return b!=null?{x:b.x,y:b.y}:{x:U.position("x"),y:U.position("y")}}}),M(),c=requestAnimationFrame(x)};return O.addListener("layoutstarted",function(){o.options.animate==="during"&&(c=requestAnimationFrame(Y))}),O.runLayout(),this.options.animate!=="during"&&(o.options.eles.nodes().not(":parent").layoutPositions(o,o.options,F),T=!1),this},l.prototype.getTopMostNodes=function(T){for(var c={},D=0;D<T.length;D++)c[T[D].id()]=!0;var E=T.filter(function(O,o){typeof O=="number"&&(O=o);for(var g=O.parent()[0];g!=null;){if(c[g.id()])return!1;g=g.parent()[0]}return!0});return E},l.prototype.processChildrenList=function(T,c,D){for(var E=c.length,O=0;O<E;O++){var o=c[O],g=o.children(),f,L=o.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(o.outerWidth()!=null&&o.outerHeight()!=null?f=T.add(new u(D.graphManager,new s(o.position("x")-L.w/2,o.position("y")-L.h/2),new p(parseFloat(L.w),parseFloat(L.h)))):f=T.add(new u(this.graphManager)),f.id=o.data("id"),f.paddingLeft=parseInt(o.css("padding")),f.paddingTop=parseInt(o.css("padding")),f.paddingRight=parseInt(o.css("padding")),f.paddingBottom=parseInt(o.css("padding")),this.options.nodeDimensionsIncludeLabels&&o.isParent()){var A=o.boundingBox({includeLabels:!0,includeNodes:!1}).w,I=o.boundingBox({includeLabels:!0,includeNodes:!1}).h,m=o.css("text-halign");f.labelWidth=A,f.labelHeight=I,f.labelPos=m}if(this.idToLNode[o.data("id")]=f,isNaN(f.rect.x)&&(f.rect.x=0),isNaN(f.rect.y)&&(f.rect.y=0),g!=null&&g.length>0){var R;R=D.getGraphManager().add(D.newGraph(),f),this.processChildrenList(R,g,D)}}},l.prototype.stop=function(){return this.stopped=!0,this};var y=function(c){c("layout","cose-bilkent",l)};typeof cytoscape<"u"&&y(cytoscape),C.exports=y})])})});var st=pt(nt(),1);j.use(st.default);function ot(N,C){N.forEach(v=>{let n={id:v.id,labelText:v.label,height:v.height,width:v.width,padding:v.padding??0};Object.keys(v).forEach(e=>{["id","label","height","width","padding","x","y"].includes(e)||(n[e]=v[e])}),C.add({group:"nodes",data:n,position:{x:v.x??0,y:v.y??0}})})}W(ot,"addNodes");function at(N,C){N.forEach(v=>{let n={id:v.id,source:v.start,target:v.end};Object.keys(v).forEach(e=>{["id","start","end"].includes(e)||(n[e]=v[e])}),C.add({group:"edges",data:n})})}W(at,"addEdges");function ht(N){return new Promise(C=>{let v=it("body").append("div").attr("id","cy").attr("style","display:none"),n=j({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});v.remove(),ot(N.nodes,n),at(N.edges,n),n.nodes().forEach(function(t){t.layoutDimensions=()=>{let r=t.data();return{w:r.width,h:r.height}}});let e={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};n.layout(e).run(),n.ready(t=>{V.info("Cytoscape ready",t),C(n)})})}W(ht,"createCytoscapeInstance");function lt(N){return N.nodes().map(C=>{let v=C.data(),n=C.position(),e={id:v.id,x:n.x,y:n.y};return Object.keys(v).forEach(t=>{t!=="id"&&(e[t]=v[t])}),e})}W(lt,"extractPositionedNodes");function ut(N){return N.edges().map(C=>{let v=C.data(),n=C._private.rscratch,e={id:v.id,source:v.source,target:v.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(v).forEach(t=>{["id","source","target"].includes(t)||(e[t]=v[t])}),e})}W(ut,"extractPositionedEdges");async function gt(N,C){V.debug("Starting cose-bilkent layout algorithm");try{ft(N);let v=await ht(N),n=lt(v),e=ut(v);return V.debug(`Layout completed: ${n.length} nodes, ${e.length} edges`),{nodes:n,edges:e}}catch(v){throw V.error("Error in cose-bilkent layout algorithm:",v),v}}W(gt,"executeCoseBilkentLayout");function ft(N){if(!N)throw new Error("Layout data is required");if(!N.config)throw new Error("Configuration is required in layout data");if(!N.rootNode)throw new Error("Root node is required");if(!N.nodes||!Array.isArray(N.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(N.edges))throw new Error("Edges array is required in layout data");return!0}W(ft,"validateLayoutData");var dt=W(async(N,C,{insertCluster:v,insertEdge:n,insertEdgeLabel:e,insertMarkers:t,insertNode:r,log:a,positionEdgeLabel:u},{algorithm:s})=>{let p={},i={},h=C.select("g");t(h,N.markers,N.type,N.diagramId);let l=h.insert("g").attr("class","subgraphs"),d=h.insert("g").attr("class","edgePaths"),y=h.insert("g").attr("class","edgeLabels"),T=h.insert("g").attr("class","nodes");a.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(N.nodes.map(async E=>{if(E.isGroup){let O={...E};i[E.id]=O,p[E.id]=O,await v(l,E)}else{let O={...E};p[E.id]=O;let o=await r(T,E,{config:N.config,dir:N.direction||"TB"}),g=o.node().getBBox();O.width=g.width,O.height=g.height,O.domId=o,a.debug(`Node ${E.id} dimensions: ${g.width}x${g.height}`)}})),a.debug("Running cose-bilkent layout algorithm");let c={...N,nodes:N.nodes.map(E=>{let O=p[E.id];return{...E,width:O.width,height:O.height}})},D=await gt(c,N.config);a.debug("Positioning nodes based on layout results"),D.nodes.forEach(E=>{let O=p[E.id];O?.domId&&(O.domId.attr("transform",`translate(${E.x}, ${E.y})`),O.x=E.x,O.y=E.y,a.debug(`Positioned node ${O.id} at center (${E.x}, ${E.y})`))}),D.edges.forEach(E=>{let O=N.edges.find(o=>o.id===E.id);O&&(O.points=[{x:E.startX,y:E.startY},{x:E.midX,y:E.midY},{x:E.endX,y:E.endY}])}),a.debug("Inserting and positioning edges"),await Promise.all(N.edges.map(async E=>{let O=await e(y,E),o=p[E.start??""],g=p[E.end??""];if(o&&g){let f=D.edges.find(L=>L.id===E.id);if(f){a.debug("APA01 positionedEdge",f);let L={...E},A=n(d,L,i,N.type,o,g,N.diagramId);u(L,A)}else{let L={...E,points:[{x:o.x||0,y:o.y||0},{x:g.x||0,y:g.y||0}]},A=n(d,L,i,N.type,o,g,N.diagramId);u(L,A)}}})),a.debug("Cose-bilkent rendering completed")},"render"),Tt=dt;export{Tt as render};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,b as r}from"./chunk-AVJJGJEF.js";import"./chunk-WBPRABWA.js";import"./chunk-PHKIAKHS.js";export{e as CynefinModule,r as createCynefinServices};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import{a as yt}from"./chunk-OB665XPY.js";import{a as pt}from"./chunk-LZTAJOGZ.js";import{a as ut}from"./chunk-UAQETDSH.js";import"./chunk-ABLFMIK7.js";import"./chunk-7W3KTJUJ.js";import"./chunk-AVJJGJEF.js";import"./chunk-AVITUR4K.js";import"./chunk-UORYZEAD.js";import"./chunk-2TCGAX73.js";import"./chunk-XQHNSJKC.js";import"./chunk-EPS7YYLR.js";import"./chunk-INV6BDXO.js";import"./chunk-56PLA4MI.js";import"./chunk-4UKVVSLZ.js";import"./chunk-CMFTFM5L.js";import"./chunk-7FXP6RHI.js";import"./chunk-FDHLSHAZ.js";import"./chunk-GDF64WIG.js";import"./chunk-WBPRABWA.js";import{p as X}from"./chunk-GTJDAHEV.js";import"./chunk-XLJVPE6C.js";import{C as O,P as rt,U as it,V as st,W as ct,X as lt,Y as dt,Z as ft,_ as mt,p as Q,r as at}from"./chunk-M3XBBO6R.js";import{b as E}from"./chunk-W4ELJFHG.js";import{a as r}from"./chunk-UAGOPMXU.js";import"./chunk-PHKIAKHS.js";var xt=r(()=>({domains:new Map,transitions:[]}),"createDefaultData"),G=xt(),St=r(()=>G.domains,"getDomains"),Mt=r(()=>G.transitions,"getTransitions"),zt=r(t=>{if(t)for(let e of t){let n=e.domain,o=(e.items??[]).map(c=>({label:c.label}));G.domains.set(n,{name:n,items:o})}},"setDomains"),Lt=r(t=>{t&&(G.transitions=t.filter(e=>e.from===e.to?(E.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=r(()=>X({...at.cynefin,...O().cynefin}),"getConfig"),Pt=r(()=>{it(),G=xt()},"clear"),j={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:st,getAccTitle:ct,setDiagramTitle:ft,getDiagramTitle:mt,getAccDescription:dt,setAccDescription:lt},It=r(t=>{yt(t,j),j.setDomains(t.domains),j.setTransitions(t.transitions)},"populate"),Wt={parse:r(async t=>{let e=await ut("cynefin",t);E.debug(e),It(e)},"parse")};function H(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}r(H,"seededRandom");function gt(t){let e=0;for(let n=0;n<t.length;n++){let o=t.charCodeAt(n);e=(e<<5)-e+o,e|=0}return e}r(gt,"hashString");function $t(t,e){return typeof t=="number"&&Number.isFinite(t)&&t!==0?t:gt(e)}r($t,"resolveSeed");function bt(t,e,n,o){let c=t/2,m=o??t*.015,v=7,W=e/v,d=[];for(let a=0;a<=v;a++){let p=H(n+a*17)*m*2-m;d.push({x:c+p,y:a*W})}let D=`M${d[0].x},${d[0].y}`;for(let a=0;a<d.length-1;a++){let p=d[a],s=d[a+1],f=(p.y+s.y)/2,b=a%2===0?1:-1,h=m*1.5*b*H(n+a*31+7),R=p.x+h,F=f,V=s.x-h;D+=` C${R},${F} ${V},${f} ${s.x},${s.y}`}return D}r(bt,"generateFoldPath");function wt(t,e,n,o){let c=e/2,m=o??e*.015,v=7,W=t/v,d=[];for(let a=0;a<=v;a++){let p=H(n+a*23)*m*2-m;d.push({x:a*W,y:c+p})}let D=`M${d[0].x},${d[0].y}`;for(let a=0;a<d.length-1;a++){let p=d[a],s=d[a+1],f=(p.x+s.x)/2,b=a%2===0?1:-1,h=m*1.5*b*H(n+a*37+11),R=f,F=p.y+h,V=f,z=s.y-h;D+=` C${R},${F} ${V},${z} ${s.x},${s.y}`}return D}r(wt,"generateHorizontalBoundary");function Ct(t,e){let n=t/2,o=e*.5,c=e,m=t*.03;return[`M${n},${o}`,`C${n+m},${o+(c-o)*.2}`,`${n-m*1.5},${o+(c-o)*.55}`,`${n+m*.5},${o+(c-o)*.75}`,`C${n-m},${o+(c-o)*.85}`,`${n+m*.3},${o+(c-o)*.95}`,`${n},${c}`].join(" ")}r(Ct,"generateCliffPath");function vt(t,e,n,o){return[`M${t-n},${e}`,`A${n},${o} 0 1,1 ${t+n},${e}`,`A${n},${o} 0 1,1 ${t-n},${e}`,"Z"].join(" ")}r(vt,"generateConfusionPath");var ht={complex:{model:"Probe \u2192 Sense \u2192 Respond",practice:"Emergent Practices"},complicated:{model:"Sense \u2192 Analyse \u2192 Respond",practice:"Good Practices"},clear:{model:"Sense \u2192 Categorise \u2192 Respond",practice:"Best Practices"},chaotic:{model:"Act \u2192 Sense \u2192 Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},Rt=r((t,e)=>{let n=t/2,o=e/2;return{complex:{cx:n/2,cy:o/2,x:0,y:0,w:n,h:o},complicated:{cx:n+n/2,cy:o/2,x:n,y:0,w:n,h:o},chaotic:{cx:n/2,cy:o+o/2,x:0,y:o,w:n,h:o},clear:{cx:n+n/2,cy:o+o/2,x:n,y:o,w:n,h:o},confusion:{cx:n,cy:o,x:n*.7,y:o*.7,w:n*.6,h:o*.6}}},"getDomainLayouts"),Ft=r(()=>{let t=Q(),e=O();return X(t,e.themeVariables).cynefin},"getCynefinDomainColors"),Z=3,Vt=r((t,e,n,o)=>{let c=o.db,m=c.getDomains(),v=c.getTransitions(),W=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),a=c.getConfig(),p=Ft();E.debug("Rendering Cynefin diagram");let s=a.width,f=a.height,b=a.padding,h=a.showDomainDescriptions,R=a.boundaryAmplitude,F=s+b*2,V=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=pt(e);rt(k,V,F,a.useMaxWidth??!0),k.attr("viewBox",`0 0 ${F} ${V}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);let T=k.append("g").attr("transform",`translate(${b}, ${b})`),_=Rt(s,f),J=$t(a.seed,e),Dt=T.append("g").attr("class","cynefin-backgrounds"),q=["complex","complicated","chaotic","clear"];for(let l of q){let i=_[l];Dt.append("rect").attr("class","cynefinDomain").attr("x",i.x).attr("y",i.y).attr("width",i.w).attr("height",i.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}let U=T.append("g").attr("class","cynefin-boundaries");U.append("path").attr("class","cynefinBoundary").attr("d",bt(s,f,J,R)).attr("fill","none"),U.append("path").attr("class","cynefinBoundary").attr("d",wt(s,f,J+100,R)).attr("fill","none"),U.append("path").attr("class","cynefinCliff").attr("d",Ct(s,f)).attr("fill","none");let kt=s*.15,Tt=f*.15;T.append("path").attr("class","cynefinConfusion").attr("d",vt(s/2,f/2,kt,Tt)).attr("fill",z.confusion).attr("fill-opacity",.5);let K=T.append("g").attr("class","cynefin-labels");for(let l of q){let i=_[l];K.append("text").attr("class","cynefinDomainLabel").attr("x",i.cx).attr("y",h?i.cy-30:i.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(K.append("text").attr("class","cynefinDomainLabel").attr("x",s/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){let l=T.append("g").attr("class","cynefin-subtitles");for(let i of q){let u=_[i],y=ht[i];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",s/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(ht.confusion.practice)}let tt=T.append("g").attr("class","cynefin-items"),A=26,et=10,At=["complex","complicated","chaotic","clear","confusion"];for(let l of At){let i=m.get(l);if(!i||i.items.length===0)continue;let u=_[l],y=l==="confusion",L=i.items,N=0;y&&i.items.length>Z&&(N=i.items.length-Z,L=i.items.slice(0,Z));let B;if(y){let g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{let w=B+S*(A+4),M=tt.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label),$=g.label.length*7,x=P.node();if(x&&typeof x.getBBox=="function"){let Y=x.getBBox();Y.width>0&&($=Y.width)}let C=$+et*2,I=u.cx-C/2;M.attr("transform",`translate(${I}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",A/2)}),N>0){let g=B+L.length*(A+4),S=`+${N} more`,w=tt.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S),P=S.length*7,$=M.node();if($&&typeof $.getBBox=="function"){let I=$.getBBox();I.width>0&&(P=I.width)}let x=P+et*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",A/2)}}if(v.length>0){let l=k.select("defs").empty()?k.append("defs"):k.select("defs"),i=`cynefin-arrow-${e}`;l.append("marker").attr("id",i).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");let u=T.append("g").attr("class","cynefin-arrows");v.forEach(y=>{let L=_[y.from],N=_[y.to];if(!L||!N)return;if(y.from===y.to){E.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}let B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),I=C*.15,Y=-x/C,Bt=$/C,nt=M+Y*I,ot=P+Bt*I;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${nt},${ot} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${i})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",nt).attr("y",ot-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}W&&T.append("text").attr("class","cynefinTitle").attr("x",s/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(W)},"draw"),_t={draw:Vt},Et=r(()=>{let t=Q(),e=O();return X(t,e.themeVariables).cynefin},"getCynefinTheme"),Ht=r(()=>{let t=Et();return`
|
|
2
|
+
.cynefinDomain {
|
|
3
|
+
stroke: none;
|
|
4
|
+
}
|
|
5
|
+
.cynefinDomainLabel {
|
|
6
|
+
font-size: ${t.domainFontSize}px;
|
|
7
|
+
font-weight: bold;
|
|
8
|
+
fill: ${t.labelColor};
|
|
9
|
+
}
|
|
10
|
+
.cynefinSubtitle {
|
|
11
|
+
font-size: ${t.itemFontSize-1}px;
|
|
12
|
+
fill: ${t.textColor};
|
|
13
|
+
font-style: italic;
|
|
14
|
+
}
|
|
15
|
+
.cynefinItem {
|
|
16
|
+
fill-opacity: 0.95;
|
|
17
|
+
stroke: ${t.boundaryColor};
|
|
18
|
+
stroke-width: 1;
|
|
19
|
+
}
|
|
20
|
+
.cynefinItemText {
|
|
21
|
+
font-size: ${t.itemFontSize}px;
|
|
22
|
+
fill: ${t.textColor};
|
|
23
|
+
}
|
|
24
|
+
.cynefinItemOverflow {
|
|
25
|
+
fill-opacity: 0.6;
|
|
26
|
+
stroke: ${t.boundaryColor};
|
|
27
|
+
stroke-width: 1;
|
|
28
|
+
stroke-dasharray: 3 2;
|
|
29
|
+
}
|
|
30
|
+
.cynefinBoundary {
|
|
31
|
+
stroke: ${t.boundaryColor};
|
|
32
|
+
stroke-width: ${t.boundaryWidth};
|
|
33
|
+
stroke-dasharray: 6 3;
|
|
34
|
+
}
|
|
35
|
+
.cynefinCliff {
|
|
36
|
+
stroke: ${t.cliffColor};
|
|
37
|
+
stroke-width: ${t.cliffWidth};
|
|
38
|
+
}
|
|
39
|
+
.cynefinConfusion {
|
|
40
|
+
stroke: ${t.boundaryColor};
|
|
41
|
+
stroke-width: 1.5;
|
|
42
|
+
stroke-dasharray: 4 2;
|
|
43
|
+
}
|
|
44
|
+
.cynefinArrowLine {
|
|
45
|
+
stroke: ${t.arrowColor};
|
|
46
|
+
stroke-width: ${t.arrowWidth};
|
|
47
|
+
fill: none;
|
|
48
|
+
}
|
|
49
|
+
.cynefinArrowHead {
|
|
50
|
+
fill: ${t.arrowColor};
|
|
51
|
+
stroke: none;
|
|
52
|
+
}
|
|
53
|
+
.cynefinArrowLabel {
|
|
54
|
+
font-size: ${t.itemFontSize-1}px;
|
|
55
|
+
fill: ${t.textColor};
|
|
56
|
+
}
|
|
57
|
+
.cynefinTitle {
|
|
58
|
+
font-size: ${t.domainFontSize+2}px;
|
|
59
|
+
font-weight: bold;
|
|
60
|
+
fill: ${t.labelColor};
|
|
61
|
+
}
|
|
62
|
+
`},"styles"),Gt=Ht,Zt={parser:Wt,db:j,renderer:_t,styles:Gt};export{Zt as diagram};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{a as Ge,b as Ae,c as C,d as ie,e as Fe,f as Q,g as Ve}from"./chunk-H57PPMTP.js";import{A as U,B as ae,C as x,a as De,b as F,c as O,d as Te,e as oe,f as Me,g as X,h as u,i as S,j as W,k as y,l as je,m as Be,n as K,o as D,p as k,q as V,r as L,s as q,t as T,u as Y,v as z,w as N,x as G,y as Xe,z as P}from"./chunk-E2AIA637.js";import{b as Pe}from"./chunk-IR3NHMOO.js";import{g as te,i as Ce,j as Re}from"./chunk-OFD4YTIR.js";import{a as Oe,c as Se,e as ne}from"./chunk-ZRBDUQXP.js";import{b as Ie}from"./chunk-NBZPV65B.js";import"./chunk-NCTJNXDF.js";import"./chunk-ZGUCZDEK.js";import"./chunk-ENUKY65A.js";import"./chunk-HHYS5L3R.js";import"./chunk-KLF2A562.js";import"./chunk-GTJDAHEV.js";import"./chunk-XLJVPE6C.js";import{$ as Ne}from"./chunk-M3XBBO6R.js";import{b as w}from"./chunk-W4ELJFHG.js";import{a as E}from"./chunk-UAGOPMXU.js";import"./chunk-PHKIAKHS.js";var Z=class{constructor(){var r={};r._next=r._prev=r,this._sentinel=r}dequeue(){var r=this._sentinel,n=r._prev;if(n!==r)return Ye(n),n}enqueue(r){var n=this._sentinel;r._prev&&r._next&&Ye(r),r._next=n._next,n._next._prev=r,n._next=r,r._prev=n}toString(){for(var r=[],n=this._sentinel,t=n._prev;t!==n;)r.push(JSON.stringify(t,Vr)),t=t._prev;return"["+r.join(", ")+"]"}};function Ye(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Vr(e,r){if(e!=="_next"&&e!=="_prev")return r}var Yr=F(1);function ze(e,r){if(e.nodeCount()<=1)return[];var n=Ur(e,r||Yr),t=zr(n.graph,n.buckets,n.zeroIdx);return O(y(t,function(o){return e.outEdges(o.v,o.w)}))}function zr(e,r,n){for(var t=[],o=r[r.length-1],a=r[0],i;e.nodeCount();){for(;i=a.dequeue();)se(e,r,n,i);for(;i=o.dequeue();)se(e,r,n,i);if(e.nodeCount()){for(var s=r.length-2;s>0;--s)if(i=r[s].dequeue(),i){t=t.concat(se(e,r,n,i,!0));break}}}return t}function se(e,r,n,t,o){var a=o?[]:void 0;return u(e.inEdges(t.v),function(i){var s=e.edge(i),d=e.node(i.v);o&&a.push({v:i.v,w:i.w}),d.out-=s,de(r,n,d)}),u(e.outEdges(t.v),function(i){var s=e.edge(i),d=i.w,f=e.node(d);f.in-=s,de(r,n,f)}),e.removeNode(t.v),a}function Ur(e,r){var n=new x,t=0,o=0;u(e.nodes(),function(s){n.setNode(s,{v:s,in:0,out:0})}),u(e.edges(),function(s){var d=n.edge(s.v,s.w)||0,f=r(s),c=d+f;n.setEdge(s.v,s.w,c),o=Math.max(o,n.node(s.v).out+=f),t=Math.max(t,n.node(s.w).in+=f)});var a=N(o+t+3).map(function(){return new Z}),i=t+1;return u(n.nodes(),function(s){de(a,i,n.node(s))}),{graph:n,buckets:a,zeroIdx:i}}function de(e,r,n){n.out?n.in?e[n.out-n.in+r].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function Ue(e){var r=e.graph().acyclicer==="greedy"?ze(e,n(e)):Wr(e);u(r,function(t){var o=e.edge(t);e.removeEdge(t),o.forwardName=t.name,o.reversed=!0,e.setEdge(t.w,t.v,o,U("rev"))});function n(t){return function(o){return t.edge(o).weight}}}function Wr(e){var r=[],n={},t={};function o(a){Object.prototype.hasOwnProperty.call(t,a)||(t[a]=!0,n[a]=!0,u(e.outEdges(a),function(i){Object.prototype.hasOwnProperty.call(n,i.w)?r.push(i):o(i.w)}),delete n[a])}return u(e.nodes(),o),r}function We(e){u(e.edges(),function(r){var n=e.edge(r);if(n.reversed){e.removeEdge(r);var t=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(r.w,r.v,n,t)}})}function I(e,r,n,t){var o;do o=U(t);while(e.hasNode(o));return n.dummy=r,e.setNode(o,n),o}function He(e){var r=new x().setGraph(e.graph());return u(e.nodes(),function(n){r.setNode(n,e.node(n))}),u(e.edges(),function(n){var t=r.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);r.setEdge(n.v,n.w,{weight:t.weight+o.weight,minlen:Math.max(t.minlen,o.minlen)})}),r}function $(e){var r=new x({multigraph:e.isMultigraph()}).setGraph(e.graph());return u(e.nodes(),function(n){e.children(n).length||r.setNode(n,e.node(n))}),u(e.edges(),function(n){r.setEdge(n,e.edge(n))}),r}function fe(e,r){var n=e.x,t=e.y,o=r.x-n,a=r.y-t,i=e.width/2,s=e.height/2;if(!o&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var d,f;return Math.abs(a)*i>Math.abs(o)*s?(a<0&&(s=-s),d=s*o/a,f=s):(o<0&&(i=-i),d=i,f=i*a/o),{x:n+d,y:t+f}}function M(e){var r=y(N(ue(e)+1),function(){return[]});return u(e.nodes(),function(n){var t=e.node(n),o=t.rank;k(o)||(r[o][t.order]=n)}),r}function Je(e){var r=T(y(e.nodes(),function(n){return e.node(n).rank}));u(e.nodes(),function(n){var t=e.node(n);K(t,"rank")&&(t.rank-=r)})}function Ke(e){var r=T(y(e.nodes(),function(a){return e.node(a).rank})),n=[];u(e.nodes(),function(a){var i=e.node(a).rank-r;n[i]||(n[i]=[]),n[i].push(a)});var t=0,o=e.graph().nodeRankFactor;u(n,function(a,i){k(a)&&i%o!==0?--t:t&&u(a,function(s){e.node(s).rank+=t})})}function ce(e,r,n,t){var o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=t),I(e,"border",o,r)}function ue(e){return L(y(e.nodes(),function(r){var n=e.node(r).rank;if(!k(n))return n}))}function Qe(e,r){var n={lhs:[],rhs:[]};return u(e,function(t){r(t)?n.lhs.push(t):n.rhs.push(t)}),n}function Ze(e,r){var n=oe();try{return r()}finally{console.log(e+" time: "+(oe()-n)+"ms")}}function $e(e,r){return r()}function rr(e){function r(n){var t=e.children(n),o=e.node(n);if(t.length&&u(t,r),Object.prototype.hasOwnProperty.call(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var a=o.minRank,i=o.maxRank+1;a<i;++a)er(e,"borderLeft","_bl",n,o,a),er(e,"borderRight","_br",n,o,a)}}u(e.children(),r)}function er(e,r,n,t,o,a){var i={width:0,height:0,rank:a,borderType:r},s=o[r][a-1],d=I(e,"border",i,n);o[r][a]=d,e.setParent(d,t),s&&e.setEdge(s,d,{weight:1})}function tr(e){var r=e.graph().rankdir.toLowerCase();(r==="lr"||r==="rl")&&ar(e)}function or(e){var r=e.graph().rankdir.toLowerCase();(r==="bt"||r==="rl")&&qr(e),(r==="lr"||r==="rl")&&(Hr(e),ar(e))}function ar(e){u(e.nodes(),function(r){nr(e.node(r))}),u(e.edges(),function(r){nr(e.edge(r))})}function nr(e){var r=e.width;e.width=e.height,e.height=r}function qr(e){u(e.nodes(),function(r){le(e.node(r))}),u(e.edges(),function(r){var n=e.edge(r);u(n.points,le),Object.prototype.hasOwnProperty.call(n,"y")&&le(n)})}function le(e){e.y=-e.y}function Hr(e){u(e.nodes(),function(r){he(e.node(r))}),u(e.edges(),function(r){var n=e.edge(r);u(n.points,he),Object.prototype.hasOwnProperty.call(n,"x")&&he(n)})}function he(e){var r=e.x;e.x=e.y,e.y=r}function ir(e){e.graph().dummyChains=[],u(e.edges(),function(r){Kr(e,r)})}function Kr(e,r){var n=r.v,t=e.node(n).rank,o=r.w,a=e.node(o).rank,i=r.name,s=e.edge(r),d=s.labelRank;if(a!==t+1){e.removeEdge(r);var f=void 0,c,l;for(l=0,++t;t<a;++l,++t)s.points=[],f={width:0,height:0,edgeLabel:s,edgeObj:r,rank:t},c=I(e,"edge",f,"_d"),t===d&&(f.width=s.width,f.height=s.height,f.dummy="edge-label",f.labelpos=s.labelpos),e.setEdge(n,c,{weight:s.weight},i),l===0&&e.graph().dummyChains.push(c),n=c;e.setEdge(n,o,{weight:s.weight},i)}}function sr(e){u(e.graph().dummyChains,function(r){var n=e.node(r),t=n.edgeLabel,o;for(e.setEdge(n.edgeObj,t);n.dummy;)o=e.successors(r)[0],e.removeNode(r),t.points.push({x:n.x,y:n.y}),n.dummy==="edge-label"&&(t.x=n.x,t.y=n.y,t.width=n.width,t.height=n.height),r=o,n=e.node(r)})}function H(e){var r={};function n(t){var o=e.node(t);if(Object.prototype.hasOwnProperty.call(r,t))return o.rank;r[t]=!0;var a=T(y(e.outEdges(t),function(i){return n(i.w)-e.edge(i).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),o.rank=a}u(e.sources(),n)}function A(e,r){return e.node(r.w).rank-e.node(r.v).rank-e.edge(r).minlen}function ee(e){var r=new x({directed:!1}),n=e.nodes()[0],t=e.nodeCount();r.setNode(n,{});for(var o,a;Qr(r,e)<t;)o=Zr(r,e),a=r.hasNode(o.v)?A(e,o):-A(e,o),$r(r,e,a);return r}function Qr(e,r){function n(t){u(r.nodeEdges(t),function(o){var a=o.v,i=t===a?o.w:a;!e.hasNode(i)&&!A(r,o)&&(e.setNode(i,{}),e.setEdge(t,i,{}),n(i))})}return u(e.nodes(),n),e.nodeCount()}function Zr(e,r){return Y(r.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return A(r,n)})}function $r(e,r,n){u(e.nodes(),function(t){r.node(t).rank+=n})}var Dt=F(1);var At=F(1);pe.CycleException=J;function pe(e){var r={},n={},t=[];function o(a){if(Object.prototype.hasOwnProperty.call(n,a))throw new J;Object.prototype.hasOwnProperty.call(r,a)||(n[a]=!0,r[a]=!0,u(e.predecessors(a),o),delete n[a],t.push(a))}if(u(e.sinks(),o),Xe(r)!==e.nodeCount())throw new J;return t}function J(){}J.prototype=new Error;function re(e,r,n){De(r)||(r=[r]);var t=(e.isDirected()?e.successors:e.neighbors).bind(e),o=[],a={};return u(r,function(i){if(!e.hasNode(i))throw new Error("Graph does not have node: "+i);fr(e,i,n==="post",a,t,o)}),o}function fr(e,r,n,t,o,a){Object.prototype.hasOwnProperty.call(t,r)||(t[r]=!0,n||a.push(r),u(o(r),function(i){fr(e,i,n,t,o,a)}),n&&a.push(r))}function me(e,r){return re(e,r,"post")}function ve(e,r){return re(e,r,"pre")}B.initLowLimValues=_e;B.initCutValues=ge;B.calcCutValue=ur;B.leaveEdge=hr;B.enterEdge=pr;B.exchangeEdges=mr;function B(e){e=He(e),H(e);var r=ee(e);_e(r),ge(r,e);for(var n,t;n=hr(r);)t=pr(r,e,n),mr(r,e,n,t)}function ge(e,r){var n=me(e,e.nodes());n=n.slice(0,n.length-1),u(n,function(t){on(e,r,t)})}function on(e,r,n){var t=e.node(n),o=t.parent;e.edge(n,o).cutvalue=ur(e,r,n)}function ur(e,r,n){var t=e.node(n),o=t.parent,a=!0,i=r.edge(n,o),s=0;return i||(a=!1,i=r.edge(o,n)),s=i.weight,u(r.nodeEdges(n),function(d){var f=d.v===n,c=f?d.w:d.v;if(c!==o){var l=f===a,h=r.edge(d).weight;if(s+=l?h:-h,sn(e,n,c)){var m=e.edge(n,c).cutvalue;s+=l?-m:m}}}),s}function _e(e,r){arguments.length<2&&(r=e.nodes()[0]),lr(e,{},1,r)}function lr(e,r,n,t,o){var a=n,i=e.node(t);return r[t]=!0,u(e.neighbors(t),function(s){Object.prototype.hasOwnProperty.call(r,s)||(n=lr(e,r,n,s,t))}),i.low=a,i.lim=n++,o?i.parent=o:delete i.parent,n}function hr(e){return W(e.edges(),function(r){return e.edge(r).cutvalue<0})}function pr(e,r,n){var t=n.v,o=n.w;r.hasEdge(t,o)||(t=n.w,o=n.v);var a=e.node(t),i=e.node(o),s=a,d=!1;a.lim>i.lim&&(s=i,d=!0);var f=S(r.edges(),function(c){return d===cr(e,e.node(c.v),s)&&d!==cr(e,e.node(c.w),s)});return Y(f,function(c){return A(r,c)})}function mr(e,r,n,t){var o=n.v,a=n.w;e.removeEdge(o,a),e.setEdge(t.v,t.w,{}),_e(e),ge(e,r),an(e,r)}function an(e,r){var n=W(e.nodes(),function(o){return!r.node(o).parent}),t=ve(e,n);t=t.slice(1),u(t,function(o){var a=e.node(o).parent,i=r.edge(o,a),s=!1;i||(i=r.edge(a,o),s=!0),r.node(o).rank=r.node(a).rank+(s?i.minlen:-i.minlen)})}function sn(e,r,n){return e.hasEdge(r,n)}function cr(e,r,n){return n.low<=r.lim&&r.lim<=n.lim}function we(e){switch(e.graph().ranker){case"network-simplex":vr(e);break;case"tight-tree":fn(e);break;case"longest-path":dn(e);break;default:vr(e)}}var dn=H;function fn(e){H(e),ee(e)}function vr(e){B(e)}function gr(e){var r=I(e,"root",{},"_root"),n=cn(e),t=L(D(n))-1,o=2*t+1;e.graph().nestingRoot=r,u(e.edges(),function(i){e.edge(i).minlen*=o});var a=un(e)+1;u(e.children(),function(i){_r(e,r,o,a,t,n,i)}),e.graph().nodeRankFactor=o}function _r(e,r,n,t,o,a,i){var s=e.children(i);if(!s.length){i!==r&&e.setEdge(r,i,{weight:0,minlen:n});return}var d=ce(e,"_bt"),f=ce(e,"_bb"),c=e.node(i);e.setParent(d,i),c.borderTop=d,e.setParent(f,i),c.borderBottom=f,u(s,function(l){_r(e,r,n,t,o,a,l);var h=e.node(l),m=h.borderTop?h.borderTop:l,g=h.borderBottom?h.borderBottom:l,v=h.borderTop?t:2*t,p=m!==g?1:o-a[i]+1;e.setEdge(d,m,{weight:v,minlen:p,nestingEdge:!0}),e.setEdge(g,f,{weight:v,minlen:p,nestingEdge:!0})}),e.parent(i)||e.setEdge(r,d,{weight:0,minlen:o+a[i]})}function cn(e){var r={};function n(t,o){var a=e.children(t);a&&a.length&&u(a,function(i){n(i,o+1)}),r[t]=o}return u(e.children(),function(t){n(t,1)}),r}function un(e){return G(e.edges(),function(r,n){return r+e.edge(n).weight},0)}function wr(e){var r=e.graph();e.removeNode(r.nestingRoot),delete r.nestingRoot,u(e.edges(),function(n){var t=e.edge(n);t.nestingEdge&&e.removeEdge(n)})}function yr(e,r,n){var t={},o;u(n,function(a){for(var i=e.parent(a),s,d;i;){if(s=e.parent(i),s?(d=t[s],t[s]=i):(d=o,o=i),d&&d!==i){r.setEdge(d,i);return}i=s}})}function br(e,r,n){var t=hn(e),o=new x({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(a){return e.node(a)});return u(e.nodes(),function(a){var i=e.node(a),s=e.parent(a);(i.rank===r||i.minRank<=r&&r<=i.maxRank)&&(o.setNode(a),o.setParent(a,s||t),u(e[n](a),function(d){var f=d.v===a?d.w:d.v,c=o.edge(f,a),l=k(c)?0:c.weight;o.setEdge(f,a,{weight:e.edge(d).weight+l})}),Object.prototype.hasOwnProperty.call(i,"minRank")&&o.setNode(a,{borderLeft:i.borderLeft[r],borderRight:i.borderRight[r]}))}),o}function hn(e){for(var r;e.hasNode(r=U("_root")););return r}function Er(e,r){for(var n=0,t=1;t<r.length;++t)n+=pn(e,r[t-1],r[t]);return n}function pn(e,r,n){for(var t=ae(n,y(n,function(f,c){return c})),o=O(y(r,function(f){return P(y(e.outEdges(f),function(c){return{pos:t[c.w],weight:e.edge(c).weight}}),"pos")})),a=1;a<n.length;)a<<=1;var i=2*a-1;a-=1;var s=y(new Array(i),function(){return 0}),d=0;return u(o.forEach(function(f){var c=f.pos+a;s[c]+=f.weight;for(var l=0;c>0;)c%2&&(l+=s[c+1]),c=c-1>>1,s[c]+=f.weight;d+=f.weight*l})),d}function xr(e){var r={},n=S(e.nodes(),function(s){return!e.children(s).length}),t=L(y(n,function(s){return e.node(s).rank})),o=y(N(t+1),function(){return[]});function a(s){if(!K(r,s)){r[s]=!0;var d=e.node(s);o[d.rank].push(s),u(e.successors(s),a)}}var i=P(n,function(s){return e.node(s).rank});return u(i,a),o}function kr(e,r){return y(r,function(n){var t=e.inEdges(n);if(t.length){var o=G(t,function(a,i){var s=e.edge(i),d=e.node(i.v);return{sum:a.sum+s.weight*d.order,weight:a.weight+s.weight}},{sum:0,weight:0});return{v:n,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:n}})}function Lr(e,r){var n={};u(e,function(o,a){var i=n[o.v]={indegree:0,in:[],out:[],vs:[o.v],i:a};k(o.barycenter)||(i.barycenter=o.barycenter,i.weight=o.weight)}),u(r.edges(),function(o){var a=n[o.v],i=n[o.w];!k(a)&&!k(i)&&(i.indegree++,a.out.push(n[o.w]))});var t=S(n,function(o){return!o.indegree});return mn(t)}function mn(e){var r=[];function n(a){return function(i){i.merged||(k(i.barycenter)||k(a.barycenter)||i.barycenter>=a.barycenter)&&vn(a,i)}}function t(a){return function(i){i.in.push(a),--i.indegree===0&&e.push(i)}}for(;e.length;){var o=e.pop();r.push(o),u(o.in.reverse(),n(o)),u(o.out,t(o))}return y(S(r,function(a){return!a.merged}),function(a){return z(a,["vs","i","barycenter","weight"])})}function vn(e,r){var n=0,t=0;e.weight&&(n+=e.barycenter*e.weight,t+=e.weight),r.weight&&(n+=r.barycenter*r.weight,t+=r.weight),e.vs=r.vs.concat(e.vs),e.barycenter=n/t,e.weight=t,e.i=Math.min(r.i,e.i),r.merged=!0}function Ir(e,r){var n=Qe(e,function(c){return Object.prototype.hasOwnProperty.call(c,"barycenter")}),t=n.lhs,o=P(n.rhs,function(c){return-c.i}),a=[],i=0,s=0,d=0;t.sort(gn(!!r)),d=Nr(a,o,d),u(t,function(c){d+=c.vs.length,a.push(c.vs),i+=c.barycenter*c.weight,s+=c.weight,d=Nr(a,o,d)});var f={vs:O(a)};return s&&(f.barycenter=i/s,f.weight=s),f}function Nr(e,r,n){for(var t;r.length&&(t=X(r)).i<=n;)r.pop(),e.push(t.vs),n++;return n}function gn(e){return function(r,n){return r.barycenter<n.barycenter?-1:r.barycenter>n.barycenter?1:e?n.i-r.i:r.i-n.i}}function ye(e,r,n,t){var o=e.children(r),a=e.node(r),i=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,d={};i&&(o=S(o,function(g){return g!==i&&g!==s}));var f=kr(e,o);u(f,function(g){if(e.children(g.v).length){var v=ye(e,g.v,n,t);d[g.v]=v,Object.prototype.hasOwnProperty.call(v,"barycenter")&&wn(g,v)}});var c=Lr(f,n);_n(c,d);var l=Ir(c,t);if(i&&(l.vs=O([i,l.vs,s]),e.predecessors(i).length)){var h=e.node(e.predecessors(i)[0]),m=e.node(e.predecessors(s)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+h.order+m.order)/(l.weight+2),l.weight+=2}return l}function _n(e,r){u(e,function(n){n.vs=O(n.vs.map(function(t){return r[t]?r[t].vs:t}))})}function wn(e,r){k(e.barycenter)?(e.barycenter=r.barycenter,e.weight=r.weight):(e.barycenter=(e.barycenter*e.weight+r.barycenter*r.weight)/(e.weight+r.weight),e.weight+=r.weight)}function Pr(e){var r=ue(e),n=Or(e,N(1,r+1),"inEdges"),t=Or(e,N(r-1,-1,-1),"outEdges"),o=xr(e);Sr(e,o);for(var a=Number.POSITIVE_INFINITY,i,s=0,d=0;d<4;++s,++d){yn(s%2?n:t,s%4>=2),o=M(e);var f=Er(e,o);f<a&&(d=0,i=Te(o),a=f)}Sr(e,i)}function Or(e,r,n){return y(r,function(t){return br(e,t,n)})}function yn(e,r){var n=new x;u(e,function(t){var o=t.graph().root,a=ye(t,o,n,r);u(a.vs,function(i,s){t.node(i).order=s}),yr(t,n,a.vs)})}function Sr(e,r){u(r,function(n){u(n,function(t,o){e.node(t).order=o})})}function Cr(e){var r=En(e);u(e.graph().dummyChains,function(n){for(var t=e.node(n),o=t.edgeObj,a=bn(e,r,o.v,o.w),i=a.path,s=a.lca,d=0,f=i[d],c=!0;n!==o.w;){if(t=e.node(n),c){for(;(f=i[d])!==s&&e.node(f).maxRank<t.rank;)d++;f===s&&(c=!1)}if(!c){for(;d<i.length-1&&e.node(f=i[d+1]).minRank<=t.rank;)d++;f=i[d]}e.setParent(n,f),n=e.successors(n)[0]}})}function bn(e,r,n,t){var o=[],a=[],i=Math.min(r[n].low,r[t].low),s=Math.max(r[n].lim,r[t].lim),d,f;d=n;do d=e.parent(d),o.push(d);while(d&&(r[d].low>i||s>r[d].lim));for(f=d,d=t;(d=e.parent(d))!==f;)a.push(d);return{path:o.concat(a.reverse()),lca:f}}function En(e){var r={},n=0;function t(o){var a=n;u(e.children(o),t),r[o]={low:a,lim:n++}}return u(e.children(),t),r}function xn(e,r){var n={};function t(o,a){var i=0,s=0,d=o.length,f=X(a);return u(a,function(c,l){var h=Ln(e,c),m=h?e.node(h).order:d;(h||c===f)&&(u(a.slice(s,l+1),function(g){u(e.predecessors(g),function(v){var p=e.node(v),_=p.order;(_<i||m<_)&&!(p.dummy&&e.node(g).dummy)&&Rr(n,v,g)})}),s=l+1,i=m)}),a}return G(r,t),n}function kn(e,r){var n={};function t(a,i,s,d,f){var c;u(N(i,s),function(l){c=a[l],e.node(c).dummy&&u(e.predecessors(c),function(h){var m=e.node(h);m.dummy&&(m.order<d||m.order>f)&&Rr(n,h,c)})})}function o(a,i){var s=-1,d,f=0;return u(i,function(c,l){if(e.node(c).dummy==="border"){var h=e.predecessors(c);h.length&&(d=e.node(h[0]).order,t(i,f,l,s,d),f=l,s=d)}t(i,f,i.length,d,a.length)}),i}return G(r,o),n}function Ln(e,r){if(e.node(r).dummy)return W(e.predecessors(r),function(n){return e.node(n).dummy})}function Rr(e,r,n){if(r>n){var t=r;r=n,n=t}Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{enumerable:!0,configurable:!0,value:{},writable:!0});var o=e[r];Object.defineProperty(o,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Nn(e,r,n){if(r>n){var t=r;r=n,n=t}return!!e[r]&&Object.prototype.hasOwnProperty.call(e[r],n)}function In(e,r,n,t){var o={},a={},i={};return u(r,function(s){u(s,function(d,f){o[d]=d,a[d]=d,i[d]=f})}),u(r,function(s){var d=-1;u(s,function(f){var c=t(f);if(c.length){c=P(c,function(v){return i[v]});for(var l=(c.length-1)/2,h=Math.floor(l),m=Math.ceil(l);h<=m;++h){var g=c[h];a[f]===f&&d<i[g]&&!Nn(n,f,g)&&(a[g]=f,a[f]=o[f]=o[g],d=i[g])}}})}),{root:o,align:a}}function On(e,r,n,t,o){var a={},i=Sn(e,r,n,o),s=o?"borderLeft":"borderRight";function d(l,h){for(var m=i.nodes(),g=m.pop(),v={};g;)v[g]?l(g):(v[g]=!0,m.push(g),m=m.concat(h(g))),g=m.pop()}function f(l){a[l]=i.inEdges(l).reduce(function(h,m){return Math.max(h,a[m.v]+i.edge(m))},0)}function c(l){var h=i.outEdges(l).reduce(function(g,v){return Math.min(g,a[v.w]-i.edge(v))},Number.POSITIVE_INFINITY),m=e.node(l);h!==Number.POSITIVE_INFINITY&&m.borderType!==s&&(a[l]=Math.max(a[l],h))}return d(f,i.predecessors.bind(i)),d(c,i.successors.bind(i)),u(t,function(l){a[l]=a[n[l]]}),a}function Sn(e,r,n,t){var o=new x,a=e.graph(),i=Dn(a.nodesep,a.edgesep,t);return u(r,function(s){var d;u(s,function(f){var c=n[f];if(o.setNode(c),d){var l=n[d],h=o.edge(l,c);o.setEdge(l,c,Math.max(i(e,f,d),h||0))}d=f})}),o}function Pn(e,r){return Y(D(r),function(n){var t=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;return je(n,function(a,i){var s=Tn(e,i)/2;t=Math.max(a+s,t),o=Math.min(a-s,o)}),t-o})}function Cn(e,r){var n=D(r),t=T(n),o=L(n);u(["u","d"],function(a){u(["l","r"],function(i){var s=a+i,d=e[s],f;if(d!==r){var c=D(d);f=i==="l"?t-T(c):o-L(c),f&&(e[s]=V(d,function(l){return l+f}))}})})}function Rn(e,r){return V(e.ul,function(n,t){if(r)return e[r.toLowerCase()][t];var o=P(y(e,t));return(o[1]+o[2])/2})}function Dr(e){var r=M(e),n=q(xn(e,r),kn(e,r)),t={},o;u(["u","d"],function(i){o=i==="u"?r:D(r).reverse(),u(["l","r"],function(s){s==="r"&&(o=y(o,function(l){return D(l).reverse()}));var d=(i==="u"?e.predecessors:e.successors).bind(e),f=In(e,o,n,d),c=On(e,o,f.root,f.align,s==="r");s==="r"&&(c=V(c,function(l){return-l})),t[i+s]=c})});var a=Pn(e,t);return Cn(t,a),Rn(t,e.graph().align)}function Dn(e,r,n){return function(t,o,a){var i=t.node(o),s=t.node(a),d=0,f;if(d+=i.width/2,Object.prototype.hasOwnProperty.call(i,"labelpos"))switch(i.labelpos.toLowerCase()){case"l":f=-i.width/2;break;case"r":f=i.width/2;break}if(f&&(d+=n?f:-f),f=0,d+=(i.dummy?r:e)/2,d+=(s.dummy?r:e)/2,d+=s.width/2,Object.prototype.hasOwnProperty.call(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":f=s.width/2;break;case"r":f=-s.width/2;break}return f&&(d+=n?f:-f),f=0,d}}function Tn(e,r){return e.node(r).width}function Tr(e){e=$(e),Mn(e),Be(Dr(e),function(r,n){e.node(n).x=r})}function Mn(e){var r=M(e),n=e.graph().ranksep,t=0;u(r,function(o){var a=L(y(o,function(i){return e.node(i).height}));u(o,function(i){e.node(i).y=t+a/2}),t+=a+n})}function xe(e,r){var n=r&&r.debugTiming?Ze:$e;n("layout",()=>{var t=n(" buildLayoutGraph",()=>Wn(e));n(" runLayout",()=>jn(t,n)),n(" updateInputGraph",()=>Bn(e,t))})}function jn(e,r){r(" makeSpaceForEdgeLabels",()=>qn(e)),r(" removeSelfEdges",()=>nt(e)),r(" acyclic",()=>Ue(e)),r(" nestingGraph.run",()=>gr(e)),r(" rank",()=>we($(e))),r(" injectEdgeLabelProxies",()=>Hn(e)),r(" removeEmptyRanks",()=>Ke(e)),r(" nestingGraph.cleanup",()=>wr(e)),r(" normalizeRanks",()=>Je(e)),r(" assignRankMinMax",()=>Jn(e)),r(" removeEdgeLabelProxies",()=>Kn(e)),r(" normalize.run",()=>ir(e)),r(" parentDummyChains",()=>Cr(e)),r(" addBorderSegments",()=>rr(e)),r(" order",()=>Pr(e)),r(" insertSelfEdges",()=>tt(e)),r(" adjustCoordinateSystem",()=>tr(e)),r(" position",()=>Tr(e)),r(" positionSelfEdges",()=>ot(e)),r(" removeBorderNodes",()=>rt(e)),r(" normalize.undo",()=>sr(e)),r(" fixupEdgeLabelCoords",()=>$n(e)),r(" undoCoordinateSystem",()=>or(e)),r(" translateGraph",()=>Qn(e)),r(" assignNodeIntersects",()=>Zn(e)),r(" reversePoints",()=>et(e)),r(" acyclic.undo",()=>We(e))}function Bn(e,r){u(e.nodes(),function(n){var t=e.node(n),o=r.node(n);t&&(t.x=o.x,t.y=o.y,r.children(n).length&&(t.width=o.width,t.height=o.height))}),u(e.edges(),function(n){var t=e.edge(n),o=r.edge(n);t.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(t.x=o.x,t.y=o.y)}),e.graph().width=r.graph().width,e.graph().height=r.graph().height}var Xn=["nodesep","edgesep","ranksep","marginx","marginy"],Gn={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},An=["acyclicer","ranker","rankdir","align"],Fn=["width","height"],Vn={width:0,height:0},Yn=["minlen","weight","width","height","labeloffset"],zn={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Un=["labelpos"];function Wn(e){var r=new x({multigraph:!0,compound:!0}),n=Ee(e.graph());return r.setGraph(q({},Gn,be(n,Xn),z(n,An))),u(e.nodes(),function(t){var o=Ee(e.node(t));r.setNode(t,Me(be(o,Fn),Vn)),r.setParent(t,e.parent(t))}),u(e.edges(),function(t){var o=Ee(e.edge(t));r.setEdge(t,q({},zn,be(o,Yn),z(o,Un)))}),r}function qn(e){var r=e.graph();r.ranksep/=2,u(e.edges(),function(n){var t=e.edge(n);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(r.rankdir==="TB"||r.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function Hn(e){u(e.edges(),function(r){var n=e.edge(r);if(n.width&&n.height){var t=e.node(r.v),o=e.node(r.w),a={rank:(o.rank-t.rank)/2+t.rank,e:r};I(e,"edge-proxy",a,"_ep")}})}function Jn(e){var r=0;u(e.nodes(),function(n){var t=e.node(n);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,r=L(r,t.maxRank))}),e.graph().maxRank=r}function Kn(e){u(e.nodes(),function(r){var n=e.node(r);n.dummy==="edge-proxy"&&(e.edge(n.e).labelRank=n.rank,e.removeNode(r))})}function Qn(e){var r=Number.POSITIVE_INFINITY,n=0,t=Number.POSITIVE_INFINITY,o=0,a=e.graph(),i=a.marginx||0,s=a.marginy||0;function d(f){var c=f.x,l=f.y,h=f.width,m=f.height;r=Math.min(r,c-h/2),n=Math.max(n,c+h/2),t=Math.min(t,l-m/2),o=Math.max(o,l+m/2)}u(e.nodes(),function(f){d(e.node(f))}),u(e.edges(),function(f){var c=e.edge(f);Object.prototype.hasOwnProperty.call(c,"x")&&d(c)}),r-=i,t-=s,u(e.nodes(),function(f){var c=e.node(f);c.x-=r,c.y-=t}),u(e.edges(),function(f){var c=e.edge(f);u(c.points,function(l){l.x-=r,l.y-=t}),Object.prototype.hasOwnProperty.call(c,"x")&&(c.x-=r),Object.prototype.hasOwnProperty.call(c,"y")&&(c.y-=t)}),a.width=n-r+i,a.height=o-t+s}function Zn(e){u(e.edges(),function(r){var n=e.edge(r),t=e.node(r.v),o=e.node(r.w),a,i;n.points?(a=n.points[0],i=n.points[n.points.length-1]):(n.points=[],a=o,i=t),n.points.unshift(fe(t,a)),n.points.push(fe(o,i))})}function $n(e){u(e.edges(),function(r){var n=e.edge(r);if(Object.prototype.hasOwnProperty.call(n,"x"))switch((n.labelpos==="l"||n.labelpos==="r")&&(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;break}})}function et(e){u(e.edges(),function(r){var n=e.edge(r);n.reversed&&n.points.reverse()})}function rt(e){u(e.nodes(),function(r){if(e.children(r).length){var n=e.node(r),t=e.node(n.borderTop),o=e.node(n.borderBottom),a=e.node(X(n.borderLeft)),i=e.node(X(n.borderRight));n.width=Math.abs(i.x-a.x),n.height=Math.abs(o.y-t.y),n.x=a.x+n.width/2,n.y=t.y+n.height/2}}),u(e.nodes(),function(r){e.node(r).dummy==="border"&&e.removeNode(r)})}function nt(e){u(e.edges(),function(r){if(r.v===r.w){var n=e.node(r.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:r,label:e.edge(r)}),e.removeEdge(r)}})}function tt(e){var r=M(e);u(r,function(n){var t=0;u(n,function(o,a){var i=e.node(o);i.order=a+t,u(i.selfEdges,function(s){I(e,"selfedge",{width:s.label.width,height:s.label.height,rank:i.rank,order:a+ ++t,e:s.e,label:s.label},"_se")}),delete i.selfEdges})})}function ot(e){u(e.nodes(),function(r){var n=e.node(r);if(n.dummy==="selfedge"){var t=e.node(n.e.v),o=t.x+t.width/2,a=t.y,i=n.x-o,s=t.height/2;e.setEdge(n.e,n.label),e.removeNode(r),n.label.points=[{x:o+2*i/3,y:a-s},{x:o+5*i/6,y:a-s},{x:o+i,y:a},{x:o+5*i/6,y:a+s},{x:o+2*i/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function be(e,r){return V(z(e,r),Number)}function Ee(e){var r={};return u(e,function(n,t){r[t.toLowerCase()]=n}),r}var Mr=E((e,r,n)=>Math.max(r,Math.min(n,e)),"clamp"),jr=E((e="TB")=>{switch(e){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";default:return"top"}},"getDefaultSelfLoopSide"),at=E(e=>e==="flowchart"||e==="flowchart-v2"||e==="stateDiagram"||e==="er"||e==="classDiagram","shouldMergeSelfLoopSegments"),it=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],st=E((e,r,n,t,o)=>{let a=[],i=new Set;if(n.forEach(({start:c,end:l})=>{c!==t&&i.add(c),l!==t&&i.add(l)}),i.forEach(c=>{let l=e.node(c);typeof l?.x=="number"&&typeof l?.y=="number"&&a.push(l)}),a.length===0&&n.forEach(({edge:c})=>{(c.points??[]).forEach(l=>{typeof l?.x=="number"&&typeof l?.y=="number"&&a.push(l)})}),a.length===0)return jr(o);let s=a.reduce((c,l)=>({x:c.x+l.x/a.length,y:c.y+l.y/a.length}),{x:0,y:0}),d=s.x-r.x,f=s.y-r.y;return Math.abs(d)>Math.abs(f)?d>0?"right":"left":Math.abs(f)>0?f>0?"bottom":"top":jr(o)},"getSelfLoopSide"),dt=E((e,r="top",n=0,t=0)=>{let o=e.x,a=e.y-n,i=e.width/2,s=e.height/2,d=Math.max(36,Math.min(100,e.width*.8)),f=Mr(Math.max(t,e.width*.35),36,d),c=Mr(Math.min(e.width,e.height)*.45,24,48);switch(r){case"bottom":{let l=a+s;return[{x:o-f/2,y:l},{x:o-f/2,y:l+c},{x:o+f/2,y:l+c},{x:o+f/2,y:l}]}case"right":{let l=o+i;return[{x:l,y:a-f/2},{x:l+c,y:a-f/2},{x:l+c,y:a+f/2},{x:l,y:a+f/2}]}case"left":{let l=o-i;return[{x:l,y:a-f/2},{x:l-c,y:a-f/2},{x:l-c,y:a+f/2},{x:l,y:a+f/2}]}default:{let l=a-s;return[{x:o-f/2,y:l},{x:o-f/2,y:l-c},{x:o+f/2,y:l-c},{x:o+f/2,y:l}]}}},"getSelfLoopPoints"),ft=E((e,r,n="top",t=0,o={})=>{let i=e.x,s=e.y-t,d=o.width??0,f=o.height??0;switch(n){case"bottom":return{x:i,y:Math.max(...r.map(c=>c.y))+f/2+4};case"right":return{x:Math.max(...r.map(c=>c.x))+d/2+4,y:s};case"left":return{x:Math.min(...r.map(c=>c.x))-d/2-4,y:s};default:return{x:i,y:Math.min(...r.map(c=>c.y))-f/2-4}}},"getSelfLoopLabelPosition"),Xr=E((e,r=0,{mergeSelfLoops:n=!0}={})=>{let t=new Map,o=[],a=e.graph()?.rankdir;return e.edges().forEach(i=>{let s=e.edge(i);if(n&&s.selfLoop){let d=s.selfLoop.id;t.has(d)||t.set(d,[]),t.get(d).push({edge:s,start:i.v,end:i.w})}else o.push({edge:s,start:i.v,end:i.w})}),t.forEach(i=>{if(i.length!==3){i.forEach(_=>o.push(_));return}i.sort((_,R)=>_.edge.selfLoop.order-R.edge.selfLoop.order);let[s,d,f]=i,c=s.edge.originalEdge??d.edge.originalEdge??f.edge.originalEdge??d.edge,l=e.node(c.start);if(!l){i.forEach(_=>o.push(_));return}let h={width:d.edge.width,height:d.edge.height},m=st(e,l,i,c.start,a),g=dt(l,m,r,h.width??0),v=ft(l,g,m,r,h),p={...d.edge,...c,id:c.id,points:g,start:c.start,end:c.end,x:v.x,y:v.y,width:h.width,height:h.height,labelStyle:d.edge.labelStyle,fromCluster:s.edge.fromCluster??d.edge.fromCluster??f.edge.fromCluster,toCluster:s.edge.toCluster??d.edge.toCluster??f.edge.toCluster};delete p.selfLoop,delete p.originalEdge,o.push({edge:p,start:p.start,end:p.end})}),o},"getEdgesToRender"),Gr=E(async({element:e,graph:r,diagramType:n,id:t,parentCluster:o,siteConfig:a})=>{let i=r.graph().rankdir;w.trace("Dir in recursive render - dir:",i);let{clusters:s,edgePaths:d,edgeLabels:f,nodes:c,rootGroups:l}=Ge(e,{edgePathsClass:"edgePaths"});r.nodes()?w.info("Recursive render XXX",r.nodes()):w.info("No nodes found for",r),r.edges().length>0&&w.info("Recursive edges",r.edge(r.edges()[0]));let h=at(n);await Promise.all(r.nodes().map(async function(v){let p=r.node(v);if(o!==void 0){let _=JSON.parse(JSON.stringify(o.clusterData));w.trace(`Setting data for parent cluster XXX
|
|
2
|
+
Node.id = `,v,`
|
|
3
|
+
data=`,_.height,`
|
|
4
|
+
Parent cluster`,o.height),r.setNode(o.id,_),r.parent(v)||(w.trace("Setting parent",v,o.id),r.setParent(v,o.id,_))}if(w.info("(Insert) Node XXX"+v+": "+JSON.stringify(r.node(v))),p?.clusterNode){w.info("Cluster identified XBX",v,p.width,r.node(v));let{ranksep:_,nodesep:R}=r.graph();p.graph.setGraph({...p.graph.graph(),ranksep:_+25,nodesep:R});let ke=await pt({element:c,graph:p.graph,diagramType:n,id:t,parentCluster:r.node(v),siteConfig:a}),Le=ke.elem;Ie(p,Le),p.diff=ke.diff||0,w.info("New compound node after recursive render XAX",v,"width",p.width,"height",p.height),Se(Le,p)}else r.children(v).length>0?(w.trace("Cluster - the non recursive path XBX",v,p.id,p,p.width,"Graph:",r),w.trace(ie(p.id,r)),C.set(p.id,{id:ie(p.id,r),node:p})):(w.trace("Node - the non recursive path XAX",v,c,r.node(v),i),await Ae(c,r.node(v),{config:a,dir:i}))})),await E(async()=>{let v=r.edges().map(async function(p){let _=r.edge(p.v,p.w,p.name);if(w.info("Edge "+p.v+" -> "+p.w+": "+JSON.stringify(p)),w.info("Edge "+p.v+" -> "+p.w+": ",p," ",JSON.stringify(r.edge(p))),w.info("Fix",C,"ids:",p.v,p.w,"Translating: ",C.get(p.v),C.get(p.w)),h&&_.selfLoop){if(_.selfLoop.order!==1)return;let R={..._.originalEdge,..._,id:_.selfLoop.id,startLabelLeft:_.originalEdge?.startLabelLeft??_.startLabelLeft,startLabelRight:_.originalEdge?.startLabelRight??_.startLabelRight,endLabelLeft:_.originalEdge?.endLabelLeft??_.endLabelLeft,endLabelRight:_.originalEdge?.endLabelRight??_.endLabelRight};await te(f,R),_.width=R.width,_.height=R.height,_.labelStyle=R.labelStyle;return}await te(f,_)});await Promise.all(v)},"processEdges")();let{subGraphTitleTotalMargin:g}=Oe(a);return{elem:l,graph:r,groups:{clusters:s,edgePaths:d,edgeLabels:f,nodes:c,rootGroups:l},diagramType:n,id:t,mergeSelfLoops:h,subGraphTitleTotalMargin:g}},"measureDagreGraph"),Ar=E(e=>{w.info("############################################# XXX"),w.info("### Layout ### XXX"),w.info("############################################# XXX"),xe(e)},"runDagreGraphLayout"),ct=E((e,r,n)=>{let t=e.node(r);if(!t)return;let o={...t};return t?.clusterNode?o.y=(t.y??0)+n:e.children(r).length>0?o.height=(t.height??0)+n:o.y=(t.y??0)+n/2,o},"normalizeDagreNode"),Br=E((e,r)=>{it.forEach(n=>{r[n]!==void 0&&(e[n]=r[n])})},"applyDagreNodeLayout"),ut=E((e,r,n,t)=>({...e,start:e.start??r,end:e.end??n,points:(e.points??[]).map(o=>({...o,y:typeof o.y=="number"?o.y+t:o.y}))}),"normalizeDagreEdge"),lt=E((e,r)=>{let{graph:n,mergeSelfLoops:t,subGraphTitleTotalMargin:o=0}=r,a=new Map(e.nodes.map(s=>[s.id,s]));Q(n).forEach(s=>{let d=ct(n,s,o);if(!d)return;Br(n.node(s),d);let f=a.get(s);f&&Br(f,d)});let i=o/2;return e.edges=Xr(n,i,{mergeSelfLoops:t}).map(({edge:s,start:d,end:f})=>ut(s,d,f,i)),e},"applyDagreLayoutResult"),ht=E(async({elem:e,graph:r,groups:{clusters:n,edgePaths:t},diagramType:o,id:a,mergeSelfLoops:i,subGraphTitleTotalMargin:s})=>{let d=0;await Promise.all(Q(r).map(async function(l){let h=r.node(l);if(w.info("Position XBX => "+l+": ("+h.x,","+h.y,") width: ",h.width," height: ",h.height),h?.clusterNode)h.y+=s,w.info("A tainted cluster node XBX1",l,h.id,h.width,h.height,h.x,h.y,r.parent(l)),C.get(h.id).node=h,ne(h);else if(r.children(l).length>0){w.info("A pure cluster node XBX1",l,h.id,h.x,h.y,h.width,h.height,r.parent(l)),h.height+=s,r.node(h.parentId);let m=h?.padding/2||0,g=h?.labelBBox?.height||0,v=g-m||0;w.debug("OffsetY",v,"labelHeight",g,"halfPadding",m),await Pe(n,h),C.get(h.id).node=h}else{let m=r.node(h.parentId);h.y+=s/2,w.info("A regular node XBX1 - using the padding",h.id,"parent",h.parentId,h.width,h.height,h.x,h.y,"offsetY",h.offsetY,"parent",m,m?.offsetY,h),ne(h)}}));let f=s/2;return Xr(r,f,{mergeSelfLoops:i}).forEach(function({edge:l,start:h,end:m}){w.info("Edge "+h+" -> "+m+": "+JSON.stringify(l),l),l.points.forEach(_=>_.y+=f);let g=r.node(h),v=r.node(m),p=Re(t,l,C,o,g,v,a);Ce(l,p)}),r.nodes().forEach(function(l){let h=r.node(l);w.info(l,h.type,h.diff),h.isGroup&&(d=h.diff)}),w.warn("Returning from recursive render XAX",e,d),{elem:e,diff:d}},"paintDagreLayoutCore"),pt=E(async e=>{let r=await Gr(e);return Ar(r.graph),await ht(r)},"renderDagreSubgraph"),Fr=E(e=>{let r=new x({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.nodeSpacing||e.config?.flowchart?.nodeSpacing,ranksep:e.config?.rankSpacing||e.rankSpacing||e.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return e.nodes.forEach(n=>{r.setNode(n.id,{...n}),n.parentId&&r.setParent(n.id,n.parentId)}),w.debug("Edges:",e.edges),e.edges.forEach(n=>{if(n.start===n.end){let t=n.start,o=t+"---"+t+"---1",a=t+"---"+t+"---2",i=r.node(t);r.setNode(o,{domId:o,id:o,parentId:i.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),r.setParent(o,i.parentId),r.setNode(a,{domId:a,id:a,parentId:i.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),r.setParent(a,i.parentId);let s=structuredClone(n),d=structuredClone(n),f=structuredClone(n),c=structuredClone(n);d.originalEdge=s,d.selfLoop={id:s.id,order:0},f.originalEdge=s,f.selfLoop={id:s.id,order:1},c.originalEdge=s,c.selfLoop={id:s.id,order:2},d.label="",d.arrowTypeEnd="none",d.endLabelLeft="",d.endLabelRight="",d.startLabelLeft="",d.id=t+"-cyclic-special-1",f.startLabelRight="",f.startLabelLeft="",f.endLabelLeft="",f.endLabelRight="",f.arrowTypeStart="none",f.arrowTypeEnd="none",f.id=t+"-cyclic-special-mid",c.label="",c.startLabelRight="",c.startLabelLeft="",c.arrowTypeStart="none",i.isGroup&&(d.fromCluster=t,c.toCluster=t),c.id=t+"-cyclic-special-2",c.arrowTypeStart="none",r.setEdge(t,o,d,t+"-cyclic-special-0"),r.setEdge(o,a,f,t+"-cyclic-special-1"),r.setEdge(a,t,c,t+"-cyclic-special-2")}else r.setEdge(n.start,n.end,{...n},n.id)}),Fe(r),{graph:r}},"prepareLayoutForDagre"),mt=E(async(e,{element:r,preparedLayout:n})=>{let t=n??Fr(e),o=Ne(),a=await Gr({element:r,graph:t.graph,diagramType:e.type,id:e.diagramId,parentCluster:void 0,siteConfig:o});return t.measuredLayout=a,a},"measureDagreLayout"),vt=E((e,r)=>{let n=r.preparedLayout?.measuredLayout;if(!n)throw new Error("runDagreLayoutCore requires measureDagreLayout to run first");return Ar(n.graph),lt(e,n),n},"runDagreLayoutCore"),gt=E((e,{measure:r})=>Q(r.graph).map(n=>r.graph.node(n)).filter(Boolean),"getDagrePaintNodes"),_t=E((e,r,{measure:n})=>e?n.graph.node(e):void 0,"getDagreEdgeNode"),ya=Ve({prepareLayout:Fr,measureLayout:mt,runLayoutCore:vt,paintOptions:{clusterDb:C,getNodes:gt,getEdgeNode:_t,skipNode:E((e,{measure:r})=>!r.graph.hasNode(e.id),"skipNode"),isCluster:E((e,{measure:r})=>r.graph.hasNode(e.id)&&(r.graph.children(e.id)??[]).length>0,"isCluster")}});export{lt as applyDagreLayoutResult,Xr as getEdgesToRender,mt as measureDagreLayout,Fr as prepareLayoutForDagre,ya as render,vt as runDagreLayoutCore};
|