codeplane-darwin-x64-baseline 31.0.1 → 31.0.2
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/bin/codeplane +0 -0
- package/bin/runtime/tui/{_baseUniq-D-gQv_o8-6k2k7rvy.js → _baseUniq-CAHbz7Vw-2ztfx65y.js} +1 -1
- package/bin/runtime/tui/{ar-CbghpXZr-xddskc2p.js → ar-BbgtuTrY-bv1aww1m.js} +1 -1
- package/bin/runtime/tui/{ar-6lpISk3N-64dnfqsp.js → ar-C8SrRDNy-fbxpscav.js} +1 -1
- package/bin/runtime/tui/{arc-BzEzntkX-xyx1p9x4.js → arc-BUWBfD8e-fqt6ycj7.js} +1 -1
- package/bin/runtime/tui/{architectureDiagram-Q4EWVU46-DUv_-p3o-yqttrhbq.js → architectureDiagram-Q4EWVU46-Cu3HYpWu-3pd84xzw.js} +1 -1
- package/bin/runtime/tui/{blockDiagram-DXYQGD6D-C-lzBEXN-fm1z4h19.js → blockDiagram-DXYQGD6D-C4qQLg4H-5rkf6ctp.js} +1 -1
- package/bin/runtime/tui/{br-DozJlpWI-rryvz7br.js → br-B3RxJiel-d306rf4n.js} +1 -1
- package/bin/runtime/tui/{br-DfDnqTzr-13zepykq.js → br-CBQyYD9J-neq0jpk8.js} +1 -1
- package/bin/runtime/tui/{bs-DNy4pDZz-a656x48s.js → bs-CIPDWPQK-9bdbdnst.js} +1 -1
- package/bin/runtime/tui/{bs-lzZZtt8a-0yd4h9v9.js → bs-LO_2RWv4-a7k6p4qs.js} +1 -1
- package/bin/runtime/tui/{c4Diagram-AHTNJAMY-Ci4SWFS5-6qk5kfvd.js → c4Diagram-AHTNJAMY-DOpUTLNX-s8rn9dpa.js} +1 -1
- package/bin/runtime/tui/channel-GiEB6w-E-2nb30ajw.js +1 -0
- package/bin/runtime/tui/{chunk-4BX2VUAB-BP0mg7Rb-59rv569g.js → chunk-4BX2VUAB-C65wii7K-fre08j7v.js} +1 -1
- package/bin/runtime/tui/{chunk-4TB4RGXK-DLoa18Qf-9k5ss598.js → chunk-4TB4RGXK-BVU_JG2u-v2zb95b1.js} +1 -1
- package/bin/runtime/tui/{chunk-55IACEB6-ILfxGSj5-aws2cev1.js → chunk-55IACEB6-EM5kgdgK-ak4a0m4y.js} +1 -1
- package/bin/runtime/tui/{chunk-EDXVE4YY-BYL2xRIm-swgnfmwf.js → chunk-EDXVE4YY-DNduO0Fn-7wve5zdn.js} +1 -1
- package/bin/runtime/tui/{chunk-FMBD7UC4-C_NiDIt4-tf5sfemn.js → chunk-FMBD7UC4-BmlWtyCS-hh4whbqk.js} +1 -1
- package/bin/runtime/tui/{chunk-OYMX7WX6-DX7zpdsd-h8899q0d.js → chunk-OYMX7WX6-DThOJ-6Z-8pdqhasv.js} +1 -1
- package/bin/runtime/tui/{chunk-QZHKN3VN-Cmbc9lB2-pkgna22w.js → chunk-QZHKN3VN-D3CJETi2-ahtyqrm3.js} +1 -1
- package/bin/runtime/tui/{chunk-YZCP3GAM-DVFM985d-5ss4f6ed.js → chunk-YZCP3GAM-Bhm-OX49-4e25de50.js} +1 -1
- package/bin/runtime/tui/classDiagram-6PBFFD2Q-Ei1SJWaE-97wy26sf.js +1 -0
- package/bin/runtime/tui/classDiagram-v2-HSJHXN6E-Ei1SJWaE-97wy26sf.js +1 -0
- package/bin/runtime/tui/clone-B29TqGNh-gchsffwq.js +1 -0
- package/bin/runtime/tui/{cose-bilkent-S5V4N54A-CIi3p276-rqahypy0.js → cose-bilkent-S5V4N54A-DW13KQrW-mq7f6zbz.js} +1 -1
- package/bin/runtime/tui/{da-Be7PTuQJ-4y3yz8t5.js → da-BiwsKlvx-5e5eegfr.js} +1 -1
- package/bin/runtime/tui/{da-BCXGvqgR-h04h93gd.js → da-BlF8NGyE-g63ktq2g.js} +1 -1
- package/bin/runtime/tui/{dagre-KV5264BT-DZBwY33--kje8nqgj.js → dagre-KV5264BT-i_ujfCr--krwrfr3q.js} +1 -1
- package/bin/runtime/tui/{de-CL_kB-Ax-pdg5x2ms.js → de-Bm8YHQlH-79s02k4b.js} +1 -1
- package/bin/runtime/tui/{de-arLXL6UN-yw4e0xhn.js → de-D9p4fNmQ-f8epqzpf.js} +1 -1
- package/bin/runtime/tui/{diagram-5BDNPKRD-Dy-5aNbc-a8dd1tht.js → diagram-5BDNPKRD-CIuTAdP6-e3dsxh76.js} +1 -1
- package/bin/runtime/tui/{diagram-G4DWMVQ6-C44HlM6u-w6pr5ttc.js → diagram-G4DWMVQ6-x7rg761j-q8ckwb9x.js} +1 -1
- package/bin/runtime/tui/{diagram-MMDJMWI5-VtNEOU5V-zrghyk85.js → diagram-MMDJMWI5-B7ayT4w--q01z552a.js} +1 -1
- package/bin/runtime/tui/{diagram-TYMM5635-Cp0xfvtn-bwe6s7d4.js → diagram-TYMM5635-BFMCIZt3-dgyjnk5q.js} +1 -1
- package/bin/runtime/tui/{dialog-connect-provider-CN5IekW4-23k1we1x.js → dialog-connect-provider-Dx4RsF3a-9wy3ykeg.js} +2 -2
- package/bin/runtime/tui/{dialog-edit-project-BaDQYiCn-damkx3tv.js → dialog-edit-project-C3Ts6T46-yjhfend3.js} +1 -1
- package/bin/runtime/tui/{dialog-fork-ns7D-us_-b14y5m81.js → dialog-fork-DbAXHShi-mfwtra9v.js} +1 -1
- package/bin/runtime/tui/{dialog-manage-models-CDgTo3qi-1g3783qp.js → dialog-manage-models-BfxyBBJY-g53c0rkm.js} +1 -1
- package/bin/runtime/tui/{dialog-quick-switcher-pFYrhZ-f-6k95zzj4.js → dialog-quick-switcher-CexwhOml-5qn8x92k.js} +1 -1
- package/bin/runtime/tui/{dialog-select-directory-DzIjIMPs-hsd0xjfj.js → dialog-select-directory-DPAdW3ye-d0gmhesc.js} +1 -1
- package/bin/runtime/tui/{dialog-select-file-cn6fWKzC-a96wk8tz.js → dialog-select-file-95w_PqLP-svf8qe9x.js} +1 -1
- package/bin/runtime/tui/{dialog-select-mcp-KEE2ouTn-7svbeepw.js → dialog-select-mcp-WppljhbD-rmzrydtt.js} +1 -1
- package/bin/runtime/tui/{dialog-select-model-unpaid-DMwf_9yO-6ntwdjaq.js → dialog-select-model-unpaid-C_5dQVCz-7x7sjcsb.js} +2 -2
- package/bin/runtime/tui/{dialog-select-provider-74lMvL8g-jdhe1tjv.js → dialog-select-provider-DrIJ2cy4-tf4hkhqf.js} +1 -1
- package/bin/runtime/tui/{dialog-select-server-DrDwIvfa-8b7qpqvj.js → dialog-select-server-BznUeGih-1xydahht.js} +1 -1
- package/bin/runtime/tui/{erDiagram-SMLLAGMA-BiyXjR3_-npgpwsmj.js → erDiagram-SMLLAGMA-BNXDmiVE-gwztvsf3.js} +1 -1
- package/bin/runtime/tui/{es-VIN200QX-jbpfw78w.js → es-BUr5ZLRi-vrkrnt3c.js} +1 -1
- package/bin/runtime/tui/{es-CTzSjQIr-ycjt1qe7.js → es-DszcL9ow-jbam3c91.js} +1 -1
- package/bin/runtime/tui/{file-icon-Dm4kclYJ-3q8v5p17.js → file-icon-ERmEtnvf-36dyzwcc.js} +1 -1
- package/bin/runtime/tui/{flowDiagram-DWJPFMVM-DBzobYVV-4cj7ej0y.js → flowDiagram-DWJPFMVM-BqnDLkSA-0en8pzyq.js} +1 -1
- package/bin/runtime/tui/{fr-CJa19T6u-9s8h33zx.js → fr-C1f5tlDN-srfgbfy2.js} +1 -1
- package/bin/runtime/tui/{fr-DzMUS_ii-y0fbafxh.js → fr-DdTRG8PS-wrrphk88.js} +1 -1
- package/bin/runtime/tui/{ganttDiagram-T4ZO3ILL-DEz8pXJ3-8dgccj3k.js → ganttDiagram-T4ZO3ILL-Jumvk3JC-by7h568t.js} +1 -1
- package/bin/runtime/tui/{ghostty-web-CCdQQkL7-vcgsxfbc.js → ghostty-web-D6Di0TIV-tr98stsw.js} +1 -1
- package/bin/runtime/tui/{gitGraphDiagram-UUTBAWPF-B1xy3eyT-rm797zm4.js → gitGraphDiagram-UUTBAWPF-DPvs1hqN-4yxbasq6.js} +1 -1
- package/bin/runtime/tui/{graph-DvL8RI7R-t9err57x.js → graph-C6_QFoWn-zgbj1krx.js} +1 -1
- package/bin/runtime/tui/{home-DmuoxI-n-cbq58d0z.js → home-Tnq043rk-wqxsrnaf.js} +1 -1
- package/bin/runtime/tui/{index-9ak87jz6.html → index-1c3bmck8.html} +1 -1
- package/bin/runtime/tui/{index-D48wTpzk-szaxbs1f.js → index-BYGEr28T-79q2xqte.js} +7 -7
- package/bin/runtime/tui/{infoDiagram-42DDH7IO-CY9a-T0--59697tzy.js → infoDiagram-42DDH7IO-EW3wbn9T-4esgtj78.js} +1 -1
- package/bin/runtime/tui/{ishikawaDiagram-UXIWVN3A-B_zWGeIb-nhxjv6ss.js → ishikawaDiagram-UXIWVN3A-rIoEgmiV-t73vg52f.js} +1 -1
- package/bin/runtime/tui/{ja-C_rqNeyK-d5m11qwp.js → ja-Cj8jQmok-kk1mfg41.js} +1 -1
- package/bin/runtime/tui/{ja-W0HyNRpZ-p7vnmt5z.js → ja-Cl4E1_M7-1q9rsxcv.js} +1 -1
- package/bin/runtime/tui/{journeyDiagram-VCZTEJTY-COocfWw3-f1vhrm05.js → journeyDiagram-VCZTEJTY-D3pXisUW-y3bgz57t.js} +1 -1
- package/bin/runtime/tui/{kanban-definition-6JOO6SKY-BgGSdigx-9sn2agv0.js → kanban-definition-6JOO6SKY-D3yikjoM-acd1vpfa.js} +1 -1
- package/bin/runtime/tui/{ko-BKwHV3vR-cwtt2e1y.js → ko-DCOoR8nb-xxmb9eka.js} +1 -1
- package/bin/runtime/tui/{ko-DqkeoNPv-jncv5w2a.js → ko-DKWKg5l0-5kt5rv4n.js} +1 -1
- package/bin/runtime/tui/{layout-DcTrawCj-7ymma8jn.js → layout-DyD1y-LU-adxmbwxk.js} +1 -1
- package/bin/runtime/tui/{linear-BXvbBpfd-68kdcp26.js → linear-Mg6JBvsP-yn2m1xrq.js} +1 -1
- package/bin/runtime/tui/{list-BhXg9dyU-fkk1cmff.js → list-Clic9hNL-bzxccg7x.js} +1 -1
- package/bin/runtime/tui/{mermaid.core-Dsy-0un3-qgkgx3rh.js → mermaid.core-BBuk9zib-v1pg1bac.js} +5 -5
- package/bin/runtime/tui/{min-DlkmFtOU-qgzj2239.js → min-BI2lsGvT-0e4csnjp.js} +1 -1
- package/bin/runtime/tui/{mindmap-definition-QFDTVHPH-CHIWweIj-3psfws1p.js → mindmap-definition-QFDTVHPH-CN9OJK8d-0y5dm85d.js} +1 -1
- package/bin/runtime/tui/{no-rQ37yaFw-5egj9f84.js → no-BRXk9xy7-0d14mpz3.js} +1 -1
- package/bin/runtime/tui/{no-B5JtAosN-mrnnf4v9.js → no-DFWXB4Cq-0vwfsvrd.js} +1 -1
- package/bin/runtime/tui/node-main.js +2 -2
- package/bin/runtime/tui/{notifications-Dbohk8s9-dr75zv25.js → notifications-BCwX5WR0-f6pfj6rk.js} +1 -1
- package/bin/runtime/tui/{pieDiagram-DEJITSTG-CgnyIsOv-1kvkw7fy.js → pieDiagram-DEJITSTG-Dob4Rv1z-k6jwv6pe.js} +1 -1
- package/bin/runtime/tui/{pl-Cfp4mT9v-3dbwbhrv.js → pl-CRFIGIaj-v335a8zj.js} +1 -1
- package/bin/runtime/tui/{pl-C0zTM4jx-fwk2w5wr.js → pl-Cbs-5hry-3cndq089.js} +1 -1
- package/bin/runtime/tui/{provider-icon-CNc0gQ9T-fgt112yp.js → provider-icon-Cu61Vlk5-f79dwcb4.js} +1 -1
- package/bin/runtime/tui/{quadrantDiagram-34T5L4WZ-p8cjFAs7-ze4qg7fq.js → quadrantDiagram-34T5L4WZ-BZtHChLt-1p86yvtd.js} +1 -1
- package/bin/runtime/tui/{requirementDiagram-MS252O5E-B2A8ibYP-n4nc4jb7.js → requirementDiagram-MS252O5E-DB1jsNXq-fp5em4dm.js} +1 -1
- package/bin/runtime/tui/{ru-B2NdDoEN-7gpbawbj.js → ru-BYT4vXMJ-3zvyt0a7.js} +1 -1
- package/bin/runtime/tui/{ru-8z35hSrI-yke2f0ta.js → ru-CVWtyMAI-szax1993.js} +1 -1
- package/bin/runtime/tui/{sankeyDiagram-XADWPNL6-CRgs2pSV-5j5z1kva.js → sankeyDiagram-XADWPNL6-C5hsF3oz-6jg206gc.js} +1 -1
- package/bin/runtime/tui/{sequenceDiagram-FGHM5R23-mbiaStyX-hdf421b1.js → sequenceDiagram-FGHM5R23-Dq1S1gyk-fs8t2j20.js} +1 -1
- package/bin/runtime/tui/{session-B4xi1_Zm-hs4dm2me.js → session-DWPkCj4g-2d28j65a.js} +6 -6
- package/bin/runtime/tui/{settings-BNckNfnG-8wsh8k4g.js → settings-DUWDvVXr-9ttkw898.js} +1 -1
- package/bin/runtime/tui/{stateDiagram-FHFEXIEX-DgTGC1_9-qxjpk0tg.js → stateDiagram-FHFEXIEX-B7eGkSw_-gqh2e0x8.js} +1 -1
- package/bin/runtime/tui/stateDiagram-v2-QKLJ7IA2-DYhFFGNP-pr2fp0nm.js +1 -0
- package/bin/runtime/tui/{th-C6_Mrk5R-rj7jegja.js → th-B_pp2URV-fd6mnvh5.js} +1 -1
- package/bin/runtime/tui/{th-DTVxE1A--0bat8941.js → th-CAnW1OhO-bqeag5r2.js} +1 -1
- package/bin/runtime/tui/{timeline-definition-GMOUNBTQ-BvLbQOXe-q7d8q78n.js → timeline-definition-GMOUNBTQ-x0gQcFKs-zycbzjtn.js} +1 -1
- package/bin/runtime/tui/{tr-mnO_Sfr1-h18r7218.js → tr-CySPu43v-2phr3dxj.js} +1 -1
- package/bin/runtime/tui/{tr-C7NpHcnh-8pk6ps2y.js → tr-DpR8rZo9-mxevbymp.js} +1 -1
- package/bin/runtime/tui/{vennDiagram-DHZGUBPP-CJZiKs9J-7fsy77ja.js → vennDiagram-DHZGUBPP-BDU6DOW_-dz5hgta7.js} +1 -1
- package/bin/runtime/tui/{wardley-RL74JXVD-CRbS-hCM-5x57rspa.js → wardley-RL74JXVD-BlOnmaAF-732nnyx7.js} +1 -1
- package/bin/runtime/tui/{wardleyDiagram-NUSXRM2D-JvDWOoUK-jb93zgb1.js → wardleyDiagram-NUSXRM2D-DOSfbHIu-yezq8nd0.js} +1 -1
- package/bin/runtime/tui/{xychartDiagram-5P7HB3ND-DwgA9txK-mx375259.js → xychartDiagram-5P7HB3ND-B-wnNK_O-wqydm474.js} +1 -1
- package/bin/runtime/tui/{zh-BVW2efjH-v46tsbh3.js → zh-BBvy3TYC-abymwbw6.js} +1 -1
- package/bin/runtime/tui/{zh-nLHDAlnH-q9z5y0f7.js → zh-CoAGjE_j-2ngscf86.js} +1 -1
- package/bin/runtime/tui/{zht-C-wpCE8R-9ybym8c5.js → zht-C4aW5SLs-se3vap7v.js} +1 -1
- package/bin/runtime/tui/{zht-BvnLB218-26w1bm9e.js → zht-QWx3VtcS-3axa3ytf.js} +1 -1
- package/package.json +1 -1
- package/bin/runtime/tui/channel-DKMYbmLw-37g899qw.js +0 -1
- package/bin/runtime/tui/classDiagram-6PBFFD2Q-owKAn3mE-xeggsnrr.js +0 -1
- package/bin/runtime/tui/classDiagram-v2-HSJHXN6E-owKAn3mE-xeggsnrr.js +0 -1
- package/bin/runtime/tui/clone-DTTN6RlV-d9ayj751.js +0 -1
- package/bin/runtime/tui/stateDiagram-v2-QKLJ7IA2-18eXPx8Y-9gmztxef.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as dt,K as Be,ae as ke,l as Re,b as Ze,a as qe,q as Qe,t as Je,g as Ke,s as je,z as _e,G as tr,H as er,E as rr,c as ye,al as Ee,aI as ve,i as ir,d as ar,y as nr,aJ as or,aK as sr}from"./mermaid.core-Dsy-0un3.js";import{p as hr}from"./chunk-4BX2VUAB-BP0mg7Rb.js";import{p as lr}from"./wardley-RL74JXVD-CRbS-hCM.js";import{c as Se}from"./cytoscape.esm-NC3OMkQG.js";import{aw as fr}from"./index-D48wTpzk.js";import"./min-DlkmFtOU.js";import"./_baseUniq-D-gQv_o8.js";var se={exports:{}},he={exports:{}},le={exports:{}},cr=le.exports,we;function gr(){return we||(we=1,(function(C,P){(function(U,L){C.exports=L()})(cr,function(){return(function(w){var U={};function L(u){if(U[u])return U[u].exports;var h=U[u]={i:u,l:!1,exports:{}};return w[u].call(h.exports,h,h.exports,L),h.l=!0,h.exports}return L.m=w,L.c=U,L.i=function(u){return u},L.d=function(u,h,a){L.o(u,h)||Object.defineProperty(u,h,{configurable:!1,enumerable:!0,get:a})},L.n=function(u){var h=u&&u.__esModule?function(){return u.default}:function(){return u};return L.d(h,"a",h),h},L.o=function(u,h){return Object.prototype.hasOwnProperty.call(u,h)},L.p="",L(L.s=28)})([(function(w,U,L){function u(){}u.QUALITY=1,u.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,u.DEFAULT_INCREMENTAL=!1,u.DEFAULT_ANIMATION_ON_LAYOUT=!0,u.DEFAULT_ANIMATION_DURING_LAYOUT=!1,u.DEFAULT_ANIMATION_PERIOD=50,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,u.DEFAULT_GRAPH_MARGIN=15,u.NODE_DIMENSIONS_INCLUDE_LABELS=!1,u.SIMPLE_NODE_SIZE=40,u.SIMPLE_NODE_HALF_SIZE=u.SIMPLE_NODE_SIZE/2,u.EMPTY_COMPOUND_NODE_SIZE=40,u.MIN_EDGE_LENGTH=1,u.WORLD_BOUNDARY=1e6,u.INITIAL_WORLD_BOUNDARY=u.WORLD_BOUNDARY/1e3,u.WORLD_CENTER_X=1200,u.WORLD_CENTER_Y=900,w.exports=u}),(function(w,U,L){var u=L(2),h=L(8),a=L(9);function e(f,r,v){u.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=f,this.target=r}e.prototype=Object.create(u.prototype);for(var i in u)e[i]=u[i];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(f,r){for(var v=this.getOtherEnd(f),t=r.getGraphManager().getRoot();;){if(v.getOwner()==r)return v;if(v.getOwner()==t)break;v=v.getOwner().getParent()}return null},e.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.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=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},w.exports=e}),(function(w,U,L){function u(h){this.vGraphObject=h}w.exports=u}),(function(w,U,L){var u=L(2),h=L(10),a=L(13),e=L(0),i=L(16),f=L(5);function r(t,o,s,c){s==null&&c==null&&(c=o),u.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,s!=null&&o!=null?this.rect=new a(o.x,o.y,s.width,s.height):this.rect=new a}r.prototype=Object.create(u.prototype);for(var v in u)r[v]=u[v];r.prototype.getEdges=function(){return this.edges},r.prototype.getChild=function(){return this.child},r.prototype.getOwner=function(){return this.owner},r.prototype.getWidth=function(){return this.rect.width},r.prototype.setWidth=function(t){this.rect.width=t},r.prototype.getHeight=function(){return this.rect.height},r.prototype.setHeight=function(t){this.rect.height=t},r.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},r.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},r.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},r.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},r.prototype.getRect=function(){return this.rect},r.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},r.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},r.prototype.setRect=function(t,o){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=o.width,this.rect.height=o.height},r.prototype.setCenter=function(t,o){this.rect.x=t-this.rect.width/2,this.rect.y=o-this.rect.height/2},r.prototype.setLocation=function(t,o){this.rect.x=t,this.rect.y=o},r.prototype.moveBy=function(t,o){this.rect.x+=t,this.rect.y+=o},r.prototype.getEdgeListToNode=function(t){var o=[],s=this;return s.edges.forEach(function(c){if(c.target==t){if(c.source!=s)throw"Incorrect edge source!";o.push(c)}}),o},r.prototype.getEdgesBetween=function(t){var o=[],s=this;return s.edges.forEach(function(c){if(!(c.source==s||c.target==s))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&o.push(c)}),o},r.prototype.getNeighborsList=function(){var t=new Set,o=this;return o.edges.forEach(function(s){if(s.source==o)t.add(s.target);else{if(s.target!=o)throw"Incorrect incidency!";t.add(s.source)}}),t},r.prototype.withChildren=function(){var t=new Set,o,s;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;l<c.length;l++)o=c[l],s=o.withChildren(),s.forEach(function(T){t.add(T)});return t},r.prototype.getNoOfChildren=function(){var t=0,o;if(this.child==null)t=1;else for(var s=this.child.getNodes(),c=0;c<s.length;c++)o=s[c],t+=o.getNoOfChildren();return t==0&&(t=1),t},r.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},r.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)},r.prototype.scatter=function(){var t,o,s=-e.INITIAL_WORLD_BOUNDARY,c=e.INITIAL_WORLD_BOUNDARY;t=e.WORLD_CENTER_X+i.nextDouble()*(c-s)+s;var l=-e.INITIAL_WORLD_BOUNDARY,T=e.INITIAL_WORLD_BOUNDARY;o=e.WORLD_CENTER_Y+i.nextDouble()*(T-l)+l,this.rect.x=t,this.rect.y=o},r.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var o=t.getRight()-t.getLeft(),s=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(o+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>o?(this.rect.x-=(this.labelWidth-o)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(o+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(s+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>s?(this.rect.y-=(this.labelHeight-s)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(s+this.labelHeight))}}},r.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},r.prototype.transform=function(t){var o=this.rect.x;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var s=this.rect.y;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var c=new f(o,s),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},r.prototype.getLeft=function(){return this.rect.x},r.prototype.getRight=function(){return this.rect.x+this.rect.width},r.prototype.getTop=function(){return this.rect.y},r.prototype.getBottom=function(){return this.rect.y+this.rect.height},r.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},w.exports=r}),(function(w,U,L){var u=L(0);function h(){}for(var a in u)h[a]=u[a];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,w.exports=h}),(function(w,U,L){function u(h,a){h==null&&a==null?(this.x=0,this.y=0):(this.x=h,this.y=a)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.setX=function(h){this.x=h},u.prototype.setY=function(h){this.y=h},u.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},u.prototype.getCopy=function(){return new u(this.x,this.y)},u.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},w.exports=u}),(function(w,U,L){var u=L(2),h=L(10),a=L(0),e=L(7),i=L(3),f=L(1),r=L(13),v=L(12),t=L(11);function o(c,l,T){u.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof e?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}o.prototype=Object.create(u.prototype);for(var s in u)o[s]=u[s];o.prototype.getNodes=function(){return this.nodes},o.prototype.getEdges=function(){return this.edges},o.prototype.getGraphManager=function(){return this.graphManager},o.prototype.getParent=function(){return this.parent},o.prototype.getLeft=function(){return this.left},o.prototype.getRight=function(){return this.right},o.prototype.getTop=function(){return this.top},o.prototype.getBottom=function(){return this.bottom},o.prototype.isConnected=function(){return this.isConnected},o.prototype.add=function(c,l,T){if(l==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},o.prototype.remove=function(c){var l=c;if(c instanceof i){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),g,d=T.length,N=0;N<d;N++)g=T[N],g.isInterGraph?this.graphManager.remove(g):g.source.owner.remove(g);var F=this.nodes.indexOf(l);if(F==-1)throw"Node not in owner node list!";this.nodes.splice(F,1)}else if(c instanceof f){var g=c;if(g==null)throw"Edge is null!";if(!(g.source!=null&&g.target!=null))throw"Source and/or target is null!";if(!(g.source.owner!=null&&g.target.owner!=null&&g.source.owner==this&&g.target.owner==this))throw"Source and/or target owner is invalid!";var A=g.source.edges.indexOf(g),G=g.target.edges.indexOf(g);if(!(A>-1&&G>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(A,1),g.target!=g.source&&g.target.edges.splice(G,1);var F=g.source.owner.getEdges().indexOf(g);if(F==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(F,1)}},o.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,d,N=this.getNodes(),F=N.length,A=0;A<F;A++){var G=N[A];T=G.getTop(),g=G.getLeft(),c>T&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(N[0].getParent().paddingLeft!=null?d=N[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new v(this.left,this.top))},o.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,N,F,A,G,k,X=this.nodes,J=X.length,D=0;D<J;D++){var rt=X[D];c&&rt.child!=null&&rt.updateBounds(),N=rt.getLeft(),F=rt.getRight(),A=rt.getTop(),G=rt.getBottom(),l>N&&(l=N),T<F&&(T=F),g>A&&(g=A),d<G&&(d=G)}var n=new r(l,g,T-l,d-g);l==h.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),X[0].getParent().paddingLeft!=null?k=X[0].getParent().paddingLeft:k=this.margin,this.left=n.x-k,this.right=n.x+n.width+k,this.top=n.y-k,this.bottom=n.y+n.height+k},o.calculateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,N,F,A,G,k=c.length,X=0;X<k;X++){var J=c[X];N=J.getLeft(),F=J.getRight(),A=J.getTop(),G=J.getBottom(),l>N&&(l=N),T<F&&(T=F),g>A&&(g=A),d<G&&(d=G)}var D=new r(l,g,T-l,d-g);return D},o.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},o.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},o.prototype.calcEstimatedSize=function(){for(var c=0,l=this.nodes,T=l.length,g=0;g<T;g++){var d=l[g];c+=d.calcEstimatedSize()}return c==0?this.estimatedSize=a.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=c/Math.sqrt(this.nodes.length),this.estimatedSize},o.prototype.updateConnected=function(){var c=this;if(this.nodes.length==0){this.isConnected=!0;return}var l=new t,T=new Set,g=this.nodes[0],d,N,F=g.withChildren();for(F.forEach(function(D){l.push(D),T.add(D)});l.length!==0;){g=l.shift(),d=g.getEdges();for(var A=d.length,G=0;G<A;G++){var k=d[G];if(N=k.getOtherEndInGraph(g,this),N!=null&&!T.has(N)){var X=N.withChildren();X.forEach(function(D){l.push(D),T.add(D)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var J=0;T.forEach(function(D){D.owner==c&&J++}),J==this.nodes.length&&(this.isConnected=!0)}},w.exports=o}),(function(w,U,L){var u,h=L(1);function a(e){u=L(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(e,i);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(e,i,f,r,v){if(f==null&&r==null&&v==null){if(e==null)throw"Graph is null!";if(i==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(i.child!=null)throw"Already has a child!";return e.parent=i,i.child=e,e}else{v=f,r=i,f=e;var t=r.getOwner(),o=v.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(o!=null&&o.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==o)return f.isInterGraph=!1,t.add(f,r,v);if(f.isInterGraph=!0,f.source=r,f.target=v,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},a.prototype.remove=function(e){if(e instanceof u){var i=e;if(i.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(i==this.rootGraph||i.parent!=null&&i.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(i.getEdges());for(var r,v=f.length,t=0;t<v;t++)r=f[t],i.remove(r);var o=[];o=o.concat(i.getNodes());var s;v=o.length;for(var t=0;t<v;t++)s=o[t],i.remove(s);i==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(i);this.graphs.splice(c,1),i.parent=null}else if(e instanceof h){if(r=e,r==null)throw"Edge is null!";if(!r.isInterGraph)throw"Not an inter-graph edge!";if(!(r.source!=null&&r.target!=null))throw"Source and/or target is null!";if(!(r.source.edges.indexOf(r)!=-1&&r.target.edges.indexOf(r)!=-1))throw"Source and/or target doesn't know this edge!";var c=r.source.edges.indexOf(r);if(r.source.edges.splice(c,1),c=r.target.edges.indexOf(r),r.target.edges.splice(c,1),!(r.source.owner!=null&&r.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(r.source.owner.getGraphManager().edges.indexOf(r)==-1)throw"Not in owner graph manager's edge list!";var c=r.source.owner.getGraphManager().edges.indexOf(r);r.source.owner.getGraphManager().edges.splice(c,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],i=this.getGraphs(),f=i.length,r=0;r<f;r++)e=e.concat(i[r].getNodes());this.allNodes=e}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],i=this.getGraphs();i.length;for(var f=0;f<i.length;f++)e=e.concat(i[f].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=e,e.parent==null&&(e.parent=this.layout.newNode("Root node"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(e,i){if(!(e!=null&&i!=null))throw"assert failed";if(e==i)return!0;var f=e.getOwner(),r;do{if(r=f.getParent(),r==null)break;if(r==i)return!0;if(f=r.getOwner(),f==null)break}while(!0);f=i.getOwner();do{if(r=f.getParent(),r==null)break;if(r==e)return!0;if(f=r.getOwner(),f==null)break}while(!0);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var e,i,f,r,v,t=this.getAllEdges(),o=t.length,s=0;s<o;s++){if(e=t[s],i=e.source,f=e.target,e.lca=null,e.sourceInLca=i,e.targetInLca=f,i==f){e.lca=i.getOwner();continue}for(r=i.getOwner();e.lca==null;){for(e.targetInLca=f,v=f.getOwner();e.lca==null;){if(v==r){e.lca=v;break}if(v==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=v.getParent(),v=e.targetInLca.getOwner()}if(r==this.rootGraph)break;e.lca==null&&(e.sourceInLca=r.getParent(),r=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}},a.prototype.calcLowestCommonAncestor=function(e,i){if(e==i)return e.getOwner();var f=e.getOwner();do{if(f==null)break;var r=i.getOwner();do{if(r==null)break;if(r==f)return r;r=r.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},a.prototype.calcInclusionTreeDepths=function(e,i){e==null&&i==null&&(e=this.rootGraph,i=1);for(var f,r=e.getNodes(),v=r.length,t=0;t<v;t++)f=r[t],f.inclusionTreeDepth=i,f.child!=null&&this.calcInclusionTreeDepths(f.child,i+1)},a.prototype.includesInvalidEdge=function(){for(var e,i=[],f=this.edges.length,r=0;r<f;r++)e=this.edges[r],this.isOneAncestorOfOther(e.source,e.target)&&i.push(e);for(var r=0;r<i.length;r++)this.remove(i[r]);return!1},w.exports=a}),(function(w,U,L){var u=L(12);function h(){}h.calcSeparationAmount=function(a,e,i,f){if(!a.intersects(e))throw"assert failed";var r=new Array(2);this.decideDirectionsForOverlappingNodes(a,e,r),i[0]=Math.min(a.getRight(),e.getRight())-Math.max(a.x,e.x),i[1]=Math.min(a.getBottom(),e.getBottom())-Math.max(a.y,e.y),a.getX()<=e.getX()&&a.getRight()>=e.getRight()?i[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(i[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(i[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var v=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(v=1);var t=v*i[0],o=i[1]/v;i[0]<o?o=i[0]:t=i[1],i[0]=-1*r[0]*(o/2+f),i[1]=-1*r[1]*(t/2+f)},h.decideDirectionsForOverlappingNodes=function(a,e,i){a.getCenterX()<e.getCenterX()?i[0]=-1:i[0]=1,a.getCenterY()<e.getCenterY()?i[1]=-1:i[1]=1},h.getIntersection2=function(a,e,i){var f=a.getCenterX(),r=a.getCenterY(),v=e.getCenterX(),t=e.getCenterY();if(a.intersects(e))return i[0]=f,i[1]=r,i[2]=v,i[3]=t,!0;var o=a.getX(),s=a.getY(),c=a.getRight(),l=a.getX(),T=a.getBottom(),g=a.getRight(),d=a.getWidthHalf(),N=a.getHeightHalf(),F=e.getX(),A=e.getY(),G=e.getRight(),k=e.getX(),X=e.getBottom(),J=e.getRight(),D=e.getWidthHalf(),rt=e.getHeightHalf(),n=!1,m=!1;if(f===v){if(r>t)return i[0]=f,i[1]=s,i[2]=v,i[3]=X,!1;if(r<t)return i[0]=f,i[1]=T,i[2]=v,i[3]=A,!1}else if(r===t){if(f>v)return i[0]=o,i[1]=r,i[2]=G,i[3]=t,!1;if(f<v)return i[0]=c,i[1]=r,i[2]=F,i[3]=t,!1}else{var p=a.height/a.width,E=e.height/e.width,y=(t-r)/(v-f),I=void 0,M=void 0,R=void 0,W=void 0,x=void 0,q=void 0;if(-p===y?f>v?(i[0]=l,i[1]=T,n=!0):(i[0]=c,i[1]=s,n=!0):p===y&&(f>v?(i[0]=o,i[1]=s,n=!0):(i[0]=g,i[1]=T,n=!0)),-E===y?v>f?(i[2]=k,i[3]=X,m=!0):(i[2]=G,i[3]=A,m=!0):E===y&&(v>f?(i[2]=F,i[3]=A,m=!0):(i[2]=J,i[3]=X,m=!0)),n&&m)return!1;if(f>v?r>t?(I=this.getCardinalDirection(p,y,4),M=this.getCardinalDirection(E,y,2)):(I=this.getCardinalDirection(-p,y,3),M=this.getCardinalDirection(-E,y,1)):r>t?(I=this.getCardinalDirection(-p,y,1),M=this.getCardinalDirection(-E,y,3)):(I=this.getCardinalDirection(p,y,2),M=this.getCardinalDirection(E,y,4)),!n)switch(I){case 1:W=s,R=f+-N/y,i[0]=R,i[1]=W;break;case 2:R=g,W=r+d*y,i[0]=R,i[1]=W;break;case 3:W=T,R=f+N/y,i[0]=R,i[1]=W;break;case 4:R=l,W=r+-d*y,i[0]=R,i[1]=W;break}if(!m)switch(M){case 1:q=A,x=v+-rt/y,i[2]=x,i[3]=q;break;case 2:x=J,q=t+D*y,i[2]=x,i[3]=q;break;case 3:q=X,x=v+rt/y,i[2]=x,i[3]=q;break;case 4:x=k,q=t+-D*y,i[2]=x,i[3]=q;break}}return!1},h.getCardinalDirection=function(a,e,i){return a>e?i:1+i%4},h.getIntersection=function(a,e,i,f){if(f==null)return this.getIntersection2(a,e,i);var r=a.x,v=a.y,t=e.x,o=e.y,s=i.x,c=i.y,l=f.x,T=f.y,g=void 0,d=void 0,N=void 0,F=void 0,A=void 0,G=void 0,k=void 0,X=void 0,J=void 0;return N=o-v,A=r-t,k=t*v-r*o,F=T-c,G=s-l,X=l*c-s*T,J=N*G-F*A,J===0?null:(g=(A*X-G*k)/J,d=(F*k-N*X)/J,new u(g,d))},h.angleOfVector=function(a,e,i,f){var r=void 0;return a!==i?(r=Math.atan((f-e)/(i-a)),i<a?r+=Math.PI:f<e&&(r+=this.TWO_PI)):f<e?r=this.ONE_AND_HALF_PI:r=this.HALF_PI,r},h.doIntersect=function(a,e,i,f){var r=a.x,v=a.y,t=e.x,o=e.y,s=i.x,c=i.y,l=f.x,T=f.y,g=(t-r)*(T-c)-(l-s)*(o-v);if(g===0)return!1;var d=((T-c)*(l-r)+(s-l)*(T-v))/g,N=((v-o)*(l-r)+(t-r)*(T-v))/g;return 0<d&&d<1&&0<N&&N<1},h.findCircleLineIntersections=function(a,e,i,f,r,v,t){var o=(i-a)*(i-a)+(f-e)*(f-e),s=2*((a-r)*(i-a)+(e-v)*(f-e)),c=(a-r)*(a-r)+(e-v)*(e-v)-t*t,l=s*s-4*o*c;if(l>=0){var T=(-s+Math.sqrt(s*s-4*o*c))/(2*o),g=(-s-Math.sqrt(s*s-4*o*c))/(2*o),d=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,w.exports=h}),(function(w,U,L){function u(){}u.sign=function(h){return h>0?1:h<0?-1:0},u.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},u.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},w.exports=u}),(function(w,U,L){function u(){}u.MAX_VALUE=2147483647,u.MIN_VALUE=-2147483648,w.exports=u}),(function(w,U,L){var u=(function(){function r(v,t){for(var o=0;o<t.length;o++){var s=t[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(v,s.key,s)}}return function(v,t,o){return t&&r(v.prototype,t),o&&r(v,o),v}})();function h(r,v){if(!(r instanceof v))throw new TypeError("Cannot call a class as a function")}var a=function(v){return{value:v,next:null,prev:null}},e=function(v,t,o,s){return v!==null?v.next=t:s.head=t,o!==null?o.prev=t:s.tail=t,t.prev=v,t.next=o,s.length++,t},i=function(v,t){var o=v.prev,s=v.next;return o!==null?o.next=s:t.head=s,s!==null?s.prev=o:t.tail=o,v.prev=v.next=null,t.length--,v},f=(function(){function r(v){var t=this;h(this,r),this.length=0,this.head=null,this.tail=null,v?.forEach(function(o){return t.push(o)})}return u(r,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,o){return e(o.prev,a(t),o,this)}},{key:"insertAfter",value:function(t,o){return e(o,a(t),o.next,this)}},{key:"insertNodeBefore",value:function(t,o){return e(o.prev,t,o,this)}},{key:"insertNodeAfter",value:function(t,o){return e(o,t,o.next,this)}},{key:"push",value:function(t){return e(this.tail,a(t),null,this)}},{key:"unshift",value:function(t){return e(null,a(t),this.head,this)}},{key:"remove",value:function(t){return i(t,this)}},{key:"pop",value:function(){return i(this.tail,this).value}},{key:"popNode",value:function(){return i(this.tail,this)}},{key:"shift",value:function(){return i(this.head,this).value}},{key:"shiftNode",value:function(){return i(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var o=1,s=this.head;o<t;)s=s.next,o++;return s.value}}},{key:"set_object_at",value:function(t,o){if(t<=this.length()){for(var s=1,c=this.head;s<t;)c=c.next,s++;c.value=o}}}]),r})();w.exports=f}),(function(w,U,L){function u(h,a,e){this.x=null,this.y=null,h==null&&a==null&&e==null?(this.x=0,this.y=0):typeof h=="number"&&typeof a=="number"&&e==null?(this.x=h,this.y=a):h.constructor.name=="Point"&&a==null&&e==null&&(e=h,this.x=e.x,this.y=e.y)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.getLocation=function(){return new u(this.x,this.y)},u.prototype.setLocation=function(h,a,e){h.constructor.name=="Point"&&a==null&&e==null?(e=h,this.setLocation(e.x,e.y)):typeof h=="number"&&typeof a=="number"&&e==null&&(parseInt(h)==h&&parseInt(a)==a?this.move(h,a):(this.x=Math.floor(h+.5),this.y=Math.floor(a+.5)))},u.prototype.move=function(h,a){this.x=h,this.y=a},u.prototype.translate=function(h,a){this.x+=h,this.y+=a},u.prototype.equals=function(h){if(h.constructor.name=="Point"){var a=h;return this.x==a.x&&this.y==a.y}return this==h},u.prototype.toString=function(){return new u().constructor.name+"[x="+this.x+",y="+this.y+"]"},w.exports=u}),(function(w,U,L){function u(h,a,e,i){this.x=0,this.y=0,this.width=0,this.height=0,h!=null&&a!=null&&e!=null&&i!=null&&(this.x=h,this.y=a,this.width=e,this.height=i)}u.prototype.getX=function(){return this.x},u.prototype.setX=function(h){this.x=h},u.prototype.getY=function(){return this.y},u.prototype.setY=function(h){this.y=h},u.prototype.getWidth=function(){return this.width},u.prototype.setWidth=function(h){this.width=h},u.prototype.getHeight=function(){return this.height},u.prototype.setHeight=function(h){this.height=h},u.prototype.getRight=function(){return this.x+this.width},u.prototype.getBottom=function(){return this.y+this.height},u.prototype.intersects=function(h){return!(this.getRight()<h.x||this.getBottom()<h.y||h.getRight()<this.x||h.getBottom()<this.y)},u.prototype.getCenterX=function(){return this.x+this.width/2},u.prototype.getMinX=function(){return this.getX()},u.prototype.getMaxX=function(){return this.getX()+this.width},u.prototype.getCenterY=function(){return this.y+this.height/2},u.prototype.getMinY=function(){return this.getY()},u.prototype.getMaxY=function(){return this.getY()+this.height},u.prototype.getWidthHalf=function(){return this.width/2},u.prototype.getHeightHalf=function(){return this.height/2},w.exports=u}),(function(w,U,L){var u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function h(){}h.lastID=0,h.createID=function(a){return h.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=h.getString(),h.lastID++),a.uniqueID)},h.getString=function(a){return a==null&&(a=h.lastID),"Object#"+a},h.isPrimitive=function(a){var e=typeof a>"u"?"undefined":u(a);return a==null||e!="object"&&e!="function"},w.exports=h}),(function(w,U,L){function u(s){if(Array.isArray(s)){for(var c=0,l=Array(s.length);c<s.length;c++)l[c]=s[c];return l}else return Array.from(s)}var h=L(0),a=L(7),e=L(3),i=L(1),f=L(6),r=L(5),v=L(17),t=L(29);function o(s){t.call(this),this.layoutQuality=h.QUALITY,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=h.DEFAULT_INCREMENTAL,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,s!=null&&(this.isRemoteUse=s)}o.RANDOM_SEED=1,o.prototype=Object.create(t.prototype),o.prototype.getGraphManager=function(){return this.graphManager},o.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},o.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},o.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},o.prototype.newGraphManager=function(){var s=new a(this);return this.graphManager=s,s},o.prototype.newGraph=function(s){return new f(null,this.graphManager,s)},o.prototype.newNode=function(s){return new e(this.graphManager,s)},o.prototype.newEdge=function(s){return new i(null,null,s)},o.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},o.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var s;return this.checkLayoutSuccess()?s=!1:s=this.layout(),h.ANIMATE==="during"?!1:(s&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,s)},o.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},o.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var s=this.graphManager.getAllEdges(),c=0;c<s.length;c++)s[c];for(var l=this.graphManager.getRoot().getNodes(),c=0;c<l.length;c++)l[c];this.update(this.graphManager.getRoot())}},o.prototype.update=function(s){if(s==null)this.update2();else if(s instanceof e){var c=s;if(c.getChild()!=null)for(var l=c.getChild().getNodes(),T=0;T<l.length;T++)update(l[T]);if(c.vGraphObject!=null){var g=c.vGraphObject;g.update(c)}}else if(s instanceof i){var d=s;if(d.vGraphObject!=null){var N=d.vGraphObject;N.update(d)}}else if(s instanceof f){var F=s;if(F.vGraphObject!=null){var A=F.vGraphObject;A.update(F)}}},o.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=h.QUALITY,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=h.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},o.prototype.transform=function(s){if(s==null)this.transform(new r(0,0));else{var c=new v,l=this.graphManager.getRoot().updateLeftTop();if(l!=null){c.setWorldOrgX(s.x),c.setWorldOrgY(s.y),c.setDeviceOrgX(l.x),c.setDeviceOrgY(l.y);for(var T=this.getAllNodes(),g,d=0;d<T.length;d++)g=T[d],g.transform(c)}}},o.prototype.positionNodesRandomly=function(s){if(s==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,l,T=s.getNodes(),g=0;g<T.length;g++)c=T[g],l=c.getChild(),l==null||l.getNodes().length==0?c.scatter():(this.positionNodesRandomly(l),c.updateBounds())},o.prototype.getFlatForest=function(){for(var s=[],c=!0,l=this.graphManager.getRoot().getNodes(),T=!0,g=0;g<l.length;g++)l[g].getChild()!=null&&(T=!1);if(!T)return s;var d=new Set,N=[],F=new Map,A=[];for(A=A.concat(l);A.length>0&&c;){for(N.push(A[0]);N.length>0&&c;){var G=N[0];N.splice(0,1),d.add(G);for(var k=G.getEdges(),g=0;g<k.length;g++){var X=k[g].getOtherEnd(G);if(F.get(G)!=X)if(!d.has(X))N.push(X),F.set(X,G);else{c=!1;break}}}if(!c)s=[];else{var J=[].concat(u(d));s.push(J);for(var g=0;g<J.length;g++){var D=J[g],rt=A.indexOf(D);rt>-1&&A.splice(rt,1)}d=new Set,F=new Map}}return s},o.prototype.createDummyNodesForBendpoints=function(s){for(var c=[],l=s.source,T=this.graphManager.calcLowestCommonAncestor(s.source,s.target),g=0;g<s.bendpoints.length;g++){var d=this.newNode(null);d.setRect(new Point(0,0),new Dimension(1,1)),T.add(d);var N=this.newEdge(null);this.graphManager.add(N,l,d),c.add(d),l=d}var N=this.newEdge(null);return this.graphManager.add(N,l,s.target),this.edgeToDummyNodes.set(s,c),s.isInterGraph()?this.graphManager.remove(s):T.remove(s),c},o.prototype.createBendpointsFromDummyNodes=function(){var s=[];s=s.concat(this.graphManager.getAllEdges()),s=[].concat(u(this.edgeToDummyNodes.keys())).concat(s);for(var c=0;c<s.length;c++){var l=s[c];if(l.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(l),g=0;g<T.length;g++){var d=T[g],N=new r(d.getCenterX(),d.getCenterY()),F=l.bendpoints.get(g);F.x=N.x,F.y=N.y,d.getOwner().remove(d)}this.graphManager.add(l,l.source,l.target)}}},o.transform=function(s,c,l,T){if(l!=null&&T!=null){var g=c;if(s<=50){var d=c/l;g-=(c-d)/50*(50-s)}else{var N=c*T;g+=(N-c)/50*(s-50)}return g}else{var F,A;return s<=50?(F=9*c/500,A=c/10):(F=9*c/50,A=-8*c),F*s+A}},o.findCenterOfTree=function(s){var c=[];c=c.concat(s);var l=[],T=new Map,g=!1,d=null;(c.length==1||c.length==2)&&(g=!0,d=c[0]);for(var N=0;N<c.length;N++){var F=c[N],A=F.getNeighborsList().size;T.set(F,F.getNeighborsList().size),A==1&&l.push(F)}var G=[];for(G=G.concat(l);!g;){var k=[];k=k.concat(G),G=[];for(var N=0;N<c.length;N++){var F=c[N],X=c.indexOf(F);X>=0&&c.splice(X,1);var J=F.getNeighborsList();J.forEach(function(n){if(l.indexOf(n)<0){var m=T.get(n),p=m-1;p==1&&G.push(n),T.set(n,p)}})}l=l.concat(G),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},o.prototype.setGraphManager=function(s){this.graphManager=s},w.exports=o}),(function(w,U,L){function u(){}u.seed=1,u.x=0,u.nextDouble=function(){return u.x=Math.sin(u.seed++)*1e4,u.x-Math.floor(u.x)},w.exports=u}),(function(w,U,L){var u=L(5);function h(a,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(a){this.lworldExtX=a},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(a){this.lworldExtY=a},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},h.prototype.transformX=function(a){var e=0,i=this.lworldExtX;return i!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/i),e},h.prototype.transformY=function(a){var e=0,i=this.lworldExtY;return i!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/i),e},h.prototype.inverseTransformX=function(a){var e=0,i=this.ldeviceExtX;return i!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/i),e},h.prototype.inverseTransformY=function(a){var e=0,i=this.ldeviceExtY;return i!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/i),e},h.prototype.inverseTransformPoint=function(a){var e=new u(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return e},w.exports=h}),(function(w,U,L){function u(t){if(Array.isArray(t)){for(var o=0,s=Array(t.length);o<t.length;o++)s[o]=t[o];return s}else return Array.from(t)}var h=L(15),a=L(4),e=L(0),i=L(8),f=L(9);function r(){h.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}r.prototype=Object.create(h.prototype);for(var v in h)r[v]=h[v];r.prototype.initParameters=function(){h.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},r.prototype.calcIdealEdgeLengths=function(){for(var t,o,s,c,l,T,g,d=this.getGraphManager().getAllEdges(),N=0;N<d.length;N++)t=d[N],o=t.idealLength,t.isInterGraph&&(c=t.getSource(),l=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),g=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+g-2*e.SIMPLE_NODE_SIZE),s=t.getLca().getInclusionTreeDepth(),t.idealLength+=o*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+l.getInclusionTreeDepth()-2*s))},r.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},r.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),o,s=0;s<t.length;s++)o=t[s],this.calcSpringForce(o,o.idealLength)},r.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s,c,l,T,g=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,s=0;s<g.length;s++)l=g[s],this.calculateRepulsionForceOfANode(l,d,t,o),d.add(l);else for(s=0;s<g.length;s++)for(l=g[s],c=s+1;c<g.length;c++)T=g[c],l.getOwner()==T.getOwner()&&this.calcRepulsionForce(l,T)},r.prototype.calcGravitationalForces=function(){for(var t,o=this.getAllNodesToApplyGravitation(),s=0;s<o.length;s++)t=o[s],this.calcGravitationalForce(t)},r.prototype.moveNodes=function(){for(var t=this.getAllNodes(),o,s=0;s<t.length;s++)o=t[s],o.move()},r.prototype.calcSpringForce=function(t,o){var s=t.getSource(),c=t.getTarget(),l,T,g,d;if(this.uniformLeafNodeSizes&&s.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;l=t.getLength(),l!=0&&(T=t.edgeElasticity*(l-o),g=T*(t.lengthX/l),d=T*(t.lengthY/l),s.springForceX+=g,s.springForceY+=d,c.springForceX-=g,c.springForceY-=d)},r.prototype.calcRepulsionForce=function(t,o){var s=t.getRect(),c=o.getRect(),l=new Array(2),T=new Array(4),g,d,N,F,A,G,k;if(s.intersects(c)){i.calcSeparationAmount(s,c,l,a.DEFAULT_EDGE_LENGTH/2),G=2*l[0],k=2*l[1];var X=t.noOfChildren*o.noOfChildren/(t.noOfChildren+o.noOfChildren);t.repulsionForceX-=X*G,t.repulsionForceY-=X*k,o.repulsionForceX+=X*G,o.repulsionForceY+=X*k}else this.uniformLeafNodeSizes&&t.getChild()==null&&o.getChild()==null?(g=c.getCenterX()-s.getCenterX(),d=c.getCenterY()-s.getCenterY()):(i.getIntersection(s,c,T),g=T[2]-T[0],d=T[3]-T[1]),Math.abs(g)<a.MIN_REPULSION_DIST&&(g=f.sign(g)*a.MIN_REPULSION_DIST),Math.abs(d)<a.MIN_REPULSION_DIST&&(d=f.sign(d)*a.MIN_REPULSION_DIST),N=g*g+d*d,F=Math.sqrt(N),A=(t.nodeRepulsion/2+o.nodeRepulsion/2)*t.noOfChildren*o.noOfChildren/N,G=A*g/F,k=A*d/F,t.repulsionForceX-=G,t.repulsionForceY-=k,o.repulsionForceX+=G,o.repulsionForceY+=k},r.prototype.calcGravitationalForce=function(t){var o,s,c,l,T,g,d,N;o=t.getOwner(),s=(o.getRight()+o.getLeft())/2,c=(o.getTop()+o.getBottom())/2,l=t.getCenterX()-s,T=t.getCenterY()-c,g=Math.abs(l)+t.getWidth()/2,d=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(N=o.getEstimatedSize()*this.gravityRangeFactor,(g>N||d>N)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(N=o.getEstimatedSize()*this.compoundGravityRangeFactor,(g>N||d>N)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},r.prototype.isConverged=function(){var t,o=!1;return this.totalIterations>this.maxIterations/3&&(o=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||o},r.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},r.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,o=this.graphManager.getAllNodes(),s=0;s<o.length;s++)t=o[s],t.noOfChildren=t.getNoOfChildren()},r.prototype.calcGrid=function(t){var o=0,s=0;o=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),s=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(o),l=0;l<o;l++)c[l]=new Array(s);for(var l=0;l<o;l++)for(var T=0;T<s;T++)c[l][T]=new Array;return c},r.prototype.addNodeToGrid=function(t,o,s){var c=0,l=0,T=0,g=0;c=parseInt(Math.floor((t.getRect().x-o)/this.repulsionRange)),l=parseInt(Math.floor((t.getRect().width+t.getRect().x-o)/this.repulsionRange)),T=parseInt(Math.floor((t.getRect().y-s)/this.repulsionRange)),g=parseInt(Math.floor((t.getRect().height+t.getRect().y-s)/this.repulsionRange));for(var d=c;d<=l;d++)for(var N=T;N<=g;N++)this.grid[d][N].push(t),t.setGridCoordinates(c,l,T,g)},r.prototype.updateGrid=function(){var t,o,s=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<s.length;t++)o=s[t],this.addNodeToGrid(o,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},r.prototype.calculateRepulsionForceOfANode=function(t,o,s,c){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&s||c){var l=new Set;t.surrounding=new Array;for(var T,g=this.grid,d=t.startX-1;d<t.finishX+2;d++)for(var N=t.startY-1;N<t.finishY+2;N++)if(!(d<0||N<0||d>=g.length||N>=g[0].length)){for(var F=0;F<g[d][N].length;F++)if(T=g[d][N][F],!(t.getOwner()!=T.getOwner()||t==T)&&!o.has(T)&&!l.has(T)){var A=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),G=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);A<=this.repulsionRange&&G<=this.repulsionRange&&l.add(T)}}t.surrounding=[].concat(u(l))}for(d=0;d<t.surrounding.length;d++)this.calcRepulsionForce(t,t.surrounding[d])},r.prototype.calcRepulsionRange=function(){return 0},w.exports=r}),(function(w,U,L){var u=L(1),h=L(4);function a(i,f,r){u.call(this,i,f,r),this.idealLength=h.DEFAULT_EDGE_LENGTH,this.edgeElasticity=h.DEFAULT_SPRING_STRENGTH}a.prototype=Object.create(u.prototype);for(var e in u)a[e]=u[e];w.exports=a}),(function(w,U,L){var u=L(3),h=L(4);function a(i,f,r,v){u.call(this,i,f,r,v),this.nodeRepulsion=h.DEFAULT_REPULSION_STRENGTH,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=[]}a.prototype=Object.create(u.prototype);for(var e in u)a[e]=u[e];a.prototype.setGridCoordinates=function(i,f,r,v){this.startX=i,this.finishX=f,this.startY=r,this.finishY=v},w.exports=a}),(function(w,U,L){function u(h,a){this.width=0,this.height=0,h!==null&&a!==null&&(this.height=a,this.width=h)}u.prototype.getWidth=function(){return this.width},u.prototype.setWidth=function(h){this.width=h},u.prototype.getHeight=function(){return this.height},u.prototype.setHeight=function(h){this.height=h},w.exports=u}),(function(w,U,L){var u=L(14);function h(){this.map={},this.keys=[]}h.prototype.put=function(a,e){var i=u.createID(a);this.contains(i)||(this.map[i]=e,this.keys.push(a))},h.prototype.contains=function(a){return u.createID(a),this.map[a]!=null},h.prototype.get=function(a){var e=u.createID(a);return this.map[e]},h.prototype.keySet=function(){return this.keys},w.exports=h}),(function(w,U,L){var u=L(14);function h(){this.set={}}h.prototype.add=function(a){var e=u.createID(a);this.contains(e)||(this.set[e]=a)},h.prototype.remove=function(a){delete this.set[u.createID(a)]},h.prototype.clear=function(){this.set={}},h.prototype.contains=function(a){return this.set[u.createID(a)]==a},h.prototype.isEmpty=function(){return this.size()===0},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAllTo=function(a){for(var e=Object.keys(this.set),i=e.length,f=0;f<i;f++)a.push(this.set[e[f]])},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAll=function(a){for(var e=a.length,i=0;i<e;i++){var f=a[i];this.add(f)}},w.exports=h}),(function(w,U,L){function u(){}u.multMat=function(h,a){for(var e=[],i=0;i<h.length;i++){e[i]=[];for(var f=0;f<a[0].length;f++){e[i][f]=0;for(var r=0;r<h[0].length;r++)e[i][f]+=h[i][r]*a[r][f]}}return e},u.transpose=function(h){for(var a=[],e=0;e<h[0].length;e++){a[e]=[];for(var i=0;i<h.length;i++)a[e][i]=h[i][e]}return a},u.multCons=function(h,a){for(var e=[],i=0;i<h.length;i++)e[i]=h[i]*a;return e},u.minusOp=function(h,a){for(var e=[],i=0;i<h.length;i++)e[i]=h[i]-a[i];return e},u.dotProduct=function(h,a){for(var e=0,i=0;i<h.length;i++)e+=h[i]*a[i];return e},u.mag=function(h){return Math.sqrt(this.dotProduct(h,h))},u.normalize=function(h){for(var a=[],e=this.mag(h),i=0;i<h.length;i++)a[i]=h[i]/e;return a},u.multGamma=function(h){for(var a=[],e=0,i=0;i<h.length;i++)e+=h[i];e*=-1/h.length;for(var f=0;f<h.length;f++)a[f]=e+h[f];return a},u.multL=function(h,a,e){for(var i=[],f=[],r=[],v=0;v<a[0].length;v++){for(var t=0,o=0;o<a.length;o++)t+=-.5*a[o][v]*h[o];f[v]=t}for(var s=0;s<e.length;s++){for(var c=0,l=0;l<e.length;l++)c+=e[s][l]*f[l];r[s]=c}for(var T=0;T<a.length;T++){for(var g=0,d=0;d<a[0].length;d++)g+=a[T][d]*r[d];i[T]=g}return i},w.exports=u}),(function(w,U,L){var u=(function(){function i(f,r){for(var v=0;v<r.length;v++){var t=r[v];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(f,t.key,t)}}return function(f,r,v){return r&&i(f.prototype,r),v&&i(f,v),f}})();function h(i,f){if(!(i instanceof f))throw new TypeError("Cannot call a class as a function")}var a=L(11),e=(function(){function i(f,r){h(this,i),(r!==null||r!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var v=void 0;f instanceof a?v=f.size():v=f.length,this._quicksort(f,0,v-1)}return u(i,[{key:"_quicksort",value:function(r,v,t){if(v<t){var o=this._partition(r,v,t);this._quicksort(r,v,o),this._quicksort(r,o+1,t)}}},{key:"_partition",value:function(r,v,t){for(var o=this._get(r,v),s=v,c=t;;){for(;this.compareFunction(o,this._get(r,c));)c--;for(;this.compareFunction(this._get(r,s),o);)s++;if(s<c)this._swap(r,s,c),s++,c--;else return c}}},{key:"_get",value:function(r,v){return r instanceof a?r.get_object_at(v):r[v]}},{key:"_set",value:function(r,v,t){r instanceof a?r.set_object_at(v,t):r[v]=t}},{key:"_swap",value:function(r,v,t){var o=this._get(r,v);this._set(r,v,this._get(r,t)),this._set(r,t,o)}},{key:"_defaultCompareFunction",value:function(r,v){return v>r}}]),i})();w.exports=e}),(function(w,U,L){function u(){}u.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var a=Math.min(this.m,this.n);this.s=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var Ct=function $t(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push($t(bt.slice(1)));return zt};return Ct(Tt)})([this.m,a]),this.V=(function(Tt){var Ct=function $t(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push($t(bt.slice(1)));return zt};return Ct(Tt)})([this.n,this.n]);for(var e=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.n),i=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),f=!0,r=Math.min(this.m-1,this.n),v=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(r,v);t++){if(t<r){this.s[t]=0;for(var o=t;o<this.m;o++)this.s[t]=u.hypot(this.s[t],h[o][t]);if(this.s[t]!==0){h[t][t]<0&&(this.s[t]=-this.s[t]);for(var s=t;s<this.m;s++)h[s][t]/=this.s[t];h[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if((function(Tt,Ct){return Tt&&Ct})(t<r,this.s[t]!==0)){for(var l=0,T=t;T<this.m;T++)l+=h[T][t]*h[T][c];l=-l/h[t][t];for(var g=t;g<this.m;g++)h[g][c]+=l*h[g][t]}e[c]=h[t][c]}if((function(Tt,Ct){return Ct})(f,t<r))for(var d=t;d<this.m;d++)this.U[d][t]=h[d][t];if(t<v){e[t]=0;for(var N=t+1;N<this.n;N++)e[t]=u.hypot(e[t],e[N]);if(e[t]!==0){e[t+1]<0&&(e[t]=-e[t]);for(var F=t+1;F<this.n;F++)e[F]/=e[t];e[t+1]+=1}if(e[t]=-e[t],(function(Tt,Ct){return Tt&&Ct})(t+1<this.m,e[t]!==0)){for(var A=t+1;A<this.m;A++)i[A]=0;for(var G=t+1;G<this.n;G++)for(var k=t+1;k<this.m;k++)i[k]+=e[G]*h[k][G];for(var X=t+1;X<this.n;X++)for(var J=-e[X]/e[t+1],D=t+1;D<this.m;D++)h[D][X]+=J*i[D]}for(var rt=t+1;rt<this.n;rt++)this.V[rt][t]=e[rt]}}var n=Math.min(this.n,this.m+1);r<this.n&&(this.s[r]=h[r][r]),this.m<n&&(this.s[n-1]=0),v+1<n&&(e[v]=h[v][n-1]),e[n-1]=0;{for(var m=r;m<a;m++){for(var p=0;p<this.m;p++)this.U[p][m]=0;this.U[m][m]=1}for(var E=r-1;E>=0;E--)if(this.s[E]!==0){for(var y=E+1;y<a;y++){for(var I=0,M=E;M<this.m;M++)I+=this.U[M][E]*this.U[M][y];I=-I/this.U[E][E];for(var R=E;R<this.m;R++)this.U[R][y]+=I*this.U[R][E]}for(var W=E;W<this.m;W++)this.U[W][E]=-this.U[W][E];this.U[E][E]=1+this.U[E][E];for(var x=0;x<E-1;x++)this.U[x][E]=0}else{for(var q=0;q<this.m;q++)this.U[q][E]=0;this.U[E][E]=1}}for(var V=this.n-1;V>=0;V--){if((function(Tt,Ct){return Tt&&Ct})(V<v,e[V]!==0))for(var Y=V+1;Y<a;Y++){for(var et=0,z=V+1;z<this.n;z++)et+=this.V[z][V]*this.V[z][Y];et=-et/this.V[V+1][V];for(var O=V+1;O<this.n;O++)this.V[O][Y]+=et*this.V[O][V]}for(var H=0;H<this.n;H++)this.V[H][V]=0;this.V[V][V]=1}for(var $=n-1,_=Math.pow(2,-52),ht=Math.pow(2,-966);n>0;){var Q=void 0,It=void 0;for(Q=n-2;Q>=-1&&Q!==-1;Q--)if(Math.abs(e[Q])<=ht+_*(Math.abs(this.s[Q])+Math.abs(this.s[Q+1]))){e[Q]=0;break}if(Q===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=Q&&Nt!==Q;Nt--){var vt=(Nt!==n?Math.abs(e[Nt]):0)+(Nt!==Q+1?Math.abs(e[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+_*vt){this.s[Nt]=0;break}}Nt===Q?It=3:Nt===n-1?It=1:(It=2,Q=Nt)}switch(Q++,It){case 1:{var it=e[n-2];e[n-2]=0;for(var gt=n-2;gt>=Q;gt--){var mt=u.hypot(this.s[gt],it),At=this.s[gt]/mt,Ot=it/mt;this.s[gt]=mt,gt!==Q&&(it=-Ot*e[gt-1],e[gt-1]=At*e[gt-1]);for(var Et=0;Et<this.n;Et++)mt=At*this.V[Et][gt]+Ot*this.V[Et][n-1],this.V[Et][n-1]=-Ot*this.V[Et][gt]+At*this.V[Et][n-1],this.V[Et][gt]=mt}}break;case 2:{var Dt=e[Q-1];e[Q-1]=0;for(var Rt=Q;Rt<n;Rt++){var Ht=u.hypot(this.s[Rt],Dt),Ut=this.s[Rt]/Ht,Pt=Dt/Ht;this.s[Rt]=Ht,Dt=-Pt*e[Rt],e[Rt]=Ut*e[Rt];for(var Ft=0;Ft<this.m;Ft++)Ht=Ut*this.U[Ft][Rt]+Pt*this.U[Ft][Q-1],this.U[Ft][Q-1]=-Pt*this.U[Ft][Rt]+Ut*this.U[Ft][Q-1],this.U[Ft][Rt]=Ht}}break;case 3:{var Yt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[n-1]),Math.abs(this.s[n-2])),Math.abs(e[n-2])),Math.abs(this.s[Q])),Math.abs(e[Q])),Vt=this.s[n-1]/Yt,S=this.s[n-2]/Yt,b=e[n-2]/Yt,B=this.s[Q]/Yt,K=e[Q]/Yt,Z=((S+Vt)*(S-Vt)+b*b)/2,at=Vt*b*(Vt*b),ct=0;(function(Tt,Ct){return Tt||Ct})(Z!==0,at!==0)&&(ct=Math.sqrt(Z*Z+at),Z<0&&(ct=-ct),ct=at/(Z+ct));for(var nt=(B+Vt)*(B-Vt)+ct,tt=B*K,j=Q;j<n-1;j++){var ut=u.hypot(nt,tt),wt=nt/ut,pt=tt/ut;j!==Q&&(e[j-1]=ut),nt=wt*this.s[j]+pt*e[j],e[j]=wt*e[j]-pt*this.s[j],tt=pt*this.s[j+1],this.s[j+1]=wt*this.s[j+1];for(var xt=0;xt<this.n;xt++)ut=wt*this.V[xt][j]+pt*this.V[xt][j+1],this.V[xt][j+1]=-pt*this.V[xt][j]+wt*this.V[xt][j+1],this.V[xt][j]=ut;if(ut=u.hypot(nt,tt),wt=nt/ut,pt=tt/ut,this.s[j]=ut,nt=wt*e[j]+pt*this.s[j+1],this.s[j+1]=-pt*e[j]+wt*this.s[j+1],tt=pt*e[j+1],e[j+1]=wt*e[j+1],j<this.m-1)for(var lt=0;lt<this.m;lt++)ut=wt*this.U[lt][j]+pt*this.U[lt][j+1],this.U[lt][j+1]=-pt*this.U[lt][j]+wt*this.U[lt][j+1],this.U[lt][j]=ut}e[n-2]=nt}break;case 4:{if(this.s[Q]<=0){this.s[Q]=this.s[Q]<0?-this.s[Q]:0;for(var ot=0;ot<=$;ot++)this.V[ot][Q]=-this.V[ot][Q]}for(;Q<$&&!(this.s[Q]>=this.s[Q+1]);){var Lt=this.s[Q];if(this.s[Q]=this.s[Q+1],this.s[Q+1]=Lt,Q<this.n-1)for(var ft=0;ft<this.n;ft++)Lt=this.V[ft][Q+1],this.V[ft][Q+1]=this.V[ft][Q],this.V[ft][Q]=Lt;if(Q<this.m-1)for(var st=0;st<this.m;st++)Lt=this.U[st][Q+1],this.U[st][Q+1]=this.U[st][Q],this.U[st][Q]=Lt;Q++}n--}break}}var Xt={U:this.U,V:this.V,S:this.s};return Xt},u.hypot=function(h,a){var e=void 0;return Math.abs(h)>Math.abs(a)?(e=a/h,e=Math.abs(h)*Math.sqrt(1+e*e)):a!=0?(e=h/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},w.exports=u}),(function(w,U,L){var u=(function(){function e(i,f){for(var r=0;r<f.length;r++){var v=f[r];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(i,v.key,v)}}return function(i,f,r){return f&&e(i.prototype,f),r&&e(i,r),i}})();function h(e,i){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")}var a=(function(){function e(i,f){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,e),this.sequence1=i,this.sequence2=f,this.match_score=r,this.mismatch_penalty=v,this.gap_penalty=t,this.iMax=i.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var o=0;o<this.iMax;o++){this.grid[o]=new Array(this.jMax);for(var s=0;s<this.jMax;s++)this.grid[o][s]=0}this.tracebackGrid=new Array(this.iMax);for(var c=0;c<this.iMax;c++){this.tracebackGrid[c]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[c][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return u(e,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var f=1;f<this.jMax;f++)this.grid[0][f]=this.grid[0][f-1]+this.gap_penalty,this.tracebackGrid[0][f]=[!1,!1,!0];for(var r=1;r<this.iMax;r++)this.grid[r][0]=this.grid[r-1][0]+this.gap_penalty,this.tracebackGrid[r][0]=[!1,!0,!1];for(var v=1;v<this.iMax;v++)for(var t=1;t<this.jMax;t++){var o=void 0;this.sequence1[v-1]===this.sequence2[t-1]?o=this.grid[v-1][t-1]+this.match_score:o=this.grid[v-1][t-1]+this.mismatch_penalty;var s=this.grid[v-1][t]+this.gap_penalty,c=this.grid[v][t-1]+this.gap_penalty,l=[o,s,c],T=this.arrayAllMaxIndexes(l);this.grid[v][t]=l[T[0]],this.tracebackGrid[v][t]=[T.includes(0),T.includes(1),T.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var f=[];for(f.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});f[0];){var r=f[0],v=this.tracebackGrid[r.pos[0]][r.pos[1]];v[0]&&f.push({pos:[r.pos[0]-1,r.pos[1]-1],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),v[1]&&f.push({pos:[r.pos[0]-1,r.pos[1]],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:"-"+r.seq2}),v[2]&&f.push({pos:[r.pos[0],r.pos[1]-1],seq1:"-"+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),r.pos[0]===0&&r.pos[1]===0&&this.alignments.push({sequence1:r.seq1,sequence2:r.seq2}),f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,r){for(var v=[],t=-1;(t=f.indexOf(r,t+1))!==-1;)v.push(t);return v}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),e})();w.exports=a}),(function(w,U,L){var u=function(){};u.FDLayout=L(18),u.FDLayoutConstants=L(4),u.FDLayoutEdge=L(19),u.FDLayoutNode=L(20),u.DimensionD=L(21),u.HashMap=L(22),u.HashSet=L(23),u.IGeometry=L(8),u.IMath=L(9),u.Integer=L(10),u.Point=L(12),u.PointD=L(5),u.RandomSeed=L(16),u.RectangleD=L(13),u.Transform=L(17),u.UniqueIDGeneretor=L(14),u.Quicksort=L(25),u.LinkedList=L(11),u.LGraphObject=L(2),u.LGraph=L(6),u.LEdge=L(1),u.LGraphManager=L(7),u.LNode=L(3),u.Layout=L(15),u.LayoutConstants=L(0),u.NeedlemanWunsch=L(27),u.Matrix=L(24),u.SVD=L(26),w.exports=u}),(function(w,U,L){function u(){this.listeners=[]}var h=u.prototype;h.addListener=function(a,e){this.listeners.push({event:a,callback:e})},h.removeListener=function(a,e){for(var i=this.listeners.length;i>=0;i--){var f=this.listeners[i];f.event===a&&f.callback===e&&this.listeners.splice(i,1)}},h.emit=function(a,e){for(var i=0;i<this.listeners.length;i++){var f=this.listeners[i];a===f.event&&f.callback(e)}},w.exports=u})])})})(le)),le.exports}var ur=he.exports,Me;function dr(){return Me||(Me=1,(function(C,P){(function(U,L){C.exports=L(gr())})(ur,function(w){return(()=>{var U={45:((a,e,i)=>{var f={};f.layoutBase=i(551),f.CoSEConstants=i(806),f.CoSEEdge=i(767),f.CoSEGraph=i(880),f.CoSEGraphManager=i(578),f.CoSELayout=i(765),f.CoSENode=i(991),f.ConstraintHandler=i(902),a.exports=f}),806:((a,e,i)=>{var f=i(551).FDLayoutConstants;function r(){}for(var v in f)r[v]=f[v];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,a.exports=r}),767:((a,e,i)=>{var f=i(551).FDLayoutEdge;function r(t,o,s){f.call(this,t,o,s)}r.prototype=Object.create(f.prototype);for(var v in f)r[v]=f[v];a.exports=r}),880:((a,e,i)=>{var f=i(551).LGraph;function r(t,o,s){f.call(this,t,o,s)}r.prototype=Object.create(f.prototype);for(var v in f)r[v]=f[v];a.exports=r}),578:((a,e,i)=>{var f=i(551).LGraphManager;function r(t){f.call(this,t)}r.prototype=Object.create(f.prototype);for(var v in f)r[v]=f[v];a.exports=r}),765:((a,e,i)=>{var f=i(551).FDLayout,r=i(578),v=i(880),t=i(991),o=i(767),s=i(806),c=i(902),l=i(551).FDLayoutConstants,T=i(551).LayoutConstants,g=i(551).Point,d=i(551).PointD,N=i(551).DimensionD,F=i(551).Layout,A=i(551).Integer,G=i(551).IGeometry,k=i(551).LGraph,X=i(551).Transform,J=i(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var rt in f)D[rt]=f[rt];D.prototype.newGraphManager=function(){var n=new r(this);return this.graphManager=n,n},D.prototype.newGraph=function(n){return new v(null,this.graphManager,n)},D.prototype.newNode=function(n){return new t(this.graphManager,n)},D.prototype.newEdge=function(n){return new o(null,null,n)},D.prototype.initParameters=function(){f.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.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.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 m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return m.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),s.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.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%l.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 n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),s.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),s.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},p=0;p<n.length;p++){var E=n[p].rect,y=n[p].id;m[y]={id:y,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return m},D.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var n=!1;if(l.ANIMATE==="during")this.emit("layoutstarted");else{for(;!n;)n=this.tick();this.graphManager.updateBounds()}},D.prototype.moveNodes=function(){for(var n=this.getAllNodes(),m,p=0;p<n.length;p++)m=n[p],m.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var p=0;p<n.length;p++)m=n[p],m.move()},D.prototype.initConstraintVariables=function(){var n=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var m=this.graphManager.getAllNodes(),p=0;p<m.length;p++){var E=m[p];this.idToNodeMap.set(E.id,E)}var y=function O(H){for(var $=H.getChild().getNodes(),_,ht=0,Q=0;Q<$.length;Q++)_=$[Q],_.getChild()==null?n.fixedNodeSet.has(_.id)&&(ht+=100):ht+=O(_);return ht};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function($){n.fixedNodeSet.add($.nodeId)});for(var m=this.graphManager.getAllNodes(),E,p=0;p<m.length;p++)if(E=m[p],E.getChild()!=null){var I=y(E);I>0&&(E.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var M=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p<W.length;p++)this.dummyToNodeForVerticalAlignment.set("dummy"+p,[]),W[p].forEach(function(H){M.set(H,"dummy"+p),n.dummyToNodeForVerticalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnHorizontal.add("dummy"+p)});if(this.constraints.alignmentConstraint.horizontal)for(var x=this.constraints.alignmentConstraint.horizontal,p=0;p<x.length;p++)this.dummyToNodeForHorizontalAlignment.set("dummy"+p,[]),x[p].forEach(function(H){R.set(H,"dummy"+p),n.dummyToNodeForHorizontalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnVertical.add("dummy"+p)})}if(s.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(O){var H,$,_;for(_=O.length-1;_>=2*O.length/3;_--)H=Math.floor(Math.random()*(_+1)),$=O[_],O[_]=O[H],O[H]=$;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=M.has(O.left)?M.get(O.left):O.left,$=M.has(O.right)?M.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes($)||(n.nodesInRelativeHorizontal.push($),n.nodeToRelativeConstraintMapHorizontal.set($,[]),n.dummyToNodeForVerticalAlignment.has($)?n.nodeToTempPositionMapHorizontal.set($,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get($)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set($,n.idToNodeMap.get($).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:$,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get($).push({left:H,gap:O.gap})}else{var _=R.has(O.top)?R.get(O.top):O.top,ht=R.has(O.bottom)?R.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(_)||(n.nodesInRelativeVertical.push(_),n.nodeToRelativeConstraintMapVertical.set(_,[]),n.dummyToNodeForHorizontalAlignment.has(_)?n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(_)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(_).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(_).push({bottom:ht,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:_,gap:O.gap})}});else{var q=new Map,V=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=M.has(O.left)?M.get(O.left):O.left,$=M.has(O.right)?M.get(O.right):O.right;q.has(H)?q.get(H).push($):q.set(H,[$]),q.has($)?q.get($).push(H):q.set($,[H])}else{var _=R.has(O.top)?R.get(O.top):O.top,ht=R.has(O.bottom)?R.get(O.bottom):O.bottom;V.has(_)?V.get(_).push(ht):V.set(_,[ht]),V.has(ht)?V.get(ht).push(_):V.set(ht,[_])}});var Y=function(H,$){var _=[],ht=[],Q=new J,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){_[Nt]=[],ht[Nt]=!1;var gt=it;for(Q.push(gt),It.add(gt),_[Nt].push(gt);Q.length!=0;){gt=Q.shift(),$.has(gt)&&(ht[Nt]=!0);var mt=H.get(gt);mt.forEach(function(At){It.has(At)||(Q.push(At),It.add(At),_[Nt].push(At))})}Nt++}}),{components:_,isFixed:ht}},et=Y(q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=et.components,this.fixedComponentsOnHorizontal=et.isFixed;var z=Y(V,n.fixedNodesOnVertical);this.componentsOnVertical=z.components,this.fixedComponentsOnVertical=z.isFixed}}},D.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(z){var O=n.idToNodeMap.get(z.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,p=0;p<m.length;p++){for(var E=0,y=0;y<m[p].length;y++){if(this.fixedNodeSet.has(m[p][y])){E=0;break}E+=this.idToNodeMap.get(m[p][y]).displacementX}for(var I=E/m[p].length,y=0;y<m[p].length;y++)this.idToNodeMap.get(m[p][y]).displacementX=I}if(this.constraints.alignmentConstraint.horizontal)for(var M=this.constraints.alignmentConstraint.horizontal,p=0;p<M.length;p++){for(var R=0,y=0;y<M[p].length;y++){if(this.fixedNodeSet.has(M[p][y])){R=0;break}R+=this.idToNodeMap.get(M[p][y]).displacementY}for(var W=R/M[p].length,y=0;y<M[p].length;y++)this.idToNodeMap.get(M[p][y]).displacementY=W}}if(this.constraints.relativePlacementConstraint)if(s.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(z){if(!n.fixedNodesOnHorizontal.has(z)){var O=0;n.dummyToNodeForVerticalAlignment.has(z)?O=n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(z)[0]).displacementX:O=n.idToNodeMap.get(z).displacementX,n.nodeToRelativeConstraintMapHorizontal.get(z).forEach(function(H){if(H.right){var $=n.nodeToTempPositionMapHorizontal.get(H.right)-n.nodeToTempPositionMapHorizontal.get(z)-O;$<H.gap&&(O-=H.gap-$)}else{var $=n.nodeToTempPositionMapHorizontal.get(z)-n.nodeToTempPositionMapHorizontal.get(H.left)+O;$<H.gap&&(O+=H.gap-$)}}),n.nodeToTempPositionMapHorizontal.set(z,n.nodeToTempPositionMapHorizontal.get(z)+O),n.dummyToNodeForVerticalAlignment.has(z)?n.dummyToNodeForVerticalAlignment.get(z).forEach(function(H){n.idToNodeMap.get(H).displacementX=O}):n.idToNodeMap.get(z).displacementX=O}}),this.nodesInRelativeVertical.forEach(function(z){if(!n.fixedNodesOnHorizontal.has(z)){var O=0;n.dummyToNodeForHorizontalAlignment.has(z)?O=n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(z)[0]).displacementY:O=n.idToNodeMap.get(z).displacementY,n.nodeToRelativeConstraintMapVertical.get(z).forEach(function(H){if(H.bottom){var $=n.nodeToTempPositionMapVertical.get(H.bottom)-n.nodeToTempPositionMapVertical.get(z)-O;$<H.gap&&(O-=H.gap-$)}else{var $=n.nodeToTempPositionMapVertical.get(z)-n.nodeToTempPositionMapVertical.get(H.top)+O;$<H.gap&&(O+=H.gap-$)}}),n.nodeToTempPositionMapVertical.set(z,n.nodeToTempPositionMapVertical.get(z)+O),n.dummyToNodeForHorizontalAlignment.has(z)?n.dummyToNodeForHorizontalAlignment.get(z).forEach(function(H){n.idToNodeMap.get(H).displacementY=O}):n.idToNodeMap.get(z).displacementY=O}});else{for(var p=0;p<this.componentsOnHorizontal.length;p++){var x=this.componentsOnHorizontal[p];if(this.fixedComponentsOnHorizontal[p])for(var y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=0}):this.idToNodeMap.get(x[y]).displacementX=0;else{for(var q=0,V=0,y=0;y<x.length;y++)if(this.dummyToNodeForVerticalAlignment.has(x[y])){var Y=this.dummyToNodeForVerticalAlignment.get(x[y]);q+=Y.length*this.idToNodeMap.get(Y[0]).displacementX,V+=Y.length}else q+=this.idToNodeMap.get(x[y]).displacementX,V++;for(var et=q/V,y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=et}):this.idToNodeMap.get(x[y]).displacementX=et}}for(var p=0;p<this.componentsOnVertical.length;p++){var x=this.componentsOnVertical[p];if(this.fixedComponentsOnVertical[p])for(var y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function($){n.idToNodeMap.get($).displacementY=0}):this.idToNodeMap.get(x[y]).displacementY=0;else{for(var q=0,V=0,y=0;y<x.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(x[y])){var Y=this.dummyToNodeForHorizontalAlignment.get(x[y]);q+=Y.length*this.idToNodeMap.get(Y[0]).displacementY,V+=Y.length}else q+=this.idToNodeMap.get(x[y]).displacementY,V++;for(var et=q/V,y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function(Q){n.idToNodeMap.get(Q).displacementY=et}):this.idToNodeMap.get(x[y]).displacementY=et}}}},D.prototype.calculateNodesToApplyGravitationTo=function(){var n=[],m,p=this.graphManager.getGraphs(),E=p.length,y;for(y=0;y<E;y++)m=p[y],m.updateConnected(),m.isConnected||(n=n.concat(m.getNodes()));return n},D.prototype.createBendpoints=function(){var n=[];n=n.concat(this.graphManager.getAllEdges());var m=new Set,p;for(p=0;p<n.length;p++){var E=n[p];if(!m.has(E)){var y=E.getSource(),I=E.getTarget();if(y==I)E.getBendpoints().push(new d),E.getBendpoints().push(new d),this.createDummyNodesForBendpoints(E),m.add(E);else{var M=[];if(M=M.concat(y.getEdgeListToNode(I)),M=M.concat(I.getEdgeListToNode(y)),!m.has(M[0])){if(M.length>1){var R;for(R=0;R<M.length;R++){var W=M[R];W.getBendpoints().push(new d),this.createDummyNodesForBendpoints(W)}}M.forEach(function(x){m.add(x)})}}}if(m.size==n.length)break}},D.prototype.positionNodesRadially=function(n){for(var m=new g(0,0),p=Math.ceil(Math.sqrt(n.length)),E=0,y=0,I=0,M=new d(0,0),R=0;R<n.length;R++){R%p==0&&(I=0,y=E,R!=0&&(y+=s.DEFAULT_COMPONENT_SEPERATION),E=0);var W=n[R],x=F.findCenterOfTree(W);m.x=I,m.y=y,M=D.radialLayout(W,x,m),M.y>E&&(E=Math.floor(M.y)),I=Math.floor(M.x+s.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-M.x/2,T.WORLD_CENTER_Y-M.y/2))},D.radialLayout=function(n,m,p){var E=Math.max(this.maxDiagonalInTree(n),s.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var y=k.calculateBounds(n),I=new X;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var M=0;M<n.length;M++){var R=n[M];R.transform(I)}var W=new d(y.getMaxX(),y.getMaxY());return I.inverseTransformPoint(W)},D.branchRadialLayout=function(n,m,p,E,y,I){var M=(E-p+1)/2;M<0&&(M+=180);var R=(M+p)%360,W=R*G.TWO_PI/360,x=y*Math.cos(W),q=y*Math.sin(W);n.setCenter(x,q);var V=[];V=V.concat(n.getEdges());var Y=V.length;m!=null&&Y--;for(var et=0,z=V.length,O,H=n.getEdgesBetween(m);H.length>1;){var $=H[0];H.splice(0,1);var _=V.indexOf($);_>=0&&V.splice(_,1),z--,Y--}m!=null?O=(V.indexOf(H[0])+1)%z:O=0;for(var ht=Math.abs(E-p)/Y,Q=O;et!=Y;Q=++Q%z){var It=V[Q].getOtherEnd(n);if(It!=m){var Nt=(p+et*ht)%360,vt=(Nt+ht)%360;D.branchRadialLayout(It,n,Nt,vt,y+I,I),et++}}},D.maxDiagonalInTree=function(n){for(var m=A.MIN_VALUE,p=0;p<n.length;p++){var E=n[p],y=E.getDiagonal();y>m&&(m=y)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var n=this,m={};this.memberGroups={},this.idToDummyNode={};for(var p=[],E=this.graphManager.getAllNodes(),y=0;y<E.length;y++){var I=E[y],M=I.getParent();this.getNodeDegreeWithChildren(I)===0&&(M.id==null||!this.getToBeTiled(M))&&p.push(I)}for(var y=0;y<p.length;y++){var I=p[y],R=I.getParent().id;typeof m[R]>"u"&&(m[R]=[]),m[R]=m[R].concat(I)}Object.keys(m).forEach(function(W){if(m[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=m[W];var q=m[W][0].getParent(),V=new t(n.graphManager);V.id=x,V.paddingLeft=q.paddingLeft||0,V.paddingRight=q.paddingRight||0,V.paddingBottom=q.paddingBottom||0,V.paddingTop=q.paddingTop||0,n.idToDummyNode[x]=V;var Y=n.getGraphManager().add(n.newGraph(),V),et=q.getChild();et.add(V);for(var z=0;z<m[W].length;z++){var O=m[W][z];et.remove(O),Y.add(O)}}})},D.prototype.clearCompounds=function(){var n={},m={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)m[this.compoundOrder[p].id]=this.compoundOrder[p],n[this.compoundOrder[p].id]=[].concat(this.compoundOrder[p].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[p].getChild()),this.compoundOrder[p].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(n,m)},D.prototype.clearZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var E=n.idToDummyNode[p];if(m[p]=n.tileNodes(n.memberGroups[p],E.paddingLeft+E.paddingRight),E.rect.width=m[p].width,E.rect.height=m[p].height,E.setCenter(m[p].centerX,m[p].centerY),E.labelMarginLeft=0,E.labelMarginTop=0,s.NODE_DIMENSIONS_INCLUDE_LABELS){var y=E.rect.width,I=E.rect.height;E.labelWidth&&(E.labelPosHorizontal=="left"?(E.rect.x-=E.labelWidth,E.setWidth(y+E.labelWidth),E.labelMarginLeft=E.labelWidth):E.labelPosHorizontal=="center"&&E.labelWidth>y?(E.rect.x-=(E.labelWidth-y)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-y)/2):E.labelPosHorizontal=="right"&&E.setWidth(y+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(I+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>I?(E.rect.y-=(E.labelHeight-I)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-I)/2):E.labelPosVertical=="bottom"&&E.setHeight(I+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var m=this.compoundOrder[n],p=m.id,E=m.paddingLeft,y=m.paddingTop,I=m.labelMarginLeft,M=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],m.rect.x,m.rect.y,E,y,I,M)}},D.prototype.repopulateZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(p){var E=n.idToDummyNode[p],y=E.paddingLeft,I=E.paddingTop,M=E.labelMarginLeft,R=E.labelMarginTop;n.adjustLocations(m[p],E.rect.x,E.rect.y,y,I,M,R)})},D.prototype.getToBeTiled=function(n){var m=n.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var p=n.getChild();if(p==null)return this.toBeTiled[m]=!1,!1;for(var E=p.getNodes(),y=0;y<E.length;y++){var I=E[y];if(this.getNodeDegree(I)>0)return this.toBeTiled[m]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(n){n.id;for(var m=n.getEdges(),p=0,E=0;E<m.length;E++){var y=m[E];y.getSource().id!==y.getTarget().id&&(p=p+1)}return p},D.prototype.getNodeDegreeWithChildren=function(n){var m=this.getNodeDegree(n);if(n.getChild()==null)return m;for(var p=n.getChild().getNodes(),E=0;E<p.length;E++){var y=p[E];m+=this.getNodeDegreeWithChildren(y)}return m},D.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},D.prototype.fillCompexOrderByDFS=function(n){for(var m=0;m<n.length;m++){var p=n[m];p.getChild()!=null&&this.fillCompexOrderByDFS(p.getChild().getNodes()),this.getToBeTiled(p)&&this.compoundOrder.push(p)}},D.prototype.adjustLocations=function(n,m,p,E,y,I,M){m+=E+I,p+=y+M;for(var R=m,W=0;W<n.rows.length;W++){var x=n.rows[W];m=R;for(var q=0,V=0;V<x.length;V++){var Y=x[V];Y.rect.x=m,Y.rect.y=p,m+=Y.rect.width+n.horizontalPadding,Y.rect.height>q&&(q=Y.rect.height)}p+=q+n.verticalPadding}},D.prototype.tileCompoundMembers=function(n,m){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(E){var y=m[E];if(p.tiledMemberPack[E]=p.tileNodes(n[E],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[E].width,y.rect.height=p.tiledMemberPack[E].height,y.setCenter(p.tiledMemberPack[E].centerX,p.tiledMemberPack[E].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,s.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,M=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(M+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>M?(y.rect.y-=(y.labelHeight-M)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-M)/2):y.labelPosVertical=="bottom"&&y.setHeight(M+y.labelHeight))}})},D.prototype.tileNodes=function(n,m){var p=this.tileNodesByFavoringDim(n,m,!0),E=this.tileNodesByFavoringDim(n,m,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(E),M;return I<y?M=E:M=p,M},D.prototype.getOrgRatio=function(n){var m=n.width,p=n.height,E=m/p;return E<1&&(E=1/E),E},D.prototype.calcIdealRowWidth=function(n,m){var p=s.TILING_PADDING_VERTICAL,E=s.TILING_PADDING_HORIZONTAL,y=n.length,I=0,M=0,R=0;n.forEach(function(z){I+=z.getWidth(),M+=z.getHeight(),z.getWidth()>R&&(R=z.getWidth())});var W=I/y,x=M/y,q=Math.pow(p-E,2)+4*(W+E)*(x+p)*y,V=(E-p+Math.sqrt(q))/(2*(W+E)),Y;m?(Y=Math.ceil(V),Y==V&&Y++):Y=Math.floor(V);var et=Y*(W+E)-E;return R>et&&(et=R),et+=E*2,et},D.prototype.tileNodesByFavoringDim=function(n,m,p){var E=s.TILING_PADDING_VERTICAL,y=s.TILING_PADDING_HORIZONTAL,I=s.TILING_COMPARE_BY,M={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:y,centerX:0,centerY:0};I&&(M.idealRowWidth=this.calcIdealRowWidth(n,p));var R=function(O){return O.rect.width*O.rect.height},W=function(O,H){return R(H)-R(O)};n.sort(function(z,O){var H=W;return M.idealRowWidth?(H=I,H(z.id,O.id)):H(z,O)});for(var x=0,q=0,V=0;V<n.length;V++){var Y=n[V];x+=Y.getCenterX(),q+=Y.getCenterY()}M.centerX=x/n.length,M.centerY=q/n.length;for(var V=0;V<n.length;V++){var Y=n[V];if(M.rows.length==0)this.insertNodeToRow(M,Y,0,m);else if(this.canAddHorizontal(M,Y.rect.width,Y.rect.height)){var et=M.rows.length-1;M.idealRowWidth||(et=this.getShortestRowIndex(M)),this.insertNodeToRow(M,Y,et,m)}else this.insertNodeToRow(M,Y,M.rows.length,m);this.shiftToLastRow(M)}return M},D.prototype.insertNodeToRow=function(n,m,p,E){var y=E;if(p==n.rows.length){var I=[];n.rows.push(I),n.rowWidth.push(y),n.rowHeight.push(0)}var M=n.rowWidth[p]+m.rect.width;n.rows[p].length>0&&(M+=n.horizontalPadding),n.rowWidth[p]=M,n.width<M&&(n.width=M);var R=m.rect.height;p>0&&(R+=n.verticalPadding);var W=0;R>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=R,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(m)},D.prototype.getShortestRowIndex=function(n){for(var m=-1,p=Number.MAX_VALUE,E=0;E<n.rows.length;E++)n.rowWidth[E]<p&&(m=E,p=n.rowWidth[E]);return m},D.prototype.getLongestRowIndex=function(n){for(var m=-1,p=Number.MIN_VALUE,E=0;E<n.rows.length;E++)n.rowWidth[E]>p&&(m=E,p=n.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(n,m,p){if(n.idealRowWidth){var E=n.rows.length-1,y=n.rowWidth[E];return y+m+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var M=n.rowWidth[I];if(M+n.horizontalPadding+m<=n.width)return!0;var R=0;n.rowHeight[I]<p&&I>0&&(R=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-M>=m+n.horizontalPadding?W=(n.height+R)/(M+m+n.horizontalPadding):W=(n.height+R)/n.width,R=p+n.verticalPadding;var x;return n.width<m?x=(n.height+R)/m:x=(n.height+R)/n.width,x<1&&(x=1/x),W<1&&(W=1/W),W<x},D.prototype.shiftToLastRow=function(n){var m=this.getLongestRowIndex(n),p=n.rowWidth.length-1,E=n.rows[m],y=E[E.length-1],I=y.width+n.horizontalPadding;if(n.width-n.rowWidth[p]>I&&m!=p){E.splice(-1,1),n.rows[p].push(y),n.rowWidth[m]=n.rowWidth[m]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var M=Number.MIN_VALUE,R=0;R<E.length;R++)E[R].height>M&&(M=E[R].height);m>0&&(M+=n.verticalPadding);var W=n.rowHeight[m]+n.rowHeight[p];n.rowHeight[m]=M,n.rowHeight[p]<y.height+n.verticalPadding&&(n.rowHeight[p]=y.height+n.verticalPadding);var x=n.rowHeight[m]+n.rowHeight[p];n.height+=x-W,this.shiftToLastRow(n)}},D.prototype.tilingPreLayout=function(){s.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},D.prototype.tilingPostLayout=function(){s.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},D.prototype.reduceTrees=function(){for(var n=[],m=!0,p;m;){var E=this.graphManager.getAllNodes(),y=[];m=!1;for(var I=0;I<E.length;I++)if(p=E[I],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null){if(s.PURE_INCREMENTAL){var M=p.getEdges()[0].getOtherEnd(p),R=new N(p.getCenterX()-M.getCenterX(),p.getCenterY()-M.getCenterY());y.push([p,p.getEdges()[0],p.getOwner(),R])}else y.push([p,p.getEdges()[0],p.getOwner()]);m=!0}if(m==!0){for(var W=[],x=0;x<y.length;x++)y[x][0].getEdges().length==1&&(W.push(y[x]),y[x][0].getOwner().remove(y[x][0]));n.push(W),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=n},D.prototype.growTree=function(n){for(var m=n.length,p=n[m-1],E,y=0;y<p.length;y++)E=p[y],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);n.splice(n.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},D.prototype.findPlaceforPrunedNode=function(n){var m,p,E=n[0];if(E==n[1].source?p=n[1].target:p=n[1].source,s.PURE_INCREMENTAL)E.setCenter(p.getCenterX()+n[3].getWidth(),p.getCenterY()+n[3].getHeight());else{var y=p.startX,I=p.finishX,M=p.startY,R=p.finishY,W=0,x=0,q=0,V=0,Y=[W,q,x,V];if(M>0)for(var et=y;et<=I;et++)Y[0]+=this.grid[et][M-1].length+this.grid[et][M].length-1;if(I<this.grid.length-1)for(var et=M;et<=R;et++)Y[1]+=this.grid[I+1][et].length+this.grid[I][et].length-1;if(R<this.grid[0].length-1)for(var et=y;et<=I;et++)Y[2]+=this.grid[et][R+1].length+this.grid[et][R].length-1;if(y>0)for(var et=M;et<=R;et++)Y[3]+=this.grid[y-1][et].length+this.grid[y][et].length-1;for(var z=A.MAX_VALUE,O,H,$=0;$<Y.length;$++)Y[$]<z?(z=Y[$],O=1,H=$):Y[$]==z&&O++;if(O==3&&z==0)Y[0]==0&&Y[1]==0&&Y[2]==0?m=1:Y[0]==0&&Y[1]==0&&Y[3]==0?m=0:Y[0]==0&&Y[2]==0&&Y[3]==0?m=3:Y[1]==0&&Y[2]==0&&Y[3]==0&&(m=2);else if(O==2&&z==0){var _=Math.floor(Math.random()*2);Y[0]==0&&Y[1]==0?_==0?m=0:m=1:Y[0]==0&&Y[2]==0?_==0?m=0:m=2:Y[0]==0&&Y[3]==0?_==0?m=0:m=3:Y[1]==0&&Y[2]==0?_==0?m=1:m=2:Y[1]==0&&Y[3]==0?_==0?m=1:m=3:_==0?m=2:m=3}else if(O==4&&z==0){var _=Math.floor(Math.random()*4);m=_}else m=H;m==0?E.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-l.DEFAULT_EDGE_LENGTH-E.getHeight()/2):m==1?E.setCenter(p.getCenterX()+p.getWidth()/2+l.DEFAULT_EDGE_LENGTH+E.getWidth()/2,p.getCenterY()):m==2?E.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+l.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(p.getCenterX()-p.getWidth()/2-l.DEFAULT_EDGE_LENGTH-E.getWidth()/2,p.getCenterY())}},a.exports=D}),991:((a,e,i)=>{var f=i(551).FDLayoutNode,r=i(551).IMath;function v(o,s,c,l){f.call(this,o,s,c,l)}v.prototype=Object.create(f.prototype);for(var t in f)v[t]=f[t];v.prototype.calculateDisplacement=function(){var o=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=o.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=o.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=o.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=o.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>o.coolingFactor*o.maxNodeDisplacement&&(this.displacementX=o.coolingFactor*o.maxNodeDisplacement*r.sign(this.displacementX)),Math.abs(this.displacementY)>o.coolingFactor*o.maxNodeDisplacement&&(this.displacementY=o.coolingFactor*o.maxNodeDisplacement*r.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},v.prototype.propogateDisplacementToChildren=function(o,s){for(var c=this.getChild().getNodes(),l,T=0;T<c.length;T++)l=c[T],l.getChild()==null?(l.displacementX+=o,l.displacementY+=s):l.propogateDisplacementToChildren(o,s)},v.prototype.move=function(){var o=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),o.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},v.prototype.setPred1=function(o){this.pred1=o},v.prototype.getPred1=function(){return pred1},v.prototype.getPred2=function(){return pred2},v.prototype.setNext=function(o){this.next=o},v.prototype.getNext=function(){return next},v.prototype.setProcessed=function(o){this.processed=o},v.prototype.isProcessed=function(){return processed},a.exports=v}),902:((a,e,i)=>{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l<c.length;l++)T[l]=c[l];return T}else return Array.from(c)}var r=i(806),v=i(551).LinkedList,t=i(551).Matrix,o=i(551).SVD;function s(){}s.handleConstraints=function(c){var l={};l.fixedNodeConstraint=c.constraints.fixedNodeConstraint,l.alignmentConstraint=c.constraints.alignmentConstraint,l.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var T=new Map,g=new Map,d=[],N=[],F=c.getAllNodes(),A=0,G=0;G<F.length;G++){var k=F[G];k.getChild()==null&&(g.set(k.id,A++),d.push(k.getCenterX()),N.push(k.getCenterY()),T.set(k.id,k))}l.relativePlacementConstraint&&l.relativePlacementConstraint.forEach(function(S){!S.gap&&S.gap!=0&&(S.left?S.gap=r.DEFAULT_EDGE_LENGTH+T.get(S.left).getWidth()/2+T.get(S.right).getWidth()/2:S.gap=r.DEFAULT_EDGE_LENGTH+T.get(S.top).getHeight()/2+T.get(S.bottom).getHeight()/2)});var X=function(b,B){return{x:b.x-B.x,y:b.y-B.y}},J=function(b){var B=0,K=0;return b.forEach(function(Z){B+=d[g.get(Z)],K+=N[g.get(Z)]}),{x:B/b.size,y:K/b.size}},D=function(b,B,K,Z,at){function ct(lt,ot){var Lt=new Set(lt),ft=!0,st=!1,Xt=void 0;try{for(var Tt=ot[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var $t=Ct.value;Lt.add($t)}}catch(bt){st=!0,Xt=bt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}return Lt}var nt=new Map;b.forEach(function(lt,ot){nt.set(ot,0)}),b.forEach(function(lt,ot){lt.forEach(function(Lt){nt.set(Lt.id,nt.get(Lt.id)+1)})});var tt=new Map,j=new Map,ut=new v;nt.forEach(function(lt,ot){lt==0?(ut.push(ot),K||(B=="horizontal"?tt.set(ot,g.has(ot)?d[g.get(ot)]:Z.get(ot)):tt.set(ot,g.has(ot)?N[g.get(ot)]:Z.get(ot)))):tt.set(ot,Number.NEGATIVE_INFINITY),K&&j.set(ot,new Set([ot]))}),K&&at.forEach(function(lt){var ot=[];if(lt.forEach(function(st){K.has(st)&&ot.push(st)}),ot.length>0){var Lt=0;ot.forEach(function(st){B=="horizontal"?(tt.set(st,g.has(st)?d[g.get(st)]:Z.get(st)),Lt+=tt.get(st)):(tt.set(st,g.has(st)?N[g.get(st)]:Z.get(st)),Lt+=tt.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||tt.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){B=="horizontal"?ft+=g.has(st)?d[g.get(st)]:Z.get(st):ft+=g.has(st)?N[g.get(st)]:Z.get(st)}),ft=ft/lt.length,lt.forEach(function(st){tt.set(st,ft)})}});for(var wt=function(){var ot=ut.shift(),Lt=b.get(ot);Lt.forEach(function(ft){if(tt.get(ft.id)<tt.get(ot)+ft.gap)if(K&&K.has(ft.id)){var st=void 0;if(B=="horizontal"?st=g.has(ft.id)?d[g.get(ft.id)]:Z.get(ft.id):st=g.has(ft.id)?N[g.get(ft.id)]:Z.get(ft.id),tt.set(ft.id,st),st<tt.get(ot)+ft.gap){var Xt=tt.get(ot)+ft.gap-st;j.get(ot).forEach(function(Tt){tt.set(Tt,tt.get(Tt)-Xt)})}}else tt.set(ft.id,tt.get(ot)+ft.gap);nt.set(ft.id,nt.get(ft.id)-1),nt.get(ft.id)==0&&ut.push(ft.id),K&&j.set(ft.id,ct(j.get(ot),j.get(ft.id)))})};ut.length!=0;)wt();if(K){var pt=new Set;b.forEach(function(lt,ot){lt.length==0&&pt.add(ot)});var xt=[];j.forEach(function(lt,ot){if(pt.has(ot)){var Lt=!1,ft=!0,st=!1,Xt=void 0;try{for(var Tt=lt[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var $t=Ct.value;K.has($t)&&(Lt=!0)}}catch(St){st=!0,Xt=St}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}if(!Lt){var bt=!1,zt=void 0;xt.forEach(function(St,kt){St.has([].concat(f(lt))[0])&&(bt=!0,zt=kt)}),bt?lt.forEach(function(St){xt[zt].add(St)}):xt.push(new Set(lt))}}}),xt.forEach(function(lt,ot){var Lt=Number.POSITIVE_INFINITY,ft=Number.POSITIVE_INFINITY,st=Number.NEGATIVE_INFINITY,Xt=Number.NEGATIVE_INFINITY,Tt=!0,Ct=!1,$t=void 0;try{for(var bt=lt[Symbol.iterator](),zt;!(Tt=(zt=bt.next()).done);Tt=!0){var St=zt.value,kt=void 0;B=="horizontal"?kt=g.has(St)?d[g.get(St)]:Z.get(St):kt=g.has(St)?N[g.get(St)]:Z.get(St);var Kt=tt.get(St);kt<Lt&&(Lt=kt),kt>st&&(st=kt),Kt<ft&&(ft=Kt),Kt>Xt&&(Xt=Kt)}}catch(ee){Ct=!0,$t=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw $t}}var fe=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),ne;!(Qt=(ne=Jt.next()).done);Qt=!0){var te=ne.value;tt.set(te,tt.get(te)+fe)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return tt},rt=function(b){var B=0,K=0,Z=0,at=0;if(b.forEach(function(j){j.left?d[g.get(j.left)]-d[g.get(j.right)]>=0?B++:K++:N[g.get(j.top)]-N[g.get(j.bottom)]>=0?Z++:at++}),B>K&&Z>at)for(var ct=0;ct<g.size;ct++)d[ct]=-1*d[ct],N[ct]=-1*N[ct];else if(B>K)for(var nt=0;nt<g.size;nt++)d[nt]=-1*d[nt];else if(Z>at)for(var tt=0;tt<g.size;tt++)N[tt]=-1*N[tt]},n=function(b){var B=[],K=new v,Z=new Set,at=0;return b.forEach(function(ct,nt){if(!Z.has(nt)){B[at]=[];var tt=nt;for(K.push(tt),Z.add(tt),B[at].push(tt);K.length!=0;){tt=K.shift();var j=b.get(tt);j.forEach(function(ut){Z.has(ut.id)||(K.push(ut.id),Z.add(ut.id),B[at].push(ut.id))})}at++}}),B},m=function(b){var B=new Map;return b.forEach(function(K,Z){B.set(Z,[])}),b.forEach(function(K,Z){K.forEach(function(at){B.get(Z).push(at),B.get(at.id).push({id:Z,gap:at.gap,direction:at.direction})})}),B},p=function(b){var B=new Map;return b.forEach(function(K,Z){B.set(Z,[])}),b.forEach(function(K,Z){K.forEach(function(at){B.get(at.id).push({id:Z,gap:at.gap,direction:at.direction})})}),B},E=[],y=[],I=!1,M=!1,R=new Set,W=new Map,x=new Map,q=[];if(l.fixedNodeConstraint&&l.fixedNodeConstraint.forEach(function(S){R.add(S.nodeId)}),l.relativePlacementConstraint&&(l.relativePlacementConstraint.forEach(function(S){S.left?(W.has(S.left)?W.get(S.left).push({id:S.right,gap:S.gap,direction:"horizontal"}):W.set(S.left,[{id:S.right,gap:S.gap,direction:"horizontal"}]),W.has(S.right)||W.set(S.right,[])):(W.has(S.top)?W.get(S.top).push({id:S.bottom,gap:S.gap,direction:"vertical"}):W.set(S.top,[{id:S.bottom,gap:S.gap,direction:"vertical"}]),W.has(S.bottom)||W.set(S.bottom,[]))}),x=m(W),q=n(x)),r.TRANSFORM_ON_CONSTRAINT_HANDLING){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>1)l.fixedNodeConstraint.forEach(function(S,b){E[b]=[S.position.x,S.position.y],y[b]=[d[g.get(S.nodeId)],N[g.get(S.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var S=0;if(l.alignmentConstraint.vertical){for(var b=l.alignmentConstraint.vertical,B=function(tt){var j=new Set;b[tt].forEach(function(pt){j.add(pt)});var ut=new Set([].concat(f(j)).filter(function(pt){return R.has(pt)})),wt=void 0;ut.size>0?wt=d[g.get(ut.values().next().value)]:wt=J(j).x,b[tt].forEach(function(pt){E[S]=[wt,N[g.get(pt)]],y[S]=[d[g.get(pt)],N[g.get(pt)]],S++})},K=0;K<b.length;K++)B(K);I=!0}if(l.alignmentConstraint.horizontal){for(var Z=l.alignmentConstraint.horizontal,at=function(tt){var j=new Set;Z[tt].forEach(function(pt){j.add(pt)});var ut=new Set([].concat(f(j)).filter(function(pt){return R.has(pt)})),wt=void 0;ut.size>0?wt=d[g.get(ut.values().next().value)]:wt=J(j).y,Z[tt].forEach(function(pt){E[S]=[d[g.get(pt)],wt],y[S]=[d[g.get(pt)],N[g.get(pt)]],S++})},ct=0;ct<Z.length;ct++)at(ct);I=!0}l.relativePlacementConstraint&&(M=!0)})();else if(l.relativePlacementConstraint){for(var V=0,Y=0,et=0;et<q.length;et++)q[et].length>V&&(V=q[et].length,Y=et);if(V<x.size/2)rt(l.relativePlacementConstraint),I=!1,M=!1;else{var z=new Map,O=new Map,H=[];q[Y].forEach(function(S){W.get(S).forEach(function(b){b.direction=="horizontal"?(z.has(S)?z.get(S).push(b):z.set(S,[b]),z.has(b.id)||z.set(b.id,[]),H.push({left:S,right:b.id})):(O.has(S)?O.get(S).push(b):O.set(S,[b]),O.has(b.id)||O.set(b.id,[]),H.push({top:S,bottom:b.id}))})}),rt(H),M=!1;var $=D(z,"horizontal"),_=D(O,"vertical");q[Y].forEach(function(S,b){y[b]=[d[g.get(S)],N[g.get(S)]],E[b]=[],$.has(S)?E[b][0]=$.get(S):E[b][0]=d[g.get(S)],_.has(S)?E[b][1]=_.get(S):E[b][1]=N[g.get(S)]}),I=!0}}if(I){for(var ht=void 0,Q=t.transpose(E),It=t.transpose(y),Nt=0;Nt<Q.length;Nt++)Q[Nt]=t.multGamma(Q[Nt]),It[Nt]=t.multGamma(It[Nt]);var vt=t.multMat(Q,t.transpose(It)),it=o.svd(vt);ht=t.multMat(it.V,t.transpose(it.U));for(var gt=0;gt<g.size;gt++){var mt=[d[gt],N[gt]],At=[ht[0][0],ht[1][0]],Ot=[ht[0][1],ht[1][1]];d[gt]=t.dotProduct(mt,At),N[gt]=t.dotProduct(mt,Ot)}M&&rt(l.relativePlacementConstraint)}}if(r.ENFORCE_CONSTRAINTS){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>0){var Et={x:0,y:0};l.fixedNodeConstraint.forEach(function(S,b){var B={x:d[g.get(S.nodeId)],y:N[g.get(S.nodeId)]},K=S.position,Z=X(K,B);Et.x+=Z.x,Et.y+=Z.y}),Et.x/=l.fixedNodeConstraint.length,Et.y/=l.fixedNodeConstraint.length,d.forEach(function(S,b){d[b]+=Et.x}),N.forEach(function(S,b){N[b]+=Et.y}),l.fixedNodeConstraint.forEach(function(S){d[g.get(S.nodeId)]=S.position.x,N[g.get(S.nodeId)]=S.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Dt=l.alignmentConstraint.vertical,Rt=function(b){var B=new Set;Dt[b].forEach(function(at){B.add(at)});var K=new Set([].concat(f(B)).filter(function(at){return R.has(at)})),Z=void 0;K.size>0?Z=d[g.get(K.values().next().value)]:Z=J(B).x,B.forEach(function(at){R.has(at)||(d[g.get(at)]=Z)})},Ht=0;Ht<Dt.length;Ht++)Rt(Ht);if(l.alignmentConstraint.horizontal)for(var Ut=l.alignmentConstraint.horizontal,Pt=function(b){var B=new Set;Ut[b].forEach(function(at){B.add(at)});var K=new Set([].concat(f(B)).filter(function(at){return R.has(at)})),Z=void 0;K.size>0?Z=N[g.get(K.values().next().value)]:Z=J(B).y,B.forEach(function(at){R.has(at)||(N[g.get(at)]=Z)})},Ft=0;Ft<Ut.length;Ft++)Pt(Ft)}l.relativePlacementConstraint&&(function(){var S=new Map,b=new Map,B=new Map,K=new Map,Z=new Map,at=new Map,ct=new Set,nt=new Set;if(R.forEach(function(Gt){ct.add(Gt),nt.add(Gt)}),l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var tt=l.alignmentConstraint.vertical,j=function(yt){B.set("dummy"+yt,[]),tt[yt].forEach(function(Mt){S.set(Mt,"dummy"+yt),B.get("dummy"+yt).push(Mt),R.has(Mt)&&ct.add("dummy"+yt)}),Z.set("dummy"+yt,d[g.get(tt[yt][0])])},ut=0;ut<tt.length;ut++)j(ut);if(l.alignmentConstraint.horizontal)for(var wt=l.alignmentConstraint.horizontal,pt=function(yt){K.set("dummy"+yt,[]),wt[yt].forEach(function(Mt){b.set(Mt,"dummy"+yt),K.get("dummy"+yt).push(Mt),R.has(Mt)&&nt.add("dummy"+yt)}),at.set("dummy"+yt,N[g.get(wt[yt][0])])},xt=0;xt<wt.length;xt++)pt(xt)}var lt=new Map,ot=new Map,Lt=function(yt){W.get(yt).forEach(function(Mt){var Zt=void 0,Bt=void 0;Mt.direction=="horizontal"?(Zt=S.get(yt)?S.get(yt):yt,S.get(Mt.id)?Bt={id:S.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:Bt=Mt,lt.has(Zt)?lt.get(Zt).push(Bt):lt.set(Zt,[Bt]),lt.has(Bt.id)||lt.set(Bt.id,[])):(Zt=b.get(yt)?b.get(yt):yt,b.get(Mt.id)?Bt={id:b.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:Bt=Mt,ot.has(Zt)?ot.get(Zt).push(Bt):ot.set(Zt,[Bt]),ot.has(Bt.id)||ot.set(Bt.id,[]))})},ft=!0,st=!1,Xt=void 0;try{for(var Tt=W.keys()[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var $t=Ct.value;Lt($t)}}catch(Gt){st=!0,Xt=Gt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}var bt=m(lt),zt=m(ot),St=n(bt),kt=n(zt),Kt=p(lt),fe=p(ot),Qt=[],jt=[];St.forEach(function(Gt,yt){Qt[yt]=[],Gt.forEach(function(Mt){Kt.get(Mt).length==0&&Qt[yt].push(Mt)})}),kt.forEach(function(Gt,yt){jt[yt]=[],Gt.forEach(function(Mt){fe.get(Mt).length==0&&jt[yt].push(Mt)})});var _t=D(lt,"horizontal",ct,Z,Qt),Jt=D(ot,"vertical",nt,at,jt),ne=function(yt){B.get(yt)?B.get(yt).forEach(function(Mt){d[g.get(Mt)]=_t.get(yt)}):d[g.get(yt)]=_t.get(yt)},te=!0,ee=!1,Te=void 0;try{for(var ce=_t.keys()[Symbol.iterator](),Ne;!(te=(Ne=ce.next()).done);te=!0){var ge=Ne.value;ne(ge)}}catch(Gt){ee=!0,Te=Gt}finally{try{!te&&ce.return&&ce.return()}finally{if(ee)throw Te}}var $e=function(yt){K.get(yt)?K.get(yt).forEach(function(Mt){N[g.get(Mt)]=Jt.get(yt)}):N[g.get(yt)]=Jt.get(yt)},ue=!0,Le=!1,Ce=void 0;try{for(var de=Jt.keys()[Symbol.iterator](),Ae;!(ue=(Ae=de.next()).done);ue=!0){var ge=Ae.value;$e(ge)}}catch(Gt){Le=!0,Ce=Gt}finally{try{!ue&&de.return&&de.return()}finally{if(Le)throw Ce}}})()}for(var Yt=0;Yt<F.length;Yt++){var Vt=F[Yt];Vt.getChild()==null&&Vt.setCenter(d[g.get(Vt.id)],N[g.get(Vt.id)])}},a.exports=s}),551:(a=>{a.exports=w})},L={};function u(a){var e=L[a];if(e!==void 0)return e.exports;var i=L[a]={exports:{}};return U[a](i,i.exports,u),i.exports}var h=u(45);return h})()})})(he)),he.exports}var vr=se.exports,Oe;function pr(){return Oe||(Oe=1,(function(C,P){(function(U,L){C.exports=L(dr())})(vr,function(w){return(()=>{var U={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var i=arguments.length,f=Array(i>1?i-1:0),r=1;r<i;r++)f[r-1]=arguments[r];return f.forEach(function(v){Object.keys(v).forEach(function(t){return e[t]=v[t]})}),e}}),548:((a,e,i)=>{var f=(function(){function t(o,s){var c=[],l=!0,T=!1,g=void 0;try{for(var d=o[Symbol.iterator](),N;!(l=(N=d.next()).done)&&(c.push(N.value),!(s&&c.length===s));l=!0);}catch(F){T=!0,g=F}finally{try{!l&&d.return&&d.return()}finally{if(T)throw g}}return c}return function(o,s){if(Array.isArray(o))return o;if(Symbol.iterator in Object(o))return t(o,s);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),r=i(140).layoutBase.LinkedList,v={};v.getTopMostNodes=function(t){for(var o={},s=0;s<t.length;s++)o[t[s].id()]=!0;var c=t.filter(function(l,T){typeof l=="number"&&(l=T);for(var g=l.parent()[0];g!=null;){if(o[g.id()])return!1;g=g.parent()[0]}return!0});return c},v.connectComponents=function(t,o,s,c){var l=new r,T=new Set,g=[],d=void 0,N=void 0,F=void 0,A=!1,G=1,k=[],X=[],J=function(){var rt=t.collection();X.push(rt);var n=s[0],m=t.collection();m.merge(n).merge(n.descendants().intersection(o)),g.push(n),m.forEach(function(y){l.push(y),T.add(y),rt.merge(y)});for(var p=function(){n=l.shift();var I=t.collection();n.neighborhood().nodes().forEach(function(x){o.intersection(n.edgesWith(x)).length>0&&I.merge(x)});for(var M=0;M<I.length;M++){var R=I[M];if(d=s.intersection(R.union(R.ancestors())),d!=null&&!T.has(d[0])){var W=d.union(d.descendants());W.forEach(function(x){l.push(x),T.add(x),rt.merge(x),s.has(x)&&g.push(x)})}}};l.length!=0;)p();if(rt.forEach(function(y){o.intersection(y.connectedEdges()).forEach(function(I){rt.has(I.source())&&rt.has(I.target())&&rt.merge(I)})}),g.length==s.length&&(A=!0),!A||A&&G>1){N=g[0],F=N.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length<F&&(F=y.connectedEdges().length,N=y)}),k.push(N.id());var E=t.collection();E.merge(g[0]),g.forEach(function(y){E.merge(y)}),g=[],s=s.difference(E),G++}};do J();while(!A);return c&&k.length>0&&c.set("dummy"+(c.size+1),k),X},v.relocateComponent=function(t,o,s){if(!s.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(s.quality=="draft"){var d=!0,N=!1,F=void 0;try{for(var A=o.nodeIndexes[Symbol.iterator](),G;!(d=(G=A.next()).done);d=!0){var k=G.value,X=f(k,2),J=X[0],D=X[1],rt=s.cy.getElementById(J);if(rt){var n=rt.boundingBox(),m=o.xCoords[D]-n.w/2,p=o.xCoords[D]+n.w/2,E=o.yCoords[D]-n.h/2,y=o.yCoords[D]+n.h/2;m<c&&(c=m),p>l&&(l=p),E<T&&(T=E),y>g&&(g=y)}}}catch(x){N=!0,F=x}finally{try{!d&&A.return&&A.return()}finally{if(N)throw F}}var I=t.x-(l+c)/2,M=t.y-(g+T)/2;o.xCoords=o.xCoords.map(function(x){return x+I}),o.yCoords=o.yCoords.map(function(x){return x+M})}else{Object.keys(o).forEach(function(x){var q=o[x],V=q.getRect().x,Y=q.getRect().x+q.getRect().width,et=q.getRect().y,z=q.getRect().y+q.getRect().height;V<c&&(c=V),Y>l&&(l=Y),et<T&&(T=et),z>g&&(g=z)});var R=t.x-(l+c)/2,W=t.y-(g+T)/2;Object.keys(o).forEach(function(x){var q=o[x];q.setCenter(q.getCenterX()+R,q.getCenterY()+W)})}}},v.calcBoundingBox=function(t,o,s,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,N=void 0,F=void 0,A=void 0,G=void 0,k=t.descendants().not(":parent"),X=k.length,J=0;J<X;J++){var D=k[J];N=o[c.get(D.id())]-D.width()/2,F=o[c.get(D.id())]+D.width()/2,A=s[c.get(D.id())]-D.height()/2,G=s[c.get(D.id())]+D.height()/2,l>N&&(l=N),T<F&&(T=F),g>A&&(g=A),d<G&&(d=G)}var rt={};return rt.topLeftX=l,rt.topLeftY=g,rt.width=T-l,rt.height=d-g,rt},v.calcParentsWithoutChildren=function(t,o){var s=t.collection();return o.nodes(":parent").forEach(function(c){var l=!1;c.children().forEach(function(T){T.css("display")!="none"&&(l=!0)}),l||s.merge(c)}),s},a.exports=v}),816:((a,e,i)=>{var f=i(548),r=i(140).CoSELayout,v=i(140).CoSENode,t=i(140).layoutBase.PointD,o=i(140).layoutBase.DimensionD,s=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,l=i(140).CoSEConstants,T=function(d,N){var F=d.cy,A=d.eles,G=A.nodes(),k=A.edges(),X=void 0,J=void 0,D=void 0,rt={};d.randomize&&(X=N.nodeIndexes,J=N.xCoords,D=N.yCoords);var n=function(x){return typeof x=="function"},m=function(x,q){return n(x)?x(q):x},p=f.calcParentsWithoutChildren(F,A),E=function W(x,q,V,Y){for(var et=q.length,z=0;z<et;z++){var O=q[z],H=null;O.intersection(p).length==0&&(H=O.children());var $=void 0,_=O.layoutDimensions({nodeDimensionsIncludeLabels:Y.nodeDimensionsIncludeLabels});if(O.outerWidth()!=null&&O.outerHeight()!=null)if(Y.randomize)if(!O.isParent())$=x.add(new v(V.graphManager,new t(J[X.get(O.id())]-_.w/2,D[X.get(O.id())]-_.h/2),new o(parseFloat(_.w),parseFloat(_.h))));else{var ht=f.calcBoundingBox(O,J,D,X);O.intersection(p).length==0?$=x.add(new v(V.graphManager,new t(ht.topLeftX,ht.topLeftY),new o(ht.width,ht.height))):$=x.add(new v(V.graphManager,new t(ht.topLeftX,ht.topLeftY),new o(parseFloat(_.w),parseFloat(_.h))))}else $=x.add(new v(V.graphManager,new t(O.position("x")-_.w/2,O.position("y")-_.h/2),new o(parseFloat(_.w),parseFloat(_.h))));else $=x.add(new v(this.graphManager));if($.id=O.data("id"),$.nodeRepulsion=m(Y.nodeRepulsion,O),$.paddingLeft=parseInt(O.css("padding")),$.paddingTop=parseInt(O.css("padding")),$.paddingRight=parseInt(O.css("padding")),$.paddingBottom=parseInt(O.css("padding")),Y.nodeDimensionsIncludeLabels&&($.labelWidth=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,$.labelHeight=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,$.labelPosVertical=O.css("text-valign"),$.labelPosHorizontal=O.css("text-halign")),rt[O.data("id")]=$,isNaN($.rect.x)&&($.rect.x=0),isNaN($.rect.y)&&($.rect.y=0),H!=null&&H.length>0){var Q=void 0;Q=V.getGraphManager().add(V.newGraph(),$),W(Q,H,V,Y)}}},y=function(x,q,V){for(var Y=0,et=0,z=0;z<V.length;z++){var O=V[z],H=rt[O.data("source")],$=rt[O.data("target")];if(H&&$&&H!==$&&H.getEdgesBetween($).length==0){var _=q.add(x.newEdge(),H,$);_.id=O.id(),_.idealLength=m(d.idealEdgeLength,O),_.edgeElasticity=m(d.edgeElasticity,O),Y+=_.idealLength,et++}}d.idealEdgeLength!=null&&(et>0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=Y/et:n(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,q){q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=q.fixedNodeConstraint),q.alignmentConstraint&&(x.constraints.alignmentConstraint=q.alignmentConstraint),q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=q.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?s.QUALITY=2:s.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=s.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=s.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,s.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var M=new r,R=M.newGraphManager();return E(R.addRoot(),f.getTopMostNodes(G),M,d),y(M,R,k),I(M,d),M.runLayout(),rt};a.exports={coseLayout:T}}),212:((a,e,i)=>{var f=(function(){function d(N,F){for(var A=0;A<F.length;A++){var G=F[A];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(N,G.key,G)}}return function(N,F,A){return F&&d(N.prototype,F),A&&d(N,A),N}})();function r(d,N){if(!(d instanceof N))throw new TypeError("Cannot call a class as a function")}var v=i(658),t=i(548),o=i(657),s=o.spectralLayout,c=i(816),l=c.coseLayout,T=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(N){return 4500},idealEdgeLength:function(N){return 50},edgeElasticity:function(N){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),g=(function(){function d(N){r(this,d),this.options=v({},T,N)}return f(d,[{key:"run",value:function(){var F=this,A=this.options,G=A.cy,k=A.eles,X=[],J=[],D=void 0,rt=[];A.fixedNodeConstraint&&(!Array.isArray(A.fixedNodeConstraint)||A.fixedNodeConstraint.length==0)&&(A.fixedNodeConstraint=void 0),A.alignmentConstraint&&(A.alignmentConstraint.vertical&&(!Array.isArray(A.alignmentConstraint.vertical)||A.alignmentConstraint.vertical.length==0)&&(A.alignmentConstraint.vertical=void 0),A.alignmentConstraint.horizontal&&(!Array.isArray(A.alignmentConstraint.horizontal)||A.alignmentConstraint.horizontal.length==0)&&(A.alignmentConstraint.horizontal=void 0)),A.relativePlacementConstraint&&(!Array.isArray(A.relativePlacementConstraint)||A.relativePlacementConstraint.length==0)&&(A.relativePlacementConstraint=void 0);var n=A.fixedNodeConstraint||A.alignmentConstraint||A.relativePlacementConstraint;n&&(A.tile=!1,A.packComponents=!1);var m=void 0,p=!1;if(G.layoutUtilities&&A.packComponents&&(m=G.layoutUtilities("get"),m||(m=G.layoutUtilities()),p=!0),k.nodes().length>0)if(p){var I=t.getTopMostNodes(A.eles.nodes());if(D=t.connectComponents(G,A.eles,I),D.forEach(function(vt){var it=vt.boundingBox();rt.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),A.randomize&&D.forEach(function(vt){A.eles=vt,X.push(s(A))}),A.quality=="default"||A.quality=="proof"){var M=G.collection();if(A.tile){var R=new Map,W=[],x=[],q=0,V={nodeIndexes:R,xCoords:W,yCoords:x},Y=[];if(D.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(gt,mt){M.merge(vt.nodes()[mt]),gt.isParent()||(V.nodeIndexes.set(vt.nodes()[mt].id(),q++),V.xCoords.push(vt.nodes()[0].position().x),V.yCoords.push(vt.nodes()[0].position().y))}),Y.push(it))}),M.length>1){var et=M.boundingBox();rt.push({x:et.x1+et.w/2,y:et.y1+et.h/2}),D.push(M),X.push(V);for(var z=Y.length-1;z>=0;z--)D.splice(Y[z],1),X.splice(Y[z],1),rt.splice(Y[z],1)}}D.forEach(function(vt,it){A.eles=vt,J.push(l(A,X[it])),t.relocateComponent(rt[it],J[it],A)})}else D.forEach(function(vt,it){t.relocateComponent(rt[it],X[it],A)});var O=new Set;if(D.length>1){var H=[],$=k.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,it){var gt=void 0;if(A.quality=="draft"&&(gt=X[it].nodeIndexes),vt.nodes().not($).length>0){var mt={};mt.edges=[],mt.nodes=[];var At=void 0;vt.nodes().not($).forEach(function(Ot){if(A.quality=="draft")if(!Ot.isParent())At=gt.get(Ot.id()),mt.nodes.push({x:X[it].xCoords[At]-Ot.boundingbox().w/2,y:X[it].yCoords[At]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var Et=t.calcBoundingBox(Ot,X[it].xCoords,X[it].yCoords,gt);mt.nodes.push({x:Et.topLeftX,y:Et.topLeftY,width:Et.width,height:Et.height})}else J[it][Ot.id()]&&mt.nodes.push({x:J[it][Ot.id()].getLeft(),y:J[it][Ot.id()].getTop(),width:J[it][Ot.id()].getWidth(),height:J[it][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var Et=Ot.source(),Dt=Ot.target();if(Et.css("display")!="none"&&Dt.css("display")!="none")if(A.quality=="draft"){var Rt=gt.get(Et.id()),Ht=gt.get(Dt.id()),Ut=[],Pt=[];if(Et.isParent()){var Ft=t.calcBoundingBox(Et,X[it].xCoords,X[it].yCoords,gt);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(X[it].xCoords[Rt]),Ut.push(X[it].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,X[it].xCoords,X[it].yCoords,gt);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(X[it].xCoords[Ht]),Pt.push(X[it].yCoords[Ht]);mt.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else J[it][Et.id()]&&J[it][Dt.id()]&&mt.edges.push({startX:J[it][Et.id()].getCenterX(),startY:J[it][Et.id()].getCenterY(),endX:J[it][Dt.id()].getCenterX(),endY:J[it][Dt.id()].getCenterY()})}),mt.nodes.length>0&&(H.push(mt),O.add(it))}});var _=m.packComponents(H,A.randomize).shifts;if(A.quality=="draft")X.forEach(function(vt,it){var gt=vt.xCoords.map(function(At){return At+_[it].dx}),mt=vt.yCoords.map(function(At){return At+_[it].dy});vt.xCoords=gt,vt.yCoords=mt});else{var ht=0;O.forEach(function(vt){Object.keys(J[vt]).forEach(function(it){var gt=J[vt][it];gt.setCenter(gt.getCenterX()+_[ht].dx,gt.getCenterY()+_[ht].dy)}),ht++})}}}else{var E=A.eles.boundingBox();if(rt.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),A.randomize){var y=s(A);X.push(y)}A.quality=="default"||A.quality=="proof"?(J.push(l(A,X[0])),t.relocateComponent(rt[0],J[0],A)):t.relocateComponent(rt[0],X[0],A)}var Q=function(it,gt){if(A.quality=="default"||A.quality=="proof"){typeof it=="number"&&(it=gt);var mt=void 0,At=void 0,Ot=it.data("id");return J.forEach(function(Dt){Ot in Dt&&(mt={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},At=Dt[Ot])}),A.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?mt.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(mt.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?mt.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(mt.y-=At.labelHeight/2))),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}else{var Et=void 0;return X.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(it.id());Rt!=null&&(Et={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}};if(A.quality=="default"||A.quality=="proof"||A.randomize){var It=t.calcParentsWithoutChildren(G,k),Nt=k.filter(function(vt){return vt.css("display")=="none"});A.eles=k.not(Nt),k.nodes().not(":parent").not(Nt).layoutPositions(F,A,Q),It.length>0&&It.forEach(function(vt){vt.position(Q(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d})();a.exports=g}),657:((a,e,i)=>{var f=i(548),r=i(140).layoutBase.Matrix,v=i(140).layoutBase.SVD,t=function(s){var c=s.cy,l=s.eles,T=l.nodes(),g=l.nodes(":parent"),d=new Map,N=new Map,F=new Map,A=[],G=[],k=[],X=[],J=[],D=[],rt=[],n=[],m=void 0,p=1e8,E=1e-9,y=s.piTol,I=s.samplingType,M=s.nodeSeparation,R=void 0,W=function(){for(var b=0,B=0,K=!1;B<R;){b=Math.floor(Math.random()*m),K=!1;for(var Z=0;Z<B;Z++)if(X[Z]==b){K=!0;break}if(!K)X[B]=b,B++;else continue}},x=function(b,B,K){for(var Z=[],at=0,ct=0,nt=0,tt=void 0,j=[],ut=0,wt=1,pt=0;pt<m;pt++)j[pt]=p;for(Z[ct]=b,j[b]=0;ct>=at;){nt=Z[at++];for(var xt=A[nt],lt=0;lt<xt.length;lt++)tt=N.get(xt[lt]),j[tt]==p&&(j[tt]=j[nt]+1,Z[++ct]=tt);D[nt][B]=j[nt]*M}if(K){for(var ot=0;ot<m;ot++)D[ot][B]<J[ot]&&(J[ot]=D[ot][B]);for(var Lt=0;Lt<m;Lt++)J[Lt]>ut&&(ut=J[Lt],wt=Lt)}return wt},q=function(b){var B=void 0;if(b){B=Math.floor(Math.random()*m);for(var Z=0;Z<m;Z++)J[Z]=p;for(var at=0;at<R;at++)X[at]=B,B=x(B,at,b)}else{W();for(var K=0;K<R;K++)x(X[K],K,b)}for(var ct=0;ct<m;ct++)for(var nt=0;nt<R;nt++)D[ct][nt]*=D[ct][nt];for(var tt=0;tt<R;tt++)rt[tt]=[];for(var j=0;j<R;j++)for(var ut=0;ut<R;ut++)rt[j][ut]=D[X[ut]][j]},V=function(){for(var b=v.svd(rt),B=b.S,K=b.U,Z=b.V,at=B[0]*B[0]*B[0],ct=[],nt=0;nt<R;nt++){ct[nt]=[];for(var tt=0;tt<R;tt++)ct[nt][tt]=0,nt==tt&&(ct[nt][tt]=B[nt]/(B[nt]*B[nt]+at/(B[nt]*B[nt])))}n=r.multMat(r.multMat(Z,ct),r.transpose(K))},Y=function(){for(var b=void 0,B=void 0,K=[],Z=[],at=[],ct=[],nt=0;nt<m;nt++)K[nt]=Math.random(),Z[nt]=Math.random();K=r.normalize(K),Z=r.normalize(Z);for(var tt=E,j=E,ut=void 0;;){for(var wt=0;wt<m;wt++)at[wt]=K[wt];if(K=r.multGamma(r.multL(r.multGamma(at),D,n)),b=r.dotProduct(at,K),K=r.normalize(K),tt=r.dotProduct(at,K),ut=Math.abs(tt/j),ut<=1+y&&ut>=1)break;j=tt}for(var pt=0;pt<m;pt++)at[pt]=K[pt];for(j=E;;){for(var xt=0;xt<m;xt++)ct[xt]=Z[xt];if(ct=r.minusOp(ct,r.multCons(at,r.dotProduct(at,ct))),Z=r.multGamma(r.multL(r.multGamma(ct),D,n)),B=r.dotProduct(ct,Z),Z=r.normalize(Z),tt=r.dotProduct(ct,Z),ut=Math.abs(tt/j),ut<=1+y&&ut>=1)break;j=tt}for(var lt=0;lt<m;lt++)ct[lt]=Z[lt];G=r.multCons(at,Math.sqrt(Math.abs(b))),k=r.multCons(ct,Math.sqrt(Math.abs(B)))};f.connectComponents(c,l,f.getTopMostNodes(T),d),g.forEach(function(S){f.connectComponents(c,l,f.getTopMostNodes(S.descendants().intersection(l)),d)});for(var et=0,z=0;z<T.length;z++)T[z].isParent()||N.set(T[z].id(),et++);var O=!0,H=!1,$=void 0;try{for(var _=d.keys()[Symbol.iterator](),ht;!(O=(ht=_.next()).done);O=!0){var Q=ht.value;N.set(Q,et++)}}catch(S){H=!0,$=S}finally{try{!O&&_.return&&_.return()}finally{if(H)throw $}}for(var It=0;It<N.size;It++)A[It]=[];g.forEach(function(S){for(var b=S.children().intersection(l);b.nodes(":childless").length==0;)b=b.nodes()[0].children().intersection(l);var B=0,K=b.nodes(":childless")[0].connectedEdges().length;b.nodes(":childless").forEach(function(Z,at){Z.connectedEdges().length<K&&(K=Z.connectedEdges().length,B=at)}),F.set(S.id(),b.nodes(":childless")[B].id())}),T.forEach(function(S){var b=void 0;S.isParent()?b=N.get(F.get(S.id())):b=N.get(S.id()),S.neighborhood().nodes().forEach(function(B){l.intersection(S.edgesWith(B)).length>0&&(B.isParent()?A[b].push(F.get(B.id())):A[b].push(B.id()))})});var Nt=function(b){var B=N.get(b),K=void 0;d.get(b).forEach(function(Z){c.getElementById(Z).isParent()?K=F.get(Z):K=Z,A[B].push(K),A[N.get(K)].push(b)})},vt=!0,it=!1,gt=void 0;try{for(var mt=d.keys()[Symbol.iterator](),At;!(vt=(At=mt.next()).done);vt=!0){var Ot=At.value;Nt(Ot)}}catch(S){it=!0,gt=S}finally{try{!vt&&mt.return&&mt.return()}finally{if(it)throw gt}}m=N.size;var Et=void 0;if(m>2){R=m<s.sampleSize?m:s.sampleSize;for(var Dt=0;Dt<m;Dt++)D[Dt]=[];for(var Rt=0;Rt<R;Rt++)n[Rt]=[];return s.quality=="draft"||s.step=="all"?(q(I),V(),Y(),Et={nodeIndexes:N,xCoords:G,yCoords:k}):(N.forEach(function(S,b){G.push(c.getElementById(b).position("x")),k.push(c.getElementById(b).position("y"))}),Et={nodeIndexes:N,xCoords:G,yCoords:k}),Et}else{var Ht=N.keys(),Ut=c.getElementById(Ht.next().value),Pt=Ut.position(),Ft=Ut.outerWidth();if(G.push(Pt.x),k.push(Pt.y),m==2){var Yt=c.getElementById(Ht.next().value),Vt=Yt.outerWidth();G.push(Pt.x+Ft/2+Vt/2+s.idealEdgeLength),k.push(Pt.y)}return Et={nodeIndexes:N,xCoords:G,yCoords:k},Et}};a.exports={spectralLayout:t}}),579:((a,e,i)=>{var f=i(212),r=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&r(cytoscape),a.exports=r}),140:(a=>{a.exports=w})},L={};function u(a){var e=L[a];if(e!==void 0)return e.exports;var i=L[a]={exports:{}};return U[a](i,i.exports,u),i.exports}var h=u(579);return h})()})})(se)),se.exports}var yr=pr();const Er=fr(yr);var De={L:"left",R:"right",T:"top",B:"bottom"},xe={L:dt(C=>`${C},${C/2} 0,${C} 0,0`,"L"),R:dt(C=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:dt(C=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:dt(C=>`${C/2},0 ${C},${C} 0,${C}`,"B")},oe={L:dt((C,P)=>C-P+2,"L"),R:dt((C,P)=>C-2,"R"),T:dt((C,P)=>C-P+2,"T"),B:dt((C,P)=>C-2,"B")},mr=dt(function(C){return Wt(C)?C==="L"?"R":"L":C==="T"?"B":"T"},"getOppositeArchitectureDirection"),Ie=dt(function(C){const P=C;return P==="L"||P==="R"||P==="T"||P==="B"},"isArchitectureDirection"),Wt=dt(function(C){const P=C;return P==="L"||P==="R"},"isArchitectureDirectionX"),qt=dt(function(C){const P=C;return P==="T"||P==="B"},"isArchitectureDirectionY"),me=dt(function(C,P){const w=Wt(C)&&qt(P),U=qt(C)&&Wt(P);return w||U},"isArchitectureDirectionXY"),Tr=dt(function(C){const P=C[0],w=C[1],U=Wt(P)&&qt(w),L=qt(P)&&Wt(w);return U||L},"isArchitecturePairXY"),Nr=dt(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),pe=dt(function(C,P){const w=`${C}${P}`;return Nr(w)?w:void 0},"getArchitectureDirectionPair"),Lr=dt(function([C,P],w){const U=w[0],L=w[1];return Wt(U)?qt(L)?[C+(U==="L"?-1:1),P+(L==="T"?1:-1)]:[C+(U==="L"?-1:1),P]:Wt(L)?[C+(L==="L"?1:-1),P+(U==="T"?1:-1)]:[C,P+(U==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Cr=dt(function(C){return C==="LT"||C==="TL"?[1,1]:C==="BL"||C==="LB"?[1,-1]:C==="BR"||C==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ar=dt(function(C,P){return me(C,P)?"bend":Wt(C)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),wr=dt(function(C){return C.type==="service"},"isArchitectureService"),Mr=dt(function(C){return C.type==="junction"},"isArchitectureJunction"),Fe=dt(C=>C.data(),"edgeData"),ie=dt(C=>C.data(),"nodeData"),Or=er.architecture,be=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Ze,this.getAccTitle=qe,this.setDiagramTitle=Qe,this.getDiagramTitle=Je,this.getAccDescription=Ke,this.setAccDescription=je,this.clear()}static{dt(this,"ArchitectureDB")}setDiagramId(C){this.diagramId=C}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",_e()}addService({id:C,icon:P,in:w,title:U,iconText:L}){if(this.registeredIds[C]!==void 0)throw new Error(`The service id [${C}] is already in use by another ${this.registeredIds[C]}`);if(w!==void 0){if(C===w)throw new Error(`The service [${C}] cannot be placed within itself`);if(this.registeredIds[w]===void 0)throw new Error(`The service [${C}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[w]==="node")throw new Error(`The service [${C}]'s parent is not a group`)}this.registeredIds[C]="node",this.nodes[C]={id:C,type:"service",icon:P,iconText:L,title:U,edges:[],in:w}}getServices(){return Object.values(this.nodes).filter(wr)}addJunction({id:C,in:P}){if(this.registeredIds[C]!==void 0)throw new Error(`The junction id [${C}] is already in use by another ${this.registeredIds[C]}`);if(P!==void 0){if(C===P)throw new Error(`The junction [${C}] cannot be placed within itself`);if(this.registeredIds[P]===void 0)throw new Error(`The junction [${C}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[P]==="node")throw new Error(`The junction [${C}]'s parent is not a group`)}this.registeredIds[C]="node",this.nodes[C]={id:C,type:"junction",edges:[],in:P}}getJunctions(){return Object.values(this.nodes).filter(Mr)}getNodes(){return Object.values(this.nodes)}getNode(C){return this.nodes[C]??null}addGroup({id:C,icon:P,in:w,title:U}){if(this.registeredIds?.[C]!==void 0)throw new Error(`The group id [${C}] is already in use by another ${this.registeredIds[C]}`);if(w!==void 0){if(C===w)throw new Error(`The group [${C}] cannot be placed within itself`);if(this.registeredIds?.[w]===void 0)throw new Error(`The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[w]==="node")throw new Error(`The group [${C}]'s parent is not a group`)}this.registeredIds[C]="group",this.groups[C]={id:C,icon:P,title:U,in:w}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:C,rhsId:P,lhsDir:w,rhsDir:U,lhsInto:L,rhsInto:u,lhsGroup:h,rhsGroup:a,title:e}){if(!Ie(w))throw new Error(`Invalid direction given for left hand side of edge ${C}--${P}. Expected (L,R,T,B) got ${String(w)}`);if(!Ie(U))throw new Error(`Invalid direction given for right hand side of edge ${C}--${P}. Expected (L,R,T,B) got ${String(U)}`);if(this.nodes[C]===void 0&&this.groups[C]===void 0)throw new Error(`The left-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[P]===void 0&&this.groups[P]===void 0)throw new Error(`The right-hand id [${P}] does not yet exist. Please create the service/group before declaring an edge to it.`);const i=this.nodes[C].in,f=this.nodes[P].in;if(h&&i&&f&&i==f)throw new Error(`The left-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&i&&f&&i==f)throw new Error(`The right-hand id [${P}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const r={lhsId:C,lhsDir:w,lhsInto:L,lhsGroup:h,rhsId:P,rhsDir:U,rhsInto:u,rhsGroup:a,title:e};this.edges.push(r),this.nodes[C]&&this.nodes[P]&&(this.nodes[C].edges.push(this.edges[this.edges.length-1]),this.nodes[P].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const C={},P=Object.entries(this.nodes).reduce((a,[e,i])=>(a[e]=i.edges.reduce((f,r)=>{const v=this.getNode(r.lhsId)?.in,t=this.getNode(r.rhsId)?.in;if(v&&t&&v!==t){const o=Ar(r.lhsDir,r.rhsDir);o!=="bend"&&(C[v]??={},C[v][t]=o,C[t]??={},C[t][v]=o)}if(r.lhsId===e){const o=pe(r.lhsDir,r.rhsDir);o&&(f[o]=r.rhsId)}else{const o=pe(r.rhsDir,r.lhsDir);o&&(f[o]=r.lhsId)}return f},{}),a),{}),w=Object.keys(P)[0],U={[w]:1},L=Object.keys(P).reduce((a,e)=>e===w?a:{...a,[e]:1},{}),u=dt(a=>{const e={[a]:[0,0]},i=[a];for(;i.length>0;){const f=i.shift();if(f){U[f]=1,delete L[f];const r=P[f],[v,t]=e[f];Object.entries(r).forEach(([o,s])=>{U[s]||(e[s]=Lr([v,t],o),i.push(s))})}}return e},"BFS"),h=[u(w)];for(;Object.keys(L).length>0;)h.push(u(Object.keys(L)[0]));this.dataStructures={adjList:P,spatialMaps:h,groupAlignments:C}}return this.dataStructures}setElementForId(C,P){this.elements[C]=P}getElementById(C){return this.elements[C]}getConfig(){return tr({...Or,...rr().architecture})}getConfigField(C){return this.getConfig()[C]}},Dr=dt((C,P)=>{hr(C,P),C.groups.map(w=>P.addGroup(w)),C.services.map(w=>P.addService({...w,type:"service"})),C.junctions.map(w=>P.addJunction({...w,type:"junction"})),C.edges.map(w=>P.addEdge(w))},"populateDb"),Pe={parser:{yy:void 0},parse:dt(async C=>{const P=await lr("architecture",C);Re.debug(P);const w=Pe.parser?.yy;if(!(w instanceof be))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Dr(P,w)},"parse")},xr=dt(C=>`
|
|
1
|
+
import{_ as dt,K as Be,ae as ke,l as Re,b as Ze,a as qe,q as Qe,t as Je,g as Ke,s as je,z as _e,G as tr,H as er,E as rr,c as ye,al as Ee,aI as ve,i as ir,d as ar,y as nr,aJ as or,aK as sr}from"./mermaid.core-BBuk9zib.js";import{p as hr}from"./chunk-4BX2VUAB-C65wii7K.js";import{p as lr}from"./wardley-RL74JXVD-BlOnmaAF.js";import{c as Se}from"./cytoscape.esm-NC3OMkQG.js";import{aw as fr}from"./index-BYGEr28T.js";import"./min-BI2lsGvT.js";import"./_baseUniq-CAHbz7Vw.js";var se={exports:{}},he={exports:{}},le={exports:{}},cr=le.exports,we;function gr(){return we||(we=1,(function(C,P){(function(U,L){C.exports=L()})(cr,function(){return(function(w){var U={};function L(u){if(U[u])return U[u].exports;var h=U[u]={i:u,l:!1,exports:{}};return w[u].call(h.exports,h,h.exports,L),h.l=!0,h.exports}return L.m=w,L.c=U,L.i=function(u){return u},L.d=function(u,h,a){L.o(u,h)||Object.defineProperty(u,h,{configurable:!1,enumerable:!0,get:a})},L.n=function(u){var h=u&&u.__esModule?function(){return u.default}:function(){return u};return L.d(h,"a",h),h},L.o=function(u,h){return Object.prototype.hasOwnProperty.call(u,h)},L.p="",L(L.s=28)})([(function(w,U,L){function u(){}u.QUALITY=1,u.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,u.DEFAULT_INCREMENTAL=!1,u.DEFAULT_ANIMATION_ON_LAYOUT=!0,u.DEFAULT_ANIMATION_DURING_LAYOUT=!1,u.DEFAULT_ANIMATION_PERIOD=50,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,u.DEFAULT_GRAPH_MARGIN=15,u.NODE_DIMENSIONS_INCLUDE_LABELS=!1,u.SIMPLE_NODE_SIZE=40,u.SIMPLE_NODE_HALF_SIZE=u.SIMPLE_NODE_SIZE/2,u.EMPTY_COMPOUND_NODE_SIZE=40,u.MIN_EDGE_LENGTH=1,u.WORLD_BOUNDARY=1e6,u.INITIAL_WORLD_BOUNDARY=u.WORLD_BOUNDARY/1e3,u.WORLD_CENTER_X=1200,u.WORLD_CENTER_Y=900,w.exports=u}),(function(w,U,L){var u=L(2),h=L(8),a=L(9);function e(f,r,v){u.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=f,this.target=r}e.prototype=Object.create(u.prototype);for(var i in u)e[i]=u[i];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(f,r){for(var v=this.getOtherEnd(f),t=r.getGraphManager().getRoot();;){if(v.getOwner()==r)return v;if(v.getOwner()==t)break;v=v.getOwner().getParent()}return null},e.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.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=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},w.exports=e}),(function(w,U,L){function u(h){this.vGraphObject=h}w.exports=u}),(function(w,U,L){var u=L(2),h=L(10),a=L(13),e=L(0),i=L(16),f=L(5);function r(t,o,s,c){s==null&&c==null&&(c=o),u.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,s!=null&&o!=null?this.rect=new a(o.x,o.y,s.width,s.height):this.rect=new a}r.prototype=Object.create(u.prototype);for(var v in u)r[v]=u[v];r.prototype.getEdges=function(){return this.edges},r.prototype.getChild=function(){return this.child},r.prototype.getOwner=function(){return this.owner},r.prototype.getWidth=function(){return this.rect.width},r.prototype.setWidth=function(t){this.rect.width=t},r.prototype.getHeight=function(){return this.rect.height},r.prototype.setHeight=function(t){this.rect.height=t},r.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},r.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},r.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},r.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},r.prototype.getRect=function(){return this.rect},r.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},r.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},r.prototype.setRect=function(t,o){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=o.width,this.rect.height=o.height},r.prototype.setCenter=function(t,o){this.rect.x=t-this.rect.width/2,this.rect.y=o-this.rect.height/2},r.prototype.setLocation=function(t,o){this.rect.x=t,this.rect.y=o},r.prototype.moveBy=function(t,o){this.rect.x+=t,this.rect.y+=o},r.prototype.getEdgeListToNode=function(t){var o=[],s=this;return s.edges.forEach(function(c){if(c.target==t){if(c.source!=s)throw"Incorrect edge source!";o.push(c)}}),o},r.prototype.getEdgesBetween=function(t){var o=[],s=this;return s.edges.forEach(function(c){if(!(c.source==s||c.target==s))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&o.push(c)}),o},r.prototype.getNeighborsList=function(){var t=new Set,o=this;return o.edges.forEach(function(s){if(s.source==o)t.add(s.target);else{if(s.target!=o)throw"Incorrect incidency!";t.add(s.source)}}),t},r.prototype.withChildren=function(){var t=new Set,o,s;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;l<c.length;l++)o=c[l],s=o.withChildren(),s.forEach(function(T){t.add(T)});return t},r.prototype.getNoOfChildren=function(){var t=0,o;if(this.child==null)t=1;else for(var s=this.child.getNodes(),c=0;c<s.length;c++)o=s[c],t+=o.getNoOfChildren();return t==0&&(t=1),t},r.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},r.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)},r.prototype.scatter=function(){var t,o,s=-e.INITIAL_WORLD_BOUNDARY,c=e.INITIAL_WORLD_BOUNDARY;t=e.WORLD_CENTER_X+i.nextDouble()*(c-s)+s;var l=-e.INITIAL_WORLD_BOUNDARY,T=e.INITIAL_WORLD_BOUNDARY;o=e.WORLD_CENTER_Y+i.nextDouble()*(T-l)+l,this.rect.x=t,this.rect.y=o},r.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var o=t.getRight()-t.getLeft(),s=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(o+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>o?(this.rect.x-=(this.labelWidth-o)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(o+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(s+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>s?(this.rect.y-=(this.labelHeight-s)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(s+this.labelHeight))}}},r.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},r.prototype.transform=function(t){var o=this.rect.x;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var s=this.rect.y;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var c=new f(o,s),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},r.prototype.getLeft=function(){return this.rect.x},r.prototype.getRight=function(){return this.rect.x+this.rect.width},r.prototype.getTop=function(){return this.rect.y},r.prototype.getBottom=function(){return this.rect.y+this.rect.height},r.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},w.exports=r}),(function(w,U,L){var u=L(0);function h(){}for(var a in u)h[a]=u[a];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,w.exports=h}),(function(w,U,L){function u(h,a){h==null&&a==null?(this.x=0,this.y=0):(this.x=h,this.y=a)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.setX=function(h){this.x=h},u.prototype.setY=function(h){this.y=h},u.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},u.prototype.getCopy=function(){return new u(this.x,this.y)},u.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},w.exports=u}),(function(w,U,L){var u=L(2),h=L(10),a=L(0),e=L(7),i=L(3),f=L(1),r=L(13),v=L(12),t=L(11);function o(c,l,T){u.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof e?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}o.prototype=Object.create(u.prototype);for(var s in u)o[s]=u[s];o.prototype.getNodes=function(){return this.nodes},o.prototype.getEdges=function(){return this.edges},o.prototype.getGraphManager=function(){return this.graphManager},o.prototype.getParent=function(){return this.parent},o.prototype.getLeft=function(){return this.left},o.prototype.getRight=function(){return this.right},o.prototype.getTop=function(){return this.top},o.prototype.getBottom=function(){return this.bottom},o.prototype.isConnected=function(){return this.isConnected},o.prototype.add=function(c,l,T){if(l==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},o.prototype.remove=function(c){var l=c;if(c instanceof i){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),g,d=T.length,N=0;N<d;N++)g=T[N],g.isInterGraph?this.graphManager.remove(g):g.source.owner.remove(g);var F=this.nodes.indexOf(l);if(F==-1)throw"Node not in owner node list!";this.nodes.splice(F,1)}else if(c instanceof f){var g=c;if(g==null)throw"Edge is null!";if(!(g.source!=null&&g.target!=null))throw"Source and/or target is null!";if(!(g.source.owner!=null&&g.target.owner!=null&&g.source.owner==this&&g.target.owner==this))throw"Source and/or target owner is invalid!";var A=g.source.edges.indexOf(g),G=g.target.edges.indexOf(g);if(!(A>-1&&G>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(A,1),g.target!=g.source&&g.target.edges.splice(G,1);var F=g.source.owner.getEdges().indexOf(g);if(F==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(F,1)}},o.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,d,N=this.getNodes(),F=N.length,A=0;A<F;A++){var G=N[A];T=G.getTop(),g=G.getLeft(),c>T&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(N[0].getParent().paddingLeft!=null?d=N[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new v(this.left,this.top))},o.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,N,F,A,G,k,X=this.nodes,J=X.length,D=0;D<J;D++){var rt=X[D];c&&rt.child!=null&&rt.updateBounds(),N=rt.getLeft(),F=rt.getRight(),A=rt.getTop(),G=rt.getBottom(),l>N&&(l=N),T<F&&(T=F),g>A&&(g=A),d<G&&(d=G)}var n=new r(l,g,T-l,d-g);l==h.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),X[0].getParent().paddingLeft!=null?k=X[0].getParent().paddingLeft:k=this.margin,this.left=n.x-k,this.right=n.x+n.width+k,this.top=n.y-k,this.bottom=n.y+n.height+k},o.calculateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,N,F,A,G,k=c.length,X=0;X<k;X++){var J=c[X];N=J.getLeft(),F=J.getRight(),A=J.getTop(),G=J.getBottom(),l>N&&(l=N),T<F&&(T=F),g>A&&(g=A),d<G&&(d=G)}var D=new r(l,g,T-l,d-g);return D},o.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},o.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},o.prototype.calcEstimatedSize=function(){for(var c=0,l=this.nodes,T=l.length,g=0;g<T;g++){var d=l[g];c+=d.calcEstimatedSize()}return c==0?this.estimatedSize=a.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=c/Math.sqrt(this.nodes.length),this.estimatedSize},o.prototype.updateConnected=function(){var c=this;if(this.nodes.length==0){this.isConnected=!0;return}var l=new t,T=new Set,g=this.nodes[0],d,N,F=g.withChildren();for(F.forEach(function(D){l.push(D),T.add(D)});l.length!==0;){g=l.shift(),d=g.getEdges();for(var A=d.length,G=0;G<A;G++){var k=d[G];if(N=k.getOtherEndInGraph(g,this),N!=null&&!T.has(N)){var X=N.withChildren();X.forEach(function(D){l.push(D),T.add(D)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var J=0;T.forEach(function(D){D.owner==c&&J++}),J==this.nodes.length&&(this.isConnected=!0)}},w.exports=o}),(function(w,U,L){var u,h=L(1);function a(e){u=L(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(e,i);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(e,i,f,r,v){if(f==null&&r==null&&v==null){if(e==null)throw"Graph is null!";if(i==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(i.child!=null)throw"Already has a child!";return e.parent=i,i.child=e,e}else{v=f,r=i,f=e;var t=r.getOwner(),o=v.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(o!=null&&o.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==o)return f.isInterGraph=!1,t.add(f,r,v);if(f.isInterGraph=!0,f.source=r,f.target=v,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},a.prototype.remove=function(e){if(e instanceof u){var i=e;if(i.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(i==this.rootGraph||i.parent!=null&&i.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(i.getEdges());for(var r,v=f.length,t=0;t<v;t++)r=f[t],i.remove(r);var o=[];o=o.concat(i.getNodes());var s;v=o.length;for(var t=0;t<v;t++)s=o[t],i.remove(s);i==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(i);this.graphs.splice(c,1),i.parent=null}else if(e instanceof h){if(r=e,r==null)throw"Edge is null!";if(!r.isInterGraph)throw"Not an inter-graph edge!";if(!(r.source!=null&&r.target!=null))throw"Source and/or target is null!";if(!(r.source.edges.indexOf(r)!=-1&&r.target.edges.indexOf(r)!=-1))throw"Source and/or target doesn't know this edge!";var c=r.source.edges.indexOf(r);if(r.source.edges.splice(c,1),c=r.target.edges.indexOf(r),r.target.edges.splice(c,1),!(r.source.owner!=null&&r.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(r.source.owner.getGraphManager().edges.indexOf(r)==-1)throw"Not in owner graph manager's edge list!";var c=r.source.owner.getGraphManager().edges.indexOf(r);r.source.owner.getGraphManager().edges.splice(c,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],i=this.getGraphs(),f=i.length,r=0;r<f;r++)e=e.concat(i[r].getNodes());this.allNodes=e}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],i=this.getGraphs();i.length;for(var f=0;f<i.length;f++)e=e.concat(i[f].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=e,e.parent==null&&(e.parent=this.layout.newNode("Root node"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(e,i){if(!(e!=null&&i!=null))throw"assert failed";if(e==i)return!0;var f=e.getOwner(),r;do{if(r=f.getParent(),r==null)break;if(r==i)return!0;if(f=r.getOwner(),f==null)break}while(!0);f=i.getOwner();do{if(r=f.getParent(),r==null)break;if(r==e)return!0;if(f=r.getOwner(),f==null)break}while(!0);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var e,i,f,r,v,t=this.getAllEdges(),o=t.length,s=0;s<o;s++){if(e=t[s],i=e.source,f=e.target,e.lca=null,e.sourceInLca=i,e.targetInLca=f,i==f){e.lca=i.getOwner();continue}for(r=i.getOwner();e.lca==null;){for(e.targetInLca=f,v=f.getOwner();e.lca==null;){if(v==r){e.lca=v;break}if(v==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=v.getParent(),v=e.targetInLca.getOwner()}if(r==this.rootGraph)break;e.lca==null&&(e.sourceInLca=r.getParent(),r=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}},a.prototype.calcLowestCommonAncestor=function(e,i){if(e==i)return e.getOwner();var f=e.getOwner();do{if(f==null)break;var r=i.getOwner();do{if(r==null)break;if(r==f)return r;r=r.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},a.prototype.calcInclusionTreeDepths=function(e,i){e==null&&i==null&&(e=this.rootGraph,i=1);for(var f,r=e.getNodes(),v=r.length,t=0;t<v;t++)f=r[t],f.inclusionTreeDepth=i,f.child!=null&&this.calcInclusionTreeDepths(f.child,i+1)},a.prototype.includesInvalidEdge=function(){for(var e,i=[],f=this.edges.length,r=0;r<f;r++)e=this.edges[r],this.isOneAncestorOfOther(e.source,e.target)&&i.push(e);for(var r=0;r<i.length;r++)this.remove(i[r]);return!1},w.exports=a}),(function(w,U,L){var u=L(12);function h(){}h.calcSeparationAmount=function(a,e,i,f){if(!a.intersects(e))throw"assert failed";var r=new Array(2);this.decideDirectionsForOverlappingNodes(a,e,r),i[0]=Math.min(a.getRight(),e.getRight())-Math.max(a.x,e.x),i[1]=Math.min(a.getBottom(),e.getBottom())-Math.max(a.y,e.y),a.getX()<=e.getX()&&a.getRight()>=e.getRight()?i[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(i[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(i[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var v=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(v=1);var t=v*i[0],o=i[1]/v;i[0]<o?o=i[0]:t=i[1],i[0]=-1*r[0]*(o/2+f),i[1]=-1*r[1]*(t/2+f)},h.decideDirectionsForOverlappingNodes=function(a,e,i){a.getCenterX()<e.getCenterX()?i[0]=-1:i[0]=1,a.getCenterY()<e.getCenterY()?i[1]=-1:i[1]=1},h.getIntersection2=function(a,e,i){var f=a.getCenterX(),r=a.getCenterY(),v=e.getCenterX(),t=e.getCenterY();if(a.intersects(e))return i[0]=f,i[1]=r,i[2]=v,i[3]=t,!0;var o=a.getX(),s=a.getY(),c=a.getRight(),l=a.getX(),T=a.getBottom(),g=a.getRight(),d=a.getWidthHalf(),N=a.getHeightHalf(),F=e.getX(),A=e.getY(),G=e.getRight(),k=e.getX(),X=e.getBottom(),J=e.getRight(),D=e.getWidthHalf(),rt=e.getHeightHalf(),n=!1,m=!1;if(f===v){if(r>t)return i[0]=f,i[1]=s,i[2]=v,i[3]=X,!1;if(r<t)return i[0]=f,i[1]=T,i[2]=v,i[3]=A,!1}else if(r===t){if(f>v)return i[0]=o,i[1]=r,i[2]=G,i[3]=t,!1;if(f<v)return i[0]=c,i[1]=r,i[2]=F,i[3]=t,!1}else{var p=a.height/a.width,E=e.height/e.width,y=(t-r)/(v-f),I=void 0,M=void 0,R=void 0,W=void 0,x=void 0,q=void 0;if(-p===y?f>v?(i[0]=l,i[1]=T,n=!0):(i[0]=c,i[1]=s,n=!0):p===y&&(f>v?(i[0]=o,i[1]=s,n=!0):(i[0]=g,i[1]=T,n=!0)),-E===y?v>f?(i[2]=k,i[3]=X,m=!0):(i[2]=G,i[3]=A,m=!0):E===y&&(v>f?(i[2]=F,i[3]=A,m=!0):(i[2]=J,i[3]=X,m=!0)),n&&m)return!1;if(f>v?r>t?(I=this.getCardinalDirection(p,y,4),M=this.getCardinalDirection(E,y,2)):(I=this.getCardinalDirection(-p,y,3),M=this.getCardinalDirection(-E,y,1)):r>t?(I=this.getCardinalDirection(-p,y,1),M=this.getCardinalDirection(-E,y,3)):(I=this.getCardinalDirection(p,y,2),M=this.getCardinalDirection(E,y,4)),!n)switch(I){case 1:W=s,R=f+-N/y,i[0]=R,i[1]=W;break;case 2:R=g,W=r+d*y,i[0]=R,i[1]=W;break;case 3:W=T,R=f+N/y,i[0]=R,i[1]=W;break;case 4:R=l,W=r+-d*y,i[0]=R,i[1]=W;break}if(!m)switch(M){case 1:q=A,x=v+-rt/y,i[2]=x,i[3]=q;break;case 2:x=J,q=t+D*y,i[2]=x,i[3]=q;break;case 3:q=X,x=v+rt/y,i[2]=x,i[3]=q;break;case 4:x=k,q=t+-D*y,i[2]=x,i[3]=q;break}}return!1},h.getCardinalDirection=function(a,e,i){return a>e?i:1+i%4},h.getIntersection=function(a,e,i,f){if(f==null)return this.getIntersection2(a,e,i);var r=a.x,v=a.y,t=e.x,o=e.y,s=i.x,c=i.y,l=f.x,T=f.y,g=void 0,d=void 0,N=void 0,F=void 0,A=void 0,G=void 0,k=void 0,X=void 0,J=void 0;return N=o-v,A=r-t,k=t*v-r*o,F=T-c,G=s-l,X=l*c-s*T,J=N*G-F*A,J===0?null:(g=(A*X-G*k)/J,d=(F*k-N*X)/J,new u(g,d))},h.angleOfVector=function(a,e,i,f){var r=void 0;return a!==i?(r=Math.atan((f-e)/(i-a)),i<a?r+=Math.PI:f<e&&(r+=this.TWO_PI)):f<e?r=this.ONE_AND_HALF_PI:r=this.HALF_PI,r},h.doIntersect=function(a,e,i,f){var r=a.x,v=a.y,t=e.x,o=e.y,s=i.x,c=i.y,l=f.x,T=f.y,g=(t-r)*(T-c)-(l-s)*(o-v);if(g===0)return!1;var d=((T-c)*(l-r)+(s-l)*(T-v))/g,N=((v-o)*(l-r)+(t-r)*(T-v))/g;return 0<d&&d<1&&0<N&&N<1},h.findCircleLineIntersections=function(a,e,i,f,r,v,t){var o=(i-a)*(i-a)+(f-e)*(f-e),s=2*((a-r)*(i-a)+(e-v)*(f-e)),c=(a-r)*(a-r)+(e-v)*(e-v)-t*t,l=s*s-4*o*c;if(l>=0){var T=(-s+Math.sqrt(s*s-4*o*c))/(2*o),g=(-s-Math.sqrt(s*s-4*o*c))/(2*o),d=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,w.exports=h}),(function(w,U,L){function u(){}u.sign=function(h){return h>0?1:h<0?-1:0},u.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},u.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},w.exports=u}),(function(w,U,L){function u(){}u.MAX_VALUE=2147483647,u.MIN_VALUE=-2147483648,w.exports=u}),(function(w,U,L){var u=(function(){function r(v,t){for(var o=0;o<t.length;o++){var s=t[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(v,s.key,s)}}return function(v,t,o){return t&&r(v.prototype,t),o&&r(v,o),v}})();function h(r,v){if(!(r instanceof v))throw new TypeError("Cannot call a class as a function")}var a=function(v){return{value:v,next:null,prev:null}},e=function(v,t,o,s){return v!==null?v.next=t:s.head=t,o!==null?o.prev=t:s.tail=t,t.prev=v,t.next=o,s.length++,t},i=function(v,t){var o=v.prev,s=v.next;return o!==null?o.next=s:t.head=s,s!==null?s.prev=o:t.tail=o,v.prev=v.next=null,t.length--,v},f=(function(){function r(v){var t=this;h(this,r),this.length=0,this.head=null,this.tail=null,v?.forEach(function(o){return t.push(o)})}return u(r,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,o){return e(o.prev,a(t),o,this)}},{key:"insertAfter",value:function(t,o){return e(o,a(t),o.next,this)}},{key:"insertNodeBefore",value:function(t,o){return e(o.prev,t,o,this)}},{key:"insertNodeAfter",value:function(t,o){return e(o,t,o.next,this)}},{key:"push",value:function(t){return e(this.tail,a(t),null,this)}},{key:"unshift",value:function(t){return e(null,a(t),this.head,this)}},{key:"remove",value:function(t){return i(t,this)}},{key:"pop",value:function(){return i(this.tail,this).value}},{key:"popNode",value:function(){return i(this.tail,this)}},{key:"shift",value:function(){return i(this.head,this).value}},{key:"shiftNode",value:function(){return i(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var o=1,s=this.head;o<t;)s=s.next,o++;return s.value}}},{key:"set_object_at",value:function(t,o){if(t<=this.length()){for(var s=1,c=this.head;s<t;)c=c.next,s++;c.value=o}}}]),r})();w.exports=f}),(function(w,U,L){function u(h,a,e){this.x=null,this.y=null,h==null&&a==null&&e==null?(this.x=0,this.y=0):typeof h=="number"&&typeof a=="number"&&e==null?(this.x=h,this.y=a):h.constructor.name=="Point"&&a==null&&e==null&&(e=h,this.x=e.x,this.y=e.y)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.getLocation=function(){return new u(this.x,this.y)},u.prototype.setLocation=function(h,a,e){h.constructor.name=="Point"&&a==null&&e==null?(e=h,this.setLocation(e.x,e.y)):typeof h=="number"&&typeof a=="number"&&e==null&&(parseInt(h)==h&&parseInt(a)==a?this.move(h,a):(this.x=Math.floor(h+.5),this.y=Math.floor(a+.5)))},u.prototype.move=function(h,a){this.x=h,this.y=a},u.prototype.translate=function(h,a){this.x+=h,this.y+=a},u.prototype.equals=function(h){if(h.constructor.name=="Point"){var a=h;return this.x==a.x&&this.y==a.y}return this==h},u.prototype.toString=function(){return new u().constructor.name+"[x="+this.x+",y="+this.y+"]"},w.exports=u}),(function(w,U,L){function u(h,a,e,i){this.x=0,this.y=0,this.width=0,this.height=0,h!=null&&a!=null&&e!=null&&i!=null&&(this.x=h,this.y=a,this.width=e,this.height=i)}u.prototype.getX=function(){return this.x},u.prototype.setX=function(h){this.x=h},u.prototype.getY=function(){return this.y},u.prototype.setY=function(h){this.y=h},u.prototype.getWidth=function(){return this.width},u.prototype.setWidth=function(h){this.width=h},u.prototype.getHeight=function(){return this.height},u.prototype.setHeight=function(h){this.height=h},u.prototype.getRight=function(){return this.x+this.width},u.prototype.getBottom=function(){return this.y+this.height},u.prototype.intersects=function(h){return!(this.getRight()<h.x||this.getBottom()<h.y||h.getRight()<this.x||h.getBottom()<this.y)},u.prototype.getCenterX=function(){return this.x+this.width/2},u.prototype.getMinX=function(){return this.getX()},u.prototype.getMaxX=function(){return this.getX()+this.width},u.prototype.getCenterY=function(){return this.y+this.height/2},u.prototype.getMinY=function(){return this.getY()},u.prototype.getMaxY=function(){return this.getY()+this.height},u.prototype.getWidthHalf=function(){return this.width/2},u.prototype.getHeightHalf=function(){return this.height/2},w.exports=u}),(function(w,U,L){var u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function h(){}h.lastID=0,h.createID=function(a){return h.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=h.getString(),h.lastID++),a.uniqueID)},h.getString=function(a){return a==null&&(a=h.lastID),"Object#"+a},h.isPrimitive=function(a){var e=typeof a>"u"?"undefined":u(a);return a==null||e!="object"&&e!="function"},w.exports=h}),(function(w,U,L){function u(s){if(Array.isArray(s)){for(var c=0,l=Array(s.length);c<s.length;c++)l[c]=s[c];return l}else return Array.from(s)}var h=L(0),a=L(7),e=L(3),i=L(1),f=L(6),r=L(5),v=L(17),t=L(29);function o(s){t.call(this),this.layoutQuality=h.QUALITY,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=h.DEFAULT_INCREMENTAL,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,s!=null&&(this.isRemoteUse=s)}o.RANDOM_SEED=1,o.prototype=Object.create(t.prototype),o.prototype.getGraphManager=function(){return this.graphManager},o.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},o.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},o.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},o.prototype.newGraphManager=function(){var s=new a(this);return this.graphManager=s,s},o.prototype.newGraph=function(s){return new f(null,this.graphManager,s)},o.prototype.newNode=function(s){return new e(this.graphManager,s)},o.prototype.newEdge=function(s){return new i(null,null,s)},o.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},o.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var s;return this.checkLayoutSuccess()?s=!1:s=this.layout(),h.ANIMATE==="during"?!1:(s&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,s)},o.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},o.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var s=this.graphManager.getAllEdges(),c=0;c<s.length;c++)s[c];for(var l=this.graphManager.getRoot().getNodes(),c=0;c<l.length;c++)l[c];this.update(this.graphManager.getRoot())}},o.prototype.update=function(s){if(s==null)this.update2();else if(s instanceof e){var c=s;if(c.getChild()!=null)for(var l=c.getChild().getNodes(),T=0;T<l.length;T++)update(l[T]);if(c.vGraphObject!=null){var g=c.vGraphObject;g.update(c)}}else if(s instanceof i){var d=s;if(d.vGraphObject!=null){var N=d.vGraphObject;N.update(d)}}else if(s instanceof f){var F=s;if(F.vGraphObject!=null){var A=F.vGraphObject;A.update(F)}}},o.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=h.QUALITY,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=h.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},o.prototype.transform=function(s){if(s==null)this.transform(new r(0,0));else{var c=new v,l=this.graphManager.getRoot().updateLeftTop();if(l!=null){c.setWorldOrgX(s.x),c.setWorldOrgY(s.y),c.setDeviceOrgX(l.x),c.setDeviceOrgY(l.y);for(var T=this.getAllNodes(),g,d=0;d<T.length;d++)g=T[d],g.transform(c)}}},o.prototype.positionNodesRandomly=function(s){if(s==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,l,T=s.getNodes(),g=0;g<T.length;g++)c=T[g],l=c.getChild(),l==null||l.getNodes().length==0?c.scatter():(this.positionNodesRandomly(l),c.updateBounds())},o.prototype.getFlatForest=function(){for(var s=[],c=!0,l=this.graphManager.getRoot().getNodes(),T=!0,g=0;g<l.length;g++)l[g].getChild()!=null&&(T=!1);if(!T)return s;var d=new Set,N=[],F=new Map,A=[];for(A=A.concat(l);A.length>0&&c;){for(N.push(A[0]);N.length>0&&c;){var G=N[0];N.splice(0,1),d.add(G);for(var k=G.getEdges(),g=0;g<k.length;g++){var X=k[g].getOtherEnd(G);if(F.get(G)!=X)if(!d.has(X))N.push(X),F.set(X,G);else{c=!1;break}}}if(!c)s=[];else{var J=[].concat(u(d));s.push(J);for(var g=0;g<J.length;g++){var D=J[g],rt=A.indexOf(D);rt>-1&&A.splice(rt,1)}d=new Set,F=new Map}}return s},o.prototype.createDummyNodesForBendpoints=function(s){for(var c=[],l=s.source,T=this.graphManager.calcLowestCommonAncestor(s.source,s.target),g=0;g<s.bendpoints.length;g++){var d=this.newNode(null);d.setRect(new Point(0,0),new Dimension(1,1)),T.add(d);var N=this.newEdge(null);this.graphManager.add(N,l,d),c.add(d),l=d}var N=this.newEdge(null);return this.graphManager.add(N,l,s.target),this.edgeToDummyNodes.set(s,c),s.isInterGraph()?this.graphManager.remove(s):T.remove(s),c},o.prototype.createBendpointsFromDummyNodes=function(){var s=[];s=s.concat(this.graphManager.getAllEdges()),s=[].concat(u(this.edgeToDummyNodes.keys())).concat(s);for(var c=0;c<s.length;c++){var l=s[c];if(l.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(l),g=0;g<T.length;g++){var d=T[g],N=new r(d.getCenterX(),d.getCenterY()),F=l.bendpoints.get(g);F.x=N.x,F.y=N.y,d.getOwner().remove(d)}this.graphManager.add(l,l.source,l.target)}}},o.transform=function(s,c,l,T){if(l!=null&&T!=null){var g=c;if(s<=50){var d=c/l;g-=(c-d)/50*(50-s)}else{var N=c*T;g+=(N-c)/50*(s-50)}return g}else{var F,A;return s<=50?(F=9*c/500,A=c/10):(F=9*c/50,A=-8*c),F*s+A}},o.findCenterOfTree=function(s){var c=[];c=c.concat(s);var l=[],T=new Map,g=!1,d=null;(c.length==1||c.length==2)&&(g=!0,d=c[0]);for(var N=0;N<c.length;N++){var F=c[N],A=F.getNeighborsList().size;T.set(F,F.getNeighborsList().size),A==1&&l.push(F)}var G=[];for(G=G.concat(l);!g;){var k=[];k=k.concat(G),G=[];for(var N=0;N<c.length;N++){var F=c[N],X=c.indexOf(F);X>=0&&c.splice(X,1);var J=F.getNeighborsList();J.forEach(function(n){if(l.indexOf(n)<0){var m=T.get(n),p=m-1;p==1&&G.push(n),T.set(n,p)}})}l=l.concat(G),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},o.prototype.setGraphManager=function(s){this.graphManager=s},w.exports=o}),(function(w,U,L){function u(){}u.seed=1,u.x=0,u.nextDouble=function(){return u.x=Math.sin(u.seed++)*1e4,u.x-Math.floor(u.x)},w.exports=u}),(function(w,U,L){var u=L(5);function h(a,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(a){this.lworldExtX=a},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(a){this.lworldExtY=a},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},h.prototype.transformX=function(a){var e=0,i=this.lworldExtX;return i!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/i),e},h.prototype.transformY=function(a){var e=0,i=this.lworldExtY;return i!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/i),e},h.prototype.inverseTransformX=function(a){var e=0,i=this.ldeviceExtX;return i!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/i),e},h.prototype.inverseTransformY=function(a){var e=0,i=this.ldeviceExtY;return i!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/i),e},h.prototype.inverseTransformPoint=function(a){var e=new u(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return e},w.exports=h}),(function(w,U,L){function u(t){if(Array.isArray(t)){for(var o=0,s=Array(t.length);o<t.length;o++)s[o]=t[o];return s}else return Array.from(t)}var h=L(15),a=L(4),e=L(0),i=L(8),f=L(9);function r(){h.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}r.prototype=Object.create(h.prototype);for(var v in h)r[v]=h[v];r.prototype.initParameters=function(){h.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},r.prototype.calcIdealEdgeLengths=function(){for(var t,o,s,c,l,T,g,d=this.getGraphManager().getAllEdges(),N=0;N<d.length;N++)t=d[N],o=t.idealLength,t.isInterGraph&&(c=t.getSource(),l=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),g=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+g-2*e.SIMPLE_NODE_SIZE),s=t.getLca().getInclusionTreeDepth(),t.idealLength+=o*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+l.getInclusionTreeDepth()-2*s))},r.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},r.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),o,s=0;s<t.length;s++)o=t[s],this.calcSpringForce(o,o.idealLength)},r.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s,c,l,T,g=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,s=0;s<g.length;s++)l=g[s],this.calculateRepulsionForceOfANode(l,d,t,o),d.add(l);else for(s=0;s<g.length;s++)for(l=g[s],c=s+1;c<g.length;c++)T=g[c],l.getOwner()==T.getOwner()&&this.calcRepulsionForce(l,T)},r.prototype.calcGravitationalForces=function(){for(var t,o=this.getAllNodesToApplyGravitation(),s=0;s<o.length;s++)t=o[s],this.calcGravitationalForce(t)},r.prototype.moveNodes=function(){for(var t=this.getAllNodes(),o,s=0;s<t.length;s++)o=t[s],o.move()},r.prototype.calcSpringForce=function(t,o){var s=t.getSource(),c=t.getTarget(),l,T,g,d;if(this.uniformLeafNodeSizes&&s.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;l=t.getLength(),l!=0&&(T=t.edgeElasticity*(l-o),g=T*(t.lengthX/l),d=T*(t.lengthY/l),s.springForceX+=g,s.springForceY+=d,c.springForceX-=g,c.springForceY-=d)},r.prototype.calcRepulsionForce=function(t,o){var s=t.getRect(),c=o.getRect(),l=new Array(2),T=new Array(4),g,d,N,F,A,G,k;if(s.intersects(c)){i.calcSeparationAmount(s,c,l,a.DEFAULT_EDGE_LENGTH/2),G=2*l[0],k=2*l[1];var X=t.noOfChildren*o.noOfChildren/(t.noOfChildren+o.noOfChildren);t.repulsionForceX-=X*G,t.repulsionForceY-=X*k,o.repulsionForceX+=X*G,o.repulsionForceY+=X*k}else this.uniformLeafNodeSizes&&t.getChild()==null&&o.getChild()==null?(g=c.getCenterX()-s.getCenterX(),d=c.getCenterY()-s.getCenterY()):(i.getIntersection(s,c,T),g=T[2]-T[0],d=T[3]-T[1]),Math.abs(g)<a.MIN_REPULSION_DIST&&(g=f.sign(g)*a.MIN_REPULSION_DIST),Math.abs(d)<a.MIN_REPULSION_DIST&&(d=f.sign(d)*a.MIN_REPULSION_DIST),N=g*g+d*d,F=Math.sqrt(N),A=(t.nodeRepulsion/2+o.nodeRepulsion/2)*t.noOfChildren*o.noOfChildren/N,G=A*g/F,k=A*d/F,t.repulsionForceX-=G,t.repulsionForceY-=k,o.repulsionForceX+=G,o.repulsionForceY+=k},r.prototype.calcGravitationalForce=function(t){var o,s,c,l,T,g,d,N;o=t.getOwner(),s=(o.getRight()+o.getLeft())/2,c=(o.getTop()+o.getBottom())/2,l=t.getCenterX()-s,T=t.getCenterY()-c,g=Math.abs(l)+t.getWidth()/2,d=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(N=o.getEstimatedSize()*this.gravityRangeFactor,(g>N||d>N)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(N=o.getEstimatedSize()*this.compoundGravityRangeFactor,(g>N||d>N)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},r.prototype.isConverged=function(){var t,o=!1;return this.totalIterations>this.maxIterations/3&&(o=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||o},r.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},r.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,o=this.graphManager.getAllNodes(),s=0;s<o.length;s++)t=o[s],t.noOfChildren=t.getNoOfChildren()},r.prototype.calcGrid=function(t){var o=0,s=0;o=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),s=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(o),l=0;l<o;l++)c[l]=new Array(s);for(var l=0;l<o;l++)for(var T=0;T<s;T++)c[l][T]=new Array;return c},r.prototype.addNodeToGrid=function(t,o,s){var c=0,l=0,T=0,g=0;c=parseInt(Math.floor((t.getRect().x-o)/this.repulsionRange)),l=parseInt(Math.floor((t.getRect().width+t.getRect().x-o)/this.repulsionRange)),T=parseInt(Math.floor((t.getRect().y-s)/this.repulsionRange)),g=parseInt(Math.floor((t.getRect().height+t.getRect().y-s)/this.repulsionRange));for(var d=c;d<=l;d++)for(var N=T;N<=g;N++)this.grid[d][N].push(t),t.setGridCoordinates(c,l,T,g)},r.prototype.updateGrid=function(){var t,o,s=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<s.length;t++)o=s[t],this.addNodeToGrid(o,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},r.prototype.calculateRepulsionForceOfANode=function(t,o,s,c){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&s||c){var l=new Set;t.surrounding=new Array;for(var T,g=this.grid,d=t.startX-1;d<t.finishX+2;d++)for(var N=t.startY-1;N<t.finishY+2;N++)if(!(d<0||N<0||d>=g.length||N>=g[0].length)){for(var F=0;F<g[d][N].length;F++)if(T=g[d][N][F],!(t.getOwner()!=T.getOwner()||t==T)&&!o.has(T)&&!l.has(T)){var A=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),G=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);A<=this.repulsionRange&&G<=this.repulsionRange&&l.add(T)}}t.surrounding=[].concat(u(l))}for(d=0;d<t.surrounding.length;d++)this.calcRepulsionForce(t,t.surrounding[d])},r.prototype.calcRepulsionRange=function(){return 0},w.exports=r}),(function(w,U,L){var u=L(1),h=L(4);function a(i,f,r){u.call(this,i,f,r),this.idealLength=h.DEFAULT_EDGE_LENGTH,this.edgeElasticity=h.DEFAULT_SPRING_STRENGTH}a.prototype=Object.create(u.prototype);for(var e in u)a[e]=u[e];w.exports=a}),(function(w,U,L){var u=L(3),h=L(4);function a(i,f,r,v){u.call(this,i,f,r,v),this.nodeRepulsion=h.DEFAULT_REPULSION_STRENGTH,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=[]}a.prototype=Object.create(u.prototype);for(var e in u)a[e]=u[e];a.prototype.setGridCoordinates=function(i,f,r,v){this.startX=i,this.finishX=f,this.startY=r,this.finishY=v},w.exports=a}),(function(w,U,L){function u(h,a){this.width=0,this.height=0,h!==null&&a!==null&&(this.height=a,this.width=h)}u.prototype.getWidth=function(){return this.width},u.prototype.setWidth=function(h){this.width=h},u.prototype.getHeight=function(){return this.height},u.prototype.setHeight=function(h){this.height=h},w.exports=u}),(function(w,U,L){var u=L(14);function h(){this.map={},this.keys=[]}h.prototype.put=function(a,e){var i=u.createID(a);this.contains(i)||(this.map[i]=e,this.keys.push(a))},h.prototype.contains=function(a){return u.createID(a),this.map[a]!=null},h.prototype.get=function(a){var e=u.createID(a);return this.map[e]},h.prototype.keySet=function(){return this.keys},w.exports=h}),(function(w,U,L){var u=L(14);function h(){this.set={}}h.prototype.add=function(a){var e=u.createID(a);this.contains(e)||(this.set[e]=a)},h.prototype.remove=function(a){delete this.set[u.createID(a)]},h.prototype.clear=function(){this.set={}},h.prototype.contains=function(a){return this.set[u.createID(a)]==a},h.prototype.isEmpty=function(){return this.size()===0},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAllTo=function(a){for(var e=Object.keys(this.set),i=e.length,f=0;f<i;f++)a.push(this.set[e[f]])},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAll=function(a){for(var e=a.length,i=0;i<e;i++){var f=a[i];this.add(f)}},w.exports=h}),(function(w,U,L){function u(){}u.multMat=function(h,a){for(var e=[],i=0;i<h.length;i++){e[i]=[];for(var f=0;f<a[0].length;f++){e[i][f]=0;for(var r=0;r<h[0].length;r++)e[i][f]+=h[i][r]*a[r][f]}}return e},u.transpose=function(h){for(var a=[],e=0;e<h[0].length;e++){a[e]=[];for(var i=0;i<h.length;i++)a[e][i]=h[i][e]}return a},u.multCons=function(h,a){for(var e=[],i=0;i<h.length;i++)e[i]=h[i]*a;return e},u.minusOp=function(h,a){for(var e=[],i=0;i<h.length;i++)e[i]=h[i]-a[i];return e},u.dotProduct=function(h,a){for(var e=0,i=0;i<h.length;i++)e+=h[i]*a[i];return e},u.mag=function(h){return Math.sqrt(this.dotProduct(h,h))},u.normalize=function(h){for(var a=[],e=this.mag(h),i=0;i<h.length;i++)a[i]=h[i]/e;return a},u.multGamma=function(h){for(var a=[],e=0,i=0;i<h.length;i++)e+=h[i];e*=-1/h.length;for(var f=0;f<h.length;f++)a[f]=e+h[f];return a},u.multL=function(h,a,e){for(var i=[],f=[],r=[],v=0;v<a[0].length;v++){for(var t=0,o=0;o<a.length;o++)t+=-.5*a[o][v]*h[o];f[v]=t}for(var s=0;s<e.length;s++){for(var c=0,l=0;l<e.length;l++)c+=e[s][l]*f[l];r[s]=c}for(var T=0;T<a.length;T++){for(var g=0,d=0;d<a[0].length;d++)g+=a[T][d]*r[d];i[T]=g}return i},w.exports=u}),(function(w,U,L){var u=(function(){function i(f,r){for(var v=0;v<r.length;v++){var t=r[v];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(f,t.key,t)}}return function(f,r,v){return r&&i(f.prototype,r),v&&i(f,v),f}})();function h(i,f){if(!(i instanceof f))throw new TypeError("Cannot call a class as a function")}var a=L(11),e=(function(){function i(f,r){h(this,i),(r!==null||r!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var v=void 0;f instanceof a?v=f.size():v=f.length,this._quicksort(f,0,v-1)}return u(i,[{key:"_quicksort",value:function(r,v,t){if(v<t){var o=this._partition(r,v,t);this._quicksort(r,v,o),this._quicksort(r,o+1,t)}}},{key:"_partition",value:function(r,v,t){for(var o=this._get(r,v),s=v,c=t;;){for(;this.compareFunction(o,this._get(r,c));)c--;for(;this.compareFunction(this._get(r,s),o);)s++;if(s<c)this._swap(r,s,c),s++,c--;else return c}}},{key:"_get",value:function(r,v){return r instanceof a?r.get_object_at(v):r[v]}},{key:"_set",value:function(r,v,t){r instanceof a?r.set_object_at(v,t):r[v]=t}},{key:"_swap",value:function(r,v,t){var o=this._get(r,v);this._set(r,v,this._get(r,t)),this._set(r,t,o)}},{key:"_defaultCompareFunction",value:function(r,v){return v>r}}]),i})();w.exports=e}),(function(w,U,L){function u(){}u.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var a=Math.min(this.m,this.n);this.s=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var Ct=function $t(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push($t(bt.slice(1)));return zt};return Ct(Tt)})([this.m,a]),this.V=(function(Tt){var Ct=function $t(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push($t(bt.slice(1)));return zt};return Ct(Tt)})([this.n,this.n]);for(var e=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.n),i=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),f=!0,r=Math.min(this.m-1,this.n),v=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(r,v);t++){if(t<r){this.s[t]=0;for(var o=t;o<this.m;o++)this.s[t]=u.hypot(this.s[t],h[o][t]);if(this.s[t]!==0){h[t][t]<0&&(this.s[t]=-this.s[t]);for(var s=t;s<this.m;s++)h[s][t]/=this.s[t];h[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if((function(Tt,Ct){return Tt&&Ct})(t<r,this.s[t]!==0)){for(var l=0,T=t;T<this.m;T++)l+=h[T][t]*h[T][c];l=-l/h[t][t];for(var g=t;g<this.m;g++)h[g][c]+=l*h[g][t]}e[c]=h[t][c]}if((function(Tt,Ct){return Ct})(f,t<r))for(var d=t;d<this.m;d++)this.U[d][t]=h[d][t];if(t<v){e[t]=0;for(var N=t+1;N<this.n;N++)e[t]=u.hypot(e[t],e[N]);if(e[t]!==0){e[t+1]<0&&(e[t]=-e[t]);for(var F=t+1;F<this.n;F++)e[F]/=e[t];e[t+1]+=1}if(e[t]=-e[t],(function(Tt,Ct){return Tt&&Ct})(t+1<this.m,e[t]!==0)){for(var A=t+1;A<this.m;A++)i[A]=0;for(var G=t+1;G<this.n;G++)for(var k=t+1;k<this.m;k++)i[k]+=e[G]*h[k][G];for(var X=t+1;X<this.n;X++)for(var J=-e[X]/e[t+1],D=t+1;D<this.m;D++)h[D][X]+=J*i[D]}for(var rt=t+1;rt<this.n;rt++)this.V[rt][t]=e[rt]}}var n=Math.min(this.n,this.m+1);r<this.n&&(this.s[r]=h[r][r]),this.m<n&&(this.s[n-1]=0),v+1<n&&(e[v]=h[v][n-1]),e[n-1]=0;{for(var m=r;m<a;m++){for(var p=0;p<this.m;p++)this.U[p][m]=0;this.U[m][m]=1}for(var E=r-1;E>=0;E--)if(this.s[E]!==0){for(var y=E+1;y<a;y++){for(var I=0,M=E;M<this.m;M++)I+=this.U[M][E]*this.U[M][y];I=-I/this.U[E][E];for(var R=E;R<this.m;R++)this.U[R][y]+=I*this.U[R][E]}for(var W=E;W<this.m;W++)this.U[W][E]=-this.U[W][E];this.U[E][E]=1+this.U[E][E];for(var x=0;x<E-1;x++)this.U[x][E]=0}else{for(var q=0;q<this.m;q++)this.U[q][E]=0;this.U[E][E]=1}}for(var V=this.n-1;V>=0;V--){if((function(Tt,Ct){return Tt&&Ct})(V<v,e[V]!==0))for(var Y=V+1;Y<a;Y++){for(var et=0,z=V+1;z<this.n;z++)et+=this.V[z][V]*this.V[z][Y];et=-et/this.V[V+1][V];for(var O=V+1;O<this.n;O++)this.V[O][Y]+=et*this.V[O][V]}for(var H=0;H<this.n;H++)this.V[H][V]=0;this.V[V][V]=1}for(var $=n-1,_=Math.pow(2,-52),ht=Math.pow(2,-966);n>0;){var Q=void 0,It=void 0;for(Q=n-2;Q>=-1&&Q!==-1;Q--)if(Math.abs(e[Q])<=ht+_*(Math.abs(this.s[Q])+Math.abs(this.s[Q+1]))){e[Q]=0;break}if(Q===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=Q&&Nt!==Q;Nt--){var vt=(Nt!==n?Math.abs(e[Nt]):0)+(Nt!==Q+1?Math.abs(e[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+_*vt){this.s[Nt]=0;break}}Nt===Q?It=3:Nt===n-1?It=1:(It=2,Q=Nt)}switch(Q++,It){case 1:{var it=e[n-2];e[n-2]=0;for(var gt=n-2;gt>=Q;gt--){var mt=u.hypot(this.s[gt],it),At=this.s[gt]/mt,Ot=it/mt;this.s[gt]=mt,gt!==Q&&(it=-Ot*e[gt-1],e[gt-1]=At*e[gt-1]);for(var Et=0;Et<this.n;Et++)mt=At*this.V[Et][gt]+Ot*this.V[Et][n-1],this.V[Et][n-1]=-Ot*this.V[Et][gt]+At*this.V[Et][n-1],this.V[Et][gt]=mt}}break;case 2:{var Dt=e[Q-1];e[Q-1]=0;for(var Rt=Q;Rt<n;Rt++){var Ht=u.hypot(this.s[Rt],Dt),Ut=this.s[Rt]/Ht,Pt=Dt/Ht;this.s[Rt]=Ht,Dt=-Pt*e[Rt],e[Rt]=Ut*e[Rt];for(var Ft=0;Ft<this.m;Ft++)Ht=Ut*this.U[Ft][Rt]+Pt*this.U[Ft][Q-1],this.U[Ft][Q-1]=-Pt*this.U[Ft][Rt]+Ut*this.U[Ft][Q-1],this.U[Ft][Rt]=Ht}}break;case 3:{var Yt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[n-1]),Math.abs(this.s[n-2])),Math.abs(e[n-2])),Math.abs(this.s[Q])),Math.abs(e[Q])),Vt=this.s[n-1]/Yt,S=this.s[n-2]/Yt,b=e[n-2]/Yt,B=this.s[Q]/Yt,K=e[Q]/Yt,Z=((S+Vt)*(S-Vt)+b*b)/2,at=Vt*b*(Vt*b),ct=0;(function(Tt,Ct){return Tt||Ct})(Z!==0,at!==0)&&(ct=Math.sqrt(Z*Z+at),Z<0&&(ct=-ct),ct=at/(Z+ct));for(var nt=(B+Vt)*(B-Vt)+ct,tt=B*K,j=Q;j<n-1;j++){var ut=u.hypot(nt,tt),wt=nt/ut,pt=tt/ut;j!==Q&&(e[j-1]=ut),nt=wt*this.s[j]+pt*e[j],e[j]=wt*e[j]-pt*this.s[j],tt=pt*this.s[j+1],this.s[j+1]=wt*this.s[j+1];for(var xt=0;xt<this.n;xt++)ut=wt*this.V[xt][j]+pt*this.V[xt][j+1],this.V[xt][j+1]=-pt*this.V[xt][j]+wt*this.V[xt][j+1],this.V[xt][j]=ut;if(ut=u.hypot(nt,tt),wt=nt/ut,pt=tt/ut,this.s[j]=ut,nt=wt*e[j]+pt*this.s[j+1],this.s[j+1]=-pt*e[j]+wt*this.s[j+1],tt=pt*e[j+1],e[j+1]=wt*e[j+1],j<this.m-1)for(var lt=0;lt<this.m;lt++)ut=wt*this.U[lt][j]+pt*this.U[lt][j+1],this.U[lt][j+1]=-pt*this.U[lt][j]+wt*this.U[lt][j+1],this.U[lt][j]=ut}e[n-2]=nt}break;case 4:{if(this.s[Q]<=0){this.s[Q]=this.s[Q]<0?-this.s[Q]:0;for(var ot=0;ot<=$;ot++)this.V[ot][Q]=-this.V[ot][Q]}for(;Q<$&&!(this.s[Q]>=this.s[Q+1]);){var Lt=this.s[Q];if(this.s[Q]=this.s[Q+1],this.s[Q+1]=Lt,Q<this.n-1)for(var ft=0;ft<this.n;ft++)Lt=this.V[ft][Q+1],this.V[ft][Q+1]=this.V[ft][Q],this.V[ft][Q]=Lt;if(Q<this.m-1)for(var st=0;st<this.m;st++)Lt=this.U[st][Q+1],this.U[st][Q+1]=this.U[st][Q],this.U[st][Q]=Lt;Q++}n--}break}}var Xt={U:this.U,V:this.V,S:this.s};return Xt},u.hypot=function(h,a){var e=void 0;return Math.abs(h)>Math.abs(a)?(e=a/h,e=Math.abs(h)*Math.sqrt(1+e*e)):a!=0?(e=h/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},w.exports=u}),(function(w,U,L){var u=(function(){function e(i,f){for(var r=0;r<f.length;r++){var v=f[r];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(i,v.key,v)}}return function(i,f,r){return f&&e(i.prototype,f),r&&e(i,r),i}})();function h(e,i){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")}var a=(function(){function e(i,f){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,e),this.sequence1=i,this.sequence2=f,this.match_score=r,this.mismatch_penalty=v,this.gap_penalty=t,this.iMax=i.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var o=0;o<this.iMax;o++){this.grid[o]=new Array(this.jMax);for(var s=0;s<this.jMax;s++)this.grid[o][s]=0}this.tracebackGrid=new Array(this.iMax);for(var c=0;c<this.iMax;c++){this.tracebackGrid[c]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[c][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return u(e,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var f=1;f<this.jMax;f++)this.grid[0][f]=this.grid[0][f-1]+this.gap_penalty,this.tracebackGrid[0][f]=[!1,!1,!0];for(var r=1;r<this.iMax;r++)this.grid[r][0]=this.grid[r-1][0]+this.gap_penalty,this.tracebackGrid[r][0]=[!1,!0,!1];for(var v=1;v<this.iMax;v++)for(var t=1;t<this.jMax;t++){var o=void 0;this.sequence1[v-1]===this.sequence2[t-1]?o=this.grid[v-1][t-1]+this.match_score:o=this.grid[v-1][t-1]+this.mismatch_penalty;var s=this.grid[v-1][t]+this.gap_penalty,c=this.grid[v][t-1]+this.gap_penalty,l=[o,s,c],T=this.arrayAllMaxIndexes(l);this.grid[v][t]=l[T[0]],this.tracebackGrid[v][t]=[T.includes(0),T.includes(1),T.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var f=[];for(f.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});f[0];){var r=f[0],v=this.tracebackGrid[r.pos[0]][r.pos[1]];v[0]&&f.push({pos:[r.pos[0]-1,r.pos[1]-1],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),v[1]&&f.push({pos:[r.pos[0]-1,r.pos[1]],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:"-"+r.seq2}),v[2]&&f.push({pos:[r.pos[0],r.pos[1]-1],seq1:"-"+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),r.pos[0]===0&&r.pos[1]===0&&this.alignments.push({sequence1:r.seq1,sequence2:r.seq2}),f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,r){for(var v=[],t=-1;(t=f.indexOf(r,t+1))!==-1;)v.push(t);return v}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),e})();w.exports=a}),(function(w,U,L){var u=function(){};u.FDLayout=L(18),u.FDLayoutConstants=L(4),u.FDLayoutEdge=L(19),u.FDLayoutNode=L(20),u.DimensionD=L(21),u.HashMap=L(22),u.HashSet=L(23),u.IGeometry=L(8),u.IMath=L(9),u.Integer=L(10),u.Point=L(12),u.PointD=L(5),u.RandomSeed=L(16),u.RectangleD=L(13),u.Transform=L(17),u.UniqueIDGeneretor=L(14),u.Quicksort=L(25),u.LinkedList=L(11),u.LGraphObject=L(2),u.LGraph=L(6),u.LEdge=L(1),u.LGraphManager=L(7),u.LNode=L(3),u.Layout=L(15),u.LayoutConstants=L(0),u.NeedlemanWunsch=L(27),u.Matrix=L(24),u.SVD=L(26),w.exports=u}),(function(w,U,L){function u(){this.listeners=[]}var h=u.prototype;h.addListener=function(a,e){this.listeners.push({event:a,callback:e})},h.removeListener=function(a,e){for(var i=this.listeners.length;i>=0;i--){var f=this.listeners[i];f.event===a&&f.callback===e&&this.listeners.splice(i,1)}},h.emit=function(a,e){for(var i=0;i<this.listeners.length;i++){var f=this.listeners[i];a===f.event&&f.callback(e)}},w.exports=u})])})})(le)),le.exports}var ur=he.exports,Me;function dr(){return Me||(Me=1,(function(C,P){(function(U,L){C.exports=L(gr())})(ur,function(w){return(()=>{var U={45:((a,e,i)=>{var f={};f.layoutBase=i(551),f.CoSEConstants=i(806),f.CoSEEdge=i(767),f.CoSEGraph=i(880),f.CoSEGraphManager=i(578),f.CoSELayout=i(765),f.CoSENode=i(991),f.ConstraintHandler=i(902),a.exports=f}),806:((a,e,i)=>{var f=i(551).FDLayoutConstants;function r(){}for(var v in f)r[v]=f[v];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,a.exports=r}),767:((a,e,i)=>{var f=i(551).FDLayoutEdge;function r(t,o,s){f.call(this,t,o,s)}r.prototype=Object.create(f.prototype);for(var v in f)r[v]=f[v];a.exports=r}),880:((a,e,i)=>{var f=i(551).LGraph;function r(t,o,s){f.call(this,t,o,s)}r.prototype=Object.create(f.prototype);for(var v in f)r[v]=f[v];a.exports=r}),578:((a,e,i)=>{var f=i(551).LGraphManager;function r(t){f.call(this,t)}r.prototype=Object.create(f.prototype);for(var v in f)r[v]=f[v];a.exports=r}),765:((a,e,i)=>{var f=i(551).FDLayout,r=i(578),v=i(880),t=i(991),o=i(767),s=i(806),c=i(902),l=i(551).FDLayoutConstants,T=i(551).LayoutConstants,g=i(551).Point,d=i(551).PointD,N=i(551).DimensionD,F=i(551).Layout,A=i(551).Integer,G=i(551).IGeometry,k=i(551).LGraph,X=i(551).Transform,J=i(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var rt in f)D[rt]=f[rt];D.prototype.newGraphManager=function(){var n=new r(this);return this.graphManager=n,n},D.prototype.newGraph=function(n){return new v(null,this.graphManager,n)},D.prototype.newNode=function(n){return new t(this.graphManager,n)},D.prototype.newEdge=function(n){return new o(null,null,n)},D.prototype.initParameters=function(){f.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.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.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 m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return m.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),s.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.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%l.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 n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),s.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),s.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},p=0;p<n.length;p++){var E=n[p].rect,y=n[p].id;m[y]={id:y,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return m},D.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var n=!1;if(l.ANIMATE==="during")this.emit("layoutstarted");else{for(;!n;)n=this.tick();this.graphManager.updateBounds()}},D.prototype.moveNodes=function(){for(var n=this.getAllNodes(),m,p=0;p<n.length;p++)m=n[p],m.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var p=0;p<n.length;p++)m=n[p],m.move()},D.prototype.initConstraintVariables=function(){var n=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var m=this.graphManager.getAllNodes(),p=0;p<m.length;p++){var E=m[p];this.idToNodeMap.set(E.id,E)}var y=function O(H){for(var $=H.getChild().getNodes(),_,ht=0,Q=0;Q<$.length;Q++)_=$[Q],_.getChild()==null?n.fixedNodeSet.has(_.id)&&(ht+=100):ht+=O(_);return ht};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function($){n.fixedNodeSet.add($.nodeId)});for(var m=this.graphManager.getAllNodes(),E,p=0;p<m.length;p++)if(E=m[p],E.getChild()!=null){var I=y(E);I>0&&(E.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var M=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p<W.length;p++)this.dummyToNodeForVerticalAlignment.set("dummy"+p,[]),W[p].forEach(function(H){M.set(H,"dummy"+p),n.dummyToNodeForVerticalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnHorizontal.add("dummy"+p)});if(this.constraints.alignmentConstraint.horizontal)for(var x=this.constraints.alignmentConstraint.horizontal,p=0;p<x.length;p++)this.dummyToNodeForHorizontalAlignment.set("dummy"+p,[]),x[p].forEach(function(H){R.set(H,"dummy"+p),n.dummyToNodeForHorizontalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnVertical.add("dummy"+p)})}if(s.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(O){var H,$,_;for(_=O.length-1;_>=2*O.length/3;_--)H=Math.floor(Math.random()*(_+1)),$=O[_],O[_]=O[H],O[H]=$;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=M.has(O.left)?M.get(O.left):O.left,$=M.has(O.right)?M.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes($)||(n.nodesInRelativeHorizontal.push($),n.nodeToRelativeConstraintMapHorizontal.set($,[]),n.dummyToNodeForVerticalAlignment.has($)?n.nodeToTempPositionMapHorizontal.set($,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get($)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set($,n.idToNodeMap.get($).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:$,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get($).push({left:H,gap:O.gap})}else{var _=R.has(O.top)?R.get(O.top):O.top,ht=R.has(O.bottom)?R.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(_)||(n.nodesInRelativeVertical.push(_),n.nodeToRelativeConstraintMapVertical.set(_,[]),n.dummyToNodeForHorizontalAlignment.has(_)?n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(_)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(_).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(_).push({bottom:ht,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:_,gap:O.gap})}});else{var q=new Map,V=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=M.has(O.left)?M.get(O.left):O.left,$=M.has(O.right)?M.get(O.right):O.right;q.has(H)?q.get(H).push($):q.set(H,[$]),q.has($)?q.get($).push(H):q.set($,[H])}else{var _=R.has(O.top)?R.get(O.top):O.top,ht=R.has(O.bottom)?R.get(O.bottom):O.bottom;V.has(_)?V.get(_).push(ht):V.set(_,[ht]),V.has(ht)?V.get(ht).push(_):V.set(ht,[_])}});var Y=function(H,$){var _=[],ht=[],Q=new J,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){_[Nt]=[],ht[Nt]=!1;var gt=it;for(Q.push(gt),It.add(gt),_[Nt].push(gt);Q.length!=0;){gt=Q.shift(),$.has(gt)&&(ht[Nt]=!0);var mt=H.get(gt);mt.forEach(function(At){It.has(At)||(Q.push(At),It.add(At),_[Nt].push(At))})}Nt++}}),{components:_,isFixed:ht}},et=Y(q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=et.components,this.fixedComponentsOnHorizontal=et.isFixed;var z=Y(V,n.fixedNodesOnVertical);this.componentsOnVertical=z.components,this.fixedComponentsOnVertical=z.isFixed}}},D.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(z){var O=n.idToNodeMap.get(z.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,p=0;p<m.length;p++){for(var E=0,y=0;y<m[p].length;y++){if(this.fixedNodeSet.has(m[p][y])){E=0;break}E+=this.idToNodeMap.get(m[p][y]).displacementX}for(var I=E/m[p].length,y=0;y<m[p].length;y++)this.idToNodeMap.get(m[p][y]).displacementX=I}if(this.constraints.alignmentConstraint.horizontal)for(var M=this.constraints.alignmentConstraint.horizontal,p=0;p<M.length;p++){for(var R=0,y=0;y<M[p].length;y++){if(this.fixedNodeSet.has(M[p][y])){R=0;break}R+=this.idToNodeMap.get(M[p][y]).displacementY}for(var W=R/M[p].length,y=0;y<M[p].length;y++)this.idToNodeMap.get(M[p][y]).displacementY=W}}if(this.constraints.relativePlacementConstraint)if(s.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(z){if(!n.fixedNodesOnHorizontal.has(z)){var O=0;n.dummyToNodeForVerticalAlignment.has(z)?O=n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(z)[0]).displacementX:O=n.idToNodeMap.get(z).displacementX,n.nodeToRelativeConstraintMapHorizontal.get(z).forEach(function(H){if(H.right){var $=n.nodeToTempPositionMapHorizontal.get(H.right)-n.nodeToTempPositionMapHorizontal.get(z)-O;$<H.gap&&(O-=H.gap-$)}else{var $=n.nodeToTempPositionMapHorizontal.get(z)-n.nodeToTempPositionMapHorizontal.get(H.left)+O;$<H.gap&&(O+=H.gap-$)}}),n.nodeToTempPositionMapHorizontal.set(z,n.nodeToTempPositionMapHorizontal.get(z)+O),n.dummyToNodeForVerticalAlignment.has(z)?n.dummyToNodeForVerticalAlignment.get(z).forEach(function(H){n.idToNodeMap.get(H).displacementX=O}):n.idToNodeMap.get(z).displacementX=O}}),this.nodesInRelativeVertical.forEach(function(z){if(!n.fixedNodesOnHorizontal.has(z)){var O=0;n.dummyToNodeForHorizontalAlignment.has(z)?O=n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(z)[0]).displacementY:O=n.idToNodeMap.get(z).displacementY,n.nodeToRelativeConstraintMapVertical.get(z).forEach(function(H){if(H.bottom){var $=n.nodeToTempPositionMapVertical.get(H.bottom)-n.nodeToTempPositionMapVertical.get(z)-O;$<H.gap&&(O-=H.gap-$)}else{var $=n.nodeToTempPositionMapVertical.get(z)-n.nodeToTempPositionMapVertical.get(H.top)+O;$<H.gap&&(O+=H.gap-$)}}),n.nodeToTempPositionMapVertical.set(z,n.nodeToTempPositionMapVertical.get(z)+O),n.dummyToNodeForHorizontalAlignment.has(z)?n.dummyToNodeForHorizontalAlignment.get(z).forEach(function(H){n.idToNodeMap.get(H).displacementY=O}):n.idToNodeMap.get(z).displacementY=O}});else{for(var p=0;p<this.componentsOnHorizontal.length;p++){var x=this.componentsOnHorizontal[p];if(this.fixedComponentsOnHorizontal[p])for(var y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=0}):this.idToNodeMap.get(x[y]).displacementX=0;else{for(var q=0,V=0,y=0;y<x.length;y++)if(this.dummyToNodeForVerticalAlignment.has(x[y])){var Y=this.dummyToNodeForVerticalAlignment.get(x[y]);q+=Y.length*this.idToNodeMap.get(Y[0]).displacementX,V+=Y.length}else q+=this.idToNodeMap.get(x[y]).displacementX,V++;for(var et=q/V,y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=et}):this.idToNodeMap.get(x[y]).displacementX=et}}for(var p=0;p<this.componentsOnVertical.length;p++){var x=this.componentsOnVertical[p];if(this.fixedComponentsOnVertical[p])for(var y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function($){n.idToNodeMap.get($).displacementY=0}):this.idToNodeMap.get(x[y]).displacementY=0;else{for(var q=0,V=0,y=0;y<x.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(x[y])){var Y=this.dummyToNodeForHorizontalAlignment.get(x[y]);q+=Y.length*this.idToNodeMap.get(Y[0]).displacementY,V+=Y.length}else q+=this.idToNodeMap.get(x[y]).displacementY,V++;for(var et=q/V,y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function(Q){n.idToNodeMap.get(Q).displacementY=et}):this.idToNodeMap.get(x[y]).displacementY=et}}}},D.prototype.calculateNodesToApplyGravitationTo=function(){var n=[],m,p=this.graphManager.getGraphs(),E=p.length,y;for(y=0;y<E;y++)m=p[y],m.updateConnected(),m.isConnected||(n=n.concat(m.getNodes()));return n},D.prototype.createBendpoints=function(){var n=[];n=n.concat(this.graphManager.getAllEdges());var m=new Set,p;for(p=0;p<n.length;p++){var E=n[p];if(!m.has(E)){var y=E.getSource(),I=E.getTarget();if(y==I)E.getBendpoints().push(new d),E.getBendpoints().push(new d),this.createDummyNodesForBendpoints(E),m.add(E);else{var M=[];if(M=M.concat(y.getEdgeListToNode(I)),M=M.concat(I.getEdgeListToNode(y)),!m.has(M[0])){if(M.length>1){var R;for(R=0;R<M.length;R++){var W=M[R];W.getBendpoints().push(new d),this.createDummyNodesForBendpoints(W)}}M.forEach(function(x){m.add(x)})}}}if(m.size==n.length)break}},D.prototype.positionNodesRadially=function(n){for(var m=new g(0,0),p=Math.ceil(Math.sqrt(n.length)),E=0,y=0,I=0,M=new d(0,0),R=0;R<n.length;R++){R%p==0&&(I=0,y=E,R!=0&&(y+=s.DEFAULT_COMPONENT_SEPERATION),E=0);var W=n[R],x=F.findCenterOfTree(W);m.x=I,m.y=y,M=D.radialLayout(W,x,m),M.y>E&&(E=Math.floor(M.y)),I=Math.floor(M.x+s.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-M.x/2,T.WORLD_CENTER_Y-M.y/2))},D.radialLayout=function(n,m,p){var E=Math.max(this.maxDiagonalInTree(n),s.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var y=k.calculateBounds(n),I=new X;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var M=0;M<n.length;M++){var R=n[M];R.transform(I)}var W=new d(y.getMaxX(),y.getMaxY());return I.inverseTransformPoint(W)},D.branchRadialLayout=function(n,m,p,E,y,I){var M=(E-p+1)/2;M<0&&(M+=180);var R=(M+p)%360,W=R*G.TWO_PI/360,x=y*Math.cos(W),q=y*Math.sin(W);n.setCenter(x,q);var V=[];V=V.concat(n.getEdges());var Y=V.length;m!=null&&Y--;for(var et=0,z=V.length,O,H=n.getEdgesBetween(m);H.length>1;){var $=H[0];H.splice(0,1);var _=V.indexOf($);_>=0&&V.splice(_,1),z--,Y--}m!=null?O=(V.indexOf(H[0])+1)%z:O=0;for(var ht=Math.abs(E-p)/Y,Q=O;et!=Y;Q=++Q%z){var It=V[Q].getOtherEnd(n);if(It!=m){var Nt=(p+et*ht)%360,vt=(Nt+ht)%360;D.branchRadialLayout(It,n,Nt,vt,y+I,I),et++}}},D.maxDiagonalInTree=function(n){for(var m=A.MIN_VALUE,p=0;p<n.length;p++){var E=n[p],y=E.getDiagonal();y>m&&(m=y)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var n=this,m={};this.memberGroups={},this.idToDummyNode={};for(var p=[],E=this.graphManager.getAllNodes(),y=0;y<E.length;y++){var I=E[y],M=I.getParent();this.getNodeDegreeWithChildren(I)===0&&(M.id==null||!this.getToBeTiled(M))&&p.push(I)}for(var y=0;y<p.length;y++){var I=p[y],R=I.getParent().id;typeof m[R]>"u"&&(m[R]=[]),m[R]=m[R].concat(I)}Object.keys(m).forEach(function(W){if(m[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=m[W];var q=m[W][0].getParent(),V=new t(n.graphManager);V.id=x,V.paddingLeft=q.paddingLeft||0,V.paddingRight=q.paddingRight||0,V.paddingBottom=q.paddingBottom||0,V.paddingTop=q.paddingTop||0,n.idToDummyNode[x]=V;var Y=n.getGraphManager().add(n.newGraph(),V),et=q.getChild();et.add(V);for(var z=0;z<m[W].length;z++){var O=m[W][z];et.remove(O),Y.add(O)}}})},D.prototype.clearCompounds=function(){var n={},m={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)m[this.compoundOrder[p].id]=this.compoundOrder[p],n[this.compoundOrder[p].id]=[].concat(this.compoundOrder[p].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[p].getChild()),this.compoundOrder[p].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(n,m)},D.prototype.clearZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var E=n.idToDummyNode[p];if(m[p]=n.tileNodes(n.memberGroups[p],E.paddingLeft+E.paddingRight),E.rect.width=m[p].width,E.rect.height=m[p].height,E.setCenter(m[p].centerX,m[p].centerY),E.labelMarginLeft=0,E.labelMarginTop=0,s.NODE_DIMENSIONS_INCLUDE_LABELS){var y=E.rect.width,I=E.rect.height;E.labelWidth&&(E.labelPosHorizontal=="left"?(E.rect.x-=E.labelWidth,E.setWidth(y+E.labelWidth),E.labelMarginLeft=E.labelWidth):E.labelPosHorizontal=="center"&&E.labelWidth>y?(E.rect.x-=(E.labelWidth-y)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-y)/2):E.labelPosHorizontal=="right"&&E.setWidth(y+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(I+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>I?(E.rect.y-=(E.labelHeight-I)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-I)/2):E.labelPosVertical=="bottom"&&E.setHeight(I+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var m=this.compoundOrder[n],p=m.id,E=m.paddingLeft,y=m.paddingTop,I=m.labelMarginLeft,M=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],m.rect.x,m.rect.y,E,y,I,M)}},D.prototype.repopulateZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(p){var E=n.idToDummyNode[p],y=E.paddingLeft,I=E.paddingTop,M=E.labelMarginLeft,R=E.labelMarginTop;n.adjustLocations(m[p],E.rect.x,E.rect.y,y,I,M,R)})},D.prototype.getToBeTiled=function(n){var m=n.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var p=n.getChild();if(p==null)return this.toBeTiled[m]=!1,!1;for(var E=p.getNodes(),y=0;y<E.length;y++){var I=E[y];if(this.getNodeDegree(I)>0)return this.toBeTiled[m]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(n){n.id;for(var m=n.getEdges(),p=0,E=0;E<m.length;E++){var y=m[E];y.getSource().id!==y.getTarget().id&&(p=p+1)}return p},D.prototype.getNodeDegreeWithChildren=function(n){var m=this.getNodeDegree(n);if(n.getChild()==null)return m;for(var p=n.getChild().getNodes(),E=0;E<p.length;E++){var y=p[E];m+=this.getNodeDegreeWithChildren(y)}return m},D.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},D.prototype.fillCompexOrderByDFS=function(n){for(var m=0;m<n.length;m++){var p=n[m];p.getChild()!=null&&this.fillCompexOrderByDFS(p.getChild().getNodes()),this.getToBeTiled(p)&&this.compoundOrder.push(p)}},D.prototype.adjustLocations=function(n,m,p,E,y,I,M){m+=E+I,p+=y+M;for(var R=m,W=0;W<n.rows.length;W++){var x=n.rows[W];m=R;for(var q=0,V=0;V<x.length;V++){var Y=x[V];Y.rect.x=m,Y.rect.y=p,m+=Y.rect.width+n.horizontalPadding,Y.rect.height>q&&(q=Y.rect.height)}p+=q+n.verticalPadding}},D.prototype.tileCompoundMembers=function(n,m){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(E){var y=m[E];if(p.tiledMemberPack[E]=p.tileNodes(n[E],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[E].width,y.rect.height=p.tiledMemberPack[E].height,y.setCenter(p.tiledMemberPack[E].centerX,p.tiledMemberPack[E].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,s.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,M=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(M+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>M?(y.rect.y-=(y.labelHeight-M)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-M)/2):y.labelPosVertical=="bottom"&&y.setHeight(M+y.labelHeight))}})},D.prototype.tileNodes=function(n,m){var p=this.tileNodesByFavoringDim(n,m,!0),E=this.tileNodesByFavoringDim(n,m,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(E),M;return I<y?M=E:M=p,M},D.prototype.getOrgRatio=function(n){var m=n.width,p=n.height,E=m/p;return E<1&&(E=1/E),E},D.prototype.calcIdealRowWidth=function(n,m){var p=s.TILING_PADDING_VERTICAL,E=s.TILING_PADDING_HORIZONTAL,y=n.length,I=0,M=0,R=0;n.forEach(function(z){I+=z.getWidth(),M+=z.getHeight(),z.getWidth()>R&&(R=z.getWidth())});var W=I/y,x=M/y,q=Math.pow(p-E,2)+4*(W+E)*(x+p)*y,V=(E-p+Math.sqrt(q))/(2*(W+E)),Y;m?(Y=Math.ceil(V),Y==V&&Y++):Y=Math.floor(V);var et=Y*(W+E)-E;return R>et&&(et=R),et+=E*2,et},D.prototype.tileNodesByFavoringDim=function(n,m,p){var E=s.TILING_PADDING_VERTICAL,y=s.TILING_PADDING_HORIZONTAL,I=s.TILING_COMPARE_BY,M={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:y,centerX:0,centerY:0};I&&(M.idealRowWidth=this.calcIdealRowWidth(n,p));var R=function(O){return O.rect.width*O.rect.height},W=function(O,H){return R(H)-R(O)};n.sort(function(z,O){var H=W;return M.idealRowWidth?(H=I,H(z.id,O.id)):H(z,O)});for(var x=0,q=0,V=0;V<n.length;V++){var Y=n[V];x+=Y.getCenterX(),q+=Y.getCenterY()}M.centerX=x/n.length,M.centerY=q/n.length;for(var V=0;V<n.length;V++){var Y=n[V];if(M.rows.length==0)this.insertNodeToRow(M,Y,0,m);else if(this.canAddHorizontal(M,Y.rect.width,Y.rect.height)){var et=M.rows.length-1;M.idealRowWidth||(et=this.getShortestRowIndex(M)),this.insertNodeToRow(M,Y,et,m)}else this.insertNodeToRow(M,Y,M.rows.length,m);this.shiftToLastRow(M)}return M},D.prototype.insertNodeToRow=function(n,m,p,E){var y=E;if(p==n.rows.length){var I=[];n.rows.push(I),n.rowWidth.push(y),n.rowHeight.push(0)}var M=n.rowWidth[p]+m.rect.width;n.rows[p].length>0&&(M+=n.horizontalPadding),n.rowWidth[p]=M,n.width<M&&(n.width=M);var R=m.rect.height;p>0&&(R+=n.verticalPadding);var W=0;R>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=R,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(m)},D.prototype.getShortestRowIndex=function(n){for(var m=-1,p=Number.MAX_VALUE,E=0;E<n.rows.length;E++)n.rowWidth[E]<p&&(m=E,p=n.rowWidth[E]);return m},D.prototype.getLongestRowIndex=function(n){for(var m=-1,p=Number.MIN_VALUE,E=0;E<n.rows.length;E++)n.rowWidth[E]>p&&(m=E,p=n.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(n,m,p){if(n.idealRowWidth){var E=n.rows.length-1,y=n.rowWidth[E];return y+m+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var M=n.rowWidth[I];if(M+n.horizontalPadding+m<=n.width)return!0;var R=0;n.rowHeight[I]<p&&I>0&&(R=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-M>=m+n.horizontalPadding?W=(n.height+R)/(M+m+n.horizontalPadding):W=(n.height+R)/n.width,R=p+n.verticalPadding;var x;return n.width<m?x=(n.height+R)/m:x=(n.height+R)/n.width,x<1&&(x=1/x),W<1&&(W=1/W),W<x},D.prototype.shiftToLastRow=function(n){var m=this.getLongestRowIndex(n),p=n.rowWidth.length-1,E=n.rows[m],y=E[E.length-1],I=y.width+n.horizontalPadding;if(n.width-n.rowWidth[p]>I&&m!=p){E.splice(-1,1),n.rows[p].push(y),n.rowWidth[m]=n.rowWidth[m]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var M=Number.MIN_VALUE,R=0;R<E.length;R++)E[R].height>M&&(M=E[R].height);m>0&&(M+=n.verticalPadding);var W=n.rowHeight[m]+n.rowHeight[p];n.rowHeight[m]=M,n.rowHeight[p]<y.height+n.verticalPadding&&(n.rowHeight[p]=y.height+n.verticalPadding);var x=n.rowHeight[m]+n.rowHeight[p];n.height+=x-W,this.shiftToLastRow(n)}},D.prototype.tilingPreLayout=function(){s.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},D.prototype.tilingPostLayout=function(){s.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},D.prototype.reduceTrees=function(){for(var n=[],m=!0,p;m;){var E=this.graphManager.getAllNodes(),y=[];m=!1;for(var I=0;I<E.length;I++)if(p=E[I],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null){if(s.PURE_INCREMENTAL){var M=p.getEdges()[0].getOtherEnd(p),R=new N(p.getCenterX()-M.getCenterX(),p.getCenterY()-M.getCenterY());y.push([p,p.getEdges()[0],p.getOwner(),R])}else y.push([p,p.getEdges()[0],p.getOwner()]);m=!0}if(m==!0){for(var W=[],x=0;x<y.length;x++)y[x][0].getEdges().length==1&&(W.push(y[x]),y[x][0].getOwner().remove(y[x][0]));n.push(W),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=n},D.prototype.growTree=function(n){for(var m=n.length,p=n[m-1],E,y=0;y<p.length;y++)E=p[y],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);n.splice(n.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},D.prototype.findPlaceforPrunedNode=function(n){var m,p,E=n[0];if(E==n[1].source?p=n[1].target:p=n[1].source,s.PURE_INCREMENTAL)E.setCenter(p.getCenterX()+n[3].getWidth(),p.getCenterY()+n[3].getHeight());else{var y=p.startX,I=p.finishX,M=p.startY,R=p.finishY,W=0,x=0,q=0,V=0,Y=[W,q,x,V];if(M>0)for(var et=y;et<=I;et++)Y[0]+=this.grid[et][M-1].length+this.grid[et][M].length-1;if(I<this.grid.length-1)for(var et=M;et<=R;et++)Y[1]+=this.grid[I+1][et].length+this.grid[I][et].length-1;if(R<this.grid[0].length-1)for(var et=y;et<=I;et++)Y[2]+=this.grid[et][R+1].length+this.grid[et][R].length-1;if(y>0)for(var et=M;et<=R;et++)Y[3]+=this.grid[y-1][et].length+this.grid[y][et].length-1;for(var z=A.MAX_VALUE,O,H,$=0;$<Y.length;$++)Y[$]<z?(z=Y[$],O=1,H=$):Y[$]==z&&O++;if(O==3&&z==0)Y[0]==0&&Y[1]==0&&Y[2]==0?m=1:Y[0]==0&&Y[1]==0&&Y[3]==0?m=0:Y[0]==0&&Y[2]==0&&Y[3]==0?m=3:Y[1]==0&&Y[2]==0&&Y[3]==0&&(m=2);else if(O==2&&z==0){var _=Math.floor(Math.random()*2);Y[0]==0&&Y[1]==0?_==0?m=0:m=1:Y[0]==0&&Y[2]==0?_==0?m=0:m=2:Y[0]==0&&Y[3]==0?_==0?m=0:m=3:Y[1]==0&&Y[2]==0?_==0?m=1:m=2:Y[1]==0&&Y[3]==0?_==0?m=1:m=3:_==0?m=2:m=3}else if(O==4&&z==0){var _=Math.floor(Math.random()*4);m=_}else m=H;m==0?E.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-l.DEFAULT_EDGE_LENGTH-E.getHeight()/2):m==1?E.setCenter(p.getCenterX()+p.getWidth()/2+l.DEFAULT_EDGE_LENGTH+E.getWidth()/2,p.getCenterY()):m==2?E.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+l.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(p.getCenterX()-p.getWidth()/2-l.DEFAULT_EDGE_LENGTH-E.getWidth()/2,p.getCenterY())}},a.exports=D}),991:((a,e,i)=>{var f=i(551).FDLayoutNode,r=i(551).IMath;function v(o,s,c,l){f.call(this,o,s,c,l)}v.prototype=Object.create(f.prototype);for(var t in f)v[t]=f[t];v.prototype.calculateDisplacement=function(){var o=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=o.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=o.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=o.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=o.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>o.coolingFactor*o.maxNodeDisplacement&&(this.displacementX=o.coolingFactor*o.maxNodeDisplacement*r.sign(this.displacementX)),Math.abs(this.displacementY)>o.coolingFactor*o.maxNodeDisplacement&&(this.displacementY=o.coolingFactor*o.maxNodeDisplacement*r.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},v.prototype.propogateDisplacementToChildren=function(o,s){for(var c=this.getChild().getNodes(),l,T=0;T<c.length;T++)l=c[T],l.getChild()==null?(l.displacementX+=o,l.displacementY+=s):l.propogateDisplacementToChildren(o,s)},v.prototype.move=function(){var o=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),o.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},v.prototype.setPred1=function(o){this.pred1=o},v.prototype.getPred1=function(){return pred1},v.prototype.getPred2=function(){return pred2},v.prototype.setNext=function(o){this.next=o},v.prototype.getNext=function(){return next},v.prototype.setProcessed=function(o){this.processed=o},v.prototype.isProcessed=function(){return processed},a.exports=v}),902:((a,e,i)=>{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l<c.length;l++)T[l]=c[l];return T}else return Array.from(c)}var r=i(806),v=i(551).LinkedList,t=i(551).Matrix,o=i(551).SVD;function s(){}s.handleConstraints=function(c){var l={};l.fixedNodeConstraint=c.constraints.fixedNodeConstraint,l.alignmentConstraint=c.constraints.alignmentConstraint,l.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var T=new Map,g=new Map,d=[],N=[],F=c.getAllNodes(),A=0,G=0;G<F.length;G++){var k=F[G];k.getChild()==null&&(g.set(k.id,A++),d.push(k.getCenterX()),N.push(k.getCenterY()),T.set(k.id,k))}l.relativePlacementConstraint&&l.relativePlacementConstraint.forEach(function(S){!S.gap&&S.gap!=0&&(S.left?S.gap=r.DEFAULT_EDGE_LENGTH+T.get(S.left).getWidth()/2+T.get(S.right).getWidth()/2:S.gap=r.DEFAULT_EDGE_LENGTH+T.get(S.top).getHeight()/2+T.get(S.bottom).getHeight()/2)});var X=function(b,B){return{x:b.x-B.x,y:b.y-B.y}},J=function(b){var B=0,K=0;return b.forEach(function(Z){B+=d[g.get(Z)],K+=N[g.get(Z)]}),{x:B/b.size,y:K/b.size}},D=function(b,B,K,Z,at){function ct(lt,ot){var Lt=new Set(lt),ft=!0,st=!1,Xt=void 0;try{for(var Tt=ot[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var $t=Ct.value;Lt.add($t)}}catch(bt){st=!0,Xt=bt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}return Lt}var nt=new Map;b.forEach(function(lt,ot){nt.set(ot,0)}),b.forEach(function(lt,ot){lt.forEach(function(Lt){nt.set(Lt.id,nt.get(Lt.id)+1)})});var tt=new Map,j=new Map,ut=new v;nt.forEach(function(lt,ot){lt==0?(ut.push(ot),K||(B=="horizontal"?tt.set(ot,g.has(ot)?d[g.get(ot)]:Z.get(ot)):tt.set(ot,g.has(ot)?N[g.get(ot)]:Z.get(ot)))):tt.set(ot,Number.NEGATIVE_INFINITY),K&&j.set(ot,new Set([ot]))}),K&&at.forEach(function(lt){var ot=[];if(lt.forEach(function(st){K.has(st)&&ot.push(st)}),ot.length>0){var Lt=0;ot.forEach(function(st){B=="horizontal"?(tt.set(st,g.has(st)?d[g.get(st)]:Z.get(st)),Lt+=tt.get(st)):(tt.set(st,g.has(st)?N[g.get(st)]:Z.get(st)),Lt+=tt.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||tt.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){B=="horizontal"?ft+=g.has(st)?d[g.get(st)]:Z.get(st):ft+=g.has(st)?N[g.get(st)]:Z.get(st)}),ft=ft/lt.length,lt.forEach(function(st){tt.set(st,ft)})}});for(var wt=function(){var ot=ut.shift(),Lt=b.get(ot);Lt.forEach(function(ft){if(tt.get(ft.id)<tt.get(ot)+ft.gap)if(K&&K.has(ft.id)){var st=void 0;if(B=="horizontal"?st=g.has(ft.id)?d[g.get(ft.id)]:Z.get(ft.id):st=g.has(ft.id)?N[g.get(ft.id)]:Z.get(ft.id),tt.set(ft.id,st),st<tt.get(ot)+ft.gap){var Xt=tt.get(ot)+ft.gap-st;j.get(ot).forEach(function(Tt){tt.set(Tt,tt.get(Tt)-Xt)})}}else tt.set(ft.id,tt.get(ot)+ft.gap);nt.set(ft.id,nt.get(ft.id)-1),nt.get(ft.id)==0&&ut.push(ft.id),K&&j.set(ft.id,ct(j.get(ot),j.get(ft.id)))})};ut.length!=0;)wt();if(K){var pt=new Set;b.forEach(function(lt,ot){lt.length==0&&pt.add(ot)});var xt=[];j.forEach(function(lt,ot){if(pt.has(ot)){var Lt=!1,ft=!0,st=!1,Xt=void 0;try{for(var Tt=lt[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var $t=Ct.value;K.has($t)&&(Lt=!0)}}catch(St){st=!0,Xt=St}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}if(!Lt){var bt=!1,zt=void 0;xt.forEach(function(St,kt){St.has([].concat(f(lt))[0])&&(bt=!0,zt=kt)}),bt?lt.forEach(function(St){xt[zt].add(St)}):xt.push(new Set(lt))}}}),xt.forEach(function(lt,ot){var Lt=Number.POSITIVE_INFINITY,ft=Number.POSITIVE_INFINITY,st=Number.NEGATIVE_INFINITY,Xt=Number.NEGATIVE_INFINITY,Tt=!0,Ct=!1,$t=void 0;try{for(var bt=lt[Symbol.iterator](),zt;!(Tt=(zt=bt.next()).done);Tt=!0){var St=zt.value,kt=void 0;B=="horizontal"?kt=g.has(St)?d[g.get(St)]:Z.get(St):kt=g.has(St)?N[g.get(St)]:Z.get(St);var Kt=tt.get(St);kt<Lt&&(Lt=kt),kt>st&&(st=kt),Kt<ft&&(ft=Kt),Kt>Xt&&(Xt=Kt)}}catch(ee){Ct=!0,$t=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw $t}}var fe=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),ne;!(Qt=(ne=Jt.next()).done);Qt=!0){var te=ne.value;tt.set(te,tt.get(te)+fe)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return tt},rt=function(b){var B=0,K=0,Z=0,at=0;if(b.forEach(function(j){j.left?d[g.get(j.left)]-d[g.get(j.right)]>=0?B++:K++:N[g.get(j.top)]-N[g.get(j.bottom)]>=0?Z++:at++}),B>K&&Z>at)for(var ct=0;ct<g.size;ct++)d[ct]=-1*d[ct],N[ct]=-1*N[ct];else if(B>K)for(var nt=0;nt<g.size;nt++)d[nt]=-1*d[nt];else if(Z>at)for(var tt=0;tt<g.size;tt++)N[tt]=-1*N[tt]},n=function(b){var B=[],K=new v,Z=new Set,at=0;return b.forEach(function(ct,nt){if(!Z.has(nt)){B[at]=[];var tt=nt;for(K.push(tt),Z.add(tt),B[at].push(tt);K.length!=0;){tt=K.shift();var j=b.get(tt);j.forEach(function(ut){Z.has(ut.id)||(K.push(ut.id),Z.add(ut.id),B[at].push(ut.id))})}at++}}),B},m=function(b){var B=new Map;return b.forEach(function(K,Z){B.set(Z,[])}),b.forEach(function(K,Z){K.forEach(function(at){B.get(Z).push(at),B.get(at.id).push({id:Z,gap:at.gap,direction:at.direction})})}),B},p=function(b){var B=new Map;return b.forEach(function(K,Z){B.set(Z,[])}),b.forEach(function(K,Z){K.forEach(function(at){B.get(at.id).push({id:Z,gap:at.gap,direction:at.direction})})}),B},E=[],y=[],I=!1,M=!1,R=new Set,W=new Map,x=new Map,q=[];if(l.fixedNodeConstraint&&l.fixedNodeConstraint.forEach(function(S){R.add(S.nodeId)}),l.relativePlacementConstraint&&(l.relativePlacementConstraint.forEach(function(S){S.left?(W.has(S.left)?W.get(S.left).push({id:S.right,gap:S.gap,direction:"horizontal"}):W.set(S.left,[{id:S.right,gap:S.gap,direction:"horizontal"}]),W.has(S.right)||W.set(S.right,[])):(W.has(S.top)?W.get(S.top).push({id:S.bottom,gap:S.gap,direction:"vertical"}):W.set(S.top,[{id:S.bottom,gap:S.gap,direction:"vertical"}]),W.has(S.bottom)||W.set(S.bottom,[]))}),x=m(W),q=n(x)),r.TRANSFORM_ON_CONSTRAINT_HANDLING){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>1)l.fixedNodeConstraint.forEach(function(S,b){E[b]=[S.position.x,S.position.y],y[b]=[d[g.get(S.nodeId)],N[g.get(S.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var S=0;if(l.alignmentConstraint.vertical){for(var b=l.alignmentConstraint.vertical,B=function(tt){var j=new Set;b[tt].forEach(function(pt){j.add(pt)});var ut=new Set([].concat(f(j)).filter(function(pt){return R.has(pt)})),wt=void 0;ut.size>0?wt=d[g.get(ut.values().next().value)]:wt=J(j).x,b[tt].forEach(function(pt){E[S]=[wt,N[g.get(pt)]],y[S]=[d[g.get(pt)],N[g.get(pt)]],S++})},K=0;K<b.length;K++)B(K);I=!0}if(l.alignmentConstraint.horizontal){for(var Z=l.alignmentConstraint.horizontal,at=function(tt){var j=new Set;Z[tt].forEach(function(pt){j.add(pt)});var ut=new Set([].concat(f(j)).filter(function(pt){return R.has(pt)})),wt=void 0;ut.size>0?wt=d[g.get(ut.values().next().value)]:wt=J(j).y,Z[tt].forEach(function(pt){E[S]=[d[g.get(pt)],wt],y[S]=[d[g.get(pt)],N[g.get(pt)]],S++})},ct=0;ct<Z.length;ct++)at(ct);I=!0}l.relativePlacementConstraint&&(M=!0)})();else if(l.relativePlacementConstraint){for(var V=0,Y=0,et=0;et<q.length;et++)q[et].length>V&&(V=q[et].length,Y=et);if(V<x.size/2)rt(l.relativePlacementConstraint),I=!1,M=!1;else{var z=new Map,O=new Map,H=[];q[Y].forEach(function(S){W.get(S).forEach(function(b){b.direction=="horizontal"?(z.has(S)?z.get(S).push(b):z.set(S,[b]),z.has(b.id)||z.set(b.id,[]),H.push({left:S,right:b.id})):(O.has(S)?O.get(S).push(b):O.set(S,[b]),O.has(b.id)||O.set(b.id,[]),H.push({top:S,bottom:b.id}))})}),rt(H),M=!1;var $=D(z,"horizontal"),_=D(O,"vertical");q[Y].forEach(function(S,b){y[b]=[d[g.get(S)],N[g.get(S)]],E[b]=[],$.has(S)?E[b][0]=$.get(S):E[b][0]=d[g.get(S)],_.has(S)?E[b][1]=_.get(S):E[b][1]=N[g.get(S)]}),I=!0}}if(I){for(var ht=void 0,Q=t.transpose(E),It=t.transpose(y),Nt=0;Nt<Q.length;Nt++)Q[Nt]=t.multGamma(Q[Nt]),It[Nt]=t.multGamma(It[Nt]);var vt=t.multMat(Q,t.transpose(It)),it=o.svd(vt);ht=t.multMat(it.V,t.transpose(it.U));for(var gt=0;gt<g.size;gt++){var mt=[d[gt],N[gt]],At=[ht[0][0],ht[1][0]],Ot=[ht[0][1],ht[1][1]];d[gt]=t.dotProduct(mt,At),N[gt]=t.dotProduct(mt,Ot)}M&&rt(l.relativePlacementConstraint)}}if(r.ENFORCE_CONSTRAINTS){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>0){var Et={x:0,y:0};l.fixedNodeConstraint.forEach(function(S,b){var B={x:d[g.get(S.nodeId)],y:N[g.get(S.nodeId)]},K=S.position,Z=X(K,B);Et.x+=Z.x,Et.y+=Z.y}),Et.x/=l.fixedNodeConstraint.length,Et.y/=l.fixedNodeConstraint.length,d.forEach(function(S,b){d[b]+=Et.x}),N.forEach(function(S,b){N[b]+=Et.y}),l.fixedNodeConstraint.forEach(function(S){d[g.get(S.nodeId)]=S.position.x,N[g.get(S.nodeId)]=S.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Dt=l.alignmentConstraint.vertical,Rt=function(b){var B=new Set;Dt[b].forEach(function(at){B.add(at)});var K=new Set([].concat(f(B)).filter(function(at){return R.has(at)})),Z=void 0;K.size>0?Z=d[g.get(K.values().next().value)]:Z=J(B).x,B.forEach(function(at){R.has(at)||(d[g.get(at)]=Z)})},Ht=0;Ht<Dt.length;Ht++)Rt(Ht);if(l.alignmentConstraint.horizontal)for(var Ut=l.alignmentConstraint.horizontal,Pt=function(b){var B=new Set;Ut[b].forEach(function(at){B.add(at)});var K=new Set([].concat(f(B)).filter(function(at){return R.has(at)})),Z=void 0;K.size>0?Z=N[g.get(K.values().next().value)]:Z=J(B).y,B.forEach(function(at){R.has(at)||(N[g.get(at)]=Z)})},Ft=0;Ft<Ut.length;Ft++)Pt(Ft)}l.relativePlacementConstraint&&(function(){var S=new Map,b=new Map,B=new Map,K=new Map,Z=new Map,at=new Map,ct=new Set,nt=new Set;if(R.forEach(function(Gt){ct.add(Gt),nt.add(Gt)}),l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var tt=l.alignmentConstraint.vertical,j=function(yt){B.set("dummy"+yt,[]),tt[yt].forEach(function(Mt){S.set(Mt,"dummy"+yt),B.get("dummy"+yt).push(Mt),R.has(Mt)&&ct.add("dummy"+yt)}),Z.set("dummy"+yt,d[g.get(tt[yt][0])])},ut=0;ut<tt.length;ut++)j(ut);if(l.alignmentConstraint.horizontal)for(var wt=l.alignmentConstraint.horizontal,pt=function(yt){K.set("dummy"+yt,[]),wt[yt].forEach(function(Mt){b.set(Mt,"dummy"+yt),K.get("dummy"+yt).push(Mt),R.has(Mt)&&nt.add("dummy"+yt)}),at.set("dummy"+yt,N[g.get(wt[yt][0])])},xt=0;xt<wt.length;xt++)pt(xt)}var lt=new Map,ot=new Map,Lt=function(yt){W.get(yt).forEach(function(Mt){var Zt=void 0,Bt=void 0;Mt.direction=="horizontal"?(Zt=S.get(yt)?S.get(yt):yt,S.get(Mt.id)?Bt={id:S.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:Bt=Mt,lt.has(Zt)?lt.get(Zt).push(Bt):lt.set(Zt,[Bt]),lt.has(Bt.id)||lt.set(Bt.id,[])):(Zt=b.get(yt)?b.get(yt):yt,b.get(Mt.id)?Bt={id:b.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:Bt=Mt,ot.has(Zt)?ot.get(Zt).push(Bt):ot.set(Zt,[Bt]),ot.has(Bt.id)||ot.set(Bt.id,[]))})},ft=!0,st=!1,Xt=void 0;try{for(var Tt=W.keys()[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var $t=Ct.value;Lt($t)}}catch(Gt){st=!0,Xt=Gt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}var bt=m(lt),zt=m(ot),St=n(bt),kt=n(zt),Kt=p(lt),fe=p(ot),Qt=[],jt=[];St.forEach(function(Gt,yt){Qt[yt]=[],Gt.forEach(function(Mt){Kt.get(Mt).length==0&&Qt[yt].push(Mt)})}),kt.forEach(function(Gt,yt){jt[yt]=[],Gt.forEach(function(Mt){fe.get(Mt).length==0&&jt[yt].push(Mt)})});var _t=D(lt,"horizontal",ct,Z,Qt),Jt=D(ot,"vertical",nt,at,jt),ne=function(yt){B.get(yt)?B.get(yt).forEach(function(Mt){d[g.get(Mt)]=_t.get(yt)}):d[g.get(yt)]=_t.get(yt)},te=!0,ee=!1,Te=void 0;try{for(var ce=_t.keys()[Symbol.iterator](),Ne;!(te=(Ne=ce.next()).done);te=!0){var ge=Ne.value;ne(ge)}}catch(Gt){ee=!0,Te=Gt}finally{try{!te&&ce.return&&ce.return()}finally{if(ee)throw Te}}var $e=function(yt){K.get(yt)?K.get(yt).forEach(function(Mt){N[g.get(Mt)]=Jt.get(yt)}):N[g.get(yt)]=Jt.get(yt)},ue=!0,Le=!1,Ce=void 0;try{for(var de=Jt.keys()[Symbol.iterator](),Ae;!(ue=(Ae=de.next()).done);ue=!0){var ge=Ae.value;$e(ge)}}catch(Gt){Le=!0,Ce=Gt}finally{try{!ue&&de.return&&de.return()}finally{if(Le)throw Ce}}})()}for(var Yt=0;Yt<F.length;Yt++){var Vt=F[Yt];Vt.getChild()==null&&Vt.setCenter(d[g.get(Vt.id)],N[g.get(Vt.id)])}},a.exports=s}),551:(a=>{a.exports=w})},L={};function u(a){var e=L[a];if(e!==void 0)return e.exports;var i=L[a]={exports:{}};return U[a](i,i.exports,u),i.exports}var h=u(45);return h})()})})(he)),he.exports}var vr=se.exports,Oe;function pr(){return Oe||(Oe=1,(function(C,P){(function(U,L){C.exports=L(dr())})(vr,function(w){return(()=>{var U={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var i=arguments.length,f=Array(i>1?i-1:0),r=1;r<i;r++)f[r-1]=arguments[r];return f.forEach(function(v){Object.keys(v).forEach(function(t){return e[t]=v[t]})}),e}}),548:((a,e,i)=>{var f=(function(){function t(o,s){var c=[],l=!0,T=!1,g=void 0;try{for(var d=o[Symbol.iterator](),N;!(l=(N=d.next()).done)&&(c.push(N.value),!(s&&c.length===s));l=!0);}catch(F){T=!0,g=F}finally{try{!l&&d.return&&d.return()}finally{if(T)throw g}}return c}return function(o,s){if(Array.isArray(o))return o;if(Symbol.iterator in Object(o))return t(o,s);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),r=i(140).layoutBase.LinkedList,v={};v.getTopMostNodes=function(t){for(var o={},s=0;s<t.length;s++)o[t[s].id()]=!0;var c=t.filter(function(l,T){typeof l=="number"&&(l=T);for(var g=l.parent()[0];g!=null;){if(o[g.id()])return!1;g=g.parent()[0]}return!0});return c},v.connectComponents=function(t,o,s,c){var l=new r,T=new Set,g=[],d=void 0,N=void 0,F=void 0,A=!1,G=1,k=[],X=[],J=function(){var rt=t.collection();X.push(rt);var n=s[0],m=t.collection();m.merge(n).merge(n.descendants().intersection(o)),g.push(n),m.forEach(function(y){l.push(y),T.add(y),rt.merge(y)});for(var p=function(){n=l.shift();var I=t.collection();n.neighborhood().nodes().forEach(function(x){o.intersection(n.edgesWith(x)).length>0&&I.merge(x)});for(var M=0;M<I.length;M++){var R=I[M];if(d=s.intersection(R.union(R.ancestors())),d!=null&&!T.has(d[0])){var W=d.union(d.descendants());W.forEach(function(x){l.push(x),T.add(x),rt.merge(x),s.has(x)&&g.push(x)})}}};l.length!=0;)p();if(rt.forEach(function(y){o.intersection(y.connectedEdges()).forEach(function(I){rt.has(I.source())&&rt.has(I.target())&&rt.merge(I)})}),g.length==s.length&&(A=!0),!A||A&&G>1){N=g[0],F=N.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length<F&&(F=y.connectedEdges().length,N=y)}),k.push(N.id());var E=t.collection();E.merge(g[0]),g.forEach(function(y){E.merge(y)}),g=[],s=s.difference(E),G++}};do J();while(!A);return c&&k.length>0&&c.set("dummy"+(c.size+1),k),X},v.relocateComponent=function(t,o,s){if(!s.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(s.quality=="draft"){var d=!0,N=!1,F=void 0;try{for(var A=o.nodeIndexes[Symbol.iterator](),G;!(d=(G=A.next()).done);d=!0){var k=G.value,X=f(k,2),J=X[0],D=X[1],rt=s.cy.getElementById(J);if(rt){var n=rt.boundingBox(),m=o.xCoords[D]-n.w/2,p=o.xCoords[D]+n.w/2,E=o.yCoords[D]-n.h/2,y=o.yCoords[D]+n.h/2;m<c&&(c=m),p>l&&(l=p),E<T&&(T=E),y>g&&(g=y)}}}catch(x){N=!0,F=x}finally{try{!d&&A.return&&A.return()}finally{if(N)throw F}}var I=t.x-(l+c)/2,M=t.y-(g+T)/2;o.xCoords=o.xCoords.map(function(x){return x+I}),o.yCoords=o.yCoords.map(function(x){return x+M})}else{Object.keys(o).forEach(function(x){var q=o[x],V=q.getRect().x,Y=q.getRect().x+q.getRect().width,et=q.getRect().y,z=q.getRect().y+q.getRect().height;V<c&&(c=V),Y>l&&(l=Y),et<T&&(T=et),z>g&&(g=z)});var R=t.x-(l+c)/2,W=t.y-(g+T)/2;Object.keys(o).forEach(function(x){var q=o[x];q.setCenter(q.getCenterX()+R,q.getCenterY()+W)})}}},v.calcBoundingBox=function(t,o,s,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,N=void 0,F=void 0,A=void 0,G=void 0,k=t.descendants().not(":parent"),X=k.length,J=0;J<X;J++){var D=k[J];N=o[c.get(D.id())]-D.width()/2,F=o[c.get(D.id())]+D.width()/2,A=s[c.get(D.id())]-D.height()/2,G=s[c.get(D.id())]+D.height()/2,l>N&&(l=N),T<F&&(T=F),g>A&&(g=A),d<G&&(d=G)}var rt={};return rt.topLeftX=l,rt.topLeftY=g,rt.width=T-l,rt.height=d-g,rt},v.calcParentsWithoutChildren=function(t,o){var s=t.collection();return o.nodes(":parent").forEach(function(c){var l=!1;c.children().forEach(function(T){T.css("display")!="none"&&(l=!0)}),l||s.merge(c)}),s},a.exports=v}),816:((a,e,i)=>{var f=i(548),r=i(140).CoSELayout,v=i(140).CoSENode,t=i(140).layoutBase.PointD,o=i(140).layoutBase.DimensionD,s=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,l=i(140).CoSEConstants,T=function(d,N){var F=d.cy,A=d.eles,G=A.nodes(),k=A.edges(),X=void 0,J=void 0,D=void 0,rt={};d.randomize&&(X=N.nodeIndexes,J=N.xCoords,D=N.yCoords);var n=function(x){return typeof x=="function"},m=function(x,q){return n(x)?x(q):x},p=f.calcParentsWithoutChildren(F,A),E=function W(x,q,V,Y){for(var et=q.length,z=0;z<et;z++){var O=q[z],H=null;O.intersection(p).length==0&&(H=O.children());var $=void 0,_=O.layoutDimensions({nodeDimensionsIncludeLabels:Y.nodeDimensionsIncludeLabels});if(O.outerWidth()!=null&&O.outerHeight()!=null)if(Y.randomize)if(!O.isParent())$=x.add(new v(V.graphManager,new t(J[X.get(O.id())]-_.w/2,D[X.get(O.id())]-_.h/2),new o(parseFloat(_.w),parseFloat(_.h))));else{var ht=f.calcBoundingBox(O,J,D,X);O.intersection(p).length==0?$=x.add(new v(V.graphManager,new t(ht.topLeftX,ht.topLeftY),new o(ht.width,ht.height))):$=x.add(new v(V.graphManager,new t(ht.topLeftX,ht.topLeftY),new o(parseFloat(_.w),parseFloat(_.h))))}else $=x.add(new v(V.graphManager,new t(O.position("x")-_.w/2,O.position("y")-_.h/2),new o(parseFloat(_.w),parseFloat(_.h))));else $=x.add(new v(this.graphManager));if($.id=O.data("id"),$.nodeRepulsion=m(Y.nodeRepulsion,O),$.paddingLeft=parseInt(O.css("padding")),$.paddingTop=parseInt(O.css("padding")),$.paddingRight=parseInt(O.css("padding")),$.paddingBottom=parseInt(O.css("padding")),Y.nodeDimensionsIncludeLabels&&($.labelWidth=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,$.labelHeight=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,$.labelPosVertical=O.css("text-valign"),$.labelPosHorizontal=O.css("text-halign")),rt[O.data("id")]=$,isNaN($.rect.x)&&($.rect.x=0),isNaN($.rect.y)&&($.rect.y=0),H!=null&&H.length>0){var Q=void 0;Q=V.getGraphManager().add(V.newGraph(),$),W(Q,H,V,Y)}}},y=function(x,q,V){for(var Y=0,et=0,z=0;z<V.length;z++){var O=V[z],H=rt[O.data("source")],$=rt[O.data("target")];if(H&&$&&H!==$&&H.getEdgesBetween($).length==0){var _=q.add(x.newEdge(),H,$);_.id=O.id(),_.idealLength=m(d.idealEdgeLength,O),_.edgeElasticity=m(d.edgeElasticity,O),Y+=_.idealLength,et++}}d.idealEdgeLength!=null&&(et>0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=Y/et:n(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,q){q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=q.fixedNodeConstraint),q.alignmentConstraint&&(x.constraints.alignmentConstraint=q.alignmentConstraint),q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=q.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?s.QUALITY=2:s.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=s.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=s.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,s.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var M=new r,R=M.newGraphManager();return E(R.addRoot(),f.getTopMostNodes(G),M,d),y(M,R,k),I(M,d),M.runLayout(),rt};a.exports={coseLayout:T}}),212:((a,e,i)=>{var f=(function(){function d(N,F){for(var A=0;A<F.length;A++){var G=F[A];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(N,G.key,G)}}return function(N,F,A){return F&&d(N.prototype,F),A&&d(N,A),N}})();function r(d,N){if(!(d instanceof N))throw new TypeError("Cannot call a class as a function")}var v=i(658),t=i(548),o=i(657),s=o.spectralLayout,c=i(816),l=c.coseLayout,T=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(N){return 4500},idealEdgeLength:function(N){return 50},edgeElasticity:function(N){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),g=(function(){function d(N){r(this,d),this.options=v({},T,N)}return f(d,[{key:"run",value:function(){var F=this,A=this.options,G=A.cy,k=A.eles,X=[],J=[],D=void 0,rt=[];A.fixedNodeConstraint&&(!Array.isArray(A.fixedNodeConstraint)||A.fixedNodeConstraint.length==0)&&(A.fixedNodeConstraint=void 0),A.alignmentConstraint&&(A.alignmentConstraint.vertical&&(!Array.isArray(A.alignmentConstraint.vertical)||A.alignmentConstraint.vertical.length==0)&&(A.alignmentConstraint.vertical=void 0),A.alignmentConstraint.horizontal&&(!Array.isArray(A.alignmentConstraint.horizontal)||A.alignmentConstraint.horizontal.length==0)&&(A.alignmentConstraint.horizontal=void 0)),A.relativePlacementConstraint&&(!Array.isArray(A.relativePlacementConstraint)||A.relativePlacementConstraint.length==0)&&(A.relativePlacementConstraint=void 0);var n=A.fixedNodeConstraint||A.alignmentConstraint||A.relativePlacementConstraint;n&&(A.tile=!1,A.packComponents=!1);var m=void 0,p=!1;if(G.layoutUtilities&&A.packComponents&&(m=G.layoutUtilities("get"),m||(m=G.layoutUtilities()),p=!0),k.nodes().length>0)if(p){var I=t.getTopMostNodes(A.eles.nodes());if(D=t.connectComponents(G,A.eles,I),D.forEach(function(vt){var it=vt.boundingBox();rt.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),A.randomize&&D.forEach(function(vt){A.eles=vt,X.push(s(A))}),A.quality=="default"||A.quality=="proof"){var M=G.collection();if(A.tile){var R=new Map,W=[],x=[],q=0,V={nodeIndexes:R,xCoords:W,yCoords:x},Y=[];if(D.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(gt,mt){M.merge(vt.nodes()[mt]),gt.isParent()||(V.nodeIndexes.set(vt.nodes()[mt].id(),q++),V.xCoords.push(vt.nodes()[0].position().x),V.yCoords.push(vt.nodes()[0].position().y))}),Y.push(it))}),M.length>1){var et=M.boundingBox();rt.push({x:et.x1+et.w/2,y:et.y1+et.h/2}),D.push(M),X.push(V);for(var z=Y.length-1;z>=0;z--)D.splice(Y[z],1),X.splice(Y[z],1),rt.splice(Y[z],1)}}D.forEach(function(vt,it){A.eles=vt,J.push(l(A,X[it])),t.relocateComponent(rt[it],J[it],A)})}else D.forEach(function(vt,it){t.relocateComponent(rt[it],X[it],A)});var O=new Set;if(D.length>1){var H=[],$=k.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,it){var gt=void 0;if(A.quality=="draft"&&(gt=X[it].nodeIndexes),vt.nodes().not($).length>0){var mt={};mt.edges=[],mt.nodes=[];var At=void 0;vt.nodes().not($).forEach(function(Ot){if(A.quality=="draft")if(!Ot.isParent())At=gt.get(Ot.id()),mt.nodes.push({x:X[it].xCoords[At]-Ot.boundingbox().w/2,y:X[it].yCoords[At]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var Et=t.calcBoundingBox(Ot,X[it].xCoords,X[it].yCoords,gt);mt.nodes.push({x:Et.topLeftX,y:Et.topLeftY,width:Et.width,height:Et.height})}else J[it][Ot.id()]&&mt.nodes.push({x:J[it][Ot.id()].getLeft(),y:J[it][Ot.id()].getTop(),width:J[it][Ot.id()].getWidth(),height:J[it][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var Et=Ot.source(),Dt=Ot.target();if(Et.css("display")!="none"&&Dt.css("display")!="none")if(A.quality=="draft"){var Rt=gt.get(Et.id()),Ht=gt.get(Dt.id()),Ut=[],Pt=[];if(Et.isParent()){var Ft=t.calcBoundingBox(Et,X[it].xCoords,X[it].yCoords,gt);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(X[it].xCoords[Rt]),Ut.push(X[it].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,X[it].xCoords,X[it].yCoords,gt);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(X[it].xCoords[Ht]),Pt.push(X[it].yCoords[Ht]);mt.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else J[it][Et.id()]&&J[it][Dt.id()]&&mt.edges.push({startX:J[it][Et.id()].getCenterX(),startY:J[it][Et.id()].getCenterY(),endX:J[it][Dt.id()].getCenterX(),endY:J[it][Dt.id()].getCenterY()})}),mt.nodes.length>0&&(H.push(mt),O.add(it))}});var _=m.packComponents(H,A.randomize).shifts;if(A.quality=="draft")X.forEach(function(vt,it){var gt=vt.xCoords.map(function(At){return At+_[it].dx}),mt=vt.yCoords.map(function(At){return At+_[it].dy});vt.xCoords=gt,vt.yCoords=mt});else{var ht=0;O.forEach(function(vt){Object.keys(J[vt]).forEach(function(it){var gt=J[vt][it];gt.setCenter(gt.getCenterX()+_[ht].dx,gt.getCenterY()+_[ht].dy)}),ht++})}}}else{var E=A.eles.boundingBox();if(rt.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),A.randomize){var y=s(A);X.push(y)}A.quality=="default"||A.quality=="proof"?(J.push(l(A,X[0])),t.relocateComponent(rt[0],J[0],A)):t.relocateComponent(rt[0],X[0],A)}var Q=function(it,gt){if(A.quality=="default"||A.quality=="proof"){typeof it=="number"&&(it=gt);var mt=void 0,At=void 0,Ot=it.data("id");return J.forEach(function(Dt){Ot in Dt&&(mt={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},At=Dt[Ot])}),A.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?mt.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(mt.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?mt.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(mt.y-=At.labelHeight/2))),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}else{var Et=void 0;return X.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(it.id());Rt!=null&&(Et={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}};if(A.quality=="default"||A.quality=="proof"||A.randomize){var It=t.calcParentsWithoutChildren(G,k),Nt=k.filter(function(vt){return vt.css("display")=="none"});A.eles=k.not(Nt),k.nodes().not(":parent").not(Nt).layoutPositions(F,A,Q),It.length>0&&It.forEach(function(vt){vt.position(Q(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d})();a.exports=g}),657:((a,e,i)=>{var f=i(548),r=i(140).layoutBase.Matrix,v=i(140).layoutBase.SVD,t=function(s){var c=s.cy,l=s.eles,T=l.nodes(),g=l.nodes(":parent"),d=new Map,N=new Map,F=new Map,A=[],G=[],k=[],X=[],J=[],D=[],rt=[],n=[],m=void 0,p=1e8,E=1e-9,y=s.piTol,I=s.samplingType,M=s.nodeSeparation,R=void 0,W=function(){for(var b=0,B=0,K=!1;B<R;){b=Math.floor(Math.random()*m),K=!1;for(var Z=0;Z<B;Z++)if(X[Z]==b){K=!0;break}if(!K)X[B]=b,B++;else continue}},x=function(b,B,K){for(var Z=[],at=0,ct=0,nt=0,tt=void 0,j=[],ut=0,wt=1,pt=0;pt<m;pt++)j[pt]=p;for(Z[ct]=b,j[b]=0;ct>=at;){nt=Z[at++];for(var xt=A[nt],lt=0;lt<xt.length;lt++)tt=N.get(xt[lt]),j[tt]==p&&(j[tt]=j[nt]+1,Z[++ct]=tt);D[nt][B]=j[nt]*M}if(K){for(var ot=0;ot<m;ot++)D[ot][B]<J[ot]&&(J[ot]=D[ot][B]);for(var Lt=0;Lt<m;Lt++)J[Lt]>ut&&(ut=J[Lt],wt=Lt)}return wt},q=function(b){var B=void 0;if(b){B=Math.floor(Math.random()*m);for(var Z=0;Z<m;Z++)J[Z]=p;for(var at=0;at<R;at++)X[at]=B,B=x(B,at,b)}else{W();for(var K=0;K<R;K++)x(X[K],K,b)}for(var ct=0;ct<m;ct++)for(var nt=0;nt<R;nt++)D[ct][nt]*=D[ct][nt];for(var tt=0;tt<R;tt++)rt[tt]=[];for(var j=0;j<R;j++)for(var ut=0;ut<R;ut++)rt[j][ut]=D[X[ut]][j]},V=function(){for(var b=v.svd(rt),B=b.S,K=b.U,Z=b.V,at=B[0]*B[0]*B[0],ct=[],nt=0;nt<R;nt++){ct[nt]=[];for(var tt=0;tt<R;tt++)ct[nt][tt]=0,nt==tt&&(ct[nt][tt]=B[nt]/(B[nt]*B[nt]+at/(B[nt]*B[nt])))}n=r.multMat(r.multMat(Z,ct),r.transpose(K))},Y=function(){for(var b=void 0,B=void 0,K=[],Z=[],at=[],ct=[],nt=0;nt<m;nt++)K[nt]=Math.random(),Z[nt]=Math.random();K=r.normalize(K),Z=r.normalize(Z);for(var tt=E,j=E,ut=void 0;;){for(var wt=0;wt<m;wt++)at[wt]=K[wt];if(K=r.multGamma(r.multL(r.multGamma(at),D,n)),b=r.dotProduct(at,K),K=r.normalize(K),tt=r.dotProduct(at,K),ut=Math.abs(tt/j),ut<=1+y&&ut>=1)break;j=tt}for(var pt=0;pt<m;pt++)at[pt]=K[pt];for(j=E;;){for(var xt=0;xt<m;xt++)ct[xt]=Z[xt];if(ct=r.minusOp(ct,r.multCons(at,r.dotProduct(at,ct))),Z=r.multGamma(r.multL(r.multGamma(ct),D,n)),B=r.dotProduct(ct,Z),Z=r.normalize(Z),tt=r.dotProduct(ct,Z),ut=Math.abs(tt/j),ut<=1+y&&ut>=1)break;j=tt}for(var lt=0;lt<m;lt++)ct[lt]=Z[lt];G=r.multCons(at,Math.sqrt(Math.abs(b))),k=r.multCons(ct,Math.sqrt(Math.abs(B)))};f.connectComponents(c,l,f.getTopMostNodes(T),d),g.forEach(function(S){f.connectComponents(c,l,f.getTopMostNodes(S.descendants().intersection(l)),d)});for(var et=0,z=0;z<T.length;z++)T[z].isParent()||N.set(T[z].id(),et++);var O=!0,H=!1,$=void 0;try{for(var _=d.keys()[Symbol.iterator](),ht;!(O=(ht=_.next()).done);O=!0){var Q=ht.value;N.set(Q,et++)}}catch(S){H=!0,$=S}finally{try{!O&&_.return&&_.return()}finally{if(H)throw $}}for(var It=0;It<N.size;It++)A[It]=[];g.forEach(function(S){for(var b=S.children().intersection(l);b.nodes(":childless").length==0;)b=b.nodes()[0].children().intersection(l);var B=0,K=b.nodes(":childless")[0].connectedEdges().length;b.nodes(":childless").forEach(function(Z,at){Z.connectedEdges().length<K&&(K=Z.connectedEdges().length,B=at)}),F.set(S.id(),b.nodes(":childless")[B].id())}),T.forEach(function(S){var b=void 0;S.isParent()?b=N.get(F.get(S.id())):b=N.get(S.id()),S.neighborhood().nodes().forEach(function(B){l.intersection(S.edgesWith(B)).length>0&&(B.isParent()?A[b].push(F.get(B.id())):A[b].push(B.id()))})});var Nt=function(b){var B=N.get(b),K=void 0;d.get(b).forEach(function(Z){c.getElementById(Z).isParent()?K=F.get(Z):K=Z,A[B].push(K),A[N.get(K)].push(b)})},vt=!0,it=!1,gt=void 0;try{for(var mt=d.keys()[Symbol.iterator](),At;!(vt=(At=mt.next()).done);vt=!0){var Ot=At.value;Nt(Ot)}}catch(S){it=!0,gt=S}finally{try{!vt&&mt.return&&mt.return()}finally{if(it)throw gt}}m=N.size;var Et=void 0;if(m>2){R=m<s.sampleSize?m:s.sampleSize;for(var Dt=0;Dt<m;Dt++)D[Dt]=[];for(var Rt=0;Rt<R;Rt++)n[Rt]=[];return s.quality=="draft"||s.step=="all"?(q(I),V(),Y(),Et={nodeIndexes:N,xCoords:G,yCoords:k}):(N.forEach(function(S,b){G.push(c.getElementById(b).position("x")),k.push(c.getElementById(b).position("y"))}),Et={nodeIndexes:N,xCoords:G,yCoords:k}),Et}else{var Ht=N.keys(),Ut=c.getElementById(Ht.next().value),Pt=Ut.position(),Ft=Ut.outerWidth();if(G.push(Pt.x),k.push(Pt.y),m==2){var Yt=c.getElementById(Ht.next().value),Vt=Yt.outerWidth();G.push(Pt.x+Ft/2+Vt/2+s.idealEdgeLength),k.push(Pt.y)}return Et={nodeIndexes:N,xCoords:G,yCoords:k},Et}};a.exports={spectralLayout:t}}),579:((a,e,i)=>{var f=i(212),r=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&r(cytoscape),a.exports=r}),140:(a=>{a.exports=w})},L={};function u(a){var e=L[a];if(e!==void 0)return e.exports;var i=L[a]={exports:{}};return U[a](i,i.exports,u),i.exports}var h=u(579);return h})()})})(se)),se.exports}var yr=pr();const Er=fr(yr);var De={L:"left",R:"right",T:"top",B:"bottom"},xe={L:dt(C=>`${C},${C/2} 0,${C} 0,0`,"L"),R:dt(C=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:dt(C=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:dt(C=>`${C/2},0 ${C},${C} 0,${C}`,"B")},oe={L:dt((C,P)=>C-P+2,"L"),R:dt((C,P)=>C-2,"R"),T:dt((C,P)=>C-P+2,"T"),B:dt((C,P)=>C-2,"B")},mr=dt(function(C){return Wt(C)?C==="L"?"R":"L":C==="T"?"B":"T"},"getOppositeArchitectureDirection"),Ie=dt(function(C){const P=C;return P==="L"||P==="R"||P==="T"||P==="B"},"isArchitectureDirection"),Wt=dt(function(C){const P=C;return P==="L"||P==="R"},"isArchitectureDirectionX"),qt=dt(function(C){const P=C;return P==="T"||P==="B"},"isArchitectureDirectionY"),me=dt(function(C,P){const w=Wt(C)&&qt(P),U=qt(C)&&Wt(P);return w||U},"isArchitectureDirectionXY"),Tr=dt(function(C){const P=C[0],w=C[1],U=Wt(P)&&qt(w),L=qt(P)&&Wt(w);return U||L},"isArchitecturePairXY"),Nr=dt(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),pe=dt(function(C,P){const w=`${C}${P}`;return Nr(w)?w:void 0},"getArchitectureDirectionPair"),Lr=dt(function([C,P],w){const U=w[0],L=w[1];return Wt(U)?qt(L)?[C+(U==="L"?-1:1),P+(L==="T"?1:-1)]:[C+(U==="L"?-1:1),P]:Wt(L)?[C+(L==="L"?1:-1),P+(U==="T"?1:-1)]:[C,P+(U==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Cr=dt(function(C){return C==="LT"||C==="TL"?[1,1]:C==="BL"||C==="LB"?[1,-1]:C==="BR"||C==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ar=dt(function(C,P){return me(C,P)?"bend":Wt(C)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),wr=dt(function(C){return C.type==="service"},"isArchitectureService"),Mr=dt(function(C){return C.type==="junction"},"isArchitectureJunction"),Fe=dt(C=>C.data(),"edgeData"),ie=dt(C=>C.data(),"nodeData"),Or=er.architecture,be=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Ze,this.getAccTitle=qe,this.setDiagramTitle=Qe,this.getDiagramTitle=Je,this.getAccDescription=Ke,this.setAccDescription=je,this.clear()}static{dt(this,"ArchitectureDB")}setDiagramId(C){this.diagramId=C}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",_e()}addService({id:C,icon:P,in:w,title:U,iconText:L}){if(this.registeredIds[C]!==void 0)throw new Error(`The service id [${C}] is already in use by another ${this.registeredIds[C]}`);if(w!==void 0){if(C===w)throw new Error(`The service [${C}] cannot be placed within itself`);if(this.registeredIds[w]===void 0)throw new Error(`The service [${C}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[w]==="node")throw new Error(`The service [${C}]'s parent is not a group`)}this.registeredIds[C]="node",this.nodes[C]={id:C,type:"service",icon:P,iconText:L,title:U,edges:[],in:w}}getServices(){return Object.values(this.nodes).filter(wr)}addJunction({id:C,in:P}){if(this.registeredIds[C]!==void 0)throw new Error(`The junction id [${C}] is already in use by another ${this.registeredIds[C]}`);if(P!==void 0){if(C===P)throw new Error(`The junction [${C}] cannot be placed within itself`);if(this.registeredIds[P]===void 0)throw new Error(`The junction [${C}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[P]==="node")throw new Error(`The junction [${C}]'s parent is not a group`)}this.registeredIds[C]="node",this.nodes[C]={id:C,type:"junction",edges:[],in:P}}getJunctions(){return Object.values(this.nodes).filter(Mr)}getNodes(){return Object.values(this.nodes)}getNode(C){return this.nodes[C]??null}addGroup({id:C,icon:P,in:w,title:U}){if(this.registeredIds?.[C]!==void 0)throw new Error(`The group id [${C}] is already in use by another ${this.registeredIds[C]}`);if(w!==void 0){if(C===w)throw new Error(`The group [${C}] cannot be placed within itself`);if(this.registeredIds?.[w]===void 0)throw new Error(`The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[w]==="node")throw new Error(`The group [${C}]'s parent is not a group`)}this.registeredIds[C]="group",this.groups[C]={id:C,icon:P,title:U,in:w}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:C,rhsId:P,lhsDir:w,rhsDir:U,lhsInto:L,rhsInto:u,lhsGroup:h,rhsGroup:a,title:e}){if(!Ie(w))throw new Error(`Invalid direction given for left hand side of edge ${C}--${P}. Expected (L,R,T,B) got ${String(w)}`);if(!Ie(U))throw new Error(`Invalid direction given for right hand side of edge ${C}--${P}. Expected (L,R,T,B) got ${String(U)}`);if(this.nodes[C]===void 0&&this.groups[C]===void 0)throw new Error(`The left-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[P]===void 0&&this.groups[P]===void 0)throw new Error(`The right-hand id [${P}] does not yet exist. Please create the service/group before declaring an edge to it.`);const i=this.nodes[C].in,f=this.nodes[P].in;if(h&&i&&f&&i==f)throw new Error(`The left-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&i&&f&&i==f)throw new Error(`The right-hand id [${P}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const r={lhsId:C,lhsDir:w,lhsInto:L,lhsGroup:h,rhsId:P,rhsDir:U,rhsInto:u,rhsGroup:a,title:e};this.edges.push(r),this.nodes[C]&&this.nodes[P]&&(this.nodes[C].edges.push(this.edges[this.edges.length-1]),this.nodes[P].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const C={},P=Object.entries(this.nodes).reduce((a,[e,i])=>(a[e]=i.edges.reduce((f,r)=>{const v=this.getNode(r.lhsId)?.in,t=this.getNode(r.rhsId)?.in;if(v&&t&&v!==t){const o=Ar(r.lhsDir,r.rhsDir);o!=="bend"&&(C[v]??={},C[v][t]=o,C[t]??={},C[t][v]=o)}if(r.lhsId===e){const o=pe(r.lhsDir,r.rhsDir);o&&(f[o]=r.rhsId)}else{const o=pe(r.rhsDir,r.lhsDir);o&&(f[o]=r.lhsId)}return f},{}),a),{}),w=Object.keys(P)[0],U={[w]:1},L=Object.keys(P).reduce((a,e)=>e===w?a:{...a,[e]:1},{}),u=dt(a=>{const e={[a]:[0,0]},i=[a];for(;i.length>0;){const f=i.shift();if(f){U[f]=1,delete L[f];const r=P[f],[v,t]=e[f];Object.entries(r).forEach(([o,s])=>{U[s]||(e[s]=Lr([v,t],o),i.push(s))})}}return e},"BFS"),h=[u(w)];for(;Object.keys(L).length>0;)h.push(u(Object.keys(L)[0]));this.dataStructures={adjList:P,spatialMaps:h,groupAlignments:C}}return this.dataStructures}setElementForId(C,P){this.elements[C]=P}getElementById(C){return this.elements[C]}getConfig(){return tr({...Or,...rr().architecture})}getConfigField(C){return this.getConfig()[C]}},Dr=dt((C,P)=>{hr(C,P),C.groups.map(w=>P.addGroup(w)),C.services.map(w=>P.addService({...w,type:"service"})),C.junctions.map(w=>P.addJunction({...w,type:"junction"})),C.edges.map(w=>P.addEdge(w))},"populateDb"),Pe={parser:{yy:void 0},parse:dt(async C=>{const P=await lr("architecture",C);Re.debug(P);const w=Pe.parser?.yy;if(!(w instanceof be))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Dr(P,w)},"parse")},xr=dt(C=>`
|
|
2
2
|
.edge {
|
|
3
3
|
stroke-width: ${C.archEdgeWidth};
|
|
4
4
|
stroke: ${C.archEdgeColor};
|