paul-ai-assistant 1.0.6 → 1.0.8
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/1.async.js +1 -1
- package/dist/1387.async.js +1 -1
- package/dist/1424.async.js +258 -0
- package/dist/1481.async.js +1 -1
- package/dist/1548.async.js +1 -1
- package/dist/1805.async.js +1150 -0
- package/dist/1815.async.js +2 -2
- package/dist/1819.async.js +1 -1
- package/dist/1851.async.js +1 -1
- package/dist/2369.async.js +263 -0
- package/dist/2491.async.js +2 -2
- package/dist/2678.async.js +1 -1
- package/dist/2856.async.js +1 -1
- package/dist/295.async.js +1 -1
- package/dist/3098.async.js +1 -1
- package/dist/3138.async.js +1 -1
- package/dist/34.async.js +6 -6
- package/dist/3472.async.js +1 -1
- package/dist/3614.async.js +1 -1
- package/dist/3959.async.js +1 -1
- package/dist/404.html +0 -1
- package/dist/4445.async.js +18 -0
- package/dist/4484.async.js +1 -1
- package/dist/4498.async.js +1 -1
- package/dist/4911.async.js +1 -1
- package/dist/4927.async.js +1 -1
- package/dist/5067.async.js +1 -1
- package/dist/5588.async.js +1 -1
- package/dist/5754.async.js +1 -1
- package/dist/6355.async.js +4 -4
- package/dist/6662.async.js +1 -1
- package/dist/6680.async.js +13 -13
- package/dist/6690.async.js +5 -5
- package/dist/6949.async.js +1 -0
- package/dist/7267.async.js +3 -3
- package/dist/7329.async.js +1 -1
- package/dist/7718.async.js +6 -6
- package/dist/7762.async.js +1 -1
- package/dist/7787.async.js +5 -5
- package/dist/7929.async.js +1 -1
- package/dist/804.async.js +1 -0
- package/dist/8164.async.js +1 -1
- package/dist/834.async.js +1 -1
- package/dist/8456.async.js +1 -1
- package/dist/8542.async.js +1 -1
- package/dist/8749.async.js +1 -1
- package/dist/8914.async.js +10 -10
- package/dist/9570.async.js +1 -1
- package/dist/components/llm-trace-v2/index.html +0 -1
- package/dist/components/llm-trace-v3/index.html +0 -1
- package/dist/components/llm-trace-v3-advanced/index.html +0 -1
- package/dist/components/llm-trace-v3-examples/index.html +0 -1
- package/dist/components/llm-trace-v3-visual-demos/index.html +0 -1
- package/dist/demos.async.js +9 -383
- package/dist/demos__index.md.async.js +1 -1
- package/dist/demos__markdown-latex-mermaid__index.md.async.js +1 -1
- package/dist/demos__toolChatType__index.md.async.js +6 -1
- package/dist/docs/index.html +0 -1
- package/dist/docs__components__llm-trace-v2.md.async.js +1 -1
- package/dist/docs__components__llm-trace-v3-advanced.md.async.js +1 -1
- package/dist/docs__components__llm-trace-v3-examples.md.async.js +1 -1
- package/dist/docs__components__llm-trace-v3-visual-demos.md.async.js +1 -1
- package/dist/docs__components__llm-trace-v3.md.async.js +1 -1
- package/dist/docs__docs__index.md.async.js +1 -1
- package/dist/docs__index.md.async.js +1 -1
- package/dist/dumi__tmp-production__dumi__theme__ContextWrapper.async.js +1 -1
- package/dist/index.html +0 -1
- package/dist/markdown-latex-mermaid/index.html +0 -1
- package/dist/meta__demos.async.js +16538 -4968
- package/dist/meta__docs.async.js +28 -29
- package/dist/nm__dumi__dist__client__pages__404.async.js +2 -2
- package/dist/nm__dumi__dist__client__pages__Demo__index.async.js +1 -1
- package/dist/nm__dumi__theme-default__layouts__DocLayout__index.async.js +1 -1
- package/dist/preload_helper.js +1 -1
- package/dist/tool-chat-type/index.html +0 -1
- package/dist/umi.js +63 -63
- package/dist/~demos/:id/index.html +0 -1
- package/dist/~demos/demos-markdown-latex-mermaid-demo-markdown-latex-mermaid/index.html +0 -1
- package/dist/~demos/demos-tool-chat-type-demo-agentschemaformdemo/index.html +0 -1
- package/dist/~demos/demos-tool-chat-type-demo-assistant-drawer/index.html +0 -1
- package/dist/~demos/demos-tool-chat-type-demo-chat-input-demo/index.html +0 -1
- package/dist/~demos/demos-tool-chat-type-demo-chat-list-demo/index.html +0 -1
- package/dist/~demos/demos-tool-chat-type-demo-chat-scenario-demo/index.html +0 -1
- package/dist/~demos/{demos-customer-service-typewriter-demo-customer-service-demo → demos-tool-chat-type-demo-default-demo}/index.html +0 -1
- package/dist/~demos/demos-tool-chat-type-demo-schema-input/index.html +0 -1
- package/dist/~demos/demos-tool-chat-type-demo-toolchattype/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-2-demo-0/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-2-demo-1/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-2-demo-2/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-2-demo-3/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-2-demo-4/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-3-advanced-demo-0/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-3-advanced-demo-1/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-3-advanced-demo-2/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-3-advanced-demo-3/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-3-demo-0/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-3-demo-1/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-3-demo-2/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-3-demo-3/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-3-examples-demo-0/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-3-examples-demo-1/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-3-examples-demo-2/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-3-examples-demo-3/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-3-examples-demo-4/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-0/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-1/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-2/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-3/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-4/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-5/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-6/index.html +0 -1
- package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-7/index.html +0 -1
- package/es/AssistantChat/AssistantChatCard/OperationCard/AigcTipsRender/index.js +1 -1
- package/es/context/index.js +175 -42
- package/es/hooks/index.js +1 -0
- package/es/hooks/useAutoSend.js +95 -0
- package/es/index.js +8 -1
- package/es/service/conversation.js +74 -0
- package/es/service/index.js +1 -0
- package/es/utils/apushAssistant.js +21 -12
- package/package.json +3 -1
- package/dist/1013.async.js +0 -1
- package/dist/123.async.js +0 -258
- package/dist/6254.async.js +0 -30286
- package/dist/7084.async.js +0 -247
- package/dist/9725.async.js +0 -18
- package/dist/customer-service-typewriter/index.html +0 -44
- package/dist/demos__customerServiceTypewriter__index.md.async.js +0 -2
- package/dist/~demos/demos-customer-service-typewriter-demo-smart-scroll-demo/index.html +0 -44
- package/es/utils/im.js +0 -386
package/dist/4498.async.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!(function(){var ye=Object.defineProperty,Ee=Object.defineProperties;var me=Object.getOwnPropertyDescriptors;var ve=Object.getOwnPropertySymbols;var Te=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable;var de=(Yt,it,ut)=>it in Yt?ye(Yt,it,{enumerable:!0,configurable:!0,writable:!0,value:ut}):Yt[it]=ut,ee=(Yt,it)=>{for(var ut in it||(it={}))Te.call(it,ut)&&de(Yt,ut,it[ut]);if(ve)for(var ut of ve(it))Ne.call(it,ut)&&de(Yt,ut,it[ut]);return Yt},ie=(Yt,it)=>Ee(Yt,me(it));var kt=(Yt,it,ut)=>new Promise((S,d)=>{var s=r=>{try{e(ut.next(r))}catch(p){d(p)}},o=r=>{try{e(ut.throw(r))}catch(p){d(p)}},e=r=>r.done?S(r.value):Promise.resolve(r.value).then(s,o);e((ut=ut.apply(Yt,it)).next())});(self.webpackChunk_alife_paul_ai_assistant=self.webpackChunk_alife_paul_ai_assistant||[]).push([[4498],{44867:function(Yt,it,ut){(function(d,s){Yt.exports=s(ut(26914))})(this,function(S){return(()=>{"use strict";var d={658:r=>{r.exports=Object.assign!=null?Object.assign.bind(Object):function(p){for(var i=arguments.length,g=Array(i>1?i-1:0),t=1;t<i;t++)g[t-1]=arguments[t];return g.forEach(function(a){Object.keys(a).forEach(function(l){return p[l]=a[l]})}),p}},548:(r,p,i)=>{var g=function(){function l(u,c){var m=[],h=!0,C=!1,T=void 0;try{for(var N=u[Symbol.iterator](),D;!(h=(D=N.next()).done)&&(m.push(D.value),!(c&&m.length===c));h=!0);}catch(_){C=!0,T=_}finally{try{!h&&N.return&&N.return()}finally{if(C)throw T}}return m}return function(u,c){if(Array.isArray(u))return u;if(Symbol.iterator in Object(u))return l(u,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),t=i(140).layoutBase.LinkedList,a={};a.getTopMostNodes=function(l){for(var u={},c=0;c<l.length;c++)u[l[c].id()]=!0;var m=l.filter(function(h,C){typeof h=="number"&&(h=C);for(var T=h.parent()[0];T!=null;){if(u[T.id()])return!1;T=T.parent()[0]}return!0});return m},a.connectComponents=function(l,u,c,m){var h=new t,C=new Set,T=[],N=void 0,D=void 0,_=void 0,I=!1,ot=1,mt=[],vt=[],Dt=function(){var k=l.collection();vt.push(k);var n=c[0],E=l.collection();E.merge(n).merge(n.descendants().intersection(u)),T.push(n),E.forEach(function(v){h.push(v),C.add(v),k.merge(v)});for(var f=function(){n=h.shift();var R=l.collection();n.neighborhood().nodes().forEach(function(U){u.intersection(n.edgesWith(U)).length>0&&R.merge(U)});for(var w=0;w<R.length;w++){var X=R[w];if(N=c.intersection(X.union(X.ancestors())),N!=null&&!C.has(N[0])){var H=N.union(N.descendants());H.forEach(function(U){h.push(U),C.add(U),k.merge(U),c.has(U)&&T.push(U)})}}};h.length!=0;)f();if(k.forEach(function(v){u.intersection(v.connectedEdges()).forEach(function(R){k.has(R.source())&&k.has(R.target())&&k.merge(R)})}),T.length==c.length&&(I=!0),!I||I&&ot>1){D=T[0],_=D.connectedEdges().length,T.forEach(function(v){v.connectedEdges().length<_&&(_=v.connectedEdges().length,D=v)}),mt.push(D.id());var y=l.collection();y.merge(T[0]),T.forEach(function(v){y.merge(v)}),T=[],c=c.difference(y),ot++}};do Dt();while(!I);return m&&mt.length>0&&m.set("dummy"+(m.size+1),mt),vt},a.relocateComponent=function(l,u,c){if(!c.fixedNodeConstraint){var m=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,C=Number.POSITIVE_INFINITY,T=Number.NEGATIVE_INFINITY;if(c.quality=="draft"){var N=!0,D=!1,_=void 0;try{for(var I=u.nodeIndexes[Symbol.iterator](),ot;!(N=(ot=I.next()).done);N=!0){var mt=ot.value,vt=g(mt,2),Dt=vt[0],G=vt[1],k=c.cy.getElementById(Dt);if(k){var n=k.boundingBox(),E=u.xCoords[G]-n.w/2,f=u.xCoords[G]+n.w/2,y=u.yCoords[G]-n.h/2,v=u.yCoords[G]+n.h/2;E<m&&(m=E),f>h&&(h=f),y<C&&(C=y),v>T&&(T=v)}}}catch(U){D=!0,_=U}finally{try{!N&&I.return&&I.return()}finally{if(D)throw _}}var R=l.x-(h+m)/2,w=l.y-(T+C)/2;u.xCoords=u.xCoords.map(function(U){return U+R}),u.yCoords=u.yCoords.map(function(U){return U+w})}else{Object.keys(u).forEach(function(U){var tt=u[U],ft=tt.getRect().x,B=tt.getRect().x+tt.getRect().width,lt=tt.getRect().y,j=tt.getRect().y+tt.getRect().height;ft<m&&(m=ft),B>h&&(h=B),lt<C&&(C=lt),j>T&&(T=j)});var X=l.x-(h+m)/2,H=l.y-(T+C)/2;Object.keys(u).forEach(function(U){var tt=u[U];tt.setCenter(tt.getCenterX()+X,tt.getCenterY()+H)})}}},a.calcBoundingBox=function(l,u,c,m){for(var h=Number.MAX_SAFE_INTEGER,C=Number.MIN_SAFE_INTEGER,T=Number.MAX_SAFE_INTEGER,N=Number.MIN_SAFE_INTEGER,D=void 0,_=void 0,I=void 0,ot=void 0,mt=l.descendants().not(":parent"),vt=mt.length,Dt=0;Dt<vt;Dt++){var G=mt[Dt];D=u[m.get(G.id())]-G.width()/2,_=u[m.get(G.id())]+G.width()/2,I=c[m.get(G.id())]-G.height()/2,ot=c[m.get(G.id())]+G.height()/2,h>D&&(h=D),C<_&&(C=_),T>I&&(T=I),N<ot&&(N=ot)}var k={};return k.topLeftX=h,k.topLeftY=T,k.width=C-h,k.height=N-T,k},a.calcParentsWithoutChildren=function(l,u){var c=l.collection();return u.nodes(":parent").forEach(function(m){var h=!1;m.children().forEach(function(C){C.css("display")!="none"&&(h=!0)}),h||c.merge(m)}),c},r.exports=a},816:(r,p,i)=>{var g=i(548),t=i(140).CoSELayout,a=i(140).CoSENode,l=i(140).layoutBase.PointD,u=i(140).layoutBase.DimensionD,c=i(140).layoutBase.LayoutConstants,m=i(140).layoutBase.FDLayoutConstants,h=i(140).CoSEConstants,C=function(N,D){var _=N.cy,I=N.eles,ot=I.nodes(),mt=I.edges(),vt=void 0,Dt=void 0,G=void 0,k={};N.randomize&&(vt=D.nodeIndexes,Dt=D.xCoords,G=D.yCoords);var n=function(U){return typeof U=="function"},E=function(U,tt){return n(U)?U(tt):U},f=g.calcParentsWithoutChildren(_,I),y=function H(U,tt,ft,B){for(var lt=tt.length,j=0;j<lt;j++){var O=tt[j],$=null;O.intersection(f).length==0&&($=O.children());var K=void 0,ht=O.layoutDimensions({nodeDimensionsIncludeLabels:B.nodeDimensionsIncludeLabels});if(O.outerWidth()!=null&&O.outerHeight()!=null)if(B.randomize)if(!O.isParent())K=U.add(new a(ft.graphManager,new l(Dt[vt.get(O.id())]-ht.w/2,G[vt.get(O.id())]-ht.h/2),new u(parseFloat(ht.w),parseFloat(ht.h))));else{var Mt=g.calcBoundingBox(O,Dt,G,vt);O.intersection(f).length==0?K=U.add(new a(ft.graphManager,new l(Mt.topLeftX,Mt.topLeftY),new u(Mt.width,Mt.height))):K=U.add(new a(ft.graphManager,new l(Mt.topLeftX,Mt.topLeftY),new u(parseFloat(ht.w),parseFloat(ht.h))))}else K=U.add(new a(ft.graphManager,new l(O.position("x")-ht.w/2,O.position("y")-ht.h/2),new u(parseFloat(ht.w),parseFloat(ht.h))));else K=U.add(new a(this.graphManager));if(K.id=O.data("id"),K.nodeRepulsion=E(B.nodeRepulsion,O),K.paddingLeft=parseInt(O.css("padding")),K.paddingTop=parseInt(O.css("padding")),K.paddingRight=parseInt(O.css("padding")),K.paddingBottom=parseInt(O.css("padding")),B.nodeDimensionsIncludeLabels&&(K.labelWidth=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,K.labelHeight=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,K.labelPosVertical=O.css("text-valign"),K.labelPosHorizontal=O.css("text-halign")),k[O.data("id")]=K,isNaN(K.rect.x)&&(K.rect.x=0),isNaN(K.rect.y)&&(K.rect.y=0),$!=null&&$.length>0){var rt=void 0;rt=ft.getGraphManager().add(ft.newGraph(),K),H(rt,$,ft,B)}}},v=function(U,tt,ft){for(var B=0,lt=0,j=0;j<ft.length;j++){var O=ft[j],$=k[O.data("source")],K=k[O.data("target")];if($&&K&&$!==K&&$.getEdgesBetween(K).length==0){var ht=tt.add(U.newEdge(),$,K);ht.id=O.id(),ht.idealLength=E(N.idealEdgeLength,O),ht.edgeElasticity=E(N.edgeElasticity,O),B+=ht.idealLength,lt++}}N.idealEdgeLength!=null&&(lt>0?h.DEFAULT_EDGE_LENGTH=m.DEFAULT_EDGE_LENGTH=B/lt:n(N.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=m.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=m.DEFAULT_EDGE_LENGTH=N.idealEdgeLength,h.MIN_REPULSION_DIST=m.MIN_REPULSION_DIST=m.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=m.DEFAULT_EDGE_LENGTH)},R=function(U,tt){tt.fixedNodeConstraint&&(U.constraints.fixedNodeConstraint=tt.fixedNodeConstraint),tt.alignmentConstraint&&(U.constraints.alignmentConstraint=tt.alignmentConstraint),tt.relativePlacementConstraint&&(U.constraints.relativePlacementConstraint=tt.relativePlacementConstraint)};N.nestingFactor!=null&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=m.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=N.nestingFactor),N.gravity!=null&&(h.DEFAULT_GRAVITY_STRENGTH=m.DEFAULT_GRAVITY_STRENGTH=N.gravity),N.numIter!=null&&(h.MAX_ITERATIONS=m.MAX_ITERATIONS=N.numIter),N.gravityRange!=null&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=m.DEFAULT_GRAVITY_RANGE_FACTOR=N.gravityRange),N.gravityCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=m.DEFAULT_COMPOUND_GRAVITY_STRENGTH=N.gravityCompound),N.gravityRangeCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=N.gravityRangeCompound),N.initialEnergyOnIncremental!=null&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=m.DEFAULT_COOLING_FACTOR_INCREMENTAL=N.initialEnergyOnIncremental),N.tilingCompareBy!=null&&(h.TILING_COMPARE_BY=N.tilingCompareBy),N.quality=="proof"?c.QUALITY=2:c.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=m.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=N.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=m.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!N.randomize,h.ANIMATE=m.ANIMATE=c.ANIMATE=N.animate,h.TILE=N.tile,h.TILING_PADDING_VERTICAL=typeof N.tilingPaddingVertical=="function"?N.tilingPaddingVertical.call():N.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL=typeof N.tilingPaddingHorizontal=="function"?N.tilingPaddingHorizontal.call():N.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=m.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!N.randomize,c.DEFAULT_UNIFORM_LEAF_NODE_SIZES=N.uniformNodeDimensions,N.step=="transformed"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),N.step=="enforced"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),N.step=="cose"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),N.step=="all"&&(N.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),N.fixedNodeConstraint||N.alignmentConstraint||N.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new t,X=w.newGraphManager();return y(X.addRoot(),g.getTopMostNodes(ot),w,N),v(w,X,mt),R(w,N),w.runLayout(),k};r.exports={coseLayout:C}},212:(r,p,i)=>{var g=function(){function N(D,_){for(var I=0;I<_.length;I++){var ot=_[I];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(D,ot.key,ot)}}return function(D,_,I){return _&&N(D.prototype,_),I&&N(D,I),D}}();function t(N,D){if(!(N instanceof D))throw new TypeError("Cannot call a class as a function")}var a=i(658),l=i(548),u=i(657),c=u.spectralLayout,m=i(816),h=m.coseLayout,C=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(D){return 4500},idealEdgeLength:function(D){return 50},edgeElasticity:function(D){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),T=function(){function N(D){t(this,N),this.options=a({},C,D)}return g(N,[{key:"run",value:function(){var _=this,I=this.options,ot=I.cy,mt=I.eles,vt=[],Dt=void 0,G=void 0,k=[],n=void 0,E=[];I.fixedNodeConstraint&&(!Array.isArray(I.fixedNodeConstraint)||I.fixedNodeConstraint.length==0)&&(I.fixedNodeConstraint=void 0),I.alignmentConstraint&&(I.alignmentConstraint.vertical&&(!Array.isArray(I.alignmentConstraint.vertical)||I.alignmentConstraint.vertical.length==0)&&(I.alignmentConstraint.vertical=void 0),I.alignmentConstraint.horizontal&&(!Array.isArray(I.alignmentConstraint.horizontal)||I.alignmentConstraint.horizontal.length==0)&&(I.alignmentConstraint.horizontal=void 0)),I.relativePlacementConstraint&&(!Array.isArray(I.relativePlacementConstraint)||I.relativePlacementConstraint.length==0)&&(I.relativePlacementConstraint=void 0);var f=I.fixedNodeConstraint||I.alignmentConstraint||I.relativePlacementConstraint;f&&(I.tile=!1,I.packComponents=!1);var y=void 0,v=!1;if(ot.layoutUtilities&&I.packComponents&&(y=ot.layoutUtilities("get"),y||(y=ot.layoutUtilities()),v=!0),mt.nodes().length>0)if(v){var X=l.getTopMostNodes(I.eles.nodes());if(n=l.connectComponents(ot,I.eles,X),n.forEach(function(L){var M=L.boundingBox();E.push({x:M.x1+M.w/2,y:M.y1+M.h/2})}),I.randomize&&n.forEach(function(L){I.eles=L,vt.push(c(I))}),I.quality=="default"||I.quality=="proof"){var H=ot.collection();if(I.tile){var U=new Map,tt=[],ft=[],B=0,lt={nodeIndexes:U,xCoords:tt,yCoords:ft},j=[];if(n.forEach(function(L,M){L.edges().length==0&&(L.nodes().forEach(function(V,Z){H.merge(L.nodes()[Z]),V.isParent()||(lt.nodeIndexes.set(L.nodes()[Z].id(),B++),lt.xCoords.push(L.nodes()[0].position().x),lt.yCoords.push(L.nodes()[0].position().y))}),j.push(M))}),H.length>1){var O=H.boundingBox();E.push({x:O.x1+O.w/2,y:O.y1+O.h/2}),n.push(H),vt.push(lt);for(var $=j.length-1;$>=0;$--)n.splice(j[$],1),vt.splice(j[$],1),E.splice(j[$],1)}}n.forEach(function(L,M){I.eles=L,k.push(h(I,vt[M])),l.relocateComponent(E[M],k[M],I)})}else n.forEach(function(L,M){l.relocateComponent(E[M],vt[M],I)});var K=new Set;if(n.length>1){var ht=[],Mt=mt.filter(function(L){return L.css("display")=="none"});n.forEach(function(L,M){var V=void 0;if(I.quality=="draft"&&(V=vt[M].nodeIndexes),L.nodes().not(Mt).length>0){var Z={};Z.edges=[],Z.nodes=[];var Q=void 0;L.nodes().not(Mt).forEach(function(ct){if(I.quality=="draft")if(!ct.isParent())Q=V.get(ct.id()),Z.nodes.push({x:vt[M].xCoords[Q]-ct.boundingbox().w/2,y:vt[M].yCoords[Q]-ct.boundingbox().h/2,width:ct.boundingbox().w,height:ct.boundingbox().h});else{var q=l.calcBoundingBox(ct,vt[M].xCoords,vt[M].yCoords,V);Z.nodes.push({x:q.topLeftX,y:q.topLeftY,width:q.width,height:q.height})}else k[M][ct.id()]&&Z.nodes.push({x:k[M][ct.id()].getLeft(),y:k[M][ct.id()].getTop(),width:k[M][ct.id()].getWidth(),height:k[M][ct.id()].getHeight()})}),L.edges().forEach(function(ct){var q=ct.source(),at=ct.target();if(q.css("display")!="none"&&at.css("display")!="none")if(I.quality=="draft"){var et=V.get(q.id()),nt=V.get(at.id()),dt=[],Tt=[];if(q.isParent()){var gt=l.calcBoundingBox(q,vt[M].xCoords,vt[M].yCoords,V);dt.push(gt.topLeftX+gt.width/2),dt.push(gt.topLeftY+gt.height/2)}else dt.push(vt[M].xCoords[et]),dt.push(vt[M].yCoords[et]);if(at.isParent()){var A=l.calcBoundingBox(at,vt[M].xCoords,vt[M].yCoords,V);Tt.push(A.topLeftX+A.width/2),Tt.push(A.topLeftY+A.height/2)}else Tt.push(vt[M].xCoords[nt]),Tt.push(vt[M].yCoords[nt]);Z.edges.push({startX:dt[0],startY:dt[1],endX:Tt[0],endY:Tt[1]})}else k[M][q.id()]&&k[M][at.id()]&&Z.edges.push({startX:k[M][q.id()].getCenterX(),startY:k[M][q.id()].getCenterY(),endX:k[M][at.id()].getCenterX(),endY:k[M][at.id()].getCenterY()})}),Z.nodes.length>0&&(ht.push(Z),K.add(M))}});var rt=y.packComponents(ht,I.randomize).shifts;if(I.quality=="draft")vt.forEach(function(L,M){var V=L.xCoords.map(function(Q){return Q+rt[M].dx}),Z=L.yCoords.map(function(Q){return Q+rt[M].dy});L.xCoords=V,L.yCoords=Z});else{var bt=0;K.forEach(function(L){Object.keys(k[L]).forEach(function(M){var V=k[L][M];V.setCenter(V.getCenterX()+rt[bt].dx,V.getCenterY()+rt[bt].dy)}),bt++})}}}else{var R=I.eles.boundingBox();if(E.push({x:R.x1+R.w/2,y:R.y1+R.h/2}),I.randomize){var w=c(I);vt.push(w)}I.quality=="default"||I.quality=="proof"?(k.push(h(I,vt[0])),l.relocateComponent(E[0],k[0],I)):l.relocateComponent(E[0],vt[0],I)}var Rt=function(M,V){if(I.quality=="default"||I.quality=="proof"){typeof M=="number"&&(M=V);var Z=void 0,Q=void 0,ct=M.data("id");return k.forEach(function(at){ct in at&&(Z={x:at[ct].getRect().getCenterX(),y:at[ct].getRect().getCenterY()},Q=at[ct])}),I.nodeDimensionsIncludeLabels&&(Q.labelWidth&&(Q.labelPosHorizontal=="left"?Z.x+=Q.labelWidth/2:Q.labelPosHorizontal=="right"&&(Z.x-=Q.labelWidth/2)),Q.labelHeight&&(Q.labelPosVertical=="top"?Z.y+=Q.labelHeight/2:Q.labelPosVertical=="bottom"&&(Z.y-=Q.labelHeight/2))),Z==null&&(Z={x:M.position("x"),y:M.position("y")}),{x:Z.x,y:Z.y}}else{var q=void 0;return vt.forEach(function(at){var et=at.nodeIndexes.get(M.id());et!=null&&(q={x:at.xCoords[et],y:at.yCoords[et]})}),q==null&&(q={x:M.position("x"),y:M.position("y")}),{x:q.x,y:q.y}}};if(I.quality=="default"||I.quality=="proof"||I.randomize){var Xt=l.calcParentsWithoutChildren(ot,mt),x=mt.filter(function(L){return L.css("display")=="none"});I.eles=mt.not(x),mt.nodes().not(":parent").not(x).layoutPositions(_,I,Rt),Xt.length>0&&Xt.forEach(function(L){L.position(Rt(L))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),N}();r.exports=T},657:(r,p,i)=>{var g=i(548),t=i(140).layoutBase.Matrix,a=i(140).layoutBase.SVD,l=function(c){var m=c.cy,h=c.eles,C=h.nodes(),T=h.nodes(":parent"),N=new Map,D=new Map,_=new Map,I=[],ot=[],mt=[],vt=[],Dt=[],G=[],k=[],n=[],E=void 0,f=void 0,y=1e8,v=1e-9,R=c.piTol,w=c.samplingType,X=c.nodeSeparation,H=void 0,U=function(){for(var b=0,Y=0,P=!1;Y<H;){b=Math.floor(Math.random()*f),P=!1;for(var W=0;W<Y;W++)if(vt[W]==b){P=!0;break}if(!P)vt[Y]=b,Y++;else continue}},tt=function(b,Y,P){for(var W=[],yt=0,st=0,z=0,J=void 0,pt=[],Ot=0,At=1,St=0;St<f;St++)pt[St]=y;for(W[st]=b,pt[b]=0;st>=yt;){z=W[yt++];for(var Nt=I[z],Et=0;Et<Nt.length;Et++)J=D.get(Nt[Et]),pt[J]==y&&(pt[J]=pt[z]+1,W[++st]=J);G[z][Y]=pt[z]*X}if(P){for(var wt=0;wt<f;wt++)G[wt][Y]<Dt[wt]&&(Dt[wt]=G[wt][Y]);for(var Lt=0;Lt<f;Lt++)Dt[Lt]>Ot&&(Ot=Dt[Lt],At=Lt)}return At},ft=function(b){var Y=void 0;if(b){Y=Math.floor(Math.random()*f),E=Y;for(var W=0;W<f;W++)Dt[W]=y;for(var yt=0;yt<H;yt++)vt[yt]=Y,Y=tt(Y,yt,b)}else{U();for(var P=0;P<H;P++)tt(vt[P],P,b,!1)}for(var st=0;st<f;st++)for(var z=0;z<H;z++)G[st][z]*=G[st][z];for(var J=0;J<H;J++)k[J]=[];for(var pt=0;pt<H;pt++)for(var Ot=0;Ot<H;Ot++)k[pt][Ot]=G[vt[Ot]][pt]},B=function(){for(var b=a.svd(k),Y=b.S,P=b.U,W=b.V,yt=Y[0]*Y[0]*Y[0],st=[],z=0;z<H;z++){st[z]=[];for(var J=0;J<H;J++)st[z][J]=0,z==J&&(st[z][J]=Y[z]/(Y[z]*Y[z]+yt/(Y[z]*Y[z])))}n=t.multMat(t.multMat(W,st),t.transpose(P))},lt=function(){for(var b=void 0,Y=void 0,P=[],W=[],yt=[],st=[],z=0;z<f;z++)P[z]=Math.random(),W[z]=Math.random();P=t.normalize(P),W=t.normalize(W);for(var J=0,pt=v,Ot=v,At=void 0;;){J++;for(var St=0;St<f;St++)yt[St]=P[St];if(P=t.multGamma(t.multL(t.multGamma(yt),G,n)),b=t.dotProduct(yt,P),P=t.normalize(P),pt=t.dotProduct(yt,P),At=Math.abs(pt/Ot),At<=1+R&&At>=1)break;Ot=pt}for(var Nt=0;Nt<f;Nt++)yt[Nt]=P[Nt];for(J=0,Ot=v;;){J++;for(var Et=0;Et<f;Et++)st[Et]=W[Et];if(st=t.minusOp(st,t.multCons(yt,t.dotProduct(yt,st))),W=t.multGamma(t.multL(t.multGamma(st),G,n)),Y=t.dotProduct(st,W),W=t.normalize(W),pt=t.dotProduct(st,W),At=Math.abs(pt/Ot),At<=1+R&&At>=1)break;Ot=pt}for(var wt=0;wt<f;wt++)st[wt]=W[wt];ot=t.multCons(yt,Math.sqrt(Math.abs(b))),mt=t.multCons(st,Math.sqrt(Math.abs(Y)))};g.connectComponents(m,h,g.getTopMostNodes(C),N),T.forEach(function(F){g.connectComponents(m,h,g.getTopMostNodes(F.descendants().intersection(h)),N)});for(var j=0,O=0;O<C.length;O++)C[O].isParent()||D.set(C[O].id(),j++);var $=!0,K=!1,ht=void 0;try{for(var Mt=N.keys()[Symbol.iterator](),rt;!($=(rt=Mt.next()).done);$=!0){var bt=rt.value;D.set(bt,j++)}}catch(F){K=!0,ht=F}finally{try{!$&&Mt.return&&Mt.return()}finally{if(K)throw ht}}for(var Rt=0;Rt<D.size;Rt++)I[Rt]=[];T.forEach(function(F){for(var b=F.children().intersection(h);b.nodes(":childless").length==0;)b=b.nodes()[0].children().intersection(h);var Y=0,P=b.nodes(":childless")[0].connectedEdges().length;b.nodes(":childless").forEach(function(W,yt){W.connectedEdges().length<P&&(P=W.connectedEdges().length,Y=yt)}),_.set(F.id(),b.nodes(":childless")[Y].id())}),C.forEach(function(F){var b=void 0;F.isParent()?b=D.get(_.get(F.id())):b=D.get(F.id()),F.neighborhood().nodes().forEach(function(Y){h.intersection(F.edgesWith(Y)).length>0&&(Y.isParent()?I[b].push(_.get(Y.id())):I[b].push(Y.id()))})});var Xt=function(b){var Y=D.get(b),P=void 0;N.get(b).forEach(function(W){m.getElementById(W).isParent()?P=_.get(W):P=W,I[Y].push(P),I[D.get(P)].push(b)})},x=!0,L=!1,M=void 0;try{for(var V=N.keys()[Symbol.iterator](),Z;!(x=(Z=V.next()).done);x=!0){var Q=Z.value;Xt(Q)}}catch(F){L=!0,M=F}finally{try{!x&&V.return&&V.return()}finally{if(L)throw M}}f=D.size;var ct=void 0;if(f>2){H=f<c.sampleSize?f:c.sampleSize;for(var q=0;q<f;q++)G[q]=[];for(var at=0;at<H;at++)n[at]=[];return c.quality=="draft"||c.step=="all"?(ft(w),B(),lt(),ct={nodeIndexes:D,xCoords:ot,yCoords:mt}):(D.forEach(function(F,b){ot.push(m.getElementById(b).position("x")),mt.push(m.getElementById(b).position("y"))}),ct={nodeIndexes:D,xCoords:ot,yCoords:mt}),ct}else{var et=D.keys(),nt=m.getElementById(et.next().value),dt=nt.position(),Tt=nt.outerWidth();if(ot.push(dt.x),mt.push(dt.y),f==2){var gt=m.getElementById(et.next().value),A=gt.outerWidth();ot.push(dt.x+Tt/2+A/2+c.idealEdgeLength),mt.push(dt.y)}return ct={nodeIndexes:D,xCoords:ot,yCoords:mt},ct}};r.exports={spectralLayout:l}},579:(r,p,i)=>{var g=i(212),t=function(l){l&&l("layout","fcose",g)};typeof cytoscape!="undefined"&&t(cytoscape),r.exports=t},140:r=>{r.exports=S}},s={};function o(r){var p=s[r];if(p!==void 0)return p.exports;var i=s[r]={exports:{}};return d[r](i,i.exports,o),i.exports}var e=o(579);return e})()})},26914:function(Yt,it,ut){(function(d,s){Yt.exports=s(ut(13035))})(this,function(S){return(()=>{"use strict";var d={45:(r,p,i)=>{var g={};g.layoutBase=i(551),g.CoSEConstants=i(806),g.CoSEEdge=i(767),g.CoSEGraph=i(880),g.CoSEGraphManager=i(578),g.CoSELayout=i(765),g.CoSENode=i(991),g.ConstraintHandler=i(902),r.exports=g},806:(r,p,i)=>{var g=i(551).FDLayoutConstants;function t(){}for(var a in g)t[a]=g[a];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,t.ENFORCE_CONSTRAINTS=!0,t.APPLY_LAYOUT=!0,t.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,t.TREE_REDUCTION_ON_INCREMENTAL=!0,t.PURE_INCREMENTAL=t.DEFAULT_INCREMENTAL,r.exports=t},767:(r,p,i)=>{var g=i(551).FDLayoutEdge;function t(l,u,c){g.call(this,l,u,c)}t.prototype=Object.create(g.prototype);for(var a in g)t[a]=g[a];r.exports=t},880:(r,p,i)=>{var g=i(551).LGraph;function t(l,u,c){g.call(this,l,u,c)}t.prototype=Object.create(g.prototype);for(var a in g)t[a]=g[a];r.exports=t},578:(r,p,i)=>{var g=i(551).LGraphManager;function t(l){g.call(this,l)}t.prototype=Object.create(g.prototype);for(var a in g)t[a]=g[a];r.exports=t},765:(r,p,i)=>{var g=i(551).FDLayout,t=i(578),a=i(880),l=i(991),u=i(767),c=i(806),m=i(902),h=i(551).FDLayoutConstants,C=i(551).LayoutConstants,T=i(551).Point,N=i(551).PointD,D=i(551).DimensionD,_=i(551).Layout,I=i(551).Integer,ot=i(551).IGeometry,mt=i(551).LGraph,vt=i(551).Transform,Dt=i(551).LinkedList;function G(){g.call(this),this.toBeTiled={},this.constraints={}}G.prototype=Object.create(g.prototype);for(var k in g)G[k]=g[k];G.prototype.newGraphManager=function(){var n=new t(this);return this.graphManager=n,n},G.prototype.newGraph=function(n){return new a(null,this.graphManager,n)},G.prototype.newNode=function(n){return new l(this.graphManager,n)},G.prototype.newEdge=function(n){return new u(null,null,n)},G.prototype.initParameters=function(){g.prototype.initParameters.call(this,arguments),this.isSubLayout||(c.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},G.prototype.initSpringEmbedder=function(){g.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},G.prototype.layout=function(){var n=C.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},G.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(c.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(R){return E.has(R)});this.graphManager.setAllNodesToApplyGravitation(f)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(y){return E.has(y)});this.graphManager.setAllNodesToApplyGravitation(f),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(m.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),c.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},G.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(v){return n.has(v)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),c.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),c.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var f=!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(f,y),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},G.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),E={},f=0;f<n.length;f++){var y=n[f].rect,v=n[f].id;E[v]={id:v,x:y.getCenterX(),y:y.getCenterY(),w:y.width,h:y.height}}return E},G.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var n=!1;if(h.ANIMATE==="during")this.emit("layoutstarted");else{for(;!n;)n=this.tick();this.graphManager.updateBounds()}},G.prototype.moveNodes=function(){for(var n=this.getAllNodes(),E,f=0;f<n.length;f++)E=n[f],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var f=0;f<n.length;f++)E=n[f],E.move()},G.prototype.initConstraintVariables=function(){var n=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var E=this.graphManager.getAllNodes(),f=0;f<E.length;f++){var y=E[f];this.idToNodeMap.set(y.id,y)}var v=function O($){for(var K=$.getChild().getNodes(),ht,Mt=0,rt=0;rt<K.length;rt++)ht=K[rt],ht.getChild()==null?n.fixedNodeSet.has(ht.id)&&(Mt+=100):Mt+=O(ht);return Mt};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(K){n.fixedNodeSet.add(K.nodeId)});for(var E=this.graphManager.getAllNodes(),y,f=0;f<E.length;f++)if(y=E[f],y.getChild()!=null){var R=v(y);R>0&&(y.fixedNodeWeight=R)}}if(this.constraints.relativePlacementConstraint){var w=new Map,X=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var H=this.constraints.alignmentConstraint.vertical,f=0;f<H.length;f++)this.dummyToNodeForVerticalAlignment.set("dummy"+f,[]),H[f].forEach(function($){w.set($,"dummy"+f),n.dummyToNodeForVerticalAlignment.get("dummy"+f).push($),n.fixedNodeSet.has($)&&n.fixedNodesOnHorizontal.add("dummy"+f)});if(this.constraints.alignmentConstraint.horizontal)for(var U=this.constraints.alignmentConstraint.horizontal,f=0;f<U.length;f++)this.dummyToNodeForHorizontalAlignment.set("dummy"+f,[]),U[f].forEach(function($){X.set($,"dummy"+f),n.dummyToNodeForHorizontalAlignment.get("dummy"+f).push($),n.fixedNodeSet.has($)&&n.fixedNodesOnVertical.add("dummy"+f)})}if(c.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(O){var $,K,ht;for(ht=O.length-1;ht>=2*O.length/3;ht--)$=Math.floor(Math.random()*(ht+1)),K=O[ht],O[ht]=O[$],O[$]=K;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var $=w.has(O.left)?w.get(O.left):O.left,K=w.has(O.right)?w.get(O.right):O.right;n.nodesInRelativeHorizontal.includes($)||(n.nodesInRelativeHorizontal.push($),n.nodeToRelativeConstraintMapHorizontal.set($,[]),n.dummyToNodeForVerticalAlignment.has($)?n.nodeToTempPositionMapHorizontal.set($,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get($)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set($,n.idToNodeMap.get($).getCenterX())),n.nodesInRelativeHorizontal.includes(K)||(n.nodesInRelativeHorizontal.push(K),n.nodeToRelativeConstraintMapHorizontal.set(K,[]),n.dummyToNodeForVerticalAlignment.has(K)?n.nodeToTempPositionMapHorizontal.set(K,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(K)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(K,n.idToNodeMap.get(K).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get($).push({right:K,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(K).push({left:$,gap:O.gap})}else{var ht=X.has(O.top)?X.get(O.top):O.top,Mt=X.has(O.bottom)?X.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodesInRelativeVertical.includes(Mt)||(n.nodesInRelativeVertical.push(Mt),n.nodeToRelativeConstraintMapVertical.set(Mt,[]),n.dummyToNodeForHorizontalAlignment.has(Mt)?n.nodeToTempPositionMapVertical.set(Mt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(Mt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(Mt,n.idToNodeMap.get(Mt).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(ht).push({bottom:Mt,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(Mt).push({top:ht,gap:O.gap})}});else{var tt=new Map,ft=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var $=w.has(O.left)?w.get(O.left):O.left,K=w.has(O.right)?w.get(O.right):O.right;tt.has($)?tt.get($).push(K):tt.set($,[K]),tt.has(K)?tt.get(K).push($):tt.set(K,[$])}else{var ht=X.has(O.top)?X.get(O.top):O.top,Mt=X.has(O.bottom)?X.get(O.bottom):O.bottom;ft.has(ht)?ft.get(ht).push(Mt):ft.set(ht,[Mt]),ft.has(Mt)?ft.get(Mt).push(ht):ft.set(Mt,[ht])}});var B=function($,K){var ht=[],Mt=[],rt=new Dt,bt=new Set,Rt=0;return $.forEach(function(Xt,x){if(!bt.has(x)){ht[Rt]=[],Mt[Rt]=!1;var L=x;for(rt.push(L),bt.add(L),ht[Rt].push(L);rt.length!=0;){L=rt.shift(),K.has(L)&&(Mt[Rt]=!0);var M=$.get(L);M.forEach(function(V){bt.has(V)||(rt.push(V),bt.add(V),ht[Rt].push(V))})}Rt++}}),{components:ht,isFixed:Mt}},lt=B(tt,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=lt.components,this.fixedComponentsOnHorizontal=lt.isFixed;var j=B(ft,n.fixedNodesOnVertical);this.componentsOnVertical=j.components,this.fixedComponentsOnVertical=j.isFixed}}},G.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(j){var O=n.idToNodeMap.get(j.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,f=0;f<E.length;f++){for(var y=0,v=0;v<E[f].length;v++){if(this.fixedNodeSet.has(E[f][v])){y=0;break}y+=this.idToNodeMap.get(E[f][v]).displacementX}for(var R=y/E[f].length,v=0;v<E[f].length;v++)this.idToNodeMap.get(E[f][v]).displacementX=R}if(this.constraints.alignmentConstraint.horizontal)for(var w=this.constraints.alignmentConstraint.horizontal,f=0;f<w.length;f++){for(var X=0,v=0;v<w[f].length;v++){if(this.fixedNodeSet.has(w[f][v])){X=0;break}X+=this.idToNodeMap.get(w[f][v]).displacementY}for(var H=X/w[f].length,v=0;v<w[f].length;v++)this.idToNodeMap.get(w[f][v]).displacementY=H}}if(this.constraints.relativePlacementConstraint)if(c.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(j){if(!n.fixedNodesOnHorizontal.has(j)){var O=0;n.dummyToNodeForVerticalAlignment.has(j)?O=n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(j)[0]).displacementX:O=n.idToNodeMap.get(j).displacementX,n.nodeToRelativeConstraintMapHorizontal.get(j).forEach(function($){if($.right){var K=n.nodeToTempPositionMapHorizontal.get($.right)-n.nodeToTempPositionMapHorizontal.get(j)-O;K<$.gap&&(O-=$.gap-K)}else{var K=n.nodeToTempPositionMapHorizontal.get(j)-n.nodeToTempPositionMapHorizontal.get($.left)+O;K<$.gap&&(O+=$.gap-K)}}),n.nodeToTempPositionMapHorizontal.set(j,n.nodeToTempPositionMapHorizontal.get(j)+O),n.dummyToNodeForVerticalAlignment.has(j)?n.dummyToNodeForVerticalAlignment.get(j).forEach(function($){n.idToNodeMap.get($).displacementX=O}):n.idToNodeMap.get(j).displacementX=O}}),this.nodesInRelativeVertical.forEach(function(j){if(!n.fixedNodesOnHorizontal.has(j)){var O=0;n.dummyToNodeForHorizontalAlignment.has(j)?O=n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(j)[0]).displacementY:O=n.idToNodeMap.get(j).displacementY,n.nodeToRelativeConstraintMapVertical.get(j).forEach(function($){if($.bottom){var K=n.nodeToTempPositionMapVertical.get($.bottom)-n.nodeToTempPositionMapVertical.get(j)-O;K<$.gap&&(O-=$.gap-K)}else{var K=n.nodeToTempPositionMapVertical.get(j)-n.nodeToTempPositionMapVertical.get($.top)+O;K<$.gap&&(O+=$.gap-K)}}),n.nodeToTempPositionMapVertical.set(j,n.nodeToTempPositionMapVertical.get(j)+O),n.dummyToNodeForHorizontalAlignment.has(j)?n.dummyToNodeForHorizontalAlignment.get(j).forEach(function($){n.idToNodeMap.get($).displacementY=O}):n.idToNodeMap.get(j).displacementY=O}});else{for(var f=0;f<this.componentsOnHorizontal.length;f++){var U=this.componentsOnHorizontal[f];if(this.fixedComponentsOnHorizontal[f])for(var v=0;v<U.length;v++)this.dummyToNodeForVerticalAlignment.has(U[v])?this.dummyToNodeForVerticalAlignment.get(U[v]).forEach(function($){n.idToNodeMap.get($).displacementX=0}):this.idToNodeMap.get(U[v]).displacementX=0;else{for(var tt=0,ft=0,v=0;v<U.length;v++)if(this.dummyToNodeForVerticalAlignment.has(U[v])){var B=this.dummyToNodeForVerticalAlignment.get(U[v]);tt+=B.length*this.idToNodeMap.get(B[0]).displacementX,ft+=B.length}else tt+=this.idToNodeMap.get(U[v]).displacementX,ft++;for(var lt=tt/ft,v=0;v<U.length;v++)this.dummyToNodeForVerticalAlignment.has(U[v])?this.dummyToNodeForVerticalAlignment.get(U[v]).forEach(function($){n.idToNodeMap.get($).displacementX=lt}):this.idToNodeMap.get(U[v]).displacementX=lt}}for(var f=0;f<this.componentsOnVertical.length;f++){var U=this.componentsOnVertical[f];if(this.fixedComponentsOnVertical[f])for(var v=0;v<U.length;v++)this.dummyToNodeForHorizontalAlignment.has(U[v])?this.dummyToNodeForHorizontalAlignment.get(U[v]).forEach(function(K){n.idToNodeMap.get(K).displacementY=0}):this.idToNodeMap.get(U[v]).displacementY=0;else{for(var tt=0,ft=0,v=0;v<U.length;v++)if(this.dummyToNodeForHorizontalAlignment.has(U[v])){var B=this.dummyToNodeForHorizontalAlignment.get(U[v]);tt+=B.length*this.idToNodeMap.get(B[0]).displacementY,ft+=B.length}else tt+=this.idToNodeMap.get(U[v]).displacementY,ft++;for(var lt=tt/ft,v=0;v<U.length;v++)this.dummyToNodeForHorizontalAlignment.has(U[v])?this.dummyToNodeForHorizontalAlignment.get(U[v]).forEach(function(rt){n.idToNodeMap.get(rt).displacementY=lt}):this.idToNodeMap.get(U[v]).displacementY=lt}}}},G.prototype.calculateNodesToApplyGravitationTo=function(){var n=[],E,f=this.graphManager.getGraphs(),y=f.length,v;for(v=0;v<y;v++)E=f[v],E.updateConnected(),E.isConnected||(n=n.concat(E.getNodes()));return n},G.prototype.createBendpoints=function(){var n=[];n=n.concat(this.graphManager.getAllEdges());var E=new Set,f;for(f=0;f<n.length;f++){var y=n[f];if(!E.has(y)){var v=y.getSource(),R=y.getTarget();if(v==R)y.getBendpoints().push(new N),y.getBendpoints().push(new N),this.createDummyNodesForBendpoints(y),E.add(y);else{var w=[];if(w=w.concat(v.getEdgeListToNode(R)),w=w.concat(R.getEdgeListToNode(v)),!E.has(w[0])){if(w.length>1){var X;for(X=0;X<w.length;X++){var H=w[X];H.getBendpoints().push(new N),this.createDummyNodesForBendpoints(H)}}w.forEach(function(U){E.add(U)})}}}if(E.size==n.length)break}},G.prototype.positionNodesRadially=function(n){for(var E=new T(0,0),f=Math.ceil(Math.sqrt(n.length)),y=0,v=0,R=0,w=new N(0,0),X=0;X<n.length;X++){X%f==0&&(R=0,v=y,X!=0&&(v+=c.DEFAULT_COMPONENT_SEPERATION),y=0);var H=n[X],U=_.findCenterOfTree(H);E.x=R,E.y=v,w=G.radialLayout(H,U,E),w.y>y&&(y=Math.floor(w.y)),R=Math.floor(w.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new N(C.WORLD_CENTER_X-w.x/2,C.WORLD_CENTER_Y-w.y/2))},G.radialLayout=function(n,E,f){var y=Math.max(this.maxDiagonalInTree(n),c.DEFAULT_RADIAL_SEPARATION);G.branchRadialLayout(E,null,0,359,0,y);var v=mt.calculateBounds(n),R=new vt;R.setDeviceOrgX(v.getMinX()),R.setDeviceOrgY(v.getMinY()),R.setWorldOrgX(f.x),R.setWorldOrgY(f.y);for(var w=0;w<n.length;w++){var X=n[w];X.transform(R)}var H=new N(v.getMaxX(),v.getMaxY());return R.inverseTransformPoint(H)},G.branchRadialLayout=function(n,E,f,y,v,R){var w=(y-f+1)/2;w<0&&(w+=180);var X=(w+f)%360,H=X*ot.TWO_PI/360,U=Math.cos(H),tt=v*Math.cos(H),ft=v*Math.sin(H);n.setCenter(tt,ft);var B=[];B=B.concat(n.getEdges());var lt=B.length;E!=null&<--;for(var j=0,O=B.length,$,K=n.getEdgesBetween(E);K.length>1;){var ht=K[0];K.splice(0,1);var Mt=B.indexOf(ht);Mt>=0&&B.splice(Mt,1),O--,lt--}E!=null?$=(B.indexOf(K[0])+1)%O:$=0;for(var rt=Math.abs(y-f)/lt,bt=$;j!=lt;bt=++bt%O){var Rt=B[bt].getOtherEnd(n);if(Rt!=E){var Xt=(f+j*rt)%360,x=(Xt+rt)%360;G.branchRadialLayout(Rt,n,Xt,x,v+R,R),j++}}},G.maxDiagonalInTree=function(n){for(var E=I.MIN_VALUE,f=0;f<n.length;f++){var y=n[f],v=y.getDiagonal();v>E&&(E=v)}return E},G.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},G.prototype.groupZeroDegreeMembers=function(){var n=this,E={};this.memberGroups={},this.idToDummyNode={};for(var f=[],y=this.graphManager.getAllNodes(),v=0;v<y.length;v++){var R=y[v],w=R.getParent();this.getNodeDegreeWithChildren(R)===0&&(w.id==null||!this.getToBeTiled(w))&&f.push(R)}for(var v=0;v<f.length;v++){var R=f[v],X=R.getParent().id;typeof E[X]=="undefined"&&(E[X]=[]),E[X]=E[X].concat(R)}Object.keys(E).forEach(function(H){if(E[H].length>1){var U="DummyCompound_"+H;n.memberGroups[U]=E[H];var tt=E[H][0].getParent(),ft=new l(n.graphManager);ft.id=U,ft.paddingLeft=tt.paddingLeft||0,ft.paddingRight=tt.paddingRight||0,ft.paddingBottom=tt.paddingBottom||0,ft.paddingTop=tt.paddingTop||0,n.idToDummyNode[U]=ft;var B=n.getGraphManager().add(n.newGraph(),ft),lt=tt.getChild();lt.add(ft);for(var j=0;j<E[H].length;j++){var O=E[H][j];lt.remove(O),B.add(O)}}})},G.prototype.clearCompounds=function(){var n={},E={};this.performDFSOnCompounds();for(var f=0;f<this.compoundOrder.length;f++)E[this.compoundOrder[f].id]=this.compoundOrder[f],n[this.compoundOrder[f].id]=[].concat(this.compoundOrder[f].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[f].getChild()),this.compoundOrder[f].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(n,E)},G.prototype.clearZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(f){var y=n.idToDummyNode[f];if(E[f]=n.tileNodes(n.memberGroups[f],y.paddingLeft+y.paddingRight),y.rect.width=E[f].width,y.rect.height=E[f].height,y.setCenter(E[f].centerX,E[f].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var v=y.rect.width,R=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(v+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>v?(y.rect.x-=(y.labelWidth-v)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-v)/2):y.labelPosHorizontal=="right"&&y.setWidth(v+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(R+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>R?(y.rect.y-=(y.labelHeight-R)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-R)/2):y.labelPosVertical=="bottom"&&y.setHeight(R+y.labelHeight))}})},G.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var E=this.compoundOrder[n],f=E.id,y=E.paddingLeft,v=E.paddingTop,R=E.labelMarginLeft,w=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[f],E.rect.x,E.rect.y,y,v,R,w)}},G.prototype.repopulateZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(f){var y=n.idToDummyNode[f],v=y.paddingLeft,R=y.paddingTop,w=y.labelMarginLeft,X=y.labelMarginTop;n.adjustLocations(E[f],y.rect.x,y.rect.y,v,R,w,X)})},G.prototype.getToBeTiled=function(n){var E=n.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var f=n.getChild();if(f==null)return this.toBeTiled[E]=!1,!1;for(var y=f.getNodes(),v=0;v<y.length;v++){var R=y[v];if(this.getNodeDegree(R)>0)return this.toBeTiled[E]=!1,!1;if(R.getChild()==null){this.toBeTiled[R.id]=!1;continue}if(!this.getToBeTiled(R))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},G.prototype.getNodeDegree=function(n){for(var E=n.id,f=n.getEdges(),y=0,v=0;v<f.length;v++){var R=f[v];R.getSource().id!==R.getTarget().id&&(y=y+1)}return y},G.prototype.getNodeDegreeWithChildren=function(n){var E=this.getNodeDegree(n);if(n.getChild()==null)return E;for(var f=n.getChild().getNodes(),y=0;y<f.length;y++){var v=f[y];E+=this.getNodeDegreeWithChildren(v)}return E},G.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},G.prototype.fillCompexOrderByDFS=function(n){for(var E=0;E<n.length;E++){var f=n[E];f.getChild()!=null&&this.fillCompexOrderByDFS(f.getChild().getNodes()),this.getToBeTiled(f)&&this.compoundOrder.push(f)}},G.prototype.adjustLocations=function(n,E,f,y,v,R,w){E+=y+R,f+=v+w;for(var X=E,H=0;H<n.rows.length;H++){var U=n.rows[H];E=X;for(var tt=0,ft=0;ft<U.length;ft++){var B=U[ft];B.rect.x=E,B.rect.y=f,E+=B.rect.width+n.horizontalPadding,B.rect.height>tt&&(tt=B.rect.height)}f+=tt+n.verticalPadding}},G.prototype.tileCompoundMembers=function(n,E){var f=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(y){var v=E[y];if(f.tiledMemberPack[y]=f.tileNodes(n[y],v.paddingLeft+v.paddingRight),v.rect.width=f.tiledMemberPack[y].width,v.rect.height=f.tiledMemberPack[y].height,v.setCenter(f.tiledMemberPack[y].centerX,f.tiledMemberPack[y].centerY),v.labelMarginLeft=0,v.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var R=v.rect.width,w=v.rect.height;v.labelWidth&&(v.labelPosHorizontal=="left"?(v.rect.x-=v.labelWidth,v.setWidth(R+v.labelWidth),v.labelMarginLeft=v.labelWidth):v.labelPosHorizontal=="center"&&v.labelWidth>R?(v.rect.x-=(v.labelWidth-R)/2,v.setWidth(v.labelWidth),v.labelMarginLeft=(v.labelWidth-R)/2):v.labelPosHorizontal=="right"&&v.setWidth(R+v.labelWidth)),v.labelHeight&&(v.labelPosVertical=="top"?(v.rect.y-=v.labelHeight,v.setHeight(w+v.labelHeight),v.labelMarginTop=v.labelHeight):v.labelPosVertical=="center"&&v.labelHeight>w?(v.rect.y-=(v.labelHeight-w)/2,v.setHeight(v.labelHeight),v.labelMarginTop=(v.labelHeight-w)/2):v.labelPosVertical=="bottom"&&v.setHeight(w+v.labelHeight))}})},G.prototype.tileNodes=function(n,E){var f=this.tileNodesByFavoringDim(n,E,!0),y=this.tileNodesByFavoringDim(n,E,!1),v=this.getOrgRatio(f),R=this.getOrgRatio(y),w;return R<v?w=y:w=f,w},G.prototype.getOrgRatio=function(n){var E=n.width,f=n.height,y=E/f;return y<1&&(y=1/y),y},G.prototype.calcIdealRowWidth=function(n,E){var f=c.TILING_PADDING_VERTICAL,y=c.TILING_PADDING_HORIZONTAL,v=n.length,R=0,w=0,X=0;n.forEach(function(j){R+=j.getWidth(),w+=j.getHeight(),j.getWidth()>X&&(X=j.getWidth())});var H=R/v,U=w/v,tt=Math.pow(f-y,2)+4*(H+y)*(U+f)*v,ft=(y-f+Math.sqrt(tt))/(2*(H+y)),B;E?(B=Math.ceil(ft),B==ft&&B++):B=Math.floor(ft);var lt=B*(H+y)-y;return X>lt&&(lt=X),lt+=y*2,lt},G.prototype.tileNodesByFavoringDim=function(n,E,f){var y=c.TILING_PADDING_VERTICAL,v=c.TILING_PADDING_HORIZONTAL,R=c.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:y,horizontalPadding:v,centerX:0,centerY:0};R&&(w.idealRowWidth=this.calcIdealRowWidth(n,f));var X=function(O){return O.rect.width*O.rect.height},H=function(O,$){return X($)-X(O)};n.sort(function(j,O){var $=H;return w.idealRowWidth?($=R,$(j.id,O.id)):$(j,O)});for(var U=0,tt=0,ft=0;ft<n.length;ft++){var B=n[ft];U+=B.getCenterX(),tt+=B.getCenterY()}w.centerX=U/n.length,w.centerY=tt/n.length;for(var ft=0;ft<n.length;ft++){var B=n[ft];if(w.rows.length==0)this.insertNodeToRow(w,B,0,E);else if(this.canAddHorizontal(w,B.rect.width,B.rect.height)){var lt=w.rows.length-1;w.idealRowWidth||(lt=this.getShortestRowIndex(w)),this.insertNodeToRow(w,B,lt,E)}else this.insertNodeToRow(w,B,w.rows.length,E);this.shiftToLastRow(w)}return w},G.prototype.insertNodeToRow=function(n,E,f,y){var v=y;if(f==n.rows.length){var R=[];n.rows.push(R),n.rowWidth.push(v),n.rowHeight.push(0)}var w=n.rowWidth[f]+E.rect.width;n.rows[f].length>0&&(w+=n.horizontalPadding),n.rowWidth[f]=w,n.width<w&&(n.width=w);var X=E.rect.height;f>0&&(X+=n.verticalPadding);var H=0;X>n.rowHeight[f]&&(H=n.rowHeight[f],n.rowHeight[f]=X,H=n.rowHeight[f]-H),n.height+=H,n.rows[f].push(E)},G.prototype.getShortestRowIndex=function(n){for(var E=-1,f=Number.MAX_VALUE,y=0;y<n.rows.length;y++)n.rowWidth[y]<f&&(E=y,f=n.rowWidth[y]);return E},G.prototype.getLongestRowIndex=function(n){for(var E=-1,f=Number.MIN_VALUE,y=0;y<n.rows.length;y++)n.rowWidth[y]>f&&(E=y,f=n.rowWidth[y]);return E},G.prototype.canAddHorizontal=function(n,E,f){if(n.idealRowWidth){var y=n.rows.length-1,v=n.rowWidth[y];return v+E+n.horizontalPadding<=n.idealRowWidth}var R=this.getShortestRowIndex(n);if(R<0)return!0;var w=n.rowWidth[R];if(w+n.horizontalPadding+E<=n.width)return!0;var X=0;n.rowHeight[R]<f&&R>0&&(X=f+n.verticalPadding-n.rowHeight[R]);var H;n.width-w>=E+n.horizontalPadding?H=(n.height+X)/(w+E+n.horizontalPadding):H=(n.height+X)/n.width,X=f+n.verticalPadding;var U;return n.width<E?U=(n.height+X)/E:U=(n.height+X)/n.width,U<1&&(U=1/U),H<1&&(H=1/H),H<U},G.prototype.shiftToLastRow=function(n){var E=this.getLongestRowIndex(n),f=n.rowWidth.length-1,y=n.rows[E],v=y[y.length-1],R=v.width+n.horizontalPadding;if(n.width-n.rowWidth[f]>R&&E!=f){y.splice(-1,1),n.rows[f].push(v),n.rowWidth[E]=n.rowWidth[E]-R,n.rowWidth[f]=n.rowWidth[f]+R,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var w=Number.MIN_VALUE,X=0;X<y.length;X++)y[X].height>w&&(w=y[X].height);E>0&&(w+=n.verticalPadding);var H=n.rowHeight[E]+n.rowHeight[f];n.rowHeight[E]=w,n.rowHeight[f]<v.height+n.verticalPadding&&(n.rowHeight[f]=v.height+n.verticalPadding);var U=n.rowHeight[E]+n.rowHeight[f];n.height+=U-H,this.shiftToLastRow(n)}},G.prototype.tilingPreLayout=function(){c.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},G.prototype.tilingPostLayout=function(){c.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},G.prototype.reduceTrees=function(){for(var n=[],E=!0,f;E;){var y=this.graphManager.getAllNodes(),v=[];E=!1;for(var R=0;R<y.length;R++)if(f=y[R],f.getEdges().length==1&&!f.getEdges()[0].isInterGraph&&f.getChild()==null){if(c.PURE_INCREMENTAL){var w=f.getEdges()[0].getOtherEnd(f),X=new D(f.getCenterX()-w.getCenterX(),f.getCenterY()-w.getCenterY());v.push([f,f.getEdges()[0],f.getOwner(),X])}else v.push([f,f.getEdges()[0],f.getOwner()]);E=!0}if(E==!0){for(var H=[],U=0;U<v.length;U++)v[U][0].getEdges().length==1&&(H.push(v[U]),v[U][0].getOwner().remove(v[U][0]));n.push(H),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=n},G.prototype.growTree=function(n){for(var E=n.length,f=n[E-1],y,v=0;v<f.length;v++)y=f[v],this.findPlaceforPrunedNode(y),y[2].add(y[0]),y[2].add(y[1],y[1].source,y[1].target);n.splice(n.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},G.prototype.findPlaceforPrunedNode=function(n){var E,f,y=n[0];if(y==n[1].source?f=n[1].target:f=n[1].source,c.PURE_INCREMENTAL)y.setCenter(f.getCenterX()+n[3].getWidth(),f.getCenterY()+n[3].getHeight());else{var v=f.startX,R=f.finishX,w=f.startY,X=f.finishY,H=0,U=0,tt=0,ft=0,B=[H,tt,U,ft];if(w>0)for(var lt=v;lt<=R;lt++)B[0]+=this.grid[lt][w-1].length+this.grid[lt][w].length-1;if(R<this.grid.length-1)for(var lt=w;lt<=X;lt++)B[1]+=this.grid[R+1][lt].length+this.grid[R][lt].length-1;if(X<this.grid[0].length-1)for(var lt=v;lt<=R;lt++)B[2]+=this.grid[lt][X+1].length+this.grid[lt][X].length-1;if(v>0)for(var lt=w;lt<=X;lt++)B[3]+=this.grid[v-1][lt].length+this.grid[v][lt].length-1;for(var j=I.MAX_VALUE,O,$,K=0;K<B.length;K++)B[K]<j?(j=B[K],O=1,$=K):B[K]==j&&O++;if(O==3&&j==0)B[0]==0&&B[1]==0&&B[2]==0?E=1:B[0]==0&&B[1]==0&&B[3]==0?E=0:B[0]==0&&B[2]==0&&B[3]==0?E=3:B[1]==0&&B[2]==0&&B[3]==0&&(E=2);else if(O==2&&j==0){var ht=Math.floor(Math.random()*2);B[0]==0&&B[1]==0?ht==0?E=0:E=1:B[0]==0&&B[2]==0?ht==0?E=0:E=2:B[0]==0&&B[3]==0?ht==0?E=0:E=3:B[1]==0&&B[2]==0?ht==0?E=1:E=2:B[1]==0&&B[3]==0?ht==0?E=1:E=3:ht==0?E=2:E=3}else if(O==4&&j==0){var ht=Math.floor(Math.random()*4);E=ht}else E=$;E==0?y.setCenter(f.getCenterX(),f.getCenterY()-f.getHeight()/2-h.DEFAULT_EDGE_LENGTH-y.getHeight()/2):E==1?y.setCenter(f.getCenterX()+f.getWidth()/2+h.DEFAULT_EDGE_LENGTH+y.getWidth()/2,f.getCenterY()):E==2?y.setCenter(f.getCenterX(),f.getCenterY()+f.getHeight()/2+h.DEFAULT_EDGE_LENGTH+y.getHeight()/2):y.setCenter(f.getCenterX()-f.getWidth()/2-h.DEFAULT_EDGE_LENGTH-y.getWidth()/2,f.getCenterY())}},r.exports=G},991:(r,p,i)=>{var g=i(551).FDLayoutNode,t=i(551).IMath;function a(u,c,m,h){g.call(this,u,c,m,h)}a.prototype=Object.create(g.prototype);for(var l in g)a[l]=g[l];a.prototype.calculateDisplacement=function(){var u=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=u.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=u.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=u.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=u.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>u.coolingFactor*u.maxNodeDisplacement&&(this.displacementX=u.coolingFactor*u.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>u.coolingFactor*u.maxNodeDisplacement&&(this.displacementY=u.coolingFactor*u.maxNodeDisplacement*t.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},a.prototype.propogateDisplacementToChildren=function(u,c){for(var m=this.getChild().getNodes(),h,C=0;C<m.length;C++)h=m[C],h.getChild()==null?(h.displacementX+=u,h.displacementY+=c):h.propogateDisplacementToChildren(u,c)},a.prototype.move=function(){var u=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),u.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},a.prototype.setPred1=function(u){this.pred1=u},a.prototype.getPred1=function(){return pred1},a.prototype.getPred2=function(){return pred2},a.prototype.setNext=function(u){this.next=u},a.prototype.getNext=function(){return next},a.prototype.setProcessed=function(u){this.processed=u},a.prototype.isProcessed=function(){return processed},r.exports=a},902:(r,p,i)=>{function g(m){if(Array.isArray(m)){for(var h=0,C=Array(m.length);h<m.length;h++)C[h]=m[h];return C}else return Array.from(m)}var t=i(806),a=i(551).LinkedList,l=i(551).Matrix,u=i(551).SVD;function c(){}c.handleConstraints=function(m){var h={};h.fixedNodeConstraint=m.constraints.fixedNodeConstraint,h.alignmentConstraint=m.constraints.alignmentConstraint,h.relativePlacementConstraint=m.constraints.relativePlacementConstraint;for(var C=new Map,T=new Map,N=[],D=[],_=m.getAllNodes(),I=0,ot=0;ot<_.length;ot++){var mt=_[ot];mt.getChild()==null&&(T.set(mt.id,I++),N.push(mt.getCenterX()),D.push(mt.getCenterY()),C.set(mt.id,mt))}h.relativePlacementConstraint&&h.relativePlacementConstraint.forEach(function(A){!A.gap&&A.gap!=0&&(A.left?A.gap=t.DEFAULT_EDGE_LENGTH+C.get(A.left).getWidth()/2+C.get(A.right).getWidth()/2:A.gap=t.DEFAULT_EDGE_LENGTH+C.get(A.top).getHeight()/2+C.get(A.bottom).getHeight()/2)});var vt=function(F,b){return{x:F.x-b.x,y:F.y-b.y}},Dt=function(F){var b=0,Y=0;return F.forEach(function(P){b+=N[T.get(P)],Y+=D[T.get(P)]}),{x:b/F.size,y:Y/F.size}},G=function(F,b,Y,P,W){function yt(Nt,Et){var wt=new Set(Nt),Lt=!0,Ct=!1,Ut=void 0;try{for(var xt=Et[Symbol.iterator](),Ft;!(Lt=(Ft=xt.next()).done);Lt=!0){var zt=Ft.value;wt.add(zt)}}catch(Ht){Ct=!0,Ut=Ht}finally{try{!Lt&&xt.return&&xt.return()}finally{if(Ct)throw Ut}}return wt}var st=new Map;F.forEach(function(Nt,Et){st.set(Et,0)}),F.forEach(function(Nt,Et){Nt.forEach(function(wt){st.set(wt.id,st.get(wt.id)+1)})});var z=new Map,J=new Map,pt=new a;st.forEach(function(Nt,Et){Nt==0?(pt.push(Et),Y||(b=="horizontal"?z.set(Et,T.has(Et)?N[T.get(Et)]:P.get(Et)):z.set(Et,T.has(Et)?D[T.get(Et)]:P.get(Et)))):z.set(Et,Number.NEGATIVE_INFINITY),Y&&J.set(Et,new Set([Et]))}),Y&&W.forEach(function(Nt){var Et=[];if(Nt.forEach(function(Ct){Y.has(Ct)&&Et.push(Ct)}),Et.length>0){var wt=0;Et.forEach(function(Ct){b=="horizontal"?(z.set(Ct,T.has(Ct)?N[T.get(Ct)]:P.get(Ct)),wt+=z.get(Ct)):(z.set(Ct,T.has(Ct)?D[T.get(Ct)]:P.get(Ct)),wt+=z.get(Ct))}),wt=wt/Et.length,Nt.forEach(function(Ct){Y.has(Ct)||z.set(Ct,wt)})}else{var Lt=0;Nt.forEach(function(Ct){b=="horizontal"?Lt+=T.has(Ct)?N[T.get(Ct)]:P.get(Ct):Lt+=T.has(Ct)?D[T.get(Ct)]:P.get(Ct)}),Lt=Lt/Nt.length,Nt.forEach(function(Ct){z.set(Ct,Lt)})}});for(var Ot=function(){var Et=pt.shift(),wt=F.get(Et);wt.forEach(function(Lt){if(z.get(Lt.id)<z.get(Et)+Lt.gap)if(Y&&Y.has(Lt.id)){var Ct=void 0;if(b=="horizontal"?Ct=T.has(Lt.id)?N[T.get(Lt.id)]:P.get(Lt.id):Ct=T.has(Lt.id)?D[T.get(Lt.id)]:P.get(Lt.id),z.set(Lt.id,Ct),Ct<z.get(Et)+Lt.gap){var Ut=z.get(Et)+Lt.gap-Ct;J.get(Et).forEach(function(xt){z.set(xt,z.get(xt)-Ut)})}}else z.set(Lt.id,z.get(Et)+Lt.gap);st.set(Lt.id,st.get(Lt.id)-1),st.get(Lt.id)==0&&pt.push(Lt.id),Y&&J.set(Lt.id,yt(J.get(Et),J.get(Lt.id)))})};pt.length!=0;)Ot();if(Y){var At=new Set;F.forEach(function(Nt,Et){Nt.length==0&&At.add(Et)});var St=[];J.forEach(function(Nt,Et){if(At.has(Et)){var wt=!1,Lt=!0,Ct=!1,Ut=void 0;try{for(var xt=Nt[Symbol.iterator](),Ft;!(Lt=(Ft=xt.next()).done);Lt=!0){var zt=Ft.value;Y.has(zt)&&(wt=!0)}}catch(Gt){Ct=!0,Ut=Gt}finally{try{!Lt&&xt.return&&xt.return()}finally{if(Ct)throw Ut}}if(!wt){var Ht=!1,Vt=void 0;St.forEach(function(Gt,$t){Gt.has([].concat(g(Nt))[0])&&(Ht=!0,Vt=$t)}),Ht?Nt.forEach(function(Gt){St[Vt].add(Gt)}):St.push(new Set(Nt))}}}),St.forEach(function(Nt,Et){var wt=Number.POSITIVE_INFINITY,Lt=Number.POSITIVE_INFINITY,Ct=Number.NEGATIVE_INFINITY,Ut=Number.NEGATIVE_INFINITY,xt=!0,Ft=!1,zt=void 0;try{for(var Ht=Nt[Symbol.iterator](),Vt;!(xt=(Vt=Ht.next()).done);xt=!0){var Gt=Vt.value,$t=void 0;b=="horizontal"?$t=T.has(Gt)?N[T.get(Gt)]:P.get(Gt):$t=T.has(Gt)?D[T.get(Gt)]:P.get(Gt);var Qt=z.get(Gt);$t<wt&&(wt=$t),$t>Ct&&(Ct=$t),Qt<Lt&&(Lt=Qt),Qt>Ut&&(Ut=Qt)}}catch(te){Ft=!0,zt=te}finally{try{!xt&&Ht.return&&Ht.return()}finally{if(Ft)throw zt}}var ae=(wt+Ct)/2-(Lt+Ut)/2,Kt=!0,qt=!1,jt=void 0;try{for(var Jt=Nt[Symbol.iterator](),re;!(Kt=(re=Jt.next()).done);Kt=!0){var _t=re.value;z.set(_t,z.get(_t)+ae)}}catch(te){qt=!0,jt=te}finally{try{!Kt&&Jt.return&&Jt.return()}finally{if(qt)throw jt}}})}return z},k=function(F){var b=0,Y=0,P=0,W=0;if(F.forEach(function(J){J.left?N[T.get(J.left)]-N[T.get(J.right)]>=0?b++:Y++:D[T.get(J.top)]-D[T.get(J.bottom)]>=0?P++:W++}),b>Y&&P>W)for(var yt=0;yt<T.size;yt++)N[yt]=-1*N[yt],D[yt]=-1*D[yt];else if(b>Y)for(var st=0;st<T.size;st++)N[st]=-1*N[st];else if(P>W)for(var z=0;z<T.size;z++)D[z]=-1*D[z]},n=function(F){var b=[],Y=new a,P=new Set,W=0;return F.forEach(function(yt,st){if(!P.has(st)){b[W]=[];var z=st;for(Y.push(z),P.add(z),b[W].push(z);Y.length!=0;){z=Y.shift();var J=F.get(z);J.forEach(function(pt){P.has(pt.id)||(Y.push(pt.id),P.add(pt.id),b[W].push(pt.id))})}W++}}),b},E=function(F){var b=new Map;return F.forEach(function(Y,P){b.set(P,[])}),F.forEach(function(Y,P){Y.forEach(function(W){b.get(P).push(W),b.get(W.id).push({id:P,gap:W.gap,direction:W.direction})})}),b},f=function(F){var b=new Map;return F.forEach(function(Y,P){b.set(P,[])}),F.forEach(function(Y,P){Y.forEach(function(W){b.get(W.id).push({id:P,gap:W.gap,direction:W.direction})})}),b},y=[],v=[],R=!1,w=!1,X=new Set,H=new Map,U=new Map,tt=[];if(h.fixedNodeConstraint&&h.fixedNodeConstraint.forEach(function(A){X.add(A.nodeId)}),h.relativePlacementConstraint&&(h.relativePlacementConstraint.forEach(function(A){A.left?(H.has(A.left)?H.get(A.left).push({id:A.right,gap:A.gap,direction:"horizontal"}):H.set(A.left,[{id:A.right,gap:A.gap,direction:"horizontal"}]),H.has(A.right)||H.set(A.right,[])):(H.has(A.top)?H.get(A.top).push({id:A.bottom,gap:A.gap,direction:"vertical"}):H.set(A.top,[{id:A.bottom,gap:A.gap,direction:"vertical"}]),H.has(A.bottom)||H.set(A.bottom,[]))}),U=E(H),tt=n(U)),t.TRANSFORM_ON_CONSTRAINT_HANDLING){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>1)h.fixedNodeConstraint.forEach(function(A,F){y[F]=[A.position.x,A.position.y],v[F]=[N[T.get(A.nodeId)],D[T.get(A.nodeId)]]}),R=!0;else if(h.alignmentConstraint)(function(){var A=0;if(h.alignmentConstraint.vertical){for(var F=h.alignmentConstraint.vertical,b=function(z){var J=new Set;F[z].forEach(function(At){J.add(At)});var pt=new Set([].concat(g(J)).filter(function(At){return X.has(At)})),Ot=void 0;pt.size>0?Ot=N[T.get(pt.values().next().value)]:Ot=Dt(J).x,F[z].forEach(function(At){y[A]=[Ot,D[T.get(At)]],v[A]=[N[T.get(At)],D[T.get(At)]],A++})},Y=0;Y<F.length;Y++)b(Y);R=!0}if(h.alignmentConstraint.horizontal){for(var P=h.alignmentConstraint.horizontal,W=function(z){var J=new Set;P[z].forEach(function(At){J.add(At)});var pt=new Set([].concat(g(J)).filter(function(At){return X.has(At)})),Ot=void 0;pt.size>0?Ot=N[T.get(pt.values().next().value)]:Ot=Dt(J).y,P[z].forEach(function(At){y[A]=[N[T.get(At)],Ot],v[A]=[N[T.get(At)],D[T.get(At)]],A++})},yt=0;yt<P.length;yt++)W(yt);R=!0}h.relativePlacementConstraint&&(w=!0)})();else if(h.relativePlacementConstraint){for(var ft=0,B=0,lt=0;lt<tt.length;lt++)tt[lt].length>ft&&(ft=tt[lt].length,B=lt);if(ft<U.size/2)k(h.relativePlacementConstraint),R=!1,w=!1;else{var j=new Map,O=new Map,$=[];tt[B].forEach(function(A){H.get(A).forEach(function(F){F.direction=="horizontal"?(j.has(A)?j.get(A).push(F):j.set(A,[F]),j.has(F.id)||j.set(F.id,[]),$.push({left:A,right:F.id})):(O.has(A)?O.get(A).push(F):O.set(A,[F]),O.has(F.id)||O.set(F.id,[]),$.push({top:A,bottom:F.id}))})}),k($),w=!1;var K=G(j,"horizontal"),ht=G(O,"vertical");tt[B].forEach(function(A,F){v[F]=[N[T.get(A)],D[T.get(A)]],y[F]=[],K.has(A)?y[F][0]=K.get(A):y[F][0]=N[T.get(A)],ht.has(A)?y[F][1]=ht.get(A):y[F][1]=D[T.get(A)]}),R=!0}}if(R){for(var Mt=void 0,rt=l.transpose(y),bt=l.transpose(v),Rt=0;Rt<rt.length;Rt++)rt[Rt]=l.multGamma(rt[Rt]),bt[Rt]=l.multGamma(bt[Rt]);var Xt=l.multMat(rt,l.transpose(bt)),x=u.svd(Xt);Mt=l.multMat(x.V,l.transpose(x.U));for(var L=0;L<T.size;L++){var M=[N[L],D[L]],V=[Mt[0][0],Mt[1][0]],Z=[Mt[0][1],Mt[1][1]];N[L]=l.dotProduct(M,V),D[L]=l.dotProduct(M,Z)}w&&k(h.relativePlacementConstraint)}}if(t.ENFORCE_CONSTRAINTS){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>0){var Q={x:0,y:0};h.fixedNodeConstraint.forEach(function(A,F){var b={x:N[T.get(A.nodeId)],y:D[T.get(A.nodeId)]},Y=A.position,P=vt(Y,b);Q.x+=P.x,Q.y+=P.y}),Q.x/=h.fixedNodeConstraint.length,Q.y/=h.fixedNodeConstraint.length,N.forEach(function(A,F){N[F]+=Q.x}),D.forEach(function(A,F){D[F]+=Q.y}),h.fixedNodeConstraint.forEach(function(A){N[T.get(A.nodeId)]=A.position.x,D[T.get(A.nodeId)]=A.position.y})}if(h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var ct=h.alignmentConstraint.vertical,q=function(F){var b=new Set;ct[F].forEach(function(W){b.add(W)});var Y=new Set([].concat(g(b)).filter(function(W){return X.has(W)})),P=void 0;Y.size>0?P=N[T.get(Y.values().next().value)]:P=Dt(b).x,b.forEach(function(W){X.has(W)||(N[T.get(W)]=P)})},at=0;at<ct.length;at++)q(at);if(h.alignmentConstraint.horizontal)for(var et=h.alignmentConstraint.horizontal,nt=function(F){var b=new Set;et[F].forEach(function(W){b.add(W)});var Y=new Set([].concat(g(b)).filter(function(W){return X.has(W)})),P=void 0;Y.size>0?P=D[T.get(Y.values().next().value)]:P=Dt(b).y,b.forEach(function(W){X.has(W)||(D[T.get(W)]=P)})},dt=0;dt<et.length;dt++)nt(dt)}h.relativePlacementConstraint&&function(){var A=new Map,F=new Map,b=new Map,Y=new Map,P=new Map,W=new Map,yt=new Set,st=new Set;if(X.forEach(function(Wt){yt.add(Wt),st.add(Wt)}),h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var z=h.alignmentConstraint.vertical,J=function(It){b.set("dummy"+It,[]),z[It].forEach(function(Pt){A.set(Pt,"dummy"+It),b.get("dummy"+It).push(Pt),X.has(Pt)&&yt.add("dummy"+It)}),P.set("dummy"+It,N[T.get(z[It][0])])},pt=0;pt<z.length;pt++)J(pt);if(h.alignmentConstraint.horizontal)for(var Ot=h.alignmentConstraint.horizontal,At=function(It){Y.set("dummy"+It,[]),Ot[It].forEach(function(Pt){F.set(Pt,"dummy"+It),Y.get("dummy"+It).push(Pt),X.has(Pt)&&st.add("dummy"+It)}),W.set("dummy"+It,D[T.get(Ot[It][0])])},St=0;St<Ot.length;St++)At(St)}var Nt=new Map,Et=new Map,wt=function(It){H.get(It).forEach(function(Pt){var Zt=void 0,Bt=void 0;Pt.direction=="horizontal"?(Zt=A.get(It)?A.get(It):It,A.get(Pt.id)?Bt={id:A.get(Pt.id),gap:Pt.gap,direction:Pt.direction}:Bt=Pt,Nt.has(Zt)?Nt.get(Zt).push(Bt):Nt.set(Zt,[Bt]),Nt.has(Bt.id)||Nt.set(Bt.id,[])):(Zt=F.get(It)?F.get(It):It,F.get(Pt.id)?Bt={id:F.get(Pt.id),gap:Pt.gap,direction:Pt.direction}:Bt=Pt,Et.has(Zt)?Et.get(Zt).push(Bt):Et.set(Zt,[Bt]),Et.has(Bt.id)||Et.set(Bt.id,[]))})},Lt=!0,Ct=!1,Ut=void 0;try{for(var xt=H.keys()[Symbol.iterator](),Ft;!(Lt=(Ft=xt.next()).done);Lt=!0){var zt=Ft.value;wt(zt)}}catch(Wt){Ct=!0,Ut=Wt}finally{try{!Lt&&xt.return&&xt.return()}finally{if(Ct)throw Ut}}var Ht=E(Nt),Vt=E(Et),Gt=n(Ht),$t=n(Vt),Qt=f(Nt),ae=f(Et),Kt=[],qt=[];Gt.forEach(function(Wt,It){Kt[It]=[],Wt.forEach(function(Pt){Qt.get(Pt).length==0&&Kt[It].push(Pt)})}),$t.forEach(function(Wt,It){qt[It]=[],Wt.forEach(function(Pt){ae.get(Pt).length==0&&qt[It].push(Pt)})});var jt=G(Nt,"horizontal",yt,P,Kt),Jt=G(Et,"vertical",st,W,qt),re=function(It){b.get(It)?b.get(It).forEach(function(Pt){N[T.get(Pt)]=jt.get(It)}):N[T.get(It)]=jt.get(It)},_t=!0,te=!1,le=void 0;try{for(var ne=jt.keys()[Symbol.iterator](),fe;!(_t=(fe=ne.next()).done);_t=!0){var oe=fe.value;re(oe)}}catch(Wt){te=!0,le=Wt}finally{try{!_t&&ne.return&&ne.return()}finally{if(te)throw le}}var pe=function(It){Y.get(It)?Y.get(It).forEach(function(Pt){D[T.get(Pt)]=Jt.get(It)}):D[T.get(It)]=Jt.get(It)},se=!0,ce=!1,ue=void 0;try{for(var he=Jt.keys()[Symbol.iterator](),ge;!(se=(ge=he.next()).done);se=!0){var oe=ge.value;pe(oe)}}catch(Wt){ce=!0,ue=Wt}finally{try{!se&&he.return&&he.return()}finally{if(ce)throw ue}}}()}for(var Tt=0;Tt<_.length;Tt++){var gt=_[Tt];gt.getChild()==null&>.setCenter(N[T.get(gt.id)],D[T.get(gt.id)])}},r.exports=c},551:r=>{r.exports=S}},s={};function o(r){var p=s[r];if(p!==void 0)return p.exports;var i=s[r]={exports:{}};return d[r](i,i.exports,o),i.exports}var e=o(45);return e})()})},13035:function(Yt){(function(ut,S){Yt.exports=S()})(this,function(){return function(it){var ut={};function S(d){if(ut[d])return ut[d].exports;var s=ut[d]={i:d,l:!1,exports:{}};return it[d].call(s.exports,s,s.exports,S),s.l=!0,s.exports}return S.m=it,S.c=ut,S.i=function(d){return d},S.d=function(d,s,o){S.o(d,s)||Object.defineProperty(d,s,{configurable:!1,enumerable:!0,get:o})},S.n=function(d){var s=d&&d.__esModule?function(){return d.default}:function(){return d};return S.d(s,"a",s),s},S.o=function(d,s){return Object.prototype.hasOwnProperty.call(d,s)},S.p="",S(S.s=28)}([function(it,ut,S){"use strict";function d(){}d.QUALITY=1,d.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,d.DEFAULT_INCREMENTAL=!1,d.DEFAULT_ANIMATION_ON_LAYOUT=!0,d.DEFAULT_ANIMATION_DURING_LAYOUT=!1,d.DEFAULT_ANIMATION_PERIOD=50,d.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,d.DEFAULT_GRAPH_MARGIN=15,d.NODE_DIMENSIONS_INCLUDE_LABELS=!1,d.SIMPLE_NODE_SIZE=40,d.SIMPLE_NODE_HALF_SIZE=d.SIMPLE_NODE_SIZE/2,d.EMPTY_COMPOUND_NODE_SIZE=40,d.MIN_EDGE_LENGTH=1,d.WORLD_BOUNDARY=1e6,d.INITIAL_WORLD_BOUNDARY=d.WORLD_BOUNDARY/1e3,d.WORLD_CENTER_X=1200,d.WORLD_CENTER_Y=900,it.exports=d},function(it,ut,S){"use strict";var d=S(2),s=S(8),o=S(9);function e(p,i,g){d.call(this,g),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=g,this.bendpoints=[],this.source=p,this.target=i}e.prototype=Object.create(d.prototype);for(var r in d)e[r]=d[r];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(p){if(this.source===p)return this.target;if(this.target===p)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(p,i){for(var g=this.getOtherEnd(p),t=i.getGraphManager().getRoot();;){if(g.getOwner()==i)return g;if(g.getOwner()==t)break;g=g.getOwner().getParent()}return null},e.prototype.updateLength=function(){var p=new Array(4);this.isOverlapingSourceAndTarget=s.getIntersection(this.target.getRect(),this.source.getRect(),p),this.isOverlapingSourceAndTarget||(this.lengthX=p[0]-p[2],this.lengthY=p[1]-p[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},it.exports=e},function(it,ut,S){"use strict";function d(s){this.vGraphObject=s}it.exports=d},function(it,ut,S){"use strict";var d=S(2),s=S(10),o=S(13),e=S(0),r=S(16),p=S(5);function i(t,a,l,u){l==null&&u==null&&(u=a),d.call(this,u),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=s.MIN_VALUE,this.inclusionTreeDepth=s.MAX_VALUE,this.vGraphObject=u,this.edges=[],this.graphManager=t,l!=null&&a!=null?this.rect=new o(a.x,a.y,l.width,l.height):this.rect=new o}i.prototype=Object.create(d.prototype);for(var g in d)i[g]=d[g];i.prototype.getEdges=function(){return this.edges},i.prototype.getChild=function(){return this.child},i.prototype.getOwner=function(){return this.owner},i.prototype.getWidth=function(){return this.rect.width},i.prototype.setWidth=function(t){this.rect.width=t},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(t){this.rect.height=t},i.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},i.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},i.prototype.getCenter=function(){return new p(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new p(this.rect.x,this.rect.y)},i.prototype.getRect=function(){return this.rect},i.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},i.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},i.prototype.setRect=function(t,a){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=a.width,this.rect.height=a.height},i.prototype.setCenter=function(t,a){this.rect.x=t-this.rect.width/2,this.rect.y=a-this.rect.height/2},i.prototype.setLocation=function(t,a){this.rect.x=t,this.rect.y=a},i.prototype.moveBy=function(t,a){this.rect.x+=t,this.rect.y+=a},i.prototype.getEdgeListToNode=function(t){var a=[],l,u=this;return u.edges.forEach(function(c){if(c.target==t){if(c.source!=u)throw"Incorrect edge source!";a.push(c)}}),a},i.prototype.getEdgesBetween=function(t){var a=[],l,u=this;return u.edges.forEach(function(c){if(!(c.source==u||c.target==u))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&a.push(c)}),a},i.prototype.getNeighborsList=function(){var t=new Set,a=this;return a.edges.forEach(function(l){if(l.source==a)t.add(l.target);else{if(l.target!=a)throw"Incorrect incidency!";t.add(l.source)}}),t},i.prototype.withChildren=function(){var t=new Set,a,l;if(t.add(this),this.child!=null)for(var u=this.child.getNodes(),c=0;c<u.length;c++)a=u[c],l=a.withChildren(),l.forEach(function(m){t.add(m)});return t},i.prototype.getNoOfChildren=function(){var t=0,a;if(this.child==null)t=1;else for(var l=this.child.getNodes(),u=0;u<l.length;u++)a=l[u],t+=a.getNoOfChildren();return t==0&&(t=1),t},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==s.MIN_VALUE)throw"assert failed";return this.estimatedSize},i.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)},i.prototype.scatter=function(){var t,a,l=-e.INITIAL_WORLD_BOUNDARY,u=e.INITIAL_WORLD_BOUNDARY;t=e.WORLD_CENTER_X+r.nextDouble()*(u-l)+l;var c=-e.INITIAL_WORLD_BOUNDARY,m=e.INITIAL_WORLD_BOUNDARY;a=e.WORLD_CENTER_Y+r.nextDouble()*(m-c)+c,this.rect.x=t,this.rect.y=a},i.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var a=t.getRight()-t.getLeft(),l=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(a+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>a?(this.rect.x-=(this.labelWidth-a)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(a+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(l+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>l?(this.rect.y-=(this.labelHeight-l)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(l+this.labelHeight))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==s.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(t){var a=this.rect.x;a>e.WORLD_BOUNDARY?a=e.WORLD_BOUNDARY:a<-e.WORLD_BOUNDARY&&(a=-e.WORLD_BOUNDARY);var l=this.rect.y;l>e.WORLD_BOUNDARY?l=e.WORLD_BOUNDARY:l<-e.WORLD_BOUNDARY&&(l=-e.WORLD_BOUNDARY);var u=new p(a,l),c=t.inverseTransformPoint(u);this.setLocation(c.x,c.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},it.exports=i},function(it,ut,S){"use strict";var d=S(0);function s(){}for(var o in d)s[o]=d[o];s.MAX_ITERATIONS=2500,s.DEFAULT_EDGE_LENGTH=50,s.DEFAULT_SPRING_STRENGTH=.45,s.DEFAULT_REPULSION_STRENGTH=4500,s.DEFAULT_GRAVITY_STRENGTH=.4,s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,s.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,s.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,s.COOLING_ADAPTATION_FACTOR=.33,s.ADAPTATION_LOWER_NODE_LIMIT=1e3,s.ADAPTATION_UPPER_NODE_LIMIT=5e3,s.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,s.MAX_NODE_DISPLACEMENT=s.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,s.MIN_REPULSION_DIST=s.DEFAULT_EDGE_LENGTH/10,s.CONVERGENCE_CHECK_PERIOD=100,s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,s.MIN_EDGE_LENGTH=1,s.GRID_CALCULATION_CHECK_PERIOD=10,it.exports=s},function(it,ut,S){"use strict";function d(s,o){s==null&&o==null?(this.x=0,this.y=0):(this.x=s,this.y=o)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.setX=function(s){this.x=s},d.prototype.setY=function(s){this.y=s},d.prototype.getDifference=function(s){return new DimensionD(this.x-s.x,this.y-s.y)},d.prototype.getCopy=function(){return new d(this.x,this.y)},d.prototype.translate=function(s){return this.x+=s.width,this.y+=s.height,this},it.exports=d},function(it,ut,S){"use strict";var d=S(2),s=S(10),o=S(0),e=S(7),r=S(3),p=S(1),i=S(13),g=S(12),t=S(11);function a(u,c,m){d.call(this,m),this.estimatedSize=s.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=u,c!=null&&c instanceof e?this.graphManager=c:c!=null&&c instanceof Layout&&(this.graphManager=c.graphManager)}a.prototype=Object.create(d.prototype);for(var l in d)a[l]=d[l];a.prototype.getNodes=function(){return this.nodes},a.prototype.getEdges=function(){return this.edges},a.prototype.getGraphManager=function(){return this.graphManager},a.prototype.getParent=function(){return this.parent},a.prototype.getLeft=function(){return this.left},a.prototype.getRight=function(){return this.right},a.prototype.getTop=function(){return this.top},a.prototype.getBottom=function(){return this.bottom},a.prototype.isConnected=function(){return this.isConnected},a.prototype.add=function(u,c,m){if(c==null&&m==null){var h=u;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(h)>-1)throw"Node already in graph!";return h.owner=this,this.getNodes().push(h),h}else{var C=u;if(!(this.getNodes().indexOf(c)>-1&&this.getNodes().indexOf(m)>-1))throw"Source or target not in graph!";if(!(c.owner==m.owner&&c.owner==this))throw"Both owners must be this graph!";return c.owner!=m.owner?null:(C.source=c,C.target=m,C.isInterGraph=!1,this.getEdges().push(C),c.edges.push(C),m!=c&&m.edges.push(C),C)}},a.prototype.remove=function(u){var c=u;if(u instanceof r){if(c==null)throw"Node is null!";if(!(c.owner!=null&&c.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var m=c.edges.slice(),h,C=m.length,T=0;T<C;T++)h=m[T],h.isInterGraph?this.graphManager.remove(h):h.source.owner.remove(h);var N=this.nodes.indexOf(c);if(N==-1)throw"Node not in owner node list!";this.nodes.splice(N,1)}else if(u instanceof p){var h=u;if(h==null)throw"Edge is null!";if(!(h.source!=null&&h.target!=null))throw"Source and/or target is null!";if(!(h.source.owner!=null&&h.target.owner!=null&&h.source.owner==this&&h.target.owner==this))throw"Source and/or target owner is invalid!";var D=h.source.edges.indexOf(h),_=h.target.edges.indexOf(h);if(!(D>-1&&_>-1))throw"Source and/or target doesn't know this edge!";h.source.edges.splice(D,1),h.target!=h.source&&h.target.edges.splice(_,1);var N=h.source.owner.getEdges().indexOf(h);if(N==-1)throw"Not in owner's edge list!";h.source.owner.getEdges().splice(N,1)}},a.prototype.updateLeftTop=function(){for(var u=s.MAX_VALUE,c=s.MAX_VALUE,m,h,C,T=this.getNodes(),N=T.length,D=0;D<N;D++){var _=T[D];m=_.getTop(),h=_.getLeft(),u>m&&(u=m),c>h&&(c=h)}return u==s.MAX_VALUE?null:(T[0].getParent().paddingLeft!=null?C=T[0].getParent().paddingLeft:C=this.margin,this.left=c-C,this.top=u-C,new g(this.left,this.top))},a.prototype.updateBounds=function(u){for(var c=s.MAX_VALUE,m=-s.MAX_VALUE,h=s.MAX_VALUE,C=-s.MAX_VALUE,T,N,D,_,I,ot=this.nodes,mt=ot.length,vt=0;vt<mt;vt++){var Dt=ot[vt];u&&Dt.child!=null&&Dt.updateBounds(),T=Dt.getLeft(),N=Dt.getRight(),D=Dt.getTop(),_=Dt.getBottom(),c>T&&(c=T),m<N&&(m=N),h>D&&(h=D),C<_&&(C=_)}var G=new i(c,h,m-c,C-h);c==s.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),ot[0].getParent().paddingLeft!=null?I=ot[0].getParent().paddingLeft:I=this.margin,this.left=G.x-I,this.right=G.x+G.width+I,this.top=G.y-I,this.bottom=G.y+G.height+I},a.calculateBounds=function(u){for(var c=s.MAX_VALUE,m=-s.MAX_VALUE,h=s.MAX_VALUE,C=-s.MAX_VALUE,T,N,D,_,I=u.length,ot=0;ot<I;ot++){var mt=u[ot];T=mt.getLeft(),N=mt.getRight(),D=mt.getTop(),_=mt.getBottom(),c>T&&(c=T),m<N&&(m=N),h>D&&(h=D),C<_&&(C=_)}var vt=new i(c,h,m-c,C-h);return vt},a.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},a.prototype.getEstimatedSize=function(){if(this.estimatedSize==s.MIN_VALUE)throw"assert failed";return this.estimatedSize},a.prototype.calcEstimatedSize=function(){for(var u=0,c=this.nodes,m=c.length,h=0;h<m;h++){var C=c[h];u+=C.calcEstimatedSize()}return u==0?this.estimatedSize=o.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=u/Math.sqrt(this.nodes.length),this.estimatedSize},a.prototype.updateConnected=function(){var u=this;if(this.nodes.length==0){this.isConnected=!0;return}var c=new t,m=new Set,h=this.nodes[0],C,T,N=h.withChildren();for(N.forEach(function(vt){c.push(vt),m.add(vt)});c.length!==0;){h=c.shift(),C=h.getEdges();for(var D=C.length,_=0;_<D;_++){var I=C[_];if(T=I.getOtherEndInGraph(h,this),T!=null&&!m.has(T)){var ot=T.withChildren();ot.forEach(function(vt){c.push(vt),m.add(vt)})}}}if(this.isConnected=!1,m.size>=this.nodes.length){var mt=0;m.forEach(function(vt){vt.owner==u&&mt++}),mt==this.nodes.length&&(this.isConnected=!0)}},it.exports=a},function(it,ut,S){"use strict";var d,s=S(1);function o(e){d=S(6),this.layout=e,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var e=this.layout.newGraph(),r=this.layout.newNode(null),p=this.add(e,r);return this.setRootGraph(p),this.rootGraph},o.prototype.add=function(e,r,p,i,g){if(p==null&&i==null&&g==null){if(e==null)throw"Graph is null!";if(r==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(r.child!=null)throw"Already has a child!";return e.parent=r,r.child=e,e}else{g=p,i=r,p=e;var t=i.getOwner(),a=g.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(a!=null&&a.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==a)return p.isInterGraph=!1,t.add(p,i,g);if(p.isInterGraph=!0,p.source=i,p.target=g,this.edges.indexOf(p)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(p),!(p.source!=null&&p.target!=null))throw"Edge source and/or target is null!";if(!(p.source.edges.indexOf(p)==-1&&p.target.edges.indexOf(p)==-1))throw"Edge already in source and/or target incidency list!";return p.source.edges.push(p),p.target.edges.push(p),p}},o.prototype.remove=function(e){if(e instanceof d){var r=e;if(r.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(r==this.rootGraph||r.parent!=null&&r.parent.graphManager==this))throw"Invalid parent node!";var p=[];p=p.concat(r.getEdges());for(var i,g=p.length,t=0;t<g;t++)i=p[t],r.remove(i);var a=[];a=a.concat(r.getNodes());var l;g=a.length;for(var t=0;t<g;t++)l=a[t],r.remove(l);r==this.rootGraph&&this.setRootGraph(null);var u=this.graphs.indexOf(r);this.graphs.splice(u,1),r.parent=null}else if(e instanceof s){if(i=e,i==null)throw"Edge is null!";if(!i.isInterGraph)throw"Not an inter-graph edge!";if(!(i.source!=null&&i.target!=null))throw"Source and/or target is null!";if(!(i.source.edges.indexOf(i)!=-1&&i.target.edges.indexOf(i)!=-1))throw"Source and/or target doesn't know this edge!";var u=i.source.edges.indexOf(i);if(i.source.edges.splice(u,1),u=i.target.edges.indexOf(i),i.target.edges.splice(u,1),!(i.source.owner!=null&&i.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(i.source.owner.getGraphManager().edges.indexOf(i)==-1)throw"Not in owner graph manager's edge list!";var u=i.source.owner.getGraphManager().edges.indexOf(i);i.source.owner.getGraphManager().edges.splice(u,1)}},o.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},o.prototype.getGraphs=function(){return this.graphs},o.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],r=this.getGraphs(),p=r.length,i=0;i<p;i++)e=e.concat(r[i].getNodes());this.allNodes=e}return this.allNodes},o.prototype.resetAllNodes=function(){this.allNodes=null},o.prototype.resetAllEdges=function(){this.allEdges=null},o.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},o.prototype.getAllEdges=function(){if(this.allEdges==null){for(var e=[],r=this.getGraphs(),p=r.length,i=0;i<r.length;i++)e=e.concat(r[i].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},o.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},o.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},o.prototype.getRoot=function(){return this.rootGraph},o.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=e,e.parent==null&&(e.parent=this.layout.newNode("Root node"))},o.prototype.getLayout=function(){return this.layout},o.prototype.isOneAncestorOfOther=function(e,r){if(!(e!=null&&r!=null))throw"assert failed";if(e==r)return!0;var p=e.getOwner(),i;do{if(i=p.getParent(),i==null)break;if(i==r)return!0;if(p=i.getOwner(),p==null)break}while(!0);p=r.getOwner();do{if(i=p.getParent(),i==null)break;if(i==e)return!0;if(p=i.getOwner(),p==null)break}while(!0);return!1},o.prototype.calcLowestCommonAncestors=function(){for(var e,r,p,i,g,t=this.getAllEdges(),a=t.length,l=0;l<a;l++){if(e=t[l],r=e.source,p=e.target,e.lca=null,e.sourceInLca=r,e.targetInLca=p,r==p){e.lca=r.getOwner();continue}for(i=r.getOwner();e.lca==null;){for(e.targetInLca=p,g=p.getOwner();e.lca==null;){if(g==i){e.lca=g;break}if(g==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=g.getParent(),g=e.targetInLca.getOwner()}if(i==this.rootGraph)break;e.lca==null&&(e.sourceInLca=i.getParent(),i=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}},o.prototype.calcLowestCommonAncestor=function(e,r){if(e==r)return e.getOwner();var p=e.getOwner();do{if(p==null)break;var i=r.getOwner();do{if(i==null)break;if(i==p)return i;i=i.getParent().getOwner()}while(!0);p=p.getParent().getOwner()}while(!0);return p},o.prototype.calcInclusionTreeDepths=function(e,r){e==null&&r==null&&(e=this.rootGraph,r=1);for(var p,i=e.getNodes(),g=i.length,t=0;t<g;t++)p=i[t],p.inclusionTreeDepth=r,p.child!=null&&this.calcInclusionTreeDepths(p.child,r+1)},o.prototype.includesInvalidEdge=function(){for(var e,r=[],p=this.edges.length,i=0;i<p;i++)e=this.edges[i],this.isOneAncestorOfOther(e.source,e.target)&&r.push(e);for(var i=0;i<r.length;i++)this.remove(r[i]);return!1},it.exports=o},function(it,ut,S){"use strict";var d=S(12);function s(){}s.calcSeparationAmount=function(o,e,r,p){if(!o.intersects(e))throw"assert failed";var i=new Array(2);this.decideDirectionsForOverlappingNodes(o,e,i),r[0]=Math.min(o.getRight(),e.getRight())-Math.max(o.x,e.x),r[1]=Math.min(o.getBottom(),e.getBottom())-Math.max(o.y,e.y),o.getX()<=e.getX()&&o.getRight()>=e.getRight()?r[0]+=Math.min(e.getX()-o.getX(),o.getRight()-e.getRight()):e.getX()<=o.getX()&&e.getRight()>=o.getRight()&&(r[0]+=Math.min(o.getX()-e.getX(),e.getRight()-o.getRight())),o.getY()<=e.getY()&&o.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-o.getY(),o.getBottom()-e.getBottom()):e.getY()<=o.getY()&&e.getBottom()>=o.getBottom()&&(r[1]+=Math.min(o.getY()-e.getY(),e.getBottom()-o.getBottom()));var g=Math.abs((e.getCenterY()-o.getCenterY())/(e.getCenterX()-o.getCenterX()));e.getCenterY()===o.getCenterY()&&e.getCenterX()===o.getCenterX()&&(g=1);var t=g*r[0],a=r[1]/g;r[0]<a?a=r[0]:t=r[1],r[0]=-1*i[0]*(a/2+p),r[1]=-1*i[1]*(t/2+p)},s.decideDirectionsForOverlappingNodes=function(o,e,r){o.getCenterX()<e.getCenterX()?r[0]=-1:r[0]=1,o.getCenterY()<e.getCenterY()?r[1]=-1:r[1]=1},s.getIntersection2=function(o,e,r){var p=o.getCenterX(),i=o.getCenterY(),g=e.getCenterX(),t=e.getCenterY();if(o.intersects(e))return r[0]=p,r[1]=i,r[2]=g,r[3]=t,!0;var a=o.getX(),l=o.getY(),u=o.getRight(),c=o.getX(),m=o.getBottom(),h=o.getRight(),C=o.getWidthHalf(),T=o.getHeightHalf(),N=e.getX(),D=e.getY(),_=e.getRight(),I=e.getX(),ot=e.getBottom(),mt=e.getRight(),vt=e.getWidthHalf(),Dt=e.getHeightHalf(),G=!1,k=!1;if(p===g){if(i>t)return r[0]=p,r[1]=l,r[2]=g,r[3]=ot,!1;if(i<t)return r[0]=p,r[1]=m,r[2]=g,r[3]=D,!1}else if(i===t){if(p>g)return r[0]=a,r[1]=i,r[2]=_,r[3]=t,!1;if(p<g)return r[0]=u,r[1]=i,r[2]=N,r[3]=t,!1}else{var n=o.height/o.width,E=e.height/e.width,f=(t-i)/(g-p),y=void 0,v=void 0,R=void 0,w=void 0,X=void 0,H=void 0;if(-n===f?p>g?(r[0]=c,r[1]=m,G=!0):(r[0]=u,r[1]=l,G=!0):n===f&&(p>g?(r[0]=a,r[1]=l,G=!0):(r[0]=h,r[1]=m,G=!0)),-E===f?g>p?(r[2]=I,r[3]=ot,k=!0):(r[2]=_,r[3]=D,k=!0):E===f&&(g>p?(r[2]=N,r[3]=D,k=!0):(r[2]=mt,r[3]=ot,k=!0)),G&&k)return!1;if(p>g?i>t?(y=this.getCardinalDirection(n,f,4),v=this.getCardinalDirection(E,f,2)):(y=this.getCardinalDirection(-n,f,3),v=this.getCardinalDirection(-E,f,1)):i>t?(y=this.getCardinalDirection(-n,f,1),v=this.getCardinalDirection(-E,f,3)):(y=this.getCardinalDirection(n,f,2),v=this.getCardinalDirection(E,f,4)),!G)switch(y){case 1:w=l,R=p+-T/f,r[0]=R,r[1]=w;break;case 2:R=h,w=i+C*f,r[0]=R,r[1]=w;break;case 3:w=m,R=p+T/f,r[0]=R,r[1]=w;break;case 4:R=c,w=i+-C*f,r[0]=R,r[1]=w;break}if(!k)switch(v){case 1:H=D,X=g+-Dt/f,r[2]=X,r[3]=H;break;case 2:X=mt,H=t+vt*f,r[2]=X,r[3]=H;break;case 3:H=ot,X=g+Dt/f,r[2]=X,r[3]=H;break;case 4:X=I,H=t+-vt*f,r[2]=X,r[3]=H;break}}return!1},s.getCardinalDirection=function(o,e,r){return o>e?r:1+r%4},s.getIntersection=function(o,e,r,p){if(p==null)return this.getIntersection2(o,e,r);var i=o.x,g=o.y,t=e.x,a=e.y,l=r.x,u=r.y,c=p.x,m=p.y,h=void 0,C=void 0,T=void 0,N=void 0,D=void 0,_=void 0,I=void 0,ot=void 0,mt=void 0;return T=a-g,D=i-t,I=t*g-i*a,N=m-u,_=l-c,ot=c*u-l*m,mt=T*_-N*D,mt===0?null:(h=(D*ot-_*I)/mt,C=(N*I-T*ot)/mt,new d(h,C))},s.angleOfVector=function(o,e,r,p){var i=void 0;return o!==r?(i=Math.atan((p-e)/(r-o)),r<o?i+=Math.PI:p<e&&(i+=this.TWO_PI)):p<e?i=this.ONE_AND_HALF_PI:i=this.HALF_PI,i},s.doIntersect=function(o,e,r,p){var i=o.x,g=o.y,t=e.x,a=e.y,l=r.x,u=r.y,c=p.x,m=p.y,h=(t-i)*(m-u)-(c-l)*(a-g);if(h===0)return!1;var C=((m-u)*(c-i)+(l-c)*(m-g))/h,T=((g-a)*(c-i)+(t-i)*(m-g))/h;return 0<C&&C<1&&0<T&&T<1},s.findCircleLineIntersections=function(o,e,r,p,i,g,t){var a=(r-o)*(r-o)+(p-e)*(p-e),l=2*((o-i)*(r-o)+(e-g)*(p-e)),u=(o-i)*(o-i)+(e-g)*(e-g)-t*t,c=l*l-4*a*u;if(c>=0){var m=(-l+Math.sqrt(l*l-4*a*u))/(2*a),h=(-l-Math.sqrt(l*l-4*a*u))/(2*a),C=null;return m>=0&&m<=1?[m]:h>=0&&h<=1?[h]:C}else return null},s.HALF_PI=.5*Math.PI,s.ONE_AND_HALF_PI=1.5*Math.PI,s.TWO_PI=2*Math.PI,s.THREE_PI=3*Math.PI,it.exports=s},function(it,ut,S){"use strict";function d(){}d.sign=function(s){return s>0?1:s<0?-1:0},d.floor=function(s){return s<0?Math.ceil(s):Math.floor(s)},d.ceil=function(s){return s<0?Math.floor(s):Math.ceil(s)},it.exports=d},function(it,ut,S){"use strict";function d(){}d.MAX_VALUE=2147483647,d.MIN_VALUE=-2147483648,it.exports=d},function(it,ut,S){"use strict";var d=function(){function i(g,t){for(var a=0;a<t.length;a++){var l=t[a];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(g,l.key,l)}}return function(g,t,a){return t&&i(g.prototype,t),a&&i(g,a),g}}();function s(i,g){if(!(i instanceof g))throw new TypeError("Cannot call a class as a function")}var o=function(g){return{value:g,next:null,prev:null}},e=function(g,t,a,l){return g!==null?g.next=t:l.head=t,a!==null?a.prev=t:l.tail=t,t.prev=g,t.next=a,l.length++,t},r=function(g,t){var a=g.prev,l=g.next;return a!==null?a.next=l:t.head=l,l!==null?l.prev=a:t.tail=a,g.prev=g.next=null,t.length--,g},p=function(){function i(g){var t=this;s(this,i),this.length=0,this.head=null,this.tail=null,g!=null&&g.forEach(function(a){return t.push(a)})}return d(i,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,a){return e(a.prev,o(t),a,this)}},{key:"insertAfter",value:function(t,a){return e(a,o(t),a.next,this)}},{key:"insertNodeBefore",value:function(t,a){return e(a.prev,t,a,this)}},{key:"insertNodeAfter",value:function(t,a){return e(a,t,a.next,this)}},{key:"push",value:function(t){return e(this.tail,o(t),null,this)}},{key:"unshift",value:function(t){return e(null,o(t),this.head,this)}},{key:"remove",value:function(t){return r(t,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(t){if(t<=this.length()){for(var a=1,l=this.head;a<t;)l=l.next,a++;return l.value}}},{key:"set_object_at",value:function(t,a){if(t<=this.length()){for(var l=1,u=this.head;l<t;)u=u.next,l++;u.value=a}}}]),i}();it.exports=p},function(it,ut,S){"use strict";function d(s,o,e){this.x=null,this.y=null,s==null&&o==null&&e==null?(this.x=0,this.y=0):typeof s=="number"&&typeof o=="number"&&e==null?(this.x=s,this.y=o):s.constructor.name=="Point"&&o==null&&e==null&&(e=s,this.x=e.x,this.y=e.y)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.getLocation=function(){return new d(this.x,this.y)},d.prototype.setLocation=function(s,o,e){s.constructor.name=="Point"&&o==null&&e==null?(e=s,this.setLocation(e.x,e.y)):typeof s=="number"&&typeof o=="number"&&e==null&&(parseInt(s)==s&&parseInt(o)==o?this.move(s,o):(this.x=Math.floor(s+.5),this.y=Math.floor(o+.5)))},d.prototype.move=function(s,o){this.x=s,this.y=o},d.prototype.translate=function(s,o){this.x+=s,this.y+=o},d.prototype.equals=function(s){if(s.constructor.name=="Point"){var o=s;return this.x==o.x&&this.y==o.y}return this==s},d.prototype.toString=function(){return new d().constructor.name+"[x="+this.x+",y="+this.y+"]"},it.exports=d},function(it,ut,S){"use strict";function d(s,o,e,r){this.x=0,this.y=0,this.width=0,this.height=0,s!=null&&o!=null&&e!=null&&r!=null&&(this.x=s,this.y=o,this.width=e,this.height=r)}d.prototype.getX=function(){return this.x},d.prototype.setX=function(s){this.x=s},d.prototype.getY=function(){return this.y},d.prototype.setY=function(s){this.y=s},d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(s){this.width=s},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(s){this.height=s},d.prototype.getRight=function(){return this.x+this.width},d.prototype.getBottom=function(){return this.y+this.height},d.prototype.intersects=function(s){return!(this.getRight()<s.x||this.getBottom()<s.y||s.getRight()<this.x||s.getBottom()<this.y)},d.prototype.getCenterX=function(){return this.x+this.width/2},d.prototype.getMinX=function(){return this.getX()},d.prototype.getMaxX=function(){return this.getX()+this.width},d.prototype.getCenterY=function(){return this.y+this.height/2},d.prototype.getMinY=function(){return this.getY()},d.prototype.getMaxY=function(){return this.getY()+this.height},d.prototype.getWidthHalf=function(){return this.width/2},d.prototype.getHeightHalf=function(){return this.height/2},it.exports=d},function(it,ut,S){"use strict";var d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};function s(){}s.lastID=0,s.createID=function(o){return s.isPrimitive(o)?o:(o.uniqueID!=null||(o.uniqueID=s.getString(),s.lastID++),o.uniqueID)},s.getString=function(o){return o==null&&(o=s.lastID),"Object#"+o},s.isPrimitive=function(o){var e=typeof o=="undefined"?"undefined":d(o);return o==null||e!="object"&&e!="function"},it.exports=s},function(it,ut,S){"use strict";function d(l){if(Array.isArray(l)){for(var u=0,c=Array(l.length);u<l.length;u++)c[u]=l[u];return c}else return Array.from(l)}var s=S(0),o=S(7),e=S(3),r=S(1),p=S(6),i=S(5),g=S(17),t=S(29);function a(l){t.call(this),this.layoutQuality=s.QUALITY,this.createBendsAsNeeded=s.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=s.DEFAULT_INCREMENTAL,this.animationOnLayout=s.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=s.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=s.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=s.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new o(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,l!=null&&(this.isRemoteUse=l)}a.RANDOM_SEED=1,a.prototype=Object.create(t.prototype),a.prototype.getGraphManager=function(){return this.graphManager},a.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},a.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},a.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},a.prototype.newGraphManager=function(){var l=new o(this);return this.graphManager=l,l},a.prototype.newGraph=function(l){return new p(null,this.graphManager,l)},a.prototype.newNode=function(l){return new e(this.graphManager,l)},a.prototype.newEdge=function(l){return new r(null,null,l)},a.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},a.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var l;return this.checkLayoutSuccess()?l=!1:l=this.layout(),s.ANIMATE==="during"?!1:(l&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,l)},a.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},a.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var l,u=this.graphManager.getAllEdges(),c=0;c<u.length;c++)l=u[c];for(var m,h=this.graphManager.getRoot().getNodes(),c=0;c<h.length;c++)m=h[c];this.update(this.graphManager.getRoot())}},a.prototype.update=function(l){if(l==null)this.update2();else if(l instanceof e){var u=l;if(u.getChild()!=null)for(var c=u.getChild().getNodes(),m=0;m<c.length;m++)update(c[m]);if(u.vGraphObject!=null){var h=u.vGraphObject;h.update(u)}}else if(l instanceof r){var C=l;if(C.vGraphObject!=null){var T=C.vGraphObject;T.update(C)}}else if(l instanceof p){var N=l;if(N.vGraphObject!=null){var D=N.vGraphObject;D.update(N)}}},a.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=s.QUALITY,this.animationDuringLayout=s.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=s.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=s.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=s.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=s.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=s.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},a.prototype.transform=function(l){if(l==null)this.transform(new i(0,0));else{var u=new g,c=this.graphManager.getRoot().updateLeftTop();if(c!=null){u.setWorldOrgX(l.x),u.setWorldOrgY(l.y),u.setDeviceOrgX(c.x),u.setDeviceOrgY(c.y);for(var m=this.getAllNodes(),h,C=0;C<m.length;C++)h=m[C],h.transform(u)}}},a.prototype.positionNodesRandomly=function(l){if(l==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var u,c,m=l.getNodes(),h=0;h<m.length;h++)u=m[h],c=u.getChild(),c==null||c.getNodes().length==0?u.scatter():(this.positionNodesRandomly(c),u.updateBounds())},a.prototype.getFlatForest=function(){for(var l=[],u=!0,c=this.graphManager.getRoot().getNodes(),m=!0,h=0;h<c.length;h++)c[h].getChild()!=null&&(m=!1);if(!m)return l;var C=new Set,T=[],N=new Map,D=[];for(D=D.concat(c);D.length>0&&u;){for(T.push(D[0]);T.length>0&&u;){var _=T[0];T.splice(0,1),C.add(_);for(var I=_.getEdges(),h=0;h<I.length;h++){var ot=I[h].getOtherEnd(_);if(N.get(_)!=ot)if(!C.has(ot))T.push(ot),N.set(ot,_);else{u=!1;break}}}if(!u)l=[];else{var mt=[].concat(d(C));l.push(mt);for(var h=0;h<mt.length;h++){var vt=mt[h],Dt=D.indexOf(vt);Dt>-1&&D.splice(Dt,1)}C=new Set,N=new Map}}return l},a.prototype.createDummyNodesForBendpoints=function(l){for(var u=[],c=l.source,m=this.graphManager.calcLowestCommonAncestor(l.source,l.target),h=0;h<l.bendpoints.length;h++){var C=this.newNode(null);C.setRect(new Point(0,0),new Dimension(1,1)),m.add(C);var T=this.newEdge(null);this.graphManager.add(T,c,C),u.add(C),c=C}var T=this.newEdge(null);return this.graphManager.add(T,c,l.target),this.edgeToDummyNodes.set(l,u),l.isInterGraph()?this.graphManager.remove(l):m.remove(l),u},a.prototype.createBendpointsFromDummyNodes=function(){var l=[];l=l.concat(this.graphManager.getAllEdges()),l=[].concat(d(this.edgeToDummyNodes.keys())).concat(l);for(var u=0;u<l.length;u++){var c=l[u];if(c.bendpoints.length>0){for(var m=this.edgeToDummyNodes.get(c),h=0;h<m.length;h++){var C=m[h],T=new i(C.getCenterX(),C.getCenterY()),N=c.bendpoints.get(h);N.x=T.x,N.y=T.y,C.getOwner().remove(C)}this.graphManager.add(c,c.source,c.target)}}},a.transform=function(l,u,c,m){if(c!=null&&m!=null){var h=u;if(l<=50){var C=u/c;h-=(u-C)/50*(50-l)}else{var T=u*m;h+=(T-u)/50*(l-50)}return h}else{var N,D;return l<=50?(N=9*u/500,D=u/10):(N=9*u/50,D=-8*u),N*l+D}},a.findCenterOfTree=function(l){var u=[];u=u.concat(l);var c=[],m=new Map,h=!1,C=null;(u.length==1||u.length==2)&&(h=!0,C=u[0]);for(var T=0;T<u.length;T++){var N=u[T],D=N.getNeighborsList().size;m.set(N,N.getNeighborsList().size),D==1&&c.push(N)}var _=[];for(_=_.concat(c);!h;){var I=[];I=I.concat(_),_=[];for(var T=0;T<u.length;T++){var N=u[T],ot=u.indexOf(N);ot>=0&&u.splice(ot,1);var mt=N.getNeighborsList();mt.forEach(function(G){if(c.indexOf(G)<0){var k=m.get(G),n=k-1;n==1&&_.push(G),m.set(G,n)}})}c=c.concat(_),(u.length==1||u.length==2)&&(h=!0,C=u[0])}return C},a.prototype.setGraphManager=function(l){this.graphManager=l},it.exports=a},function(it,ut,S){"use strict";function d(){}d.seed=1,d.x=0,d.nextDouble=function(){return d.x=Math.sin(d.seed++)*1e4,d.x-Math.floor(d.x)},it.exports=d},function(it,ut,S){"use strict";var d=S(5);function s(o,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}s.prototype.getWorldOrgX=function(){return this.lworldOrgX},s.prototype.setWorldOrgX=function(o){this.lworldOrgX=o},s.prototype.getWorldOrgY=function(){return this.lworldOrgY},s.prototype.setWorldOrgY=function(o){this.lworldOrgY=o},s.prototype.getWorldExtX=function(){return this.lworldExtX},s.prototype.setWorldExtX=function(o){this.lworldExtX=o},s.prototype.getWorldExtY=function(){return this.lworldExtY},s.prototype.setWorldExtY=function(o){this.lworldExtY=o},s.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},s.prototype.setDeviceOrgX=function(o){this.ldeviceOrgX=o},s.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},s.prototype.setDeviceOrgY=function(o){this.ldeviceOrgY=o},s.prototype.getDeviceExtX=function(){return this.ldeviceExtX},s.prototype.setDeviceExtX=function(o){this.ldeviceExtX=o},s.prototype.getDeviceExtY=function(){return this.ldeviceExtY},s.prototype.setDeviceExtY=function(o){this.ldeviceExtY=o},s.prototype.transformX=function(o){var e=0,r=this.lworldExtX;return r!=0&&(e=this.ldeviceOrgX+(o-this.lworldOrgX)*this.ldeviceExtX/r),e},s.prototype.transformY=function(o){var e=0,r=this.lworldExtY;return r!=0&&(e=this.ldeviceOrgY+(o-this.lworldOrgY)*this.ldeviceExtY/r),e},s.prototype.inverseTransformX=function(o){var e=0,r=this.ldeviceExtX;return r!=0&&(e=this.lworldOrgX+(o-this.ldeviceOrgX)*this.lworldExtX/r),e},s.prototype.inverseTransformY=function(o){var e=0,r=this.ldeviceExtY;return r!=0&&(e=this.lworldOrgY+(o-this.ldeviceOrgY)*this.lworldExtY/r),e},s.prototype.inverseTransformPoint=function(o){var e=new d(this.inverseTransformX(o.x),this.inverseTransformY(o.y));return e},it.exports=s},function(it,ut,S){"use strict";function d(t){if(Array.isArray(t)){for(var a=0,l=Array(t.length);a<t.length;a++)l[a]=t[a];return l}else return Array.from(t)}var s=S(15),o=S(4),e=S(0),r=S(8),p=S(9);function i(){s.call(this),this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=o.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=o.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=o.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=o.MAX_ITERATIONS}i.prototype=Object.create(s.prototype);for(var g in s)i[g]=s[g];i.prototype.initParameters=function(){s.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},i.prototype.calcIdealEdgeLengths=function(){for(var t,a,l,u,c,m,h,C=this.getGraphManager().getAllEdges(),T=0;T<C.length;T++)t=C[T],a=t.idealLength,t.isInterGraph&&(u=t.getSource(),c=t.getTarget(),m=t.getSourceInLca().getEstimatedSize(),h=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=m+h-2*e.SIMPLE_NODE_SIZE),l=t.getLca().getInclusionTreeDepth(),t.idealLength+=a*o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(u.getInclusionTreeDepth()+c.getInclusionTreeDepth()-2*l))},i.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>o.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*o.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-o.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>o.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(o.COOLING_ADAPTATION_FACTOR,1-(t-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*(1-o.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),a,l=0;l<t.length;l++)a=t[l],this.calcSpringForce(a,a.idealLength)},i.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,l,u,c,m,h=this.getAllNodes(),C;if(this.useFRGridVariant)for(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),C=new Set,l=0;l<h.length;l++)c=h[l],this.calculateRepulsionForceOfANode(c,C,t,a),C.add(c);else for(l=0;l<h.length;l++)for(c=h[l],u=l+1;u<h.length;u++)m=h[u],c.getOwner()==m.getOwner()&&this.calcRepulsionForce(c,m)},i.prototype.calcGravitationalForces=function(){for(var t,a=this.getAllNodesToApplyGravitation(),l=0;l<a.length;l++)t=a[l],this.calcGravitationalForce(t)},i.prototype.moveNodes=function(){for(var t=this.getAllNodes(),a,l=0;l<t.length;l++)a=t[l],a.move()},i.prototype.calcSpringForce=function(t,a){var l=t.getSource(),u=t.getTarget(),c,m,h,C;if(this.uniformLeafNodeSizes&&l.getChild()==null&&u.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;c=t.getLength(),c!=0&&(m=t.edgeElasticity*(c-a),h=m*(t.lengthX/c),C=m*(t.lengthY/c),l.springForceX+=h,l.springForceY+=C,u.springForceX-=h,u.springForceY-=C)},i.prototype.calcRepulsionForce=function(t,a){var l=t.getRect(),u=a.getRect(),c=new Array(2),m=new Array(4),h,C,T,N,D,_,I;if(l.intersects(u)){r.calcSeparationAmount(l,u,c,o.DEFAULT_EDGE_LENGTH/2),_=2*c[0],I=2*c[1];var ot=t.noOfChildren*a.noOfChildren/(t.noOfChildren+a.noOfChildren);t.repulsionForceX-=ot*_,t.repulsionForceY-=ot*I,a.repulsionForceX+=ot*_,a.repulsionForceY+=ot*I}else this.uniformLeafNodeSizes&&t.getChild()==null&&a.getChild()==null?(h=u.getCenterX()-l.getCenterX(),C=u.getCenterY()-l.getCenterY()):(r.getIntersection(l,u,m),h=m[2]-m[0],C=m[3]-m[1]),Math.abs(h)<o.MIN_REPULSION_DIST&&(h=p.sign(h)*o.MIN_REPULSION_DIST),Math.abs(C)<o.MIN_REPULSION_DIST&&(C=p.sign(C)*o.MIN_REPULSION_DIST),T=h*h+C*C,N=Math.sqrt(T),D=(t.nodeRepulsion/2+a.nodeRepulsion/2)*t.noOfChildren*a.noOfChildren/T,_=D*h/N,I=D*C/N,t.repulsionForceX-=_,t.repulsionForceY-=I,a.repulsionForceX+=_,a.repulsionForceY+=I},i.prototype.calcGravitationalForce=function(t){var a,l,u,c,m,h,C,T;a=t.getOwner(),l=(a.getRight()+a.getLeft())/2,u=(a.getTop()+a.getBottom())/2,c=t.getCenterX()-l,m=t.getCenterY()-u,h=Math.abs(c)+t.getWidth()/2,C=Math.abs(m)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(T=a.getEstimatedSize()*this.gravityRangeFactor,(h>T||C>T)&&(t.gravitationForceX=-this.gravityConstant*c,t.gravitationForceY=-this.gravityConstant*m)):(T=a.getEstimatedSize()*this.compoundGravityRangeFactor,(h>T||C>T)&&(t.gravitationForceX=-this.gravityConstant*c*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*m*this.compoundGravityConstant))},i.prototype.isConverged=function(){var t,a=!1;return this.totalIterations>this.maxIterations/3&&(a=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||a},i.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},i.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,a=this.graphManager.getAllNodes(),l=0;l<a.length;l++)t=a[l],t.noOfChildren=t.getNoOfChildren()},i.prototype.calcGrid=function(t){var a=0,l=0;a=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),l=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var u=new Array(a),c=0;c<a;c++)u[c]=new Array(l);for(var c=0;c<a;c++)for(var m=0;m<l;m++)u[c][m]=new Array;return u},i.prototype.addNodeToGrid=function(t,a,l){var u=0,c=0,m=0,h=0;u=parseInt(Math.floor((t.getRect().x-a)/this.repulsionRange)),c=parseInt(Math.floor((t.getRect().width+t.getRect().x-a)/this.repulsionRange)),m=parseInt(Math.floor((t.getRect().y-l)/this.repulsionRange)),h=parseInt(Math.floor((t.getRect().height+t.getRect().y-l)/this.repulsionRange));for(var C=u;C<=c;C++)for(var T=m;T<=h;T++)this.grid[C][T].push(t),t.setGridCoordinates(u,c,m,h)},i.prototype.updateGrid=function(){var t,a,l=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<l.length;t++)a=l[t],this.addNodeToGrid(a,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},i.prototype.calculateRepulsionForceOfANode=function(t,a,l,u){if(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&l||u){var c=new Set;t.surrounding=new Array;for(var m,h=this.grid,C=t.startX-1;C<t.finishX+2;C++)for(var T=t.startY-1;T<t.finishY+2;T++)if(!(C<0||T<0||C>=h.length||T>=h[0].length)){for(var N=0;N<h[C][T].length;N++)if(m=h[C][T][N],!(t.getOwner()!=m.getOwner()||t==m)&&!a.has(m)&&!c.has(m)){var D=Math.abs(t.getCenterX()-m.getCenterX())-(t.getWidth()/2+m.getWidth()/2),_=Math.abs(t.getCenterY()-m.getCenterY())-(t.getHeight()/2+m.getHeight()/2);D<=this.repulsionRange&&_<=this.repulsionRange&&c.add(m)}}t.surrounding=[].concat(d(c))}for(C=0;C<t.surrounding.length;C++)this.calcRepulsionForce(t,t.surrounding[C])},i.prototype.calcRepulsionRange=function(){return 0},it.exports=i},function(it,ut,S){"use strict";var d=S(1),s=S(4);function o(r,p,i){d.call(this,r,p,i),this.idealLength=s.DEFAULT_EDGE_LENGTH,this.edgeElasticity=s.DEFAULT_SPRING_STRENGTH}o.prototype=Object.create(d.prototype);for(var e in d)o[e]=d[e];it.exports=o},function(it,ut,S){"use strict";var d=S(3),s=S(4);function o(r,p,i,g){d.call(this,r,p,i,g),this.nodeRepulsion=s.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}o.prototype=Object.create(d.prototype);for(var e in d)o[e]=d[e];o.prototype.setGridCoordinates=function(r,p,i,g){this.startX=r,this.finishX=p,this.startY=i,this.finishY=g},it.exports=o},function(it,ut,S){"use strict";function d(s,o){this.width=0,this.height=0,s!==null&&o!==null&&(this.height=o,this.width=s)}d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(s){this.width=s},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(s){this.height=s},it.exports=d},function(it,ut,S){"use strict";var d=S(14);function s(){this.map={},this.keys=[]}s.prototype.put=function(o,e){var r=d.createID(o);this.contains(r)||(this.map[r]=e,this.keys.push(o))},s.prototype.contains=function(o){var e=d.createID(o);return this.map[o]!=null},s.prototype.get=function(o){var e=d.createID(o);return this.map[e]},s.prototype.keySet=function(){return this.keys},it.exports=s},function(it,ut,S){"use strict";var d=S(14);function s(){this.set={}}s.prototype.add=function(o){var e=d.createID(o);this.contains(e)||(this.set[e]=o)},s.prototype.remove=function(o){delete this.set[d.createID(o)]},s.prototype.clear=function(){this.set={}},s.prototype.contains=function(o){return this.set[d.createID(o)]==o},s.prototype.isEmpty=function(){return this.size()===0},s.prototype.size=function(){return Object.keys(this.set).length},s.prototype.addAllTo=function(o){for(var e=Object.keys(this.set),r=e.length,p=0;p<r;p++)o.push(this.set[e[p]])},s.prototype.size=function(){return Object.keys(this.set).length},s.prototype.addAll=function(o){for(var e=o.length,r=0;r<e;r++){var p=o[r];this.add(p)}},it.exports=s},function(it,ut,S){"use strict";function d(){}d.multMat=function(s,o){for(var e=[],r=0;r<s.length;r++){e[r]=[];for(var p=0;p<o[0].length;p++){e[r][p]=0;for(var i=0;i<s[0].length;i++)e[r][p]+=s[r][i]*o[i][p]}}return e},d.transpose=function(s){for(var o=[],e=0;e<s[0].length;e++){o[e]=[];for(var r=0;r<s.length;r++)o[e][r]=s[r][e]}return o},d.multCons=function(s,o){for(var e=[],r=0;r<s.length;r++)e[r]=s[r]*o;return e},d.minusOp=function(s,o){for(var e=[],r=0;r<s.length;r++)e[r]=s[r]-o[r];return e},d.dotProduct=function(s,o){for(var e=0,r=0;r<s.length;r++)e+=s[r]*o[r];return e},d.mag=function(s){return Math.sqrt(this.dotProduct(s,s))},d.normalize=function(s){for(var o=[],e=this.mag(s),r=0;r<s.length;r++)o[r]=s[r]/e;return o},d.multGamma=function(s){for(var o=[],e=0,r=0;r<s.length;r++)e+=s[r];e*=-1/s.length;for(var p=0;p<s.length;p++)o[p]=e+s[p];return o},d.multL=function(s,o,e){for(var r=[],p=[],i=[],g=0;g<o[0].length;g++){for(var t=0,a=0;a<o.length;a++)t+=-.5*o[a][g]*s[a];p[g]=t}for(var l=0;l<e.length;l++){for(var u=0,c=0;c<e.length;c++)u+=e[l][c]*p[c];i[l]=u}for(var m=0;m<o.length;m++){for(var h=0,C=0;C<o[0].length;C++)h+=o[m][C]*i[C];r[m]=h}return r},it.exports=d},function(it,ut,S){"use strict";var d=function(){function r(p,i){for(var g=0;g<i.length;g++){var t=i[g];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(p,t.key,t)}}return function(p,i,g){return i&&r(p.prototype,i),g&&r(p,g),p}}();function s(r,p){if(!(r instanceof p))throw new TypeError("Cannot call a class as a function")}var o=S(11),e=function(){function r(p,i){s(this,r),(i!==null||i!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var g=void 0;p instanceof o?g=p.size():g=p.length,this._quicksort(p,0,g-1)}return d(r,[{key:"_quicksort",value:function(i,g,t){if(g<t){var a=this._partition(i,g,t);this._quicksort(i,g,a),this._quicksort(i,a+1,t)}}},{key:"_partition",value:function(i,g,t){for(var a=this._get(i,g),l=g,u=t;;){for(;this.compareFunction(a,this._get(i,u));)u--;for(;this.compareFunction(this._get(i,l),a);)l++;if(l<u)this._swap(i,l,u),l++,u--;else return u}}},{key:"_get",value:function(i,g){return i instanceof o?i.get_object_at(g):i[g]}},{key:"_set",value:function(i,g,t){i instanceof o?i.set_object_at(g,t):i[g]=t}},{key:"_swap",value:function(i,g,t){var a=this._get(i,g);this._set(i,g,this._get(i,t)),this._set(i,t,a)}},{key:"_defaultCompareFunction",value:function(i,g){return g>i}}]),r}();it.exports=e},function(it,ut,S){"use strict";function d(){}d.svd=function(s){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=s.length,this.n=s[0].length;var o=Math.min(this.m,this.n);this.s=function(xt){for(var Ft=[];xt-- >0;)Ft.push(0);return Ft}(Math.min(this.m+1,this.n)),this.U=function(xt){var Ft=function zt(Ht){if(Ht.length==0)return 0;for(var Vt=[],Gt=0;Gt<Ht[0];Gt++)Vt.push(zt(Ht.slice(1)));return Vt};return Ft(xt)}([this.m,o]),this.V=function(xt){var Ft=function zt(Ht){if(Ht.length==0)return 0;for(var Vt=[],Gt=0;Gt<Ht[0];Gt++)Vt.push(zt(Ht.slice(1)));return Vt};return Ft(xt)}([this.n,this.n]);for(var e=function(xt){for(var Ft=[];xt-- >0;)Ft.push(0);return Ft}(this.n),r=function(xt){for(var Ft=[];xt-- >0;)Ft.push(0);return Ft}(this.m),p=!0,i=!0,g=Math.min(this.m-1,this.n),t=Math.max(0,Math.min(this.n-2,this.m)),a=0;a<Math.max(g,t);a++){if(a<g){this.s[a]=0;for(var l=a;l<this.m;l++)this.s[a]=d.hypot(this.s[a],s[l][a]);if(this.s[a]!==0){s[a][a]<0&&(this.s[a]=-this.s[a]);for(var u=a;u<this.m;u++)s[u][a]/=this.s[a];s[a][a]+=1}this.s[a]=-this.s[a]}for(var c=a+1;c<this.n;c++){if(function(xt,Ft){return xt&&Ft}(a<g,this.s[a]!==0)){for(var m=0,h=a;h<this.m;h++)m+=s[h][a]*s[h][c];m=-m/s[a][a];for(var C=a;C<this.m;C++)s[C][c]+=m*s[C][a]}e[c]=s[a][c]}if(function(xt,Ft){return xt&&Ft}(p,a<g))for(var T=a;T<this.m;T++)this.U[T][a]=s[T][a];if(a<t){e[a]=0;for(var N=a+1;N<this.n;N++)e[a]=d.hypot(e[a],e[N]);if(e[a]!==0){e[a+1]<0&&(e[a]=-e[a]);for(var D=a+1;D<this.n;D++)e[D]/=e[a];e[a+1]+=1}if(e[a]=-e[a],function(xt,Ft){return xt&&Ft}(a+1<this.m,e[a]!==0)){for(var _=a+1;_<this.m;_++)r[_]=0;for(var I=a+1;I<this.n;I++)for(var ot=a+1;ot<this.m;ot++)r[ot]+=e[I]*s[ot][I];for(var mt=a+1;mt<this.n;mt++)for(var vt=-e[mt]/e[a+1],Dt=a+1;Dt<this.m;Dt++)s[Dt][mt]+=vt*r[Dt]}if(i)for(var G=a+1;G<this.n;G++)this.V[G][a]=e[G]}}var k=Math.min(this.n,this.m+1);if(g<this.n&&(this.s[g]=s[g][g]),this.m<k&&(this.s[k-1]=0),t+1<k&&(e[t]=s[t][k-1]),e[k-1]=0,p){for(var n=g;n<o;n++){for(var E=0;E<this.m;E++)this.U[E][n]=0;this.U[n][n]=1}for(var f=g-1;f>=0;f--)if(this.s[f]!==0){for(var y=f+1;y<o;y++){for(var v=0,R=f;R<this.m;R++)v+=this.U[R][f]*this.U[R][y];v=-v/this.U[f][f];for(var w=f;w<this.m;w++)this.U[w][y]+=v*this.U[w][f]}for(var X=f;X<this.m;X++)this.U[X][f]=-this.U[X][f];this.U[f][f]=1+this.U[f][f];for(var H=0;H<f-1;H++)this.U[H][f]=0}else{for(var U=0;U<this.m;U++)this.U[U][f]=0;this.U[f][f]=1}}if(i)for(var tt=this.n-1;tt>=0;tt--){if(function(xt,Ft){return xt&&Ft}(tt<t,e[tt]!==0))for(var ft=tt+1;ft<o;ft++){for(var B=0,lt=tt+1;lt<this.n;lt++)B+=this.V[lt][tt]*this.V[lt][ft];B=-B/this.V[tt+1][tt];for(var j=tt+1;j<this.n;j++)this.V[j][ft]+=B*this.V[j][tt]}for(var O=0;O<this.n;O++)this.V[O][tt]=0;this.V[tt][tt]=1}for(var $=k-1,K=0,ht=Math.pow(2,-52),Mt=Math.pow(2,-966);k>0;){var rt=void 0,bt=void 0;for(rt=k-2;rt>=-1&&rt!==-1;rt--)if(Math.abs(e[rt])<=Mt+ht*(Math.abs(this.s[rt])+Math.abs(this.s[rt+1]))){e[rt]=0;break}if(rt===k-2)bt=4;else{var Rt=void 0;for(Rt=k-1;Rt>=rt&&Rt!==rt;Rt--){var Xt=(Rt!==k?Math.abs(e[Rt]):0)+(Rt!==rt+1?Math.abs(e[Rt-1]):0);if(Math.abs(this.s[Rt])<=Mt+ht*Xt){this.s[Rt]=0;break}}Rt===rt?bt=3:Rt===k-1?bt=1:(bt=2,rt=Rt)}switch(rt++,bt){case 1:{var x=e[k-2];e[k-2]=0;for(var L=k-2;L>=rt;L--){var M=d.hypot(this.s[L],x),V=this.s[L]/M,Z=x/M;if(this.s[L]=M,L!==rt&&(x=-Z*e[L-1],e[L-1]=V*e[L-1]),i)for(var Q=0;Q<this.n;Q++)M=V*this.V[Q][L]+Z*this.V[Q][k-1],this.V[Q][k-1]=-Z*this.V[Q][L]+V*this.V[Q][k-1],this.V[Q][L]=M}}break;case 2:{var ct=e[rt-1];e[rt-1]=0;for(var q=rt;q<k;q++){var at=d.hypot(this.s[q],ct),et=this.s[q]/at,nt=ct/at;if(this.s[q]=at,ct=-nt*e[q],e[q]=et*e[q],p)for(var dt=0;dt<this.m;dt++)at=et*this.U[dt][q]+nt*this.U[dt][rt-1],this.U[dt][rt-1]=-nt*this.U[dt][q]+et*this.U[dt][rt-1],this.U[dt][q]=at}}break;case 3:{var Tt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[k-1]),Math.abs(this.s[k-2])),Math.abs(e[k-2])),Math.abs(this.s[rt])),Math.abs(e[rt])),gt=this.s[k-1]/Tt,A=this.s[k-2]/Tt,F=e[k-2]/Tt,b=this.s[rt]/Tt,Y=e[rt]/Tt,P=((A+gt)*(A-gt)+F*F)/2,W=gt*F*(gt*F),yt=0;(function(xt,Ft){return xt||Ft})(P!==0,W!==0)&&(yt=Math.sqrt(P*P+W),P<0&&(yt=-yt),yt=W/(P+yt));for(var st=(b+gt)*(b-gt)+yt,z=b*Y,J=rt;J<k-1;J++){var pt=d.hypot(st,z),Ot=st/pt,At=z/pt;if(J!==rt&&(e[J-1]=pt),st=Ot*this.s[J]+At*e[J],e[J]=Ot*e[J]-At*this.s[J],z=At*this.s[J+1],this.s[J+1]=Ot*this.s[J+1],i)for(var St=0;St<this.n;St++)pt=Ot*this.V[St][J]+At*this.V[St][J+1],this.V[St][J+1]=-At*this.V[St][J]+Ot*this.V[St][J+1],this.V[St][J]=pt;if(pt=d.hypot(st,z),Ot=st/pt,At=z/pt,this.s[J]=pt,st=Ot*e[J]+At*this.s[J+1],this.s[J+1]=-At*e[J]+Ot*this.s[J+1],z=At*e[J+1],e[J+1]=Ot*e[J+1],p&&J<this.m-1)for(var Nt=0;Nt<this.m;Nt++)pt=Ot*this.U[Nt][J]+At*this.U[Nt][J+1],this.U[Nt][J+1]=-At*this.U[Nt][J]+Ot*this.U[Nt][J+1],this.U[Nt][J]=pt}e[k-2]=st,K=K+1}break;case 4:{if(this.s[rt]<=0&&(this.s[rt]=this.s[rt]<0?-this.s[rt]:0,i))for(var Et=0;Et<=$;Et++)this.V[Et][rt]=-this.V[Et][rt];for(;rt<$&&!(this.s[rt]>=this.s[rt+1]);){var wt=this.s[rt];if(this.s[rt]=this.s[rt+1],this.s[rt+1]=wt,i&&rt<this.n-1)for(var Lt=0;Lt<this.n;Lt++)wt=this.V[Lt][rt+1],this.V[Lt][rt+1]=this.V[Lt][rt],this.V[Lt][rt]=wt;if(p&&rt<this.m-1)for(var Ct=0;Ct<this.m;Ct++)wt=this.U[Ct][rt+1],this.U[Ct][rt+1]=this.U[Ct][rt],this.U[Ct][rt]=wt;rt++}K=0,k--}break}}var Ut={U:this.U,V:this.V,S:this.s};return Ut},d.hypot=function(s,o){var e=void 0;return Math.abs(s)>Math.abs(o)?(e=o/s,e=Math.abs(s)*Math.sqrt(1+e*e)):o!=0?(e=s/o,e=Math.abs(o)*Math.sqrt(1+e*e)):e=0,e},it.exports=d},function(it,ut,S){"use strict";var d=function(){function e(r,p){for(var i=0;i<p.length;i++){var g=p[i];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(r,g.key,g)}}return function(r,p,i){return p&&e(r.prototype,p),i&&e(r,i),r}}();function s(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(r,p){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;s(this,e),this.sequence1=r,this.sequence2=p,this.match_score=i,this.mismatch_penalty=g,this.gap_penalty=t,this.iMax=r.length+1,this.jMax=p.length+1,this.grid=new Array(this.iMax);for(var a=0;a<this.iMax;a++){this.grid[a]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.grid[a][l]=0}this.tracebackGrid=new Array(this.iMax);for(var u=0;u<this.iMax;u++){this.tracebackGrid[u]=new Array(this.jMax);for(var c=0;c<this.jMax;c++)this.tracebackGrid[u][c]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return d(e,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var p=1;p<this.jMax;p++)this.grid[0][p]=this.grid[0][p-1]+this.gap_penalty,this.tracebackGrid[0][p]=[!1,!1,!0];for(var i=1;i<this.iMax;i++)this.grid[i][0]=this.grid[i-1][0]+this.gap_penalty,this.tracebackGrid[i][0]=[!1,!0,!1];for(var g=1;g<this.iMax;g++)for(var t=1;t<this.jMax;t++){var a=void 0;this.sequence1[g-1]===this.sequence2[t-1]?a=this.grid[g-1][t-1]+this.match_score:a=this.grid[g-1][t-1]+this.mismatch_penalty;var l=this.grid[g-1][t]+this.gap_penalty,u=this.grid[g][t-1]+this.gap_penalty,c=[a,l,u],m=this.arrayAllMaxIndexes(c);this.grid[g][t]=c[m[0]],this.tracebackGrid[g][t]=[m.includes(0),m.includes(1),m.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var p=[];for(p.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});p[0];){var i=p[0],g=this.tracebackGrid[i.pos[0]][i.pos[1]];g[0]&&p.push({pos:[i.pos[0]-1,i.pos[1]-1],seq1:this.sequence1[i.pos[0]-1]+i.seq1,seq2:this.sequence2[i.pos[1]-1]+i.seq2}),g[1]&&p.push({pos:[i.pos[0]-1,i.pos[1]],seq1:this.sequence1[i.pos[0]-1]+i.seq1,seq2:"-"+i.seq2}),g[2]&&p.push({pos:[i.pos[0],i.pos[1]-1],seq1:"-"+i.seq1,seq2:this.sequence2[i.pos[1]-1]+i.seq2}),i.pos[0]===0&&i.pos[1]===0&&this.alignments.push({sequence1:i.seq1,sequence2:i.seq2}),p.shift()}return this.alignments}},{key:"getAllIndexes",value:function(p,i){for(var g=[],t=-1;(t=p.indexOf(i,t+1))!==-1;)g.push(t);return g}},{key:"arrayAllMaxIndexes",value:function(p){return this.getAllIndexes(p,Math.max.apply(null,p))}}]),e}();it.exports=o},function(it,ut,S){"use strict";var d=function(){};d.FDLayout=S(18),d.FDLayoutConstants=S(4),d.FDLayoutEdge=S(19),d.FDLayoutNode=S(20),d.DimensionD=S(21),d.HashMap=S(22),d.HashSet=S(23),d.IGeometry=S(8),d.IMath=S(9),d.Integer=S(10),d.Point=S(12),d.PointD=S(5),d.RandomSeed=S(16),d.RectangleD=S(13),d.Transform=S(17),d.UniqueIDGeneretor=S(14),d.Quicksort=S(25),d.LinkedList=S(11),d.LGraphObject=S(2),d.LGraph=S(6),d.LEdge=S(1),d.LGraphManager=S(7),d.LNode=S(3),d.Layout=S(15),d.LayoutConstants=S(0),d.NeedlemanWunsch=S(27),d.Matrix=S(24),d.SVD=S(26),it.exports=d},function(it,ut,S){"use strict";function d(){this.listeners=[]}var s=d.prototype;s.addListener=function(o,e){this.listeners.push({event:o,callback:e})},s.removeListener=function(o,e){for(var r=this.listeners.length;r>=0;r--){var p=this.listeners[r];p.event===o&&p.callback===e&&this.listeners.splice(r,1)}},s.emit=function(o,e){for(var r=0;r<this.listeners.length;r++){var p=this.listeners[r];o===p.event&&p.callback(e)}},it.exports=d}])})},64498:function(Yt,it,ut){"use strict";var Xt;ut.d(it,{diagram:function(){return Rt}});var S=ut(88674),d=ut(21347),s=ut(25925),o=ut(4284),e=ut(99970),r=ut(35096),p=ut(12491),i=ut(1387),g=ut(44867),t=ut(989),a={L:"left",R:"right",T:"top",B:"bottom"},l={L:(0,r.eW)(x=>`${x},${x/2} 0,${x} 0,0`,"L"),R:(0,r.eW)(x=>`0,${x/2} ${x},0 ${x},${x}`,"R"),T:(0,r.eW)(x=>`0,0 ${x},0 ${x/2},${x}`,"T"),B:(0,r.eW)(x=>`${x/2},0 ${x},${x} 0,${x}`,"B")},u={L:(0,r.eW)((x,L)=>x-L+2,"L"),R:(0,r.eW)((x,L)=>x-2,"R"),T:(0,r.eW)((x,L)=>x-L+2,"T"),B:(0,r.eW)((x,L)=>x-2,"B")},c=(0,r.eW)(function(x){return h(x)?x==="L"?"R":"L":x==="T"?"B":"T"},"getOppositeArchitectureDirection"),m=(0,r.eW)(function(x){const L=x;return L==="L"||L==="R"||L==="T"||L==="B"},"isArchitectureDirection"),h=(0,r.eW)(function(x){const L=x;return L==="L"||L==="R"},"isArchitectureDirectionX"),C=(0,r.eW)(function(x){const L=x;return L==="T"||L==="B"},"isArchitectureDirectionY"),T=(0,r.eW)(function(x,L){const M=h(x)&&C(L),V=C(x)&&h(L);return M||V},"isArchitectureDirectionXY"),N=(0,r.eW)(function(x){const L=x[0],M=x[1],V=h(L)&&C(M),Z=C(L)&&h(M);return V||Z},"isArchitecturePairXY"),D=(0,r.eW)(function(x){return x!=="LL"&&x!=="RR"&&x!=="TT"&&x!=="BB"},"isValidArchitectureDirectionPair"),_=(0,r.eW)(function(x,L){const M=`${x}${L}`;return D(M)?M:void 0},"getArchitectureDirectionPair"),I=(0,r.eW)(function([x,L],M){const V=M[0],Z=M[1];return h(V)?C(Z)?[x+(V==="L"?-1:1),L+(Z==="T"?1:-1)]:[x+(V==="L"?-1:1),L]:h(Z)?[x+(Z==="L"?1:-1),L+(V==="T"?1:-1)]:[x,L+(V==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),ot=(0,r.eW)(function(x){return x==="LT"||x==="TL"?[1,1]:x==="BL"||x==="LB"?[1,-1]:x==="BR"||x==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),mt=(0,r.eW)(function(x,L){return T(x,L)?"bend":h(x)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),vt=(0,r.eW)(function(x){return x.type==="service"},"isArchitectureService"),Dt=(0,r.eW)(function(x){return x.type==="junction"},"isArchitectureJunction"),G=(0,r.eW)(x=>x.data(),"edgeData"),k=(0,r.eW)(x=>x.data(),"nodeData"),n=e.vZ.architecture,E=(Xt=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=e.GN,this.getAccTitle=e.eu,this.setDiagramTitle=e.g2,this.getDiagramTitle=e.Kr,this.getAccDescription=e.Mx,this.setAccDescription=e.U$,this.clear()}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},(0,e.ZH)()}addService({id:L,icon:M,in:V,title:Z,iconText:Q}){if(this.registeredIds[L]!==void 0)throw new Error(`The service id [${L}] is already in use by another ${this.registeredIds[L]}`);if(V!==void 0){if(L===V)throw new Error(`The service [${L}] cannot be placed within itself`);if(this.registeredIds[V]===void 0)throw new Error(`The service [${L}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[V]==="node")throw new Error(`The service [${L}]'s parent is not a group`)}this.registeredIds[L]="node",this.nodes[L]={id:L,type:"service",icon:M,iconText:Q,title:Z,edges:[],in:V}}getServices(){return Object.values(this.nodes).filter(vt)}addJunction({id:L,in:M}){this.registeredIds[L]="node",this.nodes[L]={id:L,type:"junction",edges:[],in:M}}getJunctions(){return Object.values(this.nodes).filter(Dt)}getNodes(){return Object.values(this.nodes)}getNode(L){var M;return(M=this.nodes[L])!=null?M:null}addGroup({id:L,icon:M,in:V,title:Z}){var Q,ct,q;if(((Q=this.registeredIds)==null?void 0:Q[L])!==void 0)throw new Error(`The group id [${L}] is already in use by another ${this.registeredIds[L]}`);if(V!==void 0){if(L===V)throw new Error(`The group [${L}] cannot be placed within itself`);if(((ct=this.registeredIds)==null?void 0:ct[V])===void 0)throw new Error(`The group [${L}]'s parent does not exist. Please make sure the parent is created before this group`);if(((q=this.registeredIds)==null?void 0:q[V])==="node")throw new Error(`The group [${L}]'s parent is not a group`)}this.registeredIds[L]="group",this.groups[L]={id:L,icon:M,title:Z,in:V}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:L,rhsId:M,lhsDir:V,rhsDir:Z,lhsInto:Q,rhsInto:ct,lhsGroup:q,rhsGroup:at,title:et}){if(!m(V))throw new Error(`Invalid direction given for left hand side of edge ${L}--${M}. Expected (L,R,T,B) got ${String(V)}`);if(!m(Z))throw new Error(`Invalid direction given for right hand side of edge ${L}--${M}. Expected (L,R,T,B) got ${String(Z)}`);if(this.nodes[L]===void 0&&this.groups[L]===void 0)throw new Error(`The left-hand id [${L}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[M]===void 0&&this.groups[M]===void 0)throw new Error(`The right-hand id [${M}] does not yet exist. Please create the service/group before declaring an edge to it.`);const nt=this.nodes[L].in,dt=this.nodes[M].in;if(q&&nt&&dt&&nt==dt)throw new Error(`The left-hand id [${L}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(at&&nt&&dt&&nt==dt)throw new Error(`The right-hand id [${M}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const Tt={lhsId:L,lhsDir:V,lhsInto:Q,lhsGroup:q,rhsId:M,rhsDir:Z,rhsInto:ct,rhsGroup:at,title:et};this.edges.push(Tt),this.nodes[L]&&this.nodes[M]&&(this.nodes[L].edges.push(this.edges[this.edges.length-1]),this.nodes[M].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const L={},M=Object.entries(this.nodes).reduce((at,[et,nt])=>(at[et]=nt.edges.reduce((dt,Tt)=>{var F,b,Y,P;const gt=(F=this.getNode(Tt.lhsId))==null?void 0:F.in,A=(b=this.getNode(Tt.rhsId))==null?void 0:b.in;if(gt&&A&>!==A){const W=mt(Tt.lhsDir,Tt.rhsDir);W!=="bend"&&((Y=L[gt])!=null||(L[gt]={}),L[gt][A]=W,(P=L[A])!=null||(L[A]={}),L[A][gt]=W)}if(Tt.lhsId===et){const W=_(Tt.lhsDir,Tt.rhsDir);W&&(dt[W]=Tt.rhsId)}else{const W=_(Tt.rhsDir,Tt.lhsDir);W&&(dt[W]=Tt.lhsId)}return dt},{}),at),{}),V=Object.keys(M)[0],Z={[V]:1},Q=Object.keys(M).reduce((at,et)=>et===V?at:ie(ee({},at),{[et]:1}),{}),ct=(0,r.eW)(at=>{const et={[at]:[0,0]},nt=[at];for(;nt.length>0;){const dt=nt.shift();if(dt){Z[dt]=1,delete Q[dt];const Tt=M[dt],[gt,A]=et[dt];Object.entries(Tt).forEach(([F,b])=>{Z[b]||(et[b]=I([gt,A],F),nt.push(b))})}}return et},"BFS"),q=[ct(V)];for(;Object.keys(Q).length>0;)q.push(ct(Object.keys(Q)[0]));this.dataStructures={adjList:M,spatialMaps:q,groupAlignments:L}}return this.dataStructures}setElementForId(L,M){this.elements[L]=M}getElementById(L){return this.elements[L]}getConfig(){return(0,o.Rb)(ee(ee({},n),(0,e.iE)().architecture))}getConfigField(L){return this.getConfig()[L]}},(0,r.eW)(Xt,"ArchitectureDB"),Xt),f=(0,r.eW)((x,L)=>{(0,s.A)(x,L),x.groups.map(M=>L.addGroup(M)),x.services.map(M=>L.addService(ie(ee({},M),{type:"service"}))),x.junctions.map(M=>L.addJunction(ie(ee({},M),{type:"junction"}))),x.edges.map(M=>L.addEdge(M))},"populateDb"),y={parser:{yy:void 0},parse:(0,r.eW)(x=>kt(this,null,function*(){var V;const L=yield(0,p.Qc)("architecture",x);r.cM.debug(L);const M=(V=y.parser)==null?void 0:V.yy;if(!(M instanceof E))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");f(L,M)}),"parse")},v=(0,r.eW)(x=>`
|
|
1
|
+
!(function(){var ye=Object.defineProperty,Ee=Object.defineProperties;var me=Object.getOwnPropertyDescriptors;var ve=Object.getOwnPropertySymbols;var Te=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable;var de=(Yt,it,ut)=>it in Yt?ye(Yt,it,{enumerable:!0,configurable:!0,writable:!0,value:ut}):Yt[it]=ut,ee=(Yt,it)=>{for(var ut in it||(it={}))Te.call(it,ut)&&de(Yt,ut,it[ut]);if(ve)for(var ut of ve(it))Ne.call(it,ut)&&de(Yt,ut,it[ut]);return Yt},ie=(Yt,it)=>Ee(Yt,me(it));var kt=(Yt,it,ut)=>new Promise((S,d)=>{var s=r=>{try{e(ut.next(r))}catch(p){d(p)}},o=r=>{try{e(ut.throw(r))}catch(p){d(p)}},e=r=>r.done?S(r.value):Promise.resolve(r.value).then(s,o);e((ut=ut.apply(Yt,it)).next())});(self.webpackChunkpaul_ai_assistant=self.webpackChunkpaul_ai_assistant||[]).push([[4498],{44867:function(Yt,it,ut){(function(d,s){Yt.exports=s(ut(26914))})(this,function(S){return(()=>{"use strict";var d={658:r=>{r.exports=Object.assign!=null?Object.assign.bind(Object):function(p){for(var i=arguments.length,g=Array(i>1?i-1:0),t=1;t<i;t++)g[t-1]=arguments[t];return g.forEach(function(a){Object.keys(a).forEach(function(l){return p[l]=a[l]})}),p}},548:(r,p,i)=>{var g=function(){function l(u,c){var m=[],h=!0,C=!1,T=void 0;try{for(var N=u[Symbol.iterator](),D;!(h=(D=N.next()).done)&&(m.push(D.value),!(c&&m.length===c));h=!0);}catch(_){C=!0,T=_}finally{try{!h&&N.return&&N.return()}finally{if(C)throw T}}return m}return function(u,c){if(Array.isArray(u))return u;if(Symbol.iterator in Object(u))return l(u,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),t=i(140).layoutBase.LinkedList,a={};a.getTopMostNodes=function(l){for(var u={},c=0;c<l.length;c++)u[l[c].id()]=!0;var m=l.filter(function(h,C){typeof h=="number"&&(h=C);for(var T=h.parent()[0];T!=null;){if(u[T.id()])return!1;T=T.parent()[0]}return!0});return m},a.connectComponents=function(l,u,c,m){var h=new t,C=new Set,T=[],N=void 0,D=void 0,_=void 0,I=!1,ot=1,mt=[],vt=[],Dt=function(){var k=l.collection();vt.push(k);var n=c[0],E=l.collection();E.merge(n).merge(n.descendants().intersection(u)),T.push(n),E.forEach(function(v){h.push(v),C.add(v),k.merge(v)});for(var f=function(){n=h.shift();var R=l.collection();n.neighborhood().nodes().forEach(function(U){u.intersection(n.edgesWith(U)).length>0&&R.merge(U)});for(var w=0;w<R.length;w++){var X=R[w];if(N=c.intersection(X.union(X.ancestors())),N!=null&&!C.has(N[0])){var H=N.union(N.descendants());H.forEach(function(U){h.push(U),C.add(U),k.merge(U),c.has(U)&&T.push(U)})}}};h.length!=0;)f();if(k.forEach(function(v){u.intersection(v.connectedEdges()).forEach(function(R){k.has(R.source())&&k.has(R.target())&&k.merge(R)})}),T.length==c.length&&(I=!0),!I||I&&ot>1){D=T[0],_=D.connectedEdges().length,T.forEach(function(v){v.connectedEdges().length<_&&(_=v.connectedEdges().length,D=v)}),mt.push(D.id());var y=l.collection();y.merge(T[0]),T.forEach(function(v){y.merge(v)}),T=[],c=c.difference(y),ot++}};do Dt();while(!I);return m&&mt.length>0&&m.set("dummy"+(m.size+1),mt),vt},a.relocateComponent=function(l,u,c){if(!c.fixedNodeConstraint){var m=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,C=Number.POSITIVE_INFINITY,T=Number.NEGATIVE_INFINITY;if(c.quality=="draft"){var N=!0,D=!1,_=void 0;try{for(var I=u.nodeIndexes[Symbol.iterator](),ot;!(N=(ot=I.next()).done);N=!0){var mt=ot.value,vt=g(mt,2),Dt=vt[0],G=vt[1],k=c.cy.getElementById(Dt);if(k){var n=k.boundingBox(),E=u.xCoords[G]-n.w/2,f=u.xCoords[G]+n.w/2,y=u.yCoords[G]-n.h/2,v=u.yCoords[G]+n.h/2;E<m&&(m=E),f>h&&(h=f),y<C&&(C=y),v>T&&(T=v)}}}catch(U){D=!0,_=U}finally{try{!N&&I.return&&I.return()}finally{if(D)throw _}}var R=l.x-(h+m)/2,w=l.y-(T+C)/2;u.xCoords=u.xCoords.map(function(U){return U+R}),u.yCoords=u.yCoords.map(function(U){return U+w})}else{Object.keys(u).forEach(function(U){var tt=u[U],ft=tt.getRect().x,B=tt.getRect().x+tt.getRect().width,lt=tt.getRect().y,j=tt.getRect().y+tt.getRect().height;ft<m&&(m=ft),B>h&&(h=B),lt<C&&(C=lt),j>T&&(T=j)});var X=l.x-(h+m)/2,H=l.y-(T+C)/2;Object.keys(u).forEach(function(U){var tt=u[U];tt.setCenter(tt.getCenterX()+X,tt.getCenterY()+H)})}}},a.calcBoundingBox=function(l,u,c,m){for(var h=Number.MAX_SAFE_INTEGER,C=Number.MIN_SAFE_INTEGER,T=Number.MAX_SAFE_INTEGER,N=Number.MIN_SAFE_INTEGER,D=void 0,_=void 0,I=void 0,ot=void 0,mt=l.descendants().not(":parent"),vt=mt.length,Dt=0;Dt<vt;Dt++){var G=mt[Dt];D=u[m.get(G.id())]-G.width()/2,_=u[m.get(G.id())]+G.width()/2,I=c[m.get(G.id())]-G.height()/2,ot=c[m.get(G.id())]+G.height()/2,h>D&&(h=D),C<_&&(C=_),T>I&&(T=I),N<ot&&(N=ot)}var k={};return k.topLeftX=h,k.topLeftY=T,k.width=C-h,k.height=N-T,k},a.calcParentsWithoutChildren=function(l,u){var c=l.collection();return u.nodes(":parent").forEach(function(m){var h=!1;m.children().forEach(function(C){C.css("display")!="none"&&(h=!0)}),h||c.merge(m)}),c},r.exports=a},816:(r,p,i)=>{var g=i(548),t=i(140).CoSELayout,a=i(140).CoSENode,l=i(140).layoutBase.PointD,u=i(140).layoutBase.DimensionD,c=i(140).layoutBase.LayoutConstants,m=i(140).layoutBase.FDLayoutConstants,h=i(140).CoSEConstants,C=function(N,D){var _=N.cy,I=N.eles,ot=I.nodes(),mt=I.edges(),vt=void 0,Dt=void 0,G=void 0,k={};N.randomize&&(vt=D.nodeIndexes,Dt=D.xCoords,G=D.yCoords);var n=function(U){return typeof U=="function"},E=function(U,tt){return n(U)?U(tt):U},f=g.calcParentsWithoutChildren(_,I),y=function H(U,tt,ft,B){for(var lt=tt.length,j=0;j<lt;j++){var O=tt[j],$=null;O.intersection(f).length==0&&($=O.children());var K=void 0,ht=O.layoutDimensions({nodeDimensionsIncludeLabels:B.nodeDimensionsIncludeLabels});if(O.outerWidth()!=null&&O.outerHeight()!=null)if(B.randomize)if(!O.isParent())K=U.add(new a(ft.graphManager,new l(Dt[vt.get(O.id())]-ht.w/2,G[vt.get(O.id())]-ht.h/2),new u(parseFloat(ht.w),parseFloat(ht.h))));else{var Mt=g.calcBoundingBox(O,Dt,G,vt);O.intersection(f).length==0?K=U.add(new a(ft.graphManager,new l(Mt.topLeftX,Mt.topLeftY),new u(Mt.width,Mt.height))):K=U.add(new a(ft.graphManager,new l(Mt.topLeftX,Mt.topLeftY),new u(parseFloat(ht.w),parseFloat(ht.h))))}else K=U.add(new a(ft.graphManager,new l(O.position("x")-ht.w/2,O.position("y")-ht.h/2),new u(parseFloat(ht.w),parseFloat(ht.h))));else K=U.add(new a(this.graphManager));if(K.id=O.data("id"),K.nodeRepulsion=E(B.nodeRepulsion,O),K.paddingLeft=parseInt(O.css("padding")),K.paddingTop=parseInt(O.css("padding")),K.paddingRight=parseInt(O.css("padding")),K.paddingBottom=parseInt(O.css("padding")),B.nodeDimensionsIncludeLabels&&(K.labelWidth=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,K.labelHeight=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,K.labelPosVertical=O.css("text-valign"),K.labelPosHorizontal=O.css("text-halign")),k[O.data("id")]=K,isNaN(K.rect.x)&&(K.rect.x=0),isNaN(K.rect.y)&&(K.rect.y=0),$!=null&&$.length>0){var rt=void 0;rt=ft.getGraphManager().add(ft.newGraph(),K),H(rt,$,ft,B)}}},v=function(U,tt,ft){for(var B=0,lt=0,j=0;j<ft.length;j++){var O=ft[j],$=k[O.data("source")],K=k[O.data("target")];if($&&K&&$!==K&&$.getEdgesBetween(K).length==0){var ht=tt.add(U.newEdge(),$,K);ht.id=O.id(),ht.idealLength=E(N.idealEdgeLength,O),ht.edgeElasticity=E(N.edgeElasticity,O),B+=ht.idealLength,lt++}}N.idealEdgeLength!=null&&(lt>0?h.DEFAULT_EDGE_LENGTH=m.DEFAULT_EDGE_LENGTH=B/lt:n(N.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=m.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=m.DEFAULT_EDGE_LENGTH=N.idealEdgeLength,h.MIN_REPULSION_DIST=m.MIN_REPULSION_DIST=m.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=m.DEFAULT_EDGE_LENGTH)},R=function(U,tt){tt.fixedNodeConstraint&&(U.constraints.fixedNodeConstraint=tt.fixedNodeConstraint),tt.alignmentConstraint&&(U.constraints.alignmentConstraint=tt.alignmentConstraint),tt.relativePlacementConstraint&&(U.constraints.relativePlacementConstraint=tt.relativePlacementConstraint)};N.nestingFactor!=null&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=m.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=N.nestingFactor),N.gravity!=null&&(h.DEFAULT_GRAVITY_STRENGTH=m.DEFAULT_GRAVITY_STRENGTH=N.gravity),N.numIter!=null&&(h.MAX_ITERATIONS=m.MAX_ITERATIONS=N.numIter),N.gravityRange!=null&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=m.DEFAULT_GRAVITY_RANGE_FACTOR=N.gravityRange),N.gravityCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=m.DEFAULT_COMPOUND_GRAVITY_STRENGTH=N.gravityCompound),N.gravityRangeCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=N.gravityRangeCompound),N.initialEnergyOnIncremental!=null&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=m.DEFAULT_COOLING_FACTOR_INCREMENTAL=N.initialEnergyOnIncremental),N.tilingCompareBy!=null&&(h.TILING_COMPARE_BY=N.tilingCompareBy),N.quality=="proof"?c.QUALITY=2:c.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=m.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=N.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=m.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!N.randomize,h.ANIMATE=m.ANIMATE=c.ANIMATE=N.animate,h.TILE=N.tile,h.TILING_PADDING_VERTICAL=typeof N.tilingPaddingVertical=="function"?N.tilingPaddingVertical.call():N.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL=typeof N.tilingPaddingHorizontal=="function"?N.tilingPaddingHorizontal.call():N.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=m.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!N.randomize,c.DEFAULT_UNIFORM_LEAF_NODE_SIZES=N.uniformNodeDimensions,N.step=="transformed"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),N.step=="enforced"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),N.step=="cose"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),N.step=="all"&&(N.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),N.fixedNodeConstraint||N.alignmentConstraint||N.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new t,X=w.newGraphManager();return y(X.addRoot(),g.getTopMostNodes(ot),w,N),v(w,X,mt),R(w,N),w.runLayout(),k};r.exports={coseLayout:C}},212:(r,p,i)=>{var g=function(){function N(D,_){for(var I=0;I<_.length;I++){var ot=_[I];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(D,ot.key,ot)}}return function(D,_,I){return _&&N(D.prototype,_),I&&N(D,I),D}}();function t(N,D){if(!(N instanceof D))throw new TypeError("Cannot call a class as a function")}var a=i(658),l=i(548),u=i(657),c=u.spectralLayout,m=i(816),h=m.coseLayout,C=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(D){return 4500},idealEdgeLength:function(D){return 50},edgeElasticity:function(D){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),T=function(){function N(D){t(this,N),this.options=a({},C,D)}return g(N,[{key:"run",value:function(){var _=this,I=this.options,ot=I.cy,mt=I.eles,vt=[],Dt=void 0,G=void 0,k=[],n=void 0,E=[];I.fixedNodeConstraint&&(!Array.isArray(I.fixedNodeConstraint)||I.fixedNodeConstraint.length==0)&&(I.fixedNodeConstraint=void 0),I.alignmentConstraint&&(I.alignmentConstraint.vertical&&(!Array.isArray(I.alignmentConstraint.vertical)||I.alignmentConstraint.vertical.length==0)&&(I.alignmentConstraint.vertical=void 0),I.alignmentConstraint.horizontal&&(!Array.isArray(I.alignmentConstraint.horizontal)||I.alignmentConstraint.horizontal.length==0)&&(I.alignmentConstraint.horizontal=void 0)),I.relativePlacementConstraint&&(!Array.isArray(I.relativePlacementConstraint)||I.relativePlacementConstraint.length==0)&&(I.relativePlacementConstraint=void 0);var f=I.fixedNodeConstraint||I.alignmentConstraint||I.relativePlacementConstraint;f&&(I.tile=!1,I.packComponents=!1);var y=void 0,v=!1;if(ot.layoutUtilities&&I.packComponents&&(y=ot.layoutUtilities("get"),y||(y=ot.layoutUtilities()),v=!0),mt.nodes().length>0)if(v){var X=l.getTopMostNodes(I.eles.nodes());if(n=l.connectComponents(ot,I.eles,X),n.forEach(function(L){var M=L.boundingBox();E.push({x:M.x1+M.w/2,y:M.y1+M.h/2})}),I.randomize&&n.forEach(function(L){I.eles=L,vt.push(c(I))}),I.quality=="default"||I.quality=="proof"){var H=ot.collection();if(I.tile){var U=new Map,tt=[],ft=[],B=0,lt={nodeIndexes:U,xCoords:tt,yCoords:ft},j=[];if(n.forEach(function(L,M){L.edges().length==0&&(L.nodes().forEach(function(V,Z){H.merge(L.nodes()[Z]),V.isParent()||(lt.nodeIndexes.set(L.nodes()[Z].id(),B++),lt.xCoords.push(L.nodes()[0].position().x),lt.yCoords.push(L.nodes()[0].position().y))}),j.push(M))}),H.length>1){var O=H.boundingBox();E.push({x:O.x1+O.w/2,y:O.y1+O.h/2}),n.push(H),vt.push(lt);for(var $=j.length-1;$>=0;$--)n.splice(j[$],1),vt.splice(j[$],1),E.splice(j[$],1)}}n.forEach(function(L,M){I.eles=L,k.push(h(I,vt[M])),l.relocateComponent(E[M],k[M],I)})}else n.forEach(function(L,M){l.relocateComponent(E[M],vt[M],I)});var K=new Set;if(n.length>1){var ht=[],Mt=mt.filter(function(L){return L.css("display")=="none"});n.forEach(function(L,M){var V=void 0;if(I.quality=="draft"&&(V=vt[M].nodeIndexes),L.nodes().not(Mt).length>0){var Z={};Z.edges=[],Z.nodes=[];var Q=void 0;L.nodes().not(Mt).forEach(function(ct){if(I.quality=="draft")if(!ct.isParent())Q=V.get(ct.id()),Z.nodes.push({x:vt[M].xCoords[Q]-ct.boundingbox().w/2,y:vt[M].yCoords[Q]-ct.boundingbox().h/2,width:ct.boundingbox().w,height:ct.boundingbox().h});else{var q=l.calcBoundingBox(ct,vt[M].xCoords,vt[M].yCoords,V);Z.nodes.push({x:q.topLeftX,y:q.topLeftY,width:q.width,height:q.height})}else k[M][ct.id()]&&Z.nodes.push({x:k[M][ct.id()].getLeft(),y:k[M][ct.id()].getTop(),width:k[M][ct.id()].getWidth(),height:k[M][ct.id()].getHeight()})}),L.edges().forEach(function(ct){var q=ct.source(),at=ct.target();if(q.css("display")!="none"&&at.css("display")!="none")if(I.quality=="draft"){var et=V.get(q.id()),nt=V.get(at.id()),dt=[],Tt=[];if(q.isParent()){var gt=l.calcBoundingBox(q,vt[M].xCoords,vt[M].yCoords,V);dt.push(gt.topLeftX+gt.width/2),dt.push(gt.topLeftY+gt.height/2)}else dt.push(vt[M].xCoords[et]),dt.push(vt[M].yCoords[et]);if(at.isParent()){var A=l.calcBoundingBox(at,vt[M].xCoords,vt[M].yCoords,V);Tt.push(A.topLeftX+A.width/2),Tt.push(A.topLeftY+A.height/2)}else Tt.push(vt[M].xCoords[nt]),Tt.push(vt[M].yCoords[nt]);Z.edges.push({startX:dt[0],startY:dt[1],endX:Tt[0],endY:Tt[1]})}else k[M][q.id()]&&k[M][at.id()]&&Z.edges.push({startX:k[M][q.id()].getCenterX(),startY:k[M][q.id()].getCenterY(),endX:k[M][at.id()].getCenterX(),endY:k[M][at.id()].getCenterY()})}),Z.nodes.length>0&&(ht.push(Z),K.add(M))}});var rt=y.packComponents(ht,I.randomize).shifts;if(I.quality=="draft")vt.forEach(function(L,M){var V=L.xCoords.map(function(Q){return Q+rt[M].dx}),Z=L.yCoords.map(function(Q){return Q+rt[M].dy});L.xCoords=V,L.yCoords=Z});else{var bt=0;K.forEach(function(L){Object.keys(k[L]).forEach(function(M){var V=k[L][M];V.setCenter(V.getCenterX()+rt[bt].dx,V.getCenterY()+rt[bt].dy)}),bt++})}}}else{var R=I.eles.boundingBox();if(E.push({x:R.x1+R.w/2,y:R.y1+R.h/2}),I.randomize){var w=c(I);vt.push(w)}I.quality=="default"||I.quality=="proof"?(k.push(h(I,vt[0])),l.relocateComponent(E[0],k[0],I)):l.relocateComponent(E[0],vt[0],I)}var Rt=function(M,V){if(I.quality=="default"||I.quality=="proof"){typeof M=="number"&&(M=V);var Z=void 0,Q=void 0,ct=M.data("id");return k.forEach(function(at){ct in at&&(Z={x:at[ct].getRect().getCenterX(),y:at[ct].getRect().getCenterY()},Q=at[ct])}),I.nodeDimensionsIncludeLabels&&(Q.labelWidth&&(Q.labelPosHorizontal=="left"?Z.x+=Q.labelWidth/2:Q.labelPosHorizontal=="right"&&(Z.x-=Q.labelWidth/2)),Q.labelHeight&&(Q.labelPosVertical=="top"?Z.y+=Q.labelHeight/2:Q.labelPosVertical=="bottom"&&(Z.y-=Q.labelHeight/2))),Z==null&&(Z={x:M.position("x"),y:M.position("y")}),{x:Z.x,y:Z.y}}else{var q=void 0;return vt.forEach(function(at){var et=at.nodeIndexes.get(M.id());et!=null&&(q={x:at.xCoords[et],y:at.yCoords[et]})}),q==null&&(q={x:M.position("x"),y:M.position("y")}),{x:q.x,y:q.y}}};if(I.quality=="default"||I.quality=="proof"||I.randomize){var Xt=l.calcParentsWithoutChildren(ot,mt),x=mt.filter(function(L){return L.css("display")=="none"});I.eles=mt.not(x),mt.nodes().not(":parent").not(x).layoutPositions(_,I,Rt),Xt.length>0&&Xt.forEach(function(L){L.position(Rt(L))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),N}();r.exports=T},657:(r,p,i)=>{var g=i(548),t=i(140).layoutBase.Matrix,a=i(140).layoutBase.SVD,l=function(c){var m=c.cy,h=c.eles,C=h.nodes(),T=h.nodes(":parent"),N=new Map,D=new Map,_=new Map,I=[],ot=[],mt=[],vt=[],Dt=[],G=[],k=[],n=[],E=void 0,f=void 0,y=1e8,v=1e-9,R=c.piTol,w=c.samplingType,X=c.nodeSeparation,H=void 0,U=function(){for(var b=0,Y=0,P=!1;Y<H;){b=Math.floor(Math.random()*f),P=!1;for(var W=0;W<Y;W++)if(vt[W]==b){P=!0;break}if(!P)vt[Y]=b,Y++;else continue}},tt=function(b,Y,P){for(var W=[],yt=0,st=0,z=0,J=void 0,pt=[],Ot=0,At=1,St=0;St<f;St++)pt[St]=y;for(W[st]=b,pt[b]=0;st>=yt;){z=W[yt++];for(var Nt=I[z],Et=0;Et<Nt.length;Et++)J=D.get(Nt[Et]),pt[J]==y&&(pt[J]=pt[z]+1,W[++st]=J);G[z][Y]=pt[z]*X}if(P){for(var wt=0;wt<f;wt++)G[wt][Y]<Dt[wt]&&(Dt[wt]=G[wt][Y]);for(var Lt=0;Lt<f;Lt++)Dt[Lt]>Ot&&(Ot=Dt[Lt],At=Lt)}return At},ft=function(b){var Y=void 0;if(b){Y=Math.floor(Math.random()*f),E=Y;for(var W=0;W<f;W++)Dt[W]=y;for(var yt=0;yt<H;yt++)vt[yt]=Y,Y=tt(Y,yt,b)}else{U();for(var P=0;P<H;P++)tt(vt[P],P,b,!1)}for(var st=0;st<f;st++)for(var z=0;z<H;z++)G[st][z]*=G[st][z];for(var J=0;J<H;J++)k[J]=[];for(var pt=0;pt<H;pt++)for(var Ot=0;Ot<H;Ot++)k[pt][Ot]=G[vt[Ot]][pt]},B=function(){for(var b=a.svd(k),Y=b.S,P=b.U,W=b.V,yt=Y[0]*Y[0]*Y[0],st=[],z=0;z<H;z++){st[z]=[];for(var J=0;J<H;J++)st[z][J]=0,z==J&&(st[z][J]=Y[z]/(Y[z]*Y[z]+yt/(Y[z]*Y[z])))}n=t.multMat(t.multMat(W,st),t.transpose(P))},lt=function(){for(var b=void 0,Y=void 0,P=[],W=[],yt=[],st=[],z=0;z<f;z++)P[z]=Math.random(),W[z]=Math.random();P=t.normalize(P),W=t.normalize(W);for(var J=0,pt=v,Ot=v,At=void 0;;){J++;for(var St=0;St<f;St++)yt[St]=P[St];if(P=t.multGamma(t.multL(t.multGamma(yt),G,n)),b=t.dotProduct(yt,P),P=t.normalize(P),pt=t.dotProduct(yt,P),At=Math.abs(pt/Ot),At<=1+R&&At>=1)break;Ot=pt}for(var Nt=0;Nt<f;Nt++)yt[Nt]=P[Nt];for(J=0,Ot=v;;){J++;for(var Et=0;Et<f;Et++)st[Et]=W[Et];if(st=t.minusOp(st,t.multCons(yt,t.dotProduct(yt,st))),W=t.multGamma(t.multL(t.multGamma(st),G,n)),Y=t.dotProduct(st,W),W=t.normalize(W),pt=t.dotProduct(st,W),At=Math.abs(pt/Ot),At<=1+R&&At>=1)break;Ot=pt}for(var wt=0;wt<f;wt++)st[wt]=W[wt];ot=t.multCons(yt,Math.sqrt(Math.abs(b))),mt=t.multCons(st,Math.sqrt(Math.abs(Y)))};g.connectComponents(m,h,g.getTopMostNodes(C),N),T.forEach(function(F){g.connectComponents(m,h,g.getTopMostNodes(F.descendants().intersection(h)),N)});for(var j=0,O=0;O<C.length;O++)C[O].isParent()||D.set(C[O].id(),j++);var $=!0,K=!1,ht=void 0;try{for(var Mt=N.keys()[Symbol.iterator](),rt;!($=(rt=Mt.next()).done);$=!0){var bt=rt.value;D.set(bt,j++)}}catch(F){K=!0,ht=F}finally{try{!$&&Mt.return&&Mt.return()}finally{if(K)throw ht}}for(var Rt=0;Rt<D.size;Rt++)I[Rt]=[];T.forEach(function(F){for(var b=F.children().intersection(h);b.nodes(":childless").length==0;)b=b.nodes()[0].children().intersection(h);var Y=0,P=b.nodes(":childless")[0].connectedEdges().length;b.nodes(":childless").forEach(function(W,yt){W.connectedEdges().length<P&&(P=W.connectedEdges().length,Y=yt)}),_.set(F.id(),b.nodes(":childless")[Y].id())}),C.forEach(function(F){var b=void 0;F.isParent()?b=D.get(_.get(F.id())):b=D.get(F.id()),F.neighborhood().nodes().forEach(function(Y){h.intersection(F.edgesWith(Y)).length>0&&(Y.isParent()?I[b].push(_.get(Y.id())):I[b].push(Y.id()))})});var Xt=function(b){var Y=D.get(b),P=void 0;N.get(b).forEach(function(W){m.getElementById(W).isParent()?P=_.get(W):P=W,I[Y].push(P),I[D.get(P)].push(b)})},x=!0,L=!1,M=void 0;try{for(var V=N.keys()[Symbol.iterator](),Z;!(x=(Z=V.next()).done);x=!0){var Q=Z.value;Xt(Q)}}catch(F){L=!0,M=F}finally{try{!x&&V.return&&V.return()}finally{if(L)throw M}}f=D.size;var ct=void 0;if(f>2){H=f<c.sampleSize?f:c.sampleSize;for(var q=0;q<f;q++)G[q]=[];for(var at=0;at<H;at++)n[at]=[];return c.quality=="draft"||c.step=="all"?(ft(w),B(),lt(),ct={nodeIndexes:D,xCoords:ot,yCoords:mt}):(D.forEach(function(F,b){ot.push(m.getElementById(b).position("x")),mt.push(m.getElementById(b).position("y"))}),ct={nodeIndexes:D,xCoords:ot,yCoords:mt}),ct}else{var et=D.keys(),nt=m.getElementById(et.next().value),dt=nt.position(),Tt=nt.outerWidth();if(ot.push(dt.x),mt.push(dt.y),f==2){var gt=m.getElementById(et.next().value),A=gt.outerWidth();ot.push(dt.x+Tt/2+A/2+c.idealEdgeLength),mt.push(dt.y)}return ct={nodeIndexes:D,xCoords:ot,yCoords:mt},ct}};r.exports={spectralLayout:l}},579:(r,p,i)=>{var g=i(212),t=function(l){l&&l("layout","fcose",g)};typeof cytoscape!="undefined"&&t(cytoscape),r.exports=t},140:r=>{r.exports=S}},s={};function o(r){var p=s[r];if(p!==void 0)return p.exports;var i=s[r]={exports:{}};return d[r](i,i.exports,o),i.exports}var e=o(579);return e})()})},26914:function(Yt,it,ut){(function(d,s){Yt.exports=s(ut(13035))})(this,function(S){return(()=>{"use strict";var d={45:(r,p,i)=>{var g={};g.layoutBase=i(551),g.CoSEConstants=i(806),g.CoSEEdge=i(767),g.CoSEGraph=i(880),g.CoSEGraphManager=i(578),g.CoSELayout=i(765),g.CoSENode=i(991),g.ConstraintHandler=i(902),r.exports=g},806:(r,p,i)=>{var g=i(551).FDLayoutConstants;function t(){}for(var a in g)t[a]=g[a];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,t.ENFORCE_CONSTRAINTS=!0,t.APPLY_LAYOUT=!0,t.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,t.TREE_REDUCTION_ON_INCREMENTAL=!0,t.PURE_INCREMENTAL=t.DEFAULT_INCREMENTAL,r.exports=t},767:(r,p,i)=>{var g=i(551).FDLayoutEdge;function t(l,u,c){g.call(this,l,u,c)}t.prototype=Object.create(g.prototype);for(var a in g)t[a]=g[a];r.exports=t},880:(r,p,i)=>{var g=i(551).LGraph;function t(l,u,c){g.call(this,l,u,c)}t.prototype=Object.create(g.prototype);for(var a in g)t[a]=g[a];r.exports=t},578:(r,p,i)=>{var g=i(551).LGraphManager;function t(l){g.call(this,l)}t.prototype=Object.create(g.prototype);for(var a in g)t[a]=g[a];r.exports=t},765:(r,p,i)=>{var g=i(551).FDLayout,t=i(578),a=i(880),l=i(991),u=i(767),c=i(806),m=i(902),h=i(551).FDLayoutConstants,C=i(551).LayoutConstants,T=i(551).Point,N=i(551).PointD,D=i(551).DimensionD,_=i(551).Layout,I=i(551).Integer,ot=i(551).IGeometry,mt=i(551).LGraph,vt=i(551).Transform,Dt=i(551).LinkedList;function G(){g.call(this),this.toBeTiled={},this.constraints={}}G.prototype=Object.create(g.prototype);for(var k in g)G[k]=g[k];G.prototype.newGraphManager=function(){var n=new t(this);return this.graphManager=n,n},G.prototype.newGraph=function(n){return new a(null,this.graphManager,n)},G.prototype.newNode=function(n){return new l(this.graphManager,n)},G.prototype.newEdge=function(n){return new u(null,null,n)},G.prototype.initParameters=function(){g.prototype.initParameters.call(this,arguments),this.isSubLayout||(c.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},G.prototype.initSpringEmbedder=function(){g.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},G.prototype.layout=function(){var n=C.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},G.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(c.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(R){return E.has(R)});this.graphManager.setAllNodesToApplyGravitation(f)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(y){return E.has(y)});this.graphManager.setAllNodesToApplyGravitation(f),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(m.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),c.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},G.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(v){return n.has(v)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),c.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),c.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var f=!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(f,y),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},G.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),E={},f=0;f<n.length;f++){var y=n[f].rect,v=n[f].id;E[v]={id:v,x:y.getCenterX(),y:y.getCenterY(),w:y.width,h:y.height}}return E},G.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var n=!1;if(h.ANIMATE==="during")this.emit("layoutstarted");else{for(;!n;)n=this.tick();this.graphManager.updateBounds()}},G.prototype.moveNodes=function(){for(var n=this.getAllNodes(),E,f=0;f<n.length;f++)E=n[f],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var f=0;f<n.length;f++)E=n[f],E.move()},G.prototype.initConstraintVariables=function(){var n=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var E=this.graphManager.getAllNodes(),f=0;f<E.length;f++){var y=E[f];this.idToNodeMap.set(y.id,y)}var v=function O($){for(var K=$.getChild().getNodes(),ht,Mt=0,rt=0;rt<K.length;rt++)ht=K[rt],ht.getChild()==null?n.fixedNodeSet.has(ht.id)&&(Mt+=100):Mt+=O(ht);return Mt};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(K){n.fixedNodeSet.add(K.nodeId)});for(var E=this.graphManager.getAllNodes(),y,f=0;f<E.length;f++)if(y=E[f],y.getChild()!=null){var R=v(y);R>0&&(y.fixedNodeWeight=R)}}if(this.constraints.relativePlacementConstraint){var w=new Map,X=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var H=this.constraints.alignmentConstraint.vertical,f=0;f<H.length;f++)this.dummyToNodeForVerticalAlignment.set("dummy"+f,[]),H[f].forEach(function($){w.set($,"dummy"+f),n.dummyToNodeForVerticalAlignment.get("dummy"+f).push($),n.fixedNodeSet.has($)&&n.fixedNodesOnHorizontal.add("dummy"+f)});if(this.constraints.alignmentConstraint.horizontal)for(var U=this.constraints.alignmentConstraint.horizontal,f=0;f<U.length;f++)this.dummyToNodeForHorizontalAlignment.set("dummy"+f,[]),U[f].forEach(function($){X.set($,"dummy"+f),n.dummyToNodeForHorizontalAlignment.get("dummy"+f).push($),n.fixedNodeSet.has($)&&n.fixedNodesOnVertical.add("dummy"+f)})}if(c.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(O){var $,K,ht;for(ht=O.length-1;ht>=2*O.length/3;ht--)$=Math.floor(Math.random()*(ht+1)),K=O[ht],O[ht]=O[$],O[$]=K;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var $=w.has(O.left)?w.get(O.left):O.left,K=w.has(O.right)?w.get(O.right):O.right;n.nodesInRelativeHorizontal.includes($)||(n.nodesInRelativeHorizontal.push($),n.nodeToRelativeConstraintMapHorizontal.set($,[]),n.dummyToNodeForVerticalAlignment.has($)?n.nodeToTempPositionMapHorizontal.set($,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get($)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set($,n.idToNodeMap.get($).getCenterX())),n.nodesInRelativeHorizontal.includes(K)||(n.nodesInRelativeHorizontal.push(K),n.nodeToRelativeConstraintMapHorizontal.set(K,[]),n.dummyToNodeForVerticalAlignment.has(K)?n.nodeToTempPositionMapHorizontal.set(K,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(K)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(K,n.idToNodeMap.get(K).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get($).push({right:K,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(K).push({left:$,gap:O.gap})}else{var ht=X.has(O.top)?X.get(O.top):O.top,Mt=X.has(O.bottom)?X.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodesInRelativeVertical.includes(Mt)||(n.nodesInRelativeVertical.push(Mt),n.nodeToRelativeConstraintMapVertical.set(Mt,[]),n.dummyToNodeForHorizontalAlignment.has(Mt)?n.nodeToTempPositionMapVertical.set(Mt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(Mt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(Mt,n.idToNodeMap.get(Mt).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(ht).push({bottom:Mt,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(Mt).push({top:ht,gap:O.gap})}});else{var tt=new Map,ft=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var $=w.has(O.left)?w.get(O.left):O.left,K=w.has(O.right)?w.get(O.right):O.right;tt.has($)?tt.get($).push(K):tt.set($,[K]),tt.has(K)?tt.get(K).push($):tt.set(K,[$])}else{var ht=X.has(O.top)?X.get(O.top):O.top,Mt=X.has(O.bottom)?X.get(O.bottom):O.bottom;ft.has(ht)?ft.get(ht).push(Mt):ft.set(ht,[Mt]),ft.has(Mt)?ft.get(Mt).push(ht):ft.set(Mt,[ht])}});var B=function($,K){var ht=[],Mt=[],rt=new Dt,bt=new Set,Rt=0;return $.forEach(function(Xt,x){if(!bt.has(x)){ht[Rt]=[],Mt[Rt]=!1;var L=x;for(rt.push(L),bt.add(L),ht[Rt].push(L);rt.length!=0;){L=rt.shift(),K.has(L)&&(Mt[Rt]=!0);var M=$.get(L);M.forEach(function(V){bt.has(V)||(rt.push(V),bt.add(V),ht[Rt].push(V))})}Rt++}}),{components:ht,isFixed:Mt}},lt=B(tt,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=lt.components,this.fixedComponentsOnHorizontal=lt.isFixed;var j=B(ft,n.fixedNodesOnVertical);this.componentsOnVertical=j.components,this.fixedComponentsOnVertical=j.isFixed}}},G.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(j){var O=n.idToNodeMap.get(j.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,f=0;f<E.length;f++){for(var y=0,v=0;v<E[f].length;v++){if(this.fixedNodeSet.has(E[f][v])){y=0;break}y+=this.idToNodeMap.get(E[f][v]).displacementX}for(var R=y/E[f].length,v=0;v<E[f].length;v++)this.idToNodeMap.get(E[f][v]).displacementX=R}if(this.constraints.alignmentConstraint.horizontal)for(var w=this.constraints.alignmentConstraint.horizontal,f=0;f<w.length;f++){for(var X=0,v=0;v<w[f].length;v++){if(this.fixedNodeSet.has(w[f][v])){X=0;break}X+=this.idToNodeMap.get(w[f][v]).displacementY}for(var H=X/w[f].length,v=0;v<w[f].length;v++)this.idToNodeMap.get(w[f][v]).displacementY=H}}if(this.constraints.relativePlacementConstraint)if(c.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(j){if(!n.fixedNodesOnHorizontal.has(j)){var O=0;n.dummyToNodeForVerticalAlignment.has(j)?O=n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(j)[0]).displacementX:O=n.idToNodeMap.get(j).displacementX,n.nodeToRelativeConstraintMapHorizontal.get(j).forEach(function($){if($.right){var K=n.nodeToTempPositionMapHorizontal.get($.right)-n.nodeToTempPositionMapHorizontal.get(j)-O;K<$.gap&&(O-=$.gap-K)}else{var K=n.nodeToTempPositionMapHorizontal.get(j)-n.nodeToTempPositionMapHorizontal.get($.left)+O;K<$.gap&&(O+=$.gap-K)}}),n.nodeToTempPositionMapHorizontal.set(j,n.nodeToTempPositionMapHorizontal.get(j)+O),n.dummyToNodeForVerticalAlignment.has(j)?n.dummyToNodeForVerticalAlignment.get(j).forEach(function($){n.idToNodeMap.get($).displacementX=O}):n.idToNodeMap.get(j).displacementX=O}}),this.nodesInRelativeVertical.forEach(function(j){if(!n.fixedNodesOnHorizontal.has(j)){var O=0;n.dummyToNodeForHorizontalAlignment.has(j)?O=n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(j)[0]).displacementY:O=n.idToNodeMap.get(j).displacementY,n.nodeToRelativeConstraintMapVertical.get(j).forEach(function($){if($.bottom){var K=n.nodeToTempPositionMapVertical.get($.bottom)-n.nodeToTempPositionMapVertical.get(j)-O;K<$.gap&&(O-=$.gap-K)}else{var K=n.nodeToTempPositionMapVertical.get(j)-n.nodeToTempPositionMapVertical.get($.top)+O;K<$.gap&&(O+=$.gap-K)}}),n.nodeToTempPositionMapVertical.set(j,n.nodeToTempPositionMapVertical.get(j)+O),n.dummyToNodeForHorizontalAlignment.has(j)?n.dummyToNodeForHorizontalAlignment.get(j).forEach(function($){n.idToNodeMap.get($).displacementY=O}):n.idToNodeMap.get(j).displacementY=O}});else{for(var f=0;f<this.componentsOnHorizontal.length;f++){var U=this.componentsOnHorizontal[f];if(this.fixedComponentsOnHorizontal[f])for(var v=0;v<U.length;v++)this.dummyToNodeForVerticalAlignment.has(U[v])?this.dummyToNodeForVerticalAlignment.get(U[v]).forEach(function($){n.idToNodeMap.get($).displacementX=0}):this.idToNodeMap.get(U[v]).displacementX=0;else{for(var tt=0,ft=0,v=0;v<U.length;v++)if(this.dummyToNodeForVerticalAlignment.has(U[v])){var B=this.dummyToNodeForVerticalAlignment.get(U[v]);tt+=B.length*this.idToNodeMap.get(B[0]).displacementX,ft+=B.length}else tt+=this.idToNodeMap.get(U[v]).displacementX,ft++;for(var lt=tt/ft,v=0;v<U.length;v++)this.dummyToNodeForVerticalAlignment.has(U[v])?this.dummyToNodeForVerticalAlignment.get(U[v]).forEach(function($){n.idToNodeMap.get($).displacementX=lt}):this.idToNodeMap.get(U[v]).displacementX=lt}}for(var f=0;f<this.componentsOnVertical.length;f++){var U=this.componentsOnVertical[f];if(this.fixedComponentsOnVertical[f])for(var v=0;v<U.length;v++)this.dummyToNodeForHorizontalAlignment.has(U[v])?this.dummyToNodeForHorizontalAlignment.get(U[v]).forEach(function(K){n.idToNodeMap.get(K).displacementY=0}):this.idToNodeMap.get(U[v]).displacementY=0;else{for(var tt=0,ft=0,v=0;v<U.length;v++)if(this.dummyToNodeForHorizontalAlignment.has(U[v])){var B=this.dummyToNodeForHorizontalAlignment.get(U[v]);tt+=B.length*this.idToNodeMap.get(B[0]).displacementY,ft+=B.length}else tt+=this.idToNodeMap.get(U[v]).displacementY,ft++;for(var lt=tt/ft,v=0;v<U.length;v++)this.dummyToNodeForHorizontalAlignment.has(U[v])?this.dummyToNodeForHorizontalAlignment.get(U[v]).forEach(function(rt){n.idToNodeMap.get(rt).displacementY=lt}):this.idToNodeMap.get(U[v]).displacementY=lt}}}},G.prototype.calculateNodesToApplyGravitationTo=function(){var n=[],E,f=this.graphManager.getGraphs(),y=f.length,v;for(v=0;v<y;v++)E=f[v],E.updateConnected(),E.isConnected||(n=n.concat(E.getNodes()));return n},G.prototype.createBendpoints=function(){var n=[];n=n.concat(this.graphManager.getAllEdges());var E=new Set,f;for(f=0;f<n.length;f++){var y=n[f];if(!E.has(y)){var v=y.getSource(),R=y.getTarget();if(v==R)y.getBendpoints().push(new N),y.getBendpoints().push(new N),this.createDummyNodesForBendpoints(y),E.add(y);else{var w=[];if(w=w.concat(v.getEdgeListToNode(R)),w=w.concat(R.getEdgeListToNode(v)),!E.has(w[0])){if(w.length>1){var X;for(X=0;X<w.length;X++){var H=w[X];H.getBendpoints().push(new N),this.createDummyNodesForBendpoints(H)}}w.forEach(function(U){E.add(U)})}}}if(E.size==n.length)break}},G.prototype.positionNodesRadially=function(n){for(var E=new T(0,0),f=Math.ceil(Math.sqrt(n.length)),y=0,v=0,R=0,w=new N(0,0),X=0;X<n.length;X++){X%f==0&&(R=0,v=y,X!=0&&(v+=c.DEFAULT_COMPONENT_SEPERATION),y=0);var H=n[X],U=_.findCenterOfTree(H);E.x=R,E.y=v,w=G.radialLayout(H,U,E),w.y>y&&(y=Math.floor(w.y)),R=Math.floor(w.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new N(C.WORLD_CENTER_X-w.x/2,C.WORLD_CENTER_Y-w.y/2))},G.radialLayout=function(n,E,f){var y=Math.max(this.maxDiagonalInTree(n),c.DEFAULT_RADIAL_SEPARATION);G.branchRadialLayout(E,null,0,359,0,y);var v=mt.calculateBounds(n),R=new vt;R.setDeviceOrgX(v.getMinX()),R.setDeviceOrgY(v.getMinY()),R.setWorldOrgX(f.x),R.setWorldOrgY(f.y);for(var w=0;w<n.length;w++){var X=n[w];X.transform(R)}var H=new N(v.getMaxX(),v.getMaxY());return R.inverseTransformPoint(H)},G.branchRadialLayout=function(n,E,f,y,v,R){var w=(y-f+1)/2;w<0&&(w+=180);var X=(w+f)%360,H=X*ot.TWO_PI/360,U=Math.cos(H),tt=v*Math.cos(H),ft=v*Math.sin(H);n.setCenter(tt,ft);var B=[];B=B.concat(n.getEdges());var lt=B.length;E!=null&<--;for(var j=0,O=B.length,$,K=n.getEdgesBetween(E);K.length>1;){var ht=K[0];K.splice(0,1);var Mt=B.indexOf(ht);Mt>=0&&B.splice(Mt,1),O--,lt--}E!=null?$=(B.indexOf(K[0])+1)%O:$=0;for(var rt=Math.abs(y-f)/lt,bt=$;j!=lt;bt=++bt%O){var Rt=B[bt].getOtherEnd(n);if(Rt!=E){var Xt=(f+j*rt)%360,x=(Xt+rt)%360;G.branchRadialLayout(Rt,n,Xt,x,v+R,R),j++}}},G.maxDiagonalInTree=function(n){for(var E=I.MIN_VALUE,f=0;f<n.length;f++){var y=n[f],v=y.getDiagonal();v>E&&(E=v)}return E},G.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},G.prototype.groupZeroDegreeMembers=function(){var n=this,E={};this.memberGroups={},this.idToDummyNode={};for(var f=[],y=this.graphManager.getAllNodes(),v=0;v<y.length;v++){var R=y[v],w=R.getParent();this.getNodeDegreeWithChildren(R)===0&&(w.id==null||!this.getToBeTiled(w))&&f.push(R)}for(var v=0;v<f.length;v++){var R=f[v],X=R.getParent().id;typeof E[X]=="undefined"&&(E[X]=[]),E[X]=E[X].concat(R)}Object.keys(E).forEach(function(H){if(E[H].length>1){var U="DummyCompound_"+H;n.memberGroups[U]=E[H];var tt=E[H][0].getParent(),ft=new l(n.graphManager);ft.id=U,ft.paddingLeft=tt.paddingLeft||0,ft.paddingRight=tt.paddingRight||0,ft.paddingBottom=tt.paddingBottom||0,ft.paddingTop=tt.paddingTop||0,n.idToDummyNode[U]=ft;var B=n.getGraphManager().add(n.newGraph(),ft),lt=tt.getChild();lt.add(ft);for(var j=0;j<E[H].length;j++){var O=E[H][j];lt.remove(O),B.add(O)}}})},G.prototype.clearCompounds=function(){var n={},E={};this.performDFSOnCompounds();for(var f=0;f<this.compoundOrder.length;f++)E[this.compoundOrder[f].id]=this.compoundOrder[f],n[this.compoundOrder[f].id]=[].concat(this.compoundOrder[f].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[f].getChild()),this.compoundOrder[f].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(n,E)},G.prototype.clearZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(f){var y=n.idToDummyNode[f];if(E[f]=n.tileNodes(n.memberGroups[f],y.paddingLeft+y.paddingRight),y.rect.width=E[f].width,y.rect.height=E[f].height,y.setCenter(E[f].centerX,E[f].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var v=y.rect.width,R=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(v+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>v?(y.rect.x-=(y.labelWidth-v)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-v)/2):y.labelPosHorizontal=="right"&&y.setWidth(v+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(R+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>R?(y.rect.y-=(y.labelHeight-R)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-R)/2):y.labelPosVertical=="bottom"&&y.setHeight(R+y.labelHeight))}})},G.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var E=this.compoundOrder[n],f=E.id,y=E.paddingLeft,v=E.paddingTop,R=E.labelMarginLeft,w=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[f],E.rect.x,E.rect.y,y,v,R,w)}},G.prototype.repopulateZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(f){var y=n.idToDummyNode[f],v=y.paddingLeft,R=y.paddingTop,w=y.labelMarginLeft,X=y.labelMarginTop;n.adjustLocations(E[f],y.rect.x,y.rect.y,v,R,w,X)})},G.prototype.getToBeTiled=function(n){var E=n.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var f=n.getChild();if(f==null)return this.toBeTiled[E]=!1,!1;for(var y=f.getNodes(),v=0;v<y.length;v++){var R=y[v];if(this.getNodeDegree(R)>0)return this.toBeTiled[E]=!1,!1;if(R.getChild()==null){this.toBeTiled[R.id]=!1;continue}if(!this.getToBeTiled(R))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},G.prototype.getNodeDegree=function(n){for(var E=n.id,f=n.getEdges(),y=0,v=0;v<f.length;v++){var R=f[v];R.getSource().id!==R.getTarget().id&&(y=y+1)}return y},G.prototype.getNodeDegreeWithChildren=function(n){var E=this.getNodeDegree(n);if(n.getChild()==null)return E;for(var f=n.getChild().getNodes(),y=0;y<f.length;y++){var v=f[y];E+=this.getNodeDegreeWithChildren(v)}return E},G.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},G.prototype.fillCompexOrderByDFS=function(n){for(var E=0;E<n.length;E++){var f=n[E];f.getChild()!=null&&this.fillCompexOrderByDFS(f.getChild().getNodes()),this.getToBeTiled(f)&&this.compoundOrder.push(f)}},G.prototype.adjustLocations=function(n,E,f,y,v,R,w){E+=y+R,f+=v+w;for(var X=E,H=0;H<n.rows.length;H++){var U=n.rows[H];E=X;for(var tt=0,ft=0;ft<U.length;ft++){var B=U[ft];B.rect.x=E,B.rect.y=f,E+=B.rect.width+n.horizontalPadding,B.rect.height>tt&&(tt=B.rect.height)}f+=tt+n.verticalPadding}},G.prototype.tileCompoundMembers=function(n,E){var f=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(y){var v=E[y];if(f.tiledMemberPack[y]=f.tileNodes(n[y],v.paddingLeft+v.paddingRight),v.rect.width=f.tiledMemberPack[y].width,v.rect.height=f.tiledMemberPack[y].height,v.setCenter(f.tiledMemberPack[y].centerX,f.tiledMemberPack[y].centerY),v.labelMarginLeft=0,v.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var R=v.rect.width,w=v.rect.height;v.labelWidth&&(v.labelPosHorizontal=="left"?(v.rect.x-=v.labelWidth,v.setWidth(R+v.labelWidth),v.labelMarginLeft=v.labelWidth):v.labelPosHorizontal=="center"&&v.labelWidth>R?(v.rect.x-=(v.labelWidth-R)/2,v.setWidth(v.labelWidth),v.labelMarginLeft=(v.labelWidth-R)/2):v.labelPosHorizontal=="right"&&v.setWidth(R+v.labelWidth)),v.labelHeight&&(v.labelPosVertical=="top"?(v.rect.y-=v.labelHeight,v.setHeight(w+v.labelHeight),v.labelMarginTop=v.labelHeight):v.labelPosVertical=="center"&&v.labelHeight>w?(v.rect.y-=(v.labelHeight-w)/2,v.setHeight(v.labelHeight),v.labelMarginTop=(v.labelHeight-w)/2):v.labelPosVertical=="bottom"&&v.setHeight(w+v.labelHeight))}})},G.prototype.tileNodes=function(n,E){var f=this.tileNodesByFavoringDim(n,E,!0),y=this.tileNodesByFavoringDim(n,E,!1),v=this.getOrgRatio(f),R=this.getOrgRatio(y),w;return R<v?w=y:w=f,w},G.prototype.getOrgRatio=function(n){var E=n.width,f=n.height,y=E/f;return y<1&&(y=1/y),y},G.prototype.calcIdealRowWidth=function(n,E){var f=c.TILING_PADDING_VERTICAL,y=c.TILING_PADDING_HORIZONTAL,v=n.length,R=0,w=0,X=0;n.forEach(function(j){R+=j.getWidth(),w+=j.getHeight(),j.getWidth()>X&&(X=j.getWidth())});var H=R/v,U=w/v,tt=Math.pow(f-y,2)+4*(H+y)*(U+f)*v,ft=(y-f+Math.sqrt(tt))/(2*(H+y)),B;E?(B=Math.ceil(ft),B==ft&&B++):B=Math.floor(ft);var lt=B*(H+y)-y;return X>lt&&(lt=X),lt+=y*2,lt},G.prototype.tileNodesByFavoringDim=function(n,E,f){var y=c.TILING_PADDING_VERTICAL,v=c.TILING_PADDING_HORIZONTAL,R=c.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:y,horizontalPadding:v,centerX:0,centerY:0};R&&(w.idealRowWidth=this.calcIdealRowWidth(n,f));var X=function(O){return O.rect.width*O.rect.height},H=function(O,$){return X($)-X(O)};n.sort(function(j,O){var $=H;return w.idealRowWidth?($=R,$(j.id,O.id)):$(j,O)});for(var U=0,tt=0,ft=0;ft<n.length;ft++){var B=n[ft];U+=B.getCenterX(),tt+=B.getCenterY()}w.centerX=U/n.length,w.centerY=tt/n.length;for(var ft=0;ft<n.length;ft++){var B=n[ft];if(w.rows.length==0)this.insertNodeToRow(w,B,0,E);else if(this.canAddHorizontal(w,B.rect.width,B.rect.height)){var lt=w.rows.length-1;w.idealRowWidth||(lt=this.getShortestRowIndex(w)),this.insertNodeToRow(w,B,lt,E)}else this.insertNodeToRow(w,B,w.rows.length,E);this.shiftToLastRow(w)}return w},G.prototype.insertNodeToRow=function(n,E,f,y){var v=y;if(f==n.rows.length){var R=[];n.rows.push(R),n.rowWidth.push(v),n.rowHeight.push(0)}var w=n.rowWidth[f]+E.rect.width;n.rows[f].length>0&&(w+=n.horizontalPadding),n.rowWidth[f]=w,n.width<w&&(n.width=w);var X=E.rect.height;f>0&&(X+=n.verticalPadding);var H=0;X>n.rowHeight[f]&&(H=n.rowHeight[f],n.rowHeight[f]=X,H=n.rowHeight[f]-H),n.height+=H,n.rows[f].push(E)},G.prototype.getShortestRowIndex=function(n){for(var E=-1,f=Number.MAX_VALUE,y=0;y<n.rows.length;y++)n.rowWidth[y]<f&&(E=y,f=n.rowWidth[y]);return E},G.prototype.getLongestRowIndex=function(n){for(var E=-1,f=Number.MIN_VALUE,y=0;y<n.rows.length;y++)n.rowWidth[y]>f&&(E=y,f=n.rowWidth[y]);return E},G.prototype.canAddHorizontal=function(n,E,f){if(n.idealRowWidth){var y=n.rows.length-1,v=n.rowWidth[y];return v+E+n.horizontalPadding<=n.idealRowWidth}var R=this.getShortestRowIndex(n);if(R<0)return!0;var w=n.rowWidth[R];if(w+n.horizontalPadding+E<=n.width)return!0;var X=0;n.rowHeight[R]<f&&R>0&&(X=f+n.verticalPadding-n.rowHeight[R]);var H;n.width-w>=E+n.horizontalPadding?H=(n.height+X)/(w+E+n.horizontalPadding):H=(n.height+X)/n.width,X=f+n.verticalPadding;var U;return n.width<E?U=(n.height+X)/E:U=(n.height+X)/n.width,U<1&&(U=1/U),H<1&&(H=1/H),H<U},G.prototype.shiftToLastRow=function(n){var E=this.getLongestRowIndex(n),f=n.rowWidth.length-1,y=n.rows[E],v=y[y.length-1],R=v.width+n.horizontalPadding;if(n.width-n.rowWidth[f]>R&&E!=f){y.splice(-1,1),n.rows[f].push(v),n.rowWidth[E]=n.rowWidth[E]-R,n.rowWidth[f]=n.rowWidth[f]+R,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var w=Number.MIN_VALUE,X=0;X<y.length;X++)y[X].height>w&&(w=y[X].height);E>0&&(w+=n.verticalPadding);var H=n.rowHeight[E]+n.rowHeight[f];n.rowHeight[E]=w,n.rowHeight[f]<v.height+n.verticalPadding&&(n.rowHeight[f]=v.height+n.verticalPadding);var U=n.rowHeight[E]+n.rowHeight[f];n.height+=U-H,this.shiftToLastRow(n)}},G.prototype.tilingPreLayout=function(){c.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},G.prototype.tilingPostLayout=function(){c.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},G.prototype.reduceTrees=function(){for(var n=[],E=!0,f;E;){var y=this.graphManager.getAllNodes(),v=[];E=!1;for(var R=0;R<y.length;R++)if(f=y[R],f.getEdges().length==1&&!f.getEdges()[0].isInterGraph&&f.getChild()==null){if(c.PURE_INCREMENTAL){var w=f.getEdges()[0].getOtherEnd(f),X=new D(f.getCenterX()-w.getCenterX(),f.getCenterY()-w.getCenterY());v.push([f,f.getEdges()[0],f.getOwner(),X])}else v.push([f,f.getEdges()[0],f.getOwner()]);E=!0}if(E==!0){for(var H=[],U=0;U<v.length;U++)v[U][0].getEdges().length==1&&(H.push(v[U]),v[U][0].getOwner().remove(v[U][0]));n.push(H),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=n},G.prototype.growTree=function(n){for(var E=n.length,f=n[E-1],y,v=0;v<f.length;v++)y=f[v],this.findPlaceforPrunedNode(y),y[2].add(y[0]),y[2].add(y[1],y[1].source,y[1].target);n.splice(n.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},G.prototype.findPlaceforPrunedNode=function(n){var E,f,y=n[0];if(y==n[1].source?f=n[1].target:f=n[1].source,c.PURE_INCREMENTAL)y.setCenter(f.getCenterX()+n[3].getWidth(),f.getCenterY()+n[3].getHeight());else{var v=f.startX,R=f.finishX,w=f.startY,X=f.finishY,H=0,U=0,tt=0,ft=0,B=[H,tt,U,ft];if(w>0)for(var lt=v;lt<=R;lt++)B[0]+=this.grid[lt][w-1].length+this.grid[lt][w].length-1;if(R<this.grid.length-1)for(var lt=w;lt<=X;lt++)B[1]+=this.grid[R+1][lt].length+this.grid[R][lt].length-1;if(X<this.grid[0].length-1)for(var lt=v;lt<=R;lt++)B[2]+=this.grid[lt][X+1].length+this.grid[lt][X].length-1;if(v>0)for(var lt=w;lt<=X;lt++)B[3]+=this.grid[v-1][lt].length+this.grid[v][lt].length-1;for(var j=I.MAX_VALUE,O,$,K=0;K<B.length;K++)B[K]<j?(j=B[K],O=1,$=K):B[K]==j&&O++;if(O==3&&j==0)B[0]==0&&B[1]==0&&B[2]==0?E=1:B[0]==0&&B[1]==0&&B[3]==0?E=0:B[0]==0&&B[2]==0&&B[3]==0?E=3:B[1]==0&&B[2]==0&&B[3]==0&&(E=2);else if(O==2&&j==0){var ht=Math.floor(Math.random()*2);B[0]==0&&B[1]==0?ht==0?E=0:E=1:B[0]==0&&B[2]==0?ht==0?E=0:E=2:B[0]==0&&B[3]==0?ht==0?E=0:E=3:B[1]==0&&B[2]==0?ht==0?E=1:E=2:B[1]==0&&B[3]==0?ht==0?E=1:E=3:ht==0?E=2:E=3}else if(O==4&&j==0){var ht=Math.floor(Math.random()*4);E=ht}else E=$;E==0?y.setCenter(f.getCenterX(),f.getCenterY()-f.getHeight()/2-h.DEFAULT_EDGE_LENGTH-y.getHeight()/2):E==1?y.setCenter(f.getCenterX()+f.getWidth()/2+h.DEFAULT_EDGE_LENGTH+y.getWidth()/2,f.getCenterY()):E==2?y.setCenter(f.getCenterX(),f.getCenterY()+f.getHeight()/2+h.DEFAULT_EDGE_LENGTH+y.getHeight()/2):y.setCenter(f.getCenterX()-f.getWidth()/2-h.DEFAULT_EDGE_LENGTH-y.getWidth()/2,f.getCenterY())}},r.exports=G},991:(r,p,i)=>{var g=i(551).FDLayoutNode,t=i(551).IMath;function a(u,c,m,h){g.call(this,u,c,m,h)}a.prototype=Object.create(g.prototype);for(var l in g)a[l]=g[l];a.prototype.calculateDisplacement=function(){var u=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=u.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=u.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=u.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=u.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>u.coolingFactor*u.maxNodeDisplacement&&(this.displacementX=u.coolingFactor*u.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>u.coolingFactor*u.maxNodeDisplacement&&(this.displacementY=u.coolingFactor*u.maxNodeDisplacement*t.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},a.prototype.propogateDisplacementToChildren=function(u,c){for(var m=this.getChild().getNodes(),h,C=0;C<m.length;C++)h=m[C],h.getChild()==null?(h.displacementX+=u,h.displacementY+=c):h.propogateDisplacementToChildren(u,c)},a.prototype.move=function(){var u=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),u.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},a.prototype.setPred1=function(u){this.pred1=u},a.prototype.getPred1=function(){return pred1},a.prototype.getPred2=function(){return pred2},a.prototype.setNext=function(u){this.next=u},a.prototype.getNext=function(){return next},a.prototype.setProcessed=function(u){this.processed=u},a.prototype.isProcessed=function(){return processed},r.exports=a},902:(r,p,i)=>{function g(m){if(Array.isArray(m)){for(var h=0,C=Array(m.length);h<m.length;h++)C[h]=m[h];return C}else return Array.from(m)}var t=i(806),a=i(551).LinkedList,l=i(551).Matrix,u=i(551).SVD;function c(){}c.handleConstraints=function(m){var h={};h.fixedNodeConstraint=m.constraints.fixedNodeConstraint,h.alignmentConstraint=m.constraints.alignmentConstraint,h.relativePlacementConstraint=m.constraints.relativePlacementConstraint;for(var C=new Map,T=new Map,N=[],D=[],_=m.getAllNodes(),I=0,ot=0;ot<_.length;ot++){var mt=_[ot];mt.getChild()==null&&(T.set(mt.id,I++),N.push(mt.getCenterX()),D.push(mt.getCenterY()),C.set(mt.id,mt))}h.relativePlacementConstraint&&h.relativePlacementConstraint.forEach(function(A){!A.gap&&A.gap!=0&&(A.left?A.gap=t.DEFAULT_EDGE_LENGTH+C.get(A.left).getWidth()/2+C.get(A.right).getWidth()/2:A.gap=t.DEFAULT_EDGE_LENGTH+C.get(A.top).getHeight()/2+C.get(A.bottom).getHeight()/2)});var vt=function(F,b){return{x:F.x-b.x,y:F.y-b.y}},Dt=function(F){var b=0,Y=0;return F.forEach(function(P){b+=N[T.get(P)],Y+=D[T.get(P)]}),{x:b/F.size,y:Y/F.size}},G=function(F,b,Y,P,W){function yt(Nt,Et){var wt=new Set(Nt),Lt=!0,Ct=!1,Ut=void 0;try{for(var xt=Et[Symbol.iterator](),Ft;!(Lt=(Ft=xt.next()).done);Lt=!0){var zt=Ft.value;wt.add(zt)}}catch(Ht){Ct=!0,Ut=Ht}finally{try{!Lt&&xt.return&&xt.return()}finally{if(Ct)throw Ut}}return wt}var st=new Map;F.forEach(function(Nt,Et){st.set(Et,0)}),F.forEach(function(Nt,Et){Nt.forEach(function(wt){st.set(wt.id,st.get(wt.id)+1)})});var z=new Map,J=new Map,pt=new a;st.forEach(function(Nt,Et){Nt==0?(pt.push(Et),Y||(b=="horizontal"?z.set(Et,T.has(Et)?N[T.get(Et)]:P.get(Et)):z.set(Et,T.has(Et)?D[T.get(Et)]:P.get(Et)))):z.set(Et,Number.NEGATIVE_INFINITY),Y&&J.set(Et,new Set([Et]))}),Y&&W.forEach(function(Nt){var Et=[];if(Nt.forEach(function(Ct){Y.has(Ct)&&Et.push(Ct)}),Et.length>0){var wt=0;Et.forEach(function(Ct){b=="horizontal"?(z.set(Ct,T.has(Ct)?N[T.get(Ct)]:P.get(Ct)),wt+=z.get(Ct)):(z.set(Ct,T.has(Ct)?D[T.get(Ct)]:P.get(Ct)),wt+=z.get(Ct))}),wt=wt/Et.length,Nt.forEach(function(Ct){Y.has(Ct)||z.set(Ct,wt)})}else{var Lt=0;Nt.forEach(function(Ct){b=="horizontal"?Lt+=T.has(Ct)?N[T.get(Ct)]:P.get(Ct):Lt+=T.has(Ct)?D[T.get(Ct)]:P.get(Ct)}),Lt=Lt/Nt.length,Nt.forEach(function(Ct){z.set(Ct,Lt)})}});for(var Ot=function(){var Et=pt.shift(),wt=F.get(Et);wt.forEach(function(Lt){if(z.get(Lt.id)<z.get(Et)+Lt.gap)if(Y&&Y.has(Lt.id)){var Ct=void 0;if(b=="horizontal"?Ct=T.has(Lt.id)?N[T.get(Lt.id)]:P.get(Lt.id):Ct=T.has(Lt.id)?D[T.get(Lt.id)]:P.get(Lt.id),z.set(Lt.id,Ct),Ct<z.get(Et)+Lt.gap){var Ut=z.get(Et)+Lt.gap-Ct;J.get(Et).forEach(function(xt){z.set(xt,z.get(xt)-Ut)})}}else z.set(Lt.id,z.get(Et)+Lt.gap);st.set(Lt.id,st.get(Lt.id)-1),st.get(Lt.id)==0&&pt.push(Lt.id),Y&&J.set(Lt.id,yt(J.get(Et),J.get(Lt.id)))})};pt.length!=0;)Ot();if(Y){var At=new Set;F.forEach(function(Nt,Et){Nt.length==0&&At.add(Et)});var St=[];J.forEach(function(Nt,Et){if(At.has(Et)){var wt=!1,Lt=!0,Ct=!1,Ut=void 0;try{for(var xt=Nt[Symbol.iterator](),Ft;!(Lt=(Ft=xt.next()).done);Lt=!0){var zt=Ft.value;Y.has(zt)&&(wt=!0)}}catch(Gt){Ct=!0,Ut=Gt}finally{try{!Lt&&xt.return&&xt.return()}finally{if(Ct)throw Ut}}if(!wt){var Ht=!1,Vt=void 0;St.forEach(function(Gt,$t){Gt.has([].concat(g(Nt))[0])&&(Ht=!0,Vt=$t)}),Ht?Nt.forEach(function(Gt){St[Vt].add(Gt)}):St.push(new Set(Nt))}}}),St.forEach(function(Nt,Et){var wt=Number.POSITIVE_INFINITY,Lt=Number.POSITIVE_INFINITY,Ct=Number.NEGATIVE_INFINITY,Ut=Number.NEGATIVE_INFINITY,xt=!0,Ft=!1,zt=void 0;try{for(var Ht=Nt[Symbol.iterator](),Vt;!(xt=(Vt=Ht.next()).done);xt=!0){var Gt=Vt.value,$t=void 0;b=="horizontal"?$t=T.has(Gt)?N[T.get(Gt)]:P.get(Gt):$t=T.has(Gt)?D[T.get(Gt)]:P.get(Gt);var Qt=z.get(Gt);$t<wt&&(wt=$t),$t>Ct&&(Ct=$t),Qt<Lt&&(Lt=Qt),Qt>Ut&&(Ut=Qt)}}catch(te){Ft=!0,zt=te}finally{try{!xt&&Ht.return&&Ht.return()}finally{if(Ft)throw zt}}var ae=(wt+Ct)/2-(Lt+Ut)/2,Kt=!0,qt=!1,jt=void 0;try{for(var Jt=Nt[Symbol.iterator](),re;!(Kt=(re=Jt.next()).done);Kt=!0){var _t=re.value;z.set(_t,z.get(_t)+ae)}}catch(te){qt=!0,jt=te}finally{try{!Kt&&Jt.return&&Jt.return()}finally{if(qt)throw jt}}})}return z},k=function(F){var b=0,Y=0,P=0,W=0;if(F.forEach(function(J){J.left?N[T.get(J.left)]-N[T.get(J.right)]>=0?b++:Y++:D[T.get(J.top)]-D[T.get(J.bottom)]>=0?P++:W++}),b>Y&&P>W)for(var yt=0;yt<T.size;yt++)N[yt]=-1*N[yt],D[yt]=-1*D[yt];else if(b>Y)for(var st=0;st<T.size;st++)N[st]=-1*N[st];else if(P>W)for(var z=0;z<T.size;z++)D[z]=-1*D[z]},n=function(F){var b=[],Y=new a,P=new Set,W=0;return F.forEach(function(yt,st){if(!P.has(st)){b[W]=[];var z=st;for(Y.push(z),P.add(z),b[W].push(z);Y.length!=0;){z=Y.shift();var J=F.get(z);J.forEach(function(pt){P.has(pt.id)||(Y.push(pt.id),P.add(pt.id),b[W].push(pt.id))})}W++}}),b},E=function(F){var b=new Map;return F.forEach(function(Y,P){b.set(P,[])}),F.forEach(function(Y,P){Y.forEach(function(W){b.get(P).push(W),b.get(W.id).push({id:P,gap:W.gap,direction:W.direction})})}),b},f=function(F){var b=new Map;return F.forEach(function(Y,P){b.set(P,[])}),F.forEach(function(Y,P){Y.forEach(function(W){b.get(W.id).push({id:P,gap:W.gap,direction:W.direction})})}),b},y=[],v=[],R=!1,w=!1,X=new Set,H=new Map,U=new Map,tt=[];if(h.fixedNodeConstraint&&h.fixedNodeConstraint.forEach(function(A){X.add(A.nodeId)}),h.relativePlacementConstraint&&(h.relativePlacementConstraint.forEach(function(A){A.left?(H.has(A.left)?H.get(A.left).push({id:A.right,gap:A.gap,direction:"horizontal"}):H.set(A.left,[{id:A.right,gap:A.gap,direction:"horizontal"}]),H.has(A.right)||H.set(A.right,[])):(H.has(A.top)?H.get(A.top).push({id:A.bottom,gap:A.gap,direction:"vertical"}):H.set(A.top,[{id:A.bottom,gap:A.gap,direction:"vertical"}]),H.has(A.bottom)||H.set(A.bottom,[]))}),U=E(H),tt=n(U)),t.TRANSFORM_ON_CONSTRAINT_HANDLING){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>1)h.fixedNodeConstraint.forEach(function(A,F){y[F]=[A.position.x,A.position.y],v[F]=[N[T.get(A.nodeId)],D[T.get(A.nodeId)]]}),R=!0;else if(h.alignmentConstraint)(function(){var A=0;if(h.alignmentConstraint.vertical){for(var F=h.alignmentConstraint.vertical,b=function(z){var J=new Set;F[z].forEach(function(At){J.add(At)});var pt=new Set([].concat(g(J)).filter(function(At){return X.has(At)})),Ot=void 0;pt.size>0?Ot=N[T.get(pt.values().next().value)]:Ot=Dt(J).x,F[z].forEach(function(At){y[A]=[Ot,D[T.get(At)]],v[A]=[N[T.get(At)],D[T.get(At)]],A++})},Y=0;Y<F.length;Y++)b(Y);R=!0}if(h.alignmentConstraint.horizontal){for(var P=h.alignmentConstraint.horizontal,W=function(z){var J=new Set;P[z].forEach(function(At){J.add(At)});var pt=new Set([].concat(g(J)).filter(function(At){return X.has(At)})),Ot=void 0;pt.size>0?Ot=N[T.get(pt.values().next().value)]:Ot=Dt(J).y,P[z].forEach(function(At){y[A]=[N[T.get(At)],Ot],v[A]=[N[T.get(At)],D[T.get(At)]],A++})},yt=0;yt<P.length;yt++)W(yt);R=!0}h.relativePlacementConstraint&&(w=!0)})();else if(h.relativePlacementConstraint){for(var ft=0,B=0,lt=0;lt<tt.length;lt++)tt[lt].length>ft&&(ft=tt[lt].length,B=lt);if(ft<U.size/2)k(h.relativePlacementConstraint),R=!1,w=!1;else{var j=new Map,O=new Map,$=[];tt[B].forEach(function(A){H.get(A).forEach(function(F){F.direction=="horizontal"?(j.has(A)?j.get(A).push(F):j.set(A,[F]),j.has(F.id)||j.set(F.id,[]),$.push({left:A,right:F.id})):(O.has(A)?O.get(A).push(F):O.set(A,[F]),O.has(F.id)||O.set(F.id,[]),$.push({top:A,bottom:F.id}))})}),k($),w=!1;var K=G(j,"horizontal"),ht=G(O,"vertical");tt[B].forEach(function(A,F){v[F]=[N[T.get(A)],D[T.get(A)]],y[F]=[],K.has(A)?y[F][0]=K.get(A):y[F][0]=N[T.get(A)],ht.has(A)?y[F][1]=ht.get(A):y[F][1]=D[T.get(A)]}),R=!0}}if(R){for(var Mt=void 0,rt=l.transpose(y),bt=l.transpose(v),Rt=0;Rt<rt.length;Rt++)rt[Rt]=l.multGamma(rt[Rt]),bt[Rt]=l.multGamma(bt[Rt]);var Xt=l.multMat(rt,l.transpose(bt)),x=u.svd(Xt);Mt=l.multMat(x.V,l.transpose(x.U));for(var L=0;L<T.size;L++){var M=[N[L],D[L]],V=[Mt[0][0],Mt[1][0]],Z=[Mt[0][1],Mt[1][1]];N[L]=l.dotProduct(M,V),D[L]=l.dotProduct(M,Z)}w&&k(h.relativePlacementConstraint)}}if(t.ENFORCE_CONSTRAINTS){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>0){var Q={x:0,y:0};h.fixedNodeConstraint.forEach(function(A,F){var b={x:N[T.get(A.nodeId)],y:D[T.get(A.nodeId)]},Y=A.position,P=vt(Y,b);Q.x+=P.x,Q.y+=P.y}),Q.x/=h.fixedNodeConstraint.length,Q.y/=h.fixedNodeConstraint.length,N.forEach(function(A,F){N[F]+=Q.x}),D.forEach(function(A,F){D[F]+=Q.y}),h.fixedNodeConstraint.forEach(function(A){N[T.get(A.nodeId)]=A.position.x,D[T.get(A.nodeId)]=A.position.y})}if(h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var ct=h.alignmentConstraint.vertical,q=function(F){var b=new Set;ct[F].forEach(function(W){b.add(W)});var Y=new Set([].concat(g(b)).filter(function(W){return X.has(W)})),P=void 0;Y.size>0?P=N[T.get(Y.values().next().value)]:P=Dt(b).x,b.forEach(function(W){X.has(W)||(N[T.get(W)]=P)})},at=0;at<ct.length;at++)q(at);if(h.alignmentConstraint.horizontal)for(var et=h.alignmentConstraint.horizontal,nt=function(F){var b=new Set;et[F].forEach(function(W){b.add(W)});var Y=new Set([].concat(g(b)).filter(function(W){return X.has(W)})),P=void 0;Y.size>0?P=D[T.get(Y.values().next().value)]:P=Dt(b).y,b.forEach(function(W){X.has(W)||(D[T.get(W)]=P)})},dt=0;dt<et.length;dt++)nt(dt)}h.relativePlacementConstraint&&function(){var A=new Map,F=new Map,b=new Map,Y=new Map,P=new Map,W=new Map,yt=new Set,st=new Set;if(X.forEach(function(Wt){yt.add(Wt),st.add(Wt)}),h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var z=h.alignmentConstraint.vertical,J=function(It){b.set("dummy"+It,[]),z[It].forEach(function(Pt){A.set(Pt,"dummy"+It),b.get("dummy"+It).push(Pt),X.has(Pt)&&yt.add("dummy"+It)}),P.set("dummy"+It,N[T.get(z[It][0])])},pt=0;pt<z.length;pt++)J(pt);if(h.alignmentConstraint.horizontal)for(var Ot=h.alignmentConstraint.horizontal,At=function(It){Y.set("dummy"+It,[]),Ot[It].forEach(function(Pt){F.set(Pt,"dummy"+It),Y.get("dummy"+It).push(Pt),X.has(Pt)&&st.add("dummy"+It)}),W.set("dummy"+It,D[T.get(Ot[It][0])])},St=0;St<Ot.length;St++)At(St)}var Nt=new Map,Et=new Map,wt=function(It){H.get(It).forEach(function(Pt){var Zt=void 0,Bt=void 0;Pt.direction=="horizontal"?(Zt=A.get(It)?A.get(It):It,A.get(Pt.id)?Bt={id:A.get(Pt.id),gap:Pt.gap,direction:Pt.direction}:Bt=Pt,Nt.has(Zt)?Nt.get(Zt).push(Bt):Nt.set(Zt,[Bt]),Nt.has(Bt.id)||Nt.set(Bt.id,[])):(Zt=F.get(It)?F.get(It):It,F.get(Pt.id)?Bt={id:F.get(Pt.id),gap:Pt.gap,direction:Pt.direction}:Bt=Pt,Et.has(Zt)?Et.get(Zt).push(Bt):Et.set(Zt,[Bt]),Et.has(Bt.id)||Et.set(Bt.id,[]))})},Lt=!0,Ct=!1,Ut=void 0;try{for(var xt=H.keys()[Symbol.iterator](),Ft;!(Lt=(Ft=xt.next()).done);Lt=!0){var zt=Ft.value;wt(zt)}}catch(Wt){Ct=!0,Ut=Wt}finally{try{!Lt&&xt.return&&xt.return()}finally{if(Ct)throw Ut}}var Ht=E(Nt),Vt=E(Et),Gt=n(Ht),$t=n(Vt),Qt=f(Nt),ae=f(Et),Kt=[],qt=[];Gt.forEach(function(Wt,It){Kt[It]=[],Wt.forEach(function(Pt){Qt.get(Pt).length==0&&Kt[It].push(Pt)})}),$t.forEach(function(Wt,It){qt[It]=[],Wt.forEach(function(Pt){ae.get(Pt).length==0&&qt[It].push(Pt)})});var jt=G(Nt,"horizontal",yt,P,Kt),Jt=G(Et,"vertical",st,W,qt),re=function(It){b.get(It)?b.get(It).forEach(function(Pt){N[T.get(Pt)]=jt.get(It)}):N[T.get(It)]=jt.get(It)},_t=!0,te=!1,le=void 0;try{for(var ne=jt.keys()[Symbol.iterator](),fe;!(_t=(fe=ne.next()).done);_t=!0){var oe=fe.value;re(oe)}}catch(Wt){te=!0,le=Wt}finally{try{!_t&&ne.return&&ne.return()}finally{if(te)throw le}}var pe=function(It){Y.get(It)?Y.get(It).forEach(function(Pt){D[T.get(Pt)]=Jt.get(It)}):D[T.get(It)]=Jt.get(It)},se=!0,ce=!1,ue=void 0;try{for(var he=Jt.keys()[Symbol.iterator](),ge;!(se=(ge=he.next()).done);se=!0){var oe=ge.value;pe(oe)}}catch(Wt){ce=!0,ue=Wt}finally{try{!se&&he.return&&he.return()}finally{if(ce)throw ue}}}()}for(var Tt=0;Tt<_.length;Tt++){var gt=_[Tt];gt.getChild()==null&>.setCenter(N[T.get(gt.id)],D[T.get(gt.id)])}},r.exports=c},551:r=>{r.exports=S}},s={};function o(r){var p=s[r];if(p!==void 0)return p.exports;var i=s[r]={exports:{}};return d[r](i,i.exports,o),i.exports}var e=o(45);return e})()})},13035:function(Yt){(function(ut,S){Yt.exports=S()})(this,function(){return function(it){var ut={};function S(d){if(ut[d])return ut[d].exports;var s=ut[d]={i:d,l:!1,exports:{}};return it[d].call(s.exports,s,s.exports,S),s.l=!0,s.exports}return S.m=it,S.c=ut,S.i=function(d){return d},S.d=function(d,s,o){S.o(d,s)||Object.defineProperty(d,s,{configurable:!1,enumerable:!0,get:o})},S.n=function(d){var s=d&&d.__esModule?function(){return d.default}:function(){return d};return S.d(s,"a",s),s},S.o=function(d,s){return Object.prototype.hasOwnProperty.call(d,s)},S.p="",S(S.s=28)}([function(it,ut,S){"use strict";function d(){}d.QUALITY=1,d.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,d.DEFAULT_INCREMENTAL=!1,d.DEFAULT_ANIMATION_ON_LAYOUT=!0,d.DEFAULT_ANIMATION_DURING_LAYOUT=!1,d.DEFAULT_ANIMATION_PERIOD=50,d.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,d.DEFAULT_GRAPH_MARGIN=15,d.NODE_DIMENSIONS_INCLUDE_LABELS=!1,d.SIMPLE_NODE_SIZE=40,d.SIMPLE_NODE_HALF_SIZE=d.SIMPLE_NODE_SIZE/2,d.EMPTY_COMPOUND_NODE_SIZE=40,d.MIN_EDGE_LENGTH=1,d.WORLD_BOUNDARY=1e6,d.INITIAL_WORLD_BOUNDARY=d.WORLD_BOUNDARY/1e3,d.WORLD_CENTER_X=1200,d.WORLD_CENTER_Y=900,it.exports=d},function(it,ut,S){"use strict";var d=S(2),s=S(8),o=S(9);function e(p,i,g){d.call(this,g),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=g,this.bendpoints=[],this.source=p,this.target=i}e.prototype=Object.create(d.prototype);for(var r in d)e[r]=d[r];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(p){if(this.source===p)return this.target;if(this.target===p)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(p,i){for(var g=this.getOtherEnd(p),t=i.getGraphManager().getRoot();;){if(g.getOwner()==i)return g;if(g.getOwner()==t)break;g=g.getOwner().getParent()}return null},e.prototype.updateLength=function(){var p=new Array(4);this.isOverlapingSourceAndTarget=s.getIntersection(this.target.getRect(),this.source.getRect(),p),this.isOverlapingSourceAndTarget||(this.lengthX=p[0]-p[2],this.lengthY=p[1]-p[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},it.exports=e},function(it,ut,S){"use strict";function d(s){this.vGraphObject=s}it.exports=d},function(it,ut,S){"use strict";var d=S(2),s=S(10),o=S(13),e=S(0),r=S(16),p=S(5);function i(t,a,l,u){l==null&&u==null&&(u=a),d.call(this,u),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=s.MIN_VALUE,this.inclusionTreeDepth=s.MAX_VALUE,this.vGraphObject=u,this.edges=[],this.graphManager=t,l!=null&&a!=null?this.rect=new o(a.x,a.y,l.width,l.height):this.rect=new o}i.prototype=Object.create(d.prototype);for(var g in d)i[g]=d[g];i.prototype.getEdges=function(){return this.edges},i.prototype.getChild=function(){return this.child},i.prototype.getOwner=function(){return this.owner},i.prototype.getWidth=function(){return this.rect.width},i.prototype.setWidth=function(t){this.rect.width=t},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(t){this.rect.height=t},i.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},i.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},i.prototype.getCenter=function(){return new p(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new p(this.rect.x,this.rect.y)},i.prototype.getRect=function(){return this.rect},i.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},i.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},i.prototype.setRect=function(t,a){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=a.width,this.rect.height=a.height},i.prototype.setCenter=function(t,a){this.rect.x=t-this.rect.width/2,this.rect.y=a-this.rect.height/2},i.prototype.setLocation=function(t,a){this.rect.x=t,this.rect.y=a},i.prototype.moveBy=function(t,a){this.rect.x+=t,this.rect.y+=a},i.prototype.getEdgeListToNode=function(t){var a=[],l,u=this;return u.edges.forEach(function(c){if(c.target==t){if(c.source!=u)throw"Incorrect edge source!";a.push(c)}}),a},i.prototype.getEdgesBetween=function(t){var a=[],l,u=this;return u.edges.forEach(function(c){if(!(c.source==u||c.target==u))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&a.push(c)}),a},i.prototype.getNeighborsList=function(){var t=new Set,a=this;return a.edges.forEach(function(l){if(l.source==a)t.add(l.target);else{if(l.target!=a)throw"Incorrect incidency!";t.add(l.source)}}),t},i.prototype.withChildren=function(){var t=new Set,a,l;if(t.add(this),this.child!=null)for(var u=this.child.getNodes(),c=0;c<u.length;c++)a=u[c],l=a.withChildren(),l.forEach(function(m){t.add(m)});return t},i.prototype.getNoOfChildren=function(){var t=0,a;if(this.child==null)t=1;else for(var l=this.child.getNodes(),u=0;u<l.length;u++)a=l[u],t+=a.getNoOfChildren();return t==0&&(t=1),t},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==s.MIN_VALUE)throw"assert failed";return this.estimatedSize},i.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)},i.prototype.scatter=function(){var t,a,l=-e.INITIAL_WORLD_BOUNDARY,u=e.INITIAL_WORLD_BOUNDARY;t=e.WORLD_CENTER_X+r.nextDouble()*(u-l)+l;var c=-e.INITIAL_WORLD_BOUNDARY,m=e.INITIAL_WORLD_BOUNDARY;a=e.WORLD_CENTER_Y+r.nextDouble()*(m-c)+c,this.rect.x=t,this.rect.y=a},i.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var a=t.getRight()-t.getLeft(),l=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(a+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>a?(this.rect.x-=(this.labelWidth-a)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(a+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(l+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>l?(this.rect.y-=(this.labelHeight-l)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(l+this.labelHeight))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==s.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(t){var a=this.rect.x;a>e.WORLD_BOUNDARY?a=e.WORLD_BOUNDARY:a<-e.WORLD_BOUNDARY&&(a=-e.WORLD_BOUNDARY);var l=this.rect.y;l>e.WORLD_BOUNDARY?l=e.WORLD_BOUNDARY:l<-e.WORLD_BOUNDARY&&(l=-e.WORLD_BOUNDARY);var u=new p(a,l),c=t.inverseTransformPoint(u);this.setLocation(c.x,c.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},it.exports=i},function(it,ut,S){"use strict";var d=S(0);function s(){}for(var o in d)s[o]=d[o];s.MAX_ITERATIONS=2500,s.DEFAULT_EDGE_LENGTH=50,s.DEFAULT_SPRING_STRENGTH=.45,s.DEFAULT_REPULSION_STRENGTH=4500,s.DEFAULT_GRAVITY_STRENGTH=.4,s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,s.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,s.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,s.COOLING_ADAPTATION_FACTOR=.33,s.ADAPTATION_LOWER_NODE_LIMIT=1e3,s.ADAPTATION_UPPER_NODE_LIMIT=5e3,s.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,s.MAX_NODE_DISPLACEMENT=s.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,s.MIN_REPULSION_DIST=s.DEFAULT_EDGE_LENGTH/10,s.CONVERGENCE_CHECK_PERIOD=100,s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,s.MIN_EDGE_LENGTH=1,s.GRID_CALCULATION_CHECK_PERIOD=10,it.exports=s},function(it,ut,S){"use strict";function d(s,o){s==null&&o==null?(this.x=0,this.y=0):(this.x=s,this.y=o)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.setX=function(s){this.x=s},d.prototype.setY=function(s){this.y=s},d.prototype.getDifference=function(s){return new DimensionD(this.x-s.x,this.y-s.y)},d.prototype.getCopy=function(){return new d(this.x,this.y)},d.prototype.translate=function(s){return this.x+=s.width,this.y+=s.height,this},it.exports=d},function(it,ut,S){"use strict";var d=S(2),s=S(10),o=S(0),e=S(7),r=S(3),p=S(1),i=S(13),g=S(12),t=S(11);function a(u,c,m){d.call(this,m),this.estimatedSize=s.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=u,c!=null&&c instanceof e?this.graphManager=c:c!=null&&c instanceof Layout&&(this.graphManager=c.graphManager)}a.prototype=Object.create(d.prototype);for(var l in d)a[l]=d[l];a.prototype.getNodes=function(){return this.nodes},a.prototype.getEdges=function(){return this.edges},a.prototype.getGraphManager=function(){return this.graphManager},a.prototype.getParent=function(){return this.parent},a.prototype.getLeft=function(){return this.left},a.prototype.getRight=function(){return this.right},a.prototype.getTop=function(){return this.top},a.prototype.getBottom=function(){return this.bottom},a.prototype.isConnected=function(){return this.isConnected},a.prototype.add=function(u,c,m){if(c==null&&m==null){var h=u;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(h)>-1)throw"Node already in graph!";return h.owner=this,this.getNodes().push(h),h}else{var C=u;if(!(this.getNodes().indexOf(c)>-1&&this.getNodes().indexOf(m)>-1))throw"Source or target not in graph!";if(!(c.owner==m.owner&&c.owner==this))throw"Both owners must be this graph!";return c.owner!=m.owner?null:(C.source=c,C.target=m,C.isInterGraph=!1,this.getEdges().push(C),c.edges.push(C),m!=c&&m.edges.push(C),C)}},a.prototype.remove=function(u){var c=u;if(u instanceof r){if(c==null)throw"Node is null!";if(!(c.owner!=null&&c.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var m=c.edges.slice(),h,C=m.length,T=0;T<C;T++)h=m[T],h.isInterGraph?this.graphManager.remove(h):h.source.owner.remove(h);var N=this.nodes.indexOf(c);if(N==-1)throw"Node not in owner node list!";this.nodes.splice(N,1)}else if(u instanceof p){var h=u;if(h==null)throw"Edge is null!";if(!(h.source!=null&&h.target!=null))throw"Source and/or target is null!";if(!(h.source.owner!=null&&h.target.owner!=null&&h.source.owner==this&&h.target.owner==this))throw"Source and/or target owner is invalid!";var D=h.source.edges.indexOf(h),_=h.target.edges.indexOf(h);if(!(D>-1&&_>-1))throw"Source and/or target doesn't know this edge!";h.source.edges.splice(D,1),h.target!=h.source&&h.target.edges.splice(_,1);var N=h.source.owner.getEdges().indexOf(h);if(N==-1)throw"Not in owner's edge list!";h.source.owner.getEdges().splice(N,1)}},a.prototype.updateLeftTop=function(){for(var u=s.MAX_VALUE,c=s.MAX_VALUE,m,h,C,T=this.getNodes(),N=T.length,D=0;D<N;D++){var _=T[D];m=_.getTop(),h=_.getLeft(),u>m&&(u=m),c>h&&(c=h)}return u==s.MAX_VALUE?null:(T[0].getParent().paddingLeft!=null?C=T[0].getParent().paddingLeft:C=this.margin,this.left=c-C,this.top=u-C,new g(this.left,this.top))},a.prototype.updateBounds=function(u){for(var c=s.MAX_VALUE,m=-s.MAX_VALUE,h=s.MAX_VALUE,C=-s.MAX_VALUE,T,N,D,_,I,ot=this.nodes,mt=ot.length,vt=0;vt<mt;vt++){var Dt=ot[vt];u&&Dt.child!=null&&Dt.updateBounds(),T=Dt.getLeft(),N=Dt.getRight(),D=Dt.getTop(),_=Dt.getBottom(),c>T&&(c=T),m<N&&(m=N),h>D&&(h=D),C<_&&(C=_)}var G=new i(c,h,m-c,C-h);c==s.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),ot[0].getParent().paddingLeft!=null?I=ot[0].getParent().paddingLeft:I=this.margin,this.left=G.x-I,this.right=G.x+G.width+I,this.top=G.y-I,this.bottom=G.y+G.height+I},a.calculateBounds=function(u){for(var c=s.MAX_VALUE,m=-s.MAX_VALUE,h=s.MAX_VALUE,C=-s.MAX_VALUE,T,N,D,_,I=u.length,ot=0;ot<I;ot++){var mt=u[ot];T=mt.getLeft(),N=mt.getRight(),D=mt.getTop(),_=mt.getBottom(),c>T&&(c=T),m<N&&(m=N),h>D&&(h=D),C<_&&(C=_)}var vt=new i(c,h,m-c,C-h);return vt},a.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},a.prototype.getEstimatedSize=function(){if(this.estimatedSize==s.MIN_VALUE)throw"assert failed";return this.estimatedSize},a.prototype.calcEstimatedSize=function(){for(var u=0,c=this.nodes,m=c.length,h=0;h<m;h++){var C=c[h];u+=C.calcEstimatedSize()}return u==0?this.estimatedSize=o.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=u/Math.sqrt(this.nodes.length),this.estimatedSize},a.prototype.updateConnected=function(){var u=this;if(this.nodes.length==0){this.isConnected=!0;return}var c=new t,m=new Set,h=this.nodes[0],C,T,N=h.withChildren();for(N.forEach(function(vt){c.push(vt),m.add(vt)});c.length!==0;){h=c.shift(),C=h.getEdges();for(var D=C.length,_=0;_<D;_++){var I=C[_];if(T=I.getOtherEndInGraph(h,this),T!=null&&!m.has(T)){var ot=T.withChildren();ot.forEach(function(vt){c.push(vt),m.add(vt)})}}}if(this.isConnected=!1,m.size>=this.nodes.length){var mt=0;m.forEach(function(vt){vt.owner==u&&mt++}),mt==this.nodes.length&&(this.isConnected=!0)}},it.exports=a},function(it,ut,S){"use strict";var d,s=S(1);function o(e){d=S(6),this.layout=e,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var e=this.layout.newGraph(),r=this.layout.newNode(null),p=this.add(e,r);return this.setRootGraph(p),this.rootGraph},o.prototype.add=function(e,r,p,i,g){if(p==null&&i==null&&g==null){if(e==null)throw"Graph is null!";if(r==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(r.child!=null)throw"Already has a child!";return e.parent=r,r.child=e,e}else{g=p,i=r,p=e;var t=i.getOwner(),a=g.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(a!=null&&a.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==a)return p.isInterGraph=!1,t.add(p,i,g);if(p.isInterGraph=!0,p.source=i,p.target=g,this.edges.indexOf(p)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(p),!(p.source!=null&&p.target!=null))throw"Edge source and/or target is null!";if(!(p.source.edges.indexOf(p)==-1&&p.target.edges.indexOf(p)==-1))throw"Edge already in source and/or target incidency list!";return p.source.edges.push(p),p.target.edges.push(p),p}},o.prototype.remove=function(e){if(e instanceof d){var r=e;if(r.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(r==this.rootGraph||r.parent!=null&&r.parent.graphManager==this))throw"Invalid parent node!";var p=[];p=p.concat(r.getEdges());for(var i,g=p.length,t=0;t<g;t++)i=p[t],r.remove(i);var a=[];a=a.concat(r.getNodes());var l;g=a.length;for(var t=0;t<g;t++)l=a[t],r.remove(l);r==this.rootGraph&&this.setRootGraph(null);var u=this.graphs.indexOf(r);this.graphs.splice(u,1),r.parent=null}else if(e instanceof s){if(i=e,i==null)throw"Edge is null!";if(!i.isInterGraph)throw"Not an inter-graph edge!";if(!(i.source!=null&&i.target!=null))throw"Source and/or target is null!";if(!(i.source.edges.indexOf(i)!=-1&&i.target.edges.indexOf(i)!=-1))throw"Source and/or target doesn't know this edge!";var u=i.source.edges.indexOf(i);if(i.source.edges.splice(u,1),u=i.target.edges.indexOf(i),i.target.edges.splice(u,1),!(i.source.owner!=null&&i.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(i.source.owner.getGraphManager().edges.indexOf(i)==-1)throw"Not in owner graph manager's edge list!";var u=i.source.owner.getGraphManager().edges.indexOf(i);i.source.owner.getGraphManager().edges.splice(u,1)}},o.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},o.prototype.getGraphs=function(){return this.graphs},o.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],r=this.getGraphs(),p=r.length,i=0;i<p;i++)e=e.concat(r[i].getNodes());this.allNodes=e}return this.allNodes},o.prototype.resetAllNodes=function(){this.allNodes=null},o.prototype.resetAllEdges=function(){this.allEdges=null},o.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},o.prototype.getAllEdges=function(){if(this.allEdges==null){for(var e=[],r=this.getGraphs(),p=r.length,i=0;i<r.length;i++)e=e.concat(r[i].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},o.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},o.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},o.prototype.getRoot=function(){return this.rootGraph},o.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=e,e.parent==null&&(e.parent=this.layout.newNode("Root node"))},o.prototype.getLayout=function(){return this.layout},o.prototype.isOneAncestorOfOther=function(e,r){if(!(e!=null&&r!=null))throw"assert failed";if(e==r)return!0;var p=e.getOwner(),i;do{if(i=p.getParent(),i==null)break;if(i==r)return!0;if(p=i.getOwner(),p==null)break}while(!0);p=r.getOwner();do{if(i=p.getParent(),i==null)break;if(i==e)return!0;if(p=i.getOwner(),p==null)break}while(!0);return!1},o.prototype.calcLowestCommonAncestors=function(){for(var e,r,p,i,g,t=this.getAllEdges(),a=t.length,l=0;l<a;l++){if(e=t[l],r=e.source,p=e.target,e.lca=null,e.sourceInLca=r,e.targetInLca=p,r==p){e.lca=r.getOwner();continue}for(i=r.getOwner();e.lca==null;){for(e.targetInLca=p,g=p.getOwner();e.lca==null;){if(g==i){e.lca=g;break}if(g==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=g.getParent(),g=e.targetInLca.getOwner()}if(i==this.rootGraph)break;e.lca==null&&(e.sourceInLca=i.getParent(),i=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}},o.prototype.calcLowestCommonAncestor=function(e,r){if(e==r)return e.getOwner();var p=e.getOwner();do{if(p==null)break;var i=r.getOwner();do{if(i==null)break;if(i==p)return i;i=i.getParent().getOwner()}while(!0);p=p.getParent().getOwner()}while(!0);return p},o.prototype.calcInclusionTreeDepths=function(e,r){e==null&&r==null&&(e=this.rootGraph,r=1);for(var p,i=e.getNodes(),g=i.length,t=0;t<g;t++)p=i[t],p.inclusionTreeDepth=r,p.child!=null&&this.calcInclusionTreeDepths(p.child,r+1)},o.prototype.includesInvalidEdge=function(){for(var e,r=[],p=this.edges.length,i=0;i<p;i++)e=this.edges[i],this.isOneAncestorOfOther(e.source,e.target)&&r.push(e);for(var i=0;i<r.length;i++)this.remove(r[i]);return!1},it.exports=o},function(it,ut,S){"use strict";var d=S(12);function s(){}s.calcSeparationAmount=function(o,e,r,p){if(!o.intersects(e))throw"assert failed";var i=new Array(2);this.decideDirectionsForOverlappingNodes(o,e,i),r[0]=Math.min(o.getRight(),e.getRight())-Math.max(o.x,e.x),r[1]=Math.min(o.getBottom(),e.getBottom())-Math.max(o.y,e.y),o.getX()<=e.getX()&&o.getRight()>=e.getRight()?r[0]+=Math.min(e.getX()-o.getX(),o.getRight()-e.getRight()):e.getX()<=o.getX()&&e.getRight()>=o.getRight()&&(r[0]+=Math.min(o.getX()-e.getX(),e.getRight()-o.getRight())),o.getY()<=e.getY()&&o.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-o.getY(),o.getBottom()-e.getBottom()):e.getY()<=o.getY()&&e.getBottom()>=o.getBottom()&&(r[1]+=Math.min(o.getY()-e.getY(),e.getBottom()-o.getBottom()));var g=Math.abs((e.getCenterY()-o.getCenterY())/(e.getCenterX()-o.getCenterX()));e.getCenterY()===o.getCenterY()&&e.getCenterX()===o.getCenterX()&&(g=1);var t=g*r[0],a=r[1]/g;r[0]<a?a=r[0]:t=r[1],r[0]=-1*i[0]*(a/2+p),r[1]=-1*i[1]*(t/2+p)},s.decideDirectionsForOverlappingNodes=function(o,e,r){o.getCenterX()<e.getCenterX()?r[0]=-1:r[0]=1,o.getCenterY()<e.getCenterY()?r[1]=-1:r[1]=1},s.getIntersection2=function(o,e,r){var p=o.getCenterX(),i=o.getCenterY(),g=e.getCenterX(),t=e.getCenterY();if(o.intersects(e))return r[0]=p,r[1]=i,r[2]=g,r[3]=t,!0;var a=o.getX(),l=o.getY(),u=o.getRight(),c=o.getX(),m=o.getBottom(),h=o.getRight(),C=o.getWidthHalf(),T=o.getHeightHalf(),N=e.getX(),D=e.getY(),_=e.getRight(),I=e.getX(),ot=e.getBottom(),mt=e.getRight(),vt=e.getWidthHalf(),Dt=e.getHeightHalf(),G=!1,k=!1;if(p===g){if(i>t)return r[0]=p,r[1]=l,r[2]=g,r[3]=ot,!1;if(i<t)return r[0]=p,r[1]=m,r[2]=g,r[3]=D,!1}else if(i===t){if(p>g)return r[0]=a,r[1]=i,r[2]=_,r[3]=t,!1;if(p<g)return r[0]=u,r[1]=i,r[2]=N,r[3]=t,!1}else{var n=o.height/o.width,E=e.height/e.width,f=(t-i)/(g-p),y=void 0,v=void 0,R=void 0,w=void 0,X=void 0,H=void 0;if(-n===f?p>g?(r[0]=c,r[1]=m,G=!0):(r[0]=u,r[1]=l,G=!0):n===f&&(p>g?(r[0]=a,r[1]=l,G=!0):(r[0]=h,r[1]=m,G=!0)),-E===f?g>p?(r[2]=I,r[3]=ot,k=!0):(r[2]=_,r[3]=D,k=!0):E===f&&(g>p?(r[2]=N,r[3]=D,k=!0):(r[2]=mt,r[3]=ot,k=!0)),G&&k)return!1;if(p>g?i>t?(y=this.getCardinalDirection(n,f,4),v=this.getCardinalDirection(E,f,2)):(y=this.getCardinalDirection(-n,f,3),v=this.getCardinalDirection(-E,f,1)):i>t?(y=this.getCardinalDirection(-n,f,1),v=this.getCardinalDirection(-E,f,3)):(y=this.getCardinalDirection(n,f,2),v=this.getCardinalDirection(E,f,4)),!G)switch(y){case 1:w=l,R=p+-T/f,r[0]=R,r[1]=w;break;case 2:R=h,w=i+C*f,r[0]=R,r[1]=w;break;case 3:w=m,R=p+T/f,r[0]=R,r[1]=w;break;case 4:R=c,w=i+-C*f,r[0]=R,r[1]=w;break}if(!k)switch(v){case 1:H=D,X=g+-Dt/f,r[2]=X,r[3]=H;break;case 2:X=mt,H=t+vt*f,r[2]=X,r[3]=H;break;case 3:H=ot,X=g+Dt/f,r[2]=X,r[3]=H;break;case 4:X=I,H=t+-vt*f,r[2]=X,r[3]=H;break}}return!1},s.getCardinalDirection=function(o,e,r){return o>e?r:1+r%4},s.getIntersection=function(o,e,r,p){if(p==null)return this.getIntersection2(o,e,r);var i=o.x,g=o.y,t=e.x,a=e.y,l=r.x,u=r.y,c=p.x,m=p.y,h=void 0,C=void 0,T=void 0,N=void 0,D=void 0,_=void 0,I=void 0,ot=void 0,mt=void 0;return T=a-g,D=i-t,I=t*g-i*a,N=m-u,_=l-c,ot=c*u-l*m,mt=T*_-N*D,mt===0?null:(h=(D*ot-_*I)/mt,C=(N*I-T*ot)/mt,new d(h,C))},s.angleOfVector=function(o,e,r,p){var i=void 0;return o!==r?(i=Math.atan((p-e)/(r-o)),r<o?i+=Math.PI:p<e&&(i+=this.TWO_PI)):p<e?i=this.ONE_AND_HALF_PI:i=this.HALF_PI,i},s.doIntersect=function(o,e,r,p){var i=o.x,g=o.y,t=e.x,a=e.y,l=r.x,u=r.y,c=p.x,m=p.y,h=(t-i)*(m-u)-(c-l)*(a-g);if(h===0)return!1;var C=((m-u)*(c-i)+(l-c)*(m-g))/h,T=((g-a)*(c-i)+(t-i)*(m-g))/h;return 0<C&&C<1&&0<T&&T<1},s.findCircleLineIntersections=function(o,e,r,p,i,g,t){var a=(r-o)*(r-o)+(p-e)*(p-e),l=2*((o-i)*(r-o)+(e-g)*(p-e)),u=(o-i)*(o-i)+(e-g)*(e-g)-t*t,c=l*l-4*a*u;if(c>=0){var m=(-l+Math.sqrt(l*l-4*a*u))/(2*a),h=(-l-Math.sqrt(l*l-4*a*u))/(2*a),C=null;return m>=0&&m<=1?[m]:h>=0&&h<=1?[h]:C}else return null},s.HALF_PI=.5*Math.PI,s.ONE_AND_HALF_PI=1.5*Math.PI,s.TWO_PI=2*Math.PI,s.THREE_PI=3*Math.PI,it.exports=s},function(it,ut,S){"use strict";function d(){}d.sign=function(s){return s>0?1:s<0?-1:0},d.floor=function(s){return s<0?Math.ceil(s):Math.floor(s)},d.ceil=function(s){return s<0?Math.floor(s):Math.ceil(s)},it.exports=d},function(it,ut,S){"use strict";function d(){}d.MAX_VALUE=2147483647,d.MIN_VALUE=-2147483648,it.exports=d},function(it,ut,S){"use strict";var d=function(){function i(g,t){for(var a=0;a<t.length;a++){var l=t[a];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(g,l.key,l)}}return function(g,t,a){return t&&i(g.prototype,t),a&&i(g,a),g}}();function s(i,g){if(!(i instanceof g))throw new TypeError("Cannot call a class as a function")}var o=function(g){return{value:g,next:null,prev:null}},e=function(g,t,a,l){return g!==null?g.next=t:l.head=t,a!==null?a.prev=t:l.tail=t,t.prev=g,t.next=a,l.length++,t},r=function(g,t){var a=g.prev,l=g.next;return a!==null?a.next=l:t.head=l,l!==null?l.prev=a:t.tail=a,g.prev=g.next=null,t.length--,g},p=function(){function i(g){var t=this;s(this,i),this.length=0,this.head=null,this.tail=null,g!=null&&g.forEach(function(a){return t.push(a)})}return d(i,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,a){return e(a.prev,o(t),a,this)}},{key:"insertAfter",value:function(t,a){return e(a,o(t),a.next,this)}},{key:"insertNodeBefore",value:function(t,a){return e(a.prev,t,a,this)}},{key:"insertNodeAfter",value:function(t,a){return e(a,t,a.next,this)}},{key:"push",value:function(t){return e(this.tail,o(t),null,this)}},{key:"unshift",value:function(t){return e(null,o(t),this.head,this)}},{key:"remove",value:function(t){return r(t,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(t){if(t<=this.length()){for(var a=1,l=this.head;a<t;)l=l.next,a++;return l.value}}},{key:"set_object_at",value:function(t,a){if(t<=this.length()){for(var l=1,u=this.head;l<t;)u=u.next,l++;u.value=a}}}]),i}();it.exports=p},function(it,ut,S){"use strict";function d(s,o,e){this.x=null,this.y=null,s==null&&o==null&&e==null?(this.x=0,this.y=0):typeof s=="number"&&typeof o=="number"&&e==null?(this.x=s,this.y=o):s.constructor.name=="Point"&&o==null&&e==null&&(e=s,this.x=e.x,this.y=e.y)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.getLocation=function(){return new d(this.x,this.y)},d.prototype.setLocation=function(s,o,e){s.constructor.name=="Point"&&o==null&&e==null?(e=s,this.setLocation(e.x,e.y)):typeof s=="number"&&typeof o=="number"&&e==null&&(parseInt(s)==s&&parseInt(o)==o?this.move(s,o):(this.x=Math.floor(s+.5),this.y=Math.floor(o+.5)))},d.prototype.move=function(s,o){this.x=s,this.y=o},d.prototype.translate=function(s,o){this.x+=s,this.y+=o},d.prototype.equals=function(s){if(s.constructor.name=="Point"){var o=s;return this.x==o.x&&this.y==o.y}return this==s},d.prototype.toString=function(){return new d().constructor.name+"[x="+this.x+",y="+this.y+"]"},it.exports=d},function(it,ut,S){"use strict";function d(s,o,e,r){this.x=0,this.y=0,this.width=0,this.height=0,s!=null&&o!=null&&e!=null&&r!=null&&(this.x=s,this.y=o,this.width=e,this.height=r)}d.prototype.getX=function(){return this.x},d.prototype.setX=function(s){this.x=s},d.prototype.getY=function(){return this.y},d.prototype.setY=function(s){this.y=s},d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(s){this.width=s},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(s){this.height=s},d.prototype.getRight=function(){return this.x+this.width},d.prototype.getBottom=function(){return this.y+this.height},d.prototype.intersects=function(s){return!(this.getRight()<s.x||this.getBottom()<s.y||s.getRight()<this.x||s.getBottom()<this.y)},d.prototype.getCenterX=function(){return this.x+this.width/2},d.prototype.getMinX=function(){return this.getX()},d.prototype.getMaxX=function(){return this.getX()+this.width},d.prototype.getCenterY=function(){return this.y+this.height/2},d.prototype.getMinY=function(){return this.getY()},d.prototype.getMaxY=function(){return this.getY()+this.height},d.prototype.getWidthHalf=function(){return this.width/2},d.prototype.getHeightHalf=function(){return this.height/2},it.exports=d},function(it,ut,S){"use strict";var d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};function s(){}s.lastID=0,s.createID=function(o){return s.isPrimitive(o)?o:(o.uniqueID!=null||(o.uniqueID=s.getString(),s.lastID++),o.uniqueID)},s.getString=function(o){return o==null&&(o=s.lastID),"Object#"+o},s.isPrimitive=function(o){var e=typeof o=="undefined"?"undefined":d(o);return o==null||e!="object"&&e!="function"},it.exports=s},function(it,ut,S){"use strict";function d(l){if(Array.isArray(l)){for(var u=0,c=Array(l.length);u<l.length;u++)c[u]=l[u];return c}else return Array.from(l)}var s=S(0),o=S(7),e=S(3),r=S(1),p=S(6),i=S(5),g=S(17),t=S(29);function a(l){t.call(this),this.layoutQuality=s.QUALITY,this.createBendsAsNeeded=s.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=s.DEFAULT_INCREMENTAL,this.animationOnLayout=s.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=s.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=s.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=s.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new o(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,l!=null&&(this.isRemoteUse=l)}a.RANDOM_SEED=1,a.prototype=Object.create(t.prototype),a.prototype.getGraphManager=function(){return this.graphManager},a.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},a.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},a.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},a.prototype.newGraphManager=function(){var l=new o(this);return this.graphManager=l,l},a.prototype.newGraph=function(l){return new p(null,this.graphManager,l)},a.prototype.newNode=function(l){return new e(this.graphManager,l)},a.prototype.newEdge=function(l){return new r(null,null,l)},a.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},a.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var l;return this.checkLayoutSuccess()?l=!1:l=this.layout(),s.ANIMATE==="during"?!1:(l&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,l)},a.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},a.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var l,u=this.graphManager.getAllEdges(),c=0;c<u.length;c++)l=u[c];for(var m,h=this.graphManager.getRoot().getNodes(),c=0;c<h.length;c++)m=h[c];this.update(this.graphManager.getRoot())}},a.prototype.update=function(l){if(l==null)this.update2();else if(l instanceof e){var u=l;if(u.getChild()!=null)for(var c=u.getChild().getNodes(),m=0;m<c.length;m++)update(c[m]);if(u.vGraphObject!=null){var h=u.vGraphObject;h.update(u)}}else if(l instanceof r){var C=l;if(C.vGraphObject!=null){var T=C.vGraphObject;T.update(C)}}else if(l instanceof p){var N=l;if(N.vGraphObject!=null){var D=N.vGraphObject;D.update(N)}}},a.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=s.QUALITY,this.animationDuringLayout=s.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=s.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=s.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=s.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=s.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=s.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},a.prototype.transform=function(l){if(l==null)this.transform(new i(0,0));else{var u=new g,c=this.graphManager.getRoot().updateLeftTop();if(c!=null){u.setWorldOrgX(l.x),u.setWorldOrgY(l.y),u.setDeviceOrgX(c.x),u.setDeviceOrgY(c.y);for(var m=this.getAllNodes(),h,C=0;C<m.length;C++)h=m[C],h.transform(u)}}},a.prototype.positionNodesRandomly=function(l){if(l==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var u,c,m=l.getNodes(),h=0;h<m.length;h++)u=m[h],c=u.getChild(),c==null||c.getNodes().length==0?u.scatter():(this.positionNodesRandomly(c),u.updateBounds())},a.prototype.getFlatForest=function(){for(var l=[],u=!0,c=this.graphManager.getRoot().getNodes(),m=!0,h=0;h<c.length;h++)c[h].getChild()!=null&&(m=!1);if(!m)return l;var C=new Set,T=[],N=new Map,D=[];for(D=D.concat(c);D.length>0&&u;){for(T.push(D[0]);T.length>0&&u;){var _=T[0];T.splice(0,1),C.add(_);for(var I=_.getEdges(),h=0;h<I.length;h++){var ot=I[h].getOtherEnd(_);if(N.get(_)!=ot)if(!C.has(ot))T.push(ot),N.set(ot,_);else{u=!1;break}}}if(!u)l=[];else{var mt=[].concat(d(C));l.push(mt);for(var h=0;h<mt.length;h++){var vt=mt[h],Dt=D.indexOf(vt);Dt>-1&&D.splice(Dt,1)}C=new Set,N=new Map}}return l},a.prototype.createDummyNodesForBendpoints=function(l){for(var u=[],c=l.source,m=this.graphManager.calcLowestCommonAncestor(l.source,l.target),h=0;h<l.bendpoints.length;h++){var C=this.newNode(null);C.setRect(new Point(0,0),new Dimension(1,1)),m.add(C);var T=this.newEdge(null);this.graphManager.add(T,c,C),u.add(C),c=C}var T=this.newEdge(null);return this.graphManager.add(T,c,l.target),this.edgeToDummyNodes.set(l,u),l.isInterGraph()?this.graphManager.remove(l):m.remove(l),u},a.prototype.createBendpointsFromDummyNodes=function(){var l=[];l=l.concat(this.graphManager.getAllEdges()),l=[].concat(d(this.edgeToDummyNodes.keys())).concat(l);for(var u=0;u<l.length;u++){var c=l[u];if(c.bendpoints.length>0){for(var m=this.edgeToDummyNodes.get(c),h=0;h<m.length;h++){var C=m[h],T=new i(C.getCenterX(),C.getCenterY()),N=c.bendpoints.get(h);N.x=T.x,N.y=T.y,C.getOwner().remove(C)}this.graphManager.add(c,c.source,c.target)}}},a.transform=function(l,u,c,m){if(c!=null&&m!=null){var h=u;if(l<=50){var C=u/c;h-=(u-C)/50*(50-l)}else{var T=u*m;h+=(T-u)/50*(l-50)}return h}else{var N,D;return l<=50?(N=9*u/500,D=u/10):(N=9*u/50,D=-8*u),N*l+D}},a.findCenterOfTree=function(l){var u=[];u=u.concat(l);var c=[],m=new Map,h=!1,C=null;(u.length==1||u.length==2)&&(h=!0,C=u[0]);for(var T=0;T<u.length;T++){var N=u[T],D=N.getNeighborsList().size;m.set(N,N.getNeighborsList().size),D==1&&c.push(N)}var _=[];for(_=_.concat(c);!h;){var I=[];I=I.concat(_),_=[];for(var T=0;T<u.length;T++){var N=u[T],ot=u.indexOf(N);ot>=0&&u.splice(ot,1);var mt=N.getNeighborsList();mt.forEach(function(G){if(c.indexOf(G)<0){var k=m.get(G),n=k-1;n==1&&_.push(G),m.set(G,n)}})}c=c.concat(_),(u.length==1||u.length==2)&&(h=!0,C=u[0])}return C},a.prototype.setGraphManager=function(l){this.graphManager=l},it.exports=a},function(it,ut,S){"use strict";function d(){}d.seed=1,d.x=0,d.nextDouble=function(){return d.x=Math.sin(d.seed++)*1e4,d.x-Math.floor(d.x)},it.exports=d},function(it,ut,S){"use strict";var d=S(5);function s(o,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}s.prototype.getWorldOrgX=function(){return this.lworldOrgX},s.prototype.setWorldOrgX=function(o){this.lworldOrgX=o},s.prototype.getWorldOrgY=function(){return this.lworldOrgY},s.prototype.setWorldOrgY=function(o){this.lworldOrgY=o},s.prototype.getWorldExtX=function(){return this.lworldExtX},s.prototype.setWorldExtX=function(o){this.lworldExtX=o},s.prototype.getWorldExtY=function(){return this.lworldExtY},s.prototype.setWorldExtY=function(o){this.lworldExtY=o},s.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},s.prototype.setDeviceOrgX=function(o){this.ldeviceOrgX=o},s.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},s.prototype.setDeviceOrgY=function(o){this.ldeviceOrgY=o},s.prototype.getDeviceExtX=function(){return this.ldeviceExtX},s.prototype.setDeviceExtX=function(o){this.ldeviceExtX=o},s.prototype.getDeviceExtY=function(){return this.ldeviceExtY},s.prototype.setDeviceExtY=function(o){this.ldeviceExtY=o},s.prototype.transformX=function(o){var e=0,r=this.lworldExtX;return r!=0&&(e=this.ldeviceOrgX+(o-this.lworldOrgX)*this.ldeviceExtX/r),e},s.prototype.transformY=function(o){var e=0,r=this.lworldExtY;return r!=0&&(e=this.ldeviceOrgY+(o-this.lworldOrgY)*this.ldeviceExtY/r),e},s.prototype.inverseTransformX=function(o){var e=0,r=this.ldeviceExtX;return r!=0&&(e=this.lworldOrgX+(o-this.ldeviceOrgX)*this.lworldExtX/r),e},s.prototype.inverseTransformY=function(o){var e=0,r=this.ldeviceExtY;return r!=0&&(e=this.lworldOrgY+(o-this.ldeviceOrgY)*this.lworldExtY/r),e},s.prototype.inverseTransformPoint=function(o){var e=new d(this.inverseTransformX(o.x),this.inverseTransformY(o.y));return e},it.exports=s},function(it,ut,S){"use strict";function d(t){if(Array.isArray(t)){for(var a=0,l=Array(t.length);a<t.length;a++)l[a]=t[a];return l}else return Array.from(t)}var s=S(15),o=S(4),e=S(0),r=S(8),p=S(9);function i(){s.call(this),this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=o.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=o.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=o.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=o.MAX_ITERATIONS}i.prototype=Object.create(s.prototype);for(var g in s)i[g]=s[g];i.prototype.initParameters=function(){s.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},i.prototype.calcIdealEdgeLengths=function(){for(var t,a,l,u,c,m,h,C=this.getGraphManager().getAllEdges(),T=0;T<C.length;T++)t=C[T],a=t.idealLength,t.isInterGraph&&(u=t.getSource(),c=t.getTarget(),m=t.getSourceInLca().getEstimatedSize(),h=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=m+h-2*e.SIMPLE_NODE_SIZE),l=t.getLca().getInclusionTreeDepth(),t.idealLength+=a*o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(u.getInclusionTreeDepth()+c.getInclusionTreeDepth()-2*l))},i.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>o.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*o.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-o.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>o.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(o.COOLING_ADAPTATION_FACTOR,1-(t-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*(1-o.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),a,l=0;l<t.length;l++)a=t[l],this.calcSpringForce(a,a.idealLength)},i.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,l,u,c,m,h=this.getAllNodes(),C;if(this.useFRGridVariant)for(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),C=new Set,l=0;l<h.length;l++)c=h[l],this.calculateRepulsionForceOfANode(c,C,t,a),C.add(c);else for(l=0;l<h.length;l++)for(c=h[l],u=l+1;u<h.length;u++)m=h[u],c.getOwner()==m.getOwner()&&this.calcRepulsionForce(c,m)},i.prototype.calcGravitationalForces=function(){for(var t,a=this.getAllNodesToApplyGravitation(),l=0;l<a.length;l++)t=a[l],this.calcGravitationalForce(t)},i.prototype.moveNodes=function(){for(var t=this.getAllNodes(),a,l=0;l<t.length;l++)a=t[l],a.move()},i.prototype.calcSpringForce=function(t,a){var l=t.getSource(),u=t.getTarget(),c,m,h,C;if(this.uniformLeafNodeSizes&&l.getChild()==null&&u.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;c=t.getLength(),c!=0&&(m=t.edgeElasticity*(c-a),h=m*(t.lengthX/c),C=m*(t.lengthY/c),l.springForceX+=h,l.springForceY+=C,u.springForceX-=h,u.springForceY-=C)},i.prototype.calcRepulsionForce=function(t,a){var l=t.getRect(),u=a.getRect(),c=new Array(2),m=new Array(4),h,C,T,N,D,_,I;if(l.intersects(u)){r.calcSeparationAmount(l,u,c,o.DEFAULT_EDGE_LENGTH/2),_=2*c[0],I=2*c[1];var ot=t.noOfChildren*a.noOfChildren/(t.noOfChildren+a.noOfChildren);t.repulsionForceX-=ot*_,t.repulsionForceY-=ot*I,a.repulsionForceX+=ot*_,a.repulsionForceY+=ot*I}else this.uniformLeafNodeSizes&&t.getChild()==null&&a.getChild()==null?(h=u.getCenterX()-l.getCenterX(),C=u.getCenterY()-l.getCenterY()):(r.getIntersection(l,u,m),h=m[2]-m[0],C=m[3]-m[1]),Math.abs(h)<o.MIN_REPULSION_DIST&&(h=p.sign(h)*o.MIN_REPULSION_DIST),Math.abs(C)<o.MIN_REPULSION_DIST&&(C=p.sign(C)*o.MIN_REPULSION_DIST),T=h*h+C*C,N=Math.sqrt(T),D=(t.nodeRepulsion/2+a.nodeRepulsion/2)*t.noOfChildren*a.noOfChildren/T,_=D*h/N,I=D*C/N,t.repulsionForceX-=_,t.repulsionForceY-=I,a.repulsionForceX+=_,a.repulsionForceY+=I},i.prototype.calcGravitationalForce=function(t){var a,l,u,c,m,h,C,T;a=t.getOwner(),l=(a.getRight()+a.getLeft())/2,u=(a.getTop()+a.getBottom())/2,c=t.getCenterX()-l,m=t.getCenterY()-u,h=Math.abs(c)+t.getWidth()/2,C=Math.abs(m)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(T=a.getEstimatedSize()*this.gravityRangeFactor,(h>T||C>T)&&(t.gravitationForceX=-this.gravityConstant*c,t.gravitationForceY=-this.gravityConstant*m)):(T=a.getEstimatedSize()*this.compoundGravityRangeFactor,(h>T||C>T)&&(t.gravitationForceX=-this.gravityConstant*c*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*m*this.compoundGravityConstant))},i.prototype.isConverged=function(){var t,a=!1;return this.totalIterations>this.maxIterations/3&&(a=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||a},i.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},i.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,a=this.graphManager.getAllNodes(),l=0;l<a.length;l++)t=a[l],t.noOfChildren=t.getNoOfChildren()},i.prototype.calcGrid=function(t){var a=0,l=0;a=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),l=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var u=new Array(a),c=0;c<a;c++)u[c]=new Array(l);for(var c=0;c<a;c++)for(var m=0;m<l;m++)u[c][m]=new Array;return u},i.prototype.addNodeToGrid=function(t,a,l){var u=0,c=0,m=0,h=0;u=parseInt(Math.floor((t.getRect().x-a)/this.repulsionRange)),c=parseInt(Math.floor((t.getRect().width+t.getRect().x-a)/this.repulsionRange)),m=parseInt(Math.floor((t.getRect().y-l)/this.repulsionRange)),h=parseInt(Math.floor((t.getRect().height+t.getRect().y-l)/this.repulsionRange));for(var C=u;C<=c;C++)for(var T=m;T<=h;T++)this.grid[C][T].push(t),t.setGridCoordinates(u,c,m,h)},i.prototype.updateGrid=function(){var t,a,l=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<l.length;t++)a=l[t],this.addNodeToGrid(a,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},i.prototype.calculateRepulsionForceOfANode=function(t,a,l,u){if(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&l||u){var c=new Set;t.surrounding=new Array;for(var m,h=this.grid,C=t.startX-1;C<t.finishX+2;C++)for(var T=t.startY-1;T<t.finishY+2;T++)if(!(C<0||T<0||C>=h.length||T>=h[0].length)){for(var N=0;N<h[C][T].length;N++)if(m=h[C][T][N],!(t.getOwner()!=m.getOwner()||t==m)&&!a.has(m)&&!c.has(m)){var D=Math.abs(t.getCenterX()-m.getCenterX())-(t.getWidth()/2+m.getWidth()/2),_=Math.abs(t.getCenterY()-m.getCenterY())-(t.getHeight()/2+m.getHeight()/2);D<=this.repulsionRange&&_<=this.repulsionRange&&c.add(m)}}t.surrounding=[].concat(d(c))}for(C=0;C<t.surrounding.length;C++)this.calcRepulsionForce(t,t.surrounding[C])},i.prototype.calcRepulsionRange=function(){return 0},it.exports=i},function(it,ut,S){"use strict";var d=S(1),s=S(4);function o(r,p,i){d.call(this,r,p,i),this.idealLength=s.DEFAULT_EDGE_LENGTH,this.edgeElasticity=s.DEFAULT_SPRING_STRENGTH}o.prototype=Object.create(d.prototype);for(var e in d)o[e]=d[e];it.exports=o},function(it,ut,S){"use strict";var d=S(3),s=S(4);function o(r,p,i,g){d.call(this,r,p,i,g),this.nodeRepulsion=s.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}o.prototype=Object.create(d.prototype);for(var e in d)o[e]=d[e];o.prototype.setGridCoordinates=function(r,p,i,g){this.startX=r,this.finishX=p,this.startY=i,this.finishY=g},it.exports=o},function(it,ut,S){"use strict";function d(s,o){this.width=0,this.height=0,s!==null&&o!==null&&(this.height=o,this.width=s)}d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(s){this.width=s},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(s){this.height=s},it.exports=d},function(it,ut,S){"use strict";var d=S(14);function s(){this.map={},this.keys=[]}s.prototype.put=function(o,e){var r=d.createID(o);this.contains(r)||(this.map[r]=e,this.keys.push(o))},s.prototype.contains=function(o){var e=d.createID(o);return this.map[o]!=null},s.prototype.get=function(o){var e=d.createID(o);return this.map[e]},s.prototype.keySet=function(){return this.keys},it.exports=s},function(it,ut,S){"use strict";var d=S(14);function s(){this.set={}}s.prototype.add=function(o){var e=d.createID(o);this.contains(e)||(this.set[e]=o)},s.prototype.remove=function(o){delete this.set[d.createID(o)]},s.prototype.clear=function(){this.set={}},s.prototype.contains=function(o){return this.set[d.createID(o)]==o},s.prototype.isEmpty=function(){return this.size()===0},s.prototype.size=function(){return Object.keys(this.set).length},s.prototype.addAllTo=function(o){for(var e=Object.keys(this.set),r=e.length,p=0;p<r;p++)o.push(this.set[e[p]])},s.prototype.size=function(){return Object.keys(this.set).length},s.prototype.addAll=function(o){for(var e=o.length,r=0;r<e;r++){var p=o[r];this.add(p)}},it.exports=s},function(it,ut,S){"use strict";function d(){}d.multMat=function(s,o){for(var e=[],r=0;r<s.length;r++){e[r]=[];for(var p=0;p<o[0].length;p++){e[r][p]=0;for(var i=0;i<s[0].length;i++)e[r][p]+=s[r][i]*o[i][p]}}return e},d.transpose=function(s){for(var o=[],e=0;e<s[0].length;e++){o[e]=[];for(var r=0;r<s.length;r++)o[e][r]=s[r][e]}return o},d.multCons=function(s,o){for(var e=[],r=0;r<s.length;r++)e[r]=s[r]*o;return e},d.minusOp=function(s,o){for(var e=[],r=0;r<s.length;r++)e[r]=s[r]-o[r];return e},d.dotProduct=function(s,o){for(var e=0,r=0;r<s.length;r++)e+=s[r]*o[r];return e},d.mag=function(s){return Math.sqrt(this.dotProduct(s,s))},d.normalize=function(s){for(var o=[],e=this.mag(s),r=0;r<s.length;r++)o[r]=s[r]/e;return o},d.multGamma=function(s){for(var o=[],e=0,r=0;r<s.length;r++)e+=s[r];e*=-1/s.length;for(var p=0;p<s.length;p++)o[p]=e+s[p];return o},d.multL=function(s,o,e){for(var r=[],p=[],i=[],g=0;g<o[0].length;g++){for(var t=0,a=0;a<o.length;a++)t+=-.5*o[a][g]*s[a];p[g]=t}for(var l=0;l<e.length;l++){for(var u=0,c=0;c<e.length;c++)u+=e[l][c]*p[c];i[l]=u}for(var m=0;m<o.length;m++){for(var h=0,C=0;C<o[0].length;C++)h+=o[m][C]*i[C];r[m]=h}return r},it.exports=d},function(it,ut,S){"use strict";var d=function(){function r(p,i){for(var g=0;g<i.length;g++){var t=i[g];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(p,t.key,t)}}return function(p,i,g){return i&&r(p.prototype,i),g&&r(p,g),p}}();function s(r,p){if(!(r instanceof p))throw new TypeError("Cannot call a class as a function")}var o=S(11),e=function(){function r(p,i){s(this,r),(i!==null||i!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var g=void 0;p instanceof o?g=p.size():g=p.length,this._quicksort(p,0,g-1)}return d(r,[{key:"_quicksort",value:function(i,g,t){if(g<t){var a=this._partition(i,g,t);this._quicksort(i,g,a),this._quicksort(i,a+1,t)}}},{key:"_partition",value:function(i,g,t){for(var a=this._get(i,g),l=g,u=t;;){for(;this.compareFunction(a,this._get(i,u));)u--;for(;this.compareFunction(this._get(i,l),a);)l++;if(l<u)this._swap(i,l,u),l++,u--;else return u}}},{key:"_get",value:function(i,g){return i instanceof o?i.get_object_at(g):i[g]}},{key:"_set",value:function(i,g,t){i instanceof o?i.set_object_at(g,t):i[g]=t}},{key:"_swap",value:function(i,g,t){var a=this._get(i,g);this._set(i,g,this._get(i,t)),this._set(i,t,a)}},{key:"_defaultCompareFunction",value:function(i,g){return g>i}}]),r}();it.exports=e},function(it,ut,S){"use strict";function d(){}d.svd=function(s){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=s.length,this.n=s[0].length;var o=Math.min(this.m,this.n);this.s=function(xt){for(var Ft=[];xt-- >0;)Ft.push(0);return Ft}(Math.min(this.m+1,this.n)),this.U=function(xt){var Ft=function zt(Ht){if(Ht.length==0)return 0;for(var Vt=[],Gt=0;Gt<Ht[0];Gt++)Vt.push(zt(Ht.slice(1)));return Vt};return Ft(xt)}([this.m,o]),this.V=function(xt){var Ft=function zt(Ht){if(Ht.length==0)return 0;for(var Vt=[],Gt=0;Gt<Ht[0];Gt++)Vt.push(zt(Ht.slice(1)));return Vt};return Ft(xt)}([this.n,this.n]);for(var e=function(xt){for(var Ft=[];xt-- >0;)Ft.push(0);return Ft}(this.n),r=function(xt){for(var Ft=[];xt-- >0;)Ft.push(0);return Ft}(this.m),p=!0,i=!0,g=Math.min(this.m-1,this.n),t=Math.max(0,Math.min(this.n-2,this.m)),a=0;a<Math.max(g,t);a++){if(a<g){this.s[a]=0;for(var l=a;l<this.m;l++)this.s[a]=d.hypot(this.s[a],s[l][a]);if(this.s[a]!==0){s[a][a]<0&&(this.s[a]=-this.s[a]);for(var u=a;u<this.m;u++)s[u][a]/=this.s[a];s[a][a]+=1}this.s[a]=-this.s[a]}for(var c=a+1;c<this.n;c++){if(function(xt,Ft){return xt&&Ft}(a<g,this.s[a]!==0)){for(var m=0,h=a;h<this.m;h++)m+=s[h][a]*s[h][c];m=-m/s[a][a];for(var C=a;C<this.m;C++)s[C][c]+=m*s[C][a]}e[c]=s[a][c]}if(function(xt,Ft){return xt&&Ft}(p,a<g))for(var T=a;T<this.m;T++)this.U[T][a]=s[T][a];if(a<t){e[a]=0;for(var N=a+1;N<this.n;N++)e[a]=d.hypot(e[a],e[N]);if(e[a]!==0){e[a+1]<0&&(e[a]=-e[a]);for(var D=a+1;D<this.n;D++)e[D]/=e[a];e[a+1]+=1}if(e[a]=-e[a],function(xt,Ft){return xt&&Ft}(a+1<this.m,e[a]!==0)){for(var _=a+1;_<this.m;_++)r[_]=0;for(var I=a+1;I<this.n;I++)for(var ot=a+1;ot<this.m;ot++)r[ot]+=e[I]*s[ot][I];for(var mt=a+1;mt<this.n;mt++)for(var vt=-e[mt]/e[a+1],Dt=a+1;Dt<this.m;Dt++)s[Dt][mt]+=vt*r[Dt]}if(i)for(var G=a+1;G<this.n;G++)this.V[G][a]=e[G]}}var k=Math.min(this.n,this.m+1);if(g<this.n&&(this.s[g]=s[g][g]),this.m<k&&(this.s[k-1]=0),t+1<k&&(e[t]=s[t][k-1]),e[k-1]=0,p){for(var n=g;n<o;n++){for(var E=0;E<this.m;E++)this.U[E][n]=0;this.U[n][n]=1}for(var f=g-1;f>=0;f--)if(this.s[f]!==0){for(var y=f+1;y<o;y++){for(var v=0,R=f;R<this.m;R++)v+=this.U[R][f]*this.U[R][y];v=-v/this.U[f][f];for(var w=f;w<this.m;w++)this.U[w][y]+=v*this.U[w][f]}for(var X=f;X<this.m;X++)this.U[X][f]=-this.U[X][f];this.U[f][f]=1+this.U[f][f];for(var H=0;H<f-1;H++)this.U[H][f]=0}else{for(var U=0;U<this.m;U++)this.U[U][f]=0;this.U[f][f]=1}}if(i)for(var tt=this.n-1;tt>=0;tt--){if(function(xt,Ft){return xt&&Ft}(tt<t,e[tt]!==0))for(var ft=tt+1;ft<o;ft++){for(var B=0,lt=tt+1;lt<this.n;lt++)B+=this.V[lt][tt]*this.V[lt][ft];B=-B/this.V[tt+1][tt];for(var j=tt+1;j<this.n;j++)this.V[j][ft]+=B*this.V[j][tt]}for(var O=0;O<this.n;O++)this.V[O][tt]=0;this.V[tt][tt]=1}for(var $=k-1,K=0,ht=Math.pow(2,-52),Mt=Math.pow(2,-966);k>0;){var rt=void 0,bt=void 0;for(rt=k-2;rt>=-1&&rt!==-1;rt--)if(Math.abs(e[rt])<=Mt+ht*(Math.abs(this.s[rt])+Math.abs(this.s[rt+1]))){e[rt]=0;break}if(rt===k-2)bt=4;else{var Rt=void 0;for(Rt=k-1;Rt>=rt&&Rt!==rt;Rt--){var Xt=(Rt!==k?Math.abs(e[Rt]):0)+(Rt!==rt+1?Math.abs(e[Rt-1]):0);if(Math.abs(this.s[Rt])<=Mt+ht*Xt){this.s[Rt]=0;break}}Rt===rt?bt=3:Rt===k-1?bt=1:(bt=2,rt=Rt)}switch(rt++,bt){case 1:{var x=e[k-2];e[k-2]=0;for(var L=k-2;L>=rt;L--){var M=d.hypot(this.s[L],x),V=this.s[L]/M,Z=x/M;if(this.s[L]=M,L!==rt&&(x=-Z*e[L-1],e[L-1]=V*e[L-1]),i)for(var Q=0;Q<this.n;Q++)M=V*this.V[Q][L]+Z*this.V[Q][k-1],this.V[Q][k-1]=-Z*this.V[Q][L]+V*this.V[Q][k-1],this.V[Q][L]=M}}break;case 2:{var ct=e[rt-1];e[rt-1]=0;for(var q=rt;q<k;q++){var at=d.hypot(this.s[q],ct),et=this.s[q]/at,nt=ct/at;if(this.s[q]=at,ct=-nt*e[q],e[q]=et*e[q],p)for(var dt=0;dt<this.m;dt++)at=et*this.U[dt][q]+nt*this.U[dt][rt-1],this.U[dt][rt-1]=-nt*this.U[dt][q]+et*this.U[dt][rt-1],this.U[dt][q]=at}}break;case 3:{var Tt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[k-1]),Math.abs(this.s[k-2])),Math.abs(e[k-2])),Math.abs(this.s[rt])),Math.abs(e[rt])),gt=this.s[k-1]/Tt,A=this.s[k-2]/Tt,F=e[k-2]/Tt,b=this.s[rt]/Tt,Y=e[rt]/Tt,P=((A+gt)*(A-gt)+F*F)/2,W=gt*F*(gt*F),yt=0;(function(xt,Ft){return xt||Ft})(P!==0,W!==0)&&(yt=Math.sqrt(P*P+W),P<0&&(yt=-yt),yt=W/(P+yt));for(var st=(b+gt)*(b-gt)+yt,z=b*Y,J=rt;J<k-1;J++){var pt=d.hypot(st,z),Ot=st/pt,At=z/pt;if(J!==rt&&(e[J-1]=pt),st=Ot*this.s[J]+At*e[J],e[J]=Ot*e[J]-At*this.s[J],z=At*this.s[J+1],this.s[J+1]=Ot*this.s[J+1],i)for(var St=0;St<this.n;St++)pt=Ot*this.V[St][J]+At*this.V[St][J+1],this.V[St][J+1]=-At*this.V[St][J]+Ot*this.V[St][J+1],this.V[St][J]=pt;if(pt=d.hypot(st,z),Ot=st/pt,At=z/pt,this.s[J]=pt,st=Ot*e[J]+At*this.s[J+1],this.s[J+1]=-At*e[J]+Ot*this.s[J+1],z=At*e[J+1],e[J+1]=Ot*e[J+1],p&&J<this.m-1)for(var Nt=0;Nt<this.m;Nt++)pt=Ot*this.U[Nt][J]+At*this.U[Nt][J+1],this.U[Nt][J+1]=-At*this.U[Nt][J]+Ot*this.U[Nt][J+1],this.U[Nt][J]=pt}e[k-2]=st,K=K+1}break;case 4:{if(this.s[rt]<=0&&(this.s[rt]=this.s[rt]<0?-this.s[rt]:0,i))for(var Et=0;Et<=$;Et++)this.V[Et][rt]=-this.V[Et][rt];for(;rt<$&&!(this.s[rt]>=this.s[rt+1]);){var wt=this.s[rt];if(this.s[rt]=this.s[rt+1],this.s[rt+1]=wt,i&&rt<this.n-1)for(var Lt=0;Lt<this.n;Lt++)wt=this.V[Lt][rt+1],this.V[Lt][rt+1]=this.V[Lt][rt],this.V[Lt][rt]=wt;if(p&&rt<this.m-1)for(var Ct=0;Ct<this.m;Ct++)wt=this.U[Ct][rt+1],this.U[Ct][rt+1]=this.U[Ct][rt],this.U[Ct][rt]=wt;rt++}K=0,k--}break}}var Ut={U:this.U,V:this.V,S:this.s};return Ut},d.hypot=function(s,o){var e=void 0;return Math.abs(s)>Math.abs(o)?(e=o/s,e=Math.abs(s)*Math.sqrt(1+e*e)):o!=0?(e=s/o,e=Math.abs(o)*Math.sqrt(1+e*e)):e=0,e},it.exports=d},function(it,ut,S){"use strict";var d=function(){function e(r,p){for(var i=0;i<p.length;i++){var g=p[i];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(r,g.key,g)}}return function(r,p,i){return p&&e(r.prototype,p),i&&e(r,i),r}}();function s(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(r,p){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;s(this,e),this.sequence1=r,this.sequence2=p,this.match_score=i,this.mismatch_penalty=g,this.gap_penalty=t,this.iMax=r.length+1,this.jMax=p.length+1,this.grid=new Array(this.iMax);for(var a=0;a<this.iMax;a++){this.grid[a]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.grid[a][l]=0}this.tracebackGrid=new Array(this.iMax);for(var u=0;u<this.iMax;u++){this.tracebackGrid[u]=new Array(this.jMax);for(var c=0;c<this.jMax;c++)this.tracebackGrid[u][c]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return d(e,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var p=1;p<this.jMax;p++)this.grid[0][p]=this.grid[0][p-1]+this.gap_penalty,this.tracebackGrid[0][p]=[!1,!1,!0];for(var i=1;i<this.iMax;i++)this.grid[i][0]=this.grid[i-1][0]+this.gap_penalty,this.tracebackGrid[i][0]=[!1,!0,!1];for(var g=1;g<this.iMax;g++)for(var t=1;t<this.jMax;t++){var a=void 0;this.sequence1[g-1]===this.sequence2[t-1]?a=this.grid[g-1][t-1]+this.match_score:a=this.grid[g-1][t-1]+this.mismatch_penalty;var l=this.grid[g-1][t]+this.gap_penalty,u=this.grid[g][t-1]+this.gap_penalty,c=[a,l,u],m=this.arrayAllMaxIndexes(c);this.grid[g][t]=c[m[0]],this.tracebackGrid[g][t]=[m.includes(0),m.includes(1),m.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var p=[];for(p.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});p[0];){var i=p[0],g=this.tracebackGrid[i.pos[0]][i.pos[1]];g[0]&&p.push({pos:[i.pos[0]-1,i.pos[1]-1],seq1:this.sequence1[i.pos[0]-1]+i.seq1,seq2:this.sequence2[i.pos[1]-1]+i.seq2}),g[1]&&p.push({pos:[i.pos[0]-1,i.pos[1]],seq1:this.sequence1[i.pos[0]-1]+i.seq1,seq2:"-"+i.seq2}),g[2]&&p.push({pos:[i.pos[0],i.pos[1]-1],seq1:"-"+i.seq1,seq2:this.sequence2[i.pos[1]-1]+i.seq2}),i.pos[0]===0&&i.pos[1]===0&&this.alignments.push({sequence1:i.seq1,sequence2:i.seq2}),p.shift()}return this.alignments}},{key:"getAllIndexes",value:function(p,i){for(var g=[],t=-1;(t=p.indexOf(i,t+1))!==-1;)g.push(t);return g}},{key:"arrayAllMaxIndexes",value:function(p){return this.getAllIndexes(p,Math.max.apply(null,p))}}]),e}();it.exports=o},function(it,ut,S){"use strict";var d=function(){};d.FDLayout=S(18),d.FDLayoutConstants=S(4),d.FDLayoutEdge=S(19),d.FDLayoutNode=S(20),d.DimensionD=S(21),d.HashMap=S(22),d.HashSet=S(23),d.IGeometry=S(8),d.IMath=S(9),d.Integer=S(10),d.Point=S(12),d.PointD=S(5),d.RandomSeed=S(16),d.RectangleD=S(13),d.Transform=S(17),d.UniqueIDGeneretor=S(14),d.Quicksort=S(25),d.LinkedList=S(11),d.LGraphObject=S(2),d.LGraph=S(6),d.LEdge=S(1),d.LGraphManager=S(7),d.LNode=S(3),d.Layout=S(15),d.LayoutConstants=S(0),d.NeedlemanWunsch=S(27),d.Matrix=S(24),d.SVD=S(26),it.exports=d},function(it,ut,S){"use strict";function d(){this.listeners=[]}var s=d.prototype;s.addListener=function(o,e){this.listeners.push({event:o,callback:e})},s.removeListener=function(o,e){for(var r=this.listeners.length;r>=0;r--){var p=this.listeners[r];p.event===o&&p.callback===e&&this.listeners.splice(r,1)}},s.emit=function(o,e){for(var r=0;r<this.listeners.length;r++){var p=this.listeners[r];o===p.event&&p.callback(e)}},it.exports=d}])})},64498:function(Yt,it,ut){"use strict";var Xt;ut.d(it,{diagram:function(){return Rt}});var S=ut(88674),d=ut(21347),s=ut(25925),o=ut(4284),e=ut(99970),r=ut(35096),p=ut(12491),i=ut(1387),g=ut(44867),t=ut(989),a={L:"left",R:"right",T:"top",B:"bottom"},l={L:(0,r.eW)(x=>`${x},${x/2} 0,${x} 0,0`,"L"),R:(0,r.eW)(x=>`0,${x/2} ${x},0 ${x},${x}`,"R"),T:(0,r.eW)(x=>`0,0 ${x},0 ${x/2},${x}`,"T"),B:(0,r.eW)(x=>`${x/2},0 ${x},${x} 0,${x}`,"B")},u={L:(0,r.eW)((x,L)=>x-L+2,"L"),R:(0,r.eW)((x,L)=>x-2,"R"),T:(0,r.eW)((x,L)=>x-L+2,"T"),B:(0,r.eW)((x,L)=>x-2,"B")},c=(0,r.eW)(function(x){return h(x)?x==="L"?"R":"L":x==="T"?"B":"T"},"getOppositeArchitectureDirection"),m=(0,r.eW)(function(x){const L=x;return L==="L"||L==="R"||L==="T"||L==="B"},"isArchitectureDirection"),h=(0,r.eW)(function(x){const L=x;return L==="L"||L==="R"},"isArchitectureDirectionX"),C=(0,r.eW)(function(x){const L=x;return L==="T"||L==="B"},"isArchitectureDirectionY"),T=(0,r.eW)(function(x,L){const M=h(x)&&C(L),V=C(x)&&h(L);return M||V},"isArchitectureDirectionXY"),N=(0,r.eW)(function(x){const L=x[0],M=x[1],V=h(L)&&C(M),Z=C(L)&&h(M);return V||Z},"isArchitecturePairXY"),D=(0,r.eW)(function(x){return x!=="LL"&&x!=="RR"&&x!=="TT"&&x!=="BB"},"isValidArchitectureDirectionPair"),_=(0,r.eW)(function(x,L){const M=`${x}${L}`;return D(M)?M:void 0},"getArchitectureDirectionPair"),I=(0,r.eW)(function([x,L],M){const V=M[0],Z=M[1];return h(V)?C(Z)?[x+(V==="L"?-1:1),L+(Z==="T"?1:-1)]:[x+(V==="L"?-1:1),L]:h(Z)?[x+(Z==="L"?1:-1),L+(V==="T"?1:-1)]:[x,L+(V==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),ot=(0,r.eW)(function(x){return x==="LT"||x==="TL"?[1,1]:x==="BL"||x==="LB"?[1,-1]:x==="BR"||x==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),mt=(0,r.eW)(function(x,L){return T(x,L)?"bend":h(x)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),vt=(0,r.eW)(function(x){return x.type==="service"},"isArchitectureService"),Dt=(0,r.eW)(function(x){return x.type==="junction"},"isArchitectureJunction"),G=(0,r.eW)(x=>x.data(),"edgeData"),k=(0,r.eW)(x=>x.data(),"nodeData"),n=e.vZ.architecture,E=(Xt=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=e.GN,this.getAccTitle=e.eu,this.setDiagramTitle=e.g2,this.getDiagramTitle=e.Kr,this.getAccDescription=e.Mx,this.setAccDescription=e.U$,this.clear()}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},(0,e.ZH)()}addService({id:L,icon:M,in:V,title:Z,iconText:Q}){if(this.registeredIds[L]!==void 0)throw new Error(`The service id [${L}] is already in use by another ${this.registeredIds[L]}`);if(V!==void 0){if(L===V)throw new Error(`The service [${L}] cannot be placed within itself`);if(this.registeredIds[V]===void 0)throw new Error(`The service [${L}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[V]==="node")throw new Error(`The service [${L}]'s parent is not a group`)}this.registeredIds[L]="node",this.nodes[L]={id:L,type:"service",icon:M,iconText:Q,title:Z,edges:[],in:V}}getServices(){return Object.values(this.nodes).filter(vt)}addJunction({id:L,in:M}){this.registeredIds[L]="node",this.nodes[L]={id:L,type:"junction",edges:[],in:M}}getJunctions(){return Object.values(this.nodes).filter(Dt)}getNodes(){return Object.values(this.nodes)}getNode(L){var M;return(M=this.nodes[L])!=null?M:null}addGroup({id:L,icon:M,in:V,title:Z}){var Q,ct,q;if(((Q=this.registeredIds)==null?void 0:Q[L])!==void 0)throw new Error(`The group id [${L}] is already in use by another ${this.registeredIds[L]}`);if(V!==void 0){if(L===V)throw new Error(`The group [${L}] cannot be placed within itself`);if(((ct=this.registeredIds)==null?void 0:ct[V])===void 0)throw new Error(`The group [${L}]'s parent does not exist. Please make sure the parent is created before this group`);if(((q=this.registeredIds)==null?void 0:q[V])==="node")throw new Error(`The group [${L}]'s parent is not a group`)}this.registeredIds[L]="group",this.groups[L]={id:L,icon:M,title:Z,in:V}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:L,rhsId:M,lhsDir:V,rhsDir:Z,lhsInto:Q,rhsInto:ct,lhsGroup:q,rhsGroup:at,title:et}){if(!m(V))throw new Error(`Invalid direction given for left hand side of edge ${L}--${M}. Expected (L,R,T,B) got ${String(V)}`);if(!m(Z))throw new Error(`Invalid direction given for right hand side of edge ${L}--${M}. Expected (L,R,T,B) got ${String(Z)}`);if(this.nodes[L]===void 0&&this.groups[L]===void 0)throw new Error(`The left-hand id [${L}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[M]===void 0&&this.groups[M]===void 0)throw new Error(`The right-hand id [${M}] does not yet exist. Please create the service/group before declaring an edge to it.`);const nt=this.nodes[L].in,dt=this.nodes[M].in;if(q&&nt&&dt&&nt==dt)throw new Error(`The left-hand id [${L}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(at&&nt&&dt&&nt==dt)throw new Error(`The right-hand id [${M}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const Tt={lhsId:L,lhsDir:V,lhsInto:Q,lhsGroup:q,rhsId:M,rhsDir:Z,rhsInto:ct,rhsGroup:at,title:et};this.edges.push(Tt),this.nodes[L]&&this.nodes[M]&&(this.nodes[L].edges.push(this.edges[this.edges.length-1]),this.nodes[M].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const L={},M=Object.entries(this.nodes).reduce((at,[et,nt])=>(at[et]=nt.edges.reduce((dt,Tt)=>{var F,b,Y,P;const gt=(F=this.getNode(Tt.lhsId))==null?void 0:F.in,A=(b=this.getNode(Tt.rhsId))==null?void 0:b.in;if(gt&&A&>!==A){const W=mt(Tt.lhsDir,Tt.rhsDir);W!=="bend"&&((Y=L[gt])!=null||(L[gt]={}),L[gt][A]=W,(P=L[A])!=null||(L[A]={}),L[A][gt]=W)}if(Tt.lhsId===et){const W=_(Tt.lhsDir,Tt.rhsDir);W&&(dt[W]=Tt.rhsId)}else{const W=_(Tt.rhsDir,Tt.lhsDir);W&&(dt[W]=Tt.lhsId)}return dt},{}),at),{}),V=Object.keys(M)[0],Z={[V]:1},Q=Object.keys(M).reduce((at,et)=>et===V?at:ie(ee({},at),{[et]:1}),{}),ct=(0,r.eW)(at=>{const et={[at]:[0,0]},nt=[at];for(;nt.length>0;){const dt=nt.shift();if(dt){Z[dt]=1,delete Q[dt];const Tt=M[dt],[gt,A]=et[dt];Object.entries(Tt).forEach(([F,b])=>{Z[b]||(et[b]=I([gt,A],F),nt.push(b))})}}return et},"BFS"),q=[ct(V)];for(;Object.keys(Q).length>0;)q.push(ct(Object.keys(Q)[0]));this.dataStructures={adjList:M,spatialMaps:q,groupAlignments:L}}return this.dataStructures}setElementForId(L,M){this.elements[L]=M}getElementById(L){return this.elements[L]}getConfig(){return(0,o.Rb)(ee(ee({},n),(0,e.iE)().architecture))}getConfigField(L){return this.getConfig()[L]}},(0,r.eW)(Xt,"ArchitectureDB"),Xt),f=(0,r.eW)((x,L)=>{(0,s.A)(x,L),x.groups.map(M=>L.addGroup(M)),x.services.map(M=>L.addService(ie(ee({},M),{type:"service"}))),x.junctions.map(M=>L.addJunction(ie(ee({},M),{type:"junction"}))),x.edges.map(M=>L.addEdge(M))},"populateDb"),y={parser:{yy:void 0},parse:(0,r.eW)(x=>kt(this,null,function*(){var V;const L=yield(0,p.Qc)("architecture",x);r.cM.debug(L);const M=(V=y.parser)==null?void 0:V.yy;if(!(M instanceof E))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");f(L,M)}),"parse")},v=(0,r.eW)(x=>`
|
|
2
2
|
.edge {
|
|
3
3
|
stroke-width: ${x.archEdgeWidth};
|
|
4
4
|
stroke: ${x.archEdgeColor};
|