@marimo-team/frontend 0.13.16-dev9 → 0.13.16-dev91
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/dist/assets/ConnectedDataExplorerComponent-BVRYJBIm.js +19 -0
- package/dist/assets/ImageComparisonComponent-lzlqsieb.js +1 -0
- package/dist/assets/VegaLite-DQmm7W6P.js +189 -0
- package/dist/assets/_baseEach-BFwhIXHb.js +1 -0
- package/dist/assets/_baseMap-BEsULbjA.js +1 -0
- package/dist/assets/_baseUniq-BGdcwr2p.js +1 -0
- package/dist/assets/_createAggregator-94ZOpgBV.js +1 -0
- package/dist/assets/{any-language-editor-C_9bwXGO.js → any-language-editor-pgy8lIp4.js} +2 -2
- package/dist/assets/architectureDiagram-IEHRJDOE-BthNdh0m.js +36 -0
- package/dist/assets/{blockDiagram-JOT3LUYC-CL9_24UR.js → blockDiagram-JOT3LUYC-B2Pn9bVy.js} +2 -2
- package/dist/assets/{c4Diagram-VJAJSXHY-lspTvRhA.js → c4Diagram-VJAJSXHY-Btoxy5DO.js} +2 -2
- package/dist/assets/channel-szhGxnks.js +1 -0
- package/dist/assets/{chunk-4BMEZGHF-B9Et-cJ2.js → chunk-4BMEZGHF-BGDlm2bh.js} +1 -1
- package/dist/assets/{chunk-A2AXSNBT-CFniWUgi.js → chunk-A2AXSNBT-DYB-VaMm.js} +1 -1
- package/dist/assets/{chunk-AEK57VVT-BXNGa_dn.js → chunk-AEK57VVT-rBpDct3-.js} +1 -1
- package/dist/assets/{chunk-D6G4REZN-BcbiUWbM.js → chunk-D6G4REZN-CDG7ta7M.js} +1 -1
- package/dist/assets/{chunk-RZ5BOZE2-CH9NHZ_g.js → chunk-RZ5BOZE2-xsU-XeUb.js} +1 -1
- package/dist/assets/{chunk-XZIHB7SX-CbdIuTbz.js → chunk-XZIHB7SX-C4BaDVJU.js} +1 -1
- package/dist/assets/{circle-play-D2OGeEbA.js → circle-play-Dz1W_E0R.js} +1 -1
- package/dist/assets/classDiagram-GIVACNV2-CSnokHQq.js +1 -0
- package/dist/assets/classDiagram-v2-COTLJTTW-CSnokHQq.js +1 -0
- package/dist/assets/clone-DcvBn-4R.js +1 -0
- package/dist/assets/compile-DUWz9pu8.js +10 -0
- package/dist/assets/{cytoscape.esm-C5gjFiAL.js → cytoscape.esm-C11VZyMT.js} +1 -1
- package/dist/assets/{dagre-OKDRZEBW-4OEgTEw0.js → dagre-OKDRZEBW-B-5Wc2cX.js} +1 -1
- package/dist/assets/{data-editor-B8IDeUNv.js → data-editor-CtA2vSKy.js} +3 -3
- package/dist/assets/{diagram-SSKATNLV-CtBNepMv.js → diagram-SSKATNLV-Cw26EUbf.js} +1 -1
- package/dist/assets/{diagram-VNBRO52H-xU3JGfGi.js → diagram-VNBRO52H-Bh-mvOAI.js} +1 -1
- package/dist/assets/edit-page-CBE6hVRD.js +144 -0
- package/dist/assets/{erDiagram-Q7BY3M3F-DjaKJi8R.js → erDiagram-Q7BY3M3F-CNGgIShN.js} +1 -1
- package/dist/assets/{flowDiagram-4HSFHLVR-DODo0DW_.js → flowDiagram-4HSFHLVR-BgNnNfLa.js} +1 -1
- package/dist/assets/{ganttDiagram-APWFNJXF-DJKd6TA8.js → ganttDiagram-APWFNJXF-DH0wDqig.js} +4 -4
- package/dist/assets/{gitGraphDiagram-7IBYFJ6S-wPJTq0nQ.js → gitGraphDiagram-7IBYFJ6S-D7QkLpvP.js} +1 -1
- package/dist/assets/{graph-D7JGbee1.js → graph-CqDQO4__.js} +1 -1
- package/dist/assets/home-page-NFkU9U7c.js +9 -0
- package/dist/assets/{index-C7-ahTqM.js → index-7yPgKTzA.js} +1 -1
- package/dist/assets/{index-BevR4AJL.js → index-B9YRoRDw.js} +1 -1
- package/dist/assets/{index-Cz08J5Kw.js → index-B9ev0lFv.js} +1 -1
- package/dist/assets/{index-7mdZEI6m.js → index-BEV7EN2P.js} +1 -1
- package/dist/assets/index-BH3Eb9nz.css +1 -0
- package/dist/assets/{index-DWvXlgD4.js → index-BLpyrJhm.js} +1 -1
- package/dist/assets/{index-rS-6z_uh.js → index-BRb8H5lu.js} +1 -1
- package/dist/assets/{index-B4sdWv-q.js → index-BYFT-7U8.js} +1 -1
- package/dist/assets/{index-PDtLILTf.js → index-CB4dOtj8.js} +1 -1
- package/dist/assets/{index-CyZ-lddI.js → index-CRibqT7u.js} +1 -1
- package/dist/assets/index-CgxFL2cr.js +499 -0
- package/dist/assets/index-D2hGsDFI.js +1 -0
- package/dist/assets/index-DE-6BPBD.js +1 -0
- package/dist/assets/{index-BZOnbvo6.js → index-DFOqQfA5.js} +1 -1
- package/dist/assets/{index-CwtUKDh_.js → index-Dze_2Wiz.js} +1 -1
- package/dist/assets/{index-CQaySdAo.js → index-ILxz4Vf6.js} +1 -1
- package/dist/assets/{index-BWou89L4.js → index-e_zth6yw.js} +1 -1
- package/dist/assets/{index-t8_uCLev.js → index-lR0zWE2c.js} +1 -1
- package/dist/assets/{index-CnsjP_zo.js → index-nGm80mNn.js} +1 -1
- package/dist/assets/{index-FSgg8y_o.js → index-tAg0vEkQ.js} +1 -1
- package/dist/assets/infoDiagram-PH2N3AL5-BRukU5cZ.js +2 -0
- package/dist/assets/{journeyDiagram-U35MCT3I-PElwvod7.js → journeyDiagram-U35MCT3I-BEwDP5Sv.js} +1 -1
- package/dist/assets/{kanban-definition-NDS4AKOZ-DsqkaJnQ.js → kanban-definition-NDS4AKOZ-CU0C-piC.js} +1 -1
- package/dist/assets/layout-CaXvgP1v.js +1 -0
- package/dist/assets/{linear-D1U0b4NY.js → linear-DAHL7y9L.js} +1 -1
- package/dist/assets/{mermaid-DbkPEKV3.js → mermaid-CnGHUklx.js} +25 -25
- package/dist/assets/min-DG2XegQC.js +1 -0
- package/dist/assets/mindmap-definition-ALO5MXBD-B9iaQYIm.js +95 -0
- package/dist/assets/panels-CDs1ZUWp.js +27 -0
- package/dist/assets/{pieDiagram-IB7DONF6-CJfqnzsn.js → pieDiagram-IB7DONF6-CvwbrU2p.js} +1 -1
- package/dist/assets/{quadrantDiagram-7GDLP6J5-UZY6XpHr.js → quadrantDiagram-7GDLP6J5-BFV87EPz.js} +1 -1
- package/dist/assets/{radar-MK3ICKWK-CuZ1ruTv.js → radar-MK3ICKWK-BvpzFTZd.js} +1 -1
- package/dist/assets/{react-plotly-Cfaau_4S.js → react-plotly-CbplJOUI.js} +20 -20
- package/dist/assets/{requirementDiagram-KVF5MWMF-D4BRdspM.js → requirementDiagram-KVF5MWMF-BpLs2NI5.js} +1 -1
- package/dist/assets/run-page-Dd-L-6kM.js +1 -0
- package/dist/assets/{sankeyDiagram-QLVOVGJD-DG4ZSfQE.js → sankeyDiagram-QLVOVGJD-CeCfpWIj.js} +1 -1
- package/dist/assets/{save-worker-CULn6QYm.js → save-worker-DtAsG4LO.js} +1 -1
- package/dist/assets/{sequenceDiagram-X6HHIX6F-BrlF-mUd.js → sequenceDiagram-X6HHIX6F-BNy5wL6h.js} +1 -1
- package/dist/assets/slides-component-D4036R-A.js +1 -0
- package/dist/assets/sortBy-mrUipeUT.js +1 -0
- package/dist/assets/{stateDiagram-DGXRK772-C3lsMUKj.js → stateDiagram-DGXRK772-oKvWv6OV.js} +1 -1
- package/dist/assets/stateDiagram-v2-YXO3MK2T-eBefW6pi.js +1 -0
- package/dist/assets/{terminal-BndrgHug.js → terminal-BJd9v3PH.js} +5 -5
- package/dist/assets/{time-KDvJykag.js → time-CB0do-Ir.js} +1 -1
- package/dist/assets/{timeline-definition-BDJGKUSR-BVlS5McA.js → timeline-definition-BDJGKUSR-DI4tN8OK.js} +1 -1
- package/dist/assets/tracing-CY-0CYWT.js +2 -0
- package/dist/assets/{transform-Cyp0GDF-.js → transform-C4Tsj3kK.js} +1 -1
- package/dist/assets/tree-XU0wwiB1.js +17 -0
- package/dist/assets/vega-component-DCravt3R.js +1 -0
- package/dist/assets/worker-DIeMFpcF.js +1 -0
- package/dist/assets/{worker-DsmMBHp1.js → worker-s2VOegFx.js} +1 -1
- package/dist/assets/{xychartDiagram-VJFVF3MP-CFzyjXtl.js → xychartDiagram-VJFVF3MP-CgkGrrdl.js} +1 -1
- package/dist/index.html +3 -3
- package/package.json +25 -25
- package/dist/assets/ConnectedDataExplorerComponent-8OD1FdwV.js +0 -19
- package/dist/assets/VegaLite-CJ8ZZtWw.js +0 -189
- package/dist/assets/_baseEach-CJ7W4uUC.js +0 -1
- package/dist/assets/_baseMap-BV79rs_r.js +0 -1
- package/dist/assets/_baseUniq-Dzv6EahL.js +0 -1
- package/dist/assets/_createAggregator-CeUblBAd.js +0 -1
- package/dist/assets/architectureDiagram-IEHRJDOE-DOGGGbMB.js +0 -36
- package/dist/assets/channel-D_odheAy.js +0 -1
- package/dist/assets/classDiagram-GIVACNV2-By-StMx6.js +0 -1
- package/dist/assets/classDiagram-v2-COTLJTTW-By-StMx6.js +0 -1
- package/dist/assets/clone-fasN-xjz.js +0 -1
- package/dist/assets/compile-CRFg54ds.js +0 -10
- package/dist/assets/edit-page-BWupK_nr.js +0 -135
- package/dist/assets/home-page-Bf7NziFk.js +0 -9
- package/dist/assets/index-BqXWXM9d.css +0 -1
- package/dist/assets/index-D49WHb9g.js +0 -1
- package/dist/assets/index-WoeVJRsJ.js +0 -1
- package/dist/assets/index-eQwJLzCo.js +0 -498
- package/dist/assets/infoDiagram-PH2N3AL5-B0_iy_sQ.js +0 -2
- package/dist/assets/layout-Cj0BMe86.js +0 -1
- package/dist/assets/min-Ba8RlknH.js +0 -1
- package/dist/assets/mindmap-definition-ALO5MXBD-mpSrn2Pq.js +0 -95
- package/dist/assets/panels-CDGX6_Mp.js +0 -27
- package/dist/assets/run-page-5JsxsuAg.js +0 -1
- package/dist/assets/slides-component-DBLXmbc-.js +0 -1
- package/dist/assets/sortBy-Bn6QyK6h.js +0 -1
- package/dist/assets/stateDiagram-v2-YXO3MK2T-DjututGt.js +0 -1
- package/dist/assets/tracing-BJ-bXyI2.js +0 -2
- package/dist/assets/tree-C9afVSOF.js +0 -17
- package/dist/assets/vega-component-BH5oj_3J.js +0 -1
- package/dist/assets/worker-C9vrNVln.js +0 -1
- /package/dist/assets/{timer-DFzT7np-.js → timer-BI-lUAZ7.js} +0 -0
@@ -1,2 +0,0 @@
|
|
1
|
-
import{_ as a,l as e,I as s,d as p,K as n}from"./mermaid-DbkPEKV3.js";import{p as m}from"./radar-MK3ICKWK-CuZ1ruTv.js";import"./index-eQwJLzCo.js";import"./transform-Cyp0GDF-.js";import"./timer-DFzT7np-.js";import"./step-BwsUM5iJ.js";import"./_baseEach-CJ7W4uUC.js";import"./_baseUniq-Dzv6EahL.js";import"./min-Ba8RlknH.js";import"./_baseMap-BV79rs_r.js";import"./clone-fasN-xjz.js";import"./_createAggregator-CeUblBAd.js";var d={parse:a(async r=>{const t=await m("info",r);e.debug(t)},"parse")},g={version:n.version},v={parser:d,db:{getVersion:a(()=>g.version,"getVersion")},renderer:{draw:a((r,t,i)=>{e.debug(`rendering info diagram
|
2
|
-
`+r);const o=s(t);p(o,100,400,!0),o.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${i}`)},"draw")}};export{v as diagram};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{G as R}from"./graph-D7JGbee1.js";import{b as Cn,e as on,c as h,i as I,f as S,v as M,r as q}from"./_baseUniq-Dzv6EahL.js";import{b as an,a as Sn,m as k,c as G,h as un,f as J,l as Y,d as Gn}from"./min-Ba8RlknH.js";import{cl as Fn,bT as Vn,d6 as Bn,az as qn,d7 as Yn,c$ as zn,d8 as F,d9 as L,M as Dn,al as An,da as z,db as $}from"./index-eQwJLzCo.js";import{c as dn,a as cn}from"./_baseEach-CJ7W4uUC.js";import{s as V}from"./sortBy-Bn6QyK6h.js";function Jn(n,t){return n>t}function D(n,t){var r={};return t=cn(t),dn(n,function(u,a,c){Bn(r,a,t(u,a,c))}),r}function T(n){return n&&n.length?an(n,qn,Jn):void 0}function H(n,t){return n&&n.length?an(n,cn(t),Sn):void 0}var $n=0;function K(n){var t=++$n;return Yn(n)+t}class Hn{constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,r=t._prev;if(r!==t)return sn(r),r}enqueue(t){var r=this._sentinel;t._prev&&t._next&&sn(t),t._next=r._next,r._next._prev=t,r._next=t,t._prev=r}toString(){for(var t=[],r=this._sentinel,u=r._prev;u!==r;)t.push(JSON.stringify(u,Kn)),u=u._prev;return"["+t.join(", ")+"]"}}function sn(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function Kn(n,t){if(n!=="_next"&&n!=="_prev")return t}var Qn=Dn(1);function Un(n,t){if(n.nodeCount()<=1)return[];var r=function(a,c){var e=new R,i=0,o=0;h(a.nodes(),function(s){e.setNode(s,{v:s,in:0,out:0})}),h(a.edges(),function(s){var g=e.edge(s.v,s.w)||0,v=c(s),p=g+v;e.setEdge(s.v,s.w,p),o=Math.max(o,e.node(s.v).out+=v),i=Math.max(i,e.node(s.w).in+=v)});var d=L(o+i+3).map(function(){return new Hn}),f=i+1;return h(e.nodes(),function(s){U(d,f,e.node(s))}),{graph:e,buckets:d,zeroIdx:f}}(n,t||Qn),u=function(a,c,e){for(var i,o=[],d=c[c.length-1],f=c[0];a.nodeCount();){for(;i=f.dequeue();)Q(a,c,e,i);for(;i=d.dequeue();)Q(a,c,e,i);if(a.nodeCount()){for(var s=c.length-2;s>0;--s)if(i=c[s].dequeue()){o=o.concat(Q(a,c,e,i,!0));break}}}return o}(r.graph,r.buckets,r.zeroIdx);return F(k(u,function(a){return n.outEdges(a.v,a.w)}))}function Q(n,t,r,u,a){var c=a?[]:void 0;return h(n.inEdges(u.v),function(e){var i=n.edge(e),o=n.node(e.v);a&&c.push({v:e.v,w:e.w}),o.out-=i,U(t,r,o)}),h(n.outEdges(u.v),function(e){var i=n.edge(e),o=e.w,d=n.node(o);d.in-=i,U(t,r,d)}),n.removeNode(u.v),c}function U(n,t,r){r.out?r.in?n[r.out-r.in+t].enqueue(r):n[n.length-1].enqueue(r):n[0].enqueue(r)}function Wn(n){var t=n.graph().acyclicer==="greedy"?Un(n,function(r){return function(u){return r.edge(u).weight}}(n)):function(r){var u=[],a={},c={};function e(i){Object.prototype.hasOwnProperty.call(c,i)||(c[i]=!0,a[i]=!0,h(r.outEdges(i),function(o){Object.prototype.hasOwnProperty.call(a,o.w)?u.push(o):e(o.w)}),delete a[i])}return h(r.nodes(),e),u}(n);h(t,function(r){var u=n.edge(r);n.removeEdge(r),u.forwardName=r.name,u.reversed=!0,n.setEdge(r.w,r.v,u,K("rev"))})}function C(n,t,r,u){var a;do a=K(u);while(n.hasNode(a));return r.dummy=t,n.setNode(a,r),a}function fn(n){var t=new R({multigraph:n.isMultigraph()}).setGraph(n.graph());return h(n.nodes(),function(r){n.children(r).length||t.setNode(r,n.node(r))}),h(n.edges(),function(r){t.setEdge(r,n.edge(r))}),t}function hn(n,t){var r,u,a=n.x,c=n.y,e=t.x-a,i=t.y-c,o=n.width/2,d=n.height/2;if(!e&&!i)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(i)*o>Math.abs(e)*d?(i<0&&(d=-d),r=d*e/i,u=d):(e<0&&(o=-o),r=o,u=o*i/e),{x:a+r,y:c+u}}function A(n){var t=k(L(vn(n)+1),function(){return[]});return h(n.nodes(),function(r){var u=n.node(r),a=u.rank;I(a)||(t[a][u.order]=r)}),t}function gn(n,t,r,u){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=u),C(n,"border",a,t)}function vn(n){return T(k(n.nodes(),function(t){var r=n.node(t).rank;if(!I(r))return r}))}function Xn(n,t){return t()}function ln(n,t,r,u,a,c){var e={width:0,height:0,rank:c,borderType:t},i=a[t][c-1],o=C(n,"border",e,r);a[t][c]=o,n.setParent(o,u),i&&n.setEdge(i,o,{weight:1})}function Zn(n){var t=n.graph().rankdir.toLowerCase();t!=="bt"&&t!=="rl"||function(r){h(r.nodes(),function(u){W(r.node(u))}),h(r.edges(),function(u){var a=r.edge(u);h(a.points,W),Object.prototype.hasOwnProperty.call(a,"y")&&W(a)})}(n),t!=="lr"&&t!=="rl"||(function(r){h(r.nodes(),function(u){X(r.node(u))}),h(r.edges(),function(u){var a=r.edge(u);h(a.points,X),Object.prototype.hasOwnProperty.call(a,"x")&&X(a)})}(n),pn(n))}function pn(n){h(n.nodes(),function(t){wn(n.node(t))}),h(n.edges(),function(t){wn(n.edge(t))})}function wn(n){var t=n.width;n.width=n.height,n.height=t}function W(n){n.y=-n.y}function X(n){var t=n.x;n.x=n.y,n.y=t}function ne(n){n.graph().dummyChains=[],h(n.edges(),function(t){(function(r,u){var a=u.v,c=r.node(a).rank,e=u.w,i=r.node(e).rank,o=u.name,d=r.edge(u),f=d.labelRank;if(i!==c+1){r.removeEdge(u);var s,g,v=void 0;for(g=0,++c;c<i;++g,++c)d.points=[],s=C(r,"edge",v={width:0,height:0,edgeLabel:d,edgeObj:u,rank:c},"_d"),c===f&&(v.width=d.width,v.height=d.height,v.dummy="edge-label",v.labelpos=d.labelpos),r.setEdge(a,s,{weight:d.weight},o),g===0&&r.graph().dummyChains.push(s),a=s;r.setEdge(a,e,{weight:d.weight},o)}})(n,t)})}function Z(n){var t={};h(n.sources(),function r(u){var a=n.node(u);if(Object.prototype.hasOwnProperty.call(t,u))return a.rank;t[u]=!0;var c=G(k(n.outEdges(u),function(e){return r(e.w)-n.edge(e).minlen}));return c!==Number.POSITIVE_INFINITY&&c!=null||(c=0),a.rank=c})}function B(n,t){return n.node(t.w).rank-n.node(t.v).rank-n.edge(t).minlen}function mn(n){var t,r,u=new R({directed:!1}),a=n.nodes()[0],c=n.nodeCount();for(u.setNode(a,{});ee(u,n)<c;)t=re(u,n),r=u.hasNode(t.v)?B(n,t):-B(n,t),te(u,n,r);return u}function ee(n,t){return h(n.nodes(),function r(u){h(t.nodeEdges(u),function(a){var c=a.v,e=u===c?a.w:c;n.hasNode(e)||B(t,a)||(n.setNode(e,{}),n.setEdge(u,e,{}),r(e))})}),n.nodeCount()}function re(n,t){return H(t.edges(),function(r){if(n.hasNode(r.v)!==n.hasNode(r.w))return B(t,r)})}function te(n,t,r){h(n.nodes(),function(u){t.node(u).rank+=r})}function bn(n,t,r){An(t)||(t=[t]);var u=(n.isDirected()?n.successors:n.neighbors).bind(n),a=[],c={};return h(t,function(e){if(!n.hasNode(e))throw new Error("Graph does not have node: "+e);yn(n,e,r==="post",c,u,a)}),a}function yn(n,t,r,u,a,c){Object.prototype.hasOwnProperty.call(u,t)||(u[t]=!0,r||c.push(t),h(a(t),function(e){yn(n,e,r,u,a,c)}),r&&c.push(t))}function j(n){n=function(u){var a=new R().setGraph(u.graph());return h(u.nodes(),function(c){a.setNode(c,u.node(c))}),h(u.edges(),function(c){var e=a.edge(c.v,c.w)||{weight:0,minlen:1},i=u.edge(c);a.setEdge(c.v,c.w,{weight:e.weight+i.weight,minlen:Math.max(e.minlen,i.minlen)})}),a}(n),Z(n);var t,r=mn(n);for(en(r),nn(r,n);t=En(r);)On(r,n,t,Nn(r,n,t))}function nn(n,t){var r=function(u,a){return bn(u,a,"post")}(n,n.nodes());r=r.slice(0,r.length-1),h(r,function(u){(function(a,c,e){var i=a.node(e),o=i.parent;a.edge(e,o).cutvalue=xn(a,c,e)})(n,t,u)})}function xn(n,t,r){var u=n.node(r).parent,a=!0,c=t.edge(r,u),e=0;return c||(a=!1,c=t.edge(u,r)),e=c.weight,h(t.nodeEdges(r),function(i){var o,d,f=i.v===r,s=f?i.w:i.v;if(s!==u){var g=f===a,v=t.edge(i).weight;if(e+=g?v:-v,o=r,d=s,n.hasEdge(o,d)){var p=n.edge(r,s).cutvalue;e+=g?-p:p}}}),e}function en(n,t){arguments.length<2&&(t=n.nodes()[0]),kn(n,{},1,t)}function kn(n,t,r,u,a){var c=r,e=n.node(u);return t[u]=!0,h(n.neighbors(u),function(i){Object.prototype.hasOwnProperty.call(t,i)||(r=kn(n,t,r,i,u))}),e.low=c,e.lim=r++,a?e.parent=a:delete e.parent,r}function En(n){return J(n.edges(),function(t){return n.edge(t).cutvalue<0})}function Nn(n,t,r){var u=r.v,a=r.w;t.hasEdge(u,a)||(u=r.w,a=r.v);var c=n.node(u),e=n.node(a),i=c,o=!1;c.lim>e.lim&&(i=e,o=!0);var d=S(t.edges(),function(f){return o===_n(n,n.node(f.v),i)&&o!==_n(n,n.node(f.w),i)});return H(d,function(f){return B(t,f)})}function On(n,t,r,u){var a=r.v,c=r.w;n.removeEdge(a,c),n.setEdge(u.v,u.w,{}),en(n),nn(n,t),function(e,i){var o=J(e.nodes(),function(f){return!i.node(f).parent}),d=function(f,s){return bn(f,s,"pre")}(e,o);d=d.slice(1),h(d,function(f){var s=e.node(f).parent,g=i.edge(f,s),v=!1;g||(g=i.edge(s,f),v=!0),i.node(f).rank=i.node(s).rank+(v?g.minlen:-g.minlen)})}(n,t)}function _n(n,t,r){return r.low<=t.lim&&t.lim<=r.lim}function oe(n){switch(n.graph().ranker){case"network-simplex":default:ae(n);break;case"tight-tree":(function(t){Z(t),mn(t)})(n);break;case"longest-path":ie(n)}}new Error,j.initLowLimValues=en,j.initCutValues=nn,j.calcCutValue=xn,j.leaveEdge=En,j.enterEdge=Nn,j.exchangeEdges=On;var ie=Z;function ae(n){j(n)}function ue(n){var t=C(n,"root",{},"_root"),r=function(e){var i={};function o(d,f){var s=e.children(d);s&&s.length&&h(s,function(g){o(g,f+1)}),i[d]=f}return h(e.children(),function(d){o(d,1)}),i}(n),u=T(M(r))-1,a=2*u+1;n.graph().nestingRoot=t,h(n.edges(),function(e){n.edge(e).minlen*=a});var c=function(e){return q(e.edges(),function(i,o){return i+e.edge(o).weight},0)}(n)+1;h(n.children(),function(e){In(n,t,a,c,u,r,e)}),n.graph().nodeRankFactor=a}function In(n,t,r,u,a,c,e){var i=n.children(e);if(i.length){var o=gn(n,"_bt"),d=gn(n,"_bb"),f=n.node(e);n.setParent(o,e),f.borderTop=o,n.setParent(d,e),f.borderBottom=d,h(i,function(s){In(n,t,r,u,a,c,s);var g=n.node(s),v=g.borderTop?g.borderTop:s,p=g.borderBottom?g.borderBottom:s,w=g.borderTop?u:2*u,l=v!==p?1:a-c[e]+1;n.setEdge(o,v,{weight:w,minlen:l,nestingEdge:!0}),n.setEdge(p,d,{weight:w,minlen:l,nestingEdge:!0})}),n.parent(e)||n.setEdge(t,o,{weight:0,minlen:a+c[e]})}else e!==t&&n.setEdge(t,e,{weight:0,minlen:r})}function de(n,t,r){var u=function(c){for(var e;c.hasNode(e=K("_root")););return e}(n),a=new R({compound:!0}).setGraph({root:u}).setDefaultNodeLabel(function(c){return n.node(c)});return h(n.nodes(),function(c){var e=n.node(c),i=n.parent(c);(e.rank===t||e.minRank<=t&&t<=e.maxRank)&&(a.setNode(c),a.setParent(c,i||u),h(n[r](c),function(o){var d=o.v===c?o.w:o.v,f=a.edge(d,c),s=I(f)?0:f.weight;a.setEdge(d,c,{weight:n.edge(o).weight+s})}),Object.prototype.hasOwnProperty.call(e,"minRank")&&a.setNode(c,{borderLeft:e.borderLeft[t],borderRight:e.borderRight[t]}))}),a}function ce(n,t){for(var r=0,u=1;u<t.length;++u)r+=se(n,t[u-1],t[u]);return r}function se(n,t,r){for(var u=function(d,f){return function(s,g,v){for(var p=-1,w=s.length,l=g.length,m={};++p<w;){var b=p<l?g[p]:void 0;v(m,s[p],b)}return m}(d||[],f||[],zn)}(r,k(r,function(d,f){return f})),a=F(k(t,function(d){return V(k(n.outEdges(d),function(f){return{pos:u[f.w],weight:n.edge(f).weight}}),"pos")})),c=1;c<r.length;)c<<=1;var e=2*c-1;c-=1;var i=k(new Array(e),function(){return 0}),o=0;return h(a.forEach(function(d){var f=d.pos+c;i[f]+=d.weight;for(var s=0;f>0;)f%2&&(s+=i[f+1]),i[f=f-1>>1]+=d.weight;o+=d.weight*s})),o}function fe(n,t){var r={};return h(n,function(u,a){var c=r[u.v]={indegree:0,in:[],out:[],vs:[u.v],i:a};I(u.barycenter)||(c.barycenter=u.barycenter,c.weight=u.weight)}),h(t.edges(),function(u){var a=r[u.v],c=r[u.w];I(a)||I(c)||(c.indegree++,a.out.push(r[u.w]))}),function(u){var a=[];function c(o){return function(d){d.merged||(I(d.barycenter)||I(o.barycenter)||d.barycenter>=o.barycenter)&&function(f,s){var g=0,v=0;f.weight&&(g+=f.barycenter*f.weight,v+=f.weight),s.weight&&(g+=s.barycenter*s.weight,v+=s.weight),f.vs=s.vs.concat(f.vs),f.barycenter=g/v,f.weight=v,f.i=Math.min(s.i,f.i),s.merged=!0}(o,d)}}function e(o){return function(d){d.in.push(o),--d.indegree==0&&u.push(d)}}for(;u.length;){var i=u.pop();a.push(i),h(i.in.reverse(),c(i)),h(i.out,e(i))}return k(S(a,function(o){return!o.merged}),function(o){return z(o,["vs","i","barycenter","weight"])})}(S(r,function(u){return!u.indegree}))}function he(n,t){var r,u=function(s,g){var v={lhs:[],rhs:[]};return h(s,function(p){g(p)?v.lhs.push(p):v.rhs.push(p)}),v}(n,function(s){return Object.prototype.hasOwnProperty.call(s,"barycenter")}),a=u.lhs,c=V(u.rhs,function(s){return-s.i}),e=[],i=0,o=0,d=0;a.sort((r=!!t,function(s,g){return s.barycenter<g.barycenter?-1:s.barycenter>g.barycenter?1:r?g.i-s.i:s.i-g.i})),d=Pn(e,c,d),h(a,function(s){d+=s.vs.length,e.push(s.vs),i+=s.barycenter*s.weight,o+=s.weight,d=Pn(e,c,d)});var f={vs:F(e)};return o&&(f.barycenter=i/o,f.weight=o),f}function Pn(n,t,r){for(var u;t.length&&(u=Y(t)).i<=r;)t.pop(),n.push(u.vs),r++;return r}function Rn(n,t,r,u){var a=n.children(t),c=n.node(t),e=c?c.borderLeft:void 0,i=c?c.borderRight:void 0,o={};e&&(a=S(a,function(p){return p!==e&&p!==i}));var d=function(p,w){return k(w,function(l){var m=p.inEdges(l);if(m.length){var b=q(m,function(y,x){var O=p.edge(x),E=p.node(x.v);return{sum:y.sum+O.weight*E.order,weight:y.weight+O.weight}},{sum:0,weight:0});return{v:l,barycenter:b.sum/b.weight,weight:b.weight}}return{v:l}})}(n,a);h(d,function(p){if(n.children(p.v).length){var w=Rn(n,p.v,r,u);o[p.v]=w,Object.prototype.hasOwnProperty.call(w,"barycenter")&&(m=w,I((l=p).barycenter)?(l.barycenter=m.barycenter,l.weight=m.weight):(l.barycenter=(l.barycenter*l.weight+m.barycenter*m.weight)/(l.weight+m.weight),l.weight+=m.weight))}var l,m});var f=fe(d,r);(function(p,w){h(p,function(l){l.vs=F(l.vs.map(function(m){return w[m]?w[m].vs:m}))})})(f,o);var s=he(f,u);if(e&&(s.vs=F([e,s.vs,i]),n.predecessors(e).length)){var g=n.node(n.predecessors(e)[0]),v=n.node(n.predecessors(i)[0]);Object.prototype.hasOwnProperty.call(s,"barycenter")||(s.barycenter=0,s.weight=0),s.barycenter=(s.barycenter*s.weight+g.order+v.order)/(s.weight+2),s.weight+=2}return s}function ge(n){var t=vn(n),r=Tn(n,L(1,t+1),"inEdges"),u=Tn(n,L(t-1,-1,-1),"outEdges"),a=function(f){var s={},g=S(f.nodes(),function(l){return!f.children(l).length}),v=T(k(g,function(l){return f.node(l).rank})),p=k(L(v+1),function(){return[]}),w=V(g,function(l){return f.node(l).rank});return h(w,function l(m){if(!un(s,m)){s[m]=!0;var b=f.node(m);p[b.rank].push(m),h(f.successors(m),l)}}),p}(n);jn(n,a);for(var c,e=Number.POSITIVE_INFINITY,i=0,o=0;o<4;++i,++o){ve(i%2?r:u,i%4>=2);var d=ce(n,a=A(n));d<e&&(o=0,c=Cn(a,5),e=d)}jn(n,c)}function Tn(n,t,r){return k(t,function(u){return de(n,u,r)})}function ve(n,t){var r=new R;h(n,function(u){var a=u.graph().root,c=Rn(u,a,r,t);h(c.vs,function(e,i){u.node(e).order=i}),function(e,i,o){var d,f={};h(o,function(s){for(var g,v,p=e.parent(s);p;){if((g=e.parent(p))?(v=f[g],f[g]=p):(v=d,d=p),v&&v!==p)return void i.setEdge(v,p);p=g}})}(u,r,c.vs)})}function jn(n,t){h(t,function(r){h(r,function(u,a){n.node(u).order=a})})}function le(n){var t=function(r){var u={},a=0;function c(e){var i=a;h(r.children(e),c),u[e]={low:i,lim:a++}}return h(r.children(),c),u}(n);h(n.graph().dummyChains,function(r){for(var u=n.node(r),a=u.edgeObj,c=function(s,g,v,p){var w,l,m=[],b=[],y=Math.min(g[v].low,g[p].low),x=Math.max(g[v].lim,g[p].lim);w=v;do w=s.parent(w),m.push(w);while(w&&(g[w].low>y||x>g[w].lim));for(l=w,w=p;(w=s.parent(w))!==l;)b.push(w);return{path:m.concat(b.reverse()),lca:l}}(n,t,a.v,a.w),e=c.path,i=c.lca,o=0,d=e[o],f=!0;r!==a.w;){if(u=n.node(r),f){for(;(d=e[o])!==i&&n.node(d).maxRank<u.rank;)o++;d===i&&(f=!1)}if(!f){for(;o<e.length-1&&n.node(d=e[o+1]).minRank<=u.rank;)o++;d=e[o]}n.setParent(r,d),r=n.successors(r)[0]}})}function pe(n,t){var r={};return q(t,function(u,a){var c=0,e=0,i=u.length,o=Y(a);return h(a,function(d,f){var s=function(v,p){if(v.node(p).dummy)return J(v.predecessors(p),function(w){return v.node(w).dummy})}(n,d),g=s?n.node(s).order:i;(s||d===o)&&(h(a.slice(e,f+1),function(v){h(n.predecessors(v),function(p){var w=n.node(p),l=w.order;!(l<c||g<l)||w.dummy&&n.node(v).dummy||Mn(r,p,v)})}),e=f+1,c=g)}),a}),r}function Mn(n,t,r){if(t>r){var u=t;t=r,r=u}var a=n[t];a||(n[t]=a={}),a[r]=!0}function we(n,t,r){if(t>r){var u=t;t=r,r=u}return!!n[t]&&Object.prototype.hasOwnProperty.call(n[t],r)}function me(n,t,r,u,a){var c={},e=function(d,f,s,g){var v=new R,p=d.graph(),w=function(l,m,b){return function(y,x,O){var E,_=y.node(x),P=y.node(O),N=0;if(N+=_.width/2,Object.prototype.hasOwnProperty.call(_,"labelpos"))switch(_.labelpos.toLowerCase()){case"l":E=-_.width/2;break;case"r":E=_.width/2}if(E&&(N+=b?E:-E),E=0,N+=(_.dummy?m:l)/2,N+=(P.dummy?m:l)/2,N+=P.width/2,Object.prototype.hasOwnProperty.call(P,"labelpos"))switch(P.labelpos.toLowerCase()){case"l":E=P.width/2;break;case"r":E=-P.width/2}return E&&(N+=b?E:-E),E=0,N}}(p.nodesep,p.edgesep,g);return h(f,function(l){var m;h(l,function(b){var y=s[b];if(v.setNode(y),m){var x=s[m],O=v.edge(x,y);v.setEdge(x,y,Math.max(w(d,b,m),O||0))}m=b})}),v}(n,t,r,a),i=a?"borderLeft":"borderRight";function o(d,f){for(var s=e.nodes(),g=s.pop(),v={};g;)v[g]?d(g):(v[g]=!0,s.push(g),s=s.concat(f(g))),g=s.pop()}return o(function(d){c[d]=e.inEdges(d).reduce(function(f,s){return Math.max(f,c[s.v]+e.edge(s))},0)},e.predecessors.bind(e)),o(function(d){var f=e.outEdges(d).reduce(function(g,v){return Math.min(g,c[v.w]-e.edge(v))},Number.POSITIVE_INFINITY),s=n.node(d);f!==Number.POSITIVE_INFINITY&&s.borderType!==i&&(c[d]=Math.max(c[d],f))},e.successors.bind(e)),h(u,function(d){c[d]=c[r[d]]}),c}function be(n,t){return H(M(t),function(r){var u,a,c=Number.NEGATIVE_INFINITY,e=Number.POSITIVE_INFINITY;return a=function(i,o){var d=function(f,s){return f.node(s).width}(n,o)/2;c=Math.max(i+d,c),e=Math.min(i-d,e)},(u=r)==null||Fn(u,on(a),Vn),c-e})}function ye(n){var t,r=A(n),u=$(pe(n,r),function(e,i){var o={};function d(f,s,g,v,p){var w;h(L(s,g),function(l){w=f[l],e.node(w).dummy&&h(e.predecessors(w),function(m){var b=e.node(m);b.dummy&&(b.order<v||b.order>p)&&Mn(o,m,w)})})}return q(i,function(f,s){var g,v=-1,p=0;return h(s,function(w,l){if(e.node(w).dummy==="border"){var m=e.predecessors(w);m.length&&(g=e.node(m[0]).order,d(s,p,l,v,g),p=l,v=g)}d(s,p,s.length,g,f.length)}),s}),o}(n,r)),a={};h(["u","d"],function(e){t=e==="u"?r:M(r).reverse(),h(["l","r"],function(i){i==="r"&&(t=k(t,function(s){return M(s).reverse()}));var o=(e==="u"?n.predecessors:n.successors).bind(n),d=function(s,g,v,p){var w={},l={},m={};return h(g,function(b){h(b,function(y,x){w[y]=y,l[y]=y,m[y]=x})}),h(g,function(b){var y=-1;h(b,function(x){var O=p(x);if(O.length){O=V(O,function(Ln){return m[Ln]});for(var E=(O.length-1)/2,_=Math.floor(E),P=Math.ceil(E);_<=P;++_){var N=O[_];l[x]===x&&y<m[N]&&!we(v,x,N)&&(l[N]=x,l[x]=w[x]=w[N],y=m[N])}}})}),{root:w,align:l}}(0,t,u,o),f=me(n,t,d.root,d.align,i==="r");i==="r"&&(f=D(f,function(s){return-s})),a[e+i]=f})});var c=be(n,a);return function(e,i){var o=M(i),d=G(o),f=T(o);h(["u","d"],function(s){h(["l","r"],function(g){var v,p=s+g,w=e[p];if(w!==i){var l=M(w);(v=g==="l"?d-G(l):f-T(l))&&(e[p]=D(w,function(m){return m+v}))}})})}(a,c),function(e,i){return D(e.ul,function(o,d){if(i)return e[i.toLowerCase()][d];var f=V(k(e,d));return(f[1]+f[2])/2})}(a,n.graph().align)}function xe(n){var t,r;(function(u){var a=A(u),c=u.graph().ranksep,e=0;h(a,function(i){var o=T(k(i,function(d){return u.node(d).height}));h(i,function(d){u.node(d).y=e+o/2}),e+=o+c})})(n=fn(n)),t=ye(n),r=function(u,a){n.node(a).x=u},t&&dn(t,on(r))}function ke(n,t){var r=Xn;r("layout",()=>{var u=r(" buildLayoutGraph",()=>function(a){var c=new R({multigraph:!0,compound:!0}),e=tn(a.graph());return c.setGraph($({},Ne,rn(e,Ee),z(e,Oe))),h(a.nodes(),function(i){var o=tn(a.node(i));c.setNode(i,Gn(rn(o,_e),Ie)),c.setParent(i,a.parent(i))}),h(a.edges(),function(i){var o=tn(a.edge(i));c.setEdge(i,$({},Re,rn(o,Pe),z(o,Te)))}),c}(n));r(" runLayout",()=>function(a,c){c(" makeSpaceForEdgeLabels",()=>function(e){var i=e.graph();i.ranksep/=2,h(e.edges(),function(o){var d=e.edge(o);d.minlen*=2,d.labelpos.toLowerCase()!=="c"&&(i.rankdir==="TB"||i.rankdir==="BT"?d.width+=d.labeloffset:d.height+=d.labeloffset)})}(a)),c(" removeSelfEdges",()=>function(e){h(e.edges(),function(i){if(i.v===i.w){var o=e.node(i.v);o.selfEdges||(o.selfEdges=[]),o.selfEdges.push({e:i,label:e.edge(i)}),e.removeEdge(i)}})}(a)),c(" acyclic",()=>Wn(a)),c(" nestingGraph.run",()=>ue(a)),c(" rank",()=>oe(fn(a))),c(" injectEdgeLabelProxies",()=>function(e){h(e.edges(),function(i){var o=e.edge(i);if(o.width&&o.height){var d=e.node(i.v),f={rank:(e.node(i.w).rank-d.rank)/2+d.rank,e:i};C(e,"edge-proxy",f,"_ep")}})}(a)),c(" removeEmptyRanks",()=>function(e){var i=G(k(e.nodes(),function(s){return e.node(s).rank})),o=[];h(e.nodes(),function(s){var g=e.node(s).rank-i;o[g]||(o[g]=[]),o[g].push(s)});var d=0,f=e.graph().nodeRankFactor;h(o,function(s,g){I(s)&&g%f!=0?--d:d&&h(s,function(v){e.node(v).rank+=d})})}(a)),c(" nestingGraph.cleanup",()=>function(e){var i=e.graph();e.removeNode(i.nestingRoot),delete i.nestingRoot,h(e.edges(),function(o){e.edge(o).nestingEdge&&e.removeEdge(o)})}(a)),c(" normalizeRanks",()=>function(e){var i=G(k(e.nodes(),function(o){return e.node(o).rank}));h(e.nodes(),function(o){var d=e.node(o);un(d,"rank")&&(d.rank-=i)})}(a)),c(" assignRankMinMax",()=>function(e){var i=0;h(e.nodes(),function(o){var d=e.node(o);d.borderTop&&(d.minRank=e.node(d.borderTop).rank,d.maxRank=e.node(d.borderBottom).rank,i=T(i,d.maxRank))}),e.graph().maxRank=i}(a)),c(" removeEdgeLabelProxies",()=>function(e){h(e.nodes(),function(i){var o=e.node(i);o.dummy==="edge-proxy"&&(e.edge(o.e).labelRank=o.rank,e.removeNode(i))})}(a)),c(" normalize.run",()=>ne(a)),c(" parentDummyChains",()=>le(a)),c(" addBorderSegments",()=>function(e){h(e.children(),function i(o){var d=e.children(o),f=e.node(o);if(d.length&&h(d,i),Object.prototype.hasOwnProperty.call(f,"minRank")){f.borderLeft=[],f.borderRight=[];for(var s=f.minRank,g=f.maxRank+1;s<g;++s)ln(e,"borderLeft","_bl",o,f,s),ln(e,"borderRight","_br",o,f,s)}})}(a)),c(" order",()=>ge(a)),c(" insertSelfEdges",()=>function(e){var i=A(e);h(i,function(o){var d=0;h(o,function(f,s){var g=e.node(f);g.order=s+d,h(g.selfEdges,function(v){C(e,"selfedge",{width:v.label.width,height:v.label.height,rank:g.rank,order:s+ ++d,e:v.e,label:v.label},"_se")}),delete g.selfEdges})})}(a)),c(" adjustCoordinateSystem",()=>function(e){var i=e.graph().rankdir.toLowerCase();i!=="lr"&&i!=="rl"||pn(e)}(a)),c(" position",()=>xe(a)),c(" positionSelfEdges",()=>function(e){h(e.nodes(),function(i){var o=e.node(i);if(o.dummy==="selfedge"){var d=e.node(o.e.v),f=d.x+d.width/2,s=d.y,g=o.x-f,v=d.height/2;e.setEdge(o.e,o.label),e.removeNode(i),o.label.points=[{x:f+2*g/3,y:s-v},{x:f+5*g/6,y:s-v},{x:f+g,y:s},{x:f+5*g/6,y:s+v},{x:f+2*g/3,y:s+v}],o.label.x=o.x,o.label.y=o.y}})}(a)),c(" removeBorderNodes",()=>function(e){h(e.nodes(),function(i){if(e.children(i).length){var o=e.node(i),d=e.node(o.borderTop),f=e.node(o.borderBottom),s=e.node(Y(o.borderLeft)),g=e.node(Y(o.borderRight));o.width=Math.abs(g.x-s.x),o.height=Math.abs(f.y-d.y),o.x=s.x+o.width/2,o.y=d.y+o.height/2}}),h(e.nodes(),function(i){e.node(i).dummy==="border"&&e.removeNode(i)})}(a)),c(" normalize.undo",()=>function(e){h(e.graph().dummyChains,function(i){var o,d=e.node(i),f=d.edgeLabel;for(e.setEdge(d.edgeObj,f);d.dummy;)o=e.successors(i)[0],e.removeNode(i),f.points.push({x:d.x,y:d.y}),d.dummy==="edge-label"&&(f.x=d.x,f.y=d.y,f.width=d.width,f.height=d.height),i=o,d=e.node(i)})}(a)),c(" fixupEdgeLabelCoords",()=>function(e){h(e.edges(),function(i){var o=e.edge(i);if(Object.prototype.hasOwnProperty.call(o,"x"))switch(o.labelpos!=="l"&&o.labelpos!=="r"||(o.width-=o.labeloffset),o.labelpos){case"l":o.x-=o.width/2+o.labeloffset;break;case"r":o.x+=o.width/2+o.labeloffset}})}(a)),c(" undoCoordinateSystem",()=>Zn(a)),c(" translateGraph",()=>function(e){var i=Number.POSITIVE_INFINITY,o=0,d=Number.POSITIVE_INFINITY,f=0,s=e.graph(),g=s.marginx||0,v=s.marginy||0;function p(w){var l=w.x,m=w.y,b=w.width,y=w.height;i=Math.min(i,l-b/2),o=Math.max(o,l+b/2),d=Math.min(d,m-y/2),f=Math.max(f,m+y/2)}h(e.nodes(),function(w){p(e.node(w))}),h(e.edges(),function(w){var l=e.edge(w);Object.prototype.hasOwnProperty.call(l,"x")&&p(l)}),i-=g,d-=v,h(e.nodes(),function(w){var l=e.node(w);l.x-=i,l.y-=d}),h(e.edges(),function(w){var l=e.edge(w);h(l.points,function(m){m.x-=i,m.y-=d}),Object.prototype.hasOwnProperty.call(l,"x")&&(l.x-=i),Object.prototype.hasOwnProperty.call(l,"y")&&(l.y-=d)}),s.width=o-i+g,s.height=f-d+v}(a)),c(" assignNodeIntersects",()=>function(e){h(e.edges(),function(i){var o,d,f=e.edge(i),s=e.node(i.v),g=e.node(i.w);f.points?(o=f.points[0],d=f.points[f.points.length-1]):(f.points=[],o=g,d=s),f.points.unshift(hn(s,o)),f.points.push(hn(g,d))})}(a)),c(" reversePoints",()=>function(e){h(e.edges(),function(i){var o=e.edge(i);o.reversed&&o.points.reverse()})}(a)),c(" acyclic.undo",()=>function(e){h(e.edges(),function(i){var o=e.edge(i);if(o.reversed){e.removeEdge(i);var d=o.forwardName;delete o.reversed,delete o.forwardName,e.setEdge(i.w,i.v,o,d)}})}(a))}(u,r)),r(" updateInputGraph",()=>function(a,c){h(a.nodes(),function(e){var i=a.node(e),o=c.node(e);i&&(i.x=o.x,i.y=o.y,c.children(e).length&&(i.width=o.width,i.height=o.height))}),h(a.edges(),function(e){var i=a.edge(e),o=c.edge(e);i.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(i.x=o.x,i.y=o.y)}),a.graph().width=c.graph().width,a.graph().height=c.graph().height}(n,u))})}var Ee=["nodesep","edgesep","ranksep","marginx","marginy"],Ne={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Oe=["acyclicer","ranker","rankdir","align"],_e=["width","height"],Ie={width:0,height:0},Pe=["minlen","weight","width","height","labeloffset"],Re={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Te=["labelpos"];function rn(n,t){return D(z(n,t),Number)}function tn(n){var t={};return h(n,function(r,u){t[u.toLowerCase()]=r}),t}export{ke as l};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{H as b,aB as d,bT as g,bU as O,x as j,P as x,bV as y,ax as w,al as P,bW as M,aw as T,az as U}from"./index-eQwJLzCo.js";import{a as v}from"./_baseEach-CJ7W4uUC.js";import{d as z}from"./_baseUniq-Dzv6EahL.js";import{b as B}from"./_baseMap-BV79rs_r.js";var c=Object.prototype,H=c.hasOwnProperty,V=b(function(a,n){a=Object(a);var u=-1,t=n.length,r=t>2?n[2]:void 0;for(r&&d(n[0],n[1],r)&&(t=1);++u<t;)for(var s=n[u],o=g(s),i=-1,e=o.length;++i<e;){var l=o[i],f=a[l];(f===void 0||O(f,c[l])&&!H.call(a,l))&&(a[l]=s[l])}return a});function W(a){var n=a==null?0:a.length;return n?a[n-1]:void 0}var _=Math.max,p,k=(p=function(a,n,u){var t=a==null?0:a.length;if(!t)return-1;var r=u==null?0:y(u);return r<0&&(r=_(t+r,0)),z(a,v(n),r)},function(a,n,u){var t=Object(a);if(!j(a)){var r=v(n);a=x(a),n=function(o){return r(t[o],o,t)}}var s=p(a,n,u);return s>-1?t[r?a[s]:s]:void 0});function q(a,n){return(P(a)?w:B)(a,v(n))}var A=Object.prototype.hasOwnProperty;function C(a,n){return a!=null&&A.call(a,n)}function D(a,n){return a!=null&&M(a,n,C)}function h(a,n){return a<n}function m(a,n,u){for(var t=-1,r=a.length;++t<r;){var s=a[t],o=n(s);if(o!=null&&(i===void 0?o==o&&!T(o):u(o,i)))var i=o,e=s}return e}function E(a){return a&&a.length?m(a,U,h):void 0}export{h as a,m as b,E as c,V as d,k as f,D as h,W as l,q as m};
|
@@ -1,95 +0,0 @@
|
|
1
|
-
import{_ as x,l as j,c as J,I as mt,S as _t,G as Q,h as K,T as vt,V as Nt,W as At,a3 as Tt,O as Lt}from"./mermaid-DbkPEKV3.js";import{c as ot}from"./cytoscape.esm-C5gjFiAL.js";import{y as Ot}from"./index-eQwJLzCo.js";import{s as Dt}from"./transform-Cyp0GDF-.js";import"./step-BwsUM5iJ.js";import"./timer-DFzT7np-.js";var st,at={exports:{}},ht={exports:{}},lt={exports:{}};function It(){return st?lt.exports:(st=1,N=function(){return function(A){var f={};function p(e){if(f[e])return f[e].exports;var t=f[e]={i:e,l:!1,exports:{}};return A[e].call(t.exports,t,t.exports,p),t.l=!0,t.exports}return p.m=A,p.c=f,p.i=function(e){return e},p.d=function(e,t,i){p.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},p.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(t,"a",t),t},p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p.p="",p(p.s=26)}([function(A,f,p){function e(){}e.QUALITY=1,e.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,e.DEFAULT_INCREMENTAL=!1,e.DEFAULT_ANIMATION_ON_LAYOUT=!0,e.DEFAULT_ANIMATION_DURING_LAYOUT=!1,e.DEFAULT_ANIMATION_PERIOD=50,e.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,e.DEFAULT_GRAPH_MARGIN=15,e.NODE_DIMENSIONS_INCLUDE_LABELS=!1,e.SIMPLE_NODE_SIZE=40,e.SIMPLE_NODE_HALF_SIZE=e.SIMPLE_NODE_SIZE/2,e.EMPTY_COMPOUND_NODE_SIZE=40,e.MIN_EDGE_LENGTH=1,e.WORLD_BOUNDARY=1e6,e.INITIAL_WORLD_BOUNDARY=e.WORLD_BOUNDARY/1e3,e.WORLD_CENTER_X=1200,e.WORLD_CENTER_Y=900,A.exports=e},function(A,f,p){var e=p(2),t=p(8),i=p(9);function r(o,h,a){e.call(this,a),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=a,this.bendpoints=[],this.source=o,this.target=h}for(var n in r.prototype=Object.create(e.prototype),e)r[n]=e[n];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(o){if(this.source===o)return this.target;if(this.target===o)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(o,h){for(var a=this.getOtherEnd(o),l=h.getGraphManager().getRoot();;){if(a.getOwner()==h)return a;if(a.getOwner()==l)break;a=a.getOwner().getParent()}return null},r.prototype.updateLength=function(){var o=new Array(4);this.isOverlapingSourceAndTarget=t.getIntersection(this.target.getRect(),this.source.getRect(),o),this.isOverlapingSourceAndTarget||(this.lengthX=o[0]-o[2],this.lengthY=o[1]-o[3],Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},A.exports=r},function(A,f,p){A.exports=function(e){this.vGraphObject=e}},function(A,f,p){var e=p(2),t=p(10),i=p(13),r=p(0),n=p(16),o=p(4);function h(l,E,m,g){m==null&&g==null&&(g=E),e.call(this,g),l.graphManager!=null&&(l=l.graphManager),this.estimatedSize=t.MIN_VALUE,this.inclusionTreeDepth=t.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=l,this.rect=m!=null&&E!=null?new i(E.x,E.y,m.width,m.height):new i}for(var a in h.prototype=Object.create(e.prototype),e)h[a]=e[a];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(l){this.rect.width=l},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(l){this.rect.height=l},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new o(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new o(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(l,E){this.rect.x=l.x,this.rect.y=l.y,this.rect.width=E.width,this.rect.height=E.height},h.prototype.setCenter=function(l,E){this.rect.x=l-this.rect.width/2,this.rect.y=E-this.rect.height/2},h.prototype.setLocation=function(l,E){this.rect.x=l,this.rect.y=E},h.prototype.moveBy=function(l,E){this.rect.x+=l,this.rect.y+=E},h.prototype.getEdgeListToNode=function(l){var E=[],m=this;return m.edges.forEach(function(g){if(g.target==l){if(g.source!=m)throw"Incorrect edge source!";E.push(g)}}),E},h.prototype.getEdgesBetween=function(l){var E=[],m=this;return m.edges.forEach(function(g){if(g.source!=m&&g.target!=m)throw"Incorrect edge source and/or target";g.target!=l&&g.source!=l||E.push(g)}),E},h.prototype.getNeighborsList=function(){var l=new Set,E=this;return E.edges.forEach(function(m){if(m.source==E)l.add(m.target);else{if(m.target!=E)throw"Incorrect incidency!";l.add(m.source)}}),l},h.prototype.withChildren=function(){var l=new Set;if(l.add(this),this.child!=null)for(var E=this.child.getNodes(),m=0;m<E.length;m++)E[m].withChildren().forEach(function(g){l.add(g)});return l},h.prototype.getNoOfChildren=function(){var l=0;if(this.child==null)l=1;else for(var E=this.child.getNodes(),m=0;m<E.length;m++)l+=E[m].getNoOfChildren();return l==0&&(l=1),l},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==t.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.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)},h.prototype.scatter=function(){var l,E,m=-r.INITIAL_WORLD_BOUNDARY,g=r.INITIAL_WORLD_BOUNDARY;l=r.WORLD_CENTER_X+n.nextDouble()*(g-m)+m;var _=-r.INITIAL_WORLD_BOUNDARY,L=r.INITIAL_WORLD_BOUNDARY;E=r.WORLD_CENTER_Y+n.nextDouble()*(L-_)+_,this.rect.x=l,this.rect.y=E},h.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var l=this.getChild();if(l.updateBounds(!0),this.rect.x=l.getLeft(),this.rect.y=l.getTop(),this.setWidth(l.getRight()-l.getLeft()),this.setHeight(l.getBottom()-l.getTop()),r.NODE_DIMENSIONS_INCLUDE_LABELS){var E=l.getRight()-l.getLeft(),m=l.getBottom()-l.getTop();this.labelWidth>E&&(this.rect.x-=(this.labelWidth-E)/2,this.setWidth(this.labelWidth)),this.labelHeight>m&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-m)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-m),this.setHeight(this.labelHeight))}}},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==t.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(l){var E=this.rect.x;E>r.WORLD_BOUNDARY?E=r.WORLD_BOUNDARY:E<-r.WORLD_BOUNDARY&&(E=-r.WORLD_BOUNDARY);var m=this.rect.y;m>r.WORLD_BOUNDARY?m=r.WORLD_BOUNDARY:m<-r.WORLD_BOUNDARY&&(m=-r.WORLD_BOUNDARY);var g=new o(E,m),_=l.inverseTransformPoint(g);this.setLocation(_.x,_.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=h},function(A,f,p){function e(t,i){t==null&&i==null?(this.x=0,this.y=0):(this.x=t,this.y=i)}e.prototype.getX=function(){return this.x},e.prototype.getY=function(){return this.y},e.prototype.setX=function(t){this.x=t},e.prototype.setY=function(t){this.y=t},e.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},e.prototype.getCopy=function(){return new e(this.x,this.y)},e.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},A.exports=e},function(A,f,p){var e=p(2),t=p(10),i=p(0),r=p(6),n=p(3),o=p(1),h=p(13),a=p(12),l=p(11);function E(g,_,L){e.call(this,L),this.estimatedSize=t.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,_!=null&&_ instanceof r?this.graphManager=_:_!=null&&_ instanceof Layout&&(this.graphManager=_.graphManager)}for(var m in E.prototype=Object.create(e.prototype),e)E[m]=e[m];E.prototype.getNodes=function(){return this.nodes},E.prototype.getEdges=function(){return this.edges},E.prototype.getGraphManager=function(){return this.graphManager},E.prototype.getParent=function(){return this.parent},E.prototype.getLeft=function(){return this.left},E.prototype.getRight=function(){return this.right},E.prototype.getTop=function(){return this.top},E.prototype.getBottom=function(){return this.bottom},E.prototype.isConnected=function(){return this.isConnected},E.prototype.add=function(g,_,L){if(_==null&&L==null){var v=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(v)>-1)throw"Node already in graph!";return v.owner=this,this.getNodes().push(v),v}var T=g;if(!(this.getNodes().indexOf(_)>-1&&this.getNodes().indexOf(L)>-1))throw"Source or target not in graph!";if(_.owner!=L.owner||_.owner!=this)throw"Both owners must be this graph!";return _.owner!=L.owner?null:(T.source=_,T.target=L,T.isInterGraph=!1,this.getEdges().push(T),_.edges.push(T),L!=_&&L.edges.push(T),T)},E.prototype.remove=function(g){var _=g;if(g instanceof n){if(_==null)throw"Node is null!";if(_.owner==null||_.owner!=this)throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var L=_.edges.slice(),v=L.length,T=0;T<v;T++)(u=L[T]).isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);if((I=this.nodes.indexOf(_))==-1)throw"Node not in owner node list!";this.nodes.splice(I,1)}else if(g instanceof o){var u;if((u=g)==null)throw"Edge is null!";if(u.source==null||u.target==null)throw"Source and/or target is null!";if(u.source.owner==null||u.target.owner==null||u.source.owner!=this||u.target.owner!=this)throw"Source and/or target owner is invalid!";var I,s=u.source.edges.indexOf(u),c=u.target.edges.indexOf(u);if(!(s>-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(c,1),(I=u.source.owner.getEdges().indexOf(u))==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(I,1)}},E.prototype.updateLeftTop=function(){for(var g,_,L,v=t.MAX_VALUE,T=t.MAX_VALUE,u=this.getNodes(),I=u.length,s=0;s<I;s++){var c=u[s];v>(g=c.getTop())&&(v=g),T>(_=c.getLeft())&&(T=_)}return v==t.MAX_VALUE?null:(L=u[0].getParent().paddingLeft!=null?u[0].getParent().paddingLeft:this.margin,this.left=T-L,this.top=v-L,new a(this.left,this.top))},E.prototype.updateBounds=function(g){for(var _,L,v,T,u,I=t.MAX_VALUE,s=-t.MAX_VALUE,c=t.MAX_VALUE,d=-t.MAX_VALUE,y=this.nodes,O=y.length,D=0;D<O;D++){var w=y[D];g&&w.child!=null&&w.updateBounds(),I>(_=w.getLeft())&&(I=_),s<(L=w.getRight())&&(s=L),c>(v=w.getTop())&&(c=v),d<(T=w.getBottom())&&(d=T)}var R=new h(I,c,s-I,d-c);I==t.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),u=y[0].getParent().paddingLeft!=null?y[0].getParent().paddingLeft:this.margin,this.left=R.x-u,this.right=R.x+R.width+u,this.top=R.y-u,this.bottom=R.y+R.height+u},E.calculateBounds=function(g){for(var _,L,v,T,u=t.MAX_VALUE,I=-t.MAX_VALUE,s=t.MAX_VALUE,c=-t.MAX_VALUE,d=g.length,y=0;y<d;y++){var O=g[y];u>(_=O.getLeft())&&(u=_),I<(L=O.getRight())&&(I=L),s>(v=O.getTop())&&(s=v),c<(T=O.getBottom())&&(c=T)}return new h(u,s,I-u,c-s)},E.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},E.prototype.getEstimatedSize=function(){if(this.estimatedSize==t.MIN_VALUE)throw"assert failed";return this.estimatedSize},E.prototype.calcEstimatedSize=function(){for(var g=0,_=this.nodes,L=_.length,v=0;v<L;v++)g+=_[v].calcEstimatedSize();return this.estimatedSize=g==0?i.EMPTY_COMPOUND_NODE_SIZE:g/Math.sqrt(this.nodes.length),this.estimatedSize},E.prototype.updateConnected=function(){var g=this;if(this.nodes.length!=0){var _,L,v=new l,T=new Set,u=this.nodes[0];for(u.withChildren().forEach(function(d){v.push(d),T.add(d)});v.length!==0;)for(var I=(_=(u=v.shift()).getEdges()).length,s=0;s<I;s++)(L=_[s].getOtherEndInGraph(u,this))==null||T.has(L)||L.withChildren().forEach(function(d){v.push(d),T.add(d)});if(this.isConnected=!1,T.size>=this.nodes.length){var c=0;T.forEach(function(d){d.owner==g&&c++}),c==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},A.exports=E},function(A,f,p){var e,t=p(1);function i(r){e=p(5),this.layout=r,this.graphs=[],this.edges=[]}i.prototype.addRoot=function(){var r=this.layout.newGraph(),n=this.layout.newNode(null),o=this.add(r,n);return this.setRootGraph(o),this.rootGraph},i.prototype.add=function(r,n,o,h,a){if(o==null&&h==null&&a==null){if(r==null)throw"Graph is null!";if(n==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(n.child!=null)throw"Already has a child!";return r.parent=n,n.child=r,r}a=o,o=r;var l=(h=n).getOwner(),E=a.getOwner();if(l==null||l.getGraphManager()!=this)throw"Source not in this graph mgr!";if(E==null||E.getGraphManager()!=this)throw"Target not in this graph mgr!";if(l==E)return o.isInterGraph=!1,l.add(o,h,a);if(o.isInterGraph=!0,o.source=h,o.target=a,this.edges.indexOf(o)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(o),o.source==null||o.target==null)throw"Edge source and/or target is null!";if(o.source.edges.indexOf(o)!=-1||o.target.edges.indexOf(o)!=-1)throw"Edge already in source and/or target incidency list!";return o.source.edges.push(o),o.target.edges.push(o),o},i.prototype.remove=function(r){if(r instanceof e){var n=r;if(n.getGraphManager()!=this)throw"Graph not in this graph mgr";if(n!=this.rootGraph&&(n.parent==null||n.parent.graphManager!=this))throw"Invalid parent node!";for(var o,h=[],a=(h=h.concat(n.getEdges())).length,l=0;l<a;l++)o=h[l],n.remove(o);var E,m=[];for(a=(m=m.concat(n.getNodes())).length,l=0;l<a;l++)E=m[l],n.remove(E);n==this.rootGraph&&this.setRootGraph(null);var g=this.graphs.indexOf(n);this.graphs.splice(g,1),n.parent=null}else if(r instanceof t){if((o=r)==null)throw"Edge is null!";if(!o.isInterGraph)throw"Not an inter-graph edge!";if(o.source==null||o.target==null)throw"Source and/or target is null!";if(o.source.edges.indexOf(o)==-1||o.target.edges.indexOf(o)==-1)throw"Source and/or target doesn't know this edge!";if(g=o.source.edges.indexOf(o),o.source.edges.splice(g,1),g=o.target.edges.indexOf(o),o.target.edges.splice(g,1),o.source.owner==null||o.source.owner.getGraphManager()==null)throw"Edge owner graph or owner graph manager is null!";if(o.source.owner.getGraphManager().edges.indexOf(o)==-1)throw"Not in owner graph manager's edge list!";g=o.source.owner.getGraphManager().edges.indexOf(o),o.source.owner.getGraphManager().edges.splice(g,1)}},i.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},i.prototype.getGraphs=function(){return this.graphs},i.prototype.getAllNodes=function(){if(this.allNodes==null){for(var r=[],n=this.getGraphs(),o=n.length,h=0;h<o;h++)r=r.concat(n[h].getNodes());this.allNodes=r}return this.allNodes},i.prototype.resetAllNodes=function(){this.allNodes=null},i.prototype.resetAllEdges=function(){this.allEdges=null},i.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},i.prototype.getAllEdges=function(){if(this.allEdges==null){var r=[],n=this.getGraphs();n.length;for(var o=0;o<n.length;o++)r=r.concat(n[o].getEdges());r=r.concat(this.edges),this.allEdges=r}return this.allEdges},i.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},i.prototype.setAllNodesToApplyGravitation=function(r){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=r},i.prototype.getRoot=function(){return this.rootGraph},i.prototype.setRootGraph=function(r){if(r.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=r,r.parent==null&&(r.parent=this.layout.newNode("Root node"))},i.prototype.getLayout=function(){return this.layout},i.prototype.isOneAncestorOfOther=function(r,n){if(r==null||n==null)throw"assert failed";if(r==n)return!0;for(var o,h=r.getOwner();(o=h.getParent())!=null;){if(o==n)return!0;if((h=o.getOwner())==null)break}for(h=n.getOwner();(o=h.getParent())!=null;){if(o==r)return!0;if((h=o.getOwner())==null)break}return!1},i.prototype.calcLowestCommonAncestors=function(){for(var r,n,o,h,a,l=this.getAllEdges(),E=l.length,m=0;m<E;m++)if(n=(r=l[m]).source,o=r.target,r.lca=null,r.sourceInLca=n,r.targetInLca=o,n!=o){for(h=n.getOwner();r.lca==null;){for(r.targetInLca=o,a=o.getOwner();r.lca==null;){if(a==h){r.lca=a;break}if(a==this.rootGraph)break;if(r.lca!=null)throw"assert failed";r.targetInLca=a.getParent(),a=r.targetInLca.getOwner()}if(h==this.rootGraph)break;r.lca==null&&(r.sourceInLca=h.getParent(),h=r.sourceInLca.getOwner())}if(r.lca==null)throw"assert failed"}else r.lca=n.getOwner()},i.prototype.calcLowestCommonAncestor=function(r,n){if(r==n)return r.getOwner();for(var o=r.getOwner();o!=null;){for(var h=n.getOwner();h!=null;){if(h==o)return h;h=h.getParent().getOwner()}o=o.getParent().getOwner()}return o},i.prototype.calcInclusionTreeDepths=function(r,n){var o;r==null&&n==null&&(r=this.rootGraph,n=1);for(var h=r.getNodes(),a=h.length,l=0;l<a;l++)(o=h[l]).inclusionTreeDepth=n,o.child!=null&&this.calcInclusionTreeDepths(o.child,n+1)},i.prototype.includesInvalidEdge=function(){for(var r,n=this.edges.length,o=0;o<n;o++)if(r=this.edges[o],this.isOneAncestorOfOther(r.source,r.target))return!0;return!1},A.exports=i},function(A,f,p){var e=p(0);function t(){}for(var i in e)t[i]=e[i];t.MAX_ITERATIONS=2500,t.DEFAULT_EDGE_LENGTH=50,t.DEFAULT_SPRING_STRENGTH=.45,t.DEFAULT_REPULSION_STRENGTH=4500,t.DEFAULT_GRAVITY_STRENGTH=.4,t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,t.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,t.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,t.COOLING_ADAPTATION_FACTOR=.33,t.ADAPTATION_LOWER_NODE_LIMIT=1e3,t.ADAPTATION_UPPER_NODE_LIMIT=5e3,t.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,t.MAX_NODE_DISPLACEMENT=3*t.MAX_NODE_DISPLACEMENT_INCREMENTAL,t.MIN_REPULSION_DIST=t.DEFAULT_EDGE_LENGTH/10,t.CONVERGENCE_CHECK_PERIOD=100,t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,t.MIN_EDGE_LENGTH=1,t.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=t},function(A,f,p){var e=p(12);function t(){}t.calcSeparationAmount=function(i,r,n,o){if(!i.intersects(r))throw"assert failed";var h=new Array(2);this.decideDirectionsForOverlappingNodes(i,r,h),n[0]=Math.min(i.getRight(),r.getRight())-Math.max(i.x,r.x),n[1]=Math.min(i.getBottom(),r.getBottom())-Math.max(i.y,r.y),i.getX()<=r.getX()&&i.getRight()>=r.getRight()?n[0]+=Math.min(r.getX()-i.getX(),i.getRight()-r.getRight()):r.getX()<=i.getX()&&r.getRight()>=i.getRight()&&(n[0]+=Math.min(i.getX()-r.getX(),r.getRight()-i.getRight())),i.getY()<=r.getY()&&i.getBottom()>=r.getBottom()?n[1]+=Math.min(r.getY()-i.getY(),i.getBottom()-r.getBottom()):r.getY()<=i.getY()&&r.getBottom()>=i.getBottom()&&(n[1]+=Math.min(i.getY()-r.getY(),r.getBottom()-i.getBottom()));var a=Math.abs((r.getCenterY()-i.getCenterY())/(r.getCenterX()-i.getCenterX()));r.getCenterY()===i.getCenterY()&&r.getCenterX()===i.getCenterX()&&(a=1);var l=a*n[0],E=n[1]/a;n[0]<E?E=n[0]:l=n[1],n[0]=-1*h[0]*(E/2+o),n[1]=-1*h[1]*(l/2+o)},t.decideDirectionsForOverlappingNodes=function(i,r,n){i.getCenterX()<r.getCenterX()?n[0]=-1:n[0]=1,i.getCenterY()<r.getCenterY()?n[1]=-1:n[1]=1},t.getIntersection2=function(i,r,n){var o=i.getCenterX(),h=i.getCenterY(),a=r.getCenterX(),l=r.getCenterY();if(i.intersects(r))return n[0]=o,n[1]=h,n[2]=a,n[3]=l,!0;var E=i.getX(),m=i.getY(),g=i.getRight(),_=i.getX(),L=i.getBottom(),v=i.getRight(),T=i.getWidthHalf(),u=i.getHeightHalf(),I=r.getX(),s=r.getY(),c=r.getRight(),d=r.getX(),y=r.getBottom(),O=r.getRight(),D=r.getWidthHalf(),w=r.getHeightHalf(),R=!1,C=!1;if(o===a){if(h>l)return n[0]=o,n[1]=m,n[2]=a,n[3]=y,!1;if(h<l)return n[0]=o,n[1]=L,n[2]=a,n[3]=s,!1}else if(h===l){if(o>a)return n[0]=E,n[1]=h,n[2]=c,n[3]=l,!1;if(o<a)return n[0]=g,n[1]=h,n[2]=I,n[3]=l,!1}else{var M=i.height/i.width,S=r.height/r.width,G=(l-h)/(a-o),Y=void 0,F=void 0,P=void 0,b=void 0,k=void 0,U=void 0;if(-M===G?o>a?(n[0]=_,n[1]=L,R=!0):(n[0]=g,n[1]=m,R=!0):M===G&&(o>a?(n[0]=E,n[1]=m,R=!0):(n[0]=v,n[1]=L,R=!0)),-S===G?a>o?(n[2]=d,n[3]=y,C=!0):(n[2]=c,n[3]=s,C=!0):S===G&&(a>o?(n[2]=I,n[3]=s,C=!0):(n[2]=O,n[3]=y,C=!0)),R&&C)return!1;if(o>a?h>l?(Y=this.getCardinalDirection(M,G,4),F=this.getCardinalDirection(S,G,2)):(Y=this.getCardinalDirection(-M,G,3),F=this.getCardinalDirection(-S,G,1)):h>l?(Y=this.getCardinalDirection(-M,G,1),F=this.getCardinalDirection(-S,G,3)):(Y=this.getCardinalDirection(M,G,2),F=this.getCardinalDirection(S,G,4)),!R)switch(Y){case 1:b=m,P=o+-u/G,n[0]=P,n[1]=b;break;case 2:P=v,b=h+T*G,n[0]=P,n[1]=b;break;case 3:b=L,P=o+u/G,n[0]=P,n[1]=b;break;case 4:P=_,b=h+-T*G,n[0]=P,n[1]=b}if(!C)switch(F){case 1:U=s,k=a+-w/G,n[2]=k,n[3]=U;break;case 2:k=O,U=l+D*G,n[2]=k,n[3]=U;break;case 3:U=y,k=a+w/G,n[2]=k,n[3]=U;break;case 4:k=d,U=l+-D*G,n[2]=k,n[3]=U}}return!1},t.getCardinalDirection=function(i,r,n){return i>r?n:1+n%4},t.getIntersection=function(i,r,n,o){if(o==null)return this.getIntersection2(i,r,n);var h,a,l,E,m,g,_,L=i.x,v=i.y,T=r.x,u=r.y,I=n.x,s=n.y,c=o.x,d=o.y;return(_=(h=u-v)*(E=I-c)-(a=d-s)*(l=L-T))==0?null:new e((l*(g=c*s-I*d)-E*(m=T*v-L*u))/_,(a*m-h*g)/_)},t.angleOfVector=function(i,r,n,o){var h=void 0;return i!==n?(h=Math.atan((o-r)/(n-i)),n<i?h+=Math.PI:o<r&&(h+=this.TWO_PI)):h=o<r?this.ONE_AND_HALF_PI:this.HALF_PI,h},t.doIntersect=function(i,r,n,o){var h=i.x,a=i.y,l=r.x,E=r.y,m=n.x,g=n.y,_=o.x,L=o.y,v=(l-h)*(L-g)-(_-m)*(E-a);if(v===0)return!1;var T=((L-g)*(_-h)+(m-_)*(L-a))/v,u=((a-E)*(_-h)+(l-h)*(L-a))/v;return 0<T&&T<1&&0<u&&u<1},t.HALF_PI=.5*Math.PI,t.ONE_AND_HALF_PI=1.5*Math.PI,t.TWO_PI=2*Math.PI,t.THREE_PI=3*Math.PI,A.exports=t},function(A,f,p){function e(){}e.sign=function(t){return t>0?1:t<0?-1:0},e.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},e.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},A.exports=e},function(A,f,p){function e(){}e.MAX_VALUE=2147483647,e.MIN_VALUE=-2147483648,A.exports=e},function(A,f,p){var e=function(){function o(h,a){for(var l=0;l<a.length;l++){var E=a[l];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(h,E.key,E)}}return function(h,a,l){return a&&o(h.prototype,a),l&&o(h,l),h}}(),t=function(o){return{value:o,next:null,prev:null}},i=function(o,h,a,l){return o!==null?o.next=h:l.head=h,a!==null?a.prev=h:l.tail=h,h.prev=o,h.next=a,l.length++,h},r=function(o,h){var a=o.prev,l=o.next;return a!==null?a.next=l:h.head=l,l!==null?l.prev=a:h.tail=a,o.prev=o.next=null,h.length--,o},n=function(){function o(h){var a=this;(function(l,E){if(!(l instanceof E))throw new TypeError("Cannot call a class as a function")})(this,o),this.length=0,this.head=null,this.tail=null,h!=null&&h.forEach(function(l){return a.push(l)})}return e(o,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(h,a){return i(a.prev,t(h),a,this)}},{key:"insertAfter",value:function(h,a){return i(a,t(h),a.next,this)}},{key:"insertNodeBefore",value:function(h,a){return i(a.prev,h,a,this)}},{key:"insertNodeAfter",value:function(h,a){return i(a,h,a.next,this)}},{key:"push",value:function(h){return i(this.tail,t(h),null,this)}},{key:"unshift",value:function(h){return i(null,t(h),this.head,this)}},{key:"remove",value:function(h){return r(h,this)}},{key:"pop",value:function(){return r(this.tail,this).value}},{key:"popNode",value:function(){return r(this.tail,this)}},{key:"shift",value:function(){return r(this.head,this).value}},{key:"shiftNode",value:function(){return r(this.head,this)}},{key:"get_object_at",value:function(h){if(h<=this.length()){for(var a=1,l=this.head;a<h;)l=l.next,a++;return l.value}}},{key:"set_object_at",value:function(h,a){if(h<=this.length()){for(var l=1,E=this.head;l<h;)E=E.next,l++;E.value=a}}}]),o}();A.exports=n},function(A,f,p){function e(t,i,r){this.x=null,this.y=null,t==null&&i==null&&r==null?(this.x=0,this.y=0):typeof t=="number"&&typeof i=="number"&&r==null?(this.x=t,this.y=i):t.constructor.name=="Point"&&i==null&&r==null&&(r=t,this.x=r.x,this.y=r.y)}e.prototype.getX=function(){return this.x},e.prototype.getY=function(){return this.y},e.prototype.getLocation=function(){return new e(this.x,this.y)},e.prototype.setLocation=function(t,i,r){t.constructor.name=="Point"&&i==null&&r==null?(r=t,this.setLocation(r.x,r.y)):typeof t=="number"&&typeof i=="number"&&r==null&&(parseInt(t)==t&&parseInt(i)==i?this.move(t,i):(this.x=Math.floor(t+.5),this.y=Math.floor(i+.5)))},e.prototype.move=function(t,i){this.x=t,this.y=i},e.prototype.translate=function(t,i){this.x+=t,this.y+=i},e.prototype.equals=function(t){if(t.constructor.name=="Point"){var i=t;return this.x==i.x&&this.y==i.y}return this==t},e.prototype.toString=function(){return new e().constructor.name+"[x="+this.x+",y="+this.y+"]"},A.exports=e},function(A,f,p){function e(t,i,r,n){this.x=0,this.y=0,this.width=0,this.height=0,t!=null&&i!=null&&r!=null&&n!=null&&(this.x=t,this.y=i,this.width=r,this.height=n)}e.prototype.getX=function(){return this.x},e.prototype.setX=function(t){this.x=t},e.prototype.getY=function(){return this.y},e.prototype.setY=function(t){this.y=t},e.prototype.getWidth=function(){return this.width},e.prototype.setWidth=function(t){this.width=t},e.prototype.getHeight=function(){return this.height},e.prototype.setHeight=function(t){this.height=t},e.prototype.getRight=function(){return this.x+this.width},e.prototype.getBottom=function(){return this.y+this.height},e.prototype.intersects=function(t){return!(this.getRight()<t.x||this.getBottom()<t.y||t.getRight()<this.x||t.getBottom()<this.y)},e.prototype.getCenterX=function(){return this.x+this.width/2},e.prototype.getMinX=function(){return this.getX()},e.prototype.getMaxX=function(){return this.getX()+this.width},e.prototype.getCenterY=function(){return this.y+this.height/2},e.prototype.getMinY=function(){return this.getY()},e.prototype.getMaxY=function(){return this.getY()+this.height},e.prototype.getWidthHalf=function(){return this.width/2},e.prototype.getHeightHalf=function(){return this.height/2},A.exports=e},function(A,f,p){var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i};function t(){}t.lastID=0,t.createID=function(i){return t.isPrimitive(i)?i:(i.uniqueID!=null||(i.uniqueID=t.getString(),t.lastID++),i.uniqueID)},t.getString=function(i){return i==null&&(i=t.lastID),"Object#"+i},t.isPrimitive=function(i){var r=i===void 0?"undefined":e(i);return i==null||r!="object"&&r!="function"},A.exports=t},function(A,f,p){function e(m){if(Array.isArray(m)){for(var g=0,_=Array(m.length);g<m.length;g++)_[g]=m[g];return _}return Array.from(m)}var t=p(0),i=p(6),r=p(3),n=p(1),o=p(5),h=p(4),a=p(17),l=p(27);function E(m){l.call(this),this.layoutQuality=t.QUALITY,this.createBendsAsNeeded=t.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=t.DEFAULT_INCREMENTAL,this.animationOnLayout=t.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=t.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=t.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=t.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new i(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,m!=null&&(this.isRemoteUse=m)}E.RANDOM_SEED=1,E.prototype=Object.create(l.prototype),E.prototype.getGraphManager=function(){return this.graphManager},E.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},E.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},E.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},E.prototype.newGraphManager=function(){var m=new i(this);return this.graphManager=m,m},E.prototype.newGraph=function(m){return new o(null,this.graphManager,m)},E.prototype.newNode=function(m){return new r(this.graphManager,m)},E.prototype.newEdge=function(m){return new n(null,null,m)},E.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},E.prototype.runLayout=function(){var m;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),m=!this.checkLayoutSuccess()&&this.layout(),t.ANIMATE!=="during"&&(m&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,m)},E.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},E.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var m=this.graphManager.getAllEdges(),g=0;g<m.length;g++)m[g];var _=this.graphManager.getRoot().getNodes();for(g=0;g<_.length;g++)_[g];this.update(this.graphManager.getRoot())}},E.prototype.update=function(m){if(m==null)this.update2();else if(m instanceof r){var g=m;if(g.getChild()!=null)for(var _=g.getChild().getNodes(),L=0;L<_.length;L++)update(_[L]);g.vGraphObject!=null&&g.vGraphObject.update(g)}else if(m instanceof n){var v=m;v.vGraphObject!=null&&v.vGraphObject.update(v)}else if(m instanceof o){var T=m;T.vGraphObject!=null&&T.vGraphObject.update(T)}},E.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=t.QUALITY,this.animationDuringLayout=t.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=t.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=t.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=t.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=t.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=t.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},E.prototype.transform=function(m){if(m==null)this.transform(new h(0,0));else{var g=new a,_=this.graphManager.getRoot().updateLeftTop();if(_!=null){g.setWorldOrgX(m.x),g.setWorldOrgY(m.y),g.setDeviceOrgX(_.x),g.setDeviceOrgY(_.y);for(var L=this.getAllNodes(),v=0;v<L.length;v++)L[v].transform(g)}}},E.prototype.positionNodesRandomly=function(m){if(m==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var g,_,L=m.getNodes(),v=0;v<L.length;v++)(_=(g=L[v]).getChild())==null||_.getNodes().length==0?g.scatter():(this.positionNodesRandomly(_),g.updateBounds())},E.prototype.getFlatForest=function(){for(var m=[],g=!0,_=this.graphManager.getRoot().getNodes(),L=!0,v=0;v<_.length;v++)_[v].getChild()!=null&&(L=!1);if(!L)return m;var T=new Set,u=[],I=new Map,s=[];for(s=s.concat(_);s.length>0&&g;){for(u.push(s[0]);u.length>0&&g;){var c=u[0];u.splice(0,1),T.add(c);var d=c.getEdges();for(v=0;v<d.length;v++){var y=d[v].getOtherEnd(c);if(I.get(c)!=y){if(T.has(y)){g=!1;break}u.push(y),I.set(y,c)}}}if(g){var O=[].concat(e(T));for(m.push(O),v=0;v<O.length;v++){var D=O[v],w=s.indexOf(D);w>-1&&s.splice(w,1)}T=new Set,I=new Map}else m=[]}return m},E.prototype.createDummyNodesForBendpoints=function(m){for(var g=[],_=m.source,L=this.graphManager.calcLowestCommonAncestor(m.source,m.target),v=0;v<m.bendpoints.length;v++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),L.add(T);var u=this.newEdge(null);this.graphManager.add(u,_,T),g.add(T),_=T}return u=this.newEdge(null),this.graphManager.add(u,_,m.target),this.edgeToDummyNodes.set(m,g),m.isInterGraph()?this.graphManager.remove(m):L.remove(m),g},E.prototype.createBendpointsFromDummyNodes=function(){var m=[];m=m.concat(this.graphManager.getAllEdges()),m=[].concat(e(this.edgeToDummyNodes.keys())).concat(m);for(var g=0;g<m.length;g++){var _=m[g];if(_.bendpoints.length>0){for(var L=this.edgeToDummyNodes.get(_),v=0;v<L.length;v++){var T=L[v],u=new h(T.getCenterX(),T.getCenterY()),I=_.bendpoints.get(v);I.x=u.x,I.y=u.y,T.getOwner().remove(T)}this.graphManager.add(_,_.source,_.target)}}},E.transform=function(m,g,_,L){if(_!=null&&L!=null){var v=g;return m<=50?v-=(g-g/_)/50*(50-m):v+=(g*L-g)/50*(m-50),v}var T,u;return m<=50?(T=9*g/500,u=g/10):(T=9*g/50,u=-8*g),T*m+u},E.findCenterOfTree=function(m){var g=[];g=g.concat(m);var _=[],L=new Map,v=!1,T=null;g.length!=1&&g.length!=2||(v=!0,T=g[0]);for(var u=0;u<g.length;u++){var I=(d=g[u]).getNeighborsList().size;L.set(d,d.getNeighborsList().size),I==1&&_.push(d)}var s=[];for(s=s.concat(_);!v;){var c=[];for(c=c.concat(s),s=[],u=0;u<g.length;u++){var d=g[u],y=g.indexOf(d);y>=0&&g.splice(y,1),d.getNeighborsList().forEach(function(O){if(_.indexOf(O)<0){var D=L.get(O)-1;D==1&&s.push(O),L.set(O,D)}})}_=_.concat(s),g.length!=1&&g.length!=2||(v=!0,T=g[0])}return T},E.prototype.setGraphManager=function(m){this.graphManager=m},A.exports=E},function(A,f,p){function e(){}e.seed=1,e.x=0,e.nextDouble=function(){return e.x=1e4*Math.sin(e.seed++),e.x-Math.floor(e.x)},A.exports=e},function(A,f,p){var e=p(4);function t(i,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}t.prototype.getWorldOrgX=function(){return this.lworldOrgX},t.prototype.setWorldOrgX=function(i){this.lworldOrgX=i},t.prototype.getWorldOrgY=function(){return this.lworldOrgY},t.prototype.setWorldOrgY=function(i){this.lworldOrgY=i},t.prototype.getWorldExtX=function(){return this.lworldExtX},t.prototype.setWorldExtX=function(i){this.lworldExtX=i},t.prototype.getWorldExtY=function(){return this.lworldExtY},t.prototype.setWorldExtY=function(i){this.lworldExtY=i},t.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},t.prototype.setDeviceOrgX=function(i){this.ldeviceOrgX=i},t.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},t.prototype.setDeviceOrgY=function(i){this.ldeviceOrgY=i},t.prototype.getDeviceExtX=function(){return this.ldeviceExtX},t.prototype.setDeviceExtX=function(i){this.ldeviceExtX=i},t.prototype.getDeviceExtY=function(){return this.ldeviceExtY},t.prototype.setDeviceExtY=function(i){this.ldeviceExtY=i},t.prototype.transformX=function(i){var r=0,n=this.lworldExtX;return n!=0&&(r=this.ldeviceOrgX+(i-this.lworldOrgX)*this.ldeviceExtX/n),r},t.prototype.transformY=function(i){var r=0,n=this.lworldExtY;return n!=0&&(r=this.ldeviceOrgY+(i-this.lworldOrgY)*this.ldeviceExtY/n),r},t.prototype.inverseTransformX=function(i){var r=0,n=this.ldeviceExtX;return n!=0&&(r=this.lworldOrgX+(i-this.ldeviceOrgX)*this.lworldExtX/n),r},t.prototype.inverseTransformY=function(i){var r=0,n=this.ldeviceExtY;return n!=0&&(r=this.lworldOrgY+(i-this.ldeviceOrgY)*this.lworldExtY/n),r},t.prototype.inverseTransformPoint=function(i){return new e(this.inverseTransformX(i.x),this.inverseTransformY(i.y))},A.exports=t},function(A,f,p){var e=p(15),t=p(7),i=p(0),r=p(8),n=p(9);function o(){e.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}for(var h in o.prototype=Object.create(e.prototype),e)o[h]=e[h];o.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},o.prototype.calcIdealEdgeLengths=function(){for(var a,l,E,m,g,_,L=this.getGraphManager().getAllEdges(),v=0;v<L.length;v++)(a=L[v]).idealLength=this.idealEdgeLength,a.isInterGraph&&(E=a.getSource(),m=a.getTarget(),g=a.getSourceInLca().getEstimatedSize(),_=a.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(a.idealLength+=g+_-2*i.SIMPLE_NODE_SIZE),l=a.getLca().getInclusionTreeDepth(),a.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(E.getInclusionTreeDepth()+m.getInclusionTreeDepth()-2*l))},o.prototype.initSpringEmbedder=function(){var a=this.getAllNodes().length;this.incremental?(a>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(a-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(a>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(a-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},o.prototype.calcSpringForces=function(){for(var a,l=this.getAllEdges(),E=0;E<l.length;E++)a=l[E],this.calcSpringForce(a,a.idealLength)},o.prototype.calcRepulsionForces=function(){var a,l,E,m,g,_=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],L=arguments.length>1&&arguments[1]!==void 0&&arguments[1],v=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&_&&this.updateGrid(),g=new Set,a=0;a<v.length;a++)E=v[a],this.calculateRepulsionForceOfANode(E,g,_,L),g.add(E);else for(a=0;a<v.length;a++)for(E=v[a],l=a+1;l<v.length;l++)m=v[l],E.getOwner()==m.getOwner()&&this.calcRepulsionForce(E,m)},o.prototype.calcGravitationalForces=function(){for(var a,l=this.getAllNodesToApplyGravitation(),E=0;E<l.length;E++)a=l[E],this.calcGravitationalForce(a)},o.prototype.moveNodes=function(){for(var a=this.getAllNodes(),l=0;l<a.length;l++)a[l].move()},o.prototype.calcSpringForce=function(a,l){var E,m,g,_,L=a.getSource(),v=a.getTarget();if(this.uniformLeafNodeSizes&&L.getChild()==null&&v.getChild()==null)a.updateLengthSimple();else if(a.updateLength(),a.isOverlapingSourceAndTarget)return;(E=a.getLength())!=0&&(g=(m=this.springConstant*(E-l))*(a.lengthX/E),_=m*(a.lengthY/E),L.springForceX+=g,L.springForceY+=_,v.springForceX-=g,v.springForceY-=_)},o.prototype.calcRepulsionForce=function(a,l){var E,m,g,_,L,v,T,u=a.getRect(),I=l.getRect(),s=new Array(2),c=new Array(4);if(u.intersects(I)){r.calcSeparationAmount(u,I,s,t.DEFAULT_EDGE_LENGTH/2),v=2*s[0],T=2*s[1];var d=a.noOfChildren*l.noOfChildren/(a.noOfChildren+l.noOfChildren);a.repulsionForceX-=d*v,a.repulsionForceY-=d*T,l.repulsionForceX+=d*v,l.repulsionForceY+=d*T}else this.uniformLeafNodeSizes&&a.getChild()==null&&l.getChild()==null?(E=I.getCenterX()-u.getCenterX(),m=I.getCenterY()-u.getCenterY()):(r.getIntersection(u,I,c),E=c[2]-c[0],m=c[3]-c[1]),Math.abs(E)<t.MIN_REPULSION_DIST&&(E=n.sign(E)*t.MIN_REPULSION_DIST),Math.abs(m)<t.MIN_REPULSION_DIST&&(m=n.sign(m)*t.MIN_REPULSION_DIST),g=E*E+m*m,_=Math.sqrt(g),v=(L=this.repulsionConstant*a.noOfChildren*l.noOfChildren/g)*E/_,T=L*m/_,a.repulsionForceX-=v,a.repulsionForceY-=T,l.repulsionForceX+=v,l.repulsionForceY+=T},o.prototype.calcGravitationalForce=function(a){var l,E,m,g,_,L,v,T;E=((l=a.getOwner()).getRight()+l.getLeft())/2,m=(l.getTop()+l.getBottom())/2,g=a.getCenterX()-E,_=a.getCenterY()-m,L=Math.abs(g)+a.getWidth()/2,v=Math.abs(_)+a.getHeight()/2,a.getOwner()==this.graphManager.getRoot()?(L>(T=l.getEstimatedSize()*this.gravityRangeFactor)||v>T)&&(a.gravitationForceX=-this.gravityConstant*g,a.gravitationForceY=-this.gravityConstant*_):(L>(T=l.getEstimatedSize()*this.compoundGravityRangeFactor)||v>T)&&(a.gravitationForceX=-this.gravityConstant*g*this.compoundGravityConstant,a.gravitationForceY=-this.gravityConstant*_*this.compoundGravityConstant)},o.prototype.isConverged=function(){var a,l=!1;return this.totalIterations>this.maxIterations/3&&(l=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),a=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,a||l},o.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},o.prototype.calcNoOfChildrenForAllNodes=function(){for(var a,l=this.graphManager.getAllNodes(),E=0;E<l.length;E++)(a=l[E]).noOfChildren=a.getNoOfChildren()},o.prototype.calcGrid=function(a){var l,E;l=parseInt(Math.ceil((a.getRight()-a.getLeft())/this.repulsionRange)),E=parseInt(Math.ceil((a.getBottom()-a.getTop())/this.repulsionRange));for(var m=new Array(l),g=0;g<l;g++)m[g]=new Array(E);for(g=0;g<l;g++)for(var _=0;_<E;_++)m[g][_]=new Array;return m},o.prototype.addNodeToGrid=function(a,l,E){var m,g,_,L;m=parseInt(Math.floor((a.getRect().x-l)/this.repulsionRange)),g=parseInt(Math.floor((a.getRect().width+a.getRect().x-l)/this.repulsionRange)),_=parseInt(Math.floor((a.getRect().y-E)/this.repulsionRange)),L=parseInt(Math.floor((a.getRect().height+a.getRect().y-E)/this.repulsionRange));for(var v=m;v<=g;v++)for(var T=_;T<=L;T++)this.grid[v][T].push(a),a.setGridCoordinates(m,g,_,L)},o.prototype.updateGrid=function(){var a,l,E=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),a=0;a<E.length;a++)l=E[a],this.addNodeToGrid(l,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},o.prototype.calculateRepulsionForceOfANode=function(a,l,E,m){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&E||m){var g,_=new Set;a.surrounding=new Array;for(var L=this.grid,v=a.startX-1;v<a.finishX+2;v++)for(var T=a.startY-1;T<a.finishY+2;T++)if(!(v<0||T<0||v>=L.length||T>=L[0].length)){for(var u=0;u<L[v][T].length;u++)if(g=L[v][T][u],a.getOwner()==g.getOwner()&&a!=g&&!l.has(g)&&!_.has(g)){var I=Math.abs(a.getCenterX()-g.getCenterX())-(a.getWidth()/2+g.getWidth()/2),s=Math.abs(a.getCenterY()-g.getCenterY())-(a.getHeight()/2+g.getHeight()/2);I<=this.repulsionRange&&s<=this.repulsionRange&&_.add(g)}}a.surrounding=[].concat(function(c){if(Array.isArray(c)){for(var d=0,y=Array(c.length);d<c.length;d++)y[d]=c[d];return y}return Array.from(c)}(_))}for(v=0;v<a.surrounding.length;v++)this.calcRepulsionForce(a,a.surrounding[v])},o.prototype.calcRepulsionRange=function(){return 0},A.exports=o},function(A,f,p){var e=p(1),t=p(7);function i(n,o,h){e.call(this,n,o,h),this.idealLength=t.DEFAULT_EDGE_LENGTH}for(var r in i.prototype=Object.create(e.prototype),e)i[r]=e[r];A.exports=i},function(A,f,p){var e=p(3);function t(r,n,o,h){e.call(this,r,n,o,h),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=[]}for(var i in t.prototype=Object.create(e.prototype),e)t[i]=e[i];t.prototype.setGridCoordinates=function(r,n,o,h){this.startX=r,this.finishX=n,this.startY=o,this.finishY=h},A.exports=t},function(A,f,p){function e(t,i){this.width=0,this.height=0,t!==null&&i!==null&&(this.height=i,this.width=t)}e.prototype.getWidth=function(){return this.width},e.prototype.setWidth=function(t){this.width=t},e.prototype.getHeight=function(){return this.height},e.prototype.setHeight=function(t){this.height=t},A.exports=e},function(A,f,p){var e=p(14);function t(){this.map={},this.keys=[]}t.prototype.put=function(i,r){var n=e.createID(i);this.contains(n)||(this.map[n]=r,this.keys.push(i))},t.prototype.contains=function(i){return e.createID(i),this.map[i]!=null},t.prototype.get=function(i){var r=e.createID(i);return this.map[r]},t.prototype.keySet=function(){return this.keys},A.exports=t},function(A,f,p){var e=p(14);function t(){this.set={}}t.prototype.add=function(i){var r=e.createID(i);this.contains(r)||(this.set[r]=i)},t.prototype.remove=function(i){delete this.set[e.createID(i)]},t.prototype.clear=function(){this.set={}},t.prototype.contains=function(i){return this.set[e.createID(i)]==i},t.prototype.isEmpty=function(){return this.size()===0},t.prototype.size=function(){return Object.keys(this.set).length},t.prototype.addAllTo=function(i){for(var r=Object.keys(this.set),n=r.length,o=0;o<n;o++)i.push(this.set[r[o]])},t.prototype.size=function(){return Object.keys(this.set).length},t.prototype.addAll=function(i){for(var r=i.length,n=0;n<r;n++){var o=i[n];this.add(o)}},A.exports=t},function(A,f,p){var e=function(){function r(n,o){for(var h=0;h<o.length;h++){var a=o[h];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,a.key,a)}}return function(n,o,h){return o&&r(n.prototype,o),h&&r(n,h),n}}(),t=p(11),i=function(){function r(n,o){(function(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")})(this,r),o===null&&o===void 0||(this.compareFunction=this._defaultCompareFunction);var h=void 0;h=n instanceof t?n.size():n.length,this._quicksort(n,0,h-1)}return e(r,[{key:"_quicksort",value:function(n,o,h){if(o<h){var a=this._partition(n,o,h);this._quicksort(n,o,a),this._quicksort(n,a+1,h)}}},{key:"_partition",value:function(n,o,h){for(var a=this._get(n,o),l=o,E=h;;){for(;this.compareFunction(a,this._get(n,E));)E--;for(;this.compareFunction(this._get(n,l),a);)l++;if(!(l<E))return E;this._swap(n,l,E),l++,E--}}},{key:"_get",value:function(n,o){return n instanceof t?n.get_object_at(o):n[o]}},{key:"_set",value:function(n,o,h){n instanceof t?n.set_object_at(o,h):n[o]=h}},{key:"_swap",value:function(n,o,h){var a=this._get(n,o);this._set(n,o,this._get(n,h)),this._set(n,h,a)}},{key:"_defaultCompareFunction",value:function(n,o){return o>n}}]),r}();A.exports=i},function(A,f,p){var e=function(){function i(r,n){for(var o=0;o<n.length;o++){var h=n[o];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(r,h.key,h)}}return function(r,n,o){return n&&i(r.prototype,n),o&&i(r,o),r}}(),t=function(){function i(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;(function(_,L){if(!(_ instanceof L))throw new TypeError("Cannot call a class as a function")})(this,i),this.sequence1=r,this.sequence2=n,this.match_score=o,this.mismatch_penalty=h,this.gap_penalty=a,this.iMax=r.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var l=0;l<this.iMax;l++){this.grid[l]=new Array(this.jMax);for(var E=0;E<this.jMax;E++)this.grid[l][E]=0}this.tracebackGrid=new Array(this.iMax);for(var m=0;m<this.iMax;m++){this.tracebackGrid[m]=new Array(this.jMax);for(var g=0;g<this.jMax;g++)this.tracebackGrid[m][g]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return e(i,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var r=1;r<this.jMax;r++)this.grid[0][r]=this.grid[0][r-1]+this.gap_penalty,this.tracebackGrid[0][r]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var o=1;o<this.iMax;o++)for(var h=1;h<this.jMax;h++){var a=[this.sequence1[o-1]===this.sequence2[h-1]?this.grid[o-1][h-1]+this.match_score:this.grid[o-1][h-1]+this.mismatch_penalty,this.grid[o-1][h]+this.gap_penalty,this.grid[o][h-1]+this.gap_penalty],l=this.arrayAllMaxIndexes(a);this.grid[o][h]=a[l[0]],this.tracebackGrid[o][h]=[l.includes(0),l.includes(1),l.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var r=[];for(r.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});r[0];){var n=r[0],o=this.tracebackGrid[n.pos[0]][n.pos[1]];o[0]&&r.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),o[1]&&r.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),o[2]&&r.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),r.shift()}return this.alignments}},{key:"getAllIndexes",value:function(r,n){for(var o=[],h=-1;(h=r.indexOf(n,h+1))!==-1;)o.push(h);return o}},{key:"arrayAllMaxIndexes",value:function(r){return this.getAllIndexes(r,Math.max.apply(null,r))}}]),i}();A.exports=t},function(A,f,p){var e=function(){};e.FDLayout=p(18),e.FDLayoutConstants=p(7),e.FDLayoutEdge=p(19),e.FDLayoutNode=p(20),e.DimensionD=p(21),e.HashMap=p(22),e.HashSet=p(23),e.IGeometry=p(8),e.IMath=p(9),e.Integer=p(10),e.Point=p(12),e.PointD=p(4),e.RandomSeed=p(16),e.RectangleD=p(13),e.Transform=p(17),e.UniqueIDGeneretor=p(14),e.Quicksort=p(24),e.LinkedList=p(11),e.LGraphObject=p(2),e.LGraph=p(5),e.LEdge=p(1),e.LGraphManager=p(6),e.LNode=p(3),e.Layout=p(15),e.LayoutConstants=p(0),e.NeedlemanWunsch=p(25),A.exports=e},function(A,f,p){function e(){this.listeners=[]}var t=e.prototype;t.addListener=function(i,r){this.listeners.push({event:i,callback:r})},t.removeListener=function(i,r){for(var n=this.listeners.length;n>=0;n--){var o=this.listeners[n];o.event===i&&o.callback===r&&this.listeners.splice(n,1)}},t.emit=function(i,r){for(var n=0;n<this.listeners.length;n++){var o=this.listeners[n];i===o.event&&o.callback(r)}},A.exports=e}])},lt.exports=N());var N}var gt,ct,ut,wt=(ct||(ct=1,ut=function(N){return function(A){var f={};function p(e){if(f[e])return f[e].exports;var t=f[e]={i:e,l:!1,exports:{}};return A[e].call(t.exports,t,t.exports,p),t.l=!0,t.exports}return p.m=A,p.c=f,p.i=function(e){return e},p.d=function(e,t,i){p.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},p.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(t,"a",t),t},p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p.p="",p(p.s=1)}([function(A,f){A.exports=N},function(A,f,p){var e=p(0).layoutBase.LayoutConstants,t=p(0).layoutBase.FDLayoutConstants,i=p(0).CoSEConstants,r=p(0).CoSELayout,n=p(0).CoSENode,o=p(0).layoutBase.PointD,h=p(0).layoutBase.DimensionD,a={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function l(g){this.options=function(_,L){var v={};for(var T in _)v[T]=_[T];for(var T in L)v[T]=L[T];return v}(a,g),E(this.options)}var E=function(g){g.nodeRepulsion!=null&&(i.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=g.nodeRepulsion),g.idealEdgeLength!=null&&(i.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=g.idealEdgeLength),g.edgeElasticity!=null&&(i.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=g.edgeElasticity),g.nestingFactor!=null&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.nestingFactor),g.gravity!=null&&(i.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=g.gravity),g.numIter!=null&&(i.MAX_ITERATIONS=t.MAX_ITERATIONS=g.numIter),g.gravityRange!=null&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=g.gravityRange),g.gravityCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.gravityCompound),g.gravityRangeCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.gravityRangeCompound),g.initialEnergyOnIncremental!=null&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.initialEnergyOnIncremental),g.quality=="draft"?e.QUALITY=0:g.quality=="proof"?e.QUALITY=2:e.QUALITY=1,i.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=g.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=!g.randomize,i.ANIMATE=t.ANIMATE=e.ANIMATE=g.animate,i.TILE=g.tile,i.TILING_PADDING_VERTICAL=typeof g.tilingPaddingVertical=="function"?g.tilingPaddingVertical.call():g.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof g.tilingPaddingHorizontal=="function"?g.tilingPaddingHorizontal.call():g.tilingPaddingHorizontal};l.prototype.run=function(){var g,_,L=this.options;this.idToLNode={};var v=this.layout=new r,T=this;T.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var u=v.newGraphManager();this.gm=u;var I=this.options.eles.nodes(),s=this.options.eles.edges();this.root=u.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(I),v);for(var c=0;c<s.length;c++){var d=s[c],y=this.idToLNode[d.data("source")],O=this.idToLNode[d.data("target")];y!==O&&y.getEdgesBetween(O).length==0&&(u.add(v.newEdge(),y,O).id=d.id())}var D=function(R,C){typeof R=="number"&&(R=C);var M=R.data("id"),S=T.idToLNode[M];return{x:S.getRect().getCenterX(),y:S.getRect().getCenterY()}},w=function R(){for(var C,M=function(){L.fit&&L.cy.fit(L.eles,L.padding),g||(g=!0,T.cy.one("layoutready",L.ready),T.cy.trigger({type:"layoutready",layout:T}))},S=T.options.refresh,G=0;G<S&&!C;G++)C=T.stopped||T.layout.tick();if(C)return v.checkLayoutSuccess()&&!v.isSubLayout&&v.doPostLayout(),v.tilingPostLayout&&v.tilingPostLayout(),v.isLayoutFinished=!0,T.options.eles.nodes().positions(D),M(),T.cy.one("layoutstop",T.options.stop),T.cy.trigger({type:"layoutstop",layout:T}),_&&cancelAnimationFrame(_),void(g=!1);var Y=T.layout.getPositionsData();L.eles.nodes().positions(function(F,P){if(typeof F=="number"&&(F=P),!F.isParent()){for(var b=F.id(),k=Y[b],U=F;k==null&&(k=Y[U.data("parent")]||Y["DummyCompound_"+U.data("parent")],Y[b]=k,(U=U.parent()[0])!=null););return k!=null?{x:k.x,y:k.y}:{x:F.position("x"),y:F.position("y")}}}),M(),_=requestAnimationFrame(R)};return v.addListener("layoutstarted",function(){T.options.animate==="during"&&(_=requestAnimationFrame(w))}),v.runLayout(),this.options.animate!=="during"&&(T.options.eles.nodes().not(":parent").layoutPositions(T,T.options,D),g=!1),this},l.prototype.getTopMostNodes=function(g){for(var _={},L=0;L<g.length;L++)_[g[L].id()]=!0;var v=g.filter(function(T,u){typeof T=="number"&&(T=u);for(var I=T.parent()[0];I!=null;){if(_[I.id()])return!1;I=I.parent()[0]}return!0});return v},l.prototype.processChildrenList=function(g,_,L){for(var v=_.length,T=0;T<v;T++){var u,I,s=_[T],c=s.children(),d=s.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if((u=s.outerWidth()!=null&&s.outerHeight()!=null?g.add(new n(L.graphManager,new o(s.position("x")-d.w/2,s.position("y")-d.h/2),new h(parseFloat(d.w),parseFloat(d.h)))):g.add(new n(this.graphManager))).id=s.data("id"),u.paddingLeft=parseInt(s.css("padding")),u.paddingTop=parseInt(s.css("padding")),u.paddingRight=parseInt(s.css("padding")),u.paddingBottom=parseInt(s.css("padding")),this.options.nodeDimensionsIncludeLabels&&s.isParent()){var y=s.boundingBox({includeLabels:!0,includeNodes:!1}).w,O=s.boundingBox({includeLabels:!0,includeNodes:!1}).h,D=s.css("text-halign");u.labelWidth=y,u.labelHeight=O,u.labelPos=D}this.idToLNode[s.data("id")]=u,isNaN(u.rect.x)&&(u.rect.x=0),isNaN(u.rect.y)&&(u.rect.y=0),c!=null&&c.length>0&&(I=L.getGraphManager().add(L.newGraph(),u),this.processChildrenList(I,c,L))}},l.prototype.stop=function(){return this.stopped=!0,this};var m=function(g){g("layout","cose-bilkent",l)};typeof cytoscape<"u"&&m(cytoscape),A.exports=m}])},at.exports=ut(function(){return gt?ht.exports:(gt=1,N=function(A){return function(f){var p={};function e(t){if(p[t])return p[t].exports;var i=p[t]={i:t,l:!1,exports:{}};return f[t].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=f,e.c=p,e.i=function(t){return t},e.d=function(t,i,r){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="",e(e.s=7)}([function(f,p){f.exports=A},function(f,p,e){var t=e(0).FDLayoutConstants;function i(){}for(var r in t)i[r]=t[r];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=t.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,f.exports=i},function(f,p,e){var t=e(0).FDLayoutEdge;function i(n,o,h){t.call(this,n,o,h)}for(var r in i.prototype=Object.create(t.prototype),t)i[r]=t[r];f.exports=i},function(f,p,e){var t=e(0).LGraph;function i(n,o,h){t.call(this,n,o,h)}for(var r in i.prototype=Object.create(t.prototype),t)i[r]=t[r];f.exports=i},function(f,p,e){var t=e(0).LGraphManager;function i(n){t.call(this,n)}for(var r in i.prototype=Object.create(t.prototype),t)i[r]=t[r];f.exports=i},function(f,p,e){var t=e(0).FDLayoutNode,i=e(0).IMath;function r(o,h,a,l){t.call(this,o,h,a,l)}for(var n in r.prototype=Object.create(t.prototype),t)r[n]=t[n];r.prototype.move=function(){var o=this.graphManager.getLayout();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*i.sign(this.displacementX)),Math.abs(this.displacementY)>o.coolingFactor*o.maxNodeDisplacement&&(this.displacementY=o.coolingFactor*o.maxNodeDisplacement*i.sign(this.displacementY)),this.child==null||this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(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},r.prototype.propogateDisplacementToChildren=function(o,h){for(var a,l=this.getChild().getNodes(),E=0;E<l.length;E++)(a=l[E]).getChild()==null?(a.moveBy(o,h),a.displacementX+=o,a.displacementY+=h):a.propogateDisplacementToChildren(o,h)},r.prototype.setPred1=function(o){this.pred1=o},r.prototype.getPred1=function(){return pred1},r.prototype.getPred2=function(){return pred2},r.prototype.setNext=function(o){this.next=o},r.prototype.getNext=function(){return next},r.prototype.setProcessed=function(o){this.processed=o},r.prototype.isProcessed=function(){return processed},f.exports=r},function(f,p,e){var t=e(0).FDLayout,i=e(4),r=e(3),n=e(5),o=e(2),h=e(1),a=e(0).FDLayoutConstants,l=e(0).LayoutConstants,E=e(0).Point,m=e(0).PointD,g=e(0).Layout,_=e(0).Integer,L=e(0).IGeometry,v=e(0).LGraph,T=e(0).Transform;function u(){t.call(this),this.toBeTiled={}}for(var I in u.prototype=Object.create(t.prototype),t)u[I]=t[I];u.prototype.newGraphManager=function(){var s=new i(this);return this.graphManager=s,s},u.prototype.newGraph=function(s){return new r(null,this.graphManager,s)},u.prototype.newNode=function(s){return new n(this.graphManager,s)},u.prototype.newEdge=function(s){return new o(null,null,s)},u.prototype.initParameters=function(){t.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=a.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=a.DEFAULT_REPULSION_STRENGTH,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.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/a.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=a.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},u.prototype.layout=function(){return l.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},u.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)h.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),c=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(y){return c.has(y)}),this.graphManager.setAllNodesToApplyGravitation(d));else{var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var c=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(y){return c.has(y)});this.graphManager.setAllNodesToApplyGravitation(d),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},u.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%a.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!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 s=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(O){return s.has(O)});this.graphManager.setAllNodesToApplyGravitation(c),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var d=!this.isTreeGrowing&&!this.isGrowthFinished,y=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(d,y),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},u.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),c={},d=0;d<s.length;d++){var y=s[d].rect,O=s[d].id;c[O]={id:O,x:y.getCenterX(),y:y.getCenterY(),w:y.width,h:y.height}}return c},u.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(a.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},u.prototype.calculateNodesToApplyGravitationTo=function(){var s,c,d=[],y=this.graphManager.getGraphs(),O=y.length;for(c=0;c<O;c++)(s=y[c]).updateConnected(),s.isConnected||(d=d.concat(s.getNodes()));return d},u.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var c,d=new Set;for(c=0;c<s.length;c++){var y=s[c];if(!d.has(y)){var O=y.getSource(),D=y.getTarget();if(O==D)y.getBendpoints().push(new m),y.getBendpoints().push(new m),this.createDummyNodesForBendpoints(y),d.add(y);else{var w=[];if(w=(w=w.concat(O.getEdgeListToNode(D))).concat(D.getEdgeListToNode(O)),!d.has(w[0])){var R;if(w.length>1)for(R=0;R<w.length;R++){var C=w[R];C.getBendpoints().push(new m),this.createDummyNodesForBendpoints(C)}w.forEach(function(M){d.add(M)})}}}if(d.size==s.length)break}},u.prototype.positionNodesRadially=function(s){for(var c=new E(0,0),d=Math.ceil(Math.sqrt(s.length)),y=0,O=0,D=0,w=new m(0,0),R=0;R<s.length;R++){R%d==0&&(D=0,O=y,R!=0&&(O+=h.DEFAULT_COMPONENT_SEPERATION),y=0);var C=s[R],M=g.findCenterOfTree(C);c.x=D,c.y=O,(w=u.radialLayout(C,M,c)).y>y&&(y=Math.floor(w.y)),D=Math.floor(w.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new m(l.WORLD_CENTER_X-w.x/2,l.WORLD_CENTER_Y-w.y/2))},u.radialLayout=function(s,c,d){var y=Math.max(this.maxDiagonalInTree(s),h.DEFAULT_RADIAL_SEPARATION);u.branchRadialLayout(c,null,0,359,0,y);var O=v.calculateBounds(s),D=new T;D.setDeviceOrgX(O.getMinX()),D.setDeviceOrgY(O.getMinY()),D.setWorldOrgX(d.x),D.setWorldOrgY(d.y);for(var w=0;w<s.length;w++)s[w].transform(D);var R=new m(O.getMaxX(),O.getMaxY());return D.inverseTransformPoint(R)},u.branchRadialLayout=function(s,c,d,y,O,D){var w=(y-d+1)/2;w<0&&(w+=180);var R=(w+d)%360*L.TWO_PI/360,C=O*Math.cos(R),M=O*Math.sin(R);s.setCenter(C,M);var S=[],G=(S=S.concat(s.getEdges())).length;c!=null&&G--;for(var Y,F=0,P=S.length,b=s.getEdgesBetween(c);b.length>1;){var k=b[0];b.splice(0,1);var U=S.indexOf(k);U>=0&&S.splice(U,1),P--,G--}Y=c!=null?(S.indexOf(b[0])+1)%P:0;for(var q=Math.abs(y-d)/G,W=Y;F!=G;W=++W%P){var B=S[W].getOtherEnd(s);if(B!=c){var Z=(d+F*q)%360,V=(Z+q)%360;u.branchRadialLayout(B,s,Z,V,O+D,D),F++}}},u.maxDiagonalInTree=function(s){for(var c=_.MIN_VALUE,d=0;d<s.length;d++){var y=s[d].getDiagonal();y>c&&(c=y)}return c},u.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},u.prototype.groupZeroDegreeMembers=function(){var s=this,c={};this.memberGroups={},this.idToDummyNode={};for(var d=[],y=this.graphManager.getAllNodes(),O=0;O<y.length;O++){var D=(w=y[O]).getParent();this.getNodeDegreeWithChildren(w)!==0||D.id!=null&&this.getToBeTiled(D)||d.push(w)}for(O=0;O<d.length;O++){var w,R=(w=d[O]).getParent().id;c[R]===void 0&&(c[R]=[]),c[R]=c[R].concat(w)}Object.keys(c).forEach(function(C){if(c[C].length>1){var M="DummyCompound_"+C;s.memberGroups[M]=c[C];var S=c[C][0].getParent(),G=new n(s.graphManager);G.id=M,G.paddingLeft=S.paddingLeft||0,G.paddingRight=S.paddingRight||0,G.paddingBottom=S.paddingBottom||0,G.paddingTop=S.paddingTop||0,s.idToDummyNode[M]=G;var Y=s.getGraphManager().add(s.newGraph(),G),F=S.getChild();F.add(G);for(var P=0;P<c[C].length;P++){var b=c[C][P];F.remove(b),Y.add(b)}}})},u.prototype.clearCompounds=function(){var s={},c={};this.performDFSOnCompounds();for(var d=0;d<this.compoundOrder.length;d++)c[this.compoundOrder[d].id]=this.compoundOrder[d],s[this.compoundOrder[d].id]=[].concat(this.compoundOrder[d].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[d].getChild()),this.compoundOrder[d].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,c)},u.prototype.clearZeroDegreeMembers=function(){var s=this,c=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(d){var y=s.idToDummyNode[d];c[d]=s.tileNodes(s.memberGroups[d],y.paddingLeft+y.paddingRight),y.rect.width=c[d].width,y.rect.height=c[d].height})},u.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var c=this.compoundOrder[s],d=c.id,y=c.paddingLeft,O=c.paddingTop;this.adjustLocations(this.tiledMemberPack[d],c.rect.x,c.rect.y,y,O)}},u.prototype.repopulateZeroDegreeMembers=function(){var s=this,c=this.tiledZeroDegreePack;Object.keys(c).forEach(function(d){var y=s.idToDummyNode[d],O=y.paddingLeft,D=y.paddingTop;s.adjustLocations(c[d],y.rect.x,y.rect.y,O,D)})},u.prototype.getToBeTiled=function(s){var c=s.id;if(this.toBeTiled[c]!=null)return this.toBeTiled[c];var d=s.getChild();if(d==null)return this.toBeTiled[c]=!1,!1;for(var y=d.getNodes(),O=0;O<y.length;O++){var D=y[O];if(this.getNodeDegree(D)>0)return this.toBeTiled[c]=!1,!1;if(D.getChild()!=null){if(!this.getToBeTiled(D))return this.toBeTiled[c]=!1,!1}else this.toBeTiled[D.id]=!1}return this.toBeTiled[c]=!0,!0},u.prototype.getNodeDegree=function(s){s.id;for(var c=s.getEdges(),d=0,y=0;y<c.length;y++){var O=c[y];O.getSource().id!==O.getTarget().id&&(d+=1)}return d},u.prototype.getNodeDegreeWithChildren=function(s){var c=this.getNodeDegree(s);if(s.getChild()==null)return c;for(var d=s.getChild().getNodes(),y=0;y<d.length;y++){var O=d[y];c+=this.getNodeDegreeWithChildren(O)}return c},u.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},u.prototype.fillCompexOrderByDFS=function(s){for(var c=0;c<s.length;c++){var d=s[c];d.getChild()!=null&&this.fillCompexOrderByDFS(d.getChild().getNodes()),this.getToBeTiled(d)&&this.compoundOrder.push(d)}},u.prototype.adjustLocations=function(s,c,d,y,O){d+=O;for(var D=c+=y,w=0;w<s.rows.length;w++){var R=s.rows[w];c=D;for(var C=0,M=0;M<R.length;M++){var S=R[M];S.rect.x=c,S.rect.y=d,c+=S.rect.width+s.horizontalPadding,S.rect.height>C&&(C=S.rect.height)}d+=C+s.verticalPadding}},u.prototype.tileCompoundMembers=function(s,c){var d=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(y){var O=c[y];d.tiledMemberPack[y]=d.tileNodes(s[y],O.paddingLeft+O.paddingRight),O.rect.width=d.tiledMemberPack[y].width,O.rect.height=d.tiledMemberPack[y].height})},u.prototype.tileNodes=function(s,c){var d={rows:[],rowWidth:[],rowHeight:[],width:0,height:c,verticalPadding:h.TILING_PADDING_VERTICAL,horizontalPadding:h.TILING_PADDING_HORIZONTAL};s.sort(function(D,w){return D.rect.width*D.rect.height>w.rect.width*w.rect.height?-1:D.rect.width*D.rect.height<w.rect.width*w.rect.height?1:0});for(var y=0;y<s.length;y++){var O=s[y];d.rows.length==0?this.insertNodeToRow(d,O,0,c):this.canAddHorizontal(d,O.rect.width,O.rect.height)?this.insertNodeToRow(d,O,this.getShortestRowIndex(d),c):this.insertNodeToRow(d,O,d.rows.length,c),this.shiftToLastRow(d)}return d},u.prototype.insertNodeToRow=function(s,c,d,y){var O=y;d==s.rows.length&&(s.rows.push([]),s.rowWidth.push(O),s.rowHeight.push(0));var D=s.rowWidth[d]+c.rect.width;s.rows[d].length>0&&(D+=s.horizontalPadding),s.rowWidth[d]=D,s.width<D&&(s.width=D);var w=c.rect.height;d>0&&(w+=s.verticalPadding);var R=0;w>s.rowHeight[d]&&(R=s.rowHeight[d],s.rowHeight[d]=w,R=s.rowHeight[d]-R),s.height+=R,s.rows[d].push(c)},u.prototype.getShortestRowIndex=function(s){for(var c=-1,d=Number.MAX_VALUE,y=0;y<s.rows.length;y++)s.rowWidth[y]<d&&(c=y,d=s.rowWidth[y]);return c},u.prototype.getLongestRowIndex=function(s){for(var c=-1,d=Number.MIN_VALUE,y=0;y<s.rows.length;y++)s.rowWidth[y]>d&&(c=y,d=s.rowWidth[y]);return c},u.prototype.canAddHorizontal=function(s,c,d){var y=this.getShortestRowIndex(s);if(y<0)return!0;var O=s.rowWidth[y];if(O+s.horizontalPadding+c<=s.width)return!0;var D,w,R=0;return s.rowHeight[y]<d&&y>0&&(R=d+s.verticalPadding-s.rowHeight[y]),D=s.width-O>=c+s.horizontalPadding?(s.height+R)/(O+c+s.horizontalPadding):(s.height+R)/s.width,R=d+s.verticalPadding,(w=s.width<c?(s.height+R)/c:(s.height+R)/s.width)<1&&(w=1/w),D<1&&(D=1/D),D<w},u.prototype.shiftToLastRow=function(s){var c=this.getLongestRowIndex(s),d=s.rowWidth.length-1,y=s.rows[c],O=y[y.length-1],D=O.width+s.horizontalPadding;if(s.width-s.rowWidth[d]>D&&c!=d){y.splice(-1,1),s.rows[d].push(O),s.rowWidth[c]=s.rowWidth[c]-D,s.rowWidth[d]=s.rowWidth[d]+D,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var w=Number.MIN_VALUE,R=0;R<y.length;R++)y[R].height>w&&(w=y[R].height);c>0&&(w+=s.verticalPadding);var C=s.rowHeight[c]+s.rowHeight[d];s.rowHeight[c]=w,s.rowHeight[d]<O.height+s.verticalPadding&&(s.rowHeight[d]=O.height+s.verticalPadding);var M=s.rowHeight[c]+s.rowHeight[d];s.height+=M-C,this.shiftToLastRow(s)}},u.prototype.tilingPreLayout=function(){h.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},u.prototype.tilingPostLayout=function(){h.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},u.prototype.reduceTrees=function(){for(var s,c=[],d=!0;d;){var y=this.graphManager.getAllNodes(),O=[];d=!1;for(var D=0;D<y.length;D++)(s=y[D]).getEdges().length!=1||s.getEdges()[0].isInterGraph||s.getChild()!=null||(O.push([s,s.getEdges()[0],s.getOwner()]),d=!0);if(d==1){for(var w=[],R=0;R<O.length;R++)O[R][0].getEdges().length==1&&(w.push(O[R]),O[R][0].getOwner().remove(O[R][0]));c.push(w),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=c},u.prototype.growTree=function(s){for(var c,d=s[s.length-1],y=0;y<d.length;y++)c=d[y],this.findPlaceforPrunedNode(c),c[2].add(c[0]),c[2].add(c[1],c[1].source,c[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},u.prototype.findPlaceforPrunedNode=function(s){var c,d,y=s[0],O=(d=y==s[1].source?s[1].target:s[1].source).startX,D=d.finishX,w=d.startY,R=d.finishY,C=[0,0,0,0];if(w>0)for(var M=O;M<=D;M++)C[0]+=this.grid[M][w-1].length+this.grid[M][w].length-1;if(D<this.grid.length-1)for(M=w;M<=R;M++)C[1]+=this.grid[D+1][M].length+this.grid[D][M].length-1;if(R<this.grid[0].length-1)for(M=O;M<=D;M++)C[2]+=this.grid[M][R+1].length+this.grid[M][R].length-1;if(O>0)for(M=w;M<=R;M++)C[3]+=this.grid[O-1][M].length+this.grid[O][M].length-1;for(var S,G,Y=_.MAX_VALUE,F=0;F<C.length;F++)C[F]<Y?(Y=C[F],S=1,G=F):C[F]==Y&&S++;if(S==3&&Y==0)C[0]==0&&C[1]==0&&C[2]==0?c=1:C[0]==0&&C[1]==0&&C[3]==0?c=0:C[0]==0&&C[2]==0&&C[3]==0?c=3:C[1]==0&&C[2]==0&&C[3]==0&&(c=2);else if(S==2&&Y==0){var P=Math.floor(2*Math.random());c=C[0]==0&&C[1]==0?P==0?0:1:C[0]==0&&C[2]==0?P==0?0:2:C[0]==0&&C[3]==0?P==0?0:3:C[1]==0&&C[2]==0?P==0?1:2:C[1]==0&&C[3]==0?P==0?1:3:P==0?2:3}else c=S==4&&Y==0?P=Math.floor(4*Math.random()):G;c==0?y.setCenter(d.getCenterX(),d.getCenterY()-d.getHeight()/2-a.DEFAULT_EDGE_LENGTH-y.getHeight()/2):c==1?y.setCenter(d.getCenterX()+d.getWidth()/2+a.DEFAULT_EDGE_LENGTH+y.getWidth()/2,d.getCenterY()):c==2?y.setCenter(d.getCenterX(),d.getCenterY()+d.getHeight()/2+a.DEFAULT_EDGE_LENGTH+y.getHeight()/2):y.setCenter(d.getCenterX()-d.getWidth()/2-a.DEFAULT_EDGE_LENGTH-y.getWidth()/2,d.getCenterY())},f.exports=u},function(f,p,e){var t={};t.layoutBase=e(0),t.CoSEConstants=e(1),t.CoSEEdge=e(2),t.CoSEGraph=e(3),t.CoSEGraphManager=e(4),t.CoSELayout=e(6),t.CoSENode=e(5),f.exports=t}])},ht.exports=N(It()));var N}())),at.exports);const Rt=Ot(wt);var tt=function(){var N=x(function(u,I,s,c){for(s=s||{},c=u.length;c--;s[u[c]]=I);return s},"o"),A=[1,4],f=[1,13],p=[1,12],e=[1,15],t=[1,16],i=[1,20],r=[1,19],n=[6,7,8],o=[1,26],h=[1,24],a=[1,25],l=[6,7,11],E=[1,6,13,15,16,19,22],m=[1,33],g=[1,34],_=[1,6,7,11,13,15,16,19,22],L={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:x(function(u,I,s,c,d,y,O){var D=y.length-1;switch(d){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",y[D].id),c.addNode(y[D-1].length,y[D].id,y[D].descr,y[D].type);break;case 16:c.getLogger().trace("Icon: ",y[D]),c.decorateNode({icon:y[D]});break;case 17:case 21:c.decorateNode({class:y[D]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",y[D].id),c.addNode(0,y[D].id,y[D].descr,y[D].type);break;case 20:c.decorateNode({icon:y[D]});break;case 25:c.getLogger().trace("node found ..",y[D-2]),this.$={id:y[D-1],descr:y[D-1],type:c.getType(y[D-2],y[D])};break;case 26:this.$={id:y[D],descr:y[D],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",y[D-3]),this.$={id:y[D-3],descr:y[D-1],type:c.getType(y[D-2],y[D])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:A},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:A},{6:f,7:[1,10],9:9,12:11,13:p,14:14,15:e,16:t,17:17,18:18,19:i,22:r},N(n,[2,3]),{1:[2,2]},N(n,[2,4]),N(n,[2,5]),{1:[2,6],6:f,12:21,13:p,14:14,15:e,16:t,17:17,18:18,19:i,22:r},{6:f,9:22,12:11,13:p,14:14,15:e,16:t,17:17,18:18,19:i,22:r},{6:o,7:h,10:23,11:a},N(l,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:i,22:r}),N(l,[2,18]),N(l,[2,19]),N(l,[2,20]),N(l,[2,21]),N(l,[2,23]),N(l,[2,24]),N(l,[2,26],{19:[1,30]}),{20:[1,31]},{6:o,7:h,10:32,11:a},{1:[2,7],6:f,12:21,13:p,14:14,15:e,16:t,17:17,18:18,19:i,22:r},N(E,[2,14],{7:m,11:g}),N(_,[2,8]),N(_,[2,9]),N(_,[2,10]),N(l,[2,15]),N(l,[2,16]),N(l,[2,17]),{20:[1,35]},{21:[1,36]},N(E,[2,13],{7:m,11:g}),N(_,[2,11]),N(_,[2,12]),{21:[1,37]},N(l,[2,25]),N(l,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:x(function(u,I){if(!I.recoverable){var s=new Error(u);throw s.hash=I,s}this.trace(u)},"parseError"),parse:x(function(u){var I=this,s=[0],c=[],d=[null],y=[],O=this.table,D="",w=0,R=0,C=y.slice.call(arguments,1),M=Object.create(this.lexer),S={yy:{}};for(var G in this.yy)Object.prototype.hasOwnProperty.call(this.yy,G)&&(S.yy[G]=this.yy[G]);M.setInput(u,S.yy),S.yy.lexer=M,S.yy.parser=this,M.yylloc===void 0&&(M.yylloc={});var Y=M.yylloc;y.push(Y);var F=M.options&&M.options.ranges;function P(){var $;return typeof($=c.pop()||M.lex()||1)!="number"&&($ instanceof Array&&($=(c=$).pop()),$=I.symbols_[$]||$),$}typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,x(function($){s.length=s.length-2*$,d.length=d.length-$,y.length=y.length-$},"popStack"),x(P,"lex");for(var b,k,U,q,W,B,Z,V,z={};;){if(k=s[s.length-1],this.defaultActions[k]?U=this.defaultActions[k]:(b==null&&(b=P()),U=O[k]&&O[k][b]),U===void 0||!U.length||!U[0]){var nt="";for(W in V=[],O[k])this.terminals_[W]&&W>2&&V.push("'"+this.terminals_[W]+"'");nt=M.showPosition?"Parse error on line "+(w+1)+`:
|
2
|
-
`+M.showPosition()+`
|
3
|
-
Expecting `+V.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(w+1)+": Unexpected "+(b==1?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(nt,{text:M.match,token:this.terminals_[b]||b,line:M.yylineno,loc:Y,expected:V})}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+b);switch(U[0]){case 1:s.push(b),d.push(M.yytext),y.push(M.yylloc),s.push(U[1]),b=null,R=M.yyleng,D=M.yytext,w=M.yylineno,Y=M.yylloc;break;case 2:if(B=this.productions_[U[1]][1],z.$=d[d.length-B],z._$={first_line:y[y.length-(B||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(B||1)].first_column,last_column:y[y.length-1].last_column},F&&(z._$.range=[y[y.length-(B||1)].range[0],y[y.length-1].range[1]]),(q=this.performAction.apply(z,[D,R,w,S.yy,U[1],d,y].concat(C)))!==void 0)return q;B&&(s=s.slice(0,-1*B*2),d=d.slice(0,-1*B),y=y.slice(0,-1*B)),s.push(this.productions_[U[1]][0]),d.push(z.$),y.push(z._$),Z=O[s[s.length-2]][s[s.length-1]],s.push(Z);break;case 3:return!0}}return!0},"parse")},v=function(){return{EOF:1,parseError:x(function(u,I){if(!this.yy.parser)throw new Error(u);this.yy.parser.parseError(u,I)},"parseError"),setInput:x(function(u,I){return this.yy=I||this.yy||{},this._input=u,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var u=this._input[0];return this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u,u.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},"input"),unput:x(function(u){var I=u.length,s=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-I),this.offset-=I;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===c.length?this.yylloc.first_column:0)+c[c.length-s.length].length-s[0].length:this.yylloc.first_column-I},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-I]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
4
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:x(function(u){this.unput(this.match.slice(u))},"less"),pastInput:x(function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var u=this.pastInput(),I=new Array(u.length+1).join("-");return u+this.upcomingInput()+`
|
5
|
-
`+I+"^"},"showPosition"),test_match:x(function(u,I){var s,c,d;if(this.options.backtrack_lexer&&(d={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(d.yylloc.range=this.yylloc.range.slice(0))),(c=u[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=c.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(u[0].length),this.matched+=u[0],s=this.performAction.call(this,this.yy,this,I,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var y in d)this[y]=d[y];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;var u,I,s,c;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),y=0;y<d.length;y++)if((s=this._input.match(this.rules[d[y]]))&&(!I||s[0].length>I[0].length)){if(I=s,c=y,this.options.backtrack_lexer){if((u=this.test_match(s,d[y]))!==!1)return u;if(this._backtrack){I=!1;continue}return!1}if(!this.options.flex)break}return I?(u=this.test_match(I,d[c]))!==!1&&u:this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var u=this.next();return u||this.lex()},"lex"),begin:x(function(u){this.conditionStack.push(u)},"begin"),popState:x(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(u){return(u=this.conditionStack.length-1-Math.abs(u||0))>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:x(function(u){this.begin(u)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(u,I,s,c){switch(s){case 0:return u.getLogger().trace("Found comment",I.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:u.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return u.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:u.getLogger().trace("end icon"),this.popState();break;case 10:return u.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return u.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return u.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return u.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:u.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return u.getLogger().trace("description:",I.yytext),"NODE_DESCR";case 27:return this.popState(),u.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),u.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),u.getLogger().trace("node end ...",I.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),u.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),u.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return u.getLogger().trace("Long description:",I.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}}();function T(){this.yy={}}return L.lexer=v,x(T,"Parser"),T.prototype=L,L.Parser=T,new T}();tt.parser=tt;var Ct=tt,H=[],dt=0,et={},Mt=x(()=>{H=[],dt=0,et={}},"clear"),xt=x(function(N){for(let A=H.length-1;A>=0;A--)if(H[A].level<N)return H[A];return null},"getParent"),St=x(()=>H.length>0?H[0]:null,"getMindmap"),Gt=x((N,A,f,p)=>{var n,o;j.info("addNode",N,A,f,p);const e=J();let t=((n=e.mindmap)==null?void 0:n.padding)??Q.mindmap.padding;switch(p){case X.ROUNDED_RECT:case X.RECT:case X.HEXAGON:t*=2}const i={id:dt++,nodeId:K(A,e),level:N,descr:K(f,e),type:p,children:[],width:((o=e.mindmap)==null?void 0:o.maxNodeWidth)??Q.mindmap.maxNodeWidth,padding:t},r=xt(N);if(r)r.children.push(i),H.push(i);else{if(H.length!==0)throw new Error('There can be only one root. No parent could be found for ("'+i.descr+'")');H.push(i)}},"addNode"),X={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},bt={clear:Mt,addNode:Gt,getMindmap:St,nodeType:X,getType:x((N,A)=>{switch(j.debug("In get type",N,A),N){case"[":return X.RECT;case"(":return A===")"?X.ROUNDED_RECT:X.CLOUD;case"((":return X.CIRCLE;case")":return X.CLOUD;case"))":return X.BANG;case"{{":return X.HEXAGON;default:return X.DEFAULT}},"getType"),setElementForId:x((N,A)=>{et[N]=A},"setElementForId"),decorateNode:x(N=>{if(!N)return;const A=J(),f=H[H.length-1];N.icon&&(f.icon=K(N.icon,A)),N.class&&(f.class=K(N.class,A))},"decorateNode"),type2Str:x(N=>{switch(N){case X.DEFAULT:return"no-border";case X.RECT:return"rect";case X.ROUNDED_RECT:return"rounded-rect";case X.CIRCLE:return"circle";case X.CLOUD:return"cloud";case X.BANG:return"bang";case X.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:x(()=>j,"getLogger"),getElementById:x(N=>et[N],"getElementById")},Ft=x(function(N,A,f,p){A.append("path").attr("id","node-"+f.id).attr("class","node-bkg node-"+N.type2Str(f.type)).attr("d",`M0 ${f.height-5} v${10-f.height} q0,-5 5,-5 h${f.width-10} q5,0 5,5 v${f.height-5} H0 Z`),A.append("line").attr("class","node-line-"+p).attr("x1",0).attr("y1",f.height).attr("x2",f.width).attr("y2",f.height)},"defaultBkg"),Pt=x(function(N,A,f){A.append("rect").attr("id","node-"+f.id).attr("class","node-bkg node-"+N.type2Str(f.type)).attr("height",f.height).attr("width",f.width)},"rectBkg"),Ut=x(function(N,A,f){const p=f.width,e=f.height,t=.15*p,i=.25*p,r=.35*p,n=.2*p;A.append("path").attr("id","node-"+f.id).attr("class","node-bkg node-"+N.type2Str(f.type)).attr("d",`M0 0 a${t},${t} 0 0,1 ${.25*p},${-1*p*.1}
|
7
|
-
a${r},${r} 1 0,1 ${.4*p},${-1*p*.1}
|
8
|
-
a${i},${i} 1 0,1 ${.35*p},${1*p*.2}
|
9
|
-
|
10
|
-
a${t},${t} 1 0,1 ${.15*p},${1*e*.35}
|
11
|
-
a${n},${n} 1 0,1 ${-1*p*.15},${1*e*.65}
|
12
|
-
|
13
|
-
a${i},${t} 1 0,1 ${-1*p*.25},${.15*p}
|
14
|
-
a${r},${r} 1 0,1 ${-1*p*.5},0
|
15
|
-
a${t},${t} 1 0,1 ${-1*p*.25},${-1*p*.15}
|
16
|
-
|
17
|
-
a${t},${t} 1 0,1 ${-1*p*.1},${-1*e*.35}
|
18
|
-
a${n},${n} 1 0,1 ${.1*p},${-1*e*.65}
|
19
|
-
|
20
|
-
H0 V0 Z`)},"cloudBkg"),Yt=x(function(N,A,f){const p=f.width,e=f.height,t=.15*p;A.append("path").attr("id","node-"+f.id).attr("class","node-bkg node-"+N.type2Str(f.type)).attr("d",`M0 0 a${t},${t} 1 0,0 ${.25*p},${-1*e*.1}
|
21
|
-
a${t},${t} 1 0,0 ${.25*p},0
|
22
|
-
a${t},${t} 1 0,0 ${.25*p},0
|
23
|
-
a${t},${t} 1 0,0 ${.25*p},${1*e*.1}
|
24
|
-
|
25
|
-
a${t},${t} 1 0,0 ${.15*p},${1*e*.33}
|
26
|
-
a${.8*t},${.8*t} 1 0,0 0,${1*e*.34}
|
27
|
-
a${t},${t} 1 0,0 ${-1*p*.15},${1*e*.33}
|
28
|
-
|
29
|
-
a${t},${t} 1 0,0 ${-1*p*.25},${.15*e}
|
30
|
-
a${t},${t} 1 0,0 ${-1*p*.25},0
|
31
|
-
a${t},${t} 1 0,0 ${-1*p*.25},0
|
32
|
-
a${t},${t} 1 0,0 ${-1*p*.25},${-1*e*.15}
|
33
|
-
|
34
|
-
a${t},${t} 1 0,0 ${-1*p*.1},${-1*e*.33}
|
35
|
-
a${.8*t},${.8*t} 1 0,0 0,${-1*e*.34}
|
36
|
-
a${t},${t} 1 0,0 ${.1*p},${-1*e*.33}
|
37
|
-
|
38
|
-
H0 V0 Z`)},"bangBkg"),kt=x(function(N,A,f){A.append("circle").attr("id","node-"+f.id).attr("class","node-bkg node-"+N.type2Str(f.type)).attr("r",f.width/2)},"circleBkg");function pt(N,A,f,p,e){return N.insert("polygon",":first-child").attr("points",p.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+(e.width-A)/2+", "+f+")")}x(pt,"insertPolygonShape");var Xt=x(function(N,A,f){const p=f.height,e=p/4,t=f.width-f.padding+2*e;pt(A,t,p,[{x:e,y:0},{x:t-e,y:0},{x:t,y:-p/2},{x:t-e,y:-p},{x:e,y:-p},{x:0,y:-p/2}],f)},"hexagonBkg"),Bt=x(function(N,A,f){A.append("rect").attr("id","node-"+f.id).attr("class","node-bkg node-"+N.type2Str(f.type)).attr("height",f.height).attr("rx",f.padding).attr("ry",f.padding).attr("width",f.width)},"roundedRectBkg"),$t=x(async function(N,A,f,p,e){const t=e.htmlLabels,i=p%11,r=A.append("g");f.section=i;let n="section-"+i;i<0&&(n+=" section-root"),r.attr("class",(f.class?f.class+" ":"")+"mindmap-node "+n);const o=r.append("g"),h=r.append("g"),a=f.descr.replace(/(<br\/*>)/g,`
|
39
|
-
`);await Tt(h,a,{useHtmlLabels:t,width:f.width,classes:"mindmap-node-label"},e),t||h.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");const l=h.node().getBBox(),[E]=Lt(e.fontSize);if(f.height=l.height+1.1*E*.5+f.padding,f.width=l.width+2*f.padding,f.icon)if(f.type===N.nodeType.CIRCLE)f.height+=50,f.width+=50,r.append("foreignObject").attr("height","50px").attr("width",f.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+i+" "+f.icon),h.attr("transform","translate("+f.width/2+", "+(f.height/2-1.5*f.padding)+")");else{f.width+=50;const m=f.height;f.height=Math.max(m,60);const g=Math.abs(f.height-m);r.append("foreignObject").attr("width","60px").attr("height",f.height).attr("style","text-align: center;margin-top:"+g/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+i+" "+f.icon),h.attr("transform","translate("+(25+f.width/2)+", "+(g/2+f.padding/2)+")")}else if(t){const m=(f.width-l.width)/2,g=(f.height-l.height)/2;h.attr("transform","translate("+m+", "+g+")")}else{const m=f.width/2,g=f.padding/2;h.attr("transform","translate("+m+", "+g+")")}switch(f.type){case N.nodeType.DEFAULT:Ft(N,o,f,i);break;case N.nodeType.ROUNDED_RECT:Bt(N,o,f,i);break;case N.nodeType.RECT:Pt(N,o,f,i);break;case N.nodeType.CIRCLE:o.attr("transform","translate("+f.width/2+", "+ +f.height/2+")"),kt(N,o,f,i);break;case N.nodeType.CLOUD:Ut(N,o,f,i);break;case N.nodeType.BANG:Yt(N,o,f,i);break;case N.nodeType.HEXAGON:Xt(N,o,f,i)}return N.setElementForId(f.id,r),f.height},"drawNode"),Ht=x(function(N,A){const f=N.getElementById(A.id),p=A.x||0,e=A.y||0;f.attr("transform","translate("+p+","+e+")")},"positionNode");async function it(N,A,f,p,e){await $t(N,A,f,p,e),f.children&&await Promise.all(f.children.map((t,i)=>it(N,A,t,p<0?i:p,e)))}function ft(N,A){A.edges().map((f,p)=>{const e=f.data();if(f[0]._private.bodyBounds){const t=f[0]._private.rscratch;j.trace("Edge: ",p,e),N.insert("path").attr("d",`M ${t.startX},${t.startY} L ${t.midX},${t.midY} L${t.endX},${t.endY} `).attr("class","edge section-edge-"+e.section+" edge-depth-"+e.depth)}})}function rt(N,A,f,p){A.add({group:"nodes",data:{id:N.id.toString(),labelText:N.descr,height:N.height,width:N.width,level:p,nodeId:N.id,padding:N.padding,type:N.type},position:{x:N.x,y:N.y}}),N.children&&N.children.forEach(e=>{rt(e,A,f,p+1),A.add({group:"edges",data:{id:`${N.id}_${e.id}`,source:N.id,target:e.id,depth:p,section:e.section}})})}function yt(N,A){return new Promise(f=>{const p=Dt("body").append("div").attr("id","cy").attr("style","display:none"),e=ot({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});p.remove(),rt(N,e,A,0),e.nodes().forEach(function(t){t.layoutDimensions=()=>{const i=t.data();return{w:i.width,h:i.height}}}),e.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),e.ready(t=>{j.info("Ready",t),f(e)})})}function Et(N,A){A.nodes().map((f,p)=>{const e=f.data();e.x=f.position().x,e.y=f.position().y,Ht(N,e);const t=N.getElementById(e.nodeId);j.info("Id:",p,"Position: (",f.position().x,", ",f.position().y,")",e),t.attr("transform",`translate(${f.position().x-e.width/2}, ${f.position().y-e.height/2})`),t.attr("attr",`apa-${p})`)})}ot.use(Rt),x(it,"drawNodes"),x(ft,"drawEdges"),x(rt,"addNodes"),x(yt,"layoutMindmap"),x(Et,"positionNodes");var Wt={draw:x(async(N,A,f,p)=>{var a,l;j.debug(`Rendering mindmap diagram
|
40
|
-
`+N);const e=p.db,t=e.getMindmap();if(!t)return;const i=J();i.htmlLabels=!1;const r=mt(A),n=r.append("g");n.attr("class","mindmap-edges");const o=r.append("g");o.attr("class","mindmap-nodes"),await it(e,o,t,-1,i);const h=await yt(t,i);ft(n,h),Et(e,h),_t(void 0,r,((a=i.mindmap)==null?void 0:a.padding)??Q.mindmap.padding,((l=i.mindmap)==null?void 0:l.useMaxWidth)??Q.mindmap.useMaxWidth)},"draw")},jt=x(N=>{let A="";for(let f=0;f<N.THEME_COLOR_LIMIT;f++)N["lineColor"+f]=N["lineColor"+f]||N["cScaleInv"+f],vt(N["lineColor"+f])?N["lineColor"+f]=Nt(N["lineColor"+f],20):N["lineColor"+f]=At(N["lineColor"+f],20);for(let f=0;f<N.THEME_COLOR_LIMIT;f++){const p=""+(17-3*f);A+=`
|
41
|
-
.section-${f-1} rect, .section-${f-1} path, .section-${f-1} circle, .section-${f-1} polygon, .section-${f-1} path {
|
42
|
-
fill: ${N["cScale"+f]};
|
43
|
-
}
|
44
|
-
.section-${f-1} text {
|
45
|
-
fill: ${N["cScaleLabel"+f]};
|
46
|
-
}
|
47
|
-
.node-icon-${f-1} {
|
48
|
-
font-size: 40px;
|
49
|
-
color: ${N["cScaleLabel"+f]};
|
50
|
-
}
|
51
|
-
.section-edge-${f-1}{
|
52
|
-
stroke: ${N["cScale"+f]};
|
53
|
-
}
|
54
|
-
.edge-depth-${f-1}{
|
55
|
-
stroke-width: ${p};
|
56
|
-
}
|
57
|
-
.section-${f-1} line {
|
58
|
-
stroke: ${N["cScaleInv"+f]} ;
|
59
|
-
stroke-width: 3;
|
60
|
-
}
|
61
|
-
|
62
|
-
.disabled, .disabled circle, .disabled text {
|
63
|
-
fill: lightgray;
|
64
|
-
}
|
65
|
-
.disabled text {
|
66
|
-
fill: #efefef;
|
67
|
-
}
|
68
|
-
`}return A},"genSections"),Vt={db:bt,renderer:Wt,parser:Ct,styles:x(N=>`
|
69
|
-
.edge {
|
70
|
-
stroke-width: 3;
|
71
|
-
}
|
72
|
-
${jt(N)}
|
73
|
-
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
74
|
-
fill: ${N.git0};
|
75
|
-
}
|
76
|
-
.section-root text {
|
77
|
-
fill: ${N.gitBranchLabel0};
|
78
|
-
}
|
79
|
-
.icon-container {
|
80
|
-
height:100%;
|
81
|
-
display: flex;
|
82
|
-
justify-content: center;
|
83
|
-
align-items: center;
|
84
|
-
}
|
85
|
-
.edge {
|
86
|
-
fill: none;
|
87
|
-
}
|
88
|
-
.mindmap-node-label {
|
89
|
-
dy: 1em;
|
90
|
-
alignment-baseline: middle;
|
91
|
-
text-anchor: middle;
|
92
|
-
dominant-baseline: middle;
|
93
|
-
text-align: center;
|
94
|
-
}
|
95
|
-
`,"getStyles")};export{Vt as diagram};
|