From 7941d16c2945a89579cb1d46558971cc2a2ea24f Mon Sep 17 00:00:00 2001 From: traut Date: Wed, 8 Dec 2021 21:34:40 +0100 Subject: [PATCH] fix broken registry, fixing story-line demo --- dist/stixview.bundle.js | 2 +- src/index.js | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dist/stixview.bundle.js b/dist/stixview.bundle.js index cc75317..fa657fe 100644 --- a/dist/stixview.bundle.js +++ b/dist/stixview.bundle.js @@ -1,2 +1,2 @@ /*! For license information please see stixview.bundle.js.LICENSE.txt */ -(()=>{var e={4750:(e,t,n)=>{"use strict";n.r(t),n.d(t,{afterMain:()=>E,afterRead:()=>w,afterWrite:()=>_,applyStyles:()=>A,arrow:()=>$,auto:()=>s,basePlacements:()=>c,beforeMain:()=>m,beforeRead:()=>b,beforeWrite:()=>C,bottom:()=>i,clippingParents:()=>h,computeStyles:()=>ee,createPopper:()=>Te,createPopperBase:()=>Oe,createPopperLite:()=>Le,detectOverflow:()=>pe,end:()=>l,eventListeners:()=>ne,flip:()=>ve,hide:()=>we,left:()=>a,main:()=>x,modifierPhases:()=>N,offset:()=>me,placements:()=>v,popper:()=>d,popperGenerator:()=>Se,popperOffsets:()=>xe,preventOverflow:()=>Ee,read:()=>y,reference:()=>g,right:()=>o,start:()=>u,top:()=>r,variationPlacements:()=>p,viewport:()=>f,write:()=>k});var r="top",i="bottom",o="right",a="left",s="auto",c=[r,i,o,a],u="start",l="end",h="clippingParents",f="viewport",d="popper",g="reference",p=c.reduce((function(e,t){return e.concat([t+"-"+u,t+"-"+l])}),[]),v=[].concat(c,[s]).reduce((function(e,t){return e.concat([t,t+"-"+u,t+"-"+l])}),[]),b="beforeRead",y="read",w="afterRead",m="beforeMain",x="main",E="afterMain",C="beforeWrite",k="write",_="afterWrite",N=[b,y,w,m,x,E,C,k,_];function S(e){return e?(e.nodeName||"").toLowerCase():null}function O(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function T(e){return e instanceof O(e).Element||e instanceof Element}function L(e){return e instanceof O(e).HTMLElement||e instanceof HTMLElement}function I(e){return"undefined"!=typeof ShadowRoot&&(e instanceof O(e).ShadowRoot||e instanceof ShadowRoot)}const A={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];L(i)&&S(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});L(r)&&S(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function M(e){return e.split("-")[0]}var P=Math.max,D=Math.min,j=Math.round;function R(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,i=1;if(L(e)&&t){var o=e.offsetHeight,a=e.offsetWidth;a>0&&(r=j(n.width)/a||1),o>0&&(i=j(n.height)/o||1)}return{width:n.width/r,height:n.height/i,top:n.top/i,right:n.right/r,bottom:n.bottom/i,left:n.left/r,x:n.left/r,y:n.top/i}}function G(e){var t=R(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function B(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&I(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function H(e){return O(e).getComputedStyle(e)}function F(e){return["table","td","th"].indexOf(S(e))>=0}function Y(e){return((T(e)?e.ownerDocument:e.document)||window.document).documentElement}function z(e){return"html"===S(e)?e:e.assignedSlot||e.parentNode||(I(e)?e.host:null)||Y(e)}function V(e){return L(e)&&"fixed"!==H(e).position?e.offsetParent:null}function U(e){for(var t=O(e),n=V(e);n&&F(n)&&"static"===H(n).position;)n=V(n);return n&&("html"===S(n)||"body"===S(n)&&"static"===H(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&L(e)&&"fixed"===H(e).position)return null;for(var n=z(e);L(n)&&["html","body"].indexOf(S(n))<0;){var r=H(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function q(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function X(e,t,n){return P(e,D(t,n))}function W(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Z(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}const $={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,s=e.name,u=e.options,l=n.elements.arrow,h=n.modifiersData.popperOffsets,f=M(n.placement),d=q(f),g=[a,o].indexOf(f)>=0?"height":"width";if(l&&h){var p=function(e,t){return W("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Z(e,c))}(u.padding,n),v=G(l),b="y"===d?r:a,y="y"===d?i:o,w=n.rects.reference[g]+n.rects.reference[d]-h[d]-n.rects.popper[g],m=h[d]-n.rects.reference[d],x=U(l),E=x?"y"===d?x.clientHeight||0:x.clientWidth||0:0,C=w/2-m/2,k=p[b],_=E-v[g]-p[y],N=E/2-v[g]/2+C,S=X(k,N,_),O=d;n.modifiersData[s]=((t={})[O]=S,t.centerOffset=S-N,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&B(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function K(e){return e.split("-")[1]}var Q={top:"auto",right:"auto",bottom:"auto",left:"auto"};function J(e){var t,n=e.popper,s=e.popperRect,c=e.placement,u=e.variation,h=e.offsets,f=e.position,d=e.gpuAcceleration,g=e.adaptive,p=e.roundOffsets,v=e.isFixed,b=!0===p?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:j(t*r)/r||0,y:j(n*r)/r||0}}(h):"function"==typeof p?p(h):h,y=b.x,w=void 0===y?0:y,m=b.y,x=void 0===m?0:m,E=h.hasOwnProperty("x"),C=h.hasOwnProperty("y"),k=a,_=r,N=window;if(g){var S=U(n),T="clientHeight",L="clientWidth";S===O(n)&&"static"!==H(S=Y(n)).position&&"absolute"===f&&(T="scrollHeight",L="scrollWidth"),S=S,(c===r||(c===a||c===o)&&u===l)&&(_=i,x-=(v&&N.visualViewport?N.visualViewport.height:S[T])-s.height,x*=d?1:-1),c!==a&&(c!==r&&c!==i||u!==l)||(k=o,w-=(v&&N.visualViewport?N.visualViewport.width:S[L])-s.width,w*=d?1:-1)}var I,A=Object.assign({position:f},g&&Q);return d?Object.assign({},A,((I={})[_]=C?"0":"",I[k]=E?"0":"",I.transform=(N.devicePixelRatio||1)<=1?"translate("+w+"px, "+x+"px)":"translate3d("+w+"px, "+x+"px, 0)",I)):Object.assign({},A,((t={})[_]=C?x+"px":"",t[k]=E?w+"px":"",t.transform="",t))}const ee={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,c=void 0===s||s,u={placement:M(t.placement),variation:K(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,J(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,J(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var te={passive:!0};const ne={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,a=r.resize,s=void 0===a||a,c=O(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach((function(e){e.addEventListener("scroll",n.update,te)})),s&&c.addEventListener("resize",n.update,te),function(){o&&u.forEach((function(e){e.removeEventListener("scroll",n.update,te)})),s&&c.removeEventListener("resize",n.update,te)}},data:{}};var re={left:"right",right:"left",bottom:"top",top:"bottom"};function ie(e){return e.replace(/left|right|bottom|top/g,(function(e){return re[e]}))}var oe={start:"end",end:"start"};function ae(e){return e.replace(/start|end/g,(function(e){return oe[e]}))}function se(e){var t=O(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ce(e){return R(Y(e)).left+se(e).scrollLeft}function ue(e){var t=H(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function le(e){return["html","body","#document"].indexOf(S(e))>=0?e.ownerDocument.body:L(e)&&ue(e)?e:le(z(e))}function he(e,t){var n;void 0===t&&(t=[]);var r=le(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=O(r),a=i?[o].concat(o.visualViewport||[],ue(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(he(z(a)))}function fe(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function de(e,t){return t===f?fe(function(e){var t=O(e),n=Y(e),r=t.visualViewport,i=n.clientWidth,o=n.clientHeight,a=0,s=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:i,height:o,x:a+ce(e),y:s}}(e)):T(t)?function(e){var t=R(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):fe(function(e){var t,n=Y(e),r=se(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=P(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=P(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+ce(e),c=-r.scrollTop;return"rtl"===H(i||n).direction&&(s+=P(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:c}}(Y(e)))}function ge(e){var t,n=e.reference,s=e.element,c=e.placement,h=c?M(c):null,f=c?K(c):null,d=n.x+n.width/2-s.width/2,g=n.y+n.height/2-s.height/2;switch(h){case r:t={x:d,y:n.y-s.height};break;case i:t={x:d,y:n.y+n.height};break;case o:t={x:n.x+n.width,y:g};break;case a:t={x:n.x-s.width,y:g};break;default:t={x:n.x,y:n.y}}var p=h?q(h):null;if(null!=p){var v="y"===p?"height":"width";switch(f){case u:t[p]=t[p]-(n[v]/2-s[v]/2);break;case l:t[p]=t[p]+(n[v]/2-s[v]/2)}}return t}function pe(e,t){void 0===t&&(t={});var n=t,a=n.placement,s=void 0===a?e.placement:a,u=n.boundary,l=void 0===u?h:u,p=n.rootBoundary,v=void 0===p?f:p,b=n.elementContext,y=void 0===b?d:b,w=n.altBoundary,m=void 0!==w&&w,x=n.padding,E=void 0===x?0:x,C=W("number"!=typeof E?E:Z(E,c)),k=y===d?g:d,_=e.rects.popper,N=e.elements[m?k:y],O=function(e,t,n){var r="clippingParents"===t?function(e){var t=he(z(e)),n=["absolute","fixed"].indexOf(H(e).position)>=0,r=n&&L(e)?U(e):e;return T(r)?t.filter((function(e){return T(e)&&B(e,r)&&"body"!==S(e)&&(!n||"static"!==H(e).position)})):[]}(e):[].concat(t),i=[].concat(r,[n]),o=i[0],a=i.reduce((function(t,n){var r=de(e,n);return t.top=P(r.top,t.top),t.right=D(r.right,t.right),t.bottom=D(r.bottom,t.bottom),t.left=P(r.left,t.left),t}),de(e,o));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(T(N)?N:N.contextElement||Y(e.elements.popper),l,v),I=R(e.elements.reference),A=ge({reference:I,element:_,strategy:"absolute",placement:s}),M=fe(Object.assign({},_,A)),j=y===d?M:I,G={top:O.top-j.top+C.top,bottom:j.bottom-O.bottom+C.bottom,left:O.left-j.left+C.left,right:j.right-O.right+C.right},F=e.modifiersData.offset;if(y===d&&F){var V=F[s];Object.keys(G).forEach((function(e){var t=[o,i].indexOf(e)>=0?1:-1,n=[r,i].indexOf(e)>=0?"y":"x";G[e]+=V[n]*t}))}return G}const ve={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,l=e.name;if(!t.modifiersData[l]._skip){for(var h=n.mainAxis,f=void 0===h||h,d=n.altAxis,g=void 0===d||d,b=n.fallbackPlacements,y=n.padding,w=n.boundary,m=n.rootBoundary,x=n.altBoundary,E=n.flipVariations,C=void 0===E||E,k=n.allowedAutoPlacements,_=t.options.placement,N=M(_),S=b||(N!==_&&C?function(e){if(M(e)===s)return[];var t=ie(e);return[ae(e),t,ae(t)]}(_):[ie(_)]),O=[_].concat(S).reduce((function(e,n){return e.concat(M(n)===s?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,l=void 0===u?v:u,h=K(r),f=h?s?p:p.filter((function(e){return K(e)===h})):c,d=f.filter((function(e){return l.indexOf(e)>=0}));0===d.length&&(d=f);var g=d.reduce((function(t,n){return t[n]=pe(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[M(n)],t}),{});return Object.keys(g).sort((function(e,t){return g[e]-g[t]}))}(t,{placement:n,boundary:w,rootBoundary:m,padding:y,flipVariations:C,allowedAutoPlacements:k}):n)}),[]),T=t.rects.reference,L=t.rects.popper,I=new Map,A=!0,P=O[0],D=0;D=0,H=B?"width":"height",F=pe(t,{placement:j,boundary:w,rootBoundary:m,altBoundary:x,padding:y}),Y=B?G?o:a:G?i:r;T[H]>L[H]&&(Y=ie(Y));var z=ie(Y),V=[];if(f&&V.push(F[R]<=0),g&&V.push(F[Y]<=0,F[z]<=0),V.every((function(e){return e}))){P=j,A=!1;break}I.set(j,V)}if(A)for(var U=function(e){var t=O.find((function(t){var n=I.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return P=t,"break"},q=C?3:1;q>0&&"break"!==U(q);q--);t.placement!==P&&(t.modifiersData[l]._skip=!0,t.placement=P,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function be(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ye(e){return[r,o,i,a].some((function(t){return e[t]>=0}))}const we={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=pe(t,{elementContext:"reference"}),s=pe(t,{altBoundary:!0}),c=be(a,r),u=be(s,i,o),l=ye(c),h=ye(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:l,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":h})}},me={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,i=e.name,s=n.offset,c=void 0===s?[0,0]:s,u=v.reduce((function(e,n){return e[n]=function(e,t,n){var i=M(e),s=[a,r].indexOf(i)>=0?-1:1,c="function"==typeof n?n(Object.assign({},t,{placement:e})):n,u=c[0],l=c[1];return u=u||0,l=(l||0)*s,[a,o].indexOf(i)>=0?{x:l,y:u}:{x:u,y:l}}(n,t.rects,c),e}),{}),l=u[t.placement],h=l.x,f=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=h,t.modifiersData.popperOffsets.y+=f),t.modifiersData[i]=u}},xe={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ge({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},Ee={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,s=e.name,c=n.mainAxis,l=void 0===c||c,h=n.altAxis,f=void 0!==h&&h,d=n.boundary,g=n.rootBoundary,p=n.altBoundary,v=n.padding,b=n.tether,y=void 0===b||b,w=n.tetherOffset,m=void 0===w?0:w,x=pe(t,{boundary:d,rootBoundary:g,padding:v,altBoundary:p}),E=M(t.placement),C=K(t.placement),k=!C,_=q(E),N="x"===_?"y":"x",S=t.modifiersData.popperOffsets,O=t.rects.reference,T=t.rects.popper,L="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,I="number"==typeof L?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,j={x:0,y:0};if(S){if(l){var R,B="y"===_?r:a,H="y"===_?i:o,F="y"===_?"height":"width",Y=S[_],z=Y+x[B],V=Y-x[H],W=y?-T[F]/2:0,Z=C===u?O[F]:T[F],$=C===u?-T[F]:-O[F],Q=t.elements.arrow,J=y&&Q?G(Q):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[B],ne=ee[H],re=X(0,O[F],J[F]),ie=k?O[F]/2-W-re-te-I.mainAxis:Z-re-te-I.mainAxis,oe=k?-O[F]/2+W+re+ne+I.mainAxis:$+re+ne+I.mainAxis,ae=t.elements.arrow&&U(t.elements.arrow),se=ae?"y"===_?ae.clientTop||0:ae.clientLeft||0:0,ce=null!=(R=null==A?void 0:A[_])?R:0,ue=Y+oe-ce,le=X(y?D(z,Y+ie-ce-se):z,Y,y?P(V,ue):V);S[_]=le,j[_]=le-Y}if(f){var he,fe="x"===_?r:a,de="x"===_?i:o,ge=S[N],ve="y"===N?"height":"width",be=ge+x[fe],ye=ge-x[de],we=-1!==[r,a].indexOf(E),me=null!=(he=null==A?void 0:A[N])?he:0,xe=we?be:ge-O[ve]-T[ve]-me+I.altAxis,Ee=we?ge+O[ve]+T[ve]-me-I.altAxis:ye,Ce=y&&we?function(e,t,n){var r=X(e,t,n);return r>n?n:r}(xe,ge,Ee):X(y?xe:be,ge,y?Ee:ye);S[N]=Ce,j[N]=Ce-ge}t.modifiersData[s]=j}},requiresIfExists:["offset"]};function Ce(e,t,n){void 0===n&&(n=!1);var r,i,o=L(t),a=L(t)&&function(e){var t=e.getBoundingClientRect(),n=j(t.width)/e.offsetWidth||1,r=j(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),s=Y(t),c=R(e,a),u={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(o||!o&&!n)&&(("body"!==S(t)||ue(s))&&(u=(r=t)!==O(r)&&L(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:se(r)),L(t)?((l=R(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):s&&(l.x=ce(s))),{x:c.left+u.scrollLeft-l.x,y:c.top+u.scrollTop-l.y,width:c.width,height:c.height}}function ke(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}var _e={placement:"bottom",modifiers:[],strategy:"absolute"};function Ne(){for(var e=arguments.length,t=new Array(e),n=0;n=0;i--){var o=r[i];o.isOrdered()||e.stack.push(o)}return t},i.prototype.calculateRadius=function(){var e=this,t=0;e.getNodes().forEach((function(e){return t+=Math.sqrt(e.getWidth()*e.getWidth()+e.getHeight()*e.getHeight())})),e.perimeter=t+e.getNodes().length*e.nodeSeparation;var n=e.perimeter/(2*Math.PI);e.getParent().setWidth(2*n),e.getParent().setHeight(2*n),e.getParent().setCenter(e.getParent().getWidth(),e.getParent().getHeight()),e.centerX=e.getParent().getCenterX(),e.centerY=e.getParent().getCenterY(),e.radius=e.getParent().getHeight()/2},i.prototype.calculateEdgeCrossingsOfNodes=function(){this.getNodes().forEach((function(e){return e.calculateTotalCrossing()}))},i.prototype.loadOldIndicesOfNodes=function(){for(var e=0;eMath.min(a,s)&&0!==s&&0!==a},i.prototype.crossingWithEdge=function(e){return this.crossesWithEdge(e)?1:0},i.prototype.calculateTotalCrossingWithList=function(e){var t=this,n=0;return e.forEach((function(e){return n+=t.crossingWithEdge(e)})),n},e.exports=i},function(e,t,n){"use strict";var r=n(0).LNode;function i(e,t,n,i){void 0!==n&&void 0!==i?r.call(this,e,t,n,i):r.call(this,e,t),this.angle=0,this.circleIndex=-1,this.totalCrossingOfEdges=-1,this.isCrossingNumberValid=!1}for(var o in n(0).Quicksort,i.prototype=Object.create(r.prototype),r)i[o]=r[o];i.prototype.getCircle=function(){return this.getOwner()},i.prototype.setIndex=function(e){this.circleIndex=e,this.isCrossingNumberValid=!1},i.prototype.getIndex=function(){return this.circleIndex},i.prototype.getNeighborsSortedByDegree=function(){var e=Array.from(this.getNeighborsList());return(e=e.filter((function(e){return-1===e.getIndex()}))).sort((function(e,t){return e.getDegree()-t.getDegree()})),e},i.prototype.getDegree=function(){return this.getEdges().length},i.prototype.isOrdered=function(){return this.getIndex()>-1},i.prototype.setAngle=function(e){this.angle=e},i.prototype.getAngle=function(){return this.angle},i.prototype.getCircDistWithTheNode=function(e){var t=this,n=e.getIndex();if(-1===n||-1===t.getIndex())return-1;var r=t.getIndex()-n;return r<0&&(r+=t.getCircle().getSize()),r},i.prototype.getCrossingNumberWithNode=function(e){var t=0;return this.getEdges().forEach((function(n){e.getEdges().forEach((function(e){t+=n.crossingWithEdge(e)}))})),t},i.prototype.getTotalCrossingOfEdges=function(){var e=this;return e.isCrossingNumberValid||(e.calculateTotalCrossing(),e.isCrossingNumberValid=!0),e.totalCrossingOfEdges},i.prototype.calculateTotalCrossing=function(){var e=this,t=0,n=[];n.push.apply(n,e.getCircle().getEdges()),n=n.filter((function(t){return e.getEdges().indexOf(t)<0})),e.getEdges().forEach((function(e){return t+=e.calculateTotalCrossingWithList(n)})),e.totalCrossingOfEdges=t},e.exports=i},function(e,t,n){"use strict";var r=n(0).Layout,i=n(2),o=n(1),a=n(4),s=n(3);function c(){r.call(this),this.nodeSeparation=i.DEFAULT_NODE_SEPARATION}for(var u in c.prototype=Object.create(r.prototype),r)c[u]=r[u];c.prototype.newGraph=function(e){return this.avsdfCircle=new o(null,this.graphManager,e),this.avsdfCircle},c.prototype.newNode=function(e){return new a(this.graphManager,e)},c.prototype.newEdge=function(e){return new s(null,null,e)},c.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n1)return!1;var e=this.avsdfCircle;for(e.setNodeSeparation(this.nodeSeparation),e.calculateRadius(),e.initOrdering();!e.hasFinishedOrdering();){var t=e.findNodeToPlace();e.putInOrder(t)}return!0},c.prototype.updateNodeAngles=function(){this.graphManager.getRoot().correctAngles()},c.prototype.updateNodeCoordinates=function(){var e=this.graphManager.getRoot();e.getNodes().forEach((function(t){t.setCenter(e.getCenterX()+e.getRadius()*Math.cos(t.getAngle()),e.getCenterY()+e.getRadius()*Math.sin(t.getAngle()))}))},c.prototype.initPostProcess=function(){this.avsdfCircle.calculateEdgeCrossingsOfNodes();var e=this.avsdfCircle.getNodes();return e.sort((function(e,t){return t.getTotalCrossingOfEdges()-e.getTotalCrossingOfEdges()})),e},c.prototype.oneStepPostProcess=function(e){for(var t=this,n=e.getTotalCrossingOfEdges(),r=void 0,i=Array.from(e.getNeighborsList()),o=0;o=n?t.avsdfCircle.loadOldIndicesOfNodes():(t.avsdfCircle.reOrderVertices(),n=r)}}},e.exports=c},function(e,t,n){"use strict";var r={};r.layoutBase=n(0),r.AVSDFConstants=n(2),r.AVSDFEdge=n(3),r.AVSDFCircle=n(1),r.AVSDFLayout=n(5),r.AVSDFNode=n(4),e.exports=r}])},e.exports=r(n(2241))},4182:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(t,n){t.exports=e},function(e,t,n){"use strict";var r=n(0).FDLayoutConstants;function i(){}for(var o in r)i[o]=r[o];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=i},function(e,t,n){"use strict";var r=n(0).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var o in i.prototype=Object.create(r.prototype),r)i[o]=r[o];e.exports=i},function(e,t,n){"use strict";var r=n(0).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var o in i.prototype=Object.create(r.prototype),r)i[o]=r[o];e.exports=i},function(e,t,n){"use strict";var r=n(0).LGraphManager;function i(e){r.call(this,e)}for(var o in i.prototype=Object.create(r.prototype),r)i[o]=r[o];e.exports=i},function(e,t,n){"use strict";var r=n(0).FDLayoutNode,i=n(0).IMath;function o(e,t,n,i){r.call(this,e,t,n,i)}for(var a in o.prototype=Object.create(r.prototype),r)o[a]=r[a];o.prototype.move=function(){var e=this.graphManager.getLayout();this.displacementX=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},o.prototype.propogateDisplacementToChildren=function(e,t){for(var n,r=this.getChild().getNodes(),i=0;i0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter((function(e){return t.has(e)}));this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%u.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n1)for(s=0;sr&&(r=Math.floor(a.y)),o=Math.floor(a.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new f(l.WORLD_CENTER_X-a.x/2,l.WORLD_CENTER_Y-a.y/2))},y.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),c.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(t,null,0,359,0,r);var i=v.calculateBounds(e),o=new b;o.setDeviceOrgX(i.getMinX()),o.setDeviceOrgY(i.getMinY()),o.setWorldOrgX(n.x),o.setWorldOrgY(n.y);for(var a=0;a1;){var b=v[0];v.splice(0,1);var w=l.indexOf(b);w>=0&&l.splice(w,1),g--,h--}f=null!=t?(l.indexOf(v[0])+1)%g:0;for(var m=Math.abs(r-n)/h,x=f;d!=h;x=++x%g){var E=l[x].getOtherEnd(e);if(E!=t){var C=(n+d*m)%360,k=(C+m)%360;y.branchRadialLayout(E,e,C,k,i+o,o),d++}}},y.maxDiagonalInTree=function(e){for(var t=g.MIN_VALUE,n=0;nt&&(t=r)}return t},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){var r="DummyCompound_"+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),o=new a(e.graphManager);o.id=r,o.paddingLeft=i.paddingLeft||0,o.paddingRight=i.paddingRight||0,o.paddingBottom=i.paddingBottom||0,o.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=o;var s=e.getGraphManager().add(e.newGraph(),o),c=i.getChild();c.add(o);for(var u=0;u=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i)}},y.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach((function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,o=r.paddingTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,o)}))},y.prototype.getToBeTiled=function(e){var t=e.id;if(null!=this.toBeTiled[t])return this.toBeTiled[t];var n=e.getChild();if(null==n)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i0)return this.toBeTiled[t]=!1,!1;if(null!=o.getChild()){if(!this.getToBeTiled(o))return this.toBeTiled[t]=!1,!1}else this.toBeTiled[o.id]=!1}return this.toBeTiled[t]=!0,!0},y.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;rc&&(c=l.rect.height)}n+=c+e.verticalPadding}},y.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach((function(r){var i=t[r];n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height}))},y.prototype.tileNodes=function(e,t){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:c.TILING_PADDING_VERTICAL,horizontalPadding:c.TILING_PADDING_HORIZONTAL};e.sort((function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:e.rect.width*e.rect.height0&&(o+=e.horizontalPadding),e.rowWidth[n]=o,e.width0&&(a+=e.verticalPadding);var s=0;a>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=a,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},y.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;rn&&(t=r,n=e.rowWidth[r]);return t},y.prototype.canAddHorizontal=function(e,t,n){var r=this.getShortestRowIndex(e);if(r<0)return!0;var i=e.rowWidth[r];if(i+e.horizontalPadding+t<=e.width)return!0;var o,a,s=0;return e.rowHeight[r]0&&(s=n+e.verticalPadding-e.rowHeight[r]),o=e.width-i>=t+e.horizontalPadding?(e.height+s)/(i+t+e.horizontalPadding):(e.height+s)/e.width,s=n+e.verticalPadding,(a=e.widtho&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-o,e.rowWidth[n]=e.rowWidth[n]+o,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var a=Number.MIN_VALUE,s=0;sa&&(a=r[s].height);t>0&&(a+=e.verticalPadding);var c=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=a,e.rowHeight[n]0)for(var l=i;l<=o;l++)c[0]+=this.grid[l][a-1].length+this.grid[l][a].length-1;if(o0)for(l=a;l<=s;l++)c[3]+=this.grid[i-1][l].length+this.grid[i][l].length-1;for(var h,f,d=g.MAX_VALUE,p=0;p{(e.exports=n(3645)(!1)).push([e.id,".stix-viewer-block {\n display: block;\n overflow: auto;\n position: relative;\n font-size: 0.8em;\n font-family: sans-serif;\n margin: 10px 0px;\n}\n\n.stix-viewer-block .stix-viewer {\n position: relative;\n border: 1px solid #ddd;\n border-radius: 2px;\n}\n\n.stix-viewer-block .viewer-footer {\n padding: 8px;\n\n border-radius: 0 0 2px 2px;\n border-width: 0px 1px 1px 1px;\n border-style: solid;\n border-color: #ddd;\n\n background-color: #f7f7f7; \n line-height: 1.2em;\n}\n\n.stix-viewer-block .stix-viewer .stix-graph {\n width: 100%;\n height: 100%;\n position: relative;\n}\n\n\n.stix-viewer-block .viewer-header {\n padding: 8px;\n font-weight: bold;\n border-radius: 2px 2px 0 0;\n border-width: 1px 1px 0px 1px;\n border-style: solid;\n border-color: #ddd;\n background-color: #f7f7f7; \n color: #586069;\n line-height: 1.2em;\n}\n\n.stix-viewer-block .viewer-header a {\n color: #586069;\n}\n\n.stix-viewer .viewer-placeholder {\n top: 45%;\n position: relative;\n font-family: sans-serif;\n font-size: 2em;\n color: #d6d6d6;\n font-weight: lighter;\n text-align: center;\n}\n\n.stix-viewer-block .dragover-active {\n background-color: #eee;\n}\n\n.stix-viewer-block .loading {\n background-color: #f7f7f7; \n}\n\n.stix-viewer-block .sidebar {\n top: 0px;\n bottom: 0;\n right: 0;\n width: 40%;\n max-width: 400px;\n position: absolute;\n padding: 10px;\n display: none;\n border-width: 0px 0px 0px 1px;\n border-style: solid;\n border-color: #ddd;\n background-color: #f7f7f7;\n overflow: scroll;\n z-index: 9999;\n}\n\n.stix-viewer-block .sidebar p {\n line-height: 1.4em;\n}\n\n.stix-viewer-block .sidebar .sidebar-title {\n word-wrap: break-word;\n font-weight: normal;\n font-size: 20pt;\n}\n\n.stix-viewer-block .sidebar .sidebar-close-icon {\n float: right;\n font-size: 20pt;\n padding: 0px 10px;\n cursor: pointer;\n}\n\n.stix-viewer-block .sidebar img.sidebar-type-icon {\n height: 30px;\n vertical-align: middle;\n margin-right: 5px;\n}\n\n.stix-viewer-block .sidebar .sidebar-textarea {\n height: 400px;\n width: 100%;\n}\n\n.stix-viewer-block .viewer-footer {\n color: #586069;\n background-color: #f7f7f7;\n}\n\n.stix-viewer-block .viewer-footer a {\n color: #586069;\n}\n\n.marking-tag {\n font-size: 0.8em;\n font-family: sans-serif;\n padding: 0px 2px;\n border-radius: 2px;\n border-width: 1px;\n border-style: solid;\n user-select: none;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.marking-tag-tlp-white {\n color: black;\n background-color: white;\n border-color: black;\n}\n\n.marking-tag-tlp-green {\n color: white;\n background-color: green;\n border-color: green;\n}\n\n.marking-tag-tlp-amber {\n color: white;\n background-color: orange;\n border-color: orange;\n}\n\n.marking-tag-tlp-red {\n color: white;\n background-color: red;\n border-color: red;\n}\n\n.marking-tag-tlp-custom {\n color: black;\n background-color: white;\n border-color: black;\n}\n",""])},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r=e[1]||"",i=e[3];if(!i)return r;if(t&&"function"==typeof btoa){var o=(n=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=i.sources.map((function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"}));return[r].concat(a).concat([o]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i{var r;!function(){"use strict";var i=function(e){if(e){var t={enabled:!0,selector:"node",speed:1};e("core","autopanOnDrag",(function(e){var o=this,a=n(o,"eventFcns")||{};if(r(o,"eventFcns",a),"get"!==e){var s=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}(t,e);r(o,"options",s),s.enabled&&(i(o),r(o,"enabled",!0))}return{enable:function(){i(o)},disable:function(){!function(e){if(n(e,"enabled")){var t=n(e,"eventFcns"),i=n(e,"options");e.off("tapstart",i.selector,t.tapstartFcn),e.off("tapdrag",t.tapdragFcn),e.off("tapend",t.tapendFcn),r(e,"enabled",void 0)}}(o)}}}))}function n(e,t){void 0===e.scratch("_autopanOnDrag")&&e.scratch("_autopanOnDrag",{});var n=e.scratch("_autopanOnDrag");return void 0===t?n:n[t]}function r(e,t,r){var i=n(e);i[t]=r,e.scratch("_autopanOnDrag",i)}function i(e,t){if(!n(e,"enabled")){var i=n(e,"eventFcns");t=n(e,"options"),e.on("tapstart",t.selector,i.tapstartFcn=function(){var t=this,n=t.renderedPosition(),i=t.renderedWidth(),o=t.renderedHeight(),a=e.width(),s=e.height(),c=n.x-i/2,u=n.y-o/2,l=n.x+i/2,h=n.y+o/2,f=!1;(l>=a||c<=0||h>=s||u<=0)&&(f=!0),f||r(e,"currentNode",t)}),e.on("tapdrag",i.tapdragFcn=function(){var r=n(e,"currentNode");if(void 0!==r){var i,o,a=r.renderedPosition(),s=r.renderedWidth(),c=r.renderedHeight(),u=e.width(),l=e.height(),h=a.x-s/2,f=a.y-c/2,d=a.x+s/2,g=a.y+c/2;d>=u&&(i=-d+u),h<=0&&(i=-h),g>=l&&(o=-g+l),f<=0&&(o=-f),i&&e.panBy({x:i*t.speed}),o&&e.panBy({y:o*t.speed})}}),e.on("tapend",i.tapendFcn=function(){r(e,"currentNode",void 0)}),r(e,"eventFcns",i),r(e,"enabled",!0)}}};e.exports&&(e.exports=i),void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r),"undefined"!=typeof cytoscape&&i(cytoscape)}()},6053:function(e,t,n){var r;r=function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=15)}([function(t,n){t.exports=e},function(e,t,n){"use strict";var r=n(0).layoutBase.FDLayoutConstants;function i(){}for(var o in r)i[o]=r[o];i.DEFAULT_SPRING_STRENGTH=1.5*r.DEFAULT_SPRING_STRENGTH,i.DEFAULT_NODE_SEPARATION=r.DEFAULT_EDGE_LENGTH/4,i.DEFAULT_IDEAL_INTER_CLUSTER_EDGE_LENGTH_COEFF=1.4,i.DEFAULT_ALLOW_NODES_INSIDE_CIRCLE=!1,i.DEFAULT_MAX_RATIO_OF_NODES_INSIDE_CIRCLE=.1,i.DEFAULT_INNER_EDGE_LENGTH=r.DEFAULT_EDGE_LENGTH/3,i.MAX_ROTATION_ANGLE=Math.PI/36,i.MIN_ROTATION_ANGLE=-i.MAX_ROTATION_ANGLE,i.SWAP_IDLE_DURATION=45,i.SWAP_PREPERATION_DURATION=5,i.SWAP_PERIOD=i.SWAP_IDLE_DURATION+i.SWAP_PREPERATION_DURATION,i.SWAP_HISTORY_CLEARANCE_PERIOD=6*i.SWAP_PERIOD,i.MIN_DISPLACEMENT_FOR_SWAP=6,i.REVERSE_PERIOD=25,e.exports=i},function(e,t,n){"use strict";e.exports=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;rt&&(t=r.getWidth()),r.getHeight()>t&&(t=r.getHeight())}var i=2*(e.radius+e.margin)+t,o=e.getParent();o.setHeight(i),o.setWidth(i)},l.prototype.computeOrderMatrix=function(){var e=this.onCircleNodes.length;this.orderMatrix=new Array(e);for(var t=0;tn){var o=this.onCircleNodes[r].getOnCircleNodeExt().getAngle()-this.onCircleNodes[n].getOnCircleNodeExt().getAngle();o<0&&(o+=i.TWO_PI),o<=Math.PI?(this.orderMatrix[n][r]=!0,this.orderMatrix[r][n]=!1):(this.orderMatrix[n][r]=!1,this.orderMatrix[r][n]=!0)}},l.prototype.rotate=function(){var e=this.getParent(),t=this.getOnCircleNodes().length,n=e.rotationAmount/t,r=this.getGraphManager().getLayout();if(0!==n){var i=n/this.radius;i>s.MAX_ROTATION_ANGLE?i=s.MAX_ROTATION_ANGLE:it.getOnCircleNodeExt().getIndex()&&(n=t,r=e),n.getOnCircleNodeExt().getPrevNode()===r){var a=r;r=n,n=a}var s=n.getOnCircleNodeExt(),c=r.getOnCircleNodeExt(),u=s.getPrevNode(),l=this.getGraphManager().getLayout().getNodeSeparation(),h=(u.getOnCircleNodeExt().getAngle()+(u.getHalfTheDiagonal()+r.getHalfTheDiagonal()+l)/this.radius)%(2*Math.PI);c.setAngle(h),h=(c.getAngle()+(r.getHalfTheDiagonal()+n.getHalfTheDiagonal()+l)/this.radius)%(2*Math.PI),s.setAngle(h),s.updatePosition(),c.updatePosition();var f=i.getIndex();i.setIndex(o.getIndex()),o.setIndex(f),this.getOnCircleNodes()[i.getIndex()]=e,this.getOnCircleNodes()[o.getIndex()]=t,i.updateSwappingConditions(),o.updateSwappingConditions(),i.getNextNode()===t?(i.getPrevNode().getOnCircleNodeExt().updateSwappingConditions(),o.getNextNode().getOnCircleNodeExt().updateSwappingConditions()):(i.getNextNode().getOnCircleNodeExt().updateSwappingConditions(),o.getPrevNode().getOnCircleNodeExt().updateSwappingConditions())},l.prototype.checkAndReverseIfReverseIsBetter=function(){for(var e=this.getInterClusterEdges(),t=new Array(e.length),n=void 0,r=this.getParent().getCenter(),o=void 0,a=void 0,s=void 0,l=this.onCircleNodes.length,h=new Array(l),f=0;f1&&d++;for(var p=this.onCircleNodes,v=l+d,b=new Array(2*v),y=new Array(2*v),w=void 0,m=-1,x=0;x_)return this.reverseNodes(),this.setMayNotBeReversed(),!0}return!1},l.prototype.computeAlignmentScore=function(e,t){return new o(e,t,20,-1,-2).getScore()},l.prototype.reverseNodes=function(){for(var e=this.getOnCircleNodes(),t=this.getOnCircleNodes().length,n=0;n-1&&this.onCircleNodes.splice(t,1),this.inCircleNodes.push(e);for(var n=0;nMath.min(l,h)&&0!==h&&0!==l&&(t=!0)}return t},i.prototype.calculateTotalCrossingWithList=function(e){for(var t=0,n=0;ne.getAngle()||t.getAngle()===e.getAngle()&&e!==t&&this.ownerCircle.getOrder(this.ownerCircle.getThisEnd(e.getEdge()),this.ownerCircle.getThisEnd(t.getEdge()))}},{key:"_quicksort",value:function(e,t,n){if(t0&&null!=p){var v=f.indexOf(p);v>-1?d[v].push(e[g].data("id")):(f.push(p),d.push([e[g].data("id")]))}}n=d}for(var b=function(e){if(0===n[e].length)return"continue";var t=r.newNode(null);t.setClusterId(e),u.add(t);var i=r.newCircleLGraph(null);r.graphManager.add(i,t),i.margin=i.margin+15,n[e].forEach((function(t){var n=l.get(t),r=n.layoutDimensions({nodeDimensionsIncludeLabels:!1}),u=s.newCiSEOnCircleNode(new o(n.position("x")-r.w/2,n.position("y")-r.h/2),new a(parseFloat(r.w),parseFloat(r.h)));u.setId(t),u.setClusterId(e),i.getOnCircleNodes().push(u),i.add(u),i.getInNodes().push(u),c[u.getId()]=u}))},y=0;y-1&&(o.getInNodes().splice(a,1),o.getOutNodes().push(t))}if(-1!==i){var s=n.getOwner(),c=s.getInNodes().indexOf(n);c>-1&&(s.getInNodes().splice(c,1),s.getOutNodes().push(n))}})),c},v.prototype.doStep1=function(){this.step=v.STEP_1,this.phase=v.PHASE_OTHER;for(var e=new i,t=this.graphManager.getGraphs(),n=0;n0){var O=r.getParent(),T=a.getParent();O.setLocation(T.getLocation().x,T.getLocation().y),r.setRadius(a.getRadius()),r.calculateParentNodeDimension()}}}},v.prototype.doStep2=function(){this.step=v.STEP_2,this.phase=v.PHASE_OTHER;var e=[],t=[],n=new i,r=new i,o=new u;o.isSubLayout=!1,o.useMultiLevelScaling=!1,o.useFRGridVariant=!0,o.springConstant*=1.5;for(var a=o.newGraphManager().addRoot(),s=this.graphManager.getNonOnCircleNodes(),c=0;cthis.maxIterations/4)&&this.isConverged())return!0;this.coolingFactor=this.initialCoolingFactor*((this.maxIterations-this.iterations)/this.maxIterations)}if(this.totalDisplacement=0,this.step===v.STEP_3)this.iterations%l.REVERSE_PERIOD==0&&this.checkAndReverseIfReverseIsBetter();else if(this.step===v.STEP_4){this.iterations%l.SWAP_HISTORY_CLEARANCE_PERIOD==0&&(this.swappedPairsInLastIteration=[]);var e=this.iterations%l.SWAP_PERIOD;e>=l.SWAP_IDLE_DURATION?this.phase=v.PHASE_SWAP_PREPERATION:this.phase=0===e?v.PHASE_PERFORM_SWAP:v.PHASE_OTHER}return this.calcSpringForces(),this.calcRepulsionForces(),this.calcGravitationalForces(),this.calcTotalForces(),this.moveNodes(),this.iterations>=this.maxIterations},v.prototype.prepareCirclesForReversal=function(){this.graphManager.getRoot().getNodes().forEach((function(e){var t=e.getChild();null!=t&&(t.getInterClusterEdges().length<2&&t.setMayNotBeReversed(),t.computeOrderMatrix())}))},v.prototype.calcIdealEdgeLengths=function(e){for(var t=this.graphManager.getAllEdges(),n=0;n0&&w>0||y<0&&w<0);0===y||0===w?c.push(E):s.push(E)}var C=void 0,k=!0,_=void 0;for(s.sort((function(e,t){return e.getDiscrepancy()-t.getDiscrepancy()}));k&&s.length>0;)if(f=(C=s[s.length-1]).getFirstNode(),d=C.getSecondNode(),g=f.getOnCircleNodeExt(),b=d.getOnCircleNodeExt(),this.isSwappedPreviously(C))s.pop(),h.push(C);else{var N=g.getInterClusterIntersections(b);C.swap(),_=!1;var S=g.getInterClusterIntersections(b);(_=S>N)||S!==N||(_=C.inSameDirection()||C.getDiscrepancy()=0&&null==t;i--){var o=r[i];if(0===o.getOnCircleNodeExt().getInterClusterEdges().length){var a=this.findMinimalSpanningSegment(o);if(0!==a.length){for(var s=!1,c=0;c1&&(p=g-d,p+=n,p%=n),p>1){s=!0;break}}}}s||(t=o)}}}return t},v.prototype.moveInnerNode=function(e){e.getOwner().moveOnCircleNodeInside(e);var t=this.graphManager.getOnCircleNodes(),n=t.indexOf(e);n>-1&&t.splice(n,1),this.graphManager.inCircleNodes.push(e)},v.prototype.findMinimalSpanningSegment=function(e){var t=[],n=e.getOnCircleNeighbors();if(0===n.length)return t;n.sort((function(e,t){return e.getOnCircleNodeExt().getIndex()-t.getOnCircleNodeExt().getIndex()}));var r=e.getOwner().getOnCircleNodes();r.sort((function(e,t){return e.getOnCircleNodeExt().getIndex()-t.getOnCircleNodeExt().getIndex()}));var i=null,o=null,a=r.length,s=r.length,c=n.length,u=void 0,l=void 0,h=void 0,f=void 0,d=void 0;for(u=0;uo.MAX_NODE_DISPLACEMENT&&(e=o.MAX_NODE_DISPLACEMENT*i.sign(e)),e},s.prototype.getOnCircleNeighbors=function(){for(var e=Array.from(this.getNeighborsList()),t=[],n=0;n-1&&n.splice(t,1)})),e.forEach((function(e){t+=e.calculateTotalCrossingWithList(n)})),t},i.prototype.updateSwappingConditions=function(){var e=this.calculateTotalCrossing(),t=this.orderIndex,n=this.getNextNode().getOnCircleNodeExt();this.orderIndex=n.getIndex(),n.setIndex(t);var r=this.calculateTotalCrossing();this.canSwapWithNext=r<=e,n.setIndex(this.orderIndex),this.setIndex(t);var i=this.getPrevNode().getOnCircleNodeExt();this.orderIndex=i.getIndex(),i.setIndex(t),r=this.calculateTotalCrossing(),this.canSwapWithPrevious=r<=e,i.setIndex(this.orderIndex),this.setIndex(t)},i.prototype.swapWith=function(e){this.ciseNode.getOwner().swapNodes(this.ciseNode,e.ciseNode)},i.prototype.getInterClusterIntersections=function(e){for(var t=0,n=this.getInterClusterEdges(),i=e.getInterClusterEdges(),o=0;o1&&void 0!==arguments[1]?arguments[1]:r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r,o=!1,a=e,s=0;s0&&m.constraints(_),m.groups(d.map((function(e,n){var r=l(t.nodeSpacing,e),i=function(t){return parseFloat(e.style("padding-"+t))},o=i("left")+r,a=i("right")+r,s=i("top")+r,c=i("bottom")+r;return e.scratch().cola={index:n,padding:Math.max(o,a,s,c),leaves:e.children().intersection(g).map((function(e){return e[0].scratch().cola.index})),fixed:e.locked()},e})).map((function(e){return e.scratch().cola.groups=e.children().intersection(d).map((function(e){return e.scratch().cola.index})),e.scratch().cola})));var N=void 0,S=void 0;if(null!=t.edgeLength?(N=t.edgeLength,S="linkDistance"):null!=t.edgeSymDiffLength?(N=t.edgeSymDiffLength,S="symmetricDiffLinkLengths"):null!=t.edgeJaccardLength?(N=t.edgeJaccardLength,S="jaccardLinkLengths"):(N=100,S="linkDistance"),m.links(h.stdFilter((function(e){return g.contains(e.source())&&g.contains(e.target())})).map((function(e){var t=e.scratch().cola={source:e.source()[0].scratch().cola.index,target:e.target()[0].scratch().cola.index};return null!=N&&(t.calcLength=l(N,e)),t}))),m.size([p.w,p.h]),null!=N&&m[S]((function(e){return e.calcLength})),t.flow){var O=void 0;!function(e){return(void 0===e?"undefined":r(e))===r("")}(t.flow)?c(t.flow)?O={axis:"y",minSeparation:t.flow}:function(e){return null!=e&&(void 0===e?"undefined":r(e))===r({})}(t.flow)?((O=t.flow).axis=O.axis||"y",O.minSeparation=null!=O.minSeparation?O.minSeparation:50):O={axis:"y",minSeparation:50}:O={axis:t.flow,minSeparation:50},m.flowLayout(O.axis,O.minSeparation)}return e.trigger({type:"layoutstart",layout:e}),m.avoidOverlaps(t.avoidOverlap).handleDisconnected(t.handleDisconnected).start(t.unconstrIter,t.userConstIter,t.allConstIter,void 0,void 0,t.centerGraph),t.infinite||setTimeout((function(){e.manuallyStopped||m.stop()}),t.maxSimulationTime),this},h.prototype.stop=function(){return this.adaptor&&(this.manuallyStopped=!0,this.adaptor.stop()),this},e.exports=h},function(e,t,n){"use strict";e.exports=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r0&&(a=n.getGraphManager().add(n.newGraph(),o),this.processChildrenList(a,h,n))}},h.prototype.stop=function(){return this.stopped=!0,this};var d=function(e){e("layout","cose-bilkent",h)};"undefined"!=typeof cytoscape&&d(cytoscape),e.exports=d}])},e.exports=r(n(4182))},9142:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){var r=n(1),i=function(e){e&&e("layout","dagre",r)};"undefined"!=typeof cytoscape&&i(cytoscape),e.exports=i},function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var i=n(2),o=n(3),a=n(4);function s(e){this.options=o({},i,e)}s.prototype.run=function(){var e=this.options,t=e.cy,n=e.eles,i=function(e,t){return function(e){return"function"==typeof e}(t)?t.apply(e,[e]):t},o=e.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()};void 0===o.x2&&(o.x2=o.x1+o.w),void 0===o.w&&(o.w=o.x2-o.x1),void 0===o.y2&&(o.y2=o.y1+o.h),void 0===o.h&&(o.h=o.y2-o.y1);var s=new a.graphlib.Graph({multigraph:!0,compound:!0}),c={},u=function(e,t){null!=t&&(c[e]=t)};u("nodesep",e.nodeSep),u("edgesep",e.edgeSep),u("ranksep",e.rankSep),u("rankdir",e.rankDir),u("ranker",e.ranker),s.setGraph(c),s.setDefaultEdgeLabel((function(){return{}})),s.setDefaultNodeLabel((function(){return{}}));for(var l=n.nodes(),h=0;h1?t-1:0),r=1;r1?t-1:0),r=1;r1&&(c.velocity.x=l/f,c.velocity.y=h/f),r=t*c.velocity.x,o=t*c.velocity.y,c.pos.x+=r,c.pos.y+=o,i+=Math.abs(r),a+=Math.abs(o)}}return(i*i+a*a)/s}}},function(e,t,n){"use strict";var r=n(9),i=n(8),o=function(e,t){var n=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);return n<1e-8&&r<1e-8};function a(e,t){return 0===t?e.quad0:1===t?e.quad1:2===t?e.quad2:3===t?e.quad3:null}function s(e,t,n){0===t?e.quad0=n:1===t?e.quad1=n:2===t?e.quad2=n:3===t&&(e.quad3=n)}e.exports={makeQuadtree:function(){var e=[],t=new i,n=[],c=0,u=l();function l(){var e=n[c];return e?(e.quad0=null,e.quad1=null,e.quad2=null,e.quad3=null,e.body=null,e.mass=e.massX=e.massY=0,e.left=e.right=e.top=e.bottom=0):(e=new r,n[c]=e),++c,e}function h(e){for(t.reset(),t.push(u,e);!t.isEmpty();){var n=t.pop(),r=n.node,i=n.body;if(r.body){var c=r.body;if(r.body=null,o(c.pos,i.pos)){var h=3;do{var f=Math.random(),d=(r.right-r.left)*f,g=(r.bottom-r.top)*f;c.pos.x=r.left+d,c.pos.y=r.top+g,h-=1}while(h>0&&o(c.pos,i.pos));if(0===h&&o(c.pos,i.pos))return}t.push(r,c),t.push(r,i)}else{var p=i.pos.x,v=i.pos.y;r.mass=r.mass+i.mass,r.massX=r.massX+i.mass*p,r.massY=r.massY+i.mass*v;var b=0,y=r.left,w=(r.right+y)/2,m=r.top,x=(r.bottom+m)/2;p>w&&(b+=1,y=w,w=r.right),v>x&&(b+=2,m=x,x=r.bottom);var E=a(r,b);E?t.push(E,i):((E=l()).left=y,E.top=m,E.right=w,E.bottom=x,E.body=i,s(r,b,E))}}}return{insertBodies:function(e){if(0!==e.length){var t=Number.MAX_VALUE,n=Number.MAX_VALUE,r=Number.MIN_VALUE,i=Number.MIN_VALUE,o=void 0,a=e.length;for(o=a;o--;){var s=e[o].pos.x,f=e[o].pos.y;sr&&(r=s),fi&&(i=f)}var d=r-t,g=i-n;for(d>g?i=n+d:r=t+g,c=0,(u=l()).left=t,u.right=r,u.top=n,u.bottom=i,(o=a-1)>=0&&(u.body=e[o]);o--;)h(e[o])}},updateBodyForce:function(t,n,r,i){var o=e,a=void 0,s=void 0,c=void 0,l=void 0,h=0,f=0,d=1,g=0,p=1;o[0]=u,function(e){e.x=0,e.y=0}(t.force);var v=-t.pos.x,b=-t.pos.y,y=Math.sqrt(v*v+b*b),w=t.mass*i/y;for(h+=w*v,f+=w*b;d;){var m=o[g],x=m.body;d-=1,g+=1;var E=x!==t;x&&E?(s=x.pos.x-t.pos.x,c=x.pos.y-t.pos.y,0===(l=Math.sqrt(s*s+c*c))&&(s=(Math.random()-.5)/50,c=(Math.random()-.5)/50,l=Math.sqrt(s*s+c*c)),h+=(a=n*x.mass*t.mass/(l*l*l))*s,f+=a*c):E&&(s=m.massX/m.mass-t.pos.x,c=m.massY/m.mass-t.pos.y,0===(l=Math.sqrt(s*s+c*c))&&(s=(Math.random()-.5)/50,c=(Math.random()-.5)/50,l=Math.sqrt(s*s+c*c)),(m.right-m.left)/l0)return this.stack[--this.popIdx]},reset:function(){this.popIdx=0}}},function(e,t,n){"use strict";e.exports=function(){this.body=null,this.quad0=null,this.quad1=null,this.quad2=null,this.quad3=null,this.mass=0,this.massX=0,this.massY=0,this.left=0,this.top=0,this.bottom=0,this.right=0}},function(e,t,n){"use strict";var r=n(6).integrate,i=n(5).applyDrag,o=n(1).applySpring;e.exports={tick:function(e){var t=e.bodies,n=e.springs,a=e.quadtree,s=e.timeStep,c=e.gravity,u=e.theta,l=e.dragCoeff,h=e.pull;t.forEach((function(e){var t=e._scratch;t&&(e.locked=t.locked,e.grabbed=t.grabbed,e.pos.x=t.x,e.pos.y=t.y)})),a.insertBodies(t);for(var f=0;f=t.maxIterations||r>=t.maxSimulationTime)};e.exports={tick:i,multitick:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r,o=!1,a=e,s=0;s1?t-1:0),r=1;r1?t-1:0),r=1;r1&&(console.warn("Popper.js Extension should only be used on one element."),console.warn("Ignoring all subsequent elements"))}e.exports={popper:function(e){return s(this),i(this[0],a(this[0],e))},popperRef:function(e){return s(this),o(this[0],a(this[0],e))}}},function(e,t,n){"use strict";var r=n(0),i=n(2).getPopper,o=n(1).getRef;function a(e,t){return r({},{boundingBox:{top:0,left:0,right:0,bottom:0,w:3,h:3},renderedDimensions:function(){return{w:3,h:3}},renderedPosition:function(){return{x:0,y:0}},popper:{},cy:e},t)}e.exports={popper:function(e){return i(this,a(this,e))},popperRef:function(e){return o(this,a(this,e))}}},function(e,t,n){"use strict";e.exports={getBoundingBox:function(e,t){var n=t.renderedPosition,r=t.cy,i=t.renderedDimensions,o=r.container().getBoundingClientRect(),a=i(e),s=n(e);return{top:s.y+o.top,left:s.x+o.left,right:s.x+a.w+o.left,bottom:s.y+a.h+o.top,width:a.w,height:a.h}}}},function(e,t,n){"use strict";e.exports={getContent:function(e,t){var n;if("function"!=typeof t){if(t instanceof HTMLElement)return t;throw new Error("Can not create popper from 'target' with unknown type")}if(null===(n=t(e)))throw new Error("No 'target' specified to create popper");return n}}},function(e,t,n){"use strict";var r=n(4),i=n(3),o=function(e){e&&(e("core","popper",r.popper),e("collection","popper",i.popper),e("core","popperRef",r.popperRef),e("collection","popperRef",i.popperRef))};"undefined"!=typeof cytoscape&&o(cytoscape),e.exports=o},function(t,n){t.exports=e}])},e.exports=r(n(4750))},9058:(e,t,n)=>{"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=r(n(1296)),o=r(n(4485));function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;nt?1:0},B=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n1&&void 0!==arguments[1]?arguments[1]:W,r=n;!(t=e.next()).done;)r=r*Z+t.value|0;return r},Q=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W;return t*Z+e|0},J=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$;return(t<<5)+t+e|0},ee=function(e){return 2097152*e[0]+e[1]},te=function(e,t){return[Q(e[0],t[0]),J(e[1],t[1])]},ne=function(e,t){var n={value:0,done:!1},r=0,i=e.length;return K({next:function(){return r=0&&(e[r]!==t||(e.splice(r,1),!n));r--);},Ee=function(e){e.splice(0,e.length)},Ce=function(e,t,n){return n&&(t=D(n,t)),e[t]},ke=function(e,t,n,r){n&&(t=D(n,t)),e[t]=r},_e="undefined"!=typeof Map?Map:function(){function e(){s(this,e),this._obj={}}return u(e,[{key:"set",value:function(e,t){return this._obj[e]=t,this}},{key:"delete",value:function(e){return this._obj[e]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(e){return void 0!==this._obj[e]}},{key:"get",value:function(e){return this._obj[e]}}]),e}(),Ne=function(){function e(t){if(s(this,e),this._obj=Object.create(null),this.size=0,null!=t){var n;n=null!=t.instanceString&&t.instanceString()===this.instanceString()?t.toArray():t;for(var r=0;r2&&void 0!==arguments[2])||arguments[2];if(void 0!==e&&void 0!==t&&O(e)){var r=t.group;if(null==r&&(r=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"===r||"edges"===r){this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,pannable:void 0===t.pannable?"edges"===r:!!t.pannable,active:!1,classes:new Se,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==i.position.x&&(i.position.x=0),null==i.position.y&&(i.position.y=0),t.renderedPosition){var o=t.renderedPosition,a=e.pan(),s=e.zoom();i.position={x:(o.x-a.x)/s,y:(o.y-a.y)/s}}var c=[];x(t.classes)?c=t.classes:w(t.classes)&&(c=t.classes.split(/\s+/));for(var u=0,l=c.length;u0;){var k=y.pop(),_=v(k),N=k.id();if(f[N]=_,_!==1/0)for(var S=k.neighborhood().intersect(g),O=0;O0)for(n.unshift(t);h[i];){var o=h[i];n.unshift(o.edge),n.unshift(o.node),i=(r=o.node).id()}return s.spawn(n)}}}},Me={kruskal:function(e){e=e||function(e){return 1};for(var t=this.byGroup(),n=t.nodes,r=t.edges,i=n.length,o=new Array(i),a=n,s=function(e){for(var t=0;t0;){if(l=(u=v.pop()).id(),b.delete(l),E++,l===f){for(var C=[],k=i,_=f,N=w[_];C.unshift(k),null!=N&&C.unshift(N),null!=(k=y[_]);)N=w[_=k.id()];return{found:!0,distance:d[l],path:this.spawn(C),steps:E}}p[l]=!0;for(var S=u._private.edges,O=0;OS&&(d[N]=S,b[N]=_,y[N]=x),!i){var O=_*u+k;!i&&d[O]>S&&(d[O]=S,b[O]=k,y[O]=x)}}}for(var T=0;T1&&void 0!==arguments[1]?arguments[1]:o,r=b(e),i=[],a=r;;){if(null==a)return t.spawn();var c=v(a),u=c.edge,l=c.pred;if(i.unshift(a[0]),a.same(n)&&i.length>0)break;null!=u&&i.unshift(u),a=l}return s.spawn(i)},hasNegativeWeightCycle:g,negativeWeightCycles:[]}}},He=Math.sqrt(2),Fe=function(e,t,n){0===n.length&&de("Karger-Stein must be run on a connected (sub)graph");for(var r=n[e],i=r[1],o=r[2],a=t[i],s=t[o],c=n,u=c.length-1;u>=0;u--){var l=c[u],h=l[1],f=l[2];(t[h]===a&&t[f]===s||t[h]===s&&t[f]===a)&&c.splice(u,1)}for(var d=0;dr;){var i=Math.floor(Math.random()*t.length);t=Fe(i,e,t),n--}return t},ze={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,r=t.edges;r.unmergeBy((function(e){return e.isLoop()}));var i=n.length,o=r.length,a=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),s=Math.floor(i/He);if(!(i<2)){for(var c=[],u=0;u0?1:e<0?-1:0},$e=function(e,t){return Math.sqrt(Ke(e,t))},Ke=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},Qe=function(e){for(var t=e.length,n=0,r=0;r=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(null!=e.w&&null!=e.h&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},rt=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},it=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},ot=function(e){var t,n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===o.length)t=n=r=i=o[0];else if(2===o.length)t=r=o[0],i=n=o[1];else if(4===o.length){var a=h(o,4);t=a[0],n=a[1],r=a[2],i=a[3]}return e.x1-=i,e.x2+=n,e.y1-=t,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},at=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},st=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},ct=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},ut=function(e,t){return ct(e,t.x1,t.y1)&&ct(e,t.x2,t.y2)},lt=function(e,t,n,r,i,o,a){var s,c=Ot(i,o),u=i/2,l=o/2,h=r-l-a;if((s=Et(e,t,n,r,n-u+c-a,h,n+u-c+a,h,!1)).length>0)return s;var f=n+u+a;if((s=Et(e,t,n,r,f,r-l+c-a,f,r+l-c+a,!1)).length>0)return s;var d=r+l+a;if((s=Et(e,t,n,r,n-u+c-a,d,n+u-c+a,d,!1)).length>0)return s;var g,p=n-u-a;if((s=Et(e,t,n,r,p,r-l+c-a,p,r+l-c+a,!1)).length>0)return s;var v=n-u+c,b=r-l+c;if((g=mt(e,t,n,r,v,b,c+a)).length>0&&g[0]<=v&&g[1]<=b)return[g[0],g[1]];var y=n+u-c,w=r-l+c;if((g=mt(e,t,n,r,y,w,c+a)).length>0&&g[0]>=y&&g[1]<=w)return[g[0],g[1]];var m=n+u-c,x=r+l-c;if((g=mt(e,t,n,r,m,x,c+a)).length>0&&g[0]>=m&&g[1]>=x)return[g[0],g[1]];var E=n-u+c,C=r+l-c;return(g=mt(e,t,n,r,E,C,c+a)).length>0&&g[0]<=E&&g[1]>=C?[g[0],g[1]]:[]},ht=function(e,t,n,r,i,o,a){var s=a,c=Math.min(n,i),u=Math.max(n,i),l=Math.min(r,o),h=Math.max(r,o);return c-s<=e&&e<=u+s&&l-s<=t&&t<=h+s},ft=function(e,t,n,r,i,o,a,s,c){var u=Math.min(n,a,i)-c,l=Math.max(n,a,i)+c,h=Math.min(r,s,o)-c,f=Math.max(r,s,o)+c;return!(el||tf)},dt=function(e,t,n,r,i,o,a,s){var c,u,l,h,f,d,g,p,v,b,y,w,m,x=[];u=9*n*i-3*n*n-3*n*a-6*i*i+3*i*a+9*r*o-3*r*r-3*r*s-6*o*o+3*o*s,l=3*n*n-6*n*i+n*a-n*e+2*i*i+2*i*e-a*e+3*r*r-6*r*o+r*s-r*t+2*o*o+2*o*t-s*t,h=1*n*i-n*n+n*e-i*e+r*o-r*r+r*t-o*t,0===(c=1*n*n-4*n*i+2*n*a+4*i*i-4*i*a+a*a+r*r-4*r*o+2*r*s+4*o*o-4*o*s+s*s)&&(c=1e-5),p=-27*(h/=c)+(u/=c)*(9*(l/=c)-u*u*2),d=(g=(3*l-u*u)/9)*g*g+(p/=54)*p,(f=x)[1]=0,w=u/3,d>0?(b=(b=p+Math.sqrt(d))<0?-Math.pow(-b,1/3):Math.pow(b,1/3),y=(y=p-Math.sqrt(d))<0?-Math.pow(-y,1/3):Math.pow(y,1/3),f[0]=-w+b+y,w+=(b+y)/2,f[4]=f[2]=-w,w=Math.sqrt(3)*(-y+b)/2,f[3]=w,f[5]=-w):(f[5]=f[3]=0,0===d?(m=p<0?-Math.pow(-p,1/3):Math.pow(p,1/3),f[0]=2*m-w,f[4]=f[2]=-(m+w)):(v=(g=-g)*g*g,v=Math.acos(p/Math.sqrt(v)),m=2*Math.sqrt(g),f[0]=-w+m*Math.cos(v/3),f[2]=-w+m*Math.cos((v+2*Math.PI)/3),f[4]=-w+m*Math.cos((v+4*Math.PI)/3)));for(var E=[],C=0;C<6;C+=2)Math.abs(x[C+1])<1e-7&&x[C]>=0&&x[C]<=1&&E.push(x[C]);E.push(1),E.push(0);for(var k,_,N,S=-1,O=0;O=0?Nc?(e-i)*(e-i)+(t-o)*(t-o):u-h},pt=function(e,t,n){for(var r,i,o,a,s=0,c=0;c=e&&e>=o||r<=e&&e<=o))continue;(e-r)/(o-r)*(a-i)+i>t&&s++}return s%2!=0},vt=function(e,t,n,r,i,o,a,s,c){var u,l=new Array(n.length);null!=s[0]?(u=Math.atan(s[1]/s[0]),s[0]<0?u+=Math.PI/2:u=-u-Math.PI/2):u=s;for(var h,f=Math.cos(-u),d=Math.sin(-u),g=0;g0){var p=yt(l,-c);h=bt(p)}else h=l;return pt(e,t,h)},bt=function(e){for(var t,n,r,i,o,a,s,c,u=new Array(e.length/2),l=0;l=0&&g<=1&&v.push(g),p>=0&&p<=1&&v.push(p),0===v.length)return[];var b=v[0]*s[0]+e,y=v[0]*s[1]+t;return v.length>1?v[0]==v[1]?[b,y]:[b,y,v[1]*s[0]+e,v[1]*s[1]+t]:[b,y]},xt=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},Et=function(e,t,n,r,i,o,a,s,c){var u=e-i,l=n-e,h=a-i,f=t-o,d=r-t,g=s-o,p=h*f-g*u,v=l*f-d*u,b=g*l-h*d;if(0!==b){var y=p/b,w=v/b,m=-.001;return m<=y&&y<=1.001&&m<=w&&w<=1.001||c?[e+y*l,t+y*d]:[]}return 0===p||0===v?xt(e,n,a)===a?[a,s]:xt(e,n,i)===i?[i,o]:xt(i,a,n)===n?[n,r]:[]:[]},Ct=function(e,t,n,r,i,o,a,s){var c,u,l,h,f,d,g=[],p=new Array(n.length),v=!0;if(null==o&&(v=!1),v){for(var b=0;b0){var y=yt(p,-s);u=bt(y)}else u=p}else u=n;for(var w=0;wl&&(l=t)},f=function(e){return u[e]},d=0;d0?x.edgesTo(m)[0]:m.edgesTo(x)[0];var E=r(w);m=m.id(),d[m]>d[b]+E&&(d[m]=d[b]+E,g.nodes.indexOf(m)<0?g.push(m):g.updateItem(m),l[m]=0,u[m]=[]),d[m]==d[b]+E&&(l[m]=l[m]+l[b],u[m].push(b))}else for(var C=0;C0;){for(var S=n.pop(),O=0;O0&&a.push(n[s]);0!==a.length&&i.push(r.collection(a))}return i}(l,c,t,r);return w=function(e){for(var t=0;t5&&void 0!==arguments[5]?arguments[5]:Zt,a=r,s=0;s=2?tn(e,t,n,0,Qt,Jt):tn(e,t,n,0,Kt)},squaredEuclidean:function(e,t,n){return tn(e,t,n,0,Qt)},manhattan:function(e,t,n){return tn(e,t,n,0,Kt)},max:function(e,t,n){return tn(e,t,n,-1/0,en)}};function rn(e,t,n,r,i,o){var a;return a=m(e)?e:nn[e]||nn.euclidean,0===t&&m(e)?a(i,o):a(t,n,r,i,o)}nn["squared-euclidean"]=nn.squaredEuclidean,nn.squaredeuclidean=nn.squaredEuclidean;var on=me({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),an=function(e){return on(e)},sn=function(e,t,n,r,i){var o="kMedoids"!==i?function(e){return n[e]}:function(e){return r[e](n)},a=n,s=t;return rn(e,r.length,o,(function(e){return r[e](t)}),a,s)},cn=function(e,t,n){for(var r=n.length,i=new Array(r),o=new Array(r),a=new Array(t),s=null,c=0;cn)return!1;return!0},fn=function(e,t,n){for(var r=0;ri&&(i=t[c][u],o=u);a[o].push(e[c])}for(var l=0;l=i.threshold||"dendrogram"===i.mode&&1===e.length)return!1;var d,g=t[a],p=t[r[a]];d="dendrogram"===i.mode?{left:g,right:p,key:g.key}:{value:g.value.concat(p.value),key:g.key},e[g.index]=d,e.splice(p.index,1),t[g.key]=d;for(var v=0;vn[p.key][b.key]&&(o=n[p.key][b.key])):"max"===i.linkage?(o=n[g.key][b.key],n[g.key][b.key]a&&(o=c,a=t[i*e+c])}o>0&&r.push(o)}for(var u=0;u1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?(n0&&e.splice(0,t)):e=e.slice(t,n);for(var o=0,a=e.length-1;a>=0;a--){var s=e[a];i?isFinite(s)||(e[a]=-1/0,o++):e.splice(a,1)}r&&e.sort((function(e,t){return e-t}));var c=e.length,u=Math.floor(c/2);return c%2!=0?e[u+1+o]:(e[u-1+o]+e[u+o])/2}(e):"mean"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0,i=0,o=t;o1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=1/0,i=t;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=-1/0,i=t;i=S?(O=S,S=L,T=I):L>O&&(O=L);for(var A=0;A0?1:0;k[E%u.minIterations*t+G]=B,R+=B}if(R>0&&(E>=u.minIterations-1||E==u.maxIterations-1)){for(var H=0,F=0;F0&&r.push(i);return r}(t,o,a),V=function(e,t,n){for(var r=Tn(e,t,n),i=0;ic&&(s=u,c=l)}n[i]=o[s]}return Tn(e,t,n)}(t,r,z),U={},q=0;q1)}}));var c=Object.keys(t).filter((function(e){return t[e].cutVertex})).map((function(t){return e.getElementById(t)}));return{cut:e.spawn(c),components:i}},Pn=function(){var e=this,t={},n=0,r=[],i=[],o=e.spawn(e),a=function a(s){if(i.push(s),t[s]={index:n,low:n++,explored:!1},e.getElementById(s).connectedEdges().intersection(e).forEach((function(e){var n=e.target().id();n!==s&&(n in t||a(n),t[n].explored||(t[s].low=Math.min(t[s].low,t[n].low)))})),t[s].index===t[s].low){for(var c=e.spawn();;){var u=i.pop();if(c.merge(e.getElementById(u)),t[u].low=t[s].index,t[u].explored=!0,u===s)break}var l=c.edgesWith(c),h=c.merge(l);r.push(h),o=o.difference(h)}};return e.forEach((function(e){if(e.isNode()){var n=e.id();n in t||a(n)}})),{cut:o,components:r}},Dn={};[Le,Ae,Me,De,Re,Be,ze,At,Pt,jt,Gt,Wt,yn,Nn,In,{hierholzer:function(e){if(!E(e)){var t=arguments;e={root:t[0],directed:t[1]}}var n,r,i,o=An(e),a=o.root,s=o.directed,c=this,u=!1;a&&(i=w(a)?this.filter(a)[0].id():a[0].id());var l={},h={};s?c.forEach((function(e){var t=e.id();if(e.isNode()){var i=e.indegree(!0),o=e.outdegree(!0),a=i-o,s=o-i;1==a?n?u=!0:n=t:1==s?r?u=!0:r=t:(s>1||a>1)&&(u=!0),l[t]=[],e.outgoers().forEach((function(e){e.isEdge()&&l[t].push(e.id())}))}else h[t]=[void 0,e.target().id()]})):c.forEach((function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(n?r?u=!0:r=t:n=t),l[t]=[],e.connectedEdges().forEach((function(e){return l[t].push(e.id())}))):h[t]=[e.source().id(),e.target().id()]}));var f={found:!1,trail:void 0};if(u)return f;if(r&&n)if(s){if(i&&r!=i)return f;i=r}else{if(i&&r!=i&&n!=i)return f;i||(i=r)}else i||(i=c[0].id());var d=function(e){for(var t,n,r,i=e,o=[e];l[i].length;)t=l[i].shift(),n=h[t][0],i!=(r=h[t][1])?(l[r]=l[r].filter((function(e){return e!=t})),i=r):s||i==n||(l[n]=l[n].filter((function(e){return e!=t})),i=n),o.unshift(t),o.unshift(i);return o},g=[],p=[];for(p=d(i);1!=p.length;)0==l[p[0]].length?(g.unshift(c.getElementById(p.shift())),g.unshift(c.getElementById(p.shift()))):p=d(p.shift()).concat(p);for(var v in g.unshift(c.getElementById(p.shift())),l)if(l[v].length)return f;return f.found=!0,f.trail=this.spawn(g,!0),f}},{hopcroftTarjanBiconnected:Mn,htbc:Mn,htb:Mn,hopcroftTarjanBiconnectedComponents:Mn},{tarjanStronglyConnected:Pn,tsc:Pn,tscc:Pn,tarjanStronglyConnectedComponents:Pn}].forEach((function(e){B(Dn,e)}));var jn=function e(t){if(!(this instanceof e))return new e(t);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof t&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))};jn.prototype={fulfill:function(e){return Rn(this,1,"fulfillValue",e)},reject:function(e){return Rn(this,2,"rejectReason",e)},then:function(e,t){var n=this,r=new jn;return n.onFulfilled.push(Hn(e,r,"fulfill")),n.onRejected.push(Hn(t,r,"reject")),Gn(n),r.proxy}};var Rn=function(e,t,n,r){return 0===e.state&&(e.state=t,e[n]=r,Gn(e)),e},Gn=function(e){1===e.state?Bn(e,"onFulfilled",e.fulfillValue):2===e.state&&Bn(e,"onRejected",e.rejectReason)},Bn=function(e,t,n){if(0!==e[t].length){var r=e[t];e[t]=[];var i=function(){for(var e=0;e0:void 0}},clearQueue:function(){return function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n0&&this.spawn(r).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return null!=t&&t._private.classes.has(e)},toggleClass:function(e,t){x(e)||(e=e.match(/\S+/g)||[]);for(var n=this,r=void 0===t,i=[],o=0,a=n.length;o0&&this.spawn(i).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(null==t)t=250;else if(0===t)return n;return n.addClass(e),setTimeout((function(){n.removeClass(e)}),t),n}};$n.className=$n.classNames=$n.classes;var Kn={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:R,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Kn.variable="(?:[\\w-]|(?:\\\\"+Kn.metaChar+"))+",Kn.value=Kn.string+"|"+Kn.number,Kn.className=Kn.variable,Kn.id=Kn.variable,function(){var e,t,n;for(e=Kn.comparatorOp.split("|"),n=0;n=0||"="!==t&&(Kn.comparatorOp+="|\\!"+t)}();var Qn=20,Jn=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort((function(e,t){return function(e,t){return-1*G(e,t)}(e.selector,t.selector)})),er=function(){for(var e,t={},n=0;n0&&u.edgeCount>0)return pe("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(u.edgeCount>1)return pe("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===u.edgeCount&&pe("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var e=function(e){return null==e?"":e},t=function(t){return w(t)?'"'+t+'"':e(t)},n=function(e){return" "+e+" "},r=function(i,o){return i.checks.reduce((function(a,s,c){return a+(o===i&&0===c?"$":"")+function(i,o){var a=i.type,s=i.value;switch(a){case 0:var c=e(s);return c.substring(0,c.length-1);case 3:var u=i.field,l=i.operator;return"["+u+n(e(l))+t(s)+"]";case 5:var h=i.operator,f=i.field;return"["+e(h)+f+"]";case 4:return"["+i.field+"]";case 6:var d=i.operator;return"[["+i.field+n(e(d))+t(s)+"]]";case 7:return s;case 8:return"#"+s;case 9:return"."+s;case 17:case 15:return r(i.parent,o)+n(">")+r(i.child,o);case 18:case 16:return r(i.ancestor,o)+" "+r(i.descendant,o);case 19:var g=r(i.left,o),p=r(i.subject,o),v=r(i.right,o);return g+(g.length>0?" ":"")+p+v;case Qn:return""}}(s,o)}),"")},i="",o=0;o1&&o=0&&(t=t.replace("!",""),l=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),u=!0),(a||c||u)&&(i=a||s?""+e:"",o=""+n),u&&(e=i=i.toLowerCase(),n=o=o.toLowerCase()),t){case"*=":r=i.indexOf(o)>=0;break;case"$=":r=i.indexOf(o,i.length-o.length)>=0;break;case"^=":r=0===i.indexOf(o);break;case"=":r=e===n;break;case">":h=!0,r=e>n;break;case">=":h=!0,r=e>=n;break;case"<":h=!0,r=e0;){var u=i.shift();t(u),o.add(u.id()),a&&r(i,o,u)}return e}function mr(e,t,n){if(n.isParent())for(var r=n._private.children,i=0;i1&&void 0!==arguments[1])||arguments[1];return wr(this,e,t,mr)},yr.forEachUp=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return wr(this,e,t,xr)},yr.forEachUpAndDown=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return wr(this,e,t,Er)},yr.ancestors=yr.parents,(pr=vr={data:Wn.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Wn.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Wn.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Wn.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Wn.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Wn.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}}).attr=pr.data,pr.removeAttr=pr.removeData;var Cr,kr,_r=vr,Nr={};function Sr(e){return function(t){var n=this;if(void 0===t&&(t=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,i=n[0],o=i._private.edges,a=0;at})),minIndegree:Or("indegree",(function(e,t){return et})),minOutdegree:Or("outdegree",(function(e,t){return et}))}),B(Nr,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r0,l=u;u&&(c=c[0]);var h=l?c.position():{x:0,y:0};return i={x:s.x-h.x,y:s.y-h.y},void 0===e?i:i[e]}for(var f=0;f0,v=p;p&&(g=g[0]);var b=v?g.position():{x:0,y:0};void 0!==t?d.position(e,t+b[e]):void 0!==i&&d.position({x:i.x+b.x,y:i.y+b.y})}}else if(!o)return;return this}},Cr.modelPosition=Cr.point=Cr.position,Cr.modelPositions=Cr.points=Cr.positions,Cr.renderedPoint=Cr.renderedPosition,Cr.relativePoint=Cr.relativePosition;var Ir,Ar,Mr=kr;Ir=Ar={},Ar.renderedBoundingBox=function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),i=n.pan(),o=t.x1*r+i.x,a=t.x2*r+i.x,s=t.y1*r+i.y,c=t.y2*r+i.y;return{x1:o,x2:a,y1:s,y2:c,w:a-o,h:c-s}},Ar.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();return t.styleEnabled()&&t.hasCompoundNodes()?(this.forEachUp((function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,e||t.emitAndNotify("bounds")}})),this):this},Ar.updateCompoundBounds=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;if(!e&&t.batching())return this;function n(e){if(e.isParent()){var t=e._private,n=e.children(),r="include"===e.pstyle("compound-sizing-wrt-labels").value,i={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},o=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),a=t.position;0!==o.w&&0!==o.h||((o={w:e.pstyle("width").pfValue,h:e.pstyle("height").pfValue}).x1=a.x-o.w/2,o.x2=a.x+o.w/2,o.y1=a.y-o.h/2,o.y2=a.y+o.h/2);var s=i.width.left.value;"px"===i.width.left.units&&i.width.val>0&&(s=100*s/i.width.val);var c=i.width.right.value;"px"===i.width.right.units&&i.width.val>0&&(c=100*c/i.width.val);var u=i.height.top.value;"px"===i.height.top.units&&i.height.val>0&&(u=100*u/i.height.val);var l=i.height.bottom.value;"px"===i.height.bottom.units&&i.height.val>0&&(l=100*l/i.height.val);var h=b(i.width.val-o.w,s,c),f=h.biasDiff,d=h.biasComplementDiff,g=b(i.height.val-o.h,u,l),p=g.biasDiff,v=g.biasComplementDiff;t.autoPadding=function(e,t,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return e>0?n.pfValue*e:0;case"height":return t>0?n.pfValue*t:0;case"average":return e>0&&t>0?n.pfValue*(e+t)/2:0;case"min":return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case"max":return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}}(o.w,o.h,e.pstyle("padding"),e.pstyle("padding-relative-to").value),t.autoWidth=Math.max(o.w,i.width.val),a.x=(-f+o.x1+o.x2+d)/2,t.autoHeight=Math.max(o.h,i.height.val),a.y=(-p+o.y1+o.y2+v)/2}function b(e,t,n){var r=0,i=0,o=t+n;return e>0&&o>0&&(r=t/o*e,i=n/o*e),{biasDiff:r,biasComplementDiff:i}}}for(var r=0;re.x2?r:e.x2,e.y1=ne.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},jr=function(e,t){return null==t?e:Dr(e,t.x1,t.y1,t.x2,t.y2)},Rr=function(e,t,n){return Ce(e,t,n)},Gr=function(e,t,n){if(!t.cy().headless()){var r,i,o=t._private,a=o.rstyle,s=a.arrowWidth/2;if("none"!==t.pstyle(n+"-arrow-shape").value){"source"===n?(r=a.srcX,i=a.srcY):"target"===n?(r=a.tgtX,i=a.tgtY):(r=a.midX,i=a.midY);var c=o.arrowBounds=o.arrowBounds||{},u=c[n]=c[n]||{};u.x1=r-s,u.y1=i-s,u.x2=r+s,u.y2=i+s,u.w=u.x2-u.x1,u.h=u.y2-u.y1,it(u,1),Dr(e,u.x1,u.y1,u.x2,u.y2)}}},Br=function(e,t,n){if(!t.cy().headless()){var r;r=n?n+"-":"";var i=t._private,o=i.rstyle;if(t.pstyle(r+"label").strValue){var a,s,c,u,l=t.pstyle("text-halign"),h=t.pstyle("text-valign"),f=Rr(o,"labelWidth",n),d=Rr(o,"labelHeight",n),g=Rr(o,"labelX",n),p=Rr(o,"labelY",n),v=t.pstyle(r+"text-margin-x").pfValue,b=t.pstyle(r+"text-margin-y").pfValue,y=t.isEdge(),w=t.pstyle(r+"text-rotation"),m=t.pstyle("text-outline-width").pfValue,x=t.pstyle("text-border-width").pfValue/2,E=t.pstyle("text-background-padding").pfValue,C=d,k=f,_=k/2,N=C/2;if(y)a=g-_,s=g+_,c=p-N,u=p+N;else{switch(l.value){case"left":a=g-k,s=g;break;case"center":a=g-_,s=g+_;break;case"right":a=g,s=g+k}switch(h.value){case"top":c=p-C,u=p;break;case"center":c=p-N,u=p+N;break;case"bottom":c=p,u=p+C}}a+=v-Math.max(m,x)-E-2,s+=v+Math.max(m,x)+E+2,c+=b-Math.max(m,x)-E-2,u+=b+Math.max(m,x)+E+2;var S=n||"main",O=i.labelBounds,T=O[S]=O[S]||{};T.x1=a,T.y1=c,T.x2=s,T.y2=u,T.w=s-a,T.h=u-c;var L=y&&"autorotate"===w.strValue,I=null!=w.pfValue&&0!==w.pfValue;if(L||I){var A=L?Rr(i.rstyle,"labelAngle",n):w.pfValue,M=Math.cos(A),P=Math.sin(A),D=(a+s)/2,j=(c+u)/2;if(!y){switch(l.value){case"left":D=s;break;case"right":D=a}switch(h.value){case"top":j=u;break;case"bottom":j=c}}var R=function(e,t){return{x:(e-=D)*M-(t-=j)*P+D,y:e*P+t*M+j}},G=R(a,c),B=R(a,u),H=R(s,c),F=R(s,u);a=Math.min(G.x,B.x,H.x,F.x),s=Math.max(G.x,B.x,H.x,F.x),c=Math.min(G.y,B.y,H.y,F.y),u=Math.max(G.y,B.y,H.y,F.y)}var Y=S+"Rot",z=O[Y]=O[Y]||{};z.x1=a,z.y1=c,z.x2=s,z.y2=u,z.w=s-a,z.h=u-c,Dr(e,a,c,s,u),Dr(i.labelBounds.all,a,c,s,u)}return e}},Hr=function(e){var t=0,n=function(e){return(e?1:0)<(r=N[1].x)){var S=n;n=r,r=S}if(i>(o=N[1].y)){var O=i;i=o,o=O}Dr(f,n-x,i-x,r+x,o+x)}}else if("bezier"===_||"unbundled-bezier"===_||"segments"===_||"taxi"===_){var T;switch(_){case"bezier":case"unbundled-bezier":T=v.bezierPts;break;case"segments":case"taxi":T=v.linePts}if(null!=T)for(var L=0;L(r=M.x)){var P=n;n=r,r=P}if((i=A.y)>(o=M.y)){var D=i;i=o,o=D}Dr(f,n-=x,i-=x,r+=x,o+=x)}if(l&&t.includeEdges&&p&&(Gr(f,e,"mid-source"),Gr(f,e,"mid-target"),Gr(f,e,"source"),Gr(f,e,"target")),l&&"yes"===e.pstyle("ghost").value){var j=e.pstyle("ghost-offset-x").pfValue,R=e.pstyle("ghost-offset-y").pfValue;Dr(f,f.x1+j,f.y1+R,f.x2+j,f.y2+R)}var G=d.bodyBounds=d.bodyBounds||{};at(G,f),ot(G,b),it(G,1),l&&(n=f.x1,r=f.x2,i=f.y1,o=f.y2,Dr(f,n-m,i-m,r+m,o+m));var B=d.overlayBounds=d.overlayBounds||{};at(B,f),ot(B,b),it(B,1);var H=d.labelBounds=d.labelBounds||{};null!=H.all?((c=H.all).x1=1/0,c.y1=1/0,c.x2=-1/0,c.y2=-1/0,c.w=0,c.h=0):H.all=nt(),l&&t.includeLabels&&(t.includeMainLabels&&Br(f,e,null),p&&(t.includeSourceLabels&&Br(f,e,"source"),t.includeTargetLabels&&Br(f,e,"target")))}return f.x1=Pr(f.x1),f.y1=Pr(f.y1),f.x2=Pr(f.x2),f.y2=Pr(f.y2),f.w=Pr(f.x2-f.x1),f.h=Pr(f.y2-f.y1),f.w>0&&f.h>0&&w&&(ot(f,b),it(f,1)),f}(e,zr),r.bbCache=n,r.bbCachePosKey=a):n=r.bbCache,!o){var l=e.isNode();n=nt(),(t.includeNodes&&l||t.includeEdges&&!l)&&(t.includeOverlays?jr(n,r.overlayBounds):jr(n,r.bodyBounds)),t.includeLabels&&(t.includeMainLabels&&(!i||t.includeSourceLabels&&t.includeTargetLabels)?jr(n,r.labelBounds.all):(t.includeMainLabels&&jr(n,r.labelBounds.mainRot),t.includeSourceLabels&&jr(n,r.labelBounds.sourceRot),t.includeTargetLabels&&jr(n,r.labelBounds.targetRot))),n.w=n.x2-n.x1,n.h=n.y2-n.y1}return n},zr={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,useCache:!0},Vr=Hr(zr),Ur=me(zr);Ar.boundingBox=function(e){var t;if(1!==this.length||null==this[0]._private.bbCache||this[0]._private.styleDirty||void 0!==e&&void 0!==e.useCache&&!0!==e.useCache){t=nt();var n=Ur(e=e||zr),r=this;if(r.cy().styleEnabled())for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:ai,t=arguments.length>1?arguments[1]:void 0,n=0;n=0;s--)a(s);return this},ci.removeAllListeners=function(){return this.removeListener("*")},ci.emit=ci.trigger=function(e,t,n){var r=this.listeners,i=r.length;return this.emitting++,x(t)||(t=[t]),function(e,t,n){if("event"!==y(n))if(E(n))t(e,li(e,n));else for(var r=x(n)?n:n.split(/\s+/),i=0;i1&&!r){var i=this.length-1,o=this[i],a=o._private.data.id;this[i]=void 0,this[e]=o,n.set(a,{ele:o,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map.get(n);if(!r)return this;var i=r.index;return this.unmergeAt(i),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&w(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=0;r=0;t--)e(this[t])&&this.unmergeAt(t);return this},map:function(e,t){for(var n=[],r=this,i=0;ir&&(r=s,n=a)}return{value:r,ele:n}},min:function(e,t){for(var n,r=1/0,i=this,o=0;o=0&&i1&&void 0!==arguments[1])||arguments[1],n=this[0],r=n.cy();if(r.styleEnabled()&&n){this.cleanStyle();var i=n._private.style[e];return null!=i?i:t?r.style().getDefaultProperty(e):null}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled())return t?t.pstyle(e).units:void 0},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];return n?t.style().getRenderedStyle(n,e):void 0},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=n.style();if(E(e)){var i=e;r.applyBypass(this,i,!1),this.emitAndNotify("style")}else if(w(e)){if(void 0===t){var o=this[0];return o?r.getStylePropertyValue(o,e):void 0}r.applyBypass(this,e,t,!1),this.emitAndNotify("style")}else if(void 0===e){var a=this[0];return a?r.getRawStyle(a):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=t.style(),r=this;if(void 0===e)for(var i=0;i0&&t.push(l[0]),t.push(s[0])}return this.spawn(t,!0).filter(e)}),"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),Di.neighbourhood=Di.neighborhood,Di.closedNeighbourhood=Di.closedNeighborhood,Di.openNeighbourhood=Di.openNeighborhood,B(Di,{source:br((function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t}),"source"),target:br((function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t}),"target"),sources:Bi({attr:"source"}),targets:Bi({attr:"target"})}),B(Di,{edgesWith:br(Hi(),"edgesWith"),edgesTo:br(Hi({thisIsSrc:!0}),"edgesTo")}),B(Di,{connectedEdges:br((function(e){for(var t=[],n=0;n0);return o},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),Di.componentsOf=Di.components;var Yi=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(void 0!==e){var r=new _e,i=!1;if(t){if(t.length>0&&E(t[0])&&!N(t[0])){i=!0;for(var o=[],a=new Se,s=0,c=t.length;s0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this,o=i.cy(),a=o._private,s=[],c=[],u=0,l=i.length;u0){for(var G=e.length===i.length?i:new Yi(o,e),B=0;B0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=[],i={},o=n._private.cy;function a(e){for(var t=e._private.edges,n=0;n0&&(e?S.emitAndNotify("remove"):t&&S.emit("remove"));for(var O=0;Oh&&Math.abs(s.v)>h;);return o?function(e){return u[e*(u.length-1)|0]}:l}}(),qi=function(e,t,n,r){var i=function(e,t,n,r){var i=4,o=.001,a=1e-7,s=10,c=11,u=1/(c-1),l="undefined"!=typeof Float32Array;if(4!==arguments.length)return!1;for(var h=0;h<4;++h)if("number"!=typeof arguments[h]||isNaN(arguments[h])||!isFinite(arguments[h]))return!1;e=Math.min(e,1),n=Math.min(n,1),e=Math.max(e,0),n=Math.max(n,0);var f=l?new Float32Array(c):new Array(c);function d(e,t){return 1-3*t+3*e}function g(e,t){return 3*t-6*e}function p(e){return 3*e}function v(e,t,n){return((d(t,n)*e+g(t,n))*e+p(t))*e}function b(e,t,n){return 3*d(t,n)*e*e+2*g(t,n)*e+p(t)}function y(t,r){for(var o=0;o0?i=c:r=c}while(Math.abs(o)>a&&++u=o?y(t,s):0===l?s:m(t,r,r+u)}var E=!1;function C(){E=!0,e===t&&n===r||w()}var k=function(i){return E||C(),e===t&&n===r?i:0===i?0:1===i?1:v(x(i),t,r)};k.getControlPoints=function(){return[{x:e,y:t},{x:n,y:r}]};var _="generateBezier("+[e,t,n,r]+")";return k.toString=function(){return _},k}(e,t,n,r);return function(e,t,n){return e+(t-e)*i(n)}},Xi={linear:function(e,t,n){return e+(t-e)*n},ease:qi(.25,.1,.25,1),"ease-in":qi(.42,0,1,1),"ease-out":qi(0,0,.58,1),"ease-in-out":qi(.42,0,.58,1),"ease-in-sine":qi(.47,0,.745,.715),"ease-out-sine":qi(.39,.575,.565,1),"ease-in-out-sine":qi(.445,.05,.55,.95),"ease-in-quad":qi(.55,.085,.68,.53),"ease-out-quad":qi(.25,.46,.45,.94),"ease-in-out-quad":qi(.455,.03,.515,.955),"ease-in-cubic":qi(.55,.055,.675,.19),"ease-out-cubic":qi(.215,.61,.355,1),"ease-in-out-cubic":qi(.645,.045,.355,1),"ease-in-quart":qi(.895,.03,.685,.22),"ease-out-quart":qi(.165,.84,.44,1),"ease-in-out-quart":qi(.77,0,.175,1),"ease-in-quint":qi(.755,.05,.855,.06),"ease-out-quint":qi(.23,1,.32,1),"ease-in-out-quint":qi(.86,0,.07,1),"ease-in-expo":qi(.95,.05,.795,.035),"ease-out-expo":qi(.19,1,.22,1),"ease-in-out-expo":qi(1,0,0,1),"ease-in-circ":qi(.6,.04,.98,.335),"ease-out-circ":qi(.075,.82,.165,1),"ease-in-out-circ":qi(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return Xi.linear;var r=Ui(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":qi};function Wi(e,t,n,r,i){if(1===r)return n;if(t===n)return n;var o=i(t,n,r);return null==e||((e.roundValue||e.color)&&(o=Math.round(o)),void 0!==e.min&&(o=Math.max(o,e.min)),void 0!==e.max&&(o=Math.min(o,e.max))),o}function Zi(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function $i(e,t,n,r,i){var o=null!=i?i.type:null;n<0?n=0:n>1&&(n=1);var a=Zi(e,i),s=Zi(t,i);if(C(a)&&C(s))return Wi(o,a,s,n,r);if(x(a)&&x(s)){for(var c=[],u=0;u0?("spring"===h&&f.push(a.duration),a.easingImpl=Xi[h].apply(null,f)):a.easingImpl=Xi[h]}var d,g=a.easingImpl;if(d=0===a.duration?1:(n-c)/a.duration,a.applying&&(d=a.progress),d<0?d=0:d>1&&(d=1),null==a.delay){var p=a.startPosition,v=a.position;if(v&&i&&!e.locked()){var b={};Qi(p.x,v.x)&&(b.x=$i(p.x,v.x,d,g)),Qi(p.y,v.y)&&(b.y=$i(p.y,v.y,d,g)),e.position(b)}var y=a.startPan,m=a.pan,x=o.pan,E=null!=m&&r;E&&(Qi(y.x,m.x)&&(x.x=$i(y.x,m.x,d,g)),Qi(y.y,m.y)&&(x.y=$i(y.y,m.y,d,g)),e.emit("pan"));var C=a.startZoom,k=a.zoom,_=null!=k&&r;_&&(Qi(C,k)&&(o.zoom=tt(o.minZoom,$i(C,k,d,g),o.maxZoom)),e.emit("zoom")),(E||_)&&e.emit("viewport");var N=a.style;if(N&&N.length>0&&i){for(var S=0;S=0;t--)(0,e[t])();e.splice(0,e.length)},l=o.length-1;l>=0;l--){var h=o[l],f=h._private;f.stopped?(o.splice(l,1),f.hooked=!1,f.playing=!1,f.started=!1,u(f.frames)):(f.playing||f.applying)&&(f.playing&&f.applying&&(f.applying=!1),f.started||Ji(0,h,e),Ki(t,h,e,n),f.applying&&(f.applying=!1),u(f.frames),null!=f.step&&f.step(e),h.completed()&&(o.splice(l,1),f.hooked=!1,f.playing=!1,f.started=!1,u(f.completes)),s=!0)}return n||0!==o.length||0!==a.length||r.push(t),s}for(var o=!1,a=0;a0?t.notify("draw",n):t.notify("draw")),n.unmerge(r),t.emit("step")}var to={animate:Wn.animate(),animation:Wn.animation(),animated:Wn.animated(),clearQueue:Wn.clearQueue(),delay:Wn.delay(),delayAnimation:Wn.delayAnimation(),stop:Wn.stop(),addToAnimationPool:function(e){this.styleEnabled()&&this._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,e.styleEnabled()){var t=e.renderer();t&&t.beforeRender?t.beforeRender((function(t,n){eo(n,e)}),t.beforeRenderPriorities.animations):function t(){e._private.animationsRunning&&q((function(n){eo(n,e),t()}))}()}}},no={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return null==r||e!==n.target&&N(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e}},ro=function(e){return w(e)?new fr(e):e},io={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new si(no,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,ro(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,ro(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,ro(t),n),this},once:function(e,t,n){return this.emitter().one(e,ro(t),n),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};Wn.eventAliasesOn(io);var oo={png:function(e){return e=e||{},this._private.renderer.png(e)},jpg:function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)}};oo.jpeg=oo.jpg;var ao={layout:function(e){var t=this;if(null!=e)if(null!=e.name){var n,r=e.name,i=t.extension("layout",r);if(null!=i)return n=w(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$(),new i(B({},e,{cy:t,eles:n}));de("No such layout `"+r+"` found. Did you forget to import it and `cytoscape.use()` it?")}else de("A `name` must be specified to make a layout");else de("Layout options must be specified to make a layout")}};ao.createLayout=ao.makeLayout=ao.layout;var so={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();null!=t&&r.merge(t)}else if(n.notificationsEnabled){var i=this.renderer();!this.destroyed()&&i&&i.notify(e,t)}},notifications:function(e){var t=this._private;return void 0===e?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(0===e.batchCount)return this;if(e.batchCount--,0===e.batchCount){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach((function(n){var r=e.batchNotifications[n];r.empty()?t.notify(n):t.notify(n,r)}))}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch((function(){for(var n=Object.keys(e),r=0;r0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach((function(e){var t=e._private;t.rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]}))},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};uo.invalidateDimensions=uo.resize;var lo={collection:function(e,t){return w(e)?this.$(e):_(e)?e.collection():x(e)?new Yi(this,e,t):new Yi(this)},nodes:function(e){var t=this.$((function(e){return e.isNode()}));return e?t.filter(e):t},edges:function(e){var t=this.$((function(e){return e.isEdge()}));return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};lo.elements=lo.filter=lo.$;var ho={},fo="t";ho.apply=function(e){for(var t=this,n=t._private.cy.collection(),r=0;r0;if(f||h&&d){var g=void 0;f&&d||f?g=u.properties:d&&(g=u.mappedProperties);for(var p=0;p1&&(v=1),s.color){var x=i.valueMin[0],E=i.valueMax[0],k=i.valueMin[1],_=i.valueMax[1],N=i.valueMin[2],S=i.valueMax[2],O=null==i.valueMin[3]?1:i.valueMin[3],T=null==i.valueMax[3]?1:i.valueMax[3],L=[Math.round(x+(E-x)*v),Math.round(k+(_-k)*v),Math.round(N+(S-N)*v),Math.round(O+(T-O)*v)];n={bypass:i.bypass,name:i.name,value:L,strValue:"rgb("+L[0]+", "+L[1]+", "+L[2]+")"}}else{if(!s.number)return!1;var I=i.valueMin+(i.valueMax-i.valueMin)*v;n=this.parse(i.name,I,i.bypass,f)}if(!n)return p(),!1;n.mapping=i,i=n;break;case a.data:for(var A=i.field.split("."),M=h.data,P=0;P0&&o>0){for(var s={},c=!1,u=0;u0?e.delayAnimation(a).play().promise().then(t):t()})).then((function(){return e.animation({style:s,duration:o,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()})).then((function(){n.removeBypasses(e,i),e.emitAndNotify("style"),r.transitioning=!1}))}else r.transitioning&&(this.removeBypasses(e,i),e.emitAndNotify("style"),r.transitioning=!1)},ho.checkTrigger=function(e,t,n,r,i,o){var a=this.properties[t],s=i(a);null!=s&&s(n,r)&&o(a)},ho.checkZOrderTrigger=function(e,t,n,r){var i=this;this.checkTrigger(e,t,n,r,(function(e){return e.triggersZOrder}),(function(){i._private.cy.notify("zorder",e)}))},ho.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,(function(e){return e.triggersBounds}),(function(i){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache(),"curve-style"!==t||"bezier"!==n&&"bezier"!==r||!i.triggersBoundsOfParallelBeziers||e.parallelEdges().forEach((function(e){e.isBundledBezier()&&e.dirtyBoundingBoxCache()}))}))},ho.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r)};var go={applyBypass:function(e,t,n,r){var i=[];if("*"===t||"**"===t){if(void 0!==n)for(var o=0;ot.length?o.substr(t.length):""}function s(){n=n.length>r.length?n.substr(r.length):""}for(o=o.replace(/[/][*](\s|.)+?[*][/]/g,"");!o.match(/^\s*$/);){var c=o.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!c){pe("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+o);break}t=c[0];var u=c[1];if("core"!==u&&new fr(u).invalid)pe("Skipping parsing of block: Invalid selector found in string stylesheet: "+u),a();else{var l=c[2],h=!1;n=l;for(var f=[];!n.match(/^\s*$/);){var d=n.match(/^\s*(.+?)\s*:\s*(.+?)\s*;/);if(!d){pe("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+l),h=!0;break}r=d[0];var g=d[1],p=d[2];this.properties[g]?i.parse(g,p)?(f.push({name:g,val:p}),s()):(pe("Skipping property: Invalid property definition in: "+r),s()):(pe("Skipping property: Invalid property name in: "+r),s())}if(h){a();break}i.selector(u);for(var v=0;v=7&&"d"===t[0]&&(u=new RegExp(s.data.regex).exec(t))){if(n)return!1;var f=s.data;return{name:e,value:u,strValue:""+t,mapped:f,field:u[1],bypass:n}}if(t.length>=10&&"m"===t[0]&&(l=new RegExp(s.mapData.regex).exec(t))){if(n)return!1;if(h.multiple)return!1;var d=s.mapData;if(!h.color&&!h.number)return!1;var g=this.parse(e,l[4]);if(!g||g.mapped)return!1;var p=this.parse(e,l[5]);if(!p||p.mapped)return!1;if(g.pfValue===p.pfValue||g.strValue===p.strValue)return pe("`"+e+": "+t+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+g.strValue+"`"),this.parse(e,g.strValue);if(h.color){var v=g.value,b=p.value;if(!(v[0]!==b[0]||v[1]!==b[1]||v[2]!==b[2]||v[3]!==b[3]&&(null!=v[3]&&1!==v[3]||null!=b[3]&&1!==b[3])))return!1}return{name:e,value:l,strValue:""+t,mapped:d,field:l[1],fieldMin:parseFloat(l[2]),fieldMax:parseFloat(l[3]),valueMin:g.value,valueMax:p.value,bypass:n}}}if(h.multiple&&"multiple"!==r){var y;if(y=c?t.split(/\s+/):x(t)?t:[t],h.evenMultiple&&y.length%2!=0)return null;for(var E=[],k=[],_=[],N="",S=!1,O=0;O0?" ":"")+T.strValue}return h.validate&&!h.validate(E,k)?null:h.singleEnum&&S?1===E.length&&w(E[0])?{name:e,value:E[0],strValue:E[0],bypass:n}:null:{name:e,value:E,pfValue:_,strValue:N,bypass:n,units:k}}var L,I,A,P=function(){for(var r=0;rh.max||h.strictMax&&t===h.max))return null;var F={name:e,value:t,strValue:""+t+(D||""),units:D,bypass:n};return h.unitless||"px"!==D&&"em"!==D?F.pfValue=t:F.pfValue="px"!==D&&D?this.getEmSizeInPixels()*t:t,"ms"!==D&&"s"!==D||(F.pfValue="ms"===D?t:1e3*t),"deg"!==D&&"rad"!==D||(F.pfValue="rad"===D?t:(L=t,Math.PI*L/180)),"%"===D&&(F.pfValue=t/100),F}if(h.propList){var Y=[],z=""+t;if("none"===z);else{for(var V=z.split(/\s*,\s*|\s+/),U=0;U255)return;t.push(Math.floor(o))}var a=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(a&&!s)return;var c=n[4];if(void 0!==c){if((c=parseFloat(c))<0||c>1)return;t.push(c)}}return t}(A)||function(e){var t,n,r,i,o,a,s,c;function u(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var l=new RegExp("^hsl[a]?\\(((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?)))\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])(?:\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)$").exec(e);if(l){if((n=parseInt(l[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(r=parseFloat(l[2]))<0||r>100)return;if(r/=100,(i=parseFloat(l[3]))<0||i>100)return;if(i/=100,void 0!==(o=l[4])&&((o=parseFloat(o))<0||o>1))return;if(0===r)a=s=c=Math.round(255*i);else{var h=i<.5?i*(1+r):i+r-i*r,f=2*i-h;a=Math.round(255*u(f,h,n+1/3)),s=Math.round(255*u(f,h,n)),c=Math.round(255*u(f,h,n-1/3))}t=[a,s,c,o]}return t}(A);return X?{name:e,value:X,pfValue:X,strValue:"rgb("+X[0]+","+X[1]+","+X[2]+")",bypass:n}:null}if(h.regex||h.regexes){if(h.enums){var W=P();if(W)return W}for(var Z=h.regexes?h.regexes:[h.regex],$=0;$0&&c>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:a=(a=(a=Math.min((s-2*t)/n.w,(c-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:a)=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return void 0===e?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return void 0===e?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t,n,r=this._private,i=r.pan,o=r.zoom,a=!1;if(r.zoomingEnabled||(a=!0),C(e)?n=e:E(e)&&(n=e.level,null!=e.position?t=Ve(e.position,o,i):null!=e.renderedPosition&&(t=e.renderedPosition),null==t||r.panningEnabled||(a=!0)),n=(n=n>r.maxZoom?r.maxZoom:n)t.maxZoom||!t.zoomingEnabled?o=!0:(t.zoom=s,i.push("zoom"))}if(r&&(!o||!e.cancelOnFailedZoom)&&t.panningEnabled){var c=e.pan;C(c.x)&&(t.pan.x=c.x,a=!1),C(c.y)&&(t.pan.y=c.y,a=!1),a||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(w(e)){var n=e;e=this.mutableElements().filter(n)}else _(e)||(e=this.mutableElements());if(0!==e.length){var r=e.boundingBox(),i=this.width(),o=this.height();return{x:(i-(t=void 0===t?this._private.zoom:t)*(r.x1+r.x2))/2,y:(o-t*(r.y1+r.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e,t,n=this._private,r=n.container;return n.sizeCache=n.sizeCache||(r?(e=f.getComputedStyle(r),t=function(t){return parseFloat(e.getPropertyValue(t))},{width:r.clientWidth-t("padding-left")-t("padding-right"),height:r.clientHeight-t("padding-top")-t("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){return e?(this._private.multiClickDebounceTime=e,this):this._private.multiClickDebounceTime}};ko.centre=ko.center,ko.autolockNodes=ko.autolock,ko.autoungrabifyNodes=ko.autoungrabify;var _o={data:Wn.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Wn.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Wn.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Wn.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};_o.attr=_o.data,_o.removeAttr=_o.removeData;var No=function(e){var t=this,n=(e=B({},e)).container;n&&!k(n)&&k(n[0])&&(n=n[0]);var r=n?n._cyreg:null;(r=r||{})&&r.cy&&(r.cy.destroy(),r={});var i=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=t;var o=void 0!==f&&void 0!==n&&!e.headless,a=e;a.layout=B({name:o?"grid":"null"},a.layout),a.renderer=B({name:o?"canvas":"null"},a.renderer);var s=function(e,t,n){return void 0!==t?t:void 0!==n?n:e},c=this._private={container:n,ready:!1,options:a,elements:new Yi(this),listeners:[],aniEles:new Yi(this),data:a.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,a.zoomingEnabled),userZoomingEnabled:s(!0,a.userZoomingEnabled),panningEnabled:s(!0,a.panningEnabled),userPanningEnabled:s(!0,a.userPanningEnabled),boxSelectionEnabled:s(!0,a.boxSelectionEnabled),autolock:s(!1,a.autolock,a.autolockNodes),autoungrabify:s(!1,a.autoungrabify,a.autoungrabifyNodes),autounselectify:s(!1,a.autounselectify),styleEnabled:void 0===a.styleEnabled?o:a.styleEnabled,zoom:C(a.zoom)?a.zoom:1,pan:{x:E(a.pan)&&C(a.pan.x)?a.pan.x:0,y:E(a.pan)&&C(a.pan.y)?a.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,a.multiClickDebounceTime)};this.createEmitter(),this.selectionType(a.selectionType),this.zoomRange({min:a.minZoom,max:a.maxZoom}),c.styleEnabled&&t.setStyle([]);var u=B({},a,a.renderer);t.initRenderer(u),function(e,t){if(e.some(I))return Yn.all(e).then(t);t(e)}([a.style,a.elements],(function(e){var n=e[0],o=e[1];c.styleEnabled&&t.style().append(n),function(e,n,r){t.notifications(!1);var i=t.mutableElements();i.length>0&&i.remove(),null!=e&&(E(e)||x(e))&&t.add(e),t.one("layoutready",(function(e){t.notifications(!0),t.emit(e),t.one("load",n),t.emitAndNotify("load")})).one("layoutstop",(function(){t.one("done",r),t.emit("done")}));var o=B({},t._private.options.layout);o.eles=t.elements(),t.layout(o).run()}(o,(function(){t.startAnimationLoop(),c.ready=!0,m(a.ready)&&t.on("ready",a.ready);for(var e=0;e0,u=nt(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(_(n.roots))e=n.roots;else if(x(n.roots)){for(var l=[],h=0;h0;){var A=T.shift(),M=O(A,L);if(M)A.outgoers().filter((function(e){return e.isNode()&&i.has(e)})).forEach(I);else if(null===M){pe("Detected double maximal shift for node `"+A.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}S();var P=0;if(n.avoidOverlap)for(var D=0;D0&&b[0].length<=3?c/2:0),h=2*Math.PI/b[r].length*i;return 0===r&&1===b[0].length&&(l=1),{x:W+l*Math.cos(h),y:Z+l*Math.sin(h)}}return{x:W+(i+1-(o+1)/2)*a,y:(r+1)*s}})),this};var Ao={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Mo(e){this.options=B({},Ao,e)}Mo.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,o=r.nodes().not(":parent");t.sort&&(o=o.sort(t.sort));for(var a,s=nt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),c=s.x1+s.w/2,u=s.y1+s.h/2,l=(void 0===t.sweep?2*Math.PI-2*Math.PI/o.length:t.sweep)/Math.max(1,o.length-1),h=0,f=0;f1&&t.avoidOverlap){h*=1.75;var v=Math.cos(l)-Math.cos(0),b=Math.sin(l)-Math.sin(0),y=Math.sqrt(h*h/(v*v+b*b));a=Math.max(y,a)}return r.nodes().layoutPositions(this,t,(function(e,n){var r=t.startAngle+n*l*(i?1:-1),o=a*Math.cos(r),s=a*Math.sin(r);return{x:c+o,y:u+s}})),this};var Po,Do={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function jo(e){this.options=B({},Do,e)}jo.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,i=t.eles,o=i.nodes().not(":parent"),a=nt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s=a.x1+a.w/2,c=a.y1+a.h/2,u=[],l=0,h=0;h0&&Math.abs(y[0].value-m.value)>=v&&(y=[],b.push(y)),y.push(m)}var x=l+t.minNodeSpacing;if(!t.avoidOverlap){var E=b.length>0&&b[0].length>1,C=(Math.min(a.w,a.h)/2-x)/(b.length+E?1:0);x=Math.min(x,C)}for(var k=0,_=0;_1&&t.avoidOverlap){var T=Math.cos(O)-Math.cos(0),L=Math.sin(O)-Math.sin(0),I=Math.sqrt(x*x/(T*T+L*L));k=Math.max(I,k)}N.r=k,k+=x}if(t.equidistant){for(var A=0,M=0,P=0;P=e.numIter||(Uo(r,e),r.temperature=r.temperature*e.coolingFactor,r.temperature=e.animationThreshold&&o(),q(t)):(ra(r,e),s())}();else{for(;u;)u=a(c),c++;ra(r,e),s()}return this},Go.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},Go.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var Bo=function(e,t,n){for(var r=n.eles.edges(),i=n.eles.nodes(),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:e.width(),clientHeight:e.width(),boundingBox:nt(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()})},a=n.eles.components(),s={},c=0;c0)for(o.graphSet.push(x),c=0;cr.count?0:r.graph},Fo=function e(t,n,r,i){var o=i.graphSet[r];if(-10)var s=(u=r.nodeOverlap*a)*i/(p=Math.sqrt(i*i+o*o)),c=u*o/p;else{var u,l=$o(e,i,o),h=$o(t,-1*i,-1*o),f=h.x-l.x,d=h.y-l.y,g=f*f+d*d,p=Math.sqrt(g);s=(u=(e.nodeRepulsion+t.nodeRepulsion)/g)*f/p,c=u*d/p}e.isLocked||(e.offsetX-=s,e.offsetY-=c),t.isLocked||(t.offsetX+=s,t.offsetY+=c)}},Zo=function(e,t,n,r){if(n>0)var i=e.maxX-t.minX;else i=t.maxX-e.minX;if(r>0)var o=e.maxY-t.minY;else o=t.maxY-e.minY;return i>=0&&o>=0?Math.sqrt(i*i+o*o):0},$o=function(e,t,n){var r=e.positionX,i=e.positionY,o=e.height||1,a=e.width||1,s=n/t,c=o/a,u={};return 0===t&&0n?(u.x=r,u.y=i+o/2,u):0t&&-1*c<=s&&s<=c?(u.x=r-a/2,u.y=i-a*n/2/t,u):0=c)?(u.x=r+o*t/2/n,u.y=i+o/2,u):0>n&&(s<=-1*c||s>=c)?(u.x=r-o*t/2/n,u.y=i-o/2,u):u},Ko=function(e,t){for(var n=0;n1){var g=t.gravity*h/d,p=t.gravity*f/d;l.offsetX+=g,l.offsetY+=p}}}}},Jo=function(e,t){var n=[],r=0,i=-1;for(n.push.apply(n,e.graphSet[0]),i+=e.graphSet[0].length;r<=i;){var o=n[r++],a=e.idToIndex[o],s=e.layoutNodes[a],c=s.children;if(0n)var i={x:n*e/r,y:n*t/r};else i={x:e,y:t};return i},na=function e(t,n){var r=t.parentId;if(null!=r){var i=n.layoutNodes[n.idToIndex[r]],o=!1;return(null==i.maxX||t.maxX+i.padRight>i.maxX)&&(i.maxX=t.maxX+i.padRight,o=!0),(null==i.minX||t.minX-i.padLefti.maxY)&&(i.maxY=t.maxY+i.padBottom,o=!0),(null==i.minY||t.minY-i.padTopg&&(h+=d+t.componentSpacing,l=0,f=0,d=0)}}},ia={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function oa(e){this.options=B({},ia,e)}oa.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=r.nodes().not(":parent");t.sort&&(i=i.sort(t.sort));var o=nt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===o.h||0===o.w)r.nodes().layoutPositions(this,t,(function(e){return{x:o.x1,y:o.y1}}));else{var a=i.size(),s=Math.sqrt(a*o.h/o.w),c=Math.round(s),u=Math.round(o.w/o.h*s),l=function(e){if(null==e)return Math.min(c,u);Math.min(c,u)==c?c=e:u=e},h=function(e){if(null==e)return Math.max(c,u);Math.max(c,u)==c?c=e:u=e},f=t.rows,d=null!=t.cols?t.cols:t.columns;if(null!=f&&null!=d)c=f,u=d;else if(null!=f&&null==d)c=f,u=Math.ceil(a/c);else if(null==f&&null!=d)u=d,c=Math.ceil(a/u);else if(u*c>a){var g=l(),p=h();(g-1)*p>=a?l(g-1):(p-1)*g>=a&&h(p-1)}else for(;u*c=a?h(b+1):l(v+1)}var y=o.w/u,w=o.h/c;if(t.condense&&(y=0,w=0),t.avoidOverlap)for(var m=0;m=u&&(I=0,L++)},M={},P=0;P(r=gt(e,t,m[x],m[x+1],m[x+2],m[x+3])))return v(n,r),!0}else if("bezier"===o.edgeType||"multibezier"===o.edgeType||"self"===o.edgeType||"compound"===o.edgeType)for(m=o.allpts,x=0;x+5(r=dt(e,t,m[x],m[x+1],m[x+2],m[x+3],m[x+4],m[x+5])))return v(n,r),!0;y=y||i.source,w=w||i.target;var E=a.getArrowWidth(c,l),C=[{name:"source",x:o.arrowStartX,y:o.arrowStartY,angle:o.srcArrowAngle},{name:"target",x:o.arrowEndX,y:o.arrowEndY,angle:o.tgtArrowAngle},{name:"mid-source",x:o.midX,y:o.midY,angle:o.midsrcArrowAngle},{name:"mid-target",x:o.midX,y:o.midY,angle:o.midtgtArrowAngle}];for(x=0;x0&&(b(y),b(w))}function w(e,t,n){return Ce(e,t,n)}function m(n,r){var i,o=n._private,a=g;i=r?r+"-":"",n.boundingBox();var s=o.labelBounds[r||"main"],c=n.pstyle(i+"label").value;if("yes"===n.pstyle("text-events").strValue&&c){var u=w(o.rscratch,"labelX",r),l=w(o.rscratch,"labelY",r),h=w(o.rscratch,"labelAngle",r),f=n.pstyle(i+"text-margin-x").pfValue,d=n.pstyle(i+"text-margin-y").pfValue,p=s.x1-a-f,b=s.x2+a-f,y=s.y1-a-d,m=s.y2+a-d;if(h){var x=Math.cos(h),E=Math.sin(h),C=function(e,t){return{x:(e-=u)*x-(t-=l)*E+u,y:e*E+t*x+l}},k=C(p,y),_=C(p,m),N=C(b,y),S=C(b,m),O=[k.x+f,k.y+d,N.x+f,N.y+d,S.x+f,S.y+d,_.x+f,_.y+d];if(pt(e,t,O))return v(n),!0}else if(ct(s,e,t))return v(n),!0}}n&&(c=c.interactive);for(var x=c.length-1;x>=0;x--){var E=c[x];E.isNode()?b(E)||m(E):y(E)||m(E)||m(E,"source")||m(E,"target")}return u},getAllInBox:function(e,t,n,r){for(var i,o,a=this.getCachedZSortedEles().interactive,s=[],c=Math.min(e,n),u=Math.max(e,n),l=Math.min(t,r),h=Math.max(t,r),f=nt({x1:e=c,y1:t=l,x2:n=u,y2:r=h}),d=0;d0?Math.max(e-t,0):Math.min(e+t,0)},S=N(k,E),O=N(_,C),T=!1;"auto"===v?p=Math.abs(S)>Math.abs(O)?i:r:v===c||v===s?(p=r,T=!0):v!==o&&v!==a||(p=i,T=!0);var L,I=p===r,A=I?O:S,M=I?_:k,P=Ze(M),D=!1;T&&(y||m)||!(v===s&&M<0||v===c&&M>0||v===o&&M>0||v===a&&M<0)||(A=(P*=-1)*Math.abs(A),D=!0);var j=function(e){return Math.abs(e)=Math.abs(A)},R=j(L=y?(w<0?1+w:w)*A:(w<0?A:0)+w*P),G=j(Math.abs(A)-Math.abs(L));if(!R&&!G||D)if(I){var B=u.y1+L+(g?h/2*P:0),H=u.x1,F=u.x2;n.segpts=[H,B,F,B]}else{var Y=u.x1+L+(g?l/2*P:0),z=u.y1,V=u.y2;n.segpts=[Y,z,Y,V]}else if(I){var U=Math.abs(M)<=h/2,q=Math.abs(k)<=f/2;if(U){var X=(u.x1+u.x2)/2,W=u.y1,Z=u.y2;n.segpts=[X,W,X,Z]}else if(q){var $=(u.y1+u.y2)/2,K=u.x1,Q=u.x2;n.segpts=[K,$,Q,$]}else n.segpts=[u.x1,u.y2]}else{var J=Math.abs(M)<=l/2,ee=Math.abs(_)<=d/2;if(J){var te=(u.y1+u.y2)/2,ne=u.x1,re=u.x2;n.segpts=[ne,te,re,te]}else if(ee){var ie=(u.x1+u.x2)/2,oe=u.y1,ae=u.y2;n.segpts=[ie,oe,ie,ae]}else n.segpts=[u.x2,u.y1]}},wa.tryToCorrectInvalidPoints=function(e,t){var n=e._private.rscratch;if("bezier"===n.edgeType){var r=t.srcPos,i=t.tgtPos,o=t.srcW,a=t.srcH,s=t.tgtW,c=t.tgtH,u=t.srcShape,l=t.tgtShape,h=!C(n.startX)||!C(n.startY),f=!C(n.arrowStartX)||!C(n.arrowStartY),d=!C(n.endX)||!C(n.endY),g=!C(n.arrowEndX)||!C(n.arrowEndY),p=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,v=$e({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),b=vf.poolIndex()){var d=h;h=f,f=d}var g=s.srcPos=h.position(),p=s.tgtPos=f.position(),v=s.srcW=h.outerWidth(),b=s.srcH=h.outerHeight(),y=s.tgtW=f.outerWidth(),w=s.tgtH=f.outerHeight(),m=s.srcShape=n.nodeShapes[t.getNodeShape(h)],x=s.tgtShape=n.nodeShapes[t.getNodeShape(f)];s.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var E=0;E0){var Y=u,z=Ke(Y,qe(t)),V=Ke(Y,qe(F)),U=z;V2&&Ke(Y,{x:F[2],y:F[3]})0){var ie=l,oe=Ke(ie,qe(t)),ae=Ke(ie,qe(re)),se=oe;ae2&&Ke(ie,{x:re[2],y:re[3]})=u||y){l={cp:p,segment:b};break}}if(l)break}var w=l.cp,m=l.segment,x=(u-f)/m.length,E=m.t1-m.t0,C=s?m.t0+E*x:m.t1-E*x;C=tt(0,C,1),t=et(w.p0,w.p1,w.p2,C),i=function(e,t,n,r){var i=tt(0,r-.001,1),o=tt(0,r+.001,1),a=et(e,t,n,i),s=et(e,t,n,o);return Na(a,s)}(w.p0,w.p1,w.p2,C);break;case"straight":case"segments":case"haystack":for(var k,_,N,S,O=0,T=r.allpts.length,L=0;L+3=u));L+=2);var I=(u-_)/k;I=tt(0,I,1),t=function(e,t,n,r){var i=t.x-e.x,o=t.y-e.y,a=$e(e,t),s=i/a,c=o/a;return n=null==n?0:n,r=null!=r?r:n*a,{x:e.x+s*r,y:e.y+c*r}}(N,S,I),i=Na(N,S)}a("labelX",n,t.x),a("labelY",n,t.y),a("labelAutoAngle",n,i)}};u("source"),u("target"),this.applyLabelDimensions(e)}},ka.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},ka.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),i=this.calculateLabelDimensions(e,r),o=e.pstyle("line-height").pfValue,a=e.pstyle("text-wrap").strValue,s=Ce(n.rscratch,"labelWrapCachedLines",t)||[],c="wrap"!==a?1:Math.max(s.length,1),u=i.height/c,l=u*o,h=i.width,f=i.height+(c-1)*(o-1)*u;ke(n.rstyle,"labelWidth",t,h),ke(n.rscratch,"labelWidth",t,h),ke(n.rstyle,"labelHeight",t,f),ke(n.rscratch,"labelHeight",t,f),ke(n.rscratch,"labelLineHeight",t,l)},ka.getLabelText=function(e,t){var n=e._private,r=t?t+"-":"",i=e.pstyle(r+"label").strValue,o=e.pstyle("text-transform").value,a=function(e,r){return r?(ke(n.rscratch,e,t,r),r):Ce(n.rscratch,e,t)};if(!i)return"";"none"==o||("uppercase"==o?i=i.toUpperCase():"lowercase"==o&&(i=i.toLowerCase()));var s=e.pstyle("text-wrap").value;if("wrap"===s){var c=a("labelKey");if(null!=c&&a("labelWrapKey")===c)return a("labelWrapCachedText");for(var u=i.split("\n"),l=e.pstyle("text-max-width").pfValue,h="anywhere"===e.pstyle("text-overflow-wrap").value,f=[],d=/[\s\u200b]+/,g=h?"":" ",p=0;pl){for(var w=v.split(d),m="",x=0;xk);S++)_+=i[S],S===i.length-1&&(N=!0);return N||(_+="…"),_}return i},ka.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,n=e.pstyle("text-halign").strValue;if("auto"!==t)return t;if(!e.isNode())return"center";switch(n){case"left":return"right";case"right":return"left";default:return"center"}},ka.calculateLabelDimensions=function(e,t){var n=ne(t,e._private.labelDimsKey),r=this.labelDimCache||(this.labelDimCache=[]),i=r[n];if(null!=i)return i;var o=e.pstyle("font-style").strValue,a=e.pstyle("font-size").pfValue,s=e.pstyle("font-family").strValue,c=e.pstyle("font-weight").strValue,u=this.labelCalcCanvas,l=this.labelCalcCanvasContext;if(!u){u=this.labelCalcCanvas=document.createElement("canvas"),l=this.labelCalcCanvasContext=u.getContext("2d");var h=u.style;h.position="absolute",h.left="-9999px",h.top="-9999px",h.zIndex="-1",h.visibility="hidden",h.pointerEvents="none"}l.font="".concat(o," ").concat(c," ").concat(a,"px ").concat(s);for(var f=0,d=0,g=t.split("\n"),p=0;p1&&void 0!==arguments[1])||arguments[1];if(t.merge(e),n)for(var r=0;r=e.desktopTapThreshold2}var S=r(t);v&&(e.hoverData.tapholdCancelled=!0),i=!0,n(p,["mousemove","vmousemove","tapdrag"],t,{x:l[0],y:l[1]});var O=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||a.emit({originalEvent:t,type:"boxstart",position:{x:l[0],y:l[1]}}),g[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(v){var T={originalEvent:t,type:"cxtdrag",position:{x:l[0],y:l[1]}};y?y.emit(T):a.emit(T),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&p===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:l[0],y:l[1]}}),e.hoverData.cxtOver=p,p&&p.emit({originalEvent:t,type:"cxtdragover",position:{x:l[0],y:l[1]}}))}}else if(e.hoverData.dragging){if(i=!0,a.panningEnabled()&&a.userPanningEnabled()){var L;if(e.hoverData.justStartedPan){var I=e.hoverData.mdownPos;L={x:(l[0]-I[0])*s,y:(l[1]-I[1])*s},e.hoverData.justStartedPan=!1}else L={x:w[0]*s,y:w[1]*s};a.panBy(L),a.emit("dragpan"),e.hoverData.dragged=!0}l=e.projectIntoViewport(t.clientX,t.clientY)}else if(1!=g[4]||null!=y&&!y.pannable()){if(y&&y.pannable()&&y.active()&&y.unactivate(),y&&y.grabbed()||p==b||(b&&n(b,["mouseout","tapdragout"],t,{x:l[0],y:l[1]}),p&&n(p,["mouseover","tapdragover"],t,{x:l[0],y:l[1]}),e.hoverData.last=p),y)if(v){if(a.boxSelectionEnabled()&&S)y&&y.grabbed()&&(h(m),y.emit("freeon"),m.emit("free"),e.dragData.didDrag&&(y.emit("dragfreeon"),m.emit("dragfree"))),O();else if(y&&y.grabbed()&&e.nodeIsDraggable(y)){var A=!e.dragData.didDrag;A&&e.redrawHint("eles",!0),e.dragData.didDrag=!0;var M=a.collection();e.hoverData.draggingEles||u(m,{inDragLayer:!0});var P={x:0,y:0};if(C(w[0])&&C(w[1])&&(P.x+=w[0],P.y+=w[1],A)){var D=e.hoverData.dragDelta;D&&C(D[0])&&C(D[1])&&(P.x+=D[0],P.y+=D[1])}for(var j=0;j0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=u=o.collection()),c!=l||e.dragData.didDrag||e.hoverData.selecting||null!=c&&c._private.selectable&&(e.hoverData.dragging||("additive"===o.selectionType()||f?c.selected()?c.unselect(["tapunselect"]):c.select(["tapselect"]):f||(o.$(t).unmerge(c).unselect(["tapunselect"]),c.select(["tapselect"]))),e.redrawHint("eles",!0)),e.hoverData.selecting){var p=o.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),p.length>0&&e.redrawHint("eles",!0),o.emit({type:"boxend",originalEvent:i,position:{x:a[0],y:a[1]}});"additive"===o.selectionType()||f||o.$(t).unmerge(p).unselect(),p.emit("box").stdFilter((function(e){return e.selectable()&&!e.selected()})).select().emit("boxselect"),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!s[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var v=l&&l.grabbed();h(u),v&&(l.emit("freeon"),u.emit("free"),e.dragData.didDrag&&(l.emit("dragfreeon"),u.emit("dragfree")))}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null}}),!1);var E,k,_,N,S,O,T,L,I,A,M,P,D,j=function(t){if(!e.scrollingPage){var n=e.cy,r=n.zoom(),i=n.pan(),o=e.projectIntoViewport(t.clientX,t.clientY),a=[o[0]*r+i.x,o[1]*r+i.y];if(e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||0!==e.selection[4])t.preventDefault();else if(n.panningEnabled()&&n.userPanningEnabled()&&n.zoomingEnabled()&&n.userZoomingEnabled()){var s;t.preventDefault(),e.data.wheelZooming=!0,clearTimeout(e.data.wheelTimeout),e.data.wheelTimeout=setTimeout((function(){e.data.wheelZooming=!1,e.redrawHint("eles",!0),e.redraw()}),150),s=null!=t.deltaY?t.deltaY/-250:null!=t.wheelDeltaY?t.wheelDeltaY/1e3:t.wheelDelta/1e3,s*=e.wheelSensitivity,1===t.deltaMode&&(s*=33);var c=n.zoom()*Math.pow(10,s);"gesturechange"===t.type&&(c=e.gestureStartZoom*t.scale),n.zoom({level:c,renderedPosition:{x:a[0],y:a[1]}}),n.emit("gesturechange"===t.type?"pinchzoom":"scrollzoom")}}};e.registerBinding(e.container,"wheel",j,!0),e.registerBinding(window,"scroll",(function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout((function(){e.scrollingPage=!1}),250)}),!0),e.registerBinding(e.container,"gesturestart",(function(t){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||t.preventDefault()}),!0),e.registerBinding(e.container,"gesturechange",(function(t){e.hasTouchStarted||j(t)}),!0),e.registerBinding(e.container,"mouseout",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseout",position:{x:n[0],y:n[1]}})}),!1),e.registerBinding(e.container,"mouseover",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseover",position:{x:n[0],y:n[1]}})}),!1);var R,G,B,H,F,Y,z,V=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},U=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",R=function(t){if(e.hasTouchStarted=!0,x(t)){d(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var r=e.cy,i=e.touchData.now,o=e.touchData.earlier;if(t.touches[0]){var a=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);i[0]=a[0],i[1]=a[1]}if(t.touches[1]&&(a=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),i[2]=a[0],i[3]=a[1]),t.touches[2]&&(a=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),i[4]=a[0],i[5]=a[1]),t.touches[1]){e.touchData.singleTouchMoved=!0,h(e.dragData.touchDragEles);var c=e.findContainerClientCoords();I=c[0],A=c[1],M=c[2],P=c[3],E=t.touches[0].clientX-I,k=t.touches[0].clientY-A,_=t.touches[1].clientX-I,N=t.touches[1].clientY-A,D=0<=E&&E<=M&&0<=_&&_<=M&&0<=k&&k<=P&&0<=N&&N<=P;var f=r.pan(),g=r.zoom();if(S=V(E,k,_,N),O=U(E,k,_,N),L=[((T=[(E+_)/2,(k+N)/2])[0]-f.x)/g,(T[1]-f.y)/g],O<4e4&&!t.touches[2]){var p=e.findNearestElement(i[0],i[1],!0,!0),v=e.findNearestElement(i[2],i[3],!0,!0);return p&&p.isNode()?(p.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:i[0],y:i[1]}}),e.touchData.start=p):v&&v.isNode()?(v.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:i[0],y:i[1]}}),e.touchData.start=v):r.emit({originalEvent:t,type:"cxttapstart",position:{x:i[0],y:i[1]}}),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!0,e.touchData.cxtDragged=!1,e.data.bgActivePosistion=void 0,void e.redraw()}}if(t.touches[2])r.boxSelectionEnabled()&&t.preventDefault();else if(t.touches[1]);else if(t.touches[0]){var b=e.findNearestElements(i[0],i[1],!0,!0),y=b[0];if(null!=y&&(y.activate(),e.touchData.start=y,e.touchData.starts=b,e.nodeIsGrabbable(y))){var w=e.dragData.touchDragEles=r.collection(),m=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),y.selected()?(m=r.$((function(t){return t.selected()&&e.nodeIsGrabbable(t)})),u(m,{addToList:w})):l(y,{addToList:w}),s(y);var C=function(e){return{originalEvent:t,type:e,position:{x:i[0],y:i[1]}}};y.emit(C("grabon")),m?m.forEach((function(e){e.emit(C("grab"))})):y.emit(C("grab"))}n(y,["touchstart","tapstart","vmousedown"],t,{x:i[0],y:i[1]}),null==y&&(e.data.bgActivePosistion={x:a[0],y:a[1]},e.redrawHint("select",!0),e.redraw()),e.touchData.singleTouchMoved=!1,e.touchData.singleTouchStartTime=+new Date,clearTimeout(e.touchData.tapholdTimeout),e.touchData.tapholdTimeout=setTimeout((function(){!1!==e.touchData.singleTouchMoved||e.pinching||e.touchData.selecting||n(e.touchData.start,["taphold"],t,{x:i[0],y:i[1]})}),e.tapholdDuration)}if(t.touches.length>=1){for(var j=e.touchData.startPosition=[],R=0;R=e.touchTapThreshold2}if(r&&e.touchData.cxt){t.preventDefault();var m=t.touches[0].clientX-I,T=t.touches[0].clientY-A,M=t.touches[1].clientX-I,P=t.touches[1].clientY-A,j=U(m,T,M,P);if(j/O>=2.25||j>=22500){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var R={originalEvent:t,type:"cxttapend",position:{x:s[0],y:s[1]}};e.touchData.start?(e.touchData.start.unactivate().emit(R),e.touchData.start=null):a.emit(R)}}if(r&&e.touchData.cxt){R={originalEvent:t,type:"cxtdrag",position:{x:s[0],y:s[1]}},e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(R):a.emit(R),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var G=e.findNearestElement(s[0],s[1],!0,!0);e.touchData.cxtOver&&G===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:s[0],y:s[1]}}),e.touchData.cxtOver=G,G&&G.emit({originalEvent:t,type:"cxtdragover",position:{x:s[0],y:s[1]}}))}else if(r&&t.touches[2]&&a.boxSelectionEnabled())t.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||a.emit({originalEvent:t,type:"boxstart",position:{x:s[0],y:s[1]}}),e.touchData.selecting=!0,e.touchData.didSelect=!0,i[4]=1,i&&0!==i.length&&void 0!==i[0]?(i[2]=(s[0]+s[2]+s[4])/3,i[3]=(s[1]+s[3]+s[5])/3):(i[0]=(s[0]+s[2]+s[4])/3,i[1]=(s[1]+s[3]+s[5])/3,i[2]=(s[0]+s[2]+s[4])/3+1,i[3]=(s[1]+s[3]+s[5])/3+1),e.redrawHint("select",!0),e.redraw();else if(r&&t.touches[1]&&!e.touchData.didSelect&&a.zoomingEnabled()&&a.panningEnabled()&&a.userZoomingEnabled()&&a.userPanningEnabled()){if(t.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),ee=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var B=0;B0&&!e.hoverData.draggingEles&&!e.swipePanning&&null!=e.data.bgActivePosistion&&(e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.redraw())}},!1),e.registerBinding(window,"touchcancel",B=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(window,"touchend",H=function(r){var i=e.touchData.start;if(e.touchData.capture){0===r.touches.length&&(e.touchData.capture=!1),r.preventDefault();var o=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var a,s=e.cy,c=s.zoom(),u=e.touchData.now,l=e.touchData.earlier;if(r.touches[0]){var f=e.projectIntoViewport(r.touches[0].clientX,r.touches[0].clientY);u[0]=f[0],u[1]=f[1]}if(r.touches[1]&&(f=e.projectIntoViewport(r.touches[1].clientX,r.touches[1].clientY),u[2]=f[0],u[3]=f[1]),r.touches[2]&&(f=e.projectIntoViewport(r.touches[2].clientX,r.touches[2].clientY),u[4]=f[0],u[5]=f[1]),i&&i.unactivate(),e.touchData.cxt){if(a={originalEvent:r,type:"cxttapend",position:{x:u[0],y:u[1]}},i?i.emit(a):s.emit(a),!e.touchData.cxtDragged){var d={originalEvent:r,type:"cxttap",position:{x:u[0],y:u[1]}};i?i.emit(d):s.emit(d)}return e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,void e.redraw()}if(!r.touches[2]&&s.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var g=s.collection(e.getAllInBox(o[0],o[1],o[2],o[3]));o[0]=void 0,o[1]=void 0,o[2]=void 0,o[3]=void 0,o[4]=0,e.redrawHint("select",!0),s.emit({type:"boxend",originalEvent:r,position:{x:u[0],y:u[1]}}),g.emit("box").stdFilter((function(e){return e.selectable()&&!e.selected()})).select().emit("boxselect"),g.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(null!=i&&i.unactivate(),r.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(r.touches[1]);else if(r.touches[0]);else if(!r.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var p=e.dragData.touchDragEles;if(null!=i){var v=i._private.grabbed;h(p),e.redrawHint("drag",!0),e.redrawHint("eles",!0),v&&(i.emit("freeon"),p.emit("free"),e.dragData.didDrag&&(i.emit("dragfreeon"),p.emit("dragfree"))),n(i,["touchend","tapend","vmouseup","tapdragout"],r,{x:u[0],y:u[1]}),i.unactivate(),e.touchData.start=null}else{var b=e.findNearestElement(u[0],u[1],!0,!0);n(b,["touchend","tapend","vmouseup","tapdragout"],r,{x:u[0],y:u[1]})}var y=e.touchData.startPosition[0]-u[0],w=y*y,m=e.touchData.startPosition[1]-u[1],x=(w+m*m)*c*c;e.touchData.singleTouchMoved||(i||s.$(":selected").unselect(["tapunselect"]),n(i,["tap","vclick"],r,{x:u[0],y:u[1]}),F=!1,r.timeStamp-z<=s.multiClickDebounceTime()?(Y&&clearTimeout(Y),F=!0,z=null,n(i,["dbltap","vdblclick"],r,{x:u[0],y:u[1]})):(Y=setTimeout((function(){F||n(i,["onetap","voneclick"],r,{x:u[0],y:u[1]})}),s.multiClickDebounceTime()),z=r.timeStamp)),null!=i&&!e.dragData.didDrag&&i._private.selectable&&x2){for(var O=[u[0],u[1]],T=Math.pow(O[0]-e,2)+Math.pow(O[1]-t,2),L=1;L0)return p[0]}return null},f=Object.keys(l),d=0;d0?c:lt(i,o,e,t,n,r,a)},checkPoint:function(e,t,n,r,i,o,a){var s=Ot(r,i),c=2*s;if(vt(e,t,this.points,o,a,r,i-c,[0,-1],n))return!0;if(vt(e,t,this.points,o,a,r-c,i,[0,-1],n))return!0;var u=r/2+2*n,l=i/2+2*n;return!!pt(e,t,[o-u,a-l,o-u,a,o+u,a,o+u,a-l])||!!wt(e,t,c,c,o+r/2-s,a+i/2-s,n)||!!wt(e,t,c,c,o-r/2+s,a+i/2-s,n)}}},registerNodeShapes:function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",_t(3,0)),this.generateRoundPolygon("round-triangle",_t(3,0)),this.generatePolygon("rectangle",_t(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",n),this.generateRoundPolygon("round-diamond",n),this.generatePolygon("pentagon",_t(5,0)),this.generateRoundPolygon("round-pentagon",_t(5,0)),this.generatePolygon("hexagon",_t(6,0)),this.generateRoundPolygon("round-hexagon",_t(6,0)),this.generatePolygon("heptagon",_t(7,0)),this.generateRoundPolygon("round-heptagon",_t(7,0)),this.generatePolygon("octagon",_t(8,0)),this.generateRoundPolygon("round-octagon",_t(8,0));var r=new Array(20),i=St(5,0),o=St(5,Math.PI/5),a=.5*(3-Math.sqrt(5));a*=1.57;for(var s=0;s=e.deqFastCost*p)break}else if(i){if(d>=e.deqCost*c||d>=e.deqAvgCost*s)break}else if(g>=e.deqNoDrawCost*Ga)break;var v=e.deq(t,h,l);if(!(v.length>0))break;for(var b=0;b0&&(e.onDeqd(t,u),!i&&e.shouldRedraw(t,u,h,l)&&r())}),o(t))}}},Ha=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:le;s(this,e),this.idsByKey=new _e,this.keyForId=new _e,this.cachesByLvl=new _e,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=n}return u(e,[{key:"getIdsFor",value:function(e){null==e&&de("Can not get id list for null key");var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new Se,t.set(e,n)),n}},{key:"addIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).add(t)}},{key:"deleteIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).delete(t)}},{key:"getNumberOfIdsForKey",value:function(e){return null==e?0:this.getIdsFor(e).size}},{key:"updateKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t),r=this.getKey(e);this.deleteIdForKey(n,t),this.addIdForKey(r,t),this.keyForId.set(t,r)}},{key:"deleteKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteIdForKey(n,t),this.keyForId.delete(t)}},{key:"keyHasChangedFor",value:function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)}},{key:"isInvalid",value:function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)}},{key:"getCachesAt",value:function(e){var t=this.cachesByLvl,n=this.lvls,r=t.get(e);return r||(r=new _e,t.set(e,r),n.push(e)),r}},{key:"getCache",value:function(e,t){return this.getCachesAt(t).get(e)}},{key:"get",value:function(e,t){var n=this.getKey(e),r=this.getCache(n,t);return null!=r&&this.updateKeyMappingFor(e),r}},{key:"getForCachedKey",value:function(e,t){var n=this.keyForId.get(e.id());return this.getCache(n,t)}},{key:"hasCache",value:function(e,t){return this.getCachesAt(t).has(e)}},{key:"has",value:function(e,t){var n=this.getKey(e);return this.hasCache(n,t)}},{key:"setCache",value:function(e,t,n){n.key=e,this.getCachesAt(t).set(e,n)}},{key:"set",value:function(e,t,n){var r=this.getKey(e);this.setCache(r,t,n),this.updateKeyMappingFor(e)}},{key:"deleteCache",value:function(e,t){this.getCachesAt(t).delete(e)}},{key:"delete",value:function(e,t){var n=this.getKey(e);this.deleteCache(n,t)}},{key:"invalidateKey",value:function(e){var t=this;this.lvls.forEach((function(n){return t.deleteCache(e,n)}))}},{key:"invalidate",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteKeyMappingFor(e);var r=this.doesEleInvalidateKey(e);return r&&this.invalidateKey(n),r||0===this.getNumberOfIdsForKey(n)}}]),e}(),Fa={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},Ya=me({getKey:null,doesEleInvalidateKey:le,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:ue,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),za=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var r=Ya(t);B(n,r),n.lookup=new Ha(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},Va=za.prototype;Va.reasons=Fa,Va.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},Va.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},Va.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new o((function(e,t){return t.reqs-e.reqs}))},Va.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},Va.getElement=function(e,t,n,r,i){var o=this,a=this.renderer,s=a.cy.zoom(),c=this.lookup;if(!t||0===t.w||0===t.h||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed())return null;if(!o.allowEdgeTxrCaching&&e.isEdge()||!o.allowParentTxrCaching&&e.isParent())return null;if(null==r&&(r=Math.ceil(We(s*n))),r<-4)r=-4;else if(s>=7.99||r>3)return null;var u=Math.pow(2,r),l=t.h*u,h=t.w*u,f=a.eleTextBiggerThanMin(e,u);if(!this.isVisible(e,f))return null;var d,g=c.get(e,r);if(g&&g.invalidated&&(g.invalidated=!1,g.texture.invalidatedWidth-=g.width),g)return g;if(d=l<=25?25:l<=50?50:50*Math.ceil(l/50),l>1024||h>1024)return null;var p=o.getTextureQueue(d),v=p[p.length-2],b=function(){return o.recycleTexture(d,h)||o.addTexture(d,h)};v||(v=p[p.length-1]),v||(v=b()),v.width-v.usedWidthr;S--)_=o.getElement(e,t,n,S,Fa.downscale);N()}else{var O;if(!m&&!x&&!E)for(var T=r-1;T>=-4;T--){var L=c.get(e,T);if(L){O=L;break}}if(w(O))return o.queueElement(e,r),O;v.context.translate(v.usedWidth,0),v.context.scale(u,u),this.drawElement(v.context,e,t,f,!1),v.context.scale(1/u,1/u),v.context.translate(-v.usedWidth,0)}return g={x:v.usedWidth,texture:v,level:r,scale:u,width:h,height:l,scaledLabelShown:f},v.usedWidth+=Math.ceil(h+8),v.eleCaches.push(g),c.set(e,r,g),o.checkTextureFullness(v),g},Va.invalidateElements=function(e){for(var t=0;t=.2*e.width&&this.retireTexture(e)},Va.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>.8&&e.fullnessChecks>=10?xe(t,e):e.fullnessChecks++},Va.retireTexture=function(e){var t=e.height,n=this.getTextureQueue(t),r=this.lookup;xe(n,e),e.retired=!0;for(var i=e.eleCaches,o=0;o=t)return o.retired=!1,o.usedWidth=0,o.invalidatedWidth=0,o.fullnessChecks=0,Ee(o.eleCaches),o.context.setTransform(1,0,0,1,0,0),o.context.clearRect(0,0,o.width,o.height),xe(r,o),n.push(o),o}},Va.queueElement=function(e,t){var n=this.getElementQueue(),r=this.getElementKeyToQueue(),i=this.getKey(e),o=r[i];if(o)o.level=Math.max(o.level,t),o.eles.merge(e),o.reqs++,n.updateItem(o);else{var a={eles:e.spawn().merge(e),level:t,reqs:1,key:i};n.push(a),r[i]=a}},Va.dequeue=function(e){for(var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),i=[],o=t.lookup,a=0;a<1&&n.size()>0;a++){var s=n.pop(),c=s.key,u=s.eles[0],l=o.hasCache(u,s.level);if(r[c]=null,!l){i.push(s);var h=t.getBoundingBox(u);t.getElement(u,h,e,s.level,Fa.dequeue)}}return i},Va.removeFromQueue=function(e){var t=this.getElementQueue(),n=this.getElementKeyToQueue(),r=this.getKey(e),i=n[r];null!=i&&(1===i.eles.length?(i.reqs=ce,t.updateItem(i),t.pop(),n[r]=null):i.eles.unmerge(e))},Va.onDequeue=function(e){this.onDequeues.push(e)},Va.offDequeue=function(e){xe(this.onDequeues,e)},Va.setupDequeueing=Ba({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n=3.99||n>2)return null;r.validateLayersElesOrdering(n,e);var a,s,c=r.layersByLevel,u=Math.pow(2,n),l=c[n]=c[n]||[];if(r.levelIsComplete(n,e))return l;!function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return s=c[t],!0},i=function(e){if(!s)for(var r=n+e;-4<=r&&r<=2&&!t(r);r+=e);};i(1),i(-1);for(var o=l.length-1;o>=0;o--){var a=l[o];a.invalid&&xe(l,a)}}();var h=function(t){var i=(t=t||{}).after;if(function(){if(!a){a=nt();for(var t=0;t16e6)return null;var o=r.makeLayer(a,n);if(null!=i){var s=l.indexOf(i)+1;l.splice(s,0,o)}else(void 0===t.insert||t.insert)&&l.unshift(o);return o};if(r.skipping&&!o)return null;for(var f=null,d=e.length/1,g=!o,p=0;p=d||!ut(f.bb,v.boundingBox()))&&!(f=h({insert:!0,after:f})))return null;s||g?r.queueLayer(f,v):r.drawEleInLayer(f,v,n,t),f.eles.push(v),y[n]=f}}return s||(g?null:l)},qa.getEleLevelForLayerLevel=function(e,t){return e},qa.drawEleInLayer=function(e,t,n,r){var i=this.renderer,o=e.context,a=t.boundingBox();0!==a.w&&0!==a.h&&t.visible()&&(n=this.getEleLevelForLayerLevel(n,r),i.setImgSmoothing(o,!1),i.drawCachedElement(o,t,null,null,n,!0),i.setImgSmoothing(o,!0))},qa.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,i=0;i0)return!1;if(o.invalid)return!1;r+=o.eles.length}return r===t.length},qa.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r0){e=!0;break}}return e},qa.invalidateElements=function(e){var t=this;0!==e.length&&(t.lastInvalidationTime=X(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,(function(e,n,r){t.invalidateLayer(e)})))},qa.invalidateLayer=function(e){if(this.lastInvalidationTime=X(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];xe(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var i=0;i3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],a=this,s=t._private.rscratch;if((!o||t.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var c;n&&(c=n,e.translate(-c.x1,-c.y1));var u=o?t.pstyle("opacity").value:1,l=o?t.pstyle("line-opacity").value:1,h=t.pstyle("curve-style").value,f=t.pstyle("line-style").value,d=t.pstyle("width").pfValue,g=t.pstyle("line-cap").value,p=u*l,v=u*l,b=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p;"straight-triangle"===h?(a.eleStrokeStyle(e,t,n),a.drawEdgeTrianglePath(t,e,s.allpts)):(e.lineWidth=d,e.lineCap=g,a.eleStrokeStyle(e,t,n),a.drawEdgePath(t,e,s.allpts,f),e.lineCap="butt")},y=function(){i&&a.drawEdgeOverlay(e,t)},w=function(){i&&a.drawEdgeUnderlay(e,t)},m=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;a.drawArrowheads(e,t,n)},x=function(){a.drawElementText(e,t,null,r)};e.lineJoin="round";var E="yes"===t.pstyle("ghost").value;if(E){var C=t.pstyle("ghost-offset-x").pfValue,k=t.pstyle("ghost-offset-y").pfValue,_=t.pstyle("ghost-opacity").value,N=p*_;e.translate(C,k),b(N),m(N),e.translate(-C,-k)}w(),b(),m(),y(),x(),n&&e.translate(c.x1,c.y1)}}},ls=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n){if(n.visible()){var r=n.pstyle("".concat(e,"-opacity")).value;if(0!==r){var i=this,o=i.usePaths(),a=n._private.rscratch,s=2*n.pstyle("".concat(e,"-padding")).pfValue,c=n.pstyle("".concat(e,"-color")).value;t.lineWidth=s,"self"!==a.edgeType||o?t.lineCap="round":t.lineCap="butt",i.colorStrokeStyle(t,c[0],c[1],c[2],r),i.drawEdgePath(n,t,a.allpts,"solid")}}}};us.drawEdgeOverlay=ls("overlay"),us.drawEdgeUnderlay=ls("underlay"),us.drawEdgePath=function(e,t,n,r){var i,o=e._private.rscratch,a=t,s=!1,c=this.usePaths(),u=e.pstyle("line-dash-pattern").pfValue,l=e.pstyle("line-dash-offset").pfValue;if(c){var h=n.join("$");o.pathCacheKey&&o.pathCacheKey===h?(i=t=o.pathCache,s=!0):(i=t=new Path2D,o.pathCacheKey=h,o.pathCache=i)}if(a.setLineDash)switch(r){case"dotted":a.setLineDash([1,1]);break;case"dashed":a.setLineDash(u),a.lineDashOffset=l;break;case"solid":a.setLineDash([])}if(!s&&!o.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),o.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var f=2;f+35&&void 0!==arguments[5]?arguments[5]:5;e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.quadraticCurveTo(t+r,n,t+r,n+o),e.lineTo(t+r,n+i-o),e.quadraticCurveTo(t+r,n+i,t+r-o,n+i),e.lineTo(t+o,n+i),e.quadraticCurveTo(t,n+i,t,n+i-o),e.lineTo(t,n+o),e.quadraticCurveTo(t,n,t+o,n),e.closePath(),e.fill()}fs.eleTextBiggerThanMin=function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),i=Math.ceil(We(n*r));t=Math.pow(2,i)}return!(e.pstyle("font-size").pfValue*t5&&void 0!==arguments[5])||arguments[5],a=this;if(null==r){if(o&&!a.eleTextBiggerThanMin(t))return}else if(!1===r)return;if(t.isNode()){var s=t.pstyle("label");if(!s||!s.value)return;var c=a.getLabelJustification(t);e.textAlign=c,e.textBaseline="bottom"}else{var u=t.element()._private.rscratch.badLine,l=t.pstyle("label"),h=t.pstyle("source-label"),f=t.pstyle("target-label");if(u||(!l||!l.value)&&(!h||!h.value)&&(!f||!f.value))return;e.textAlign="center",e.textBaseline="bottom"}var d,g=!n;n&&(d=n,e.translate(-d.x1,-d.y1)),null==i?(a.drawText(e,t,null,g,o),t.isEdge()&&(a.drawText(e,t,"source",g,o),a.drawText(e,t,"target",g,o))):a.drawText(e,t,i,g,o),n&&e.translate(d.x1,d.y1)},fs.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n2&&void 0!==arguments[2])||arguments[2],r=t.pstyle("font-style").strValue,i=t.pstyle("font-size").pfValue+"px",o=t.pstyle("font-family").strValue,a=t.pstyle("font-weight").strValue,s=n?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,c=t.pstyle("text-outline-opacity").value*s,u=t.pstyle("color").value,l=t.pstyle("text-outline-color").value;e.font=r+" "+a+" "+i+" "+o,e.lineJoin="round",this.colorFillStyle(e,u[0],u[1],u[2],s),this.colorStrokeStyle(e,l[0],l[1],l[2],c)},fs.getTextAngle=function(e,t){var n=e._private.rscratch,r=t?t+"-":"",i=e.pstyle(r+"text-rotation"),o=Ce(n,"labelAngle",t);return"autorotate"===i.strValue?e.isEdge()?o:0:"none"===i.strValue?0:i.pfValue},fs.drawText=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=t._private,a=o.rscratch,s=i?t.effectiveOpacity():1;if(!i||0!==s&&0!==t.pstyle("text-opacity").value){"main"===n&&(n=null);var c,u,l=Ce(a,"labelX",n),h=Ce(a,"labelY",n),f=this.getLabelText(t,n);if(null!=f&&""!==f&&!isNaN(l)&&!isNaN(h)){this.setupTextStyle(e,t,i);var d,g=n?n+"-":"",p=Ce(a,"labelWidth",n),v=Ce(a,"labelHeight",n),b=t.pstyle(g+"text-margin-x").pfValue,y=t.pstyle(g+"text-margin-y").pfValue,w=t.isEdge(),m=t.pstyle("text-halign").value,x=t.pstyle("text-valign").value;switch(w&&(m="center",x="center"),l+=b,h+=y,0!==(d=r?this.getTextAngle(t,n):0)&&(c=l,u=h,e.translate(c,u),e.rotate(d),l=0,h=0),x){case"top":break;case"center":h+=v/2;break;case"bottom":h+=v}var E=t.pstyle("text-background-opacity").value,C=t.pstyle("text-border-opacity").value,k=t.pstyle("text-border-width").pfValue,_=t.pstyle("text-background-padding").pfValue;if(E>0||k>0&&C>0){var N=l-_;switch(m){case"left":N-=p;break;case"center":N-=p/2}var S=h-v-_,O=p+2*_,T=v+2*_;if(E>0){var L=e.fillStyle,I=t.pstyle("text-background-color").value;e.fillStyle="rgba("+I[0]+","+I[1]+","+I[2]+","+E*s+")";var A=t.pstyle("text-background-shape").strValue;0===A.indexOf("round")?ds(e,N,S,O,T,2):e.fillRect(N,S,O,T),e.fillStyle=L}if(k>0&&C>0){var M=e.strokeStyle,P=e.lineWidth,D=t.pstyle("text-border-color").value,j=t.pstyle("text-border-style").value;if(e.strokeStyle="rgba("+D[0]+","+D[1]+","+D[2]+","+C*s+")",e.lineWidth=k,e.setLineDash)switch(j){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=k/4,e.setLineDash([]);break;case"solid":e.setLineDash([])}if(e.strokeRect(N,S,O,T),"double"===j){var R=k/2;e.strokeRect(N+R,S+R,O-2*R,T-2*R)}e.setLineDash&&e.setLineDash([]),e.lineWidth=P,e.strokeStyle=M}}var G=2*t.pstyle("text-outline-width").pfValue;if(G>0&&(e.lineWidth=G),"wrap"===t.pstyle("text-wrap").value){var B=Ce(a,"labelWrapCachedLines",n),H=Ce(a,"labelLineHeight",n),F=p/2,Y=this.getLabelJustification(t);switch("auto"===Y||("left"===m?"left"===Y?l+=-p:"center"===Y&&(l+=-F):"center"===m?"left"===Y?l+=-F:"right"===Y&&(l+=F):"right"===m&&("center"===Y?l+=F:"right"===Y&&(l+=p))),x){case"top":case"center":case"bottom":h-=(B.length-1)*H}for(var z=0;z0&&e.strokeText(B[z],l,h),e.fillText(B[z],l,h),h+=H}else G>0&&e.strokeText(f,l,h),e.fillText(f,l,h);0!==d&&(e.rotate(-d),e.translate(-c,-u))}}};var gs={drawNode:function(e,t,n){var r,i,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],c=this,u=t._private,l=u.rscratch,h=t.position();if(C(h.x)&&C(h.y)&&(!s||t.visible())){var f,d,g=s?t.effectiveOpacity():1,p=c.usePaths(),v=!1,b=t.padding();r=t.width()+2*b,i=t.height()+2*b,n&&(d=n,e.translate(-d.x1,-d.y1));for(var y=t.pstyle("background-image"),w=y.value,m=new Array(w.length),x=new Array(w.length),E=0,k=0;k0&&void 0!==arguments[0]?arguments[0]:L;c.eleFillStyle(e,t,n)},D=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M;c.colorStrokeStyle(e,I[0],I[1],I[2],t)},j=t.pstyle("shape").strValue,R=t.pstyle("shape-polygon-points").pfValue;if(p){e.translate(h.x,h.y);var G=c.nodePathCache=c.nodePathCache||[],B=re("polygon"===j?j+","+R.join(","):j,""+i,""+r),H=G[B];null!=H?(f=H,v=!0,l.pathCache=f):(f=new Path2D,G[B]=l.pathCache=f)}var F=function(){if(!v){var n=h;p&&(n={x:0,y:0}),c.nodeShapes[c.getNodeShape(t)].draw(f||e,n.x,n.y,r,i)}p?e.fill(f):e.fill()},Y=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=u.backgrounding,o=0,a=0;a0&&void 0!==arguments[0]&&arguments[0],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g;c.hasPie(t)&&(c.drawPie(e,t,o),n&&(p||c.nodeShapes[c.getNodeShape(t)].draw(e,h.x,h.y,r,i)))},V=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,n=(O>0?O:-O)*t,r=O>0?0:255;0!==O&&(c.colorFillStyle(e,r,r,r,n),p?e.fill(f):e.fill())},U=function(){if(T>0){if(e.lineWidth=T,e.lineCap="butt",e.setLineDash)switch(A){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}if(p?e.stroke(f):e.stroke(),"double"===A){e.lineWidth=T/3;var t=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",p?e.stroke(f):e.stroke(),e.globalCompositeOperation=t}e.setLineDash&&e.setLineDash([])}},q=function(){a&&c.drawNodeOverlay(e,t,h,r,i)},X=function(){a&&c.drawNodeUnderlay(e,t,h,r,i)},W=function(){c.drawElementText(e,t,null,o)},Z="yes"===t.pstyle("ghost").value;if(Z){var $=t.pstyle("ghost-offset-x").pfValue,K=t.pstyle("ghost-offset-y").pfValue,Q=t.pstyle("ghost-opacity").value,J=Q*g;e.translate($,K),P(Q*L),F(),Y(J,!0),D(Q*M),U(),z(0!==O||0!==T),Y(J,!1),V(J),e.translate(-$,-K)}p&&e.translate(-h.x,-h.y),X(),p&&e.translate(h.x,h.y),P(),F(),Y(g,!0),D(),U(),z(0!==O||0!==T),Y(g,!1),V(),p&&e.translate(-h.x,-h.y),W(),q(),n&&e.translate(d.x1,d.y1)}}},ps=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n,r,i,o){if(n.visible()){var a=n.pstyle("".concat(e,"-padding")).pfValue,s=n.pstyle("".concat(e,"-opacity")).value,c=n.pstyle("".concat(e,"-color")).value,u=n.pstyle("".concat(e,"-shape")).value;if(s>0){if(r=r||n.position(),null==i||null==o){var l=n.padding();i=n.width()+2*l,o=n.height()+2*l}this.colorFillStyle(t,c[0],c[1],c[2],s),this.nodeShapes[u].draw(t,r.x,r.y,i+2*a,o+2*a),t.fill()}}}};gs.drawNodeOverlay=ps("overlay"),gs.drawNodeUnderlay=ps("underlay"),gs.hasPie=function(e){return(e=e[0])._private.hasPie},gs.drawPie=function(e,t,n,r){t=t[0],r=r||t.position();var i=t.cy().style(),o=t.pstyle("pie-size"),a=r.x,s=r.y,c=t.width(),u=t.height(),l=Math.min(c,u)/2,h=0;this.usePaths()&&(a=0,s=0),"%"===o.units?l*=o.pfValue:void 0!==o.pfValue&&(l=o.pfValue/2);for(var f=1;f<=i.pieBackgroundN;f++){var d=t.pstyle("pie-"+f+"-background-size").value,g=t.pstyle("pie-"+f+"-background-color").value,p=t.pstyle("pie-"+f+"-background-opacity").value*n,v=d/100;v+h>1&&(v=1-h);var b=1.5*Math.PI+2*Math.PI*h,y=b+2*Math.PI*v;0===d||h>=1||h+v>1||(e.beginPath(),e.moveTo(a,s),e.arc(a,s,l,b,y),e.closePath(),this.colorFillStyle(e,g[0],g[1],g[2],p),e.fill(),h+=v)}};for(var vs={getPixelRatio:function(){var e=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var t=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/t},paintCache:function(e){for(var t,n=this.paintCaches=this.paintCaches||[],r=!0,i=0;ia.minMbLowQualFrames&&(a.motionBlurPxRatio=a.mbPxRBlurry)),a.clearingMotionBlur&&(a.motionBlurPxRatio=1),a.textureDrawLastFrame&&!h&&(l[a.NODE]=!0,l[a.SELECT_BOX]=!0);var y=c.style(),w=c.zoom(),m=void 0!==i?i:w,x=c.pan(),E={x:x.x,y:x.y},C={zoom:w,pan:{x:x.x,y:x.y}},k=a.prevViewport;void 0===k||C.zoom!==k.zoom||C.pan.x!==k.pan.x||C.pan.y!==k.pan.y||p&&!g||(a.motionBlurPxRatio=1),o&&(E=o),m*=s,E.x*=s,E.y*=s;var _=a.getCachedZSortedEles();function N(e,t,n,r,i){var o=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",a.colorFillStyle(e,255,255,255,a.motionBlurTransparency),e.fillRect(t,n,r,i),e.globalCompositeOperation=o}function S(e,r){var s,c,l,h;a.clearingMotionBlur||e!==u.bufferContexts[a.MOTIONBLUR_BUFFER_NODE]&&e!==u.bufferContexts[a.MOTIONBLUR_BUFFER_DRAG]?(s=E,c=m,l=a.canvasWidth,h=a.canvasHeight):(s={x:x.x*d,y:x.y*d},c=w*d,l=a.canvasWidth*d,h=a.canvasHeight*d),e.setTransform(1,0,0,1,0,0),"motionBlur"===r?N(e,0,0,l,h):t||void 0!==r&&!r||e.clearRect(0,0,l,h),n||(e.translate(s.x,s.y),e.scale(c,c)),o&&e.translate(o.x,o.y),i&&e.scale(i,i)}if(h||(a.textureDrawLastFrame=!1),h){if(a.textureDrawLastFrame=!0,!a.textureCache){a.textureCache={},a.textureCache.bb=c.mutableElements().boundingBox(),a.textureCache.texture=a.data.bufferCanvases[a.TEXTURE_BUFFER];var O=a.data.bufferContexts[a.TEXTURE_BUFFER];O.setTransform(1,0,0,1,0,0),O.clearRect(0,0,a.canvasWidth*a.textureMult,a.canvasHeight*a.textureMult),a.render({forcedContext:O,drawOnlyNodeLayer:!0,forcedPxRatio:s*a.textureMult}),(C=a.textureCache.viewport={zoom:c.zoom(),pan:c.pan(),width:a.canvasWidth,height:a.canvasHeight}).mpan={x:(0-C.pan.x)/C.zoom,y:(0-C.pan.y)/C.zoom}}l[a.DRAG]=!1,l[a.NODE]=!1;var T=u.contexts[a.NODE],L=a.textureCache.texture;C=a.textureCache.viewport,T.setTransform(1,0,0,1,0,0),f?N(T,0,0,C.width,C.height):T.clearRect(0,0,C.width,C.height);var I=y.core("outside-texture-bg-color").value,A=y.core("outside-texture-bg-opacity").value;a.colorFillStyle(T,I[0],I[1],I[2],A),T.fillRect(0,0,C.width,C.height),w=c.zoom(),S(T,!1),T.clearRect(C.mpan.x,C.mpan.y,C.width/C.zoom/s,C.height/C.zoom/s),T.drawImage(L,C.mpan.x,C.mpan.y,C.width/C.zoom/s,C.height/C.zoom/s)}else a.textureOnViewport&&!t&&(a.textureCache=null);var M=c.extent(),P=a.pinching||a.hoverData.dragging||a.swipePanning||a.data.wheelZooming||a.hoverData.draggingEles||a.cy.animated(),D=a.hideEdgesOnViewport&&P,j=[];if(j[a.NODE]=!l[a.NODE]&&f&&!a.clearedForMotionBlur[a.NODE]||a.clearingMotionBlur,j[a.NODE]&&(a.clearedForMotionBlur[a.NODE]=!0),j[a.DRAG]=!l[a.DRAG]&&f&&!a.clearedForMotionBlur[a.DRAG]||a.clearingMotionBlur,j[a.DRAG]&&(a.clearedForMotionBlur[a.DRAG]=!0),l[a.NODE]||n||r||j[a.NODE]){var R=f&&!j[a.NODE]&&1!==d;S(T=t||(R?a.data.bufferContexts[a.MOTIONBLUR_BUFFER_NODE]:u.contexts[a.NODE]),f&&!R?"motionBlur":void 0),D?a.drawCachedNodes(T,_.nondrag,s,M):a.drawLayeredElements(T,_.nondrag,s,M),a.debug&&a.drawDebugPoints(T,_.nondrag),n||f||(l[a.NODE]=!1)}if(!r&&(l[a.DRAG]||n||j[a.DRAG])&&(R=f&&!j[a.DRAG]&&1!==d,S(T=t||(R?a.data.bufferContexts[a.MOTIONBLUR_BUFFER_DRAG]:u.contexts[a.DRAG]),f&&!R?"motionBlur":void 0),D?a.drawCachedNodes(T,_.drag,s,M):a.drawCachedElements(T,_.drag,s,M),a.debug&&a.drawDebugPoints(T,_.drag),n||f||(l[a.DRAG]=!1)),a.showFps||!r&&l[a.SELECT_BOX]&&!n){if(S(T=t||u.contexts[a.SELECT_BOX]),1==a.selection[4]&&(a.hoverData.selecting||a.touchData.selecting)){w=a.cy.zoom();var G=y.core("selection-box-border-width").value/w;T.lineWidth=G,T.fillStyle="rgba("+y.core("selection-box-color").value[0]+","+y.core("selection-box-color").value[1]+","+y.core("selection-box-color").value[2]+","+y.core("selection-box-opacity").value+")",T.fillRect(a.selection[0],a.selection[1],a.selection[2]-a.selection[0],a.selection[3]-a.selection[1]),G>0&&(T.strokeStyle="rgba("+y.core("selection-box-border-color").value[0]+","+y.core("selection-box-border-color").value[1]+","+y.core("selection-box-border-color").value[2]+","+y.core("selection-box-opacity").value+")",T.strokeRect(a.selection[0],a.selection[1],a.selection[2]-a.selection[0],a.selection[3]-a.selection[1]))}if(u.bgActivePosistion&&!a.hoverData.selecting){w=a.cy.zoom();var B=u.bgActivePosistion;T.fillStyle="rgba("+y.core("active-bg-color").value[0]+","+y.core("active-bg-color").value[1]+","+y.core("active-bg-color").value[2]+","+y.core("active-bg-opacity").value+")",T.beginPath(),T.arc(B.x,B.y,y.core("active-bg-size").pfValue/w,0,2*Math.PI),T.fill()}var H=a.lastRedrawTime;if(a.showFps&&H){H=Math.round(H);var F=Math.round(1e3/H);T.setTransform(1,0,0,1,0,0),T.fillStyle="rgba(255, 0, 0, 0.75)",T.strokeStyle="rgba(255, 0, 0, 0.75)",T.lineWidth=1,T.fillText("1 frame = "+H+" ms = "+F+" fps",0,20),T.strokeRect(0,30,250,20),T.fillRect(0,30,250*Math.min(F/60,1),20)}n||(l[a.SELECT_BOX]=!1)}if(f&&1!==d){var Y=u.contexts[a.NODE],z=a.data.bufferCanvases[a.MOTIONBLUR_BUFFER_NODE],V=u.contexts[a.DRAG],U=a.data.bufferCanvases[a.MOTIONBLUR_BUFFER_DRAG],q=function(e,t,n){e.setTransform(1,0,0,1,0,0),n||!b?e.clearRect(0,0,a.canvasWidth,a.canvasHeight):N(e,0,0,a.canvasWidth,a.canvasHeight);var r=d;e.drawImage(t,0,0,a.canvasWidth*r,a.canvasHeight*r,0,0,a.canvasWidth,a.canvasHeight)};(l[a.NODE]||j[a.NODE])&&(q(Y,z,j[a.NODE]),l[a.NODE]=!1),(l[a.DRAG]||j[a.DRAG])&&(q(V,U,j[a.DRAG]),l[a.DRAG]=!1)}a.prevViewport=C,a.clearingMotionBlur&&(a.clearingMotionBlur=!1,a.motionBlurCleared=!0,a.motionBlur=!0),f&&(a.motionBlurTimeout=setTimeout((function(){a.motionBlurTimeout=null,a.clearedForMotionBlur[a.NODE]=!1,a.clearedForMotionBlur[a.DRAG]=!1,a.motionBlur=!1,a.clearingMotionBlur=!h,a.mbFrames=0,l[a.NODE]=!0,l[a.DRAG]=!0,a.redraw()}),100)),t||c.emit("render")}},bs={drawPolygonPath:function(e,t,n,r,i,o){var a=r/2,s=i/2;e.beginPath&&e.beginPath(),e.moveTo(t+a*o[0],n+s*o[1]);for(var c=1;c0&&o>0){f.clearRect(0,0,i,o),f.globalCompositeOperation="source-over";var d=this.getCachedZSortedEles();if(e.full)f.translate(-n.x1*c,-n.y1*c),f.scale(c,c),this.drawElements(f,d),f.scale(1/c,1/c),f.translate(n.x1*c,n.y1*c);else{var g=t.pan(),p={x:g.x*c,y:g.y*c};c*=t.zoom(),f.translate(p.x,p.y),f.scale(c,c),this.drawElements(f,d),f.scale(1/c,1/c),f.translate(-p.x,-p.y)}e.bg&&(f.globalCompositeOperation="destination-over",f.fillStyle=e.bg,f.rect(0,0,i,o),f.fill())}return h},ks.png=function(e){return Ns(e,this.bufferCanvasImage(e),"image/png")},ks.jpg=function(e){return Ns(e,this.bufferCanvasImage(e),"image/jpeg")};var Ss=Ts,Os=Ts.prototype;function Ts(e){var t=this;t.data={canvases:new Array(Os.CANVAS_LAYERS),contexts:new Array(Os.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Os.CANVAS_LAYERS),bufferCanvases:new Array(Os.BUFFER_COUNT),bufferContexts:new Array(Os.CANVAS_LAYERS)};var n="-webkit-tap-highlight-color",r="rgba(0,0,0,0)";t.data.canvasContainer=document.createElement("div");var i=t.data.canvasContainer.style;t.data.canvasContainer.style[n]=r,i.position="relative",i.zIndex="0",i.overflow="hidden";var o=e.cy.container();o.appendChild(t.data.canvasContainer),o.style[n]=r;var a={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};d&&d.userAgent.match(/msie|trident|edge/i)&&(a["-ms-touch-action"]="none",a["touch-action"]="none");for(var s=0;s{e.exports={graphlib:n(574),layout:n(8123),debug:n(7570),util:{time:n(7266).time,notime:n(7266).notime},version:n(8177)}},2188:(e,t,n)=>{"use strict";var r=n(8436),i=n(4079);e.exports={run:function(e){var t="greedy"===e.graph().acyclicer?i(e,function(e){return function(t){return e.edge(t).weight}}(e)):function(e){var t=[],n={},i={};return r.forEach(e.nodes(),(function o(a){r.has(i,a)||(i[a]=!0,n[a]=!0,r.forEach(e.outEdges(a),(function(e){r.has(n,e.w)?t.push(e):o(e.w)})),delete n[a])})),t}(e);r.forEach(t,(function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r.uniqueId("rev"))}))},undo:function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}}))}}},1133:(e,t,n)=>{var r=n(8436),i=n(7266);function o(e,t,n,r,o,a){var s={width:0,height:0,rank:a,borderType:t},c=o[t][a-1],u=i.addDummyNode(e,"border",s,n);o[t][a]=u,e.setParent(u,r),c&&e.setEdge(c,u,{weight:1})}e.exports=function(e){r.forEach(e.children(),(function t(n){var i=e.children(n),a=e.node(n);if(i.length&&r.forEach(i,t),r.has(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var s=a.minRank,c=a.maxRank+1;s{"use strict";var r=n(8436);function i(e){r.forEach(e.nodes(),(function(t){o(e.node(t))})),r.forEach(e.edges(),(function(t){o(e.edge(t))}))}function o(e){var t=e.width;e.width=e.height,e.height=t}function a(e){e.y=-e.y}function s(e){var t=e.x;e.x=e.y,e.y=t}e.exports={adjust:function(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||i(e)},undo:function(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||function(e){r.forEach(e.nodes(),(function(t){a(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,a),r.has(n,"y")&&a(n)}))}(e),"lr"!==t&&"rl"!==t||(function(e){r.forEach(e.nodes(),(function(t){s(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,s),r.has(n,"x")&&s(n)}))}(e),i(e))}}},7822:e=>{function t(){var e={};e._next=e._prev=e,this._sentinel=e}function n(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function r(e,t){if("_next"!==e&&"_prev"!==e)return t}e.exports=t,t.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return n(t),t},t.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&n(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},t.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,r)),n=n._prev;return"["+e.join(", ")+"]"}},7570:(e,t,n)=>{var r=n(8436),i=n(7266),o=n(574).Graph;e.exports={debugOrdering:function(e){var t=i.buildLayerMatrix(e),n=new o({compound:!0,multigraph:!0}).setGraph({});return r.forEach(e.nodes(),(function(t){n.setNode(t,{label:t}),n.setParent(t,"layer"+e.node(t).rank)})),r.forEach(e.edges(),(function(e){n.setEdge(e.v,e.w,{},e.name)})),r.forEach(t,(function(e,t){var i="layer"+t;n.setNode(i,{rank:"same"}),r.reduce(e,(function(e,t){return n.setEdge(e,t,{style:"invis"}),t}))})),n}}},574:(e,t,n)=>{var r;try{r=n(8282)}catch(e){}r||(r=window.graphlib),e.exports=r},4079:(e,t,n)=>{var r=n(8436),i=n(574).Graph,o=n(7822);e.exports=function(e,t){if(e.nodeCount()<=1)return[];var n=function(e,t){var n=new i,a=0,s=0;r.forEach(e.nodes(),(function(e){n.setNode(e,{v:e,in:0,out:0})})),r.forEach(e.edges(),(function(e){var r=n.edge(e.v,e.w)||0,i=t(e),o=r+i;n.setEdge(e.v,e.w,o),s=Math.max(s,n.node(e.v).out+=i),a=Math.max(a,n.node(e.w).in+=i)}));var u=r.range(s+a+3).map((function(){return new o})),l=a+1;return r.forEach(n.nodes(),(function(e){c(u,l,n.node(e))})),{graph:n,buckets:u,zeroIdx:l}}(e,t||a),u=function(e,t,n){for(var r,i=[],o=t[t.length-1],a=t[0];e.nodeCount();){for(;r=a.dequeue();)s(e,t,n,r);for(;r=o.dequeue();)s(e,t,n,r);if(e.nodeCount())for(var c=t.length-2;c>0;--c)if(r=t[c].dequeue()){i=i.concat(s(e,t,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(u,(function(t){return e.outEdges(t.v,t.w)})),!0)};var a=r.constant(1);function s(e,t,n,i,o){var a=o?[]:void 0;return r.forEach(e.inEdges(i.v),(function(r){var i=e.edge(r),s=e.node(r.v);o&&a.push({v:r.v,w:r.w}),s.out-=i,c(t,n,s)})),r.forEach(e.outEdges(i.v),(function(r){var i=e.edge(r),o=r.w,a=e.node(o);a.in-=i,c(t,n,a)})),e.removeNode(i.v),a}function c(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}},8123:(e,t,n)=>{"use strict";var r=n(8436),i=n(2188),o=n(5995),a=n(8093),s=n(7266).normalizeRanks,c=n(4219),u=n(7266).removeEmptyRanks,l=n(2981),h=n(1133),f=n(3258),d=n(3408),g=n(7873),p=n(7266),v=n(574).Graph;e.exports=function(e,t){var n=t&&t.debugTiming?p.time:p.notime;n("layout",(function(){var t=n(" buildLayoutGraph",(function(){return function(e){var t=new v({multigraph:!0,compound:!0}),n=N(e.graph());return t.setGraph(r.merge({},y,_(n,b),r.pick(n,w))),r.forEach(e.nodes(),(function(n){var i=N(e.node(n));t.setNode(n,r.defaults(_(i,m),x)),t.setParent(n,e.parent(n))})),r.forEach(e.edges(),(function(n){var i=N(e.edge(n));t.setEdge(n,r.merge({},C,_(i,E),r.pick(i,k)))})),t}(e)}));n(" runLayout",(function(){!function(e,t){t(" makeSpaceForEdgeLabels",(function(){!function(e){var t=e.graph();t.ranksep/=2,r.forEach(e.edges(),(function(n){var r=e.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(e)})),t(" removeSelfEdges",(function(){!function(e){r.forEach(e.edges(),(function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}}))}(e)})),t(" acyclic",(function(){i.run(e)})),t(" nestingGraph.run",(function(){l.run(e)})),t(" rank",(function(){a(p.asNonCompoundGraph(e))})),t(" injectEdgeLabelProxies",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),i={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};p.addDummyNode(e,"edge-proxy",i,"_ep")}}))}(e)})),t(" removeEmptyRanks",(function(){u(e)})),t(" nestingGraph.cleanup",(function(){l.cleanup(e)})),t(" normalizeRanks",(function(){s(e)})),t(" assignRankMinMax",(function(){!function(e){var t=0;r.forEach(e.nodes(),(function(n){var i=e.node(n);i.borderTop&&(i.minRank=e.node(i.borderTop).rank,i.maxRank=e.node(i.borderBottom).rank,t=r.max(t,i.maxRank))})),e.graph().maxRank=t}(e)})),t(" removeEdgeLabelProxies",(function(){!function(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))}))}(e)})),t(" normalize.run",(function(){o.run(e)})),t(" parentDummyChains",(function(){c(e)})),t(" addBorderSegments",(function(){h(e)})),t(" order",(function(){d(e)})),t(" insertSelfEdges",(function(){!function(e){var t=p.buildLayerMatrix(e);r.forEach(t,(function(t){var n=0;r.forEach(t,(function(t,i){var o=e.node(t);o.order=i+n,r.forEach(o.selfEdges,(function(t){p.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:o.rank,order:i+ ++n,e:t.e,label:t.label},"_se")})),delete o.selfEdges}))}))}(e)})),t(" adjustCoordinateSystem",(function(){f.adjust(e)})),t(" position",(function(){g(e)})),t(" positionSelfEdges",(function(){!function(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);if("selfedge"===n.dummy){var r=e.node(n.e.v),i=r.x+r.width/2,o=r.y,a=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*a/3,y:o-s},{x:i+5*a/6,y:o-s},{x:i+a,y:o},{x:i+5*a/6,y:o+s},{x:i+2*a/3,y:o+s}],n.label.x=n.x,n.label.y=n.y}}))}(e)})),t(" removeBorderNodes",(function(){!function(e){r.forEach(e.nodes(),(function(t){if(e.children(t).length){var n=e.node(t),i=e.node(n.borderTop),o=e.node(n.borderBottom),a=e.node(r.last(n.borderLeft)),s=e.node(r.last(n.borderRight));n.width=Math.abs(s.x-a.x),n.height=Math.abs(o.y-i.y),n.x=a.x+n.width/2,n.y=i.y+n.height/2}})),r.forEach(e.nodes(),(function(t){"border"===e.node(t).dummy&&e.removeNode(t)}))}(e)})),t(" normalize.undo",(function(){o.undo(e)})),t(" fixupEdgeLabelCoords",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(e)})),t(" undoCoordinateSystem",(function(){f.undo(e)})),t(" translateGraph",(function(){!function(e){var t=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,o=0,a=e.graph(),s=a.marginx||0,c=a.marginy||0;function u(e){var r=e.x,a=e.y,s=e.width,c=e.height;t=Math.min(t,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,a-c/2),o=Math.max(o,a+c/2)}r.forEach(e.nodes(),(function(t){u(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.has(n,"x")&&u(n)})),t-=s,i-=c,r.forEach(e.nodes(),(function(n){var r=e.node(n);r.x-=t,r.y-=i})),r.forEach(e.edges(),(function(n){var o=e.edge(n);r.forEach(o.points,(function(e){e.x-=t,e.y-=i})),r.has(o,"x")&&(o.x-=t),r.has(o,"y")&&(o.y-=i)})),a.width=n-t+s,a.height=o-i+c}(e)})),t(" assignNodeIntersects",(function(){!function(e){r.forEach(e.edges(),(function(t){var n,r,i=e.edge(t),o=e.node(t.v),a=e.node(t.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=a,r=o),i.points.unshift(p.intersectRect(o,n)),i.points.push(p.intersectRect(a,r))}))}(e)})),t(" reversePoints",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);n.reversed&&n.points.reverse()}))}(e)})),t(" acyclic.undo",(function(){i.undo(e)}))}(t,n)})),n(" updateInputGraph",(function(){!function(e,t){r.forEach(e.nodes(),(function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(e.edges(),(function(n){var i=e.edge(n),o=t.edge(n);i.points=o.points,r.has(o,"x")&&(i.x=o.x,i.y=o.y)})),e.graph().width=t.graph().width,e.graph().height=t.graph().height}(e,t)}))}))};var b=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},w=["acyclicer","ranker","rankdir","align"],m=["width","height"],x={width:0,height:0},E=["minlen","weight","width","height","labeloffset"],C={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},k=["labelpos"];function _(e,t){return r.mapValues(r.pick(e,t),Number)}function N(e){var t={};return r.forEach(e,(function(e,n){t[n.toLowerCase()]=e})),t}},8436:(e,t,n)=>{var r;try{r={cloneDeep:n(361),constant:n(5703),defaults:n(1747),each:n(6073),filter:n(3105),find:n(3311),flatten:n(5564),forEach:n(4486),forIn:n(2620),has:n(8721),isUndefined:n(2353),last:n(928),map:n(5161),mapValues:n(6604),max:n(6162),merge:n(3857),min:n(3632),minBy:n(2762),now:n(7771),pick:n(9722),range:n(6026),reduce:n(4061),sortBy:n(9734),uniqueId:n(3955),values:n(2628),zipObject:n(7287)}}catch(e){}r||(r=window._),e.exports=r},2981:(e,t,n)=>{var r=n(8436),i=n(7266);function o(e,t,n,a,s,c,u){var l=e.children(u);if(l.length){var h=i.addBorderNode(e,"_bt"),f=i.addBorderNode(e,"_bb"),d=e.node(u);e.setParent(h,u),d.borderTop=h,e.setParent(f,u),d.borderBottom=f,r.forEach(l,(function(r){o(e,t,n,a,s,c,r);var i=e.node(r),l=i.borderTop?i.borderTop:r,d=i.borderBottom?i.borderBottom:r,g=i.borderTop?a:2*a,p=l!==d?1:s-c[u]+1;e.setEdge(h,l,{weight:g,minlen:p,nestingEdge:!0}),e.setEdge(d,f,{weight:g,minlen:p,nestingEdge:!0})})),e.parent(u)||e.setEdge(t,h,{weight:0,minlen:s+c[u]})}else u!==t&&e.setEdge(t,u,{weight:0,minlen:n})}e.exports={run:function(e){var t=i.addDummyNode(e,"root",{},"_root"),n=function(e){var t={};function n(i,o){var a=e.children(i);a&&a.length&&r.forEach(a,(function(e){n(e,o+1)})),t[i]=o}return r.forEach(e.children(),(function(e){n(e,1)})),t}(e),a=r.max(r.values(n))-1,s=2*a+1;e.graph().nestingRoot=t,r.forEach(e.edges(),(function(t){e.edge(t).minlen*=s}));var c=function(e){return r.reduce(e.edges(),(function(t,n){return t+e.edge(n).weight}),0)}(e)+1;r.forEach(e.children(),(function(r){o(e,t,s,c,a,n,r)})),e.graph().nodeRankFactor=s},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,r.forEach(e.edges(),(function(t){e.edge(t).nestingEdge&&e.removeEdge(t)}))}}},5995:(e,t,n)=>{"use strict";var r=n(8436),i=n(7266);e.exports={run:function(e){e.graph().dummyChains=[],r.forEach(e.edges(),(function(t){!function(e,t){var n,r,o,a=t.v,s=e.node(a).rank,c=t.w,u=e.node(c).rank,l=t.name,h=e.edge(t),f=h.labelRank;if(u!==s+1){for(e.removeEdge(t),o=0,++s;s{var r=n(8436);e.exports=function(e,t,n){var i,o={};r.forEach(n,(function(n){for(var r,a,s=e.parent(n);s;){if((r=e.parent(s))?(a=o[r],o[r]=s):(a=i,i=s),a&&a!==s)return void t.setEdge(a,s);s=r}}))}},5439:(e,t,n)=>{var r=n(8436);e.exports=function(e,t){return r.map(t,(function(t){var n=e.inEdges(t);if(n.length){var i=r.reduce(n,(function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}}),{sum:0,weight:0});return{v:t,barycenter:i.sum/i.weight,weight:i.weight}}return{v:t}}))}},3128:(e,t,n)=>{var r=n(8436),i=n(574).Graph;e.exports=function(e,t,n){var o=function(e){for(var t;e.hasNode(t=r.uniqueId("_root")););return t}(e),a=new i({compound:!0}).setGraph({root:o}).setDefaultNodeLabel((function(t){return e.node(t)}));return r.forEach(e.nodes(),(function(i){var s=e.node(i),c=e.parent(i);(s.rank===t||s.minRank<=t&&t<=s.maxRank)&&(a.setNode(i),a.setParent(i,c||o),r.forEach(e[n](i),(function(t){var n=t.v===i?t.w:t.v,o=a.edge(n,i),s=r.isUndefined(o)?0:o.weight;a.setEdge(n,i,{weight:e.edge(t).weight+s})})),r.has(s,"minRank")&&a.setNode(i,{borderLeft:s.borderLeft[t],borderRight:s.borderRight[t]}))})),a}},6630:(e,t,n)=>{"use strict";var r=n(8436);function i(e,t,n){for(var i=r.zipObject(n,r.map(n,(function(e,t){return t}))),o=r.flatten(r.map(t,(function(t){return r.sortBy(r.map(e.outEdges(t),(function(t){return{pos:i[t.w],weight:e.edge(t).weight}})),"pos")})),!0),a=1;a0;)t%2&&(n+=c[t+1]),c[t=t-1>>1]+=e.weight;u+=e.weight*n}))),u}e.exports=function(e,t){for(var n=0,r=1;r{"use strict";var r=n(8436),i=n(2588),o=n(6630),a=n(1026),s=n(3128),c=n(5093),u=n(574).Graph,l=n(7266);function h(e,t,n){return r.map(t,(function(t){return s(e,t,n)}))}function f(e,t){var n=new u;r.forEach(e,(function(e){var i=e.graph().root,o=a(e,i,n,t);r.forEach(o.vs,(function(t,n){e.node(t).order=n})),c(e,n,o.vs)}))}function d(e,t){r.forEach(t,(function(t){r.forEach(t,(function(t,n){e.node(t).order=n}))}))}e.exports=function(e){var t=l.maxRank(e),n=h(e,r.range(1,t+1),"inEdges"),a=h(e,r.range(t-1,-1,-1),"outEdges"),s=i(e);d(e,s);for(var c,u=Number.POSITIVE_INFINITY,g=0,p=0;p<4;++g,++p){f(g%2?n:a,g%4>=2),s=l.buildLayerMatrix(e);var v=o(e,s);v{"use strict";var r=n(8436);e.exports=function(e){var t={},n=r.filter(e.nodes(),(function(t){return!e.children(t).length})),i=r.max(r.map(n,(function(t){return e.node(t).rank}))),o=r.map(r.range(i+1),(function(){return[]})),a=r.sortBy(n,(function(t){return e.node(t).rank}));return r.forEach(a,(function n(i){if(!r.has(t,i)){t[i]=!0;var a=e.node(i);o[a.rank].push(i),r.forEach(e.successors(i),n)}})),o}},9567:(e,t,n)=>{"use strict";var r=n(8436);e.exports=function(e,t){var n={};return r.forEach(e,(function(e,t){var i=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};r.isUndefined(e.barycenter)||(i.barycenter=e.barycenter,i.weight=e.weight)})),r.forEach(t.edges(),(function(e){var t=n[e.v],i=n[e.w];r.isUndefined(t)||r.isUndefined(i)||(i.indegree++,t.out.push(n[e.w]))})),function(e){var t=[];function n(e){return function(t){var n,i,o,a;t.merged||(r.isUndefined(t.barycenter)||r.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&(i=t,o=0,a=0,(n=e).weight&&(o+=n.barycenter*n.weight,a+=n.weight),i.weight&&(o+=i.barycenter*i.weight,a+=i.weight),n.vs=i.vs.concat(n.vs),n.barycenter=o/a,n.weight=a,n.i=Math.min(i.i,n.i),i.merged=!0)}}function i(t){return function(n){n.in.push(t),0==--n.indegree&&e.push(n)}}for(;e.length;){var o=e.pop();t.push(o),r.forEach(o.in.reverse(),n(o)),r.forEach(o.out,i(o))}return r.map(r.filter(t,(function(e){return!e.merged})),(function(e){return r.pick(e,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(e){return!e.indegree})))}},1026:(e,t,n)=>{var r=n(8436),i=n(5439),o=n(9567),a=n(7304);e.exports=function e(t,n,s,c){var u=t.children(n),l=t.node(n),h=l?l.borderLeft:void 0,f=l?l.borderRight:void 0,d={};h&&(u=r.filter(u,(function(e){return e!==h&&e!==f})));var g=i(t,u);r.forEach(g,(function(n){if(t.children(n.v).length){var i=e(t,n.v,s,c);d[n.v]=i,r.has(i,"barycenter")&&(o=n,a=i,r.isUndefined(o.barycenter)?(o.barycenter=a.barycenter,o.weight=a.weight):(o.barycenter=(o.barycenter*o.weight+a.barycenter*a.weight)/(o.weight+a.weight),o.weight+=a.weight))}var o,a}));var p=o(g,s);!function(e,t){r.forEach(e,(function(e){e.vs=r.flatten(e.vs.map((function(e){return t[e]?t[e].vs:e})),!0)}))}(p,d);var v=a(p,c);if(h&&(v.vs=r.flatten([h,v.vs,f],!0),t.predecessors(h).length)){var b=t.node(t.predecessors(h)[0]),y=t.node(t.predecessors(f)[0]);r.has(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+b.order+y.order)/(v.weight+2),v.weight+=2}return v}},7304:(e,t,n)=>{var r=n(8436),i=n(7266);function o(e,t,n){for(var i;t.length&&(i=r.last(t)).i<=n;)t.pop(),e.push(i.vs),n++;return n}e.exports=function(e,t){var n,a=i.partition(e,(function(e){return r.has(e,"barycenter")})),s=a.lhs,c=r.sortBy(a.rhs,(function(e){return-e.i})),u=[],l=0,h=0,f=0;s.sort((n=!!t,function(e,t){return e.barycentert.barycenter?1:n?t.i-e.i:e.i-t.i})),f=o(u,c,f),r.forEach(s,(function(e){f+=e.vs.length,u.push(e.vs),l+=e.barycenter*e.weight,h+=e.weight,f=o(u,c,f)}));var d={vs:r.flatten(u,!0)};return h&&(d.barycenter=l/h,d.weight=h),d}},4219:(e,t,n)=>{var r=n(8436);e.exports=function(e){var t=function(e){var t={},n=0;return r.forEach(e.children(),(function i(o){var a=n;r.forEach(e.children(o),i),t[o]={low:a,lim:n++}})),t}(e);r.forEach(e.graph().dummyChains,(function(n){for(var r=e.node(n),i=r.edgeObj,o=function(e,t,n,r){var i,o,a=[],s=[],c=Math.min(t[n].low,t[r].low),u=Math.max(t[n].lim,t[r].lim);i=n;do{i=e.parent(i),a.push(i)}while(i&&(t[i].low>c||u>t[i].lim));for(o=i,i=r;(i=e.parent(i))!==o;)s.push(i);return{path:a.concat(s.reverse()),lca:o}}(e,t,i.v,i.w),a=o.path,s=o.lca,c=0,u=a[c],l=!0;n!==i.w;){if(r=e.node(n),l){for(;(u=a[c])!==s&&e.node(u).maxRank{"use strict";var r=n(8436),i=n(574).Graph,o=n(7266);function a(e,t){var n={};return r.reduce(t,(function(t,i){var o=0,a=0,s=t.length,u=r.last(i);return r.forEach(i,(function(t,l){var h=function(e,t){if(e.node(t).dummy)return r.find(e.predecessors(t),(function(t){return e.node(t).dummy}))}(e,t),f=h?e.node(h).order:s;(h||t===u)&&(r.forEach(i.slice(a,l+1),(function(t){r.forEach(e.predecessors(t),(function(r){var i=e.node(r),a=i.order;!(as)&&c(n,t,u)}))}))}return r.reduce(t,(function(t,n){var o,a=-1,s=0;return r.forEach(n,(function(r,c){if("border"===e.node(r).dummy){var u=e.predecessors(r);u.length&&(o=e.node(u[0]).order,i(n,s,c,a,o),s=c,a=o)}i(n,s,n.length,o,t.length)})),n})),n}function c(e,t,n){if(t>n){var r=t;t=n,n=r}var i=e[t];i||(e[t]=i={}),i[n]=!0}function u(e,t,n){if(t>n){var i=t;t=n,n=i}return r.has(e[t],n)}function l(e,t,n,i){var o={},a={},s={};return r.forEach(t,(function(e){r.forEach(e,(function(e,t){o[e]=e,a[e]=e,s[e]=t}))})),r.forEach(t,(function(e){var t=-1;r.forEach(e,(function(e){var c=i(e);if(c.length){c=r.sortBy(c,(function(e){return s[e]}));for(var l=(c.length-1)/2,h=Math.floor(l),f=Math.ceil(l);h<=f;++h){var d=c[h];a[e]===e&&t{"use strict";var r=n(8436),i=n(7266),o=n(3573).positionX;e.exports=function(e){(function(e){var t=i.buildLayerMatrix(e),n=e.graph().ranksep,o=0;r.forEach(t,(function(t){var i=r.max(r.map(t,(function(t){return e.node(t).height})));r.forEach(t,(function(t){e.node(t).y=o+i/2})),o+=i+n}))})(e=i.asNonCompoundGraph(e)),r.forEach(o(e),(function(t,n){e.node(n).x=t}))}},300:(e,t,n)=>{"use strict";var r=n(8436),i=n(574).Graph,o=n(6681).slack;function a(e,t){return r.forEach(e.nodes(),(function n(i){r.forEach(t.nodeEdges(i),(function(r){var a=r.v,s=i===a?r.w:a;e.hasNode(s)||o(t,r)||(e.setNode(s,{}),e.setEdge(i,s,{}),n(s))}))})),e.nodeCount()}function s(e,t){return r.minBy(t.edges(),(function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return o(t,n)}))}function c(e,t,n){r.forEach(e.nodes(),(function(e){t.node(e).rank+=n}))}e.exports=function(e){var t,n,r=new i({directed:!1}),u=e.nodes()[0],l=e.nodeCount();for(r.setNode(u,{});a(r,e){"use strict";var r=n(6681).longestPath,i=n(300),o=n(2472);e.exports=function(e){switch(e.graph().ranker){case"network-simplex":default:!function(e){o(e)}(e);break;case"tight-tree":!function(e){r(e),i(e)}(e);break;case"longest-path":a(e)}};var a=r},2472:(e,t,n)=>{"use strict";var r=n(8436),i=n(300),o=n(6681).slack,a=n(6681).longestPath,s=n(574).alg.preorder,c=n(574).alg.postorder,u=n(7266).simplify;function l(e){e=u(e),a(e);var t,n=i(e);for(d(n),h(n,e);t=p(n);)b(n,e,t,v(n,e,t))}function h(e,t){var n=c(e,e.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=f(e,t,n)}(e,t,n)}))}function f(e,t,n){var i=e.node(n).parent,o=!0,a=t.edge(n,i),s=0;return a||(o=!1,a=t.edge(i,n)),s=a.weight,r.forEach(t.nodeEdges(n),(function(r){var a,c,u=r.v===n,l=u?r.w:r.v;if(l!==i){var h=u===o,f=t.edge(r).weight;if(s+=h?f:-f,a=n,c=l,e.hasEdge(a,c)){var d=e.edge(n,l).cutvalue;s+=h?-d:d}}})),s}function d(e,t){arguments.length<2&&(t=e.nodes()[0]),g(e,{},1,t)}function g(e,t,n,i,o){var a=n,s=e.node(i);return t[i]=!0,r.forEach(e.neighbors(i),(function(o){r.has(t,o)||(n=g(e,t,n,o,i))})),s.low=a,s.lim=n++,o?s.parent=o:delete s.parent,n}function p(e){return r.find(e.edges(),(function(t){return e.edge(t).cutvalue<0}))}function v(e,t,n){var i=n.v,a=n.w;t.hasEdge(i,a)||(i=n.w,a=n.v);var s=e.node(i),c=e.node(a),u=s,l=!1;s.lim>c.lim&&(u=c,l=!0);var h=r.filter(t.edges(),(function(t){return l===y(0,e.node(t.v),u)&&l!==y(0,e.node(t.w),u)}));return r.minBy(h,(function(e){return o(t,e)}))}function b(e,t,n,i){var o=n.v,a=n.w;e.removeEdge(o,a),e.setEdge(i.v,i.w,{}),d(e),h(e,t),function(e,t){var n=r.find(e.nodes(),(function(e){return!t.node(e).parent})),i=s(e,n);i=i.slice(1),r.forEach(i,(function(n){var r=e.node(n).parent,i=t.edge(n,r),o=!1;i||(i=t.edge(r,n),o=!0),t.node(n).rank=t.node(r).rank+(o?i.minlen:-i.minlen)}))}(e,t)}function y(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}e.exports=l,l.initLowLimValues=d,l.initCutValues=h,l.calcCutValue=f,l.leaveEdge=p,l.enterEdge=v,l.exchangeEdges=b},6681:(e,t,n)=>{"use strict";var r=n(8436);e.exports={longestPath:function(e){var t={};r.forEach(e.sources(),(function n(i){var o=e.node(i);if(r.has(t,i))return o.rank;t[i]=!0;var a=r.min(r.map(e.outEdges(i),(function(t){return n(t.w)-e.edge(t).minlen})));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),o.rank=a}))},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}},7266:(e,t,n)=>{"use strict";var r=n(8436),i=n(574).Graph;function o(e,t,n,i){var o;do{o=r.uniqueId(i)}while(e.hasNode(o));return n.dummy=t,e.setNode(o,n),o}function a(e){return r.max(r.map(e.nodes(),(function(t){var n=e.node(t).rank;if(!r.isUndefined(n))return n})))}e.exports={addDummyNode:o,simplify:function(e){var t=(new i).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),t},asNonCompoundGraph:function(e){var t=new i({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){e.children(n).length||t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){t.setEdge(n,e.edge(n))})),t},successorWeights:function(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.outEdges(t),(function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.inEdges(t),(function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)},intersectRect:function(e,t){var n,r,i=e.x,o=e.y,a=t.x-i,s=t.y-o,c=e.width/2,u=e.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*c>Math.abs(a)*u?(s<0&&(u=-u),n=u*a/s,r=u):(a<0&&(c=-c),n=c,r=c*s/a),{x:i+n,y:o+r}},buildLayerMatrix:function(e){var t=r.map(r.range(a(e)+1),(function(){return[]}));return r.forEach(e.nodes(),(function(n){var i=e.node(n),o=i.rank;r.isUndefined(o)||(t[o][i.order]=n)})),t},normalizeRanks:function(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank})));r.forEach(e.nodes(),(function(n){var i=e.node(n);r.has(i,"rank")&&(i.rank-=t)}))},removeEmptyRanks:function(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank}))),n=[];r.forEach(e.nodes(),(function(r){var i=e.node(r).rank-t;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,o=e.graph().nodeRankFactor;r.forEach(n,(function(t,n){r.isUndefined(t)&&n%o!=0?--i:i&&r.forEach(t,(function(t){e.node(t).rank+=i}))}))},addBorderNode:function(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),o(e,"border",i,t)},maxRank:a,partition:function(e,t){var n={lhs:[],rhs:[]};return r.forEach(e,(function(e){t(e)?n.lhs.push(e):n.rhs.push(e)})),n},time:function(e,t){var n=r.now();try{return t()}finally{console.log(e+" time: "+(r.now()-n)+"ms")}},notime:function(e,t){return t()}}},8177:e=>{e.exports="0.8.5"},8282:(e,t,n)=>{var r=n(2354);e.exports={Graph:r.Graph,json:n(8974),alg:n(2440),version:r.version}},2842:(e,t,n)=>{var r=n(9126);e.exports=function(e){var t,n={},i=[];function o(i){r.has(n,i)||(n[i]=!0,t.push(i),r.each(e.successors(i),o),r.each(e.predecessors(i),o))}return r.each(e.nodes(),(function(e){t=[],o(e),t.length&&i.push(t)})),i}},3984:(e,t,n)=>{var r=n(9126);function i(e,t,n,o,a,s){r.has(o,t)||(o[t]=!0,n||s.push(t),r.each(a(t),(function(t){i(e,t,n,o,a,s)})),n&&s.push(t))}e.exports=function(e,t,n){r.isArray(t)||(t=[t]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],s={};return r.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);i(e,t,"post"===n,s,o,a)})),a}},4847:(e,t,n)=>{var r=n(3763),i=n(9126);e.exports=function(e,t,n){return i.transform(e.nodes(),(function(i,o){i[o]=r(e,o,t,n)}),{})}},3763:(e,t,n)=>{var r=n(9126),i=n(9675);e.exports=function(e,t,n,r){return function(e,t,n,r){var o,a,s={},c=new i,u=function(e){var t=e.v!==o?e.v:e.w,r=s[t],i=n(e),u=a.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+i);u0&&(o=c.removeMin(),(a=s[o]).distance!==Number.POSITIVE_INFINITY);)r(o).forEach(u);return s}(e,String(t),n||o,r||function(t){return e.outEdges(t)})};var o=r.constant(1)},9096:(e,t,n)=>{var r=n(9126),i=n(5023);e.exports=function(e){return r.filter(i(e),(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))}},8924:(e,t,n)=>{var r=n(9126);e.exports=function(e,t,n){return function(e,t,n){var r={},i=e.nodes();return i.forEach((function(e){r[e]={},r[e][e]={distance:0},i.forEach((function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})})),n(e).forEach((function(n){var i=n.v===e?n.w:n.v,o=t(n);r[e][i]={distance:o,predecessor:e}}))})),i.forEach((function(e){var t=r[e];i.forEach((function(n){var o=r[n];i.forEach((function(n){var r=o[e],i=t[n],a=o[n],s=r.distance+i.distance;s{e.exports={components:n(2842),dijkstra:n(3763),dijkstraAll:n(4847),findCycles:n(9096),floydWarshall:n(8924),isAcyclic:n(2707),postorder:n(8828),preorder:n(2648),prim:n(514),tarjan:n(5023),topsort:n(2166)}},2707:(e,t,n)=>{var r=n(2166);e.exports=function(e){try{r(e)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}},8828:(e,t,n)=>{var r=n(3984);e.exports=function(e,t){return r(e,t,"post")}},2648:(e,t,n)=>{var r=n(3984);e.exports=function(e,t){return r(e,t,"pre")}},514:(e,t,n)=>{var r=n(9126),i=n(771),o=n(9675);e.exports=function(e,t){var n,a=new i,s={},c=new o;function u(e){var r=e.v===n?e.w:e.v,i=c.priority(r);if(void 0!==i){var o=t(e);o0;){if(n=c.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(l)throw new Error("Input graph is not connected: "+e);l=!0}e.nodeEdges(n).forEach(u)}return a}},5023:(e,t,n)=>{var r=n(9126);e.exports=function(e){var t=0,n=[],i={},o=[];function a(s){var c=i[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach((function(e){r.has(i,e)?i[e].onStack&&(c.lowlink=Math.min(c.lowlink,i[e].index)):(a(e),c.lowlink=Math.min(c.lowlink,i[e].lowlink))})),c.lowlink===c.index){var u,l=[];do{u=n.pop(),i[u].onStack=!1,l.push(u)}while(s!==u);o.push(l)}}return e.nodes().forEach((function(e){r.has(i,e)||a(e)})),o}},2166:(e,t,n)=>{var r=n(9126);function i(e){var t={},n={},i=[];if(r.each(e.sinks(),(function a(s){if(r.has(n,s))throw new o;r.has(t,s)||(n[s]=!0,t[s]=!0,r.each(e.predecessors(s),a),delete n[s],i.push(s))})),r.size(t)!==e.nodeCount())throw new o;return i}function o(){}e.exports=i,i.CycleException=o,o.prototype=new Error},9675:(e,t,n)=>{var r=n(9126);function i(){this._arr=[],this._keyIndices={}}e.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},i.prototype.has=function(e){return r.has(this._keyIndices,e)},i.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var i=this._arr,o=i.length;return n[e]=o,i.push({key:e,priority:t}),this._decrease(o),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},i.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},i.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,i=e;n>1].priority{"use strict";var r=n(9126);e.exports=o;var i="\0";function o(e){this._isDirected=!r.has(e,"directed")||e.directed,this._isMultigraph=!!r.has(e,"multigraph")&&e.multigraph,this._isCompound=!!r.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function a(e,t){e[t]?e[t]++:e[t]=1}function s(e,t){--e[t]||delete e[t]}function c(e,t,n,i){var o=""+t,a=""+n;if(!e&&o>a){var s=o;o=a,a=s}return o+""+a+""+(r.isUndefined(i)?"\0":i)}function u(e,t,n,r){var i=""+t,o=""+n;if(!e&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return r&&(s.name=r),s}function l(e,t){return c(e,t.v,t.w,t.name)}o.prototype._nodeCount=0,o.prototype._edgeCount=0,o.prototype.isDirected=function(){return this._isDirected},o.prototype.isMultigraph=function(){return this._isMultigraph},o.prototype.isCompound=function(){return this._isCompound},o.prototype.setGraph=function(e){return this._label=e,this},o.prototype.graph=function(){return this._label},o.prototype.setDefaultNodeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultNodeLabelFn=e,this},o.prototype.nodeCount=function(){return this._nodeCount},o.prototype.nodes=function(){return r.keys(this._nodes)},o.prototype.sources=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._in[t])}))},o.prototype.sinks=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._out[t])}))},o.prototype.setNodes=function(e,t){var n=arguments,i=this;return r.each(e,(function(e){n.length>1?i.setNode(e,t):i.setNode(e)})),this},o.prototype.setNode=function(e,t){return r.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=i,this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},o.prototype.node=function(e){return this._nodes[e]},o.prototype.hasNode=function(e){return r.has(this._nodes,e)},o.prototype.removeNode=function(e){var t=this;if(r.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],r.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),r.each(r.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],r.each(r.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},o.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(t))t=i;else{for(var n=t+="";!r.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},o.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},o.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==i)return t}},o.prototype.children=function(e){if(r.isUndefined(e)&&(e=i),this._isCompound){var t=this._children[e];if(t)return r.keys(t)}else{if(e===i)return this.nodes();if(this.hasNode(e))return[]}},o.prototype.predecessors=function(e){var t=this._preds[e];if(t)return r.keys(t)},o.prototype.successors=function(e){var t=this._sucs[e];if(t)return r.keys(t)},o.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return r.union(t,this.successors(e))},o.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},o.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){e(r)&&t.setNode(r,n)})),r.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var i={};function o(e){var r=n.parent(e);return void 0===r||t.hasNode(r)?(i[e]=r,r):r in i?i[r]:o(r)}return this._isCompound&&r.each(t.nodes(),(function(e){t.setParent(e,o(e))})),t},o.prototype.setDefaultEdgeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultEdgeLabelFn=e,this},o.prototype.edgeCount=function(){return this._edgeCount},o.prototype.edges=function(){return r.values(this._edgeObjs)},o.prototype.setPath=function(e,t){var n=this,i=arguments;return r.reduce(e,(function(e,r){return i.length>1?n.setEdge(e,r,t):n.setEdge(e,r),r})),this},o.prototype.setEdge=function(){var e,t,n,i,o=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(e=s.v,t=s.w,n=s.name,2===arguments.length&&(i=arguments[1],o=!0)):(e=s,t=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),e=""+e,t=""+t,r.isUndefined(n)||(n=""+n);var l=c(this._isDirected,e,t,n);if(r.has(this._edgeLabels,l))return o&&(this._edgeLabels[l]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[l]=o?i:this._defaultEdgeLabelFn(e,t,n);var h=u(this._isDirected,e,t,n);return e=h.v,t=h.w,Object.freeze(h),this._edgeObjs[l]=h,a(this._preds[t],e),a(this._sucs[e],t),this._in[t][l]=h,this._out[e][l]=h,this._edgeCount++,this},o.prototype.edge=function(e,t,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,e,t,n);return this._edgeLabels[r]},o.prototype.hasEdge=function(e,t,n){var i=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,e,t,n);return r.has(this._edgeLabels,i)},o.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[t],e),s(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},o.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var i=r.values(n);return t?r.filter(i,(function(e){return e.v===t})):i}},o.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var i=r.values(n);return t?r.filter(i,(function(e){return e.w===t})):i}},o.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},2354:(e,t,n)=>{e.exports={Graph:n(771),version:n(9631)}},8974:(e,t,n)=>{var r=n(9126),i=n(771);function o(e){return r.map(e.nodes(),(function(t){var n=e.node(t),i=e.parent(t),o={v:t};return r.isUndefined(n)||(o.value=n),r.isUndefined(i)||(o.parent=i),o}))}function a(e){return r.map(e.edges(),(function(t){var n=e.edge(t),i={v:t.v,w:t.w};return r.isUndefined(t.name)||(i.name=t.name),r.isUndefined(n)||(i.value=n),i}))}e.exports={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:o(e),edges:a(e)};return r.isUndefined(e.graph())||(t.value=r.clone(e.graph())),t},read:function(e){var t=new i(e.options).setGraph(e.value);return r.each(e.nodes,(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),r.each(e.edges,(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}}},9126:(e,t,n)=>{var r;try{r={clone:n(6678),constant:n(5703),each:n(6073),filter:n(3105),has:n(8721),isArray:n(1469),isEmpty:n(1609),isFunction:n(3560),isUndefined:n(2353),keys:n(3674),map:n(5161),reduce:n(4061),size:n(4238),transform:n(8718),union:n(3386),values:n(2628)}}catch(e){}r||(r=window._),e.exports=r},9631:e=>{e.exports="2.1.8"},4485:(e,t,n)=>{e.exports=n(2894)},2894:function(e,t){var n,r,i;(function(){var o,a,s,c,u,l,h,f,d,g,p,v,b,y,w;s=Math.floor,g=Math.min,a=function(e,t){return et?1:0},d=function(e,t,n,r,i){var o;if(null==n&&(n=0),null==i&&(i=a),n<0)throw new Error("lo must be non-negative");for(null==r&&(r=e.length);nn;0<=n?t++:t--)u.push(t);return u}.apply(this).reverse()).length;rp;0<=p?++l:--l)v.push(u(e,n));return v},y=function(e,t,n,r){var i,o,s;for(null==r&&(r=a),i=e[n];n>t&&r(i,o=e[s=n-1>>1])<0;)e[n]=o,n=s;return e[n]=i},w=function(e,t,n){var r,i,o,s,c;for(null==n&&(n=a),i=e.length,c=t,o=e[t],r=2*t+1;r{!function(){var t;function n(){}function r(){}function i(){}function a(){}function s(){}function c(){}function u(){}function l(){}function h(){}function f(){}function d(){}function g(){}function p(){}function v(){}function b(){}function y(){}function w(){}function m(){}function x(){}function E(){}function C(){}function k(){}function _(){}function N(){}function S(){}function O(){}function T(){}function L(){}function I(){}function A(){}function M(){}function P(){}function D(){}function j(){}function R(){}function G(){}function B(){}function H(){}function F(){}function Y(){}function z(){}function V(){}function U(){}function q(){}function X(){}function W(){}function Z(){}function $(){}function K(){}function Q(){}function J(){}function ee(){}function te(){}function ne(){}function re(){}function ie(){}function oe(){}function ae(){}function se(){}function ce(){}function ue(){}function le(){}function he(){}function fe(){}function de(){}function ge(){}function pe(){}function ve(){}function be(){}function ye(){}function we(){}function me(){}function xe(){}function Ee(){}function Ce(){}function ke(){}function _e(){}function Ne(){}function Se(){}function Oe(){}function Te(){}function Le(){}function Ie(){}function Ae(){}function Me(){}function Pe(){}function De(){}function je(){}function Re(){}function Ge(){}function Be(){}function He(){}function Fe(){}function Ye(){}function ze(){}function Ve(){}function Ue(){}function qe(){}function Xe(){}function We(){}function Ze(){}function $e(){}function Ke(){}function Qe(){}function Je(){}function et(){}function tt(){}function nt(){}function rt(){}function it(){}function ot(){}function at(){}function st(){}function ct(){}function ut(){}function lt(){}function ht(){}function ft(){}function dt(){}function gt(){}function pt(){}function vt(){}function bt(){}function yt(){Rf()}function wt(){NE()}function mt(){Ud()}function xt(){Vp()}function Et(){eo()}function Ct(){to()}function kt(){la()}function _t(){Up()}function Nt(){Mf()}function St(){Sk()}function Ot(){Pf()}function Tt(){Df()}function Lt(){lS()}function It(){I_()}function At(){oh(this)}function Mt(){}function Pt(){wu(this)}function Dt(){}function jt(e){this.a=e}function Rt(e){this.a=e}function Gt(e){this.a=e}function Bt(e){this.a=e}function Ht(e){this.a=e}function Ft(e){this.a=e}function Yt(e){this.a=e}function zt(e){this.a=e}function Vt(e){this.a=e}function Ut(e){this.b=e}function qt(e){this.a=e}function Xt(e){this.a=e}function Wt(e){this.a=e}function Zt(e){this.a=e}function $t(e){this.a=e}function Kt(e){this.a=e}function Qt(e){this.a=e}function Jt(e){this.a=e}function en(e){this.a=e}function tn(e){this.a=e}function nn(e){this.a=e}function rn(e){this.a=e}function on(e){this.a=e}function an(e){this.a=e}function sn(e){this.a=e}function cn(e){this.e=e}function un(e){this.a=e}function ln(e){this.a=e}function hn(e){this.a=e}function fn(e){this.a=e}function dn(e){this.a=e}function gn(e){this.a=e}function pn(e){this.a=e}function vn(e){this.a=e}function bn(e){this.a=e}function yn(e){this.a=e}function wn(e){this.a=e}function mn(e){this.a=e}function xn(e){this.a=e}function En(e){this.a=e}function Cn(e){this.a=e}function kn(e){this.a=e}function _n(e){this.a=e}function Nn(e){this.a=e}function Sn(e){this.a=e}function On(e){this.a=e}function Tn(e){this.a=e}function Ln(e){this.c=e}function In(e){this.a=e}function An(e){this.a=e}function Mn(e){this.a=e}function Pn(e){this.a=e}function Dn(e){this.a=e}function jn(e){this.a=e}function Rn(e){this.a=e}function Gn(e){this.a=e}function Bn(e){this.a=e}function Hn(e){this.a=e}function Fn(e){this.d=e}function Yn(e){this.a=e}function zn(e){this.a=e}function Vn(e){this.a=e}function Un(e){this.a=e}function qn(e){this.b=e}function Xn(e){this.a=e}function Wn(e){this.a=e}function Zn(e){this.c=e}function $n(e){this.a=e}function Kn(e){this.a=e}function Qn(e){this.a=e}function Jn(e){this.b=e}function er(e){this.b=e}function tr(e){this.c=e}function nr(e){this.a=e}function rr(e){this.a=e}function ir(e){this.a=e}function or(){this.a=[]}function ar(e){this.a=e}function sr(e){this.a=e}function cr(e){e.b=e.a}function ur(e){e.c=e.d.d}function lr(e,t){e.g=t}function hr(e,t){e.k=t}function fr(e,t){e.e.k=t}function dr(e){return e.a}function gr(e){return e.a}function pr(e){return e.a}function vr(e){return e.a}function br(e){return e.a}function yr(){return null}function wr(){return null}function mr(){this.c=this}function xr(){oh(this)}function Er(){wy(this)}function Cr(e){!function(e,t){var n,r,i,o,a,s,c;for(c=0,r=0,i=t.length;r=e.length)return{done:!0};var r=e[n++];return{value:[r,t.get(r)],done:!1}}}},function(){if(!Object.create||!Object.getOwnPropertyNames)return!1;var e="__proto__",t=Object.create(null);return void 0===t[e]&&0==Object.getOwnPropertyNames(t).length&&(t[e]=42,42===t[e]&&0!=Object.getOwnPropertyNames(t).length)}()||(e.prototype.createObject=function(){return{}},e.prototype.get=function(e){return this.obj[":"+e]},e.prototype.set=function(e,t){this.obj[":"+e]=t},e.prototype[yD]=function(e){delete this.obj[":"+e]},e.prototype.keys=function(){var e=[];for(var t in this.obj)58==t.charCodeAt(0)&&e.push(t.substring(1));return e}),e}()}function Lo(e,t){Ax(),oA.dc(e,t)}function Io(e,t){return Av(e,t)}function Ao(e,t){return e.a.B(t)}function Mo(e,t){return e.g[t.e]}function Po(e,t){return e.i[t.e]}function Do(e,t){return e.j[t.e]}function jo(e,t){return e.n[t.e]}function Ro(e,t){return e.o[t.e]}function Go(e,t){return e>t?e:t}function Bo(e,t){return e>t?e:t}function Ho(e,t){return e>t?e:t}function Fo(e,t){return et?1:0}function Gu(e){return null!=e?KE(e):0}function Bu(e){this.a=Fc(),this.b=e}function Hu(e){this.a=Fc(),this.b=e}function Fu(e){this.a=e,Qf.call(this,e)}function Yu(){Ku(),this.b=new Cn(this)}function zu(){var e;zu=r,e=new ao(", "),Md(gA),FD=new $f(e,e)}function Vu(){Vu=r,BD=new lu,GD=new Iu}function Uu(){Uu=r,zD=new d,VD=new g}function qu(){qu=r,qD=new Ws,XD=new mu}function Xu(){Xu=r,JD=new hu,QD=new yl}function Wu(){Wu=r,vj=new b,bj=new y}function Zu(e){e.g=new Pt,e.b=new Pt}function $u(e){e.a=new vt,e.c=new vt}function Ku(){Ku=r,CY=new We,EY=new Jf}function Qu(){Ba.call(this,"IS_NULL",2)}function Ju(){jc.call(this,"Head",1)}function el(){jc.call(this,"Tail",3)}function tl(e,t){om.call(this,e,t,null)}function nl(e,t){Fk(e,0,e.length,t)}function rl(e,t){return Tf(t.a,e.a),e.a}function il(e,t){return e.a*=t,e.b*=t,e}function ol(e,t){rp(),this.a=e,this.b=t}function al(e,t){return e.a[t.d.k][t.k]}function sl(e,t){return e.a[t.d.k][t.k]}function cl(e,t){return sa(function(e,t){var n,r;for(n=null,r=e.b;r;)e.a.$b(t,r.d)>=0?r=r.a[1]:(n=r,r=r.a[0]);return n}(e.a,t))}function ul(e,t){return sa(function(e,t){var n,r;for(n=null,r=e.b;r;)e.a.$b(t,r.d)<=0?r=r.a[0]:(n=r,r=r.a[1]);return n}(e.a,t))}function ll(e,t){return Yf(W_(e.a,t),20)}function hl(e,t){return null!=e&&Pk(e,t)}function fl(e){return e.a=t)throw new ki}function Vf(e,t){return Md(e),Md(t),new ad(e,t)}function Uf(e,t){return Md(e),Md(t),new sd(e,t)}function qf(e,t,n){return e=t+1&&e.splice(0,t+1);break}return e}(oA.ec(e))}function xd(e,t){var n;return(n=Gg(e,t)).g=2,n}function Ed(e,t){e.b=t.b,e.c=t.c,e.d=t.d,e.a=t.a}function Cd(e){e.a.b=e.b,e.b.a=e.a,e.a=e.b=null}function kd(e){return e.b.c.length+e.e.c.length}function _d(e){return Array.isArray(e)&&e.ad===n}function Nd(e,t){return Uu(),-1!=Bx(new Zn(e),t)}function Sd(e,t,n,r,i,o){return R_(e,t,n,r,i,0,o)}function Od(e,t,n){Wu(),Kv.call(this,e.b,t,n,e.d)}function Td(e,t){Wu(),Kv.call(this,e.b,t,e.c,e.d)}function Ld(e,t,n){xy(t,e.c.length),Nc(e.c,t,n)}function Id(e,t){return Ey(t,e.a.length),e.a[t]}function Ad(e){e.sort((function(e,t){return e-t}))}function Md(e){if(null==e)throw new Wr;return e}function Pd(e){if(null==e)throw new Wr;this.a=e}function Dd(e,t,n){if(e.a!=t)throw new wi;e.a=n}function jd(e,t){if(!e)throw new oo((oi(),t))}function Rd(e,t){if(!e)throw new xo((oi(),t))}function Gd(e){if(null==e)throw new Wr;return e}function Bd(e){ar.call(this,new ry),pm(this,e)}function Hd(e){this.a=new Us(e.Y()),pm(this,e)}function Fd(e){this.c=e,this.a=new Vs(this.c.a)}function Yd(e){rp(),this.a=(Fp(),new Qn(Md(e)))}function zd(){(zd=r)(),SX=!1,OX=!0}function Vd(){Vd=r,AX=_y(SD,hA,24,256,0,1)}function Ud(){Ud=r,MY=gd(pd(new iC,(WI(),yF)),YF)}function qd(){qd=r,fH=new x,gH=new ed,dH=new E}function Xd(e){return null!=e&&Ig(e)&&!(e.ad===n)}function Wd(e){return!Array.isArray(e)&&e.ad===n}function Zd(e,t){return _l(t)?Ap(e,t):OS(e.d,t)}function $d(e,t){return hl(t,17)&&Ul(e,Yf(t,17))}function Kd(e,t){return hl(t,17)&&function(e,t){return!(!t||e.b[t.e]!=t)&&(Hg(e.b,t.e,null),--e.c,!0)}(e,Yf(t,17))}function Qd(e,t){var n;return sx(n=pC(e),t),n}function Jd(e,t){return!e&&(e=[]),e[e.length]=t,e}function eg(e,t,n){if(!e)throw new oo(function(e,t){var n,r,i,o;for(oi(),(e=null==e?gA:e).length,t.length,n=new Jo,o=0,r=0;r0),e.a.sb(e.c=--e.b)}function fg(e){e.b?fg(e.b):e.d.V()&&Zd(e.f.b,e.e)}function dg(e){if(nC(e.d),e.d.d!=e.c)throw new wi}function gg(e,t){if(t[gD]!=e[gD])throw new wi}function pg(e,t){return Uu(),Md(e),Md(t),new Pa(e,t)}function vg(e,t){rp(),Va.call(this,e,Ix(new $n(t)))}function bg(e,t,n,r){this.a=e,Sy.call(this,e,t,n,r)}function yg(e){this.a=Math.cos(e),this.b=Math.sin(e)}function wg(e,t,n){Fi.call(this,e),this.b=t,this.a=n}function mg(e){this.b=new Pt,this.a=new Pt,this.c=e}function xg(e){this.c=new so,this.a=new Pt,this.b=e}function Eg(){Eg=r,oj=new en(!1),aj=new en(!0)}function Cg(e,t){return++e.d,e.c[e.c.length]=t,!0}function kg(e,t){Mb(e.d,t,e.b.b,e.b),++e.a,e.c=null}function _g(e,t){return null==e.a.db(t,e)}function Ng(e,t){return By(e.slice(0,t),e)}function Sg(e,t){return By(new Array(t),e)}function Og(e,t,n){var r;return r=e.b[t],e.b[t]=n,r}function Tg(e){return ml(),mf(function(e){var t;return Yf((t=e.g)?t:e.g=new qt(e),20)}(e.a).mb(),(qu(),qD))}function Lg(e){return Uu(),new Au(Du(Uf(e.a,new f)))}function Ig(e){return typeof e===lA||typeof e===bA}function Ag(e){t.setTimeout((function(){throw e}),0)}function Mg(e){return Md(e),hl(e,345)?Yf(e,345):Vk(e)}function Pg(e,t){return null==Fx(e.a,t,(zd(),SX))}function Dg(e,t){var n;return function(e,t){if(e<0||e>=t)throw new io(function(e,t){if(e<0)return DO(RA,Sx(Io(_D,1),GA,1,4,["index",WE(e)]));if(t<0)throw new oo(BA+t);return DO("%s (%s) must be less than size (%s)",Sx(Io(_D,1),GA,1,4,["index",WE(e),WE(t)]))}(e,t))}(t,n=e.a.Y()),n-1-t}function jg(e,t,n){var r;return r=Tw(e,t),function(e,t,n){if(n){var r=n.gc();n=r(n)}else n=void 0;e.a[t]=n}(e,t,n),r}function Rg(e,t,n){var r;return Ww(n,r=Gg(e,t)),r}function Gg(e,t){var n;return(n=new Wx).i=e,n.d=t,n}function Bg(e,t,n){this.a=e,Lb(n,t),this.c=t,this.b=n}function Hg(e,t,r){return function(e){if(!e)throw new qr}(null==r||function(e,t){switch(mw(e)){case 5:return _l(t);case 6:return kl(t);case 7:return gh(t);case 0:return Pk(t,e.__elementTypeId$);case 2:return Ig(t)&&!(t.ad===n);case 1:return Ig(t)&&!(t.ad===n)||Pk(t,e.__elementTypeId$);default:return!0}}(e,r)),e[t]=r}function Fg(e){e.a=null,e.e=null,wy(e.b),e.d=0,++e.c}function Yg(e){return e.f||(e.f=new Ks(e))}function zg(e){return e.k||(e.k=new Ht(e))}function Vg(e){return e.e||(e.e=new $a(e))}function Ug(e){var t;return!(t=e.e)&&(e.e=t=e.gb()),t}function qg(e){return e.c.f.d==e.d.f.d}function Xg(e,t){var n;return Fw(n=new Db(e),t),n}function Wg(e,t){return e.a+=String.fromCharCode(t),e}function Zg(e){return!e.a&&e.d?e.d.b:e.a}function $g(e){return Vl(e)?0|e:e.l|e.m<<22}function Kg(e,t){return _l(t)?bv(e,t):Zc(gv(e.d,t))}function Qg(e){return hl(e,19)?Yf(e,19).Y():Jb(e.mb())}function Jg(e){return e?new Hd((zu(),e)):function(e){var t;return zw(t=new Ki,e),t}(null.mb())}function ep(e,t){return Wc(e)===Wc(t)||null!=e&&sE(e,t)}function tp(e,t){return Ji(),Lx(ro(Oh(e)),ro(Oh(t)))}function np(e){return ml(),mf(e.a.bb().mb(),(qu(),XD))}function rp(){rp=r,cf(),YD=new sb((Fp(),Fp(),jX))}function ip(){ip=r,cf(),KD=new Zs((Fp(),Fp(),GX))}function op(e,t){if(null==e)throw new ko((oi(),t))}function ap(e,t,n,r){e.g[t.e][n.e]=r,e.g[n.e][t.e]=r}function sp(e){Nu(-1!=e.c),e.d.vb(e.c),e.b=e.c,e.c=-1}function cp(e){this.c=e,this.b=e.a.b.a,ql(e.a.c,this)}function up(e){JT.call(this,new $n(e)),this.a=new so}function lp(){Ti.call(this,new Pi(new Er)),this.a=this}function hp(){uw(),this.b=(ml(),new Er),this.a=new Er}function fp(e){vp(e.a),e.b=_y(_D,GA,1,e.b.length,4,1)}function dp(e){return!e.b&&(e.b=new Zo(e.c.W())),e.b}function gp(e,t){var n;return nI(e,t,n=new bt),n.d}function pp(e,t){var n;return(n=Gg("",e)).k=t,n.g=1,n}function vp(e){var t;for(t=e.mb();t.G();)t.H(),t.I()}function bp(e,t){return hl(t,79)&&Di(e.b,Yf(t,79).mc())}function yp(e,t,n){return _l(t)?Fv(e,t,n):YN(e.d,t,n)}function wp(e,t,n,r){this.d=e,this.b=t,this.a=n,this.c=r}function mp(e,t,n,r){this.d=e,this.e=t,this.c=n,this.b=r}function xp(e,t,n,r){this.a=e,this.c=t,this.b=n,this.d=r}function Ep(e,t,n,r){Aa.call(this,e,t),this.a=n,this.b=r}function Cp(e,t){return oi(),e==t?0:e0?1:0}function $p(e,t){return Vm(function(e,t){return kf(e.l&t.l,e.m&t.m,e.h&t.h)}(Vl(e)?Jm(e):e,Vl(t)?Jm(t):t))}function Kp(e){return 0==e.b?null:(Tu(0!=e.b),Yw(e,e.a.a))}function Qp(e){e.d=e.d-15,e.b=e.b-15,e.c=e.c+15,e.a=e.a+15}function Jp(e){this.b=e,this.c=e,e.e=null,e.c=null,this.a=1}function ev(e,t,n){this.d=e,this.b=new Pt,this.c=t,this.a=n}function tv(e,t){!function(e,t){e.a=t}(this,new Qa(e.a,e.b)),function(e,t){e.b=t}(this,Hf(t))}function nv(e){fl(new Zn(Qk(e.e)))&&(function(e){var t,n,r;for(r=new Fd(new ir(e.c).a);dl(r.a);)switch(r.b=Qb(r.a),t=Yf((n=new Rc(r.c,r.b)).b.b[n.a.e],62),Yf(n.a,67).e){case 0:t.d=0,t.e=-(t.b+e.d);break;case 1:t.d=(e.e.e.j.a-t.c)/2,t.e=-(t.b+e.d);break;case 2:t.d=e.e.e.j.a-t.c,t.e=-(t.b+e.d);break;case 3:t.d=0,t.e=e.e.e.j.b+e.d;break;case 4:t.d=(e.e.e.j.a-t.c)/2,t.e=e.e.e.j.b+e.d;break;case 5:t.d=e.e.e.j.a-t.c,t.e=e.e.e.j.b+e.d;break;case 6:t.d=-(t.c+e.d),t.e=0;break;case 7:t.d=-(t.c+e.d),t.e=(e.e.e.j.b-t.b)/2;break;case 8:t.d=-(t.c+e.d),t.e=e.e.e.j.b-t.b;break;case 9:t.d=e.e.e.j.a+e.d,t.e=0;break;case 10:t.d=e.e.e.j.a+e.d,t.e=(e.e.e.j.b-t.b)/2;break;case 11:t.d=e.e.e.j.a+e.d,t.e=e.e.e.j.b-t.b;break;case 12:t.d=e.q.b+e.d,t.e=e.q.d+e.d;break;case 13:t.d=(e.e.e.j.a-t.c)/2,t.e=e.q.d+e.d;break;case 14:t.d=e.e.e.j.a-e.q.c-t.c-e.d,t.e=e.q.d+e.d;break;case 15:t.d=e.q.b+e.d,t.e=(e.e.e.j.b-t.b)/2;break;case 16:t.d=(e.e.e.j.a-t.c)/2,t.e=(e.e.e.j.b-t.b)/2;break;case 17:t.d=e.e.e.j.a-e.q.c-t.c-e.d,t.e=(e.e.e.j.b-t.b)/2;break;case 18:t.d=e.q.b+e.d,t.e=e.e.e.j.b-e.q.a-t.b-e.d;break;case 19:t.d=(e.e.e.j.a-t.c)/2,t.e=e.e.e.j.b-e.q.a-t.b-e.d;break;case 20:t.d=e.e.e.j.a-e.q.c-t.c-e.d,t.e=e.e.e.j.b-e.q.a-t.b-e.d}}(e),function(e){var t,n,r,i,o;for(r=new Zn(Qk(e.e));r.a>>0).toString(16)}function bv(e,t){return null==t?Zc(gv(e.d,null)):Mc(e.e,t)}function yv(e){return 0|Math.max(Math.min(e,yA),-2147483648)}function wv(e){this.e=e,this.b=this.e.a.entries(),this.a=[]}function mv(e){this.c=e,this.b=new Xx(new Hn(this.c.a).a)}function xv(e){this.b=(Uu(),Uu(),Uu(),zD),this.a=Yf(Md(e),35)}function Ev(e,t,n){Wu(),Lf.call(this,e,t),null!=n&&(this.c=n)}function Cv(e,t,n){if(e<0||tn)throw new io(function(e,t,n){return e<0||e>n?zN(e,n,"start index"):t<0||t>n?zN(t,n,"end index"):DO("end index (%s) must not be less than start index (%s)",Sx(Io(_D,1),GA,1,4,[WE(t),WE(e)]))}(e,t,n))}function kv(e,t){if(null==e)throw new ko((oi(),t));return e}function _v(e){if(!eC(e))throw new xi;return e.c=e.b,e.b.H()}function Nv(e){function t(){}return t.prototype=e||{},new t}function Sv(e){var t;return sx(t=new Sa(cx(e.length)),e),t}function Ov(e){var t;t=e.c.b.b,e.b=t,e.a=e.c.b,t.a=e.c.b.b=e}function Tv(e){this.b=null,!e&&(Js(),Js(),e=FX),this.a=e}function Lv(e){this.b=e,this.a=new $v(this.b,this.b.c.length)}function Iv(e){return rp(),Md(e),function(e){var t;switch((t=Ng(e.c,e.c.length)).length){case 0:return YD;case 1:return new Yd(t[0]);default:return new sb(BE(t))}}(e||Bf(new Zn(null)))}function Av(e,t){var n=e.a=e.a||[];return n[t]||(n[t]=e.Oc(t))}function Mv(e,t,n){var r;s_(t,n,e.c.length),r=n-t,wa(e.c,t,r)}function Pv(e,t,n){Ia.call(this,t.a),this.c=e,this.b=t,this.a=n}function Dv(e){return Vc(e.c),e.e=e.a=e.c,e.c=e.c.c,++e.d,e.a.f}function jv(e){return Vc(e.e),e.c=e.a=e.e,e.e=e.e.e,--e.d,e.a.f}function Rv(e){return Um(Sx(Io(pj,1),KM,10,0,[e.f.i,e.i,e.a]))}function Gv(){Gv=r,IY=$x((zp(),Sx(Io(RY,1),HA,193,0,[OY,TY])))}function Bv(){Bv=r,dY=$x((Sb(),Sx(Io(mY,1),HA,175,0,[lY,hY])))}function Hv(){Hv=r,ZY=$x((lb(),Sx(Io(QY,1),HA,192,0,[XY,qY])))}function Fv(e,t,n){return null==t?YN(e.d,null,n):sC(e.e,t,n)}function Yv(e,t){return Kd(e.a,t)?Og(e,Yf(t,17).e,null):null}function zv(e){return Md(e),n_((Uu(),new Au(Du(Uf(e.a,new f)))))}function Vv(e,t){var n,r;return r=tg(e,t),n=e.a.ub(r),new Ya(e,n)}function Uv(e,t,n){var r;(r=new ot).b=t,r.a=n,++t.b,Tf(e.d,r)}function qv(e,t,n){e.d&&Gy(e.d.b,e),e.d=t,e.d&&Ld(e.d.b,n,e)}function Xv(e,t,n){s_(t,n,e.Y()),this.c=e,this.a=t,this.b=n-t}function Wv(e,t,n,r){this.d=e,this.b=t,this.a=n,this.c=r}function Zv(e,t){Ti.call(this,fm(Md(e),Md(t))),this.b=e,this.c=t}function $v(e,t){this.a=e,Fn.call(this,e),xy(t,e.Y()),this.b=t}function Kv(e,t,n,r){Wu(),Ev.call(this,e,t,n),null!=r&&(this.d=r)}function Qv(e){return Tu(e.a2e3&&(dj=e,gj=t.setTimeout(ha,10)),0==fj++&&(function(e){var t,n;if(e.a){n=null;do{t=e.a,e.a=null,n=TN(t,n)}while(e.a);e.a=n}}((ui(),ij)),!0)}();try{return function(e,t,n){return e.apply(t,n)}(e,n,r)}finally{!function(e){e&&function(e){var t,n;if(e.b){n=null;do{t=e.b,e.b=null,n=TN(t,n)}while(e.b);e.b=n}}((ui(),ij)),--fj,e&&-1!=gj&&(function(e){t.clearTimeout(e)}(gj),gj=-1)}(i)}}function ab(e){return hl(e,19)?Yf(e,19).V():!e.mb().G()}function sb(e){rp(),this.a=(Fp(),hl(e,63)?new Ko(e):new Wl(e))}function cb(){cb=r,kU=new xc(jM,0),_U=new xc("TOP_LEFT",1)}function ub(){ub=r,xz=new cc("DOWN",0),Ez=new cc("UP",1)}function lb(){lb=r,XY=new Rs("LAYER_SWEEP",0),qY=new Rs(UP,1)}function hb(){hb=r,nz=new oc("UPPER",0),tz=new oc("LOWER",1)}function fb(e,t){return!!hl(t,21)&&c_(e.a,Yf(t,21))}function db(e,t){return!!hl(t,21)&&c_(e.a,Yf(t,21))}function gb(e,t){return!!hl(t,21)&&c_(e.a,Yf(t,21))}function pb(e){var t;return ME(t=new Dp,e),Ky(t,(JI(),kR),null),t}function vb(e,t){return t===e?"(this Map)":(oi(),null==t?gA:Vk(t))}function bb(e,t,n,r){return hl(n,63)?new yh(e,t,n,r):new bg(e,t,n,r)}function yb(){yb=r,LG=$x((jw(),Sx(Io(QG,1),HA,149,0,[OG,SG,NG])))}function wb(){wb=r,iR=$x((_E(),Sx(Io(uG,1),HA,166,0,[tR,eR,nR])))}function mb(){mb=r,GY=$x((fw(),Sx(Io(UY,1),HA,173,0,[jY,DY,PY])))}function xb(e,t){var n;Fp(),Fk(n=e.ob(),0,n.length,t),function(e,t){var n,r;for(r=e.Y(),n=0;nt)throw new io(zN(e,t,"index"));return e}function Ib(e,t,n){Md(e),function(e){var t,n,r;for(xb(e.c,e.a),r=new Zn(e.c);r.a>22&mM,e<0?xM:0)}function hy(){hy=r,Mj=$x((CE(),Sx(Io(Gj,1),HA,59,0,[Lj,Tj,Oj,Sj,Ij])))}function fy(){fy=r,JG=$x((wI(),Sx(Io(iB,1),HA,32,0,[$G,AG,IG,ZG,KG])))}function dy(){dy=r,bG=$x((LC(),Sx(Io(kG,1),HA,100,0,[pG,gG,hG,fG,dG])))}function gy(){gy=r,KY=gd(yd(yd(yd(bd(new iC,(WI(),AF)),BF),lF),mF),IF)}function py(e,t){var n;for(n=t.mb();n.G();)pT(e,Yf(n.H(),55),0,0)}function vy(e,t,n){var r;for(r=e.mb();r.G();)iT(Yf(r.H(),55),t,n)}function by(e,t,n){var r,i;for(r=0,i=0;it)throw new io("Index: "+e+", Size: "+t)}function Ey(e,t){if(e<0||e>=t)throw new io("Index: "+e+", Size: "+t)}function Cy(e,t){var n;return!!(n=eE(e,t.yb()))&&Np(n.e,t.zb())}function ky(e,t){var n;return n=e.d,t>0?Yf(dd(n.a,t-1),9):null}function _y(e,t,n,r,i,o){var a;return a=h_(i,r),9!=i&&Sx(Io(e,o),t,n,i,a),a}function Ny(e){var t;if(!um(e))throw new xi;return e.d=1,t=e.c,e.c=null,t}function Sy(e,t,n,r){this.f=e,this.e=t,this.d=n,this.b=r,this.c=r?r.d:null}function Oy(e){var t;return t=Yf(dd(e.f,0),7),Yf(kx(t,(ZI(),oq)),7)}function Ty(e){var t;return t=Yf(dd(e.f,0),7),Yf(kx(t,(ZI(),oq)),7)}function Ly(){Ly=r,xX=$x((MC(),Sx(Io(_X,1),HA,153,0,[bX,wX,yX])))}function Iy(){Iy=r,NX=$x((Bm(),Sx(Io(TX,1),HA,172,0,[EX,CX,kX])))}function Ay(){Ay=r,Nj=$x((fk(),Sx(Io(Aj,1),HA,103,0,[wj,Ej,Cj,kj,mj,xj])))}function My(){My=r,Jj=$x((D_(),Sx(Io(rR,1),HA,133,0,[$j,Wj,Kj,qj,Zj,Xj])))}function Py(){Py=r,_G=$x((b_(),Sx(Io(TG,1),HA,28,0,[CG,EG,xG,yG,mG,wG])))}function Dy(){Dy=r,xY=$x((gN(),Sx(Io(kY,1),HA,125,0,[yY,pY,wY,bY,vY,gY])))}function jy(){jy=r,yj=new Lf("de.cau.cs.kieler.labels.labelManager",null)}function Ry(e,t){var n;return(n=new bt).c=!0,n.d=t.zb(),nI(e,t.yb(),n)}function Gy(e,t){var n;return-1!=(n=Qy(e,t,0))&&(e.vb(n),!0)}function By(e,t){return 9!=mw(t)&&Sx(ww(t),t._c,t.__elementTypeId$,mw(t),e),e}function Hy(e){return gg(e.c.a.c,e),Tu(e.b!=e.c.a.b),e.a=e.b,e.b=e.b.a,e.a}function Fy(e){Nu(!!e.c),gg(e.e,e),e.c.I(),e.c=null,e.b=ix(e),ql(e.e,e)}function Yy(e,t,n){Ti.call(this,fm(Md(e),Md(t))),this.b=e,this.c=t,this.a=n}function zy(e,t,n,r){this.b=new On(this),this.a=e,this.c=t,this.e=n,this.d=r}function Vy(e){qx.call(this,e,0),ph(this),this.b.b=this.b,this.b.a=this.b}function Uy(e,t){Gc.call(this,e,t),this.a=_y(KX,GA,183,2,0,1),this.b=!0}function qy(e,t){return _l(t)?null==t?!!gv(e.d,null):function(e,t){return!(void 0===ka(e.a,t))}(e.e,t):!!gv(e.d,t)}function Xy(e,t){return Oo(),(e-t>0?e-t:-(e-t))<=yM||e==t||isNaN(e)&&isNaN(t)}function Wy(e,t){return Oo(),(e-t>0?e-t:-(e-t))<=yM||e==t||isNaN(e)&&isNaN(t)}function Zy(e){var t,n;t=!0;do{n=t?oC(e):CC(e),t=!t}while(n);ax(e,e.d)}function $y(e,t,n){var r;if(null==t)throw new Wr;return r=Sp(e,t),function(e,t,n){if(n){var r=n.gc();e.a[t]=r(n)}else delete e.a[t]}(e,t,n),r}function Ky(e,t,n){return!e.n&&(e.n=new Er),null==n?Zd(e.n,t):yp(e.n,t,n),e}function Qy(e,t,n){for(;n=e.a.c.length;)Tf(e.a,new co);return Yf(dd(e.a,t),20)}function ew(e,t,n,r,i){var o;return Ww(n,o=Gg(e,t)),o.g=i?8:0,o.f=r,o.e=i,o}function tw(e,t){var n;this.f=e,this.b=t,n=Yf(Kg(e.b,t),126),this.c=n?n.b:null}function nw(e,t){var n,r;for(n=0,r=t.length;n0&&(r+=function(e){var t,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,C;for(i=0,y=0,ml(),b=new Er,r=new Er,function(e,t,n){var r,i,o,a,s,c,u,l,h,f,d;for(r=0,i=0,l=0;l0&&yp(t,o,WE(r+=o.b.c.length+o.e.c.length));else{for(s=wN(c,(wI(),IG)).mb();s.G();)r+=(o=Yf(s.H(),7)).b.c.length+o.e.c.length;for(a=wN(c,IG).mb();a.G();)(o=Yf(a.H(),7)).b.c.length+o.e.c.length>0&&yp(t,o,WE(r))}for(u=e.length-1;u>=0;u--)if(zl(Yf(kx(c=e[u],(JI(),FR)),28)))for(f=wN(c,(wI(),KG)).mb();f.G();)(h=Yf(f.H(),7)).b.c.length+h.e.c.length>0&&yp(n,h,WE(i+=h.b.c.length+h.e.c.length));else{for(d=wN(c,(wI(),KG)).mb();d.G();)i+=(h=Yf(d.H(),7)).b.c.length+h.e.c.length;for(f=wN(c,KG).mb();f.G();)(h=Yf(f.H(),7)).b.c.length+h.e.c.length>0&&yp(n,h,WE(i))}}(e,o=new Er,C=new Er),t=null,v=0,E=0,w=!0,c=!0,f=0,g=e.length;fu.k&&(++t,d=!0),g&&u&&g.k>u.k&&(++t,p=!0),f&&s&&f.ks.k&&(++t,c=!0),f&&s&&f.ku.k&&(++t,l=!0),c&&l&&s==u&&--t)}}return t}(t)),r}function ow(e,t){var n;return(n=Yf(Zd(e.c,t),176))?(Cd(n),n.e):null}function aw(e){return nE(e,yA)>0?yA:nE(e,kA)<0?kA:$g(e)}function sw(e){of.call(this,(oi(),null==e?gA:Vk(e)),hl(e,46)?Yf(e,46):null)}function cw(e){wu(this),jd(e>=0,"Initial capacity must not be negative")}function uw(){uw=r,oH=wd(yd(yd(new iC,(WI(),MF)),xF),OF),aH=bd(new iC,_F)}function lw(){lw=r,VH=new Y,YH=new z,zH=new V,FH=new U,UH=new q,qH=new X}function hw(){hw=r,XX=new jc("All",0),WX=new Ju,ZX=new bl,$X=new el}function fw(){fw=r,jY=new js(ZP,0),DY=new js("LONGEST_PATH",1),PY=new js(UP,2)}function dw(){dw=r,uj=kf(mM,mM,524287),lj=kf(0,0,524288),ly(1),ly(2),hj=ly(0)}function gw(){gw=r,cY=$x((nO(),Sx(Io(fY,1),HA,109,0,[oY,eY,rY,tY,nY,JF,iY,aY])))}function pw(){pw=r,vz=$x((Uk(),Sx(Io(mz,1),HA,141,0,[gz,hz,fz,lz,dz])))}function vw(){vw=r,VV=$x((w_(),Sx(Io(KV,1),HA,115,0,[BV,GV,FV,HV,YV])))}function bw(){bw=r,Pq=$x((qk(),Sx(Io(Gq,1),HA,85,0,[Aq,Oq,Tq,Lq,Iq])))}function yw(e){eN(),function(e,t,n){e.a=1502^t,e.b=n^wD}(this,$g($p(Vm(function(e,t){var n,r,i,o;return 63,(r=0!=(524288&(n=e.h)))&&(n|=-1048576),o=r?xM:0,i=n>>2,kf((e.m>>2|n<<20)&mM,i&mM,o&xM)}(Vl(e)?Jm(e):e)),xD)),$g($p(e,xD)))}function ww(e){return _l(e)?OD:kl(e)?IX:gh(e)?LX:Wd(e)||_d(e)?e.$c:e.$c||rj}function mw(e){return null==e.__elementTypeCategory$?9:e.__elementTypeCategory$}function xw(e){var t,n;for(rc(),n=TM,t=0;tn&&(n=e[t]);return n}function Ew(e,t){var n;return(n=Yf(Kg(e.b,t),106))||(n=t.rc(),yp(e.b,t,n)),n}function Cw(e,t){var n;return(n=Yf(Kg(e.c,t),176))?(Bl(e,n),n.e):null}function kw(e,t,n,r){var i;(i=Yf(Cw(e.e,t),116)).b+=n,i.a+=r,Ak(e.e,t,i),e.d=!0}function _w(e){var t;for(++e.a,t=e.c.a.length;e.a"+e.d.f+"("+e.d+")":"e_"+lh(e)}function Dw(){Dw=r,lG=$x((yS(),Sx(Io(vG,1),HA,41,0,[tG,eG,rG,cG,sG,aG,iG,oG,nG])))}function jw(){jw=r,OG=new ps("OUTSIDE",0),SG=new ps("INSIDE",1),NG=new ps("FIXED",2)}function Rw(){Rw=r,xU=new mc(BM,0),EU=new mc("TOP",1),mU=new mc("BOTTOM",2)}function Gw(){Gw=r,_z=new lc("CLASSIC",0),Nz=new lc("IMPROVE_STRAIGHTNESS",1)}function Bw(){this.e=new so,this.a=new Bp,this.d=new so,this.b=new Pt,this.c=new Pt}function Hw(e,t,n){this.b=t,this.a=e,this.c=n,Tf(this.a.e,this),Tf(this.b.b,this)}function Fw(e,t){e.d=Fo(e.d,t.d),e.c=Go(e.c,t.c),e.a=Go(e.a,t.a),e.b=Fo(e.b,t.b)}function Yw(e,t){var n;return n=t.c,t.a.b=t.b,t.b.a=t.a,t.a=t.b=null,t.c=null,--e.b,n}function zw(e,t){var n;for(Uu(),Md(e),Md(t),n=!1;t.G();)n|=e.ib(t.H());return n}function Vw(e){var t;return gg(e.e,e),Tu(e.b),e.c=e.a,t=Yf(e.a.H(),21),e.b=ix(e),t}function Uw(e){return kM=0x8000000000000000?(dw(),uj):(r=!1,e<0&&(r=!0,e=-e),n=0,e>=CM&&(e-=(n=yv(e/CM))*CM),t=0,e>=EM&&(e-=(t=yv(e/EM))*EM),i=kf(yv(e),t,n),r&&(o=1+~i.l&mM,a=~i.m+(0==o?1:0)&mM,s=~i.h+(0==o&&0==a?1:0)&xM,i.l=o,i.m=a,i.h=s),i)}(e))}function qw(e){if(e){if(e.V())throw new xi;return e.sb(e.Y()-1)}return function(e){var t;for(Uu();;)if(t=e.H(),!e.G())return t}(null.mb())}function Xw(e,t){var n;return t<(n=e.d).a.c.length-1?Yf(dd(n.a,t+1),9):null}function Ww(e,t){if(e){t.k=e;var n=function(e){if(e.Tc())return null;var t=e.k;return nA[t]}(t);n?n.$c=t:nA[e]=[t]}}function Zw(e,t){var n,r;r=!1;do{r|=n=e.i?xx(e,t):mx(e,t)}while(n);return r}function $w(e,t,n){var r,i;r=t;do{i=ro(e.n[r.k])+n,e.n[r.k]=i,r=e.a[r.k]}while(r!=t)}function Kw(e,t){return kv(e,"set1"),kv(t,"set2"),nc(),new ff(e,new Ta(t),t)}function Qw(e){var t=/function(?:\s+([\w$]+))?\s*\(/.exec(e);return t&&t[1]||pA}function Jw(){Jw=r,MV=$x((P_(),Sx(Io(RV,1),HA,123,0,[IV,LV,TV,SV,NV,OV])))}function em(){em=r,QV=$x((M_(),Sx(Io(uU,1),HA,124,0,[WV,XV,$V,qV,ZV,UV])))}function tm(){tm=r,MX=Sx(Io(iW,1),vM,26,12,[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15])}function nm(){nm=r,Rq=new Cc(GM,0),Dq=new Cc("INPUT",1),jq=new Cc("OUTPUT",2)}function rm(e){this.c=e,this.b=new Xx(new Hn(e.b).a),this.a=null,this.d=(Uu(),Uu(),VD)}function im(e){this.e=e,this.d=new Sa(cx(ng(this.e).Y())),this.c=this.e.a,this.b=this.e.c}function om(e,t,n){this.c=e,Gb.call(this),this.b=t,this.j=new mp(t.d,t.e,t.c,t.b),this.a=n}function am(e,t){e.j>0&&e.c0&&0!=e.e&&am(e.g,t/e.j*e.g.d))}function sm(e){return e.b.d.f.g==(j_(),DH)?Yf(kx(e.b.d.f,(ZI(),oq)),7):e.b.d}function cm(e){return e.b.c.f.g==(j_(),DH)?Yf(kx(e.b.c.f,(ZI(),oq)),7):e.b.c}function um(e){switch(zc(3!=e.d),e.d){case 2:return!1;case 0:return!0}return function(e){return e.d=3,e.c=function(e){for(var t;e.b.G();)if(t=e.b.H(),e.a.D(t))return t;return e.d=2,null}(e),2!=e.d&&(e.d=0,!0)}(e)}function lm(e){switch(e.e){case 2:return wI(),KG;case 4:return wI(),IG;default:return e}}function hm(e){switch(e.e){case 1:return wI(),ZG;case 3:return wI(),AG;default:return e}}function fm(e,t){var n;return Fp(),n=new Us(1),_l(e)?Fv(n,e,t):YN(n.d,e,t),new tr(n)}function dm(e,t){return e.g?(e.g=dm(e.g,t),--e.a,e.j=EE(e.j,t.c),Z_(e)):e.e}function gm(e,t){return e.e?(e.e=gm(e.e,t),--e.a,e.j=EE(e.j,t.c),Z_(e)):e.g}function pm(e,t){var n,r,i;for(Gd(t),n=!1,i=t.mb();i.G();)r=i.H(),n|=e.ib(r);return n}function vm(e){var t,n;for(n=new Gr,t=e.b.mb();t.G();)Of(n,Yf(t.H(),92).a);return n}function bm(e){var t,n,r;for(t=0,r=e.mb();r.G();)t+=(Gd(n=Oh(r.H())),n);return t/e.Y()}function ym(e,t){var n;return(n=Yf(Kg(e.c,t),200))||((n=new Kr).c=t,yp(e.c,n.c,n)),n}function wm(e,t){var n;return Gd(t),n=t.e,!e.b[n]&&(Hg(e.b,n,t),++e.c,!0)}function mm(e,t){var n,r;return n=1-t,r=e.a[n],e.a[n]=r.a[t],r.a[t]=e,e.b=!0,r.b=!1,r}function xm(e,t){var n;return!!hl(t,10)&&(n=Yf(t,10),e.a==n.a&&e.b==n.b)}function Em(e,t,n){return e.g=new Sm(t,n),Ch(e,e.g,e.i),e.d=Ho(2,e.d),++e.a,e.j=mE(e.j,n),e}function Cm(e,t,n){return e.e=new Sm(t,n),Ch(e.f,e.e,e),e.d=Ho(2,e.d),++e.a,e.j=mE(e.j,n),e}function km(e,t){var n=e.a,r=0;for(var i in n)n.hasOwnProperty(i)&&(t[r++]=i);return t}function _m(e,t){var n,r;for(Gd(t),r=t.bb().mb();r.G();)n=Yf(r.H(),21),e.db(n.yb(),n.zb())}function Nm(e,t,n){this.g=e,this.d=t,this.e=n,this.a=new Pt,function(e){var t,n,r,i;for(i=bO(new Fh(e.d,e.e));i.G();)for(r=Yf(i.H(),7),n=new Zn(e.e==(wI(),KG)?r.b:r.e);n.a0),this.b=e,this.c=t,this.j=t,this.a=1,this.d=1,this.e=null,this.g=null}function Om(e){return 1.4901161193847656e-8*IS(e,26)+11102230246251565e-32*IS(e,27)}function Tm(e){return hl(e,87)?nb(Yf(e,87)):hl(e,88)?Yf(e,88).a:hl(e,63)?new Mi(e):new Za(e)}function Lm(e){var t;return t=Yf(kx(e,(ZI(),qU)),32),e.g==(j_(),DH)&&(t==(wI(),KG)||t==IG)}function Im(e,t){return!!function(e,t){var n,r,i;for(n=Yf(kx(t,(ZI(),VU)),18),i=Yf(W_(TH,n),18).mb();i.G();)if(r=Yf(i.H(),18),!Yf(W_(e.a,r),20).V())return!1;return!0}(e,t)&&(dS(e.a,Yf(kx(t,(ZI(),VU)),18),t),!0)}function Am(e,t){var n;if(t)for(n=0;n<6;n++)Yf(dd(e.a,n),18).jb(Yf(dd(t.a,n),19));return e}function Mm(e,t){var n;return e.b?null:(n=function(e,t){return new kh(e>0?e-1:e,t)}(e.e,e.f),Of(e.a,n),n.g=e,e.d=t,n)}function Pm(e,t){var n,r;for(r=Tk(e,0);r.b!=r.d.c;)(n=Yf(Tb(r),10)).a+=t.a,n.b+=t.b;return e}function Dm(e,t){var n,r;for(n=0;n0?e.g?Ym(e.g,t,n):0:e.c}function zm(e,t){var n,r;return!!e.c&&(r=e.g,(n=e.a.$b(t,r))>0|0==n&e.f==(Vu(),BD))}function Vm(e){var t;return 0==(t=e.h)?e.l+e.m*EM:t==xM?e.l+e.m*EM-CM:e}function Um(e){var t,n,r,i;for(t=new so,r=0,i=e.length;r=i;o--)e[o+1]=e[o];e[i]=r}function Km(e,t,n,r){var i,o;for(i=function(e,t,n,r){var i,o,a,s;for(o=t,i=n-1;o<=i;)if((s=e[a=o+i>>>1])r))return a;i=a-1}return-(o+1)}(e,t,n,r),i<0&&(i=-i-1),o=n-1;o>=i;o--)e[o+1]=e[o];e[i]=r}function Qm(e,t){var n,r;for(Gd(t),r=t.mb();r.G();)if(n=r.H(),!e.kb(n))return!1;return!0}function Jm(e){var t,n,r;return n=0,(r=e)<0&&(r+=CM,n=xM),t=yv(r/EM),kf(yv(r-t*EM),t,n)}function ex(e,t){return e.c.c=_y(_D,GA,1,0,4,1),vN(e,e.e,t),vN(e,e.a,t),Fp(),xb(e.c,null),function(e){var t,n,r;for(t=0,r=new Zn(e.c);r.a0;r--)n|=UC(e,t,r-1,r);return n}function xx(e,t){var n,r,i;for(n=!1,r=e.d[t].length,i=0;it?1:e==t?0:isNaN(e)?isNaN(t)?0:1:-1}function Ix(e){switch(e.Y()){case 0:return YD;case 1:return new Yd(e.mb().H());default:return new sb(e)}}function Ax(){var e,t;Ax=r,t=!(Error.stackTraceLimit||"stack"in new Error),e=new yt,oA=t?new s:e}function Mx(){Mx=r,UB=new Lf("intCoordinates",(zd(),zd(),SX)),qB=new ld("jsonObject"),XB=new Qa(0,0)}function Px(){Px=r,$H=new Ls("MIRROR_X",0),KH=new Ls("TRANSPOSE",1),ZH=new Ls("MIRROR_AND_TRANSPOSE",2)}function Dx(){Dx=r,DV=new vc(BM,0),PV=new vc("INCOMING_ONLY",1),jV=new vc("OUTGOING_ONLY",2)}function jx(){return NI(),Sx(Io(_V,1),HA,60,0,[Zz,qz,Uz,Qz,Kz,vV,pV,$z,Xz,Wz,Jz,dV,gV])}function Rx(){var e,t,n,i;for(Rx=r,uY=new _C(_V),n=0,i=(t=jx()).length;n0)return zf(t-1,e.a.c.length),yy(e.a,t-1);throw new mi}function Ux(e){e.b.c.length-e.e.c.length<0?(Gh(e,(wI(),IG)),e.a.a=e.j.a):(Gh(e,(wI(),KG)),e.a.a=0)}function qx(e,t){jd(e>=0,"Negative initial capacity"),jd(t>=0,"Non-positive load factor"),wy(this)}function Xx(e){var t;this.e=e,this.d=new ey(this.e.e),this.a=this.d,this.b=ix(this),t=e[gD],this[gD]=t}function Wx(){this.n=null,this.j=null,this.i=null,this.d=null,this.b=null,this.k=null,this.a=null}function Zx(e){var t,n,r,i;for(i=1,n=0,r=e.length;n=48&&e<58?e-48:e>=97&&e<97?e-97+10:e>=65&&e<65?e-65+10:-1}function wE(e){switch(cf(),e.Y()){case 0:return ip(),KD;case 1:return new ca(e.mb().H());default:return new Zs(e)}}function mE(e,t){var n;return Vl(e)&&Vl(t)&&kM<(n=e+t)&&n>22),i=e.h+t.h+(r>>22),kf(n&mM,r&mM,i&xM)}(Vl(e)?Jm(e):e,Vl(t)?Jm(t):t))}function xE(e,t){var n;return Vl(e)&&Vl(t)&&kM<(n=e*t)&&n>13|(15&e.m)<<9,i=e.m>>4&8191,o=e.m>>17|(255&e.h)<<5,a=(1048320&e.h)>>8,v=r*(s=8191&t.l),b=i*s,y=o*s,w=a*s,0!=(c=t.l>>13|(15&t.m)<<9)&&(v+=n*c,b+=r*c,y+=i*c,w+=o*c),0!=(u=t.m>>4&8191)&&(b+=n*u,y+=r*u,w+=i*u),0!=(l=t.m>>17|(255&t.h)<<5)&&(y+=n*l,w+=r*l),0!=(h=(1048320&t.h)>>8)&&(w+=n*h),d=((p=n*s)>>22)+(v>>9)+((262143&b)<<4)+((31&y)<<17),g=(b>>18)+(y>>5)+((4095&w)<<8),g+=(d+=(f=(p&mM)+((511&v)<<13))>>22)>>22,kf(f&=mM,d&=mM,g&=xM)}(Vl(e)?Jm(e):e,Vl(t)?Jm(t):t))}function EE(e,t){var n;return Vl(e)&&Vl(t)&&kM<(n=e-t)&&n>22),i=e.h-t.h+(r>>22),kf(n&mM,r&mM,i&xM)}(Vl(e)?Jm(e):e,Vl(t)?Jm(t):t))}function CE(){CE=r,Lj=new ss(GM,0),Tj=new ss(DM,1),Oj=new ss(PM,2),Sj=new ss("DOWN",3),Ij=new ss("UP",4)}function kE(){kE=r,zj=new us(GM,0),Fj=new us("POLYLINE",1),Hj=new us("ORTHOGONAL",2),Yj=new us("SPLINES",3)}function _E(){_E=r,tR=new hs("INHERIT",0),eR=new hs("INCLUDE_CHILDREN",1),nR=new hs("SEPARATE_CHILDREN",2)}function NE(){NE=r,BY=bd(pd(new iC,(WI(),cF)),SF),HY=gd(bd(vd(new iC,nF),eF),tF),FY=gd(yd(new iC,rF),tF)}function SE(){SE=r,YY=bd(pd(new iC,(WI(),cF)),SF),zY=gd(bd(vd(new iC,nF),eF),tF),VY=gd(yd(new iC,rF),tF)}function OE(e){this.a=new Lu,this.d=new Lu,this.b=new Lu,this.c=new Lu,this.g=new Lu,this.i=new Lu,this.f=e}function TE(e,t,n,r,i,o){this.e=new Pt,this.f=(nm(),Rq),Tf(this.e,e),this.d=t,this.a=n,this.b=r,this.f=i,this.c=o}function LE(e,t,n,r,i){var o,a;for(a=e.mb();a.G();)(o=Yf(a.H(),33)).i.a=t.a,o.i.b=i?t.b:t.b+r.b-o.j.b,t.a+=o.j.a+n}function IE(e,t){var n,r;for(jf(),r=Lg(G_(e));eC(r);)if((n=Yf(_v(r),12)).d.f==t||n.c.f==t)return n;return null}function AE(e,t,n){var r,i,o;for(r=0,o=Tk(e,0);o.b!=o.d.c&&!((i=ro(Oh(Tb(o))))>n);)i>=t&&++r;return r}function ME(e,t){var n;return t?((n=t.n?t.n:(Fp(),Fp(),RX)).V()||(e.n?_m(e.n,n):e.n=new cu(n)),e):e}function PE(e,t,n){try{!function(e,t,n){if(Md(t),n.G())for(eu(t,e.C(n.H()));n.G();)eu(t,e.c),eu(t,e.C(n.H()))}(e,t,n)}catch(e){throw hl(e=rE(e),181)?new sw(e):DE(e)}return t}function DE(e){var t;return hl(e,164)&&Wc((t=Yf(e,164)).b)!==Wc((ii(),iA))?Wc(t.b)===Wc(iA)?null:t.b:e}function jE(e,t){var n;for(n=Yf(kx(Zg(e),(ZI(),lq)),9);n;){if(n==t)return!0;n=Yf(kx(Zg(n),lq),9)}return!1}function RE(e){switch(Yf(kx(e,(ZI(),KU)),140).e){case 1:Ky(e,KU,(Rw(),mU));break;case 2:Ky(e,KU,(Rw(),EU))}}function GE(e){switch(cf(),e.c){case 0:return ip(),KD;case 1:return new ca(PN(new Vs(e)));default:return new Li(e)}}function BE(e){var t,n;for(rp(),t=0,n=e.length;t-129&&e<128?(t=e+128,!(n=(Vd(),AX)[t])&&(n=AX[t]=new In(e)),n):new In(e)}function ZE(e){var t,n;for(t=S_(e.b,e.d),n=yA;n>t;){if(ax(e,e.d),0==t){n=0;break}oC(e),CC(e),n=t,t=S_(e.b,e.d)}e.c=n}function $E(){var e,t,n;eN(),n=qX+++(Date.now?Date.now():(new Date).getTime()),e=yv(Math.floor(n*KP))&xD,t=yv(n-e*mD),this.a=1502^e,this.b=t^wD}function KE(e){return _l(e)?dk(e):kl(e)?yv((Gd(e),e)):gh(e)?no((Gd(e),e))?1231:1237:Wd(e)?e.v():(_d(e),lh(e))}function QE(e,t,n,r){var i,o,a;for(a=0,o=bO(new Fh(t,r));o.G();)i=Yf(o.H(),7),yp(e.i,i,WE(a++));yp(n,t,WE(a))}function JE(e){var t;return(t=Yf(kx(e,(JI(),gR)),59))==(CE(),Lj)?Yf(kx(e,(ZI(),OU)),15).a>=1?Tj:Sj:t}function eC(e){if(Md(e.b),e.b.G())return!0;for(;e.a.G();)if(Md(e.b=e.Wb(e.a.H())),e.b.G())return!0;return!1}function tC(e){return e.d==e.c.d&&e.i==e.g.d||(e.a.c=_y(_D,GA,1,0,4,1),ox(e.a,e.c),ox(e.a,e.g),e.d=e.c.d,e.i=e.g.d),e.a}function nC(e){var t;if(e.b){if(nC(e.b),e.b.d!=e.c)throw new wi}else e.d.V()&&(t=Yf(Kg(e.f.b,e.e),19))&&(e.d=t)}function rC(e,t,n,r,i){var o,a,s,c;for(function(e,t,n,r,i){r?function(e,t){var n,r;for(r=new Zn(t);r.a1&&(xb(t,e.b),function(e,t){var n,r,i,o,a,s,c,u,l;for(i=new Pt,c=new Zn(t);c.at){Jv(n);break}}kg(n,t)}function sC(e,t,n){var r;return r=ka(e.a,t),function(e,t,n){e.set(t,n)}(e.a,t,void 0===n?null:n),void 0===r?(++e.c,Qh(e.b)):++e.d,r}function cC(e,t,n){return(t-e<=0?0-(t-e):t-e)HP?e-n>HP:n-e>HP)}function uC(e){switch(e.e){case 0:return GV;case 1:return BV;case 2:return HV;case 3:return FV;default:return YV}}function lC(e,t){switch(t.e){case 2:return e.b;case 1:return e.c;case 4:return e.d;case 3:return e.a;default:return!1}}function hC(e){switch(wI(),e.e){case 4:return AG;case 1:return IG;case 3:return ZG;case 2:return KG;default:return $G}}function fC(e,t){if(t==e.c)return e.d;if(t==e.d)return e.c;throw new oo("Node "+t+" not part of edge "+e)}function dC(e,t){var n;return Ul(e.a,t)?Yf(Ul(e.a,t)?e.b[t.e]:null,62):(n=new Br,wm(e.a,t),Og(e,t.e,n),n)}function gC(e,t){var n,r,i;for(i=e.g.tb(),n=0;i.G();){if((r=ro(Oh(i.H()))-t)>uD)return n;r>lD&&++n}return n}function pC(e){var t,n,r,i;return wm(n=new Wf(t=Yf(na((i=(r=e.$c).f)==jD?r:i),11),Yf(Sg(t,t.length),11),0),e),n}function vC(e,t){var n,r;for(r=new Zn(t);r.a %s",Sx(Io(_D,1),GA,1,4,[WE(t),WE(n)])),s_(t,n=n<(r=e.length)?n:r,r),n-t}function EC(e,t){var n,r,i;for(n=e,i=0;;){if(n==t)return i;if(!(r=Yf(kx(n,(ZI(),lq)),9)))throw new Vr;n=Zg(r),++i}}function CC(e){var t,n,r;for(r=!1,n=e.d.length-1;n>=0;n--)e.j=(t=new pN(e.e,e.d,n,1),new B_(n,e.d,t)),r|=Zw(e,n);return r}function kC(e){this.f=(ml(),new Er),this.n=new Er,this.k=new Er,this.g=new Ki,this.i=new lk((si(),ZD)),this.j=e,function(e,t){var n,r,i,o,a;for(n=0,a=0,i=0,o=t.length;i0?e-t:-(e-t))<=yM||e==t||isNaN(e)&&isNaN(t)?0:et?1:vu(isNaN(e),isNaN(t)))>0}function DC(e,t){return Oo(),Oo(),((e-t>0?e-t:-(e-t))<=yM||e==t||isNaN(e)&&isNaN(t)?0:et?1:vu(isNaN(e),isNaN(t)))<0}function jC(e){var t,n;for(e.d||function(e){var t,n,r,i,o,a;if(i=e.g.tb(),r=e.b.tb(),e.e)for(n=0;nuD;){for(o=t,a=0;(t-o<=0?0-(t-o):t-o)oE(e.a,r,i)+e.c.b+e.d.b)}(e.j,n,r)&&(function(e,t,n){!function(e,t,n){ZS(e,t,n,(wI(),IG),e.f),ZS(e,t,n,KG,e.n)}(e.c,t,n)}(e.j,e.d[t][n],e.d[t][r]),a=(o=e.d[t])[r],o[r]=o[n],o[n]=a,i=!0),i}function qC(e,t,n){var r,i,o,a,s;i=(s=Zg(e)).a,r=Yf(kx(s,(ZI(),PU)),15).a,o=s.d,a=e.i,t&&(a.a=a.a-i.b-r-o.a),n&&(a.b=a.b-i.d-r-o.b)}function XC(e,t){var n,r,i;for(r=Lg(G_(e));eC(r);)return n=Yf(_v(r),12),new Gt(Md((i=Yf(t.B(n),9)).i.b+i.j.b/2));return ai(),ai(),kD}function WC(e){var t,n,r,i;for(n=vL(e),t=RP,i=0,r=0;t>.5&&i<50;)t=_a(X_(n,r=fO(n),!0).b),++i;return X_(e,r,!1)}function ZC(e){var t,n,r,i;for(n=vL(e),t=RP,i=0,r=0;t>.5&&i<50;)t=_a(X_(n,r=hO(n),!0).a),++i;return X_(e,r,!1)}function $C(e){var t,n,r;for(this.a=new Lu,this.e=new Ki,this.f=0,n=0,r=e.length;n0),t.a.sb(t.c=--t.b))}function ik(e,t,n){FC(n,"Compound graph preprocessor",1),e.a=new Xs,oL(e,t,null),function(e,t){var n,r,i,o,a,s,c;for(a=ng(e.a).mb();a.G();){if((o=Yf(a.H(),12)).b.c.length>0)for(xb(r=new hf(Yf(W_(e.a,o),18)),new an(t)),i=new $v(o.b,0);i.b=e.b>>1)for(r=e.c,n=e.b;n>t;--n)r=r.b;else for(r=e.a.a,n=0;n0&&(i.b+=t),i}function Ik(e,t){var n,r,i;for(i=new so,r=e.mb();r.G();)iT(n=Yf(r.H(),55),0,i.b),i.b+=n.e.b+t,i.a=Go(i.a,n.e.a);return i.a>0&&(i.a+=t),i}function Ak(e,t,n){var r,i,o;return(i=Yf(Kg(e.c,t),176))?(o=pf(i,n),Bl(e,i),o):(r=new od(e,t,n),yp(e.c,t,r),Ov(r),null)}function Mk(e){switch(e.e){case 8:return wI(),AG;case 9:return wI(),ZG;case 10:return wI(),IG;case 11:return wI(),KG;default:return wI(),$G}}function Pk(e,t){return _l(e)?!!cA[t]:e._c?!!e._c[t]:kl(e)?!!sA[t]:!!gh(e)&&!!aA[t]}function Dk(){Mx(),this.i=(ml(),new Er),this.a=new Er,this.k=new Er,this.j=new Er,this.b=new Er,this.n=new Er,this.f=new Er,this.e=new Er}function jk(e,t){var n,r;t.a.R(e)||(r=Yf(kx(e,(ZI(),qU)),32),n=Yf(dd(e.f,0),7),r==(wI(),AG)?Gh(n,ZG):r==ZG&&Gh(n,AG),t.a.db(e,t))}function Rk(e){return Ho(1,Yf(kx(e,(ZI(),pq)),24).a)*(e.c.f.g==(j_(),GH)&&e.d.f.g==GH?1:e.c.f.g==GH||e.d.f.g==GH?2:8)}function Gk(e){var t,n,r,i;for(i=Yf(kx(e,(ZI(),oq)),7),n=0,r=(t=Yf(Yk(e.b,_y(AH,NP,12,e.b.c.length,0,1)),47)).length;nr&&Hg(t,r,null),t}function zk(e,t){var n,r;for(r=e.a.length,t.lengthr&&Hg(t,r,null),t}function Vk(e){return _l(e)?e:kl(e)?Na((Gd(e),e)):gh(e)?vl(no((Gd(e),e))):Wd(e)?e.w():_d(e)?vv(e):e.toString?e.toString():"[JavaScriptObject]"}function Uk(){Uk=r,gz=new ac("SIMPLE",0),hz=new ac(UP,1),fz=new ac("LINEAR_SEGMENTS",2),lz=new ac("BRANDES_KOEPF",3),dz=new ac(ZP,4)}function qk(){qk=r,Aq=new Ec(BM,0),Oq=new Ec("FIRST",1),Tq=new Ec("FIRST_SEPARATE",2),Lq=new Ec("LAST",3),Iq=new Ec("LAST_SEPARATE",4)}function Xk(){Xk=r,Fz=new ct,Bz=bd(new iC,(WI(),wF)),Hz=gd(bd(new iC,jF),DF),Rz=gd(yd(bd(vd(new iC,EF),kF),NF),CF),Gz=gd(yd(new iC,NF),uF)}function Wk(e){var t,n,r;for(n=new zn(new Yn(e.d.a).a.bb().mb());n.a.G();)r=Yf(n.a.H(),21),Tf((t=Yf(r.yb(),12)).c.e,t),Tf(t.d.b,t)}function Zk(e,t){var n,r;if(Su(t>0),(t&-t)==t)return yv(t*IS(e,31)*4.656612873077393e-10);do{r=(n=IS(e,31))%t}while(n-r+(t-1)<0);return yv(r)}function $k(e,t){if(e.c.f==t)return e.d.f;if(e.d.f==t)return e.c.f;throw new oo("Node "+t+" is neither source nor target of edge "+e)}function Kk(e,t,n){return Su(e>=0&&e<=1114111),e>=mA?(t[n++]=55296+(e-mA>>10&1023)&xA,t[n]=56320+(e-mA&1023)&xA,2):(t[n]=e&xA,1)}function Qk(e){var t,n;if(!e.a)for(e.a=Ol(Yf(e.e,9).c.c.length),n=new Zn(Yf(e.e,9).c);n.ai&&Hg(t,i,null),t}function o_(e,t,n){if(n&&(t<0||t>n.a.c.length))throw new oo("index must be >= 0 and <= layer node count");e.d&&Gy(e.d.a,e),e.d=n,n&&Ld(n.a,t,e)}function a_(e,t,n,r,i,o,a,s){var c,u;r&&((c=r.a[0])&&a_(e,t,n,c,i,o,a,s),function(e,t,n,r,i,o,a){var s,c;return(!t.Xc()||!((c=e.a.$b(n,r))<0||!i&&0==c))&&(!t.Yc()||!((s=e.a.$b(n,o))>0||!a&&0==s))}(e,n,r.d,i,o,a,s)&&t.ib(r),(u=r.a[1])&&a_(e,t,n,u,i,o,a,s))}function s_(e,t,n){if(e<0)throw new io(TA+e+" < 0");if(t>n)throw new io("toIndex: "+t+" > size "+n);if(e>t)throw new oo(TA+e+" > toIndex: "+t)}function c_(e,t){var n,r,i;return n=t.yb(),i=t.zb(),r=e.cb(n),!(!(Wc(i)===Wc(r)||null!=i&&sE(i,r))||null==r&&!e.R(n))}function u_(e,t,n){var r;(r=t.c.f).g==(j_(),RH)?(Ky(e,(ZI(),tq),Yf(kx(r,tq),7)),Ky(e,nq,Yf(kx(r,nq),7))):(Ky(e,(ZI(),tq),t.c),Ky(e,nq,n.d))}function l_(e,t,n){var r,i,o,a;for(function(e){var t,n;for(null==e.g&&(e.g=md(e)),t=0,n=e.g.length;tr&&e.charCodeAt(t-1)<=32;)--t;return r>0||t>19)!=(s=t.h>>19)?s-a:(r=e.h)!=(o=t.h)?r-o:(n=e.m)!=(i=t.m)?n-i:e.l-t.l}function x_(e){var t,n,r;for(n=new zn(new Yn(e.p.a).a.bb().mb());n.a.G();)if(r=Yf(n.a.H(),21),(t=Yf(r.yb(),89)).e&&e.b[t.b]<0)return t;return null}function E_(e,t){var n,r,i,o,a;r=Fo(e.d,t.d),o=Fo(e.e,t.e),(i=Go(e.d+e.c,t.d+t.c))=t.length)throw new io("Greedy SwitchDecider: Free layer layer not in graph.");this.b=t[e],this.c=new qh(this.b),this.d=new qm(this.b)}function H_(e,t){var n;if(this.f=e,this.b=this.f.c,Lb(t,n=e.d),t>=(n/2|0))for(this.e=e.e,this.d=n;t++0;)rb(this);this.a=null}function F_(e){var t,n,r;for(n=new Zn(e.a.b);n.a0&&(e.g=oN(e.g)),iN(e);case 2:return bu(e.e)<0&&(e.e=iN(e.e)),oN(e);default:return e.d=1+Ho(Ri(e.e),Ri(e.g)),e}}function $_(e,t){this.f=(ml(),new Er),this.b=new Er,this.j=new Er,this.a=e,this.c=t,this.c>0&&rS(this,this.c-1,(wI(),IG)),this.c0&&hS(e,t,n),0):(Yc(0==n),0)}function J_(e,t){var n,r,i,o,a;for(i=Yf(kx(t,(ZI(),mq)),15).a*Yf(kx(t,($I(),Zq)),15).a,a=e[0].i.a+e[0].j.a,o=1;o=0;t--)UX[t]=i,i*=.5;for(n=1,e=24;e>=0;e--)VX[e]=n,n*=.5}function tN(e){for(;0!=e.g.c&&0!=e.d.c;)Fl(e.g).c>Fl(e.d).c?(e.i+=e.g.c,zC(e.d)):Fl(e.d).c>Fl(e.g).c?(e.e+=e.d.c,zC(e.g)):(e.i+=nd(e.g),e.e+=nd(e.d),zC(e.g),zC(e.d))}function nN(e){var t,n,r,i;for(i=new Xo("["),t=!1,r=e.mb();r.G();)n=r.H(),t?i.a+=", ":t=!0,nu(i,n===e?"(this Collection)":(oi(),null==n?gA:Vk(n)));return i.a+="]",i.a}function rN(e){var t,n,r,i;for(i=new Xo("{"),t=!1,r=e.bb().mb();r.G();)n=Yf(r.H(),21),t?i.a+=", ":t=!0,nu(i,vb(e,n.yb())),i.a+="=",nu(i,vb(e,n.zb()));return i.a+="}",i.a}function iN(e){var t;return zc(!!e.g),t=e.g,e.g=t.e,t.e=e,t.j=e.j,t.a=e.a,e.a=1+ji(e.e)+ji(e.g),e.j=mE(mE(e.c,Gi(e.e)),Gi(e.g)),e.d=1+Ho(Ri(e.e),Ri(e.g)),t.d=1+Ho(Ri(t.e),Ri(t.g)),t}function oN(e){var t;return zc(!!e.e),t=e.e,e.e=t.g,t.g=e,t.j=e.j,t.a=e.a,e.a=1+ji(e.e)+ji(e.g),e.j=mE(mE(e.c,Gi(e.e)),Gi(e.g)),e.d=1+Ho(Ri(e.e),Ri(e.g)),t.d=1+Ho(Ri(t.e),Ri(t.g)),t}function aN(e){var t;fl(new Zn(f_(e.e)))&&((t=Yf(wC(e.e,(JI(),FR)),28))==(b_(),wG)?function(e){var t,n,r,i,o;for(t=e.e.j,r=new Zn(f_(e));r.a=mA?(t=55296+(e-mA>>10&1023)&xA,n=56320+(e-mA&1023)&xA,String.fromCharCode(t)+""+String.fromCharCode(n)):String.fromCharCode(e&xA)}function kN(e,t,n,r){var i;Tf(e.c,new wp(e,n,r,Yf(Kg(e.k,n),24).a)),qg(r)&&(t==e.e?r.d.f!=e.a&&r.c.f!=e.a:r.d.f!=e.e&&r.c.f!=e.e)&&(i=n==r.c?r.d:r.c,Tf(e.c,new wp(e,i,r,Yf(Kg(e.k,i),24).a)))}function _N(e,t){var n,r,i;if(t===e)return!0;if(!hl(t,57))return!1;if(i=Yf(t,57),e.Y()!=i.Y())return!1;for(r=i.bb().mb();r.G();)if(n=Yf(r.H(),21),!e._(n))return!1;return!0}function NN(e,t){var n,r,i;return ME(r=new _k(e),t),Ky(r,(ZI(),UU),t),Ky(r,(JI(),FR),(b_(),wG)),Ky(r,sR,(fk(),xj)),lr(r,(j_(),DH)),av(n=new __,r),Gh(n,(wI(),KG)),av(i=new __,r),Gh(i,IG),r}function SN(e,t){var n,r,i;for(i=yA,r=new Zn(tC(t));r.a0&&IN(e,o,n));t.k=0}function AN(e,t){if(0>t)throw new oo("Top must be smaller or equal to bottom.");if(0>e)throw new oo("Left must be smaller or equal to right.");this.d=0,this.c=e,this.a=t,this.b=0}function MN(e){var t,n,r;if(0==e.length)throw new oo(hD);for(n=0,r=e.length;n1)throw new oo("In straight hyperEdges there may be only one edge.");Of((i=new Yn(n.a).a.bb().mb(),r=Yf(new zn(i).a.H(),21),Yf(r.yb(),12)).a,new Qa(t,e.b))}function WN(e,t,n){var r,i;if(this.f=e,Lb(n,i=(r=Yf(Kg(e.b,t),126))?r.a:0),n>=(i/2|0))for(this.e=r?r.c:null,this.d=i;n++0;)Dv(this);this.b=t,this.a=null}function ZN(t,n){"undefined"===bA?undefined(n):((typeof document!==WM||"object"===lA&&e.exports)&&uW(t(n)),typeof document===WM&&typeof self!==WM&&self.postMessage(n))}function $N(e,t){var n,r,i,o;"x"in e.a&&(i=Yf(Sp(e,"x"),104),t.i.a=i.a),"y"in e.a&&(o=Yf(Sp(e,"y"),104),t.i.b=o.a),tP in e.a&&(r=Yf(Sp(e,tP),104),t.j.a=r.a),nP in e.a&&(n=Yf(Sp(e,nP),104),t.j.b=n.a)}function KN(e,t,n){var r;my(this),t==(fv(),CV)?_g(this.g,e.c):_g(this.o,e.c),_g(n==CV?this.g:this.o,e.d),_g(this.c,e),uk(this,Rv(e.c).b,r=Rv(e.d).b,r),this.f=function(e,t){return I_(),(e-t<=0?0-(e-t):e-t)<.2}(Rv(e.c).b,Rv(e.d).b)}function QN(e,t,n){var r,i,o,a,s;for(Fp(),s=new cw((a=new Zo(Yf(dd(t.a,n),18))).b.Y()),i=new er(a.b.mb());i.b.G();)r=Yf(i.b.H(),37),(o=Yf(Kg(e.a,r),31))||(o=YI(r),yp(e.a,r,o)),s.c[s.c.length]=o;return s}function JN(e){var t,n;if(zs(Yf(kx(e,(JI(),FR)),28)))for(n=new Zn(e.f);n.at&&r.$b(e[o-1],e[o])>0;--o)a=e[o],Hg(e,o,e[o-1]),Hg(e,o-1,a)}(t,n,r,o);else if(eS(t,e,s=n+i,c=s+((a=r+i)-s>>1),-i,o),eS(t,e,c,a,-i,o),o.$b(e[c-1],e[c])<=0)for(;n=r||t upperEndpoint (%s)",Sx(Io(_D,1),GA,1,4,[t,n])))}((s=e.$b(n,o))<=0,n,o),0==s&&Yc(r!=(Vu(),BD)|a!=BD))}function uS(e){if(this.a=e,e.c.f.g==(j_(),DH))this.c=e.c,this.d=Yf(kx(e.c.f,(ZI(),qU)),32);else{if(e.d.f.g!=DH)throw new oo("Edge "+e+" is not an external edge.");this.c=e.d,this.d=Yf(kx(e.d.f,(ZI(),qU)),32)}}function lS(){lS=r,Az=yd(new iC,(WI(),vF)),Pz=bd(new iC,wF),Dz=gd(bd(new iC,jF),DF),Iz=gd(yd(bd(new iC,hF),fF),dF),jz=bd(new iC,VF),Mz=gd(new iC,bF),Tz=gd(yd(bd(vd(new iC,EF),kF),NF),CF),Lz=gd(yd(new iC,NF),uF)}function hS(e,t,n){var r,i,o,a;return Nw(n,pM),0==n?T_(e,t):(Yc(uh(e.b,t)),(a=e.c.a)?(o=_y(iW,vM,26,1,12,1),r=CT(a,e.d,t,n,o),Dd(e.c,a,r),o[0]):(e.d.$b(t,t),i=new Sm(t,n),Ch(e.a,i,e.a),Dd(e.c,null,i),0))}function fS(e,t,n){var r,i,o,a,s;for(r=0,s=n,t||(r=n*(e.c.length-1),s*=-1),o=new Zn(e);o.a0&&((!rs(e.b.d)||!r.q.d)&&(!is(e.b.d)||!r.q.b)&&(r.j.e-=0>o/2-.5?0:o/2-.5),(!rs(e.b.d)||!r.q.a)&&(!is(e.b.d)||!r.q.c)&&(r.j.b+=0>o-1?0:o-1))}(e,t,n),o=new Pt,i=new Zn(e.b.a.b);i.a0&&((!rs(e.b.d)||!r.q.d)&&(!is(e.b.d)||!r.q.b)&&(r.j.e+=0>o/2-.5?0:o/2-.5),(!rs(e.b.d)||!r.q.a)&&(!is(e.b.d)||!r.q.c)&&(r.j.b-=o-1))}(e,t,n)}function pS(e,t){var n,r,i,o;for(e.c[t.k]=!0,Tf(e.a,t),o=new Zn(t.f);o.a(a=s+ro(e.b[e.f[i.k].k]))?n:a;return n-r}function ES(e){var t;return $y(t=new zi,"type",new Pd((Rh(uH),uH.n))),$y(t,ZM,new Pd(e.f)),e.b&&$y(t,"value",e.b),e.a&&$y(t,"context",e.a),$y(t,$M,new Pd(El(new ao("\n"),new Fn(new $n((null==e.g&&(e.g=md(e)),e.g)))))),t}function CS(e,t){var n,r,i,o,a;if(t===e)return!0;if(!hl(t,20))return!1;if(a=Yf(t,20),e.Y()!=a.Y())return!1;for(o=a.mb(),r=e.mb();r.G();)if(n=r.H(),i=o.H(),!(Wc(n)===Wc(i)||null!=n&&sE(n,i)))return!1;return!0}function kS(e){!nj&&((t=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F"])[34]='\\"',t[92]="\\\\",t[173]="\\u00ad",t[1536]="\\u0600",t[1537]="\\u0601",t[1538]="\\u0602",t[1539]="\\u0603",t[1757]="\\u06dd",t[1807]="\\u070f",t[6068]="\\u17b4",t[6069]="\\u17b5",t[8203]="\\u200b",t[8204]="\\u200c",t[8205]="\\u200d",t[8206]="\\u200e",t[8207]="\\u200f",t[8232]="\\u2028",t[8233]="\\u2029",t[8234]="\\u202a",t[8235]="\\u202b",t[8236]="\\u202c",t[8237]="\\u202d",t[8238]="\\u202e",t[8288]="\\u2060",t[8289]="\\u2061",t[8290]="\\u2062",t[8291]="\\u2063",t[8292]="\\u2064",t[8298]="\\u206a",t[8299]="\\u206b",t[8300]="\\u206c",t[8301]="\\u206d",t[8302]="\\u206e",t[8303]="\\u206f",t[65279]="\\ufeff",t[65529]="\\ufff9",t[65530]="\\ufffa",t[65531]="\\ufffb",nj=t);var t,n=e.replace(/[\x00-\x1f\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u2028-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb"\\]/g,(function(e){return function(e,t){var n=nj[e.charCodeAt(0)];return null==n?e:n}(e)}));return'"'+n+'"'}function _S(e,t){var n,r,i,o,a;for(r=new zn(new Yn((1==t?hH:lH).a).a.bb().mb());r.a.G();)for(i=Yf(r.a.H(),21),n=Yf(i.yb(),59),a=Yf(W_(e.f.c,n),18).mb();a.G();)o=Yf(a.H(),27),Gy(e.b.b,o.b),Gy(e.b.a,Yf(o.b,25).f)}function NS(e,t,n){var r,i,o,a;if(FC(n,"Recursive layout",2),0!=t.b.c.length){for(a=1/t.b.c.length,o=new Zn(t.b);o.a=2147483648&&(r-=4294967296),r)}function AS(e,t,n){var r,i,o;if(t!=n){r=t;do{Lh(e,r.d),(o=Yf(kx(r,(ZI(),lq)),9))&&(Pl(e,(i=r.a).b,i.d),Lh(e,o.i),r=Zg(o))}while(o);r=n;do{Ih(e,r.d),(o=Yf(kx(r,(ZI(),lq)),9))&&(Dl(e,(i=r.a).b,i.d),Ih(e,o.i),r=Zg(o))}while(o)}}function MS(e,t){var n,r,i,o,a;for(n=new Pt,a=new Qs,i=new zn(new Yn(e.a).a.bb().mb());i.a.G();)o=Yf(i.a.H(),21),wT(a,(r=Yf(o.yb(),12)).c,r,null),wT(a,r.d,r,null);for(;a.a;)Tf(n,GT(a,t,zl(Yf(kx(t,(JI(),FR)),28))));return n}function PS(e,t){var n,r,i,o,a;for(r=new zn(new Yn((1==t?hH:lH).a).a.bb().mb());r.a.G();)for(i=Yf(r.a.H(),21),n=Yf(i.yb(),59),a=Yf(W_(e.f.c,n),18).mb();a.G();)o=Yf(a.H(),27),Tf(e.b.b,Yf(o.b,25)),Tf(e.b.a,Yf(o.b,25).f)}function DS(e){var t,n,r,i,o,a;for(jf(),ml(),n=new ry,r=new Zn(e.e.c);r.a0&&i0):i<0&&-i0)}function BS(e,t,n,r,i){var o,a;xm(Um(Sx(Io(pj,1),KM,10,0,[i.f.i,i.i,i.a])),n)||(t.c==i?Hl(t.a,0,new Xc(n)):Of(t.a,new Xc(n)),r&&!Ea(e.a,n)&&((a=Yf(kx(t,(JI(),kR)),44))||(a=new Gr,Ky(t,kR,a)),Mb(a,o=new Xc(n),a.c.b,a.c),_g(e.a,o)))}function HS(e){var t,n,r,i,o,a;for(t=0,n=new Zn(e.a);n.a((a=Rv(r.d).b)-o<=0?0-(a-o):a-o)?t:a-o<=0?0-(a-o):a-o);return t}function FS(e,t){var n,r,i,o,a,s;if((r=e.b[t.k])>=0)return r;for(i=1,o=new Zn(t.f);o.a(a=FS(e,s))+1?i:a+1);return function(e,t,n){var r,i;for(r=(i=e.a.c).c.length;rc-n&&s=e.g.d?((t=e.f).e=dm(e.e,t),t.g=e.g,t.a=e.a-1,t.j=EE(e.j,n),Z_(t)):((t=e.i).g=gm(e.g,t),t.e=e.e,t.a=e.a-1,t.j=EE(e.j,n),Z_(t)):e.e:e.g}function qS(e){var t,n,r,i,o,a;for(i=new Zn(e.a);i.ao.k?Gh(a,ZG):a.g==ZG&&o.k>r.k&&Gh(a,AG))}function XS(e,t,n){var r,i,o;if(Nw(n,pM),0==n)return T_(e,t);o=e.c.a,i=_y(iW,vM,26,1,12,1);try{if(!uh(e.b,t)||!o)return 0;r=YT(o,e.d,t,n,i)}catch(e){if(hl(e=rE(e),119))return 0;if(hl(e,76))return 0;throw DE(e)}return Dd(e.c,o,r),i[0]}function WS(e){var t,n,r,i,o,a;for(nl(a=Yf(Yk(e.a,_y(HH,oP,9,e.a.c.length,0,1)),51),new re),n=null,i=0,o=a.length;i0)return KS(e,t,n.g);if(0!=r)return mE(mE(t.ac(n.g),t._b(n)),KS(e,t,n.e));switch(e.b.f.e){case 0:return mE(t._b(n),t.ac(n.g));case 1:return t.ac(n.g);default:throw new xr}}function QS(e,t,n){var r;if(!n)return 0;if((r=e.d.$b(e.b.e,n.b))<0)return QS(e,t,n.e);if(0!=r)return mE(mE(t.ac(n.e),t._b(n)),QS(e,t,n.g));switch(e.b.d.e){case 0:return mE(t._b(n),t.ac(n.e));case 1:return t.ac(n.e);default:throw new xr}}function JS(e,t,n,r){var i,o,a,s;return lr(a=new _k(e),(j_(),RH)),Ky(a,(ZI(),oq),t),Ky(a,(JI(),FR),(b_(),wG)),Ky(a,tq,n),Ky(a,nq,r),Gh(o=new __,(wI(),KG)),av(o,a),Gh(s=new __,IG),av(s,a),cv(t,o),ME(i=new Dp,t),Ky(i,kR,null),uv(i,s),cv(i,r),a}function eO(e,t){var n,r,i,o,a,s,c,u;for(n=0,a=0,s=(o=e.j).length;an.a&&(o=Ho(o,a.a-n.a-1));return o}function iO(e){var t,n;switch(t=Yf(kx(e,(JI(),TR)),15).a,n=Yf(kx(e,LR),15).a,Ky(e,LR,new Bn(t)),Ky(e,TR,new Bn(n)),Yf(kx(e,sR),103).e){case 1:Ky(e,sR,(fk(),kj));break;case 2:Ky(e,sR,(fk(),mj));break;case 3:Ky(e,sR,(fk(),Ej));break;case 4:Ky(e,sR,(fk(),Cj))}}function oO(e,t,n){var r,i,o;for(o=new Zn(e.e);o.a0&&(r.b.c-=r.c,r.b.c<=0&&r.b.f>0&&Of(t,r.b));for(i=new Zn(e.b);i.a0&&(r.a.f-=r.c,r.a.f<=0&&r.a.c>0&&Of(n,r.a))}function aO(e,t,n){var r,i,o;for(o=new Zn(e.j);o.a0&&(r.b.e-=r.c,r.b.e<=0&&r.b.k>0&&Of(t,r.b));for(i=new Zn(e.d);i.a0&&(r.a.k-=r.c,r.a.k<=0&&r.a.e>0&&Of(n,r.a))}function sO(e,t){switch(e.e){case 1:switch(t.e){case 1:return JP;case 4:return.5;case 3:return eD;case 2:return tD}break;case 2:switch(t.e){case 1:return JP;case 2:return.5;case 3:return eD;case 4:return tD}break;default:throw new oo(QP)}return 0}function cO(e,t){var n,r,i,o;for(Tu((o=new $v(e,0)).b0),o.a.sb(o.c=--o.b),Jh(o,i),Tu(o.b1)&&(++o,++a);return!zl(Yf(kx(n,(JI(),FR)),28))&&s&&(++o,++a),yp(i,n,WE(o)),a}function hO(e){var t,n,r,i,o,a,s,c,u,l;for(u=(l=(s=Yf((a=e.b.mb()).H(),92)).a.a)>uD,c=luD)&&!c)return bm(s.b);if(i&&c||r&&u)return(t=o/(o-l))*bm(n.b)+(1-t)*bm(s.b)}return 0}function fO(e){var t,n,r,i,o,a,s,c,u,l;for(u=(l=(s=Yf((a=e.b.mb()).H(),92)).a.b)>uD,c=luD)&&!c)return bm(s.b);if(i&&c||r&&u)return(t=o/(o-l))*bm(n.b)+(1-t)*bm(s.b)}return 0}function dO(e,t,n){var r,i;return r=0,qg(t)?Ea(e.g,t)?(XS(e.i,WE(Ah(e,t.c)),1),XS(e.i,WE(Ah(e,t.d)),1),gl(e.g,t),r+=vk(e,t,e.i)):(_g(e.g,t),hS(e.i,WE(Ah(e,t.c)),1),hS(e.i,WE(Ah(e,t.d)),1)):(i=T_(e.i,WE(Yf(Kg(e.k,n),24).a)),r+=e.g.a.Y()-i),r}function gO(e){switch(e.e){case 0:return $z;case 1:return Zz;case 2:return qz;case 3:return Uz;case 4:return Qz;case 5:return Kz;case 6:return vV;case 7:return pV;case 8:return Wz;case 9:return Xz;case 10:return dV;case 11:return Jz;default:return gV}}function pO(e){switch(e.e){case 0:return Kz;case 1:return vV;case 2:return pV;case 3:return $z;case 4:return Zz;case 5:return qz;case 6:return Uz;case 7:return Qz;case 8:return Wz;case 9:return Xz;case 10:return dV;case 11:return Jz;default:return gV}}function vO(e){switch(e.e){case 0:return qz;case 1:return Uz;case 2:return Qz;case 3:return Kz;case 4:return vV;case 5:return pV;case 6:return $z;case 7:return Zz;case 8:return Wz;case 9:return Xz;case 10:return dV;case 11:return Jz;default:return gV}}function bO(e){var t;switch(t=e.a.f,e.b){case 0:return new Zn(e.a.f);case 1:return pg(new Lv(t),O_(e));case 2:switch(e.c.e){case 2:case 1:return pg(new Zn(t),O_(e));case 3:case 4:return pg(new Lv(t),O_(e))}}throw new _o("PortOrder not implemented.")}function yO(e,t,n,r){this.e=e,this.j=Yf(kx(e,(ZI(),xq)),134),this.f=_y(HH,oP,9,t,0,1),this.b=_y(IX,hA,184,t,6,1),this.a=_y(HH,oP,9,t,0,1),this.d=_y(IX,hA,184,t,6,1),this.i=_y(HH,oP,9,t,0,1),this.g=_y(IX,hA,184,t,6,1),this.n=_y(IX,hA,184,t,6,1),this.k=n,this.c=r}function wO(e){if(!e.a.c||!e.a.d)throw new Eo((Rh(SY),SY.j+" must have a source and target "+(Rh(LY),LY.j+" specified.")));if(e.a.c==e.a.d)throw new Eo("Network simplex does not support self-loops: "+e.a+" "+e.a.c+" "+e.a.d);return Cg(e.a.c.g,e.a),Cg(e.a.d.c,e.a),e.a}function mO(e,t,n,r,i){r==(wI(),IG)&&i==IG?qp(e,t)>qp(e,n)?e.d=Ek(e,n):e.b=Ek(e,t):r==KG&&i==KG?qp(e,t)qp(e,n)&&(e.d=Ek(e,n),e.b=Ek(e,t)):qp(e,t)0&&o>0?t++:r>0?n++:o>0?i++:n++}xb(e.f,new Pe)}function EO(e,t,n,r){var i,o,a,s,c;n.d.f!=t.f&&(lr(i=new _k(e),(j_(),RH)),Ky(i,(ZI(),oq),n),Ky(i,(JI(),FR),(b_(),wG)),r.c[r.c.length]=i,av(a=new __,i),Gh(a,(wI(),KG)),av(s=new __,i),Gh(s,IG),c=n.d,cv(n,a),ME(o=new Dp,n),Ky(o,kR,null),uv(o,s),cv(o,c),bS(i,a,s))}function CO(e){var t,n,r,i,o,a,s;for(i=RP,a=RP,o=null,n=new cp(new sr(e.e));n.b!=n.c.a.b;)if(1==Yf((t=Hy(n)).d,60).c&&(r=Yf(t.e,116).a,s=Yf(t.e,116).b,(i-r>HP||r-iHP)&&(a=Yf(t.e,116).b,i=Yf(t.e,116).a,o=Yf(t.d,60),0==a&&0==i)))return o;return o}function kO(e,t){var n,r,i,o,a,s;return o=e.d,(s=Yf(kx(e,(JI(),JR)),15).a)<0&&Ky(e,JR,new Bn(s=0)),t.j.b=s,a=Math.floor(s/2),Gh(r=new __,(wI(),KG)),av(r,t),r.i.b=a,Gh(i=new __,IG),av(i,t),i.i.b=a,cv(e,r),ME(n=new Dp,e),Ky(n,kR,null),uv(n,i),cv(n,o),function(e,t,n){var r;(r=t.c.f).g==(j_(),RH)?(Ky(e,(ZI(),tq),Yf(kx(r,tq),7)),Ky(e,nq,Yf(kx(r,nq),7))):(Ky(e,(ZI(),tq),t.c),Ky(e,nq,n.d))}(t,e,n),function(e,t){var n,r;for(r=new $v(e.b,0);r.buD&&(this.b.ib(n),s=!1),this.b.ib(c);s&&this.b.ib(n)}function OO(e,t){var n,r,i,o,a,s,c;for(n=dP,j_(),s=GH,i=new Zn(t.a);i.a0?n:0,r.i.b=n+tf(e.a,o,s)):r.i.b=(Gd(a),a)),c=tf(e.a,o,s),r.i.bo?0:o)o?0:o:s,(0>(co?0:o)o?0:o:s)),o=c,c+=a,r=Yf(dd(e.c,i),9),(n=new xu(u)).j.b=t.j.b,dS(e.b,t,n),Tf(r.c,n);Gy(e.g.c,t),Tf(e.i,new Ts(e,t))}function GO(e,t,n){var r,i,o,a,s,c;for(t.k=1,i=t.d,c=yC(t,(nm(),jq)).mb();c.G();)for(r=new Zn(Yf(c.H(),7).e);r.ah+s&&r.I();for(a=new Zn(f);a.aHP||r-iHP)&&(a=Yf(t.e,116).b,i=Yf(t.e,116).a,o=Yf(t.d,60),0==a&&0==i)))return o;return o}function qO(){var e,t,n,r,i;for(this.e=(ml(),new ry),this.b=new Wf(n=Yf(na(_V),11),Yf(Sg(n,n.length),11),0),this.c=new Wf(r=Yf(na(_V),11),Yf(Sg(r,r.length),11),0),this.a=new Wf(i=Yf(na(_V),11),Yf(Sg(i,i.length),11),0),t=(NI(),NI(),Yz).mb();t.G();)e=Yf(t.H(),60),Ak(this.e,e,new So)}function XO(e,t,n){var r,i,o,a;_a(e.k-e.a)a?new Hw(t,e,o-a):o>0&&a>0&&(new Hw(e,t,0),new Hw(t,e,0)))}function WO(e,t){var n,r,i,o,a,s,c,u;for(c=new Pt,u=null,r=Yf(_p(uY,e),20).mb();r.G();){for(s=new zn(new Yn((n=Yf(r.H(),75)).c.a).a.bb().mb());s.a.G();)i=Yf(s.a.H(),21),Jh(t,o=Yf(i.yb(),7)),LS(o,e.b);ox(c,n.b),u=e.a}for(RN(c),Lw(c,u),a=new Zn(c);a.an.k&&s1&&(o=n?Lc(t.d)+1:Lc(a.d)-1,sv(a,Yf(dd(e.a.c,o),16))),JO(e,a,n));return t}function eT(e,t){var n,r,i,o;for(i=t.d?e.a.c==(hv(),wz)?qE(t.b):XE(t.b):e.a.c==(hv(),yz)?qE(t.b):XE(t.b),o=!1,Uu(),r=new Au(Du(Uf(i.a,new f)));eC(r);)if(n=Yf(_v(r),12),e.c.a[n.c.f.d.k]!==e.c.a[n.d.f.d.k]&&(o=!0,Ea(e.b,e.a.f[$k(n,t.b).k])))return t.c=!0,t.a=n,t;return t.c=o,t.a=null,t}function tT(e){var t,n,r,i,o,a,s;for(o=new Zn(e.a.a);o.a0&&Ox(this.n,!0,(CE(),Tj)),e.g==(j_(),DH)&&Sf(this.n,!1,!1,!1,!1)}function iT(e,t,n){var r,i,o,a,s,c,u,l;for(o=new Qa(t,n),u=new Zn(e.b);u.ar?h:r)>e.j.a&&(u=(s-e.j.a)/2,a.b=Go(a.b,u),a.c=Go(a.c,u))}function pT(e,t,n,r){var i,o,a,s,c,u,l,h;for(a=Pl(t.d,n,r),l=new Zn(t.b);l.a=40)&&function(e){var t,n,r,i,o,a,s;for(e.o=new ri,r=new co,a=new Zn(e.e.a);a.a0,s=fC(t,o),Mu(n?s.c:s.g,t),1==tC(s).c.length&&Mb(r,s,r.c.b,r.c),i=new Ja(o,t),su(e.o,i),Gy(e.e.a,o))}(e),function(e){var t,n,r,i,o,a,s,c,u,l;for(u=e.e.a.c.length,o=new Zn(e.e.a);o.a0){for(qo(e.c);mS(e,Yf(Qv(new Zn(e.e.a)),61))0?(c=e.g)?(a=c.d,e.g=CT(c,t,n,r,i),0==i[0]&&++e.a,e.j=mE(e.j,r),e.g.d==a?e:Z_(e)):(i[0]=0,Em(e,n,r)):(i[0]=e.c,Yc(nE(mE(e.c,r),yA)<=0),e.c+=r,e.j=mE(e.j,r),e)}function kT(e,t,n){var r,i,o,a,s,c,u,l;for(i=!0,a=new Zn(t.c);a.au&&r>u)){i=!1,e.a&&Af();break}u=ro(n.n[s.k])+ro(n.d[s.k])+s.j.b+s.e.a}if(!i)break}return e.a&&Af(),i}function _T(e){var t,n,r,i,o,a;if(fl(new Zn(r=Jk(e)))){for(a=new mp(0,0,e.e.j.a,e.e.j.b),n=new Zn(r);n.aa.i.b-a.e.d+u.a+h&&(f=c.i+u.i,u.a=(u.i*u.a+c.i*c.a)/f,u.i=f,c.g=u,n=!0)),o=a,c=u;return n}function IT(e){var t,n,r,i,o;if(Wc(kx(e,(JI(),FR)))===Wc((b_(),mG))||Wc(kx(e,FR))===Wc(wG))for(o=new Zn(e.f);o.aa)return wI(),IG;break;case 4:case 3:if(l<0)return wI(),AG;if(l+n>o)return wI(),ZG}return(c=(u+s/2)/a)+(r=(l+n/2)/o)<=1&&c-r<=0?(wI(),KG):c+r>=1&&c-r>=0?(wI(),IG):r<.5?(wI(),AG):(wI(),ZG)}function MT(e,t,n,r,i,o,a){var s,c,u,l,h;for(h=new ic,c=t.mb();c.G();)for(l=new Zn(xk(Yf(c.H(),627)));l.a0&&Of(e.e,o)):(e.c[a]-=u+1,e.c[a]<=0&&e.a[a]>0&&Of(e.d,o))))}function DT(e){var t,n,r,i,o,a,s,c;for(Rx(),this.b=new Ze,this.c=new Pt,this.a=new Pt,s=0,c=(a=jx()).length;s0){for(i=s.length;i>0&&""==s[i-1];)--i;i0&&0==i[0]&&++e.a,e.j=mE(e.j,r-i[0]),Z_(e)):(i[0]=0,r>0?Cm(e,n,r):e):o>0?(s=e.g)?(e.g=FT(s,t,n,r,i),0==r&&0!=i[0]?--e.a:r>0&&0==i[0]&&++e.a,e.j=mE(e.j,r-i[0]),Z_(e)):(i[0]=0,r>0?Em(e,n,r):e):(i[0]=e.c,0==r?US(e):(e.j=mE(e.j,r-e.c),e.c=r,e))}function YT(e,t,n,r,i){var o,a,s;return(o=t.$b(n,e.b))<0?(a=e.e)?(e.e=YT(a,t,n,r,i),i[0]>0&&(r>=i[0]?(--e.a,e.j=EE(e.j,i[0])):e.j=EE(e.j,r)),0==i[0]?e:Z_(e)):(i[0]=0,e):o>0?(s=e.g)?(e.g=YT(s,t,n,r,i),i[0]>0&&(r>=i[0]?(--e.a,e.j=EE(e.j,i[0])):e.j=EE(e.j,r)),Z_(e)):(i[0]=0,e):(i[0]=e.c,r>=e.c?US(e):(e.c-=r,e.j=EE(e.j,r),e))}function zT(e,t,n){var r,i,o,a,s,c,u,l;for(c=new Zn(n.b);c.a0&&u>0&&qL(b,new Qa(_,u),!0))),p=Go(p,b.i.a+b.j.a),v=Go(v,b.i.b+b.j.b),d=new Zn(b.c);d.at.a&&(r.kb((P_(),NV))?e.d.a+=(n.a-t.a)/2:r.kb(OV)&&(e.d.a+=n.a-t.a)),n.b>t.b&&(r.kb((P_(),LV))?e.d.b+=(n.b-t.b)/2:r.kb(TV)&&(e.d.b+=n.b-t.b)),Yf(kx(e,(ZI(),WU)),18).kb((KO(),nU))&&(n.a>t.a||n.b>t.b))for(s=new Zn(e.b);s.a0||0==n&&t.f==(Vu(),BD))&&(s=t.g,c=t.f):(i=t.c,s=t.g,c=t.f),r&&i&&((n=e.a.$b(o,s))>0||0==n&&a==(Vu(),BD)&&c==(Vu(),BD))&&(o=s,Vu(),a=BD,c=GD),new cS(e.a,r,o,a,i,s,c)}function $T(e,t,n,r){var i,o,a,s,c,u;if(n.c.f!=t.f)for(lr(i=new _k(e),(j_(),RH)),Ky(i,(ZI(),oq),n),Ky(i,(JI(),FR),(b_(),wG)),r.c[r.c.length]=i,av(a=new __,i),Gh(a,(wI(),KG)),av(s=new __,i),Gh(s,IG),cv(n,a),ME(o=new Dp,n),Ky(o,kR,null),uv(o,s),cv(o,t),bS(i,a,s),u=new $v(n.b,0);u.b=r&&u.a>=r&&(l.a=r),f.a<=n&&u.a<=n&&(d.a=n-10),1==t.c.a.Y()?nw(a.a,Sx(Io(pj,1),KM,10,0,[l,h,g,d])):nw(a.a,Sx(Io(pj,1),KM,10,0,[l,h,i,g,d]))}function QT(e,t){var n,r,i,o,a,s;for(o=e.c,a=e.d,uv(e,null),cv(e,null),t&&no(ro(Sh(kx(a,(ZI(),ZU)))))?uv(e,WT(a.f,(nm(),jq),(wI(),IG))):uv(e,a),t&&no(ro(Sh(kx(o,(ZI(),uq)))))?cv(e,WT(o.f,(nm(),Dq),(wI(),KG))):cv(e,o),r=new Zn(e.b);r.aro(sl(a.g,a.d[0]).a)?(Tu(c.b>0),c.a.sb(c.c=--c.b),Jh(c,a),i=!0):s.e&&s.e.Y()>0&&(o=(!s.e&&(s.e=new Pt),s.e).nb(t),u=(!s.e&&(s.e=new Pt),s.e).nb(n),(o||u)&&((!s.e&&(s.e=new Pt),s.e).ib(a),++a.c));i||(r.c[r.c.length]=a)}function nL(e,t,n,r){var i,o,a,s,c,u,l,h,f,d,g;n.d.f!=t.f&&(lr(i=new _k(e),(j_(),RH)),Ky(i,(ZI(),oq),n),Ky(i,(JI(),FR),(b_(),wG)),r.c[r.c.length]=i,av(a=new __,i),Gh(a,(wI(),KG)),av(s=new __,i),Gh(s,IG),c=n.d,cv(n,a),ME(o=new Dp,n),Ky(o,kR,null),uv(o,s),cv(o,c),h=(l=(u=Yf(dd(a.b,0),12).c).f).g,g=(d=(f=Yf(dd(s.e,0),12).d).f).g,Ky(i,tq,h==RH?Yf(kx(l,tq),7):u),Ky(i,nq,g==RH?Yf(kx(d,nq),7):f))}function rL(e,t){var n,r,i,o,a,s,c,u,l,h,f,d,g;for(a=t,h=t.d,u=t.c.f,f=t.d.f,l=Lc(u.d),d=Lc(f.d),s=l;st&&(e.a=t),e.b<0?e.b=0:e.b>n&&(e.b=n)}(u,e.j.a,e.j.b),Gh(s,AT(s,o)),a=Yf(kx(r,(ZI(),WU)),18),c=s.g,o.e){case 2:case 1:(c==(wI(),AG)||c==ZG)&&a.ib((KO(),aU));break;case 4:case 3:(c==(wI(),IG)||c==KG)&&a.ib((KO(),aU))}else i=hC(o),s=WT(e,n,n==(nm(),jq)?i:vE(i));return s}function uL(e){var t,n,r,i,o,a,s,c;for(r=ah(Wb(e.a)),i=new Wf(t=Yf(na(_V),11),Yf(Sg(t,t.length),11),0);r.a.G()||r.b.mb().G();)s=(n=Yf(Sw(r),12)).c.g,c=n.d.g,s==(wI(),$G)?c!=$G&&(a=SC(c),Ky(n,(ZI(),Cq),a),Gh(n.c,c),wm(i,a),r.a.I()):c==$G?(a=SC(s),Ky(n,(ZI(),Cq),a),Gh(n.d,s),wm(i,a),r.a.I()):(a=iL(s,c),Ky(n,(ZI(),Cq),a),wm(i,a),r.a.I());return 1==i.c?o=Yf(Qb(new Vs(i)),60):(NI(),o=gV),dN(e,o,!1),o}function lL(e,t,n){var r,i,o,a,s,c,u,l,h;for(c=n+t.d.c.a,h=new Zn(t.f);h.a1,s=Lg(gu((rp(),new sb(BE(Sx(Io(_D,1),GA,1,4,[l.b,l.e]))))));eC(s);)u=(a=Yf(_v(s),12)).c==l?a.d:a.c,_a(Um(Sx(Io(pj,1),KM,10,0,[u.f.i,u.i,u.a])).b-o.b)>1&&BS(e,a,o,i,l)}}function hL(e,t){var n,r,i,o,a;for(a=new Xx(new Hn(e.f.b).a);a.b;){if(i=Yf((o=Vw(a)).yb(),251),1==t){if(i.yc()!=(CE(),Ij)&&i.yc()!=Sj)continue}else if(i.yc()!=(CE(),Oj)&&i.yc()!=Tj)continue;switch(r=Yf(Yf(o.zb(),27).b,25),n=Yf(Yf(o.zb(),27).a,78).c,i.yc().e){case 2:r.j.d=e.e.a,r.j.c=Go(1,r.j.c+n);break;case 1:r.j.d=r.j.d+n,r.j.c=Go(1,r.j.c-n);break;case 4:r.j.e=e.e.b,r.j.b=Go(1,r.j.b+n);break;case 3:r.j.e=r.j.e+n,r.j.b=Go(1,r.j.b-n)}}}function fL(e,t,n,r,i){var o,a,s,c,u,l,h,f;for(ml(),h=new Er,a=new Pt,qN(e,n,e.d.Mc(),a,h),qN(e,r,e.d.Nc(),a,h),s=new $v(a,0);s.b=l&&(y>l&&(u.c=_y(_D,GA,1,0,4,1),l=y),u.c[u.c.length]=g);0!=u.c.length&&(c=Yf(dd(u,Zk(t,u.c.length)),80),gp(S.a,c),c.d=h++,oO(c,_,E),u.c=_y(_D,GA,1,0,4,1))}for(m=e.c.length+1,p=new Zn(e);p.aN.d&&(sp(n),Gy(N.b,r),r.c>0&&(r.a=N,Tf(N.e,r),r.b=C,Tf(C.b,r)))}(a,Yf(kx(t,(ZI(),bq)),154)),function(e){var t,n,r,i,o,a,s,c,u;for(c=new Pt,a=new Pt,o=new Zn(e);o.a-1){for(i=new Zn(a);i.a0||(s.i=zo(s.i,r.i-1),--s.f,0==s.f&&(a.c[a.c.length]=s))}}(a),f=-1,l=new Zn(a);l.ah||r+i>c)throw new Ur;if(0!=(1&u.g)&&0==(4&u.g)||l==s)i>0&&v_(e,t,n,r,i,!0);else if(e===n&&tr;)n[a]=e[--t];else for(a=r+i;r0&&0==o[0]&&++e.a,e.j=mE(e.j,i-o[0])),Z_(e)):(o[0]=0,0==r&&i>0?Cm(e,n,i):e);if(a>0)return(c=e.g)?(e.g=pL(c,t,n,r,i,o),o[0]==r&&(0==i&&0!=o[0]?--e.a:i>0&&0==o[0]&&++e.a,e.j=mE(e.j,i-o[0])),Z_(e)):(o[0]=0,0==r&&i>0?Em(e,n,i):e);if(o[0]=e.c,r==e.c){if(0==i)return US(e);e.j=mE(e.j,i-e.c),e.c=i}return e}function vL(e){var t,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v;for(c=e.e,d=e.f,a=e.d,l=(g=e.c)-1,p=e.g,h=Hf(e.g.xb(1,e.g.Y()-1)),u=new Pt,n=0;n0&&(c=e.i.a/o);break;case 2:case 4:(i=e.f.j.b)>0&&(c=e.i.b/i)}Ky(e,(ZI(),dq),c)}if(s=e.j,r)e.a.a=r.a,e.a.b=r.b;else if(t!=EG&&t!=CG&&a!=$G)switch(a.e){case 1:e.a.a=s.a/2;break;case 2:e.a.a=s.a,e.a.b=s.b/2;break;case 3:e.a.a=s.a/2,e.a.b=s.b;break;case 4:e.a.b=s.b/2}else e.a.a=s.a/2,e.a.b=s.b/2}(c,u,i,Yf(kx(c,HR),10)),i.e){case 2:case 1:(c.g==(wI(),AG)||c.g==ZG)&&o.ib((KO(),aU));break;case 4:case 3:(c.g==(wI(),IG)||c.g==KG)&&o.ib((KO(),aU))}}function mL(e){var t,n,r,i,o;for(r=new Pt,o=new Zn(e.c.f);o.a=(p=e.d.c.c.c.length)-1)return null;for((i=new Pt).c[i.c.length]=t,b=t,a=n,d=-1,s=Yf(dd(e.d.c.c,n),16),f=0;f1&&a1&&a>1;)u=RT(e,y),s=Yf(dd(e.d.c.c,a),16),l=Yf(dd(e.d.c.c,a-1),16),o_(y,p=zo(Yf(g.sb(h++),24).a,l.a.c.length),l),o_(u,b,s),b=p,y&&(i.c[i.c.length]=y),y=u,--w,++o,--a;for(v=(r-(i.c.length-1)*e.d.d)/i.c.length,c=new Zn(i);c.a=0)return!1;if(n.e&&r==(j_(),PH)&&r!=n.e)return!1;if(t.k=n.b,Tf(n.f,t),n.e=r,r==(j_(),RH)||r==BH||r==PH)for(i=new Zn(t.f);i.a0&&(Ox(e.n,!1,(CE(),Oj)),Ox(e.n,!0,Tj))}function CL(e,t,n){var r,i,o,a;switch(o=e.i,i=Um(Sx(Io(pj,1),KM,10,0,[t.i,t.f.i])),r=Um(Sx(Io(pj,1),KM,10,0,[t.f.i,t.i,t.a])),a=t.d,t.g.e){case 4:o.a=Fo(i.a,r.a)-a.b-e.j.a-n,o.b=Um(Sx(Io(pj,1),KM,10,0,[t.f.i,t.i,t.a])).b+n;break;case 2:o.a=Go(i.a+t.j.a,r.a)+a.c+n,o.b=Um(Sx(Io(pj,1),KM,10,0,[t.f.i,t.i,t.a])).b+n;break;case 1:o.a=Um(Sx(Io(pj,1),KM,10,0,[t.f.i,t.i,t.a])).a+n,o.b=Fo(i.b,r.b)-a.d-e.j.b-n;break;case 3:o.a=Um(Sx(Io(pj,1),KM,10,0,[t.f.i,t.i,t.a])).a+n,o.b=Go(i.b+t.j.b,r.b)+a.a+n}}function kL(e,t,n){var r,i,o,a;switch(o=e.i,i=Um(Sx(Io(pj,1),KM,10,0,[t.i,t.f.i])),r=Um(Sx(Io(pj,1),KM,10,0,[t.f.i,t.i,t.a])),a=t.d,t.g.e){case 4:o.a=Fo(i.a,r.a)-a.b-e.j.a-n,o.b=Um(Sx(Io(pj,1),KM,10,0,[t.f.i,t.i,t.a])).b-e.j.b-n;break;case 2:o.a=Go(i.a+t.j.a,r.a)+a.c+n,o.b=Um(Sx(Io(pj,1),KM,10,0,[t.f.i,t.i,t.a])).b-e.j.b-n;break;case 1:o.a=Um(Sx(Io(pj,1),KM,10,0,[t.f.i,t.i,t.a])).a+n,o.b=Fo(i.b,r.b)-a.d-e.j.b-n;break;case 3:o.a=Um(Sx(Io(pj,1),KM,10,0,[t.f.i,t.i,t.a])).a+n,o.b=Go(i.b+t.j.b,r.b)+a.a+n}}function _L(){_L=r,hU=new kb("ONE_SIDED",0,!0,!1,!1),pU=new kb("TWO_SIDED",1,!1,!1,!1),fU=new kb("ONE_SIDED_BEST_OF_UP_OR_DOWN",2,!0,!0,!1),vU=new kb("TWO_SIDED_BEST_OF_UP_OR_DOWN",3,!1,!0,!1),dU=new kb("ONE_SIDED_BEST_OF_UP_OR_DOWN_ORTHOGONAL_HYPEREDGES",4,!0,!0,!0),bU=new kb("TWO_SIDED_BEST_OF_UP_OR_DOWN_ORTHOGONAL_HYPEREDGES",5,!1,!0,!0),gU=new kb("ONE_SIDED_ORTHOGONAL_HYPEREDGES",6,!0,!1,!0),lU=new kb("OFF",7,!1,!1,!1)}function NL(e,t,n,r,i,o,a){var s,c,u,l,h,f,d;return h=no(ro(Sh(kx(t,($I(),rX))))),f=null,o==(nm(),Dq)&&r.c.f==n?f=r.c:o==jq&&r.d.f==n&&(f=r.d),u=a,a&&h&&!f?(Tf(a.e,r),d=Bo(Yf(kx(a.d,(JI(),JR)),15).a,Yf(kx(r,JR),15).a),Ky(a.d,JR,new Bn(d))):(wI(),l=$G,f?l=f.g:zs(Yf(kx(n,(JI(),FR)),28))&&(l=o==Dq?KG:IG),c=function(e,t,n,r,i,o){var a,s,c,u,l,h,f;return u=r==(nm(),Dq)?o.c:o.d,c=JE(t),u.f==n?(a=Yf(Kg(e.b,u),9))||(Ky(a=bI(u,Yf(kx(n,(JI(),FR)),28),i,r==Dq?-1:1,u.j,c,t),(ZI(),oq),u),yp(e.b,u,a)):(l=Yf(kx(o,(JI(),JR)),15).a,s=function(e,t,n,r){var i,o;switch(i=JE(Zg(n)),av(o=new __,n),r.e){case 1:Gh(o,vE(hC(i)));break;case 2:Gh(o,hC(i))}return Ky(o,(ZI(),iq),Yf(kx(t,iq),15)),Ky(t,oq,o),yp(e.b,o,t),o}(e,a=bI((h=new v,f=Yf(kx(t,(ZI(),mq)),15).a*Yf(kx(t,($I(),Zq)),15).a/2,Ky(h,iq,new Bn(f)),h),Yf(kx(n,FR),28),i,r==Dq?-1:1,new Qa(l,l),c,t),n,r),Ky(a,oq,s),yp(e.b,s,a)),Yf(kx(t,(ZI(),WU)),18).ib((KO(),nU)),zs(Yf(kx(t,(JI(),FR)),28))?Ky(t,FR,(b_(),xG)):Ky(t,FR,(b_(),EG)),a}(e,t,n,o,l,r),s=pb((Zg(n),r)),o==Dq?(uv(s,Yf(dd(c.f,0),7)),cv(s,i)):(uv(s,i),cv(s,Yf(dd(c.f,0),7))),u=new TE(r,s,c,Yf(kx(c,(ZI(),oq)),7),o,!f)),dS(e.a,r,new gf(u.d,t,o)),u}function SL(e,t,n,r){var i,o,a,s,c,u,l;if(lr(o=new _k(e),(j_(),BH)),Ky(o,(JI(),FR),(b_(),wG)),i=0,t){for(Ky(a=new __,(ZI(),oq),t),Ky(o,oq,t.f),Gh(a,(wI(),KG)),av(a,o),c=0,u=(l=Yf(Yk(t.b,_y(AH,NP,12,t.b.c.length,0,1)),47)).length;cf?l:f;for(uk(this,Um(Sx(Io(pj,1),KM,10,0,[e.f.i,e.i,e.a])).b,h,l),a=new zn(new Yn(t.a).a.bb().mb());a.a.G();)i=Yf(a.a.H(),21),o=Yf(i.yb(),27),_g(this.c,Yf(o.b,12));this.f=!1}function PL(e,t,n,r){var i,o,a,s,c;if(!((s=(JI(),AR).b)in t.a)||!Sp(t,s).ic().a){if(!(c=Sp(t,ZM)))throw new wg("Labels must have a property 'text'.",null,t);if(!c.lc())throw new wg("A label's 'text' property must be a string.",c,t);if(Ky(o=new xu(c.lc().a),(ZI(),oq),t),yp(e.f,o,t),$N(t,o),C_(t,o),hl(n,9)?Tf(Yf(n,9).c,o):hl(n,12)?Tf(Yf(n,12).b,o):hl(n,7)&&Tf(Yf(n,7).c,o),hl(n,12))switch(a=Yf(kx(o,pR),107),$N(t,o),Ky(o,pR,a),i=Yf(kx(r,WU),18),a.e){case 2:case 3:i.ib((KO(),tU));case 1:case 0:i.ib((KO(),JV)),Ky(o,pR,(Gm(),Pj))}}}function DL(e,t){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v;for(i=0,o=0,c=new Zn(e.a);c.a.5?v-=2*o*(d-.5):d<.5&&(v+=2*i*(.5-d)),v<(r=a.e.b)&&(v=r),g=a.e.c,v>p.a-g-u&&(v=p.a-g-u),a.i.a=t+v}}function jL(){jL=r,nH=new Ki,tH=bT(Sx(Io(_j,1),GA,79,0,[(JI(),aR),wR])),QB=bT(Sx(Io(_j,1),GA,79,0,[PR,YR,($I(),fX),mR,(ZI(),pq),pX,sX])),WB=bT(Sx(Io(_j,1),GA,79,0,[cR,fR,AR,yR,CR,NR,SR,WR,ZR,ER,Bq,Uq,qq,nX,$q,rX,dX,cX,Fq])),KB=bT(Sx(Io(_j,1),GA,79,0,[LR,TR,_R,JR,MR,gq,PU,OU,mq,uX,Zq,tX])),$B=bT(Sx(Io(_j,1),GA,79,0,[VR,sR,gR,vR,pR,bR,xR,DR,jR,RR,GR,BR,FR,zR,Hq,Vq,iX,Xq,zq,oX,aX,Kq,Qq,eX,lX,hX,gX,vX,Jq])),ZB=bT(Sx(Io(_j,1),GA,79,0,[IR,$R,KR,Yq])),eH=bT(Sx(Io(_j,1),GA,79,0,[oR,lR,kR,OR,HR,qR])),JB=bT(Sx(Io(_j,1),GA,79,0,[(Mx(),UB)]))}function RL(e){var t,n,r,i,o,a,s;for(t=0,o=new Zn(e.b.a);o.a0;){for(Ey(0,s.c.length),d=Yf(s.c[0],12),Ey(0,h.c.length),i=Qy((r=Yf(h.c[0],12)).d.b,r,0),qv(d,r.d,i),uv(r,null),cv(r,null),f=d.a,t&&Of(f,new Xc(v)),n=Tk(r.a,0);n.b!=n.d.c;)Of(f,new Xc(Yf(Tb(n),10)));for(p=d.b,l=new Zn(r.b);l.a0?Iw(this,this.f/this.a):null!=sl(t.g,t.d[0]).a&&null!=sl(n.g,n.d[0]).a?Iw(this,(ro(sl(t.g,t.d[0]).a)+ro(sl(n.g,n.d[0]).a))/2):null!=sl(t.g,t.d[0]).a?Iw(this,sl(t.g,t.d[0]).a):null!=sl(n.g,n.d[0]).a&&Iw(this,sl(n.g,n.d[0]).a)}function FL(e,t){var n,r,i,o,a,s,c,u,l,h,f;switch(e.g.e){case 1:if(r=Yf(kx(e,(ZI(),oq)),12),(n=Yf(kx(r,aq),44))?no(ro(Sh(kx(r,wq))))&&(n=_x(n)):n=new Gr,u=Yf(kx(e,tq),7),t<=(l=Um(Sx(Io(pj,1),KM,10,0,[u.f.i,u.i,u.a]))).a)return l.b;if(Mb(n,l,n.a,n.a.a),h=Yf(kx(e,nq),7),(f=Um(Sx(Io(pj,1),KM,10,0,[h.f.i,h.i,h.a]))).a<=t)return f.b;for(Mb(n,f,n.c.b,n.c),a=Yf(Tb(c=Tk(n,0)),10),s=Yf(Tb(c),10);s.a=2)for(Ip(e.a),r=0,f=Tk(n,0);f.b!=f.d.c;)h=Yf(Tb(f),10),0==r?(t=Ih(Ih(new Qa(h.a,h.b),e.c.i),e.c.f.i),e.c.a.a=t.a,e.c.a.b=t.b):r==n.b-1?(t=Ih(Ih(new Qa(h.a,h.b),e.d.i),e.d.f.i),e.d.a.a=t.a,e.d.a.b=t.b):Of(e.a,h),++r;if(l)for(c=Tk(e.a,0);c.b!=c.d.c;)s=Yf(Tb(c),10),a.a=Go(a.a,s.a),a.b=Go(a.b,s.b);for(o=new Zn(e.b);o.a0&&Ky(a,RU,(zd(),zd(),OX)),(s=Yf(kx(a,(JI(),FR)),28))==(b_(),CG)||s!=EG&&r.ib((KO(),oU)),no(ro(Sh(kx(a,fR))))&&r.ib((KO(),eU)),no(ro(Sh(kx(a,ER))))&&(r.ib((KO(),iU)),r.ib(rU),Ky(a,FR,EG)),a}function VL(e,t){t.V()&&Sf(e.n,!0,!0,!0,!0),t.t((wI(),GG))&&Sf(e.n,!0,!0,!0,!1),t.t(MG)&&Sf(e.n,!1,!0,!0,!0),t.t(qG)&&Sf(e.n,!0,!0,!1,!0),t.t(WG)&&Sf(e.n,!0,!1,!0,!0),t.t(BG)&&Sf(e.n,!1,!0,!0,!1),t.t(PG)&&Sf(e.n,!1,!0,!1,!0),t.t(XG)&&Sf(e.n,!0,!1,!1,!0),t.t(UG)&&Sf(e.n,!0,!1,!0,!1),t.t(zG)&&Sf(e.n,!0,!0,!0,!0),t.t(jG)&&Sf(e.n,!0,!0,!0,!0),t.t(zG)&&Sf(e.n,!0,!0,!0,!0),t.t(DG)&&Sf(e.n,!0,!0,!0,!0),t.t(VG)&&Sf(e.n,!0,!0,!0,!0),t.t(YG)&&Sf(e.n,!0,!0,!0,!0),t.t(FG)&&Sf(e.n,!0,!0,!0,!0)}function UL(e,t){var n,r,i,o,a,s,c,u,l;for(s=!0,i=0,c=e.f[t.k],u=t.j.b+e.n,n=e.c[t.k][2],Kb(e.a,c,WE(Yf(dd(e.a,c),24).a-1+n)),Kb(e.b,c,ro(Oh(dd(e.b,c)))-u+n*e.e),++c>=e.i?(++e.i,Tf(e.a,WE(1)),Tf(e.b,u)):(r=e.c[t.k][1],Kb(e.a,c,WE(Yf(dd(e.a,c),24).a+1-r)),Kb(e.b,c,ro(Oh(dd(e.b,c)))+u-r*e.e)),(e.q==(nO(),eY)&&(Yf(dd(e.a,c),24).a>e.j||Yf(dd(e.a,c-1),24).a>e.j)||e.q==rY&&(ro(Oh(dd(e.b,c)))>e.k||ro(Oh(dd(e.b,c-1)))>e.k))&&(s=!1),o=Lg(qE(t));eC(o);)a=Yf(_v(o),12).c.f,e.f[a.k]==c&&(i+=Yf((l=UL(e,a)).a,24).a,s=s&&no(ro(Sh(l.b))));return e.f[t.k]=c,new Ja(WE(i+=e.c[t.k][0]),(zd(),s?OX:SX))}function qL(e,t,n){var r,i,o,a,s,c,u,l,h,f,d,g,p,v,b;if(f=new Xc(e.j),b=t.a/f.a,s=t.b/f.b,p=t.a-f.a,o=t.b-f.b,n)for(i=Wc(kx(e,(JI(),FR)))===Wc((b_(),wG)),g=new Zn(e.f);g.a=1&&(v-a>0&&h>=0?(c.i.a+=p,c.i.b+=o*a):v-a<0&&l>=0&&(c.i.a+=p*v,c.i.b+=o));e.j.a=t.a,e.j.b=t.b,Ky(e,(JI(),$R),(IC(),new Wf(r=Yf(na(lB),11),Yf(Sg(r,r.length),11),0)))}function XL(e){var t,n,r,i,o,a,s,c,u,l;for(r=new Pt,a=new Zn(e.e.a);a.a-1){for(r=Tk(a,0);r.b!=r.d.c;)(n=Yf(Tb(r),77)).n=o;for(;0!=a.b;)for(t=new Zn((n=Yf(r_(a,0),77)).d);t.a0),o.a.sb(o.c=--o.b),Jh(o,n),kg(c,n),LS(n,s.g),Jv(c),Jv(c),r.a.eb(n)}}function JL(e){var t,n,r,i,o,a,s,c;for(t=null,r=new Zn(e);r.a0&&0==n.c&&(!t&&(t=new Pt),t.c[t.c.length]=n);if(t)for(;0!=t.c.length;){if((n=Yf(yy(t,0),102)).b&&n.b.c.length>0)for(!n.b&&(n.b=new Pt),o=new Zn(n.b);o.aQy(e,n,0))return new Ja(i,n)}else if(ro(sl(i.g,i.d[0]).a)>ro(sl(n.g,n.d[0]).a))return new Ja(i,n);for(s=(!n.e&&(n.e=new Pt),n.e).mb();s.G();)!(a=Yf(s.H(),102)).b&&(a.b=new Pt),xy(0,(c=a.b).c.length),Nc(c.c,0,n),a.c==c.c.length&&(t.c[t.c.length]=a)}return null}function eI(e,t){var n,r,i,o,a,s,c,u,l;if(1!=Qg(XE(t))||Yf(zv(XE(t)),12).d.f.g!=(j_(),RH))return null;for(lr(n=(o=Yf(zv(XE(t)),12)).d.f,(j_(),PH)),Ky(n,(ZI(),tq),null),Ky(n,nq,null),Ky(n,(JI(),FR),Yf(kx(t,FR),28)),Ky(n,IR,Yf(kx(t,IR),86)),i=kx(o.c,oq),a=null,u=wN(n,(wI(),IG)).mb();u.G();)if(0!=(s=Yf(u.H(),7)).e.c.length){Ky(s,oq,i),l=o.c,s.j.a=l.j.a,s.j.b=l.j.b,s.a.a=l.a.a,s.a.b=l.a.b,ox(s.c,l.c),l.c.c=_y(_D,GA,1,0,4,1),a=s;break}if(Ky(o.c,oq,null),!ab(wN(t,IG)))for(c=new Zn(Wb(wN(t,IG)));c.a0?i+e.i[1]*t+e.n[1]:0,e.o[3]>0?i+e.i[3]*t+e.n[3]:0),Go(e.o[4]>0?n+e.i[4]*t+e.n[4]:0,e.o[2]>0?n+e.i[2]*t+e.n[2]:0))}(e,e.k);break;case 4:r=new Xc(a);break;case 5:r=function(e,t){var n,r,i,o,a;for(a=new so,o=new Zn(f_(e));o.a0&&(o.a=Go(o.a,i+e.q.b+e.q.c)),n>0&&(o.b=Go(o.b,n+e.q.d+e.q.a))):(i>0&&(o.a=Go(o.a,i)),n>0&&(o.b=Go(o.b,n)))),function(e,t){e.e.j.a=t.a,e.e.j.b=t.b}(e.e,o)}}function nI(e,t,n){var r,i,o,a,s,c,u,l,h,f,d;if(!e.b)return!1;for(a=null,f=null,i=1,(c=new Uy(null,null)).a[1]=e.b,h=c;h.a[i];)u=i,s=f,f=h,h=h.a[i],i=(r=e.a.$b(t,h.d))<0?0:1,0==r&&(!n.c||Np(h.e,n.d))&&(a=h),h&&h.b||Vo(h.a[i])||(Vo(h.a[1-i])?f=f.a[u]=mm(h,i):Vo(h.a[1-i])||(d=f.a[1-u])&&(Vo(d.a[1-u])||Vo(d.a[u])?(o=s.a[1]==f?1:0,Vo(d.a[u])?s.a[o]=eb(f,u):Vo(d.a[1-u])&&(s.a[o]=mm(f,u)),h.b=s.a[o].b=!0,s.a[o].a[0].b=!1,s.a[o].a[1].b=!1):(f.b=!1,d.b=!0,h.b=!0)));return a&&(n.b=!0,n.d=a.e,h!=a&&(function(e,t,n,r){var i,o;for(i=null==(o=t).d||e.a.$b(n.d,o.d)>0?1:0;o.a[i]!=n;)o=o.a[i],i=e.a.$b(n.d,o.d)>0?1:0;o.a[i]=r,r.b=n.b,r.a[0]=n.a[0],r.a[1]=n.a[1],n.a[0]=null,n.a[1]=null}(e,c,a,l=new Uy(h.d,h.e)),f==a&&(f=l)),f.a[f.a[1]==h?1:0]=h.a[h.a[0]?0:1],--e.c),e.b=c.a[1],e.b&&(e.b.b=!1),n.b}function rI(e){var t,n,r,i,o,a,s,c,u,l,h,f,d,g;for(f=new Zn(e);f.a(b=r?Yf(kx(l,sz),24).a:kA)?c:b,w=new Zn(l.f);w.a=u&&x>=v&&(f+=g.i.b+p.i.b+p.a.b-m,++s));if(n)for(a=new Zn(y.b);a.a=u&&x>=v&&(f+=g.i.b+p.i.b+p.a.b-m,++s))}s>0&&(E+=f/s,++d)}d>0?(t.a=i*E/d,t.i=d):(t.a=0,t.i=0)}function sI(e,t){var n;if(e.e)throw new Eo((Rh(vH),"The "+vH.j+vP));if(!function(e,t){return Ul(e.c,t)}(e.a,t))throw new Ni("The direction "+t+" is not supported by the CGraph instance.");if(t==e.d)return e;switch(n=e.d,e.d=t,n.e){case 0:switch(t.e){case 2:yx(e);break;case 1:nk(e),yx(e);break;case 4:F_(e),yx(e);break;case 3:F_(e),nk(e),yx(e)}break;case 2:switch(t.e){case 1:nk(e),uT(e);break;case 4:F_(e),yx(e);break;case 3:F_(e),nk(e),yx(e)}break;case 1:switch(t.e){case 2:nk(e),uT(e);break;case 4:nk(e),F_(e),yx(e);break;case 3:nk(e),F_(e),nk(e),yx(e)}break;case 4:switch(t.e){case 2:F_(e),yx(e);break;case 1:F_(e),nk(e),yx(e);break;case 3:nk(e),uT(e)}break;case 3:switch(t.e){case 2:nk(e),F_(e),yx(e);break;case 1:nk(e),F_(e),nk(e),yx(e);break;case 4:nk(e),uT(e)}}return e}function cI(e,t,n){var r,i,o,a,s,c,u,l;if(!e.a[t.d.k][t.k].e){for(e.a[t.d.k][t.k].e=!0,e.a[t.d.k][t.k].b=0,e.a[t.d.k][t.k].d=0,e.a[t.d.k][t.k].a=null,l=new Zn(t.f);l.a0&&(e.a[t.d.k][t.k].d+=IS(e.e,24)*KP*.07000000029802322-.03500000014901161,e.a[t.d.k][t.k].a=e.a[t.d.k][t.k].d/e.a[t.d.k][t.k].b)}}function uI(e,t){var n,r,i,o,a,s,c,u,l,h;for(r=new Zn(e.a.c);r.adP||t.k==xz&&uv?u:v}for(n.e.b+=u-s.b,h=new Zn(e.a);h.a1;)t=Fo(i,e.c),lr(l=new _k(e.e.c),(j_(),PH)),Ky(l,(JI(),FR),Yf(kx(c,FR),28)),Ky(l,IR,Yf(kx(c,IR),86)),l.k=e.e.b++,Tf(e.b,l),l.j.b=c.j.b,l.j.a=t,Gh(h=new __,(wI(),IG)),av(h,c),h.i.a=l.j.a,h.i.b=l.j.b/2,Gh(f=new __,KG),av(f,l),f.i.b=l.j.b/2,f.i.a=-f.j.a,uv(d=new Dp,h),cv(d,f),c=l,Tf(e.e.c.b,c),--u,i-=e.c+e.e.d;for(new y_(e.d,e.b,e.c),a=new Zn(r);a.at.a||t.p>e.a)){for(n=0,r=0,s=new zn(new Yn(e.o.a).a.bb().mb());s.a.G();)i=Yf(s.a.H(),21),o=Yf(i.yb(),7),cC(Um(Sx(Io(pj,1),KM,10,0,[o.f.i,o.i,o.a])).b,t.p,t.a)&&++n;for(c=new zn(new Yn(e.g.a).a.bb().mb());c.a.G();)i=Yf(c.a.H(),21),o=Yf(i.yb(),7),cC(Um(Sx(Io(pj,1),KM,10,0,[o.f.i,o.i,o.a])).b,t.p,t.a)&&--n;for(u=new zn(new Yn(t.o.a).a.bb().mb());u.a.G();)i=Yf(u.a.H(),21),o=Yf(i.yb(),7),cC(Um(Sx(Io(pj,1),KM,10,0,[o.f.i,o.i,o.a])).b,e.p,e.a)&&++r;for(a=new zn(new Yn(t.g.a).a.bb().mb());a.a.G();)i=Yf(a.a.H(),21),o=Yf(i.yb(),7),cC(Um(Sx(Io(pj,1),KM,10,0,[o.f.i,o.i,o.a])).b,e.p,e.a)&&--r;n1)for(c=Tk(Hf(wN(t,KG)),0);c.b!=c.d.c;)0==(s=Yf(Tb(c),7)).b.c.length?(Gh(i=new __,KG),i.j.a=s.j.a,i.j.b=s.j.b,av(i,r),Ky(i,oq,kx(s,oq)),av(s,null)):av(a,r);return Ky(t,oq,null),Ky(t,AU,SX),lr(t,PH),Ky(r,(JI(),FR),Yf(kx(t,FR),28)),Ky(r,IR,Yf(kx(t,IR),86)),Ld(e.b,0,r),r}function bI(e,t,n,r,i,o,a){var s,c,u,l,h,f;switch(h=n,lr(u=new _k(a),(j_(),DH)),Ky(u,(ZI(),XU),i),Ky(u,(JI(),FR),(b_(),wG)),Ky(u,iq,Yf(kx(e,MR),15)),!(c=Yf(kx(e,HR),10))&&(c=new Qa(i.a/2,i.b/2)),Ky(u,HR,c),av(l=new __,u),t!=EG&&t!=CG||(s=o!=(CE(),Lj)?o:Tj,h=r>0?hC(s):vE(hC(s)),Ky(e,VR,h)),h.e){case 4:Ky(u,($I(),eX),(qk(),Tq)),Ky(u,YU,(Dx(),jV)),u.j.b=i.b,Gh(l,(wI(),IG)),l.i.b=c.b;break;case 2:Ky(u,($I(),eX),(qk(),Iq)),Ky(u,YU,(Dx(),PV)),u.j.b=i.b,Gh(l,(wI(),KG)),l.i.b=c.b;break;case 1:Ky(u,KU,(Rw(),EU)),u.j.a=i.a,Gh(l,(wI(),ZG)),l.i.a=c.a;break;case 3:Ky(u,KU,(Rw(),mU)),u.j.a=i.a,Gh(l,(wI(),AG)),l.i.a=c.a}if(t==yG||t==mG||t==wG){switch(f=0,h.e){case 4:case 2:case 1:case 3:f=null.cd,t==mG&&(f/=null.cd)}Ky(u,dq,f)}return Ky(u,qU,h),u}function yI(e){var t,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w;for(u=new Gr,ml(),yp(b=new Er,e,V_(e)),Nw(2,dM),r=new cw(2),e.c&&Tf(r,e.c),e.d&&Tf(r,e.d),d=new Zn(r);d.a1&&Mb(u,g,u.c.b,u.c),Mw(n)));g=p}return u}function wI(){var e;wI=r,$G=new vs(GM,0),AG=new vs("NORTH",1),IG=new vs("EAST",2),ZG=new vs("SOUTH",3),KG=new vs("WEST",4),Fp(),RG=new Zo(new Wf(e=Yf(na(iB),11),Yf(Sg(e,e.length),11),0)),GG=GE(Qd(AG,Sx(Io(iB,1),HA,32,0,[]))),MG=GE(Qd(IG,Sx(Io(iB,1),HA,32,0,[]))),qG=GE(Qd(ZG,Sx(Io(iB,1),HA,32,0,[]))),WG=GE(Qd(KG,Sx(Io(iB,1),HA,32,0,[]))),zG=GE(Qd(AG,Sx(Io(iB,1),HA,32,0,[ZG]))),jG=GE(Qd(IG,Sx(Io(iB,1),HA,32,0,[KG]))),UG=GE(Qd(AG,Sx(Io(iB,1),HA,32,0,[KG]))),BG=GE(Qd(AG,Sx(Io(iB,1),HA,32,0,[IG]))),XG=GE(Qd(ZG,Sx(Io(iB,1),HA,32,0,[KG]))),PG=GE(Qd(IG,Sx(Io(iB,1),HA,32,0,[ZG]))),YG=GE(Qd(AG,Sx(Io(iB,1),HA,32,0,[IG,KG]))),DG=GE(Qd(IG,Sx(Io(iB,1),HA,32,0,[ZG,KG]))),VG=GE(Qd(AG,Sx(Io(iB,1),HA,32,0,[ZG,KG]))),HG=GE(Qd(AG,Sx(Io(iB,1),HA,32,0,[IG,ZG]))),FG=GE(Qd(AG,Sx(Io(iB,1),HA,32,0,[IG,ZG,KG])))}function mI(e,t,n){var r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m;if(Ky(l=new Bw,qB,t),yp(e.e,t,l),Ky(l,(ZI(),lq),n),e.d&&fN(e.d,l,!1),C_(t,l),rP in t.a&&(v=l.a,b=Yf(Sp(t,rP),69),(p=Yf(Sp(b,"left"),104))&&(v.b=p.a),(w=Yf(Sp(b,"top"),104))&&(v.d=w.a),(y=Yf(Sp(b,"right"),104))&&(v.c=y.a),(i=Yf(Sp(b,qM),104))&&(v.a=i.a)),h=new Wf(r=Yf(na(yU),11),Yf(Sg(r,r.length),11),0),Ky(l,WU,h),null==e.g&&(e.g=Sh(kx(l,(Vp(),rH)))),iP in t.a){if(!(m=Sp(t,iP)).hc())throw new wg("The 'children' property of nodes must be an array.",m,t);if((u=m.hc()).a.length>0){for(n&&Ky(n,rq,l),s=_y(HH,oP,9,u.a.length,0,1),d=0;d1)for(Tf(o,new ML(d,y,n)),h=new zn(new Yn(y.a).a.bb().mb());h.a.G();)u=Yf(h.a.H(),21),Gy(i,Yf(u.yb(),27).b);if(a.a.Y()>1)for(Tf(o,new ML(d,a,n)),h=new zn(new Yn(a.a).a.bb().mb());h.a.G();)u=Yf(h.a.H(),21),Gy(i,Yf(u.yb(),27).b)}}function kI(e,t){var n,r,i,o,a,s,c,u,l;switch(xb(o=Wb(Vf(t,new Kf(e))),new Qe),(i=e.b).c){case 2:_g(t,new UN(r=function(e,t,n,r){var i,o,a,s,c;for(c=0,o=new Zn(e.a.b);o.a.5&&i<50;)t=_a(X_(n,r=hO(n),!0).a),++i;return X_(e,(Gd(o=Oh(sk(Hf(e.g),Hf(e.g).b-1))),o-r),!1)}(h);break;case 2:case 4:h.a=w,y=function(e){var t,n,r,i,o;for(n=ET(vL(e)),t=RP,i=0,r=0;t>.5&&i<50;)t=_a(X_(n,r=fO(n),!0).b),++i;return X_(e,(Gd(o=Oh(sk(Hf(e.g),Hf(e.g).b-1))),o-r),!1)}(h);break;default:return null}return hr(h,new MN(Sx(Io(pj,1),KM,10,0,[c,w,y,g,v]))),h}(e.a.c,t,e.a.d,r,Mk(e.b),n),pm(e.a.a,jC(s)),a=sN(e.a.b,s.a,e.b),Qp(i=new Db((!s.k&&(s.k=new yN(vm(s))),s.k))),a?Xg(i,a):i}(e,a=um(n=Pu(Vf(o,new En(i.a))))?Yf(Ny(n),91).b:15,um(n=Pu(Vf(o,new En(Mk(i)))))?Yf(Ny(n),91).b:15,um(n=Pu(Vf(o,new En(i.b))))?Yf(Ny(n),91).b:15),e.c,e.e,e.a.c.f,i.a)),_g(t,new UN(r,e.c,e.e,e.a.c.f,Mk(i))),_g(t,new UN(r,e.c,e.e,e.a.c.f,i.b));break;case 1:_g(t,new UN(r=function(e,t,n){var r,i,o,a,s,c;for(c=e.b,o=0,i=new Zn(e.a.b);i.a0)if(r=l.Y(),c=yv(Math.floor((r+1)/2))-1,i=yv(Math.ceil((r+1)/2))-1,t.k==Ez)for(u=i;u>=c;u--)t.a[w.k]==w&&(g=Yf(l.sb(u),27),d=Yf(g.a,9),!Ea(n,g.b)&&f>e.b.e[d.k]&&(t.a[d.k]=w,t.f[w.k]=t.f[d.k],t.a[w.k]=t.f[w.k],f=e.b.e[d.k]));else for(u=c;u<=i;u++)t.a[w.k]==w&&(v=Yf(l.sb(u),27),p=Yf(v.a,9),!Ea(n,v.b)&&f0||n.k==Ez&&iv?d:v):n.n[t.k]=r>(d>v?d:v)?r:d>v?d:v)):(p=e.d.f,g=ym(e,n.i[t.k]),f=ym(e,n.i[h.k]),n.k==Ez?Uv(g,f,ro(n.n[t.k])+ro(n.d[a.k])+a.j.b+a.e.a+p-(ro(n.n[h.k])+ro(n.d[u.k])-u.e.d)):Uv(g,f,ro(n.n[t.k])+ro(n.d[a.k])-a.e.d-ro(n.n[h.k])-ro(n.d[u.k])-u.j.b-u.e.a-p))):v=e.e.Ic(v,t,a),a=n.a[a.k]}while(a!=t);!function(e,t){_g(e.b,t)}(e.e,t)}}function II(e,t,n,r){var i,o,a,s,c,u,l,h,f,d,g,p,v,b;if(f=!1,h=!1,zs(Yf(kx(r,(JI(),FR)),28))){a=!1,s=!1;e:for(g=new Zn(r.f);g.a=r.j.b/2}b?(v=Yf(kx(r,(ZI(),Sq)),20))?f?o=v:(i=Yf(kx(r,DU),20))?o=v.Y()<=i.Y()?v:i:(o=new Pt,Ky(r,DU,o)):(o=new Pt,Ky(r,Sq,o)):(i=Yf(kx(r,(ZI(),DU)),20))?h?o=i:(v=Yf(kx(r,Sq),20))?o=i.Y()<=v.Y()?i:v:(o=new Pt,Ky(r,Sq,o)):(o=new Pt,Ky(r,DU,o)),o.ib(e),Ky(e,(ZI(),jU),n),t.d==n?(cv(t,null),n.b.c.length+n.e.c.length==0&&av(n,null)):(uv(t,null),n.b.c.length+n.e.c.length==0&&av(n,null)),Ip(t.a)}function AI(e,t){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y;for((n=new kk(t)).a||function(e){var t,n,r,i,o;switch(i=Yf(dd(e.b,0),9),t=new _k(e),Tf(e.b,t),t.j.a=Go(1,i.j.a),t.j.b=Go(1,i.j.b),t.i.a=i.i.a,t.i.b=i.i.b,Yf(kx(i,(ZI(),qU)),32).e){case 4:t.i.a+=2;break;case 1:t.i.b+=2;break;case 2:t.i.a-=2;break;case 3:t.i.b-=2}av(r=new __,t),uv(n=new Dp,o=Yf(dd(i.f,0),7)),cv(n,r),Lh(Tc(r.i),o.i),Lh(Tc(r.a),o.a)}(t),u=function(e){var t,n,r,i,o,a,s;for(s=new Nb,a=new Zn(e.b);a.a=s.b.c)&&(s.b=t),(!s.c||t.c<=s.c.c)&&(s.d=s.c,s.c=t),(!s.e||t.d>=s.e.d)&&(s.e=t),(!s.f||t.d<=s.f.d)&&(s.f=t);return r=new hk((Rm(),yH)),Ib(e,NH,new $n(Sx(Io(bH,1),GA,160,0,[r]))),a=new hk(xH),Ib(e,_H,new $n(Sx(Io(bH,1),GA,160,0,[a]))),i=new hk(wH),Ib(e,kH,new $n(Sx(Io(bH,1),GA,160,0,[i]))),o=new hk(mH),Ib(e,CH,new $n(Sx(Io(bH,1),GA,160,0,[o]))),cO(r.c,yH),cO(i.c,wH),cO(o.c,mH),cO(a.c,xH),s.a.c=_y(_D,GA,1,0,4,1),ox(s.a,r.c),ox(s.a,Tm(i.c)),ox(s.a,o.c),ox(s.a,Tm(a.c)),s}(u)),n}function MI(e,t){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,C,k,_,N;return h=function(e,t){var n,r,i,o,a,s,c,u,l,h,f;if(e.V())return new so;for(c=0,l=0,r=e.mb();r.G();)c=Go(c,(i=Yf(r.H(),55).e).a),l+=i.a*i.b;for(c=Go(c,Math.sqrt(l)*Yf(kx(Yf(e.mb().H(),55),(ZI(),OU)),15).a),h=0,f=0,s=0,n=t,a=e.mb();a.G();)h+(u=(o=Yf(a.H(),55)).e).a>c&&(h=0,f+=s+t,s=0),iT(o,h,f),n=Go(n,h+u.a),s=Go(s,u.b),h+=u.a+t;return new Qa(n+t,f+s+t)}(ll(e,(wI(),RG)),t),g=Lk(ll(e,GG),t),m=Lk(ll(e,qG),t),k=Ik(ll(e,WG),t),f=Ik(ll(e,MG),t),y=Lk(ll(e,UG),t),p=Lk(ll(e,BG),t),E=Lk(ll(e,XG),t),x=Lk(ll(e,PG),t),_=Ik(ll(e,jG),t),b=Lk(ll(e,zG),t),w=Lk(ll(e,YG),t),C=Lk(ll(e,DG),t),N=Ik(ll(e,VG),t),d=Ik(ll(e,HG),t),v=Lk(ll(e,FG),t),n=xw(Sx(Io(sW,1),SA,26,12,[y.a,k.a,E.a,N.a])),r=xw(Sx(Io(sW,1),SA,26,12,[g.a,h.a,m.a,v.a])),i=b.a,o=xw(Sx(Io(sW,1),SA,26,12,[p.a,f.a,x.a,d.a])),u=xw(Sx(Io(sW,1),SA,26,12,[y.b,g.b,p.b,w.b])),c=xw(Sx(Io(sW,1),SA,26,12,[k.b,h.b,f.b,v.b])),l=_.b,s=xw(Sx(Io(sW,1),SA,26,12,[E.b,m.b,x.b,C.b])),vy(ll(e,RG),n+i,u+l),vy(ll(e,FG),n+i,u+l),vy(ll(e,GG),n+i,0),vy(ll(e,qG),n+i,u+l+c),vy(ll(e,WG),0,u+l),vy(ll(e,MG),n+i+r,u+l),vy(ll(e,BG),n+i+r,0),vy(ll(e,XG),0,u+l+c),vy(ll(e,PG),n+i+r,u+l+c),vy(ll(e,jG),0,u),vy(ll(e,zG),n,0),vy(ll(e,DG),0,u+l+c),vy(ll(e,HG),n+i+r,0),(a=new so).a=xw(Sx(Io(sW,1),SA,26,12,[n+r+i+o,_.a,w.a,C.a])),a.b=xw(Sx(Io(sW,1),SA,26,12,[u+c+l+s,b.b,N.b,d.b])),a}function PI(e,t){var n,r,i,o,a,s,c,u,l,h,f,d,g,p;if(r=new Gr,u=null,(d=(g=e.c).f.g)!=(j_(),GH)&&d!=BH)throw new oo("The target node of the edge must be a normal node or a northSouthPort.");for(d==BH&&(f=Yf(kx(g,(ZI(),oq)),7),u=new Qa(Um(Sx(Io(pj,1),KM,10,0,[f.f.i,f.i,f.a])).a,Um(Sx(Io(pj,1),KM,10,0,[g.f.i,g.i,g.a])).b),g=f),as(r,Um(Sx(Io(pj,1),KM,10,0,[g.f.i,g.i,g.a]))),a=Go(5,OC(g.f,g.g)),(h=new yg(t_(g.g))).a*=a,h.b*=a,Of(r,Lh(h,Um(Sx(Io(pj,1),KM,10,0,[g.f.i,g.i,g.a])))),u&&Mb(r,u,r.c.b,r.c),o=e,c=e,s=null,n=!1;o;)0!=(i=o.a).b&&(n?(Of(r,il(Lh(s,(Tu(0!=i.b),Yf(i.a.a.c,10))),.5)),n=!1):n=!0,s=yu((Tu(0!=i.b),Yf(i.c.b.c,10))),pm(r,i),Ip(i)),c=o,o=Yf(Zc(gv(t.d,o)),12);(p=c.d).f.g==BH&&(f=Yf(kx(p,(ZI(),oq)),7),Of(r,new Qa(Um(Sx(Io(pj,1),KM,10,0,[f.f.i,f.i,f.a])).a,Um(Sx(Io(pj,1),KM,10,0,[p.f.i,p.i,p.a])).b)),p=f),a=Go(5,OC(p.f,p.g)),il(h=new yg(t_(p.g)),a),Of(r,Lh(h,Um(Sx(Io(pj,1),KM,10,0,[p.f.i,p.i,p.a])))),as(r,Um(Sx(Io(pj,1),KM,10,0,[p.f.i,p.i,p.a]))),l=new JT(r),pm(e.a,jC(l))}function DI(e){var t,n,r,i,o,a,s,c,u,l,h,d,g,p;if(Wc(kx(e.c,(JI(),FR)))===Wc((b_(),mG))||Wc(kx(e.c,FR))===Wc(wG))for(l=new Zn(e.c.f);l.a1&&(a=Fo(a,_a(Yf(sk(s.a,1),10).b-l.b)))));else for(g=new Zn(t.f);g.ai&&(o=f.a-i,a=yA,r.c=_y(_D,GA,1,0,4,1),i=f.a),f.a>=i&&(r.c[r.c.length]=s,s.a.b>1&&(a=Fo(a,_a(Yf(sk(s.a,s.a.b-2),10).b-f.b)))));if(0!=r.c.length&&o>t.j.a/2&&a>t.j.b/2){for(av(d=new __,t),Gh(d,(wI(),AG)),d.i.a=t.j.a/2,av(p=new __,t),Gh(p,ZG),p.i.a=t.j.a/2,p.i.b=t.j.b,c=new Zn(r);c.a=u.b?uv(s,p):uv(s,d)):(u=Yf(wf(s.a),10),(0==s.a.b?Rv(s.c):Yf(Gl(s.a),10)).b>=u.b?cv(s,p):cv(s,d)),(h=Yf(kx(s,(JI(),kR)),44))&&mC(h,u,!0);t.i.a=i-t.j.a/2}}function RI(e,t){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w;for(b=new Pt,y=new Pt,w=new Pt,o=new Zn(t);o.a50?b.c[b.c.length]=i:i.k>0?y.c[y.c.length]=i:w.c[w.c.length]=i;if(1==y.c.length&&0==b.c.length&&(ox(b,y),y.c=_y(_D,GA,1,0,4,1)),0!=b.c.length&&Ul(ou(e.a),(NI(),Zz))&&Ul(ou(e.a),(NI(),Kz))?function(e,t){var n,r,i;for(r=new Zn(t);r.a1&&(dN(i,p=Yf(Sw(c),60),!0),lg(l),rv(e.a,p))}for(f=w.c.length,r=function(e){var t,n,r,i;switch(au(e.a).c){case 4:return NI(),Kz;case 3:return Yf(function(e){var t;return NI(),NI(),t=Vz,e.d&&HN(e),function(){throw new Zr}(),t}(e.a).mb().H(),60);case 2:return t=Yf(Qb(n=new Vs(r=au(e.a))),60),i=Yf(Qb(n),60),pO(t)==i?Ul(r,(NI(),Kz))?Uz:Kz:gO(gO(t))==i?gO(t):vO(t);case 1:return pO(Yf(Qb(new Vs(r=au(e.a))),60));case 0:return NI(),Qz;default:return null}}(e),d=new Pt,a=f/iu(e.a).c|0,s=0;s3&&(ox(d,(NI(),NI(),zz)),g-=4),g){case 3:Tf(d,pO(r));case 2:v=gO(pO(r));do{v=gO(v)}while(!Ul(ou(e.a),v));d.c[d.c.length]=v,v=vO(pO(r));do{v=vO(v)}while(!Ul(ou(e.a),v));d.c[d.c.length]=v;break;case 1:Tf(d,pO(r))}for(h=new Zn(d),u=new Zn(w);h.ayM)&&s<10);fo(e.c,new T),RL(e),function(e){sI(e,(CE(),Oj)),e.e=!0}(e.c),function(e){var t,n,r,i,o,a,s;for(i=new Zn(e.a.b);i.a0,v=w.e.c.length>0,u&&v?f.c[f.c.length]=w:u?g.c[g.c.length]=w:v&&(y.c[y.c.length]=w);for(d=new Zn(g);d.a=p&&(w>p&&(g.c=_y(_D,GA,1,0,4,1),p=w),g.c[g.c.length]=a);0!=g.c.length&&(d=Yf(dd(g,Zk(t,g.c.length)),77),O.a.eb(d),d.i=v++,aO(d,N,C),g.c=_y(_D,GA,1,0,4,1))}for(x=e.c.length+1,s=new Zn(e);s.aS.i&&(sp(n),Gy(S.d,r),r.c>0&&(r.a=S,Tf(S.j,r),r.b=k,Tf(k.d,r)))}function YI(e){switch(e.e){case 14:return new W;case 37:return new $;case 8:return new Zi;case 30:return new $i;case 38:return new Q;case 3:return new J;case 47:case 1:return new pn((Px(),KH));case 4:return new ee;case 49:return new te;case 23:return new et;case 13:return new ne;case 34:return new ie;case 40:return new oe;case 35:return new ce;case 44:return new Yu;case 28:return new ue;case 39:return new le;case 27:return new he;case 6:return new fe;case 31:return new ve;case 9:return new Ct;case 43:return new ye;case 17:return new we;case 18:return new Ee;case 29:return new kt;case 11:return new Le;case 12:return new ke;case 36:return new _e;case 46:case 0:return new pn((Px(),$H));case 41:return new Se;case 15:return new Oe;case 33:return new Te;case 42:return new Ae;case 22:return new Me;case 19:return new pe;case 10:return new Ne;case 7:return new De;case 24:return new je;case 21:return new Re;case 16:return new Be;case 45:return new He;case 26:return new Fe;case 20:return new Ye;case 25:return new ze;case 5:return new $e;case 32:return new Ke;case 48:case 2:return new pn((Px(),ZH));default:throw new oo("No implementation is available for the layout processor "+(null!=e.d?e.d:""+e.e))}}function zI(e,t,n){var r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,C,k,_,N,S,O,T;for(S=0,o=0,l=t[0].d,C=n[0].d,d=0,p=n.length;d0;){for(Tu(E.b>0),x=0,i=new Zn((w=Yf(E.a.sb(E.c=--E.b),7)).b);i.a0&&(w.g==(wI(),AG)?(e.a[w.k]=S,++S):(e.a[w.k]=S+b+y,++y),o+=x)}S+=y}else{for(v=0,m=new Zn(h.f);m.a0&&(++S,o+=v)}for(k=_y(iW,vM,26,o,12,1),s=0,f=0,g=t.length;f0;)c%2>0&&(r+=O[c+1]),++O[c=(c-1)/2|0];return r}function VI(e,t){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,C,k,_,N,S,O,T,L;for(FC(t,"Compound graph postprocessor",1),n=no(ro(Sh(kx(e,($I(),Bq))))),s=Yf(kx(e,(ZI(),HU)),144),h=new Ki,E=s.W().mb();E.G();){for(x=Yf(E.H(),12),xb(a=new hf(s.U(x)),new an(e)),N=cm((Ey(0,a.c.length),Yf(a.c[0],114))),O=sm(Yf(dd(a,a.c.length-1),114)),Ip(x.a),k=N.f,C=jE(O.f,k)?Yf(kx(k,rq),55):Zg(k),g=Yf(kx(x,(JI(),kR)),44),Nd(a,LH)?g?Ip(g):(g=new Gr,Ky(x,kR,g)):g&&Ky(x,kR,null),v=null,o=new Zn(a);o.aCP,L=_a(v.b-w.b)>CP,(!n&&T&&L||n&&(T||L))&&Of(x.a,_)),pm(x.a,r),0==r.b?v=_:(Tu(0!=r.b),v=Yf(r.c.b.c,10)),(y=Yf(kx(b,kR),44))&&(Yx(d=new Gr,0,y),Pm(d,m),pm(g,d)),sm(i)==O&&(Zg(O.f)!=i.a&&AS(m=new so,Zg(O.f),C),Ky(x,Nq,m)),p=new $v(b.b,0);p.b1){x=_y(PX,hA,15,e.a.length,0,1),u=Ol(e.a.length),g=0,d=0,n=2*t.d.a.c.length+1;e:for(m=new Zn(t.f);m.a0?(x[w.k]=new Bn(N/(w.b.c.length+w.e.c.length)),g=Yo(g,x[w.k].a),d=Bo(d,x[w.k].a)):v&&(x[w.k]=new Bn(N))}for(p=(t.d?Qy(t.d.a,t,0):-1)+1,f=t.d.a.c.length+1,c=new Zn(u);c.an&&p.a.db(w,p);for(O=new Ki,v=new Ki,x=new zn(new Yn(S.a).a.bb().mb());x.a.G();)for(h=Yf(x.a.H(),21),w=Yf(h.yb(),9),a=1==t?XE(w):qE(w),Uu(),u=new Au(Du(Uf(a.a,new f)));eC(u);)c=Yf(_v(u),12),Lc(w.d)!=Lc(c.d.f.d)&&_g(O,c.d.f);for(E=new zn(new Yn(p.a).a.bb().mb());E.a.G();)for(h=Yf(E.a.H(),21),w=Yf(h.yb(),9),a=1==t?XE(w):qE(w),Uu(),u=new Au(Du(Uf(a.a,new f)));eC(u);)c=Yf(_v(u),12),Lc(w.d)!=Lc(c.d.f.d)&&_g(v,c.d.f);for(QH&&Af(),_=Yf(dd(e.d.c.c,r+(1==t?1:-1)),16),b=kA,y=yA,d=0;d<_.a.c.length;d++)w=Yf(dd(_.a,d),9),O.a.R(w)?b=b>d?b:d:v.a.R(w)&&(y=y1||Qg(gu(new sb(BE(Sx(Io(_D,1),GA,1,4,[y.b,y.e])))))>1)&&i.ib((KO(),rU)),Wc(kx(g,($I(),zq)))===Wc((lb(),qY))&&!(JM in t.a)){n=new Gr;try{for(s=Sp(t,JM).hc(),o=0;o0&&(e.a[B.k]=W++)}else{for(M=0,H=new Zn(N.f);H.a0&&++W}for(J=0,T=0,A=n.length;T0;){for(Tu(z.b>0),Y=0,s=new Zn((B=Yf(z.a.sb(z.c=--z.b),7)).b);s.a0&&(B.g==(wI(),AG)?(e.a[B.k]=J,++J):(e.a[B.k]=J+P+j,++j))}J+=j}else{for(M=0,H=new Zn(N.f);H.a0&&++J}for(ml(),F=new Er,d=new Lu,S=0,L=t.length;Su.b&&(u.b=V)):B.f.d==X&&(Vu.c&&(u.c=V));for(Fk(g,0,g.length,(Js(),Js(),FX)),Q=_y(iW,vM,26,g.length,12,1),r=_y(iW,vM,26,J+1,12,1),v=0;v0;)E%2>0&&(i+=ne[E+1]),++ne[E=(E-1)/2|0];for(k=_y(rz,GA,156,2*g.length,0,1),w=0;w0&&(45==e.charCodeAt(0)||43==e.charCodeAt(0))?1:0;tyA)throw new Wo(CA+e+'"');return i}((oi(),""+n.jc().a))),void Ky(e,f,p)}catch(e){throw hl(e=rE(e),130)?new Fi("Invalid integer format for property '"+t+cP+n+")."):DE(e)}else{if(Yf(WB.a,18).kb(t)){if(!n.ic())throw new Fi(sP+t+cP+n+").");return f=Yf(Yf(WB.b,57).cb(t),79),zd(),void Ky(e,f,p=n.ic().a?OX:SX)}if(Yf(KB.a,18).kb(t)){if(!n.jc())throw new Fi("Invalid float format for property '"+t+cP+n+").");return void Ky(e,f=Yf(Yf(KB.b,57).cb(t),79),p=new Gn(n.jc().a))}if(Yf($B.a,18).kb(t)){if(!n.lc())throw new Fi(uP+t+cP+n+").");u=n.lc().a,l=null;try{cE((JI(),VR),t)?(wI(),l=Yf(gE((fy(),JG),u),32)):cE(sR,t)?(fk(),l=Yf(gE((Ay(),Nj),u),103)):cE(gR,t)?(CE(),l=Yf(gE((hy(),Mj),u),59)):cE(vR,t)?(kE(),l=Yf(gE((zb(),Uj),u),122)):cE(xR,t)?(_E(),l=Yf(gE((wb(),iR),u),166)):cE(DR,t)||cE(jR,t)||cE(RR,t)||cE(GR,t)||cE(BR,t)?(LC(),l=Yf(gE((dy(),bG),u),100)):cE(FR,t)?(b_(),l=Yf(gE((Py(),_G),u),28)):cE(zR,t)?(jw(),l=Yf(gE((yb(),LG),u),149)):cE(bR,t)?(D_(),l=Yf(gE((My(),Jj),u),133)):cE(pR,t)?(Gm(),l=Yf(gE((Yb(),Bj),u),107)):cE(($I(),Vq),t)?(zp(),l=Yf(gE((Gv(),IY),u),193)):cE(iX,t)?(fw(),l=Yf(gE((mb(),GY),u),173)):cE(Xq,t)?(w_(),l=Yf(gE((vw(),VV),u),115)):cE(Hq,t)?(Gw(),l=Yf(gE((qb(),Oz),u),194)):cE(zq,t)?(lb(),l=Yf(gE((Hv(),ZY),u),192)):cE(aX,t)?(nO(),l=Yf(gE((gw(),cY),u),109)):cE(oX,t)?(Uk(),l=Yf(gE((pw(),vz),u),141)):cE(lX,t)?(gN(),l=Yf(gE((Dy(),xY),u),125)):cE(hX,t)?(Sb(),l=Yf(gE((Bv(),dY),u),175)):cE(Kq,t)?(M_(),l=Yf(gE((em(),QV),u),124)):cE(Qq,t)?(_L(),l=Yf(gE((Hm(),wU),u),110)):cE(eX,t)?(qk(),l=Yf(gE((bw(),Pq),u),85)):cE(gX,t)?(MC(),l=Yf(gE((Ly(),xX),u),153)):cE(vX,t)?(Bm(),l=Yf(gE((Iy(),NX),u),172)):cE(Jq,t)&&(cb(),l=Yf(gE((Xb(),SU),u),174))}catch(e){throw hl(e=rE(e),54)?new Fi(uP+t+cP+n+")."):DE(e)}return void Ky(e,f=Yf(Yf($B.b,57).cb(t),79),l)}if(Yf(ZB.a,18).kb(t)){if(!n.lc())throw new Fi(uP+t+cP+n+").");for(d=null,a=0,s=(c=BT(n.lc().a,"[\\[\\]\\s,]+")).length;a0&&Ex(t.charCodeAt(n-1),NM);)--n;if(r>=n)throw new oo("The given string does not contain any numbers.");if(2!=(i=BT(t.substr(r,n-r),",|;|\r|\n")).length)throw new oo("Exactly two numbers are expected, "+i.length+" were found.");try{e.a=A_(p_(i[0])),e.b=A_(p_(i[1]))}catch(e){throw hl(e=rE(e),130)?new oo(SM+e):DE(e)}}(g=new so,n.lc().a),void Ky(e,f=Yf(Yf(eH.b,57).cb(t),79),g)}catch(e){throw hl(e=rE(e),29)?new Fi("Invalid KVector format for property '"+t+"' "+n+"."):DE(e)}else if(cE(lR,t)||cE(kR,t))try{return function(e,t){var n,r,i,o,a;r=BT(t,",|;|\\(|\\)|\\[|\\]|\\{|\\}| |\t|\n"),Ip(e);try{for(n=0,o=0,i=0,a=0;n0&&(o%2==0?i=A_(r[n]):a=A_(r[n]),o>0&&o%2!=0&&Of(e,new Qa(i,a)),++o),++n}catch(e){throw hl(e=rE(e),130)?new oo("The given string does not match the expected format for vectors."+e):DE(e)}}(v=new Gr,n.lc().a),void Ky(e,f=Yf(Yf(eH.b,57).cb(t),79),v)}catch(e){throw hl(e=rE(e),29)?new Fi("Invalid KVectorChain format for property '"+t+"' "+n+"."):DE(e)}else if(cE(OR,t)||cE(oR,t))try{return function(e,t){var n,r,i,o,a,s,c,u;for(o=0;o<(oi(),t.length)&&Cx(t.charCodeAt(o),_M);)++o;for(n=t.length;n>0&&Cx(t.charCodeAt(n-1),NM);)--n;if(o1?Av(this,e-1):this,t},tA.Pc=function(){return Rh(this),this.b},tA.Qc=function(){return ea(this)},tA.Rc=function(){return ta(this)},tA.Sc=function(){return 0!=(4&this.g)},tA.Tc=function(){return 0!=(1&this.g)},tA.w=function(){return(0!=(2&this.g)?"interface ":0!=(1&this.g)?"":"class ")+(Rh(this),this.n)},tA.g=0,$S(119,72,{3:1,119:1,54:1,46:1},zr),$S(29,72,EA,Vr,oo),$S(95,72,dA,Ur,io),$S(231,1,{3:1,231:1}),$S(24,231,{3:1,23:1,24:1,231:1},In),tA.F=function(e){return function(e,t){return Ru(e.a,t.a)}(this,Yf(e,24))},tA.t=function(e){return hl(e,24)&&Yf(e,24).a==this.a},tA.v=function(){return this.a},tA.w=function(){return aa(this.a)},tA.a=0,cA={3:1,345:1,23:1,2:1},$S(350,1,_A,it),tA.$b=function(e,t){return function(e,t){return Cp((oi(),e.toLowerCase()),t.toLowerCase())}(Th(e),Th(t))},$S(257,95,dA,(function(e){io.call(this,e)})),$S(145,1,{23:1,145:1}),tA.F=function(e){return function(e,t){return function(e,t){return Cp((oi(),e.toLowerCase()),t.toLowerCase())}(e.a,t.a)}(this,Yf(e,145))},tA.t=function(e){var t;return e===this||!!hl(e,145)&&(t=Yf(e,145),Di(this.a,t.a))},tA.v=function(){return dk(this.a)},tA.w=function(){return this.a},$S(358,29,EA,(function(e){oo.call(this,(oi(),null==e?gA:e))})),$S(256,29,{3:1,54:1,29:1,46:1,256:1},(function(e){oo.call(this,(oi(),null==e?gA:e))})),$S(185,145,NA),$S(289,185,NA,(function(e){An.call(this,e)})),tA.Zc=function(e,t,n){var r,i;for(r=_y(aW,SA,26,n,12,1),i=0;in)throw new io(OA)}for(a=_y(aW,SA,26,o,12,1),l=0,s=0,c=0;c0;){if(128!=(192&(r=e[t+c++])))throw new oo("Invalid UTF8 sequence at "+(t+c-1)+", byte="+(r>>>0).toString(16));i=i<<6|63&r}l+=Kk(i,a,l)}return a};var kD,_D=Rg(LA,"Object",1),ND=Rg(LA,"Throwable",46),SD=(Rg(LA,"Exception",54),Rg(LA,"RuntimeException",72),Rg(IA,"JavaScriptException",164),Rg(AA,"StackTraceCreator/Collector",642),Rg(AA,"StackTraceCreator/CollectorLegacy",356),Rg(AA,"StackTraceCreator/CollectorModern",643),Rg(AA,"StackTraceCreator/CollectorModernNoSourceMap",357),Rg(MA,"IOException",181),Rg(MA,"UnsupportedEncodingException",351),Rg(LA,"Class",288),Rg(LA,"ClassCastException",119),Rg(LA,"IllegalArgumentException",29),Rg(LA,"IndexOutOfBoundsException",95),Rg(LA,"Number",231),Rg(LA,"Integer",24)),OD=Rg(LA,"String",2);Rg(LA,"String/1",350),Rg(LA,"StringIndexOutOfBoundsException",257),Rg(PA,"Charset",145),Rg(PA,"IllegalCharsetNameException",358),Rg(PA,"UnsupportedCharsetException",256),Rg(DA,"EmulatedCharset",185),Rg(DA,"EmulatedCharset/LatinCharset",289),Rg(DA,"EmulatedCharset/UtfCharset",355),$S(669,1,{3:1}),Rg(jA,"Optional",669),$S(601,669,{3:1},a),tA.t=function(e){return e===this},tA.v=function(){return 2040732332},tA.w=function(){return"Optional.absent()"},tA.A=function(e){return Md(e),ai(),kD},Rg(jA,"Absent",601);var TD=xd(jA,"Function");$S(208,1,{},ao),tA.C=function(e){return Mg(e)},Rg(jA,"Joiner",208),$S(363,208,{},$f),tA.C=function(e){return Cl(this,e)},Rg(jA,"Joiner/1",363),$S(362,1,{},eh),Rg(jA,"Joiner/MapJoiner",362);var LD,ID=xd(jA,"Predicate");$S(244,1,{68:1,244:1,3:1},jt),tA.D=function(e){var t;for(t=0;t0},tA.H=function(){if(this.b>=this.c)throw new xi;return ra(this,this.b++)},tA.L=function(){return this.b},tA.M=function(){if(this.b<=0)throw new xi;return ra(this,--this.b)},tA.N=function(){return this.b-1},tA.b=0,tA.c=0,Rg(zA,"AbstractIndexedListIterator",378),$S(428,108,YA),tA.G=function(){return um(this)},tA.H=function(){return Ny(this)},tA.d=1,Rg(zA,"AbstractIterator",428),$S(653,1,{144:1}),tA.P=function(){return this.f||(this.f=this.S())},tA.T=function(){return new La(this.P())},tA.t=function(e){return zx(this,e)},tA.v=function(){return this.P().v()},tA.V=function(){return 0==this.Y()},tA.W=function(){return ng(this)},tA.w=function(){return this.P().w()},Rg(zA,"AbstractMultimap",653),$S(294,653,UA),tA.Q=function(){Ok(this)},tA.R=function(e){return qy(this.b,e)},tA.S=function(){return new Ma(this,this.b)},tA.T=function(){return new Il(this,this.b)},tA.$=function(){return hl(e=this.Z(),137)?(Fp(),new $l(Yf(e,137))):hl(e,18)?(Fp(),new Zo(Yf(e,18))):hl(e,20)?dv(Yf(e,20)):(Fp(),new Jn(e));var e},tA.U=function(e){return W_(this,e)},tA.X=function(e){return iS(this,e)},tA.Y=function(){return this.c},tA.c=0,Rg(zA,"AbstractMapBasedMultimap",294),$S(600,294,UA),tA.Z=function(){return new cw(this.a)},tA.$=function(){return rp(),rp(),YD},tA.U=function(e){return Yf(W_(this,e),20)},tA.X=function(e){return Yf(iS(this,e),20)},tA.P=function(){return this.f||(this.f=new Ma(this,this.b))},tA.t=function(e){return zx(this,e)},Rg(zA,"AbstractListMultimap",600),$S(388,1,qA),tA.G=function(){return this.b.b||this.d.G()},tA.H=function(){var e;return this.d.G()||((e=Vw(this.b)).yb(),this.a=Yf(e.zb(),19),this.d=this.a.mb()),this.d.H()},tA.I=function(){this.d.I(),this.a.V()&&Fy(this.b),--this.c.c},Rg(zA,"AbstractMapBasedMultimap/Itr",388),$S(389,388,qA,rm),Rg(zA,"AbstractMapBasedMultimap/1",389),$S(638,1,XA),tA.Q=function(){this.bb().Q()},tA._=function(e){return c_(this,e)},tA.R=function(e){return!!U_(this,e,!1)},tA.ab=function(e){var t,n;for(t=this.bb().mb();t.G();)if(n=Yf(t.H(),21).zb(),Wc(e)===Wc(n)||null!=e&&sE(e,n))return!0;return!1},tA.t=function(e){return _N(this,e)},tA.cb=function(e){return Zc(U_(this,e,!1))},tA.v=function(){return bx(this.bb())},tA.V=function(){return 0==this.Y()},tA.W=function(){return new Yn(this)},tA.db=function(e,t){throw new _o("Put not supported on this map")},tA.eb=function(e){return Zc(U_(this,e,!0))},tA.Y=function(){return this.bb().Y()},tA.w=function(){return rN(this)},tA.fb=function(){return new Vn(this)},Rg(WA,"AbstractMap",638),$S(654,638,XA),tA.bb=function(){return rg(this)},tA.W=function(){return this.d||(this.d=new La(this))},tA.fb=function(){return Vg(this)},Rg(zA,"Maps/ViewCachingAbstractMap",654),$S(262,654,XA,Ma),tA.cb=function(e){return function(e,t){var n;return(n=Yf(ck(e.a,t),19))?ak(e.b,t,n):null}(this,e)},tA.eb=function(e){return function(e,t){var n,r;return(n=Yf(Zd(e.a,t),19))?((r=e.b.Z()).jb(n),e.b.c-=n.Y(),n.Q(),r):null}(this,e)},tA.Q=function(){this.a==this.b.b?Ok(this.b):cg(new mv(this))},tA.R=function(e){return bk(this.a,e)},tA.hb=function(){return new Bt(this)},tA.gb=function(){return this.hb()},tA.t=function(e){return this===e||_N(this.a,e)},tA.v=function(){return bx(new Hn(this.a))},tA.W=function(){return ng(this.b)},tA.Y=function(){return Bs(this.a)},tA.w=function(){return rN(this.a)},Rg(zA,"AbstractMapBasedMultimap/AsMap",262),$S(640,1,ZA),tA.ib=function(e){return function(){throw new _o("Add not supported on this collection")}()},tA.jb=function(e){return pm(this,e)},tA.Q=function(){vp(this)},tA.kb=function(e){return mC(this,e,!1)},tA.lb=function(e){return Qm(this,e)},tA.V=function(){return 0==this.Y()},tA.nb=function(e){return mC(this,e,!0)},tA.ob=function(){return this.pb(_y(_D,GA,1,this.Y(),4,1))},tA.pb=function(e){return i_(this,e)},tA.w=function(){return nN(this)},Rg(WA,"AbstractCollection",640),$S(641,640,$A),tA.t=function(e){return NC(this,e)},tA.v=function(){return bx(this)},Rg(WA,"AbstractSet",641),$S(649,641,$A),Rg(zA,"Sets/ImprovedAbstractSet",649),$S(655,649,$A),tA.Q=function(){this.qb().Q()},tA.kb=function(e){return GC(this,e)},tA.V=function(){return this.qb().V()},tA.nb=function(e){var t;return!!this.kb(e)&&(t=Yf(e,21),this.qb().W().nb(t.yb()))},tA.Y=function(){return this.qb().Y()},Rg(zA,"Maps/EntrySet",655),$S(387,655,$A,Bt),tA.kb=function(e){return yk(new Hn(this.a.a),e)},tA.mb=function(){return new mv(this.a)},tA.qb=function(){return this.a},tA.nb=function(e){var t;return!!yk(new Hn(this.a.a),e)&&(t=Yf(e,21),function(e,t){var n,r;n=Yf(function(e,t){ml(),Md(e);try{return _l(t)?Ap(e,t):OS(e.d,t)}catch(e){if(hl(e=rE(e),119))return null;if(hl(e,76))return null;throw DE(e)}}(e.b,t),19),n&&(r=n.Y(),n.Q(),e.c-=r)}(this.a.b,t.yb()),!0)},Rg(zA,"AbstractMapBasedMultimap/AsMap/AsMapEntries",387),$S(299,1,qA,mv),tA.H=function(){var e;return e=Vw(this.b),this.a=Yf(e.zb(),19),function(e,t){var n;return n=t.yb(),ml(),new ja(n,ak(e.b,n,Yf(t.zb(),19)))}(this.c,e)},tA.G=function(){return this.b.b},tA.I=function(){Fy(this.b),this.c.b.c-=this.a.Y(),this.a.Q()},Rg(zA,"AbstractMapBasedMultimap/AsMap/AsMapIterator",299),$S(260,649,$A,La),tA.Q=function(){this.b.Q()},tA.kb=function(e){return this.b.R(e)},tA.V=function(){return this.b.V()},tA.mb=function(){return ml(),mf(this.b.bb().mb(),(qu(),qD))},tA.nb=function(e){return!!this.b.R(e)&&(this.b.eb(e),!0)},tA.Y=function(){return this.b.Y()},Rg(zA,"Maps/KeySet",260),$S(386,260,$A,Il),tA.Q=function(){cg(new Da(this,this.b.bb().mb()))},tA.lb=function(e){return this.b.W().lb(e)},tA.t=function(e){return this===e||this.b.W().t(e)},tA.v=function(){return this.b.W().v()},tA.mb=function(){return new Da(this,this.b.bb().mb())},tA.nb=function(e){var t,n;return n=0,(t=Yf(this.b.eb(e),19))&&(n=t.Y(),t.Q(),this.a.c-=n),n>0},Rg(zA,"AbstractMapBasedMultimap/KeySet",386),$S(300,1,qA,Da),tA.G=function(){return this.c.G()},tA.H=function(){return this.a=Yf(this.c.H(),21),this.a.yb()},tA.I=function(){var e;gx(!!this.a),e=Yf(this.a.zb(),19),this.c.I(),this.b.a.c-=e.Y(),e.Q()},Rg(zA,"AbstractMapBasedMultimap/KeySet/1",300),$S(216,640,ZA,Sy),tA.ib=function(e){return function(e,t){var n,r;return nC(e),r=e.d.V(),(n=e.d.ib(t))&&(++e.f.c,r&&bf(e)),n}(this,e)},tA.jb=function(e){return function(e,t){var n,r,i;return!t.V()&&(i=e.Y(),(n=e.d.jb(t))&&(r=e.d.Y(),e.f.c+=r-i,0==i&&bf(e)),n)}(this,e)},tA.Q=function(){var e,t;0!=(t=(e=this).Y())&&(e.d.Q(),e.f.c-=t,fg(e))},tA.kb=function(e){return nC(this),this.d.kb(e)},tA.lb=function(e){return nC(this),this.d.lb(e)},tA.t=function(e){return function(e,t){return t===e||(nC(e),e.d.t(t))}(this,e)},tA.v=function(){return nC(this),this.d.v()},tA.mb=function(){return nC(this),new Qf(this)},tA.nb=function(e){return function(e,t){var n;return nC(e),(n=e.d.nb(t))&&(--e.f.c,fg(e)),n}(this,e)},tA.Y=function(){return nC(this),this.d.Y()},tA.w=function(){return nC(this),Vk(this.d)},Rg(zA,"AbstractMapBasedMultimap/WrappedCollection",216);var GD,BD,HD=xd(WA,"List");$S(297,216,KA,bg),tA.rb=function(e,t){var n;nC(this),n=this.d.V(),Yf(this.d,20).rb(e,t),++this.a.c,n&&bf(this)},tA.sb=function(e){return nC(this),Yf(this.d,20).sb(e)},tA.tb=function(){return nC(this),new Fu(this)},tA.ub=function(e){return nC(this),new jp(this,e)},tA.vb=function(e){var t;return nC(this),t=Yf(this.d,20).vb(e),--this.a.c,fg(this),t},tA.wb=function(e,t){return nC(this),Yf(this.d,20).wb(e,t)},tA.xb=function(e,t){return nC(this),bb(this.a,this.e,Yf(this.d,20).xb(e,t),this.b?this.b:this)},Rg(zA,"AbstractMapBasedMultimap/WrappedList",297),$S(385,297,QA,yh),Rg(zA,"AbstractMapBasedMultimap/RandomAccessWrappedList",385),$S(189,1,qA,Qf),tA.G=function(){return dg(this),this.b.G()},tA.H=function(){return dg(this),this.b.H()},tA.I=function(){this.b.I(),--this.d.f.c,fg(this.d)},Rg(zA,"AbstractMapBasedMultimap/WrappedCollection/WrappedIterator",189),$S(298,189,JA,Fu,jp),tA.J=function(e){var t;t=0==function(e){return nC(e),e.d.Y()}(this.a),(dg(this),Yf(this.b,96)).J(e),++this.a.a.c,t&&bf(this.a)},tA.K=function(){return(dg(this),Yf(this.b,96)).K()},tA.L=function(){return(dg(this),Yf(this.b,96)).L()},tA.M=function(){return(dg(this),Yf(this.b,96)).M()},tA.N=function(){return(dg(this),Yf(this.b,96)).N()},tA.O=function(e){(dg(this),Yf(this.b,96)).O(e)},Rg(zA,"AbstractMapBasedMultimap/WrappedList/WrappedListIterator",298),$S(295,216,$A,xh),Rg(zA,"AbstractMapBasedMultimap/WrappedSet",295),$S(296,216,eM,Eh),Rg(zA,"AbstractMapBasedMultimap/WrappedSortedSet",296),$S(668,1,tM),tA.t=function(e){var t;return!!hl(e,21)&&(t=Yf(e,21),ep(this.yb(),t.yb())&&ep(this.zb(),t.zb()))},tA.v=function(){var e,t;return e=this.yb(),t=this.zb(),(null==e?0:KE(e))^(null==t?0:KE(t))},tA.Ab=function(e){throw new Zr},tA.w=function(){return this.yb()+"="+this.zb()},Rg(zA,nM,668),$S(390,640,ZA,Ht),tA.Q=function(){Ok(this.a)},tA.kb=function(e){return function(e,t){var n;for(n=np(Vg(e.P()));n.b.G();)if(Yf(Ao(n,n.b.H()),19).kb(t))return!0;return!1}(this.a,e)},tA.mb=function(){return new rm(this.a)},tA.Y=function(){return this.a.c},Rg(zA,"AbstractMultimap/Values",390),$S(656,640,rM),tA.ib=function(e){return this.Bb(e,1),!0},tA.Bb=function(e,t){throw new Zr},tA.jb=function(e){return function(e,t){var n,r;if(Or(),t.V())return!1;if(hl(t,207))for(r=Yf(t,207).bb().mb();r.G();)n=Yf(r.H(),83),e.Bb(n.Zb(),n.Yb());else zw(e,t.mb());return!0}(this,e)},tA.Q=function(){cg(this.Eb())},tA.kb=function(e){return this.Cb(e)>0},tA.Cb=function(e){var t,n;for(n=Ug(this).mb();n.G();)if(ep((t=Yf(n.H(),83)).Zb(),e))return t.Yb();return 0},tA.gb=function(){return new Ft(this)},tA.bb=function(){return Ug(this)},tA.t=function(e){return function(e,t){var n,r,i;if(Or(),t===e)return!0;if(hl(t,207)){if(i=Yf(t,207),e.Y()!=i.Y()||Ug(e).Y()!=i.bb().Y())return!1;for(r=i.bb().mb();r.G();)if(n=Yf(r.H(),83),e.Cb(n.Zb())!=n.Yb())return!1;return!0}return!1}(this,e)},tA.v=function(){return Ug(this).v()},tA.V=function(){return Ug(this).V()},tA.mb=function(){return Or(),new za(this,Ug(this).mb())},tA.nb=function(e){return this.Fb(e,1)>0},tA.Fb=function(e,t){throw new Zr},tA.Gb=function(e,t){var n,r;return Or(),Nw(t,"count"),(r=t-(n=this.Cb(e)))>0?this.Bb(e,r):r<0&&this.Fb(e,-r),n},tA.Hb=function(e,t,n){return function(e,t,n,r){return Or(),Nw(n,"oldCount"),Nw(r,"newCount"),e.Cb(t)==n&&(e.Gb(t,r),!0)}(this,e,t,n)},tA.Y=function(){return function(e){var t,n;for(Or(),n=0,t=Ug(e).mb();t.G();)n=mE(n,Yf(t.H(),83).Yb());return aw(n)}(this)},tA.w=function(){return Vk(Ug(this))},Rg(zA,"AbstractMultiset",656),$S(657,649,$A),tA.Q=function(){this.Ib().Q()},tA.kb=function(e){var t;return!(!hl(e,83)||(t=Yf(e,83)).Yb()<=0||this.Ib().Cb(t.Zb())!=t.Yb())},tA.nb=function(e){var t,n,r;return!(!hl(e,83)||(t=(n=Yf(e,83)).Zb(),0==(r=n.Yb())))&&this.Ib().Hb(t,r,0)},Rg(zA,"Multisets/EntrySet",657),$S(396,657,$A,Ft),tA.mb=function(){return this.a.Eb()},tA.Ib=function(){return this.a},tA.Y=function(){return this.a.Db()},Rg(zA,"AbstractMultiset/EntrySet",396),$S(384,294,UA),tA.Z=function(){return new Sa(cx(this.a))},tA.$=function(){return cf(),ip(),KD},tA.U=function(e){return Yf(W_(this,e),18)},tA.X=function(e){return Yf(iS(this,e),18)},tA.P=function(){return this.f||(this.f=new Ma(this,this.b))},tA.t=function(e){return zx(this,e)},Rg(zA,"AbstractSetMultimap",384),$S(342,656,rM),Rg(zA,"AbstractSortedMultiset",342),$S(280,600,UA,zh),tA.a=0,Rg(zA,"ArrayListMultimap",280),$S(159,17,iM);var FD,YD,zD,VD,UD,qD,XD,WD=ew(zA,"BoundType",159,jD,(function(){return Vu(),Sx(Io(WD,1),HA,159,0,[BD,GD])}));$S(623,159,iM,lu),ew(zA,"BoundType/1",623,WD,null),$S(624,159,iM,Iu),ew(zA,"BoundType/2",624,WD,null),$S(234,1,aM),tA.w=function(){return e=this.c.mb(),Uu(),Wg(PE((zu(),FD),Wg(new Qo,91),e),93).a;var e},Rg(zA,"FluentIterable",234),$S(170,234,aM,Cu),tA.mb=function(){return Lg(this)},Rg(zA,"FluentIterable/2",170),$S(664,1,{}),tA.w=function(){return Vk(Tp(this.a.d).b)},Rg(zA,"ForwardingObject",664),$S(665,664,ZA),tA.ib=function(e){return Tp(this.a.d),Jr()},tA.jb=function(e){return Tp(this.a.d),ei()},tA.Q=function(){Tp(this.a.d),ti()},tA.kb=function(e){return Fs(Tp(this.a.d),e)},tA.lb=function(e){return Ys(Tp(this.a.d),e)},tA.V=function(){return Tp(this.a.d).b.V()},tA.mb=function(){return new nr(Tp(this.a.d).b.mb())},tA.nb=function(e){return Tp(this.a.d),ni()},tA.Y=function(){return Tp(this.a.d).b.Y()},tA.ob=function(){return Wp(Tp(this.a.d))},tA.pb=function(e){return iv(Tp(this.a.d),e)},Rg(zA,"ForwardingCollection",665),$S(660,640,sM),tA.mb=function(){return this.Kb()},tA.ib=function(e){return function(){throw new Zr}()},tA.jb=function(e){return function(){throw new Zr}()},tA.Q=function(){!function(){throw new Zr}()},tA.kb=function(e){return null!=e&&mC(this,e,!1)},tA.Jb=function(){switch(this.Y()){case 0:return rp(),rp(),YD;case 1:return rp(),new Yd(this.Kb().H());default:return new vg(this,this.ob())}},tA.nb=function(e){return function(){throw new Zr}()},Rg(zA,"ImmutableCollection",660),$S(316,660,sM,pi),tA.mb=function(){return Ow(this.a.mb())},tA.kb=function(e){return null!=e&&this.a.kb(e)},tA.lb=function(e){return this.a.lb(e)},tA.V=function(){return this.a.V()},tA.Kb=function(){return Ow(this.a.mb())},tA.Y=function(){return this.a.Y()},tA.ob=function(){return this.a.ob()},tA.pb=function(e){return this.a.pb(e)},tA.w=function(){return Vk(this.a)},Rg(zA,"ForwardingImmutableCollection",316),$S(87,660,cM),tA.mb=function(){return this.Kb()},tA.tb=function(){return this.Lb(0)},tA.ub=function(e){return this.Lb(e)},tA.xb=function(e,t){return this.Mb(e,t)},tA.rb=function(e,t){throw new Zr},tA.t=function(e){return function(e,t){var n,r,i;if(Wc(t)===Wc(Md(e)))return!0;if(!hl(t,20))return!1;if(r=Yf(t,20),(i=e.Y())!=r.Y())return!1;if(hl(r,63)){for(n=0;n=(i=o.Y()))o.Q();else for(r=o.mb(),n=0;nt?1:0}(t.Yb(),e.Yb())}(Yf(e,83),Yf(t,83))},Rg(zA,"Multisets/1",398),$S(397,658,{83:1,3:1},cd),tA.Yb=function(){return this.a},tA.Zb=function(){return this.b},tA.a=0,Rg(zA,"Multisets/ImmutableEntry",397),$S(303,1,qA,za),tA.G=function(){return this.d>0||this.c.G()},tA.H=function(){if(!(this.d>0||this.c.G()))throw new xi;return 0==this.d&&(this.b=Yf(this.c.H(),83),this.f=this.d=this.b.Yb()),--this.d,this.a=!0,this.b.Zb()},tA.I=function(){gx(this.a),1==this.f?this.c.I():this.e.Fb(this.b.Zb(),1),--this.f,this.a=!1},tA.a=!1,tA.d=0,tA.f=0,Rg(zA,"Multisets/MultisetIteratorImpl",303),$S(622,659,{3:1,56:1},l),tA.$b=function(e,t){return function(e,t){return Md(e),Md(t),Fm(e,t)}(Yf(e,23),Yf(t,23))},tA.w=function(){return"Ordering.natural()"},Rg(zA,"NaturalOrdering",622),$S(343,661,cM,vg),tA.ub=function(e){return Nl(this.b,e)},tA.Sb=function(){return this.a},tA.sb=function(e){return $c(this.b,e)},tA.Lb=function(e){return Nl(this.b,e)},Rg(zA,"RegularImmutableAsList",343),$S(559,275,uM,lp),tA.Tb=function(){return this.a},Rg(zA,"RegularImmutableBiMap",559),$S(53,667,cM,sb),tA.Nb=function(){return this.a},Rg(zA,"RegularImmutableList",53),$S(321,320,uM,Pi),Rg(zA,"RegularImmutableMap",321),$S(265,315,lM,Zs),Rg(zA,"RegularImmutableSet",265),$S(650,641,$A),Rg(zA,"Sets/SetView",650),$S(377,650,$A,ff),tA.kb=function(e){return Ea(this.b,e)&&Ea(this.c,e)},tA.lb=function(e){return Qm(this.b,e)&&Qm(this.c,e)},tA.V=function(){return Aw(this)},tA.mb=function(){return pg(new zn(new Yn(this.b.a).a.bb().mb()),this.a)},tA.Y=function(){return Jb(pg(new zn(new Yn(this.b.a).a.bb().mb()),this.a))},Rg(zA,"Sets/2",377),$S(328,275,uM,Zv,Yy),tA.fb=function(){return cf(),new ca(this.c)},tA.Tb=function(){return this.a||(this.a=new Yy(this.c,this.b,this))},tA.Ub=function(){return cf(),new ca(this.c)},Rg(zA,"SingletonImmutableBiMap",328),$S(127,667,cM,Yd),tA.Nb=function(){return this.a},Rg(zA,"SingletonImmutableList",127),$S(135,663,lM,ca),tA.mb=function(){return Uu(),new Ut(this.a)},tA.kb=function(e){return sE(this.a,e)},tA.Kb=function(){return Uu(),new Ut(this.a)},tA.Y=function(){return 1},Rg(zA,"SingletonImmutableSet",135),$S(285,342,{207:1,3:1,22:1,19:1},Pv,lk),tA.Bb=function(e,t){return hS(this,e,t)},tA.Cb=function(e){return T_(this,e)},tA.Db=function(){return aw(Hx(this,(Xu(),QD)))},tA.Eb=function(){return new Al(this)},tA.Fb=function(e,t){return XS(this,e,t)},tA.Gb=function(e,t){return Q_(this,e,t)},tA.Hb=function(e,t,n){var r,i,o;return Nw(n,"newCount"),Nw(t,"oldCount"),Yc(uh(this.b,e)),(o=this.c.a)?(i=_y(iW,vM,26,1,12,1),r=pL(o,this.d,e,t,n,i),Dd(this.c,o,r),i[0]==t):0==t&&(n>0&&hS(this,e,n),!0)},tA.Y=function(){return aw(Hx(this,(Xu(),JD)))},Rg(zA,"TreeMultiset",285),$S(619,658,{83:1},Ua),tA.Yb=function(){var e;return 0==(e=this.b.c)?T_(this.a,this.b.b):e},tA.Zb=function(){return this.b.b},Rg(zA,"TreeMultiset/1",619),$S(620,1,qA,Al),tA.H=function(){return function(e){var t;if(!dx(e))throw new xi;return t=new Ua(e.c,e.a),e.b=t,e.a.i==e.c.a?e.a=null:e.a=e.a.i,t}(this)},tA.G=function(){return dx(this)},tA.I=function(){gx(!!this.b),Q_(this.c,this.b.b.b,0),this.b=null},Rg(zA,"TreeMultiset/2",620),$S(205,17,bM);var tj=ew(zA,"TreeMultiset/Aggregate",205,jD,(function(){return Xu(),Sx(Io(tj,1),HA,205,0,[JD,QD])}));$S(617,205,bM,hu),tA._b=function(e){return e.c},tA.ac=function(e){return e?e.j:0},ew(zA,"TreeMultiset/Aggregate/1",617,tj,null),$S(618,205,bM,yl),tA._b=function(e){return 1},tA.ac=function(e){return e?e.a:0},ew(zA,"TreeMultiset/Aggregate/2",618,tj,null),$S(206,658,{83:1,206:1},Sm),tA.Yb=function(){return this.c},tA.Zb=function(){return this.b},tA.w=function(){return Or(),Ob(new cd(this.b,this.c))},tA.a=0,tA.c=0,tA.d=0,tA.j=0,Rg(zA,"TreeMultiset/AvlNode",206),$S(616,1,{},h),Rg(zA,"TreeMultiset/Reference",616);var nj,rj=Rg(IA,"JavaScriptObject$",0);$S(628,1,{}),Rg(IA,"Scheduler",628);var ij,oj,aj,sj,cj,uj,lj,hj,fj=0,dj=0,gj=-1;$S(360,628,{},c),Rg(AA,"SchedulerImpl",360),$S(646,1,{}),tA.hc=function(){return null},tA.ic=function(){return null},tA.jc=function(){return null},tA.kc=function(){return null},tA.lc=function(){return null},Rg(wM,"JSONValue",646),$S(214,646,{214:1},or,Jt),tA.t=function(e){return!!hl(e,214)&&this.a==Yf(e,214).a},tA.gc=function(){return dr},tA.v=function(){return lh(this.a)},tA.hc=function(){return this},tA.w=function(){var e,t,n;for(n=new Xo("["),t=0,e=this.a.length;t0&&(n.a+=","),tu(n,Tw(this,t));return n.a+="]",n.a},Rg(wM,"JSONArray",214),$S(292,646,{},en),tA.gc=function(){return gr},tA.ic=function(){return this},tA.w=function(){return vl(this.a)},tA.a=!1,Rg(wM,"JSONBoolean",292),$S(371,72,dA,Bi),Rg(wM,"JSONException",371),$S(435,646,{},p),tA.gc=function(){return wr},tA.w=function(){return gA},Rg(wM,"JSONNull",435),$S(104,646,{104:1},tn),tA.t=function(e){return!!hl(e,104)&&this.a==Yf(e,104).a},tA.gc=function(){return pr},tA.v=function(){return yv(ro(this.a))},tA.jc=function(){return this},tA.w=function(){return this.a+""},tA.a=0,Rg(wM,"JSONNumber",104),$S(69,646,{69:1},zi,nn),tA.t=function(e){return!!hl(e,69)&&this.a==Yf(e,69).a},tA.gc=function(){return vr},tA.v=function(){return lh(this.a)},tA.kc=function(){return this},tA.w=function(){var e,t,n,r,i,o;for(o=new Xo("{"),e=!0,n=0,r=(i=km(this,_y(OD,hA,2,0,5,1))).length;n>>28]|t[e>>24&15]<<4|t[e>>20&15]<<8|t[e>>16&15]<<12|t[e>>12&15]<<16|t[e>>8&15]<<20|t[e>>4&15]<<24|t[15&e]<<28);var e,t},tA.w=function(){return"("+this.a+","+this.b+")"},tA.a=0,tA.b=0;var pj=Rg(OM,"KVector",10);$S(58,648,{3:1,5:1,22:1,19:1,58:1,20:1},co),tA.ib=function(e){return Of(this,e)},tA.Q=function(){Ip(this)},tA.ub=function(e){return Tk(this,e)},tA.Y=function(){return this.b},tA.b=0,Rg(WA,"LinkedList",58),$S(44,58,{44:1,286:1,3:1,5:1,22:1,19:1,58:1,20:1},Gr,Nh),tA.w=function(){var e,t,n;for(e=new Xo("("),t=Tk(this,0);t.b!=t.d.c;)nu(e,(n=Yf(Tb(t),10)).a+","+n.b),t.b!=t.d.c&&(e.a+="; ");return e.a+=")",e.a},Rg(OM,"KVectorChain",44);var vj,bj,yj,wj,mj,xj,Ej,Cj,kj,_j=xd(LM,"IProperty");$S(131,1,{179:1,131:1,3:1},v),Rg(LM,"MapPropertyHolder",131),$S(14,1,IM,Td,Od,ld,Lf,Ev,Kv),tA.F=function(e){return function(e,t){return Cp(e.b,t.mc())}(this,Yf(e,79))},tA.t=function(e){return bp(this,e)},tA.mc=function(){return this.b},tA.nc=function(){return this.c},tA.oc=function(){return this.d},tA.v=function(){return dk(this.b)},tA.w=function(){return this.b},Rg(LM,"Property",14),$S(366,1,{23:1},b),tA.F=function(e){return-1},Rg(LM,"Property/1",366),$S(367,1,{23:1},y),tA.F=function(e){return 1},Rg(LM,"Property/2",367),$S(27,1,{27:1,22:1},Ja),tA.t=function(e){var t,n,r;return!!hl(e,27)&&(n=Yf(e,27),t=null==this.a?null==n.a:sE(this.a,n.a),r=null==this.b?null==n.b:sE(this.b,n.b),t&&r)},tA.v=function(){var e,t,n;return e=-65536&(t=null==this.a?0:KE(this.a)),t&xA^(-65536&(n=null==this.b?0:KE(this.b)))>>16&xA|e^(n&xA)<<16},tA.mb=function(){return new rn(this)},tA.w=function(){return null==this.a&&null==this.b?"pair(null,null)":null==this.a?"pair(null,"+Vk(this.b)+")":null==this.b?"pair("+Vk(this.a)+",null)":"pair("+Vk(this.a)+","+Vk(this.b)+")"},Rg(AM,"Pair",27),$S(431,1,qA,rn),tA.G=function(){return!this.c&&(!this.b&&null!=this.a.a||null!=this.a.b)},tA.H=function(){if(!this.c&&!this.b&&null!=this.a.a)return this.b=!0,this.a.a;if(!this.c&&null!=this.a.b)return this.c=!0,this.a.b;throw new xi},tA.I=function(){throw this.c&&null!=this.a.b?this.a.b=null:this.b&&null!=this.a.a&&(this.a.a=null),new Xr},tA.b=!1,tA.c=!1,Rg(AM,"Pair/1",431),$S(228,72,dA,Hi),Rg(MM,"UnsupportedConfigurationException",228),$S(99,72,dA,Fi),Rg(MM,"UnsupportedGraphException",99),$S(103,17,{103:1,3:1,23:1,17:1},es);var Nj,Sj,Oj,Tj,Lj,Ij,Aj=ew(RM,"Alignment",103,jD,(function(){return fk(),Sx(Io(Aj,1),HA,103,0,[wj,Ej,Cj,kj,mj,xj])}));$S(59,17,{59:1,3:1,23:1,17:1},ss);var Mj,Pj,Dj,jj,Rj,Gj=ew(RM,"Direction",59,jD,(function(){return CE(),Sx(Io(Gj,1),HA,59,0,[Lj,Tj,Oj,Sj,Ij])}));$S(107,17,{107:1,3:1,23:1,17:1},cs);var Bj,Hj,Fj,Yj,zj,Vj=ew(RM,"EdgeLabelPlacement",107,jD,(function(){return Gm(),Sx(Io(Vj,1),HA,107,0,[Rj,Pj,Dj,jj])}));$S(122,17,{122:1,3:1,23:1,17:1},us);var Uj,qj,Xj,Wj,Zj,$j,Kj,Qj=ew(RM,"EdgeRouting",122,jD,(function(){return kE(),Sx(Io(Qj,1),HA,122,0,[zj,Fj,Hj,Yj])}));$S(133,17,{133:1,3:1,23:1,17:1},ls);var Jj,eR,tR,nR,rR=ew(RM,"EdgeType",133,jD,(function(){return D_(),Sx(Io(rR,1),HA,133,0,[$j,Wj,Kj,qj,Zj,Xj])}));$S(166,17,{166:1,3:1,23:1,17:1},hs);var iR,oR,aR,sR,cR,uR,lR,hR,fR,dR,gR,pR,vR,bR,yR,wR,mR,xR,ER,CR,kR,_R,NR,SR,OR,TR,LR,IR,AR,MR,PR,DR,jR,RR,GR,BR,HR,FR,YR,zR,VR,UR,qR,XR,WR,ZR,$R,KR,QR,JR,eG,tG,nG,rG,iG,oG,aG,sG,cG,uG=ew(RM,"HierarchyHandling",166,jD,(function(){return _E(),Sx(Io(uG,1),HA,166,0,[tR,eR,nR])}));$S(41,17,{41:1,3:1,23:1,17:1},fs);var lG,hG,fG,dG,gG,pG,vG=ew(RM,"NodeLabelPlacement",41,jD,(function(){return yS(),Sx(Io(vG,1),HA,41,0,[tG,eG,rG,cG,sG,aG,iG,oG,nG])}));$S(100,17,{100:1,3:1,23:1,17:1},ds);var bG,yG,wG,mG,xG,EG,CG,kG=ew(RM,"PortAlignment",100,jD,(function(){return LC(),Sx(Io(kG,1),HA,100,0,[pG,gG,hG,fG,dG])}));$S(28,17,{28:1,3:1,23:1,17:1},gs);var _G,NG,SG,OG,TG=ew(RM,"PortConstraints",28,jD,(function(){return b_(),Sx(Io(TG,1),HA,28,0,[CG,EG,xG,yG,mG,wG])}));$S(149,17,{149:1,3:1,23:1,17:1},ps);var LG,IG,AG,MG,PG,DG,jG,RG,GG,BG,HG,FG,YG,zG,VG,UG,qG,XG,WG,ZG,$G,KG,QG=ew(RM,"PortLabelPlacement",149,jD,(function(){return jw(),Sx(Io(QG,1),HA,149,0,[OG,SG,NG])}));$S(32,17,{32:1,3:1,23:1,17:1},vs);var JG,eB,tB,nB,rB,iB=ew(RM,"PortSide",32,jD,(function(){return wI(),Sx(Io(iB,1),HA,32,0,[$G,AG,IG,ZG,KG])}));$S(150,17,{150:1,3:1,23:1,17:1},bs);var oB,aB,sB,cB,uB,lB=ew(RM,"SizeConstraint",150,jD,(function(){return IC(),Sx(Io(lB,1),HA,150,0,[nB,rB,tB,eB])}));$S(139,17,{139:1,3:1,23:1,17:1},ys);var hB,fB,dB,gB,pB,vB,bB,yB,wB,mB,xB,EB,CB,kB,_B,NB,SB,OB,TB,LB,IB,AB,MB,PB=ew(RM,"SizeOptions",139,jD,(function(){return z_(),Sx(Io(PB,1),HA,139,0,[cB,uB,sB,aB])}));$S(62,1,{62:1},ic,mp),tA.t=function(e){var t;return!(null==e||!hl(e,62))&&(t=Yf(e,62),Np(this.d,t.d)&&Np(this.e,t.e)&&Np(this.c,t.c)&&Np(this.b,t.b))},tA.v=function(){return Zx(Sx(Io(_D,1),GA,1,4,[this.d,this.e,this.c,this.b]))},tA.w=function(){return"Rect[x="+this.d+",y="+this.e+",w="+this.c+",h="+this.b+"]"},tA.b=0,tA.c=0,tA.d=0,tA.e=0,Rg(YM,"Rectangle",62),$S(283,62,{283:1,62:1},Br),tA.a=0,Rg(zM,"LabelGroup",283),$S(67,17,{67:1,3:1,23:1,17:1},Ep);var DB,jB,RB,GB=ew(zM,"LabelLocation",67,jD,TC);$S(225,17,{225:1,3:1,23:1,17:1},ws);var BB,HB,FB,YB,zB,VB=ew(zM,"TextAlignment",225,jD,(function(){return Fb(),Sx(Io(VB,1),HA,225,0,[jB,DB,RB])}));$S(589,1,{},bL),tA.a=0,tA.b=!1,tA.d=0,tA.f=0,tA.k=0,tA.r=0,tA.s=0,Rg(YM,"LabelAndNodeSizeProcessor/NodeData",589),$S(171,17,{171:1,3:1,23:1,17:1},ms);var UB,qB,XB,WB,ZB,$B,KB,QB,JB,eH,tH,nH,rH,iH=ew(YM,"LabelSide",171,jD,(function(){return AC(),Sx(Io(iH,1),HA,171,0,[zB,HB,FB])}));$S(590,1,{},on),tA.b=!0,tA.c=!0,tA.d=!0,tA.e=!0,Rg(YM,UM,590),$S(121,1,XM),tA.t=function(e){var t;return!!hl(e,121)&&(t=Yf(e,121),this.d==t.d&&this.a==t.a&&this.b==t.b&&this.c==t.c)},tA.v=function(){var e;return e=yv(ro(this.b))<<16,(e|=yv(ro(this.a))&xA)^(yv(ro(this.c))<<16|yv(ro(this.d))&xA)},tA.w=function(){return"[top="+this.d+",left="+this.b+",bottom="+this.a+",right="+this.c+"]"},tA.a=0,tA.b=0,tA.c=0,tA.d=0,Rg(YM,"Spacing",121),$S(232,121,XM,Hr,wh,Vh),Rg(YM,"Spacing/Insets",232),$S(65,121,{286:1,121:1,65:1,3:1,5:1},Fr,mh,Uh),Rg(YM,"Spacing/Margins",65),$S(364,1,{},Dk),tA.c=!1,tA.d=null,tA.g=null,Rg(aP,"JsonGraphImporter",364),$S(417,14,IM,uc),Rg(aP,"LayoutOptionResolver/DummyProperty",417),$S(348,1,{},xt),Rg(aP,"RecursiveLGraphLayout",348),$S(73,99,{73:1,3:1,54:1,46:1},Yi,Xl,wg);var oH,aH,sH,cH,uH=Rg(aP,"UnsupportedJsonGraphException",73);$S(380,1,{},hp),Rg(lP,"GraphConfigurator",380),$S(49,1,{},iC),Rg(lP,"IntermediateProcessingConfiguration",49),$S(365,1,{},Rb),Rg(lP,"KlayLayered",365),$S(577,1,{},Xm),tA.i=0,Rg(gP,"ComponentsToCGraphTransformer",577),$S(578,1,{},N),tA.tc=function(e,t){return Fo(e.wc(),t.wc())},tA.uc=function(e,t){return Fo(e.xc(),t.xc())},Rg(gP,"ComponentsToCGraphTransformer/1",578),$S(25,1,{25:1}),tA.k=0,tA.o=null,tA.p=!0,tA.r=dP;var lH,hH,fH,dH,gH,pH=Rg(pP,"CNode",25);$S(198,25,{198:1,25:1},tl,om),tA.vc=function(){this.b.d=this.j.d,this.b.e=this.j.e},tA.wc=function(){return null!=this.a?ro(this.a):this.c.i},tA.xc=function(){return null!=this.a?ro(this.a):this.c.i},tA.w=function(){return""},Rg(gP,"ComponentsToCGraphTransformer/CRectNode",198),$S(549,1,{},S),Rg(gP,"OneDimensionalComponentsCompaction",549),$S(550,1,hM,O),tA.B=function(e){return vx(),zd(),0!=Yf(Yf(e,27).a,25).f.f?OX:SX},Rg(gP,"OneDimensionalComponentsCompaction/lambda$0$Type",550),$S(551,1,hM,T),tA.B=function(e){return vx(),zd(),lC(Yf(Yf(e,27).a,25).n,Yf(Yf(e,27).b,59))||0!=Yf(Yf(e,27).a,25).f.f&&lC(Yf(Yf(e,27).a,25).n,Yf(Yf(e,27).b,59))?OX:SX},Rg(gP,"OneDimensionalComponentsCompaction/lambda$1$Type",551),$S(324,1,{},mg),Rg(pP,"CGraph",324),$S(78,1,{78:1},$C),tA.b=0,tA.c=0,tA.d=0,tA.f=0,tA.i=!0,tA.j=dP,Rg(pP,"CGroup",78),$S(470,1,{},L),tA.tc=function(e,t){return Go(e.wc(),t.wc())},tA.uc=function(e,t){return Go(e.xc(),t.xc())},Rg(pP,"ISpacingsHandler/1",470),$S(323,1,{},wS),tA.e=!1;var vH=Rg(pP,"OneDimensionalCompactor",323);$S(554,1,hM,m),tA.B=function(e){return qd(),zd(),0!=Yf(Yf(e,27).a,25).f.f?OX:SX},Rg(pP,"OneDimensionalCompactor/lambda$0$Type",554),$S(335,1,{},Gf),tA.a=!1,tA.b=!1,tA.c=!1,tA.d=!1,Rg(pP,"Quadruplet",335),$S(587,1,{},x),tA.Cc=function(e){var t,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v;for(l=fP,r=new Zn(e.a.b);r.an.j.d||n.j.d==i.j.d&&n.j.c0&&(Tf(e.c,new df(t.c,t.d,e.d)),e.b=t.d)}(this,Yf(e,48))},tA.b=0,Rg(yP,"RectilinearConvexHull/MaximalElementsEventHandler",243),$S(571,1,_A,I),tA.$b=function(e,t){return tp(e,t)},Rg(yP,"RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type",571),$S(570,1,{160:1},ty),tA.Ec=function(e){!function(e,t){var n;e.d&&(t.c!=e.e.c||function(e,t){return Rm(),e==yH&&t==wH||e==yH&&t==mH||e==xH&&t==mH||e==xH&&t==wH}(e.e.b,t.b))&&(Tf(e.f,e.d),e.a=e.d.d+e.d.c,e.d=null,e.e=null),function(e){return e==yH||e==wH}(t.b)?e.c=t:e.b=t,(t.b==(Rm(),yH)&&!t.a||t.b==wH&&t.a||t.b==mH&&t.a||t.b==xH&&!t.a)&&e.c&&e.b&&(n=new mp(e.a,e.c.d,t.c-e.a,e.b.d-e.c.d),e.d=n,e.e=t)}(this,Yf(e,48))},tA.a=0,tA.b=null,tA.c=null,tA.d=null,tA.e=null,Rg(yP,"RectilinearConvexHull/RectangleEventHandler",570),$S(572,1,_A,A),tA.$b=function(e,t){return Hb(),Yf(e,48).c==Yf(t,48).c?Lx(Yf(t,48).d,Yf(e,48).d):Lx(Yf(e,48).c,Yf(t,48).c)},Rg(yP,"RectilinearConvexHull/lambda$0$Type",572),$S(573,1,_A,M),tA.$b=function(e,t){return Hb(),Yf(e,48).c==Yf(t,48).c?Lx(Yf(e,48).d,Yf(t,48).d):Lx(Yf(e,48).c,Yf(t,48).c)},Rg(yP,"RectilinearConvexHull/lambda$1$Type",573),$S(574,1,_A,P),tA.$b=function(e,t){return Hb(),Yf(e,48).c==Yf(t,48).c?Lx(Yf(t,48).d,Yf(e,48).d):Lx(Yf(t,48).c,Yf(e,48).c)},Rg(yP,"RectilinearConvexHull/lambda$2$Type",574),$S(575,1,_A,D),tA.$b=function(e,t){return Hb(),Yf(e,48).c==Yf(t,48).c?Lx(Yf(e,48).d,Yf(t,48).d):Lx(Yf(t,48).c,Yf(e,48).c)},Rg(yP,"RectilinearConvexHull/lambda$3$Type",575),$S(576,1,_A,j),tA.$b=function(e,t){return function(e,t){var n;if(Hb(),e.c==t.c){if(e.b==t.b||function(e,t){return Rm(),e==yH&&t==xH||e==xH&&t==yH||e==mH&&t==wH||e==wH&&t==mH}(e.b,t.b)){if(n=function(e){return e==yH||e==xH}(e.b)?1:-1,e.a&&!t.a)return n;if(!e.a&&t.a)return-n}return Ru(e.b.e,t.b.e)}return Lx(e.c,t.c)}(e,t)},Rg(yP,"RectilinearConvexHull/lambda$4$Type",576),$S(469,1,{},_b),Rg(yP,"Scanline",469),$S(662,1,{}),Rg(mP,"AbstractGraphPlacer",662),$S(222,1,{222:1},Zh),Rg(mP,"ComponentGroup",222),$S(434,662,{},Ir),tA.Fc=function(e,t){var n,r,i,o,a,s,c,u,l,h,f,d;if(this.a.c=_y(_D,GA,1,0,4,1),t.b.c=_y(_D,GA,1,0,4,1),e.V())return t.e.a=0,void(t.e.b=0);for(ME(t,i=Yf(e.sb(0),55)),r=e.mb();r.G();)zE(this,Yf(r.H(),55));for(f=new so,d=2*Yf(kx(i,(ZI(),mq)),15).a,s=new Zn(this.a);s.ah&&(x=0,E+=l+w,l=0),iT(o,x+(g=o.d).a,E+g.b),g.a=0,g.b=0,n=Go(n,x+b.a),l=Go(l,b.b),x+=b.a+w;if(t.e.a=n,t.e.b=E+l,v=Yf(kx(t,mq),15).a,no(ro(Sh(kx(i,($I(),Fq)))))){for(GI(r=new R,e,v),u=e.mb();u.G();)Lh(Tc(Yf(u.H(),55).d),r.e);Lh(Tc(t.e),r.a)}py(t,e)}else(y=Yf(e.sb(0),55))!=t&&(t.b.c=_y(_D,GA,1,0,4,1),pT(t,y,0,0),ME(t,y),Ed(t.a,y.a),t.e.a=y.e.a,t.e.b=y.e.b)},Rg(mP,"SimpleRowGraphPlacer",432),$S(433,1,_A,B),tA.$b=function(e,t){return function(e,t){var n;return 0==(n=t.k-e.k)?Lx(e.e.a*e.e.b,t.e.a*t.e.b):n}(Yf(e,55),Yf(t,55))},Rg(mP,"SimpleRowGraphPlacer/1",433),$S(369,1,kP,Et),tA.sc=function(e,t){VI(e,t)},Rg(_P,"CompoundGraphPostprocessor",369),$S(370,1,wP,H),tA.D=function(e){var t;return!!(t=Yf(kx(Yf(e,114).b,(JI(),kR)),44))&&0!=t.b},Rg(_P,"CompoundGraphPostprocessor/1",370),$S(368,1,kP,Uc),tA.sc=function(e,t){ik(this,e,t)},Rg(_P,"CompoundGraphPreprocessor",368),$S(187,1,{187:1},TE),tA.c=!1,Rg(_P,"CompoundGraphPreprocessor/ExternalPort",187),$S(114,1,{114:1},gf),tA.w=function(){return fh(this.c)+":"+Pw(this.b)},Rg(_P,"CrossHierarchyEdge",114),$S(310,1,_A,an),tA.$b=function(e,t){return function(e,t,n){var r,i;return t.c==(nm(),jq)&&n.c==Dq?-1:t.c==Dq&&n.c==jq?1:(r=EC(t.a,e.a),i=EC(n.a,e.a),t.c==jq?i-r:r-i)}(this,Yf(e,114),Yf(t,114))},Rg(_P,"CrossHierarchyEdgeComparator",310),$S(147,131,{179:1,131:1,147:1,3:1}),tA.k=0,Rg(SP,"LGraphElement",147),$S(12,147,{179:1,131:1,12:1,147:1,3:1},Dp),tA.w=function(){return Pw(this)};var AH=Rg(SP,"LEdge",12);$S(55,147,{179:1,131:1,55:1,147:1,3:1,22:1},Bw),tA.mb=function(){return new Zn(this.c)},tA.w=function(){return 0==this.c.c.length?"G-unlayered"+nN(this.b):0==this.b.c.length?"G-layered"+nN(this.c):"G[layerless"+nN(this.b)+", layers"+nN(this.c)+"]"};var MH=Rg(SP,"LGraph",55);$S(273,1,{}),tA.pc=function(){return this.e.j},Rg(SP,"LGraphAdapters/AbstractLShapeAdapter",273),$S(240,1,{627:1},sn),tA.b=null,Rg(SP,"LGraphAdapters/LEdgeAdapter",240),$S(325,1,{},Cs),tA.pc=function(){return this.a.e},tA.b=null,tA.c=!1,Rg(SP,"LGraphAdapters/LGraphAdapter",325),$S(224,273,{129:1,224:1},cn),Rg(SP,"LGraphAdapters/LLabelAdapter",224),$S(555,273,{626:1},ks),tA.a=null,tA.b=null,tA.c=!1,Rg(SP,"LGraphAdapters/LNodeAdapter",555),$S(556,273,{161:1},_s),tA.a=null,tA.b=null,tA.c=null,tA.d=!1,Rg(SP,"LGraphAdapters/LPortAdapter",556),$S(557,1,_A,F),tA.$b=function(e,t){return function(e,t){var n,r,i,o;if(0!=(o=e.g.e-t.g.e))return o;if(n=Yf(kx(e,(JI(),YR)),24),r=Yf(kx(t,YR),24),n&&r&&0!=(i=n.a-r.a))return i;switch(e.g.e){case 1:return Lx(e.i.a,t.i.a);case 2:return Lx(e.i.b,t.i.b);case 3:return Lx(t.i.a,e.i.a);case 4:return Lx(t.i.b,e.i.b);default:throw new Eo(OP)}}(Yf(e,7),Yf(t,7))},Rg(SP,"LGraphAdapters/PortComparator",557),$S(168,1,{168:1},Dt,Bp),tA.t=function(e){var t;return!!hl(e,168)&&(t=Yf(e,168),this.d==t.d&&this.a==t.a&&this.b==t.b&&this.c==t.c)},tA.v=function(){var e;return e=yv(ro(this.b))<<16,(e|=yv(ro(this.a))&xA)^(yv(ro(this.c))<<16|yv(ro(this.d))&xA)},tA.w=function(){return"Insets[top="+this.d+",left="+this.b+",bottom="+this.a+",right="+this.c+"]"},tA.a=0,tA.b=0,tA.c=0,tA.d=0,Rg(SP,"LInsets",168),$S(165,147,{179:1,131:1,147:1,165:1,3:1}),Rg(SP,"LShape",165),$S(33,165,{179:1,131:1,147:1,33:1,165:1,3:1},xu),tA.w=function(){return null==this.a?"l_"+this.k:"l_"+this.a},Rg(SP,"LLabel",33),$S(9,165,{179:1,131:1,147:1,9:1,165:1,3:1},_k),tA.w=function(){return pv(this)};var PH,DH,jH,RH,GH,BH,HH=Rg(SP,"LNode",9);$S(132,17,{132:1,3:1,23:1,17:1},Ss);var FH,YH,zH,VH,UH,qH,XH=ew(SP,"LNode/NodeType",132,jD,(function(){return j_(),Sx(Io(XH,1),HA,132,0,[GH,RH,DH,BH,jH,PH])}));$S(7,165,{179:1,131:1,147:1,7:1,165:1,3:1},__),tA.w=function(){var e;return null==(e=ay(this))?"p_"+this.k:"p_"+e};var WH=Rg(SP,"LPort",7);$S(399,1,wP,Y),tA.D=function(e){return Dh(e)},Rg(SP,"LPort/1",399),$S(400,1,wP,z),tA.D=function(e){return Ph(e)},Rg(SP,"LPort/2",400),$S(401,1,wP,V),tA.D=function(e){return Yf(e,7).g==(wI(),AG)},Rg(SP,"LPort/3",401),$S(402,1,wP,U),tA.D=function(e){return Yf(e,7).g==(wI(),IG)},Rg(SP,"LPort/4",402),$S(403,1,wP,q),tA.D=function(e){return Yf(e,7).g==(wI(),ZG)},Rg(SP,"LPort/5",403),$S(404,1,wP,X),tA.D=function(e){return Yf(e,7).g==(wI(),KG)},Rg(SP,"LPort/6",404),$S(190,1,aM,un),tA.mb=function(){return new ln(new Zn(this.a.b))},Rg(SP,"LPort/7",190),$S(405,1,qA,ln),tA.H=function(){return Yf(Qv(this.a),12).c},tA.G=function(){return fl(this.a)},tA.I=function(){lg(this.a)},Rg(SP,"LPort/7/1",405),$S(169,1,aM,hn),tA.mb=function(){return new fn(new Zn(this.a.e))},Rg(SP,"LPort/8",169),$S(304,1,qA,fn),tA.H=function(){return Yf(Qv(this.a),12).d},tA.G=function(){return fl(this.a)},tA.I=function(){lg(this.a)},Rg(SP,"LPort/8/1",304),$S(16,147,{179:1,131:1,147:1,16:1,3:1,22:1},xg),tA.mb=function(){return new Zn(this.a)},tA.w=function(){return"L_"+Qy(this.b.c,this,0)+nN(this.a)},Rg(SP,"Layer",16),$S(437,1,kP,W),tA.sc=function(e,t){var n,r,i,o;for(FC(t,"Big nodes intermediate-processing",1),this.a=e,r=new Zn(this.a.c);r.ao?50:o,n=new Pt,d=o+this.d,l=new Zn(h);l.ad){for(f=1,r=a.j.a;r>o;)++f,r=(a.j.a-(f-1)*this.d)/f;Tf(n,new Bb(this,a,f,r))}for(s=new Zn(n);s.aa?50:a,n=new Pt,g=a+this.d,h=new Zn(f);h.ag){for(d=1,r=s.j.a;r>a;)++d,r=(s.j.a-(d-1)*this.d)/d;Tf(n,new ev(this,s,d))}for(c=new Zn(n);c.a0||l.g==KG&&l.b.c.length-l.e.c.length<0)){n=!1;break}if(l.g==KG)for(i=new Zn(l.e);i.a0&&(e.a=c+(f-1)*i,t.d.b+=e.a,t.e.b+=e.a),0!=d.a.Y()&&(f=fL(new mN(1,i),t,d,g,t.e.b+c-t.d.b))>0&&(t.e.b+=c+(f-1)*i)}(this,e,n),function(e){var t,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,C;for(y=new Pt,l=new Zn(e.c);l.a0&&jT((Ey(0,n.c.length),Yf(n.c[0],16)),e),n.c.length>1&&jT(Yf(dd(n,n.c.length-1),16),e),FE(t)},Rg(TP,"HierarchicalPortPositionProcessor",454),$S(471,1,kP,ue),tA.sc=function(e,t){var n,r,i,o,a,s,c,u,l,h,f;for(FC(t,"Hyperedge merging",1),l=new $v(e.c,0);l.b(d=f.c.length)+1?Tf(l,new Ja(c,(Ey(h=(s+d)/2|0,a.c.length),Yf(a.c[h],9)))):d>s+1&&Tf(l,new Ja(c,(Ey(h=((d-s)/2|0)-1,f.c.length),Yf(f.c[h],9))))}for(v=new Zn(l);v.a=2){for(c=!0,Ey(1,s.c.length),g=Yf(s.c[1],16),h=new Zn(r.a);h.a=2){for(c=!0,p=Yf(dd(s,s.c.length-2),16),h=new Zn(i.a);h.an?c:n}e.e.b=c-u,e.d.b-=u,FE(t)},Rg(TP,"LayerSizeAndGraphHeightCalculator",496),$S(497,1,kP,Se),tA.sc=function(e,t){var n,r,i,o;for(FC(t,"Edge joining",1),n=no(ro(Sh(kx(e,($I(),Bq))))),r=new Zn(e.c);r.a0&&Tf(e.p,l),Tf(e.o,l);d=c+(t-=r),u+=t*e.e,Kb(e.a,s,WE(d)),Kb(e.b,s,u),e.j=Ho(e.j,d),e.k=Go(e.k,u),e.d+=t,t+=p}}(this),this.q=Yf(kx(e,($I(),aX)),109),c=Yf(kx(this.g,sX),24).a,i=new Ie,this.q.e){case 2:case 1:default:IL(this,i);break;case 3:for(this.q=(nO(),aY),IL(this,i),a=0,o=new Zn(this.a);o.athis.j&&(this.q=eY,IL(this,i));break;case 4:for(this.q=(nO(),aY),IL(this,i),s=0,r=new Zn(this.b);r.athis.k&&(this.q=rY,IL(this,i));break;case 6:IL(this,new mn(yv(Ic(this.f.length*c/100))));break;case 5:IL(this,new xn(yv(Ic(this.d*c/100))))}!function(e,t){var n,r,i,o,a,s;for(i=new Pt,n=0;n<=e.i;n++)(r=new xg(t)).k=e.i-n,i.c[i.c.length]=r;for(s=new Zn(e.o);s.a=2){for(g=!0,n=Yf(Qv(h=new Zn(o.f)),7);h.a(r-=e.a)?i:r}return i}(this,e),d=e.c.c.length,p=function(e,t){var n,r,i,o,a;for(r=0,n=new Zn(t.c);n.a(a=(i=Yf(Qv(o),9)).j.a+i.e.c+i.e.b+e.b)?r:a;return r}(this,e),S=d*p,(r=(i=Yf(kx(e,(JI(),gR)),59))==(CE(),Oj)||i==Tj||i==Lj?Yf(kx(e,OU),15).a:1/Yf(kx(e,OU),15).a)>(n=S/g))FE(t);else{_=0,o=RP;do{f=o,o=(n=S/++_/(g*_))-r<=0?0-(n-r):n-r}while(n>r);for(f_?1:_)|0,m=C,L=!0;u=C&&(L=!0),++m,++u}for(l=new $v(e.c,0);l.b "+this.a+" "+fh(this.c)},tA.a=0,tA.b=0,tA.d=0,Rg(TP,"SplineSelfLoopRouter/LoopPadding",91),$S(521,1,wP,Kf),tA.D=function(e){return function(e,t){return!!function(e){switch(e.e){case 0:return iV;case 1:return tV;case 2:return eV;case 3:return sV;case 4:return aV;case 5:return fV;case 6:return hV;case 7:return oV;case 8:return nV;case 9:return rV;case 11:return uV;case 10:return cV;default:return lV}}(e.b).kb(t.c)&&(function(e){return e==$z||e==Xz}(e.b)?!(qf(t.d,e.c,e.a)&&qf(t.a,e.c,e.a)):qf(t.d,e.c,e.a)&&qf(t.a,e.c,e.a))}(this,Yf(e,91))},tA.a=0,tA.c=0,Rg(TP,"SplineSelfLoopRouter/LoopPadding/EnclosingPredicate",521),$S(520,1,_A,Qe),tA.$b=function(e,t){return function(e,t){return Lx(t.b,e.b)}(Yf(e,91),Yf(t,91))},Rg(TP,"SplineSelfLoopRouter/LoopPadding/MarginComparator",520),$S(196,1,wP,En),tA.D=function(e){return Yf(e,91).c==this.a},Rg(TP,"SplineSelfLoopRouter/LoopPadding/PortSidePredicate",196),$S(195,1,{195:1},Eb),tA.c=0,tA.d=0,tA.e=0,Rg(TP,"SplineSelfLoopRouter/SelfLoopEdge",195),$S(519,1,_A,Je),tA.$b=function(e,t){return function(e,t){return e.d-t.d}(Yf(e,195),Yf(t,195))},Rg(TP,"SplineSelfLoopRouter/SelfLoopEdge/StepSizeComparator",519),$S(82,25,{25:1,82:1},SS),tA.vc=function(){var e,t;for(e=Tk(this.a,0);e.b!=e.d.c;)Yf(Tb(e),10).a=this.j.d;for(t=Tk(this.c,0);t.b!=t.d.c;)Yf(Tb(t),10).a=this.j.d},tA.wc=function(){return this.b},tA.xc=function(){return this.e},tA.w=function(){return nN(new Yn(this.d.a))},tA.b=0,tA.e=0,Rg(FP,"CLEdge",82),$S(93,25,{25:1,93:1},rT),tA.vc=function(){this.b.i.a=this.j.d+this.b.e.b},tA.wc=function(){return this.b.g==(j_(),DH)?0:this.a},tA.xc=function(){return this.b.g==(j_(),DH)?0:this.c},tA.w=function(){return Vk(kx(this.b,(ZI(),oq)))},tA.a=0,tA.c=0,Rg(FP,"CLNode",93),$S(175,17,{175:1,3:1,23:1,17:1},Ms);var dY,gY,pY,vY,bY,yY,wY,mY=ew(FP,"ConstraintCalculationStrategy",175,jD,(function(){return Sb(),Sx(Io(mY,1),HA,175,0,[lY,hY])}));$S(125,17,{125:1,3:1,23:1,17:1},Ps);var xY,EY,CY,kY=ew(FP,"GraphCompactionStrategy",125,jD,(function(){return gN(),Sx(Io(kY,1),HA,125,0,[yY,pY,wY,bY,vY,gY])}));$S(455,1,kP,Yu),tA.sc=function(e,t){var n,r,i;if((r=Yf(kx(e,($I(),lX)),125))!=(gN(),yY)){switch(FC(t,"Horizontal Compaction",1),this.a=e,go(n=new wS(function(e,t){var n,r,i;e.d=t,wy(e.b),e.c=!1;e:for(n=new Zn(e.d.c);n.ao.j.e+o.j.b?d.d=!0:(d.d=!0,d.c=!0))),r.b!=r.d.c&&(t=n);d&&(a=Yf(Kg(y,c.d.f),25),t.ba.j.e+a.j.b?d.d=!0:(d.d=!0,d.c=!0))}for(u=Lg(qE(v));eC(u);)0!=(c=Yf(_v(u),12)).a.b&&(t=Yf(Gl(c.a),10),c.d.g==(wI(),AG)&&((C=new IO(t,new Qa(t.a,o.j.e),o,c)).c=!0,E.c[E.c.length]=C),c.d.g==ZG&&((C=new IO(t,new Qa(t.a,o.j.e+o.j.b),o,c)).d=!0,E.c[E.c.length]=C))}if(0!=E.c.length){for(Fp(),xb(E,null),Ey(0,E.c.length),i=new SS(Yf(E.c[0],142),e.d),f=1;f(r=Math.ceil(r))?0:r,t.o&&o.o&&hl(t,82)&&hl(o,82)&&!Aw(Kw(Yf(t,82).d,Yf(o,82).d))?(i=rl(new jr,e.d),s=yv(Ic(o.g.a-t.g.a)),wO(da(pa(va(ga(new Dr,0>s?0:s),1),i),e.c[t.f.d])),wO(da(pa(va(ga(new Dr,0>-s?0:-s),1),i),e.c[o.f.d]))):(u=1,(hl(t,82)&&hl(o,93)||hl(o,82)&&hl(t,93))&&(u=2),wO(da(pa(va(ga(new Dr,yv(r)),u),e.c[t.f.d]),e.c[o.f.d]))))}(this),function(e){var t,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b;for(ml(),l=new Er,c=new Xs,r=new Zn(e.a.a.b);r.at.j.d){if((d=e.c[t.f.d])==(v=e.c[h.f.d]))continue;wO(da(pa(va(ga(new Dr,1),100),d),v))}}}(this),function(e){var t,n,r,i,o,a;for(i=new co,r=new Zn(e.d.a);r.a1)for(t=rl(ya(new jr,e.b++),e.d),a=Tk(i,0);a.b!=a.d.c;)o=Yf(Tb(a),61),wO(da(pa(va(ga(new Dr,1),0),t),o))}(this),vT(Kh(this.d),new Yh),i=new Zn(this.a.a.b);i.a0&&(this.a[B.k]=$++)}else{for(M=0,H=new Zn(N.f);H.a0&&++$}for(te=0,T=0,A=t.length;T0;){for(Tu(z.b>0),Y=0,a=new Zn((B=Yf(z.a.sb(z.c=--z.b),7)).b);a.a0&&(B.g==(wI(),AG)?(this.a[B.k]=te,++te):(this.a[B.k]=te+P+j,++j))}te+=j}else{for(M=0,H=new Zn(N.f);H.a0&&++te}for(F=new Er,g=new Ki,S=0,L=e.length;Sl.c&&(l.c=V)):B.f.d==Z&&(Vl.d&&(l.d=V));for(Fk(p,0,p.length,(Js(),Js(),FX)),ee=_y(iW,vM,26,p.length,12,1),n=_y(iW,vM,26,te+1,12,1),b=0;b0;)x%2>0&&(r+=ie[x+1]),++ie[x=(x-1)/2|0];for(k=_y(NY,GA,158,2*p.length,0,1),m=0;mt.f?1:e.gt.g?1:e.b-t.b}(this,Yf(e,204))},tA.b=0,tA.c=0,tA.d=0,tA.f=0,tA.g=0;var _Y=Rg(YP,"BetweenLayerHyperedgeAllCrossingsCounter/Hyperedge",204);$S(158,1,{158:1,23:1},xp),tA.F=function(e){return function(e,t){return e.ct.c?1:e.bt.b?1:e.a!=t.a?e.a.b-t.a.b:0==e.d&&1==t.d?-1:1==e.d&&0==t.d?1:0}(this,Yf(e,158))},tA.b=0,tA.c=0,tA.d=0;var NY=Rg(YP,"BetweenLayerHyperedgeAllCrossingsCounter/HyperedgeCorner",158);$S(611,339,{},Ui),tA.Gc=function(e,t){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,C;for(C=0,i=0,a=e[0].d,w=t[0].d,u=0,h=t.length;u0;){for(Tu(y.b>0),b=0,r=new Zn((p=Yf(y.a.sb(y.c=--y.b),7)).b);r.a0&&(p.g==(wI(),AG)?(this.a[p.k]=C,++C):(this.a[p.k]=C+d+g,++g),i+=b)}C+=g}else{for(f=0,v=new Zn(s.f);v.a0&&(++C,i+=f)}for(m=_y(iW,vM,26,i,12,1),o=0,c=0,l=e.length;c0;)o%2>0&&(r+=s[o+1]),++s[o=(o-1)/2|0];return r}(C,i,m),n},Rg(YP,"BetweenLayerStraightEdgeAllCrossingsCounter",611),$S(338,1,{},pN),tA.b=0,tA.e=!1,Rg(YP,"CrossingMatrixFiller",338),$S(447,1,kP,et),tA.sc=function(e,t){var n,r;FC(t,"Greedy switch crossing reduction",1),this.e=Yf(kx(e,($I(),Qq)),110),e.c.c.length<2||this.e==(_L(),lU)||(function(e,t){var n,r,i,o,a,s,c,u;for(e.f=t,i=t.c.c.length,e.a=_y(HH,hA,51,i,0,2),e.d=_y(HH,hA,51,i,0,2),e.g=_y(HH,hA,51,i,0,2),a=new $v(t.c,0);a.bAh(e.d,ju(t.a,t.b))?-1:e.c==t.c&&ju(e.a,e.b)==ju(e.a,e.b)?0:1}(this,Yf(e,226))},tA.w=function(){return"ComparableEdgeAndPort [port="+this.b+", edge="+this.a+", portPosition="+this.c+"]"},tA.c=0,Rg(YP,"InLayerEdgeTwoNodeCrossingCounter/ComparableEdgeAndPort",226),$S(612,1,{},e_),tA.e=!0,tA.f=0,tA.g=0,tA.k=!1,Rg(YP,"NorthSouthEdgeAllCrossingsCounter",612),$S(615,1,{},qm),tA.b=0,tA.d=0,tA.e=!1,Rg(YP,"NorthSouthEdgeNeighbouringNodeCrossingsCounter",615),$S(143,1,aM,Fh),tA.mb=function(){return bO(this)},tA.b=0,Rg(YP,"PortIterable",143),$S(344,1,qA,Lv),tA.H=function(){return Yf(hg(this.a),7)},tA.G=function(){return this.a.b>0},tA.I=function(){throw new Zr},Rg(YP,"PortIterable/1",344),$S(336,1,{},B_),Rg(YP,"SwitchDecider",336),$S(89,1,{89:1},tt),tA.w=function(){return"NEdge[id="+this.b+" w="+this.f+" d="+this.a+"]"},tA.a=1,tA.b=0,tA.e=!1,tA.f=0;var SY=Rg(VP,"NEdge",89);$S(157,1,{},Dr),Rg(VP,"NEdge/NEdgeBuilder",157),$S(278,1,{},Pr),Rg(VP,"NGraph",278),$S(61,1,{61:1},jb),tA.b=0,tA.d=-1,tA.e=0,tA.i=-1,tA.j=!1;var OY,TY,LY=Rg(VP,"NNode",61);$S(333,13,xP,Yr),tA.rb=function(e,t){++this.d,xy(e,this.c.length),Nc(this.c,e,t)},tA.ib=function(e){return Cg(this,e)},tA.jb=function(e){return++this.d,ox(this,e)},tA.Q=function(){++this.d,this.c=_y(_D,GA,1,0,4,1)},tA.vb=function(e){return++this.d,yy(this,e)},tA.nb=function(e){return Mu(this,e)},Rg(VP,"NNode/ChangeAwareArrayList",333),$S(199,1,{},jr),Rg(VP,"NNode/NNodeBuilder",199),$S(595,1,{},nt),tA.a=!1,tA.f=yA,tA.j=0,Rg(VP,"NetworkSimplex",595),$S(193,17,{180:1,193:1,3:1,23:1,17:1},Ds),tA.rc=function(){switch(this.e){case 0:return new If;case 1:return new mt;default:throw new oo("No implementation is available for the cycle breaker "+(null!=this.d?this.d:""+this.e))}};var IY,AY,MY,PY,DY,jY,RY=ew(qP,"CycleBreakingStrategy",193,jD,(function(){return zp(),Sx(Io(RY,1),HA,193,0,[OY,TY])}));$S(539,1,XP,If),tA.qc=function(e){return AY},tA.sc=function(e,t){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,C,k,_,N,S,O,T,L,I;for(FC(t,"Greedy cycle removal",1),I=(b=e.b).c.length,this.a=_y(iW,vM,26,I,12,1),this.c=_y(iW,vM,26,I,12,1),this.b=_y(iW,vM,26,I,12,1),s=0,p=new Zn(b);p.a0?_+1:1);for(i=new Zn(m.e);i.a0?_+1:1)}0==this.c[s]?Of(this.d,d):0==this.a[s]&&Of(this.e,d),++s}for(f=-1,h=1,u=new Pt,N=Yf(kx(e,(ZI(),bq)),154);I>0;){for(;0!=this.d.b;)O=Yf(yf(this.d),9),this.b[O.k]=f--,PT(this,O),--I;for(;0!=this.e.b;)T=Yf(yf(this.e),9),this.b[T.k]=h++,PT(this,T),--I;if(I>0){for(l=kA,v=new Zn(b);v.a=l&&(y>l&&(u.c=_y(_D,GA,1,0,4,1),l=y),u.c[u.c.length]=d);c=Yf(dd(u,Zk(N,u.c.length)),9),this.b[c.k]=h++,PT(this,c),--I}}for(S=b.c.length+1,s=0;sthis.b[L]&&(QT(n,!0),Ky(e,FU,(zd(),zd(),OX)));this.a=null,this.c=null,this.b=null,Ip(this.e),Ip(this.d),FE(t)},Rg(qP,"GreedyCycleBreaker",539),$S(540,1,XP,mt),tA.qc=function(e){return MY},tA.sc=function(e,t){var n,r,i,o,a,s,c,u,l,h,f,d;for(FC(t,"Interactive cycle breaking",1),u=new Pt,h=new Zn(e.b);h.a0&&IN(this,a,u);for(r=new Zn(u);r.a(a=s+u.j.a)?s+1:a,p=new $v(n,0),r=null;p.b=a){Tu(p.b>0),p.a.sb(p.c=--p.b);break}d.a>s&&(r?(ox(r.b,d.b),r.a=Go(r.a,d.a),sp(p)):(Tf(d.b,u),d.c=Fo(d.c,s),d.a=Go(d.a,a),r=d))}r||((r=new Rr).c=s,r.a=a,Jh(p,r),Tf(r.b,u))}for(o=e.c,c=0,g=new Zn(n);g.a0&&(n+=a.i.a+a.j.a/2,++u),l=new Zn(a.f);l.a1&&(e.c[l]=!0):y.g==KG&&y.e.c.length+y.b.c.length>1&&(e.d[l]=!0)}p.g==(j_(),BH)&&(++s[l],o[l]=!0)}for(n=!0,g=!0,a=0;a0;S++){c=(u=0!=IS(N,1))?0:p-1,s=this.b[c],k=0!=IS(N,1)?E:y,rC(s,i,u,!1,!0),o=yA,a=!0;do{if(Dm(this.b,this.k),_=o,o=0,o+=iw(this.f,s,c),u){for(v=1;v=0;v--)l=this.b[v],by(k,s,(nm(),Dq)),rC(l,i,!1,!a,!1),o+=iw(this.f,l,v),this.c[v]||this.d[v+1]?o+=QI(this.e,l,s):o+=zI(this.i,l,s),s=l;c=0}a=!1,u=!u}while(o<_&&o>0);(or?o:r;if(o>a){for(l=yC(e,n).mb();l.G();)f[(u=Yf(l.H(),7)).k]=t+zS(n,u.g)-a;return o-a}return 0}switch(n.e){case 1:for(i=0,s=0,h=new Zn(e.f);h.a"),et.e?1:e.ft.f?1:lh(e)-lh(t)}(this,Yf(e,197))},tA.b=0,tA.c=0,tA.e=0,tA.f=0;var ez=Rg(rD,"HyperedgeCrossingsCounter/Hyperedge",197);$S(156,1,{156:1,23:1},Rp),tA.F=function(e){return function(e,t){return e.ct.c?1:e.bt.b?1:e.a!=t.a?lh(e.a)-lh(t.a):e.d==(hb(),nz)&&t.d==tz?-1:e.d==tz&&t.d==nz?1:0}(this,Yf(e,156))},tA.b=0,tA.c=0;var tz,nz,rz=Rg(rD,"HyperedgeCrossingsCounter/HyperedgeCorner",156);$S(242,17,{242:1,3:1,23:1,17:1},oc);var iz,oz,az,sz,cz=ew(rD,"HyperedgeCrossingsCounter/HyperedgeCorner/Type",242,jD,(function(){return hb(),Sx(Io(cz,1),HA,242,0,[nz,tz])}));$S(545,1,XP,Nt),tA.qc=function(e){return Yf(kx(e,(ZI(),WU)),18).kb((KO(),nU))?iz:null},tA.sc=function(e,t){var n;for(FC(t,"Interactive node placement",1),this.a=Yf(kx(e,(ZI(),xq)),134),n=new Zn(e.c);n.a(N=Yf(kx(n,(ZI(),pq)),24).a)?h:N;for(r=new Zn(k.e);r.a(N=Yf(kx(n,(ZI(),pq)),24).a)?C:N}Ky(w,az,WE(h)),Ky(w,sz,WE(C))}for(v=0,f=new Zn(t.c);f.a=0){for(c=null,s=new $v(l.a,u+1);s.b0&&u[r]&&(g=tf(e.b,u[r],c)),p=Go(p,i.d.c.b+g);for(o=new Zn(l.f);o.am)?(c=2,a=yA):0==c?(c=1,a=E):(c=0,a=E):(f=E>=a||a-E0?(l=Yf(dd(h.d.a,o-1),9),C=Cf(e.b,h,l),p=h.i.b-h.e.d-(l.i.b+l.j.b+l.e.a+C)):p=h.i.b-h.e.d,c=p0?C:0,d.c=n,d.d=Yf(Kg(w,u.c.f),61),Cg(d.c.g,d),Cg(d.d.c,d),(N=new tt).f=Rk(u),N.a=C<0?-C:0,N.c=n,N.d=Yf(Kg(w,u.d.f),61),Cg(N.c.g,N),Cg(N.d.c,N));for(i=Yf(kx(e,($I(),pX)),24).a*yv(Math.sqrt(y)),vT(po(vo(Kh(r),i),!1),Mm(t,1)),p=new Zn(r.a);p.aa&&(a=Yf(kx(n,pq),24).a);for(r=Lg(qE(s));eC(r);)n=Yf(_v(r),12),s.d!=n.c.f.d&&Yf(kx(n,(ZI(),pq)),24).a==a&&Tf(u,new Ja(n.c.f,n));xb(u,e.c),Ld(e.b,s.k,u)}}(h,e),h.f=Ol(h.d),function(e,t){var n,r,i,o,a,s,c,u;for(o=new Zn(t.c);o.aa&&(a=Yf(kx(n,pq),24).a);for(r=Lg(XE(s));eC(r);)n=Yf(_v(r),12),s.d!=n.d.f.d&&Yf(kx(n,(ZI(),pq)),24).a==a&&Tf(u,new Ja(n.d.f,n));xb(u,e.c),Ld(e.f,s.k,u)}}(h,e),h}(e),this.a=no(ro(Sh(kx(e,($I(),Uq))))),this.e=Wc(kx(e,Kq))===Wc((M_(),UV)),function(e,t){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w;if(!((p=t.c.c.length)<3)){for(d=_y(iW,vM,26,p,12,1),h=0,l=new Zn(t.c);l.aa)&&_g(e.c,Yf(v.b,12));++s}o=a}}}(this,e),Nw(4,dM),f=new cw(4),Yf(kx(e,Kq),124).e){case 3:d=new yO(e,this.d.d,(ub(),xz),(hv(),yz)),f.c[f.c.length]=d;break;case 1:g=new yO(e,this.d.d,(ub(),Ez),(hv(),yz)),f.c[f.c.length]=g;break;case 4:b=new yO(e,this.d.d,(ub(),xz),(hv(),wz)),f.c[f.c.length]=b;break;case 2:y=new yO(e,this.d.d,(ub(),Ez),(hv(),wz)),f.c[f.c.length]=y;break;default:d=new yO(e,this.d.d,(ub(),xz),(hv(),yz)),g=new yO(e,this.d.d,Ez,yz),b=new yO(e,this.d.d,xz,wz),y=new yO(e,this.d.d,Ez,wz),f.c[f.c.length]=b,f.c[f.c.length]=y,f.c[f.c.length]=d,f.c[f.c.length]=g}for(n=new fc(e,this.d),o=new Zn(f);o.aE[c]&&(g=c),l=new Zn(e.b.c);l.axS(r))&&(u=r);for(!u&&(Ey(0,f.c.length),u=Yf(f.c[0],81)),h=new Zn(e.c);h.a0?1:r<0?-1:0)}(this,Yf(e,27),Yf(t,27))},Rg(aD,"NeighborhoodInformation/NeighborComparator",598),$S(334,1,{}),Rg(aD,"ThresholdStrategy",334),$S(602,334,{},Ei),tA.Ic=function(e,t,n){return this.a.k==(ub(),Ez)?fP:dP},tA.Jc=function(){},Rg(aD,"ThresholdStrategy/NullThresholdStrategy",602),$S(249,1,{249:1},dc),tA.c=!1,tA.d=!1,Rg(aD,"ThresholdStrategy/Postprocessable",249),$S(603,334,{},Ci),tA.Ic=function(e,t,n){var r,i,o;return i=t==n,r=this.a.a[n.k]==t,i||r?(o=e,this.a.c,hv(),i&&(o=sL(this,t,!0)),(o==1/0||o==-1/0)&&r&&(o=sL(this,n,!1)),o):e},tA.Jc=function(){for(var e,t,n;0!=this.d.b;)(t=eT(this,n=Yf(Kp(this.d),249))).a&&(e=t.a,this.c.a[e.c.f.d.k]!==this.c.a[e.d.f.d.k]&&(GS(this,n)||su(this.e,n)));for(;0!=this.e.a.c.length;)GS(this,Yf(Vx(this.e),249))},Rg(aD,"ThresholdStrategy/SimpleThresholdStrategy",603),$S(423,1,{180:1},st),tA.rc=function(){switch(this.a.e){case 1:return new Hc;case 3:return new It;default:return new Lt}},Rg(sD,"EdgeRouterFactory",423),$S(538,1,XP,Lt),tA.qc=function(e){var t,n;return n=Yf(kx(e,(ZI(),WU)),18),t=new iC,n.kb((KO(),rU))&&(Am(t,Az),Am(t,Pz)),(n.kb(oU)||no(ro(Sh(kx(e,($I(),$q))))))&&(Am(t,Pz),n.kb(aU)&&Am(t,Dz)),n.kb(nU)&&Am(t,Iz),n.kb(cU)&&Am(t,jz),n.kb(iU)&&Am(t,Mz),n.kb(JV)&&Am(t,Tz),n.kb(tU)&&Am(t,Lz),t},tA.sc=function(e,t){var n,r,i,o,a,s,c,u,l,h,f,d;FC(t,"Orthogonal edge routing",1),f=Yf(kx(e,(ZI(),xq)),134),no(ro(Sh(kx(e,(JI(),dR))))),l=new mN(0,f.a),d=0,o=new $v(e.c,0),a=null,s=null;do{u=(c=o.b0?(n=f.b+(h-1)*f.a,c&&(n+=f.b),n"+this.b},tA.c=0,Rg(sD,"OrthogonalRoutingGenerator/Dependency",118),$S(80,1,{80:1,23:1},Wm),tA.F=function(e){return function(e,t){return e.d-t.d}(this,Yf(e,80))},tA.t=function(e){var t;return!!hl(e,80)&&(t=Yf(e,80),this.d==t.d)},tA.v=function(){return this.d},tA.w=function(){var e,t,n,r;for(e=new Xo("{"),r=new Zn(this.g);r.aCP&&(i=new Qa(c,h),Of(n.a,i),ZO(this.a,n,e,i,!1),o=new Qa(l,h),Of(n.a,o),ZO(this.a,n,e,o,!1))},tA.Lc=function(e){return e.f.i.a+e.i.a+e.a.a},tA.Mc=function(){return wI(),ZG},tA.Nc=function(){return wI(),AG},Rg(sD,"OrthogonalRoutingGenerator/NorthToSouthRoutingStrategy",580),$S(581,1,{},Dn),tA.Kc=function(e,t){var n,r,i,o,a,s,c,u,l,h;for(h=t-e.i*this.a.c,s=new Zn(e.g);s.aCP&&(i=new Qa(c,h),Of(n.a,i),ZO(this.a,n,e,i,!1),o=new Qa(l,h),Of(n.a,o),ZO(this.a,n,e,o,!1))},tA.Lc=function(e){return e.f.i.a+e.i.a+e.a.a},tA.Mc=function(){return wI(),AG},tA.Nc=function(){return wI(),ZG},Rg(sD,"OrthogonalRoutingGenerator/SouthToNorthRoutingStrategy",581),$S(579,1,{},jn),tA.Kc=function(e,t){var n,r,i,o,a,s,c,u,l,h;for(h=t+e.i*this.a.c,s=new Zn(e.g);s.aCP&&(i=new Qa(h,c),Of(n.a,i),ZO(this.a,n,e,i,!0),o=new Qa(h,l),Of(n.a,o),ZO(this.a,n,e,o,!0))},tA.Lc=function(e){return e.f.i.b+e.i.b+e.a.b},tA.Mc=function(){return wI(),IG},tA.Nc=function(){return wI(),KG},Rg(sD,"OrthogonalRoutingGenerator/WestToEastRoutingStrategy",579),$S(535,1,XP,Hc),tA.qc=function(e){var t,n;return n=Yf(kx(e,(ZI(),WU)),18),t=new iC,(n.kb((KO(),oU))||no(ro(Sh(kx(e,($I(),$q))))))&&(Am(t,Bz),n.kb(aU)&&Am(t,Hz)),n.kb(JV)&&Am(t,Rz),n.kb(tU)&&Am(t,Gz),t},tA.sc=function(e,t){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x;for(FC(t,"Polyline edge routing",1),h=Yf(kx(e,(ZI(),mq)),15).a,n=Yf(kx(e,($I(),Zq)),15).a,v=0,0!=e.c.c.length&&(v=.4*n*(b=HS(Yf(dd(e.c,0),16)))),o=new $v(e.c,0);o.b0&&(v-=h),DL(i,v),c=0,l=new Zn(i.a);l.a(p-g<=0?0-(p-g):p-g)?s:p-g<=0?0-(p-g):p-g;switch(u.g.e){case 0:case 4:case 1:case 3:lL(this,u,v)}c=c>s?c:s}o.b(b=HS((Tu(o.b0),o.a.sb(o.c=--o.b)),a=.4*n*c,!r&&o.b0?((f=(b+1)*this.a)=0&&(L+=(b+2)*this.a)}p=m,c=u}while(m);for(r=new Zn(S);r.a("+this.c+") "+this.b},tA.c=0,Rg(cD,"SplineEdgeRouter/Dependency",117),$S(223,17,{223:1,3:1,23:1,17:1},gc);var NV,SV,OV,TV,LV,IV,AV=ew(cD,"SplineEdgeRouter/SideToProcess",223,jD,(function(){return fv(),Sx(Io(AV,1),HA,223,0,[CV,kV])}));$S(77,1,{77:1,23:1},KN,ML),tA.F=function(e){return function(e,t){return e.i-t.i}(this,Yf(e,77))},tA.a=0,tA.b=0,tA.e=0,tA.f=!1,tA.i=0,tA.k=0,tA.n=0,tA.p=0,Rg(cD,"SplineEdgeRouter/SplineHyperEdge",77),$S(123,17,{123:1,3:1,23:1,17:1},pc);var MV,PV,DV,jV,RV=ew(dD,"ContentAlignment",123,jD,(function(){return P_(),Sx(Io(RV,1),HA,123,0,[IV,LV,TV,SV,NV,OV])}));$S(218,17,{218:1,3:1,23:1,17:1},vc);var GV,BV,HV,FV,YV,zV=ew(dD,"EdgeConstraint",218,jD,(function(){return Dx(),Sx(Io(zV,1),HA,218,0,[DV,PV,jV])}));$S(115,17,{115:1,3:1,23:1,17:1},bc);var VV,UV,qV,XV,WV,ZV,$V,KV=ew(dD,"EdgeLabelSideSelection",115,jD,(function(){return w_(),Sx(Io(KV,1),HA,115,0,[BV,GV,FV,HV,YV])}));$S(124,17,{124:1,3:1,23:1,17:1},yc);var QV,JV,eU,tU,nU,rU,iU,oU,aU,sU,cU,uU=ew(dD,"FixedAlignment",124,jD,(function(){return M_(),Sx(Io(uU,1),HA,124,0,[WV,XV,$V,qV,ZV,UV])}));$S(113,17,{113:1,3:1,23:1,17:1},wc);var lU,hU,fU,dU,gU,pU,vU,bU,yU=ew(dD,"GraphProperties",113,jD,(function(){return KO(),Sx(Io(yU,1),HA,113,0,[eU,nU,rU,iU,oU,aU,cU,JV,tU,sU])}));$S(110,17,{110:1,3:1,23:1,17:1},kb),tA.a=!1,tA.b=!1,tA.c=!1;var wU,mU,xU,EU,CU=ew(dD,"GreedySwitchType",110,jD,(function(){return _L(),Sx(Io(CU,1),HA,110,0,[hU,pU,fU,vU,dU,bU,gU,lU])}));$S(140,17,{140:1,3:1,23:1,17:1},mc);var kU,_U,NU=ew(dD,"InLayerConstraint",140,jD,(function(){return Rw(),Sx(Io(NU,1),HA,140,0,[xU,EU,mU])}));$S(174,17,{174:1,3:1,23:1,17:1},xc);var SU,OU,TU,LU,IU,AU,MU,PU,DU,jU,RU,GU,BU,HU,FU,YU,zU,VU,UU,qU,XU,WU,ZU,$U,KU,QU,JU,eq,tq,nq,rq,iq,oq,aq,sq,cq,uq,lq,hq,fq,dq,gq,pq,vq,bq,yq,wq,mq,xq,Eq,Cq,kq,_q,Nq,Sq,Oq,Tq,Lq,Iq,Aq,Mq=ew(dD,"InteractiveReferencePoint",174,jD,(function(){return cb(),Sx(Io(Mq,1),HA,174,0,[kU,_U])}));$S(85,17,{85:1,3:1,23:1,17:1},Ec);var Pq,Dq,jq,Rq,Gq=ew(dD,"LayerConstraint",85,jD,(function(){return qk(),Sx(Io(Gq,1),HA,85,0,[Aq,Oq,Tq,Lq,Iq])}));$S(219,17,{219:1,3:1,23:1,17:1},Cc);var Bq,Hq,Fq,Yq,zq,Vq,Uq,qq,Xq,Wq,Zq,$q,Kq,Qq,Jq,eX,tX,nX,rX,iX,oX,aX,sX,cX,uX,lX,hX,fX,dX,gX,pX,vX,bX,yX,wX,mX=ew(dD,"PortType",219,jD,(function(){return nm(),Sx(Io(mX,1),HA,219,0,[Rq,Dq,jq])}));$S(153,17,{153:1,3:1,23:1,17:1},kc);var xX,EX,CX,kX,_X=ew(dD,"SelfLoopPlacement",153,jD,(function(){return MC(),Sx(Io(_X,1),HA,153,0,[bX,wX,yX])}));$S(134,1,{134:1},pI),tA.a=0,tA.b=0,tA.c=0,tA.d=0,tA.e=0,tA.f=0,Rg(dD,"Spacings",134),$S(172,17,{172:1,3:1,23:1,17:1},_c);var NX,SX,OX,TX=ew(dD,"WideNodesStrategy",172,jD,(function(){return Bm(),Sx(Io(TX,1),HA,172,0,[EX,CX,kX])}));$S(644,1,{}),Rg(MA,"OutputStream",644),$S(645,644,{}),Rg(MA,"FilterOutputStream",645),$S(291,645,{},ut),Rg(MA,"PrintStream",291),$S(255,1,{}),tA.w=function(){return this.a},Rg(LA,"AbstractStringBuilder",255),$S(621,95,dA,ki),Rg(LA,"ArrayIndexOutOfBoundsException",621),$S(290,72,dA,qr,xo),Rg(LA,"ArrayStoreException",290),$S(252,46,fA),Rg(LA,"Error",252),$S(84,252,fA,xr,sw),Rg(LA,"AssertionError",84),aA={3:1,349:1,23:1};var LX=Rg(LA,"Boolean",349);sA={3:1,23:1,184:1,231:1};var IX=Rg(LA,"Double",184);$S(15,231,{3:1,23:1,15:1,231:1},Gn,Bn),tA.F=function(e){return function(e,t){return Lx(e.a,t.a)}(this,Yf(e,15))},tA.t=function(e){return hl(e,15)&&Yf(e,15).a==this.a},tA.v=function(){return yv(this.a)},tA.w=function(){return e=this.a,oi(),""+e;var e},tA.a=0;var AX,MX,PX=Rg(LA,"Float",15);$S(101,72,dA,Xr,Eo),Rg(LA,"IllegalStateException",101),$S(608,72,dA,Co),Rg(LA,"NegativeArraySizeException",608),$S(76,72,{3:1,54:1,76:1,46:1},Wr,ko),Rg(LA,"NullPointerException",76),$S(130,29,{3:1,54:1,29:1,130:1,46:1},_i,Wo),Rg(LA,"NumberFormatException",130),$S(146,1,{3:1,146:1},Gp),tA.t=function(e){var t;return!!hl(e,146)&&(t=Yf(e,146),this.c==t.c&&Np(this.d,t.d)&&Np(this.a,t.a)&&Np(this.b,t.b))},tA.v=function(){return Zx(Sx(Io(_D,1),GA,1,4,[WE(this.c),this.a,this.d,this.b]))},tA.w=function(){return this.a+"."+this.d+"("+(null!=this.b?this.b:"Unknown Source")+(this.c>=0?":"+this.c:"")+")"},tA.c=0;var DX,jX,RX,GX,BX,HX,FX,YX,zX=Rg(LA,"StackTraceElement",146);$S(98,255,{345:1},Qo,Jo,Xo),Rg(LA,"StringBuilder",98),$S(45,72,{3:1,54:1,46:1,45:1},Zr,_o),Rg(LA,"UnsupportedOperationException",45),$S(213,638,XA),tA.Q=function(){wy(this)},tA.R=function(e){return qy(this,e)},tA.ab=function(e){return Jx(this,e,this.e)||Jx(this,e,this.d)},tA.bb=function(){return new Hn(this)},tA.cb=function(e){return Kg(this,e)},tA.db=function(e,t){return yp(this,e,t)},tA.eb=function(e){return Zd(this,e)},tA.Y=function(){return Bs(this)},Rg(WA,"AbstractHashMap",213),$S(120,641,$A,Hn),tA.Q=function(){this.a.Q()},tA.kb=function(e){return fb(this,e)},tA.mb=function(){return new Xx(this.a)},tA.nb=function(e){var t;return!!fb(this,e)&&(t=Yf(e,21).yb(),this.a.eb(t),!0)},tA.Y=function(){return this.a.Y()},Rg(WA,"AbstractHashMap/EntrySet",120),$S(148,1,qA,Xx),tA.H=function(){return Vw(this)},tA.G=function(){return this.b},tA.I=function(){Fy(this)},tA.b=!1,Rg(WA,"AbstractHashMap/EntrySetIterator",148),$S(162,1,qA,Fn),tA.G=function(){return this.b0},tA.L=function(){return this.b},tA.M=function(){return hg(this)},tA.N=function(){return this.b-1},tA.O=function(e){ef(this,e)},Rg(WA,"AbstractList/ListIteratorImpl",43),$S(258,647,KA,Xv),tA.rb=function(e,t){xy(e,this.b),this.c.rb(this.a+e,t),++this.b},tA.sb=function(e){return Ey(e,this.b),this.c.sb(this.a+e)},tA.vb=function(e){var t;return Ey(e,this.b),t=this.c.vb(this.a+e),--this.b,t},tA.wb=function(e,t){return Ey(e,this.b),this.c.wb(this.a+e,t)},tA.Y=function(){return this.b},tA.a=0,tA.b=0,Rg(WA,"AbstractList/SubList",258),$S(36,641,$A,Yn),tA.Q=function(){this.a.Q()},tA.kb=function(e){return this.a.R(e)},tA.mb=function(){return new zn(this.a.bb().mb())},tA.nb=function(e){return!!this.a.R(e)&&(this.a.eb(e),!0)},tA.Y=function(){return this.a.Y()},Rg(WA,"AbstractMap/1",36),$S(40,1,qA,zn),tA.G=function(){return this.a.G()},tA.H=function(){return Yf(this.a.H(),21).yb()},tA.I=function(){this.a.I()},Rg(WA,"AbstractMap/1/1",40),$S(211,640,ZA,Vn),tA.Q=function(){this.a.Q()},tA.kb=function(e){return this.a.ab(e)},tA.mb=function(){return new Un(this.a.bb().mb())},tA.Y=function(){return this.a.Y()},Rg(WA,"AbstractMap/2",211),$S(212,1,qA,Un),tA.G=function(){return this.a.G()},tA.H=function(){return Yf(this.a.H(),21).zb()},tA.I=function(){this.a.I()},Rg(WA,"AbstractMap/2/1",212),$S(210,1,{210:1,21:1}),tA.t=function(e){var t;return!!hl(e,21)&&(t=Yf(e,21),Np(this.d,t.yb())&&Np(this.e,t.zb()))},tA.yb=function(){return this.d},tA.zb=function(){return this.e},tA.v=function(){return Gu(this.d)^Gu(this.e)},tA.Ab=function(e){return pf(this,e)},tA.w=function(){return this.d+"="+this.e},Rg(WA,"AbstractMap/AbstractEntry",210),$S(163,210,{210:1,163:1,21:1},Gc),Rg(WA,"AbstractMap/SimpleEntry",163),$S(652,1,tM),tA.t=function(e){var t;return!!hl(e,21)&&(t=Yf(e,21),Np(this.yb(),t.yb())&&Np(this.zb(),t.zb()))},tA.v=function(){return Gu(this.yb())^Gu(this.zb())},tA.w=function(){return this.yb()+"="+this.zb()},Rg(WA,nM,652),$S(639,638,XA),tA._=function(e){return Cy(this,e)},tA.R=function(e){return Pc(this,e)},tA.bb=function(){return new qn(this)},tA.cb=function(e){return Zc(eE(this,e))},tA.W=function(){return new Xn(this)},Rg(WA,"AbstractNavigableMap",639),$S(287,641,$A,qn),tA.kb=function(e){return hl(e,21)&&Cy(this.b,Yf(e,21))},tA.mb=function(){return new lf(this.b)},tA.nb=function(e){var t;return!!hl(e,21)&&(t=Yf(e,21),Ry(this.b,t))},tA.Y=function(){return this.b.c},Rg(WA,"AbstractNavigableMap/EntrySet",287),$S(229,641,eM,Xn),tA.Q=function(){lo(this.a)},tA.kb=function(e){return Pc(this.a,e)},tA.mb=function(){return new Wn(new lf(new Ql(this.a).b))},tA.nb=function(e){return!!Pc(this.a,e)&&(gp(this.a,e),!0)},tA.Y=function(){return this.a.c},Rg(WA,"AbstractNavigableMap/NavigableKeySet",229),$S(230,1,qA,Wn),tA.G=function(){return Gs(this.a.a)},tA.H=function(){return dh(this.a).yb()},tA.I=function(){td(this.a)},Rg(WA,"AbstractNavigableMap/NavigableKeySet/1",230),$S(4,1,qA,Zn),tA.G=function(){return fl(this)},tA.H=function(){return Qv(this)},tA.I=function(){lg(this)},tA.a=0,tA.b=-1,Rg(WA,"ArrayList/1",4),$S(94,647,pD,$n),tA.kb=function(e){return-1!=function(e,t){var n,r;for(n=0,r=e.Y();nt&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-n)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(e){var t=this.rect.x;t>a.WORLD_BOUNDARY?t=a.WORLD_BOUNDARY:t<-a.WORLD_BOUNDARY&&(t=-a.WORLD_BOUNDARY);var n=this.rect.y;n>a.WORLD_BOUNDARY?n=a.WORLD_BOUNDARY:n<-a.WORLD_BOUNDARY&&(n=-a.WORLD_BOUNDARY);var r=new c(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},e.exports=u},function(e,t,n){"use strict";function r(e,t){null==e&&null==t?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r},function(e,t,n){"use strict";var r=n(2),i=n(10),o=n(0),a=n(6),s=n(3),c=n(1),u=n(13),l=n(12),h=n(11);function f(e,t,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,null!=t&&t instanceof a?this.graphManager=t:null!=t&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var d in f.prototype=Object.create(r.prototype),r)f[d]=r[d];f.prototype.getNodes=function(){return this.nodes},f.prototype.getEdges=function(){return this.edges},f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getParent=function(){return this.parent},f.prototype.getLeft=function(){return this.left},f.prototype.getRight=function(){return this.right},f.prototype.getTop=function(){return this.top},f.prototype.getBottom=function(){return this.bottom},f.prototype.isConnected=function(){return this.isConnected},f.prototype.add=function(e,t,n){if(null==t&&null==n){var r=e;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw"Source or target not in graph!";if(t.owner!=n.owner||t.owner!=this)throw"Both owners must be this graph!";return t.owner!=n.owner?null:(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i)},f.prototype.remove=function(e){var t=e;if(e instanceof s){if(null==t)throw"Node is null!";if(null==t.owner||t.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var n=t.edges.slice(),r=n.length,i=0;i-1&&l>-1))throw"Source and/or target doesn't know this edge!";if(o.source.edges.splice(u,1),o.target!=o.source&&o.target.edges.splice(l,1),-1==(a=o.source.owner.getEdges().indexOf(o)))throw"Not in owner's edge list!";o.source.owner.getEdges().splice(a,1)}},f.prototype.updateLeftTop=function(){for(var e,t,n,r=i.MAX_VALUE,o=i.MAX_VALUE,a=this.getNodes(),s=a.length,c=0;c(e=u.getTop())&&(r=e),o>(t=u.getLeft())&&(o=t)}return r==i.MAX_VALUE?null:(n=null!=a[0].getParent().paddingLeft?a[0].getParent().paddingLeft:this.margin,this.left=o-n,this.top=r-n,new l(this.left,this.top))},f.prototype.updateBounds=function(e){for(var t,n,r,o,a,s=i.MAX_VALUE,c=-i.MAX_VALUE,l=i.MAX_VALUE,h=-i.MAX_VALUE,f=this.nodes,d=f.length,g=0;g(t=p.getLeft())&&(s=t),c<(n=p.getRight())&&(c=n),l>(r=p.getTop())&&(l=r),h<(o=p.getBottom())&&(h=o)}var v=new u(s,l,c-s,h-l);s==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),a=null!=f[0].getParent().paddingLeft?f[0].getParent().paddingLeft:this.margin,this.left=v.x-a,this.right=v.x+v.width+a,this.top=v.y-a,this.bottom=v.y+v.height+a},f.calculateBounds=function(e){for(var t,n,r,o,a=i.MAX_VALUE,s=-i.MAX_VALUE,c=i.MAX_VALUE,l=-i.MAX_VALUE,h=e.length,f=0;f(t=d.getLeft())&&(a=t),s<(n=d.getRight())&&(s=n),c>(r=d.getTop())&&(c=r),l<(o=d.getBottom())&&(l=o)}return new u(a,c,s-a,l-c)},f.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},f.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},f.prototype.calcEstimatedSize=function(){for(var e=0,t=this.nodes,n=t.length,r=0;r=this.nodes.length){var c=0;i.forEach((function(t){t.owner==e&&c++})),c==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},e.exports=f},function(e,t,n){"use strict";var r,i=n(1);function o(e){r=n(5),this.layout=e,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},o.prototype.add=function(e,t,n,r,i){if(null==n&&null==r&&null==i){if(null==e)throw"Graph is null!";if(null==t)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),null!=e.parent)throw"Already has a parent!";if(null!=t.child)throw"Already has a child!";return e.parent=t,t.child=e,e}i=n,n=e;var o=(r=t).getOwner(),a=i.getOwner();if(null==o||o.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==a||a.getGraphManager()!=this)throw"Target not in this graph mgr!";if(o==a)return n.isInterGraph=!1,o.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(n),null==n.source||null==n.target)throw"Edge source and/or target is null!";if(-1!=n.source.edges.indexOf(n)||-1!=n.target.edges.indexOf(n))throw"Edge already in source and/or target incidency list!";return n.source.edges.push(n),n.target.edges.push(n),n},o.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw"Graph not in this graph mgr";if(t!=this.rootGraph&&(null==t.parent||t.parent.graphManager!=this))throw"Invalid parent node!";for(var n,o=[],a=(o=o.concat(t.getEdges())).length,s=0;s=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var o=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(o=1);var a=o*n[0],s=n[1]/o;n[0]a)return n[0]=r,n[1]=c,n[2]=o,n[3]=w,!1;if(io)return n[0]=s,n[1]=i,n[2]=b,n[3]=a,!1;if(ro?(n[0]=l,n[1]=h,C=!0):(n[0]=u,n[1]=c,C=!0):_===S&&(r>o?(n[0]=s,n[1]=c,C=!0):(n[0]=f,n[1]=h,C=!0)),-N===S?o>r?(n[2]=y,n[3]=w,k=!0):(n[2]=b,n[3]=v,k=!0):N===S&&(o>r?(n[2]=p,n[3]=v,k=!0):(n[2]=m,n[3]=w,k=!0)),C&&k)return!1;if(r>o?i>a?(O=this.getCardinalDirection(_,S,4),T=this.getCardinalDirection(N,S,2)):(O=this.getCardinalDirection(-_,S,3),T=this.getCardinalDirection(-N,S,1)):i>a?(O=this.getCardinalDirection(-_,S,1),T=this.getCardinalDirection(-N,S,3)):(O=this.getCardinalDirection(_,S,2),T=this.getCardinalDirection(N,S,4)),!C)switch(O){case 1:I=c,L=r+-g/S,n[0]=L,n[1]=I;break;case 2:L=f,I=i+d*S,n[0]=L,n[1]=I;break;case 3:I=h,L=r+g/S,n[0]=L,n[1]=I;break;case 4:L=l,I=i+-d*S,n[0]=L,n[1]=I}if(!k)switch(T){case 1:M=v,A=o+-E/S,n[2]=A,n[3]=M;break;case 2:A=m,M=a+x*S,n[2]=A,n[3]=M;break;case 3:M=w,A=o+E/S,n[2]=A,n[3]=M;break;case 4:A=y,M=a+-x*S,n[2]=A,n[3]=M}}return!1},i.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},i.getIntersection=function(e,t,n,i){if(null==i)return this.getIntersection2(e,t,n);var o,a,s,c,u,l,h,f=e.x,d=e.y,g=t.x,p=t.y,v=n.x,b=n.y,y=i.x,w=i.y;return 0==(h=(o=p-d)*(c=v-y)-(a=w-b)*(s=f-g))?null:new r((s*(l=y*b-v*w)-c*(u=g*d-f*p))/h,(a*u-o*l)/h)},i.angleOfVector=function(e,t,n,r){var i=void 0;return e!==n?(i=Math.atan((r-t)/(n-e)),n0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r},function(e,t,n){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n0&&t;){for(s.push(u[0]);s.length>0&&t;){var l=s[0];s.splice(0,1),a.add(l);var h=l.getEdges();for(o=0;o-1&&u.splice(p,1)}a=new Set,c=new Map}else e=[]}return e},f.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(n),o=0;o=0&&t.splice(h,1),l.getNeighborsList().forEach((function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;1==t&&c.push(e),r.set(e,t)}}))}n=n.concat(c),1!=t.length&&2!=t.length||(i=!0,o=t[0])}return o},f.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=f},function(e,t,n){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},e.exports=r},function(e,t,n){"use strict";var r=n(4);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return 0!=n&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},i.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return 0!=n&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},i.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return 0!=n&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},i.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return 0!=n&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},i.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i},function(e,t,n){"use strict";var r=n(15),i=n(7),o=n(0),a=n(8),s=n(9);function c(){r.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=i.DEFAULT_EDGE_LENGTH,this.springConstant=i.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=i.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}for(var u in c.prototype=Object.create(r.prototype),r)c[u]=r[u];c.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},c.prototype.calcIdealEdgeLengths=function(){for(var e,t,n,r,a,s,c=this.getGraphManager().getAllEdges(),u=0;ui.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(e-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},c.prototype.calcSpringForces=function(){for(var e,t=this.getAllEdges(),n=0;n0&&void 0!==arguments[0])||arguments[0],s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&a&&this.updateGrid(),o=new Set,e=0;e(c=t.getEstimatedSize()*this.gravityRangeFactor)||s>c)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*o):(a>(c=t.getEstimatedSize()*this.compoundGravityRangeFactor)||s>c)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},c.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=s.length||u>=s[0].length))for(var l=0;le}}]),e}();e.exports=o},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;i(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=o,this.gap_penalty=a,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},i.emit=function(e,t){for(var n=0;n{var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,l=c||u||Function("return this")(),h=Object.prototype.toString,f=Math.max,d=Math.min,g=function(){return l.Date.now()};function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==h.call(e)}(e))return NaN;if(p(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=p(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=o.test(e);return n||a.test(e)?s(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,s,c,u=0,l=!1,h=!1,b=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,o=i;return r=i=void 0,u=t,a=e.apply(o,n)}function w(e){return u=e,s=setTimeout(x,t),l?y(e):a}function m(e){var n=e-c;return void 0===c||n>=t||n<0||h&&e-u>=o}function x(){var e=g();if(m(e))return E(e);s=setTimeout(x,function(e){var n=t-(e-c);return h?d(n,o-(e-u)):n}(e))}function E(e){return s=void 0,b&&r?y(e):(r=i=void 0,a)}function C(){var e=g(),n=m(e);if(r=arguments,i=this,c=e,n){if(void 0===s)return w(c);if(h)return s=setTimeout(x,t),y(c)}return void 0===s&&(s=setTimeout(x,t)),a}return t=v(t)||0,p(n)&&(l=!!n.leading,o=(h="maxWait"in n)?f(v(n.maxWait)||0,t):o,b="trailing"in n?!!n.trailing:b),C.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=c=i=s=void 0},C.flush=function(){return void 0===s?a:E(g())},C}},8552:(e,t,n)=>{var r=n(852)(n(5639),"DataView");e.exports=r},1989:(e,t,n)=>{var r=n(1789),i=n(401),o=n(7667),a=n(1327),s=n(1866);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(7040),i=n(4125),o=n(2117),a=n(7518),s=n(4705);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(852)(n(5639),"Map");e.exports=r},3369:(e,t,n)=>{var r=n(4785),i=n(1285),o=n(6e3),a=n(9916),s=n(5265);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(852)(n(5639),"Promise");e.exports=r},8525:(e,t,n)=>{var r=n(852)(n(5639),"Set");e.exports=r},8668:(e,t,n)=>{var r=n(3369),i=n(619),o=n(2385);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t{var r=n(8407),i=n(7465),o=n(3779),a=n(7599),s=n(4758),c=n(4309);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=i,u.prototype.delete=o,u.prototype.get=a,u.prototype.has=s,u.prototype.set=c,e.exports=u},2705:(e,t,n)=>{var r=n(5639).Symbol;e.exports=r},1149:(e,t,n)=>{var r=n(5639).Uint8Array;e.exports=r},577:(e,t,n)=>{var r=n(852)(n(5639),"WeakMap");e.exports=r},6874:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},7412:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n{var r=n(2118);e.exports=function(e,t){return!(null==e||!e.length)&&r(e,t,0)>-1}},1196:e=>{e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r{var r=n(2545),i=n(5694),o=n(1469),a=n(4144),s=n(5776),c=n(6719),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),l=!n&&i(e),h=!n&&!l&&a(e),f=!n&&!l&&!h&&c(e),d=n||l||h||f,g=d?r(e.length,String):[],p=g.length;for(var v in e)!t&&!u.call(e,v)||d&&("length"==v||h&&("offset"==v||"parent"==v)||f&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,p))||g.push(v);return g}},9932:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n{e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n{e.exports=function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{var r=n(371)("length");e.exports=r},6556:(e,t,n)=>{var r=n(9465),i=n(7813);e.exports=function(e,t,n){(void 0!==n&&!i(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}},4865:(e,t,n)=>{var r=n(9465),i=n(7813),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];o.call(e,t)&&i(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},8470:(e,t,n)=>{var r=n(7813);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},4037:(e,t,n)=>{var r=n(8363),i=n(3674);e.exports=function(e,t){return e&&r(t,i(t),e)}},3886:(e,t,n)=>{var r=n(8363),i=n(1704);e.exports=function(e,t){return e&&r(t,i(t),e)}},9465:(e,t,n)=>{var r=n(8777);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},5990:(e,t,n)=>{var r=n(6384),i=n(7412),o=n(4865),a=n(4037),s=n(3886),c=n(4626),u=n(278),l=n(8805),h=n(1911),f=n(8234),d=n(6904),g=n(4160),p=n(3824),v=n(9148),b=n(8517),y=n(1469),w=n(4144),m=n(6688),x=n(3218),E=n(2928),C=n(3674),k=n(1704),_="[object Arguments]",N="[object Function]",S="[object Object]",O={};O[_]=O["[object Array]"]=O["[object ArrayBuffer]"]=O["[object DataView]"]=O["[object Boolean]"]=O["[object Date]"]=O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Map]"]=O["[object Number]"]=O[S]=O["[object RegExp]"]=O["[object Set]"]=O["[object String]"]=O["[object Symbol]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O["[object Error]"]=O[N]=O["[object WeakMap]"]=!1,e.exports=function e(t,n,T,L,I,A){var M,P=1&n,D=2&n,j=4&n;if(T&&(M=I?T(t,L,I,A):T(t)),void 0!==M)return M;if(!x(t))return t;var R=y(t);if(R){if(M=p(t),!P)return u(t,M)}else{var G=g(t),B=G==N||"[object GeneratorFunction]"==G;if(w(t))return c(t,P);if(G==S||G==_||B&&!I){if(M=D||B?{}:b(t),!P)return D?h(t,s(M,t)):l(t,a(M,t))}else{if(!O[G])return I?t:{};M=v(t,G,P)}}A||(A=new r);var H=A.get(t);if(H)return H;A.set(t,M),E(t)?t.forEach((function(r){M.add(e(r,n,T,r,t,A))})):m(t)&&t.forEach((function(r,i){M.set(i,e(r,n,T,i,t,A))}));var F=R?void 0:(j?D?d:f:D?k:C)(t);return i(F||t,(function(r,i){F&&(r=t[i=r]),o(M,i,e(r,n,T,i,t,A))})),M}},3118:(e,t,n)=>{var r=n(3218),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},9881:(e,t,n)=>{var r=n(7816),i=n(9291)(r);e.exports=i},6029:(e,t,n)=>{var r=n(3448);e.exports=function(e,t,n){for(var i=-1,o=e.length;++i{var r=n(9881);e.exports=function(e,t){var n=[];return r(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}},1848:e=>{e.exports=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o{var r=n(2488),i=n(7285);e.exports=function e(t,n,o,a,s){var c=-1,u=t.length;for(o||(o=i),s||(s=[]);++c0&&o(l)?n>1?e(l,n-1,o,a,s):r(s,l):a||(s[s.length]=l)}return s}},8483:(e,t,n)=>{var r=n(5063)();e.exports=r},7816:(e,t,n)=>{var r=n(8483),i=n(3674);e.exports=function(e,t){return e&&r(e,t,i)}},7786:(e,t,n)=>{var r=n(1811),i=n(327);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n{var r=n(2488),i=n(1469);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},4239:(e,t,n)=>{var r=n(2705),i=n(9607),o=n(2333),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},3325:e=>{e.exports=function(e,t){return e>t}},8565:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},13:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},2118:(e,t,n)=>{var r=n(1848),i=n(2722),o=n(2351);e.exports=function(e,t,n){return t==t?o(e,t,n):r(e,i,n)}},9454:(e,t,n)=>{var r=n(4239),i=n(7005);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},939:(e,t,n)=>{var r=n(2492),i=n(7005);e.exports=function e(t,n,o,a,s){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,o,a,e,s))}},2492:(e,t,n)=>{var r=n(6384),i=n(7114),o=n(8351),a=n(6096),s=n(4160),c=n(1469),u=n(4144),l=n(6719),h="[object Arguments]",f="[object Array]",d="[object Object]",g=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,p,v,b){var y=c(e),w=c(t),m=y?f:s(e),x=w?f:s(t),E=(m=m==h?d:m)==d,C=(x=x==h?d:x)==d,k=m==x;if(k&&u(e)){if(!u(t))return!1;y=!0,E=!1}if(k&&!E)return b||(b=new r),y||l(e)?i(e,t,n,p,v,b):o(e,t,m,n,p,v,b);if(!(1&n)){var _=E&&g.call(e,"__wrapped__"),N=C&&g.call(t,"__wrapped__");if(_||N){var S=_?e.value():e,O=N?t.value():t;return b||(b=new r),v(S,O,n,p,b)}}return!!k&&(b||(b=new r),a(e,t,n,p,v,b))}},5588:(e,t,n)=>{var r=n(4160),i=n(7005);e.exports=function(e){return i(e)&&"[object Map]"==r(e)}},2958:(e,t,n)=>{var r=n(6384),i=n(939);e.exports=function(e,t,n,o){var a=n.length,s=a,c=!o;if(null==e)return!s;for(e=Object(e);a--;){var u=n[a];if(c&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++a{e.exports=function(e){return e!=e}},8458:(e,t,n)=>{var r=n(3560),i=n(5346),o=n(3218),a=n(346),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,h=u.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?f:s).test(a(e))}},9221:(e,t,n)=>{var r=n(4160),i=n(7005);e.exports=function(e){return i(e)&&"[object Set]"==r(e)}},8749:(e,t,n)=>{var r=n(4239),i=n(1780),o=n(7005),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!a[r(e)]}},7206:(e,t,n)=>{var r=n(1573),i=n(6432),o=n(6557),a=n(1469),s=n(9601);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?a(e)?i(e[0],e[1]):r(e):s(e)}},280:(e,t,n)=>{var r=n(5726),i=n(6916),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},313:(e,t,n)=>{var r=n(3218),i=n(5726),o=n(3498),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},433:e=>{e.exports=function(e,t){return e{var r=n(9881),i=n(8612);e.exports=function(e,t){var n=-1,o=i(e)?Array(e.length):[];return r(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}},1573:(e,t,n)=>{var r=n(2958),i=n(1499),o=n(2634);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},6432:(e,t,n)=>{var r=n(939),i=n(7361),o=n(9095),a=n(5403),s=n(9162),c=n(2634),u=n(327);e.exports=function(e,t){return a(e)&&s(t)?c(u(e),t):function(n){var a=i(n,e);return void 0===a&&a===t?o(n,e):r(t,a,3)}}},2980:(e,t,n)=>{var r=n(6384),i=n(6556),o=n(8483),a=n(9783),s=n(3218),c=n(1704),u=n(6390);e.exports=function e(t,n,l,h,f){t!==n&&o(n,(function(o,c){if(f||(f=new r),s(o))a(t,n,c,l,e,h,f);else{var d=h?h(u(t,c),o,c+"",t,n,f):void 0;void 0===d&&(d=o),i(t,c,d)}}),c)}},9783:(e,t,n)=>{var r=n(6556),i=n(4626),o=n(7133),a=n(278),s=n(8517),c=n(5694),u=n(1469),l=n(9246),h=n(4144),f=n(3560),d=n(3218),g=n(8630),p=n(6719),v=n(6390),b=n(3678);e.exports=function(e,t,n,y,w,m,x){var E=v(e,n),C=v(t,n),k=x.get(C);if(k)r(e,n,k);else{var _=m?m(E,C,n+"",e,t,x):void 0,N=void 0===_;if(N){var S=u(C),O=!S&&h(C),T=!S&&!O&&p(C);_=C,S||O||T?u(E)?_=E:l(E)?_=a(E):O?(N=!1,_=i(C,!0)):T?(N=!1,_=o(C,!0)):_=[]:g(C)||c(C)?(_=E,c(E)?_=b(E):d(E)&&!f(E)||(_=s(C))):N=!1}N&&(x.set(C,_),w(_,C,y,m,x),x.delete(C)),r(e,n,_)}}},9556:(e,t,n)=>{var r=n(9932),i=n(7786),o=n(7206),a=n(9199),s=n(1131),c=n(1717),u=n(5022),l=n(6557),h=n(1469);e.exports=function(e,t,n){t=t.length?r(t,(function(e){return h(e)?function(t){return i(t,1===e.length?e[0]:e)}:e})):[l];var f=-1;t=r(t,c(o));var d=a(e,(function(e,n,i){return{criteria:r(t,(function(t){return t(e)})),index:++f,value:e}}));return s(d,(function(e,t){return u(e,t,n)}))}},5970:(e,t,n)=>{var r=n(3012),i=n(9095);e.exports=function(e,t){return r(e,t,(function(t,n){return i(e,n)}))}},3012:(e,t,n)=>{var r=n(7786),i=n(611),o=n(1811);e.exports=function(e,t,n){for(var a=-1,s=t.length,c={};++a{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},9152:(e,t,n)=>{var r=n(7786);e.exports=function(e){return function(t){return r(t,e)}}},98:e=>{var t=Math.ceil,n=Math.max;e.exports=function(e,r,i,o){for(var a=-1,s=n(t((r-e)/(i||1)),0),c=Array(s);s--;)c[o?s:++a]=e,e+=i;return c}},107:e=>{e.exports=function(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}},5976:(e,t,n)=>{var r=n(6557),i=n(5357),o=n(61);e.exports=function(e,t){return o(i(e,t,r),e+"")}},611:(e,t,n)=>{var r=n(4865),i=n(1811),o=n(5776),a=n(3218),s=n(327);e.exports=function(e,t,n,c){if(!a(e))return e;for(var u=-1,l=(t=i(t,e)).length,h=l-1,f=e;null!=f&&++u{var r=n(5703),i=n(8777),o=n(6557),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=a},1131:e=>{e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},2545:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n{var r=n(2705),i=n(9932),o=n(1469),a=n(3448),s=r?r.prototype:void 0,c=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return c?c.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},7561:(e,t,n)=>{var r=n(7990),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},1717:e=>{e.exports=function(e){return function(t){return e(t)}}},5652:(e,t,n)=>{var r=n(8668),i=n(7443),o=n(1196),a=n(4757),s=n(3593),c=n(1814);e.exports=function(e,t,n){var u=-1,l=i,h=e.length,f=!0,d=[],g=d;if(n)f=!1,l=o;else if(h>=200){var p=t?null:s(e);if(p)return c(p);f=!1,l=a,g=new r}else g=t?[]:d;e:for(;++u{var r=n(9932);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},1757:e=>{e.exports=function(e,t,n){for(var r=-1,i=e.length,o=t.length,a={};++r{e.exports=function(e,t){return e.has(t)}},4290:(e,t,n)=>{var r=n(6557);e.exports=function(e){return"function"==typeof e?e:r}},1811:(e,t,n)=>{var r=n(1469),i=n(5403),o=n(5514),a=n(9833);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(a(e))}},4318:(e,t,n)=>{var r=n(1149);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},4626:(e,t,n)=>{e=n.nmd(e);var r=n(5639),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},7157:(e,t,n)=>{var r=n(4318);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},3147:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},419:(e,t,n)=>{var r=n(2705),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},7133:(e,t,n)=>{var r=n(4318);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},6393:(e,t,n)=>{var r=n(3448);e.exports=function(e,t){if(e!==t){var n=void 0!==e,i=null===e,o=e==e,a=r(e),s=void 0!==t,c=null===t,u=t==t,l=r(t);if(!c&&!l&&!a&&e>t||a&&s&&u&&!c&&!l||i&&s&&u||!n&&u||!o)return 1;if(!i&&!a&&!l&&e{var r=n(6393);e.exports=function(e,t,n){for(var i=-1,o=e.criteria,a=t.criteria,s=o.length,c=n.length;++i=c?u:u*("desc"==n[i]?-1:1)}return e.index-t.index}},278:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n{var r=n(4865),i=n(9465);e.exports=function(e,t,n,o){var a=!n;n||(n={});for(var s=-1,c=t.length;++s{var r=n(8363),i=n(9551);e.exports=function(e,t){return r(e,i(e),t)}},1911:(e,t,n)=>{var r=n(8363),i=n(1442);e.exports=function(e,t){return r(e,i(e),t)}},4429:(e,t,n)=>{var r=n(5639)["__core-js_shared__"];e.exports=r},1463:(e,t,n)=>{var r=n(5976),i=n(6612);e.exports=function(e){return r((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++r{var r=n(8612);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var o=n.length,a=t?o:-1,s=Object(n);(t?a--:++a{e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var c=a[e?s:++i];if(!1===n(o[c],c,o))break}return t}}},7740:(e,t,n)=>{var r=n(7206),i=n(8612),o=n(3674);e.exports=function(e){return function(t,n,a){var s=Object(t);if(!i(t)){var c=r(n,3);t=o(t),n=function(e){return c(s[e],e,s)}}var u=e(t,n,a);return u>-1?s[c?t[u]:u]:void 0}}},7445:(e,t,n)=>{var r=n(98),i=n(6612),o=n(8601);e.exports=function(e){return function(t,n,a){return a&&"number"!=typeof a&&i(t,n,a)&&(n=a=void 0),t=o(t),void 0===n?(n=t,t=0):n=o(n),a=void 0===a?t{var r=n(8525),i=n(308),o=n(1814),a=r&&1/o(new r([,-0]))[1]==1/0?function(e){return new r(e)}:i;e.exports=a},8777:(e,t,n)=>{var r=n(852),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},7114:(e,t,n)=>{var r=n(8668),i=n(2908),o=n(4757);e.exports=function(e,t,n,a,s,c){var u=1&n,l=e.length,h=t.length;if(l!=h&&!(u&&h>l))return!1;var f=c.get(e),d=c.get(t);if(f&&d)return f==t&&d==e;var g=-1,p=!0,v=2&n?new r:void 0;for(c.set(e,t),c.set(t,e);++g{var r=n(2705),i=n(1149),o=n(7813),a=n(7114),s=n(8776),c=n(1814),u=r?r.prototype:void 0,l=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,h,f){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!h(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=s;case"[object Set]":var g=1&r;if(d||(d=c),e.size!=t.size&&!g)return!1;var p=f.get(e);if(p)return p==t;r|=2,f.set(e,t);var v=a(d(e),d(t),r,u,h,f);return f.delete(e),v;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},6096:(e,t,n)=>{var r=n(8234),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s){var c=1&n,u=r(e),l=u.length;if(l!=r(t).length&&!c)return!1;for(var h=l;h--;){var f=u[h];if(!(c?f in t:i.call(t,f)))return!1}var d=s.get(e),g=s.get(t);if(d&&g)return d==t&&g==e;var p=!0;s.set(e,t),s.set(t,e);for(var v=c;++h{var r=n(5564),i=n(5357),o=n(61);e.exports=function(e){return o(i(e,void 0,r),e+"")}},1957:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},8234:(e,t,n)=>{var r=n(8866),i=n(9551),o=n(3674);e.exports=function(e){return r(e,o,i)}},6904:(e,t,n)=>{var r=n(8866),i=n(1442),o=n(1704);e.exports=function(e){return r(e,o,i)}},5050:(e,t,n)=>{var r=n(7019);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},1499:(e,t,n)=>{var r=n(9162),i=n(3674);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var o=t[n],a=e[o];t[n]=[o,a,r(a)]}return t}},852:(e,t,n)=>{var r=n(8458),i=n(7801);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},5924:(e,t,n)=>{var r=n(5569)(Object.getPrototypeOf,Object);e.exports=r},9607:(e,t,n)=>{var r=n(2705),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},9551:(e,t,n)=>{var r=n(4963),i=n(479),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return o.call(e,t)})))}:i;e.exports=s},1442:(e,t,n)=>{var r=n(2488),i=n(5924),o=n(9551),a=n(479),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=i(e);return t}:a;e.exports=s},4160:(e,t,n)=>{var r=n(8552),i=n(7071),o=n(3818),a=n(8525),s=n(577),c=n(4239),u=n(346),l="[object Map]",h="[object Promise]",f="[object Set]",d="[object WeakMap]",g="[object DataView]",p=u(r),v=u(i),b=u(o),y=u(a),w=u(s),m=c;(r&&m(new r(new ArrayBuffer(1)))!=g||i&&m(new i)!=l||o&&m(o.resolve())!=h||a&&m(new a)!=f||s&&m(new s)!=d)&&(m=function(e){var t=c(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case p:return g;case v:return l;case b:return h;case y:return f;case w:return d}return t}),e.exports=m},7801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},222:(e,t,n)=>{var r=n(1811),i=n(5694),o=n(1469),a=n(5776),s=n(1780),c=n(327);e.exports=function(e,t,n){for(var u=-1,l=(t=r(t,e)).length,h=!1;++u{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},1789:(e,t,n)=>{var r=n(4536);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},7667:(e,t,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},1327:(e,t,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},1866:(e,t,n)=>{var r=n(4536);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},3824:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},9148:(e,t,n)=>{var r=n(4318),i=n(7157),o=n(3147),a=n(419),s=n(7133);e.exports=function(e,t,n){var c=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new c(+e);case"[object DataView]":return i(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(e);case"[object RegExp]":return o(e);case"[object Symbol]":return a(e)}}},8517:(e,t,n)=>{var r=n(3118),i=n(5924),o=n(5726);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},7285:(e,t,n)=>{var r=n(2705),i=n(5694),o=n(1469),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(a&&e&&e[a])}},5776:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e{var r=n(7813),i=n(8612),o=n(5776),a=n(3218);e.exports=function(e,t,n){if(!a(n))return!1;var s=typeof t;return!!("number"==s?i(n)&&o(t,n.length):"string"==s&&t in n)&&r(n[t],e)}},5403:(e,t,n)=>{var r=n(1469),i=n(3448),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||a.test(e)||!o.test(e)||null!=t&&e in Object(t)}},7019:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},5346:(e,t,n)=>{var r,i=n(4429),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},5726:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},9162:(e,t,n)=>{var r=n(3218);e.exports=function(e){return e==e&&!r(e)}},7040:e=>{e.exports=function(){this.__data__=[],this.size=0}},4125:(e,t,n)=>{var r=n(8470),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))}},2117:(e,t,n)=>{var r=n(8470);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},7518:(e,t,n)=>{var r=n(8470);e.exports=function(e){return r(this.__data__,e)>-1}},4705:(e,t,n)=>{var r=n(8470);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},4785:(e,t,n)=>{var r=n(1989),i=n(8407),o=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},1285:(e,t,n)=>{var r=n(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:(e,t,n)=>{var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:(e,t,n)=>{var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:(e,t,n)=>{var r=n(5050);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},8776:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},2634:e=>{e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},4523:(e,t,n)=>{var r=n(8306);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},4536:(e,t,n)=>{var r=n(852)(Object,"create");e.exports=r},6916:(e,t,n)=>{var r=n(5569)(Object.keys,Object);e.exports=r},3498:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},1167:(e,t,n)=>{e=n.nmd(e);var r=n(1957),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},5357:(e,t,n)=>{var r=n(6874),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),c=Array(s);++a{var r=n(1957),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},6390:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},619:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},2385:e=>{e.exports=function(e){return this.__data__.has(e)}},1814:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},61:(e,t,n)=>{var r=n(6560),i=n(1275)(r);e.exports=i},1275:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var i=t(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},7465:(e,t,n)=>{var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:e=>{e.exports=function(e){return this.__data__.get(e)}},4758:e=>{e.exports=function(e){return this.__data__.has(e)}},4309:(e,t,n)=>{var r=n(8407),i=n(7071),o=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},2351:e=>{e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r{var r=n(8983),i=n(2689),o=n(1903);e.exports=function(e){return i(e)?o(e):r(e)}},5514:(e,t,n)=>{var r=n(4523),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)})),t}));e.exports=a},327:(e,t,n)=>{var r=n(3448);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},346:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7990:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},1903:e=>{var t="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\\ud83c[\\udffb-\\udfff]",r="[^\\ud800-\\udfff]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",o="[\\ud800-\\udbff][\\udc00-\\udfff]",a="(?:"+t+"|"+n+")?",s="[\\ufe0e\\ufe0f]?",c=s+a+"(?:\\u200d(?:"+[r,i,o].join("|")+")"+s+a+")*",u="(?:"+[r+t+"?",t,i,o,"[\\ud800-\\udfff]"].join("|")+")",l=RegExp(n+"(?="+n+")|"+u+c,"g");e.exports=function(e){for(var t=l.lastIndex=0;l.test(e);)++t;return t}},6678:(e,t,n)=>{var r=n(5990);e.exports=function(e){return r(e,4)}},361:(e,t,n)=>{var r=n(5990);e.exports=function(e){return r(e,5)}},5703:e=>{e.exports=function(e){return function(){return e}}},1747:(e,t,n)=>{var r=n(5976),i=n(7813),o=n(6612),a=n(1704),s=Object.prototype,c=s.hasOwnProperty,u=r((function(e,t){e=Object(e);var n=-1,r=t.length,u=r>2?t[2]:void 0;for(u&&o(t[0],t[1],u)&&(r=1);++n{e.exports=n(4486)},7813:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},3105:(e,t,n)=>{var r=n(4963),i=n(760),o=n(7206),a=n(1469);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},3311:(e,t,n)=>{var r=n(7740)(n(998));e.exports=r},998:(e,t,n)=>{var r=n(1848),i=n(7206),o=n(554),a=Math.max;e.exports=function(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var c=null==n?0:o(n);return c<0&&(c=a(s+c,0)),r(e,i(t,3),c)}},5564:(e,t,n)=>{var r=n(1078);e.exports=function(e){return null!=e&&e.length?r(e,1):[]}},4486:(e,t,n)=>{var r=n(7412),i=n(9881),o=n(4290),a=n(1469);e.exports=function(e,t){return(a(e)?r:i)(e,o(t))}},2620:(e,t,n)=>{var r=n(8483),i=n(4290),o=n(1704);e.exports=function(e,t){return null==e?e:r(e,i(t),o)}},7361:(e,t,n)=>{var r=n(7786);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},8721:(e,t,n)=>{var r=n(8565),i=n(222);e.exports=function(e,t){return null!=e&&i(e,t,r)}},9095:(e,t,n)=>{var r=n(13),i=n(222);e.exports=function(e,t){return null!=e&&i(e,t,r)}},6557:e=>{e.exports=function(e){return e}},5694:(e,t,n)=>{var r=n(9454),i=n(7005),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=c},1469:e=>{var t=Array.isArray;e.exports=t},8612:(e,t,n)=>{var r=n(3560),i=n(1780);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},9246:(e,t,n)=>{var r=n(8612),i=n(7005);e.exports=function(e){return i(e)&&r(e)}},4144:(e,t,n)=>{e=n.nmd(e);var r=n(5639),i=n(5062),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,c=(s?s.isBuffer:void 0)||i;e.exports=c},1609:(e,t,n)=>{var r=n(280),i=n(4160),o=n(5694),a=n(1469),s=n(8612),c=n(4144),u=n(5726),l=n(6719),h=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||c(e)||l(e)||o(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!r(e).length;for(var n in e)if(h.call(e,n))return!1;return!0}},3560:(e,t,n)=>{var r=n(4239),i=n(3218);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},6688:(e,t,n)=>{var r=n(5588),i=n(1717),o=n(1167),a=o&&o.isMap,s=a?i(a):r;e.exports=s},3218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},8630:(e,t,n)=>{var r=n(4239),i=n(5924),o=n(7005),a=Function.prototype,s=Object.prototype,c=a.toString,u=s.hasOwnProperty,l=c.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==l}},2928:(e,t,n)=>{var r=n(9221),i=n(1717),o=n(1167),a=o&&o.isSet,s=a?i(a):r;e.exports=s},7037:(e,t,n)=>{var r=n(4239),i=n(1469),o=n(7005);e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&"[object String]"==r(e)}},3448:(e,t,n)=>{var r=n(4239),i=n(7005);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},6719:(e,t,n)=>{var r=n(8749),i=n(1717),o=n(1167),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},2353:e=>{e.exports=function(e){return void 0===e}},3674:(e,t,n)=>{var r=n(4636),i=n(280),o=n(8612);e.exports=function(e){return o(e)?r(e):i(e)}},1704:(e,t,n)=>{var r=n(4636),i=n(313),o=n(8612);e.exports=function(e){return o(e)?r(e,!0):i(e)}},928:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},5161:(e,t,n)=>{var r=n(9932),i=n(7206),o=n(9199),a=n(1469);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},6604:(e,t,n)=>{var r=n(9465),i=n(7816),o=n(7206);e.exports=function(e,t){var n={};return t=o(t,3),i(e,(function(e,i,o){r(n,i,t(e,i,o))})),n}},6162:(e,t,n)=>{var r=n(6029),i=n(3325),o=n(6557);e.exports=function(e){return e&&e.length?r(e,o,i):void 0}},8306:(e,t,n)=>{var r=n(3369);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},3857:(e,t,n)=>{var r=n(2980),i=n(1463)((function(e,t,n){r(e,t,n)}));e.exports=i},3632:(e,t,n)=>{var r=n(6029),i=n(433),o=n(6557);e.exports=function(e){return e&&e.length?r(e,o,i):void 0}},2762:(e,t,n)=>{var r=n(6029),i=n(7206),o=n(433);e.exports=function(e,t){return e&&e.length?r(e,i(t,2),o):void 0}},308:e=>{e.exports=function(){}},7771:(e,t,n)=>{var r=n(5639);e.exports=function(){return r.Date.now()}},9722:(e,t,n)=>{var r=n(5970),i=n(9021)((function(e,t){return null==e?{}:r(e,t)}));e.exports=i},9601:(e,t,n)=>{var r=n(371),i=n(9152),o=n(5403),a=n(327);e.exports=function(e){return o(e)?r(a(e)):i(e)}},6026:(e,t,n)=>{var r=n(7445)();e.exports=r},4061:(e,t,n)=>{var r=n(2663),i=n(9881),o=n(7206),a=n(107),s=n(1469);e.exports=function(e,t,n){var c=s(e)?r:a,u=arguments.length<3;return c(e,o(t,4),n,u,i)}},4238:(e,t,n)=>{var r=n(280),i=n(4160),o=n(8612),a=n(7037),s=n(8016);e.exports=function(e){if(null==e)return 0;if(o(e))return a(e)?s(e):e.length;var t=i(e);return"[object Map]"==t||"[object Set]"==t?e.size:r(e).length}},9734:(e,t,n)=>{var r=n(1078),i=n(9556),o=n(5976),a=n(6612),s=o((function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,r(t,1),[])}));e.exports=s},479:e=>{e.exports=function(){return[]}},5062:e=>{e.exports=function(){return!1}},8601:(e,t,n)=>{var r=n(4841);e.exports=function(e){return e?Infinity===(e=r(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},554:(e,t,n)=>{var r=n(8601);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},4841:(e,t,n)=>{var r=n(7561),i=n(3218),o=n(3448),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||c.test(e)?u(e.slice(2),n?2:8):a.test(e)?NaN:+e}},3678:(e,t,n)=>{var r=n(8363),i=n(1704);e.exports=function(e){return r(e,i(e))}},9833:(e,t,n)=>{var r=n(531);e.exports=function(e){return null==e?"":r(e)}},8718:(e,t,n)=>{var r=n(7412),i=n(3118),o=n(7816),a=n(7206),s=n(5924),c=n(1469),u=n(4144),l=n(3560),h=n(3218),f=n(6719);e.exports=function(e,t,n){var d=c(e),g=d||u(e)||f(e);if(t=a(t,4),null==n){var p=e&&e.constructor;n=g?d?new p:[]:h(e)&&l(p)?i(s(e)):{}}return(g?r:o)(e,(function(e,r,i){return t(n,e,r,i)})),n}},3386:(e,t,n)=>{var r=n(1078),i=n(5976),o=n(5652),a=n(9246),s=i((function(e){return o(r(e,1,a,!0))}));e.exports=s},3955:(e,t,n)=>{var r=n(9833),i=0;e.exports=function(e){var t=++i;return r(e)+t}},2628:(e,t,n)=>{var r=n(7415),i=n(3674);e.exports=function(e){return null==e?[]:r(e,i(e))}},7287:(e,t,n)=>{var r=n(4865),i=n(1757);e.exports=function(e,t){return i(e||[],t||[],r)}},3379:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},9216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7795:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},4589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},9641:e=>{e.exports=''},1093:e=>{e.exports=''},480:e=>{e.exports=''},8587:e=>{e.exports=''},6601:e=>{e.exports=''},1373:e=>{e.exports=''},9806:e=>{e.exports=''},9865:e=>{e.exports=''},9224:e=>{e.exports=''},5808:e=>{e.exports=''},9458:e=>{e.exports=''},8904:e=>{e.exports=''},3562:e=>{e.exports=''},6649:e=>{e.exports=''},2020:e=>{e.exports=''},7724:e=>{e.exports=''},674:e=>{e.exports=''},7886:e=>{e.exports=''},5837:e=>{e.exports=''},7450:e=>{e.exports=''},9629:e=>{e.exports=''},2646:e=>{e.exports=''},4019:(e,t,n)=>{"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(89)),r(n(2845)),r(n(7069)),r(n(6085)),r(n(7598)),r(n(7384)),r(n(7426)),r(n(6749)),r(n(9427)),r(n(8793)),r(n(7421)),r(n(1138)),r(n(31)),r(n(2867)),r(n(4926)),r(n(7565))},89:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(7426),a=function(e){function t(t){var n=e.call(this)||this,r=t;return r.trigger&&(n.trigger=r.trigger),r.kick&&(n.kick=r.kick),r.drag&&(n.drag=r.drag),r.on&&(n.on=r.on),n.dragstart=n.dragStart=o.Layout.dragStart,n.dragend=n.dragEnd=o.Layout.dragEnd,n}return i(t,e),t.prototype.trigger=function(e){},t.prototype.kick=function(){},t.prototype.drag=function(){},t.prototype.on=function(e,t){return this},t}(o.Layout);t.LayoutAdaptor=a,t.adaptor=function(e){return new a(e)}},7565:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7426),i=n(7598);t.gridify=function(e,t,n,r){e.cola.start(0,0,0,10,!1);var o=function(e,t,n,r){e.forEach((function(e){e.routerNode={name:e.name,bounds:e.bounds.inflate(-n)}})),t.forEach((function(t){t.routerNode={bounds:t.bounds.inflate(-r),children:(void 0!==t.groups?t.groups.map((function(t){return e.length+t.id})):[]).concat(void 0!==t.leaves?t.leaves.map((function(e){return e.index})):[])}}));var o=e.concat(t).map((function(e,t){return e.routerNode.id=t,e.routerNode}));return new i.GridRouter(o,{getChildren:function(e){return e.children},getBounds:function(e){return e.bounds}},n-r)}(e.cola.nodes(),e.cola.groups(),n,r);return o.routeEdges(e.powerGraph.powerEdges,t,(function(e){return e.source.routerNode.id}),(function(e){return e.target.routerNode.id}))},t.powerGraphGridLayout=function(e,t,n){var i;e.nodes.forEach((function(e,t){return e.index=t})),(new r.Layout).avoidOverlaps(!1).nodes(e.nodes).links(e.links).powerGraphGroups((function(e){(i=e).groups.forEach((function(e){return e.padding=n}))}));var o=e.nodes.length,a=[],s=e.nodes.slice(0);return s.forEach((function(e,t){return e.index=t})),i.groups.forEach((function(e){var t=e.index=e.id+o;s.push(e),void 0!==e.leaves&&e.leaves.forEach((function(e){return a.push({source:t,target:e.index})})),void 0!==e.groups&&e.groups.forEach((function(e){return a.push({source:t,target:e.id+o})}))})),i.powerEdges.forEach((function(e){a.push({source:e.source.index,target:e.target.index})})),(new r.Layout).size(t).nodes(s).links(a).avoidOverlaps(!1).linkDistance(30).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(100,0,0,0,!1),{cola:(new r.Layout).convergenceThreshold(.001).size(t).avoidOverlaps(!0).nodes(e.nodes).links(e.links).groupCompactness(1e-4).linkDistance(30).symmetricDiffLinkLengths(5).powerGraphGroups((function(e){(i=e).groups.forEach((function(e){e.padding=n}))})).start(50,0,100,0,!1),powerGraph:i}}},2845:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1509),i=n(1374);t.d3adaptor=function(e){return!e||function(e){return e.version&&null!==e.version.match(/^3\./)}(e)?new r.D3StyleLayoutAdaptor:new i.D3StyleLayoutAdaptor(e)}},1509:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(7426),a=function(e){function t(){var t=e.call(this)||this;t.event=d3.dispatch(o.EventType[o.EventType.start],o.EventType[o.EventType.tick],o.EventType[o.EventType.end]);var n=t;return t.drag=function(){if(!e)var e=d3.behavior.drag().origin(o.Layout.dragOrigin).on("dragstart.d3adaptor",o.Layout.dragStart).on("drag.d3adaptor",(function(e){o.Layout.drag(e,d3.event),n.resume()})).on("dragend.d3adaptor",o.Layout.dragEnd);if(!arguments.length)return e;this.call(e)},t}return i(t,e),t.prototype.trigger=function(e){var t={type:o.EventType[e.type],alpha:e.alpha,stress:e.stress};this.event[t.type](t)},t.prototype.kick=function(){var t=this;d3.timer((function(){return e.prototype.tick.call(t)}))},t.prototype.on=function(e,t){return"string"==typeof e?this.event.on(e,t):this.event.on(o.EventType[e],t),this},t}(o.Layout);t.D3StyleLayoutAdaptor=a,t.d3adaptor=function(){return new a}},1374:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(7426),a=function(e){function t(t){var n=e.call(this)||this;n.d3Context=t,n.event=t.dispatch(o.EventType[o.EventType.start],o.EventType[o.EventType.tick],o.EventType[o.EventType.end]);var r=n;return n.drag=function(){if(!e)var e=t.drag().subject(o.Layout.dragOrigin).on("start.d3adaptor",o.Layout.dragStart).on("drag.d3adaptor",(function(e){o.Layout.drag(e,t.event),r.resume()})).on("end.d3adaptor",o.Layout.dragEnd);if(!arguments.length)return e;arguments[0].call(e)},n}return i(t,e),t.prototype.trigger=function(e){var t={type:o.EventType[e.type],alpha:e.alpha,stress:e.stress};this.event.call(t.type,t)},t.prototype.kick=function(){var t=this,n=this.d3Context.timer((function(){return e.prototype.tick.call(t)&&n.stop()}))},t.prototype.on=function(e,t){return"string"==typeof e?this.event.on(e,t):this.event.on(o.EventType[e],t),this},t}(o.Layout);t.D3StyleLayoutAdaptor=a},7069:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.locks={}}return e.prototype.add=function(e,t){this.locks[e]=t},e.prototype.clear=function(){this.locks={}},e.prototype.isEmpty=function(){for(var e in this.locks)return!1;return!0},e.prototype.apply=function(e){for(var t in this.locks)e(Number(t),this.locks[t])},e}();t.Locks=n;var r=function(){function e(e,t,r){void 0===r&&(r=null),this.D=t,this.G=r,this.threshold=1e-4,this.numGridSnapNodes=0,this.snapGridSize=100,this.snapStrength=1e3,this.scaleSnapByMaxH=!1,this.random=new i,this.project=null,this.x=e,this.k=e.length;var o=this.n=e[0].length;this.H=new Array(this.k),this.g=new Array(this.k),this.Hd=new Array(this.k),this.a=new Array(this.k),this.b=new Array(this.k),this.c=new Array(this.k),this.d=new Array(this.k),this.e=new Array(this.k),this.ia=new Array(this.k),this.ib=new Array(this.k),this.xtmp=new Array(this.k),this.locks=new n,this.minD=Number.MAX_VALUE;for(var a,s=o;s--;)for(a=o;--a>s;){var c=t[s][a];c>0&&c1e-9)break;var d=this.offsetDir();for(r=0;r1&&g>p||!isFinite(p))for(r=0;r1&&(v=1);var b=p*p,y=2*v*(g-p)/(b*g),w=g*g*g,m=2*-v/(b*w);for(isFinite(y)||console.log(y),r=0;r0?_-(O+1)*E:_-(O-1)*E)&&f<=x&&(this.scaleSnapByMaxH?(this.g[r][c]+=s*C*f,this.H[r][c][c]+=s*C):(this.g[r][c]+=C*f,this.H[r][c][c]+=C))}this.locks.isEmpty()||this.locks.apply((function(n,i){for(r=0;r0;)for(var i=t;i-- >0;)n(r,i)},e.prototype.matrixApply=function(t){e.mApply(this.k,this.n,t)},e.prototype.computeNextPosition=function(e,t){var n=this;this.computeDerivatives(e);var r=this.computeStepSize(this.g);if(this.stepAndProject(e,t,this.g,r),this.project){this.matrixApply((function(r,i){return n.e[r][i]=e[r][i]-t[r][i]}));var i=this.computeStepSize(this.e);i=Math.max(.2,Math.min(i,1)),this.stepAndProject(e,t,this.e,i)}},e.prototype.run=function(e){for(var t=Number.MAX_VALUE,n=!1;!n&&e-- >0;){var r=this.rungeKutta();n=Math.abs(t/r-1)>16)/this.range},e.prototype.getNextBetween=function(e,t){return e+this.getNext()*(t-e)},e}();t.PseudoRandom=i},6085:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(31),a=function(){};t.Point=a;var s=function(e,t,n,r){this.x1=e,this.y1=t,this.x2=n,this.y2=r};t.LineSegment=s;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(a);function u(e,t,n){return(t.x-e.x)*(n.y-e.y)-(n.x-e.x)*(t.y-e.y)}function l(e,t,n){return u(e,t,n)>0}function h(e,t,n){return u(e,t,n)<0}function f(e,t){var n,r,i,o,a=t.length-1;if(h(e,t[1],t[0])&&!l(e,t[a-1],t[0]))return 0;for(n=0,r=a;;){if(r-n==1)return l(e,t[n],t[r])?n:r;if((o=h(e,t[(i=Math.floor((n+r)/2))+1],t[i]))&&!l(e,t[i-1],t[i]))return i;l(e,t[n+1],t[n])?o||l(e,t[n],t[i])?r=i:n=i:o&&h(e,t[n],t[i])?r=i:n=i}}function d(e,t){var n,r,i,o,a=t.length-1;if(l(e,t[a-1],t[0])&&!h(e,t[1],t[0]))return 0;for(n=0,r=a;;){if(r-n==1)return h(e,t[n],t[r])?n:r;if(o=h(e,t[(i=Math.floor((n+r)/2))+1],t[i]),l(e,t[i-1],t[i])&&!o)return i;h(e,t[n+1],t[n])?o?h(e,t[n],t[i])?r=i:n=i:r=i:o?n=i:l(e,t[n],t[i])?r=i:n=i}}function g(e,t,n,r,i,o){var a,s;s=r(e[a=n(t[0],e)],t);for(var c=!1;!c;){for(c=!0;a===e.length-1&&(a=0),!i(t[s],e[a],e[a+1]);)++a;for(;0===s&&(s=t.length-1),!o(e[a],t[s],t[s-1]);)--s,c=!1}return{t1:a,t2:s}}function p(e,t){return g(e,t,f,d,l,h)}t.PolyPoint=c,t.isLeft=u,t.ConvexHull=function(e){var t,n=e.slice(0).sort((function(e,t){return e.x!==t.x?t.x-e.x:t.y-e.y})),r=e.length,i=n[0].x;for(t=1;t=0&&n[t].x===l;t--);for(s=t+1,t=o;++t<=s;)if(!(u(n[0],n[s],n[t])>=0&&t1&&!(u(a[a.length-2],a[a.length-1],n[t])>0);)a.length-=1;0!=t&&a.push(n[t])}c!=s&&a.push(n[c]);var h=a.length;for(t=s;--t>=o;)if(!(u(n[c],n[o],n[t])>=0&&t>o)){for(;a.length>h&&!(u(a[a.length-2],a[a.length-1],n[t])>0);)a.length-=1;0!=t&&a.push(n[t])}}return a},t.clockwiseRadialSweep=function(e,t,n){t.slice(0).sort((function(t,n){return Math.atan2(t.y-e.y,t.x-e.x)-Math.atan2(n.y-e.y,n.x-e.x)})).forEach(n)},t.tangent_PolyPolyC=g,t.LRtangent_PolyPolyC=function(e,t){var n=p(t,e);return{t1:n.t2,t2:n.t1}},t.RLtangent_PolyPolyC=p,t.LLtangent_PolyPolyC=function(e,t){return g(e,t,d,d,h,h)},t.RRtangent_PolyPolyC=function(e,t){return g(e,t,f,f,l,l)};var v=function(e,t){this.t1=e,this.t2=t};t.BiTangent=v;var b=function(){};t.BiTangents=b;var y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(a);t.TVGPoint=y;var w=function(e,t,n,r){this.id=e,this.polyid=t,this.polyvertid=n,this.p=r,r.vv=this};t.VisibilityVertex=w;var m=function(){function e(e,t){this.source=e,this.target=t}return e.prototype.length=function(){var e=this.source.p.x-this.target.p.x,t=this.source.p.y-this.target.p.y;return Math.sqrt(e*e+t*t)},e}();t.VisibilityEdge=m;var x=function(){function e(e,t){if(this.P=e,this.V=[],this.E=[],t)this.V=t.V.slice(0),this.E=t.E.slice(0);else{for(var n=e.length,r=0;r0&&this.E.push(new m(i[o-1].vv,s))}i.length>1&&this.E.push(new m(i[0].vv,i[i.length-1].vv))}for(r=0;r0)return!0;return!1},e}();function E(e,t){for(var n=[],r=1,i=t.length;r=0&&p>=0&&y<0&&w>=0&&m>=0&&x<0?i.ll=new v(o,a):g<=0&&p<=0&&y>0&&w<=0&&m<=0&&x>0?i.rr=new v(o,a):g<=0&&p>0&&y<=0&&w>=0&&m<0&&x>=0?i.rl=new v(o,a):g>=0&&p<0&&y>=0&&w<=0&&m>0&&x<=0&&(i.lr=new v(o,a))}return i}function k(e,t){return!e.every((function(e){return!function(e,t){for(var n=1,r=t.length;n0)return!0}return!1}},7598:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(31),i=n(4926),o=n(2867),a=function(e,t,n){this.id=e,this.rect=t,this.children=n,this.leaf=void 0===n||0===n.length};t.NodeWrapper=a;var s=function(e,t,n,r,i){void 0===r&&(r=null),void 0===i&&(i=null),this.id=e,this.x=t,this.y=n,this.node=r,this.line=i};t.Vert=s;var c=function(){function e(t,n){this.s=t,this.t=n;var r=e.findMatch(t,n),i=n.slice(0).reverse(),o=e.findMatch(t,i);r.length>=o.length?(this.length=r.length,this.si=r.si,this.ti=r.ti,this.reversed=!1):(this.length=o.length,this.si=o.si,this.ti=n.length-o.ti-o.length,this.reversed=!0)}return e.findMatch=function(e,t){for(var n=e.length,r=t.length,i={length:0,si:-1,ti:-1},o=new Array(n),a=0;ai.length&&(i.length=c,i.si=a-c+1,i.ti=s-c+1)}else o[a][s]=0}return i},e.prototype.getSequence=function(){return this.length>=0?this.s.slice(this.si,this.si+this.length):[]},e}();t.LongestCommonSubsequence=c;var u=function(){function e(e,t,n){var i=this;void 0===n&&(n=12),this.originalnodes=e,this.groupPadding=n,this.leaves=null,this.nodes=e.map((function(e,n){return new a(n,t.getBounds(e),t.getChildren(e))})),this.leaves=this.nodes.filter((function(e){return e.leaf})),this.groups=this.nodes.filter((function(e){return!e.leaf})),this.cols=this.getGridLines("x"),this.rows=this.getGridLines("y"),this.groups.forEach((function(e){return e.children.forEach((function(t){return i.nodes[t].parent=e}))})),this.root={children:[]},this.nodes.forEach((function(e){void 0===e.parent&&(e.parent=i.root,i.root.children.push(e.id)),e.ports=[]})),this.backToFront=this.nodes.slice(0),this.backToFront.sort((function(e,t){return i.getDepth(e)-i.getDepth(t)})),this.backToFront.slice(0).reverse().filter((function(e){return!e.leaf})).forEach((function(e){var t=r.Rectangle.empty();e.children.forEach((function(e){return t=t.union(i.nodes[e].rect)})),e.rect=t.inflate(i.groupPadding)}));var o=this.midPoints(this.cols.map((function(e){return e.pos}))),c=this.midPoints(this.rows.map((function(e){return e.pos}))),u=o[0],l=o[o.length-1],h=c[0],f=c[c.length-1],d=this.rows.map((function(e){return{x1:u,x2:l,y1:e.pos,y2:e.pos}})).concat(c.map((function(e){return{x1:u,x2:l,y1:e,y2:e}}))),g=this.cols.map((function(e){return{x1:e.pos,x2:e.pos,y1:h,y2:f}})).concat(o.map((function(e){return{x1:e,x2:e,y1:h,y2:f}}))),p=d.concat(g);p.forEach((function(e){return e.verts=[]})),this.verts=[],this.edges=[],d.forEach((function(e){return g.forEach((function(t){var n=new s(i.verts.length,t.x1,e.y1);e.verts.push(n),t.verts.push(n),i.verts.push(n);for(var r=i.backToFront.length;r-- >0;){var o=i.backToFront[r],a=o.rect,c=Math.abs(n.x-a.cx()),u=Math.abs(n.y-a.cy());if(c0;){var r=n.filter((function(t){return t.rect["overlap"+e.toUpperCase()](n[0].rect)})),i={nodes:r,pos:this.avg(r.map((function(t){return t.rect["c"+e]()})))};t.push(i),i.nodes.forEach((function(e){return n.splice(n.indexOf(e),1)}))}return t.sort((function(e,t){return e.pos-t.pos})),t},e.prototype.getDepth=function(e){for(var t=0;e.parent!==this.root;)t++,e=e.parent;return t},e.prototype.midPoints=function(e){for(var t=e[1]-e[0],n=[e[0]-t/2],r=1;r.1)&&(u={pos:h[0][t],segments:[]},c.push(u)),u.segments.push(h)}return c},e.nudgeSegs=function(e,t,n,r,o,a){var s=r.length;if(!(s<=1)){for(var c=r.map((function(t){return new i.Variable(t[0][e])})),u=[],l=0;l=0&&u.push(new i.Constraint(c[v],c[b],a))}new i.Solver(c,u).solve(),c.forEach((function(t,i){var o=r[i],a=t.position();o[0][e]=o[1][e]=a;var s=n[o.edgeid];o.i>0&&(s[o.i-1][1][e]=a),o.iMath.PI||i<-Math.PI)&&(i=r-n),i},e.isLeft=function(e,t,n){return(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x)<=0},e.getOrder=function(e){for(var t={},n=0;n=u.length||h.ti+h.length>=l.length)?n.push({l:r,r:i}):(h.si+h.length>=u.length||h.ti+h.length>=l.length?(o=u[h.si+1],s=u[h.si-1],a=l[h.ti-1]):(o=u[h.si+h.length-2],a=u[h.si+h.length],s=l[h.ti+h.length]),e.isLeft(o,a,s)?n.push({l:i,r}):n.push({l:r,r:i})))}return e.getOrder(n)},e.makeSegments=function(e){function t(e){return{x:e.x,y:e.y}}for(var n=function(e,t,n){return Math.abs((t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x))<.001},r=[],i=t(e[0]),o=1;o1&&l>1?1e3:0})),h=l.reverse().map((function(e){return n.verts[e]}));return h.push(this.nodes[i.id].ports[0]),h.filter((function(e,t){return!(t0&&e.node===i&&h[t-1].node===i)}))},e.getRoutePath=function(t,n,r,i){var o,a,s,c={routepath:"M "+t[0][0].x+" "+t[0][0].y+" ",arrowpath:""};if(t.length>1)for(var u=0;u0?l-=f/Math.abs(f)*n:h-=d/Math.abs(d)*n,c.routepath+="L "+l+" "+h+" ";var g=t[u+1],p=g[0].x,v=g[0].y;f=g[1].x-p,d=g[1].y-v;var b,y,w=e.angleBetween2Lines(o,g)<0?1:0;Math.abs(f)>0?(b=p+f/Math.abs(f)*n,y=v):(b=p,y=v+d/Math.abs(d)*n);var m=Math.abs(b-l),x=Math.abs(y-h);c.routepath+="A "+m+" "+x+" 0 0 "+w+" "+b+" "+y+" "}else{var E=[l,h];Math.abs(f)>0?(a=[l-=f/Math.abs(f)*i,h+r],s=[l,h-r]):(a=[l+r,h-=d/Math.abs(d)*i],s=[l-r,h]),c.routepath+="L "+l+" "+h+" ",i>0&&(c.arrowpath="M "+E[0]+" "+E[1]+" L "+a[0]+" "+a[1]+" L "+s[0]+" "+s[1])}}else l=(o=t[0])[1].x,h=o[1].y,f=l-o[0].x,d=h-o[0].y,E=[l,h],Math.abs(f)>0?(a=[l-=f/Math.abs(f)*i,h+r],s=[l,h-r]):(a=[l+r,h-=d/Math.abs(d)*i],s=[l-r,h]),c.routepath+="L "+l+" "+h+" ",i>0&&(c.arrowpath="M "+E[0]+" "+E[1]+" L "+a[0]+" "+a[1]+" L "+s[0]+" "+s[1]);return c},e}();t.GridRouter=u},7384:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=10,r=(1+Math.sqrt(5))/2,i=1e-4;t.applyPacking=function(e,t,o,a,s,c){void 0===s&&(s=1),void 0===c&&(c=!0);var u=t,l=o,h=(s=void 0!==s?s:1,a=void 0!==a?a:0,0),f=0,d=0,g=0,p=[];function v(e,t){p=[],h=0,f=0,g=0;for(var n=0;n=e.height&&p[o].x+p[o].width+e.width+n-t<=i){r=p[o];break}p.push(e),void 0!==r?(e.x=r.x+r.width+n,e.y=r.bottom,e.space_left=e.height,e.bottom=e.y,r.space_left-=e.height+n,r.bottom+=e.height+n):(e.y=g,g+=e.height+n,e.x=0,e.bottom=e.y,e.space_left=e.height),e.y+e.height-f>-1e-4&&(f=e.y+e.height-0),e.x+e.width-h>-1e-4&&(h=e.x+e.width-0)}0!=e.length&&(function(e){e.forEach((function(e){var t,n,r,i,o;t=e,n=Number.MAX_VALUE,r=Number.MAX_VALUE,i=0,o=0,t.array.forEach((function(e){var t=void 0!==e.width?e.width:a,s=void 0!==e.height?e.height:a;t/=2,s/=2,i=Math.max(e.x+t,i),n=Math.min(e.x-t,n),o=Math.max(e.y+s,o),r=Math.min(e.y-s,r)})),t.width=i-n,t.height=o-r}))}(e),function(e,t){var o=Number.POSITIVE_INFINITY,a=0;e.sort((function(e,t){return t.height-e.height}));for(var s=b=d=e.reduce((function(e,t){return e.widthd||p>i;){if(1!=f){var b=c-(c-s)/r;l=v(e,b)}if(0!=f){var y=s+(c-s)/r;h=v(e,y)}if(g=Math.abs(b-y),p=Math.abs(l-h),lh?(s=b,b=y,l=h,f=1):(c=y,y=b,h=l,f=0),u++>100)break}v(e,a)}(e),c&&function(e){e.forEach((function(e){var t={x:0,y:0};e.array.forEach((function(e){t.x+=e.x,t.y+=e.y})),t.x/=e.array.length,t.y/=e.array.length;var n=t.x-e.width/2,r=t.y-e.height/2,i=e.x-n+u/2-h/2,o=e.y-r+l/2-f/2;e.array.forEach((function(e){e.x+=i,e.y+=o}))}))}(e))},t.separateGraphs=function(e,t){for(var n={},r={},i=[],o=0,a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(8793),o=n(9427),a=n(7069),s=n(31),c=n(2867),u=n(6085),l=n(7384);function h(e){return void 0!==e.leaves||void 0!==e.groups}!function(e){e[e.start=0]="start",e[e.tick=1]="tick",e[e.end=2]="end"}(r=t.EventType||(t.EventType={}));var f=function(){function e(){var t=this;this._canvasSize=[1,1],this._linkDistance=20,this._defaultNodeSize=10,this._linkLengthCalculator=null,this._linkType=null,this._avoidOverlaps=!1,this._handleDisconnected=!0,this._running=!1,this._nodes=[],this._groups=[],this._rootGroup=null,this._links=[],this._constraints=[],this._distanceMatrix=null,this._descent=null,this._directedLinkConstraints=null,this._threshold=.01,this._visibilityGraph=null,this._groupCompactness=1e-6,this.event=null,this.linkAccessor={getSourceIndex:e.getSourceIndex,getTargetIndex:e.getTargetIndex,setLength:e.setLinkLength,getType:function(e){return"function"==typeof t._linkType?t._linkType(e):0}}}return e.prototype.on=function(e,t){return this.event||(this.event={}),"string"==typeof e?this.event[r[e]]=t:this.event[e]=t,this},e.prototype.trigger=function(e){this.event&&void 0!==this.event[e.type]&&this.event[e.type](e)},e.prototype.kick=function(){for(;!this.tick(););},e.prototype.tick=function(){if(this._alpha0){var t=0;this._links.forEach((function(e){t=Math.max(t,e.source,e.target)})),this._nodes=new Array(++t);for(var n=0;n0?e:0:e>0&&(this._running||(this._running=!0,this.trigger({type:r.start,alpha:this._alpha=e}),this.kick())),this):this._alpha},e.prototype.getLinkLength=function(e){return"function"==typeof this._linkDistance?+this._linkDistance(e):this._linkDistance},e.setLinkLength=function(e,t){e.length=t},e.prototype.getLinkType=function(e){return"function"==typeof this._linkType?this._linkType(e):0},e.prototype.symmetricDiffLinkLengths=function(e,t){var n=this;return void 0===t&&(t=1),this.linkDistance((function(t){return e*t.length})),this._linkLengthCalculator=function(){return o.symmetricDiffLinkLengths(n._links,n.linkAccessor,t)},this},e.prototype.jaccardLinkLengths=function(e,t){var n=this;return void 0===t&&(t=1),this.linkDistance((function(t){return e*t.length})),this._linkLengthCalculator=function(){return o.jaccardLinkLengths(n._links,n.linkAccessor,t)},this},e.prototype.start=function(t,n,r,i,u,l){var h=this;void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=0),void 0===u&&(u=!0),void 0===l&&(l=!0);var f,d=this.nodes().length,g=d+2*this._groups.length,p=(this._links.length,this._canvasSize[0]),v=this._canvasSize[1],b=new Array(g),y=new Array(g),w=null,m=this._avoidOverlaps;this._nodes.forEach((function(e,t){e.index=t,void 0===e.x&&(e.x=p/2,e.y=v/2),b[t]=e.x,y[t]=e.y})),this._linkLengthCalculator&&this._linkLengthCalculator(),this._distanceMatrix?f=this._distanceMatrix:(f=new c.Calculator(g,this._links,e.getSourceIndex,e.getTargetIndex,(function(e){return h.getLinkLength(e)})).DistanceMatrix(),w=a.Descent.createSquareMatrix(g,(function(){return 2})),this._links.forEach((function(e){"number"==typeof e.source&&(e.source=h._nodes[e.source]),"number"==typeof e.target&&(e.target=h._nodes[e.target])})),this._links.forEach((function(t){var n=e.getSourceIndex(t),r=e.getTargetIndex(t);w[n][r]=w[r][n]=t.weight||1})));var x=a.Descent.createSquareMatrix(g,(function(e,t){return f[e][t]}));if(this._rootGroup&&void 0!==this._rootGroup.groups){var E=d;this._groups.forEach((function(e){!function(e,t,n,r){w[e][t]=w[t][e]=n,x[e][t]=x[t][e]=.1}(E,E+1,h._groupCompactness),b[E]=0,y[E++]=0,b[E]=0,y[E++]=0}))}else this._rootGroup={leaves:this._nodes,groups:[]};var C=this._constraints||[];for(this._directedLinkConstraints&&(this.linkAccessor.getMinSeparation=this._directedLinkConstraints.getMinSeparation,C=C.concat(o.generateDirectedEdgeConstraints(d,this._links,this._directedLinkConstraints.axis,this.linkAccessor))),this.avoidOverlaps(!1),this._descent=new a.Descent([b,y],x),this._descent.locks.clear(),E=0;E0&&(this._descent.project=new s.Projection(this._nodes,this._groups,this._rootGroup,C).projectFunctions()),this._descent.run(n),this.separateOverlappingComponents(p,v,l),this.avoidOverlaps(m),m&&(this._nodes.forEach((function(e,t){e.x=b[t],e.y=y[t]})),this._descent.project=new s.Projection(this._nodes,this._groups,this._rootGroup,C,!0).projectFunctions(),this._nodes.forEach((function(e,t){b[t]=e.x,y[t]=e.y}))),this._descent.G=w,this._descent.run(r),i){this._descent.snapStrength=1e3,this._descent.snapGridSize=this._nodes[0].width,this._descent.numGridSnapNodes=d,this._descent.scaleSnapByMaxH=d!=g;var N=a.Descent.createSquareMatrix(g,(function(e,t){return e>=d||t>=d?w[e][t]:0}));this._descent.G=N,this._descent.run(i)}return this.updateNodePositions(),this.separateOverlappingComponents(p,v,l),u?this.resume():this},e.prototype.initialLayout=function(t,n,r){if(this._groups.length>0&&t>0){var i=this._nodes.length,o=this._links.map((function(e){return{source:e.source.index,target:e.target.index}})),a=this._nodes.map((function(e){return{index:e.index}}));this._groups.forEach((function(e,t){a.push({index:e.index=i+t})})),this._groups.forEach((function(e,t){void 0!==e.leaves&&e.leaves.forEach((function(t){return o.push({source:e.index,target:t.index})})),void 0!==e.groups&&e.groups.forEach((function(t){return o.push({source:e.index,target:t.index})}))})),(new e).size(this.size()).nodes(a).links(o).avoidOverlaps(!1).linkDistance(this.linkDistance()).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(t,0,0,0,!1),this._nodes.forEach((function(e){n[e.index]=a[e.index].x,r[e.index]=a[e.index].y}))}else this._descent.run(t)},e.prototype.separateOverlappingComponents=function(e,t,n){var r=this;if(void 0===n&&(n=!0),!this._distanceMatrix&&this._handleDisconnected){var i=this._descent.x[0],o=this._descent.x[1];this._nodes.forEach((function(e,t){e.x=i[t],e.y=o[t]}));var a=l.separateGraphs(this._nodes,this._links);l.applyPacking(a,e,t,this._defaultNodeSize,1,n),this._nodes.forEach((function(e,t){r._descent.x[0][t]=e.x,r._descent.x[1][t]=e.y,e.bounds&&(e.bounds.setXCentre(e.x),e.bounds.setYCentre(e.y))}))}},e.prototype.resume=function(){return this.alpha(.1)},e.prototype.stop=function(){return this.alpha(0)},e.prototype.prepareEdgeRouting=function(e){void 0===e&&(e=0),this._visibilityGraph=new u.TangentVisibilityGraph(this._nodes.map((function(t){return t.bounds.inflate(-e).vertices()})))},e.prototype.routeEdge=function(e,t,n){void 0===t&&(t=5);var r=[],i=new u.TangentVisibilityGraph(this._visibilityGraph.P,{V:this._visibilityGraph.V,E:this._visibilityGraph.E}),o={x:e.source.x,y:e.source.y},a={x:e.target.x,y:e.target.y},l=i.addPoint(o,e.source.index),h=i.addPoint(a,e.target.index);i.addEdgeIfVisible(o,a,e.source.index,e.target.index),void 0!==n&&n(i);var f=new c.Calculator(i.V.length,i.E,(function(e){return e.source.id}),(function(e){return e.target.id}),(function(e){return e.length()})).PathFromNodeToNode(l.id,h.id);if(1===f.length||f.length===i.V.length){var d=s.makeEdgeBetween(e.source.innerBounds,e.target.innerBounds,t);r=[d.sourceIntersection,d.arrowStart]}else{for(var g=f.length-2,p=i.V[f[g]].p,v=i.V[f[0]].p,b=(r=[e.source.innerBounds.rayIntersection(p.x,p.y)],g);b>=0;--b)r.push(i.V[f[b]].p);r.push(s.makeEdgeTo(v,e.target.innerBounds,t))}return r},e.getSourceIndex=function(e){return"number"==typeof e.source?e.source:e.source.index},e.getTargetIndex=function(e){return"number"==typeof e.target?e.target:e.target.index},e.linkId=function(t){return e.getSourceIndex(t)+"-"+e.getTargetIndex(t)},e.dragStart=function(t){h(t)?e.storeOffset(t,e.dragOrigin(t)):(e.stopNode(t),t.fixed|=2)},e.stopNode=function(e){e.px=e.x,e.py=e.y},e.storeOffset=function(t,n){void 0!==t.leaves&&t.leaves.forEach((function(t){t.fixed|=2,e.stopNode(t),t._dragGroupOffsetX=t.x-n.x,t._dragGroupOffsetY=t.y-n.y})),void 0!==t.groups&&t.groups.forEach((function(t){return e.storeOffset(t,n)}))},e.dragOrigin=function(e){return h(e)?{x:e.bounds.cx(),y:e.bounds.cy()}:e},e.drag=function(t,n){h(t)?(void 0!==t.leaves&&t.leaves.forEach((function(e){t.bounds.setXCentre(n.x),t.bounds.setYCentre(n.y),e.px=e._dragGroupOffsetX+n.x,e.py=e._dragGroupOffsetY+n.y})),void 0!==t.groups&&t.groups.forEach((function(t){return e.drag(t,n)}))):(t.px=n.x,t.py=n.y)},e.dragEnd=function(t){h(t)?(void 0!==t.leaves&&t.leaves.forEach((function(t){e.dragEnd(t),delete t._dragGroupOffsetX,delete t._dragGroupOffsetY})),void 0!==t.groups&&t.groups.forEach(e.dragEnd)):t.fixed&=-7},e.mouseOver=function(e){e.fixed|=4,e.px=e.x,e.py=e.y},e.mouseOut=function(e){e.fixed&=-5},e}();t.Layout=f},6749:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2867),i=n(7069),o=n(31),a=n(9427),s=function(){function e(e,t){this.source=e,this.target=t}return e.prototype.actualLength=function(e){var t=this;return Math.sqrt(e.reduce((function(e,n){var r=n[t.target]-n[t.source];return e+r*r}),0))},e}();t.Link3D=s;t.Node3D=function(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),this.x=e,this.y=t,this.z=n};var c=function(){function e(t,n,r){var i=this;void 0===r&&(r=1),this.nodes=t,this.links=n,this.idealLinkLength=r,this.constraints=null,this.useJaccardLinkLengths=!0,this.result=new Array(e.k);for(var o=0;o{"use strict";function n(e,t){var n={};for(var r in e)n[r]={};for(var r in t)n[r]={};return Object.keys(n).length}function r(e,t){var n=0;for(var r in e)void 0!==t[r]&&++n;return n}function i(e,t,n,r){var i=function(e,t){var n={},r=function(e,t){void 0===n[e]&&(n[e]={}),n[e][t]={}};return e.forEach((function(e){var n=t.getSourceIndex(e),i=t.getTargetIndex(e);r(n,i),r(i,n)})),n}(e,r);e.forEach((function(e){var o=i[r.getSourceIndex(e)],a=i[r.getTargetIndex(e)];r.setLength(e,1+t*n(o,a))}))}function o(e,t,n){var r=[],i=0,o=[],a=[];function s(e){e.index=e.lowlink=i++,o.push(e),e.onStack=!0;for(var t=0,n=e.out;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,n){this.source=e,this.target=t,this.type=n};t.PowerEdge=n;var r=function(){function e(e,t,n,r){var i=this;if(this.linkAccessor=n,this.modules=new Array(e),this.roots=[],r)this.initModulesFromGroup(r);else{this.roots.push(new a);for(var s=0;s=this.R))return this.merge(t.a,t.b,e),!0}},e.prototype.nEdges=function(e,t){var n=e.incoming.intersection(t.incoming),r=e.outgoing.intersection(t.outgoing);return this.R-n.count()-r.count()},e.prototype.getGroupHierarchy=function(e){var t=this,r=[];return i(this.roots[0],{},r),this.allEdges().forEach((function(i){var o=t.modules[i.source],a=t.modules[i.target];e.push(new n(void 0===o.gid?i.source:r[o.gid],void 0===a.gid?i.target:r[a.gid],i.type))})),r},e.prototype.allEdges=function(){var t=[];return e.getEdges(this.roots[0],t),t},e.getEdges=function(t,n){t.forAll((function(t){t.getEdges(n),e.getEdges(t.children,n)}))},e}();function i(e,t,n){e.forAll((function(e){if(e.isLeaf())t.leaves||(t.leaves=[]),t.leaves.push(e.id);else{var r=t;if(e.gid=n.length,!e.isIsland()||e.isPredefined()){if(r={id:e.gid},e.isPredefined())for(var o in e.definition)r[o]=e.definition[o];t.groups||(t.groups=[]),t.groups.push(e.gid),n.push(r)}i(e.children,r,n)}}))}t.Configuration=r;var o=function(){function e(e,t,n,r,i){void 0===t&&(t=new s),void 0===n&&(n=new s),void 0===r&&(r=new a),this.id=e,this.outgoing=t,this.incoming=n,this.children=r,this.definition=i}return e.prototype.getEdges=function(e){var t=this;this.outgoing.forAll((function(r,i){r.forAll((function(r){e.push(new n(t.id,r.id,i))}))}))},e.prototype.isLeaf=function(){return 0===this.children.count()},e.prototype.isIsland=function(){return 0===this.outgoing.count()&&0===this.incoming.count()},e.prototype.isPredefined=function(){return void 0!==this.definition},e}();t.Module=o;var a=function(){function e(){this.table={}}return e.prototype.count=function(){return Object.keys(this.table).length},e.prototype.intersection=function(t){var n=new e;return n.table=function(e,t){var n={};for(var r in e)r in t&&(n[r]=e[r]);return n}(this.table,t.table),n},e.prototype.intersectionCount=function(e){return this.intersection(e).count()},e.prototype.contains=function(e){return e in this.table},e.prototype.add=function(e){this.table[e.id]=e},e.prototype.remove=function(e){delete this.table[e.id]},e.prototype.forAll=function(e){for(var t in this.table)e(this.table[t])},e.prototype.modules=function(){var e=[];return this.forAll((function(t){t.isPredefined()||e.push(t)})),e},e}();t.ModuleSet=a;var s=function(){function e(){this.sets={},this.n=0}return e.prototype.count=function(){return this.n},e.prototype.contains=function(e){var t=!1;return this.forAllModules((function(n){t||n.id!=e||(t=!0)})),t},e.prototype.add=function(e,t){(e in this.sets?this.sets[e]:this.sets[e]=new a).add(t),++this.n},e.prototype.remove=function(e,t){var n=this.sets[e];n.remove(t),0===n.count()&&delete this.sets[e],--this.n},e.prototype.forAll=function(e){for(var t in this.sets)e(this.sets[t],Number(t))},e.prototype.forAllModules=function(e){this.forAll((function(t,n){return t.forAll(e)}))},e.prototype.intersection=function(t){var n=new e;return this.forAll((function(e,r){if(r in t.sets){var i=e.intersection(t.sets[r]),o=i.count();o>0&&(n.sets[r]=i,n.n+=o)}})),n},e}();t.LinkSets=s,t.getGroups=function(e,t,n,i){for(var o=e.length,a=new r(o,t,n,i);a.greedyMerge(););var s=[],c=a.getGroupHierarchy(s);return s.forEach((function(t){var n=function(n){var r=t[n];"number"==typeof r&&(t[n]=e[r])};n("source"),n("target")})),{groups:c,powerEdges:s}}},7421:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.elem=e,this.subheaps=[]}return e.prototype.toString=function(e){for(var t="",n=!1,r=0;r0)}return null}}return e.prototype.clear=function(){this._root=null,this.size=0},e.prototype.find=function(e){for(var t=this._root;null!==t;){var n=this._comparator(e,t.data);if(0===n)return t.data;t=t.get_child(n>0)}return null},e.prototype.lowerBound=function(e){return this._bound(e,this._comparator)},e.prototype.upperBound=function(e){var t=this._comparator;return this._bound(e,(function(e,n){return t(n,e)}))},e.prototype.min=function(){var e=this._root;if(null===e)return null;for(;null!==e.left;)e=e.left;return e.data},e.prototype.max=function(){var e=this._root;if(null===e)return null;for(;null!==e.right;)e=e.right;return e.data},e.prototype.iterator=function(){return new o(this)},e.prototype.each=function(e){for(var t,n=this.iterator();null!==(t=n.next());)e(t)},e.prototype.reach=function(e){for(var t,n=this.iterator();null!==(t=n.prev());)e(t)},e.prototype._bound=function(e,t){for(var n=this._root,r=this.iterator();null!==n;){var i=this._comparator(e,n.data);if(0===i)return r._cursor=n,r;r._ancestors.push(n),n=n.get_child(i>0)}for(var o=r._ancestors.length-1;o>=0;--o)if(t(e,(n=r._ancestors[o]).data)>0)return r._cursor=n,r._ancestors.length=o,r;return r._ancestors.length=0,r},e}();t.TreeBase=i;var o=function(){function e(e){this._tree=e,this._ancestors=[],this._cursor=null}return e.prototype.data=function(){return null!==this._cursor?this._cursor.data:null},e.prototype.next=function(){if(null===this._cursor){var e=this._tree._root;null!==e&&this._minNode(e)}else{var t;if(null===this._cursor.right)do{if(t=this._cursor,!this._ancestors.length){this._cursor=null;break}this._cursor=this._ancestors.pop()}while(this._cursor.right===t);else this._ancestors.push(this._cursor),this._minNode(this._cursor.right)}return null!==this._cursor?this._cursor.data:null},e.prototype.prev=function(){if(null===this._cursor){var e=this._tree._root;null!==e&&this._maxNode(e)}else{var t;if(null===this._cursor.left)do{if(t=this._cursor,!this._ancestors.length){this._cursor=null;break}this._cursor=this._ancestors.pop()}while(this._cursor.left===t);else this._ancestors.push(this._cursor),this._maxNode(this._cursor.left)}return null!==this._cursor?this._cursor.data:null},e.prototype._minNode=function(e){for(;null!==e.left;)this._ancestors.push(e),e=e.left;this._cursor=e},e.prototype._maxNode=function(e){for(;null!==e.right;)this._ancestors.push(e),e=e.right;this._cursor=e},e}();t.Iterator=o;var a=function(){function e(e){this.data=e,this.left=null,this.right=null,this.red=!0}return e.prototype.get_child=function(e){return e?this.right:this.left},e.prototype.set_child=function(e,t){e?this.right=t:this.left=t},e}(),s=function(e){function t(t){var n=e.call(this)||this;return n._root=null,n._comparator=t,n.size=0,n}return r(t,e),t.prototype.insert=function(e){var n=!1;if(null===this._root)this._root=new a(e),n=!0,this.size++;else{var r=new a(void 0),i=!1,o=!1,s=null,c=r,u=null,l=this._root;for(c.right=this._root;;){if(null===l?(l=new a(e),u.set_child(i,l),n=!0,this.size++):t.is_red(l.left)&&t.is_red(l.right)&&(l.red=!0,l.left.red=!1,l.right.red=!1),t.is_red(l)&&t.is_red(u)){var h=c.right===s;l===u.get_child(o)?c.set_child(h,t.single_rotate(s,!o)):c.set_child(h,t.double_rotate(s,!o))}var f=this._comparator(l.data,e);if(0===f)break;o=i,i=f<0,null!==s&&(c=s),s=u,u=l,l=l.get_child(i)}this._root=r.right}return this._root.red=!1,n},t.prototype.remove=function(e){if(null===this._root)return!1;var n=new a(void 0),r=n;r.right=this._root;for(var i=null,o=null,s=null,c=!0;null!==r.get_child(c);){var u=c;o=i,i=r,r=r.get_child(c);var l=this._comparator(e,r.data);if(c=l>0,0===l&&(s=r),!t.is_red(r)&&!t.is_red(r.get_child(c)))if(t.is_red(r.get_child(!c))){var h=t.single_rotate(r,c);i.set_child(u,h),i=h}else if(!t.is_red(r.get_child(!c))){var f=i.get_child(!u);if(null!==f)if(t.is_red(f.get_child(!u))||t.is_red(f.get_child(u))){var d=o.right===i;t.is_red(f.get_child(u))?o.set_child(d,t.double_rotate(i,u)):t.is_red(f.get_child(!u))&&o.set_child(d,t.single_rotate(i,u));var g=o.get_child(d);g.red=!0,r.red=!0,g.left.red=!1,g.right.red=!1}else i.red=!1,f.red=!0,r.red=!0}}return null!==s&&(s.data=r.data,i.set_child(i.right===r,r.get_child(null===r.left)),this.size--),this._root=n.right,null!==this._root&&(this._root.red=!1),null!==s},t.is_red=function(e){return null!==e&&e.red},t.single_rotate=function(e,t){var n=e.get_child(!t);return e.set_child(!t,n.get_child(t)),n.set_child(t,e),e.red=!0,n.red=!1,n},t.double_rotate=function(e,n){return e.set_child(!n,t.single_rotate(e.get_child(!n),!n)),t.single_rotate(e,n)},t}(i);t.RBTree=s},31:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(4926),a=n(1138);function s(e){return e.bounds=void 0!==e.leaves?e.leaves.reduce((function(e,t){return t.bounds.union(e)}),c.empty()):c.empty(),void 0!==e.groups&&(e.bounds=e.groups.reduce((function(e,t){return s(t).union(e)}),e.bounds)),e.bounds=e.bounds.inflate(e.padding),e.bounds}t.computeGroupBounds=s;var c=function(){function e(e,t,n,r){this.x=e,this.X=t,this.y=n,this.Y=r}return e.empty=function(){return new e(Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY)},e.prototype.cx=function(){return(this.x+this.X)/2},e.prototype.cy=function(){return(this.y+this.Y)/2},e.prototype.overlapX=function(e){var t=this.cx(),n=e.cx();return t<=n&&e.x0?n[0]:null},e.prototype.vertices=function(){return[{x:this.x,y:this.y},{x:this.X,y:this.y},{x:this.X,y:this.Y},{x:this.x,y:this.Y}]},e.lineIntersection=function(e,t,n,r,i,o,a,s){var c=n-e,u=a-i,l=r-t,h=s-o,f=h*c-u*l;if(0==f)return null;var d=e-i,g=t-o,p=(u*g-h*d)/f,v=(c*g-l*d)/f;return p>=0&&p<=1&&v>=0&&v<=1?{x:e+p*c,y:t+p*l}:null},e.prototype.inflate=function(t){return new e(this.x-t,this.X+t,this.y-t,this.Y+t)},e}();t.Rectangle=c,t.makeEdgeBetween=function(e,t,n){var r=e.rayIntersection(t.cx(),t.cy())||{x:e.cx(),y:e.cy()},i=t.rayIntersection(e.cx(),e.cy())||{x:t.cx(),y:t.cy()},o=i.x-r.x,a=i.y-r.y,s=Math.sqrt(o*o+a*a),c=s-n;return{sourceIntersection:r,targetIntersection:i,arrowStart:{x:r.x+c*o/s,y:r.y+c*a/s}}},t.makeEdgeTo=function(e,t,n){var r=t.rayIntersection(e.x,e.y);r||(r={x:t.cx(),y:t.cy()});var i=r.x-e.x,o=r.y-e.y,a=Math.sqrt(i*i+o*o);return{x:r.x-n*i/a,y:r.y-n*o/a}};var u=function(e,t,n){this.v=e,this.r=t,this.pos=n,this.prev=f(),this.next=f()},l=function(e,t,n){this.isOpen=e,this.v=t,this.pos=n};function h(e,t){return e.pos>t.pos?1:e.pos0&&(e[n].insert(i),i[r].insert(e))};n("next","prev"),n("prev","next")}};function p(e,t,n,r){void 0===r&&(r=!1);var i=e.padding,o=void 0!==e.groups?e.groups.length:0,a=void 0!==e.leaves?e.leaves.length:0,s=o?e.groups.reduce((function(e,r){return e.concat(p(r,t,n,!0))}),[]):[],c=(r?2:0)+a+o,u=new Array(c),l=new Array(c),h=0,f=function(e,t){l[h]=e,u[h++]=t};if(r){var d=e.bounds,g=t.getCentre(d),b=t.getSize(d)/2,y=t.getOpen(d),w=t.getClose(d),m=g-b+i/2,x=g+b-i/2;e.minVar.desiredPosition=m,f(t.makeRect(y,w,m,i),e.minVar),e.maxVar.desiredPosition=x,f(t.makeRect(y,w,x,i),e.maxVar)}a&&e.leaves.forEach((function(e){return f(e.bounds,e.variable)})),o&&e.groups.forEach((function(e){var n=e.bounds;f(t.makeRect(t.getOpen(n),t.getClose(n),t.getCentre(n),t.getSize(n)),e.minVar)}));var E=v(l,u,t,n);return o&&(u.forEach((function(e){e.cOut=[],e.cIn=[]})),E.forEach((function(e){e.left.cOut.push(e),e.right.cIn.push(e)})),e.groups.forEach((function(e){var n=(e.padding-t.getSize(e.bounds))/2;e.minVar.cIn.forEach((function(e){return e.gap+=n})),e.minVar.cOut.forEach((function(t){t.left=e.maxVar,t.gap+=n}))}))),s.concat(E)}function v(e,t,n,r){var i,a=e.length,s=2*a;console.assert(t.length>=a);var c=new Array(s);for(i=0;ie[n]&&(e[n]=t)}o=e}))}},e.prototype.createAlignment=function(e){var t=this,n=this.nodes[e.offsets[0].node].variable;this.makeFeasible(e);var r="x"===e.axis?this.xConstraints:this.yConstraints;e.offsets.slice(1).forEach((function(e){var i=t.nodes[e.node].variable;r.push(new o.Constraint(n,i,e.offset,!0))}))},e.prototype.createConstraints=function(e){var t=this,n=function(e){return void 0===e.type||"separation"===e.type};this.xConstraints=e.filter((function(e){return"x"===e.axis&&n(e)})).map((function(e){return t.createSeparation(e)})),this.yConstraints=e.filter((function(e){return"y"===e.axis&&n(e)})).map((function(e){return t.createSeparation(e)})),e.filter((function(e){return"alignment"===e.type})).forEach((function(e){return t.createAlignment(e)}))},e.prototype.setupVariablesAndBounds=function(e,t,n,r){this.nodes.forEach((function(i,o){i.fixed?(i.variable.weight=i.fixedWeight?i.fixedWeight:1e3,n[o]=r(i)):i.variable.weight=1;var a=(i.width||0)/2,s=(i.height||0)/2,u=e[o],l=t[o];i.bounds=new c(u-a,u+a,l-s,l+s)}))},e.prototype.xProject=function(e,t,n){(this.rootGroup||this.avoidOverlaps||this.xConstraints)&&this.project(e,t,e,n,(function(e){return e.px}),this.xConstraints,w,(function(e){return e.bounds.setXCentre(n[e.variable.index]=e.variable.position())}),(function(e){var t=n[e.minVar.index]=e.minVar.position(),r=n[e.maxVar.index]=e.maxVar.position(),i=e.padding/2;e.bounds.x=t-i,e.bounds.X=r+i}))},e.prototype.yProject=function(e,t,n){(this.rootGroup||this.yConstraints)&&this.project(e,t,t,n,(function(e){return e.py}),this.yConstraints,m,(function(e){return e.bounds.setYCentre(n[e.variable.index]=e.variable.position())}),(function(e){var t=n[e.minVar.index]=e.minVar.position(),r=n[e.maxVar.index]=e.maxVar.position(),i=e.padding/2;e.bounds.y=t-i,e.bounds.Y=r+i}))},e.prototype.projectFunctions=function(){var e=this;return[function(t,n,r){return e.xProject(t,n,r)},function(t,n,r){return e.yProject(t,n,r)}]},e.prototype.project=function(e,t,n,r,i,o,a,c,u){this.setupVariablesAndBounds(e,t,r,i),this.rootGroup&&this.avoidOverlaps&&(s(this.rootGroup),o=o.concat(a(this.rootGroup))),this.solve(this.variables,o,n,r),this.nodes.forEach(c),this.rootGroup&&this.avoidOverlaps&&(this.groups.forEach(u),s(this.rootGroup))},e.prototype.solve=function(e,t,n,r){var i=new o.Solver(e,t);i.setStartingPositions(n),i.setDesiredPositions(r),i.solve()},e}();t.Projection=E},2867:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7421),i=function(e,t){this.id=e,this.distance=t},o=function(e){this.id=e,this.neighbours=[]},a=function(e,t,n){this.node=e,this.prev=t,this.d=n},s=function(){function e(e,t,n,r,a){this.n=e,this.es=t,this.neighbours=new Array(this.n);for(var s=this.n;s--;)this.neighbours[s]=new o(s);for(s=this.es.length;s--;){var c=this.es[s],u=n(c),l=r(c),h=a(c);this.neighbours[u].neighbours.push(new i(l,h)),this.neighbours[l].neighbours.push(new i(u,h))}}return e.prototype.DistanceMatrix=function(){for(var e=new Array(this.n),t=0;th&&(u.d=h,u.prev=s,n.reduceKey(u.q,u,(function(e,t){return e.q=t})))}}return o},e}();t.Calculator=s},4926:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.scale=e,this.AB=0,this.AD=0,this.A2=0}return e.prototype.addVariable=function(e){var t=this.scale/e.scale,n=e.offset/e.scale,r=e.weight;this.AB+=r*t*n,this.AD+=r*t*e.desiredPosition,this.A2+=r*t*t},e.prototype.getPosn=function(){return(this.AD-this.AB)/this.A2},e}();t.PositionStats=n;var r=function(){function e(e,t,n,r){void 0===r&&(r=!1),this.left=e,this.right=t,this.gap=n,this.equality=r,this.active=!1,this.unsatisfiable=!1,this.left=e,this.right=t,this.gap=n,this.equality=r}return e.prototype.slack=function(){return this.unsatisfiable?Number.MAX_VALUE:this.right.scale*this.right.position()-this.gap-this.left.scale*this.left.position()},e}();t.Constraint=r;var i=function(){function e(e,t,n){void 0===t&&(t=1),void 0===n&&(n=1),this.desiredPosition=e,this.weight=t,this.scale=n,this.offset=0}return e.prototype.dfdv=function(){return 2*this.weight*(this.position()-this.desiredPosition)},e.prototype.position=function(){return(this.block.ps.scale*this.block.posn+this.offset)/this.scale},e.prototype.visitNeighbours=function(e,t){var n=function(n,r){return n.active&&e!==r&&t(n,r)};this.cOut.forEach((function(e){return n(e,e.right)})),this.cIn.forEach((function(e){return n(e,e.left)}))},e}();t.Variable=i;var o=function(){function e(e){this.vars=[],e.offset=0,this.ps=new n(e.scale),this.addVariable(e)}return e.prototype.addVariable=function(e){e.block=this,this.vars.push(e),this.ps.addVariable(e),this.posn=this.ps.getPosn()},e.prototype.updateWeightedPosition=function(){this.ps.AB=this.ps.AD=this.ps.A2=0;for(var e=0,t=this.vars.length;e=0?this.inactive.push(t):this.bs.merge(t)}}},e.prototype.solve=function(){this.satisfy();for(var e=Number.MAX_VALUE,t=this.bs.cost();Math.abs(e-t)>1e-4;)this.satisfy(),e=t,t=this.bs.cost();return t},e.LAGRANGIAN_TOLERANCE=-1e-4,e.ZERO_UPPERBOUND=-1e-10,e}();t.Solver=s,t.removeOverlapInOneDimension=function(e,t,n){for(var o=e.map((function(e){return new i(e.desiredCenter)})),a=[],c=e.length,u=0;u{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e={};n.r(e),n.d(e,{VERSION:()=>t,after:()=>At,all:()=>Qt,allKeys:()=>ge,any:()=>Jt,assign:()=>Ae,before:()=>Mt,bind:()=>mt,bindAll:()=>Ct,chain:()=>vt,chunk:()=>jn,clone:()=>je,collect:()=>qt,compact:()=>_n,compose:()=>It,constant:()=>$,contains:()=>en,countBy:()=>dn,create:()=>De,debounce:()=>Ot,default:()=>Bn,defaults:()=>Me,defer:()=>Nt,delay:()=>_t,detect:()=>zt,difference:()=>Sn,drop:()=>Cn,each:()=>Ut,escape:()=>it,every:()=>Qt,extend:()=>Ie,extendOwn:()=>Ae,filter:()=>$t,find:()=>zt,findIndex:()=>Rt,findKey:()=>Dt,findLastIndex:()=>Gt,findWhere:()=>Vt,first:()=>En,flatten:()=>Nn,foldl:()=>Wt,foldr:()=>Zt,forEach:()=>Ut,functions:()=>Te,get:()=>Fe,groupBy:()=>hn,has:()=>Ye,head:()=>En,identity:()=>ze,include:()=>en,includes:()=>en,indexBy:()=>fn,indexOf:()=>Ft,initial:()=>xn,inject:()=>Wt,intersection:()=>In,invert:()=>Oe,invoke:()=>tn,isArguments:()=>X,isArray:()=>V,isArrayBuffer:()=>D,isBoolean:()=>N,isDataView:()=>z,isDate:()=>I,isElement:()=>S,isEmpty:()=>ae,isEqual:()=>de,isError:()=>M,isFinite:()=>W,isFunction:()=>G,isMap:()=>Ee,isMatch:()=>se,isNaN:()=>Z,isNull:()=>k,isNumber:()=>L,isObject:()=>C,isRegExp:()=>A,isSet:()=>ke,isString:()=>T,isSymbol:()=>P,isTypedArray:()=>ne,isUndefined:()=>_,isWeakMap:()=>Ce,isWeakSet:()=>_e,iteratee:()=>We,keys:()=>oe,last:()=>kn,lastIndexOf:()=>Yt,map:()=>qt,mapObject:()=>$e,matcher:()=>Ve,matches:()=>Ve,max:()=>on,memoize:()=>kt,methods:()=>Te,min:()=>an,mixin:()=>Gn,negate:()=>Lt,noop:()=>Ke,now:()=>tt,object:()=>Pn,omit:()=>mn,once:()=>Pt,pairs:()=>Se,partial:()=>wt,partition:()=>gn,pick:()=>wn,pluck:()=>nn,property:()=>Ue,propertyOf:()=>Qe,random:()=>et,range:()=>Dn,reduce:()=>Wt,reduceRight:()=>Zt,reject:()=>Kt,rest:()=>Cn,restArguments:()=>E,result:()=>dt,sample:()=>sn,select:()=>$t,shuffle:()=>cn,size:()=>bn,some:()=>Jt,sortBy:()=>un,sortedIndex:()=>Bt,tail:()=>Cn,take:()=>En,tap:()=>Re,template:()=>ft,templateSettings:()=>at,throttle:()=>St,times:()=>Je,toArray:()=>vn,toPath:()=>Ge,transpose:()=>An,unescape:()=>ot,union:()=>Ln,uniq:()=>Tn,unique:()=>Tn,uniqueId:()=>pt,unzip:()=>An,values:()=>Ne,where:()=>rn,without:()=>On,wrap:()=>Tt,zip:()=>Mn});var t="1.13.1",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},i=Array.prototype,o=Object.prototype,a="undefined"!=typeof Symbol?Symbol.prototype:null,s=i.push,c=i.slice,u=o.toString,l=o.hasOwnProperty,h="undefined"!=typeof ArrayBuffer,f="undefined"!=typeof DataView,d=Array.isArray,g=Object.keys,p=Object.create,v=h&&ArrayBuffer.isView,b=isNaN,y=isFinite,w=!{toString:null}.propertyIsEnumerable("toString"),m=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],x=Math.pow(2,53)-1;function E(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;i=0&&n<=x}}function Q(e){return function(t){return null==t?void 0:t[e]}}const J=Q("byteLength"),ee=K(J);var te=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;const ne=h?function(e){return v?v(e)&&!z(e):ee(e)&&te.test(u.call(e))}:$(!1),re=Q("length");function ie(e,t){t=function(e){for(var t={},n=e.length,r=0;r":">",'"':""","'":"'","`":"`"},it=nt(rt),ot=nt(Oe(rt)),at=ce.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var st=/(.)^/,ct={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},ut=/\\|'|\r|\n|\u2028|\u2029/g;function lt(e){return"\\"+ct[e]}var ht=/^\s*(\w|\$)+\s*$/;function ft(e,t,n){!t&&n&&(t=n),t=Me({},t,ce.templateSettings);var r=RegExp([(t.escape||st).source,(t.interpolate||st).source,(t.evaluate||st).source].join("|")+"|$","g"),i=0,o="__p+='";e.replace(r,(function(t,n,r,a,s){return o+=e.slice(i,s).replace(ut,lt),i=s+t.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),t})),o+="';\n";var a,s=t.variable;if(s){if(!ht.test(s))throw new Error("variable is not a bare identifier: "+s)}else o="with(obj||{}){\n"+o+"}\n",s="obj";o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{a=new Function(s,"_",o)}catch(e){throw e.source=o,e}var c=function(e){return a.call(this,e,ce)};return c.source="function("+s+"){\n"+o+"}",c}function dt(e,t,n){var r=(t=Be(t)).length;if(!r)return G(n)?n.call(e):n;for(var i=0;i1)Et(s,t-1,n,r),i=r.length;else for(var c=0,u=s.length;ct?(r&&(clearTimeout(r),r=null),s=u,a=e.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(c,l)),a};return u.cancel=function(){clearTimeout(r),s=0,r=i=o=null},u}function Ot(e,t,n){var r,i,o,a,s,c=function(){var u=tt()-i;t>u?r=setTimeout(c,t-u):(r=null,n||(a=e.apply(s,o)),r||(o=s=null))},u=E((function(u){return s=this,o=u,i=tt(),r||(r=setTimeout(c,t),n&&(a=e.apply(s,o))),a}));return u.cancel=function(){clearTimeout(r),r=o=s=null},u}function Tt(e,t){return wt(t,e)}function Lt(e){return function(){return!e.apply(this,arguments)}}function It(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}}function At(e,t){return function(){if(--e<1)return t.apply(this,arguments)}}function Mt(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}}const Pt=wt(Mt,2);function Dt(e,t,n){t=Ze(t,n);for(var r,i=oe(e),o=0,a=i.length;o0?0:i-1;o>=0&&o0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=t(c.call(r,a,s),Z))>=0?o+a:-1;for(o=e>0?a:s-1;o>=0&&o0?0:a-1;for(i||(r=t[o?o[s]:s],s+=e);s>=0&&s=3;return t(e,qe(n,i,4),r,o)}}const Wt=Xt(1),Zt=Xt(-1);function $t(e,t,n){var r=[];return t=Ze(t,n),Ut(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function Kt(e,t,n){return $t(e,Lt(Ze(t)),n)}function Qt(e,t,n){t=Ze(t,n);for(var r=!xt(e)&&oe(e),i=(r||e).length,o=0;o=0}const tn=E((function(e,t,n){var r,i;return G(t)?i=t:(t=Be(t),r=t.slice(0,-1),t=t[t.length-1]),qt(e,(function(e){var o=i;if(!o){if(r&&r.length&&(e=He(e,r)),null==e)return;o=e[t]}return null==o?o:o.apply(e,n)}))}));function nn(e,t){return qt(e,Ue(t))}function rn(e,t){return $t(e,Ve(t))}function on(e,t,n){var r,i,o=-1/0,a=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,c=(e=xt(e)?e:Ne(e)).length;so&&(o=r);else t=Ze(t,n),Ut(e,(function(e,n,r){((i=t(e,n,r))>a||i===-1/0&&o===-1/0)&&(o=e,a=i)}));return o}function an(e,t,n){var r,i,o=1/0,a=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,c=(e=xt(e)?e:Ne(e)).length;sr||void 0===n)return 1;if(n1&&(r=qe(r,t[1])),t=ge(e)):(r=yn,t=Et(t,!1,!1),e=Object(e));for(var i=0,o=t.length;i1&&(n=t[1])):(t=qt(Et(t,!1,!1),String),r=function(e,n){return!en(t,n)}),wn(e,r,n)}));function xn(e,t,n){return c.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))}function En(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[0]:xn(e,e.length-t)}function Cn(e,t,n){return c.call(e,null==t||n?1:t)}function kn(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[e.length-1]:Cn(e,Math.max(0,e.length-t))}function _n(e){return $t(e,Boolean)}function Nn(e,t){return Et(e,t,!1)}const Sn=E((function(e,t){return t=Et(t,!0,!0),$t(e,(function(e){return!en(t,e)}))})),On=E((function(e,t){return Sn(e,t)}));function Tn(e,t,n,r){N(t)||(r=n,n=t,t=!1),null!=n&&(n=Ze(n,r));for(var i=[],o=[],a=0,s=re(e);a\n\n \n \n <%= letter %>\n \n\n\n'),n=e.charAt(0).toUpperCase(),r=jr[e]||"#B99435";return{color:r,shape:"ellipse",image:Pr(t({nodeType:e,color:r,letter:n}))}}(e.type);if("marking-definition"===e.type)if(e.definition&&e.definition.tlp){const n=e.definition.tlp.toLowerCase();t.color=Rr[n]||"#2E8BC0"}else t.color="#2E8BC0";return t}zn().use(Un()),zn().use(Xn()),zn().use(Zn()),zn().use(Kn()),zn().use(Jn()),zn().use(tr()),zn().use(rr()),or()(zn());const qr={euler:{pull:.006,mass:e=>10,animation:!1,dragCoeff:.3},"cose-bilkent":{animate:"end",animationEasing:"ease-out",animationDuration:300,nodeRepulsion:200,idealEdgeLength:90,gravityRange:50,gravity:8.2,padding:50},cola:{convergenceThreshold:100,animate:!1}},Xr=[{selector:"node",style:{shape:"data(shape)",width:30,height:30,"background-color":"data(color)","background-width":"90%","background-height":"90%","background-position-x":"50%","text-valign":"bottom","text-halign":"center",label:"","font-size":"10pt","text-max-width":"300px","text-wrap":"ellipsis"}},{selector:"node[image]",style:{"background-image":"data(image)"}},{selector:'node[type="relationship"]',style:{"background-image":"data(image)",width:15,height:15,"font-size":"8pt"}},{selector:'node[type="marking-definition"]',style:{width:15,height:15,"font-size":"8pt"}},{selector:'node[type="idref"]',style:{width:15,height:15,"font-size":"8pt"}},{selector:"edge",style:{width:1,opacity:.5,label:"data(label)","curve-style":"bezier","line-color":"#bbb","target-arrow-color":"#ccc","target-arrow-shape":"triangle","min-zoomed-font-size":"5pt"}},{selector:'edge[label="x_eclecticiq_alternative_hypothesis_refs"]',style:{"curve-style":"bezier","control-point-step-size":40,"line-color":"#ccc"}},{selector:".bleak",style:{opacity:.1}},{selector:"edge.autorotate",style:{"font-size":"9pt",color:"#222","edge-text-rotation":"autorotate"}},{selector:"node:selected",style:{"background-color":"black"}}];function Wr(e,t){const n=e.layout({name:t,...qr[t]});n.run(),setTimeout((function(){n.stop()}),300),e.layoutName=t}function Zr(e){const t=e.querySelector(".viewer-placeholder");t&&t.parentNode&&t.parentNode.removeChild(t)}function $r(e,t,n,r){const{highlightedObjects:i,hiddenObjects:o,showTlpAsTags:a,showMarkingNodes:s,showIdrefs:c}=n,u=e.cy;u.remove("node"),u.remove("edge"),u.mount(u.stixviewContainer),Zr(e.element);const l=function(e,t){const{highlightedObjects:n,hiddenObjects:r,showTlpAsTags:i,showMarkingNodes:o,showIdrefs:a}=t;let s=[];const c={},u={},l=e.objects.filter((e=>"relationship"!=e.type)),h=e.objects.filter((e=>"relationship"==e.type)),f=function(e){const t={"marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9":{id:"marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9",value:"white",css:"marking-tag-tlp-white"},"marking-definition--34098fce-860f-48ae-8e50-ebd3cc5e41da":{id:"marking-definition--34098fce-860f-48ae-8e50-ebd3cc5e41da",value:"green",css:"marking-tag-tlp-green"},"marking-definition--f88d31f6-486f-44da-b317-01333bde0b82":{id:"marking-definition--f88d31f6-486f-44da-b317-01333bde0b82",value:"amber",css:"marking-tag-tlp-amber"},"marking-definition--5e57c739-391a-4eb3-b6be-7d15ca92d5ed":{id:"marking-definition--5e57c739-391a-4eb3-b6be-7d15ca92d5ed",value:"red",css:"marking-tag-tlp-red"}};return e.objects.filter((e=>"marking-definition"==e.type&&e.definition&&e.definition.tlp)).forEach((e=>{e.id in t||(t[e.id]={value:e.name,css:"marking-tag-tlp-custom"})})),t}(e);function d(e){e.data.id in c||(s.push(e),c[e.data.id]=e)}l.forEach((e=>d(Yr(e))));let g=[];const p={};function v(e){e.data.id in p||(g.push(e),p[e.data.id]=e)}if(h.forEach((e=>v(zr(e)))),s.forEach((e=>function(e){const t=e.data.raw,n=[];if(!t)return n;function r(e,r){(r.endsWith("_ref")||r.endsWith("_refs"))&&("string"==typeof e?[e]:e).forEach((e=>{const i=zr({id:"rel-"+t.id+"-"+e,source_ref:t.id,target_ref:e,relationship_type:r});n.push(i)}))}return Fn.forEach(t,r),t.extensions&&t.extensions["archive-ext"]&&t.extensions["archive-ext"].contains_refs&&r(t.extensions["archive-ext"].contains_refs,"contains_refs"),t.granular_markings&&t.granular_markings.forEach((e=>r(e.marking_ref,"marking_ref"))),n}(e).forEach(v))),g.filter((e=>!(c[e.data.source]&&c[e.data.target]))).forEach((e=>{e.data.source in f&&!(e.data.source in c)&&d(Hr(f[e.data.source])),e.data.target in f&&!(e.data.target in c)&&d(Hr(f[e.data.target]))})),a){const e=[],t=[];g.filter((e=>!(c[e.data.source]&&c[e.data.target]))).forEach((n=>{const{newNodes:r,newEdges:i,edgesToDelete:o}=function(e,t,n){let r=e[n.data.source],i=e[n.data.target];const o=[],a=[];let s=[];if(!r){if(n.data.source.startsWith("relationship")){const e=t[n.data.source];if(e){a.push(e);const{node:t,edges:n}=Fr(e);r=t,s=s.concat(n)}}r=r||Br(n.data.source,n.data.raw),o.push(r)}if(!i){if(n.data.target.startsWith("relationship")){const e=t[n.data.target];if(e){a.push(e);const{node:t,edges:n}=Fr(e);i=t,s=s.concat(n)}}i=i||Br(n.data.target,n.data.raw),o.push(i)}return{newNodes:o,newEdges:s,edgesToDelete:a}}(c,p,n);t.push(...o),e.push(...i),r.forEach(d)})),g=Fn.difference(g,t),e.forEach(v)}else g=g.filter((e=>c[e.data.source]&&c[e.data.target]));return s=s.filter((e=>!(e.data.id in u||(n.length>0&&-1==n.indexOf(e.data.id)||r.length>0&&r.indexOf(e.data.id)>-1||e.data.id.startsWith("marking-definition")&&e.data.raw.definition&&"tlp"in e.data.raw.definition&&i||e.data.id.startsWith("marking-definition")&&!o)&&(u[e.data.id]=e,1)))),g=g.filter((e=>!(u[e.data.source]||u[e.data.target]))),function(e,t,n,r){n.showTlpAsTags&&e.forEach((e=>{const t=(n=r,(i=e.data.raw).object_marking_refs&&i.object_marking_refs.length?i.object_marking_refs.filter((e=>e in n)).map((e=>n[e])):[]);var n,i;if(0==t.length)return;let o=null;t.length>1?(console.warn("More than one TLP marking for "+e.data.id+", showing the most relaxed one"),o=function(e){if(0==e.length)return;const t=["white","green","amber","red"],n=e.map((e=>t.indexOf(e.value.toLowerCase()))).filter((e=>e>-1)).sort()[0],r=t[n];return e.filter((e=>e.value.toLowerCase()==r))[0]}(t)):o=t[0],o&&e.data.tags.push(o)})),n.showAttackAsTags&&e.forEach((e=>{const t=(e.data.raw,[]);if(0==t.length)return;const n=t.sort().join(", ");e.data.tags.push(n)}))}(s,0,{showTlpAsTags:i,showAttackAsTags:!0},f),s.concat(g)}(t,{highlightedObjects:i,hiddenObjects:o,showTlpAsTags:a,showMarkingNodes:s,showIdrefs:c});u.add(l),u.bundle=t,u.once("layoutstop",(()=>r&&r(e))),u.tags&&(u.tags.forEach((e=>{e.removeListeners();const t=e.element;t.parentNode&&t.parentNode.removeChild(t)})),u.tags=[]),a&&(u.tags=[],u.nodes().forEach((e=>{const t=e.data();if(!t.tags||!t.tags.length)return;const n=["right-start","right","right-end"];t.tags.slice(0,3).forEach(((t,r)=>{const i=function(e,t,n,r){const i=document.createElement("div");i.innerHTML=n.value.toUpperCase(),i.classList.add("marking-tag"),i.classList.add(n.css),r=r||"right-start";const o=t.popper({content:()=>(e.element.appendChild(i),i),popper:{placement:r}}),a=()=>{o.update();const t=Math.min(Math.max(8*e.zoom(),2),10);i.style.fontSize=t+"pt",i.style.lineHeight=Math.ceil(t)+"pt"};return t.on("position",a),e.on("pan zoom resize",a),{element:i,removeListeners:()=>{e.off("pan zoom resize",a)}}}(u,e,t,n[r]);u.tags.push(i)}))}))),e.toggleLabels(e.viewProps.showLabels),l||r&&r(e),function(e){const t=e.element.querySelector(".download-json");t&&(t.onclick=function(t){t.preventDefault(),function(e){const t=document.createElement("a");t.href="data:application/json,"+encodeURIComponent(JSON.stringify(e,null,4)),t.download=e.id+".json",t.target="_blank",t.click()}(e.bundle)});const n=e.element.querySelector(".download-png");n&&(n.onclick=function(t){t.preventDefault(),function(e,t){const n=document.createElement("a");n.href=t,n.download="graph-"+e.id+".png",n.target="_blank",n.click()}(e.bundle,e.png())})}(u),Wr(u,u.layoutName||"cola"),u.sidebar&&function(e){e.nodes().on("click",(t=>{t.preventDefault();const n=t.target.data();e.sidebar.innerHTML=e.sidebarRender?e.sidebarRender(n):function(e){const t=e.raw;return Fn.template("\n \n <%= obj.type %>\n ×\n \n

<%= obj.description %>

\n

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

\n

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

\n

Created: <%= obj.created %>

\n

ID: <%= obj.id %>

\n

\n JSON:
\n \n

\n ")({obj:t,nodeLabel:Vr(t),icon:Ur(t).image})}(n);const r=e.sidebar.querySelector(".sidebar-close-icon");r&&(r.onclick=()=>{e.sidebar.style.display="none"}),e.sidebar.style.display="block"}))}(u)}var Kr=n(3379),Qr=n.n(Kr),Jr=n(7795),ei=n.n(Jr),ti=n(569),ni=n.n(ti),ri=n(3565),ii=n.n(ri),oi=n(9216),ai=n.n(oi),si=n(4589),ci=n.n(si),ui=n(5150),li=n.n(ui),hi={};hi.styleTagTransform=ci(),hi.setAttributes=ii(),hi.insert=ni().bind(null,"head"),hi.domAPI=ei(),hi.insertStyleElement=ai(),Qr()(li(),hi),li()&&li().locals&&li().locals;const fi={},di={},gi={};function pi(e,t,n,r,i){if(e in fi)return fi[e];const o=e.dataset.stixGistId,a=e.dataset.gistFile,s=e.dataset.stixUrl;let c={showIdrefs:lr(ur(e.dataset.showIdrefs,!1)),highlightedObjects:e.dataset.highlightedObjects?e.dataset.highlightedObjects.split(","):[],hiddenObjects:e.dataset.hiddenObjects?e.dataset.hiddenObjects.split(","):[],showTlpAsTags:lr(ur(e.dataset.showTlpAsTags,!0)),showMarkingNodes:lr(ur(e.dataset.showMarkingNodes,!0)),...r};const u={layout:e.dataset.graphLayout,caption:e.dataset.caption,showFooter:lr(ur(e.dataset.showFooter,!0)),showSidebar:lr(ur(e.dataset.showSidebar,!0)),showLabels:lr(ur(e.dataset.showLabels,!0)),allowDragDrop:lr(ur(e.dataset.stixAllowDragdrop,!1)),enableMouseZoom:lr(ur(e.dataset.enableMouseZoom,!0)),enablePanning:lr(ur(e.dataset.enablePanning,!0)),graphWidth:e.dataset.graphWidth||e.clientWidth||800,graphHeight:e.dataset.graphHeight||600,minZoom:e.dataset.minZoom,maxZoom:e.dataset.maxZoom,...i},l=e=>{$r(h,e,c,(e=>{e.toggleLoading(!1),n&&n(e)}))};let h=function(e,t,n){const{layout:r,caption:i,showFooter:o,showSidebar:a,showLabels:s,allowDragDrop:c,enableMouseZoom:u,enablePanning:l,graphWidth:h,graphHeight:f,minZoom:d,maxZoom:g,graphStyle:p,onClickNode:v,sidebarRender:b}=t,y=h||e.clientWidth||800;e=function(e,t){const{caption:n,width:r,height:i,showFooter:o}=t;e.classList.add("stix-viewer-block");const a=document.createElement("div");a.classList.add("stix-viewer"),e.appendChild(a);const s=document.createElement("div");if(s.classList.add("stix-graph"),a.appendChild(s),e.style.width=isNaN(r)&&r||r+"px",s.style.width="100%",s.style.height=isNaN(i)&&i||i+"px",n){const t=document.createElement("div");t.setAttribute("class","viewer-header"),t.innerText=n,e.insertBefore(t,e.firstChild)}if(o){const t=document.createElement("div");t.setAttribute("class","viewer-footer"),t.innerHTML='\n made with stixview\n \n STIX2 \n PNG\n \n ',e.appendChild(t)}return e}(e,{width:y,height:f||600,caption:i,showFooter:o});const w=e.querySelector(".stix-viewer");var m,x;c&&(w.querySelector(".stix-graph").innerHTML="
Drag and drop STIX2 json file here
",x=e=>n(e),(m=e).addEventListener("dragover",(e=>{e.stopPropagation(),e.preventDefault(),m.classList.add("dragover-active"),e.dataTransfer.dropEffect="copy"})),m.addEventListener("dragleave",(e=>{e.stopPropagation(),e.preventDefault(),m.classList.remove("dragover-active")})),m.addEventListener("drop",(e=>{e.stopPropagation(),e.preventDefault(),m.classList.remove("dragover-active");const t=e.dataTransfer.files;t.length>1&&console.error("More than 1 file dropped, picking the first one",t),0!=t.lengh&&hr(t[0],x)})));const E=zn()({style:p||Xr,userZoomingEnabled:u,userPanningEnabled:l});if(E.stixviewContainer=w.querySelector(".stix-graph"),E.minZoom(d||.3),E.maxZoom(g||2.5),a){const e=document.createElement("div");e.setAttribute("class","sidebar"),w.appendChild(e),E.sidebar=e}v&&E.on("click","node",(e=>{e.preventDefault();const t=e.target.data();v(t)})),E.layoutName=r,E.stixId=e.dataset.stixViewId,E.element=e,E.sidebarRender=b;const C={cy:E,element:e,viewProps:{showLabels:s},runLayout:e=>Wr(E,e),toggleLabels:e=>{E.style().selector("node").style("label",e?"data(label)":"").update()},fit:()=>E.fit(),toggleLoading:t=>{t?(e.classList.add("loading"),Zr(e)):e.classList.remove("loading")},setSidebarRender:()=>{E.sidebarRender=b}};return E.resize(),C}(e,u,l);return h={...h,dataProps:c,viewProps:u,loadData:l,loadDataFromFile:function(e){e&&"application/json"==e.type&&(h.toggleLoading(!0),hr(e,l))},loadDataFromParamUrl:function(e){h.toggleLoading(!0),function(e){return cr(new URL(window.location.href).searchParams.get(e))}(e).then(l,(t=>{h.toggleLoading(!1),console.error("Can not load a url from a parameter "+e,t)}))},loadDataFromGist:function(e,t){h.toggleLoading(!0),function(e,t){const n="https://api.github.com/gists/"+e,r=ar[n]||new Promise((function(e,r){sr(n,(function(n){t=t||Object.keys(n.files)[0];const r=n.files[t];e(JSON.parse(r.content))}),r)}));return ar[n]=r,r}(e,t).then(l,(t=>{h.toggleLoading(!1),console.error("Can not load gist "+e,t)}))},loadDataFromUrl:function(e){h.toggleLoading(!0),cr(e).then(l,(t=>{h.toggleLoading(!1),console.error("Can not load data from url "+e,t)}))},reloadData:function(e,t,r){setTimeout((()=>{t=t||h.cy.bundle,c={...c,...e},$r(h,t,c,n),r&&r()}),20)},setSidebarRender:function(e){h.setSidebarRender(e)}},t&&t(h),(o||s)&&setTimeout((()=>{o?h.loadDataFromGist(o,a):s&&h.loadDataFromUrl(s)}),20),e.dataset.stixViewId=Math.random().toString(16).slice(2),fi[e]=h,h}function vi(e,t){const n=[];return Fn.keys(e).forEach((function(r){t.matches(r)&&n.push(e[r])})),n}"undefined"!=typeof window&&(window.addEventListener("load",(()=>{document.querySelectorAll("[data-stix-gist-id],[data-stix-url],[data-stix-allow-dragdrop]").forEach((e=>{pi(e,(t=>vi(di,e).forEach((e=>e(t)))),(t=>vi(gi,e).forEach((e=>e(t)))))}))})),window.stixview={registry:fi,onInit:function(e,t){di[e]=t},onLoad:function(e,t){gi[e]=t},init:pi})})()})(); \ No newline at end of file +(()=>{var e={4750:(e,t,n)=>{"use strict";n.r(t),n.d(t,{afterMain:()=>E,afterRead:()=>w,afterWrite:()=>_,applyStyles:()=>A,arrow:()=>$,auto:()=>s,basePlacements:()=>c,beforeMain:()=>m,beforeRead:()=>b,beforeWrite:()=>C,bottom:()=>i,clippingParents:()=>h,computeStyles:()=>ee,createPopper:()=>Te,createPopperBase:()=>Oe,createPopperLite:()=>Le,detectOverflow:()=>pe,end:()=>l,eventListeners:()=>ne,flip:()=>ve,hide:()=>we,left:()=>a,main:()=>x,modifierPhases:()=>N,offset:()=>me,placements:()=>v,popper:()=>d,popperGenerator:()=>Se,popperOffsets:()=>xe,preventOverflow:()=>Ee,read:()=>y,reference:()=>g,right:()=>o,start:()=>u,top:()=>r,variationPlacements:()=>p,viewport:()=>f,write:()=>k});var r="top",i="bottom",o="right",a="left",s="auto",c=[r,i,o,a],u="start",l="end",h="clippingParents",f="viewport",d="popper",g="reference",p=c.reduce((function(e,t){return e.concat([t+"-"+u,t+"-"+l])}),[]),v=[].concat(c,[s]).reduce((function(e,t){return e.concat([t,t+"-"+u,t+"-"+l])}),[]),b="beforeRead",y="read",w="afterRead",m="beforeMain",x="main",E="afterMain",C="beforeWrite",k="write",_="afterWrite",N=[b,y,w,m,x,E,C,k,_];function S(e){return e?(e.nodeName||"").toLowerCase():null}function O(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function T(e){return e instanceof O(e).Element||e instanceof Element}function L(e){return e instanceof O(e).HTMLElement||e instanceof HTMLElement}function I(e){return"undefined"!=typeof ShadowRoot&&(e instanceof O(e).ShadowRoot||e instanceof ShadowRoot)}const A={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];L(i)&&S(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});L(r)&&S(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function M(e){return e.split("-")[0]}var P=Math.max,D=Math.min,j=Math.round;function R(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,i=1;if(L(e)&&t){var o=e.offsetHeight,a=e.offsetWidth;a>0&&(r=j(n.width)/a||1),o>0&&(i=j(n.height)/o||1)}return{width:n.width/r,height:n.height/i,top:n.top/i,right:n.right/r,bottom:n.bottom/i,left:n.left/r,x:n.left/r,y:n.top/i}}function G(e){var t=R(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function B(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&I(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function H(e){return O(e).getComputedStyle(e)}function F(e){return["table","td","th"].indexOf(S(e))>=0}function Y(e){return((T(e)?e.ownerDocument:e.document)||window.document).documentElement}function z(e){return"html"===S(e)?e:e.assignedSlot||e.parentNode||(I(e)?e.host:null)||Y(e)}function V(e){return L(e)&&"fixed"!==H(e).position?e.offsetParent:null}function U(e){for(var t=O(e),n=V(e);n&&F(n)&&"static"===H(n).position;)n=V(n);return n&&("html"===S(n)||"body"===S(n)&&"static"===H(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&L(e)&&"fixed"===H(e).position)return null;for(var n=z(e);L(n)&&["html","body"].indexOf(S(n))<0;){var r=H(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function q(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function X(e,t,n){return P(e,D(t,n))}function W(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Z(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}const $={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,s=e.name,u=e.options,l=n.elements.arrow,h=n.modifiersData.popperOffsets,f=M(n.placement),d=q(f),g=[a,o].indexOf(f)>=0?"height":"width";if(l&&h){var p=function(e,t){return W("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Z(e,c))}(u.padding,n),v=G(l),b="y"===d?r:a,y="y"===d?i:o,w=n.rects.reference[g]+n.rects.reference[d]-h[d]-n.rects.popper[g],m=h[d]-n.rects.reference[d],x=U(l),E=x?"y"===d?x.clientHeight||0:x.clientWidth||0:0,C=w/2-m/2,k=p[b],_=E-v[g]-p[y],N=E/2-v[g]/2+C,S=X(k,N,_),O=d;n.modifiersData[s]=((t={})[O]=S,t.centerOffset=S-N,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&B(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function K(e){return e.split("-")[1]}var Q={top:"auto",right:"auto",bottom:"auto",left:"auto"};function J(e){var t,n=e.popper,s=e.popperRect,c=e.placement,u=e.variation,h=e.offsets,f=e.position,d=e.gpuAcceleration,g=e.adaptive,p=e.roundOffsets,v=e.isFixed,b=!0===p?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:j(t*r)/r||0,y:j(n*r)/r||0}}(h):"function"==typeof p?p(h):h,y=b.x,w=void 0===y?0:y,m=b.y,x=void 0===m?0:m,E=h.hasOwnProperty("x"),C=h.hasOwnProperty("y"),k=a,_=r,N=window;if(g){var S=U(n),T="clientHeight",L="clientWidth";S===O(n)&&"static"!==H(S=Y(n)).position&&"absolute"===f&&(T="scrollHeight",L="scrollWidth"),S=S,(c===r||(c===a||c===o)&&u===l)&&(_=i,x-=(v&&N.visualViewport?N.visualViewport.height:S[T])-s.height,x*=d?1:-1),c!==a&&(c!==r&&c!==i||u!==l)||(k=o,w-=(v&&N.visualViewport?N.visualViewport.width:S[L])-s.width,w*=d?1:-1)}var I,A=Object.assign({position:f},g&&Q);return d?Object.assign({},A,((I={})[_]=C?"0":"",I[k]=E?"0":"",I.transform=(N.devicePixelRatio||1)<=1?"translate("+w+"px, "+x+"px)":"translate3d("+w+"px, "+x+"px, 0)",I)):Object.assign({},A,((t={})[_]=C?x+"px":"",t[k]=E?w+"px":"",t.transform="",t))}const ee={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,c=void 0===s||s,u={placement:M(t.placement),variation:K(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,J(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,J(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var te={passive:!0};const ne={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,a=r.resize,s=void 0===a||a,c=O(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach((function(e){e.addEventListener("scroll",n.update,te)})),s&&c.addEventListener("resize",n.update,te),function(){o&&u.forEach((function(e){e.removeEventListener("scroll",n.update,te)})),s&&c.removeEventListener("resize",n.update,te)}},data:{}};var re={left:"right",right:"left",bottom:"top",top:"bottom"};function ie(e){return e.replace(/left|right|bottom|top/g,(function(e){return re[e]}))}var oe={start:"end",end:"start"};function ae(e){return e.replace(/start|end/g,(function(e){return oe[e]}))}function se(e){var t=O(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ce(e){return R(Y(e)).left+se(e).scrollLeft}function ue(e){var t=H(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function le(e){return["html","body","#document"].indexOf(S(e))>=0?e.ownerDocument.body:L(e)&&ue(e)?e:le(z(e))}function he(e,t){var n;void 0===t&&(t=[]);var r=le(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=O(r),a=i?[o].concat(o.visualViewport||[],ue(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(he(z(a)))}function fe(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function de(e,t){return t===f?fe(function(e){var t=O(e),n=Y(e),r=t.visualViewport,i=n.clientWidth,o=n.clientHeight,a=0,s=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:i,height:o,x:a+ce(e),y:s}}(e)):T(t)?function(e){var t=R(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):fe(function(e){var t,n=Y(e),r=se(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=P(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=P(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+ce(e),c=-r.scrollTop;return"rtl"===H(i||n).direction&&(s+=P(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:c}}(Y(e)))}function ge(e){var t,n=e.reference,s=e.element,c=e.placement,h=c?M(c):null,f=c?K(c):null,d=n.x+n.width/2-s.width/2,g=n.y+n.height/2-s.height/2;switch(h){case r:t={x:d,y:n.y-s.height};break;case i:t={x:d,y:n.y+n.height};break;case o:t={x:n.x+n.width,y:g};break;case a:t={x:n.x-s.width,y:g};break;default:t={x:n.x,y:n.y}}var p=h?q(h):null;if(null!=p){var v="y"===p?"height":"width";switch(f){case u:t[p]=t[p]-(n[v]/2-s[v]/2);break;case l:t[p]=t[p]+(n[v]/2-s[v]/2)}}return t}function pe(e,t){void 0===t&&(t={});var n=t,a=n.placement,s=void 0===a?e.placement:a,u=n.boundary,l=void 0===u?h:u,p=n.rootBoundary,v=void 0===p?f:p,b=n.elementContext,y=void 0===b?d:b,w=n.altBoundary,m=void 0!==w&&w,x=n.padding,E=void 0===x?0:x,C=W("number"!=typeof E?E:Z(E,c)),k=y===d?g:d,_=e.rects.popper,N=e.elements[m?k:y],O=function(e,t,n){var r="clippingParents"===t?function(e){var t=he(z(e)),n=["absolute","fixed"].indexOf(H(e).position)>=0,r=n&&L(e)?U(e):e;return T(r)?t.filter((function(e){return T(e)&&B(e,r)&&"body"!==S(e)&&(!n||"static"!==H(e).position)})):[]}(e):[].concat(t),i=[].concat(r,[n]),o=i[0],a=i.reduce((function(t,n){var r=de(e,n);return t.top=P(r.top,t.top),t.right=D(r.right,t.right),t.bottom=D(r.bottom,t.bottom),t.left=P(r.left,t.left),t}),de(e,o));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(T(N)?N:N.contextElement||Y(e.elements.popper),l,v),I=R(e.elements.reference),A=ge({reference:I,element:_,strategy:"absolute",placement:s}),M=fe(Object.assign({},_,A)),j=y===d?M:I,G={top:O.top-j.top+C.top,bottom:j.bottom-O.bottom+C.bottom,left:O.left-j.left+C.left,right:j.right-O.right+C.right},F=e.modifiersData.offset;if(y===d&&F){var V=F[s];Object.keys(G).forEach((function(e){var t=[o,i].indexOf(e)>=0?1:-1,n=[r,i].indexOf(e)>=0?"y":"x";G[e]+=V[n]*t}))}return G}const ve={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,l=e.name;if(!t.modifiersData[l]._skip){for(var h=n.mainAxis,f=void 0===h||h,d=n.altAxis,g=void 0===d||d,b=n.fallbackPlacements,y=n.padding,w=n.boundary,m=n.rootBoundary,x=n.altBoundary,E=n.flipVariations,C=void 0===E||E,k=n.allowedAutoPlacements,_=t.options.placement,N=M(_),S=b||(N!==_&&C?function(e){if(M(e)===s)return[];var t=ie(e);return[ae(e),t,ae(t)]}(_):[ie(_)]),O=[_].concat(S).reduce((function(e,n){return e.concat(M(n)===s?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,l=void 0===u?v:u,h=K(r),f=h?s?p:p.filter((function(e){return K(e)===h})):c,d=f.filter((function(e){return l.indexOf(e)>=0}));0===d.length&&(d=f);var g=d.reduce((function(t,n){return t[n]=pe(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[M(n)],t}),{});return Object.keys(g).sort((function(e,t){return g[e]-g[t]}))}(t,{placement:n,boundary:w,rootBoundary:m,padding:y,flipVariations:C,allowedAutoPlacements:k}):n)}),[]),T=t.rects.reference,L=t.rects.popper,I=new Map,A=!0,P=O[0],D=0;D=0,H=B?"width":"height",F=pe(t,{placement:j,boundary:w,rootBoundary:m,altBoundary:x,padding:y}),Y=B?G?o:a:G?i:r;T[H]>L[H]&&(Y=ie(Y));var z=ie(Y),V=[];if(f&&V.push(F[R]<=0),g&&V.push(F[Y]<=0,F[z]<=0),V.every((function(e){return e}))){P=j,A=!1;break}I.set(j,V)}if(A)for(var U=function(e){var t=O.find((function(t){var n=I.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return P=t,"break"},q=C?3:1;q>0&&"break"!==U(q);q--);t.placement!==P&&(t.modifiersData[l]._skip=!0,t.placement=P,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function be(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ye(e){return[r,o,i,a].some((function(t){return e[t]>=0}))}const we={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=pe(t,{elementContext:"reference"}),s=pe(t,{altBoundary:!0}),c=be(a,r),u=be(s,i,o),l=ye(c),h=ye(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:l,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":h})}},me={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,i=e.name,s=n.offset,c=void 0===s?[0,0]:s,u=v.reduce((function(e,n){return e[n]=function(e,t,n){var i=M(e),s=[a,r].indexOf(i)>=0?-1:1,c="function"==typeof n?n(Object.assign({},t,{placement:e})):n,u=c[0],l=c[1];return u=u||0,l=(l||0)*s,[a,o].indexOf(i)>=0?{x:l,y:u}:{x:u,y:l}}(n,t.rects,c),e}),{}),l=u[t.placement],h=l.x,f=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=h,t.modifiersData.popperOffsets.y+=f),t.modifiersData[i]=u}},xe={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ge({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},Ee={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,s=e.name,c=n.mainAxis,l=void 0===c||c,h=n.altAxis,f=void 0!==h&&h,d=n.boundary,g=n.rootBoundary,p=n.altBoundary,v=n.padding,b=n.tether,y=void 0===b||b,w=n.tetherOffset,m=void 0===w?0:w,x=pe(t,{boundary:d,rootBoundary:g,padding:v,altBoundary:p}),E=M(t.placement),C=K(t.placement),k=!C,_=q(E),N="x"===_?"y":"x",S=t.modifiersData.popperOffsets,O=t.rects.reference,T=t.rects.popper,L="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,I="number"==typeof L?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,j={x:0,y:0};if(S){if(l){var R,B="y"===_?r:a,H="y"===_?i:o,F="y"===_?"height":"width",Y=S[_],z=Y+x[B],V=Y-x[H],W=y?-T[F]/2:0,Z=C===u?O[F]:T[F],$=C===u?-T[F]:-O[F],Q=t.elements.arrow,J=y&&Q?G(Q):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[B],ne=ee[H],re=X(0,O[F],J[F]),ie=k?O[F]/2-W-re-te-I.mainAxis:Z-re-te-I.mainAxis,oe=k?-O[F]/2+W+re+ne+I.mainAxis:$+re+ne+I.mainAxis,ae=t.elements.arrow&&U(t.elements.arrow),se=ae?"y"===_?ae.clientTop||0:ae.clientLeft||0:0,ce=null!=(R=null==A?void 0:A[_])?R:0,ue=Y+oe-ce,le=X(y?D(z,Y+ie-ce-se):z,Y,y?P(V,ue):V);S[_]=le,j[_]=le-Y}if(f){var he,fe="x"===_?r:a,de="x"===_?i:o,ge=S[N],ve="y"===N?"height":"width",be=ge+x[fe],ye=ge-x[de],we=-1!==[r,a].indexOf(E),me=null!=(he=null==A?void 0:A[N])?he:0,xe=we?be:ge-O[ve]-T[ve]-me+I.altAxis,Ee=we?ge+O[ve]+T[ve]-me-I.altAxis:ye,Ce=y&&we?function(e,t,n){var r=X(e,t,n);return r>n?n:r}(xe,ge,Ee):X(y?xe:be,ge,y?Ee:ye);S[N]=Ce,j[N]=Ce-ge}t.modifiersData[s]=j}},requiresIfExists:["offset"]};function Ce(e,t,n){void 0===n&&(n=!1);var r,i,o=L(t),a=L(t)&&function(e){var t=e.getBoundingClientRect(),n=j(t.width)/e.offsetWidth||1,r=j(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),s=Y(t),c=R(e,a),u={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(o||!o&&!n)&&(("body"!==S(t)||ue(s))&&(u=(r=t)!==O(r)&&L(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:se(r)),L(t)?((l=R(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):s&&(l.x=ce(s))),{x:c.left+u.scrollLeft-l.x,y:c.top+u.scrollTop-l.y,width:c.width,height:c.height}}function ke(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}var _e={placement:"bottom",modifiers:[],strategy:"absolute"};function Ne(){for(var e=arguments.length,t=new Array(e),n=0;n=0;i--){var o=r[i];o.isOrdered()||e.stack.push(o)}return t},i.prototype.calculateRadius=function(){var e=this,t=0;e.getNodes().forEach((function(e){return t+=Math.sqrt(e.getWidth()*e.getWidth()+e.getHeight()*e.getHeight())})),e.perimeter=t+e.getNodes().length*e.nodeSeparation;var n=e.perimeter/(2*Math.PI);e.getParent().setWidth(2*n),e.getParent().setHeight(2*n),e.getParent().setCenter(e.getParent().getWidth(),e.getParent().getHeight()),e.centerX=e.getParent().getCenterX(),e.centerY=e.getParent().getCenterY(),e.radius=e.getParent().getHeight()/2},i.prototype.calculateEdgeCrossingsOfNodes=function(){this.getNodes().forEach((function(e){return e.calculateTotalCrossing()}))},i.prototype.loadOldIndicesOfNodes=function(){for(var e=0;eMath.min(a,s)&&0!==s&&0!==a},i.prototype.crossingWithEdge=function(e){return this.crossesWithEdge(e)?1:0},i.prototype.calculateTotalCrossingWithList=function(e){var t=this,n=0;return e.forEach((function(e){return n+=t.crossingWithEdge(e)})),n},e.exports=i},function(e,t,n){"use strict";var r=n(0).LNode;function i(e,t,n,i){void 0!==n&&void 0!==i?r.call(this,e,t,n,i):r.call(this,e,t),this.angle=0,this.circleIndex=-1,this.totalCrossingOfEdges=-1,this.isCrossingNumberValid=!1}for(var o in n(0).Quicksort,i.prototype=Object.create(r.prototype),r)i[o]=r[o];i.prototype.getCircle=function(){return this.getOwner()},i.prototype.setIndex=function(e){this.circleIndex=e,this.isCrossingNumberValid=!1},i.prototype.getIndex=function(){return this.circleIndex},i.prototype.getNeighborsSortedByDegree=function(){var e=Array.from(this.getNeighborsList());return(e=e.filter((function(e){return-1===e.getIndex()}))).sort((function(e,t){return e.getDegree()-t.getDegree()})),e},i.prototype.getDegree=function(){return this.getEdges().length},i.prototype.isOrdered=function(){return this.getIndex()>-1},i.prototype.setAngle=function(e){this.angle=e},i.prototype.getAngle=function(){return this.angle},i.prototype.getCircDistWithTheNode=function(e){var t=this,n=e.getIndex();if(-1===n||-1===t.getIndex())return-1;var r=t.getIndex()-n;return r<0&&(r+=t.getCircle().getSize()),r},i.prototype.getCrossingNumberWithNode=function(e){var t=0;return this.getEdges().forEach((function(n){e.getEdges().forEach((function(e){t+=n.crossingWithEdge(e)}))})),t},i.prototype.getTotalCrossingOfEdges=function(){var e=this;return e.isCrossingNumberValid||(e.calculateTotalCrossing(),e.isCrossingNumberValid=!0),e.totalCrossingOfEdges},i.prototype.calculateTotalCrossing=function(){var e=this,t=0,n=[];n.push.apply(n,e.getCircle().getEdges()),n=n.filter((function(t){return e.getEdges().indexOf(t)<0})),e.getEdges().forEach((function(e){return t+=e.calculateTotalCrossingWithList(n)})),e.totalCrossingOfEdges=t},e.exports=i},function(e,t,n){"use strict";var r=n(0).Layout,i=n(2),o=n(1),a=n(4),s=n(3);function c(){r.call(this),this.nodeSeparation=i.DEFAULT_NODE_SEPARATION}for(var u in c.prototype=Object.create(r.prototype),r)c[u]=r[u];c.prototype.newGraph=function(e){return this.avsdfCircle=new o(null,this.graphManager,e),this.avsdfCircle},c.prototype.newNode=function(e){return new a(this.graphManager,e)},c.prototype.newEdge=function(e){return new s(null,null,e)},c.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n1)return!1;var e=this.avsdfCircle;for(e.setNodeSeparation(this.nodeSeparation),e.calculateRadius(),e.initOrdering();!e.hasFinishedOrdering();){var t=e.findNodeToPlace();e.putInOrder(t)}return!0},c.prototype.updateNodeAngles=function(){this.graphManager.getRoot().correctAngles()},c.prototype.updateNodeCoordinates=function(){var e=this.graphManager.getRoot();e.getNodes().forEach((function(t){t.setCenter(e.getCenterX()+e.getRadius()*Math.cos(t.getAngle()),e.getCenterY()+e.getRadius()*Math.sin(t.getAngle()))}))},c.prototype.initPostProcess=function(){this.avsdfCircle.calculateEdgeCrossingsOfNodes();var e=this.avsdfCircle.getNodes();return e.sort((function(e,t){return t.getTotalCrossingOfEdges()-e.getTotalCrossingOfEdges()})),e},c.prototype.oneStepPostProcess=function(e){for(var t=this,n=e.getTotalCrossingOfEdges(),r=void 0,i=Array.from(e.getNeighborsList()),o=0;o=n?t.avsdfCircle.loadOldIndicesOfNodes():(t.avsdfCircle.reOrderVertices(),n=r)}}},e.exports=c},function(e,t,n){"use strict";var r={};r.layoutBase=n(0),r.AVSDFConstants=n(2),r.AVSDFEdge=n(3),r.AVSDFCircle=n(1),r.AVSDFLayout=n(5),r.AVSDFNode=n(4),e.exports=r}])},e.exports=r(n(2241))},4182:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(t,n){t.exports=e},function(e,t,n){"use strict";var r=n(0).FDLayoutConstants;function i(){}for(var o in r)i[o]=r[o];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=i},function(e,t,n){"use strict";var r=n(0).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var o in i.prototype=Object.create(r.prototype),r)i[o]=r[o];e.exports=i},function(e,t,n){"use strict";var r=n(0).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var o in i.prototype=Object.create(r.prototype),r)i[o]=r[o];e.exports=i},function(e,t,n){"use strict";var r=n(0).LGraphManager;function i(e){r.call(this,e)}for(var o in i.prototype=Object.create(r.prototype),r)i[o]=r[o];e.exports=i},function(e,t,n){"use strict";var r=n(0).FDLayoutNode,i=n(0).IMath;function o(e,t,n,i){r.call(this,e,t,n,i)}for(var a in o.prototype=Object.create(r.prototype),r)o[a]=r[a];o.prototype.move=function(){var e=this.graphManager.getLayout();this.displacementX=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},o.prototype.propogateDisplacementToChildren=function(e,t){for(var n,r=this.getChild().getNodes(),i=0;i0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter((function(e){return t.has(e)}));this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%u.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n1)for(s=0;sr&&(r=Math.floor(a.y)),o=Math.floor(a.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new f(l.WORLD_CENTER_X-a.x/2,l.WORLD_CENTER_Y-a.y/2))},y.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),c.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(t,null,0,359,0,r);var i=v.calculateBounds(e),o=new b;o.setDeviceOrgX(i.getMinX()),o.setDeviceOrgY(i.getMinY()),o.setWorldOrgX(n.x),o.setWorldOrgY(n.y);for(var a=0;a1;){var b=v[0];v.splice(0,1);var w=l.indexOf(b);w>=0&&l.splice(w,1),g--,h--}f=null!=t?(l.indexOf(v[0])+1)%g:0;for(var m=Math.abs(r-n)/h,x=f;d!=h;x=++x%g){var E=l[x].getOtherEnd(e);if(E!=t){var C=(n+d*m)%360,k=(C+m)%360;y.branchRadialLayout(E,e,C,k,i+o,o),d++}}},y.maxDiagonalInTree=function(e){for(var t=g.MIN_VALUE,n=0;nt&&(t=r)}return t},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){var r="DummyCompound_"+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),o=new a(e.graphManager);o.id=r,o.paddingLeft=i.paddingLeft||0,o.paddingRight=i.paddingRight||0,o.paddingBottom=i.paddingBottom||0,o.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=o;var s=e.getGraphManager().add(e.newGraph(),o),c=i.getChild();c.add(o);for(var u=0;u=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i)}},y.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach((function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,o=r.paddingTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,o)}))},y.prototype.getToBeTiled=function(e){var t=e.id;if(null!=this.toBeTiled[t])return this.toBeTiled[t];var n=e.getChild();if(null==n)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i0)return this.toBeTiled[t]=!1,!1;if(null!=o.getChild()){if(!this.getToBeTiled(o))return this.toBeTiled[t]=!1,!1}else this.toBeTiled[o.id]=!1}return this.toBeTiled[t]=!0,!0},y.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;rc&&(c=l.rect.height)}n+=c+e.verticalPadding}},y.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach((function(r){var i=t[r];n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height}))},y.prototype.tileNodes=function(e,t){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:c.TILING_PADDING_VERTICAL,horizontalPadding:c.TILING_PADDING_HORIZONTAL};e.sort((function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:e.rect.width*e.rect.height0&&(o+=e.horizontalPadding),e.rowWidth[n]=o,e.width0&&(a+=e.verticalPadding);var s=0;a>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=a,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},y.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;rn&&(t=r,n=e.rowWidth[r]);return t},y.prototype.canAddHorizontal=function(e,t,n){var r=this.getShortestRowIndex(e);if(r<0)return!0;var i=e.rowWidth[r];if(i+e.horizontalPadding+t<=e.width)return!0;var o,a,s=0;return e.rowHeight[r]0&&(s=n+e.verticalPadding-e.rowHeight[r]),o=e.width-i>=t+e.horizontalPadding?(e.height+s)/(i+t+e.horizontalPadding):(e.height+s)/e.width,s=n+e.verticalPadding,(a=e.widtho&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-o,e.rowWidth[n]=e.rowWidth[n]+o,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var a=Number.MIN_VALUE,s=0;sa&&(a=r[s].height);t>0&&(a+=e.verticalPadding);var c=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=a,e.rowHeight[n]0)for(var l=i;l<=o;l++)c[0]+=this.grid[l][a-1].length+this.grid[l][a].length-1;if(o0)for(l=a;l<=s;l++)c[3]+=this.grid[i-1][l].length+this.grid[i][l].length-1;for(var h,f,d=g.MAX_VALUE,p=0;p{(e.exports=n(3645)(!1)).push([e.id,".stix-viewer-block {\n display: block;\n overflow: auto;\n position: relative;\n font-size: 0.8em;\n font-family: sans-serif;\n margin: 10px 0px;\n}\n\n.stix-viewer-block .stix-viewer {\n position: relative;\n border: 1px solid #ddd;\n border-radius: 2px;\n}\n\n.stix-viewer-block .viewer-footer {\n padding: 8px;\n\n border-radius: 0 0 2px 2px;\n border-width: 0px 1px 1px 1px;\n border-style: solid;\n border-color: #ddd;\n\n background-color: #f7f7f7; \n line-height: 1.2em;\n}\n\n.stix-viewer-block .stix-viewer .stix-graph {\n width: 100%;\n height: 100%;\n position: relative;\n}\n\n\n.stix-viewer-block .viewer-header {\n padding: 8px;\n font-weight: bold;\n border-radius: 2px 2px 0 0;\n border-width: 1px 1px 0px 1px;\n border-style: solid;\n border-color: #ddd;\n background-color: #f7f7f7; \n color: #586069;\n line-height: 1.2em;\n}\n\n.stix-viewer-block .viewer-header a {\n color: #586069;\n}\n\n.stix-viewer .viewer-placeholder {\n top: 45%;\n position: relative;\n font-family: sans-serif;\n font-size: 2em;\n color: #d6d6d6;\n font-weight: lighter;\n text-align: center;\n}\n\n.stix-viewer-block .dragover-active {\n background-color: #eee;\n}\n\n.stix-viewer-block .loading {\n background-color: #f7f7f7; \n}\n\n.stix-viewer-block .sidebar {\n top: 0px;\n bottom: 0;\n right: 0;\n width: 40%;\n max-width: 400px;\n position: absolute;\n padding: 10px;\n display: none;\n border-width: 0px 0px 0px 1px;\n border-style: solid;\n border-color: #ddd;\n background-color: #f7f7f7;\n overflow: scroll;\n z-index: 9999;\n}\n\n.stix-viewer-block .sidebar p {\n line-height: 1.4em;\n}\n\n.stix-viewer-block .sidebar .sidebar-title {\n word-wrap: break-word;\n font-weight: normal;\n font-size: 20pt;\n}\n\n.stix-viewer-block .sidebar .sidebar-close-icon {\n float: right;\n font-size: 20pt;\n padding: 0px 10px;\n cursor: pointer;\n}\n\n.stix-viewer-block .sidebar img.sidebar-type-icon {\n height: 30px;\n vertical-align: middle;\n margin-right: 5px;\n}\n\n.stix-viewer-block .sidebar .sidebar-textarea {\n height: 400px;\n width: 100%;\n}\n\n.stix-viewer-block .viewer-footer {\n color: #586069;\n background-color: #f7f7f7;\n}\n\n.stix-viewer-block .viewer-footer a {\n color: #586069;\n}\n\n.marking-tag {\n font-size: 0.8em;\n font-family: sans-serif;\n padding: 0px 2px;\n border-radius: 2px;\n border-width: 1px;\n border-style: solid;\n user-select: none;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.marking-tag-tlp-white {\n color: black;\n background-color: white;\n border-color: black;\n}\n\n.marking-tag-tlp-green {\n color: white;\n background-color: green;\n border-color: green;\n}\n\n.marking-tag-tlp-amber {\n color: white;\n background-color: orange;\n border-color: orange;\n}\n\n.marking-tag-tlp-red {\n color: white;\n background-color: red;\n border-color: red;\n}\n\n.marking-tag-tlp-custom {\n color: black;\n background-color: white;\n border-color: black;\n}\n",""])},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r=e[1]||"",i=e[3];if(!i)return r;if(t&&"function"==typeof btoa){var o=(n=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=i.sources.map((function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"}));return[r].concat(a).concat([o]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i{var r;!function(){"use strict";var i=function(e){if(e){var t={enabled:!0,selector:"node",speed:1};e("core","autopanOnDrag",(function(e){var o=this,a=n(o,"eventFcns")||{};if(r(o,"eventFcns",a),"get"!==e){var s=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}(t,e);r(o,"options",s),s.enabled&&(i(o),r(o,"enabled",!0))}return{enable:function(){i(o)},disable:function(){!function(e){if(n(e,"enabled")){var t=n(e,"eventFcns"),i=n(e,"options");e.off("tapstart",i.selector,t.tapstartFcn),e.off("tapdrag",t.tapdragFcn),e.off("tapend",t.tapendFcn),r(e,"enabled",void 0)}}(o)}}}))}function n(e,t){void 0===e.scratch("_autopanOnDrag")&&e.scratch("_autopanOnDrag",{});var n=e.scratch("_autopanOnDrag");return void 0===t?n:n[t]}function r(e,t,r){var i=n(e);i[t]=r,e.scratch("_autopanOnDrag",i)}function i(e,t){if(!n(e,"enabled")){var i=n(e,"eventFcns");t=n(e,"options"),e.on("tapstart",t.selector,i.tapstartFcn=function(){var t=this,n=t.renderedPosition(),i=t.renderedWidth(),o=t.renderedHeight(),a=e.width(),s=e.height(),c=n.x-i/2,u=n.y-o/2,l=n.x+i/2,h=n.y+o/2,f=!1;(l>=a||c<=0||h>=s||u<=0)&&(f=!0),f||r(e,"currentNode",t)}),e.on("tapdrag",i.tapdragFcn=function(){var r=n(e,"currentNode");if(void 0!==r){var i,o,a=r.renderedPosition(),s=r.renderedWidth(),c=r.renderedHeight(),u=e.width(),l=e.height(),h=a.x-s/2,f=a.y-c/2,d=a.x+s/2,g=a.y+c/2;d>=u&&(i=-d+u),h<=0&&(i=-h),g>=l&&(o=-g+l),f<=0&&(o=-f),i&&e.panBy({x:i*t.speed}),o&&e.panBy({y:o*t.speed})}}),e.on("tapend",i.tapendFcn=function(){r(e,"currentNode",void 0)}),r(e,"eventFcns",i),r(e,"enabled",!0)}}};e.exports&&(e.exports=i),void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r),"undefined"!=typeof cytoscape&&i(cytoscape)}()},6053:function(e,t,n){var r;r=function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=15)}([function(t,n){t.exports=e},function(e,t,n){"use strict";var r=n(0).layoutBase.FDLayoutConstants;function i(){}for(var o in r)i[o]=r[o];i.DEFAULT_SPRING_STRENGTH=1.5*r.DEFAULT_SPRING_STRENGTH,i.DEFAULT_NODE_SEPARATION=r.DEFAULT_EDGE_LENGTH/4,i.DEFAULT_IDEAL_INTER_CLUSTER_EDGE_LENGTH_COEFF=1.4,i.DEFAULT_ALLOW_NODES_INSIDE_CIRCLE=!1,i.DEFAULT_MAX_RATIO_OF_NODES_INSIDE_CIRCLE=.1,i.DEFAULT_INNER_EDGE_LENGTH=r.DEFAULT_EDGE_LENGTH/3,i.MAX_ROTATION_ANGLE=Math.PI/36,i.MIN_ROTATION_ANGLE=-i.MAX_ROTATION_ANGLE,i.SWAP_IDLE_DURATION=45,i.SWAP_PREPERATION_DURATION=5,i.SWAP_PERIOD=i.SWAP_IDLE_DURATION+i.SWAP_PREPERATION_DURATION,i.SWAP_HISTORY_CLEARANCE_PERIOD=6*i.SWAP_PERIOD,i.MIN_DISPLACEMENT_FOR_SWAP=6,i.REVERSE_PERIOD=25,e.exports=i},function(e,t,n){"use strict";e.exports=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;rt&&(t=r.getWidth()),r.getHeight()>t&&(t=r.getHeight())}var i=2*(e.radius+e.margin)+t,o=e.getParent();o.setHeight(i),o.setWidth(i)},l.prototype.computeOrderMatrix=function(){var e=this.onCircleNodes.length;this.orderMatrix=new Array(e);for(var t=0;tn){var o=this.onCircleNodes[r].getOnCircleNodeExt().getAngle()-this.onCircleNodes[n].getOnCircleNodeExt().getAngle();o<0&&(o+=i.TWO_PI),o<=Math.PI?(this.orderMatrix[n][r]=!0,this.orderMatrix[r][n]=!1):(this.orderMatrix[n][r]=!1,this.orderMatrix[r][n]=!0)}},l.prototype.rotate=function(){var e=this.getParent(),t=this.getOnCircleNodes().length,n=e.rotationAmount/t,r=this.getGraphManager().getLayout();if(0!==n){var i=n/this.radius;i>s.MAX_ROTATION_ANGLE?i=s.MAX_ROTATION_ANGLE:it.getOnCircleNodeExt().getIndex()&&(n=t,r=e),n.getOnCircleNodeExt().getPrevNode()===r){var a=r;r=n,n=a}var s=n.getOnCircleNodeExt(),c=r.getOnCircleNodeExt(),u=s.getPrevNode(),l=this.getGraphManager().getLayout().getNodeSeparation(),h=(u.getOnCircleNodeExt().getAngle()+(u.getHalfTheDiagonal()+r.getHalfTheDiagonal()+l)/this.radius)%(2*Math.PI);c.setAngle(h),h=(c.getAngle()+(r.getHalfTheDiagonal()+n.getHalfTheDiagonal()+l)/this.radius)%(2*Math.PI),s.setAngle(h),s.updatePosition(),c.updatePosition();var f=i.getIndex();i.setIndex(o.getIndex()),o.setIndex(f),this.getOnCircleNodes()[i.getIndex()]=e,this.getOnCircleNodes()[o.getIndex()]=t,i.updateSwappingConditions(),o.updateSwappingConditions(),i.getNextNode()===t?(i.getPrevNode().getOnCircleNodeExt().updateSwappingConditions(),o.getNextNode().getOnCircleNodeExt().updateSwappingConditions()):(i.getNextNode().getOnCircleNodeExt().updateSwappingConditions(),o.getPrevNode().getOnCircleNodeExt().updateSwappingConditions())},l.prototype.checkAndReverseIfReverseIsBetter=function(){for(var e=this.getInterClusterEdges(),t=new Array(e.length),n=void 0,r=this.getParent().getCenter(),o=void 0,a=void 0,s=void 0,l=this.onCircleNodes.length,h=new Array(l),f=0;f1&&d++;for(var p=this.onCircleNodes,v=l+d,b=new Array(2*v),y=new Array(2*v),w=void 0,m=-1,x=0;x_)return this.reverseNodes(),this.setMayNotBeReversed(),!0}return!1},l.prototype.computeAlignmentScore=function(e,t){return new o(e,t,20,-1,-2).getScore()},l.prototype.reverseNodes=function(){for(var e=this.getOnCircleNodes(),t=this.getOnCircleNodes().length,n=0;n-1&&this.onCircleNodes.splice(t,1),this.inCircleNodes.push(e);for(var n=0;nMath.min(l,h)&&0!==h&&0!==l&&(t=!0)}return t},i.prototype.calculateTotalCrossingWithList=function(e){for(var t=0,n=0;ne.getAngle()||t.getAngle()===e.getAngle()&&e!==t&&this.ownerCircle.getOrder(this.ownerCircle.getThisEnd(e.getEdge()),this.ownerCircle.getThisEnd(t.getEdge()))}},{key:"_quicksort",value:function(e,t,n){if(t0&&null!=p){var v=f.indexOf(p);v>-1?d[v].push(e[g].data("id")):(f.push(p),d.push([e[g].data("id")]))}}n=d}for(var b=function(e){if(0===n[e].length)return"continue";var t=r.newNode(null);t.setClusterId(e),u.add(t);var i=r.newCircleLGraph(null);r.graphManager.add(i,t),i.margin=i.margin+15,n[e].forEach((function(t){var n=l.get(t),r=n.layoutDimensions({nodeDimensionsIncludeLabels:!1}),u=s.newCiSEOnCircleNode(new o(n.position("x")-r.w/2,n.position("y")-r.h/2),new a(parseFloat(r.w),parseFloat(r.h)));u.setId(t),u.setClusterId(e),i.getOnCircleNodes().push(u),i.add(u),i.getInNodes().push(u),c[u.getId()]=u}))},y=0;y-1&&(o.getInNodes().splice(a,1),o.getOutNodes().push(t))}if(-1!==i){var s=n.getOwner(),c=s.getInNodes().indexOf(n);c>-1&&(s.getInNodes().splice(c,1),s.getOutNodes().push(n))}})),c},v.prototype.doStep1=function(){this.step=v.STEP_1,this.phase=v.PHASE_OTHER;for(var e=new i,t=this.graphManager.getGraphs(),n=0;n0){var O=r.getParent(),T=a.getParent();O.setLocation(T.getLocation().x,T.getLocation().y),r.setRadius(a.getRadius()),r.calculateParentNodeDimension()}}}},v.prototype.doStep2=function(){this.step=v.STEP_2,this.phase=v.PHASE_OTHER;var e=[],t=[],n=new i,r=new i,o=new u;o.isSubLayout=!1,o.useMultiLevelScaling=!1,o.useFRGridVariant=!0,o.springConstant*=1.5;for(var a=o.newGraphManager().addRoot(),s=this.graphManager.getNonOnCircleNodes(),c=0;cthis.maxIterations/4)&&this.isConverged())return!0;this.coolingFactor=this.initialCoolingFactor*((this.maxIterations-this.iterations)/this.maxIterations)}if(this.totalDisplacement=0,this.step===v.STEP_3)this.iterations%l.REVERSE_PERIOD==0&&this.checkAndReverseIfReverseIsBetter();else if(this.step===v.STEP_4){this.iterations%l.SWAP_HISTORY_CLEARANCE_PERIOD==0&&(this.swappedPairsInLastIteration=[]);var e=this.iterations%l.SWAP_PERIOD;e>=l.SWAP_IDLE_DURATION?this.phase=v.PHASE_SWAP_PREPERATION:this.phase=0===e?v.PHASE_PERFORM_SWAP:v.PHASE_OTHER}return this.calcSpringForces(),this.calcRepulsionForces(),this.calcGravitationalForces(),this.calcTotalForces(),this.moveNodes(),this.iterations>=this.maxIterations},v.prototype.prepareCirclesForReversal=function(){this.graphManager.getRoot().getNodes().forEach((function(e){var t=e.getChild();null!=t&&(t.getInterClusterEdges().length<2&&t.setMayNotBeReversed(),t.computeOrderMatrix())}))},v.prototype.calcIdealEdgeLengths=function(e){for(var t=this.graphManager.getAllEdges(),n=0;n0&&w>0||y<0&&w<0);0===y||0===w?c.push(E):s.push(E)}var C=void 0,k=!0,_=void 0;for(s.sort((function(e,t){return e.getDiscrepancy()-t.getDiscrepancy()}));k&&s.length>0;)if(f=(C=s[s.length-1]).getFirstNode(),d=C.getSecondNode(),g=f.getOnCircleNodeExt(),b=d.getOnCircleNodeExt(),this.isSwappedPreviously(C))s.pop(),h.push(C);else{var N=g.getInterClusterIntersections(b);C.swap(),_=!1;var S=g.getInterClusterIntersections(b);(_=S>N)||S!==N||(_=C.inSameDirection()||C.getDiscrepancy()=0&&null==t;i--){var o=r[i];if(0===o.getOnCircleNodeExt().getInterClusterEdges().length){var a=this.findMinimalSpanningSegment(o);if(0!==a.length){for(var s=!1,c=0;c1&&(p=g-d,p+=n,p%=n),p>1){s=!0;break}}}}s||(t=o)}}}return t},v.prototype.moveInnerNode=function(e){e.getOwner().moveOnCircleNodeInside(e);var t=this.graphManager.getOnCircleNodes(),n=t.indexOf(e);n>-1&&t.splice(n,1),this.graphManager.inCircleNodes.push(e)},v.prototype.findMinimalSpanningSegment=function(e){var t=[],n=e.getOnCircleNeighbors();if(0===n.length)return t;n.sort((function(e,t){return e.getOnCircleNodeExt().getIndex()-t.getOnCircleNodeExt().getIndex()}));var r=e.getOwner().getOnCircleNodes();r.sort((function(e,t){return e.getOnCircleNodeExt().getIndex()-t.getOnCircleNodeExt().getIndex()}));var i=null,o=null,a=r.length,s=r.length,c=n.length,u=void 0,l=void 0,h=void 0,f=void 0,d=void 0;for(u=0;uo.MAX_NODE_DISPLACEMENT&&(e=o.MAX_NODE_DISPLACEMENT*i.sign(e)),e},s.prototype.getOnCircleNeighbors=function(){for(var e=Array.from(this.getNeighborsList()),t=[],n=0;n-1&&n.splice(t,1)})),e.forEach((function(e){t+=e.calculateTotalCrossingWithList(n)})),t},i.prototype.updateSwappingConditions=function(){var e=this.calculateTotalCrossing(),t=this.orderIndex,n=this.getNextNode().getOnCircleNodeExt();this.orderIndex=n.getIndex(),n.setIndex(t);var r=this.calculateTotalCrossing();this.canSwapWithNext=r<=e,n.setIndex(this.orderIndex),this.setIndex(t);var i=this.getPrevNode().getOnCircleNodeExt();this.orderIndex=i.getIndex(),i.setIndex(t),r=this.calculateTotalCrossing(),this.canSwapWithPrevious=r<=e,i.setIndex(this.orderIndex),this.setIndex(t)},i.prototype.swapWith=function(e){this.ciseNode.getOwner().swapNodes(this.ciseNode,e.ciseNode)},i.prototype.getInterClusterIntersections=function(e){for(var t=0,n=this.getInterClusterEdges(),i=e.getInterClusterEdges(),o=0;o1&&void 0!==arguments[1]?arguments[1]:r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r,o=!1,a=e,s=0;s0&&m.constraints(_),m.groups(d.map((function(e,n){var r=l(t.nodeSpacing,e),i=function(t){return parseFloat(e.style("padding-"+t))},o=i("left")+r,a=i("right")+r,s=i("top")+r,c=i("bottom")+r;return e.scratch().cola={index:n,padding:Math.max(o,a,s,c),leaves:e.children().intersection(g).map((function(e){return e[0].scratch().cola.index})),fixed:e.locked()},e})).map((function(e){return e.scratch().cola.groups=e.children().intersection(d).map((function(e){return e.scratch().cola.index})),e.scratch().cola})));var N=void 0,S=void 0;if(null!=t.edgeLength?(N=t.edgeLength,S="linkDistance"):null!=t.edgeSymDiffLength?(N=t.edgeSymDiffLength,S="symmetricDiffLinkLengths"):null!=t.edgeJaccardLength?(N=t.edgeJaccardLength,S="jaccardLinkLengths"):(N=100,S="linkDistance"),m.links(h.stdFilter((function(e){return g.contains(e.source())&&g.contains(e.target())})).map((function(e){var t=e.scratch().cola={source:e.source()[0].scratch().cola.index,target:e.target()[0].scratch().cola.index};return null!=N&&(t.calcLength=l(N,e)),t}))),m.size([p.w,p.h]),null!=N&&m[S]((function(e){return e.calcLength})),t.flow){var O=void 0;!function(e){return(void 0===e?"undefined":r(e))===r("")}(t.flow)?c(t.flow)?O={axis:"y",minSeparation:t.flow}:function(e){return null!=e&&(void 0===e?"undefined":r(e))===r({})}(t.flow)?((O=t.flow).axis=O.axis||"y",O.minSeparation=null!=O.minSeparation?O.minSeparation:50):O={axis:"y",minSeparation:50}:O={axis:t.flow,minSeparation:50},m.flowLayout(O.axis,O.minSeparation)}return e.trigger({type:"layoutstart",layout:e}),m.avoidOverlaps(t.avoidOverlap).handleDisconnected(t.handleDisconnected).start(t.unconstrIter,t.userConstIter,t.allConstIter,void 0,void 0,t.centerGraph),t.infinite||setTimeout((function(){e.manuallyStopped||m.stop()}),t.maxSimulationTime),this},h.prototype.stop=function(){return this.adaptor&&(this.manuallyStopped=!0,this.adaptor.stop()),this},e.exports=h},function(e,t,n){"use strict";e.exports=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r0&&(a=n.getGraphManager().add(n.newGraph(),o),this.processChildrenList(a,h,n))}},h.prototype.stop=function(){return this.stopped=!0,this};var d=function(e){e("layout","cose-bilkent",h)};"undefined"!=typeof cytoscape&&d(cytoscape),e.exports=d}])},e.exports=r(n(4182))},9142:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){var r=n(1),i=function(e){e&&e("layout","dagre",r)};"undefined"!=typeof cytoscape&&i(cytoscape),e.exports=i},function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var i=n(2),o=n(3),a=n(4);function s(e){this.options=o({},i,e)}s.prototype.run=function(){var e=this.options,t=e.cy,n=e.eles,i=function(e,t){return function(e){return"function"==typeof e}(t)?t.apply(e,[e]):t},o=e.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()};void 0===o.x2&&(o.x2=o.x1+o.w),void 0===o.w&&(o.w=o.x2-o.x1),void 0===o.y2&&(o.y2=o.y1+o.h),void 0===o.h&&(o.h=o.y2-o.y1);var s=new a.graphlib.Graph({multigraph:!0,compound:!0}),c={},u=function(e,t){null!=t&&(c[e]=t)};u("nodesep",e.nodeSep),u("edgesep",e.edgeSep),u("ranksep",e.rankSep),u("rankdir",e.rankDir),u("ranker",e.ranker),s.setGraph(c),s.setDefaultEdgeLabel((function(){return{}})),s.setDefaultNodeLabel((function(){return{}}));for(var l=n.nodes(),h=0;h1?t-1:0),r=1;r1?t-1:0),r=1;r1&&(c.velocity.x=l/f,c.velocity.y=h/f),r=t*c.velocity.x,o=t*c.velocity.y,c.pos.x+=r,c.pos.y+=o,i+=Math.abs(r),a+=Math.abs(o)}}return(i*i+a*a)/s}}},function(e,t,n){"use strict";var r=n(9),i=n(8),o=function(e,t){var n=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);return n<1e-8&&r<1e-8};function a(e,t){return 0===t?e.quad0:1===t?e.quad1:2===t?e.quad2:3===t?e.quad3:null}function s(e,t,n){0===t?e.quad0=n:1===t?e.quad1=n:2===t?e.quad2=n:3===t&&(e.quad3=n)}e.exports={makeQuadtree:function(){var e=[],t=new i,n=[],c=0,u=l();function l(){var e=n[c];return e?(e.quad0=null,e.quad1=null,e.quad2=null,e.quad3=null,e.body=null,e.mass=e.massX=e.massY=0,e.left=e.right=e.top=e.bottom=0):(e=new r,n[c]=e),++c,e}function h(e){for(t.reset(),t.push(u,e);!t.isEmpty();){var n=t.pop(),r=n.node,i=n.body;if(r.body){var c=r.body;if(r.body=null,o(c.pos,i.pos)){var h=3;do{var f=Math.random(),d=(r.right-r.left)*f,g=(r.bottom-r.top)*f;c.pos.x=r.left+d,c.pos.y=r.top+g,h-=1}while(h>0&&o(c.pos,i.pos));if(0===h&&o(c.pos,i.pos))return}t.push(r,c),t.push(r,i)}else{var p=i.pos.x,v=i.pos.y;r.mass=r.mass+i.mass,r.massX=r.massX+i.mass*p,r.massY=r.massY+i.mass*v;var b=0,y=r.left,w=(r.right+y)/2,m=r.top,x=(r.bottom+m)/2;p>w&&(b+=1,y=w,w=r.right),v>x&&(b+=2,m=x,x=r.bottom);var E=a(r,b);E?t.push(E,i):((E=l()).left=y,E.top=m,E.right=w,E.bottom=x,E.body=i,s(r,b,E))}}}return{insertBodies:function(e){if(0!==e.length){var t=Number.MAX_VALUE,n=Number.MAX_VALUE,r=Number.MIN_VALUE,i=Number.MIN_VALUE,o=void 0,a=e.length;for(o=a;o--;){var s=e[o].pos.x,f=e[o].pos.y;sr&&(r=s),fi&&(i=f)}var d=r-t,g=i-n;for(d>g?i=n+d:r=t+g,c=0,(u=l()).left=t,u.right=r,u.top=n,u.bottom=i,(o=a-1)>=0&&(u.body=e[o]);o--;)h(e[o])}},updateBodyForce:function(t,n,r,i){var o=e,a=void 0,s=void 0,c=void 0,l=void 0,h=0,f=0,d=1,g=0,p=1;o[0]=u,function(e){e.x=0,e.y=0}(t.force);var v=-t.pos.x,b=-t.pos.y,y=Math.sqrt(v*v+b*b),w=t.mass*i/y;for(h+=w*v,f+=w*b;d;){var m=o[g],x=m.body;d-=1,g+=1;var E=x!==t;x&&E?(s=x.pos.x-t.pos.x,c=x.pos.y-t.pos.y,0===(l=Math.sqrt(s*s+c*c))&&(s=(Math.random()-.5)/50,c=(Math.random()-.5)/50,l=Math.sqrt(s*s+c*c)),h+=(a=n*x.mass*t.mass/(l*l*l))*s,f+=a*c):E&&(s=m.massX/m.mass-t.pos.x,c=m.massY/m.mass-t.pos.y,0===(l=Math.sqrt(s*s+c*c))&&(s=(Math.random()-.5)/50,c=(Math.random()-.5)/50,l=Math.sqrt(s*s+c*c)),(m.right-m.left)/l0)return this.stack[--this.popIdx]},reset:function(){this.popIdx=0}}},function(e,t,n){"use strict";e.exports=function(){this.body=null,this.quad0=null,this.quad1=null,this.quad2=null,this.quad3=null,this.mass=0,this.massX=0,this.massY=0,this.left=0,this.top=0,this.bottom=0,this.right=0}},function(e,t,n){"use strict";var r=n(6).integrate,i=n(5).applyDrag,o=n(1).applySpring;e.exports={tick:function(e){var t=e.bodies,n=e.springs,a=e.quadtree,s=e.timeStep,c=e.gravity,u=e.theta,l=e.dragCoeff,h=e.pull;t.forEach((function(e){var t=e._scratch;t&&(e.locked=t.locked,e.grabbed=t.grabbed,e.pos.x=t.x,e.pos.y=t.y)})),a.insertBodies(t);for(var f=0;f=t.maxIterations||r>=t.maxSimulationTime)};e.exports={tick:i,multitick:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r,o=!1,a=e,s=0;s1?t-1:0),r=1;r1?t-1:0),r=1;r1&&(console.warn("Popper.js Extension should only be used on one element."),console.warn("Ignoring all subsequent elements"))}e.exports={popper:function(e){return s(this),i(this[0],a(this[0],e))},popperRef:function(e){return s(this),o(this[0],a(this[0],e))}}},function(e,t,n){"use strict";var r=n(0),i=n(2).getPopper,o=n(1).getRef;function a(e,t){return r({},{boundingBox:{top:0,left:0,right:0,bottom:0,w:3,h:3},renderedDimensions:function(){return{w:3,h:3}},renderedPosition:function(){return{x:0,y:0}},popper:{},cy:e},t)}e.exports={popper:function(e){return i(this,a(this,e))},popperRef:function(e){return o(this,a(this,e))}}},function(e,t,n){"use strict";e.exports={getBoundingBox:function(e,t){var n=t.renderedPosition,r=t.cy,i=t.renderedDimensions,o=r.container().getBoundingClientRect(),a=i(e),s=n(e);return{top:s.y+o.top,left:s.x+o.left,right:s.x+a.w+o.left,bottom:s.y+a.h+o.top,width:a.w,height:a.h}}}},function(e,t,n){"use strict";e.exports={getContent:function(e,t){var n;if("function"!=typeof t){if(t instanceof HTMLElement)return t;throw new Error("Can not create popper from 'target' with unknown type")}if(null===(n=t(e)))throw new Error("No 'target' specified to create popper");return n}}},function(e,t,n){"use strict";var r=n(4),i=n(3),o=function(e){e&&(e("core","popper",r.popper),e("collection","popper",i.popper),e("core","popperRef",r.popperRef),e("collection","popperRef",i.popperRef))};"undefined"!=typeof cytoscape&&o(cytoscape),e.exports=o},function(t,n){t.exports=e}])},e.exports=r(n(4750))},9058:(e,t,n)=>{"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=r(n(1296)),o=r(n(4485));function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;nt?1:0},B=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n1&&void 0!==arguments[1]?arguments[1]:W,r=n;!(t=e.next()).done;)r=r*Z+t.value|0;return r},Q=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W;return t*Z+e|0},J=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$;return(t<<5)+t+e|0},ee=function(e){return 2097152*e[0]+e[1]},te=function(e,t){return[Q(e[0],t[0]),J(e[1],t[1])]},ne=function(e,t){var n={value:0,done:!1},r=0,i=e.length;return K({next:function(){return r=0&&(e[r]!==t||(e.splice(r,1),!n));r--);},Ee=function(e){e.splice(0,e.length)},Ce=function(e,t,n){return n&&(t=D(n,t)),e[t]},ke=function(e,t,n,r){n&&(t=D(n,t)),e[t]=r},_e="undefined"!=typeof Map?Map:function(){function e(){s(this,e),this._obj={}}return u(e,[{key:"set",value:function(e,t){return this._obj[e]=t,this}},{key:"delete",value:function(e){return this._obj[e]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(e){return void 0!==this._obj[e]}},{key:"get",value:function(e){return this._obj[e]}}]),e}(),Ne=function(){function e(t){if(s(this,e),this._obj=Object.create(null),this.size=0,null!=t){var n;n=null!=t.instanceString&&t.instanceString()===this.instanceString()?t.toArray():t;for(var r=0;r2&&void 0!==arguments[2])||arguments[2];if(void 0!==e&&void 0!==t&&O(e)){var r=t.group;if(null==r&&(r=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"===r||"edges"===r){this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,pannable:void 0===t.pannable?"edges"===r:!!t.pannable,active:!1,classes:new Se,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==i.position.x&&(i.position.x=0),null==i.position.y&&(i.position.y=0),t.renderedPosition){var o=t.renderedPosition,a=e.pan(),s=e.zoom();i.position={x:(o.x-a.x)/s,y:(o.y-a.y)/s}}var c=[];x(t.classes)?c=t.classes:w(t.classes)&&(c=t.classes.split(/\s+/));for(var u=0,l=c.length;u0;){var k=y.pop(),_=v(k),N=k.id();if(f[N]=_,_!==1/0)for(var S=k.neighborhood().intersect(g),O=0;O0)for(n.unshift(t);h[i];){var o=h[i];n.unshift(o.edge),n.unshift(o.node),i=(r=o.node).id()}return s.spawn(n)}}}},Me={kruskal:function(e){e=e||function(e){return 1};for(var t=this.byGroup(),n=t.nodes,r=t.edges,i=n.length,o=new Array(i),a=n,s=function(e){for(var t=0;t0;){if(l=(u=v.pop()).id(),b.delete(l),E++,l===f){for(var C=[],k=i,_=f,N=w[_];C.unshift(k),null!=N&&C.unshift(N),null!=(k=y[_]);)N=w[_=k.id()];return{found:!0,distance:d[l],path:this.spawn(C),steps:E}}p[l]=!0;for(var S=u._private.edges,O=0;OS&&(d[N]=S,b[N]=_,y[N]=x),!i){var O=_*u+k;!i&&d[O]>S&&(d[O]=S,b[O]=k,y[O]=x)}}}for(var T=0;T1&&void 0!==arguments[1]?arguments[1]:o,r=b(e),i=[],a=r;;){if(null==a)return t.spawn();var c=v(a),u=c.edge,l=c.pred;if(i.unshift(a[0]),a.same(n)&&i.length>0)break;null!=u&&i.unshift(u),a=l}return s.spawn(i)},hasNegativeWeightCycle:g,negativeWeightCycles:[]}}},He=Math.sqrt(2),Fe=function(e,t,n){0===n.length&&de("Karger-Stein must be run on a connected (sub)graph");for(var r=n[e],i=r[1],o=r[2],a=t[i],s=t[o],c=n,u=c.length-1;u>=0;u--){var l=c[u],h=l[1],f=l[2];(t[h]===a&&t[f]===s||t[h]===s&&t[f]===a)&&c.splice(u,1)}for(var d=0;dr;){var i=Math.floor(Math.random()*t.length);t=Fe(i,e,t),n--}return t},ze={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,r=t.edges;r.unmergeBy((function(e){return e.isLoop()}));var i=n.length,o=r.length,a=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),s=Math.floor(i/He);if(!(i<2)){for(var c=[],u=0;u0?1:e<0?-1:0},$e=function(e,t){return Math.sqrt(Ke(e,t))},Ke=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},Qe=function(e){for(var t=e.length,n=0,r=0;r=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(null!=e.w&&null!=e.h&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},rt=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},it=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},ot=function(e){var t,n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===o.length)t=n=r=i=o[0];else if(2===o.length)t=r=o[0],i=n=o[1];else if(4===o.length){var a=h(o,4);t=a[0],n=a[1],r=a[2],i=a[3]}return e.x1-=i,e.x2+=n,e.y1-=t,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},at=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},st=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},ct=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},ut=function(e,t){return ct(e,t.x1,t.y1)&&ct(e,t.x2,t.y2)},lt=function(e,t,n,r,i,o,a){var s,c=Ot(i,o),u=i/2,l=o/2,h=r-l-a;if((s=Et(e,t,n,r,n-u+c-a,h,n+u-c+a,h,!1)).length>0)return s;var f=n+u+a;if((s=Et(e,t,n,r,f,r-l+c-a,f,r+l-c+a,!1)).length>0)return s;var d=r+l+a;if((s=Et(e,t,n,r,n-u+c-a,d,n+u-c+a,d,!1)).length>0)return s;var g,p=n-u-a;if((s=Et(e,t,n,r,p,r-l+c-a,p,r+l-c+a,!1)).length>0)return s;var v=n-u+c,b=r-l+c;if((g=mt(e,t,n,r,v,b,c+a)).length>0&&g[0]<=v&&g[1]<=b)return[g[0],g[1]];var y=n+u-c,w=r-l+c;if((g=mt(e,t,n,r,y,w,c+a)).length>0&&g[0]>=y&&g[1]<=w)return[g[0],g[1]];var m=n+u-c,x=r+l-c;if((g=mt(e,t,n,r,m,x,c+a)).length>0&&g[0]>=m&&g[1]>=x)return[g[0],g[1]];var E=n-u+c,C=r+l-c;return(g=mt(e,t,n,r,E,C,c+a)).length>0&&g[0]<=E&&g[1]>=C?[g[0],g[1]]:[]},ht=function(e,t,n,r,i,o,a){var s=a,c=Math.min(n,i),u=Math.max(n,i),l=Math.min(r,o),h=Math.max(r,o);return c-s<=e&&e<=u+s&&l-s<=t&&t<=h+s},ft=function(e,t,n,r,i,o,a,s,c){var u=Math.min(n,a,i)-c,l=Math.max(n,a,i)+c,h=Math.min(r,s,o)-c,f=Math.max(r,s,o)+c;return!(el||tf)},dt=function(e,t,n,r,i,o,a,s){var c,u,l,h,f,d,g,p,v,b,y,w,m,x=[];u=9*n*i-3*n*n-3*n*a-6*i*i+3*i*a+9*r*o-3*r*r-3*r*s-6*o*o+3*o*s,l=3*n*n-6*n*i+n*a-n*e+2*i*i+2*i*e-a*e+3*r*r-6*r*o+r*s-r*t+2*o*o+2*o*t-s*t,h=1*n*i-n*n+n*e-i*e+r*o-r*r+r*t-o*t,0===(c=1*n*n-4*n*i+2*n*a+4*i*i-4*i*a+a*a+r*r-4*r*o+2*r*s+4*o*o-4*o*s+s*s)&&(c=1e-5),p=-27*(h/=c)+(u/=c)*(9*(l/=c)-u*u*2),d=(g=(3*l-u*u)/9)*g*g+(p/=54)*p,(f=x)[1]=0,w=u/3,d>0?(b=(b=p+Math.sqrt(d))<0?-Math.pow(-b,1/3):Math.pow(b,1/3),y=(y=p-Math.sqrt(d))<0?-Math.pow(-y,1/3):Math.pow(y,1/3),f[0]=-w+b+y,w+=(b+y)/2,f[4]=f[2]=-w,w=Math.sqrt(3)*(-y+b)/2,f[3]=w,f[5]=-w):(f[5]=f[3]=0,0===d?(m=p<0?-Math.pow(-p,1/3):Math.pow(p,1/3),f[0]=2*m-w,f[4]=f[2]=-(m+w)):(v=(g=-g)*g*g,v=Math.acos(p/Math.sqrt(v)),m=2*Math.sqrt(g),f[0]=-w+m*Math.cos(v/3),f[2]=-w+m*Math.cos((v+2*Math.PI)/3),f[4]=-w+m*Math.cos((v+4*Math.PI)/3)));for(var E=[],C=0;C<6;C+=2)Math.abs(x[C+1])<1e-7&&x[C]>=0&&x[C]<=1&&E.push(x[C]);E.push(1),E.push(0);for(var k,_,N,S=-1,O=0;O=0?Nc?(e-i)*(e-i)+(t-o)*(t-o):u-h},pt=function(e,t,n){for(var r,i,o,a,s=0,c=0;c=e&&e>=o||r<=e&&e<=o))continue;(e-r)/(o-r)*(a-i)+i>t&&s++}return s%2!=0},vt=function(e,t,n,r,i,o,a,s,c){var u,l=new Array(n.length);null!=s[0]?(u=Math.atan(s[1]/s[0]),s[0]<0?u+=Math.PI/2:u=-u-Math.PI/2):u=s;for(var h,f=Math.cos(-u),d=Math.sin(-u),g=0;g0){var p=yt(l,-c);h=bt(p)}else h=l;return pt(e,t,h)},bt=function(e){for(var t,n,r,i,o,a,s,c,u=new Array(e.length/2),l=0;l=0&&g<=1&&v.push(g),p>=0&&p<=1&&v.push(p),0===v.length)return[];var b=v[0]*s[0]+e,y=v[0]*s[1]+t;return v.length>1?v[0]==v[1]?[b,y]:[b,y,v[1]*s[0]+e,v[1]*s[1]+t]:[b,y]},xt=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},Et=function(e,t,n,r,i,o,a,s,c){var u=e-i,l=n-e,h=a-i,f=t-o,d=r-t,g=s-o,p=h*f-g*u,v=l*f-d*u,b=g*l-h*d;if(0!==b){var y=p/b,w=v/b,m=-.001;return m<=y&&y<=1.001&&m<=w&&w<=1.001||c?[e+y*l,t+y*d]:[]}return 0===p||0===v?xt(e,n,a)===a?[a,s]:xt(e,n,i)===i?[i,o]:xt(i,a,n)===n?[n,r]:[]:[]},Ct=function(e,t,n,r,i,o,a,s){var c,u,l,h,f,d,g=[],p=new Array(n.length),v=!0;if(null==o&&(v=!1),v){for(var b=0;b0){var y=yt(p,-s);u=bt(y)}else u=p}else u=n;for(var w=0;wl&&(l=t)},f=function(e){return u[e]},d=0;d0?x.edgesTo(m)[0]:m.edgesTo(x)[0];var E=r(w);m=m.id(),d[m]>d[b]+E&&(d[m]=d[b]+E,g.nodes.indexOf(m)<0?g.push(m):g.updateItem(m),l[m]=0,u[m]=[]),d[m]==d[b]+E&&(l[m]=l[m]+l[b],u[m].push(b))}else for(var C=0;C0;){for(var S=n.pop(),O=0;O0&&a.push(n[s]);0!==a.length&&i.push(r.collection(a))}return i}(l,c,t,r);return w=function(e){for(var t=0;t5&&void 0!==arguments[5]?arguments[5]:Zt,a=r,s=0;s=2?tn(e,t,n,0,Qt,Jt):tn(e,t,n,0,Kt)},squaredEuclidean:function(e,t,n){return tn(e,t,n,0,Qt)},manhattan:function(e,t,n){return tn(e,t,n,0,Kt)},max:function(e,t,n){return tn(e,t,n,-1/0,en)}};function rn(e,t,n,r,i,o){var a;return a=m(e)?e:nn[e]||nn.euclidean,0===t&&m(e)?a(i,o):a(t,n,r,i,o)}nn["squared-euclidean"]=nn.squaredEuclidean,nn.squaredeuclidean=nn.squaredEuclidean;var on=me({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),an=function(e){return on(e)},sn=function(e,t,n,r,i){var o="kMedoids"!==i?function(e){return n[e]}:function(e){return r[e](n)},a=n,s=t;return rn(e,r.length,o,(function(e){return r[e](t)}),a,s)},cn=function(e,t,n){for(var r=n.length,i=new Array(r),o=new Array(r),a=new Array(t),s=null,c=0;cn)return!1;return!0},fn=function(e,t,n){for(var r=0;ri&&(i=t[c][u],o=u);a[o].push(e[c])}for(var l=0;l=i.threshold||"dendrogram"===i.mode&&1===e.length)return!1;var d,g=t[a],p=t[r[a]];d="dendrogram"===i.mode?{left:g,right:p,key:g.key}:{value:g.value.concat(p.value),key:g.key},e[g.index]=d,e.splice(p.index,1),t[g.key]=d;for(var v=0;vn[p.key][b.key]&&(o=n[p.key][b.key])):"max"===i.linkage?(o=n[g.key][b.key],n[g.key][b.key]a&&(o=c,a=t[i*e+c])}o>0&&r.push(o)}for(var u=0;u1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?(n0&&e.splice(0,t)):e=e.slice(t,n);for(var o=0,a=e.length-1;a>=0;a--){var s=e[a];i?isFinite(s)||(e[a]=-1/0,o++):e.splice(a,1)}r&&e.sort((function(e,t){return e-t}));var c=e.length,u=Math.floor(c/2);return c%2!=0?e[u+1+o]:(e[u-1+o]+e[u+o])/2}(e):"mean"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0,i=0,o=t;o1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=1/0,i=t;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=-1/0,i=t;i=S?(O=S,S=L,T=I):L>O&&(O=L);for(var A=0;A0?1:0;k[E%u.minIterations*t+G]=B,R+=B}if(R>0&&(E>=u.minIterations-1||E==u.maxIterations-1)){for(var H=0,F=0;F0&&r.push(i);return r}(t,o,a),V=function(e,t,n){for(var r=Tn(e,t,n),i=0;ic&&(s=u,c=l)}n[i]=o[s]}return Tn(e,t,n)}(t,r,z),U={},q=0;q1)}}));var c=Object.keys(t).filter((function(e){return t[e].cutVertex})).map((function(t){return e.getElementById(t)}));return{cut:e.spawn(c),components:i}},Pn=function(){var e=this,t={},n=0,r=[],i=[],o=e.spawn(e),a=function a(s){if(i.push(s),t[s]={index:n,low:n++,explored:!1},e.getElementById(s).connectedEdges().intersection(e).forEach((function(e){var n=e.target().id();n!==s&&(n in t||a(n),t[n].explored||(t[s].low=Math.min(t[s].low,t[n].low)))})),t[s].index===t[s].low){for(var c=e.spawn();;){var u=i.pop();if(c.merge(e.getElementById(u)),t[u].low=t[s].index,t[u].explored=!0,u===s)break}var l=c.edgesWith(c),h=c.merge(l);r.push(h),o=o.difference(h)}};return e.forEach((function(e){if(e.isNode()){var n=e.id();n in t||a(n)}})),{cut:o,components:r}},Dn={};[Le,Ae,Me,De,Re,Be,ze,At,Pt,jt,Gt,Wt,yn,Nn,In,{hierholzer:function(e){if(!E(e)){var t=arguments;e={root:t[0],directed:t[1]}}var n,r,i,o=An(e),a=o.root,s=o.directed,c=this,u=!1;a&&(i=w(a)?this.filter(a)[0].id():a[0].id());var l={},h={};s?c.forEach((function(e){var t=e.id();if(e.isNode()){var i=e.indegree(!0),o=e.outdegree(!0),a=i-o,s=o-i;1==a?n?u=!0:n=t:1==s?r?u=!0:r=t:(s>1||a>1)&&(u=!0),l[t]=[],e.outgoers().forEach((function(e){e.isEdge()&&l[t].push(e.id())}))}else h[t]=[void 0,e.target().id()]})):c.forEach((function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(n?r?u=!0:r=t:n=t),l[t]=[],e.connectedEdges().forEach((function(e){return l[t].push(e.id())}))):h[t]=[e.source().id(),e.target().id()]}));var f={found:!1,trail:void 0};if(u)return f;if(r&&n)if(s){if(i&&r!=i)return f;i=r}else{if(i&&r!=i&&n!=i)return f;i||(i=r)}else i||(i=c[0].id());var d=function(e){for(var t,n,r,i=e,o=[e];l[i].length;)t=l[i].shift(),n=h[t][0],i!=(r=h[t][1])?(l[r]=l[r].filter((function(e){return e!=t})),i=r):s||i==n||(l[n]=l[n].filter((function(e){return e!=t})),i=n),o.unshift(t),o.unshift(i);return o},g=[],p=[];for(p=d(i);1!=p.length;)0==l[p[0]].length?(g.unshift(c.getElementById(p.shift())),g.unshift(c.getElementById(p.shift()))):p=d(p.shift()).concat(p);for(var v in g.unshift(c.getElementById(p.shift())),l)if(l[v].length)return f;return f.found=!0,f.trail=this.spawn(g,!0),f}},{hopcroftTarjanBiconnected:Mn,htbc:Mn,htb:Mn,hopcroftTarjanBiconnectedComponents:Mn},{tarjanStronglyConnected:Pn,tsc:Pn,tscc:Pn,tarjanStronglyConnectedComponents:Pn}].forEach((function(e){B(Dn,e)}));var jn=function e(t){if(!(this instanceof e))return new e(t);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof t&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))};jn.prototype={fulfill:function(e){return Rn(this,1,"fulfillValue",e)},reject:function(e){return Rn(this,2,"rejectReason",e)},then:function(e,t){var n=this,r=new jn;return n.onFulfilled.push(Hn(e,r,"fulfill")),n.onRejected.push(Hn(t,r,"reject")),Gn(n),r.proxy}};var Rn=function(e,t,n,r){return 0===e.state&&(e.state=t,e[n]=r,Gn(e)),e},Gn=function(e){1===e.state?Bn(e,"onFulfilled",e.fulfillValue):2===e.state&&Bn(e,"onRejected",e.rejectReason)},Bn=function(e,t,n){if(0!==e[t].length){var r=e[t];e[t]=[];var i=function(){for(var e=0;e0:void 0}},clearQueue:function(){return function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n0&&this.spawn(r).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return null!=t&&t._private.classes.has(e)},toggleClass:function(e,t){x(e)||(e=e.match(/\S+/g)||[]);for(var n=this,r=void 0===t,i=[],o=0,a=n.length;o0&&this.spawn(i).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(null==t)t=250;else if(0===t)return n;return n.addClass(e),setTimeout((function(){n.removeClass(e)}),t),n}};$n.className=$n.classNames=$n.classes;var Kn={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:R,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Kn.variable="(?:[\\w-]|(?:\\\\"+Kn.metaChar+"))+",Kn.value=Kn.string+"|"+Kn.number,Kn.className=Kn.variable,Kn.id=Kn.variable,function(){var e,t,n;for(e=Kn.comparatorOp.split("|"),n=0;n=0||"="!==t&&(Kn.comparatorOp+="|\\!"+t)}();var Qn=20,Jn=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort((function(e,t){return function(e,t){return-1*G(e,t)}(e.selector,t.selector)})),er=function(){for(var e,t={},n=0;n0&&u.edgeCount>0)return pe("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(u.edgeCount>1)return pe("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===u.edgeCount&&pe("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var e=function(e){return null==e?"":e},t=function(t){return w(t)?'"'+t+'"':e(t)},n=function(e){return" "+e+" "},r=function(i,o){return i.checks.reduce((function(a,s,c){return a+(o===i&&0===c?"$":"")+function(i,o){var a=i.type,s=i.value;switch(a){case 0:var c=e(s);return c.substring(0,c.length-1);case 3:var u=i.field,l=i.operator;return"["+u+n(e(l))+t(s)+"]";case 5:var h=i.operator,f=i.field;return"["+e(h)+f+"]";case 4:return"["+i.field+"]";case 6:var d=i.operator;return"[["+i.field+n(e(d))+t(s)+"]]";case 7:return s;case 8:return"#"+s;case 9:return"."+s;case 17:case 15:return r(i.parent,o)+n(">")+r(i.child,o);case 18:case 16:return r(i.ancestor,o)+" "+r(i.descendant,o);case 19:var g=r(i.left,o),p=r(i.subject,o),v=r(i.right,o);return g+(g.length>0?" ":"")+p+v;case Qn:return""}}(s,o)}),"")},i="",o=0;o1&&o=0&&(t=t.replace("!",""),l=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),u=!0),(a||c||u)&&(i=a||s?""+e:"",o=""+n),u&&(e=i=i.toLowerCase(),n=o=o.toLowerCase()),t){case"*=":r=i.indexOf(o)>=0;break;case"$=":r=i.indexOf(o,i.length-o.length)>=0;break;case"^=":r=0===i.indexOf(o);break;case"=":r=e===n;break;case">":h=!0,r=e>n;break;case">=":h=!0,r=e>=n;break;case"<":h=!0,r=e0;){var u=i.shift();t(u),o.add(u.id()),a&&r(i,o,u)}return e}function mr(e,t,n){if(n.isParent())for(var r=n._private.children,i=0;i1&&void 0!==arguments[1])||arguments[1];return wr(this,e,t,mr)},yr.forEachUp=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return wr(this,e,t,xr)},yr.forEachUpAndDown=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return wr(this,e,t,Er)},yr.ancestors=yr.parents,(pr=vr={data:Wn.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Wn.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Wn.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Wn.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Wn.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Wn.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}}).attr=pr.data,pr.removeAttr=pr.removeData;var Cr,kr,_r=vr,Nr={};function Sr(e){return function(t){var n=this;if(void 0===t&&(t=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,i=n[0],o=i._private.edges,a=0;at})),minIndegree:Or("indegree",(function(e,t){return et})),minOutdegree:Or("outdegree",(function(e,t){return et}))}),B(Nr,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r0,l=u;u&&(c=c[0]);var h=l?c.position():{x:0,y:0};return i={x:s.x-h.x,y:s.y-h.y},void 0===e?i:i[e]}for(var f=0;f0,v=p;p&&(g=g[0]);var b=v?g.position():{x:0,y:0};void 0!==t?d.position(e,t+b[e]):void 0!==i&&d.position({x:i.x+b.x,y:i.y+b.y})}}else if(!o)return;return this}},Cr.modelPosition=Cr.point=Cr.position,Cr.modelPositions=Cr.points=Cr.positions,Cr.renderedPoint=Cr.renderedPosition,Cr.relativePoint=Cr.relativePosition;var Ir,Ar,Mr=kr;Ir=Ar={},Ar.renderedBoundingBox=function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),i=n.pan(),o=t.x1*r+i.x,a=t.x2*r+i.x,s=t.y1*r+i.y,c=t.y2*r+i.y;return{x1:o,x2:a,y1:s,y2:c,w:a-o,h:c-s}},Ar.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();return t.styleEnabled()&&t.hasCompoundNodes()?(this.forEachUp((function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,e||t.emitAndNotify("bounds")}})),this):this},Ar.updateCompoundBounds=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;if(!e&&t.batching())return this;function n(e){if(e.isParent()){var t=e._private,n=e.children(),r="include"===e.pstyle("compound-sizing-wrt-labels").value,i={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},o=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),a=t.position;0!==o.w&&0!==o.h||((o={w:e.pstyle("width").pfValue,h:e.pstyle("height").pfValue}).x1=a.x-o.w/2,o.x2=a.x+o.w/2,o.y1=a.y-o.h/2,o.y2=a.y+o.h/2);var s=i.width.left.value;"px"===i.width.left.units&&i.width.val>0&&(s=100*s/i.width.val);var c=i.width.right.value;"px"===i.width.right.units&&i.width.val>0&&(c=100*c/i.width.val);var u=i.height.top.value;"px"===i.height.top.units&&i.height.val>0&&(u=100*u/i.height.val);var l=i.height.bottom.value;"px"===i.height.bottom.units&&i.height.val>0&&(l=100*l/i.height.val);var h=b(i.width.val-o.w,s,c),f=h.biasDiff,d=h.biasComplementDiff,g=b(i.height.val-o.h,u,l),p=g.biasDiff,v=g.biasComplementDiff;t.autoPadding=function(e,t,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return e>0?n.pfValue*e:0;case"height":return t>0?n.pfValue*t:0;case"average":return e>0&&t>0?n.pfValue*(e+t)/2:0;case"min":return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case"max":return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}}(o.w,o.h,e.pstyle("padding"),e.pstyle("padding-relative-to").value),t.autoWidth=Math.max(o.w,i.width.val),a.x=(-f+o.x1+o.x2+d)/2,t.autoHeight=Math.max(o.h,i.height.val),a.y=(-p+o.y1+o.y2+v)/2}function b(e,t,n){var r=0,i=0,o=t+n;return e>0&&o>0&&(r=t/o*e,i=n/o*e),{biasDiff:r,biasComplementDiff:i}}}for(var r=0;re.x2?r:e.x2,e.y1=ne.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},jr=function(e,t){return null==t?e:Dr(e,t.x1,t.y1,t.x2,t.y2)},Rr=function(e,t,n){return Ce(e,t,n)},Gr=function(e,t,n){if(!t.cy().headless()){var r,i,o=t._private,a=o.rstyle,s=a.arrowWidth/2;if("none"!==t.pstyle(n+"-arrow-shape").value){"source"===n?(r=a.srcX,i=a.srcY):"target"===n?(r=a.tgtX,i=a.tgtY):(r=a.midX,i=a.midY);var c=o.arrowBounds=o.arrowBounds||{},u=c[n]=c[n]||{};u.x1=r-s,u.y1=i-s,u.x2=r+s,u.y2=i+s,u.w=u.x2-u.x1,u.h=u.y2-u.y1,it(u,1),Dr(e,u.x1,u.y1,u.x2,u.y2)}}},Br=function(e,t,n){if(!t.cy().headless()){var r;r=n?n+"-":"";var i=t._private,o=i.rstyle;if(t.pstyle(r+"label").strValue){var a,s,c,u,l=t.pstyle("text-halign"),h=t.pstyle("text-valign"),f=Rr(o,"labelWidth",n),d=Rr(o,"labelHeight",n),g=Rr(o,"labelX",n),p=Rr(o,"labelY",n),v=t.pstyle(r+"text-margin-x").pfValue,b=t.pstyle(r+"text-margin-y").pfValue,y=t.isEdge(),w=t.pstyle(r+"text-rotation"),m=t.pstyle("text-outline-width").pfValue,x=t.pstyle("text-border-width").pfValue/2,E=t.pstyle("text-background-padding").pfValue,C=d,k=f,_=k/2,N=C/2;if(y)a=g-_,s=g+_,c=p-N,u=p+N;else{switch(l.value){case"left":a=g-k,s=g;break;case"center":a=g-_,s=g+_;break;case"right":a=g,s=g+k}switch(h.value){case"top":c=p-C,u=p;break;case"center":c=p-N,u=p+N;break;case"bottom":c=p,u=p+C}}a+=v-Math.max(m,x)-E-2,s+=v+Math.max(m,x)+E+2,c+=b-Math.max(m,x)-E-2,u+=b+Math.max(m,x)+E+2;var S=n||"main",O=i.labelBounds,T=O[S]=O[S]||{};T.x1=a,T.y1=c,T.x2=s,T.y2=u,T.w=s-a,T.h=u-c;var L=y&&"autorotate"===w.strValue,I=null!=w.pfValue&&0!==w.pfValue;if(L||I){var A=L?Rr(i.rstyle,"labelAngle",n):w.pfValue,M=Math.cos(A),P=Math.sin(A),D=(a+s)/2,j=(c+u)/2;if(!y){switch(l.value){case"left":D=s;break;case"right":D=a}switch(h.value){case"top":j=u;break;case"bottom":j=c}}var R=function(e,t){return{x:(e-=D)*M-(t-=j)*P+D,y:e*P+t*M+j}},G=R(a,c),B=R(a,u),H=R(s,c),F=R(s,u);a=Math.min(G.x,B.x,H.x,F.x),s=Math.max(G.x,B.x,H.x,F.x),c=Math.min(G.y,B.y,H.y,F.y),u=Math.max(G.y,B.y,H.y,F.y)}var Y=S+"Rot",z=O[Y]=O[Y]||{};z.x1=a,z.y1=c,z.x2=s,z.y2=u,z.w=s-a,z.h=u-c,Dr(e,a,c,s,u),Dr(i.labelBounds.all,a,c,s,u)}return e}},Hr=function(e){var t=0,n=function(e){return(e?1:0)<(r=N[1].x)){var S=n;n=r,r=S}if(i>(o=N[1].y)){var O=i;i=o,o=O}Dr(f,n-x,i-x,r+x,o+x)}}else if("bezier"===_||"unbundled-bezier"===_||"segments"===_||"taxi"===_){var T;switch(_){case"bezier":case"unbundled-bezier":T=v.bezierPts;break;case"segments":case"taxi":T=v.linePts}if(null!=T)for(var L=0;L(r=M.x)){var P=n;n=r,r=P}if((i=A.y)>(o=M.y)){var D=i;i=o,o=D}Dr(f,n-=x,i-=x,r+=x,o+=x)}if(l&&t.includeEdges&&p&&(Gr(f,e,"mid-source"),Gr(f,e,"mid-target"),Gr(f,e,"source"),Gr(f,e,"target")),l&&"yes"===e.pstyle("ghost").value){var j=e.pstyle("ghost-offset-x").pfValue,R=e.pstyle("ghost-offset-y").pfValue;Dr(f,f.x1+j,f.y1+R,f.x2+j,f.y2+R)}var G=d.bodyBounds=d.bodyBounds||{};at(G,f),ot(G,b),it(G,1),l&&(n=f.x1,r=f.x2,i=f.y1,o=f.y2,Dr(f,n-m,i-m,r+m,o+m));var B=d.overlayBounds=d.overlayBounds||{};at(B,f),ot(B,b),it(B,1);var H=d.labelBounds=d.labelBounds||{};null!=H.all?((c=H.all).x1=1/0,c.y1=1/0,c.x2=-1/0,c.y2=-1/0,c.w=0,c.h=0):H.all=nt(),l&&t.includeLabels&&(t.includeMainLabels&&Br(f,e,null),p&&(t.includeSourceLabels&&Br(f,e,"source"),t.includeTargetLabels&&Br(f,e,"target")))}return f.x1=Pr(f.x1),f.y1=Pr(f.y1),f.x2=Pr(f.x2),f.y2=Pr(f.y2),f.w=Pr(f.x2-f.x1),f.h=Pr(f.y2-f.y1),f.w>0&&f.h>0&&w&&(ot(f,b),it(f,1)),f}(e,zr),r.bbCache=n,r.bbCachePosKey=a):n=r.bbCache,!o){var l=e.isNode();n=nt(),(t.includeNodes&&l||t.includeEdges&&!l)&&(t.includeOverlays?jr(n,r.overlayBounds):jr(n,r.bodyBounds)),t.includeLabels&&(t.includeMainLabels&&(!i||t.includeSourceLabels&&t.includeTargetLabels)?jr(n,r.labelBounds.all):(t.includeMainLabels&&jr(n,r.labelBounds.mainRot),t.includeSourceLabels&&jr(n,r.labelBounds.sourceRot),t.includeTargetLabels&&jr(n,r.labelBounds.targetRot))),n.w=n.x2-n.x1,n.h=n.y2-n.y1}return n},zr={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,useCache:!0},Vr=Hr(zr),Ur=me(zr);Ar.boundingBox=function(e){var t;if(1!==this.length||null==this[0]._private.bbCache||this[0]._private.styleDirty||void 0!==e&&void 0!==e.useCache&&!0!==e.useCache){t=nt();var n=Ur(e=e||zr),r=this;if(r.cy().styleEnabled())for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:ai,t=arguments.length>1?arguments[1]:void 0,n=0;n=0;s--)a(s);return this},ci.removeAllListeners=function(){return this.removeListener("*")},ci.emit=ci.trigger=function(e,t,n){var r=this.listeners,i=r.length;return this.emitting++,x(t)||(t=[t]),function(e,t,n){if("event"!==y(n))if(E(n))t(e,li(e,n));else for(var r=x(n)?n:n.split(/\s+/),i=0;i1&&!r){var i=this.length-1,o=this[i],a=o._private.data.id;this[i]=void 0,this[e]=o,n.set(a,{ele:o,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map.get(n);if(!r)return this;var i=r.index;return this.unmergeAt(i),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&w(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=0;r=0;t--)e(this[t])&&this.unmergeAt(t);return this},map:function(e,t){for(var n=[],r=this,i=0;ir&&(r=s,n=a)}return{value:r,ele:n}},min:function(e,t){for(var n,r=1/0,i=this,o=0;o=0&&i1&&void 0!==arguments[1])||arguments[1],n=this[0],r=n.cy();if(r.styleEnabled()&&n){this.cleanStyle();var i=n._private.style[e];return null!=i?i:t?r.style().getDefaultProperty(e):null}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled())return t?t.pstyle(e).units:void 0},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];return n?t.style().getRenderedStyle(n,e):void 0},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=n.style();if(E(e)){var i=e;r.applyBypass(this,i,!1),this.emitAndNotify("style")}else if(w(e)){if(void 0===t){var o=this[0];return o?r.getStylePropertyValue(o,e):void 0}r.applyBypass(this,e,t,!1),this.emitAndNotify("style")}else if(void 0===e){var a=this[0];return a?r.getRawStyle(a):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=t.style(),r=this;if(void 0===e)for(var i=0;i0&&t.push(l[0]),t.push(s[0])}return this.spawn(t,!0).filter(e)}),"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),Di.neighbourhood=Di.neighborhood,Di.closedNeighbourhood=Di.closedNeighborhood,Di.openNeighbourhood=Di.openNeighborhood,B(Di,{source:br((function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t}),"source"),target:br((function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t}),"target"),sources:Bi({attr:"source"}),targets:Bi({attr:"target"})}),B(Di,{edgesWith:br(Hi(),"edgesWith"),edgesTo:br(Hi({thisIsSrc:!0}),"edgesTo")}),B(Di,{connectedEdges:br((function(e){for(var t=[],n=0;n0);return o},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),Di.componentsOf=Di.components;var Yi=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(void 0!==e){var r=new _e,i=!1;if(t){if(t.length>0&&E(t[0])&&!N(t[0])){i=!0;for(var o=[],a=new Se,s=0,c=t.length;s0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this,o=i.cy(),a=o._private,s=[],c=[],u=0,l=i.length;u0){for(var G=e.length===i.length?i:new Yi(o,e),B=0;B0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=[],i={},o=n._private.cy;function a(e){for(var t=e._private.edges,n=0;n0&&(e?S.emitAndNotify("remove"):t&&S.emit("remove"));for(var O=0;Oh&&Math.abs(s.v)>h;);return o?function(e){return u[e*(u.length-1)|0]}:l}}(),qi=function(e,t,n,r){var i=function(e,t,n,r){var i=4,o=.001,a=1e-7,s=10,c=11,u=1/(c-1),l="undefined"!=typeof Float32Array;if(4!==arguments.length)return!1;for(var h=0;h<4;++h)if("number"!=typeof arguments[h]||isNaN(arguments[h])||!isFinite(arguments[h]))return!1;e=Math.min(e,1),n=Math.min(n,1),e=Math.max(e,0),n=Math.max(n,0);var f=l?new Float32Array(c):new Array(c);function d(e,t){return 1-3*t+3*e}function g(e,t){return 3*t-6*e}function p(e){return 3*e}function v(e,t,n){return((d(t,n)*e+g(t,n))*e+p(t))*e}function b(e,t,n){return 3*d(t,n)*e*e+2*g(t,n)*e+p(t)}function y(t,r){for(var o=0;o0?i=c:r=c}while(Math.abs(o)>a&&++u=o?y(t,s):0===l?s:m(t,r,r+u)}var E=!1;function C(){E=!0,e===t&&n===r||w()}var k=function(i){return E||C(),e===t&&n===r?i:0===i?0:1===i?1:v(x(i),t,r)};k.getControlPoints=function(){return[{x:e,y:t},{x:n,y:r}]};var _="generateBezier("+[e,t,n,r]+")";return k.toString=function(){return _},k}(e,t,n,r);return function(e,t,n){return e+(t-e)*i(n)}},Xi={linear:function(e,t,n){return e+(t-e)*n},ease:qi(.25,.1,.25,1),"ease-in":qi(.42,0,1,1),"ease-out":qi(0,0,.58,1),"ease-in-out":qi(.42,0,.58,1),"ease-in-sine":qi(.47,0,.745,.715),"ease-out-sine":qi(.39,.575,.565,1),"ease-in-out-sine":qi(.445,.05,.55,.95),"ease-in-quad":qi(.55,.085,.68,.53),"ease-out-quad":qi(.25,.46,.45,.94),"ease-in-out-quad":qi(.455,.03,.515,.955),"ease-in-cubic":qi(.55,.055,.675,.19),"ease-out-cubic":qi(.215,.61,.355,1),"ease-in-out-cubic":qi(.645,.045,.355,1),"ease-in-quart":qi(.895,.03,.685,.22),"ease-out-quart":qi(.165,.84,.44,1),"ease-in-out-quart":qi(.77,0,.175,1),"ease-in-quint":qi(.755,.05,.855,.06),"ease-out-quint":qi(.23,1,.32,1),"ease-in-out-quint":qi(.86,0,.07,1),"ease-in-expo":qi(.95,.05,.795,.035),"ease-out-expo":qi(.19,1,.22,1),"ease-in-out-expo":qi(1,0,0,1),"ease-in-circ":qi(.6,.04,.98,.335),"ease-out-circ":qi(.075,.82,.165,1),"ease-in-out-circ":qi(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return Xi.linear;var r=Ui(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":qi};function Wi(e,t,n,r,i){if(1===r)return n;if(t===n)return n;var o=i(t,n,r);return null==e||((e.roundValue||e.color)&&(o=Math.round(o)),void 0!==e.min&&(o=Math.max(o,e.min)),void 0!==e.max&&(o=Math.min(o,e.max))),o}function Zi(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function $i(e,t,n,r,i){var o=null!=i?i.type:null;n<0?n=0:n>1&&(n=1);var a=Zi(e,i),s=Zi(t,i);if(C(a)&&C(s))return Wi(o,a,s,n,r);if(x(a)&&x(s)){for(var c=[],u=0;u0?("spring"===h&&f.push(a.duration),a.easingImpl=Xi[h].apply(null,f)):a.easingImpl=Xi[h]}var d,g=a.easingImpl;if(d=0===a.duration?1:(n-c)/a.duration,a.applying&&(d=a.progress),d<0?d=0:d>1&&(d=1),null==a.delay){var p=a.startPosition,v=a.position;if(v&&i&&!e.locked()){var b={};Qi(p.x,v.x)&&(b.x=$i(p.x,v.x,d,g)),Qi(p.y,v.y)&&(b.y=$i(p.y,v.y,d,g)),e.position(b)}var y=a.startPan,m=a.pan,x=o.pan,E=null!=m&&r;E&&(Qi(y.x,m.x)&&(x.x=$i(y.x,m.x,d,g)),Qi(y.y,m.y)&&(x.y=$i(y.y,m.y,d,g)),e.emit("pan"));var C=a.startZoom,k=a.zoom,_=null!=k&&r;_&&(Qi(C,k)&&(o.zoom=tt(o.minZoom,$i(C,k,d,g),o.maxZoom)),e.emit("zoom")),(E||_)&&e.emit("viewport");var N=a.style;if(N&&N.length>0&&i){for(var S=0;S=0;t--)(0,e[t])();e.splice(0,e.length)},l=o.length-1;l>=0;l--){var h=o[l],f=h._private;f.stopped?(o.splice(l,1),f.hooked=!1,f.playing=!1,f.started=!1,u(f.frames)):(f.playing||f.applying)&&(f.playing&&f.applying&&(f.applying=!1),f.started||Ji(0,h,e),Ki(t,h,e,n),f.applying&&(f.applying=!1),u(f.frames),null!=f.step&&f.step(e),h.completed()&&(o.splice(l,1),f.hooked=!1,f.playing=!1,f.started=!1,u(f.completes)),s=!0)}return n||0!==o.length||0!==a.length||r.push(t),s}for(var o=!1,a=0;a0?t.notify("draw",n):t.notify("draw")),n.unmerge(r),t.emit("step")}var to={animate:Wn.animate(),animation:Wn.animation(),animated:Wn.animated(),clearQueue:Wn.clearQueue(),delay:Wn.delay(),delayAnimation:Wn.delayAnimation(),stop:Wn.stop(),addToAnimationPool:function(e){this.styleEnabled()&&this._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,e.styleEnabled()){var t=e.renderer();t&&t.beforeRender?t.beforeRender((function(t,n){eo(n,e)}),t.beforeRenderPriorities.animations):function t(){e._private.animationsRunning&&q((function(n){eo(n,e),t()}))}()}}},no={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return null==r||e!==n.target&&N(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e}},ro=function(e){return w(e)?new fr(e):e},io={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new si(no,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,ro(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,ro(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,ro(t),n),this},once:function(e,t,n){return this.emitter().one(e,ro(t),n),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};Wn.eventAliasesOn(io);var oo={png:function(e){return e=e||{},this._private.renderer.png(e)},jpg:function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)}};oo.jpeg=oo.jpg;var ao={layout:function(e){var t=this;if(null!=e)if(null!=e.name){var n,r=e.name,i=t.extension("layout",r);if(null!=i)return n=w(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$(),new i(B({},e,{cy:t,eles:n}));de("No such layout `"+r+"` found. Did you forget to import it and `cytoscape.use()` it?")}else de("A `name` must be specified to make a layout");else de("Layout options must be specified to make a layout")}};ao.createLayout=ao.makeLayout=ao.layout;var so={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();null!=t&&r.merge(t)}else if(n.notificationsEnabled){var i=this.renderer();!this.destroyed()&&i&&i.notify(e,t)}},notifications:function(e){var t=this._private;return void 0===e?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(0===e.batchCount)return this;if(e.batchCount--,0===e.batchCount){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach((function(n){var r=e.batchNotifications[n];r.empty()?t.notify(n):t.notify(n,r)}))}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch((function(){for(var n=Object.keys(e),r=0;r0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach((function(e){var t=e._private;t.rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]}))},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};uo.invalidateDimensions=uo.resize;var lo={collection:function(e,t){return w(e)?this.$(e):_(e)?e.collection():x(e)?new Yi(this,e,t):new Yi(this)},nodes:function(e){var t=this.$((function(e){return e.isNode()}));return e?t.filter(e):t},edges:function(e){var t=this.$((function(e){return e.isEdge()}));return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};lo.elements=lo.filter=lo.$;var ho={},fo="t";ho.apply=function(e){for(var t=this,n=t._private.cy.collection(),r=0;r0;if(f||h&&d){var g=void 0;f&&d||f?g=u.properties:d&&(g=u.mappedProperties);for(var p=0;p1&&(v=1),s.color){var x=i.valueMin[0],E=i.valueMax[0],k=i.valueMin[1],_=i.valueMax[1],N=i.valueMin[2],S=i.valueMax[2],O=null==i.valueMin[3]?1:i.valueMin[3],T=null==i.valueMax[3]?1:i.valueMax[3],L=[Math.round(x+(E-x)*v),Math.round(k+(_-k)*v),Math.round(N+(S-N)*v),Math.round(O+(T-O)*v)];n={bypass:i.bypass,name:i.name,value:L,strValue:"rgb("+L[0]+", "+L[1]+", "+L[2]+")"}}else{if(!s.number)return!1;var I=i.valueMin+(i.valueMax-i.valueMin)*v;n=this.parse(i.name,I,i.bypass,f)}if(!n)return p(),!1;n.mapping=i,i=n;break;case a.data:for(var A=i.field.split("."),M=h.data,P=0;P0&&o>0){for(var s={},c=!1,u=0;u0?e.delayAnimation(a).play().promise().then(t):t()})).then((function(){return e.animation({style:s,duration:o,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()})).then((function(){n.removeBypasses(e,i),e.emitAndNotify("style"),r.transitioning=!1}))}else r.transitioning&&(this.removeBypasses(e,i),e.emitAndNotify("style"),r.transitioning=!1)},ho.checkTrigger=function(e,t,n,r,i,o){var a=this.properties[t],s=i(a);null!=s&&s(n,r)&&o(a)},ho.checkZOrderTrigger=function(e,t,n,r){var i=this;this.checkTrigger(e,t,n,r,(function(e){return e.triggersZOrder}),(function(){i._private.cy.notify("zorder",e)}))},ho.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,(function(e){return e.triggersBounds}),(function(i){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache(),"curve-style"!==t||"bezier"!==n&&"bezier"!==r||!i.triggersBoundsOfParallelBeziers||e.parallelEdges().forEach((function(e){e.isBundledBezier()&&e.dirtyBoundingBoxCache()}))}))},ho.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r)};var go={applyBypass:function(e,t,n,r){var i=[];if("*"===t||"**"===t){if(void 0!==n)for(var o=0;ot.length?o.substr(t.length):""}function s(){n=n.length>r.length?n.substr(r.length):""}for(o=o.replace(/[/][*](\s|.)+?[*][/]/g,"");!o.match(/^\s*$/);){var c=o.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!c){pe("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+o);break}t=c[0];var u=c[1];if("core"!==u&&new fr(u).invalid)pe("Skipping parsing of block: Invalid selector found in string stylesheet: "+u),a();else{var l=c[2],h=!1;n=l;for(var f=[];!n.match(/^\s*$/);){var d=n.match(/^\s*(.+?)\s*:\s*(.+?)\s*;/);if(!d){pe("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+l),h=!0;break}r=d[0];var g=d[1],p=d[2];this.properties[g]?i.parse(g,p)?(f.push({name:g,val:p}),s()):(pe("Skipping property: Invalid property definition in: "+r),s()):(pe("Skipping property: Invalid property name in: "+r),s())}if(h){a();break}i.selector(u);for(var v=0;v=7&&"d"===t[0]&&(u=new RegExp(s.data.regex).exec(t))){if(n)return!1;var f=s.data;return{name:e,value:u,strValue:""+t,mapped:f,field:u[1],bypass:n}}if(t.length>=10&&"m"===t[0]&&(l=new RegExp(s.mapData.regex).exec(t))){if(n)return!1;if(h.multiple)return!1;var d=s.mapData;if(!h.color&&!h.number)return!1;var g=this.parse(e,l[4]);if(!g||g.mapped)return!1;var p=this.parse(e,l[5]);if(!p||p.mapped)return!1;if(g.pfValue===p.pfValue||g.strValue===p.strValue)return pe("`"+e+": "+t+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+g.strValue+"`"),this.parse(e,g.strValue);if(h.color){var v=g.value,b=p.value;if(!(v[0]!==b[0]||v[1]!==b[1]||v[2]!==b[2]||v[3]!==b[3]&&(null!=v[3]&&1!==v[3]||null!=b[3]&&1!==b[3])))return!1}return{name:e,value:l,strValue:""+t,mapped:d,field:l[1],fieldMin:parseFloat(l[2]),fieldMax:parseFloat(l[3]),valueMin:g.value,valueMax:p.value,bypass:n}}}if(h.multiple&&"multiple"!==r){var y;if(y=c?t.split(/\s+/):x(t)?t:[t],h.evenMultiple&&y.length%2!=0)return null;for(var E=[],k=[],_=[],N="",S=!1,O=0;O0?" ":"")+T.strValue}return h.validate&&!h.validate(E,k)?null:h.singleEnum&&S?1===E.length&&w(E[0])?{name:e,value:E[0],strValue:E[0],bypass:n}:null:{name:e,value:E,pfValue:_,strValue:N,bypass:n,units:k}}var L,I,A,P=function(){for(var r=0;rh.max||h.strictMax&&t===h.max))return null;var F={name:e,value:t,strValue:""+t+(D||""),units:D,bypass:n};return h.unitless||"px"!==D&&"em"!==D?F.pfValue=t:F.pfValue="px"!==D&&D?this.getEmSizeInPixels()*t:t,"ms"!==D&&"s"!==D||(F.pfValue="ms"===D?t:1e3*t),"deg"!==D&&"rad"!==D||(F.pfValue="rad"===D?t:(L=t,Math.PI*L/180)),"%"===D&&(F.pfValue=t/100),F}if(h.propList){var Y=[],z=""+t;if("none"===z);else{for(var V=z.split(/\s*,\s*|\s+/),U=0;U255)return;t.push(Math.floor(o))}var a=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(a&&!s)return;var c=n[4];if(void 0!==c){if((c=parseFloat(c))<0||c>1)return;t.push(c)}}return t}(A)||function(e){var t,n,r,i,o,a,s,c;function u(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var l=new RegExp("^hsl[a]?\\(((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?)))\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])(?:\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)$").exec(e);if(l){if((n=parseInt(l[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(r=parseFloat(l[2]))<0||r>100)return;if(r/=100,(i=parseFloat(l[3]))<0||i>100)return;if(i/=100,void 0!==(o=l[4])&&((o=parseFloat(o))<0||o>1))return;if(0===r)a=s=c=Math.round(255*i);else{var h=i<.5?i*(1+r):i+r-i*r,f=2*i-h;a=Math.round(255*u(f,h,n+1/3)),s=Math.round(255*u(f,h,n)),c=Math.round(255*u(f,h,n-1/3))}t=[a,s,c,o]}return t}(A);return X?{name:e,value:X,pfValue:X,strValue:"rgb("+X[0]+","+X[1]+","+X[2]+")",bypass:n}:null}if(h.regex||h.regexes){if(h.enums){var W=P();if(W)return W}for(var Z=h.regexes?h.regexes:[h.regex],$=0;$0&&c>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:a=(a=(a=Math.min((s-2*t)/n.w,(c-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:a)=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return void 0===e?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return void 0===e?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t,n,r=this._private,i=r.pan,o=r.zoom,a=!1;if(r.zoomingEnabled||(a=!0),C(e)?n=e:E(e)&&(n=e.level,null!=e.position?t=Ve(e.position,o,i):null!=e.renderedPosition&&(t=e.renderedPosition),null==t||r.panningEnabled||(a=!0)),n=(n=n>r.maxZoom?r.maxZoom:n)t.maxZoom||!t.zoomingEnabled?o=!0:(t.zoom=s,i.push("zoom"))}if(r&&(!o||!e.cancelOnFailedZoom)&&t.panningEnabled){var c=e.pan;C(c.x)&&(t.pan.x=c.x,a=!1),C(c.y)&&(t.pan.y=c.y,a=!1),a||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(w(e)){var n=e;e=this.mutableElements().filter(n)}else _(e)||(e=this.mutableElements());if(0!==e.length){var r=e.boundingBox(),i=this.width(),o=this.height();return{x:(i-(t=void 0===t?this._private.zoom:t)*(r.x1+r.x2))/2,y:(o-t*(r.y1+r.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e,t,n=this._private,r=n.container;return n.sizeCache=n.sizeCache||(r?(e=f.getComputedStyle(r),t=function(t){return parseFloat(e.getPropertyValue(t))},{width:r.clientWidth-t("padding-left")-t("padding-right"),height:r.clientHeight-t("padding-top")-t("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){return e?(this._private.multiClickDebounceTime=e,this):this._private.multiClickDebounceTime}};ko.centre=ko.center,ko.autolockNodes=ko.autolock,ko.autoungrabifyNodes=ko.autoungrabify;var _o={data:Wn.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Wn.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Wn.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Wn.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};_o.attr=_o.data,_o.removeAttr=_o.removeData;var No=function(e){var t=this,n=(e=B({},e)).container;n&&!k(n)&&k(n[0])&&(n=n[0]);var r=n?n._cyreg:null;(r=r||{})&&r.cy&&(r.cy.destroy(),r={});var i=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=t;var o=void 0!==f&&void 0!==n&&!e.headless,a=e;a.layout=B({name:o?"grid":"null"},a.layout),a.renderer=B({name:o?"canvas":"null"},a.renderer);var s=function(e,t,n){return void 0!==t?t:void 0!==n?n:e},c=this._private={container:n,ready:!1,options:a,elements:new Yi(this),listeners:[],aniEles:new Yi(this),data:a.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,a.zoomingEnabled),userZoomingEnabled:s(!0,a.userZoomingEnabled),panningEnabled:s(!0,a.panningEnabled),userPanningEnabled:s(!0,a.userPanningEnabled),boxSelectionEnabled:s(!0,a.boxSelectionEnabled),autolock:s(!1,a.autolock,a.autolockNodes),autoungrabify:s(!1,a.autoungrabify,a.autoungrabifyNodes),autounselectify:s(!1,a.autounselectify),styleEnabled:void 0===a.styleEnabled?o:a.styleEnabled,zoom:C(a.zoom)?a.zoom:1,pan:{x:E(a.pan)&&C(a.pan.x)?a.pan.x:0,y:E(a.pan)&&C(a.pan.y)?a.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,a.multiClickDebounceTime)};this.createEmitter(),this.selectionType(a.selectionType),this.zoomRange({min:a.minZoom,max:a.maxZoom}),c.styleEnabled&&t.setStyle([]);var u=B({},a,a.renderer);t.initRenderer(u),function(e,t){if(e.some(I))return Yn.all(e).then(t);t(e)}([a.style,a.elements],(function(e){var n=e[0],o=e[1];c.styleEnabled&&t.style().append(n),function(e,n,r){t.notifications(!1);var i=t.mutableElements();i.length>0&&i.remove(),null!=e&&(E(e)||x(e))&&t.add(e),t.one("layoutready",(function(e){t.notifications(!0),t.emit(e),t.one("load",n),t.emitAndNotify("load")})).one("layoutstop",(function(){t.one("done",r),t.emit("done")}));var o=B({},t._private.options.layout);o.eles=t.elements(),t.layout(o).run()}(o,(function(){t.startAnimationLoop(),c.ready=!0,m(a.ready)&&t.on("ready",a.ready);for(var e=0;e0,u=nt(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(_(n.roots))e=n.roots;else if(x(n.roots)){for(var l=[],h=0;h0;){var A=T.shift(),M=O(A,L);if(M)A.outgoers().filter((function(e){return e.isNode()&&i.has(e)})).forEach(I);else if(null===M){pe("Detected double maximal shift for node `"+A.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}S();var P=0;if(n.avoidOverlap)for(var D=0;D0&&b[0].length<=3?c/2:0),h=2*Math.PI/b[r].length*i;return 0===r&&1===b[0].length&&(l=1),{x:W+l*Math.cos(h),y:Z+l*Math.sin(h)}}return{x:W+(i+1-(o+1)/2)*a,y:(r+1)*s}})),this};var Ao={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Mo(e){this.options=B({},Ao,e)}Mo.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,o=r.nodes().not(":parent");t.sort&&(o=o.sort(t.sort));for(var a,s=nt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),c=s.x1+s.w/2,u=s.y1+s.h/2,l=(void 0===t.sweep?2*Math.PI-2*Math.PI/o.length:t.sweep)/Math.max(1,o.length-1),h=0,f=0;f1&&t.avoidOverlap){h*=1.75;var v=Math.cos(l)-Math.cos(0),b=Math.sin(l)-Math.sin(0),y=Math.sqrt(h*h/(v*v+b*b));a=Math.max(y,a)}return r.nodes().layoutPositions(this,t,(function(e,n){var r=t.startAngle+n*l*(i?1:-1),o=a*Math.cos(r),s=a*Math.sin(r);return{x:c+o,y:u+s}})),this};var Po,Do={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function jo(e){this.options=B({},Do,e)}jo.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,i=t.eles,o=i.nodes().not(":parent"),a=nt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s=a.x1+a.w/2,c=a.y1+a.h/2,u=[],l=0,h=0;h0&&Math.abs(y[0].value-m.value)>=v&&(y=[],b.push(y)),y.push(m)}var x=l+t.minNodeSpacing;if(!t.avoidOverlap){var E=b.length>0&&b[0].length>1,C=(Math.min(a.w,a.h)/2-x)/(b.length+E?1:0);x=Math.min(x,C)}for(var k=0,_=0;_1&&t.avoidOverlap){var T=Math.cos(O)-Math.cos(0),L=Math.sin(O)-Math.sin(0),I=Math.sqrt(x*x/(T*T+L*L));k=Math.max(I,k)}N.r=k,k+=x}if(t.equidistant){for(var A=0,M=0,P=0;P=e.numIter||(Uo(r,e),r.temperature=r.temperature*e.coolingFactor,r.temperature=e.animationThreshold&&o(),q(t)):(ra(r,e),s())}();else{for(;u;)u=a(c),c++;ra(r,e),s()}return this},Go.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},Go.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var Bo=function(e,t,n){for(var r=n.eles.edges(),i=n.eles.nodes(),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:e.width(),clientHeight:e.width(),boundingBox:nt(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()})},a=n.eles.components(),s={},c=0;c0)for(o.graphSet.push(x),c=0;cr.count?0:r.graph},Fo=function e(t,n,r,i){var o=i.graphSet[r];if(-10)var s=(u=r.nodeOverlap*a)*i/(p=Math.sqrt(i*i+o*o)),c=u*o/p;else{var u,l=$o(e,i,o),h=$o(t,-1*i,-1*o),f=h.x-l.x,d=h.y-l.y,g=f*f+d*d,p=Math.sqrt(g);s=(u=(e.nodeRepulsion+t.nodeRepulsion)/g)*f/p,c=u*d/p}e.isLocked||(e.offsetX-=s,e.offsetY-=c),t.isLocked||(t.offsetX+=s,t.offsetY+=c)}},Zo=function(e,t,n,r){if(n>0)var i=e.maxX-t.minX;else i=t.maxX-e.minX;if(r>0)var o=e.maxY-t.minY;else o=t.maxY-e.minY;return i>=0&&o>=0?Math.sqrt(i*i+o*o):0},$o=function(e,t,n){var r=e.positionX,i=e.positionY,o=e.height||1,a=e.width||1,s=n/t,c=o/a,u={};return 0===t&&0n?(u.x=r,u.y=i+o/2,u):0t&&-1*c<=s&&s<=c?(u.x=r-a/2,u.y=i-a*n/2/t,u):0=c)?(u.x=r+o*t/2/n,u.y=i+o/2,u):0>n&&(s<=-1*c||s>=c)?(u.x=r-o*t/2/n,u.y=i-o/2,u):u},Ko=function(e,t){for(var n=0;n1){var g=t.gravity*h/d,p=t.gravity*f/d;l.offsetX+=g,l.offsetY+=p}}}}},Jo=function(e,t){var n=[],r=0,i=-1;for(n.push.apply(n,e.graphSet[0]),i+=e.graphSet[0].length;r<=i;){var o=n[r++],a=e.idToIndex[o],s=e.layoutNodes[a],c=s.children;if(0n)var i={x:n*e/r,y:n*t/r};else i={x:e,y:t};return i},na=function e(t,n){var r=t.parentId;if(null!=r){var i=n.layoutNodes[n.idToIndex[r]],o=!1;return(null==i.maxX||t.maxX+i.padRight>i.maxX)&&(i.maxX=t.maxX+i.padRight,o=!0),(null==i.minX||t.minX-i.padLefti.maxY)&&(i.maxY=t.maxY+i.padBottom,o=!0),(null==i.minY||t.minY-i.padTopg&&(h+=d+t.componentSpacing,l=0,f=0,d=0)}}},ia={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function oa(e){this.options=B({},ia,e)}oa.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=r.nodes().not(":parent");t.sort&&(i=i.sort(t.sort));var o=nt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===o.h||0===o.w)r.nodes().layoutPositions(this,t,(function(e){return{x:o.x1,y:o.y1}}));else{var a=i.size(),s=Math.sqrt(a*o.h/o.w),c=Math.round(s),u=Math.round(o.w/o.h*s),l=function(e){if(null==e)return Math.min(c,u);Math.min(c,u)==c?c=e:u=e},h=function(e){if(null==e)return Math.max(c,u);Math.max(c,u)==c?c=e:u=e},f=t.rows,d=null!=t.cols?t.cols:t.columns;if(null!=f&&null!=d)c=f,u=d;else if(null!=f&&null==d)c=f,u=Math.ceil(a/c);else if(null==f&&null!=d)u=d,c=Math.ceil(a/u);else if(u*c>a){var g=l(),p=h();(g-1)*p>=a?l(g-1):(p-1)*g>=a&&h(p-1)}else for(;u*c=a?h(b+1):l(v+1)}var y=o.w/u,w=o.h/c;if(t.condense&&(y=0,w=0),t.avoidOverlap)for(var m=0;m=u&&(I=0,L++)},M={},P=0;P(r=gt(e,t,m[x],m[x+1],m[x+2],m[x+3])))return v(n,r),!0}else if("bezier"===o.edgeType||"multibezier"===o.edgeType||"self"===o.edgeType||"compound"===o.edgeType)for(m=o.allpts,x=0;x+5(r=dt(e,t,m[x],m[x+1],m[x+2],m[x+3],m[x+4],m[x+5])))return v(n,r),!0;y=y||i.source,w=w||i.target;var E=a.getArrowWidth(c,l),C=[{name:"source",x:o.arrowStartX,y:o.arrowStartY,angle:o.srcArrowAngle},{name:"target",x:o.arrowEndX,y:o.arrowEndY,angle:o.tgtArrowAngle},{name:"mid-source",x:o.midX,y:o.midY,angle:o.midsrcArrowAngle},{name:"mid-target",x:o.midX,y:o.midY,angle:o.midtgtArrowAngle}];for(x=0;x0&&(b(y),b(w))}function w(e,t,n){return Ce(e,t,n)}function m(n,r){var i,o=n._private,a=g;i=r?r+"-":"",n.boundingBox();var s=o.labelBounds[r||"main"],c=n.pstyle(i+"label").value;if("yes"===n.pstyle("text-events").strValue&&c){var u=w(o.rscratch,"labelX",r),l=w(o.rscratch,"labelY",r),h=w(o.rscratch,"labelAngle",r),f=n.pstyle(i+"text-margin-x").pfValue,d=n.pstyle(i+"text-margin-y").pfValue,p=s.x1-a-f,b=s.x2+a-f,y=s.y1-a-d,m=s.y2+a-d;if(h){var x=Math.cos(h),E=Math.sin(h),C=function(e,t){return{x:(e-=u)*x-(t-=l)*E+u,y:e*E+t*x+l}},k=C(p,y),_=C(p,m),N=C(b,y),S=C(b,m),O=[k.x+f,k.y+d,N.x+f,N.y+d,S.x+f,S.y+d,_.x+f,_.y+d];if(pt(e,t,O))return v(n),!0}else if(ct(s,e,t))return v(n),!0}}n&&(c=c.interactive);for(var x=c.length-1;x>=0;x--){var E=c[x];E.isNode()?b(E)||m(E):y(E)||m(E)||m(E,"source")||m(E,"target")}return u},getAllInBox:function(e,t,n,r){for(var i,o,a=this.getCachedZSortedEles().interactive,s=[],c=Math.min(e,n),u=Math.max(e,n),l=Math.min(t,r),h=Math.max(t,r),f=nt({x1:e=c,y1:t=l,x2:n=u,y2:r=h}),d=0;d0?Math.max(e-t,0):Math.min(e+t,0)},S=N(k,E),O=N(_,C),T=!1;"auto"===v?p=Math.abs(S)>Math.abs(O)?i:r:v===c||v===s?(p=r,T=!0):v!==o&&v!==a||(p=i,T=!0);var L,I=p===r,A=I?O:S,M=I?_:k,P=Ze(M),D=!1;T&&(y||m)||!(v===s&&M<0||v===c&&M>0||v===o&&M>0||v===a&&M<0)||(A=(P*=-1)*Math.abs(A),D=!0);var j=function(e){return Math.abs(e)=Math.abs(A)},R=j(L=y?(w<0?1+w:w)*A:(w<0?A:0)+w*P),G=j(Math.abs(A)-Math.abs(L));if(!R&&!G||D)if(I){var B=u.y1+L+(g?h/2*P:0),H=u.x1,F=u.x2;n.segpts=[H,B,F,B]}else{var Y=u.x1+L+(g?l/2*P:0),z=u.y1,V=u.y2;n.segpts=[Y,z,Y,V]}else if(I){var U=Math.abs(M)<=h/2,q=Math.abs(k)<=f/2;if(U){var X=(u.x1+u.x2)/2,W=u.y1,Z=u.y2;n.segpts=[X,W,X,Z]}else if(q){var $=(u.y1+u.y2)/2,K=u.x1,Q=u.x2;n.segpts=[K,$,Q,$]}else n.segpts=[u.x1,u.y2]}else{var J=Math.abs(M)<=l/2,ee=Math.abs(_)<=d/2;if(J){var te=(u.y1+u.y2)/2,ne=u.x1,re=u.x2;n.segpts=[ne,te,re,te]}else if(ee){var ie=(u.x1+u.x2)/2,oe=u.y1,ae=u.y2;n.segpts=[ie,oe,ie,ae]}else n.segpts=[u.x2,u.y1]}},wa.tryToCorrectInvalidPoints=function(e,t){var n=e._private.rscratch;if("bezier"===n.edgeType){var r=t.srcPos,i=t.tgtPos,o=t.srcW,a=t.srcH,s=t.tgtW,c=t.tgtH,u=t.srcShape,l=t.tgtShape,h=!C(n.startX)||!C(n.startY),f=!C(n.arrowStartX)||!C(n.arrowStartY),d=!C(n.endX)||!C(n.endY),g=!C(n.arrowEndX)||!C(n.arrowEndY),p=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,v=$e({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),b=vf.poolIndex()){var d=h;h=f,f=d}var g=s.srcPos=h.position(),p=s.tgtPos=f.position(),v=s.srcW=h.outerWidth(),b=s.srcH=h.outerHeight(),y=s.tgtW=f.outerWidth(),w=s.tgtH=f.outerHeight(),m=s.srcShape=n.nodeShapes[t.getNodeShape(h)],x=s.tgtShape=n.nodeShapes[t.getNodeShape(f)];s.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var E=0;E0){var Y=u,z=Ke(Y,qe(t)),V=Ke(Y,qe(F)),U=z;V2&&Ke(Y,{x:F[2],y:F[3]})0){var ie=l,oe=Ke(ie,qe(t)),ae=Ke(ie,qe(re)),se=oe;ae2&&Ke(ie,{x:re[2],y:re[3]})=u||y){l={cp:p,segment:b};break}}if(l)break}var w=l.cp,m=l.segment,x=(u-f)/m.length,E=m.t1-m.t0,C=s?m.t0+E*x:m.t1-E*x;C=tt(0,C,1),t=et(w.p0,w.p1,w.p2,C),i=function(e,t,n,r){var i=tt(0,r-.001,1),o=tt(0,r+.001,1),a=et(e,t,n,i),s=et(e,t,n,o);return Na(a,s)}(w.p0,w.p1,w.p2,C);break;case"straight":case"segments":case"haystack":for(var k,_,N,S,O=0,T=r.allpts.length,L=0;L+3=u));L+=2);var I=(u-_)/k;I=tt(0,I,1),t=function(e,t,n,r){var i=t.x-e.x,o=t.y-e.y,a=$e(e,t),s=i/a,c=o/a;return n=null==n?0:n,r=null!=r?r:n*a,{x:e.x+s*r,y:e.y+c*r}}(N,S,I),i=Na(N,S)}a("labelX",n,t.x),a("labelY",n,t.y),a("labelAutoAngle",n,i)}};u("source"),u("target"),this.applyLabelDimensions(e)}},ka.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},ka.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),i=this.calculateLabelDimensions(e,r),o=e.pstyle("line-height").pfValue,a=e.pstyle("text-wrap").strValue,s=Ce(n.rscratch,"labelWrapCachedLines",t)||[],c="wrap"!==a?1:Math.max(s.length,1),u=i.height/c,l=u*o,h=i.width,f=i.height+(c-1)*(o-1)*u;ke(n.rstyle,"labelWidth",t,h),ke(n.rscratch,"labelWidth",t,h),ke(n.rstyle,"labelHeight",t,f),ke(n.rscratch,"labelHeight",t,f),ke(n.rscratch,"labelLineHeight",t,l)},ka.getLabelText=function(e,t){var n=e._private,r=t?t+"-":"",i=e.pstyle(r+"label").strValue,o=e.pstyle("text-transform").value,a=function(e,r){return r?(ke(n.rscratch,e,t,r),r):Ce(n.rscratch,e,t)};if(!i)return"";"none"==o||("uppercase"==o?i=i.toUpperCase():"lowercase"==o&&(i=i.toLowerCase()));var s=e.pstyle("text-wrap").value;if("wrap"===s){var c=a("labelKey");if(null!=c&&a("labelWrapKey")===c)return a("labelWrapCachedText");for(var u=i.split("\n"),l=e.pstyle("text-max-width").pfValue,h="anywhere"===e.pstyle("text-overflow-wrap").value,f=[],d=/[\s\u200b]+/,g=h?"":" ",p=0;pl){for(var w=v.split(d),m="",x=0;xk);S++)_+=i[S],S===i.length-1&&(N=!0);return N||(_+="…"),_}return i},ka.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,n=e.pstyle("text-halign").strValue;if("auto"!==t)return t;if(!e.isNode())return"center";switch(n){case"left":return"right";case"right":return"left";default:return"center"}},ka.calculateLabelDimensions=function(e,t){var n=ne(t,e._private.labelDimsKey),r=this.labelDimCache||(this.labelDimCache=[]),i=r[n];if(null!=i)return i;var o=e.pstyle("font-style").strValue,a=e.pstyle("font-size").pfValue,s=e.pstyle("font-family").strValue,c=e.pstyle("font-weight").strValue,u=this.labelCalcCanvas,l=this.labelCalcCanvasContext;if(!u){u=this.labelCalcCanvas=document.createElement("canvas"),l=this.labelCalcCanvasContext=u.getContext("2d");var h=u.style;h.position="absolute",h.left="-9999px",h.top="-9999px",h.zIndex="-1",h.visibility="hidden",h.pointerEvents="none"}l.font="".concat(o," ").concat(c," ").concat(a,"px ").concat(s);for(var f=0,d=0,g=t.split("\n"),p=0;p1&&void 0!==arguments[1])||arguments[1];if(t.merge(e),n)for(var r=0;r=e.desktopTapThreshold2}var S=r(t);v&&(e.hoverData.tapholdCancelled=!0),i=!0,n(p,["mousemove","vmousemove","tapdrag"],t,{x:l[0],y:l[1]});var O=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||a.emit({originalEvent:t,type:"boxstart",position:{x:l[0],y:l[1]}}),g[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(v){var T={originalEvent:t,type:"cxtdrag",position:{x:l[0],y:l[1]}};y?y.emit(T):a.emit(T),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&p===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:l[0],y:l[1]}}),e.hoverData.cxtOver=p,p&&p.emit({originalEvent:t,type:"cxtdragover",position:{x:l[0],y:l[1]}}))}}else if(e.hoverData.dragging){if(i=!0,a.panningEnabled()&&a.userPanningEnabled()){var L;if(e.hoverData.justStartedPan){var I=e.hoverData.mdownPos;L={x:(l[0]-I[0])*s,y:(l[1]-I[1])*s},e.hoverData.justStartedPan=!1}else L={x:w[0]*s,y:w[1]*s};a.panBy(L),a.emit("dragpan"),e.hoverData.dragged=!0}l=e.projectIntoViewport(t.clientX,t.clientY)}else if(1!=g[4]||null!=y&&!y.pannable()){if(y&&y.pannable()&&y.active()&&y.unactivate(),y&&y.grabbed()||p==b||(b&&n(b,["mouseout","tapdragout"],t,{x:l[0],y:l[1]}),p&&n(p,["mouseover","tapdragover"],t,{x:l[0],y:l[1]}),e.hoverData.last=p),y)if(v){if(a.boxSelectionEnabled()&&S)y&&y.grabbed()&&(h(m),y.emit("freeon"),m.emit("free"),e.dragData.didDrag&&(y.emit("dragfreeon"),m.emit("dragfree"))),O();else if(y&&y.grabbed()&&e.nodeIsDraggable(y)){var A=!e.dragData.didDrag;A&&e.redrawHint("eles",!0),e.dragData.didDrag=!0;var M=a.collection();e.hoverData.draggingEles||u(m,{inDragLayer:!0});var P={x:0,y:0};if(C(w[0])&&C(w[1])&&(P.x+=w[0],P.y+=w[1],A)){var D=e.hoverData.dragDelta;D&&C(D[0])&&C(D[1])&&(P.x+=D[0],P.y+=D[1])}for(var j=0;j0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=u=o.collection()),c!=l||e.dragData.didDrag||e.hoverData.selecting||null!=c&&c._private.selectable&&(e.hoverData.dragging||("additive"===o.selectionType()||f?c.selected()?c.unselect(["tapunselect"]):c.select(["tapselect"]):f||(o.$(t).unmerge(c).unselect(["tapunselect"]),c.select(["tapselect"]))),e.redrawHint("eles",!0)),e.hoverData.selecting){var p=o.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),p.length>0&&e.redrawHint("eles",!0),o.emit({type:"boxend",originalEvent:i,position:{x:a[0],y:a[1]}});"additive"===o.selectionType()||f||o.$(t).unmerge(p).unselect(),p.emit("box").stdFilter((function(e){return e.selectable()&&!e.selected()})).select().emit("boxselect"),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!s[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var v=l&&l.grabbed();h(u),v&&(l.emit("freeon"),u.emit("free"),e.dragData.didDrag&&(l.emit("dragfreeon"),u.emit("dragfree")))}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null}}),!1);var E,k,_,N,S,O,T,L,I,A,M,P,D,j=function(t){if(!e.scrollingPage){var n=e.cy,r=n.zoom(),i=n.pan(),o=e.projectIntoViewport(t.clientX,t.clientY),a=[o[0]*r+i.x,o[1]*r+i.y];if(e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||0!==e.selection[4])t.preventDefault();else if(n.panningEnabled()&&n.userPanningEnabled()&&n.zoomingEnabled()&&n.userZoomingEnabled()){var s;t.preventDefault(),e.data.wheelZooming=!0,clearTimeout(e.data.wheelTimeout),e.data.wheelTimeout=setTimeout((function(){e.data.wheelZooming=!1,e.redrawHint("eles",!0),e.redraw()}),150),s=null!=t.deltaY?t.deltaY/-250:null!=t.wheelDeltaY?t.wheelDeltaY/1e3:t.wheelDelta/1e3,s*=e.wheelSensitivity,1===t.deltaMode&&(s*=33);var c=n.zoom()*Math.pow(10,s);"gesturechange"===t.type&&(c=e.gestureStartZoom*t.scale),n.zoom({level:c,renderedPosition:{x:a[0],y:a[1]}}),n.emit("gesturechange"===t.type?"pinchzoom":"scrollzoom")}}};e.registerBinding(e.container,"wheel",j,!0),e.registerBinding(window,"scroll",(function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout((function(){e.scrollingPage=!1}),250)}),!0),e.registerBinding(e.container,"gesturestart",(function(t){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||t.preventDefault()}),!0),e.registerBinding(e.container,"gesturechange",(function(t){e.hasTouchStarted||j(t)}),!0),e.registerBinding(e.container,"mouseout",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseout",position:{x:n[0],y:n[1]}})}),!1),e.registerBinding(e.container,"mouseover",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseover",position:{x:n[0],y:n[1]}})}),!1);var R,G,B,H,F,Y,z,V=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},U=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",R=function(t){if(e.hasTouchStarted=!0,x(t)){d(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var r=e.cy,i=e.touchData.now,o=e.touchData.earlier;if(t.touches[0]){var a=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);i[0]=a[0],i[1]=a[1]}if(t.touches[1]&&(a=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),i[2]=a[0],i[3]=a[1]),t.touches[2]&&(a=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),i[4]=a[0],i[5]=a[1]),t.touches[1]){e.touchData.singleTouchMoved=!0,h(e.dragData.touchDragEles);var c=e.findContainerClientCoords();I=c[0],A=c[1],M=c[2],P=c[3],E=t.touches[0].clientX-I,k=t.touches[0].clientY-A,_=t.touches[1].clientX-I,N=t.touches[1].clientY-A,D=0<=E&&E<=M&&0<=_&&_<=M&&0<=k&&k<=P&&0<=N&&N<=P;var f=r.pan(),g=r.zoom();if(S=V(E,k,_,N),O=U(E,k,_,N),L=[((T=[(E+_)/2,(k+N)/2])[0]-f.x)/g,(T[1]-f.y)/g],O<4e4&&!t.touches[2]){var p=e.findNearestElement(i[0],i[1],!0,!0),v=e.findNearestElement(i[2],i[3],!0,!0);return p&&p.isNode()?(p.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:i[0],y:i[1]}}),e.touchData.start=p):v&&v.isNode()?(v.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:i[0],y:i[1]}}),e.touchData.start=v):r.emit({originalEvent:t,type:"cxttapstart",position:{x:i[0],y:i[1]}}),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!0,e.touchData.cxtDragged=!1,e.data.bgActivePosistion=void 0,void e.redraw()}}if(t.touches[2])r.boxSelectionEnabled()&&t.preventDefault();else if(t.touches[1]);else if(t.touches[0]){var b=e.findNearestElements(i[0],i[1],!0,!0),y=b[0];if(null!=y&&(y.activate(),e.touchData.start=y,e.touchData.starts=b,e.nodeIsGrabbable(y))){var w=e.dragData.touchDragEles=r.collection(),m=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),y.selected()?(m=r.$((function(t){return t.selected()&&e.nodeIsGrabbable(t)})),u(m,{addToList:w})):l(y,{addToList:w}),s(y);var C=function(e){return{originalEvent:t,type:e,position:{x:i[0],y:i[1]}}};y.emit(C("grabon")),m?m.forEach((function(e){e.emit(C("grab"))})):y.emit(C("grab"))}n(y,["touchstart","tapstart","vmousedown"],t,{x:i[0],y:i[1]}),null==y&&(e.data.bgActivePosistion={x:a[0],y:a[1]},e.redrawHint("select",!0),e.redraw()),e.touchData.singleTouchMoved=!1,e.touchData.singleTouchStartTime=+new Date,clearTimeout(e.touchData.tapholdTimeout),e.touchData.tapholdTimeout=setTimeout((function(){!1!==e.touchData.singleTouchMoved||e.pinching||e.touchData.selecting||n(e.touchData.start,["taphold"],t,{x:i[0],y:i[1]})}),e.tapholdDuration)}if(t.touches.length>=1){for(var j=e.touchData.startPosition=[],R=0;R=e.touchTapThreshold2}if(r&&e.touchData.cxt){t.preventDefault();var m=t.touches[0].clientX-I,T=t.touches[0].clientY-A,M=t.touches[1].clientX-I,P=t.touches[1].clientY-A,j=U(m,T,M,P);if(j/O>=2.25||j>=22500){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var R={originalEvent:t,type:"cxttapend",position:{x:s[0],y:s[1]}};e.touchData.start?(e.touchData.start.unactivate().emit(R),e.touchData.start=null):a.emit(R)}}if(r&&e.touchData.cxt){R={originalEvent:t,type:"cxtdrag",position:{x:s[0],y:s[1]}},e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(R):a.emit(R),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var G=e.findNearestElement(s[0],s[1],!0,!0);e.touchData.cxtOver&&G===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:s[0],y:s[1]}}),e.touchData.cxtOver=G,G&&G.emit({originalEvent:t,type:"cxtdragover",position:{x:s[0],y:s[1]}}))}else if(r&&t.touches[2]&&a.boxSelectionEnabled())t.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||a.emit({originalEvent:t,type:"boxstart",position:{x:s[0],y:s[1]}}),e.touchData.selecting=!0,e.touchData.didSelect=!0,i[4]=1,i&&0!==i.length&&void 0!==i[0]?(i[2]=(s[0]+s[2]+s[4])/3,i[3]=(s[1]+s[3]+s[5])/3):(i[0]=(s[0]+s[2]+s[4])/3,i[1]=(s[1]+s[3]+s[5])/3,i[2]=(s[0]+s[2]+s[4])/3+1,i[3]=(s[1]+s[3]+s[5])/3+1),e.redrawHint("select",!0),e.redraw();else if(r&&t.touches[1]&&!e.touchData.didSelect&&a.zoomingEnabled()&&a.panningEnabled()&&a.userZoomingEnabled()&&a.userPanningEnabled()){if(t.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),ee=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var B=0;B0&&!e.hoverData.draggingEles&&!e.swipePanning&&null!=e.data.bgActivePosistion&&(e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.redraw())}},!1),e.registerBinding(window,"touchcancel",B=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(window,"touchend",H=function(r){var i=e.touchData.start;if(e.touchData.capture){0===r.touches.length&&(e.touchData.capture=!1),r.preventDefault();var o=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var a,s=e.cy,c=s.zoom(),u=e.touchData.now,l=e.touchData.earlier;if(r.touches[0]){var f=e.projectIntoViewport(r.touches[0].clientX,r.touches[0].clientY);u[0]=f[0],u[1]=f[1]}if(r.touches[1]&&(f=e.projectIntoViewport(r.touches[1].clientX,r.touches[1].clientY),u[2]=f[0],u[3]=f[1]),r.touches[2]&&(f=e.projectIntoViewport(r.touches[2].clientX,r.touches[2].clientY),u[4]=f[0],u[5]=f[1]),i&&i.unactivate(),e.touchData.cxt){if(a={originalEvent:r,type:"cxttapend",position:{x:u[0],y:u[1]}},i?i.emit(a):s.emit(a),!e.touchData.cxtDragged){var d={originalEvent:r,type:"cxttap",position:{x:u[0],y:u[1]}};i?i.emit(d):s.emit(d)}return e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,void e.redraw()}if(!r.touches[2]&&s.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var g=s.collection(e.getAllInBox(o[0],o[1],o[2],o[3]));o[0]=void 0,o[1]=void 0,o[2]=void 0,o[3]=void 0,o[4]=0,e.redrawHint("select",!0),s.emit({type:"boxend",originalEvent:r,position:{x:u[0],y:u[1]}}),g.emit("box").stdFilter((function(e){return e.selectable()&&!e.selected()})).select().emit("boxselect"),g.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(null!=i&&i.unactivate(),r.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(r.touches[1]);else if(r.touches[0]);else if(!r.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var p=e.dragData.touchDragEles;if(null!=i){var v=i._private.grabbed;h(p),e.redrawHint("drag",!0),e.redrawHint("eles",!0),v&&(i.emit("freeon"),p.emit("free"),e.dragData.didDrag&&(i.emit("dragfreeon"),p.emit("dragfree"))),n(i,["touchend","tapend","vmouseup","tapdragout"],r,{x:u[0],y:u[1]}),i.unactivate(),e.touchData.start=null}else{var b=e.findNearestElement(u[0],u[1],!0,!0);n(b,["touchend","tapend","vmouseup","tapdragout"],r,{x:u[0],y:u[1]})}var y=e.touchData.startPosition[0]-u[0],w=y*y,m=e.touchData.startPosition[1]-u[1],x=(w+m*m)*c*c;e.touchData.singleTouchMoved||(i||s.$(":selected").unselect(["tapunselect"]),n(i,["tap","vclick"],r,{x:u[0],y:u[1]}),F=!1,r.timeStamp-z<=s.multiClickDebounceTime()?(Y&&clearTimeout(Y),F=!0,z=null,n(i,["dbltap","vdblclick"],r,{x:u[0],y:u[1]})):(Y=setTimeout((function(){F||n(i,["onetap","voneclick"],r,{x:u[0],y:u[1]})}),s.multiClickDebounceTime()),z=r.timeStamp)),null!=i&&!e.dragData.didDrag&&i._private.selectable&&x2){for(var O=[u[0],u[1]],T=Math.pow(O[0]-e,2)+Math.pow(O[1]-t,2),L=1;L0)return p[0]}return null},f=Object.keys(l),d=0;d0?c:lt(i,o,e,t,n,r,a)},checkPoint:function(e,t,n,r,i,o,a){var s=Ot(r,i),c=2*s;if(vt(e,t,this.points,o,a,r,i-c,[0,-1],n))return!0;if(vt(e,t,this.points,o,a,r-c,i,[0,-1],n))return!0;var u=r/2+2*n,l=i/2+2*n;return!!pt(e,t,[o-u,a-l,o-u,a,o+u,a,o+u,a-l])||!!wt(e,t,c,c,o+r/2-s,a+i/2-s,n)||!!wt(e,t,c,c,o-r/2+s,a+i/2-s,n)}}},registerNodeShapes:function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",_t(3,0)),this.generateRoundPolygon("round-triangle",_t(3,0)),this.generatePolygon("rectangle",_t(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",n),this.generateRoundPolygon("round-diamond",n),this.generatePolygon("pentagon",_t(5,0)),this.generateRoundPolygon("round-pentagon",_t(5,0)),this.generatePolygon("hexagon",_t(6,0)),this.generateRoundPolygon("round-hexagon",_t(6,0)),this.generatePolygon("heptagon",_t(7,0)),this.generateRoundPolygon("round-heptagon",_t(7,0)),this.generatePolygon("octagon",_t(8,0)),this.generateRoundPolygon("round-octagon",_t(8,0));var r=new Array(20),i=St(5,0),o=St(5,Math.PI/5),a=.5*(3-Math.sqrt(5));a*=1.57;for(var s=0;s=e.deqFastCost*p)break}else if(i){if(d>=e.deqCost*c||d>=e.deqAvgCost*s)break}else if(g>=e.deqNoDrawCost*Ga)break;var v=e.deq(t,h,l);if(!(v.length>0))break;for(var b=0;b0&&(e.onDeqd(t,u),!i&&e.shouldRedraw(t,u,h,l)&&r())}),o(t))}}},Ha=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:le;s(this,e),this.idsByKey=new _e,this.keyForId=new _e,this.cachesByLvl=new _e,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=n}return u(e,[{key:"getIdsFor",value:function(e){null==e&&de("Can not get id list for null key");var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new Se,t.set(e,n)),n}},{key:"addIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).add(t)}},{key:"deleteIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).delete(t)}},{key:"getNumberOfIdsForKey",value:function(e){return null==e?0:this.getIdsFor(e).size}},{key:"updateKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t),r=this.getKey(e);this.deleteIdForKey(n,t),this.addIdForKey(r,t),this.keyForId.set(t,r)}},{key:"deleteKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteIdForKey(n,t),this.keyForId.delete(t)}},{key:"keyHasChangedFor",value:function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)}},{key:"isInvalid",value:function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)}},{key:"getCachesAt",value:function(e){var t=this.cachesByLvl,n=this.lvls,r=t.get(e);return r||(r=new _e,t.set(e,r),n.push(e)),r}},{key:"getCache",value:function(e,t){return this.getCachesAt(t).get(e)}},{key:"get",value:function(e,t){var n=this.getKey(e),r=this.getCache(n,t);return null!=r&&this.updateKeyMappingFor(e),r}},{key:"getForCachedKey",value:function(e,t){var n=this.keyForId.get(e.id());return this.getCache(n,t)}},{key:"hasCache",value:function(e,t){return this.getCachesAt(t).has(e)}},{key:"has",value:function(e,t){var n=this.getKey(e);return this.hasCache(n,t)}},{key:"setCache",value:function(e,t,n){n.key=e,this.getCachesAt(t).set(e,n)}},{key:"set",value:function(e,t,n){var r=this.getKey(e);this.setCache(r,t,n),this.updateKeyMappingFor(e)}},{key:"deleteCache",value:function(e,t){this.getCachesAt(t).delete(e)}},{key:"delete",value:function(e,t){var n=this.getKey(e);this.deleteCache(n,t)}},{key:"invalidateKey",value:function(e){var t=this;this.lvls.forEach((function(n){return t.deleteCache(e,n)}))}},{key:"invalidate",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteKeyMappingFor(e);var r=this.doesEleInvalidateKey(e);return r&&this.invalidateKey(n),r||0===this.getNumberOfIdsForKey(n)}}]),e}(),Fa={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},Ya=me({getKey:null,doesEleInvalidateKey:le,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:ue,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),za=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var r=Ya(t);B(n,r),n.lookup=new Ha(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},Va=za.prototype;Va.reasons=Fa,Va.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},Va.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},Va.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new o((function(e,t){return t.reqs-e.reqs}))},Va.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},Va.getElement=function(e,t,n,r,i){var o=this,a=this.renderer,s=a.cy.zoom(),c=this.lookup;if(!t||0===t.w||0===t.h||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed())return null;if(!o.allowEdgeTxrCaching&&e.isEdge()||!o.allowParentTxrCaching&&e.isParent())return null;if(null==r&&(r=Math.ceil(We(s*n))),r<-4)r=-4;else if(s>=7.99||r>3)return null;var u=Math.pow(2,r),l=t.h*u,h=t.w*u,f=a.eleTextBiggerThanMin(e,u);if(!this.isVisible(e,f))return null;var d,g=c.get(e,r);if(g&&g.invalidated&&(g.invalidated=!1,g.texture.invalidatedWidth-=g.width),g)return g;if(d=l<=25?25:l<=50?50:50*Math.ceil(l/50),l>1024||h>1024)return null;var p=o.getTextureQueue(d),v=p[p.length-2],b=function(){return o.recycleTexture(d,h)||o.addTexture(d,h)};v||(v=p[p.length-1]),v||(v=b()),v.width-v.usedWidthr;S--)_=o.getElement(e,t,n,S,Fa.downscale);N()}else{var O;if(!m&&!x&&!E)for(var T=r-1;T>=-4;T--){var L=c.get(e,T);if(L){O=L;break}}if(w(O))return o.queueElement(e,r),O;v.context.translate(v.usedWidth,0),v.context.scale(u,u),this.drawElement(v.context,e,t,f,!1),v.context.scale(1/u,1/u),v.context.translate(-v.usedWidth,0)}return g={x:v.usedWidth,texture:v,level:r,scale:u,width:h,height:l,scaledLabelShown:f},v.usedWidth+=Math.ceil(h+8),v.eleCaches.push(g),c.set(e,r,g),o.checkTextureFullness(v),g},Va.invalidateElements=function(e){for(var t=0;t=.2*e.width&&this.retireTexture(e)},Va.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>.8&&e.fullnessChecks>=10?xe(t,e):e.fullnessChecks++},Va.retireTexture=function(e){var t=e.height,n=this.getTextureQueue(t),r=this.lookup;xe(n,e),e.retired=!0;for(var i=e.eleCaches,o=0;o=t)return o.retired=!1,o.usedWidth=0,o.invalidatedWidth=0,o.fullnessChecks=0,Ee(o.eleCaches),o.context.setTransform(1,0,0,1,0,0),o.context.clearRect(0,0,o.width,o.height),xe(r,o),n.push(o),o}},Va.queueElement=function(e,t){var n=this.getElementQueue(),r=this.getElementKeyToQueue(),i=this.getKey(e),o=r[i];if(o)o.level=Math.max(o.level,t),o.eles.merge(e),o.reqs++,n.updateItem(o);else{var a={eles:e.spawn().merge(e),level:t,reqs:1,key:i};n.push(a),r[i]=a}},Va.dequeue=function(e){for(var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),i=[],o=t.lookup,a=0;a<1&&n.size()>0;a++){var s=n.pop(),c=s.key,u=s.eles[0],l=o.hasCache(u,s.level);if(r[c]=null,!l){i.push(s);var h=t.getBoundingBox(u);t.getElement(u,h,e,s.level,Fa.dequeue)}}return i},Va.removeFromQueue=function(e){var t=this.getElementQueue(),n=this.getElementKeyToQueue(),r=this.getKey(e),i=n[r];null!=i&&(1===i.eles.length?(i.reqs=ce,t.updateItem(i),t.pop(),n[r]=null):i.eles.unmerge(e))},Va.onDequeue=function(e){this.onDequeues.push(e)},Va.offDequeue=function(e){xe(this.onDequeues,e)},Va.setupDequeueing=Ba({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n=3.99||n>2)return null;r.validateLayersElesOrdering(n,e);var a,s,c=r.layersByLevel,u=Math.pow(2,n),l=c[n]=c[n]||[];if(r.levelIsComplete(n,e))return l;!function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return s=c[t],!0},i=function(e){if(!s)for(var r=n+e;-4<=r&&r<=2&&!t(r);r+=e);};i(1),i(-1);for(var o=l.length-1;o>=0;o--){var a=l[o];a.invalid&&xe(l,a)}}();var h=function(t){var i=(t=t||{}).after;if(function(){if(!a){a=nt();for(var t=0;t16e6)return null;var o=r.makeLayer(a,n);if(null!=i){var s=l.indexOf(i)+1;l.splice(s,0,o)}else(void 0===t.insert||t.insert)&&l.unshift(o);return o};if(r.skipping&&!o)return null;for(var f=null,d=e.length/1,g=!o,p=0;p=d||!ut(f.bb,v.boundingBox()))&&!(f=h({insert:!0,after:f})))return null;s||g?r.queueLayer(f,v):r.drawEleInLayer(f,v,n,t),f.eles.push(v),y[n]=f}}return s||(g?null:l)},qa.getEleLevelForLayerLevel=function(e,t){return e},qa.drawEleInLayer=function(e,t,n,r){var i=this.renderer,o=e.context,a=t.boundingBox();0!==a.w&&0!==a.h&&t.visible()&&(n=this.getEleLevelForLayerLevel(n,r),i.setImgSmoothing(o,!1),i.drawCachedElement(o,t,null,null,n,!0),i.setImgSmoothing(o,!0))},qa.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,i=0;i0)return!1;if(o.invalid)return!1;r+=o.eles.length}return r===t.length},qa.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r0){e=!0;break}}return e},qa.invalidateElements=function(e){var t=this;0!==e.length&&(t.lastInvalidationTime=X(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,(function(e,n,r){t.invalidateLayer(e)})))},qa.invalidateLayer=function(e){if(this.lastInvalidationTime=X(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];xe(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var i=0;i3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],a=this,s=t._private.rscratch;if((!o||t.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var c;n&&(c=n,e.translate(-c.x1,-c.y1));var u=o?t.pstyle("opacity").value:1,l=o?t.pstyle("line-opacity").value:1,h=t.pstyle("curve-style").value,f=t.pstyle("line-style").value,d=t.pstyle("width").pfValue,g=t.pstyle("line-cap").value,p=u*l,v=u*l,b=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p;"straight-triangle"===h?(a.eleStrokeStyle(e,t,n),a.drawEdgeTrianglePath(t,e,s.allpts)):(e.lineWidth=d,e.lineCap=g,a.eleStrokeStyle(e,t,n),a.drawEdgePath(t,e,s.allpts,f),e.lineCap="butt")},y=function(){i&&a.drawEdgeOverlay(e,t)},w=function(){i&&a.drawEdgeUnderlay(e,t)},m=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;a.drawArrowheads(e,t,n)},x=function(){a.drawElementText(e,t,null,r)};e.lineJoin="round";var E="yes"===t.pstyle("ghost").value;if(E){var C=t.pstyle("ghost-offset-x").pfValue,k=t.pstyle("ghost-offset-y").pfValue,_=t.pstyle("ghost-opacity").value,N=p*_;e.translate(C,k),b(N),m(N),e.translate(-C,-k)}w(),b(),m(),y(),x(),n&&e.translate(c.x1,c.y1)}}},ls=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n){if(n.visible()){var r=n.pstyle("".concat(e,"-opacity")).value;if(0!==r){var i=this,o=i.usePaths(),a=n._private.rscratch,s=2*n.pstyle("".concat(e,"-padding")).pfValue,c=n.pstyle("".concat(e,"-color")).value;t.lineWidth=s,"self"!==a.edgeType||o?t.lineCap="round":t.lineCap="butt",i.colorStrokeStyle(t,c[0],c[1],c[2],r),i.drawEdgePath(n,t,a.allpts,"solid")}}}};us.drawEdgeOverlay=ls("overlay"),us.drawEdgeUnderlay=ls("underlay"),us.drawEdgePath=function(e,t,n,r){var i,o=e._private.rscratch,a=t,s=!1,c=this.usePaths(),u=e.pstyle("line-dash-pattern").pfValue,l=e.pstyle("line-dash-offset").pfValue;if(c){var h=n.join("$");o.pathCacheKey&&o.pathCacheKey===h?(i=t=o.pathCache,s=!0):(i=t=new Path2D,o.pathCacheKey=h,o.pathCache=i)}if(a.setLineDash)switch(r){case"dotted":a.setLineDash([1,1]);break;case"dashed":a.setLineDash(u),a.lineDashOffset=l;break;case"solid":a.setLineDash([])}if(!s&&!o.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),o.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var f=2;f+35&&void 0!==arguments[5]?arguments[5]:5;e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.quadraticCurveTo(t+r,n,t+r,n+o),e.lineTo(t+r,n+i-o),e.quadraticCurveTo(t+r,n+i,t+r-o,n+i),e.lineTo(t+o,n+i),e.quadraticCurveTo(t,n+i,t,n+i-o),e.lineTo(t,n+o),e.quadraticCurveTo(t,n,t+o,n),e.closePath(),e.fill()}fs.eleTextBiggerThanMin=function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),i=Math.ceil(We(n*r));t=Math.pow(2,i)}return!(e.pstyle("font-size").pfValue*t5&&void 0!==arguments[5])||arguments[5],a=this;if(null==r){if(o&&!a.eleTextBiggerThanMin(t))return}else if(!1===r)return;if(t.isNode()){var s=t.pstyle("label");if(!s||!s.value)return;var c=a.getLabelJustification(t);e.textAlign=c,e.textBaseline="bottom"}else{var u=t.element()._private.rscratch.badLine,l=t.pstyle("label"),h=t.pstyle("source-label"),f=t.pstyle("target-label");if(u||(!l||!l.value)&&(!h||!h.value)&&(!f||!f.value))return;e.textAlign="center",e.textBaseline="bottom"}var d,g=!n;n&&(d=n,e.translate(-d.x1,-d.y1)),null==i?(a.drawText(e,t,null,g,o),t.isEdge()&&(a.drawText(e,t,"source",g,o),a.drawText(e,t,"target",g,o))):a.drawText(e,t,i,g,o),n&&e.translate(d.x1,d.y1)},fs.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n2&&void 0!==arguments[2])||arguments[2],r=t.pstyle("font-style").strValue,i=t.pstyle("font-size").pfValue+"px",o=t.pstyle("font-family").strValue,a=t.pstyle("font-weight").strValue,s=n?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,c=t.pstyle("text-outline-opacity").value*s,u=t.pstyle("color").value,l=t.pstyle("text-outline-color").value;e.font=r+" "+a+" "+i+" "+o,e.lineJoin="round",this.colorFillStyle(e,u[0],u[1],u[2],s),this.colorStrokeStyle(e,l[0],l[1],l[2],c)},fs.getTextAngle=function(e,t){var n=e._private.rscratch,r=t?t+"-":"",i=e.pstyle(r+"text-rotation"),o=Ce(n,"labelAngle",t);return"autorotate"===i.strValue?e.isEdge()?o:0:"none"===i.strValue?0:i.pfValue},fs.drawText=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=t._private,a=o.rscratch,s=i?t.effectiveOpacity():1;if(!i||0!==s&&0!==t.pstyle("text-opacity").value){"main"===n&&(n=null);var c,u,l=Ce(a,"labelX",n),h=Ce(a,"labelY",n),f=this.getLabelText(t,n);if(null!=f&&""!==f&&!isNaN(l)&&!isNaN(h)){this.setupTextStyle(e,t,i);var d,g=n?n+"-":"",p=Ce(a,"labelWidth",n),v=Ce(a,"labelHeight",n),b=t.pstyle(g+"text-margin-x").pfValue,y=t.pstyle(g+"text-margin-y").pfValue,w=t.isEdge(),m=t.pstyle("text-halign").value,x=t.pstyle("text-valign").value;switch(w&&(m="center",x="center"),l+=b,h+=y,0!==(d=r?this.getTextAngle(t,n):0)&&(c=l,u=h,e.translate(c,u),e.rotate(d),l=0,h=0),x){case"top":break;case"center":h+=v/2;break;case"bottom":h+=v}var E=t.pstyle("text-background-opacity").value,C=t.pstyle("text-border-opacity").value,k=t.pstyle("text-border-width").pfValue,_=t.pstyle("text-background-padding").pfValue;if(E>0||k>0&&C>0){var N=l-_;switch(m){case"left":N-=p;break;case"center":N-=p/2}var S=h-v-_,O=p+2*_,T=v+2*_;if(E>0){var L=e.fillStyle,I=t.pstyle("text-background-color").value;e.fillStyle="rgba("+I[0]+","+I[1]+","+I[2]+","+E*s+")";var A=t.pstyle("text-background-shape").strValue;0===A.indexOf("round")?ds(e,N,S,O,T,2):e.fillRect(N,S,O,T),e.fillStyle=L}if(k>0&&C>0){var M=e.strokeStyle,P=e.lineWidth,D=t.pstyle("text-border-color").value,j=t.pstyle("text-border-style").value;if(e.strokeStyle="rgba("+D[0]+","+D[1]+","+D[2]+","+C*s+")",e.lineWidth=k,e.setLineDash)switch(j){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=k/4,e.setLineDash([]);break;case"solid":e.setLineDash([])}if(e.strokeRect(N,S,O,T),"double"===j){var R=k/2;e.strokeRect(N+R,S+R,O-2*R,T-2*R)}e.setLineDash&&e.setLineDash([]),e.lineWidth=P,e.strokeStyle=M}}var G=2*t.pstyle("text-outline-width").pfValue;if(G>0&&(e.lineWidth=G),"wrap"===t.pstyle("text-wrap").value){var B=Ce(a,"labelWrapCachedLines",n),H=Ce(a,"labelLineHeight",n),F=p/2,Y=this.getLabelJustification(t);switch("auto"===Y||("left"===m?"left"===Y?l+=-p:"center"===Y&&(l+=-F):"center"===m?"left"===Y?l+=-F:"right"===Y&&(l+=F):"right"===m&&("center"===Y?l+=F:"right"===Y&&(l+=p))),x){case"top":case"center":case"bottom":h-=(B.length-1)*H}for(var z=0;z0&&e.strokeText(B[z],l,h),e.fillText(B[z],l,h),h+=H}else G>0&&e.strokeText(f,l,h),e.fillText(f,l,h);0!==d&&(e.rotate(-d),e.translate(-c,-u))}}};var gs={drawNode:function(e,t,n){var r,i,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],c=this,u=t._private,l=u.rscratch,h=t.position();if(C(h.x)&&C(h.y)&&(!s||t.visible())){var f,d,g=s?t.effectiveOpacity():1,p=c.usePaths(),v=!1,b=t.padding();r=t.width()+2*b,i=t.height()+2*b,n&&(d=n,e.translate(-d.x1,-d.y1));for(var y=t.pstyle("background-image"),w=y.value,m=new Array(w.length),x=new Array(w.length),E=0,k=0;k0&&void 0!==arguments[0]?arguments[0]:L;c.eleFillStyle(e,t,n)},D=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M;c.colorStrokeStyle(e,I[0],I[1],I[2],t)},j=t.pstyle("shape").strValue,R=t.pstyle("shape-polygon-points").pfValue;if(p){e.translate(h.x,h.y);var G=c.nodePathCache=c.nodePathCache||[],B=re("polygon"===j?j+","+R.join(","):j,""+i,""+r),H=G[B];null!=H?(f=H,v=!0,l.pathCache=f):(f=new Path2D,G[B]=l.pathCache=f)}var F=function(){if(!v){var n=h;p&&(n={x:0,y:0}),c.nodeShapes[c.getNodeShape(t)].draw(f||e,n.x,n.y,r,i)}p?e.fill(f):e.fill()},Y=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=u.backgrounding,o=0,a=0;a0&&void 0!==arguments[0]&&arguments[0],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g;c.hasPie(t)&&(c.drawPie(e,t,o),n&&(p||c.nodeShapes[c.getNodeShape(t)].draw(e,h.x,h.y,r,i)))},V=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,n=(O>0?O:-O)*t,r=O>0?0:255;0!==O&&(c.colorFillStyle(e,r,r,r,n),p?e.fill(f):e.fill())},U=function(){if(T>0){if(e.lineWidth=T,e.lineCap="butt",e.setLineDash)switch(A){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}if(p?e.stroke(f):e.stroke(),"double"===A){e.lineWidth=T/3;var t=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",p?e.stroke(f):e.stroke(),e.globalCompositeOperation=t}e.setLineDash&&e.setLineDash([])}},q=function(){a&&c.drawNodeOverlay(e,t,h,r,i)},X=function(){a&&c.drawNodeUnderlay(e,t,h,r,i)},W=function(){c.drawElementText(e,t,null,o)},Z="yes"===t.pstyle("ghost").value;if(Z){var $=t.pstyle("ghost-offset-x").pfValue,K=t.pstyle("ghost-offset-y").pfValue,Q=t.pstyle("ghost-opacity").value,J=Q*g;e.translate($,K),P(Q*L),F(),Y(J,!0),D(Q*M),U(),z(0!==O||0!==T),Y(J,!1),V(J),e.translate(-$,-K)}p&&e.translate(-h.x,-h.y),X(),p&&e.translate(h.x,h.y),P(),F(),Y(g,!0),D(),U(),z(0!==O||0!==T),Y(g,!1),V(),p&&e.translate(-h.x,-h.y),W(),q(),n&&e.translate(d.x1,d.y1)}}},ps=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n,r,i,o){if(n.visible()){var a=n.pstyle("".concat(e,"-padding")).pfValue,s=n.pstyle("".concat(e,"-opacity")).value,c=n.pstyle("".concat(e,"-color")).value,u=n.pstyle("".concat(e,"-shape")).value;if(s>0){if(r=r||n.position(),null==i||null==o){var l=n.padding();i=n.width()+2*l,o=n.height()+2*l}this.colorFillStyle(t,c[0],c[1],c[2],s),this.nodeShapes[u].draw(t,r.x,r.y,i+2*a,o+2*a),t.fill()}}}};gs.drawNodeOverlay=ps("overlay"),gs.drawNodeUnderlay=ps("underlay"),gs.hasPie=function(e){return(e=e[0])._private.hasPie},gs.drawPie=function(e,t,n,r){t=t[0],r=r||t.position();var i=t.cy().style(),o=t.pstyle("pie-size"),a=r.x,s=r.y,c=t.width(),u=t.height(),l=Math.min(c,u)/2,h=0;this.usePaths()&&(a=0,s=0),"%"===o.units?l*=o.pfValue:void 0!==o.pfValue&&(l=o.pfValue/2);for(var f=1;f<=i.pieBackgroundN;f++){var d=t.pstyle("pie-"+f+"-background-size").value,g=t.pstyle("pie-"+f+"-background-color").value,p=t.pstyle("pie-"+f+"-background-opacity").value*n,v=d/100;v+h>1&&(v=1-h);var b=1.5*Math.PI+2*Math.PI*h,y=b+2*Math.PI*v;0===d||h>=1||h+v>1||(e.beginPath(),e.moveTo(a,s),e.arc(a,s,l,b,y),e.closePath(),this.colorFillStyle(e,g[0],g[1],g[2],p),e.fill(),h+=v)}};for(var vs={getPixelRatio:function(){var e=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var t=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/t},paintCache:function(e){for(var t,n=this.paintCaches=this.paintCaches||[],r=!0,i=0;ia.minMbLowQualFrames&&(a.motionBlurPxRatio=a.mbPxRBlurry)),a.clearingMotionBlur&&(a.motionBlurPxRatio=1),a.textureDrawLastFrame&&!h&&(l[a.NODE]=!0,l[a.SELECT_BOX]=!0);var y=c.style(),w=c.zoom(),m=void 0!==i?i:w,x=c.pan(),E={x:x.x,y:x.y},C={zoom:w,pan:{x:x.x,y:x.y}},k=a.prevViewport;void 0===k||C.zoom!==k.zoom||C.pan.x!==k.pan.x||C.pan.y!==k.pan.y||p&&!g||(a.motionBlurPxRatio=1),o&&(E=o),m*=s,E.x*=s,E.y*=s;var _=a.getCachedZSortedEles();function N(e,t,n,r,i){var o=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",a.colorFillStyle(e,255,255,255,a.motionBlurTransparency),e.fillRect(t,n,r,i),e.globalCompositeOperation=o}function S(e,r){var s,c,l,h;a.clearingMotionBlur||e!==u.bufferContexts[a.MOTIONBLUR_BUFFER_NODE]&&e!==u.bufferContexts[a.MOTIONBLUR_BUFFER_DRAG]?(s=E,c=m,l=a.canvasWidth,h=a.canvasHeight):(s={x:x.x*d,y:x.y*d},c=w*d,l=a.canvasWidth*d,h=a.canvasHeight*d),e.setTransform(1,0,0,1,0,0),"motionBlur"===r?N(e,0,0,l,h):t||void 0!==r&&!r||e.clearRect(0,0,l,h),n||(e.translate(s.x,s.y),e.scale(c,c)),o&&e.translate(o.x,o.y),i&&e.scale(i,i)}if(h||(a.textureDrawLastFrame=!1),h){if(a.textureDrawLastFrame=!0,!a.textureCache){a.textureCache={},a.textureCache.bb=c.mutableElements().boundingBox(),a.textureCache.texture=a.data.bufferCanvases[a.TEXTURE_BUFFER];var O=a.data.bufferContexts[a.TEXTURE_BUFFER];O.setTransform(1,0,0,1,0,0),O.clearRect(0,0,a.canvasWidth*a.textureMult,a.canvasHeight*a.textureMult),a.render({forcedContext:O,drawOnlyNodeLayer:!0,forcedPxRatio:s*a.textureMult}),(C=a.textureCache.viewport={zoom:c.zoom(),pan:c.pan(),width:a.canvasWidth,height:a.canvasHeight}).mpan={x:(0-C.pan.x)/C.zoom,y:(0-C.pan.y)/C.zoom}}l[a.DRAG]=!1,l[a.NODE]=!1;var T=u.contexts[a.NODE],L=a.textureCache.texture;C=a.textureCache.viewport,T.setTransform(1,0,0,1,0,0),f?N(T,0,0,C.width,C.height):T.clearRect(0,0,C.width,C.height);var I=y.core("outside-texture-bg-color").value,A=y.core("outside-texture-bg-opacity").value;a.colorFillStyle(T,I[0],I[1],I[2],A),T.fillRect(0,0,C.width,C.height),w=c.zoom(),S(T,!1),T.clearRect(C.mpan.x,C.mpan.y,C.width/C.zoom/s,C.height/C.zoom/s),T.drawImage(L,C.mpan.x,C.mpan.y,C.width/C.zoom/s,C.height/C.zoom/s)}else a.textureOnViewport&&!t&&(a.textureCache=null);var M=c.extent(),P=a.pinching||a.hoverData.dragging||a.swipePanning||a.data.wheelZooming||a.hoverData.draggingEles||a.cy.animated(),D=a.hideEdgesOnViewport&&P,j=[];if(j[a.NODE]=!l[a.NODE]&&f&&!a.clearedForMotionBlur[a.NODE]||a.clearingMotionBlur,j[a.NODE]&&(a.clearedForMotionBlur[a.NODE]=!0),j[a.DRAG]=!l[a.DRAG]&&f&&!a.clearedForMotionBlur[a.DRAG]||a.clearingMotionBlur,j[a.DRAG]&&(a.clearedForMotionBlur[a.DRAG]=!0),l[a.NODE]||n||r||j[a.NODE]){var R=f&&!j[a.NODE]&&1!==d;S(T=t||(R?a.data.bufferContexts[a.MOTIONBLUR_BUFFER_NODE]:u.contexts[a.NODE]),f&&!R?"motionBlur":void 0),D?a.drawCachedNodes(T,_.nondrag,s,M):a.drawLayeredElements(T,_.nondrag,s,M),a.debug&&a.drawDebugPoints(T,_.nondrag),n||f||(l[a.NODE]=!1)}if(!r&&(l[a.DRAG]||n||j[a.DRAG])&&(R=f&&!j[a.DRAG]&&1!==d,S(T=t||(R?a.data.bufferContexts[a.MOTIONBLUR_BUFFER_DRAG]:u.contexts[a.DRAG]),f&&!R?"motionBlur":void 0),D?a.drawCachedNodes(T,_.drag,s,M):a.drawCachedElements(T,_.drag,s,M),a.debug&&a.drawDebugPoints(T,_.drag),n||f||(l[a.DRAG]=!1)),a.showFps||!r&&l[a.SELECT_BOX]&&!n){if(S(T=t||u.contexts[a.SELECT_BOX]),1==a.selection[4]&&(a.hoverData.selecting||a.touchData.selecting)){w=a.cy.zoom();var G=y.core("selection-box-border-width").value/w;T.lineWidth=G,T.fillStyle="rgba("+y.core("selection-box-color").value[0]+","+y.core("selection-box-color").value[1]+","+y.core("selection-box-color").value[2]+","+y.core("selection-box-opacity").value+")",T.fillRect(a.selection[0],a.selection[1],a.selection[2]-a.selection[0],a.selection[3]-a.selection[1]),G>0&&(T.strokeStyle="rgba("+y.core("selection-box-border-color").value[0]+","+y.core("selection-box-border-color").value[1]+","+y.core("selection-box-border-color").value[2]+","+y.core("selection-box-opacity").value+")",T.strokeRect(a.selection[0],a.selection[1],a.selection[2]-a.selection[0],a.selection[3]-a.selection[1]))}if(u.bgActivePosistion&&!a.hoverData.selecting){w=a.cy.zoom();var B=u.bgActivePosistion;T.fillStyle="rgba("+y.core("active-bg-color").value[0]+","+y.core("active-bg-color").value[1]+","+y.core("active-bg-color").value[2]+","+y.core("active-bg-opacity").value+")",T.beginPath(),T.arc(B.x,B.y,y.core("active-bg-size").pfValue/w,0,2*Math.PI),T.fill()}var H=a.lastRedrawTime;if(a.showFps&&H){H=Math.round(H);var F=Math.round(1e3/H);T.setTransform(1,0,0,1,0,0),T.fillStyle="rgba(255, 0, 0, 0.75)",T.strokeStyle="rgba(255, 0, 0, 0.75)",T.lineWidth=1,T.fillText("1 frame = "+H+" ms = "+F+" fps",0,20),T.strokeRect(0,30,250,20),T.fillRect(0,30,250*Math.min(F/60,1),20)}n||(l[a.SELECT_BOX]=!1)}if(f&&1!==d){var Y=u.contexts[a.NODE],z=a.data.bufferCanvases[a.MOTIONBLUR_BUFFER_NODE],V=u.contexts[a.DRAG],U=a.data.bufferCanvases[a.MOTIONBLUR_BUFFER_DRAG],q=function(e,t,n){e.setTransform(1,0,0,1,0,0),n||!b?e.clearRect(0,0,a.canvasWidth,a.canvasHeight):N(e,0,0,a.canvasWidth,a.canvasHeight);var r=d;e.drawImage(t,0,0,a.canvasWidth*r,a.canvasHeight*r,0,0,a.canvasWidth,a.canvasHeight)};(l[a.NODE]||j[a.NODE])&&(q(Y,z,j[a.NODE]),l[a.NODE]=!1),(l[a.DRAG]||j[a.DRAG])&&(q(V,U,j[a.DRAG]),l[a.DRAG]=!1)}a.prevViewport=C,a.clearingMotionBlur&&(a.clearingMotionBlur=!1,a.motionBlurCleared=!0,a.motionBlur=!0),f&&(a.motionBlurTimeout=setTimeout((function(){a.motionBlurTimeout=null,a.clearedForMotionBlur[a.NODE]=!1,a.clearedForMotionBlur[a.DRAG]=!1,a.motionBlur=!1,a.clearingMotionBlur=!h,a.mbFrames=0,l[a.NODE]=!0,l[a.DRAG]=!0,a.redraw()}),100)),t||c.emit("render")}},bs={drawPolygonPath:function(e,t,n,r,i,o){var a=r/2,s=i/2;e.beginPath&&e.beginPath(),e.moveTo(t+a*o[0],n+s*o[1]);for(var c=1;c0&&o>0){f.clearRect(0,0,i,o),f.globalCompositeOperation="source-over";var d=this.getCachedZSortedEles();if(e.full)f.translate(-n.x1*c,-n.y1*c),f.scale(c,c),this.drawElements(f,d),f.scale(1/c,1/c),f.translate(n.x1*c,n.y1*c);else{var g=t.pan(),p={x:g.x*c,y:g.y*c};c*=t.zoom(),f.translate(p.x,p.y),f.scale(c,c),this.drawElements(f,d),f.scale(1/c,1/c),f.translate(-p.x,-p.y)}e.bg&&(f.globalCompositeOperation="destination-over",f.fillStyle=e.bg,f.rect(0,0,i,o),f.fill())}return h},ks.png=function(e){return Ns(e,this.bufferCanvasImage(e),"image/png")},ks.jpg=function(e){return Ns(e,this.bufferCanvasImage(e),"image/jpeg")};var Ss=Ts,Os=Ts.prototype;function Ts(e){var t=this;t.data={canvases:new Array(Os.CANVAS_LAYERS),contexts:new Array(Os.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Os.CANVAS_LAYERS),bufferCanvases:new Array(Os.BUFFER_COUNT),bufferContexts:new Array(Os.CANVAS_LAYERS)};var n="-webkit-tap-highlight-color",r="rgba(0,0,0,0)";t.data.canvasContainer=document.createElement("div");var i=t.data.canvasContainer.style;t.data.canvasContainer.style[n]=r,i.position="relative",i.zIndex="0",i.overflow="hidden";var o=e.cy.container();o.appendChild(t.data.canvasContainer),o.style[n]=r;var a={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};d&&d.userAgent.match(/msie|trident|edge/i)&&(a["-ms-touch-action"]="none",a["touch-action"]="none");for(var s=0;s{e.exports={graphlib:n(574),layout:n(8123),debug:n(7570),util:{time:n(7266).time,notime:n(7266).notime},version:n(8177)}},2188:(e,t,n)=>{"use strict";var r=n(8436),i=n(4079);e.exports={run:function(e){var t="greedy"===e.graph().acyclicer?i(e,function(e){return function(t){return e.edge(t).weight}}(e)):function(e){var t=[],n={},i={};return r.forEach(e.nodes(),(function o(a){r.has(i,a)||(i[a]=!0,n[a]=!0,r.forEach(e.outEdges(a),(function(e){r.has(n,e.w)?t.push(e):o(e.w)})),delete n[a])})),t}(e);r.forEach(t,(function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r.uniqueId("rev"))}))},undo:function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}}))}}},1133:(e,t,n)=>{var r=n(8436),i=n(7266);function o(e,t,n,r,o,a){var s={width:0,height:0,rank:a,borderType:t},c=o[t][a-1],u=i.addDummyNode(e,"border",s,n);o[t][a]=u,e.setParent(u,r),c&&e.setEdge(c,u,{weight:1})}e.exports=function(e){r.forEach(e.children(),(function t(n){var i=e.children(n),a=e.node(n);if(i.length&&r.forEach(i,t),r.has(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var s=a.minRank,c=a.maxRank+1;s{"use strict";var r=n(8436);function i(e){r.forEach(e.nodes(),(function(t){o(e.node(t))})),r.forEach(e.edges(),(function(t){o(e.edge(t))}))}function o(e){var t=e.width;e.width=e.height,e.height=t}function a(e){e.y=-e.y}function s(e){var t=e.x;e.x=e.y,e.y=t}e.exports={adjust:function(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||i(e)},undo:function(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||function(e){r.forEach(e.nodes(),(function(t){a(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,a),r.has(n,"y")&&a(n)}))}(e),"lr"!==t&&"rl"!==t||(function(e){r.forEach(e.nodes(),(function(t){s(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,s),r.has(n,"x")&&s(n)}))}(e),i(e))}}},7822:e=>{function t(){var e={};e._next=e._prev=e,this._sentinel=e}function n(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function r(e,t){if("_next"!==e&&"_prev"!==e)return t}e.exports=t,t.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return n(t),t},t.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&n(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},t.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,r)),n=n._prev;return"["+e.join(", ")+"]"}},7570:(e,t,n)=>{var r=n(8436),i=n(7266),o=n(574).Graph;e.exports={debugOrdering:function(e){var t=i.buildLayerMatrix(e),n=new o({compound:!0,multigraph:!0}).setGraph({});return r.forEach(e.nodes(),(function(t){n.setNode(t,{label:t}),n.setParent(t,"layer"+e.node(t).rank)})),r.forEach(e.edges(),(function(e){n.setEdge(e.v,e.w,{},e.name)})),r.forEach(t,(function(e,t){var i="layer"+t;n.setNode(i,{rank:"same"}),r.reduce(e,(function(e,t){return n.setEdge(e,t,{style:"invis"}),t}))})),n}}},574:(e,t,n)=>{var r;try{r=n(8282)}catch(e){}r||(r=window.graphlib),e.exports=r},4079:(e,t,n)=>{var r=n(8436),i=n(574).Graph,o=n(7822);e.exports=function(e,t){if(e.nodeCount()<=1)return[];var n=function(e,t){var n=new i,a=0,s=0;r.forEach(e.nodes(),(function(e){n.setNode(e,{v:e,in:0,out:0})})),r.forEach(e.edges(),(function(e){var r=n.edge(e.v,e.w)||0,i=t(e),o=r+i;n.setEdge(e.v,e.w,o),s=Math.max(s,n.node(e.v).out+=i),a=Math.max(a,n.node(e.w).in+=i)}));var u=r.range(s+a+3).map((function(){return new o})),l=a+1;return r.forEach(n.nodes(),(function(e){c(u,l,n.node(e))})),{graph:n,buckets:u,zeroIdx:l}}(e,t||a),u=function(e,t,n){for(var r,i=[],o=t[t.length-1],a=t[0];e.nodeCount();){for(;r=a.dequeue();)s(e,t,n,r);for(;r=o.dequeue();)s(e,t,n,r);if(e.nodeCount())for(var c=t.length-2;c>0;--c)if(r=t[c].dequeue()){i=i.concat(s(e,t,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(u,(function(t){return e.outEdges(t.v,t.w)})),!0)};var a=r.constant(1);function s(e,t,n,i,o){var a=o?[]:void 0;return r.forEach(e.inEdges(i.v),(function(r){var i=e.edge(r),s=e.node(r.v);o&&a.push({v:r.v,w:r.w}),s.out-=i,c(t,n,s)})),r.forEach(e.outEdges(i.v),(function(r){var i=e.edge(r),o=r.w,a=e.node(o);a.in-=i,c(t,n,a)})),e.removeNode(i.v),a}function c(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}},8123:(e,t,n)=>{"use strict";var r=n(8436),i=n(2188),o=n(5995),a=n(8093),s=n(7266).normalizeRanks,c=n(4219),u=n(7266).removeEmptyRanks,l=n(2981),h=n(1133),f=n(3258),d=n(3408),g=n(7873),p=n(7266),v=n(574).Graph;e.exports=function(e,t){var n=t&&t.debugTiming?p.time:p.notime;n("layout",(function(){var t=n(" buildLayoutGraph",(function(){return function(e){var t=new v({multigraph:!0,compound:!0}),n=N(e.graph());return t.setGraph(r.merge({},y,_(n,b),r.pick(n,w))),r.forEach(e.nodes(),(function(n){var i=N(e.node(n));t.setNode(n,r.defaults(_(i,m),x)),t.setParent(n,e.parent(n))})),r.forEach(e.edges(),(function(n){var i=N(e.edge(n));t.setEdge(n,r.merge({},C,_(i,E),r.pick(i,k)))})),t}(e)}));n(" runLayout",(function(){!function(e,t){t(" makeSpaceForEdgeLabels",(function(){!function(e){var t=e.graph();t.ranksep/=2,r.forEach(e.edges(),(function(n){var r=e.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(e)})),t(" removeSelfEdges",(function(){!function(e){r.forEach(e.edges(),(function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}}))}(e)})),t(" acyclic",(function(){i.run(e)})),t(" nestingGraph.run",(function(){l.run(e)})),t(" rank",(function(){a(p.asNonCompoundGraph(e))})),t(" injectEdgeLabelProxies",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),i={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};p.addDummyNode(e,"edge-proxy",i,"_ep")}}))}(e)})),t(" removeEmptyRanks",(function(){u(e)})),t(" nestingGraph.cleanup",(function(){l.cleanup(e)})),t(" normalizeRanks",(function(){s(e)})),t(" assignRankMinMax",(function(){!function(e){var t=0;r.forEach(e.nodes(),(function(n){var i=e.node(n);i.borderTop&&(i.minRank=e.node(i.borderTop).rank,i.maxRank=e.node(i.borderBottom).rank,t=r.max(t,i.maxRank))})),e.graph().maxRank=t}(e)})),t(" removeEdgeLabelProxies",(function(){!function(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))}))}(e)})),t(" normalize.run",(function(){o.run(e)})),t(" parentDummyChains",(function(){c(e)})),t(" addBorderSegments",(function(){h(e)})),t(" order",(function(){d(e)})),t(" insertSelfEdges",(function(){!function(e){var t=p.buildLayerMatrix(e);r.forEach(t,(function(t){var n=0;r.forEach(t,(function(t,i){var o=e.node(t);o.order=i+n,r.forEach(o.selfEdges,(function(t){p.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:o.rank,order:i+ ++n,e:t.e,label:t.label},"_se")})),delete o.selfEdges}))}))}(e)})),t(" adjustCoordinateSystem",(function(){f.adjust(e)})),t(" position",(function(){g(e)})),t(" positionSelfEdges",(function(){!function(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);if("selfedge"===n.dummy){var r=e.node(n.e.v),i=r.x+r.width/2,o=r.y,a=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*a/3,y:o-s},{x:i+5*a/6,y:o-s},{x:i+a,y:o},{x:i+5*a/6,y:o+s},{x:i+2*a/3,y:o+s}],n.label.x=n.x,n.label.y=n.y}}))}(e)})),t(" removeBorderNodes",(function(){!function(e){r.forEach(e.nodes(),(function(t){if(e.children(t).length){var n=e.node(t),i=e.node(n.borderTop),o=e.node(n.borderBottom),a=e.node(r.last(n.borderLeft)),s=e.node(r.last(n.borderRight));n.width=Math.abs(s.x-a.x),n.height=Math.abs(o.y-i.y),n.x=a.x+n.width/2,n.y=i.y+n.height/2}})),r.forEach(e.nodes(),(function(t){"border"===e.node(t).dummy&&e.removeNode(t)}))}(e)})),t(" normalize.undo",(function(){o.undo(e)})),t(" fixupEdgeLabelCoords",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(e)})),t(" undoCoordinateSystem",(function(){f.undo(e)})),t(" translateGraph",(function(){!function(e){var t=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,o=0,a=e.graph(),s=a.marginx||0,c=a.marginy||0;function u(e){var r=e.x,a=e.y,s=e.width,c=e.height;t=Math.min(t,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,a-c/2),o=Math.max(o,a+c/2)}r.forEach(e.nodes(),(function(t){u(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.has(n,"x")&&u(n)})),t-=s,i-=c,r.forEach(e.nodes(),(function(n){var r=e.node(n);r.x-=t,r.y-=i})),r.forEach(e.edges(),(function(n){var o=e.edge(n);r.forEach(o.points,(function(e){e.x-=t,e.y-=i})),r.has(o,"x")&&(o.x-=t),r.has(o,"y")&&(o.y-=i)})),a.width=n-t+s,a.height=o-i+c}(e)})),t(" assignNodeIntersects",(function(){!function(e){r.forEach(e.edges(),(function(t){var n,r,i=e.edge(t),o=e.node(t.v),a=e.node(t.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=a,r=o),i.points.unshift(p.intersectRect(o,n)),i.points.push(p.intersectRect(a,r))}))}(e)})),t(" reversePoints",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);n.reversed&&n.points.reverse()}))}(e)})),t(" acyclic.undo",(function(){i.undo(e)}))}(t,n)})),n(" updateInputGraph",(function(){!function(e,t){r.forEach(e.nodes(),(function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(e.edges(),(function(n){var i=e.edge(n),o=t.edge(n);i.points=o.points,r.has(o,"x")&&(i.x=o.x,i.y=o.y)})),e.graph().width=t.graph().width,e.graph().height=t.graph().height}(e,t)}))}))};var b=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},w=["acyclicer","ranker","rankdir","align"],m=["width","height"],x={width:0,height:0},E=["minlen","weight","width","height","labeloffset"],C={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},k=["labelpos"];function _(e,t){return r.mapValues(r.pick(e,t),Number)}function N(e){var t={};return r.forEach(e,(function(e,n){t[n.toLowerCase()]=e})),t}},8436:(e,t,n)=>{var r;try{r={cloneDeep:n(361),constant:n(5703),defaults:n(1747),each:n(6073),filter:n(3105),find:n(3311),flatten:n(5564),forEach:n(4486),forIn:n(2620),has:n(8721),isUndefined:n(2353),last:n(928),map:n(5161),mapValues:n(6604),max:n(6162),merge:n(3857),min:n(3632),minBy:n(2762),now:n(7771),pick:n(9722),range:n(6026),reduce:n(4061),sortBy:n(9734),uniqueId:n(3955),values:n(2628),zipObject:n(7287)}}catch(e){}r||(r=window._),e.exports=r},2981:(e,t,n)=>{var r=n(8436),i=n(7266);function o(e,t,n,a,s,c,u){var l=e.children(u);if(l.length){var h=i.addBorderNode(e,"_bt"),f=i.addBorderNode(e,"_bb"),d=e.node(u);e.setParent(h,u),d.borderTop=h,e.setParent(f,u),d.borderBottom=f,r.forEach(l,(function(r){o(e,t,n,a,s,c,r);var i=e.node(r),l=i.borderTop?i.borderTop:r,d=i.borderBottom?i.borderBottom:r,g=i.borderTop?a:2*a,p=l!==d?1:s-c[u]+1;e.setEdge(h,l,{weight:g,minlen:p,nestingEdge:!0}),e.setEdge(d,f,{weight:g,minlen:p,nestingEdge:!0})})),e.parent(u)||e.setEdge(t,h,{weight:0,minlen:s+c[u]})}else u!==t&&e.setEdge(t,u,{weight:0,minlen:n})}e.exports={run:function(e){var t=i.addDummyNode(e,"root",{},"_root"),n=function(e){var t={};function n(i,o){var a=e.children(i);a&&a.length&&r.forEach(a,(function(e){n(e,o+1)})),t[i]=o}return r.forEach(e.children(),(function(e){n(e,1)})),t}(e),a=r.max(r.values(n))-1,s=2*a+1;e.graph().nestingRoot=t,r.forEach(e.edges(),(function(t){e.edge(t).minlen*=s}));var c=function(e){return r.reduce(e.edges(),(function(t,n){return t+e.edge(n).weight}),0)}(e)+1;r.forEach(e.children(),(function(r){o(e,t,s,c,a,n,r)})),e.graph().nodeRankFactor=s},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,r.forEach(e.edges(),(function(t){e.edge(t).nestingEdge&&e.removeEdge(t)}))}}},5995:(e,t,n)=>{"use strict";var r=n(8436),i=n(7266);e.exports={run:function(e){e.graph().dummyChains=[],r.forEach(e.edges(),(function(t){!function(e,t){var n,r,o,a=t.v,s=e.node(a).rank,c=t.w,u=e.node(c).rank,l=t.name,h=e.edge(t),f=h.labelRank;if(u!==s+1){for(e.removeEdge(t),o=0,++s;s{var r=n(8436);e.exports=function(e,t,n){var i,o={};r.forEach(n,(function(n){for(var r,a,s=e.parent(n);s;){if((r=e.parent(s))?(a=o[r],o[r]=s):(a=i,i=s),a&&a!==s)return void t.setEdge(a,s);s=r}}))}},5439:(e,t,n)=>{var r=n(8436);e.exports=function(e,t){return r.map(t,(function(t){var n=e.inEdges(t);if(n.length){var i=r.reduce(n,(function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}}),{sum:0,weight:0});return{v:t,barycenter:i.sum/i.weight,weight:i.weight}}return{v:t}}))}},3128:(e,t,n)=>{var r=n(8436),i=n(574).Graph;e.exports=function(e,t,n){var o=function(e){for(var t;e.hasNode(t=r.uniqueId("_root")););return t}(e),a=new i({compound:!0}).setGraph({root:o}).setDefaultNodeLabel((function(t){return e.node(t)}));return r.forEach(e.nodes(),(function(i){var s=e.node(i),c=e.parent(i);(s.rank===t||s.minRank<=t&&t<=s.maxRank)&&(a.setNode(i),a.setParent(i,c||o),r.forEach(e[n](i),(function(t){var n=t.v===i?t.w:t.v,o=a.edge(n,i),s=r.isUndefined(o)?0:o.weight;a.setEdge(n,i,{weight:e.edge(t).weight+s})})),r.has(s,"minRank")&&a.setNode(i,{borderLeft:s.borderLeft[t],borderRight:s.borderRight[t]}))})),a}},6630:(e,t,n)=>{"use strict";var r=n(8436);function i(e,t,n){for(var i=r.zipObject(n,r.map(n,(function(e,t){return t}))),o=r.flatten(r.map(t,(function(t){return r.sortBy(r.map(e.outEdges(t),(function(t){return{pos:i[t.w],weight:e.edge(t).weight}})),"pos")})),!0),a=1;a0;)t%2&&(n+=c[t+1]),c[t=t-1>>1]+=e.weight;u+=e.weight*n}))),u}e.exports=function(e,t){for(var n=0,r=1;r{"use strict";var r=n(8436),i=n(2588),o=n(6630),a=n(1026),s=n(3128),c=n(5093),u=n(574).Graph,l=n(7266);function h(e,t,n){return r.map(t,(function(t){return s(e,t,n)}))}function f(e,t){var n=new u;r.forEach(e,(function(e){var i=e.graph().root,o=a(e,i,n,t);r.forEach(o.vs,(function(t,n){e.node(t).order=n})),c(e,n,o.vs)}))}function d(e,t){r.forEach(t,(function(t){r.forEach(t,(function(t,n){e.node(t).order=n}))}))}e.exports=function(e){var t=l.maxRank(e),n=h(e,r.range(1,t+1),"inEdges"),a=h(e,r.range(t-1,-1,-1),"outEdges"),s=i(e);d(e,s);for(var c,u=Number.POSITIVE_INFINITY,g=0,p=0;p<4;++g,++p){f(g%2?n:a,g%4>=2),s=l.buildLayerMatrix(e);var v=o(e,s);v{"use strict";var r=n(8436);e.exports=function(e){var t={},n=r.filter(e.nodes(),(function(t){return!e.children(t).length})),i=r.max(r.map(n,(function(t){return e.node(t).rank}))),o=r.map(r.range(i+1),(function(){return[]})),a=r.sortBy(n,(function(t){return e.node(t).rank}));return r.forEach(a,(function n(i){if(!r.has(t,i)){t[i]=!0;var a=e.node(i);o[a.rank].push(i),r.forEach(e.successors(i),n)}})),o}},9567:(e,t,n)=>{"use strict";var r=n(8436);e.exports=function(e,t){var n={};return r.forEach(e,(function(e,t){var i=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};r.isUndefined(e.barycenter)||(i.barycenter=e.barycenter,i.weight=e.weight)})),r.forEach(t.edges(),(function(e){var t=n[e.v],i=n[e.w];r.isUndefined(t)||r.isUndefined(i)||(i.indegree++,t.out.push(n[e.w]))})),function(e){var t=[];function n(e){return function(t){var n,i,o,a;t.merged||(r.isUndefined(t.barycenter)||r.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&(i=t,o=0,a=0,(n=e).weight&&(o+=n.barycenter*n.weight,a+=n.weight),i.weight&&(o+=i.barycenter*i.weight,a+=i.weight),n.vs=i.vs.concat(n.vs),n.barycenter=o/a,n.weight=a,n.i=Math.min(i.i,n.i),i.merged=!0)}}function i(t){return function(n){n.in.push(t),0==--n.indegree&&e.push(n)}}for(;e.length;){var o=e.pop();t.push(o),r.forEach(o.in.reverse(),n(o)),r.forEach(o.out,i(o))}return r.map(r.filter(t,(function(e){return!e.merged})),(function(e){return r.pick(e,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(e){return!e.indegree})))}},1026:(e,t,n)=>{var r=n(8436),i=n(5439),o=n(9567),a=n(7304);e.exports=function e(t,n,s,c){var u=t.children(n),l=t.node(n),h=l?l.borderLeft:void 0,f=l?l.borderRight:void 0,d={};h&&(u=r.filter(u,(function(e){return e!==h&&e!==f})));var g=i(t,u);r.forEach(g,(function(n){if(t.children(n.v).length){var i=e(t,n.v,s,c);d[n.v]=i,r.has(i,"barycenter")&&(o=n,a=i,r.isUndefined(o.barycenter)?(o.barycenter=a.barycenter,o.weight=a.weight):(o.barycenter=(o.barycenter*o.weight+a.barycenter*a.weight)/(o.weight+a.weight),o.weight+=a.weight))}var o,a}));var p=o(g,s);!function(e,t){r.forEach(e,(function(e){e.vs=r.flatten(e.vs.map((function(e){return t[e]?t[e].vs:e})),!0)}))}(p,d);var v=a(p,c);if(h&&(v.vs=r.flatten([h,v.vs,f],!0),t.predecessors(h).length)){var b=t.node(t.predecessors(h)[0]),y=t.node(t.predecessors(f)[0]);r.has(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+b.order+y.order)/(v.weight+2),v.weight+=2}return v}},7304:(e,t,n)=>{var r=n(8436),i=n(7266);function o(e,t,n){for(var i;t.length&&(i=r.last(t)).i<=n;)t.pop(),e.push(i.vs),n++;return n}e.exports=function(e,t){var n,a=i.partition(e,(function(e){return r.has(e,"barycenter")})),s=a.lhs,c=r.sortBy(a.rhs,(function(e){return-e.i})),u=[],l=0,h=0,f=0;s.sort((n=!!t,function(e,t){return e.barycentert.barycenter?1:n?t.i-e.i:e.i-t.i})),f=o(u,c,f),r.forEach(s,(function(e){f+=e.vs.length,u.push(e.vs),l+=e.barycenter*e.weight,h+=e.weight,f=o(u,c,f)}));var d={vs:r.flatten(u,!0)};return h&&(d.barycenter=l/h,d.weight=h),d}},4219:(e,t,n)=>{var r=n(8436);e.exports=function(e){var t=function(e){var t={},n=0;return r.forEach(e.children(),(function i(o){var a=n;r.forEach(e.children(o),i),t[o]={low:a,lim:n++}})),t}(e);r.forEach(e.graph().dummyChains,(function(n){for(var r=e.node(n),i=r.edgeObj,o=function(e,t,n,r){var i,o,a=[],s=[],c=Math.min(t[n].low,t[r].low),u=Math.max(t[n].lim,t[r].lim);i=n;do{i=e.parent(i),a.push(i)}while(i&&(t[i].low>c||u>t[i].lim));for(o=i,i=r;(i=e.parent(i))!==o;)s.push(i);return{path:a.concat(s.reverse()),lca:o}}(e,t,i.v,i.w),a=o.path,s=o.lca,c=0,u=a[c],l=!0;n!==i.w;){if(r=e.node(n),l){for(;(u=a[c])!==s&&e.node(u).maxRank{"use strict";var r=n(8436),i=n(574).Graph,o=n(7266);function a(e,t){var n={};return r.reduce(t,(function(t,i){var o=0,a=0,s=t.length,u=r.last(i);return r.forEach(i,(function(t,l){var h=function(e,t){if(e.node(t).dummy)return r.find(e.predecessors(t),(function(t){return e.node(t).dummy}))}(e,t),f=h?e.node(h).order:s;(h||t===u)&&(r.forEach(i.slice(a,l+1),(function(t){r.forEach(e.predecessors(t),(function(r){var i=e.node(r),a=i.order;!(as)&&c(n,t,u)}))}))}return r.reduce(t,(function(t,n){var o,a=-1,s=0;return r.forEach(n,(function(r,c){if("border"===e.node(r).dummy){var u=e.predecessors(r);u.length&&(o=e.node(u[0]).order,i(n,s,c,a,o),s=c,a=o)}i(n,s,n.length,o,t.length)})),n})),n}function c(e,t,n){if(t>n){var r=t;t=n,n=r}var i=e[t];i||(e[t]=i={}),i[n]=!0}function u(e,t,n){if(t>n){var i=t;t=n,n=i}return r.has(e[t],n)}function l(e,t,n,i){var o={},a={},s={};return r.forEach(t,(function(e){r.forEach(e,(function(e,t){o[e]=e,a[e]=e,s[e]=t}))})),r.forEach(t,(function(e){var t=-1;r.forEach(e,(function(e){var c=i(e);if(c.length){c=r.sortBy(c,(function(e){return s[e]}));for(var l=(c.length-1)/2,h=Math.floor(l),f=Math.ceil(l);h<=f;++h){var d=c[h];a[e]===e&&t{"use strict";var r=n(8436),i=n(7266),o=n(3573).positionX;e.exports=function(e){(function(e){var t=i.buildLayerMatrix(e),n=e.graph().ranksep,o=0;r.forEach(t,(function(t){var i=r.max(r.map(t,(function(t){return e.node(t).height})));r.forEach(t,(function(t){e.node(t).y=o+i/2})),o+=i+n}))})(e=i.asNonCompoundGraph(e)),r.forEach(o(e),(function(t,n){e.node(n).x=t}))}},300:(e,t,n)=>{"use strict";var r=n(8436),i=n(574).Graph,o=n(6681).slack;function a(e,t){return r.forEach(e.nodes(),(function n(i){r.forEach(t.nodeEdges(i),(function(r){var a=r.v,s=i===a?r.w:a;e.hasNode(s)||o(t,r)||(e.setNode(s,{}),e.setEdge(i,s,{}),n(s))}))})),e.nodeCount()}function s(e,t){return r.minBy(t.edges(),(function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return o(t,n)}))}function c(e,t,n){r.forEach(e.nodes(),(function(e){t.node(e).rank+=n}))}e.exports=function(e){var t,n,r=new i({directed:!1}),u=e.nodes()[0],l=e.nodeCount();for(r.setNode(u,{});a(r,e){"use strict";var r=n(6681).longestPath,i=n(300),o=n(2472);e.exports=function(e){switch(e.graph().ranker){case"network-simplex":default:!function(e){o(e)}(e);break;case"tight-tree":!function(e){r(e),i(e)}(e);break;case"longest-path":a(e)}};var a=r},2472:(e,t,n)=>{"use strict";var r=n(8436),i=n(300),o=n(6681).slack,a=n(6681).longestPath,s=n(574).alg.preorder,c=n(574).alg.postorder,u=n(7266).simplify;function l(e){e=u(e),a(e);var t,n=i(e);for(d(n),h(n,e);t=p(n);)b(n,e,t,v(n,e,t))}function h(e,t){var n=c(e,e.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=f(e,t,n)}(e,t,n)}))}function f(e,t,n){var i=e.node(n).parent,o=!0,a=t.edge(n,i),s=0;return a||(o=!1,a=t.edge(i,n)),s=a.weight,r.forEach(t.nodeEdges(n),(function(r){var a,c,u=r.v===n,l=u?r.w:r.v;if(l!==i){var h=u===o,f=t.edge(r).weight;if(s+=h?f:-f,a=n,c=l,e.hasEdge(a,c)){var d=e.edge(n,l).cutvalue;s+=h?-d:d}}})),s}function d(e,t){arguments.length<2&&(t=e.nodes()[0]),g(e,{},1,t)}function g(e,t,n,i,o){var a=n,s=e.node(i);return t[i]=!0,r.forEach(e.neighbors(i),(function(o){r.has(t,o)||(n=g(e,t,n,o,i))})),s.low=a,s.lim=n++,o?s.parent=o:delete s.parent,n}function p(e){return r.find(e.edges(),(function(t){return e.edge(t).cutvalue<0}))}function v(e,t,n){var i=n.v,a=n.w;t.hasEdge(i,a)||(i=n.w,a=n.v);var s=e.node(i),c=e.node(a),u=s,l=!1;s.lim>c.lim&&(u=c,l=!0);var h=r.filter(t.edges(),(function(t){return l===y(0,e.node(t.v),u)&&l!==y(0,e.node(t.w),u)}));return r.minBy(h,(function(e){return o(t,e)}))}function b(e,t,n,i){var o=n.v,a=n.w;e.removeEdge(o,a),e.setEdge(i.v,i.w,{}),d(e),h(e,t),function(e,t){var n=r.find(e.nodes(),(function(e){return!t.node(e).parent})),i=s(e,n);i=i.slice(1),r.forEach(i,(function(n){var r=e.node(n).parent,i=t.edge(n,r),o=!1;i||(i=t.edge(r,n),o=!0),t.node(n).rank=t.node(r).rank+(o?i.minlen:-i.minlen)}))}(e,t)}function y(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}e.exports=l,l.initLowLimValues=d,l.initCutValues=h,l.calcCutValue=f,l.leaveEdge=p,l.enterEdge=v,l.exchangeEdges=b},6681:(e,t,n)=>{"use strict";var r=n(8436);e.exports={longestPath:function(e){var t={};r.forEach(e.sources(),(function n(i){var o=e.node(i);if(r.has(t,i))return o.rank;t[i]=!0;var a=r.min(r.map(e.outEdges(i),(function(t){return n(t.w)-e.edge(t).minlen})));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),o.rank=a}))},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}},7266:(e,t,n)=>{"use strict";var r=n(8436),i=n(574).Graph;function o(e,t,n,i){var o;do{o=r.uniqueId(i)}while(e.hasNode(o));return n.dummy=t,e.setNode(o,n),o}function a(e){return r.max(r.map(e.nodes(),(function(t){var n=e.node(t).rank;if(!r.isUndefined(n))return n})))}e.exports={addDummyNode:o,simplify:function(e){var t=(new i).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),t},asNonCompoundGraph:function(e){var t=new i({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){e.children(n).length||t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){t.setEdge(n,e.edge(n))})),t},successorWeights:function(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.outEdges(t),(function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.inEdges(t),(function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)},intersectRect:function(e,t){var n,r,i=e.x,o=e.y,a=t.x-i,s=t.y-o,c=e.width/2,u=e.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*c>Math.abs(a)*u?(s<0&&(u=-u),n=u*a/s,r=u):(a<0&&(c=-c),n=c,r=c*s/a),{x:i+n,y:o+r}},buildLayerMatrix:function(e){var t=r.map(r.range(a(e)+1),(function(){return[]}));return r.forEach(e.nodes(),(function(n){var i=e.node(n),o=i.rank;r.isUndefined(o)||(t[o][i.order]=n)})),t},normalizeRanks:function(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank})));r.forEach(e.nodes(),(function(n){var i=e.node(n);r.has(i,"rank")&&(i.rank-=t)}))},removeEmptyRanks:function(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank}))),n=[];r.forEach(e.nodes(),(function(r){var i=e.node(r).rank-t;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,o=e.graph().nodeRankFactor;r.forEach(n,(function(t,n){r.isUndefined(t)&&n%o!=0?--i:i&&r.forEach(t,(function(t){e.node(t).rank+=i}))}))},addBorderNode:function(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),o(e,"border",i,t)},maxRank:a,partition:function(e,t){var n={lhs:[],rhs:[]};return r.forEach(e,(function(e){t(e)?n.lhs.push(e):n.rhs.push(e)})),n},time:function(e,t){var n=r.now();try{return t()}finally{console.log(e+" time: "+(r.now()-n)+"ms")}},notime:function(e,t){return t()}}},8177:e=>{e.exports="0.8.5"},8282:(e,t,n)=>{var r=n(2354);e.exports={Graph:r.Graph,json:n(8974),alg:n(2440),version:r.version}},2842:(e,t,n)=>{var r=n(9126);e.exports=function(e){var t,n={},i=[];function o(i){r.has(n,i)||(n[i]=!0,t.push(i),r.each(e.successors(i),o),r.each(e.predecessors(i),o))}return r.each(e.nodes(),(function(e){t=[],o(e),t.length&&i.push(t)})),i}},3984:(e,t,n)=>{var r=n(9126);function i(e,t,n,o,a,s){r.has(o,t)||(o[t]=!0,n||s.push(t),r.each(a(t),(function(t){i(e,t,n,o,a,s)})),n&&s.push(t))}e.exports=function(e,t,n){r.isArray(t)||(t=[t]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],s={};return r.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);i(e,t,"post"===n,s,o,a)})),a}},4847:(e,t,n)=>{var r=n(3763),i=n(9126);e.exports=function(e,t,n){return i.transform(e.nodes(),(function(i,o){i[o]=r(e,o,t,n)}),{})}},3763:(e,t,n)=>{var r=n(9126),i=n(9675);e.exports=function(e,t,n,r){return function(e,t,n,r){var o,a,s={},c=new i,u=function(e){var t=e.v!==o?e.v:e.w,r=s[t],i=n(e),u=a.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+i);u0&&(o=c.removeMin(),(a=s[o]).distance!==Number.POSITIVE_INFINITY);)r(o).forEach(u);return s}(e,String(t),n||o,r||function(t){return e.outEdges(t)})};var o=r.constant(1)},9096:(e,t,n)=>{var r=n(9126),i=n(5023);e.exports=function(e){return r.filter(i(e),(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))}},8924:(e,t,n)=>{var r=n(9126);e.exports=function(e,t,n){return function(e,t,n){var r={},i=e.nodes();return i.forEach((function(e){r[e]={},r[e][e]={distance:0},i.forEach((function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})})),n(e).forEach((function(n){var i=n.v===e?n.w:n.v,o=t(n);r[e][i]={distance:o,predecessor:e}}))})),i.forEach((function(e){var t=r[e];i.forEach((function(n){var o=r[n];i.forEach((function(n){var r=o[e],i=t[n],a=o[n],s=r.distance+i.distance;s{e.exports={components:n(2842),dijkstra:n(3763),dijkstraAll:n(4847),findCycles:n(9096),floydWarshall:n(8924),isAcyclic:n(2707),postorder:n(8828),preorder:n(2648),prim:n(514),tarjan:n(5023),topsort:n(2166)}},2707:(e,t,n)=>{var r=n(2166);e.exports=function(e){try{r(e)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}},8828:(e,t,n)=>{var r=n(3984);e.exports=function(e,t){return r(e,t,"post")}},2648:(e,t,n)=>{var r=n(3984);e.exports=function(e,t){return r(e,t,"pre")}},514:(e,t,n)=>{var r=n(9126),i=n(771),o=n(9675);e.exports=function(e,t){var n,a=new i,s={},c=new o;function u(e){var r=e.v===n?e.w:e.v,i=c.priority(r);if(void 0!==i){var o=t(e);o0;){if(n=c.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(l)throw new Error("Input graph is not connected: "+e);l=!0}e.nodeEdges(n).forEach(u)}return a}},5023:(e,t,n)=>{var r=n(9126);e.exports=function(e){var t=0,n=[],i={},o=[];function a(s){var c=i[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach((function(e){r.has(i,e)?i[e].onStack&&(c.lowlink=Math.min(c.lowlink,i[e].index)):(a(e),c.lowlink=Math.min(c.lowlink,i[e].lowlink))})),c.lowlink===c.index){var u,l=[];do{u=n.pop(),i[u].onStack=!1,l.push(u)}while(s!==u);o.push(l)}}return e.nodes().forEach((function(e){r.has(i,e)||a(e)})),o}},2166:(e,t,n)=>{var r=n(9126);function i(e){var t={},n={},i=[];if(r.each(e.sinks(),(function a(s){if(r.has(n,s))throw new o;r.has(t,s)||(n[s]=!0,t[s]=!0,r.each(e.predecessors(s),a),delete n[s],i.push(s))})),r.size(t)!==e.nodeCount())throw new o;return i}function o(){}e.exports=i,i.CycleException=o,o.prototype=new Error},9675:(e,t,n)=>{var r=n(9126);function i(){this._arr=[],this._keyIndices={}}e.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},i.prototype.has=function(e){return r.has(this._keyIndices,e)},i.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var i=this._arr,o=i.length;return n[e]=o,i.push({key:e,priority:t}),this._decrease(o),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},i.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},i.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,i=e;n>1].priority{"use strict";var r=n(9126);e.exports=o;var i="\0";function o(e){this._isDirected=!r.has(e,"directed")||e.directed,this._isMultigraph=!!r.has(e,"multigraph")&&e.multigraph,this._isCompound=!!r.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function a(e,t){e[t]?e[t]++:e[t]=1}function s(e,t){--e[t]||delete e[t]}function c(e,t,n,i){var o=""+t,a=""+n;if(!e&&o>a){var s=o;o=a,a=s}return o+""+a+""+(r.isUndefined(i)?"\0":i)}function u(e,t,n,r){var i=""+t,o=""+n;if(!e&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return r&&(s.name=r),s}function l(e,t){return c(e,t.v,t.w,t.name)}o.prototype._nodeCount=0,o.prototype._edgeCount=0,o.prototype.isDirected=function(){return this._isDirected},o.prototype.isMultigraph=function(){return this._isMultigraph},o.prototype.isCompound=function(){return this._isCompound},o.prototype.setGraph=function(e){return this._label=e,this},o.prototype.graph=function(){return this._label},o.prototype.setDefaultNodeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultNodeLabelFn=e,this},o.prototype.nodeCount=function(){return this._nodeCount},o.prototype.nodes=function(){return r.keys(this._nodes)},o.prototype.sources=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._in[t])}))},o.prototype.sinks=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._out[t])}))},o.prototype.setNodes=function(e,t){var n=arguments,i=this;return r.each(e,(function(e){n.length>1?i.setNode(e,t):i.setNode(e)})),this},o.prototype.setNode=function(e,t){return r.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=i,this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},o.prototype.node=function(e){return this._nodes[e]},o.prototype.hasNode=function(e){return r.has(this._nodes,e)},o.prototype.removeNode=function(e){var t=this;if(r.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],r.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),r.each(r.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],r.each(r.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},o.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(t))t=i;else{for(var n=t+="";!r.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},o.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},o.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==i)return t}},o.prototype.children=function(e){if(r.isUndefined(e)&&(e=i),this._isCompound){var t=this._children[e];if(t)return r.keys(t)}else{if(e===i)return this.nodes();if(this.hasNode(e))return[]}},o.prototype.predecessors=function(e){var t=this._preds[e];if(t)return r.keys(t)},o.prototype.successors=function(e){var t=this._sucs[e];if(t)return r.keys(t)},o.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return r.union(t,this.successors(e))},o.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},o.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){e(r)&&t.setNode(r,n)})),r.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var i={};function o(e){var r=n.parent(e);return void 0===r||t.hasNode(r)?(i[e]=r,r):r in i?i[r]:o(r)}return this._isCompound&&r.each(t.nodes(),(function(e){t.setParent(e,o(e))})),t},o.prototype.setDefaultEdgeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultEdgeLabelFn=e,this},o.prototype.edgeCount=function(){return this._edgeCount},o.prototype.edges=function(){return r.values(this._edgeObjs)},o.prototype.setPath=function(e,t){var n=this,i=arguments;return r.reduce(e,(function(e,r){return i.length>1?n.setEdge(e,r,t):n.setEdge(e,r),r})),this},o.prototype.setEdge=function(){var e,t,n,i,o=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(e=s.v,t=s.w,n=s.name,2===arguments.length&&(i=arguments[1],o=!0)):(e=s,t=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),e=""+e,t=""+t,r.isUndefined(n)||(n=""+n);var l=c(this._isDirected,e,t,n);if(r.has(this._edgeLabels,l))return o&&(this._edgeLabels[l]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[l]=o?i:this._defaultEdgeLabelFn(e,t,n);var h=u(this._isDirected,e,t,n);return e=h.v,t=h.w,Object.freeze(h),this._edgeObjs[l]=h,a(this._preds[t],e),a(this._sucs[e],t),this._in[t][l]=h,this._out[e][l]=h,this._edgeCount++,this},o.prototype.edge=function(e,t,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,e,t,n);return this._edgeLabels[r]},o.prototype.hasEdge=function(e,t,n){var i=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,e,t,n);return r.has(this._edgeLabels,i)},o.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[t],e),s(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},o.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var i=r.values(n);return t?r.filter(i,(function(e){return e.v===t})):i}},o.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var i=r.values(n);return t?r.filter(i,(function(e){return e.w===t})):i}},o.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},2354:(e,t,n)=>{e.exports={Graph:n(771),version:n(9631)}},8974:(e,t,n)=>{var r=n(9126),i=n(771);function o(e){return r.map(e.nodes(),(function(t){var n=e.node(t),i=e.parent(t),o={v:t};return r.isUndefined(n)||(o.value=n),r.isUndefined(i)||(o.parent=i),o}))}function a(e){return r.map(e.edges(),(function(t){var n=e.edge(t),i={v:t.v,w:t.w};return r.isUndefined(t.name)||(i.name=t.name),r.isUndefined(n)||(i.value=n),i}))}e.exports={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:o(e),edges:a(e)};return r.isUndefined(e.graph())||(t.value=r.clone(e.graph())),t},read:function(e){var t=new i(e.options).setGraph(e.value);return r.each(e.nodes,(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),r.each(e.edges,(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}}},9126:(e,t,n)=>{var r;try{r={clone:n(6678),constant:n(5703),each:n(6073),filter:n(3105),has:n(8721),isArray:n(1469),isEmpty:n(1609),isFunction:n(3560),isUndefined:n(2353),keys:n(3674),map:n(5161),reduce:n(4061),size:n(4238),transform:n(8718),union:n(3386),values:n(2628)}}catch(e){}r||(r=window._),e.exports=r},9631:e=>{e.exports="2.1.8"},4485:(e,t,n)=>{e.exports=n(2894)},2894:function(e,t){var n,r,i;(function(){var o,a,s,c,u,l,h,f,d,g,p,v,b,y,w;s=Math.floor,g=Math.min,a=function(e,t){return et?1:0},d=function(e,t,n,r,i){var o;if(null==n&&(n=0),null==i&&(i=a),n<0)throw new Error("lo must be non-negative");for(null==r&&(r=e.length);nn;0<=n?t++:t--)u.push(t);return u}.apply(this).reverse()).length;rp;0<=p?++l:--l)v.push(u(e,n));return v},y=function(e,t,n,r){var i,o,s;for(null==r&&(r=a),i=e[n];n>t&&r(i,o=e[s=n-1>>1])<0;)e[n]=o,n=s;return e[n]=i},w=function(e,t,n){var r,i,o,s,c;for(null==n&&(n=a),i=e.length,c=t,o=e[t],r=2*t+1;r{!function(){var t;function n(){}function r(){}function i(){}function a(){}function s(){}function c(){}function u(){}function l(){}function h(){}function f(){}function d(){}function g(){}function p(){}function v(){}function b(){}function y(){}function w(){}function m(){}function x(){}function E(){}function C(){}function k(){}function _(){}function N(){}function S(){}function O(){}function T(){}function L(){}function I(){}function A(){}function M(){}function P(){}function D(){}function j(){}function R(){}function G(){}function B(){}function H(){}function F(){}function Y(){}function z(){}function V(){}function U(){}function q(){}function X(){}function W(){}function Z(){}function $(){}function K(){}function Q(){}function J(){}function ee(){}function te(){}function ne(){}function re(){}function ie(){}function oe(){}function ae(){}function se(){}function ce(){}function ue(){}function le(){}function he(){}function fe(){}function de(){}function ge(){}function pe(){}function ve(){}function be(){}function ye(){}function we(){}function me(){}function xe(){}function Ee(){}function Ce(){}function ke(){}function _e(){}function Ne(){}function Se(){}function Oe(){}function Te(){}function Le(){}function Ie(){}function Ae(){}function Me(){}function Pe(){}function De(){}function je(){}function Re(){}function Ge(){}function Be(){}function He(){}function Fe(){}function Ye(){}function ze(){}function Ve(){}function Ue(){}function qe(){}function Xe(){}function We(){}function Ze(){}function $e(){}function Ke(){}function Qe(){}function Je(){}function et(){}function tt(){}function nt(){}function rt(){}function it(){}function ot(){}function at(){}function st(){}function ct(){}function ut(){}function lt(){}function ht(){}function ft(){}function dt(){}function gt(){}function pt(){}function vt(){}function bt(){}function yt(){Rf()}function wt(){NE()}function mt(){Ud()}function xt(){Vp()}function Et(){eo()}function Ct(){to()}function kt(){la()}function _t(){Up()}function Nt(){Mf()}function St(){Sk()}function Ot(){Pf()}function Tt(){Df()}function Lt(){lS()}function It(){I_()}function At(){oh(this)}function Mt(){}function Pt(){wu(this)}function Dt(){}function jt(e){this.a=e}function Rt(e){this.a=e}function Gt(e){this.a=e}function Bt(e){this.a=e}function Ht(e){this.a=e}function Ft(e){this.a=e}function Yt(e){this.a=e}function zt(e){this.a=e}function Vt(e){this.a=e}function Ut(e){this.b=e}function qt(e){this.a=e}function Xt(e){this.a=e}function Wt(e){this.a=e}function Zt(e){this.a=e}function $t(e){this.a=e}function Kt(e){this.a=e}function Qt(e){this.a=e}function Jt(e){this.a=e}function en(e){this.a=e}function tn(e){this.a=e}function nn(e){this.a=e}function rn(e){this.a=e}function on(e){this.a=e}function an(e){this.a=e}function sn(e){this.a=e}function cn(e){this.e=e}function un(e){this.a=e}function ln(e){this.a=e}function hn(e){this.a=e}function fn(e){this.a=e}function dn(e){this.a=e}function gn(e){this.a=e}function pn(e){this.a=e}function vn(e){this.a=e}function bn(e){this.a=e}function yn(e){this.a=e}function wn(e){this.a=e}function mn(e){this.a=e}function xn(e){this.a=e}function En(e){this.a=e}function Cn(e){this.a=e}function kn(e){this.a=e}function _n(e){this.a=e}function Nn(e){this.a=e}function Sn(e){this.a=e}function On(e){this.a=e}function Tn(e){this.a=e}function Ln(e){this.c=e}function In(e){this.a=e}function An(e){this.a=e}function Mn(e){this.a=e}function Pn(e){this.a=e}function Dn(e){this.a=e}function jn(e){this.a=e}function Rn(e){this.a=e}function Gn(e){this.a=e}function Bn(e){this.a=e}function Hn(e){this.a=e}function Fn(e){this.d=e}function Yn(e){this.a=e}function zn(e){this.a=e}function Vn(e){this.a=e}function Un(e){this.a=e}function qn(e){this.b=e}function Xn(e){this.a=e}function Wn(e){this.a=e}function Zn(e){this.c=e}function $n(e){this.a=e}function Kn(e){this.a=e}function Qn(e){this.a=e}function Jn(e){this.b=e}function er(e){this.b=e}function tr(e){this.c=e}function nr(e){this.a=e}function rr(e){this.a=e}function ir(e){this.a=e}function or(){this.a=[]}function ar(e){this.a=e}function sr(e){this.a=e}function cr(e){e.b=e.a}function ur(e){e.c=e.d.d}function lr(e,t){e.g=t}function hr(e,t){e.k=t}function fr(e,t){e.e.k=t}function dr(e){return e.a}function gr(e){return e.a}function pr(e){return e.a}function vr(e){return e.a}function br(e){return e.a}function yr(){return null}function wr(){return null}function mr(){this.c=this}function xr(){oh(this)}function Er(){wy(this)}function Cr(e){!function(e,t){var n,r,i,o,a,s,c;for(c=0,r=0,i=t.length;r=e.length)return{done:!0};var r=e[n++];return{value:[r,t.get(r)],done:!1}}}},function(){if(!Object.create||!Object.getOwnPropertyNames)return!1;var e="__proto__",t=Object.create(null);return void 0===t[e]&&0==Object.getOwnPropertyNames(t).length&&(t[e]=42,42===t[e]&&0!=Object.getOwnPropertyNames(t).length)}()||(e.prototype.createObject=function(){return{}},e.prototype.get=function(e){return this.obj[":"+e]},e.prototype.set=function(e,t){this.obj[":"+e]=t},e.prototype[yD]=function(e){delete this.obj[":"+e]},e.prototype.keys=function(){var e=[];for(var t in this.obj)58==t.charCodeAt(0)&&e.push(t.substring(1));return e}),e}()}function Lo(e,t){Ax(),oA.dc(e,t)}function Io(e,t){return Av(e,t)}function Ao(e,t){return e.a.B(t)}function Mo(e,t){return e.g[t.e]}function Po(e,t){return e.i[t.e]}function Do(e,t){return e.j[t.e]}function jo(e,t){return e.n[t.e]}function Ro(e,t){return e.o[t.e]}function Go(e,t){return e>t?e:t}function Bo(e,t){return e>t?e:t}function Ho(e,t){return e>t?e:t}function Fo(e,t){return et?1:0}function Gu(e){return null!=e?KE(e):0}function Bu(e){this.a=Fc(),this.b=e}function Hu(e){this.a=Fc(),this.b=e}function Fu(e){this.a=e,Qf.call(this,e)}function Yu(){Ku(),this.b=new Cn(this)}function zu(){var e;zu=r,e=new ao(", "),Md(gA),FD=new $f(e,e)}function Vu(){Vu=r,BD=new lu,GD=new Iu}function Uu(){Uu=r,zD=new d,VD=new g}function qu(){qu=r,qD=new Ws,XD=new mu}function Xu(){Xu=r,JD=new hu,QD=new yl}function Wu(){Wu=r,vj=new b,bj=new y}function Zu(e){e.g=new Pt,e.b=new Pt}function $u(e){e.a=new vt,e.c=new vt}function Ku(){Ku=r,CY=new We,EY=new Jf}function Qu(){Ba.call(this,"IS_NULL",2)}function Ju(){jc.call(this,"Head",1)}function el(){jc.call(this,"Tail",3)}function tl(e,t){om.call(this,e,t,null)}function nl(e,t){Fk(e,0,e.length,t)}function rl(e,t){return Tf(t.a,e.a),e.a}function il(e,t){return e.a*=t,e.b*=t,e}function ol(e,t){rp(),this.a=e,this.b=t}function al(e,t){return e.a[t.d.k][t.k]}function sl(e,t){return e.a[t.d.k][t.k]}function cl(e,t){return sa(function(e,t){var n,r;for(n=null,r=e.b;r;)e.a.$b(t,r.d)>=0?r=r.a[1]:(n=r,r=r.a[0]);return n}(e.a,t))}function ul(e,t){return sa(function(e,t){var n,r;for(n=null,r=e.b;r;)e.a.$b(t,r.d)<=0?r=r.a[0]:(n=r,r=r.a[1]);return n}(e.a,t))}function ll(e,t){return Yf(W_(e.a,t),20)}function hl(e,t){return null!=e&&Pk(e,t)}function fl(e){return e.a=t)throw new ki}function Vf(e,t){return Md(e),Md(t),new ad(e,t)}function Uf(e,t){return Md(e),Md(t),new sd(e,t)}function qf(e,t,n){return e=t+1&&e.splice(0,t+1);break}return e}(oA.ec(e))}function xd(e,t){var n;return(n=Gg(e,t)).g=2,n}function Ed(e,t){e.b=t.b,e.c=t.c,e.d=t.d,e.a=t.a}function Cd(e){e.a.b=e.b,e.b.a=e.a,e.a=e.b=null}function kd(e){return e.b.c.length+e.e.c.length}function _d(e){return Array.isArray(e)&&e.ad===n}function Nd(e,t){return Uu(),-1!=Bx(new Zn(e),t)}function Sd(e,t,n,r,i,o){return R_(e,t,n,r,i,0,o)}function Od(e,t,n){Wu(),Kv.call(this,e.b,t,n,e.d)}function Td(e,t){Wu(),Kv.call(this,e.b,t,e.c,e.d)}function Ld(e,t,n){xy(t,e.c.length),Nc(e.c,t,n)}function Id(e,t){return Ey(t,e.a.length),e.a[t]}function Ad(e){e.sort((function(e,t){return e-t}))}function Md(e){if(null==e)throw new Wr;return e}function Pd(e){if(null==e)throw new Wr;this.a=e}function Dd(e,t,n){if(e.a!=t)throw new wi;e.a=n}function jd(e,t){if(!e)throw new oo((oi(),t))}function Rd(e,t){if(!e)throw new xo((oi(),t))}function Gd(e){if(null==e)throw new Wr;return e}function Bd(e){ar.call(this,new ry),pm(this,e)}function Hd(e){this.a=new Us(e.Y()),pm(this,e)}function Fd(e){this.c=e,this.a=new Vs(this.c.a)}function Yd(e){rp(),this.a=(Fp(),new Qn(Md(e)))}function zd(){(zd=r)(),SX=!1,OX=!0}function Vd(){Vd=r,AX=_y(SD,hA,24,256,0,1)}function Ud(){Ud=r,MY=gd(pd(new iC,(WI(),yF)),YF)}function qd(){qd=r,fH=new x,gH=new ed,dH=new E}function Xd(e){return null!=e&&Ig(e)&&!(e.ad===n)}function Wd(e){return!Array.isArray(e)&&e.ad===n}function Zd(e,t){return _l(t)?Ap(e,t):OS(e.d,t)}function $d(e,t){return hl(t,17)&&Ul(e,Yf(t,17))}function Kd(e,t){return hl(t,17)&&function(e,t){return!(!t||e.b[t.e]!=t)&&(Hg(e.b,t.e,null),--e.c,!0)}(e,Yf(t,17))}function Qd(e,t){var n;return sx(n=pC(e),t),n}function Jd(e,t){return!e&&(e=[]),e[e.length]=t,e}function eg(e,t,n){if(!e)throw new oo(function(e,t){var n,r,i,o;for(oi(),(e=null==e?gA:e).length,t.length,n=new Jo,o=0,r=0;r0),e.a.sb(e.c=--e.b)}function fg(e){e.b?fg(e.b):e.d.V()&&Zd(e.f.b,e.e)}function dg(e){if(nC(e.d),e.d.d!=e.c)throw new wi}function gg(e,t){if(t[gD]!=e[gD])throw new wi}function pg(e,t){return Uu(),Md(e),Md(t),new Pa(e,t)}function vg(e,t){rp(),Va.call(this,e,Ix(new $n(t)))}function bg(e,t,n,r){this.a=e,Sy.call(this,e,t,n,r)}function yg(e){this.a=Math.cos(e),this.b=Math.sin(e)}function wg(e,t,n){Fi.call(this,e),this.b=t,this.a=n}function mg(e){this.b=new Pt,this.a=new Pt,this.c=e}function xg(e){this.c=new so,this.a=new Pt,this.b=e}function Eg(){Eg=r,oj=new en(!1),aj=new en(!0)}function Cg(e,t){return++e.d,e.c[e.c.length]=t,!0}function kg(e,t){Mb(e.d,t,e.b.b,e.b),++e.a,e.c=null}function _g(e,t){return null==e.a.db(t,e)}function Ng(e,t){return By(e.slice(0,t),e)}function Sg(e,t){return By(new Array(t),e)}function Og(e,t,n){var r;return r=e.b[t],e.b[t]=n,r}function Tg(e){return ml(),mf(function(e){var t;return Yf((t=e.g)?t:e.g=new qt(e),20)}(e.a).mb(),(qu(),qD))}function Lg(e){return Uu(),new Au(Du(Uf(e.a,new f)))}function Ig(e){return typeof e===lA||typeof e===bA}function Ag(e){t.setTimeout((function(){throw e}),0)}function Mg(e){return Md(e),hl(e,345)?Yf(e,345):Vk(e)}function Pg(e,t){return null==Fx(e.a,t,(zd(),SX))}function Dg(e,t){var n;return function(e,t){if(e<0||e>=t)throw new io(function(e,t){if(e<0)return DO(RA,Sx(Io(_D,1),GA,1,4,["index",WE(e)]));if(t<0)throw new oo(BA+t);return DO("%s (%s) must be less than size (%s)",Sx(Io(_D,1),GA,1,4,["index",WE(e),WE(t)]))}(e,t))}(t,n=e.a.Y()),n-1-t}function jg(e,t,n){var r;return r=Tw(e,t),function(e,t,n){if(n){var r=n.gc();n=r(n)}else n=void 0;e.a[t]=n}(e,t,n),r}function Rg(e,t,n){var r;return Ww(n,r=Gg(e,t)),r}function Gg(e,t){var n;return(n=new Wx).i=e,n.d=t,n}function Bg(e,t,n){this.a=e,Lb(n,t),this.c=t,this.b=n}function Hg(e,t,r){return function(e){if(!e)throw new qr}(null==r||function(e,t){switch(mw(e)){case 5:return _l(t);case 6:return kl(t);case 7:return gh(t);case 0:return Pk(t,e.__elementTypeId$);case 2:return Ig(t)&&!(t.ad===n);case 1:return Ig(t)&&!(t.ad===n)||Pk(t,e.__elementTypeId$);default:return!0}}(e,r)),e[t]=r}function Fg(e){e.a=null,e.e=null,wy(e.b),e.d=0,++e.c}function Yg(e){return e.f||(e.f=new Ks(e))}function zg(e){return e.k||(e.k=new Ht(e))}function Vg(e){return e.e||(e.e=new $a(e))}function Ug(e){var t;return!(t=e.e)&&(e.e=t=e.gb()),t}function qg(e){return e.c.f.d==e.d.f.d}function Xg(e,t){var n;return Fw(n=new Db(e),t),n}function Wg(e,t){return e.a+=String.fromCharCode(t),e}function Zg(e){return!e.a&&e.d?e.d.b:e.a}function $g(e){return Vl(e)?0|e:e.l|e.m<<22}function Kg(e,t){return _l(t)?bv(e,t):Zc(gv(e.d,t))}function Qg(e){return hl(e,19)?Yf(e,19).Y():Jb(e.mb())}function Jg(e){return e?new Hd((zu(),e)):function(e){var t;return zw(t=new Ki,e),t}(null.mb())}function ep(e,t){return Wc(e)===Wc(t)||null!=e&&sE(e,t)}function tp(e,t){return Ji(),Lx(ro(Oh(e)),ro(Oh(t)))}function np(e){return ml(),mf(e.a.bb().mb(),(qu(),XD))}function rp(){rp=r,cf(),YD=new sb((Fp(),Fp(),jX))}function ip(){ip=r,cf(),KD=new Zs((Fp(),Fp(),GX))}function op(e,t){if(null==e)throw new ko((oi(),t))}function ap(e,t,n,r){e.g[t.e][n.e]=r,e.g[n.e][t.e]=r}function sp(e){Nu(-1!=e.c),e.d.vb(e.c),e.b=e.c,e.c=-1}function cp(e){this.c=e,this.b=e.a.b.a,ql(e.a.c,this)}function up(e){JT.call(this,new $n(e)),this.a=new so}function lp(){Ti.call(this,new Pi(new Er)),this.a=this}function hp(){uw(),this.b=(ml(),new Er),this.a=new Er}function fp(e){vp(e.a),e.b=_y(_D,GA,1,e.b.length,4,1)}function dp(e){return!e.b&&(e.b=new Zo(e.c.W())),e.b}function gp(e,t){var n;return nI(e,t,n=new bt),n.d}function pp(e,t){var n;return(n=Gg("",e)).k=t,n.g=1,n}function vp(e){var t;for(t=e.mb();t.G();)t.H(),t.I()}function bp(e,t){return hl(t,79)&&Di(e.b,Yf(t,79).mc())}function yp(e,t,n){return _l(t)?Fv(e,t,n):YN(e.d,t,n)}function wp(e,t,n,r){this.d=e,this.b=t,this.a=n,this.c=r}function mp(e,t,n,r){this.d=e,this.e=t,this.c=n,this.b=r}function xp(e,t,n,r){this.a=e,this.c=t,this.b=n,this.d=r}function Ep(e,t,n,r){Aa.call(this,e,t),this.a=n,this.b=r}function Cp(e,t){return oi(),e==t?0:e0?1:0}function $p(e,t){return Vm(function(e,t){return kf(e.l&t.l,e.m&t.m,e.h&t.h)}(Vl(e)?Jm(e):e,Vl(t)?Jm(t):t))}function Kp(e){return 0==e.b?null:(Tu(0!=e.b),Yw(e,e.a.a))}function Qp(e){e.d=e.d-15,e.b=e.b-15,e.c=e.c+15,e.a=e.a+15}function Jp(e){this.b=e,this.c=e,e.e=null,e.c=null,this.a=1}function ev(e,t,n){this.d=e,this.b=new Pt,this.c=t,this.a=n}function tv(e,t){!function(e,t){e.a=t}(this,new Qa(e.a,e.b)),function(e,t){e.b=t}(this,Hf(t))}function nv(e){fl(new Zn(Qk(e.e)))&&(function(e){var t,n,r;for(r=new Fd(new ir(e.c).a);dl(r.a);)switch(r.b=Qb(r.a),t=Yf((n=new Rc(r.c,r.b)).b.b[n.a.e],62),Yf(n.a,67).e){case 0:t.d=0,t.e=-(t.b+e.d);break;case 1:t.d=(e.e.e.j.a-t.c)/2,t.e=-(t.b+e.d);break;case 2:t.d=e.e.e.j.a-t.c,t.e=-(t.b+e.d);break;case 3:t.d=0,t.e=e.e.e.j.b+e.d;break;case 4:t.d=(e.e.e.j.a-t.c)/2,t.e=e.e.e.j.b+e.d;break;case 5:t.d=e.e.e.j.a-t.c,t.e=e.e.e.j.b+e.d;break;case 6:t.d=-(t.c+e.d),t.e=0;break;case 7:t.d=-(t.c+e.d),t.e=(e.e.e.j.b-t.b)/2;break;case 8:t.d=-(t.c+e.d),t.e=e.e.e.j.b-t.b;break;case 9:t.d=e.e.e.j.a+e.d,t.e=0;break;case 10:t.d=e.e.e.j.a+e.d,t.e=(e.e.e.j.b-t.b)/2;break;case 11:t.d=e.e.e.j.a+e.d,t.e=e.e.e.j.b-t.b;break;case 12:t.d=e.q.b+e.d,t.e=e.q.d+e.d;break;case 13:t.d=(e.e.e.j.a-t.c)/2,t.e=e.q.d+e.d;break;case 14:t.d=e.e.e.j.a-e.q.c-t.c-e.d,t.e=e.q.d+e.d;break;case 15:t.d=e.q.b+e.d,t.e=(e.e.e.j.b-t.b)/2;break;case 16:t.d=(e.e.e.j.a-t.c)/2,t.e=(e.e.e.j.b-t.b)/2;break;case 17:t.d=e.e.e.j.a-e.q.c-t.c-e.d,t.e=(e.e.e.j.b-t.b)/2;break;case 18:t.d=e.q.b+e.d,t.e=e.e.e.j.b-e.q.a-t.b-e.d;break;case 19:t.d=(e.e.e.j.a-t.c)/2,t.e=e.e.e.j.b-e.q.a-t.b-e.d;break;case 20:t.d=e.e.e.j.a-e.q.c-t.c-e.d,t.e=e.e.e.j.b-e.q.a-t.b-e.d}}(e),function(e){var t,n,r,i,o;for(r=new Zn(Qk(e.e));r.a>>0).toString(16)}function bv(e,t){return null==t?Zc(gv(e.d,null)):Mc(e.e,t)}function yv(e){return 0|Math.max(Math.min(e,yA),-2147483648)}function wv(e){this.e=e,this.b=this.e.a.entries(),this.a=[]}function mv(e){this.c=e,this.b=new Xx(new Hn(this.c.a).a)}function xv(e){this.b=(Uu(),Uu(),Uu(),zD),this.a=Yf(Md(e),35)}function Ev(e,t,n){Wu(),Lf.call(this,e,t),null!=n&&(this.c=n)}function Cv(e,t,n){if(e<0||tn)throw new io(function(e,t,n){return e<0||e>n?zN(e,n,"start index"):t<0||t>n?zN(t,n,"end index"):DO("end index (%s) must not be less than start index (%s)",Sx(Io(_D,1),GA,1,4,[WE(t),WE(e)]))}(e,t,n))}function kv(e,t){if(null==e)throw new ko((oi(),t));return e}function _v(e){if(!eC(e))throw new xi;return e.c=e.b,e.b.H()}function Nv(e){function t(){}return t.prototype=e||{},new t}function Sv(e){var t;return sx(t=new Sa(cx(e.length)),e),t}function Ov(e){var t;t=e.c.b.b,e.b=t,e.a=e.c.b,t.a=e.c.b.b=e}function Tv(e){this.b=null,!e&&(Js(),Js(),e=FX),this.a=e}function Lv(e){this.b=e,this.a=new $v(this.b,this.b.c.length)}function Iv(e){return rp(),Md(e),function(e){var t;switch((t=Ng(e.c,e.c.length)).length){case 0:return YD;case 1:return new Yd(t[0]);default:return new sb(BE(t))}}(e||Bf(new Zn(null)))}function Av(e,t){var n=e.a=e.a||[];return n[t]||(n[t]=e.Oc(t))}function Mv(e,t,n){var r;s_(t,n,e.c.length),r=n-t,wa(e.c,t,r)}function Pv(e,t,n){Ia.call(this,t.a),this.c=e,this.b=t,this.a=n}function Dv(e){return Vc(e.c),e.e=e.a=e.c,e.c=e.c.c,++e.d,e.a.f}function jv(e){return Vc(e.e),e.c=e.a=e.e,e.e=e.e.e,--e.d,e.a.f}function Rv(e){return Um(Sx(Io(pj,1),KM,10,0,[e.f.i,e.i,e.a]))}function Gv(){Gv=r,IY=$x((zp(),Sx(Io(RY,1),HA,193,0,[OY,TY])))}function Bv(){Bv=r,dY=$x((Sb(),Sx(Io(mY,1),HA,175,0,[lY,hY])))}function Hv(){Hv=r,ZY=$x((lb(),Sx(Io(QY,1),HA,192,0,[XY,qY])))}function Fv(e,t,n){return null==t?YN(e.d,null,n):sC(e.e,t,n)}function Yv(e,t){return Kd(e.a,t)?Og(e,Yf(t,17).e,null):null}function zv(e){return Md(e),n_((Uu(),new Au(Du(Uf(e.a,new f)))))}function Vv(e,t){var n,r;return r=tg(e,t),n=e.a.ub(r),new Ya(e,n)}function Uv(e,t,n){var r;(r=new ot).b=t,r.a=n,++t.b,Tf(e.d,r)}function qv(e,t,n){e.d&&Gy(e.d.b,e),e.d=t,e.d&&Ld(e.d.b,n,e)}function Xv(e,t,n){s_(t,n,e.Y()),this.c=e,this.a=t,this.b=n-t}function Wv(e,t,n,r){this.d=e,this.b=t,this.a=n,this.c=r}function Zv(e,t){Ti.call(this,fm(Md(e),Md(t))),this.b=e,this.c=t}function $v(e,t){this.a=e,Fn.call(this,e),xy(t,e.Y()),this.b=t}function Kv(e,t,n,r){Wu(),Ev.call(this,e,t,n),null!=r&&(this.d=r)}function Qv(e){return Tu(e.a2e3&&(dj=e,gj=t.setTimeout(ha,10)),0==fj++&&(function(e){var t,n;if(e.a){n=null;do{t=e.a,e.a=null,n=TN(t,n)}while(e.a);e.a=n}}((ui(),ij)),!0)}();try{return function(e,t,n){return e.apply(t,n)}(e,n,r)}finally{!function(e){e&&function(e){var t,n;if(e.b){n=null;do{t=e.b,e.b=null,n=TN(t,n)}while(e.b);e.b=n}}((ui(),ij)),--fj,e&&-1!=gj&&(function(e){t.clearTimeout(e)}(gj),gj=-1)}(i)}}function ab(e){return hl(e,19)?Yf(e,19).V():!e.mb().G()}function sb(e){rp(),this.a=(Fp(),hl(e,63)?new Ko(e):new Wl(e))}function cb(){cb=r,kU=new xc(jM,0),_U=new xc("TOP_LEFT",1)}function ub(){ub=r,xz=new cc("DOWN",0),Ez=new cc("UP",1)}function lb(){lb=r,XY=new Rs("LAYER_SWEEP",0),qY=new Rs(UP,1)}function hb(){hb=r,nz=new oc("UPPER",0),tz=new oc("LOWER",1)}function fb(e,t){return!!hl(t,21)&&c_(e.a,Yf(t,21))}function db(e,t){return!!hl(t,21)&&c_(e.a,Yf(t,21))}function gb(e,t){return!!hl(t,21)&&c_(e.a,Yf(t,21))}function pb(e){var t;return ME(t=new Dp,e),Ky(t,(JI(),kR),null),t}function vb(e,t){return t===e?"(this Map)":(oi(),null==t?gA:Vk(t))}function bb(e,t,n,r){return hl(n,63)?new yh(e,t,n,r):new bg(e,t,n,r)}function yb(){yb=r,LG=$x((jw(),Sx(Io(QG,1),HA,149,0,[OG,SG,NG])))}function wb(){wb=r,iR=$x((_E(),Sx(Io(uG,1),HA,166,0,[tR,eR,nR])))}function mb(){mb=r,GY=$x((fw(),Sx(Io(UY,1),HA,173,0,[jY,DY,PY])))}function xb(e,t){var n;Fp(),Fk(n=e.ob(),0,n.length,t),function(e,t){var n,r;for(r=e.Y(),n=0;nt)throw new io(zN(e,t,"index"));return e}function Ib(e,t,n){Md(e),function(e){var t,n,r;for(xb(e.c,e.a),r=new Zn(e.c);r.a>22&mM,e<0?xM:0)}function hy(){hy=r,Mj=$x((CE(),Sx(Io(Gj,1),HA,59,0,[Lj,Tj,Oj,Sj,Ij])))}function fy(){fy=r,JG=$x((wI(),Sx(Io(iB,1),HA,32,0,[$G,AG,IG,ZG,KG])))}function dy(){dy=r,bG=$x((LC(),Sx(Io(kG,1),HA,100,0,[pG,gG,hG,fG,dG])))}function gy(){gy=r,KY=gd(yd(yd(yd(bd(new iC,(WI(),AF)),BF),lF),mF),IF)}function py(e,t){var n;for(n=t.mb();n.G();)pT(e,Yf(n.H(),55),0,0)}function vy(e,t,n){var r;for(r=e.mb();r.G();)iT(Yf(r.H(),55),t,n)}function by(e,t,n){var r,i;for(r=0,i=0;it)throw new io("Index: "+e+", Size: "+t)}function Ey(e,t){if(e<0||e>=t)throw new io("Index: "+e+", Size: "+t)}function Cy(e,t){var n;return!!(n=eE(e,t.yb()))&&Np(n.e,t.zb())}function ky(e,t){var n;return n=e.d,t>0?Yf(dd(n.a,t-1),9):null}function _y(e,t,n,r,i,o){var a;return a=h_(i,r),9!=i&&Sx(Io(e,o),t,n,i,a),a}function Ny(e){var t;if(!um(e))throw new xi;return e.d=1,t=e.c,e.c=null,t}function Sy(e,t,n,r){this.f=e,this.e=t,this.d=n,this.b=r,this.c=r?r.d:null}function Oy(e){var t;return t=Yf(dd(e.f,0),7),Yf(kx(t,(ZI(),oq)),7)}function Ty(e){var t;return t=Yf(dd(e.f,0),7),Yf(kx(t,(ZI(),oq)),7)}function Ly(){Ly=r,xX=$x((MC(),Sx(Io(_X,1),HA,153,0,[bX,wX,yX])))}function Iy(){Iy=r,NX=$x((Bm(),Sx(Io(TX,1),HA,172,0,[EX,CX,kX])))}function Ay(){Ay=r,Nj=$x((fk(),Sx(Io(Aj,1),HA,103,0,[wj,Ej,Cj,kj,mj,xj])))}function My(){My=r,Jj=$x((D_(),Sx(Io(rR,1),HA,133,0,[$j,Wj,Kj,qj,Zj,Xj])))}function Py(){Py=r,_G=$x((b_(),Sx(Io(TG,1),HA,28,0,[CG,EG,xG,yG,mG,wG])))}function Dy(){Dy=r,xY=$x((gN(),Sx(Io(kY,1),HA,125,0,[yY,pY,wY,bY,vY,gY])))}function jy(){jy=r,yj=new Lf("de.cau.cs.kieler.labels.labelManager",null)}function Ry(e,t){var n;return(n=new bt).c=!0,n.d=t.zb(),nI(e,t.yb(),n)}function Gy(e,t){var n;return-1!=(n=Qy(e,t,0))&&(e.vb(n),!0)}function By(e,t){return 9!=mw(t)&&Sx(ww(t),t._c,t.__elementTypeId$,mw(t),e),e}function Hy(e){return gg(e.c.a.c,e),Tu(e.b!=e.c.a.b),e.a=e.b,e.b=e.b.a,e.a}function Fy(e){Nu(!!e.c),gg(e.e,e),e.c.I(),e.c=null,e.b=ix(e),ql(e.e,e)}function Yy(e,t,n){Ti.call(this,fm(Md(e),Md(t))),this.b=e,this.c=t,this.a=n}function zy(e,t,n,r){this.b=new On(this),this.a=e,this.c=t,this.e=n,this.d=r}function Vy(e){qx.call(this,e,0),ph(this),this.b.b=this.b,this.b.a=this.b}function Uy(e,t){Gc.call(this,e,t),this.a=_y(KX,GA,183,2,0,1),this.b=!0}function qy(e,t){return _l(t)?null==t?!!gv(e.d,null):function(e,t){return!(void 0===ka(e.a,t))}(e.e,t):!!gv(e.d,t)}function Xy(e,t){return Oo(),(e-t>0?e-t:-(e-t))<=yM||e==t||isNaN(e)&&isNaN(t)}function Wy(e,t){return Oo(),(e-t>0?e-t:-(e-t))<=yM||e==t||isNaN(e)&&isNaN(t)}function Zy(e){var t,n;t=!0;do{n=t?oC(e):CC(e),t=!t}while(n);ax(e,e.d)}function $y(e,t,n){var r;if(null==t)throw new Wr;return r=Sp(e,t),function(e,t,n){if(n){var r=n.gc();e.a[t]=r(n)}else delete e.a[t]}(e,t,n),r}function Ky(e,t,n){return!e.n&&(e.n=new Er),null==n?Zd(e.n,t):yp(e.n,t,n),e}function Qy(e,t,n){for(;n=e.a.c.length;)Tf(e.a,new co);return Yf(dd(e.a,t),20)}function ew(e,t,n,r,i){var o;return Ww(n,o=Gg(e,t)),o.g=i?8:0,o.f=r,o.e=i,o}function tw(e,t){var n;this.f=e,this.b=t,n=Yf(Kg(e.b,t),126),this.c=n?n.b:null}function nw(e,t){var n,r;for(n=0,r=t.length;n0&&(r+=function(e){var t,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,C;for(i=0,y=0,ml(),b=new Er,r=new Er,function(e,t,n){var r,i,o,a,s,c,u,l,h,f,d;for(r=0,i=0,l=0;l0&&yp(t,o,WE(r+=o.b.c.length+o.e.c.length));else{for(s=wN(c,(wI(),IG)).mb();s.G();)r+=(o=Yf(s.H(),7)).b.c.length+o.e.c.length;for(a=wN(c,IG).mb();a.G();)(o=Yf(a.H(),7)).b.c.length+o.e.c.length>0&&yp(t,o,WE(r))}for(u=e.length-1;u>=0;u--)if(zl(Yf(kx(c=e[u],(JI(),FR)),28)))for(f=wN(c,(wI(),KG)).mb();f.G();)(h=Yf(f.H(),7)).b.c.length+h.e.c.length>0&&yp(n,h,WE(i+=h.b.c.length+h.e.c.length));else{for(d=wN(c,(wI(),KG)).mb();d.G();)i+=(h=Yf(d.H(),7)).b.c.length+h.e.c.length;for(f=wN(c,KG).mb();f.G();)(h=Yf(f.H(),7)).b.c.length+h.e.c.length>0&&yp(n,h,WE(i))}}(e,o=new Er,C=new Er),t=null,v=0,E=0,w=!0,c=!0,f=0,g=e.length;fu.k&&(++t,d=!0),g&&u&&g.k>u.k&&(++t,p=!0),f&&s&&f.ks.k&&(++t,c=!0),f&&s&&f.ku.k&&(++t,l=!0),c&&l&&s==u&&--t)}}return t}(t)),r}function ow(e,t){var n;return(n=Yf(Zd(e.c,t),176))?(Cd(n),n.e):null}function aw(e){return nE(e,yA)>0?yA:nE(e,kA)<0?kA:$g(e)}function sw(e){of.call(this,(oi(),null==e?gA:Vk(e)),hl(e,46)?Yf(e,46):null)}function cw(e){wu(this),jd(e>=0,"Initial capacity must not be negative")}function uw(){uw=r,oH=wd(yd(yd(new iC,(WI(),MF)),xF),OF),aH=bd(new iC,_F)}function lw(){lw=r,VH=new Y,YH=new z,zH=new V,FH=new U,UH=new q,qH=new X}function hw(){hw=r,XX=new jc("All",0),WX=new Ju,ZX=new bl,$X=new el}function fw(){fw=r,jY=new js(ZP,0),DY=new js("LONGEST_PATH",1),PY=new js(UP,2)}function dw(){dw=r,uj=kf(mM,mM,524287),lj=kf(0,0,524288),ly(1),ly(2),hj=ly(0)}function gw(){gw=r,cY=$x((nO(),Sx(Io(fY,1),HA,109,0,[oY,eY,rY,tY,nY,JF,iY,aY])))}function pw(){pw=r,vz=$x((Uk(),Sx(Io(mz,1),HA,141,0,[gz,hz,fz,lz,dz])))}function vw(){vw=r,VV=$x((w_(),Sx(Io(KV,1),HA,115,0,[BV,GV,FV,HV,YV])))}function bw(){bw=r,Pq=$x((qk(),Sx(Io(Gq,1),HA,85,0,[Aq,Oq,Tq,Lq,Iq])))}function yw(e){eN(),function(e,t,n){e.a=1502^t,e.b=n^wD}(this,$g($p(Vm(function(e,t){var n,r,i,o;return 63,(r=0!=(524288&(n=e.h)))&&(n|=-1048576),o=r?xM:0,i=n>>2,kf((e.m>>2|n<<20)&mM,i&mM,o&xM)}(Vl(e)?Jm(e):e)),xD)),$g($p(e,xD)))}function ww(e){return _l(e)?OD:kl(e)?IX:gh(e)?LX:Wd(e)||_d(e)?e.$c:e.$c||rj}function mw(e){return null==e.__elementTypeCategory$?9:e.__elementTypeCategory$}function xw(e){var t,n;for(rc(),n=TM,t=0;tn&&(n=e[t]);return n}function Ew(e,t){var n;return(n=Yf(Kg(e.b,t),106))||(n=t.rc(),yp(e.b,t,n)),n}function Cw(e,t){var n;return(n=Yf(Kg(e.c,t),176))?(Bl(e,n),n.e):null}function kw(e,t,n,r){var i;(i=Yf(Cw(e.e,t),116)).b+=n,i.a+=r,Ak(e.e,t,i),e.d=!0}function _w(e){var t;for(++e.a,t=e.c.a.length;e.a"+e.d.f+"("+e.d+")":"e_"+lh(e)}function Dw(){Dw=r,lG=$x((yS(),Sx(Io(vG,1),HA,41,0,[tG,eG,rG,cG,sG,aG,iG,oG,nG])))}function jw(){jw=r,OG=new ps("OUTSIDE",0),SG=new ps("INSIDE",1),NG=new ps("FIXED",2)}function Rw(){Rw=r,xU=new mc(BM,0),EU=new mc("TOP",1),mU=new mc("BOTTOM",2)}function Gw(){Gw=r,_z=new lc("CLASSIC",0),Nz=new lc("IMPROVE_STRAIGHTNESS",1)}function Bw(){this.e=new so,this.a=new Bp,this.d=new so,this.b=new Pt,this.c=new Pt}function Hw(e,t,n){this.b=t,this.a=e,this.c=n,Tf(this.a.e,this),Tf(this.b.b,this)}function Fw(e,t){e.d=Fo(e.d,t.d),e.c=Go(e.c,t.c),e.a=Go(e.a,t.a),e.b=Fo(e.b,t.b)}function Yw(e,t){var n;return n=t.c,t.a.b=t.b,t.b.a=t.a,t.a=t.b=null,t.c=null,--e.b,n}function zw(e,t){var n;for(Uu(),Md(e),Md(t),n=!1;t.G();)n|=e.ib(t.H());return n}function Vw(e){var t;return gg(e.e,e),Tu(e.b),e.c=e.a,t=Yf(e.a.H(),21),e.b=ix(e),t}function Uw(e){return kM=0x8000000000000000?(dw(),uj):(r=!1,e<0&&(r=!0,e=-e),n=0,e>=CM&&(e-=(n=yv(e/CM))*CM),t=0,e>=EM&&(e-=(t=yv(e/EM))*EM),i=kf(yv(e),t,n),r&&(o=1+~i.l&mM,a=~i.m+(0==o?1:0)&mM,s=~i.h+(0==o&&0==a?1:0)&xM,i.l=o,i.m=a,i.h=s),i)}(e))}function qw(e){if(e){if(e.V())throw new xi;return e.sb(e.Y()-1)}return function(e){var t;for(Uu();;)if(t=e.H(),!e.G())return t}(null.mb())}function Xw(e,t){var n;return t<(n=e.d).a.c.length-1?Yf(dd(n.a,t+1),9):null}function Ww(e,t){if(e){t.k=e;var n=function(e){if(e.Tc())return null;var t=e.k;return nA[t]}(t);n?n.$c=t:nA[e]=[t]}}function Zw(e,t){var n,r;r=!1;do{r|=n=e.i?xx(e,t):mx(e,t)}while(n);return r}function $w(e,t,n){var r,i;r=t;do{i=ro(e.n[r.k])+n,e.n[r.k]=i,r=e.a[r.k]}while(r!=t)}function Kw(e,t){return kv(e,"set1"),kv(t,"set2"),nc(),new ff(e,new Ta(t),t)}function Qw(e){var t=/function(?:\s+([\w$]+))?\s*\(/.exec(e);return t&&t[1]||pA}function Jw(){Jw=r,MV=$x((P_(),Sx(Io(RV,1),HA,123,0,[IV,LV,TV,SV,NV,OV])))}function em(){em=r,QV=$x((M_(),Sx(Io(uU,1),HA,124,0,[WV,XV,$V,qV,ZV,UV])))}function tm(){tm=r,MX=Sx(Io(iW,1),vM,26,12,[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15])}function nm(){nm=r,Rq=new Cc(GM,0),Dq=new Cc("INPUT",1),jq=new Cc("OUTPUT",2)}function rm(e){this.c=e,this.b=new Xx(new Hn(e.b).a),this.a=null,this.d=(Uu(),Uu(),VD)}function im(e){this.e=e,this.d=new Sa(cx(ng(this.e).Y())),this.c=this.e.a,this.b=this.e.c}function om(e,t,n){this.c=e,Gb.call(this),this.b=t,this.j=new mp(t.d,t.e,t.c,t.b),this.a=n}function am(e,t){e.j>0&&e.c0&&0!=e.e&&am(e.g,t/e.j*e.g.d))}function sm(e){return e.b.d.f.g==(j_(),DH)?Yf(kx(e.b.d.f,(ZI(),oq)),7):e.b.d}function cm(e){return e.b.c.f.g==(j_(),DH)?Yf(kx(e.b.c.f,(ZI(),oq)),7):e.b.c}function um(e){switch(zc(3!=e.d),e.d){case 2:return!1;case 0:return!0}return function(e){return e.d=3,e.c=function(e){for(var t;e.b.G();)if(t=e.b.H(),e.a.D(t))return t;return e.d=2,null}(e),2!=e.d&&(e.d=0,!0)}(e)}function lm(e){switch(e.e){case 2:return wI(),KG;case 4:return wI(),IG;default:return e}}function hm(e){switch(e.e){case 1:return wI(),ZG;case 3:return wI(),AG;default:return e}}function fm(e,t){var n;return Fp(),n=new Us(1),_l(e)?Fv(n,e,t):YN(n.d,e,t),new tr(n)}function dm(e,t){return e.g?(e.g=dm(e.g,t),--e.a,e.j=EE(e.j,t.c),Z_(e)):e.e}function gm(e,t){return e.e?(e.e=gm(e.e,t),--e.a,e.j=EE(e.j,t.c),Z_(e)):e.g}function pm(e,t){var n,r,i;for(Gd(t),n=!1,i=t.mb();i.G();)r=i.H(),n|=e.ib(r);return n}function vm(e){var t,n;for(n=new Gr,t=e.b.mb();t.G();)Of(n,Yf(t.H(),92).a);return n}function bm(e){var t,n,r;for(t=0,r=e.mb();r.G();)t+=(Gd(n=Oh(r.H())),n);return t/e.Y()}function ym(e,t){var n;return(n=Yf(Kg(e.c,t),200))||((n=new Kr).c=t,yp(e.c,n.c,n)),n}function wm(e,t){var n;return Gd(t),n=t.e,!e.b[n]&&(Hg(e.b,n,t),++e.c,!0)}function mm(e,t){var n,r;return n=1-t,r=e.a[n],e.a[n]=r.a[t],r.a[t]=e,e.b=!0,r.b=!1,r}function xm(e,t){var n;return!!hl(t,10)&&(n=Yf(t,10),e.a==n.a&&e.b==n.b)}function Em(e,t,n){return e.g=new Sm(t,n),Ch(e,e.g,e.i),e.d=Ho(2,e.d),++e.a,e.j=mE(e.j,n),e}function Cm(e,t,n){return e.e=new Sm(t,n),Ch(e.f,e.e,e),e.d=Ho(2,e.d),++e.a,e.j=mE(e.j,n),e}function km(e,t){var n=e.a,r=0;for(var i in n)n.hasOwnProperty(i)&&(t[r++]=i);return t}function _m(e,t){var n,r;for(Gd(t),r=t.bb().mb();r.G();)n=Yf(r.H(),21),e.db(n.yb(),n.zb())}function Nm(e,t,n){this.g=e,this.d=t,this.e=n,this.a=new Pt,function(e){var t,n,r,i;for(i=bO(new Fh(e.d,e.e));i.G();)for(r=Yf(i.H(),7),n=new Zn(e.e==(wI(),KG)?r.b:r.e);n.a0),this.b=e,this.c=t,this.j=t,this.a=1,this.d=1,this.e=null,this.g=null}function Om(e){return 1.4901161193847656e-8*IS(e,26)+11102230246251565e-32*IS(e,27)}function Tm(e){return hl(e,87)?nb(Yf(e,87)):hl(e,88)?Yf(e,88).a:hl(e,63)?new Mi(e):new Za(e)}function Lm(e){var t;return t=Yf(kx(e,(ZI(),qU)),32),e.g==(j_(),DH)&&(t==(wI(),KG)||t==IG)}function Im(e,t){return!!function(e,t){var n,r,i;for(n=Yf(kx(t,(ZI(),VU)),18),i=Yf(W_(TH,n),18).mb();i.G();)if(r=Yf(i.H(),18),!Yf(W_(e.a,r),20).V())return!1;return!0}(e,t)&&(dS(e.a,Yf(kx(t,(ZI(),VU)),18),t),!0)}function Am(e,t){var n;if(t)for(n=0;n<6;n++)Yf(dd(e.a,n),18).jb(Yf(dd(t.a,n),19));return e}function Mm(e,t){var n;return e.b?null:(n=function(e,t){return new kh(e>0?e-1:e,t)}(e.e,e.f),Of(e.a,n),n.g=e,e.d=t,n)}function Pm(e,t){var n,r;for(r=Tk(e,0);r.b!=r.d.c;)(n=Yf(Tb(r),10)).a+=t.a,n.b+=t.b;return e}function Dm(e,t){var n,r;for(n=0;n0?e.g?Ym(e.g,t,n):0:e.c}function zm(e,t){var n,r;return!!e.c&&(r=e.g,(n=e.a.$b(t,r))>0|0==n&e.f==(Vu(),BD))}function Vm(e){var t;return 0==(t=e.h)?e.l+e.m*EM:t==xM?e.l+e.m*EM-CM:e}function Um(e){var t,n,r,i;for(t=new so,r=0,i=e.length;r=i;o--)e[o+1]=e[o];e[i]=r}function Km(e,t,n,r){var i,o;for(i=function(e,t,n,r){var i,o,a,s;for(o=t,i=n-1;o<=i;)if((s=e[a=o+i>>>1])r))return a;i=a-1}return-(o+1)}(e,t,n,r),i<0&&(i=-i-1),o=n-1;o>=i;o--)e[o+1]=e[o];e[i]=r}function Qm(e,t){var n,r;for(Gd(t),r=t.mb();r.G();)if(n=r.H(),!e.kb(n))return!1;return!0}function Jm(e){var t,n,r;return n=0,(r=e)<0&&(r+=CM,n=xM),t=yv(r/EM),kf(yv(r-t*EM),t,n)}function ex(e,t){return e.c.c=_y(_D,GA,1,0,4,1),vN(e,e.e,t),vN(e,e.a,t),Fp(),xb(e.c,null),function(e){var t,n,r;for(t=0,r=new Zn(e.c);r.a0;r--)n|=UC(e,t,r-1,r);return n}function xx(e,t){var n,r,i;for(n=!1,r=e.d[t].length,i=0;it?1:e==t?0:isNaN(e)?isNaN(t)?0:1:-1}function Ix(e){switch(e.Y()){case 0:return YD;case 1:return new Yd(e.mb().H());default:return new sb(e)}}function Ax(){var e,t;Ax=r,t=!(Error.stackTraceLimit||"stack"in new Error),e=new yt,oA=t?new s:e}function Mx(){Mx=r,UB=new Lf("intCoordinates",(zd(),zd(),SX)),qB=new ld("jsonObject"),XB=new Qa(0,0)}function Px(){Px=r,$H=new Ls("MIRROR_X",0),KH=new Ls("TRANSPOSE",1),ZH=new Ls("MIRROR_AND_TRANSPOSE",2)}function Dx(){Dx=r,DV=new vc(BM,0),PV=new vc("INCOMING_ONLY",1),jV=new vc("OUTGOING_ONLY",2)}function jx(){return NI(),Sx(Io(_V,1),HA,60,0,[Zz,qz,Uz,Qz,Kz,vV,pV,$z,Xz,Wz,Jz,dV,gV])}function Rx(){var e,t,n,i;for(Rx=r,uY=new _C(_V),n=0,i=(t=jx()).length;n0)return zf(t-1,e.a.c.length),yy(e.a,t-1);throw new mi}function Ux(e){e.b.c.length-e.e.c.length<0?(Gh(e,(wI(),IG)),e.a.a=e.j.a):(Gh(e,(wI(),KG)),e.a.a=0)}function qx(e,t){jd(e>=0,"Negative initial capacity"),jd(t>=0,"Non-positive load factor"),wy(this)}function Xx(e){var t;this.e=e,this.d=new ey(this.e.e),this.a=this.d,this.b=ix(this),t=e[gD],this[gD]=t}function Wx(){this.n=null,this.j=null,this.i=null,this.d=null,this.b=null,this.k=null,this.a=null}function Zx(e){var t,n,r,i;for(i=1,n=0,r=e.length;n=48&&e<58?e-48:e>=97&&e<97?e-97+10:e>=65&&e<65?e-65+10:-1}function wE(e){switch(cf(),e.Y()){case 0:return ip(),KD;case 1:return new ca(e.mb().H());default:return new Zs(e)}}function mE(e,t){var n;return Vl(e)&&Vl(t)&&kM<(n=e+t)&&n>22),i=e.h+t.h+(r>>22),kf(n&mM,r&mM,i&xM)}(Vl(e)?Jm(e):e,Vl(t)?Jm(t):t))}function xE(e,t){var n;return Vl(e)&&Vl(t)&&kM<(n=e*t)&&n>13|(15&e.m)<<9,i=e.m>>4&8191,o=e.m>>17|(255&e.h)<<5,a=(1048320&e.h)>>8,v=r*(s=8191&t.l),b=i*s,y=o*s,w=a*s,0!=(c=t.l>>13|(15&t.m)<<9)&&(v+=n*c,b+=r*c,y+=i*c,w+=o*c),0!=(u=t.m>>4&8191)&&(b+=n*u,y+=r*u,w+=i*u),0!=(l=t.m>>17|(255&t.h)<<5)&&(y+=n*l,w+=r*l),0!=(h=(1048320&t.h)>>8)&&(w+=n*h),d=((p=n*s)>>22)+(v>>9)+((262143&b)<<4)+((31&y)<<17),g=(b>>18)+(y>>5)+((4095&w)<<8),g+=(d+=(f=(p&mM)+((511&v)<<13))>>22)>>22,kf(f&=mM,d&=mM,g&=xM)}(Vl(e)?Jm(e):e,Vl(t)?Jm(t):t))}function EE(e,t){var n;return Vl(e)&&Vl(t)&&kM<(n=e-t)&&n>22),i=e.h-t.h+(r>>22),kf(n&mM,r&mM,i&xM)}(Vl(e)?Jm(e):e,Vl(t)?Jm(t):t))}function CE(){CE=r,Lj=new ss(GM,0),Tj=new ss(DM,1),Oj=new ss(PM,2),Sj=new ss("DOWN",3),Ij=new ss("UP",4)}function kE(){kE=r,zj=new us(GM,0),Fj=new us("POLYLINE",1),Hj=new us("ORTHOGONAL",2),Yj=new us("SPLINES",3)}function _E(){_E=r,tR=new hs("INHERIT",0),eR=new hs("INCLUDE_CHILDREN",1),nR=new hs("SEPARATE_CHILDREN",2)}function NE(){NE=r,BY=bd(pd(new iC,(WI(),cF)),SF),HY=gd(bd(vd(new iC,nF),eF),tF),FY=gd(yd(new iC,rF),tF)}function SE(){SE=r,YY=bd(pd(new iC,(WI(),cF)),SF),zY=gd(bd(vd(new iC,nF),eF),tF),VY=gd(yd(new iC,rF),tF)}function OE(e){this.a=new Lu,this.d=new Lu,this.b=new Lu,this.c=new Lu,this.g=new Lu,this.i=new Lu,this.f=e}function TE(e,t,n,r,i,o){this.e=new Pt,this.f=(nm(),Rq),Tf(this.e,e),this.d=t,this.a=n,this.b=r,this.f=i,this.c=o}function LE(e,t,n,r,i){var o,a;for(a=e.mb();a.G();)(o=Yf(a.H(),33)).i.a=t.a,o.i.b=i?t.b:t.b+r.b-o.j.b,t.a+=o.j.a+n}function IE(e,t){var n,r;for(jf(),r=Lg(G_(e));eC(r);)if((n=Yf(_v(r),12)).d.f==t||n.c.f==t)return n;return null}function AE(e,t,n){var r,i,o;for(r=0,o=Tk(e,0);o.b!=o.d.c&&!((i=ro(Oh(Tb(o))))>n);)i>=t&&++r;return r}function ME(e,t){var n;return t?((n=t.n?t.n:(Fp(),Fp(),RX)).V()||(e.n?_m(e.n,n):e.n=new cu(n)),e):e}function PE(e,t,n){try{!function(e,t,n){if(Md(t),n.G())for(eu(t,e.C(n.H()));n.G();)eu(t,e.c),eu(t,e.C(n.H()))}(e,t,n)}catch(e){throw hl(e=rE(e),181)?new sw(e):DE(e)}return t}function DE(e){var t;return hl(e,164)&&Wc((t=Yf(e,164)).b)!==Wc((ii(),iA))?Wc(t.b)===Wc(iA)?null:t.b:e}function jE(e,t){var n;for(n=Yf(kx(Zg(e),(ZI(),lq)),9);n;){if(n==t)return!0;n=Yf(kx(Zg(n),lq),9)}return!1}function RE(e){switch(Yf(kx(e,(ZI(),KU)),140).e){case 1:Ky(e,KU,(Rw(),mU));break;case 2:Ky(e,KU,(Rw(),EU))}}function GE(e){switch(cf(),e.c){case 0:return ip(),KD;case 1:return new ca(PN(new Vs(e)));default:return new Li(e)}}function BE(e){var t,n;for(rp(),t=0,n=e.length;t-129&&e<128?(t=e+128,!(n=(Vd(),AX)[t])&&(n=AX[t]=new In(e)),n):new In(e)}function ZE(e){var t,n;for(t=S_(e.b,e.d),n=yA;n>t;){if(ax(e,e.d),0==t){n=0;break}oC(e),CC(e),n=t,t=S_(e.b,e.d)}e.c=n}function $E(){var e,t,n;eN(),n=qX+++(Date.now?Date.now():(new Date).getTime()),e=yv(Math.floor(n*KP))&xD,t=yv(n-e*mD),this.a=1502^e,this.b=t^wD}function KE(e){return _l(e)?dk(e):kl(e)?yv((Gd(e),e)):gh(e)?no((Gd(e),e))?1231:1237:Wd(e)?e.v():(_d(e),lh(e))}function QE(e,t,n,r){var i,o,a;for(a=0,o=bO(new Fh(t,r));o.G();)i=Yf(o.H(),7),yp(e.i,i,WE(a++));yp(n,t,WE(a))}function JE(e){var t;return(t=Yf(kx(e,(JI(),gR)),59))==(CE(),Lj)?Yf(kx(e,(ZI(),OU)),15).a>=1?Tj:Sj:t}function eC(e){if(Md(e.b),e.b.G())return!0;for(;e.a.G();)if(Md(e.b=e.Wb(e.a.H())),e.b.G())return!0;return!1}function tC(e){return e.d==e.c.d&&e.i==e.g.d||(e.a.c=_y(_D,GA,1,0,4,1),ox(e.a,e.c),ox(e.a,e.g),e.d=e.c.d,e.i=e.g.d),e.a}function nC(e){var t;if(e.b){if(nC(e.b),e.b.d!=e.c)throw new wi}else e.d.V()&&(t=Yf(Kg(e.f.b,e.e),19))&&(e.d=t)}function rC(e,t,n,r,i){var o,a,s,c;for(function(e,t,n,r,i){r?function(e,t){var n,r;for(r=new Zn(t);r.a1&&(xb(t,e.b),function(e,t){var n,r,i,o,a,s,c,u,l;for(i=new Pt,c=new Zn(t);c.at){Jv(n);break}}kg(n,t)}function sC(e,t,n){var r;return r=ka(e.a,t),function(e,t,n){e.set(t,n)}(e.a,t,void 0===n?null:n),void 0===r?(++e.c,Qh(e.b)):++e.d,r}function cC(e,t,n){return(t-e<=0?0-(t-e):t-e)HP?e-n>HP:n-e>HP)}function uC(e){switch(e.e){case 0:return GV;case 1:return BV;case 2:return HV;case 3:return FV;default:return YV}}function lC(e,t){switch(t.e){case 2:return e.b;case 1:return e.c;case 4:return e.d;case 3:return e.a;default:return!1}}function hC(e){switch(wI(),e.e){case 4:return AG;case 1:return IG;case 3:return ZG;case 2:return KG;default:return $G}}function fC(e,t){if(t==e.c)return e.d;if(t==e.d)return e.c;throw new oo("Node "+t+" not part of edge "+e)}function dC(e,t){var n;return Ul(e.a,t)?Yf(Ul(e.a,t)?e.b[t.e]:null,62):(n=new Br,wm(e.a,t),Og(e,t.e,n),n)}function gC(e,t){var n,r,i;for(i=e.g.tb(),n=0;i.G();){if((r=ro(Oh(i.H()))-t)>uD)return n;r>lD&&++n}return n}function pC(e){var t,n,r,i;return wm(n=new Wf(t=Yf(na((i=(r=e.$c).f)==jD?r:i),11),Yf(Sg(t,t.length),11),0),e),n}function vC(e,t){var n,r;for(r=new Zn(t);r.a %s",Sx(Io(_D,1),GA,1,4,[WE(t),WE(n)])),s_(t,n=n<(r=e.length)?n:r,r),n-t}function EC(e,t){var n,r,i;for(n=e,i=0;;){if(n==t)return i;if(!(r=Yf(kx(n,(ZI(),lq)),9)))throw new Vr;n=Zg(r),++i}}function CC(e){var t,n,r;for(r=!1,n=e.d.length-1;n>=0;n--)e.j=(t=new pN(e.e,e.d,n,1),new B_(n,e.d,t)),r|=Zw(e,n);return r}function kC(e){this.f=(ml(),new Er),this.n=new Er,this.k=new Er,this.g=new Ki,this.i=new lk((si(),ZD)),this.j=e,function(e,t){var n,r,i,o,a;for(n=0,a=0,i=0,o=t.length;i0?e-t:-(e-t))<=yM||e==t||isNaN(e)&&isNaN(t)?0:et?1:vu(isNaN(e),isNaN(t)))>0}function DC(e,t){return Oo(),Oo(),((e-t>0?e-t:-(e-t))<=yM||e==t||isNaN(e)&&isNaN(t)?0:et?1:vu(isNaN(e),isNaN(t)))<0}function jC(e){var t,n;for(e.d||function(e){var t,n,r,i,o,a;if(i=e.g.tb(),r=e.b.tb(),e.e)for(n=0;nuD;){for(o=t,a=0;(t-o<=0?0-(t-o):t-o)oE(e.a,r,i)+e.c.b+e.d.b)}(e.j,n,r)&&(function(e,t,n){!function(e,t,n){ZS(e,t,n,(wI(),IG),e.f),ZS(e,t,n,KG,e.n)}(e.c,t,n)}(e.j,e.d[t][n],e.d[t][r]),a=(o=e.d[t])[r],o[r]=o[n],o[n]=a,i=!0),i}function qC(e,t,n){var r,i,o,a,s;i=(s=Zg(e)).a,r=Yf(kx(s,(ZI(),PU)),15).a,o=s.d,a=e.i,t&&(a.a=a.a-i.b-r-o.a),n&&(a.b=a.b-i.d-r-o.b)}function XC(e,t){var n,r,i;for(r=Lg(G_(e));eC(r);)return n=Yf(_v(r),12),new Gt(Md((i=Yf(t.B(n),9)).i.b+i.j.b/2));return ai(),ai(),kD}function WC(e){var t,n,r,i;for(n=vL(e),t=RP,i=0,r=0;t>.5&&i<50;)t=_a(X_(n,r=fO(n),!0).b),++i;return X_(e,r,!1)}function ZC(e){var t,n,r,i;for(n=vL(e),t=RP,i=0,r=0;t>.5&&i<50;)t=_a(X_(n,r=hO(n),!0).a),++i;return X_(e,r,!1)}function $C(e){var t,n,r;for(this.a=new Lu,this.e=new Ki,this.f=0,n=0,r=e.length;n0),t.a.sb(t.c=--t.b))}function ik(e,t,n){FC(n,"Compound graph preprocessor",1),e.a=new Xs,oL(e,t,null),function(e,t){var n,r,i,o,a,s,c;for(a=ng(e.a).mb();a.G();){if((o=Yf(a.H(),12)).b.c.length>0)for(xb(r=new hf(Yf(W_(e.a,o),18)),new an(t)),i=new $v(o.b,0);i.b=e.b>>1)for(r=e.c,n=e.b;n>t;--n)r=r.b;else for(r=e.a.a,n=0;n0&&(i.b+=t),i}function Ik(e,t){var n,r,i;for(i=new so,r=e.mb();r.G();)iT(n=Yf(r.H(),55),0,i.b),i.b+=n.e.b+t,i.a=Go(i.a,n.e.a);return i.a>0&&(i.a+=t),i}function Ak(e,t,n){var r,i,o;return(i=Yf(Kg(e.c,t),176))?(o=pf(i,n),Bl(e,i),o):(r=new od(e,t,n),yp(e.c,t,r),Ov(r),null)}function Mk(e){switch(e.e){case 8:return wI(),AG;case 9:return wI(),ZG;case 10:return wI(),IG;case 11:return wI(),KG;default:return wI(),$G}}function Pk(e,t){return _l(e)?!!cA[t]:e._c?!!e._c[t]:kl(e)?!!sA[t]:!!gh(e)&&!!aA[t]}function Dk(){Mx(),this.i=(ml(),new Er),this.a=new Er,this.k=new Er,this.j=new Er,this.b=new Er,this.n=new Er,this.f=new Er,this.e=new Er}function jk(e,t){var n,r;t.a.R(e)||(r=Yf(kx(e,(ZI(),qU)),32),n=Yf(dd(e.f,0),7),r==(wI(),AG)?Gh(n,ZG):r==ZG&&Gh(n,AG),t.a.db(e,t))}function Rk(e){return Ho(1,Yf(kx(e,(ZI(),pq)),24).a)*(e.c.f.g==(j_(),GH)&&e.d.f.g==GH?1:e.c.f.g==GH||e.d.f.g==GH?2:8)}function Gk(e){var t,n,r,i;for(i=Yf(kx(e,(ZI(),oq)),7),n=0,r=(t=Yf(Yk(e.b,_y(AH,NP,12,e.b.c.length,0,1)),47)).length;nr&&Hg(t,r,null),t}function zk(e,t){var n,r;for(r=e.a.length,t.lengthr&&Hg(t,r,null),t}function Vk(e){return _l(e)?e:kl(e)?Na((Gd(e),e)):gh(e)?vl(no((Gd(e),e))):Wd(e)?e.w():_d(e)?vv(e):e.toString?e.toString():"[JavaScriptObject]"}function Uk(){Uk=r,gz=new ac("SIMPLE",0),hz=new ac(UP,1),fz=new ac("LINEAR_SEGMENTS",2),lz=new ac("BRANDES_KOEPF",3),dz=new ac(ZP,4)}function qk(){qk=r,Aq=new Ec(BM,0),Oq=new Ec("FIRST",1),Tq=new Ec("FIRST_SEPARATE",2),Lq=new Ec("LAST",3),Iq=new Ec("LAST_SEPARATE",4)}function Xk(){Xk=r,Fz=new ct,Bz=bd(new iC,(WI(),wF)),Hz=gd(bd(new iC,jF),DF),Rz=gd(yd(bd(vd(new iC,EF),kF),NF),CF),Gz=gd(yd(new iC,NF),uF)}function Wk(e){var t,n,r;for(n=new zn(new Yn(e.d.a).a.bb().mb());n.a.G();)r=Yf(n.a.H(),21),Tf((t=Yf(r.yb(),12)).c.e,t),Tf(t.d.b,t)}function Zk(e,t){var n,r;if(Su(t>0),(t&-t)==t)return yv(t*IS(e,31)*4.656612873077393e-10);do{r=(n=IS(e,31))%t}while(n-r+(t-1)<0);return yv(r)}function $k(e,t){if(e.c.f==t)return e.d.f;if(e.d.f==t)return e.c.f;throw new oo("Node "+t+" is neither source nor target of edge "+e)}function Kk(e,t,n){return Su(e>=0&&e<=1114111),e>=mA?(t[n++]=55296+(e-mA>>10&1023)&xA,t[n]=56320+(e-mA&1023)&xA,2):(t[n]=e&xA,1)}function Qk(e){var t,n;if(!e.a)for(e.a=Ol(Yf(e.e,9).c.c.length),n=new Zn(Yf(e.e,9).c);n.ai&&Hg(t,i,null),t}function o_(e,t,n){if(n&&(t<0||t>n.a.c.length))throw new oo("index must be >= 0 and <= layer node count");e.d&&Gy(e.d.a,e),e.d=n,n&&Ld(n.a,t,e)}function a_(e,t,n,r,i,o,a,s){var c,u;r&&((c=r.a[0])&&a_(e,t,n,c,i,o,a,s),function(e,t,n,r,i,o,a){var s,c;return(!t.Xc()||!((c=e.a.$b(n,r))<0||!i&&0==c))&&(!t.Yc()||!((s=e.a.$b(n,o))>0||!a&&0==s))}(e,n,r.d,i,o,a,s)&&t.ib(r),(u=r.a[1])&&a_(e,t,n,u,i,o,a,s))}function s_(e,t,n){if(e<0)throw new io(TA+e+" < 0");if(t>n)throw new io("toIndex: "+t+" > size "+n);if(e>t)throw new oo(TA+e+" > toIndex: "+t)}function c_(e,t){var n,r,i;return n=t.yb(),i=t.zb(),r=e.cb(n),!(!(Wc(i)===Wc(r)||null!=i&&sE(i,r))||null==r&&!e.R(n))}function u_(e,t,n){var r;(r=t.c.f).g==(j_(),RH)?(Ky(e,(ZI(),tq),Yf(kx(r,tq),7)),Ky(e,nq,Yf(kx(r,nq),7))):(Ky(e,(ZI(),tq),t.c),Ky(e,nq,n.d))}function l_(e,t,n){var r,i,o,a;for(function(e){var t,n;for(null==e.g&&(e.g=md(e)),t=0,n=e.g.length;tr&&e.charCodeAt(t-1)<=32;)--t;return r>0||t>19)!=(s=t.h>>19)?s-a:(r=e.h)!=(o=t.h)?r-o:(n=e.m)!=(i=t.m)?n-i:e.l-t.l}function x_(e){var t,n,r;for(n=new zn(new Yn(e.p.a).a.bb().mb());n.a.G();)if(r=Yf(n.a.H(),21),(t=Yf(r.yb(),89)).e&&e.b[t.b]<0)return t;return null}function E_(e,t){var n,r,i,o,a;r=Fo(e.d,t.d),o=Fo(e.e,t.e),(i=Go(e.d+e.c,t.d+t.c))=t.length)throw new io("Greedy SwitchDecider: Free layer layer not in graph.");this.b=t[e],this.c=new qh(this.b),this.d=new qm(this.b)}function H_(e,t){var n;if(this.f=e,this.b=this.f.c,Lb(t,n=e.d),t>=(n/2|0))for(this.e=e.e,this.d=n;t++0;)rb(this);this.a=null}function F_(e){var t,n,r;for(n=new Zn(e.a.b);n.a0&&(e.g=oN(e.g)),iN(e);case 2:return bu(e.e)<0&&(e.e=iN(e.e)),oN(e);default:return e.d=1+Ho(Ri(e.e),Ri(e.g)),e}}function $_(e,t){this.f=(ml(),new Er),this.b=new Er,this.j=new Er,this.a=e,this.c=t,this.c>0&&rS(this,this.c-1,(wI(),IG)),this.c0&&hS(e,t,n),0):(Yc(0==n),0)}function J_(e,t){var n,r,i,o,a;for(i=Yf(kx(t,(ZI(),mq)),15).a*Yf(kx(t,($I(),Zq)),15).a,a=e[0].i.a+e[0].j.a,o=1;o=0;t--)UX[t]=i,i*=.5;for(n=1,e=24;e>=0;e--)VX[e]=n,n*=.5}function tN(e){for(;0!=e.g.c&&0!=e.d.c;)Fl(e.g).c>Fl(e.d).c?(e.i+=e.g.c,zC(e.d)):Fl(e.d).c>Fl(e.g).c?(e.e+=e.d.c,zC(e.g)):(e.i+=nd(e.g),e.e+=nd(e.d),zC(e.g),zC(e.d))}function nN(e){var t,n,r,i;for(i=new Xo("["),t=!1,r=e.mb();r.G();)n=r.H(),t?i.a+=", ":t=!0,nu(i,n===e?"(this Collection)":(oi(),null==n?gA:Vk(n)));return i.a+="]",i.a}function rN(e){var t,n,r,i;for(i=new Xo("{"),t=!1,r=e.bb().mb();r.G();)n=Yf(r.H(),21),t?i.a+=", ":t=!0,nu(i,vb(e,n.yb())),i.a+="=",nu(i,vb(e,n.zb()));return i.a+="}",i.a}function iN(e){var t;return zc(!!e.g),t=e.g,e.g=t.e,t.e=e,t.j=e.j,t.a=e.a,e.a=1+ji(e.e)+ji(e.g),e.j=mE(mE(e.c,Gi(e.e)),Gi(e.g)),e.d=1+Ho(Ri(e.e),Ri(e.g)),t.d=1+Ho(Ri(t.e),Ri(t.g)),t}function oN(e){var t;return zc(!!e.e),t=e.e,e.e=t.g,t.g=e,t.j=e.j,t.a=e.a,e.a=1+ji(e.e)+ji(e.g),e.j=mE(mE(e.c,Gi(e.e)),Gi(e.g)),e.d=1+Ho(Ri(e.e),Ri(e.g)),t.d=1+Ho(Ri(t.e),Ri(t.g)),t}function aN(e){var t;fl(new Zn(f_(e.e)))&&((t=Yf(wC(e.e,(JI(),FR)),28))==(b_(),wG)?function(e){var t,n,r,i,o;for(t=e.e.j,r=new Zn(f_(e));r.a=mA?(t=55296+(e-mA>>10&1023)&xA,n=56320+(e-mA&1023)&xA,String.fromCharCode(t)+""+String.fromCharCode(n)):String.fromCharCode(e&xA)}function kN(e,t,n,r){var i;Tf(e.c,new wp(e,n,r,Yf(Kg(e.k,n),24).a)),qg(r)&&(t==e.e?r.d.f!=e.a&&r.c.f!=e.a:r.d.f!=e.e&&r.c.f!=e.e)&&(i=n==r.c?r.d:r.c,Tf(e.c,new wp(e,i,r,Yf(Kg(e.k,i),24).a)))}function _N(e,t){var n,r,i;if(t===e)return!0;if(!hl(t,57))return!1;if(i=Yf(t,57),e.Y()!=i.Y())return!1;for(r=i.bb().mb();r.G();)if(n=Yf(r.H(),21),!e._(n))return!1;return!0}function NN(e,t){var n,r,i;return ME(r=new _k(e),t),Ky(r,(ZI(),UU),t),Ky(r,(JI(),FR),(b_(),wG)),Ky(r,sR,(fk(),xj)),lr(r,(j_(),DH)),av(n=new __,r),Gh(n,(wI(),KG)),av(i=new __,r),Gh(i,IG),r}function SN(e,t){var n,r,i;for(i=yA,r=new Zn(tC(t));r.a0&&IN(e,o,n));t.k=0}function AN(e,t){if(0>t)throw new oo("Top must be smaller or equal to bottom.");if(0>e)throw new oo("Left must be smaller or equal to right.");this.d=0,this.c=e,this.a=t,this.b=0}function MN(e){var t,n,r;if(0==e.length)throw new oo(hD);for(n=0,r=e.length;n1)throw new oo("In straight hyperEdges there may be only one edge.");Of((i=new Yn(n.a).a.bb().mb(),r=Yf(new zn(i).a.H(),21),Yf(r.yb(),12)).a,new Qa(t,e.b))}function WN(e,t,n){var r,i;if(this.f=e,Lb(n,i=(r=Yf(Kg(e.b,t),126))?r.a:0),n>=(i/2|0))for(this.e=r?r.c:null,this.d=i;n++0;)Dv(this);this.b=t,this.a=null}function ZN(t,n){"undefined"===bA?undefined(n):((typeof document!==WM||"object"===lA&&e.exports)&&uW(t(n)),typeof document===WM&&typeof self!==WM&&self.postMessage(n))}function $N(e,t){var n,r,i,o;"x"in e.a&&(i=Yf(Sp(e,"x"),104),t.i.a=i.a),"y"in e.a&&(o=Yf(Sp(e,"y"),104),t.i.b=o.a),tP in e.a&&(r=Yf(Sp(e,tP),104),t.j.a=r.a),nP in e.a&&(n=Yf(Sp(e,nP),104),t.j.b=n.a)}function KN(e,t,n){var r;my(this),t==(fv(),CV)?_g(this.g,e.c):_g(this.o,e.c),_g(n==CV?this.g:this.o,e.d),_g(this.c,e),uk(this,Rv(e.c).b,r=Rv(e.d).b,r),this.f=function(e,t){return I_(),(e-t<=0?0-(e-t):e-t)<.2}(Rv(e.c).b,Rv(e.d).b)}function QN(e,t,n){var r,i,o,a,s;for(Fp(),s=new cw((a=new Zo(Yf(dd(t.a,n),18))).b.Y()),i=new er(a.b.mb());i.b.G();)r=Yf(i.b.H(),37),(o=Yf(Kg(e.a,r),31))||(o=YI(r),yp(e.a,r,o)),s.c[s.c.length]=o;return s}function JN(e){var t,n;if(zs(Yf(kx(e,(JI(),FR)),28)))for(n=new Zn(e.f);n.at&&r.$b(e[o-1],e[o])>0;--o)a=e[o],Hg(e,o,e[o-1]),Hg(e,o-1,a)}(t,n,r,o);else if(eS(t,e,s=n+i,c=s+((a=r+i)-s>>1),-i,o),eS(t,e,c,a,-i,o),o.$b(e[c-1],e[c])<=0)for(;n=r||t upperEndpoint (%s)",Sx(Io(_D,1),GA,1,4,[t,n])))}((s=e.$b(n,o))<=0,n,o),0==s&&Yc(r!=(Vu(),BD)|a!=BD))}function uS(e){if(this.a=e,e.c.f.g==(j_(),DH))this.c=e.c,this.d=Yf(kx(e.c.f,(ZI(),qU)),32);else{if(e.d.f.g!=DH)throw new oo("Edge "+e+" is not an external edge.");this.c=e.d,this.d=Yf(kx(e.d.f,(ZI(),qU)),32)}}function lS(){lS=r,Az=yd(new iC,(WI(),vF)),Pz=bd(new iC,wF),Dz=gd(bd(new iC,jF),DF),Iz=gd(yd(bd(new iC,hF),fF),dF),jz=bd(new iC,VF),Mz=gd(new iC,bF),Tz=gd(yd(bd(vd(new iC,EF),kF),NF),CF),Lz=gd(yd(new iC,NF),uF)}function hS(e,t,n){var r,i,o,a;return Nw(n,pM),0==n?T_(e,t):(Yc(uh(e.b,t)),(a=e.c.a)?(o=_y(iW,vM,26,1,12,1),r=CT(a,e.d,t,n,o),Dd(e.c,a,r),o[0]):(e.d.$b(t,t),i=new Sm(t,n),Ch(e.a,i,e.a),Dd(e.c,null,i),0))}function fS(e,t,n){var r,i,o,a,s;for(r=0,s=n,t||(r=n*(e.c.length-1),s*=-1),o=new Zn(e);o.a0&&((!rs(e.b.d)||!r.q.d)&&(!is(e.b.d)||!r.q.b)&&(r.j.e-=0>o/2-.5?0:o/2-.5),(!rs(e.b.d)||!r.q.a)&&(!is(e.b.d)||!r.q.c)&&(r.j.b+=0>o-1?0:o-1))}(e,t,n),o=new Pt,i=new Zn(e.b.a.b);i.a0&&((!rs(e.b.d)||!r.q.d)&&(!is(e.b.d)||!r.q.b)&&(r.j.e+=0>o/2-.5?0:o/2-.5),(!rs(e.b.d)||!r.q.a)&&(!is(e.b.d)||!r.q.c)&&(r.j.b-=o-1))}(e,t,n)}function pS(e,t){var n,r,i,o;for(e.c[t.k]=!0,Tf(e.a,t),o=new Zn(t.f);o.a(a=s+ro(e.b[e.f[i.k].k]))?n:a;return n-r}function ES(e){var t;return $y(t=new zi,"type",new Pd((Rh(uH),uH.n))),$y(t,ZM,new Pd(e.f)),e.b&&$y(t,"value",e.b),e.a&&$y(t,"context",e.a),$y(t,$M,new Pd(El(new ao("\n"),new Fn(new $n((null==e.g&&(e.g=md(e)),e.g)))))),t}function CS(e,t){var n,r,i,o,a;if(t===e)return!0;if(!hl(t,20))return!1;if(a=Yf(t,20),e.Y()!=a.Y())return!1;for(o=a.mb(),r=e.mb();r.G();)if(n=r.H(),i=o.H(),!(Wc(n)===Wc(i)||null!=n&&sE(n,i)))return!1;return!0}function kS(e){!nj&&((t=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F"])[34]='\\"',t[92]="\\\\",t[173]="\\u00ad",t[1536]="\\u0600",t[1537]="\\u0601",t[1538]="\\u0602",t[1539]="\\u0603",t[1757]="\\u06dd",t[1807]="\\u070f",t[6068]="\\u17b4",t[6069]="\\u17b5",t[8203]="\\u200b",t[8204]="\\u200c",t[8205]="\\u200d",t[8206]="\\u200e",t[8207]="\\u200f",t[8232]="\\u2028",t[8233]="\\u2029",t[8234]="\\u202a",t[8235]="\\u202b",t[8236]="\\u202c",t[8237]="\\u202d",t[8238]="\\u202e",t[8288]="\\u2060",t[8289]="\\u2061",t[8290]="\\u2062",t[8291]="\\u2063",t[8292]="\\u2064",t[8298]="\\u206a",t[8299]="\\u206b",t[8300]="\\u206c",t[8301]="\\u206d",t[8302]="\\u206e",t[8303]="\\u206f",t[65279]="\\ufeff",t[65529]="\\ufff9",t[65530]="\\ufffa",t[65531]="\\ufffb",nj=t);var t,n=e.replace(/[\x00-\x1f\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u2028-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb"\\]/g,(function(e){return function(e,t){var n=nj[e.charCodeAt(0)];return null==n?e:n}(e)}));return'"'+n+'"'}function _S(e,t){var n,r,i,o,a;for(r=new zn(new Yn((1==t?hH:lH).a).a.bb().mb());r.a.G();)for(i=Yf(r.a.H(),21),n=Yf(i.yb(),59),a=Yf(W_(e.f.c,n),18).mb();a.G();)o=Yf(a.H(),27),Gy(e.b.b,o.b),Gy(e.b.a,Yf(o.b,25).f)}function NS(e,t,n){var r,i,o,a;if(FC(n,"Recursive layout",2),0!=t.b.c.length){for(a=1/t.b.c.length,o=new Zn(t.b);o.a=2147483648&&(r-=4294967296),r)}function AS(e,t,n){var r,i,o;if(t!=n){r=t;do{Lh(e,r.d),(o=Yf(kx(r,(ZI(),lq)),9))&&(Pl(e,(i=r.a).b,i.d),Lh(e,o.i),r=Zg(o))}while(o);r=n;do{Ih(e,r.d),(o=Yf(kx(r,(ZI(),lq)),9))&&(Dl(e,(i=r.a).b,i.d),Ih(e,o.i),r=Zg(o))}while(o)}}function MS(e,t){var n,r,i,o,a;for(n=new Pt,a=new Qs,i=new zn(new Yn(e.a).a.bb().mb());i.a.G();)o=Yf(i.a.H(),21),wT(a,(r=Yf(o.yb(),12)).c,r,null),wT(a,r.d,r,null);for(;a.a;)Tf(n,GT(a,t,zl(Yf(kx(t,(JI(),FR)),28))));return n}function PS(e,t){var n,r,i,o,a;for(r=new zn(new Yn((1==t?hH:lH).a).a.bb().mb());r.a.G();)for(i=Yf(r.a.H(),21),n=Yf(i.yb(),59),a=Yf(W_(e.f.c,n),18).mb();a.G();)o=Yf(a.H(),27),Tf(e.b.b,Yf(o.b,25)),Tf(e.b.a,Yf(o.b,25).f)}function DS(e){var t,n,r,i,o,a;for(jf(),ml(),n=new ry,r=new Zn(e.e.c);r.a0&&i0):i<0&&-i0)}function BS(e,t,n,r,i){var o,a;xm(Um(Sx(Io(pj,1),KM,10,0,[i.f.i,i.i,i.a])),n)||(t.c==i?Hl(t.a,0,new Xc(n)):Of(t.a,new Xc(n)),r&&!Ea(e.a,n)&&((a=Yf(kx(t,(JI(),kR)),44))||(a=new Gr,Ky(t,kR,a)),Mb(a,o=new Xc(n),a.c.b,a.c),_g(e.a,o)))}function HS(e){var t,n,r,i,o,a;for(t=0,n=new Zn(e.a);n.a((a=Rv(r.d).b)-o<=0?0-(a-o):a-o)?t:a-o<=0?0-(a-o):a-o);return t}function FS(e,t){var n,r,i,o,a,s;if((r=e.b[t.k])>=0)return r;for(i=1,o=new Zn(t.f);o.a(a=FS(e,s))+1?i:a+1);return function(e,t,n){var r,i;for(r=(i=e.a.c).c.length;rc-n&&s=e.g.d?((t=e.f).e=dm(e.e,t),t.g=e.g,t.a=e.a-1,t.j=EE(e.j,n),Z_(t)):((t=e.i).g=gm(e.g,t),t.e=e.e,t.a=e.a-1,t.j=EE(e.j,n),Z_(t)):e.e:e.g}function qS(e){var t,n,r,i,o,a;for(i=new Zn(e.a);i.ao.k?Gh(a,ZG):a.g==ZG&&o.k>r.k&&Gh(a,AG))}function XS(e,t,n){var r,i,o;if(Nw(n,pM),0==n)return T_(e,t);o=e.c.a,i=_y(iW,vM,26,1,12,1);try{if(!uh(e.b,t)||!o)return 0;r=YT(o,e.d,t,n,i)}catch(e){if(hl(e=rE(e),119))return 0;if(hl(e,76))return 0;throw DE(e)}return Dd(e.c,o,r),i[0]}function WS(e){var t,n,r,i,o,a;for(nl(a=Yf(Yk(e.a,_y(HH,oP,9,e.a.c.length,0,1)),51),new re),n=null,i=0,o=a.length;i0)return KS(e,t,n.g);if(0!=r)return mE(mE(t.ac(n.g),t._b(n)),KS(e,t,n.e));switch(e.b.f.e){case 0:return mE(t._b(n),t.ac(n.g));case 1:return t.ac(n.g);default:throw new xr}}function QS(e,t,n){var r;if(!n)return 0;if((r=e.d.$b(e.b.e,n.b))<0)return QS(e,t,n.e);if(0!=r)return mE(mE(t.ac(n.e),t._b(n)),QS(e,t,n.g));switch(e.b.d.e){case 0:return mE(t._b(n),t.ac(n.e));case 1:return t.ac(n.e);default:throw new xr}}function JS(e,t,n,r){var i,o,a,s;return lr(a=new _k(e),(j_(),RH)),Ky(a,(ZI(),oq),t),Ky(a,(JI(),FR),(b_(),wG)),Ky(a,tq,n),Ky(a,nq,r),Gh(o=new __,(wI(),KG)),av(o,a),Gh(s=new __,IG),av(s,a),cv(t,o),ME(i=new Dp,t),Ky(i,kR,null),uv(i,s),cv(i,r),a}function eO(e,t){var n,r,i,o,a,s,c,u;for(n=0,a=0,s=(o=e.j).length;an.a&&(o=Ho(o,a.a-n.a-1));return o}function iO(e){var t,n;switch(t=Yf(kx(e,(JI(),TR)),15).a,n=Yf(kx(e,LR),15).a,Ky(e,LR,new Bn(t)),Ky(e,TR,new Bn(n)),Yf(kx(e,sR),103).e){case 1:Ky(e,sR,(fk(),kj));break;case 2:Ky(e,sR,(fk(),mj));break;case 3:Ky(e,sR,(fk(),Ej));break;case 4:Ky(e,sR,(fk(),Cj))}}function oO(e,t,n){var r,i,o;for(o=new Zn(e.e);o.a0&&(r.b.c-=r.c,r.b.c<=0&&r.b.f>0&&Of(t,r.b));for(i=new Zn(e.b);i.a0&&(r.a.f-=r.c,r.a.f<=0&&r.a.c>0&&Of(n,r.a))}function aO(e,t,n){var r,i,o;for(o=new Zn(e.j);o.a0&&(r.b.e-=r.c,r.b.e<=0&&r.b.k>0&&Of(t,r.b));for(i=new Zn(e.d);i.a0&&(r.a.k-=r.c,r.a.k<=0&&r.a.e>0&&Of(n,r.a))}function sO(e,t){switch(e.e){case 1:switch(t.e){case 1:return JP;case 4:return.5;case 3:return eD;case 2:return tD}break;case 2:switch(t.e){case 1:return JP;case 2:return.5;case 3:return eD;case 4:return tD}break;default:throw new oo(QP)}return 0}function cO(e,t){var n,r,i,o;for(Tu((o=new $v(e,0)).b0),o.a.sb(o.c=--o.b),Jh(o,i),Tu(o.b1)&&(++o,++a);return!zl(Yf(kx(n,(JI(),FR)),28))&&s&&(++o,++a),yp(i,n,WE(o)),a}function hO(e){var t,n,r,i,o,a,s,c,u,l;for(u=(l=(s=Yf((a=e.b.mb()).H(),92)).a.a)>uD,c=luD)&&!c)return bm(s.b);if(i&&c||r&&u)return(t=o/(o-l))*bm(n.b)+(1-t)*bm(s.b)}return 0}function fO(e){var t,n,r,i,o,a,s,c,u,l;for(u=(l=(s=Yf((a=e.b.mb()).H(),92)).a.b)>uD,c=luD)&&!c)return bm(s.b);if(i&&c||r&&u)return(t=o/(o-l))*bm(n.b)+(1-t)*bm(s.b)}return 0}function dO(e,t,n){var r,i;return r=0,qg(t)?Ea(e.g,t)?(XS(e.i,WE(Ah(e,t.c)),1),XS(e.i,WE(Ah(e,t.d)),1),gl(e.g,t),r+=vk(e,t,e.i)):(_g(e.g,t),hS(e.i,WE(Ah(e,t.c)),1),hS(e.i,WE(Ah(e,t.d)),1)):(i=T_(e.i,WE(Yf(Kg(e.k,n),24).a)),r+=e.g.a.Y()-i),r}function gO(e){switch(e.e){case 0:return $z;case 1:return Zz;case 2:return qz;case 3:return Uz;case 4:return Qz;case 5:return Kz;case 6:return vV;case 7:return pV;case 8:return Wz;case 9:return Xz;case 10:return dV;case 11:return Jz;default:return gV}}function pO(e){switch(e.e){case 0:return Kz;case 1:return vV;case 2:return pV;case 3:return $z;case 4:return Zz;case 5:return qz;case 6:return Uz;case 7:return Qz;case 8:return Wz;case 9:return Xz;case 10:return dV;case 11:return Jz;default:return gV}}function vO(e){switch(e.e){case 0:return qz;case 1:return Uz;case 2:return Qz;case 3:return Kz;case 4:return vV;case 5:return pV;case 6:return $z;case 7:return Zz;case 8:return Wz;case 9:return Xz;case 10:return dV;case 11:return Jz;default:return gV}}function bO(e){var t;switch(t=e.a.f,e.b){case 0:return new Zn(e.a.f);case 1:return pg(new Lv(t),O_(e));case 2:switch(e.c.e){case 2:case 1:return pg(new Zn(t),O_(e));case 3:case 4:return pg(new Lv(t),O_(e))}}throw new _o("PortOrder not implemented.")}function yO(e,t,n,r){this.e=e,this.j=Yf(kx(e,(ZI(),xq)),134),this.f=_y(HH,oP,9,t,0,1),this.b=_y(IX,hA,184,t,6,1),this.a=_y(HH,oP,9,t,0,1),this.d=_y(IX,hA,184,t,6,1),this.i=_y(HH,oP,9,t,0,1),this.g=_y(IX,hA,184,t,6,1),this.n=_y(IX,hA,184,t,6,1),this.k=n,this.c=r}function wO(e){if(!e.a.c||!e.a.d)throw new Eo((Rh(SY),SY.j+" must have a source and target "+(Rh(LY),LY.j+" specified.")));if(e.a.c==e.a.d)throw new Eo("Network simplex does not support self-loops: "+e.a+" "+e.a.c+" "+e.a.d);return Cg(e.a.c.g,e.a),Cg(e.a.d.c,e.a),e.a}function mO(e,t,n,r,i){r==(wI(),IG)&&i==IG?qp(e,t)>qp(e,n)?e.d=Ek(e,n):e.b=Ek(e,t):r==KG&&i==KG?qp(e,t)qp(e,n)&&(e.d=Ek(e,n),e.b=Ek(e,t)):qp(e,t)0&&o>0?t++:r>0?n++:o>0?i++:n++}xb(e.f,new Pe)}function EO(e,t,n,r){var i,o,a,s,c;n.d.f!=t.f&&(lr(i=new _k(e),(j_(),RH)),Ky(i,(ZI(),oq),n),Ky(i,(JI(),FR),(b_(),wG)),r.c[r.c.length]=i,av(a=new __,i),Gh(a,(wI(),KG)),av(s=new __,i),Gh(s,IG),c=n.d,cv(n,a),ME(o=new Dp,n),Ky(o,kR,null),uv(o,s),cv(o,c),bS(i,a,s))}function CO(e){var t,n,r,i,o,a,s;for(i=RP,a=RP,o=null,n=new cp(new sr(e.e));n.b!=n.c.a.b;)if(1==Yf((t=Hy(n)).d,60).c&&(r=Yf(t.e,116).a,s=Yf(t.e,116).b,(i-r>HP||r-iHP)&&(a=Yf(t.e,116).b,i=Yf(t.e,116).a,o=Yf(t.d,60),0==a&&0==i)))return o;return o}function kO(e,t){var n,r,i,o,a,s;return o=e.d,(s=Yf(kx(e,(JI(),JR)),15).a)<0&&Ky(e,JR,new Bn(s=0)),t.j.b=s,a=Math.floor(s/2),Gh(r=new __,(wI(),KG)),av(r,t),r.i.b=a,Gh(i=new __,IG),av(i,t),i.i.b=a,cv(e,r),ME(n=new Dp,e),Ky(n,kR,null),uv(n,i),cv(n,o),function(e,t,n){var r;(r=t.c.f).g==(j_(),RH)?(Ky(e,(ZI(),tq),Yf(kx(r,tq),7)),Ky(e,nq,Yf(kx(r,nq),7))):(Ky(e,(ZI(),tq),t.c),Ky(e,nq,n.d))}(t,e,n),function(e,t){var n,r;for(r=new $v(e.b,0);r.buD&&(this.b.ib(n),s=!1),this.b.ib(c);s&&this.b.ib(n)}function OO(e,t){var n,r,i,o,a,s,c;for(n=dP,j_(),s=GH,i=new Zn(t.a);i.a0?n:0,r.i.b=n+tf(e.a,o,s)):r.i.b=(Gd(a),a)),c=tf(e.a,o,s),r.i.bo?0:o)o?0:o:s,(0>(co?0:o)o?0:o:s)),o=c,c+=a,r=Yf(dd(e.c,i),9),(n=new xu(u)).j.b=t.j.b,dS(e.b,t,n),Tf(r.c,n);Gy(e.g.c,t),Tf(e.i,new Ts(e,t))}function GO(e,t,n){var r,i,o,a,s,c;for(t.k=1,i=t.d,c=yC(t,(nm(),jq)).mb();c.G();)for(r=new Zn(Yf(c.H(),7).e);r.ah+s&&r.I();for(a=new Zn(f);a.aHP||r-iHP)&&(a=Yf(t.e,116).b,i=Yf(t.e,116).a,o=Yf(t.d,60),0==a&&0==i)))return o;return o}function qO(){var e,t,n,r,i;for(this.e=(ml(),new ry),this.b=new Wf(n=Yf(na(_V),11),Yf(Sg(n,n.length),11),0),this.c=new Wf(r=Yf(na(_V),11),Yf(Sg(r,r.length),11),0),this.a=new Wf(i=Yf(na(_V),11),Yf(Sg(i,i.length),11),0),t=(NI(),NI(),Yz).mb();t.G();)e=Yf(t.H(),60),Ak(this.e,e,new So)}function XO(e,t,n){var r,i,o,a;_a(e.k-e.a)a?new Hw(t,e,o-a):o>0&&a>0&&(new Hw(e,t,0),new Hw(t,e,0)))}function WO(e,t){var n,r,i,o,a,s,c,u;for(c=new Pt,u=null,r=Yf(_p(uY,e),20).mb();r.G();){for(s=new zn(new Yn((n=Yf(r.H(),75)).c.a).a.bb().mb());s.a.G();)i=Yf(s.a.H(),21),Jh(t,o=Yf(i.yb(),7)),LS(o,e.b);ox(c,n.b),u=e.a}for(RN(c),Lw(c,u),a=new Zn(c);a.an.k&&s1&&(o=n?Lc(t.d)+1:Lc(a.d)-1,sv(a,Yf(dd(e.a.c,o),16))),JO(e,a,n));return t}function eT(e,t){var n,r,i,o;for(i=t.d?e.a.c==(hv(),wz)?qE(t.b):XE(t.b):e.a.c==(hv(),yz)?qE(t.b):XE(t.b),o=!1,Uu(),r=new Au(Du(Uf(i.a,new f)));eC(r);)if(n=Yf(_v(r),12),e.c.a[n.c.f.d.k]!==e.c.a[n.d.f.d.k]&&(o=!0,Ea(e.b,e.a.f[$k(n,t.b).k])))return t.c=!0,t.a=n,t;return t.c=o,t.a=null,t}function tT(e){var t,n,r,i,o,a,s;for(o=new Zn(e.a.a);o.a0&&Ox(this.n,!0,(CE(),Tj)),e.g==(j_(),DH)&&Sf(this.n,!1,!1,!1,!1)}function iT(e,t,n){var r,i,o,a,s,c,u,l;for(o=new Qa(t,n),u=new Zn(e.b);u.ar?h:r)>e.j.a&&(u=(s-e.j.a)/2,a.b=Go(a.b,u),a.c=Go(a.c,u))}function pT(e,t,n,r){var i,o,a,s,c,u,l,h;for(a=Pl(t.d,n,r),l=new Zn(t.b);l.a=40)&&function(e){var t,n,r,i,o,a,s;for(e.o=new ri,r=new co,a=new Zn(e.e.a);a.a0,s=fC(t,o),Mu(n?s.c:s.g,t),1==tC(s).c.length&&Mb(r,s,r.c.b,r.c),i=new Ja(o,t),su(e.o,i),Gy(e.e.a,o))}(e),function(e){var t,n,r,i,o,a,s,c,u,l;for(u=e.e.a.c.length,o=new Zn(e.e.a);o.a0){for(qo(e.c);mS(e,Yf(Qv(new Zn(e.e.a)),61))0?(c=e.g)?(a=c.d,e.g=CT(c,t,n,r,i),0==i[0]&&++e.a,e.j=mE(e.j,r),e.g.d==a?e:Z_(e)):(i[0]=0,Em(e,n,r)):(i[0]=e.c,Yc(nE(mE(e.c,r),yA)<=0),e.c+=r,e.j=mE(e.j,r),e)}function kT(e,t,n){var r,i,o,a,s,c,u,l;for(i=!0,a=new Zn(t.c);a.au&&r>u)){i=!1,e.a&&Af();break}u=ro(n.n[s.k])+ro(n.d[s.k])+s.j.b+s.e.a}if(!i)break}return e.a&&Af(),i}function _T(e){var t,n,r,i,o,a;if(fl(new Zn(r=Jk(e)))){for(a=new mp(0,0,e.e.j.a,e.e.j.b),n=new Zn(r);n.aa.i.b-a.e.d+u.a+h&&(f=c.i+u.i,u.a=(u.i*u.a+c.i*c.a)/f,u.i=f,c.g=u,n=!0)),o=a,c=u;return n}function IT(e){var t,n,r,i,o;if(Wc(kx(e,(JI(),FR)))===Wc((b_(),mG))||Wc(kx(e,FR))===Wc(wG))for(o=new Zn(e.f);o.aa)return wI(),IG;break;case 4:case 3:if(l<0)return wI(),AG;if(l+n>o)return wI(),ZG}return(c=(u+s/2)/a)+(r=(l+n/2)/o)<=1&&c-r<=0?(wI(),KG):c+r>=1&&c-r>=0?(wI(),IG):r<.5?(wI(),AG):(wI(),ZG)}function MT(e,t,n,r,i,o,a){var s,c,u,l,h;for(h=new ic,c=t.mb();c.G();)for(l=new Zn(xk(Yf(c.H(),627)));l.a0&&Of(e.e,o)):(e.c[a]-=u+1,e.c[a]<=0&&e.a[a]>0&&Of(e.d,o))))}function DT(e){var t,n,r,i,o,a,s,c;for(Rx(),this.b=new Ze,this.c=new Pt,this.a=new Pt,s=0,c=(a=jx()).length;s0){for(i=s.length;i>0&&""==s[i-1];)--i;i0&&0==i[0]&&++e.a,e.j=mE(e.j,r-i[0]),Z_(e)):(i[0]=0,r>0?Cm(e,n,r):e):o>0?(s=e.g)?(e.g=FT(s,t,n,r,i),0==r&&0!=i[0]?--e.a:r>0&&0==i[0]&&++e.a,e.j=mE(e.j,r-i[0]),Z_(e)):(i[0]=0,r>0?Em(e,n,r):e):(i[0]=e.c,0==r?US(e):(e.j=mE(e.j,r-e.c),e.c=r,e))}function YT(e,t,n,r,i){var o,a,s;return(o=t.$b(n,e.b))<0?(a=e.e)?(e.e=YT(a,t,n,r,i),i[0]>0&&(r>=i[0]?(--e.a,e.j=EE(e.j,i[0])):e.j=EE(e.j,r)),0==i[0]?e:Z_(e)):(i[0]=0,e):o>0?(s=e.g)?(e.g=YT(s,t,n,r,i),i[0]>0&&(r>=i[0]?(--e.a,e.j=EE(e.j,i[0])):e.j=EE(e.j,r)),Z_(e)):(i[0]=0,e):(i[0]=e.c,r>=e.c?US(e):(e.c-=r,e.j=EE(e.j,r),e))}function zT(e,t,n){var r,i,o,a,s,c,u,l;for(c=new Zn(n.b);c.a0&&u>0&&qL(b,new Qa(_,u),!0))),p=Go(p,b.i.a+b.j.a),v=Go(v,b.i.b+b.j.b),d=new Zn(b.c);d.at.a&&(r.kb((P_(),NV))?e.d.a+=(n.a-t.a)/2:r.kb(OV)&&(e.d.a+=n.a-t.a)),n.b>t.b&&(r.kb((P_(),LV))?e.d.b+=(n.b-t.b)/2:r.kb(TV)&&(e.d.b+=n.b-t.b)),Yf(kx(e,(ZI(),WU)),18).kb((KO(),nU))&&(n.a>t.a||n.b>t.b))for(s=new Zn(e.b);s.a0||0==n&&t.f==(Vu(),BD))&&(s=t.g,c=t.f):(i=t.c,s=t.g,c=t.f),r&&i&&((n=e.a.$b(o,s))>0||0==n&&a==(Vu(),BD)&&c==(Vu(),BD))&&(o=s,Vu(),a=BD,c=GD),new cS(e.a,r,o,a,i,s,c)}function $T(e,t,n,r){var i,o,a,s,c,u;if(n.c.f!=t.f)for(lr(i=new _k(e),(j_(),RH)),Ky(i,(ZI(),oq),n),Ky(i,(JI(),FR),(b_(),wG)),r.c[r.c.length]=i,av(a=new __,i),Gh(a,(wI(),KG)),av(s=new __,i),Gh(s,IG),cv(n,a),ME(o=new Dp,n),Ky(o,kR,null),uv(o,s),cv(o,t),bS(i,a,s),u=new $v(n.b,0);u.b=r&&u.a>=r&&(l.a=r),f.a<=n&&u.a<=n&&(d.a=n-10),1==t.c.a.Y()?nw(a.a,Sx(Io(pj,1),KM,10,0,[l,h,g,d])):nw(a.a,Sx(Io(pj,1),KM,10,0,[l,h,i,g,d]))}function QT(e,t){var n,r,i,o,a,s;for(o=e.c,a=e.d,uv(e,null),cv(e,null),t&&no(ro(Sh(kx(a,(ZI(),ZU)))))?uv(e,WT(a.f,(nm(),jq),(wI(),IG))):uv(e,a),t&&no(ro(Sh(kx(o,(ZI(),uq)))))?cv(e,WT(o.f,(nm(),Dq),(wI(),KG))):cv(e,o),r=new Zn(e.b);r.aro(sl(a.g,a.d[0]).a)?(Tu(c.b>0),c.a.sb(c.c=--c.b),Jh(c,a),i=!0):s.e&&s.e.Y()>0&&(o=(!s.e&&(s.e=new Pt),s.e).nb(t),u=(!s.e&&(s.e=new Pt),s.e).nb(n),(o||u)&&((!s.e&&(s.e=new Pt),s.e).ib(a),++a.c));i||(r.c[r.c.length]=a)}function nL(e,t,n,r){var i,o,a,s,c,u,l,h,f,d,g;n.d.f!=t.f&&(lr(i=new _k(e),(j_(),RH)),Ky(i,(ZI(),oq),n),Ky(i,(JI(),FR),(b_(),wG)),r.c[r.c.length]=i,av(a=new __,i),Gh(a,(wI(),KG)),av(s=new __,i),Gh(s,IG),c=n.d,cv(n,a),ME(o=new Dp,n),Ky(o,kR,null),uv(o,s),cv(o,c),h=(l=(u=Yf(dd(a.b,0),12).c).f).g,g=(d=(f=Yf(dd(s.e,0),12).d).f).g,Ky(i,tq,h==RH?Yf(kx(l,tq),7):u),Ky(i,nq,g==RH?Yf(kx(d,nq),7):f))}function rL(e,t){var n,r,i,o,a,s,c,u,l,h,f,d,g;for(a=t,h=t.d,u=t.c.f,f=t.d.f,l=Lc(u.d),d=Lc(f.d),s=l;st&&(e.a=t),e.b<0?e.b=0:e.b>n&&(e.b=n)}(u,e.j.a,e.j.b),Gh(s,AT(s,o)),a=Yf(kx(r,(ZI(),WU)),18),c=s.g,o.e){case 2:case 1:(c==(wI(),AG)||c==ZG)&&a.ib((KO(),aU));break;case 4:case 3:(c==(wI(),IG)||c==KG)&&a.ib((KO(),aU))}else i=hC(o),s=WT(e,n,n==(nm(),jq)?i:vE(i));return s}function uL(e){var t,n,r,i,o,a,s,c;for(r=ah(Wb(e.a)),i=new Wf(t=Yf(na(_V),11),Yf(Sg(t,t.length),11),0);r.a.G()||r.b.mb().G();)s=(n=Yf(Sw(r),12)).c.g,c=n.d.g,s==(wI(),$G)?c!=$G&&(a=SC(c),Ky(n,(ZI(),Cq),a),Gh(n.c,c),wm(i,a),r.a.I()):c==$G?(a=SC(s),Ky(n,(ZI(),Cq),a),Gh(n.d,s),wm(i,a),r.a.I()):(a=iL(s,c),Ky(n,(ZI(),Cq),a),wm(i,a),r.a.I());return 1==i.c?o=Yf(Qb(new Vs(i)),60):(NI(),o=gV),dN(e,o,!1),o}function lL(e,t,n){var r,i,o,a,s,c,u,l,h;for(c=n+t.d.c.a,h=new Zn(t.f);h.a1,s=Lg(gu((rp(),new sb(BE(Sx(Io(_D,1),GA,1,4,[l.b,l.e]))))));eC(s);)u=(a=Yf(_v(s),12)).c==l?a.d:a.c,_a(Um(Sx(Io(pj,1),KM,10,0,[u.f.i,u.i,u.a])).b-o.b)>1&&BS(e,a,o,i,l)}}function hL(e,t){var n,r,i,o,a;for(a=new Xx(new Hn(e.f.b).a);a.b;){if(i=Yf((o=Vw(a)).yb(),251),1==t){if(i.yc()!=(CE(),Ij)&&i.yc()!=Sj)continue}else if(i.yc()!=(CE(),Oj)&&i.yc()!=Tj)continue;switch(r=Yf(Yf(o.zb(),27).b,25),n=Yf(Yf(o.zb(),27).a,78).c,i.yc().e){case 2:r.j.d=e.e.a,r.j.c=Go(1,r.j.c+n);break;case 1:r.j.d=r.j.d+n,r.j.c=Go(1,r.j.c-n);break;case 4:r.j.e=e.e.b,r.j.b=Go(1,r.j.b+n);break;case 3:r.j.e=r.j.e+n,r.j.b=Go(1,r.j.b-n)}}}function fL(e,t,n,r,i){var o,a,s,c,u,l,h,f;for(ml(),h=new Er,a=new Pt,qN(e,n,e.d.Mc(),a,h),qN(e,r,e.d.Nc(),a,h),s=new $v(a,0);s.b=l&&(y>l&&(u.c=_y(_D,GA,1,0,4,1),l=y),u.c[u.c.length]=g);0!=u.c.length&&(c=Yf(dd(u,Zk(t,u.c.length)),80),gp(S.a,c),c.d=h++,oO(c,_,E),u.c=_y(_D,GA,1,0,4,1))}for(m=e.c.length+1,p=new Zn(e);p.aN.d&&(sp(n),Gy(N.b,r),r.c>0&&(r.a=N,Tf(N.e,r),r.b=C,Tf(C.b,r)))}(a,Yf(kx(t,(ZI(),bq)),154)),function(e){var t,n,r,i,o,a,s,c,u;for(c=new Pt,a=new Pt,o=new Zn(e);o.a-1){for(i=new Zn(a);i.a0||(s.i=zo(s.i,r.i-1),--s.f,0==s.f&&(a.c[a.c.length]=s))}}(a),f=-1,l=new Zn(a);l.ah||r+i>c)throw new Ur;if(0!=(1&u.g)&&0==(4&u.g)||l==s)i>0&&v_(e,t,n,r,i,!0);else if(e===n&&tr;)n[a]=e[--t];else for(a=r+i;r0&&0==o[0]&&++e.a,e.j=mE(e.j,i-o[0])),Z_(e)):(o[0]=0,0==r&&i>0?Cm(e,n,i):e);if(a>0)return(c=e.g)?(e.g=pL(c,t,n,r,i,o),o[0]==r&&(0==i&&0!=o[0]?--e.a:i>0&&0==o[0]&&++e.a,e.j=mE(e.j,i-o[0])),Z_(e)):(o[0]=0,0==r&&i>0?Em(e,n,i):e);if(o[0]=e.c,r==e.c){if(0==i)return US(e);e.j=mE(e.j,i-e.c),e.c=i}return e}function vL(e){var t,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v;for(c=e.e,d=e.f,a=e.d,l=(g=e.c)-1,p=e.g,h=Hf(e.g.xb(1,e.g.Y()-1)),u=new Pt,n=0;n0&&(c=e.i.a/o);break;case 2:case 4:(i=e.f.j.b)>0&&(c=e.i.b/i)}Ky(e,(ZI(),dq),c)}if(s=e.j,r)e.a.a=r.a,e.a.b=r.b;else if(t!=EG&&t!=CG&&a!=$G)switch(a.e){case 1:e.a.a=s.a/2;break;case 2:e.a.a=s.a,e.a.b=s.b/2;break;case 3:e.a.a=s.a/2,e.a.b=s.b;break;case 4:e.a.b=s.b/2}else e.a.a=s.a/2,e.a.b=s.b/2}(c,u,i,Yf(kx(c,HR),10)),i.e){case 2:case 1:(c.g==(wI(),AG)||c.g==ZG)&&o.ib((KO(),aU));break;case 4:case 3:(c.g==(wI(),IG)||c.g==KG)&&o.ib((KO(),aU))}}function mL(e){var t,n,r,i,o;for(r=new Pt,o=new Zn(e.c.f);o.a=(p=e.d.c.c.c.length)-1)return null;for((i=new Pt).c[i.c.length]=t,b=t,a=n,d=-1,s=Yf(dd(e.d.c.c,n),16),f=0;f1&&a1&&a>1;)u=RT(e,y),s=Yf(dd(e.d.c.c,a),16),l=Yf(dd(e.d.c.c,a-1),16),o_(y,p=zo(Yf(g.sb(h++),24).a,l.a.c.length),l),o_(u,b,s),b=p,y&&(i.c[i.c.length]=y),y=u,--w,++o,--a;for(v=(r-(i.c.length-1)*e.d.d)/i.c.length,c=new Zn(i);c.a=0)return!1;if(n.e&&r==(j_(),PH)&&r!=n.e)return!1;if(t.k=n.b,Tf(n.f,t),n.e=r,r==(j_(),RH)||r==BH||r==PH)for(i=new Zn(t.f);i.a0&&(Ox(e.n,!1,(CE(),Oj)),Ox(e.n,!0,Tj))}function CL(e,t,n){var r,i,o,a;switch(o=e.i,i=Um(Sx(Io(pj,1),KM,10,0,[t.i,t.f.i])),r=Um(Sx(Io(pj,1),KM,10,0,[t.f.i,t.i,t.a])),a=t.d,t.g.e){case 4:o.a=Fo(i.a,r.a)-a.b-e.j.a-n,o.b=Um(Sx(Io(pj,1),KM,10,0,[t.f.i,t.i,t.a])).b+n;break;case 2:o.a=Go(i.a+t.j.a,r.a)+a.c+n,o.b=Um(Sx(Io(pj,1),KM,10,0,[t.f.i,t.i,t.a])).b+n;break;case 1:o.a=Um(Sx(Io(pj,1),KM,10,0,[t.f.i,t.i,t.a])).a+n,o.b=Fo(i.b,r.b)-a.d-e.j.b-n;break;case 3:o.a=Um(Sx(Io(pj,1),KM,10,0,[t.f.i,t.i,t.a])).a+n,o.b=Go(i.b+t.j.b,r.b)+a.a+n}}function kL(e,t,n){var r,i,o,a;switch(o=e.i,i=Um(Sx(Io(pj,1),KM,10,0,[t.i,t.f.i])),r=Um(Sx(Io(pj,1),KM,10,0,[t.f.i,t.i,t.a])),a=t.d,t.g.e){case 4:o.a=Fo(i.a,r.a)-a.b-e.j.a-n,o.b=Um(Sx(Io(pj,1),KM,10,0,[t.f.i,t.i,t.a])).b-e.j.b-n;break;case 2:o.a=Go(i.a+t.j.a,r.a)+a.c+n,o.b=Um(Sx(Io(pj,1),KM,10,0,[t.f.i,t.i,t.a])).b-e.j.b-n;break;case 1:o.a=Um(Sx(Io(pj,1),KM,10,0,[t.f.i,t.i,t.a])).a+n,o.b=Fo(i.b,r.b)-a.d-e.j.b-n;break;case 3:o.a=Um(Sx(Io(pj,1),KM,10,0,[t.f.i,t.i,t.a])).a+n,o.b=Go(i.b+t.j.b,r.b)+a.a+n}}function _L(){_L=r,hU=new kb("ONE_SIDED",0,!0,!1,!1),pU=new kb("TWO_SIDED",1,!1,!1,!1),fU=new kb("ONE_SIDED_BEST_OF_UP_OR_DOWN",2,!0,!0,!1),vU=new kb("TWO_SIDED_BEST_OF_UP_OR_DOWN",3,!1,!0,!1),dU=new kb("ONE_SIDED_BEST_OF_UP_OR_DOWN_ORTHOGONAL_HYPEREDGES",4,!0,!0,!0),bU=new kb("TWO_SIDED_BEST_OF_UP_OR_DOWN_ORTHOGONAL_HYPEREDGES",5,!1,!0,!0),gU=new kb("ONE_SIDED_ORTHOGONAL_HYPEREDGES",6,!0,!1,!0),lU=new kb("OFF",7,!1,!1,!1)}function NL(e,t,n,r,i,o,a){var s,c,u,l,h,f,d;return h=no(ro(Sh(kx(t,($I(),rX))))),f=null,o==(nm(),Dq)&&r.c.f==n?f=r.c:o==jq&&r.d.f==n&&(f=r.d),u=a,a&&h&&!f?(Tf(a.e,r),d=Bo(Yf(kx(a.d,(JI(),JR)),15).a,Yf(kx(r,JR),15).a),Ky(a.d,JR,new Bn(d))):(wI(),l=$G,f?l=f.g:zs(Yf(kx(n,(JI(),FR)),28))&&(l=o==Dq?KG:IG),c=function(e,t,n,r,i,o){var a,s,c,u,l,h,f;return u=r==(nm(),Dq)?o.c:o.d,c=JE(t),u.f==n?(a=Yf(Kg(e.b,u),9))||(Ky(a=bI(u,Yf(kx(n,(JI(),FR)),28),i,r==Dq?-1:1,u.j,c,t),(ZI(),oq),u),yp(e.b,u,a)):(l=Yf(kx(o,(JI(),JR)),15).a,s=function(e,t,n,r){var i,o;switch(i=JE(Zg(n)),av(o=new __,n),r.e){case 1:Gh(o,vE(hC(i)));break;case 2:Gh(o,hC(i))}return Ky(o,(ZI(),iq),Yf(kx(t,iq),15)),Ky(t,oq,o),yp(e.b,o,t),o}(e,a=bI((h=new v,f=Yf(kx(t,(ZI(),mq)),15).a*Yf(kx(t,($I(),Zq)),15).a/2,Ky(h,iq,new Bn(f)),h),Yf(kx(n,FR),28),i,r==Dq?-1:1,new Qa(l,l),c,t),n,r),Ky(a,oq,s),yp(e.b,s,a)),Yf(kx(t,(ZI(),WU)),18).ib((KO(),nU)),zs(Yf(kx(t,(JI(),FR)),28))?Ky(t,FR,(b_(),xG)):Ky(t,FR,(b_(),EG)),a}(e,t,n,o,l,r),s=pb((Zg(n),r)),o==Dq?(uv(s,Yf(dd(c.f,0),7)),cv(s,i)):(uv(s,i),cv(s,Yf(dd(c.f,0),7))),u=new TE(r,s,c,Yf(kx(c,(ZI(),oq)),7),o,!f)),dS(e.a,r,new gf(u.d,t,o)),u}function SL(e,t,n,r){var i,o,a,s,c,u,l;if(lr(o=new _k(e),(j_(),BH)),Ky(o,(JI(),FR),(b_(),wG)),i=0,t){for(Ky(a=new __,(ZI(),oq),t),Ky(o,oq,t.f),Gh(a,(wI(),KG)),av(a,o),c=0,u=(l=Yf(Yk(t.b,_y(AH,NP,12,t.b.c.length,0,1)),47)).length;cf?l:f;for(uk(this,Um(Sx(Io(pj,1),KM,10,0,[e.f.i,e.i,e.a])).b,h,l),a=new zn(new Yn(t.a).a.bb().mb());a.a.G();)i=Yf(a.a.H(),21),o=Yf(i.yb(),27),_g(this.c,Yf(o.b,12));this.f=!1}function PL(e,t,n,r){var i,o,a,s,c;if(!((s=(JI(),AR).b)in t.a)||!Sp(t,s).ic().a){if(!(c=Sp(t,ZM)))throw new wg("Labels must have a property 'text'.",null,t);if(!c.lc())throw new wg("A label's 'text' property must be a string.",c,t);if(Ky(o=new xu(c.lc().a),(ZI(),oq),t),yp(e.f,o,t),$N(t,o),C_(t,o),hl(n,9)?Tf(Yf(n,9).c,o):hl(n,12)?Tf(Yf(n,12).b,o):hl(n,7)&&Tf(Yf(n,7).c,o),hl(n,12))switch(a=Yf(kx(o,pR),107),$N(t,o),Ky(o,pR,a),i=Yf(kx(r,WU),18),a.e){case 2:case 3:i.ib((KO(),tU));case 1:case 0:i.ib((KO(),JV)),Ky(o,pR,(Gm(),Pj))}}}function DL(e,t){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v;for(i=0,o=0,c=new Zn(e.a);c.a.5?v-=2*o*(d-.5):d<.5&&(v+=2*i*(.5-d)),v<(r=a.e.b)&&(v=r),g=a.e.c,v>p.a-g-u&&(v=p.a-g-u),a.i.a=t+v}}function jL(){jL=r,nH=new Ki,tH=bT(Sx(Io(_j,1),GA,79,0,[(JI(),aR),wR])),QB=bT(Sx(Io(_j,1),GA,79,0,[PR,YR,($I(),fX),mR,(ZI(),pq),pX,sX])),WB=bT(Sx(Io(_j,1),GA,79,0,[cR,fR,AR,yR,CR,NR,SR,WR,ZR,ER,Bq,Uq,qq,nX,$q,rX,dX,cX,Fq])),KB=bT(Sx(Io(_j,1),GA,79,0,[LR,TR,_R,JR,MR,gq,PU,OU,mq,uX,Zq,tX])),$B=bT(Sx(Io(_j,1),GA,79,0,[VR,sR,gR,vR,pR,bR,xR,DR,jR,RR,GR,BR,FR,zR,Hq,Vq,iX,Xq,zq,oX,aX,Kq,Qq,eX,lX,hX,gX,vX,Jq])),ZB=bT(Sx(Io(_j,1),GA,79,0,[IR,$R,KR,Yq])),eH=bT(Sx(Io(_j,1),GA,79,0,[oR,lR,kR,OR,HR,qR])),JB=bT(Sx(Io(_j,1),GA,79,0,[(Mx(),UB)]))}function RL(e){var t,n,r,i,o,a,s;for(t=0,o=new Zn(e.b.a);o.a0;){for(Ey(0,s.c.length),d=Yf(s.c[0],12),Ey(0,h.c.length),i=Qy((r=Yf(h.c[0],12)).d.b,r,0),qv(d,r.d,i),uv(r,null),cv(r,null),f=d.a,t&&Of(f,new Xc(v)),n=Tk(r.a,0);n.b!=n.d.c;)Of(f,new Xc(Yf(Tb(n),10)));for(p=d.b,l=new Zn(r.b);l.a0?Iw(this,this.f/this.a):null!=sl(t.g,t.d[0]).a&&null!=sl(n.g,n.d[0]).a?Iw(this,(ro(sl(t.g,t.d[0]).a)+ro(sl(n.g,n.d[0]).a))/2):null!=sl(t.g,t.d[0]).a?Iw(this,sl(t.g,t.d[0]).a):null!=sl(n.g,n.d[0]).a&&Iw(this,sl(n.g,n.d[0]).a)}function FL(e,t){var n,r,i,o,a,s,c,u,l,h,f;switch(e.g.e){case 1:if(r=Yf(kx(e,(ZI(),oq)),12),(n=Yf(kx(r,aq),44))?no(ro(Sh(kx(r,wq))))&&(n=_x(n)):n=new Gr,u=Yf(kx(e,tq),7),t<=(l=Um(Sx(Io(pj,1),KM,10,0,[u.f.i,u.i,u.a]))).a)return l.b;if(Mb(n,l,n.a,n.a.a),h=Yf(kx(e,nq),7),(f=Um(Sx(Io(pj,1),KM,10,0,[h.f.i,h.i,h.a]))).a<=t)return f.b;for(Mb(n,f,n.c.b,n.c),a=Yf(Tb(c=Tk(n,0)),10),s=Yf(Tb(c),10);s.a=2)for(Ip(e.a),r=0,f=Tk(n,0);f.b!=f.d.c;)h=Yf(Tb(f),10),0==r?(t=Ih(Ih(new Qa(h.a,h.b),e.c.i),e.c.f.i),e.c.a.a=t.a,e.c.a.b=t.b):r==n.b-1?(t=Ih(Ih(new Qa(h.a,h.b),e.d.i),e.d.f.i),e.d.a.a=t.a,e.d.a.b=t.b):Of(e.a,h),++r;if(l)for(c=Tk(e.a,0);c.b!=c.d.c;)s=Yf(Tb(c),10),a.a=Go(a.a,s.a),a.b=Go(a.b,s.b);for(o=new Zn(e.b);o.a0&&Ky(a,RU,(zd(),zd(),OX)),(s=Yf(kx(a,(JI(),FR)),28))==(b_(),CG)||s!=EG&&r.ib((KO(),oU)),no(ro(Sh(kx(a,fR))))&&r.ib((KO(),eU)),no(ro(Sh(kx(a,ER))))&&(r.ib((KO(),iU)),r.ib(rU),Ky(a,FR,EG)),a}function VL(e,t){t.V()&&Sf(e.n,!0,!0,!0,!0),t.t((wI(),GG))&&Sf(e.n,!0,!0,!0,!1),t.t(MG)&&Sf(e.n,!1,!0,!0,!0),t.t(qG)&&Sf(e.n,!0,!0,!1,!0),t.t(WG)&&Sf(e.n,!0,!1,!0,!0),t.t(BG)&&Sf(e.n,!1,!0,!0,!1),t.t(PG)&&Sf(e.n,!1,!0,!1,!0),t.t(XG)&&Sf(e.n,!0,!1,!1,!0),t.t(UG)&&Sf(e.n,!0,!1,!0,!1),t.t(zG)&&Sf(e.n,!0,!0,!0,!0),t.t(jG)&&Sf(e.n,!0,!0,!0,!0),t.t(zG)&&Sf(e.n,!0,!0,!0,!0),t.t(DG)&&Sf(e.n,!0,!0,!0,!0),t.t(VG)&&Sf(e.n,!0,!0,!0,!0),t.t(YG)&&Sf(e.n,!0,!0,!0,!0),t.t(FG)&&Sf(e.n,!0,!0,!0,!0)}function UL(e,t){var n,r,i,o,a,s,c,u,l;for(s=!0,i=0,c=e.f[t.k],u=t.j.b+e.n,n=e.c[t.k][2],Kb(e.a,c,WE(Yf(dd(e.a,c),24).a-1+n)),Kb(e.b,c,ro(Oh(dd(e.b,c)))-u+n*e.e),++c>=e.i?(++e.i,Tf(e.a,WE(1)),Tf(e.b,u)):(r=e.c[t.k][1],Kb(e.a,c,WE(Yf(dd(e.a,c),24).a+1-r)),Kb(e.b,c,ro(Oh(dd(e.b,c)))+u-r*e.e)),(e.q==(nO(),eY)&&(Yf(dd(e.a,c),24).a>e.j||Yf(dd(e.a,c-1),24).a>e.j)||e.q==rY&&(ro(Oh(dd(e.b,c)))>e.k||ro(Oh(dd(e.b,c-1)))>e.k))&&(s=!1),o=Lg(qE(t));eC(o);)a=Yf(_v(o),12).c.f,e.f[a.k]==c&&(i+=Yf((l=UL(e,a)).a,24).a,s=s&&no(ro(Sh(l.b))));return e.f[t.k]=c,new Ja(WE(i+=e.c[t.k][0]),(zd(),s?OX:SX))}function qL(e,t,n){var r,i,o,a,s,c,u,l,h,f,d,g,p,v,b;if(f=new Xc(e.j),b=t.a/f.a,s=t.b/f.b,p=t.a-f.a,o=t.b-f.b,n)for(i=Wc(kx(e,(JI(),FR)))===Wc((b_(),wG)),g=new Zn(e.f);g.a=1&&(v-a>0&&h>=0?(c.i.a+=p,c.i.b+=o*a):v-a<0&&l>=0&&(c.i.a+=p*v,c.i.b+=o));e.j.a=t.a,e.j.b=t.b,Ky(e,(JI(),$R),(IC(),new Wf(r=Yf(na(lB),11),Yf(Sg(r,r.length),11),0)))}function XL(e){var t,n,r,i,o,a,s,c,u,l;for(r=new Pt,a=new Zn(e.e.a);a.a-1){for(r=Tk(a,0);r.b!=r.d.c;)(n=Yf(Tb(r),77)).n=o;for(;0!=a.b;)for(t=new Zn((n=Yf(r_(a,0),77)).d);t.a0),o.a.sb(o.c=--o.b),Jh(o,n),kg(c,n),LS(n,s.g),Jv(c),Jv(c),r.a.eb(n)}}function JL(e){var t,n,r,i,o,a,s,c;for(t=null,r=new Zn(e);r.a0&&0==n.c&&(!t&&(t=new Pt),t.c[t.c.length]=n);if(t)for(;0!=t.c.length;){if((n=Yf(yy(t,0),102)).b&&n.b.c.length>0)for(!n.b&&(n.b=new Pt),o=new Zn(n.b);o.aQy(e,n,0))return new Ja(i,n)}else if(ro(sl(i.g,i.d[0]).a)>ro(sl(n.g,n.d[0]).a))return new Ja(i,n);for(s=(!n.e&&(n.e=new Pt),n.e).mb();s.G();)!(a=Yf(s.H(),102)).b&&(a.b=new Pt),xy(0,(c=a.b).c.length),Nc(c.c,0,n),a.c==c.c.length&&(t.c[t.c.length]=a)}return null}function eI(e,t){var n,r,i,o,a,s,c,u,l;if(1!=Qg(XE(t))||Yf(zv(XE(t)),12).d.f.g!=(j_(),RH))return null;for(lr(n=(o=Yf(zv(XE(t)),12)).d.f,(j_(),PH)),Ky(n,(ZI(),tq),null),Ky(n,nq,null),Ky(n,(JI(),FR),Yf(kx(t,FR),28)),Ky(n,IR,Yf(kx(t,IR),86)),i=kx(o.c,oq),a=null,u=wN(n,(wI(),IG)).mb();u.G();)if(0!=(s=Yf(u.H(),7)).e.c.length){Ky(s,oq,i),l=o.c,s.j.a=l.j.a,s.j.b=l.j.b,s.a.a=l.a.a,s.a.b=l.a.b,ox(s.c,l.c),l.c.c=_y(_D,GA,1,0,4,1),a=s;break}if(Ky(o.c,oq,null),!ab(wN(t,IG)))for(c=new Zn(Wb(wN(t,IG)));c.a0?i+e.i[1]*t+e.n[1]:0,e.o[3]>0?i+e.i[3]*t+e.n[3]:0),Go(e.o[4]>0?n+e.i[4]*t+e.n[4]:0,e.o[2]>0?n+e.i[2]*t+e.n[2]:0))}(e,e.k);break;case 4:r=new Xc(a);break;case 5:r=function(e,t){var n,r,i,o,a;for(a=new so,o=new Zn(f_(e));o.a0&&(o.a=Go(o.a,i+e.q.b+e.q.c)),n>0&&(o.b=Go(o.b,n+e.q.d+e.q.a))):(i>0&&(o.a=Go(o.a,i)),n>0&&(o.b=Go(o.b,n)))),function(e,t){e.e.j.a=t.a,e.e.j.b=t.b}(e.e,o)}}function nI(e,t,n){var r,i,o,a,s,c,u,l,h,f,d;if(!e.b)return!1;for(a=null,f=null,i=1,(c=new Uy(null,null)).a[1]=e.b,h=c;h.a[i];)u=i,s=f,f=h,h=h.a[i],i=(r=e.a.$b(t,h.d))<0?0:1,0==r&&(!n.c||Np(h.e,n.d))&&(a=h),h&&h.b||Vo(h.a[i])||(Vo(h.a[1-i])?f=f.a[u]=mm(h,i):Vo(h.a[1-i])||(d=f.a[1-u])&&(Vo(d.a[1-u])||Vo(d.a[u])?(o=s.a[1]==f?1:0,Vo(d.a[u])?s.a[o]=eb(f,u):Vo(d.a[1-u])&&(s.a[o]=mm(f,u)),h.b=s.a[o].b=!0,s.a[o].a[0].b=!1,s.a[o].a[1].b=!1):(f.b=!1,d.b=!0,h.b=!0)));return a&&(n.b=!0,n.d=a.e,h!=a&&(function(e,t,n,r){var i,o;for(i=null==(o=t).d||e.a.$b(n.d,o.d)>0?1:0;o.a[i]!=n;)o=o.a[i],i=e.a.$b(n.d,o.d)>0?1:0;o.a[i]=r,r.b=n.b,r.a[0]=n.a[0],r.a[1]=n.a[1],n.a[0]=null,n.a[1]=null}(e,c,a,l=new Uy(h.d,h.e)),f==a&&(f=l)),f.a[f.a[1]==h?1:0]=h.a[h.a[0]?0:1],--e.c),e.b=c.a[1],e.b&&(e.b.b=!1),n.b}function rI(e){var t,n,r,i,o,a,s,c,u,l,h,f,d,g;for(f=new Zn(e);f.a(b=r?Yf(kx(l,sz),24).a:kA)?c:b,w=new Zn(l.f);w.a=u&&x>=v&&(f+=g.i.b+p.i.b+p.a.b-m,++s));if(n)for(a=new Zn(y.b);a.a=u&&x>=v&&(f+=g.i.b+p.i.b+p.a.b-m,++s))}s>0&&(E+=f/s,++d)}d>0?(t.a=i*E/d,t.i=d):(t.a=0,t.i=0)}function sI(e,t){var n;if(e.e)throw new Eo((Rh(vH),"The "+vH.j+vP));if(!function(e,t){return Ul(e.c,t)}(e.a,t))throw new Ni("The direction "+t+" is not supported by the CGraph instance.");if(t==e.d)return e;switch(n=e.d,e.d=t,n.e){case 0:switch(t.e){case 2:yx(e);break;case 1:nk(e),yx(e);break;case 4:F_(e),yx(e);break;case 3:F_(e),nk(e),yx(e)}break;case 2:switch(t.e){case 1:nk(e),uT(e);break;case 4:F_(e),yx(e);break;case 3:F_(e),nk(e),yx(e)}break;case 1:switch(t.e){case 2:nk(e),uT(e);break;case 4:nk(e),F_(e),yx(e);break;case 3:nk(e),F_(e),nk(e),yx(e)}break;case 4:switch(t.e){case 2:F_(e),yx(e);break;case 1:F_(e),nk(e),yx(e);break;case 3:nk(e),uT(e)}break;case 3:switch(t.e){case 2:nk(e),F_(e),yx(e);break;case 1:nk(e),F_(e),nk(e),yx(e);break;case 4:nk(e),uT(e)}}return e}function cI(e,t,n){var r,i,o,a,s,c,u,l;if(!e.a[t.d.k][t.k].e){for(e.a[t.d.k][t.k].e=!0,e.a[t.d.k][t.k].b=0,e.a[t.d.k][t.k].d=0,e.a[t.d.k][t.k].a=null,l=new Zn(t.f);l.a0&&(e.a[t.d.k][t.k].d+=IS(e.e,24)*KP*.07000000029802322-.03500000014901161,e.a[t.d.k][t.k].a=e.a[t.d.k][t.k].d/e.a[t.d.k][t.k].b)}}function uI(e,t){var n,r,i,o,a,s,c,u,l,h;for(r=new Zn(e.a.c);r.adP||t.k==xz&&uv?u:v}for(n.e.b+=u-s.b,h=new Zn(e.a);h.a1;)t=Fo(i,e.c),lr(l=new _k(e.e.c),(j_(),PH)),Ky(l,(JI(),FR),Yf(kx(c,FR),28)),Ky(l,IR,Yf(kx(c,IR),86)),l.k=e.e.b++,Tf(e.b,l),l.j.b=c.j.b,l.j.a=t,Gh(h=new __,(wI(),IG)),av(h,c),h.i.a=l.j.a,h.i.b=l.j.b/2,Gh(f=new __,KG),av(f,l),f.i.b=l.j.b/2,f.i.a=-f.j.a,uv(d=new Dp,h),cv(d,f),c=l,Tf(e.e.c.b,c),--u,i-=e.c+e.e.d;for(new y_(e.d,e.b,e.c),a=new Zn(r);a.at.a||t.p>e.a)){for(n=0,r=0,s=new zn(new Yn(e.o.a).a.bb().mb());s.a.G();)i=Yf(s.a.H(),21),o=Yf(i.yb(),7),cC(Um(Sx(Io(pj,1),KM,10,0,[o.f.i,o.i,o.a])).b,t.p,t.a)&&++n;for(c=new zn(new Yn(e.g.a).a.bb().mb());c.a.G();)i=Yf(c.a.H(),21),o=Yf(i.yb(),7),cC(Um(Sx(Io(pj,1),KM,10,0,[o.f.i,o.i,o.a])).b,t.p,t.a)&&--n;for(u=new zn(new Yn(t.o.a).a.bb().mb());u.a.G();)i=Yf(u.a.H(),21),o=Yf(i.yb(),7),cC(Um(Sx(Io(pj,1),KM,10,0,[o.f.i,o.i,o.a])).b,e.p,e.a)&&++r;for(a=new zn(new Yn(t.g.a).a.bb().mb());a.a.G();)i=Yf(a.a.H(),21),o=Yf(i.yb(),7),cC(Um(Sx(Io(pj,1),KM,10,0,[o.f.i,o.i,o.a])).b,e.p,e.a)&&--r;n1)for(c=Tk(Hf(wN(t,KG)),0);c.b!=c.d.c;)0==(s=Yf(Tb(c),7)).b.c.length?(Gh(i=new __,KG),i.j.a=s.j.a,i.j.b=s.j.b,av(i,r),Ky(i,oq,kx(s,oq)),av(s,null)):av(a,r);return Ky(t,oq,null),Ky(t,AU,SX),lr(t,PH),Ky(r,(JI(),FR),Yf(kx(t,FR),28)),Ky(r,IR,Yf(kx(t,IR),86)),Ld(e.b,0,r),r}function bI(e,t,n,r,i,o,a){var s,c,u,l,h,f;switch(h=n,lr(u=new _k(a),(j_(),DH)),Ky(u,(ZI(),XU),i),Ky(u,(JI(),FR),(b_(),wG)),Ky(u,iq,Yf(kx(e,MR),15)),!(c=Yf(kx(e,HR),10))&&(c=new Qa(i.a/2,i.b/2)),Ky(u,HR,c),av(l=new __,u),t!=EG&&t!=CG||(s=o!=(CE(),Lj)?o:Tj,h=r>0?hC(s):vE(hC(s)),Ky(e,VR,h)),h.e){case 4:Ky(u,($I(),eX),(qk(),Tq)),Ky(u,YU,(Dx(),jV)),u.j.b=i.b,Gh(l,(wI(),IG)),l.i.b=c.b;break;case 2:Ky(u,($I(),eX),(qk(),Iq)),Ky(u,YU,(Dx(),PV)),u.j.b=i.b,Gh(l,(wI(),KG)),l.i.b=c.b;break;case 1:Ky(u,KU,(Rw(),EU)),u.j.a=i.a,Gh(l,(wI(),ZG)),l.i.a=c.a;break;case 3:Ky(u,KU,(Rw(),mU)),u.j.a=i.a,Gh(l,(wI(),AG)),l.i.a=c.a}if(t==yG||t==mG||t==wG){switch(f=0,h.e){case 4:case 2:case 1:case 3:f=null.cd,t==mG&&(f/=null.cd)}Ky(u,dq,f)}return Ky(u,qU,h),u}function yI(e){var t,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w;for(u=new Gr,ml(),yp(b=new Er,e,V_(e)),Nw(2,dM),r=new cw(2),e.c&&Tf(r,e.c),e.d&&Tf(r,e.d),d=new Zn(r);d.a1&&Mb(u,g,u.c.b,u.c),Mw(n)));g=p}return u}function wI(){var e;wI=r,$G=new vs(GM,0),AG=new vs("NORTH",1),IG=new vs("EAST",2),ZG=new vs("SOUTH",3),KG=new vs("WEST",4),Fp(),RG=new Zo(new Wf(e=Yf(na(iB),11),Yf(Sg(e,e.length),11),0)),GG=GE(Qd(AG,Sx(Io(iB,1),HA,32,0,[]))),MG=GE(Qd(IG,Sx(Io(iB,1),HA,32,0,[]))),qG=GE(Qd(ZG,Sx(Io(iB,1),HA,32,0,[]))),WG=GE(Qd(KG,Sx(Io(iB,1),HA,32,0,[]))),zG=GE(Qd(AG,Sx(Io(iB,1),HA,32,0,[ZG]))),jG=GE(Qd(IG,Sx(Io(iB,1),HA,32,0,[KG]))),UG=GE(Qd(AG,Sx(Io(iB,1),HA,32,0,[KG]))),BG=GE(Qd(AG,Sx(Io(iB,1),HA,32,0,[IG]))),XG=GE(Qd(ZG,Sx(Io(iB,1),HA,32,0,[KG]))),PG=GE(Qd(IG,Sx(Io(iB,1),HA,32,0,[ZG]))),YG=GE(Qd(AG,Sx(Io(iB,1),HA,32,0,[IG,KG]))),DG=GE(Qd(IG,Sx(Io(iB,1),HA,32,0,[ZG,KG]))),VG=GE(Qd(AG,Sx(Io(iB,1),HA,32,0,[ZG,KG]))),HG=GE(Qd(AG,Sx(Io(iB,1),HA,32,0,[IG,ZG]))),FG=GE(Qd(AG,Sx(Io(iB,1),HA,32,0,[IG,ZG,KG])))}function mI(e,t,n){var r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m;if(Ky(l=new Bw,qB,t),yp(e.e,t,l),Ky(l,(ZI(),lq),n),e.d&&fN(e.d,l,!1),C_(t,l),rP in t.a&&(v=l.a,b=Yf(Sp(t,rP),69),(p=Yf(Sp(b,"left"),104))&&(v.b=p.a),(w=Yf(Sp(b,"top"),104))&&(v.d=w.a),(y=Yf(Sp(b,"right"),104))&&(v.c=y.a),(i=Yf(Sp(b,qM),104))&&(v.a=i.a)),h=new Wf(r=Yf(na(yU),11),Yf(Sg(r,r.length),11),0),Ky(l,WU,h),null==e.g&&(e.g=Sh(kx(l,(Vp(),rH)))),iP in t.a){if(!(m=Sp(t,iP)).hc())throw new wg("The 'children' property of nodes must be an array.",m,t);if((u=m.hc()).a.length>0){for(n&&Ky(n,rq,l),s=_y(HH,oP,9,u.a.length,0,1),d=0;d1)for(Tf(o,new ML(d,y,n)),h=new zn(new Yn(y.a).a.bb().mb());h.a.G();)u=Yf(h.a.H(),21),Gy(i,Yf(u.yb(),27).b);if(a.a.Y()>1)for(Tf(o,new ML(d,a,n)),h=new zn(new Yn(a.a).a.bb().mb());h.a.G();)u=Yf(h.a.H(),21),Gy(i,Yf(u.yb(),27).b)}}function kI(e,t){var n,r,i,o,a,s,c,u,l;switch(xb(o=Wb(Vf(t,new Kf(e))),new Qe),(i=e.b).c){case 2:_g(t,new UN(r=function(e,t,n,r){var i,o,a,s,c;for(c=0,o=new Zn(e.a.b);o.a.5&&i<50;)t=_a(X_(n,r=hO(n),!0).a),++i;return X_(e,(Gd(o=Oh(sk(Hf(e.g),Hf(e.g).b-1))),o-r),!1)}(h);break;case 2:case 4:h.a=w,y=function(e){var t,n,r,i,o;for(n=ET(vL(e)),t=RP,i=0,r=0;t>.5&&i<50;)t=_a(X_(n,r=fO(n),!0).b),++i;return X_(e,(Gd(o=Oh(sk(Hf(e.g),Hf(e.g).b-1))),o-r),!1)}(h);break;default:return null}return hr(h,new MN(Sx(Io(pj,1),KM,10,0,[c,w,y,g,v]))),h}(e.a.c,t,e.a.d,r,Mk(e.b),n),pm(e.a.a,jC(s)),a=sN(e.a.b,s.a,e.b),Qp(i=new Db((!s.k&&(s.k=new yN(vm(s))),s.k))),a?Xg(i,a):i}(e,a=um(n=Pu(Vf(o,new En(i.a))))?Yf(Ny(n),91).b:15,um(n=Pu(Vf(o,new En(Mk(i)))))?Yf(Ny(n),91).b:15,um(n=Pu(Vf(o,new En(i.b))))?Yf(Ny(n),91).b:15),e.c,e.e,e.a.c.f,i.a)),_g(t,new UN(r,e.c,e.e,e.a.c.f,Mk(i))),_g(t,new UN(r,e.c,e.e,e.a.c.f,i.b));break;case 1:_g(t,new UN(r=function(e,t,n){var r,i,o,a,s,c;for(c=e.b,o=0,i=new Zn(e.a.b);i.a0)if(r=l.Y(),c=yv(Math.floor((r+1)/2))-1,i=yv(Math.ceil((r+1)/2))-1,t.k==Ez)for(u=i;u>=c;u--)t.a[w.k]==w&&(g=Yf(l.sb(u),27),d=Yf(g.a,9),!Ea(n,g.b)&&f>e.b.e[d.k]&&(t.a[d.k]=w,t.f[w.k]=t.f[d.k],t.a[w.k]=t.f[w.k],f=e.b.e[d.k]));else for(u=c;u<=i;u++)t.a[w.k]==w&&(v=Yf(l.sb(u),27),p=Yf(v.a,9),!Ea(n,v.b)&&f0||n.k==Ez&&iv?d:v):n.n[t.k]=r>(d>v?d:v)?r:d>v?d:v)):(p=e.d.f,g=ym(e,n.i[t.k]),f=ym(e,n.i[h.k]),n.k==Ez?Uv(g,f,ro(n.n[t.k])+ro(n.d[a.k])+a.j.b+a.e.a+p-(ro(n.n[h.k])+ro(n.d[u.k])-u.e.d)):Uv(g,f,ro(n.n[t.k])+ro(n.d[a.k])-a.e.d-ro(n.n[h.k])-ro(n.d[u.k])-u.j.b-u.e.a-p))):v=e.e.Ic(v,t,a),a=n.a[a.k]}while(a!=t);!function(e,t){_g(e.b,t)}(e.e,t)}}function II(e,t,n,r){var i,o,a,s,c,u,l,h,f,d,g,p,v,b;if(f=!1,h=!1,zs(Yf(kx(r,(JI(),FR)),28))){a=!1,s=!1;e:for(g=new Zn(r.f);g.a=r.j.b/2}b?(v=Yf(kx(r,(ZI(),Sq)),20))?f?o=v:(i=Yf(kx(r,DU),20))?o=v.Y()<=i.Y()?v:i:(o=new Pt,Ky(r,DU,o)):(o=new Pt,Ky(r,Sq,o)):(i=Yf(kx(r,(ZI(),DU)),20))?h?o=i:(v=Yf(kx(r,Sq),20))?o=i.Y()<=v.Y()?i:v:(o=new Pt,Ky(r,Sq,o)):(o=new Pt,Ky(r,DU,o)),o.ib(e),Ky(e,(ZI(),jU),n),t.d==n?(cv(t,null),n.b.c.length+n.e.c.length==0&&av(n,null)):(uv(t,null),n.b.c.length+n.e.c.length==0&&av(n,null)),Ip(t.a)}function AI(e,t){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y;for((n=new kk(t)).a||function(e){var t,n,r,i,o;switch(i=Yf(dd(e.b,0),9),t=new _k(e),Tf(e.b,t),t.j.a=Go(1,i.j.a),t.j.b=Go(1,i.j.b),t.i.a=i.i.a,t.i.b=i.i.b,Yf(kx(i,(ZI(),qU)),32).e){case 4:t.i.a+=2;break;case 1:t.i.b+=2;break;case 2:t.i.a-=2;break;case 3:t.i.b-=2}av(r=new __,t),uv(n=new Dp,o=Yf(dd(i.f,0),7)),cv(n,r),Lh(Tc(r.i),o.i),Lh(Tc(r.a),o.a)}(t),u=function(e){var t,n,r,i,o,a,s;for(s=new Nb,a=new Zn(e.b);a.a=s.b.c)&&(s.b=t),(!s.c||t.c<=s.c.c)&&(s.d=s.c,s.c=t),(!s.e||t.d>=s.e.d)&&(s.e=t),(!s.f||t.d<=s.f.d)&&(s.f=t);return r=new hk((Rm(),yH)),Ib(e,NH,new $n(Sx(Io(bH,1),GA,160,0,[r]))),a=new hk(xH),Ib(e,_H,new $n(Sx(Io(bH,1),GA,160,0,[a]))),i=new hk(wH),Ib(e,kH,new $n(Sx(Io(bH,1),GA,160,0,[i]))),o=new hk(mH),Ib(e,CH,new $n(Sx(Io(bH,1),GA,160,0,[o]))),cO(r.c,yH),cO(i.c,wH),cO(o.c,mH),cO(a.c,xH),s.a.c=_y(_D,GA,1,0,4,1),ox(s.a,r.c),ox(s.a,Tm(i.c)),ox(s.a,o.c),ox(s.a,Tm(a.c)),s}(u)),n}function MI(e,t){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,C,k,_,N;return h=function(e,t){var n,r,i,o,a,s,c,u,l,h,f;if(e.V())return new so;for(c=0,l=0,r=e.mb();r.G();)c=Go(c,(i=Yf(r.H(),55).e).a),l+=i.a*i.b;for(c=Go(c,Math.sqrt(l)*Yf(kx(Yf(e.mb().H(),55),(ZI(),OU)),15).a),h=0,f=0,s=0,n=t,a=e.mb();a.G();)h+(u=(o=Yf(a.H(),55)).e).a>c&&(h=0,f+=s+t,s=0),iT(o,h,f),n=Go(n,h+u.a),s=Go(s,u.b),h+=u.a+t;return new Qa(n+t,f+s+t)}(ll(e,(wI(),RG)),t),g=Lk(ll(e,GG),t),m=Lk(ll(e,qG),t),k=Ik(ll(e,WG),t),f=Ik(ll(e,MG),t),y=Lk(ll(e,UG),t),p=Lk(ll(e,BG),t),E=Lk(ll(e,XG),t),x=Lk(ll(e,PG),t),_=Ik(ll(e,jG),t),b=Lk(ll(e,zG),t),w=Lk(ll(e,YG),t),C=Lk(ll(e,DG),t),N=Ik(ll(e,VG),t),d=Ik(ll(e,HG),t),v=Lk(ll(e,FG),t),n=xw(Sx(Io(sW,1),SA,26,12,[y.a,k.a,E.a,N.a])),r=xw(Sx(Io(sW,1),SA,26,12,[g.a,h.a,m.a,v.a])),i=b.a,o=xw(Sx(Io(sW,1),SA,26,12,[p.a,f.a,x.a,d.a])),u=xw(Sx(Io(sW,1),SA,26,12,[y.b,g.b,p.b,w.b])),c=xw(Sx(Io(sW,1),SA,26,12,[k.b,h.b,f.b,v.b])),l=_.b,s=xw(Sx(Io(sW,1),SA,26,12,[E.b,m.b,x.b,C.b])),vy(ll(e,RG),n+i,u+l),vy(ll(e,FG),n+i,u+l),vy(ll(e,GG),n+i,0),vy(ll(e,qG),n+i,u+l+c),vy(ll(e,WG),0,u+l),vy(ll(e,MG),n+i+r,u+l),vy(ll(e,BG),n+i+r,0),vy(ll(e,XG),0,u+l+c),vy(ll(e,PG),n+i+r,u+l+c),vy(ll(e,jG),0,u),vy(ll(e,zG),n,0),vy(ll(e,DG),0,u+l+c),vy(ll(e,HG),n+i+r,0),(a=new so).a=xw(Sx(Io(sW,1),SA,26,12,[n+r+i+o,_.a,w.a,C.a])),a.b=xw(Sx(Io(sW,1),SA,26,12,[u+c+l+s,b.b,N.b,d.b])),a}function PI(e,t){var n,r,i,o,a,s,c,u,l,h,f,d,g,p;if(r=new Gr,u=null,(d=(g=e.c).f.g)!=(j_(),GH)&&d!=BH)throw new oo("The target node of the edge must be a normal node or a northSouthPort.");for(d==BH&&(f=Yf(kx(g,(ZI(),oq)),7),u=new Qa(Um(Sx(Io(pj,1),KM,10,0,[f.f.i,f.i,f.a])).a,Um(Sx(Io(pj,1),KM,10,0,[g.f.i,g.i,g.a])).b),g=f),as(r,Um(Sx(Io(pj,1),KM,10,0,[g.f.i,g.i,g.a]))),a=Go(5,OC(g.f,g.g)),(h=new yg(t_(g.g))).a*=a,h.b*=a,Of(r,Lh(h,Um(Sx(Io(pj,1),KM,10,0,[g.f.i,g.i,g.a])))),u&&Mb(r,u,r.c.b,r.c),o=e,c=e,s=null,n=!1;o;)0!=(i=o.a).b&&(n?(Of(r,il(Lh(s,(Tu(0!=i.b),Yf(i.a.a.c,10))),.5)),n=!1):n=!0,s=yu((Tu(0!=i.b),Yf(i.c.b.c,10))),pm(r,i),Ip(i)),c=o,o=Yf(Zc(gv(t.d,o)),12);(p=c.d).f.g==BH&&(f=Yf(kx(p,(ZI(),oq)),7),Of(r,new Qa(Um(Sx(Io(pj,1),KM,10,0,[f.f.i,f.i,f.a])).a,Um(Sx(Io(pj,1),KM,10,0,[p.f.i,p.i,p.a])).b)),p=f),a=Go(5,OC(p.f,p.g)),il(h=new yg(t_(p.g)),a),Of(r,Lh(h,Um(Sx(Io(pj,1),KM,10,0,[p.f.i,p.i,p.a])))),as(r,Um(Sx(Io(pj,1),KM,10,0,[p.f.i,p.i,p.a]))),l=new JT(r),pm(e.a,jC(l))}function DI(e){var t,n,r,i,o,a,s,c,u,l,h,d,g,p;if(Wc(kx(e.c,(JI(),FR)))===Wc((b_(),mG))||Wc(kx(e.c,FR))===Wc(wG))for(l=new Zn(e.c.f);l.a1&&(a=Fo(a,_a(Yf(sk(s.a,1),10).b-l.b)))));else for(g=new Zn(t.f);g.ai&&(o=f.a-i,a=yA,r.c=_y(_D,GA,1,0,4,1),i=f.a),f.a>=i&&(r.c[r.c.length]=s,s.a.b>1&&(a=Fo(a,_a(Yf(sk(s.a,s.a.b-2),10).b-f.b)))));if(0!=r.c.length&&o>t.j.a/2&&a>t.j.b/2){for(av(d=new __,t),Gh(d,(wI(),AG)),d.i.a=t.j.a/2,av(p=new __,t),Gh(p,ZG),p.i.a=t.j.a/2,p.i.b=t.j.b,c=new Zn(r);c.a=u.b?uv(s,p):uv(s,d)):(u=Yf(wf(s.a),10),(0==s.a.b?Rv(s.c):Yf(Gl(s.a),10)).b>=u.b?cv(s,p):cv(s,d)),(h=Yf(kx(s,(JI(),kR)),44))&&mC(h,u,!0);t.i.a=i-t.j.a/2}}function RI(e,t){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w;for(b=new Pt,y=new Pt,w=new Pt,o=new Zn(t);o.a50?b.c[b.c.length]=i:i.k>0?y.c[y.c.length]=i:w.c[w.c.length]=i;if(1==y.c.length&&0==b.c.length&&(ox(b,y),y.c=_y(_D,GA,1,0,4,1)),0!=b.c.length&&Ul(ou(e.a),(NI(),Zz))&&Ul(ou(e.a),(NI(),Kz))?function(e,t){var n,r,i;for(r=new Zn(t);r.a1&&(dN(i,p=Yf(Sw(c),60),!0),lg(l),rv(e.a,p))}for(f=w.c.length,r=function(e){var t,n,r,i;switch(au(e.a).c){case 4:return NI(),Kz;case 3:return Yf(function(e){var t;return NI(),NI(),t=Vz,e.d&&HN(e),function(){throw new Zr}(),t}(e.a).mb().H(),60);case 2:return t=Yf(Qb(n=new Vs(r=au(e.a))),60),i=Yf(Qb(n),60),pO(t)==i?Ul(r,(NI(),Kz))?Uz:Kz:gO(gO(t))==i?gO(t):vO(t);case 1:return pO(Yf(Qb(new Vs(r=au(e.a))),60));case 0:return NI(),Qz;default:return null}}(e),d=new Pt,a=f/iu(e.a).c|0,s=0;s3&&(ox(d,(NI(),NI(),zz)),g-=4),g){case 3:Tf(d,pO(r));case 2:v=gO(pO(r));do{v=gO(v)}while(!Ul(ou(e.a),v));d.c[d.c.length]=v,v=vO(pO(r));do{v=vO(v)}while(!Ul(ou(e.a),v));d.c[d.c.length]=v;break;case 1:Tf(d,pO(r))}for(h=new Zn(d),u=new Zn(w);h.ayM)&&s<10);fo(e.c,new T),RL(e),function(e){sI(e,(CE(),Oj)),e.e=!0}(e.c),function(e){var t,n,r,i,o,a,s;for(i=new Zn(e.a.b);i.a0,v=w.e.c.length>0,u&&v?f.c[f.c.length]=w:u?g.c[g.c.length]=w:v&&(y.c[y.c.length]=w);for(d=new Zn(g);d.a=p&&(w>p&&(g.c=_y(_D,GA,1,0,4,1),p=w),g.c[g.c.length]=a);0!=g.c.length&&(d=Yf(dd(g,Zk(t,g.c.length)),77),O.a.eb(d),d.i=v++,aO(d,N,C),g.c=_y(_D,GA,1,0,4,1))}for(x=e.c.length+1,s=new Zn(e);s.aS.i&&(sp(n),Gy(S.d,r),r.c>0&&(r.a=S,Tf(S.j,r),r.b=k,Tf(k.d,r)))}function YI(e){switch(e.e){case 14:return new W;case 37:return new $;case 8:return new Zi;case 30:return new $i;case 38:return new Q;case 3:return new J;case 47:case 1:return new pn((Px(),KH));case 4:return new ee;case 49:return new te;case 23:return new et;case 13:return new ne;case 34:return new ie;case 40:return new oe;case 35:return new ce;case 44:return new Yu;case 28:return new ue;case 39:return new le;case 27:return new he;case 6:return new fe;case 31:return new ve;case 9:return new Ct;case 43:return new ye;case 17:return new we;case 18:return new Ee;case 29:return new kt;case 11:return new Le;case 12:return new ke;case 36:return new _e;case 46:case 0:return new pn((Px(),$H));case 41:return new Se;case 15:return new Oe;case 33:return new Te;case 42:return new Ae;case 22:return new Me;case 19:return new pe;case 10:return new Ne;case 7:return new De;case 24:return new je;case 21:return new Re;case 16:return new Be;case 45:return new He;case 26:return new Fe;case 20:return new Ye;case 25:return new ze;case 5:return new $e;case 32:return new Ke;case 48:case 2:return new pn((Px(),ZH));default:throw new oo("No implementation is available for the layout processor "+(null!=e.d?e.d:""+e.e))}}function zI(e,t,n){var r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,C,k,_,N,S,O,T;for(S=0,o=0,l=t[0].d,C=n[0].d,d=0,p=n.length;d0;){for(Tu(E.b>0),x=0,i=new Zn((w=Yf(E.a.sb(E.c=--E.b),7)).b);i.a0&&(w.g==(wI(),AG)?(e.a[w.k]=S,++S):(e.a[w.k]=S+b+y,++y),o+=x)}S+=y}else{for(v=0,m=new Zn(h.f);m.a0&&(++S,o+=v)}for(k=_y(iW,vM,26,o,12,1),s=0,f=0,g=t.length;f0;)c%2>0&&(r+=O[c+1]),++O[c=(c-1)/2|0];return r}function VI(e,t){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,C,k,_,N,S,O,T,L;for(FC(t,"Compound graph postprocessor",1),n=no(ro(Sh(kx(e,($I(),Bq))))),s=Yf(kx(e,(ZI(),HU)),144),h=new Ki,E=s.W().mb();E.G();){for(x=Yf(E.H(),12),xb(a=new hf(s.U(x)),new an(e)),N=cm((Ey(0,a.c.length),Yf(a.c[0],114))),O=sm(Yf(dd(a,a.c.length-1),114)),Ip(x.a),k=N.f,C=jE(O.f,k)?Yf(kx(k,rq),55):Zg(k),g=Yf(kx(x,(JI(),kR)),44),Nd(a,LH)?g?Ip(g):(g=new Gr,Ky(x,kR,g)):g&&Ky(x,kR,null),v=null,o=new Zn(a);o.aCP,L=_a(v.b-w.b)>CP,(!n&&T&&L||n&&(T||L))&&Of(x.a,_)),pm(x.a,r),0==r.b?v=_:(Tu(0!=r.b),v=Yf(r.c.b.c,10)),(y=Yf(kx(b,kR),44))&&(Yx(d=new Gr,0,y),Pm(d,m),pm(g,d)),sm(i)==O&&(Zg(O.f)!=i.a&&AS(m=new so,Zg(O.f),C),Ky(x,Nq,m)),p=new $v(b.b,0);p.b1){x=_y(PX,hA,15,e.a.length,0,1),u=Ol(e.a.length),g=0,d=0,n=2*t.d.a.c.length+1;e:for(m=new Zn(t.f);m.a0?(x[w.k]=new Bn(N/(w.b.c.length+w.e.c.length)),g=Yo(g,x[w.k].a),d=Bo(d,x[w.k].a)):v&&(x[w.k]=new Bn(N))}for(p=(t.d?Qy(t.d.a,t,0):-1)+1,f=t.d.a.c.length+1,c=new Zn(u);c.an&&p.a.db(w,p);for(O=new Ki,v=new Ki,x=new zn(new Yn(S.a).a.bb().mb());x.a.G();)for(h=Yf(x.a.H(),21),w=Yf(h.yb(),9),a=1==t?XE(w):qE(w),Uu(),u=new Au(Du(Uf(a.a,new f)));eC(u);)c=Yf(_v(u),12),Lc(w.d)!=Lc(c.d.f.d)&&_g(O,c.d.f);for(E=new zn(new Yn(p.a).a.bb().mb());E.a.G();)for(h=Yf(E.a.H(),21),w=Yf(h.yb(),9),a=1==t?XE(w):qE(w),Uu(),u=new Au(Du(Uf(a.a,new f)));eC(u);)c=Yf(_v(u),12),Lc(w.d)!=Lc(c.d.f.d)&&_g(v,c.d.f);for(QH&&Af(),_=Yf(dd(e.d.c.c,r+(1==t?1:-1)),16),b=kA,y=yA,d=0;d<_.a.c.length;d++)w=Yf(dd(_.a,d),9),O.a.R(w)?b=b>d?b:d:v.a.R(w)&&(y=y1||Qg(gu(new sb(BE(Sx(Io(_D,1),GA,1,4,[y.b,y.e])))))>1)&&i.ib((KO(),rU)),Wc(kx(g,($I(),zq)))===Wc((lb(),qY))&&!(JM in t.a)){n=new Gr;try{for(s=Sp(t,JM).hc(),o=0;o0&&(e.a[B.k]=W++)}else{for(M=0,H=new Zn(N.f);H.a0&&++W}for(J=0,T=0,A=n.length;T0;){for(Tu(z.b>0),Y=0,s=new Zn((B=Yf(z.a.sb(z.c=--z.b),7)).b);s.a0&&(B.g==(wI(),AG)?(e.a[B.k]=J,++J):(e.a[B.k]=J+P+j,++j))}J+=j}else{for(M=0,H=new Zn(N.f);H.a0&&++J}for(ml(),F=new Er,d=new Lu,S=0,L=t.length;Su.b&&(u.b=V)):B.f.d==X&&(Vu.c&&(u.c=V));for(Fk(g,0,g.length,(Js(),Js(),FX)),Q=_y(iW,vM,26,g.length,12,1),r=_y(iW,vM,26,J+1,12,1),v=0;v0;)E%2>0&&(i+=ne[E+1]),++ne[E=(E-1)/2|0];for(k=_y(rz,GA,156,2*g.length,0,1),w=0;w0&&(45==e.charCodeAt(0)||43==e.charCodeAt(0))?1:0;tyA)throw new Wo(CA+e+'"');return i}((oi(),""+n.jc().a))),void Ky(e,f,p)}catch(e){throw hl(e=rE(e),130)?new Fi("Invalid integer format for property '"+t+cP+n+")."):DE(e)}else{if(Yf(WB.a,18).kb(t)){if(!n.ic())throw new Fi(sP+t+cP+n+").");return f=Yf(Yf(WB.b,57).cb(t),79),zd(),void Ky(e,f,p=n.ic().a?OX:SX)}if(Yf(KB.a,18).kb(t)){if(!n.jc())throw new Fi("Invalid float format for property '"+t+cP+n+").");return void Ky(e,f=Yf(Yf(KB.b,57).cb(t),79),p=new Gn(n.jc().a))}if(Yf($B.a,18).kb(t)){if(!n.lc())throw new Fi(uP+t+cP+n+").");u=n.lc().a,l=null;try{cE((JI(),VR),t)?(wI(),l=Yf(gE((fy(),JG),u),32)):cE(sR,t)?(fk(),l=Yf(gE((Ay(),Nj),u),103)):cE(gR,t)?(CE(),l=Yf(gE((hy(),Mj),u),59)):cE(vR,t)?(kE(),l=Yf(gE((zb(),Uj),u),122)):cE(xR,t)?(_E(),l=Yf(gE((wb(),iR),u),166)):cE(DR,t)||cE(jR,t)||cE(RR,t)||cE(GR,t)||cE(BR,t)?(LC(),l=Yf(gE((dy(),bG),u),100)):cE(FR,t)?(b_(),l=Yf(gE((Py(),_G),u),28)):cE(zR,t)?(jw(),l=Yf(gE((yb(),LG),u),149)):cE(bR,t)?(D_(),l=Yf(gE((My(),Jj),u),133)):cE(pR,t)?(Gm(),l=Yf(gE((Yb(),Bj),u),107)):cE(($I(),Vq),t)?(zp(),l=Yf(gE((Gv(),IY),u),193)):cE(iX,t)?(fw(),l=Yf(gE((mb(),GY),u),173)):cE(Xq,t)?(w_(),l=Yf(gE((vw(),VV),u),115)):cE(Hq,t)?(Gw(),l=Yf(gE((qb(),Oz),u),194)):cE(zq,t)?(lb(),l=Yf(gE((Hv(),ZY),u),192)):cE(aX,t)?(nO(),l=Yf(gE((gw(),cY),u),109)):cE(oX,t)?(Uk(),l=Yf(gE((pw(),vz),u),141)):cE(lX,t)?(gN(),l=Yf(gE((Dy(),xY),u),125)):cE(hX,t)?(Sb(),l=Yf(gE((Bv(),dY),u),175)):cE(Kq,t)?(M_(),l=Yf(gE((em(),QV),u),124)):cE(Qq,t)?(_L(),l=Yf(gE((Hm(),wU),u),110)):cE(eX,t)?(qk(),l=Yf(gE((bw(),Pq),u),85)):cE(gX,t)?(MC(),l=Yf(gE((Ly(),xX),u),153)):cE(vX,t)?(Bm(),l=Yf(gE((Iy(),NX),u),172)):cE(Jq,t)&&(cb(),l=Yf(gE((Xb(),SU),u),174))}catch(e){throw hl(e=rE(e),54)?new Fi(uP+t+cP+n+")."):DE(e)}return void Ky(e,f=Yf(Yf($B.b,57).cb(t),79),l)}if(Yf(ZB.a,18).kb(t)){if(!n.lc())throw new Fi(uP+t+cP+n+").");for(d=null,a=0,s=(c=BT(n.lc().a,"[\\[\\]\\s,]+")).length;a0&&Ex(t.charCodeAt(n-1),NM);)--n;if(r>=n)throw new oo("The given string does not contain any numbers.");if(2!=(i=BT(t.substr(r,n-r),",|;|\r|\n")).length)throw new oo("Exactly two numbers are expected, "+i.length+" were found.");try{e.a=A_(p_(i[0])),e.b=A_(p_(i[1]))}catch(e){throw hl(e=rE(e),130)?new oo(SM+e):DE(e)}}(g=new so,n.lc().a),void Ky(e,f=Yf(Yf(eH.b,57).cb(t),79),g)}catch(e){throw hl(e=rE(e),29)?new Fi("Invalid KVector format for property '"+t+"' "+n+"."):DE(e)}else if(cE(lR,t)||cE(kR,t))try{return function(e,t){var n,r,i,o,a;r=BT(t,",|;|\\(|\\)|\\[|\\]|\\{|\\}| |\t|\n"),Ip(e);try{for(n=0,o=0,i=0,a=0;n0&&(o%2==0?i=A_(r[n]):a=A_(r[n]),o>0&&o%2!=0&&Of(e,new Qa(i,a)),++o),++n}catch(e){throw hl(e=rE(e),130)?new oo("The given string does not match the expected format for vectors."+e):DE(e)}}(v=new Gr,n.lc().a),void Ky(e,f=Yf(Yf(eH.b,57).cb(t),79),v)}catch(e){throw hl(e=rE(e),29)?new Fi("Invalid KVectorChain format for property '"+t+"' "+n+"."):DE(e)}else if(cE(OR,t)||cE(oR,t))try{return function(e,t){var n,r,i,o,a,s,c,u;for(o=0;o<(oi(),t.length)&&Cx(t.charCodeAt(o),_M);)++o;for(n=t.length;n>0&&Cx(t.charCodeAt(n-1),NM);)--n;if(o1?Av(this,e-1):this,t},tA.Pc=function(){return Rh(this),this.b},tA.Qc=function(){return ea(this)},tA.Rc=function(){return ta(this)},tA.Sc=function(){return 0!=(4&this.g)},tA.Tc=function(){return 0!=(1&this.g)},tA.w=function(){return(0!=(2&this.g)?"interface ":0!=(1&this.g)?"":"class ")+(Rh(this),this.n)},tA.g=0,$S(119,72,{3:1,119:1,54:1,46:1},zr),$S(29,72,EA,Vr,oo),$S(95,72,dA,Ur,io),$S(231,1,{3:1,231:1}),$S(24,231,{3:1,23:1,24:1,231:1},In),tA.F=function(e){return function(e,t){return Ru(e.a,t.a)}(this,Yf(e,24))},tA.t=function(e){return hl(e,24)&&Yf(e,24).a==this.a},tA.v=function(){return this.a},tA.w=function(){return aa(this.a)},tA.a=0,cA={3:1,345:1,23:1,2:1},$S(350,1,_A,it),tA.$b=function(e,t){return function(e,t){return Cp((oi(),e.toLowerCase()),t.toLowerCase())}(Th(e),Th(t))},$S(257,95,dA,(function(e){io.call(this,e)})),$S(145,1,{23:1,145:1}),tA.F=function(e){return function(e,t){return function(e,t){return Cp((oi(),e.toLowerCase()),t.toLowerCase())}(e.a,t.a)}(this,Yf(e,145))},tA.t=function(e){var t;return e===this||!!hl(e,145)&&(t=Yf(e,145),Di(this.a,t.a))},tA.v=function(){return dk(this.a)},tA.w=function(){return this.a},$S(358,29,EA,(function(e){oo.call(this,(oi(),null==e?gA:e))})),$S(256,29,{3:1,54:1,29:1,46:1,256:1},(function(e){oo.call(this,(oi(),null==e?gA:e))})),$S(185,145,NA),$S(289,185,NA,(function(e){An.call(this,e)})),tA.Zc=function(e,t,n){var r,i;for(r=_y(aW,SA,26,n,12,1),i=0;in)throw new io(OA)}for(a=_y(aW,SA,26,o,12,1),l=0,s=0,c=0;c0;){if(128!=(192&(r=e[t+c++])))throw new oo("Invalid UTF8 sequence at "+(t+c-1)+", byte="+(r>>>0).toString(16));i=i<<6|63&r}l+=Kk(i,a,l)}return a};var kD,_D=Rg(LA,"Object",1),ND=Rg(LA,"Throwable",46),SD=(Rg(LA,"Exception",54),Rg(LA,"RuntimeException",72),Rg(IA,"JavaScriptException",164),Rg(AA,"StackTraceCreator/Collector",642),Rg(AA,"StackTraceCreator/CollectorLegacy",356),Rg(AA,"StackTraceCreator/CollectorModern",643),Rg(AA,"StackTraceCreator/CollectorModernNoSourceMap",357),Rg(MA,"IOException",181),Rg(MA,"UnsupportedEncodingException",351),Rg(LA,"Class",288),Rg(LA,"ClassCastException",119),Rg(LA,"IllegalArgumentException",29),Rg(LA,"IndexOutOfBoundsException",95),Rg(LA,"Number",231),Rg(LA,"Integer",24)),OD=Rg(LA,"String",2);Rg(LA,"String/1",350),Rg(LA,"StringIndexOutOfBoundsException",257),Rg(PA,"Charset",145),Rg(PA,"IllegalCharsetNameException",358),Rg(PA,"UnsupportedCharsetException",256),Rg(DA,"EmulatedCharset",185),Rg(DA,"EmulatedCharset/LatinCharset",289),Rg(DA,"EmulatedCharset/UtfCharset",355),$S(669,1,{3:1}),Rg(jA,"Optional",669),$S(601,669,{3:1},a),tA.t=function(e){return e===this},tA.v=function(){return 2040732332},tA.w=function(){return"Optional.absent()"},tA.A=function(e){return Md(e),ai(),kD},Rg(jA,"Absent",601);var TD=xd(jA,"Function");$S(208,1,{},ao),tA.C=function(e){return Mg(e)},Rg(jA,"Joiner",208),$S(363,208,{},$f),tA.C=function(e){return Cl(this,e)},Rg(jA,"Joiner/1",363),$S(362,1,{},eh),Rg(jA,"Joiner/MapJoiner",362);var LD,ID=xd(jA,"Predicate");$S(244,1,{68:1,244:1,3:1},jt),tA.D=function(e){var t;for(t=0;t0},tA.H=function(){if(this.b>=this.c)throw new xi;return ra(this,this.b++)},tA.L=function(){return this.b},tA.M=function(){if(this.b<=0)throw new xi;return ra(this,--this.b)},tA.N=function(){return this.b-1},tA.b=0,tA.c=0,Rg(zA,"AbstractIndexedListIterator",378),$S(428,108,YA),tA.G=function(){return um(this)},tA.H=function(){return Ny(this)},tA.d=1,Rg(zA,"AbstractIterator",428),$S(653,1,{144:1}),tA.P=function(){return this.f||(this.f=this.S())},tA.T=function(){return new La(this.P())},tA.t=function(e){return zx(this,e)},tA.v=function(){return this.P().v()},tA.V=function(){return 0==this.Y()},tA.W=function(){return ng(this)},tA.w=function(){return this.P().w()},Rg(zA,"AbstractMultimap",653),$S(294,653,UA),tA.Q=function(){Ok(this)},tA.R=function(e){return qy(this.b,e)},tA.S=function(){return new Ma(this,this.b)},tA.T=function(){return new Il(this,this.b)},tA.$=function(){return hl(e=this.Z(),137)?(Fp(),new $l(Yf(e,137))):hl(e,18)?(Fp(),new Zo(Yf(e,18))):hl(e,20)?dv(Yf(e,20)):(Fp(),new Jn(e));var e},tA.U=function(e){return W_(this,e)},tA.X=function(e){return iS(this,e)},tA.Y=function(){return this.c},tA.c=0,Rg(zA,"AbstractMapBasedMultimap",294),$S(600,294,UA),tA.Z=function(){return new cw(this.a)},tA.$=function(){return rp(),rp(),YD},tA.U=function(e){return Yf(W_(this,e),20)},tA.X=function(e){return Yf(iS(this,e),20)},tA.P=function(){return this.f||(this.f=new Ma(this,this.b))},tA.t=function(e){return zx(this,e)},Rg(zA,"AbstractListMultimap",600),$S(388,1,qA),tA.G=function(){return this.b.b||this.d.G()},tA.H=function(){var e;return this.d.G()||((e=Vw(this.b)).yb(),this.a=Yf(e.zb(),19),this.d=this.a.mb()),this.d.H()},tA.I=function(){this.d.I(),this.a.V()&&Fy(this.b),--this.c.c},Rg(zA,"AbstractMapBasedMultimap/Itr",388),$S(389,388,qA,rm),Rg(zA,"AbstractMapBasedMultimap/1",389),$S(638,1,XA),tA.Q=function(){this.bb().Q()},tA._=function(e){return c_(this,e)},tA.R=function(e){return!!U_(this,e,!1)},tA.ab=function(e){var t,n;for(t=this.bb().mb();t.G();)if(n=Yf(t.H(),21).zb(),Wc(e)===Wc(n)||null!=e&&sE(e,n))return!0;return!1},tA.t=function(e){return _N(this,e)},tA.cb=function(e){return Zc(U_(this,e,!1))},tA.v=function(){return bx(this.bb())},tA.V=function(){return 0==this.Y()},tA.W=function(){return new Yn(this)},tA.db=function(e,t){throw new _o("Put not supported on this map")},tA.eb=function(e){return Zc(U_(this,e,!0))},tA.Y=function(){return this.bb().Y()},tA.w=function(){return rN(this)},tA.fb=function(){return new Vn(this)},Rg(WA,"AbstractMap",638),$S(654,638,XA),tA.bb=function(){return rg(this)},tA.W=function(){return this.d||(this.d=new La(this))},tA.fb=function(){return Vg(this)},Rg(zA,"Maps/ViewCachingAbstractMap",654),$S(262,654,XA,Ma),tA.cb=function(e){return function(e,t){var n;return(n=Yf(ck(e.a,t),19))?ak(e.b,t,n):null}(this,e)},tA.eb=function(e){return function(e,t){var n,r;return(n=Yf(Zd(e.a,t),19))?((r=e.b.Z()).jb(n),e.b.c-=n.Y(),n.Q(),r):null}(this,e)},tA.Q=function(){this.a==this.b.b?Ok(this.b):cg(new mv(this))},tA.R=function(e){return bk(this.a,e)},tA.hb=function(){return new Bt(this)},tA.gb=function(){return this.hb()},tA.t=function(e){return this===e||_N(this.a,e)},tA.v=function(){return bx(new Hn(this.a))},tA.W=function(){return ng(this.b)},tA.Y=function(){return Bs(this.a)},tA.w=function(){return rN(this.a)},Rg(zA,"AbstractMapBasedMultimap/AsMap",262),$S(640,1,ZA),tA.ib=function(e){return function(){throw new _o("Add not supported on this collection")}()},tA.jb=function(e){return pm(this,e)},tA.Q=function(){vp(this)},tA.kb=function(e){return mC(this,e,!1)},tA.lb=function(e){return Qm(this,e)},tA.V=function(){return 0==this.Y()},tA.nb=function(e){return mC(this,e,!0)},tA.ob=function(){return this.pb(_y(_D,GA,1,this.Y(),4,1))},tA.pb=function(e){return i_(this,e)},tA.w=function(){return nN(this)},Rg(WA,"AbstractCollection",640),$S(641,640,$A),tA.t=function(e){return NC(this,e)},tA.v=function(){return bx(this)},Rg(WA,"AbstractSet",641),$S(649,641,$A),Rg(zA,"Sets/ImprovedAbstractSet",649),$S(655,649,$A),tA.Q=function(){this.qb().Q()},tA.kb=function(e){return GC(this,e)},tA.V=function(){return this.qb().V()},tA.nb=function(e){var t;return!!this.kb(e)&&(t=Yf(e,21),this.qb().W().nb(t.yb()))},tA.Y=function(){return this.qb().Y()},Rg(zA,"Maps/EntrySet",655),$S(387,655,$A,Bt),tA.kb=function(e){return yk(new Hn(this.a.a),e)},tA.mb=function(){return new mv(this.a)},tA.qb=function(){return this.a},tA.nb=function(e){var t;return!!yk(new Hn(this.a.a),e)&&(t=Yf(e,21),function(e,t){var n,r;n=Yf(function(e,t){ml(),Md(e);try{return _l(t)?Ap(e,t):OS(e.d,t)}catch(e){if(hl(e=rE(e),119))return null;if(hl(e,76))return null;throw DE(e)}}(e.b,t),19),n&&(r=n.Y(),n.Q(),e.c-=r)}(this.a.b,t.yb()),!0)},Rg(zA,"AbstractMapBasedMultimap/AsMap/AsMapEntries",387),$S(299,1,qA,mv),tA.H=function(){var e;return e=Vw(this.b),this.a=Yf(e.zb(),19),function(e,t){var n;return n=t.yb(),ml(),new ja(n,ak(e.b,n,Yf(t.zb(),19)))}(this.c,e)},tA.G=function(){return this.b.b},tA.I=function(){Fy(this.b),this.c.b.c-=this.a.Y(),this.a.Q()},Rg(zA,"AbstractMapBasedMultimap/AsMap/AsMapIterator",299),$S(260,649,$A,La),tA.Q=function(){this.b.Q()},tA.kb=function(e){return this.b.R(e)},tA.V=function(){return this.b.V()},tA.mb=function(){return ml(),mf(this.b.bb().mb(),(qu(),qD))},tA.nb=function(e){return!!this.b.R(e)&&(this.b.eb(e),!0)},tA.Y=function(){return this.b.Y()},Rg(zA,"Maps/KeySet",260),$S(386,260,$A,Il),tA.Q=function(){cg(new Da(this,this.b.bb().mb()))},tA.lb=function(e){return this.b.W().lb(e)},tA.t=function(e){return this===e||this.b.W().t(e)},tA.v=function(){return this.b.W().v()},tA.mb=function(){return new Da(this,this.b.bb().mb())},tA.nb=function(e){var t,n;return n=0,(t=Yf(this.b.eb(e),19))&&(n=t.Y(),t.Q(),this.a.c-=n),n>0},Rg(zA,"AbstractMapBasedMultimap/KeySet",386),$S(300,1,qA,Da),tA.G=function(){return this.c.G()},tA.H=function(){return this.a=Yf(this.c.H(),21),this.a.yb()},tA.I=function(){var e;gx(!!this.a),e=Yf(this.a.zb(),19),this.c.I(),this.b.a.c-=e.Y(),e.Q()},Rg(zA,"AbstractMapBasedMultimap/KeySet/1",300),$S(216,640,ZA,Sy),tA.ib=function(e){return function(e,t){var n,r;return nC(e),r=e.d.V(),(n=e.d.ib(t))&&(++e.f.c,r&&bf(e)),n}(this,e)},tA.jb=function(e){return function(e,t){var n,r,i;return!t.V()&&(i=e.Y(),(n=e.d.jb(t))&&(r=e.d.Y(),e.f.c+=r-i,0==i&&bf(e)),n)}(this,e)},tA.Q=function(){var e,t;0!=(t=(e=this).Y())&&(e.d.Q(),e.f.c-=t,fg(e))},tA.kb=function(e){return nC(this),this.d.kb(e)},tA.lb=function(e){return nC(this),this.d.lb(e)},tA.t=function(e){return function(e,t){return t===e||(nC(e),e.d.t(t))}(this,e)},tA.v=function(){return nC(this),this.d.v()},tA.mb=function(){return nC(this),new Qf(this)},tA.nb=function(e){return function(e,t){var n;return nC(e),(n=e.d.nb(t))&&(--e.f.c,fg(e)),n}(this,e)},tA.Y=function(){return nC(this),this.d.Y()},tA.w=function(){return nC(this),Vk(this.d)},Rg(zA,"AbstractMapBasedMultimap/WrappedCollection",216);var GD,BD,HD=xd(WA,"List");$S(297,216,KA,bg),tA.rb=function(e,t){var n;nC(this),n=this.d.V(),Yf(this.d,20).rb(e,t),++this.a.c,n&&bf(this)},tA.sb=function(e){return nC(this),Yf(this.d,20).sb(e)},tA.tb=function(){return nC(this),new Fu(this)},tA.ub=function(e){return nC(this),new jp(this,e)},tA.vb=function(e){var t;return nC(this),t=Yf(this.d,20).vb(e),--this.a.c,fg(this),t},tA.wb=function(e,t){return nC(this),Yf(this.d,20).wb(e,t)},tA.xb=function(e,t){return nC(this),bb(this.a,this.e,Yf(this.d,20).xb(e,t),this.b?this.b:this)},Rg(zA,"AbstractMapBasedMultimap/WrappedList",297),$S(385,297,QA,yh),Rg(zA,"AbstractMapBasedMultimap/RandomAccessWrappedList",385),$S(189,1,qA,Qf),tA.G=function(){return dg(this),this.b.G()},tA.H=function(){return dg(this),this.b.H()},tA.I=function(){this.b.I(),--this.d.f.c,fg(this.d)},Rg(zA,"AbstractMapBasedMultimap/WrappedCollection/WrappedIterator",189),$S(298,189,JA,Fu,jp),tA.J=function(e){var t;t=0==function(e){return nC(e),e.d.Y()}(this.a),(dg(this),Yf(this.b,96)).J(e),++this.a.a.c,t&&bf(this.a)},tA.K=function(){return(dg(this),Yf(this.b,96)).K()},tA.L=function(){return(dg(this),Yf(this.b,96)).L()},tA.M=function(){return(dg(this),Yf(this.b,96)).M()},tA.N=function(){return(dg(this),Yf(this.b,96)).N()},tA.O=function(e){(dg(this),Yf(this.b,96)).O(e)},Rg(zA,"AbstractMapBasedMultimap/WrappedList/WrappedListIterator",298),$S(295,216,$A,xh),Rg(zA,"AbstractMapBasedMultimap/WrappedSet",295),$S(296,216,eM,Eh),Rg(zA,"AbstractMapBasedMultimap/WrappedSortedSet",296),$S(668,1,tM),tA.t=function(e){var t;return!!hl(e,21)&&(t=Yf(e,21),ep(this.yb(),t.yb())&&ep(this.zb(),t.zb()))},tA.v=function(){var e,t;return e=this.yb(),t=this.zb(),(null==e?0:KE(e))^(null==t?0:KE(t))},tA.Ab=function(e){throw new Zr},tA.w=function(){return this.yb()+"="+this.zb()},Rg(zA,nM,668),$S(390,640,ZA,Ht),tA.Q=function(){Ok(this.a)},tA.kb=function(e){return function(e,t){var n;for(n=np(Vg(e.P()));n.b.G();)if(Yf(Ao(n,n.b.H()),19).kb(t))return!0;return!1}(this.a,e)},tA.mb=function(){return new rm(this.a)},tA.Y=function(){return this.a.c},Rg(zA,"AbstractMultimap/Values",390),$S(656,640,rM),tA.ib=function(e){return this.Bb(e,1),!0},tA.Bb=function(e,t){throw new Zr},tA.jb=function(e){return function(e,t){var n,r;if(Or(),t.V())return!1;if(hl(t,207))for(r=Yf(t,207).bb().mb();r.G();)n=Yf(r.H(),83),e.Bb(n.Zb(),n.Yb());else zw(e,t.mb());return!0}(this,e)},tA.Q=function(){cg(this.Eb())},tA.kb=function(e){return this.Cb(e)>0},tA.Cb=function(e){var t,n;for(n=Ug(this).mb();n.G();)if(ep((t=Yf(n.H(),83)).Zb(),e))return t.Yb();return 0},tA.gb=function(){return new Ft(this)},tA.bb=function(){return Ug(this)},tA.t=function(e){return function(e,t){var n,r,i;if(Or(),t===e)return!0;if(hl(t,207)){if(i=Yf(t,207),e.Y()!=i.Y()||Ug(e).Y()!=i.bb().Y())return!1;for(r=i.bb().mb();r.G();)if(n=Yf(r.H(),83),e.Cb(n.Zb())!=n.Yb())return!1;return!0}return!1}(this,e)},tA.v=function(){return Ug(this).v()},tA.V=function(){return Ug(this).V()},tA.mb=function(){return Or(),new za(this,Ug(this).mb())},tA.nb=function(e){return this.Fb(e,1)>0},tA.Fb=function(e,t){throw new Zr},tA.Gb=function(e,t){var n,r;return Or(),Nw(t,"count"),(r=t-(n=this.Cb(e)))>0?this.Bb(e,r):r<0&&this.Fb(e,-r),n},tA.Hb=function(e,t,n){return function(e,t,n,r){return Or(),Nw(n,"oldCount"),Nw(r,"newCount"),e.Cb(t)==n&&(e.Gb(t,r),!0)}(this,e,t,n)},tA.Y=function(){return function(e){var t,n;for(Or(),n=0,t=Ug(e).mb();t.G();)n=mE(n,Yf(t.H(),83).Yb());return aw(n)}(this)},tA.w=function(){return Vk(Ug(this))},Rg(zA,"AbstractMultiset",656),$S(657,649,$A),tA.Q=function(){this.Ib().Q()},tA.kb=function(e){var t;return!(!hl(e,83)||(t=Yf(e,83)).Yb()<=0||this.Ib().Cb(t.Zb())!=t.Yb())},tA.nb=function(e){var t,n,r;return!(!hl(e,83)||(t=(n=Yf(e,83)).Zb(),0==(r=n.Yb())))&&this.Ib().Hb(t,r,0)},Rg(zA,"Multisets/EntrySet",657),$S(396,657,$A,Ft),tA.mb=function(){return this.a.Eb()},tA.Ib=function(){return this.a},tA.Y=function(){return this.a.Db()},Rg(zA,"AbstractMultiset/EntrySet",396),$S(384,294,UA),tA.Z=function(){return new Sa(cx(this.a))},tA.$=function(){return cf(),ip(),KD},tA.U=function(e){return Yf(W_(this,e),18)},tA.X=function(e){return Yf(iS(this,e),18)},tA.P=function(){return this.f||(this.f=new Ma(this,this.b))},tA.t=function(e){return zx(this,e)},Rg(zA,"AbstractSetMultimap",384),$S(342,656,rM),Rg(zA,"AbstractSortedMultiset",342),$S(280,600,UA,zh),tA.a=0,Rg(zA,"ArrayListMultimap",280),$S(159,17,iM);var FD,YD,zD,VD,UD,qD,XD,WD=ew(zA,"BoundType",159,jD,(function(){return Vu(),Sx(Io(WD,1),HA,159,0,[BD,GD])}));$S(623,159,iM,lu),ew(zA,"BoundType/1",623,WD,null),$S(624,159,iM,Iu),ew(zA,"BoundType/2",624,WD,null),$S(234,1,aM),tA.w=function(){return e=this.c.mb(),Uu(),Wg(PE((zu(),FD),Wg(new Qo,91),e),93).a;var e},Rg(zA,"FluentIterable",234),$S(170,234,aM,Cu),tA.mb=function(){return Lg(this)},Rg(zA,"FluentIterable/2",170),$S(664,1,{}),tA.w=function(){return Vk(Tp(this.a.d).b)},Rg(zA,"ForwardingObject",664),$S(665,664,ZA),tA.ib=function(e){return Tp(this.a.d),Jr()},tA.jb=function(e){return Tp(this.a.d),ei()},tA.Q=function(){Tp(this.a.d),ti()},tA.kb=function(e){return Fs(Tp(this.a.d),e)},tA.lb=function(e){return Ys(Tp(this.a.d),e)},tA.V=function(){return Tp(this.a.d).b.V()},tA.mb=function(){return new nr(Tp(this.a.d).b.mb())},tA.nb=function(e){return Tp(this.a.d),ni()},tA.Y=function(){return Tp(this.a.d).b.Y()},tA.ob=function(){return Wp(Tp(this.a.d))},tA.pb=function(e){return iv(Tp(this.a.d),e)},Rg(zA,"ForwardingCollection",665),$S(660,640,sM),tA.mb=function(){return this.Kb()},tA.ib=function(e){return function(){throw new Zr}()},tA.jb=function(e){return function(){throw new Zr}()},tA.Q=function(){!function(){throw new Zr}()},tA.kb=function(e){return null!=e&&mC(this,e,!1)},tA.Jb=function(){switch(this.Y()){case 0:return rp(),rp(),YD;case 1:return rp(),new Yd(this.Kb().H());default:return new vg(this,this.ob())}},tA.nb=function(e){return function(){throw new Zr}()},Rg(zA,"ImmutableCollection",660),$S(316,660,sM,pi),tA.mb=function(){return Ow(this.a.mb())},tA.kb=function(e){return null!=e&&this.a.kb(e)},tA.lb=function(e){return this.a.lb(e)},tA.V=function(){return this.a.V()},tA.Kb=function(){return Ow(this.a.mb())},tA.Y=function(){return this.a.Y()},tA.ob=function(){return this.a.ob()},tA.pb=function(e){return this.a.pb(e)},tA.w=function(){return Vk(this.a)},Rg(zA,"ForwardingImmutableCollection",316),$S(87,660,cM),tA.mb=function(){return this.Kb()},tA.tb=function(){return this.Lb(0)},tA.ub=function(e){return this.Lb(e)},tA.xb=function(e,t){return this.Mb(e,t)},tA.rb=function(e,t){throw new Zr},tA.t=function(e){return function(e,t){var n,r,i;if(Wc(t)===Wc(Md(e)))return!0;if(!hl(t,20))return!1;if(r=Yf(t,20),(i=e.Y())!=r.Y())return!1;if(hl(r,63)){for(n=0;n=(i=o.Y()))o.Q();else for(r=o.mb(),n=0;nt?1:0}(t.Yb(),e.Yb())}(Yf(e,83),Yf(t,83))},Rg(zA,"Multisets/1",398),$S(397,658,{83:1,3:1},cd),tA.Yb=function(){return this.a},tA.Zb=function(){return this.b},tA.a=0,Rg(zA,"Multisets/ImmutableEntry",397),$S(303,1,qA,za),tA.G=function(){return this.d>0||this.c.G()},tA.H=function(){if(!(this.d>0||this.c.G()))throw new xi;return 0==this.d&&(this.b=Yf(this.c.H(),83),this.f=this.d=this.b.Yb()),--this.d,this.a=!0,this.b.Zb()},tA.I=function(){gx(this.a),1==this.f?this.c.I():this.e.Fb(this.b.Zb(),1),--this.f,this.a=!1},tA.a=!1,tA.d=0,tA.f=0,Rg(zA,"Multisets/MultisetIteratorImpl",303),$S(622,659,{3:1,56:1},l),tA.$b=function(e,t){return function(e,t){return Md(e),Md(t),Fm(e,t)}(Yf(e,23),Yf(t,23))},tA.w=function(){return"Ordering.natural()"},Rg(zA,"NaturalOrdering",622),$S(343,661,cM,vg),tA.ub=function(e){return Nl(this.b,e)},tA.Sb=function(){return this.a},tA.sb=function(e){return $c(this.b,e)},tA.Lb=function(e){return Nl(this.b,e)},Rg(zA,"RegularImmutableAsList",343),$S(559,275,uM,lp),tA.Tb=function(){return this.a},Rg(zA,"RegularImmutableBiMap",559),$S(53,667,cM,sb),tA.Nb=function(){return this.a},Rg(zA,"RegularImmutableList",53),$S(321,320,uM,Pi),Rg(zA,"RegularImmutableMap",321),$S(265,315,lM,Zs),Rg(zA,"RegularImmutableSet",265),$S(650,641,$A),Rg(zA,"Sets/SetView",650),$S(377,650,$A,ff),tA.kb=function(e){return Ea(this.b,e)&&Ea(this.c,e)},tA.lb=function(e){return Qm(this.b,e)&&Qm(this.c,e)},tA.V=function(){return Aw(this)},tA.mb=function(){return pg(new zn(new Yn(this.b.a).a.bb().mb()),this.a)},tA.Y=function(){return Jb(pg(new zn(new Yn(this.b.a).a.bb().mb()),this.a))},Rg(zA,"Sets/2",377),$S(328,275,uM,Zv,Yy),tA.fb=function(){return cf(),new ca(this.c)},tA.Tb=function(){return this.a||(this.a=new Yy(this.c,this.b,this))},tA.Ub=function(){return cf(),new ca(this.c)},Rg(zA,"SingletonImmutableBiMap",328),$S(127,667,cM,Yd),tA.Nb=function(){return this.a},Rg(zA,"SingletonImmutableList",127),$S(135,663,lM,ca),tA.mb=function(){return Uu(),new Ut(this.a)},tA.kb=function(e){return sE(this.a,e)},tA.Kb=function(){return Uu(),new Ut(this.a)},tA.Y=function(){return 1},Rg(zA,"SingletonImmutableSet",135),$S(285,342,{207:1,3:1,22:1,19:1},Pv,lk),tA.Bb=function(e,t){return hS(this,e,t)},tA.Cb=function(e){return T_(this,e)},tA.Db=function(){return aw(Hx(this,(Xu(),QD)))},tA.Eb=function(){return new Al(this)},tA.Fb=function(e,t){return XS(this,e,t)},tA.Gb=function(e,t){return Q_(this,e,t)},tA.Hb=function(e,t,n){var r,i,o;return Nw(n,"newCount"),Nw(t,"oldCount"),Yc(uh(this.b,e)),(o=this.c.a)?(i=_y(iW,vM,26,1,12,1),r=pL(o,this.d,e,t,n,i),Dd(this.c,o,r),i[0]==t):0==t&&(n>0&&hS(this,e,n),!0)},tA.Y=function(){return aw(Hx(this,(Xu(),JD)))},Rg(zA,"TreeMultiset",285),$S(619,658,{83:1},Ua),tA.Yb=function(){var e;return 0==(e=this.b.c)?T_(this.a,this.b.b):e},tA.Zb=function(){return this.b.b},Rg(zA,"TreeMultiset/1",619),$S(620,1,qA,Al),tA.H=function(){return function(e){var t;if(!dx(e))throw new xi;return t=new Ua(e.c,e.a),e.b=t,e.a.i==e.c.a?e.a=null:e.a=e.a.i,t}(this)},tA.G=function(){return dx(this)},tA.I=function(){gx(!!this.b),Q_(this.c,this.b.b.b,0),this.b=null},Rg(zA,"TreeMultiset/2",620),$S(205,17,bM);var tj=ew(zA,"TreeMultiset/Aggregate",205,jD,(function(){return Xu(),Sx(Io(tj,1),HA,205,0,[JD,QD])}));$S(617,205,bM,hu),tA._b=function(e){return e.c},tA.ac=function(e){return e?e.j:0},ew(zA,"TreeMultiset/Aggregate/1",617,tj,null),$S(618,205,bM,yl),tA._b=function(e){return 1},tA.ac=function(e){return e?e.a:0},ew(zA,"TreeMultiset/Aggregate/2",618,tj,null),$S(206,658,{83:1,206:1},Sm),tA.Yb=function(){return this.c},tA.Zb=function(){return this.b},tA.w=function(){return Or(),Ob(new cd(this.b,this.c))},tA.a=0,tA.c=0,tA.d=0,tA.j=0,Rg(zA,"TreeMultiset/AvlNode",206),$S(616,1,{},h),Rg(zA,"TreeMultiset/Reference",616);var nj,rj=Rg(IA,"JavaScriptObject$",0);$S(628,1,{}),Rg(IA,"Scheduler",628);var ij,oj,aj,sj,cj,uj,lj,hj,fj=0,dj=0,gj=-1;$S(360,628,{},c),Rg(AA,"SchedulerImpl",360),$S(646,1,{}),tA.hc=function(){return null},tA.ic=function(){return null},tA.jc=function(){return null},tA.kc=function(){return null},tA.lc=function(){return null},Rg(wM,"JSONValue",646),$S(214,646,{214:1},or,Jt),tA.t=function(e){return!!hl(e,214)&&this.a==Yf(e,214).a},tA.gc=function(){return dr},tA.v=function(){return lh(this.a)},tA.hc=function(){return this},tA.w=function(){var e,t,n;for(n=new Xo("["),t=0,e=this.a.length;t0&&(n.a+=","),tu(n,Tw(this,t));return n.a+="]",n.a},Rg(wM,"JSONArray",214),$S(292,646,{},en),tA.gc=function(){return gr},tA.ic=function(){return this},tA.w=function(){return vl(this.a)},tA.a=!1,Rg(wM,"JSONBoolean",292),$S(371,72,dA,Bi),Rg(wM,"JSONException",371),$S(435,646,{},p),tA.gc=function(){return wr},tA.w=function(){return gA},Rg(wM,"JSONNull",435),$S(104,646,{104:1},tn),tA.t=function(e){return!!hl(e,104)&&this.a==Yf(e,104).a},tA.gc=function(){return pr},tA.v=function(){return yv(ro(this.a))},tA.jc=function(){return this},tA.w=function(){return this.a+""},tA.a=0,Rg(wM,"JSONNumber",104),$S(69,646,{69:1},zi,nn),tA.t=function(e){return!!hl(e,69)&&this.a==Yf(e,69).a},tA.gc=function(){return vr},tA.v=function(){return lh(this.a)},tA.kc=function(){return this},tA.w=function(){var e,t,n,r,i,o;for(o=new Xo("{"),e=!0,n=0,r=(i=km(this,_y(OD,hA,2,0,5,1))).length;n>>28]|t[e>>24&15]<<4|t[e>>20&15]<<8|t[e>>16&15]<<12|t[e>>12&15]<<16|t[e>>8&15]<<20|t[e>>4&15]<<24|t[15&e]<<28);var e,t},tA.w=function(){return"("+this.a+","+this.b+")"},tA.a=0,tA.b=0;var pj=Rg(OM,"KVector",10);$S(58,648,{3:1,5:1,22:1,19:1,58:1,20:1},co),tA.ib=function(e){return Of(this,e)},tA.Q=function(){Ip(this)},tA.ub=function(e){return Tk(this,e)},tA.Y=function(){return this.b},tA.b=0,Rg(WA,"LinkedList",58),$S(44,58,{44:1,286:1,3:1,5:1,22:1,19:1,58:1,20:1},Gr,Nh),tA.w=function(){var e,t,n;for(e=new Xo("("),t=Tk(this,0);t.b!=t.d.c;)nu(e,(n=Yf(Tb(t),10)).a+","+n.b),t.b!=t.d.c&&(e.a+="; ");return e.a+=")",e.a},Rg(OM,"KVectorChain",44);var vj,bj,yj,wj,mj,xj,Ej,Cj,kj,_j=xd(LM,"IProperty");$S(131,1,{179:1,131:1,3:1},v),Rg(LM,"MapPropertyHolder",131),$S(14,1,IM,Td,Od,ld,Lf,Ev,Kv),tA.F=function(e){return function(e,t){return Cp(e.b,t.mc())}(this,Yf(e,79))},tA.t=function(e){return bp(this,e)},tA.mc=function(){return this.b},tA.nc=function(){return this.c},tA.oc=function(){return this.d},tA.v=function(){return dk(this.b)},tA.w=function(){return this.b},Rg(LM,"Property",14),$S(366,1,{23:1},b),tA.F=function(e){return-1},Rg(LM,"Property/1",366),$S(367,1,{23:1},y),tA.F=function(e){return 1},Rg(LM,"Property/2",367),$S(27,1,{27:1,22:1},Ja),tA.t=function(e){var t,n,r;return!!hl(e,27)&&(n=Yf(e,27),t=null==this.a?null==n.a:sE(this.a,n.a),r=null==this.b?null==n.b:sE(this.b,n.b),t&&r)},tA.v=function(){var e,t,n;return e=-65536&(t=null==this.a?0:KE(this.a)),t&xA^(-65536&(n=null==this.b?0:KE(this.b)))>>16&xA|e^(n&xA)<<16},tA.mb=function(){return new rn(this)},tA.w=function(){return null==this.a&&null==this.b?"pair(null,null)":null==this.a?"pair(null,"+Vk(this.b)+")":null==this.b?"pair("+Vk(this.a)+",null)":"pair("+Vk(this.a)+","+Vk(this.b)+")"},Rg(AM,"Pair",27),$S(431,1,qA,rn),tA.G=function(){return!this.c&&(!this.b&&null!=this.a.a||null!=this.a.b)},tA.H=function(){if(!this.c&&!this.b&&null!=this.a.a)return this.b=!0,this.a.a;if(!this.c&&null!=this.a.b)return this.c=!0,this.a.b;throw new xi},tA.I=function(){throw this.c&&null!=this.a.b?this.a.b=null:this.b&&null!=this.a.a&&(this.a.a=null),new Xr},tA.b=!1,tA.c=!1,Rg(AM,"Pair/1",431),$S(228,72,dA,Hi),Rg(MM,"UnsupportedConfigurationException",228),$S(99,72,dA,Fi),Rg(MM,"UnsupportedGraphException",99),$S(103,17,{103:1,3:1,23:1,17:1},es);var Nj,Sj,Oj,Tj,Lj,Ij,Aj=ew(RM,"Alignment",103,jD,(function(){return fk(),Sx(Io(Aj,1),HA,103,0,[wj,Ej,Cj,kj,mj,xj])}));$S(59,17,{59:1,3:1,23:1,17:1},ss);var Mj,Pj,Dj,jj,Rj,Gj=ew(RM,"Direction",59,jD,(function(){return CE(),Sx(Io(Gj,1),HA,59,0,[Lj,Tj,Oj,Sj,Ij])}));$S(107,17,{107:1,3:1,23:1,17:1},cs);var Bj,Hj,Fj,Yj,zj,Vj=ew(RM,"EdgeLabelPlacement",107,jD,(function(){return Gm(),Sx(Io(Vj,1),HA,107,0,[Rj,Pj,Dj,jj])}));$S(122,17,{122:1,3:1,23:1,17:1},us);var Uj,qj,Xj,Wj,Zj,$j,Kj,Qj=ew(RM,"EdgeRouting",122,jD,(function(){return kE(),Sx(Io(Qj,1),HA,122,0,[zj,Fj,Hj,Yj])}));$S(133,17,{133:1,3:1,23:1,17:1},ls);var Jj,eR,tR,nR,rR=ew(RM,"EdgeType",133,jD,(function(){return D_(),Sx(Io(rR,1),HA,133,0,[$j,Wj,Kj,qj,Zj,Xj])}));$S(166,17,{166:1,3:1,23:1,17:1},hs);var iR,oR,aR,sR,cR,uR,lR,hR,fR,dR,gR,pR,vR,bR,yR,wR,mR,xR,ER,CR,kR,_R,NR,SR,OR,TR,LR,IR,AR,MR,PR,DR,jR,RR,GR,BR,HR,FR,YR,zR,VR,UR,qR,XR,WR,ZR,$R,KR,QR,JR,eG,tG,nG,rG,iG,oG,aG,sG,cG,uG=ew(RM,"HierarchyHandling",166,jD,(function(){return _E(),Sx(Io(uG,1),HA,166,0,[tR,eR,nR])}));$S(41,17,{41:1,3:1,23:1,17:1},fs);var lG,hG,fG,dG,gG,pG,vG=ew(RM,"NodeLabelPlacement",41,jD,(function(){return yS(),Sx(Io(vG,1),HA,41,0,[tG,eG,rG,cG,sG,aG,iG,oG,nG])}));$S(100,17,{100:1,3:1,23:1,17:1},ds);var bG,yG,wG,mG,xG,EG,CG,kG=ew(RM,"PortAlignment",100,jD,(function(){return LC(),Sx(Io(kG,1),HA,100,0,[pG,gG,hG,fG,dG])}));$S(28,17,{28:1,3:1,23:1,17:1},gs);var _G,NG,SG,OG,TG=ew(RM,"PortConstraints",28,jD,(function(){return b_(),Sx(Io(TG,1),HA,28,0,[CG,EG,xG,yG,mG,wG])}));$S(149,17,{149:1,3:1,23:1,17:1},ps);var LG,IG,AG,MG,PG,DG,jG,RG,GG,BG,HG,FG,YG,zG,VG,UG,qG,XG,WG,ZG,$G,KG,QG=ew(RM,"PortLabelPlacement",149,jD,(function(){return jw(),Sx(Io(QG,1),HA,149,0,[OG,SG,NG])}));$S(32,17,{32:1,3:1,23:1,17:1},vs);var JG,eB,tB,nB,rB,iB=ew(RM,"PortSide",32,jD,(function(){return wI(),Sx(Io(iB,1),HA,32,0,[$G,AG,IG,ZG,KG])}));$S(150,17,{150:1,3:1,23:1,17:1},bs);var oB,aB,sB,cB,uB,lB=ew(RM,"SizeConstraint",150,jD,(function(){return IC(),Sx(Io(lB,1),HA,150,0,[nB,rB,tB,eB])}));$S(139,17,{139:1,3:1,23:1,17:1},ys);var hB,fB,dB,gB,pB,vB,bB,yB,wB,mB,xB,EB,CB,kB,_B,NB,SB,OB,TB,LB,IB,AB,MB,PB=ew(RM,"SizeOptions",139,jD,(function(){return z_(),Sx(Io(PB,1),HA,139,0,[cB,uB,sB,aB])}));$S(62,1,{62:1},ic,mp),tA.t=function(e){var t;return!(null==e||!hl(e,62))&&(t=Yf(e,62),Np(this.d,t.d)&&Np(this.e,t.e)&&Np(this.c,t.c)&&Np(this.b,t.b))},tA.v=function(){return Zx(Sx(Io(_D,1),GA,1,4,[this.d,this.e,this.c,this.b]))},tA.w=function(){return"Rect[x="+this.d+",y="+this.e+",w="+this.c+",h="+this.b+"]"},tA.b=0,tA.c=0,tA.d=0,tA.e=0,Rg(YM,"Rectangle",62),$S(283,62,{283:1,62:1},Br),tA.a=0,Rg(zM,"LabelGroup",283),$S(67,17,{67:1,3:1,23:1,17:1},Ep);var DB,jB,RB,GB=ew(zM,"LabelLocation",67,jD,TC);$S(225,17,{225:1,3:1,23:1,17:1},ws);var BB,HB,FB,YB,zB,VB=ew(zM,"TextAlignment",225,jD,(function(){return Fb(),Sx(Io(VB,1),HA,225,0,[jB,DB,RB])}));$S(589,1,{},bL),tA.a=0,tA.b=!1,tA.d=0,tA.f=0,tA.k=0,tA.r=0,tA.s=0,Rg(YM,"LabelAndNodeSizeProcessor/NodeData",589),$S(171,17,{171:1,3:1,23:1,17:1},ms);var UB,qB,XB,WB,ZB,$B,KB,QB,JB,eH,tH,nH,rH,iH=ew(YM,"LabelSide",171,jD,(function(){return AC(),Sx(Io(iH,1),HA,171,0,[zB,HB,FB])}));$S(590,1,{},on),tA.b=!0,tA.c=!0,tA.d=!0,tA.e=!0,Rg(YM,UM,590),$S(121,1,XM),tA.t=function(e){var t;return!!hl(e,121)&&(t=Yf(e,121),this.d==t.d&&this.a==t.a&&this.b==t.b&&this.c==t.c)},tA.v=function(){var e;return e=yv(ro(this.b))<<16,(e|=yv(ro(this.a))&xA)^(yv(ro(this.c))<<16|yv(ro(this.d))&xA)},tA.w=function(){return"[top="+this.d+",left="+this.b+",bottom="+this.a+",right="+this.c+"]"},tA.a=0,tA.b=0,tA.c=0,tA.d=0,Rg(YM,"Spacing",121),$S(232,121,XM,Hr,wh,Vh),Rg(YM,"Spacing/Insets",232),$S(65,121,{286:1,121:1,65:1,3:1,5:1},Fr,mh,Uh),Rg(YM,"Spacing/Margins",65),$S(364,1,{},Dk),tA.c=!1,tA.d=null,tA.g=null,Rg(aP,"JsonGraphImporter",364),$S(417,14,IM,uc),Rg(aP,"LayoutOptionResolver/DummyProperty",417),$S(348,1,{},xt),Rg(aP,"RecursiveLGraphLayout",348),$S(73,99,{73:1,3:1,54:1,46:1},Yi,Xl,wg);var oH,aH,sH,cH,uH=Rg(aP,"UnsupportedJsonGraphException",73);$S(380,1,{},hp),Rg(lP,"GraphConfigurator",380),$S(49,1,{},iC),Rg(lP,"IntermediateProcessingConfiguration",49),$S(365,1,{},Rb),Rg(lP,"KlayLayered",365),$S(577,1,{},Xm),tA.i=0,Rg(gP,"ComponentsToCGraphTransformer",577),$S(578,1,{},N),tA.tc=function(e,t){return Fo(e.wc(),t.wc())},tA.uc=function(e,t){return Fo(e.xc(),t.xc())},Rg(gP,"ComponentsToCGraphTransformer/1",578),$S(25,1,{25:1}),tA.k=0,tA.o=null,tA.p=!0,tA.r=dP;var lH,hH,fH,dH,gH,pH=Rg(pP,"CNode",25);$S(198,25,{198:1,25:1},tl,om),tA.vc=function(){this.b.d=this.j.d,this.b.e=this.j.e},tA.wc=function(){return null!=this.a?ro(this.a):this.c.i},tA.xc=function(){return null!=this.a?ro(this.a):this.c.i},tA.w=function(){return""},Rg(gP,"ComponentsToCGraphTransformer/CRectNode",198),$S(549,1,{},S),Rg(gP,"OneDimensionalComponentsCompaction",549),$S(550,1,hM,O),tA.B=function(e){return vx(),zd(),0!=Yf(Yf(e,27).a,25).f.f?OX:SX},Rg(gP,"OneDimensionalComponentsCompaction/lambda$0$Type",550),$S(551,1,hM,T),tA.B=function(e){return vx(),zd(),lC(Yf(Yf(e,27).a,25).n,Yf(Yf(e,27).b,59))||0!=Yf(Yf(e,27).a,25).f.f&&lC(Yf(Yf(e,27).a,25).n,Yf(Yf(e,27).b,59))?OX:SX},Rg(gP,"OneDimensionalComponentsCompaction/lambda$1$Type",551),$S(324,1,{},mg),Rg(pP,"CGraph",324),$S(78,1,{78:1},$C),tA.b=0,tA.c=0,tA.d=0,tA.f=0,tA.i=!0,tA.j=dP,Rg(pP,"CGroup",78),$S(470,1,{},L),tA.tc=function(e,t){return Go(e.wc(),t.wc())},tA.uc=function(e,t){return Go(e.xc(),t.xc())},Rg(pP,"ISpacingsHandler/1",470),$S(323,1,{},wS),tA.e=!1;var vH=Rg(pP,"OneDimensionalCompactor",323);$S(554,1,hM,m),tA.B=function(e){return qd(),zd(),0!=Yf(Yf(e,27).a,25).f.f?OX:SX},Rg(pP,"OneDimensionalCompactor/lambda$0$Type",554),$S(335,1,{},Gf),tA.a=!1,tA.b=!1,tA.c=!1,tA.d=!1,Rg(pP,"Quadruplet",335),$S(587,1,{},x),tA.Cc=function(e){var t,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v;for(l=fP,r=new Zn(e.a.b);r.an.j.d||n.j.d==i.j.d&&n.j.c0&&(Tf(e.c,new df(t.c,t.d,e.d)),e.b=t.d)}(this,Yf(e,48))},tA.b=0,Rg(yP,"RectilinearConvexHull/MaximalElementsEventHandler",243),$S(571,1,_A,I),tA.$b=function(e,t){return tp(e,t)},Rg(yP,"RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type",571),$S(570,1,{160:1},ty),tA.Ec=function(e){!function(e,t){var n;e.d&&(t.c!=e.e.c||function(e,t){return Rm(),e==yH&&t==wH||e==yH&&t==mH||e==xH&&t==mH||e==xH&&t==wH}(e.e.b,t.b))&&(Tf(e.f,e.d),e.a=e.d.d+e.d.c,e.d=null,e.e=null),function(e){return e==yH||e==wH}(t.b)?e.c=t:e.b=t,(t.b==(Rm(),yH)&&!t.a||t.b==wH&&t.a||t.b==mH&&t.a||t.b==xH&&!t.a)&&e.c&&e.b&&(n=new mp(e.a,e.c.d,t.c-e.a,e.b.d-e.c.d),e.d=n,e.e=t)}(this,Yf(e,48))},tA.a=0,tA.b=null,tA.c=null,tA.d=null,tA.e=null,Rg(yP,"RectilinearConvexHull/RectangleEventHandler",570),$S(572,1,_A,A),tA.$b=function(e,t){return Hb(),Yf(e,48).c==Yf(t,48).c?Lx(Yf(t,48).d,Yf(e,48).d):Lx(Yf(e,48).c,Yf(t,48).c)},Rg(yP,"RectilinearConvexHull/lambda$0$Type",572),$S(573,1,_A,M),tA.$b=function(e,t){return Hb(),Yf(e,48).c==Yf(t,48).c?Lx(Yf(e,48).d,Yf(t,48).d):Lx(Yf(e,48).c,Yf(t,48).c)},Rg(yP,"RectilinearConvexHull/lambda$1$Type",573),$S(574,1,_A,P),tA.$b=function(e,t){return Hb(),Yf(e,48).c==Yf(t,48).c?Lx(Yf(t,48).d,Yf(e,48).d):Lx(Yf(t,48).c,Yf(e,48).c)},Rg(yP,"RectilinearConvexHull/lambda$2$Type",574),$S(575,1,_A,D),tA.$b=function(e,t){return Hb(),Yf(e,48).c==Yf(t,48).c?Lx(Yf(e,48).d,Yf(t,48).d):Lx(Yf(t,48).c,Yf(e,48).c)},Rg(yP,"RectilinearConvexHull/lambda$3$Type",575),$S(576,1,_A,j),tA.$b=function(e,t){return function(e,t){var n;if(Hb(),e.c==t.c){if(e.b==t.b||function(e,t){return Rm(),e==yH&&t==xH||e==xH&&t==yH||e==mH&&t==wH||e==wH&&t==mH}(e.b,t.b)){if(n=function(e){return e==yH||e==xH}(e.b)?1:-1,e.a&&!t.a)return n;if(!e.a&&t.a)return-n}return Ru(e.b.e,t.b.e)}return Lx(e.c,t.c)}(e,t)},Rg(yP,"RectilinearConvexHull/lambda$4$Type",576),$S(469,1,{},_b),Rg(yP,"Scanline",469),$S(662,1,{}),Rg(mP,"AbstractGraphPlacer",662),$S(222,1,{222:1},Zh),Rg(mP,"ComponentGroup",222),$S(434,662,{},Ir),tA.Fc=function(e,t){var n,r,i,o,a,s,c,u,l,h,f,d;if(this.a.c=_y(_D,GA,1,0,4,1),t.b.c=_y(_D,GA,1,0,4,1),e.V())return t.e.a=0,void(t.e.b=0);for(ME(t,i=Yf(e.sb(0),55)),r=e.mb();r.G();)zE(this,Yf(r.H(),55));for(f=new so,d=2*Yf(kx(i,(ZI(),mq)),15).a,s=new Zn(this.a);s.ah&&(x=0,E+=l+w,l=0),iT(o,x+(g=o.d).a,E+g.b),g.a=0,g.b=0,n=Go(n,x+b.a),l=Go(l,b.b),x+=b.a+w;if(t.e.a=n,t.e.b=E+l,v=Yf(kx(t,mq),15).a,no(ro(Sh(kx(i,($I(),Fq)))))){for(GI(r=new R,e,v),u=e.mb();u.G();)Lh(Tc(Yf(u.H(),55).d),r.e);Lh(Tc(t.e),r.a)}py(t,e)}else(y=Yf(e.sb(0),55))!=t&&(t.b.c=_y(_D,GA,1,0,4,1),pT(t,y,0,0),ME(t,y),Ed(t.a,y.a),t.e.a=y.e.a,t.e.b=y.e.b)},Rg(mP,"SimpleRowGraphPlacer",432),$S(433,1,_A,B),tA.$b=function(e,t){return function(e,t){var n;return 0==(n=t.k-e.k)?Lx(e.e.a*e.e.b,t.e.a*t.e.b):n}(Yf(e,55),Yf(t,55))},Rg(mP,"SimpleRowGraphPlacer/1",433),$S(369,1,kP,Et),tA.sc=function(e,t){VI(e,t)},Rg(_P,"CompoundGraphPostprocessor",369),$S(370,1,wP,H),tA.D=function(e){var t;return!!(t=Yf(kx(Yf(e,114).b,(JI(),kR)),44))&&0!=t.b},Rg(_P,"CompoundGraphPostprocessor/1",370),$S(368,1,kP,Uc),tA.sc=function(e,t){ik(this,e,t)},Rg(_P,"CompoundGraphPreprocessor",368),$S(187,1,{187:1},TE),tA.c=!1,Rg(_P,"CompoundGraphPreprocessor/ExternalPort",187),$S(114,1,{114:1},gf),tA.w=function(){return fh(this.c)+":"+Pw(this.b)},Rg(_P,"CrossHierarchyEdge",114),$S(310,1,_A,an),tA.$b=function(e,t){return function(e,t,n){var r,i;return t.c==(nm(),jq)&&n.c==Dq?-1:t.c==Dq&&n.c==jq?1:(r=EC(t.a,e.a),i=EC(n.a,e.a),t.c==jq?i-r:r-i)}(this,Yf(e,114),Yf(t,114))},Rg(_P,"CrossHierarchyEdgeComparator",310),$S(147,131,{179:1,131:1,147:1,3:1}),tA.k=0,Rg(SP,"LGraphElement",147),$S(12,147,{179:1,131:1,12:1,147:1,3:1},Dp),tA.w=function(){return Pw(this)};var AH=Rg(SP,"LEdge",12);$S(55,147,{179:1,131:1,55:1,147:1,3:1,22:1},Bw),tA.mb=function(){return new Zn(this.c)},tA.w=function(){return 0==this.c.c.length?"G-unlayered"+nN(this.b):0==this.b.c.length?"G-layered"+nN(this.c):"G[layerless"+nN(this.b)+", layers"+nN(this.c)+"]"};var MH=Rg(SP,"LGraph",55);$S(273,1,{}),tA.pc=function(){return this.e.j},Rg(SP,"LGraphAdapters/AbstractLShapeAdapter",273),$S(240,1,{627:1},sn),tA.b=null,Rg(SP,"LGraphAdapters/LEdgeAdapter",240),$S(325,1,{},Cs),tA.pc=function(){return this.a.e},tA.b=null,tA.c=!1,Rg(SP,"LGraphAdapters/LGraphAdapter",325),$S(224,273,{129:1,224:1},cn),Rg(SP,"LGraphAdapters/LLabelAdapter",224),$S(555,273,{626:1},ks),tA.a=null,tA.b=null,tA.c=!1,Rg(SP,"LGraphAdapters/LNodeAdapter",555),$S(556,273,{161:1},_s),tA.a=null,tA.b=null,tA.c=null,tA.d=!1,Rg(SP,"LGraphAdapters/LPortAdapter",556),$S(557,1,_A,F),tA.$b=function(e,t){return function(e,t){var n,r,i,o;if(0!=(o=e.g.e-t.g.e))return o;if(n=Yf(kx(e,(JI(),YR)),24),r=Yf(kx(t,YR),24),n&&r&&0!=(i=n.a-r.a))return i;switch(e.g.e){case 1:return Lx(e.i.a,t.i.a);case 2:return Lx(e.i.b,t.i.b);case 3:return Lx(t.i.a,e.i.a);case 4:return Lx(t.i.b,e.i.b);default:throw new Eo(OP)}}(Yf(e,7),Yf(t,7))},Rg(SP,"LGraphAdapters/PortComparator",557),$S(168,1,{168:1},Dt,Bp),tA.t=function(e){var t;return!!hl(e,168)&&(t=Yf(e,168),this.d==t.d&&this.a==t.a&&this.b==t.b&&this.c==t.c)},tA.v=function(){var e;return e=yv(ro(this.b))<<16,(e|=yv(ro(this.a))&xA)^(yv(ro(this.c))<<16|yv(ro(this.d))&xA)},tA.w=function(){return"Insets[top="+this.d+",left="+this.b+",bottom="+this.a+",right="+this.c+"]"},tA.a=0,tA.b=0,tA.c=0,tA.d=0,Rg(SP,"LInsets",168),$S(165,147,{179:1,131:1,147:1,165:1,3:1}),Rg(SP,"LShape",165),$S(33,165,{179:1,131:1,147:1,33:1,165:1,3:1},xu),tA.w=function(){return null==this.a?"l_"+this.k:"l_"+this.a},Rg(SP,"LLabel",33),$S(9,165,{179:1,131:1,147:1,9:1,165:1,3:1},_k),tA.w=function(){return pv(this)};var PH,DH,jH,RH,GH,BH,HH=Rg(SP,"LNode",9);$S(132,17,{132:1,3:1,23:1,17:1},Ss);var FH,YH,zH,VH,UH,qH,XH=ew(SP,"LNode/NodeType",132,jD,(function(){return j_(),Sx(Io(XH,1),HA,132,0,[GH,RH,DH,BH,jH,PH])}));$S(7,165,{179:1,131:1,147:1,7:1,165:1,3:1},__),tA.w=function(){var e;return null==(e=ay(this))?"p_"+this.k:"p_"+e};var WH=Rg(SP,"LPort",7);$S(399,1,wP,Y),tA.D=function(e){return Dh(e)},Rg(SP,"LPort/1",399),$S(400,1,wP,z),tA.D=function(e){return Ph(e)},Rg(SP,"LPort/2",400),$S(401,1,wP,V),tA.D=function(e){return Yf(e,7).g==(wI(),AG)},Rg(SP,"LPort/3",401),$S(402,1,wP,U),tA.D=function(e){return Yf(e,7).g==(wI(),IG)},Rg(SP,"LPort/4",402),$S(403,1,wP,q),tA.D=function(e){return Yf(e,7).g==(wI(),ZG)},Rg(SP,"LPort/5",403),$S(404,1,wP,X),tA.D=function(e){return Yf(e,7).g==(wI(),KG)},Rg(SP,"LPort/6",404),$S(190,1,aM,un),tA.mb=function(){return new ln(new Zn(this.a.b))},Rg(SP,"LPort/7",190),$S(405,1,qA,ln),tA.H=function(){return Yf(Qv(this.a),12).c},tA.G=function(){return fl(this.a)},tA.I=function(){lg(this.a)},Rg(SP,"LPort/7/1",405),$S(169,1,aM,hn),tA.mb=function(){return new fn(new Zn(this.a.e))},Rg(SP,"LPort/8",169),$S(304,1,qA,fn),tA.H=function(){return Yf(Qv(this.a),12).d},tA.G=function(){return fl(this.a)},tA.I=function(){lg(this.a)},Rg(SP,"LPort/8/1",304),$S(16,147,{179:1,131:1,147:1,16:1,3:1,22:1},xg),tA.mb=function(){return new Zn(this.a)},tA.w=function(){return"L_"+Qy(this.b.c,this,0)+nN(this.a)},Rg(SP,"Layer",16),$S(437,1,kP,W),tA.sc=function(e,t){var n,r,i,o;for(FC(t,"Big nodes intermediate-processing",1),this.a=e,r=new Zn(this.a.c);r.ao?50:o,n=new Pt,d=o+this.d,l=new Zn(h);l.ad){for(f=1,r=a.j.a;r>o;)++f,r=(a.j.a-(f-1)*this.d)/f;Tf(n,new Bb(this,a,f,r))}for(s=new Zn(n);s.aa?50:a,n=new Pt,g=a+this.d,h=new Zn(f);h.ag){for(d=1,r=s.j.a;r>a;)++d,r=(s.j.a-(d-1)*this.d)/d;Tf(n,new ev(this,s,d))}for(c=new Zn(n);c.a0||l.g==KG&&l.b.c.length-l.e.c.length<0)){n=!1;break}if(l.g==KG)for(i=new Zn(l.e);i.a0&&(e.a=c+(f-1)*i,t.d.b+=e.a,t.e.b+=e.a),0!=d.a.Y()&&(f=fL(new mN(1,i),t,d,g,t.e.b+c-t.d.b))>0&&(t.e.b+=c+(f-1)*i)}(this,e,n),function(e){var t,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,C;for(y=new Pt,l=new Zn(e.c);l.a0&&jT((Ey(0,n.c.length),Yf(n.c[0],16)),e),n.c.length>1&&jT(Yf(dd(n,n.c.length-1),16),e),FE(t)},Rg(TP,"HierarchicalPortPositionProcessor",454),$S(471,1,kP,ue),tA.sc=function(e,t){var n,r,i,o,a,s,c,u,l,h,f;for(FC(t,"Hyperedge merging",1),l=new $v(e.c,0);l.b(d=f.c.length)+1?Tf(l,new Ja(c,(Ey(h=(s+d)/2|0,a.c.length),Yf(a.c[h],9)))):d>s+1&&Tf(l,new Ja(c,(Ey(h=((d-s)/2|0)-1,f.c.length),Yf(f.c[h],9))))}for(v=new Zn(l);v.a=2){for(c=!0,Ey(1,s.c.length),g=Yf(s.c[1],16),h=new Zn(r.a);h.a=2){for(c=!0,p=Yf(dd(s,s.c.length-2),16),h=new Zn(i.a);h.an?c:n}e.e.b=c-u,e.d.b-=u,FE(t)},Rg(TP,"LayerSizeAndGraphHeightCalculator",496),$S(497,1,kP,Se),tA.sc=function(e,t){var n,r,i,o;for(FC(t,"Edge joining",1),n=no(ro(Sh(kx(e,($I(),Bq))))),r=new Zn(e.c);r.a0&&Tf(e.p,l),Tf(e.o,l);d=c+(t-=r),u+=t*e.e,Kb(e.a,s,WE(d)),Kb(e.b,s,u),e.j=Ho(e.j,d),e.k=Go(e.k,u),e.d+=t,t+=p}}(this),this.q=Yf(kx(e,($I(),aX)),109),c=Yf(kx(this.g,sX),24).a,i=new Ie,this.q.e){case 2:case 1:default:IL(this,i);break;case 3:for(this.q=(nO(),aY),IL(this,i),a=0,o=new Zn(this.a);o.athis.j&&(this.q=eY,IL(this,i));break;case 4:for(this.q=(nO(),aY),IL(this,i),s=0,r=new Zn(this.b);r.athis.k&&(this.q=rY,IL(this,i));break;case 6:IL(this,new mn(yv(Ic(this.f.length*c/100))));break;case 5:IL(this,new xn(yv(Ic(this.d*c/100))))}!function(e,t){var n,r,i,o,a,s;for(i=new Pt,n=0;n<=e.i;n++)(r=new xg(t)).k=e.i-n,i.c[i.c.length]=r;for(s=new Zn(e.o);s.a=2){for(g=!0,n=Yf(Qv(h=new Zn(o.f)),7);h.a(r-=e.a)?i:r}return i}(this,e),d=e.c.c.length,p=function(e,t){var n,r,i,o,a;for(r=0,n=new Zn(t.c);n.a(a=(i=Yf(Qv(o),9)).j.a+i.e.c+i.e.b+e.b)?r:a;return r}(this,e),S=d*p,(r=(i=Yf(kx(e,(JI(),gR)),59))==(CE(),Oj)||i==Tj||i==Lj?Yf(kx(e,OU),15).a:1/Yf(kx(e,OU),15).a)>(n=S/g))FE(t);else{_=0,o=RP;do{f=o,o=(n=S/++_/(g*_))-r<=0?0-(n-r):n-r}while(n>r);for(f_?1:_)|0,m=C,L=!0;u=C&&(L=!0),++m,++u}for(l=new $v(e.c,0);l.b "+this.a+" "+fh(this.c)},tA.a=0,tA.b=0,tA.d=0,Rg(TP,"SplineSelfLoopRouter/LoopPadding",91),$S(521,1,wP,Kf),tA.D=function(e){return function(e,t){return!!function(e){switch(e.e){case 0:return iV;case 1:return tV;case 2:return eV;case 3:return sV;case 4:return aV;case 5:return fV;case 6:return hV;case 7:return oV;case 8:return nV;case 9:return rV;case 11:return uV;case 10:return cV;default:return lV}}(e.b).kb(t.c)&&(function(e){return e==$z||e==Xz}(e.b)?!(qf(t.d,e.c,e.a)&&qf(t.a,e.c,e.a)):qf(t.d,e.c,e.a)&&qf(t.a,e.c,e.a))}(this,Yf(e,91))},tA.a=0,tA.c=0,Rg(TP,"SplineSelfLoopRouter/LoopPadding/EnclosingPredicate",521),$S(520,1,_A,Qe),tA.$b=function(e,t){return function(e,t){return Lx(t.b,e.b)}(Yf(e,91),Yf(t,91))},Rg(TP,"SplineSelfLoopRouter/LoopPadding/MarginComparator",520),$S(196,1,wP,En),tA.D=function(e){return Yf(e,91).c==this.a},Rg(TP,"SplineSelfLoopRouter/LoopPadding/PortSidePredicate",196),$S(195,1,{195:1},Eb),tA.c=0,tA.d=0,tA.e=0,Rg(TP,"SplineSelfLoopRouter/SelfLoopEdge",195),$S(519,1,_A,Je),tA.$b=function(e,t){return function(e,t){return e.d-t.d}(Yf(e,195),Yf(t,195))},Rg(TP,"SplineSelfLoopRouter/SelfLoopEdge/StepSizeComparator",519),$S(82,25,{25:1,82:1},SS),tA.vc=function(){var e,t;for(e=Tk(this.a,0);e.b!=e.d.c;)Yf(Tb(e),10).a=this.j.d;for(t=Tk(this.c,0);t.b!=t.d.c;)Yf(Tb(t),10).a=this.j.d},tA.wc=function(){return this.b},tA.xc=function(){return this.e},tA.w=function(){return nN(new Yn(this.d.a))},tA.b=0,tA.e=0,Rg(FP,"CLEdge",82),$S(93,25,{25:1,93:1},rT),tA.vc=function(){this.b.i.a=this.j.d+this.b.e.b},tA.wc=function(){return this.b.g==(j_(),DH)?0:this.a},tA.xc=function(){return this.b.g==(j_(),DH)?0:this.c},tA.w=function(){return Vk(kx(this.b,(ZI(),oq)))},tA.a=0,tA.c=0,Rg(FP,"CLNode",93),$S(175,17,{175:1,3:1,23:1,17:1},Ms);var dY,gY,pY,vY,bY,yY,wY,mY=ew(FP,"ConstraintCalculationStrategy",175,jD,(function(){return Sb(),Sx(Io(mY,1),HA,175,0,[lY,hY])}));$S(125,17,{125:1,3:1,23:1,17:1},Ps);var xY,EY,CY,kY=ew(FP,"GraphCompactionStrategy",125,jD,(function(){return gN(),Sx(Io(kY,1),HA,125,0,[yY,pY,wY,bY,vY,gY])}));$S(455,1,kP,Yu),tA.sc=function(e,t){var n,r,i;if((r=Yf(kx(e,($I(),lX)),125))!=(gN(),yY)){switch(FC(t,"Horizontal Compaction",1),this.a=e,go(n=new wS(function(e,t){var n,r,i;e.d=t,wy(e.b),e.c=!1;e:for(n=new Zn(e.d.c);n.ao.j.e+o.j.b?d.d=!0:(d.d=!0,d.c=!0))),r.b!=r.d.c&&(t=n);d&&(a=Yf(Kg(y,c.d.f),25),t.ba.j.e+a.j.b?d.d=!0:(d.d=!0,d.c=!0))}for(u=Lg(qE(v));eC(u);)0!=(c=Yf(_v(u),12)).a.b&&(t=Yf(Gl(c.a),10),c.d.g==(wI(),AG)&&((C=new IO(t,new Qa(t.a,o.j.e),o,c)).c=!0,E.c[E.c.length]=C),c.d.g==ZG&&((C=new IO(t,new Qa(t.a,o.j.e+o.j.b),o,c)).d=!0,E.c[E.c.length]=C))}if(0!=E.c.length){for(Fp(),xb(E,null),Ey(0,E.c.length),i=new SS(Yf(E.c[0],142),e.d),f=1;f(r=Math.ceil(r))?0:r,t.o&&o.o&&hl(t,82)&&hl(o,82)&&!Aw(Kw(Yf(t,82).d,Yf(o,82).d))?(i=rl(new jr,e.d),s=yv(Ic(o.g.a-t.g.a)),wO(da(pa(va(ga(new Dr,0>s?0:s),1),i),e.c[t.f.d])),wO(da(pa(va(ga(new Dr,0>-s?0:-s),1),i),e.c[o.f.d]))):(u=1,(hl(t,82)&&hl(o,93)||hl(o,82)&&hl(t,93))&&(u=2),wO(da(pa(va(ga(new Dr,yv(r)),u),e.c[t.f.d]),e.c[o.f.d]))))}(this),function(e){var t,n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b;for(ml(),l=new Er,c=new Xs,r=new Zn(e.a.a.b);r.at.j.d){if((d=e.c[t.f.d])==(v=e.c[h.f.d]))continue;wO(da(pa(va(ga(new Dr,1),100),d),v))}}}(this),function(e){var t,n,r,i,o,a;for(i=new co,r=new Zn(e.d.a);r.a1)for(t=rl(ya(new jr,e.b++),e.d),a=Tk(i,0);a.b!=a.d.c;)o=Yf(Tb(a),61),wO(da(pa(va(ga(new Dr,1),0),t),o))}(this),vT(Kh(this.d),new Yh),i=new Zn(this.a.a.b);i.a0&&(this.a[B.k]=$++)}else{for(M=0,H=new Zn(N.f);H.a0&&++$}for(te=0,T=0,A=t.length;T0;){for(Tu(z.b>0),Y=0,a=new Zn((B=Yf(z.a.sb(z.c=--z.b),7)).b);a.a0&&(B.g==(wI(),AG)?(this.a[B.k]=te,++te):(this.a[B.k]=te+P+j,++j))}te+=j}else{for(M=0,H=new Zn(N.f);H.a0&&++te}for(F=new Er,g=new Ki,S=0,L=e.length;Sl.c&&(l.c=V)):B.f.d==Z&&(Vl.d&&(l.d=V));for(Fk(p,0,p.length,(Js(),Js(),FX)),ee=_y(iW,vM,26,p.length,12,1),n=_y(iW,vM,26,te+1,12,1),b=0;b0;)x%2>0&&(r+=ie[x+1]),++ie[x=(x-1)/2|0];for(k=_y(NY,GA,158,2*p.length,0,1),m=0;mt.f?1:e.gt.g?1:e.b-t.b}(this,Yf(e,204))},tA.b=0,tA.c=0,tA.d=0,tA.f=0,tA.g=0;var _Y=Rg(YP,"BetweenLayerHyperedgeAllCrossingsCounter/Hyperedge",204);$S(158,1,{158:1,23:1},xp),tA.F=function(e){return function(e,t){return e.ct.c?1:e.bt.b?1:e.a!=t.a?e.a.b-t.a.b:0==e.d&&1==t.d?-1:1==e.d&&0==t.d?1:0}(this,Yf(e,158))},tA.b=0,tA.c=0,tA.d=0;var NY=Rg(YP,"BetweenLayerHyperedgeAllCrossingsCounter/HyperedgeCorner",158);$S(611,339,{},Ui),tA.Gc=function(e,t){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,C;for(C=0,i=0,a=e[0].d,w=t[0].d,u=0,h=t.length;u0;){for(Tu(y.b>0),b=0,r=new Zn((p=Yf(y.a.sb(y.c=--y.b),7)).b);r.a0&&(p.g==(wI(),AG)?(this.a[p.k]=C,++C):(this.a[p.k]=C+d+g,++g),i+=b)}C+=g}else{for(f=0,v=new Zn(s.f);v.a0&&(++C,i+=f)}for(m=_y(iW,vM,26,i,12,1),o=0,c=0,l=e.length;c0;)o%2>0&&(r+=s[o+1]),++s[o=(o-1)/2|0];return r}(C,i,m),n},Rg(YP,"BetweenLayerStraightEdgeAllCrossingsCounter",611),$S(338,1,{},pN),tA.b=0,tA.e=!1,Rg(YP,"CrossingMatrixFiller",338),$S(447,1,kP,et),tA.sc=function(e,t){var n,r;FC(t,"Greedy switch crossing reduction",1),this.e=Yf(kx(e,($I(),Qq)),110),e.c.c.length<2||this.e==(_L(),lU)||(function(e,t){var n,r,i,o,a,s,c,u;for(e.f=t,i=t.c.c.length,e.a=_y(HH,hA,51,i,0,2),e.d=_y(HH,hA,51,i,0,2),e.g=_y(HH,hA,51,i,0,2),a=new $v(t.c,0);a.bAh(e.d,ju(t.a,t.b))?-1:e.c==t.c&&ju(e.a,e.b)==ju(e.a,e.b)?0:1}(this,Yf(e,226))},tA.w=function(){return"ComparableEdgeAndPort [port="+this.b+", edge="+this.a+", portPosition="+this.c+"]"},tA.c=0,Rg(YP,"InLayerEdgeTwoNodeCrossingCounter/ComparableEdgeAndPort",226),$S(612,1,{},e_),tA.e=!0,tA.f=0,tA.g=0,tA.k=!1,Rg(YP,"NorthSouthEdgeAllCrossingsCounter",612),$S(615,1,{},qm),tA.b=0,tA.d=0,tA.e=!1,Rg(YP,"NorthSouthEdgeNeighbouringNodeCrossingsCounter",615),$S(143,1,aM,Fh),tA.mb=function(){return bO(this)},tA.b=0,Rg(YP,"PortIterable",143),$S(344,1,qA,Lv),tA.H=function(){return Yf(hg(this.a),7)},tA.G=function(){return this.a.b>0},tA.I=function(){throw new Zr},Rg(YP,"PortIterable/1",344),$S(336,1,{},B_),Rg(YP,"SwitchDecider",336),$S(89,1,{89:1},tt),tA.w=function(){return"NEdge[id="+this.b+" w="+this.f+" d="+this.a+"]"},tA.a=1,tA.b=0,tA.e=!1,tA.f=0;var SY=Rg(VP,"NEdge",89);$S(157,1,{},Dr),Rg(VP,"NEdge/NEdgeBuilder",157),$S(278,1,{},Pr),Rg(VP,"NGraph",278),$S(61,1,{61:1},jb),tA.b=0,tA.d=-1,tA.e=0,tA.i=-1,tA.j=!1;var OY,TY,LY=Rg(VP,"NNode",61);$S(333,13,xP,Yr),tA.rb=function(e,t){++this.d,xy(e,this.c.length),Nc(this.c,e,t)},tA.ib=function(e){return Cg(this,e)},tA.jb=function(e){return++this.d,ox(this,e)},tA.Q=function(){++this.d,this.c=_y(_D,GA,1,0,4,1)},tA.vb=function(e){return++this.d,yy(this,e)},tA.nb=function(e){return Mu(this,e)},Rg(VP,"NNode/ChangeAwareArrayList",333),$S(199,1,{},jr),Rg(VP,"NNode/NNodeBuilder",199),$S(595,1,{},nt),tA.a=!1,tA.f=yA,tA.j=0,Rg(VP,"NetworkSimplex",595),$S(193,17,{180:1,193:1,3:1,23:1,17:1},Ds),tA.rc=function(){switch(this.e){case 0:return new If;case 1:return new mt;default:throw new oo("No implementation is available for the cycle breaker "+(null!=this.d?this.d:""+this.e))}};var IY,AY,MY,PY,DY,jY,RY=ew(qP,"CycleBreakingStrategy",193,jD,(function(){return zp(),Sx(Io(RY,1),HA,193,0,[OY,TY])}));$S(539,1,XP,If),tA.qc=function(e){return AY},tA.sc=function(e,t){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x,E,C,k,_,N,S,O,T,L,I;for(FC(t,"Greedy cycle removal",1),I=(b=e.b).c.length,this.a=_y(iW,vM,26,I,12,1),this.c=_y(iW,vM,26,I,12,1),this.b=_y(iW,vM,26,I,12,1),s=0,p=new Zn(b);p.a0?_+1:1);for(i=new Zn(m.e);i.a0?_+1:1)}0==this.c[s]?Of(this.d,d):0==this.a[s]&&Of(this.e,d),++s}for(f=-1,h=1,u=new Pt,N=Yf(kx(e,(ZI(),bq)),154);I>0;){for(;0!=this.d.b;)O=Yf(yf(this.d),9),this.b[O.k]=f--,PT(this,O),--I;for(;0!=this.e.b;)T=Yf(yf(this.e),9),this.b[T.k]=h++,PT(this,T),--I;if(I>0){for(l=kA,v=new Zn(b);v.a=l&&(y>l&&(u.c=_y(_D,GA,1,0,4,1),l=y),u.c[u.c.length]=d);c=Yf(dd(u,Zk(N,u.c.length)),9),this.b[c.k]=h++,PT(this,c),--I}}for(S=b.c.length+1,s=0;sthis.b[L]&&(QT(n,!0),Ky(e,FU,(zd(),zd(),OX)));this.a=null,this.c=null,this.b=null,Ip(this.e),Ip(this.d),FE(t)},Rg(qP,"GreedyCycleBreaker",539),$S(540,1,XP,mt),tA.qc=function(e){return MY},tA.sc=function(e,t){var n,r,i,o,a,s,c,u,l,h,f,d;for(FC(t,"Interactive cycle breaking",1),u=new Pt,h=new Zn(e.b);h.a0&&IN(this,a,u);for(r=new Zn(u);r.a(a=s+u.j.a)?s+1:a,p=new $v(n,0),r=null;p.b=a){Tu(p.b>0),p.a.sb(p.c=--p.b);break}d.a>s&&(r?(ox(r.b,d.b),r.a=Go(r.a,d.a),sp(p)):(Tf(d.b,u),d.c=Fo(d.c,s),d.a=Go(d.a,a),r=d))}r||((r=new Rr).c=s,r.a=a,Jh(p,r),Tf(r.b,u))}for(o=e.c,c=0,g=new Zn(n);g.a0&&(n+=a.i.a+a.j.a/2,++u),l=new Zn(a.f);l.a1&&(e.c[l]=!0):y.g==KG&&y.e.c.length+y.b.c.length>1&&(e.d[l]=!0)}p.g==(j_(),BH)&&(++s[l],o[l]=!0)}for(n=!0,g=!0,a=0;a0;S++){c=(u=0!=IS(N,1))?0:p-1,s=this.b[c],k=0!=IS(N,1)?E:y,rC(s,i,u,!1,!0),o=yA,a=!0;do{if(Dm(this.b,this.k),_=o,o=0,o+=iw(this.f,s,c),u){for(v=1;v=0;v--)l=this.b[v],by(k,s,(nm(),Dq)),rC(l,i,!1,!a,!1),o+=iw(this.f,l,v),this.c[v]||this.d[v+1]?o+=QI(this.e,l,s):o+=zI(this.i,l,s),s=l;c=0}a=!1,u=!u}while(o<_&&o>0);(or?o:r;if(o>a){for(l=yC(e,n).mb();l.G();)f[(u=Yf(l.H(),7)).k]=t+zS(n,u.g)-a;return o-a}return 0}switch(n.e){case 1:for(i=0,s=0,h=new Zn(e.f);h.a"),et.e?1:e.ft.f?1:lh(e)-lh(t)}(this,Yf(e,197))},tA.b=0,tA.c=0,tA.e=0,tA.f=0;var ez=Rg(rD,"HyperedgeCrossingsCounter/Hyperedge",197);$S(156,1,{156:1,23:1},Rp),tA.F=function(e){return function(e,t){return e.ct.c?1:e.bt.b?1:e.a!=t.a?lh(e.a)-lh(t.a):e.d==(hb(),nz)&&t.d==tz?-1:e.d==tz&&t.d==nz?1:0}(this,Yf(e,156))},tA.b=0,tA.c=0;var tz,nz,rz=Rg(rD,"HyperedgeCrossingsCounter/HyperedgeCorner",156);$S(242,17,{242:1,3:1,23:1,17:1},oc);var iz,oz,az,sz,cz=ew(rD,"HyperedgeCrossingsCounter/HyperedgeCorner/Type",242,jD,(function(){return hb(),Sx(Io(cz,1),HA,242,0,[nz,tz])}));$S(545,1,XP,Nt),tA.qc=function(e){return Yf(kx(e,(ZI(),WU)),18).kb((KO(),nU))?iz:null},tA.sc=function(e,t){var n;for(FC(t,"Interactive node placement",1),this.a=Yf(kx(e,(ZI(),xq)),134),n=new Zn(e.c);n.a(N=Yf(kx(n,(ZI(),pq)),24).a)?h:N;for(r=new Zn(k.e);r.a(N=Yf(kx(n,(ZI(),pq)),24).a)?C:N}Ky(w,az,WE(h)),Ky(w,sz,WE(C))}for(v=0,f=new Zn(t.c);f.a=0){for(c=null,s=new $v(l.a,u+1);s.b0&&u[r]&&(g=tf(e.b,u[r],c)),p=Go(p,i.d.c.b+g);for(o=new Zn(l.f);o.am)?(c=2,a=yA):0==c?(c=1,a=E):(c=0,a=E):(f=E>=a||a-E0?(l=Yf(dd(h.d.a,o-1),9),C=Cf(e.b,h,l),p=h.i.b-h.e.d-(l.i.b+l.j.b+l.e.a+C)):p=h.i.b-h.e.d,c=p0?C:0,d.c=n,d.d=Yf(Kg(w,u.c.f),61),Cg(d.c.g,d),Cg(d.d.c,d),(N=new tt).f=Rk(u),N.a=C<0?-C:0,N.c=n,N.d=Yf(Kg(w,u.d.f),61),Cg(N.c.g,N),Cg(N.d.c,N));for(i=Yf(kx(e,($I(),pX)),24).a*yv(Math.sqrt(y)),vT(po(vo(Kh(r),i),!1),Mm(t,1)),p=new Zn(r.a);p.aa&&(a=Yf(kx(n,pq),24).a);for(r=Lg(qE(s));eC(r);)n=Yf(_v(r),12),s.d!=n.c.f.d&&Yf(kx(n,(ZI(),pq)),24).a==a&&Tf(u,new Ja(n.c.f,n));xb(u,e.c),Ld(e.b,s.k,u)}}(h,e),h.f=Ol(h.d),function(e,t){var n,r,i,o,a,s,c,u;for(o=new Zn(t.c);o.aa&&(a=Yf(kx(n,pq),24).a);for(r=Lg(XE(s));eC(r);)n=Yf(_v(r),12),s.d!=n.d.f.d&&Yf(kx(n,(ZI(),pq)),24).a==a&&Tf(u,new Ja(n.d.f,n));xb(u,e.c),Ld(e.f,s.k,u)}}(h,e),h}(e),this.a=no(ro(Sh(kx(e,($I(),Uq))))),this.e=Wc(kx(e,Kq))===Wc((M_(),UV)),function(e,t){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w;if(!((p=t.c.c.length)<3)){for(d=_y(iW,vM,26,p,12,1),h=0,l=new Zn(t.c);l.aa)&&_g(e.c,Yf(v.b,12));++s}o=a}}}(this,e),Nw(4,dM),f=new cw(4),Yf(kx(e,Kq),124).e){case 3:d=new yO(e,this.d.d,(ub(),xz),(hv(),yz)),f.c[f.c.length]=d;break;case 1:g=new yO(e,this.d.d,(ub(),Ez),(hv(),yz)),f.c[f.c.length]=g;break;case 4:b=new yO(e,this.d.d,(ub(),xz),(hv(),wz)),f.c[f.c.length]=b;break;case 2:y=new yO(e,this.d.d,(ub(),Ez),(hv(),wz)),f.c[f.c.length]=y;break;default:d=new yO(e,this.d.d,(ub(),xz),(hv(),yz)),g=new yO(e,this.d.d,Ez,yz),b=new yO(e,this.d.d,xz,wz),y=new yO(e,this.d.d,Ez,wz),f.c[f.c.length]=b,f.c[f.c.length]=y,f.c[f.c.length]=d,f.c[f.c.length]=g}for(n=new fc(e,this.d),o=new Zn(f);o.aE[c]&&(g=c),l=new Zn(e.b.c);l.axS(r))&&(u=r);for(!u&&(Ey(0,f.c.length),u=Yf(f.c[0],81)),h=new Zn(e.c);h.a0?1:r<0?-1:0)}(this,Yf(e,27),Yf(t,27))},Rg(aD,"NeighborhoodInformation/NeighborComparator",598),$S(334,1,{}),Rg(aD,"ThresholdStrategy",334),$S(602,334,{},Ei),tA.Ic=function(e,t,n){return this.a.k==(ub(),Ez)?fP:dP},tA.Jc=function(){},Rg(aD,"ThresholdStrategy/NullThresholdStrategy",602),$S(249,1,{249:1},dc),tA.c=!1,tA.d=!1,Rg(aD,"ThresholdStrategy/Postprocessable",249),$S(603,334,{},Ci),tA.Ic=function(e,t,n){var r,i,o;return i=t==n,r=this.a.a[n.k]==t,i||r?(o=e,this.a.c,hv(),i&&(o=sL(this,t,!0)),(o==1/0||o==-1/0)&&r&&(o=sL(this,n,!1)),o):e},tA.Jc=function(){for(var e,t,n;0!=this.d.b;)(t=eT(this,n=Yf(Kp(this.d),249))).a&&(e=t.a,this.c.a[e.c.f.d.k]!==this.c.a[e.d.f.d.k]&&(GS(this,n)||su(this.e,n)));for(;0!=this.e.a.c.length;)GS(this,Yf(Vx(this.e),249))},Rg(aD,"ThresholdStrategy/SimpleThresholdStrategy",603),$S(423,1,{180:1},st),tA.rc=function(){switch(this.a.e){case 1:return new Hc;case 3:return new It;default:return new Lt}},Rg(sD,"EdgeRouterFactory",423),$S(538,1,XP,Lt),tA.qc=function(e){var t,n;return n=Yf(kx(e,(ZI(),WU)),18),t=new iC,n.kb((KO(),rU))&&(Am(t,Az),Am(t,Pz)),(n.kb(oU)||no(ro(Sh(kx(e,($I(),$q))))))&&(Am(t,Pz),n.kb(aU)&&Am(t,Dz)),n.kb(nU)&&Am(t,Iz),n.kb(cU)&&Am(t,jz),n.kb(iU)&&Am(t,Mz),n.kb(JV)&&Am(t,Tz),n.kb(tU)&&Am(t,Lz),t},tA.sc=function(e,t){var n,r,i,o,a,s,c,u,l,h,f,d;FC(t,"Orthogonal edge routing",1),f=Yf(kx(e,(ZI(),xq)),134),no(ro(Sh(kx(e,(JI(),dR))))),l=new mN(0,f.a),d=0,o=new $v(e.c,0),a=null,s=null;do{u=(c=o.b0?(n=f.b+(h-1)*f.a,c&&(n+=f.b),n"+this.b},tA.c=0,Rg(sD,"OrthogonalRoutingGenerator/Dependency",118),$S(80,1,{80:1,23:1},Wm),tA.F=function(e){return function(e,t){return e.d-t.d}(this,Yf(e,80))},tA.t=function(e){var t;return!!hl(e,80)&&(t=Yf(e,80),this.d==t.d)},tA.v=function(){return this.d},tA.w=function(){var e,t,n,r;for(e=new Xo("{"),r=new Zn(this.g);r.aCP&&(i=new Qa(c,h),Of(n.a,i),ZO(this.a,n,e,i,!1),o=new Qa(l,h),Of(n.a,o),ZO(this.a,n,e,o,!1))},tA.Lc=function(e){return e.f.i.a+e.i.a+e.a.a},tA.Mc=function(){return wI(),ZG},tA.Nc=function(){return wI(),AG},Rg(sD,"OrthogonalRoutingGenerator/NorthToSouthRoutingStrategy",580),$S(581,1,{},Dn),tA.Kc=function(e,t){var n,r,i,o,a,s,c,u,l,h;for(h=t-e.i*this.a.c,s=new Zn(e.g);s.aCP&&(i=new Qa(c,h),Of(n.a,i),ZO(this.a,n,e,i,!1),o=new Qa(l,h),Of(n.a,o),ZO(this.a,n,e,o,!1))},tA.Lc=function(e){return e.f.i.a+e.i.a+e.a.a},tA.Mc=function(){return wI(),AG},tA.Nc=function(){return wI(),ZG},Rg(sD,"OrthogonalRoutingGenerator/SouthToNorthRoutingStrategy",581),$S(579,1,{},jn),tA.Kc=function(e,t){var n,r,i,o,a,s,c,u,l,h;for(h=t+e.i*this.a.c,s=new Zn(e.g);s.aCP&&(i=new Qa(h,c),Of(n.a,i),ZO(this.a,n,e,i,!0),o=new Qa(h,l),Of(n.a,o),ZO(this.a,n,e,o,!0))},tA.Lc=function(e){return e.f.i.b+e.i.b+e.a.b},tA.Mc=function(){return wI(),IG},tA.Nc=function(){return wI(),KG},Rg(sD,"OrthogonalRoutingGenerator/WestToEastRoutingStrategy",579),$S(535,1,XP,Hc),tA.qc=function(e){var t,n;return n=Yf(kx(e,(ZI(),WU)),18),t=new iC,(n.kb((KO(),oU))||no(ro(Sh(kx(e,($I(),$q))))))&&(Am(t,Bz),n.kb(aU)&&Am(t,Hz)),n.kb(JV)&&Am(t,Rz),n.kb(tU)&&Am(t,Gz),t},tA.sc=function(e,t){var n,r,i,o,a,s,c,u,l,h,f,d,g,p,v,b,y,w,m,x;for(FC(t,"Polyline edge routing",1),h=Yf(kx(e,(ZI(),mq)),15).a,n=Yf(kx(e,($I(),Zq)),15).a,v=0,0!=e.c.c.length&&(v=.4*n*(b=HS(Yf(dd(e.c,0),16)))),o=new $v(e.c,0);o.b0&&(v-=h),DL(i,v),c=0,l=new Zn(i.a);l.a(p-g<=0?0-(p-g):p-g)?s:p-g<=0?0-(p-g):p-g;switch(u.g.e){case 0:case 4:case 1:case 3:lL(this,u,v)}c=c>s?c:s}o.b(b=HS((Tu(o.b0),o.a.sb(o.c=--o.b)),a=.4*n*c,!r&&o.b0?((f=(b+1)*this.a)=0&&(L+=(b+2)*this.a)}p=m,c=u}while(m);for(r=new Zn(S);r.a("+this.c+") "+this.b},tA.c=0,Rg(cD,"SplineEdgeRouter/Dependency",117),$S(223,17,{223:1,3:1,23:1,17:1},gc);var NV,SV,OV,TV,LV,IV,AV=ew(cD,"SplineEdgeRouter/SideToProcess",223,jD,(function(){return fv(),Sx(Io(AV,1),HA,223,0,[CV,kV])}));$S(77,1,{77:1,23:1},KN,ML),tA.F=function(e){return function(e,t){return e.i-t.i}(this,Yf(e,77))},tA.a=0,tA.b=0,tA.e=0,tA.f=!1,tA.i=0,tA.k=0,tA.n=0,tA.p=0,Rg(cD,"SplineEdgeRouter/SplineHyperEdge",77),$S(123,17,{123:1,3:1,23:1,17:1},pc);var MV,PV,DV,jV,RV=ew(dD,"ContentAlignment",123,jD,(function(){return P_(),Sx(Io(RV,1),HA,123,0,[IV,LV,TV,SV,NV,OV])}));$S(218,17,{218:1,3:1,23:1,17:1},vc);var GV,BV,HV,FV,YV,zV=ew(dD,"EdgeConstraint",218,jD,(function(){return Dx(),Sx(Io(zV,1),HA,218,0,[DV,PV,jV])}));$S(115,17,{115:1,3:1,23:1,17:1},bc);var VV,UV,qV,XV,WV,ZV,$V,KV=ew(dD,"EdgeLabelSideSelection",115,jD,(function(){return w_(),Sx(Io(KV,1),HA,115,0,[BV,GV,FV,HV,YV])}));$S(124,17,{124:1,3:1,23:1,17:1},yc);var QV,JV,eU,tU,nU,rU,iU,oU,aU,sU,cU,uU=ew(dD,"FixedAlignment",124,jD,(function(){return M_(),Sx(Io(uU,1),HA,124,0,[WV,XV,$V,qV,ZV,UV])}));$S(113,17,{113:1,3:1,23:1,17:1},wc);var lU,hU,fU,dU,gU,pU,vU,bU,yU=ew(dD,"GraphProperties",113,jD,(function(){return KO(),Sx(Io(yU,1),HA,113,0,[eU,nU,rU,iU,oU,aU,cU,JV,tU,sU])}));$S(110,17,{110:1,3:1,23:1,17:1},kb),tA.a=!1,tA.b=!1,tA.c=!1;var wU,mU,xU,EU,CU=ew(dD,"GreedySwitchType",110,jD,(function(){return _L(),Sx(Io(CU,1),HA,110,0,[hU,pU,fU,vU,dU,bU,gU,lU])}));$S(140,17,{140:1,3:1,23:1,17:1},mc);var kU,_U,NU=ew(dD,"InLayerConstraint",140,jD,(function(){return Rw(),Sx(Io(NU,1),HA,140,0,[xU,EU,mU])}));$S(174,17,{174:1,3:1,23:1,17:1},xc);var SU,OU,TU,LU,IU,AU,MU,PU,DU,jU,RU,GU,BU,HU,FU,YU,zU,VU,UU,qU,XU,WU,ZU,$U,KU,QU,JU,eq,tq,nq,rq,iq,oq,aq,sq,cq,uq,lq,hq,fq,dq,gq,pq,vq,bq,yq,wq,mq,xq,Eq,Cq,kq,_q,Nq,Sq,Oq,Tq,Lq,Iq,Aq,Mq=ew(dD,"InteractiveReferencePoint",174,jD,(function(){return cb(),Sx(Io(Mq,1),HA,174,0,[kU,_U])}));$S(85,17,{85:1,3:1,23:1,17:1},Ec);var Pq,Dq,jq,Rq,Gq=ew(dD,"LayerConstraint",85,jD,(function(){return qk(),Sx(Io(Gq,1),HA,85,0,[Aq,Oq,Tq,Lq,Iq])}));$S(219,17,{219:1,3:1,23:1,17:1},Cc);var Bq,Hq,Fq,Yq,zq,Vq,Uq,qq,Xq,Wq,Zq,$q,Kq,Qq,Jq,eX,tX,nX,rX,iX,oX,aX,sX,cX,uX,lX,hX,fX,dX,gX,pX,vX,bX,yX,wX,mX=ew(dD,"PortType",219,jD,(function(){return nm(),Sx(Io(mX,1),HA,219,0,[Rq,Dq,jq])}));$S(153,17,{153:1,3:1,23:1,17:1},kc);var xX,EX,CX,kX,_X=ew(dD,"SelfLoopPlacement",153,jD,(function(){return MC(),Sx(Io(_X,1),HA,153,0,[bX,wX,yX])}));$S(134,1,{134:1},pI),tA.a=0,tA.b=0,tA.c=0,tA.d=0,tA.e=0,tA.f=0,Rg(dD,"Spacings",134),$S(172,17,{172:1,3:1,23:1,17:1},_c);var NX,SX,OX,TX=ew(dD,"WideNodesStrategy",172,jD,(function(){return Bm(),Sx(Io(TX,1),HA,172,0,[EX,CX,kX])}));$S(644,1,{}),Rg(MA,"OutputStream",644),$S(645,644,{}),Rg(MA,"FilterOutputStream",645),$S(291,645,{},ut),Rg(MA,"PrintStream",291),$S(255,1,{}),tA.w=function(){return this.a},Rg(LA,"AbstractStringBuilder",255),$S(621,95,dA,ki),Rg(LA,"ArrayIndexOutOfBoundsException",621),$S(290,72,dA,qr,xo),Rg(LA,"ArrayStoreException",290),$S(252,46,fA),Rg(LA,"Error",252),$S(84,252,fA,xr,sw),Rg(LA,"AssertionError",84),aA={3:1,349:1,23:1};var LX=Rg(LA,"Boolean",349);sA={3:1,23:1,184:1,231:1};var IX=Rg(LA,"Double",184);$S(15,231,{3:1,23:1,15:1,231:1},Gn,Bn),tA.F=function(e){return function(e,t){return Lx(e.a,t.a)}(this,Yf(e,15))},tA.t=function(e){return hl(e,15)&&Yf(e,15).a==this.a},tA.v=function(){return yv(this.a)},tA.w=function(){return e=this.a,oi(),""+e;var e},tA.a=0;var AX,MX,PX=Rg(LA,"Float",15);$S(101,72,dA,Xr,Eo),Rg(LA,"IllegalStateException",101),$S(608,72,dA,Co),Rg(LA,"NegativeArraySizeException",608),$S(76,72,{3:1,54:1,76:1,46:1},Wr,ko),Rg(LA,"NullPointerException",76),$S(130,29,{3:1,54:1,29:1,130:1,46:1},_i,Wo),Rg(LA,"NumberFormatException",130),$S(146,1,{3:1,146:1},Gp),tA.t=function(e){var t;return!!hl(e,146)&&(t=Yf(e,146),this.c==t.c&&Np(this.d,t.d)&&Np(this.a,t.a)&&Np(this.b,t.b))},tA.v=function(){return Zx(Sx(Io(_D,1),GA,1,4,[WE(this.c),this.a,this.d,this.b]))},tA.w=function(){return this.a+"."+this.d+"("+(null!=this.b?this.b:"Unknown Source")+(this.c>=0?":"+this.c:"")+")"},tA.c=0;var DX,jX,RX,GX,BX,HX,FX,YX,zX=Rg(LA,"StackTraceElement",146);$S(98,255,{345:1},Qo,Jo,Xo),Rg(LA,"StringBuilder",98),$S(45,72,{3:1,54:1,46:1,45:1},Zr,_o),Rg(LA,"UnsupportedOperationException",45),$S(213,638,XA),tA.Q=function(){wy(this)},tA.R=function(e){return qy(this,e)},tA.ab=function(e){return Jx(this,e,this.e)||Jx(this,e,this.d)},tA.bb=function(){return new Hn(this)},tA.cb=function(e){return Kg(this,e)},tA.db=function(e,t){return yp(this,e,t)},tA.eb=function(e){return Zd(this,e)},tA.Y=function(){return Bs(this)},Rg(WA,"AbstractHashMap",213),$S(120,641,$A,Hn),tA.Q=function(){this.a.Q()},tA.kb=function(e){return fb(this,e)},tA.mb=function(){return new Xx(this.a)},tA.nb=function(e){var t;return!!fb(this,e)&&(t=Yf(e,21).yb(),this.a.eb(t),!0)},tA.Y=function(){return this.a.Y()},Rg(WA,"AbstractHashMap/EntrySet",120),$S(148,1,qA,Xx),tA.H=function(){return Vw(this)},tA.G=function(){return this.b},tA.I=function(){Fy(this)},tA.b=!1,Rg(WA,"AbstractHashMap/EntrySetIterator",148),$S(162,1,qA,Fn),tA.G=function(){return this.b0},tA.L=function(){return this.b},tA.M=function(){return hg(this)},tA.N=function(){return this.b-1},tA.O=function(e){ef(this,e)},Rg(WA,"AbstractList/ListIteratorImpl",43),$S(258,647,KA,Xv),tA.rb=function(e,t){xy(e,this.b),this.c.rb(this.a+e,t),++this.b},tA.sb=function(e){return Ey(e,this.b),this.c.sb(this.a+e)},tA.vb=function(e){var t;return Ey(e,this.b),t=this.c.vb(this.a+e),--this.b,t},tA.wb=function(e,t){return Ey(e,this.b),this.c.wb(this.a+e,t)},tA.Y=function(){return this.b},tA.a=0,tA.b=0,Rg(WA,"AbstractList/SubList",258),$S(36,641,$A,Yn),tA.Q=function(){this.a.Q()},tA.kb=function(e){return this.a.R(e)},tA.mb=function(){return new zn(this.a.bb().mb())},tA.nb=function(e){return!!this.a.R(e)&&(this.a.eb(e),!0)},tA.Y=function(){return this.a.Y()},Rg(WA,"AbstractMap/1",36),$S(40,1,qA,zn),tA.G=function(){return this.a.G()},tA.H=function(){return Yf(this.a.H(),21).yb()},tA.I=function(){this.a.I()},Rg(WA,"AbstractMap/1/1",40),$S(211,640,ZA,Vn),tA.Q=function(){this.a.Q()},tA.kb=function(e){return this.a.ab(e)},tA.mb=function(){return new Un(this.a.bb().mb())},tA.Y=function(){return this.a.Y()},Rg(WA,"AbstractMap/2",211),$S(212,1,qA,Un),tA.G=function(){return this.a.G()},tA.H=function(){return Yf(this.a.H(),21).zb()},tA.I=function(){this.a.I()},Rg(WA,"AbstractMap/2/1",212),$S(210,1,{210:1,21:1}),tA.t=function(e){var t;return!!hl(e,21)&&(t=Yf(e,21),Np(this.d,t.yb())&&Np(this.e,t.zb()))},tA.yb=function(){return this.d},tA.zb=function(){return this.e},tA.v=function(){return Gu(this.d)^Gu(this.e)},tA.Ab=function(e){return pf(this,e)},tA.w=function(){return this.d+"="+this.e},Rg(WA,"AbstractMap/AbstractEntry",210),$S(163,210,{210:1,163:1,21:1},Gc),Rg(WA,"AbstractMap/SimpleEntry",163),$S(652,1,tM),tA.t=function(e){var t;return!!hl(e,21)&&(t=Yf(e,21),Np(this.yb(),t.yb())&&Np(this.zb(),t.zb()))},tA.v=function(){return Gu(this.yb())^Gu(this.zb())},tA.w=function(){return this.yb()+"="+this.zb()},Rg(WA,nM,652),$S(639,638,XA),tA._=function(e){return Cy(this,e)},tA.R=function(e){return Pc(this,e)},tA.bb=function(){return new qn(this)},tA.cb=function(e){return Zc(eE(this,e))},tA.W=function(){return new Xn(this)},Rg(WA,"AbstractNavigableMap",639),$S(287,641,$A,qn),tA.kb=function(e){return hl(e,21)&&Cy(this.b,Yf(e,21))},tA.mb=function(){return new lf(this.b)},tA.nb=function(e){var t;return!!hl(e,21)&&(t=Yf(e,21),Ry(this.b,t))},tA.Y=function(){return this.b.c},Rg(WA,"AbstractNavigableMap/EntrySet",287),$S(229,641,eM,Xn),tA.Q=function(){lo(this.a)},tA.kb=function(e){return Pc(this.a,e)},tA.mb=function(){return new Wn(new lf(new Ql(this.a).b))},tA.nb=function(e){return!!Pc(this.a,e)&&(gp(this.a,e),!0)},tA.Y=function(){return this.a.c},Rg(WA,"AbstractNavigableMap/NavigableKeySet",229),$S(230,1,qA,Wn),tA.G=function(){return Gs(this.a.a)},tA.H=function(){return dh(this.a).yb()},tA.I=function(){td(this.a)},Rg(WA,"AbstractNavigableMap/NavigableKeySet/1",230),$S(4,1,qA,Zn),tA.G=function(){return fl(this)},tA.H=function(){return Qv(this)},tA.I=function(){lg(this)},tA.a=0,tA.b=-1,Rg(WA,"ArrayList/1",4),$S(94,647,pD,$n),tA.kb=function(e){return-1!=function(e,t){var n,r;for(n=0,r=e.Y();nt&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-n)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(e){var t=this.rect.x;t>a.WORLD_BOUNDARY?t=a.WORLD_BOUNDARY:t<-a.WORLD_BOUNDARY&&(t=-a.WORLD_BOUNDARY);var n=this.rect.y;n>a.WORLD_BOUNDARY?n=a.WORLD_BOUNDARY:n<-a.WORLD_BOUNDARY&&(n=-a.WORLD_BOUNDARY);var r=new c(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},e.exports=u},function(e,t,n){"use strict";function r(e,t){null==e&&null==t?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r},function(e,t,n){"use strict";var r=n(2),i=n(10),o=n(0),a=n(6),s=n(3),c=n(1),u=n(13),l=n(12),h=n(11);function f(e,t,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,null!=t&&t instanceof a?this.graphManager=t:null!=t&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var d in f.prototype=Object.create(r.prototype),r)f[d]=r[d];f.prototype.getNodes=function(){return this.nodes},f.prototype.getEdges=function(){return this.edges},f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getParent=function(){return this.parent},f.prototype.getLeft=function(){return this.left},f.prototype.getRight=function(){return this.right},f.prototype.getTop=function(){return this.top},f.prototype.getBottom=function(){return this.bottom},f.prototype.isConnected=function(){return this.isConnected},f.prototype.add=function(e,t,n){if(null==t&&null==n){var r=e;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw"Source or target not in graph!";if(t.owner!=n.owner||t.owner!=this)throw"Both owners must be this graph!";return t.owner!=n.owner?null:(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i)},f.prototype.remove=function(e){var t=e;if(e instanceof s){if(null==t)throw"Node is null!";if(null==t.owner||t.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var n=t.edges.slice(),r=n.length,i=0;i-1&&l>-1))throw"Source and/or target doesn't know this edge!";if(o.source.edges.splice(u,1),o.target!=o.source&&o.target.edges.splice(l,1),-1==(a=o.source.owner.getEdges().indexOf(o)))throw"Not in owner's edge list!";o.source.owner.getEdges().splice(a,1)}},f.prototype.updateLeftTop=function(){for(var e,t,n,r=i.MAX_VALUE,o=i.MAX_VALUE,a=this.getNodes(),s=a.length,c=0;c(e=u.getTop())&&(r=e),o>(t=u.getLeft())&&(o=t)}return r==i.MAX_VALUE?null:(n=null!=a[0].getParent().paddingLeft?a[0].getParent().paddingLeft:this.margin,this.left=o-n,this.top=r-n,new l(this.left,this.top))},f.prototype.updateBounds=function(e){for(var t,n,r,o,a,s=i.MAX_VALUE,c=-i.MAX_VALUE,l=i.MAX_VALUE,h=-i.MAX_VALUE,f=this.nodes,d=f.length,g=0;g(t=p.getLeft())&&(s=t),c<(n=p.getRight())&&(c=n),l>(r=p.getTop())&&(l=r),h<(o=p.getBottom())&&(h=o)}var v=new u(s,l,c-s,h-l);s==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),a=null!=f[0].getParent().paddingLeft?f[0].getParent().paddingLeft:this.margin,this.left=v.x-a,this.right=v.x+v.width+a,this.top=v.y-a,this.bottom=v.y+v.height+a},f.calculateBounds=function(e){for(var t,n,r,o,a=i.MAX_VALUE,s=-i.MAX_VALUE,c=i.MAX_VALUE,l=-i.MAX_VALUE,h=e.length,f=0;f(t=d.getLeft())&&(a=t),s<(n=d.getRight())&&(s=n),c>(r=d.getTop())&&(c=r),l<(o=d.getBottom())&&(l=o)}return new u(a,c,s-a,l-c)},f.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},f.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},f.prototype.calcEstimatedSize=function(){for(var e=0,t=this.nodes,n=t.length,r=0;r=this.nodes.length){var c=0;i.forEach((function(t){t.owner==e&&c++})),c==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},e.exports=f},function(e,t,n){"use strict";var r,i=n(1);function o(e){r=n(5),this.layout=e,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},o.prototype.add=function(e,t,n,r,i){if(null==n&&null==r&&null==i){if(null==e)throw"Graph is null!";if(null==t)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),null!=e.parent)throw"Already has a parent!";if(null!=t.child)throw"Already has a child!";return e.parent=t,t.child=e,e}i=n,n=e;var o=(r=t).getOwner(),a=i.getOwner();if(null==o||o.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==a||a.getGraphManager()!=this)throw"Target not in this graph mgr!";if(o==a)return n.isInterGraph=!1,o.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(n),null==n.source||null==n.target)throw"Edge source and/or target is null!";if(-1!=n.source.edges.indexOf(n)||-1!=n.target.edges.indexOf(n))throw"Edge already in source and/or target incidency list!";return n.source.edges.push(n),n.target.edges.push(n),n},o.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw"Graph not in this graph mgr";if(t!=this.rootGraph&&(null==t.parent||t.parent.graphManager!=this))throw"Invalid parent node!";for(var n,o=[],a=(o=o.concat(t.getEdges())).length,s=0;s=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var o=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(o=1);var a=o*n[0],s=n[1]/o;n[0]a)return n[0]=r,n[1]=c,n[2]=o,n[3]=w,!1;if(io)return n[0]=s,n[1]=i,n[2]=b,n[3]=a,!1;if(ro?(n[0]=l,n[1]=h,C=!0):(n[0]=u,n[1]=c,C=!0):_===S&&(r>o?(n[0]=s,n[1]=c,C=!0):(n[0]=f,n[1]=h,C=!0)),-N===S?o>r?(n[2]=y,n[3]=w,k=!0):(n[2]=b,n[3]=v,k=!0):N===S&&(o>r?(n[2]=p,n[3]=v,k=!0):(n[2]=m,n[3]=w,k=!0)),C&&k)return!1;if(r>o?i>a?(O=this.getCardinalDirection(_,S,4),T=this.getCardinalDirection(N,S,2)):(O=this.getCardinalDirection(-_,S,3),T=this.getCardinalDirection(-N,S,1)):i>a?(O=this.getCardinalDirection(-_,S,1),T=this.getCardinalDirection(-N,S,3)):(O=this.getCardinalDirection(_,S,2),T=this.getCardinalDirection(N,S,4)),!C)switch(O){case 1:I=c,L=r+-g/S,n[0]=L,n[1]=I;break;case 2:L=f,I=i+d*S,n[0]=L,n[1]=I;break;case 3:I=h,L=r+g/S,n[0]=L,n[1]=I;break;case 4:L=l,I=i+-d*S,n[0]=L,n[1]=I}if(!k)switch(T){case 1:M=v,A=o+-E/S,n[2]=A,n[3]=M;break;case 2:A=m,M=a+x*S,n[2]=A,n[3]=M;break;case 3:M=w,A=o+E/S,n[2]=A,n[3]=M;break;case 4:A=y,M=a+-x*S,n[2]=A,n[3]=M}}return!1},i.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},i.getIntersection=function(e,t,n,i){if(null==i)return this.getIntersection2(e,t,n);var o,a,s,c,u,l,h,f=e.x,d=e.y,g=t.x,p=t.y,v=n.x,b=n.y,y=i.x,w=i.y;return 0==(h=(o=p-d)*(c=v-y)-(a=w-b)*(s=f-g))?null:new r((s*(l=y*b-v*w)-c*(u=g*d-f*p))/h,(a*u-o*l)/h)},i.angleOfVector=function(e,t,n,r){var i=void 0;return e!==n?(i=Math.atan((r-t)/(n-e)),n0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r},function(e,t,n){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n0&&t;){for(s.push(u[0]);s.length>0&&t;){var l=s[0];s.splice(0,1),a.add(l);var h=l.getEdges();for(o=0;o-1&&u.splice(p,1)}a=new Set,c=new Map}else e=[]}return e},f.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(n),o=0;o=0&&t.splice(h,1),l.getNeighborsList().forEach((function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;1==t&&c.push(e),r.set(e,t)}}))}n=n.concat(c),1!=t.length&&2!=t.length||(i=!0,o=t[0])}return o},f.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=f},function(e,t,n){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},e.exports=r},function(e,t,n){"use strict";var r=n(4);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return 0!=n&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},i.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return 0!=n&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},i.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return 0!=n&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},i.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return 0!=n&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},i.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i},function(e,t,n){"use strict";var r=n(15),i=n(7),o=n(0),a=n(8),s=n(9);function c(){r.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=i.DEFAULT_EDGE_LENGTH,this.springConstant=i.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=i.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}for(var u in c.prototype=Object.create(r.prototype),r)c[u]=r[u];c.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},c.prototype.calcIdealEdgeLengths=function(){for(var e,t,n,r,a,s,c=this.getGraphManager().getAllEdges(),u=0;ui.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(e-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},c.prototype.calcSpringForces=function(){for(var e,t=this.getAllEdges(),n=0;n0&&void 0!==arguments[0])||arguments[0],s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&a&&this.updateGrid(),o=new Set,e=0;e(c=t.getEstimatedSize()*this.gravityRangeFactor)||s>c)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*o):(a>(c=t.getEstimatedSize()*this.compoundGravityRangeFactor)||s>c)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},c.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=s.length||u>=s[0].length))for(var l=0;le}}]),e}();e.exports=o},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;i(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=o,this.gap_penalty=a,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},i.emit=function(e,t){for(var n=0;n{var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,l=c||u||Function("return this")(),h=Object.prototype.toString,f=Math.max,d=Math.min,g=function(){return l.Date.now()};function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==h.call(e)}(e))return NaN;if(p(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=p(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=o.test(e);return n||a.test(e)?s(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,s,c,u=0,l=!1,h=!1,b=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,o=i;return r=i=void 0,u=t,a=e.apply(o,n)}function w(e){return u=e,s=setTimeout(x,t),l?y(e):a}function m(e){var n=e-c;return void 0===c||n>=t||n<0||h&&e-u>=o}function x(){var e=g();if(m(e))return E(e);s=setTimeout(x,function(e){var n=t-(e-c);return h?d(n,o-(e-u)):n}(e))}function E(e){return s=void 0,b&&r?y(e):(r=i=void 0,a)}function C(){var e=g(),n=m(e);if(r=arguments,i=this,c=e,n){if(void 0===s)return w(c);if(h)return s=setTimeout(x,t),y(c)}return void 0===s&&(s=setTimeout(x,t)),a}return t=v(t)||0,p(n)&&(l=!!n.leading,o=(h="maxWait"in n)?f(v(n.maxWait)||0,t):o,b="trailing"in n?!!n.trailing:b),C.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=c=i=s=void 0},C.flush=function(){return void 0===s?a:E(g())},C}},8552:(e,t,n)=>{var r=n(852)(n(5639),"DataView");e.exports=r},1989:(e,t,n)=>{var r=n(1789),i=n(401),o=n(7667),a=n(1327),s=n(1866);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(7040),i=n(4125),o=n(2117),a=n(7518),s=n(4705);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(852)(n(5639),"Map");e.exports=r},3369:(e,t,n)=>{var r=n(4785),i=n(1285),o=n(6e3),a=n(9916),s=n(5265);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(852)(n(5639),"Promise");e.exports=r},8525:(e,t,n)=>{var r=n(852)(n(5639),"Set");e.exports=r},8668:(e,t,n)=>{var r=n(3369),i=n(619),o=n(2385);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t{var r=n(8407),i=n(7465),o=n(3779),a=n(7599),s=n(4758),c=n(4309);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=i,u.prototype.delete=o,u.prototype.get=a,u.prototype.has=s,u.prototype.set=c,e.exports=u},2705:(e,t,n)=>{var r=n(5639).Symbol;e.exports=r},1149:(e,t,n)=>{var r=n(5639).Uint8Array;e.exports=r},577:(e,t,n)=>{var r=n(852)(n(5639),"WeakMap");e.exports=r},6874:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},7412:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n{var r=n(2118);e.exports=function(e,t){return!(null==e||!e.length)&&r(e,t,0)>-1}},1196:e=>{e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r{var r=n(2545),i=n(5694),o=n(1469),a=n(4144),s=n(5776),c=n(6719),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),l=!n&&i(e),h=!n&&!l&&a(e),f=!n&&!l&&!h&&c(e),d=n||l||h||f,g=d?r(e.length,String):[],p=g.length;for(var v in e)!t&&!u.call(e,v)||d&&("length"==v||h&&("offset"==v||"parent"==v)||f&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,p))||g.push(v);return g}},9932:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n{e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n{e.exports=function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{var r=n(371)("length");e.exports=r},6556:(e,t,n)=>{var r=n(9465),i=n(7813);e.exports=function(e,t,n){(void 0!==n&&!i(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}},4865:(e,t,n)=>{var r=n(9465),i=n(7813),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];o.call(e,t)&&i(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},8470:(e,t,n)=>{var r=n(7813);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},4037:(e,t,n)=>{var r=n(8363),i=n(3674);e.exports=function(e,t){return e&&r(t,i(t),e)}},3886:(e,t,n)=>{var r=n(8363),i=n(1704);e.exports=function(e,t){return e&&r(t,i(t),e)}},9465:(e,t,n)=>{var r=n(8777);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},5990:(e,t,n)=>{var r=n(6384),i=n(7412),o=n(4865),a=n(4037),s=n(3886),c=n(4626),u=n(278),l=n(8805),h=n(1911),f=n(8234),d=n(6904),g=n(4160),p=n(3824),v=n(9148),b=n(8517),y=n(1469),w=n(4144),m=n(6688),x=n(3218),E=n(2928),C=n(3674),k=n(1704),_="[object Arguments]",N="[object Function]",S="[object Object]",O={};O[_]=O["[object Array]"]=O["[object ArrayBuffer]"]=O["[object DataView]"]=O["[object Boolean]"]=O["[object Date]"]=O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Map]"]=O["[object Number]"]=O[S]=O["[object RegExp]"]=O["[object Set]"]=O["[object String]"]=O["[object Symbol]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O["[object Error]"]=O[N]=O["[object WeakMap]"]=!1,e.exports=function e(t,n,T,L,I,A){var M,P=1&n,D=2&n,j=4&n;if(T&&(M=I?T(t,L,I,A):T(t)),void 0!==M)return M;if(!x(t))return t;var R=y(t);if(R){if(M=p(t),!P)return u(t,M)}else{var G=g(t),B=G==N||"[object GeneratorFunction]"==G;if(w(t))return c(t,P);if(G==S||G==_||B&&!I){if(M=D||B?{}:b(t),!P)return D?h(t,s(M,t)):l(t,a(M,t))}else{if(!O[G])return I?t:{};M=v(t,G,P)}}A||(A=new r);var H=A.get(t);if(H)return H;A.set(t,M),E(t)?t.forEach((function(r){M.add(e(r,n,T,r,t,A))})):m(t)&&t.forEach((function(r,i){M.set(i,e(r,n,T,i,t,A))}));var F=R?void 0:(j?D?d:f:D?k:C)(t);return i(F||t,(function(r,i){F&&(r=t[i=r]),o(M,i,e(r,n,T,i,t,A))})),M}},3118:(e,t,n)=>{var r=n(3218),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},9881:(e,t,n)=>{var r=n(7816),i=n(9291)(r);e.exports=i},6029:(e,t,n)=>{var r=n(3448);e.exports=function(e,t,n){for(var i=-1,o=e.length;++i{var r=n(9881);e.exports=function(e,t){var n=[];return r(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}},1848:e=>{e.exports=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o{var r=n(2488),i=n(7285);e.exports=function e(t,n,o,a,s){var c=-1,u=t.length;for(o||(o=i),s||(s=[]);++c0&&o(l)?n>1?e(l,n-1,o,a,s):r(s,l):a||(s[s.length]=l)}return s}},8483:(e,t,n)=>{var r=n(5063)();e.exports=r},7816:(e,t,n)=>{var r=n(8483),i=n(3674);e.exports=function(e,t){return e&&r(e,t,i)}},7786:(e,t,n)=>{var r=n(1811),i=n(327);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n{var r=n(2488),i=n(1469);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},4239:(e,t,n)=>{var r=n(2705),i=n(9607),o=n(2333),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},3325:e=>{e.exports=function(e,t){return e>t}},8565:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},13:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},2118:(e,t,n)=>{var r=n(1848),i=n(2722),o=n(2351);e.exports=function(e,t,n){return t==t?o(e,t,n):r(e,i,n)}},9454:(e,t,n)=>{var r=n(4239),i=n(7005);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},939:(e,t,n)=>{var r=n(2492),i=n(7005);e.exports=function e(t,n,o,a,s){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,o,a,e,s))}},2492:(e,t,n)=>{var r=n(6384),i=n(7114),o=n(8351),a=n(6096),s=n(4160),c=n(1469),u=n(4144),l=n(6719),h="[object Arguments]",f="[object Array]",d="[object Object]",g=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,p,v,b){var y=c(e),w=c(t),m=y?f:s(e),x=w?f:s(t),E=(m=m==h?d:m)==d,C=(x=x==h?d:x)==d,k=m==x;if(k&&u(e)){if(!u(t))return!1;y=!0,E=!1}if(k&&!E)return b||(b=new r),y||l(e)?i(e,t,n,p,v,b):o(e,t,m,n,p,v,b);if(!(1&n)){var _=E&&g.call(e,"__wrapped__"),N=C&&g.call(t,"__wrapped__");if(_||N){var S=_?e.value():e,O=N?t.value():t;return b||(b=new r),v(S,O,n,p,b)}}return!!k&&(b||(b=new r),a(e,t,n,p,v,b))}},5588:(e,t,n)=>{var r=n(4160),i=n(7005);e.exports=function(e){return i(e)&&"[object Map]"==r(e)}},2958:(e,t,n)=>{var r=n(6384),i=n(939);e.exports=function(e,t,n,o){var a=n.length,s=a,c=!o;if(null==e)return!s;for(e=Object(e);a--;){var u=n[a];if(c&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++a{e.exports=function(e){return e!=e}},8458:(e,t,n)=>{var r=n(3560),i=n(5346),o=n(3218),a=n(346),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,h=u.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?f:s).test(a(e))}},9221:(e,t,n)=>{var r=n(4160),i=n(7005);e.exports=function(e){return i(e)&&"[object Set]"==r(e)}},8749:(e,t,n)=>{var r=n(4239),i=n(1780),o=n(7005),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!a[r(e)]}},7206:(e,t,n)=>{var r=n(1573),i=n(6432),o=n(6557),a=n(1469),s=n(9601);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?a(e)?i(e[0],e[1]):r(e):s(e)}},280:(e,t,n)=>{var r=n(5726),i=n(6916),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},313:(e,t,n)=>{var r=n(3218),i=n(5726),o=n(3498),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},433:e=>{e.exports=function(e,t){return e{var r=n(9881),i=n(8612);e.exports=function(e,t){var n=-1,o=i(e)?Array(e.length):[];return r(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}},1573:(e,t,n)=>{var r=n(2958),i=n(1499),o=n(2634);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},6432:(e,t,n)=>{var r=n(939),i=n(7361),o=n(9095),a=n(5403),s=n(9162),c=n(2634),u=n(327);e.exports=function(e,t){return a(e)&&s(t)?c(u(e),t):function(n){var a=i(n,e);return void 0===a&&a===t?o(n,e):r(t,a,3)}}},2980:(e,t,n)=>{var r=n(6384),i=n(6556),o=n(8483),a=n(9783),s=n(3218),c=n(1704),u=n(6390);e.exports=function e(t,n,l,h,f){t!==n&&o(n,(function(o,c){if(f||(f=new r),s(o))a(t,n,c,l,e,h,f);else{var d=h?h(u(t,c),o,c+"",t,n,f):void 0;void 0===d&&(d=o),i(t,c,d)}}),c)}},9783:(e,t,n)=>{var r=n(6556),i=n(4626),o=n(7133),a=n(278),s=n(8517),c=n(5694),u=n(1469),l=n(9246),h=n(4144),f=n(3560),d=n(3218),g=n(8630),p=n(6719),v=n(6390),b=n(3678);e.exports=function(e,t,n,y,w,m,x){var E=v(e,n),C=v(t,n),k=x.get(C);if(k)r(e,n,k);else{var _=m?m(E,C,n+"",e,t,x):void 0,N=void 0===_;if(N){var S=u(C),O=!S&&h(C),T=!S&&!O&&p(C);_=C,S||O||T?u(E)?_=E:l(E)?_=a(E):O?(N=!1,_=i(C,!0)):T?(N=!1,_=o(C,!0)):_=[]:g(C)||c(C)?(_=E,c(E)?_=b(E):d(E)&&!f(E)||(_=s(C))):N=!1}N&&(x.set(C,_),w(_,C,y,m,x),x.delete(C)),r(e,n,_)}}},9556:(e,t,n)=>{var r=n(9932),i=n(7786),o=n(7206),a=n(9199),s=n(1131),c=n(1717),u=n(5022),l=n(6557),h=n(1469);e.exports=function(e,t,n){t=t.length?r(t,(function(e){return h(e)?function(t){return i(t,1===e.length?e[0]:e)}:e})):[l];var f=-1;t=r(t,c(o));var d=a(e,(function(e,n,i){return{criteria:r(t,(function(t){return t(e)})),index:++f,value:e}}));return s(d,(function(e,t){return u(e,t,n)}))}},5970:(e,t,n)=>{var r=n(3012),i=n(9095);e.exports=function(e,t){return r(e,t,(function(t,n){return i(e,n)}))}},3012:(e,t,n)=>{var r=n(7786),i=n(611),o=n(1811);e.exports=function(e,t,n){for(var a=-1,s=t.length,c={};++a{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},9152:(e,t,n)=>{var r=n(7786);e.exports=function(e){return function(t){return r(t,e)}}},98:e=>{var t=Math.ceil,n=Math.max;e.exports=function(e,r,i,o){for(var a=-1,s=n(t((r-e)/(i||1)),0),c=Array(s);s--;)c[o?s:++a]=e,e+=i;return c}},107:e=>{e.exports=function(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}},5976:(e,t,n)=>{var r=n(6557),i=n(5357),o=n(61);e.exports=function(e,t){return o(i(e,t,r),e+"")}},611:(e,t,n)=>{var r=n(4865),i=n(1811),o=n(5776),a=n(3218),s=n(327);e.exports=function(e,t,n,c){if(!a(e))return e;for(var u=-1,l=(t=i(t,e)).length,h=l-1,f=e;null!=f&&++u{var r=n(5703),i=n(8777),o=n(6557),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=a},1131:e=>{e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},2545:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n{var r=n(2705),i=n(9932),o=n(1469),a=n(3448),s=r?r.prototype:void 0,c=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return c?c.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},7561:(e,t,n)=>{var r=n(7990),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},1717:e=>{e.exports=function(e){return function(t){return e(t)}}},5652:(e,t,n)=>{var r=n(8668),i=n(7443),o=n(1196),a=n(4757),s=n(3593),c=n(1814);e.exports=function(e,t,n){var u=-1,l=i,h=e.length,f=!0,d=[],g=d;if(n)f=!1,l=o;else if(h>=200){var p=t?null:s(e);if(p)return c(p);f=!1,l=a,g=new r}else g=t?[]:d;e:for(;++u{var r=n(9932);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},1757:e=>{e.exports=function(e,t,n){for(var r=-1,i=e.length,o=t.length,a={};++r{e.exports=function(e,t){return e.has(t)}},4290:(e,t,n)=>{var r=n(6557);e.exports=function(e){return"function"==typeof e?e:r}},1811:(e,t,n)=>{var r=n(1469),i=n(5403),o=n(5514),a=n(9833);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(a(e))}},4318:(e,t,n)=>{var r=n(1149);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},4626:(e,t,n)=>{e=n.nmd(e);var r=n(5639),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},7157:(e,t,n)=>{var r=n(4318);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},3147:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},419:(e,t,n)=>{var r=n(2705),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},7133:(e,t,n)=>{var r=n(4318);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},6393:(e,t,n)=>{var r=n(3448);e.exports=function(e,t){if(e!==t){var n=void 0!==e,i=null===e,o=e==e,a=r(e),s=void 0!==t,c=null===t,u=t==t,l=r(t);if(!c&&!l&&!a&&e>t||a&&s&&u&&!c&&!l||i&&s&&u||!n&&u||!o)return 1;if(!i&&!a&&!l&&e{var r=n(6393);e.exports=function(e,t,n){for(var i=-1,o=e.criteria,a=t.criteria,s=o.length,c=n.length;++i=c?u:u*("desc"==n[i]?-1:1)}return e.index-t.index}},278:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n{var r=n(4865),i=n(9465);e.exports=function(e,t,n,o){var a=!n;n||(n={});for(var s=-1,c=t.length;++s{var r=n(8363),i=n(9551);e.exports=function(e,t){return r(e,i(e),t)}},1911:(e,t,n)=>{var r=n(8363),i=n(1442);e.exports=function(e,t){return r(e,i(e),t)}},4429:(e,t,n)=>{var r=n(5639)["__core-js_shared__"];e.exports=r},1463:(e,t,n)=>{var r=n(5976),i=n(6612);e.exports=function(e){return r((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++r{var r=n(8612);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var o=n.length,a=t?o:-1,s=Object(n);(t?a--:++a{e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var c=a[e?s:++i];if(!1===n(o[c],c,o))break}return t}}},7740:(e,t,n)=>{var r=n(7206),i=n(8612),o=n(3674);e.exports=function(e){return function(t,n,a){var s=Object(t);if(!i(t)){var c=r(n,3);t=o(t),n=function(e){return c(s[e],e,s)}}var u=e(t,n,a);return u>-1?s[c?t[u]:u]:void 0}}},7445:(e,t,n)=>{var r=n(98),i=n(6612),o=n(8601);e.exports=function(e){return function(t,n,a){return a&&"number"!=typeof a&&i(t,n,a)&&(n=a=void 0),t=o(t),void 0===n?(n=t,t=0):n=o(n),a=void 0===a?t{var r=n(8525),i=n(308),o=n(1814),a=r&&1/o(new r([,-0]))[1]==1/0?function(e){return new r(e)}:i;e.exports=a},8777:(e,t,n)=>{var r=n(852),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},7114:(e,t,n)=>{var r=n(8668),i=n(2908),o=n(4757);e.exports=function(e,t,n,a,s,c){var u=1&n,l=e.length,h=t.length;if(l!=h&&!(u&&h>l))return!1;var f=c.get(e),d=c.get(t);if(f&&d)return f==t&&d==e;var g=-1,p=!0,v=2&n?new r:void 0;for(c.set(e,t),c.set(t,e);++g{var r=n(2705),i=n(1149),o=n(7813),a=n(7114),s=n(8776),c=n(1814),u=r?r.prototype:void 0,l=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,h,f){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!h(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=s;case"[object Set]":var g=1&r;if(d||(d=c),e.size!=t.size&&!g)return!1;var p=f.get(e);if(p)return p==t;r|=2,f.set(e,t);var v=a(d(e),d(t),r,u,h,f);return f.delete(e),v;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},6096:(e,t,n)=>{var r=n(8234),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s){var c=1&n,u=r(e),l=u.length;if(l!=r(t).length&&!c)return!1;for(var h=l;h--;){var f=u[h];if(!(c?f in t:i.call(t,f)))return!1}var d=s.get(e),g=s.get(t);if(d&&g)return d==t&&g==e;var p=!0;s.set(e,t),s.set(t,e);for(var v=c;++h{var r=n(5564),i=n(5357),o=n(61);e.exports=function(e){return o(i(e,void 0,r),e+"")}},1957:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},8234:(e,t,n)=>{var r=n(8866),i=n(9551),o=n(3674);e.exports=function(e){return r(e,o,i)}},6904:(e,t,n)=>{var r=n(8866),i=n(1442),o=n(1704);e.exports=function(e){return r(e,o,i)}},5050:(e,t,n)=>{var r=n(7019);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},1499:(e,t,n)=>{var r=n(9162),i=n(3674);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var o=t[n],a=e[o];t[n]=[o,a,r(a)]}return t}},852:(e,t,n)=>{var r=n(8458),i=n(7801);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},5924:(e,t,n)=>{var r=n(5569)(Object.getPrototypeOf,Object);e.exports=r},9607:(e,t,n)=>{var r=n(2705),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},9551:(e,t,n)=>{var r=n(4963),i=n(479),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return o.call(e,t)})))}:i;e.exports=s},1442:(e,t,n)=>{var r=n(2488),i=n(5924),o=n(9551),a=n(479),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=i(e);return t}:a;e.exports=s},4160:(e,t,n)=>{var r=n(8552),i=n(7071),o=n(3818),a=n(8525),s=n(577),c=n(4239),u=n(346),l="[object Map]",h="[object Promise]",f="[object Set]",d="[object WeakMap]",g="[object DataView]",p=u(r),v=u(i),b=u(o),y=u(a),w=u(s),m=c;(r&&m(new r(new ArrayBuffer(1)))!=g||i&&m(new i)!=l||o&&m(o.resolve())!=h||a&&m(new a)!=f||s&&m(new s)!=d)&&(m=function(e){var t=c(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case p:return g;case v:return l;case b:return h;case y:return f;case w:return d}return t}),e.exports=m},7801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},222:(e,t,n)=>{var r=n(1811),i=n(5694),o=n(1469),a=n(5776),s=n(1780),c=n(327);e.exports=function(e,t,n){for(var u=-1,l=(t=r(t,e)).length,h=!1;++u{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},1789:(e,t,n)=>{var r=n(4536);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},7667:(e,t,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},1327:(e,t,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},1866:(e,t,n)=>{var r=n(4536);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},3824:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},9148:(e,t,n)=>{var r=n(4318),i=n(7157),o=n(3147),a=n(419),s=n(7133);e.exports=function(e,t,n){var c=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new c(+e);case"[object DataView]":return i(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(e);case"[object RegExp]":return o(e);case"[object Symbol]":return a(e)}}},8517:(e,t,n)=>{var r=n(3118),i=n(5924),o=n(5726);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},7285:(e,t,n)=>{var r=n(2705),i=n(5694),o=n(1469),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(a&&e&&e[a])}},5776:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e{var r=n(7813),i=n(8612),o=n(5776),a=n(3218);e.exports=function(e,t,n){if(!a(n))return!1;var s=typeof t;return!!("number"==s?i(n)&&o(t,n.length):"string"==s&&t in n)&&r(n[t],e)}},5403:(e,t,n)=>{var r=n(1469),i=n(3448),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||a.test(e)||!o.test(e)||null!=t&&e in Object(t)}},7019:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},5346:(e,t,n)=>{var r,i=n(4429),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},5726:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},9162:(e,t,n)=>{var r=n(3218);e.exports=function(e){return e==e&&!r(e)}},7040:e=>{e.exports=function(){this.__data__=[],this.size=0}},4125:(e,t,n)=>{var r=n(8470),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))}},2117:(e,t,n)=>{var r=n(8470);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},7518:(e,t,n)=>{var r=n(8470);e.exports=function(e){return r(this.__data__,e)>-1}},4705:(e,t,n)=>{var r=n(8470);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},4785:(e,t,n)=>{var r=n(1989),i=n(8407),o=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},1285:(e,t,n)=>{var r=n(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:(e,t,n)=>{var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:(e,t,n)=>{var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:(e,t,n)=>{var r=n(5050);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},8776:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},2634:e=>{e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},4523:(e,t,n)=>{var r=n(8306);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},4536:(e,t,n)=>{var r=n(852)(Object,"create");e.exports=r},6916:(e,t,n)=>{var r=n(5569)(Object.keys,Object);e.exports=r},3498:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},1167:(e,t,n)=>{e=n.nmd(e);var r=n(1957),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},5357:(e,t,n)=>{var r=n(6874),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),c=Array(s);++a{var r=n(1957),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},6390:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},619:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},2385:e=>{e.exports=function(e){return this.__data__.has(e)}},1814:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},61:(e,t,n)=>{var r=n(6560),i=n(1275)(r);e.exports=i},1275:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var i=t(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},7465:(e,t,n)=>{var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:e=>{e.exports=function(e){return this.__data__.get(e)}},4758:e=>{e.exports=function(e){return this.__data__.has(e)}},4309:(e,t,n)=>{var r=n(8407),i=n(7071),o=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},2351:e=>{e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r{var r=n(8983),i=n(2689),o=n(1903);e.exports=function(e){return i(e)?o(e):r(e)}},5514:(e,t,n)=>{var r=n(4523),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)})),t}));e.exports=a},327:(e,t,n)=>{var r=n(3448);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},346:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7990:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},1903:e=>{var t="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\\ud83c[\\udffb-\\udfff]",r="[^\\ud800-\\udfff]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",o="[\\ud800-\\udbff][\\udc00-\\udfff]",a="(?:"+t+"|"+n+")?",s="[\\ufe0e\\ufe0f]?",c=s+a+"(?:\\u200d(?:"+[r,i,o].join("|")+")"+s+a+")*",u="(?:"+[r+t+"?",t,i,o,"[\\ud800-\\udfff]"].join("|")+")",l=RegExp(n+"(?="+n+")|"+u+c,"g");e.exports=function(e){for(var t=l.lastIndex=0;l.test(e);)++t;return t}},6678:(e,t,n)=>{var r=n(5990);e.exports=function(e){return r(e,4)}},361:(e,t,n)=>{var r=n(5990);e.exports=function(e){return r(e,5)}},5703:e=>{e.exports=function(e){return function(){return e}}},1747:(e,t,n)=>{var r=n(5976),i=n(7813),o=n(6612),a=n(1704),s=Object.prototype,c=s.hasOwnProperty,u=r((function(e,t){e=Object(e);var n=-1,r=t.length,u=r>2?t[2]:void 0;for(u&&o(t[0],t[1],u)&&(r=1);++n{e.exports=n(4486)},7813:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},3105:(e,t,n)=>{var r=n(4963),i=n(760),o=n(7206),a=n(1469);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},3311:(e,t,n)=>{var r=n(7740)(n(998));e.exports=r},998:(e,t,n)=>{var r=n(1848),i=n(7206),o=n(554),a=Math.max;e.exports=function(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var c=null==n?0:o(n);return c<0&&(c=a(s+c,0)),r(e,i(t,3),c)}},5564:(e,t,n)=>{var r=n(1078);e.exports=function(e){return null!=e&&e.length?r(e,1):[]}},4486:(e,t,n)=>{var r=n(7412),i=n(9881),o=n(4290),a=n(1469);e.exports=function(e,t){return(a(e)?r:i)(e,o(t))}},2620:(e,t,n)=>{var r=n(8483),i=n(4290),o=n(1704);e.exports=function(e,t){return null==e?e:r(e,i(t),o)}},7361:(e,t,n)=>{var r=n(7786);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},8721:(e,t,n)=>{var r=n(8565),i=n(222);e.exports=function(e,t){return null!=e&&i(e,t,r)}},9095:(e,t,n)=>{var r=n(13),i=n(222);e.exports=function(e,t){return null!=e&&i(e,t,r)}},6557:e=>{e.exports=function(e){return e}},5694:(e,t,n)=>{var r=n(9454),i=n(7005),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=c},1469:e=>{var t=Array.isArray;e.exports=t},8612:(e,t,n)=>{var r=n(3560),i=n(1780);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},9246:(e,t,n)=>{var r=n(8612),i=n(7005);e.exports=function(e){return i(e)&&r(e)}},4144:(e,t,n)=>{e=n.nmd(e);var r=n(5639),i=n(5062),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,c=(s?s.isBuffer:void 0)||i;e.exports=c},1609:(e,t,n)=>{var r=n(280),i=n(4160),o=n(5694),a=n(1469),s=n(8612),c=n(4144),u=n(5726),l=n(6719),h=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||c(e)||l(e)||o(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!r(e).length;for(var n in e)if(h.call(e,n))return!1;return!0}},3560:(e,t,n)=>{var r=n(4239),i=n(3218);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},6688:(e,t,n)=>{var r=n(5588),i=n(1717),o=n(1167),a=o&&o.isMap,s=a?i(a):r;e.exports=s},3218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},8630:(e,t,n)=>{var r=n(4239),i=n(5924),o=n(7005),a=Function.prototype,s=Object.prototype,c=a.toString,u=s.hasOwnProperty,l=c.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==l}},2928:(e,t,n)=>{var r=n(9221),i=n(1717),o=n(1167),a=o&&o.isSet,s=a?i(a):r;e.exports=s},7037:(e,t,n)=>{var r=n(4239),i=n(1469),o=n(7005);e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&"[object String]"==r(e)}},3448:(e,t,n)=>{var r=n(4239),i=n(7005);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},6719:(e,t,n)=>{var r=n(8749),i=n(1717),o=n(1167),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},2353:e=>{e.exports=function(e){return void 0===e}},3674:(e,t,n)=>{var r=n(4636),i=n(280),o=n(8612);e.exports=function(e){return o(e)?r(e):i(e)}},1704:(e,t,n)=>{var r=n(4636),i=n(313),o=n(8612);e.exports=function(e){return o(e)?r(e,!0):i(e)}},928:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},5161:(e,t,n)=>{var r=n(9932),i=n(7206),o=n(9199),a=n(1469);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},6604:(e,t,n)=>{var r=n(9465),i=n(7816),o=n(7206);e.exports=function(e,t){var n={};return t=o(t,3),i(e,(function(e,i,o){r(n,i,t(e,i,o))})),n}},6162:(e,t,n)=>{var r=n(6029),i=n(3325),o=n(6557);e.exports=function(e){return e&&e.length?r(e,o,i):void 0}},8306:(e,t,n)=>{var r=n(3369);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},3857:(e,t,n)=>{var r=n(2980),i=n(1463)((function(e,t,n){r(e,t,n)}));e.exports=i},3632:(e,t,n)=>{var r=n(6029),i=n(433),o=n(6557);e.exports=function(e){return e&&e.length?r(e,o,i):void 0}},2762:(e,t,n)=>{var r=n(6029),i=n(7206),o=n(433);e.exports=function(e,t){return e&&e.length?r(e,i(t,2),o):void 0}},308:e=>{e.exports=function(){}},7771:(e,t,n)=>{var r=n(5639);e.exports=function(){return r.Date.now()}},9722:(e,t,n)=>{var r=n(5970),i=n(9021)((function(e,t){return null==e?{}:r(e,t)}));e.exports=i},9601:(e,t,n)=>{var r=n(371),i=n(9152),o=n(5403),a=n(327);e.exports=function(e){return o(e)?r(a(e)):i(e)}},6026:(e,t,n)=>{var r=n(7445)();e.exports=r},4061:(e,t,n)=>{var r=n(2663),i=n(9881),o=n(7206),a=n(107),s=n(1469);e.exports=function(e,t,n){var c=s(e)?r:a,u=arguments.length<3;return c(e,o(t,4),n,u,i)}},4238:(e,t,n)=>{var r=n(280),i=n(4160),o=n(8612),a=n(7037),s=n(8016);e.exports=function(e){if(null==e)return 0;if(o(e))return a(e)?s(e):e.length;var t=i(e);return"[object Map]"==t||"[object Set]"==t?e.size:r(e).length}},9734:(e,t,n)=>{var r=n(1078),i=n(9556),o=n(5976),a=n(6612),s=o((function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,r(t,1),[])}));e.exports=s},479:e=>{e.exports=function(){return[]}},5062:e=>{e.exports=function(){return!1}},8601:(e,t,n)=>{var r=n(4841);e.exports=function(e){return e?Infinity===(e=r(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},554:(e,t,n)=>{var r=n(8601);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},4841:(e,t,n)=>{var r=n(7561),i=n(3218),o=n(3448),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||c.test(e)?u(e.slice(2),n?2:8):a.test(e)?NaN:+e}},3678:(e,t,n)=>{var r=n(8363),i=n(1704);e.exports=function(e){return r(e,i(e))}},9833:(e,t,n)=>{var r=n(531);e.exports=function(e){return null==e?"":r(e)}},8718:(e,t,n)=>{var r=n(7412),i=n(3118),o=n(7816),a=n(7206),s=n(5924),c=n(1469),u=n(4144),l=n(3560),h=n(3218),f=n(6719);e.exports=function(e,t,n){var d=c(e),g=d||u(e)||f(e);if(t=a(t,4),null==n){var p=e&&e.constructor;n=g?d?new p:[]:h(e)&&l(p)?i(s(e)):{}}return(g?r:o)(e,(function(e,r,i){return t(n,e,r,i)})),n}},3386:(e,t,n)=>{var r=n(1078),i=n(5976),o=n(5652),a=n(9246),s=i((function(e){return o(r(e,1,a,!0))}));e.exports=s},3955:(e,t,n)=>{var r=n(9833),i=0;e.exports=function(e){var t=++i;return r(e)+t}},2628:(e,t,n)=>{var r=n(7415),i=n(3674);e.exports=function(e){return null==e?[]:r(e,i(e))}},7287:(e,t,n)=>{var r=n(4865),i=n(1757);e.exports=function(e,t){return i(e||[],t||[],r)}},3379:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},9216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7795:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},4589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},9641:e=>{e.exports=''},1093:e=>{e.exports=''},480:e=>{e.exports=''},8587:e=>{e.exports=''},6601:e=>{e.exports=''},1373:e=>{e.exports=''},9806:e=>{e.exports=''},9865:e=>{e.exports=''},9224:e=>{e.exports=''},5808:e=>{e.exports=''},9458:e=>{e.exports=''},8904:e=>{e.exports=''},3562:e=>{e.exports=''},6649:e=>{e.exports=''},2020:e=>{e.exports=''},7724:e=>{e.exports=''},674:e=>{e.exports=''},7886:e=>{e.exports=''},5837:e=>{e.exports=''},7450:e=>{e.exports=''},9629:e=>{e.exports=''},2646:e=>{e.exports=''},4019:(e,t,n)=>{"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(89)),r(n(2845)),r(n(7069)),r(n(6085)),r(n(7598)),r(n(7384)),r(n(7426)),r(n(6749)),r(n(9427)),r(n(8793)),r(n(7421)),r(n(1138)),r(n(31)),r(n(2867)),r(n(4926)),r(n(7565))},89:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(7426),a=function(e){function t(t){var n=e.call(this)||this,r=t;return r.trigger&&(n.trigger=r.trigger),r.kick&&(n.kick=r.kick),r.drag&&(n.drag=r.drag),r.on&&(n.on=r.on),n.dragstart=n.dragStart=o.Layout.dragStart,n.dragend=n.dragEnd=o.Layout.dragEnd,n}return i(t,e),t.prototype.trigger=function(e){},t.prototype.kick=function(){},t.prototype.drag=function(){},t.prototype.on=function(e,t){return this},t}(o.Layout);t.LayoutAdaptor=a,t.adaptor=function(e){return new a(e)}},7565:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7426),i=n(7598);t.gridify=function(e,t,n,r){e.cola.start(0,0,0,10,!1);var o=function(e,t,n,r){e.forEach((function(e){e.routerNode={name:e.name,bounds:e.bounds.inflate(-n)}})),t.forEach((function(t){t.routerNode={bounds:t.bounds.inflate(-r),children:(void 0!==t.groups?t.groups.map((function(t){return e.length+t.id})):[]).concat(void 0!==t.leaves?t.leaves.map((function(e){return e.index})):[])}}));var o=e.concat(t).map((function(e,t){return e.routerNode.id=t,e.routerNode}));return new i.GridRouter(o,{getChildren:function(e){return e.children},getBounds:function(e){return e.bounds}},n-r)}(e.cola.nodes(),e.cola.groups(),n,r);return o.routeEdges(e.powerGraph.powerEdges,t,(function(e){return e.source.routerNode.id}),(function(e){return e.target.routerNode.id}))},t.powerGraphGridLayout=function(e,t,n){var i;e.nodes.forEach((function(e,t){return e.index=t})),(new r.Layout).avoidOverlaps(!1).nodes(e.nodes).links(e.links).powerGraphGroups((function(e){(i=e).groups.forEach((function(e){return e.padding=n}))}));var o=e.nodes.length,a=[],s=e.nodes.slice(0);return s.forEach((function(e,t){return e.index=t})),i.groups.forEach((function(e){var t=e.index=e.id+o;s.push(e),void 0!==e.leaves&&e.leaves.forEach((function(e){return a.push({source:t,target:e.index})})),void 0!==e.groups&&e.groups.forEach((function(e){return a.push({source:t,target:e.id+o})}))})),i.powerEdges.forEach((function(e){a.push({source:e.source.index,target:e.target.index})})),(new r.Layout).size(t).nodes(s).links(a).avoidOverlaps(!1).linkDistance(30).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(100,0,0,0,!1),{cola:(new r.Layout).convergenceThreshold(.001).size(t).avoidOverlaps(!0).nodes(e.nodes).links(e.links).groupCompactness(1e-4).linkDistance(30).symmetricDiffLinkLengths(5).powerGraphGroups((function(e){(i=e).groups.forEach((function(e){e.padding=n}))})).start(50,0,100,0,!1),powerGraph:i}}},2845:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1509),i=n(1374);t.d3adaptor=function(e){return!e||function(e){return e.version&&null!==e.version.match(/^3\./)}(e)?new r.D3StyleLayoutAdaptor:new i.D3StyleLayoutAdaptor(e)}},1509:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(7426),a=function(e){function t(){var t=e.call(this)||this;t.event=d3.dispatch(o.EventType[o.EventType.start],o.EventType[o.EventType.tick],o.EventType[o.EventType.end]);var n=t;return t.drag=function(){if(!e)var e=d3.behavior.drag().origin(o.Layout.dragOrigin).on("dragstart.d3adaptor",o.Layout.dragStart).on("drag.d3adaptor",(function(e){o.Layout.drag(e,d3.event),n.resume()})).on("dragend.d3adaptor",o.Layout.dragEnd);if(!arguments.length)return e;this.call(e)},t}return i(t,e),t.prototype.trigger=function(e){var t={type:o.EventType[e.type],alpha:e.alpha,stress:e.stress};this.event[t.type](t)},t.prototype.kick=function(){var t=this;d3.timer((function(){return e.prototype.tick.call(t)}))},t.prototype.on=function(e,t){return"string"==typeof e?this.event.on(e,t):this.event.on(o.EventType[e],t),this},t}(o.Layout);t.D3StyleLayoutAdaptor=a,t.d3adaptor=function(){return new a}},1374:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(7426),a=function(e){function t(t){var n=e.call(this)||this;n.d3Context=t,n.event=t.dispatch(o.EventType[o.EventType.start],o.EventType[o.EventType.tick],o.EventType[o.EventType.end]);var r=n;return n.drag=function(){if(!e)var e=t.drag().subject(o.Layout.dragOrigin).on("start.d3adaptor",o.Layout.dragStart).on("drag.d3adaptor",(function(e){o.Layout.drag(e,t.event),r.resume()})).on("end.d3adaptor",o.Layout.dragEnd);if(!arguments.length)return e;arguments[0].call(e)},n}return i(t,e),t.prototype.trigger=function(e){var t={type:o.EventType[e.type],alpha:e.alpha,stress:e.stress};this.event.call(t.type,t)},t.prototype.kick=function(){var t=this,n=this.d3Context.timer((function(){return e.prototype.tick.call(t)&&n.stop()}))},t.prototype.on=function(e,t){return"string"==typeof e?this.event.on(e,t):this.event.on(o.EventType[e],t),this},t}(o.Layout);t.D3StyleLayoutAdaptor=a},7069:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.locks={}}return e.prototype.add=function(e,t){this.locks[e]=t},e.prototype.clear=function(){this.locks={}},e.prototype.isEmpty=function(){for(var e in this.locks)return!1;return!0},e.prototype.apply=function(e){for(var t in this.locks)e(Number(t),this.locks[t])},e}();t.Locks=n;var r=function(){function e(e,t,r){void 0===r&&(r=null),this.D=t,this.G=r,this.threshold=1e-4,this.numGridSnapNodes=0,this.snapGridSize=100,this.snapStrength=1e3,this.scaleSnapByMaxH=!1,this.random=new i,this.project=null,this.x=e,this.k=e.length;var o=this.n=e[0].length;this.H=new Array(this.k),this.g=new Array(this.k),this.Hd=new Array(this.k),this.a=new Array(this.k),this.b=new Array(this.k),this.c=new Array(this.k),this.d=new Array(this.k),this.e=new Array(this.k),this.ia=new Array(this.k),this.ib=new Array(this.k),this.xtmp=new Array(this.k),this.locks=new n,this.minD=Number.MAX_VALUE;for(var a,s=o;s--;)for(a=o;--a>s;){var c=t[s][a];c>0&&c1e-9)break;var d=this.offsetDir();for(r=0;r1&&g>p||!isFinite(p))for(r=0;r1&&(v=1);var b=p*p,y=2*v*(g-p)/(b*g),w=g*g*g,m=2*-v/(b*w);for(isFinite(y)||console.log(y),r=0;r0?_-(O+1)*E:_-(O-1)*E)&&f<=x&&(this.scaleSnapByMaxH?(this.g[r][c]+=s*C*f,this.H[r][c][c]+=s*C):(this.g[r][c]+=C*f,this.H[r][c][c]+=C))}this.locks.isEmpty()||this.locks.apply((function(n,i){for(r=0;r0;)for(var i=t;i-- >0;)n(r,i)},e.prototype.matrixApply=function(t){e.mApply(this.k,this.n,t)},e.prototype.computeNextPosition=function(e,t){var n=this;this.computeDerivatives(e);var r=this.computeStepSize(this.g);if(this.stepAndProject(e,t,this.g,r),this.project){this.matrixApply((function(r,i){return n.e[r][i]=e[r][i]-t[r][i]}));var i=this.computeStepSize(this.e);i=Math.max(.2,Math.min(i,1)),this.stepAndProject(e,t,this.e,i)}},e.prototype.run=function(e){for(var t=Number.MAX_VALUE,n=!1;!n&&e-- >0;){var r=this.rungeKutta();n=Math.abs(t/r-1)>16)/this.range},e.prototype.getNextBetween=function(e,t){return e+this.getNext()*(t-e)},e}();t.PseudoRandom=i},6085:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(31),a=function(){};t.Point=a;var s=function(e,t,n,r){this.x1=e,this.y1=t,this.x2=n,this.y2=r};t.LineSegment=s;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(a);function u(e,t,n){return(t.x-e.x)*(n.y-e.y)-(n.x-e.x)*(t.y-e.y)}function l(e,t,n){return u(e,t,n)>0}function h(e,t,n){return u(e,t,n)<0}function f(e,t){var n,r,i,o,a=t.length-1;if(h(e,t[1],t[0])&&!l(e,t[a-1],t[0]))return 0;for(n=0,r=a;;){if(r-n==1)return l(e,t[n],t[r])?n:r;if((o=h(e,t[(i=Math.floor((n+r)/2))+1],t[i]))&&!l(e,t[i-1],t[i]))return i;l(e,t[n+1],t[n])?o||l(e,t[n],t[i])?r=i:n=i:o&&h(e,t[n],t[i])?r=i:n=i}}function d(e,t){var n,r,i,o,a=t.length-1;if(l(e,t[a-1],t[0])&&!h(e,t[1],t[0]))return 0;for(n=0,r=a;;){if(r-n==1)return h(e,t[n],t[r])?n:r;if(o=h(e,t[(i=Math.floor((n+r)/2))+1],t[i]),l(e,t[i-1],t[i])&&!o)return i;h(e,t[n+1],t[n])?o?h(e,t[n],t[i])?r=i:n=i:r=i:o?n=i:l(e,t[n],t[i])?r=i:n=i}}function g(e,t,n,r,i,o){var a,s;s=r(e[a=n(t[0],e)],t);for(var c=!1;!c;){for(c=!0;a===e.length-1&&(a=0),!i(t[s],e[a],e[a+1]);)++a;for(;0===s&&(s=t.length-1),!o(e[a],t[s],t[s-1]);)--s,c=!1}return{t1:a,t2:s}}function p(e,t){return g(e,t,f,d,l,h)}t.PolyPoint=c,t.isLeft=u,t.ConvexHull=function(e){var t,n=e.slice(0).sort((function(e,t){return e.x!==t.x?t.x-e.x:t.y-e.y})),r=e.length,i=n[0].x;for(t=1;t=0&&n[t].x===l;t--);for(s=t+1,t=o;++t<=s;)if(!(u(n[0],n[s],n[t])>=0&&t1&&!(u(a[a.length-2],a[a.length-1],n[t])>0);)a.length-=1;0!=t&&a.push(n[t])}c!=s&&a.push(n[c]);var h=a.length;for(t=s;--t>=o;)if(!(u(n[c],n[o],n[t])>=0&&t>o)){for(;a.length>h&&!(u(a[a.length-2],a[a.length-1],n[t])>0);)a.length-=1;0!=t&&a.push(n[t])}}return a},t.clockwiseRadialSweep=function(e,t,n){t.slice(0).sort((function(t,n){return Math.atan2(t.y-e.y,t.x-e.x)-Math.atan2(n.y-e.y,n.x-e.x)})).forEach(n)},t.tangent_PolyPolyC=g,t.LRtangent_PolyPolyC=function(e,t){var n=p(t,e);return{t1:n.t2,t2:n.t1}},t.RLtangent_PolyPolyC=p,t.LLtangent_PolyPolyC=function(e,t){return g(e,t,d,d,h,h)},t.RRtangent_PolyPolyC=function(e,t){return g(e,t,f,f,l,l)};var v=function(e,t){this.t1=e,this.t2=t};t.BiTangent=v;var b=function(){};t.BiTangents=b;var y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(a);t.TVGPoint=y;var w=function(e,t,n,r){this.id=e,this.polyid=t,this.polyvertid=n,this.p=r,r.vv=this};t.VisibilityVertex=w;var m=function(){function e(e,t){this.source=e,this.target=t}return e.prototype.length=function(){var e=this.source.p.x-this.target.p.x,t=this.source.p.y-this.target.p.y;return Math.sqrt(e*e+t*t)},e}();t.VisibilityEdge=m;var x=function(){function e(e,t){if(this.P=e,this.V=[],this.E=[],t)this.V=t.V.slice(0),this.E=t.E.slice(0);else{for(var n=e.length,r=0;r0&&this.E.push(new m(i[o-1].vv,s))}i.length>1&&this.E.push(new m(i[0].vv,i[i.length-1].vv))}for(r=0;r0)return!0;return!1},e}();function E(e,t){for(var n=[],r=1,i=t.length;r=0&&p>=0&&y<0&&w>=0&&m>=0&&x<0?i.ll=new v(o,a):g<=0&&p<=0&&y>0&&w<=0&&m<=0&&x>0?i.rr=new v(o,a):g<=0&&p>0&&y<=0&&w>=0&&m<0&&x>=0?i.rl=new v(o,a):g>=0&&p<0&&y>=0&&w<=0&&m>0&&x<=0&&(i.lr=new v(o,a))}return i}function k(e,t){return!e.every((function(e){return!function(e,t){for(var n=1,r=t.length;n0)return!0}return!1}},7598:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(31),i=n(4926),o=n(2867),a=function(e,t,n){this.id=e,this.rect=t,this.children=n,this.leaf=void 0===n||0===n.length};t.NodeWrapper=a;var s=function(e,t,n,r,i){void 0===r&&(r=null),void 0===i&&(i=null),this.id=e,this.x=t,this.y=n,this.node=r,this.line=i};t.Vert=s;var c=function(){function e(t,n){this.s=t,this.t=n;var r=e.findMatch(t,n),i=n.slice(0).reverse(),o=e.findMatch(t,i);r.length>=o.length?(this.length=r.length,this.si=r.si,this.ti=r.ti,this.reversed=!1):(this.length=o.length,this.si=o.si,this.ti=n.length-o.ti-o.length,this.reversed=!0)}return e.findMatch=function(e,t){for(var n=e.length,r=t.length,i={length:0,si:-1,ti:-1},o=new Array(n),a=0;ai.length&&(i.length=c,i.si=a-c+1,i.ti=s-c+1)}else o[a][s]=0}return i},e.prototype.getSequence=function(){return this.length>=0?this.s.slice(this.si,this.si+this.length):[]},e}();t.LongestCommonSubsequence=c;var u=function(){function e(e,t,n){var i=this;void 0===n&&(n=12),this.originalnodes=e,this.groupPadding=n,this.leaves=null,this.nodes=e.map((function(e,n){return new a(n,t.getBounds(e),t.getChildren(e))})),this.leaves=this.nodes.filter((function(e){return e.leaf})),this.groups=this.nodes.filter((function(e){return!e.leaf})),this.cols=this.getGridLines("x"),this.rows=this.getGridLines("y"),this.groups.forEach((function(e){return e.children.forEach((function(t){return i.nodes[t].parent=e}))})),this.root={children:[]},this.nodes.forEach((function(e){void 0===e.parent&&(e.parent=i.root,i.root.children.push(e.id)),e.ports=[]})),this.backToFront=this.nodes.slice(0),this.backToFront.sort((function(e,t){return i.getDepth(e)-i.getDepth(t)})),this.backToFront.slice(0).reverse().filter((function(e){return!e.leaf})).forEach((function(e){var t=r.Rectangle.empty();e.children.forEach((function(e){return t=t.union(i.nodes[e].rect)})),e.rect=t.inflate(i.groupPadding)}));var o=this.midPoints(this.cols.map((function(e){return e.pos}))),c=this.midPoints(this.rows.map((function(e){return e.pos}))),u=o[0],l=o[o.length-1],h=c[0],f=c[c.length-1],d=this.rows.map((function(e){return{x1:u,x2:l,y1:e.pos,y2:e.pos}})).concat(c.map((function(e){return{x1:u,x2:l,y1:e,y2:e}}))),g=this.cols.map((function(e){return{x1:e.pos,x2:e.pos,y1:h,y2:f}})).concat(o.map((function(e){return{x1:e,x2:e,y1:h,y2:f}}))),p=d.concat(g);p.forEach((function(e){return e.verts=[]})),this.verts=[],this.edges=[],d.forEach((function(e){return g.forEach((function(t){var n=new s(i.verts.length,t.x1,e.y1);e.verts.push(n),t.verts.push(n),i.verts.push(n);for(var r=i.backToFront.length;r-- >0;){var o=i.backToFront[r],a=o.rect,c=Math.abs(n.x-a.cx()),u=Math.abs(n.y-a.cy());if(c0;){var r=n.filter((function(t){return t.rect["overlap"+e.toUpperCase()](n[0].rect)})),i={nodes:r,pos:this.avg(r.map((function(t){return t.rect["c"+e]()})))};t.push(i),i.nodes.forEach((function(e){return n.splice(n.indexOf(e),1)}))}return t.sort((function(e,t){return e.pos-t.pos})),t},e.prototype.getDepth=function(e){for(var t=0;e.parent!==this.root;)t++,e=e.parent;return t},e.prototype.midPoints=function(e){for(var t=e[1]-e[0],n=[e[0]-t/2],r=1;r.1)&&(u={pos:h[0][t],segments:[]},c.push(u)),u.segments.push(h)}return c},e.nudgeSegs=function(e,t,n,r,o,a){var s=r.length;if(!(s<=1)){for(var c=r.map((function(t){return new i.Variable(t[0][e])})),u=[],l=0;l=0&&u.push(new i.Constraint(c[v],c[b],a))}new i.Solver(c,u).solve(),c.forEach((function(t,i){var o=r[i],a=t.position();o[0][e]=o[1][e]=a;var s=n[o.edgeid];o.i>0&&(s[o.i-1][1][e]=a),o.iMath.PI||i<-Math.PI)&&(i=r-n),i},e.isLeft=function(e,t,n){return(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x)<=0},e.getOrder=function(e){for(var t={},n=0;n=u.length||h.ti+h.length>=l.length)?n.push({l:r,r:i}):(h.si+h.length>=u.length||h.ti+h.length>=l.length?(o=u[h.si+1],s=u[h.si-1],a=l[h.ti-1]):(o=u[h.si+h.length-2],a=u[h.si+h.length],s=l[h.ti+h.length]),e.isLeft(o,a,s)?n.push({l:i,r}):n.push({l:r,r:i})))}return e.getOrder(n)},e.makeSegments=function(e){function t(e){return{x:e.x,y:e.y}}for(var n=function(e,t,n){return Math.abs((t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x))<.001},r=[],i=t(e[0]),o=1;o1&&l>1?1e3:0})),h=l.reverse().map((function(e){return n.verts[e]}));return h.push(this.nodes[i.id].ports[0]),h.filter((function(e,t){return!(t0&&e.node===i&&h[t-1].node===i)}))},e.getRoutePath=function(t,n,r,i){var o,a,s,c={routepath:"M "+t[0][0].x+" "+t[0][0].y+" ",arrowpath:""};if(t.length>1)for(var u=0;u0?l-=f/Math.abs(f)*n:h-=d/Math.abs(d)*n,c.routepath+="L "+l+" "+h+" ";var g=t[u+1],p=g[0].x,v=g[0].y;f=g[1].x-p,d=g[1].y-v;var b,y,w=e.angleBetween2Lines(o,g)<0?1:0;Math.abs(f)>0?(b=p+f/Math.abs(f)*n,y=v):(b=p,y=v+d/Math.abs(d)*n);var m=Math.abs(b-l),x=Math.abs(y-h);c.routepath+="A "+m+" "+x+" 0 0 "+w+" "+b+" "+y+" "}else{var E=[l,h];Math.abs(f)>0?(a=[l-=f/Math.abs(f)*i,h+r],s=[l,h-r]):(a=[l+r,h-=d/Math.abs(d)*i],s=[l-r,h]),c.routepath+="L "+l+" "+h+" ",i>0&&(c.arrowpath="M "+E[0]+" "+E[1]+" L "+a[0]+" "+a[1]+" L "+s[0]+" "+s[1])}}else l=(o=t[0])[1].x,h=o[1].y,f=l-o[0].x,d=h-o[0].y,E=[l,h],Math.abs(f)>0?(a=[l-=f/Math.abs(f)*i,h+r],s=[l,h-r]):(a=[l+r,h-=d/Math.abs(d)*i],s=[l-r,h]),c.routepath+="L "+l+" "+h+" ",i>0&&(c.arrowpath="M "+E[0]+" "+E[1]+" L "+a[0]+" "+a[1]+" L "+s[0]+" "+s[1]);return c},e}();t.GridRouter=u},7384:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=10,r=(1+Math.sqrt(5))/2,i=1e-4;t.applyPacking=function(e,t,o,a,s,c){void 0===s&&(s=1),void 0===c&&(c=!0);var u=t,l=o,h=(s=void 0!==s?s:1,a=void 0!==a?a:0,0),f=0,d=0,g=0,p=[];function v(e,t){p=[],h=0,f=0,g=0;for(var n=0;n=e.height&&p[o].x+p[o].width+e.width+n-t<=i){r=p[o];break}p.push(e),void 0!==r?(e.x=r.x+r.width+n,e.y=r.bottom,e.space_left=e.height,e.bottom=e.y,r.space_left-=e.height+n,r.bottom+=e.height+n):(e.y=g,g+=e.height+n,e.x=0,e.bottom=e.y,e.space_left=e.height),e.y+e.height-f>-1e-4&&(f=e.y+e.height-0),e.x+e.width-h>-1e-4&&(h=e.x+e.width-0)}0!=e.length&&(function(e){e.forEach((function(e){var t,n,r,i,o;t=e,n=Number.MAX_VALUE,r=Number.MAX_VALUE,i=0,o=0,t.array.forEach((function(e){var t=void 0!==e.width?e.width:a,s=void 0!==e.height?e.height:a;t/=2,s/=2,i=Math.max(e.x+t,i),n=Math.min(e.x-t,n),o=Math.max(e.y+s,o),r=Math.min(e.y-s,r)})),t.width=i-n,t.height=o-r}))}(e),function(e,t){var o=Number.POSITIVE_INFINITY,a=0;e.sort((function(e,t){return t.height-e.height}));for(var s=b=d=e.reduce((function(e,t){return e.widthd||p>i;){if(1!=f){var b=c-(c-s)/r;l=v(e,b)}if(0!=f){var y=s+(c-s)/r;h=v(e,y)}if(g=Math.abs(b-y),p=Math.abs(l-h),lh?(s=b,b=y,l=h,f=1):(c=y,y=b,h=l,f=0),u++>100)break}v(e,a)}(e),c&&function(e){e.forEach((function(e){var t={x:0,y:0};e.array.forEach((function(e){t.x+=e.x,t.y+=e.y})),t.x/=e.array.length,t.y/=e.array.length;var n=t.x-e.width/2,r=t.y-e.height/2,i=e.x-n+u/2-h/2,o=e.y-r+l/2-f/2;e.array.forEach((function(e){e.x+=i,e.y+=o}))}))}(e))},t.separateGraphs=function(e,t){for(var n={},r={},i=[],o=0,a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(8793),o=n(9427),a=n(7069),s=n(31),c=n(2867),u=n(6085),l=n(7384);function h(e){return void 0!==e.leaves||void 0!==e.groups}!function(e){e[e.start=0]="start",e[e.tick=1]="tick",e[e.end=2]="end"}(r=t.EventType||(t.EventType={}));var f=function(){function e(){var t=this;this._canvasSize=[1,1],this._linkDistance=20,this._defaultNodeSize=10,this._linkLengthCalculator=null,this._linkType=null,this._avoidOverlaps=!1,this._handleDisconnected=!0,this._running=!1,this._nodes=[],this._groups=[],this._rootGroup=null,this._links=[],this._constraints=[],this._distanceMatrix=null,this._descent=null,this._directedLinkConstraints=null,this._threshold=.01,this._visibilityGraph=null,this._groupCompactness=1e-6,this.event=null,this.linkAccessor={getSourceIndex:e.getSourceIndex,getTargetIndex:e.getTargetIndex,setLength:e.setLinkLength,getType:function(e){return"function"==typeof t._linkType?t._linkType(e):0}}}return e.prototype.on=function(e,t){return this.event||(this.event={}),"string"==typeof e?this.event[r[e]]=t:this.event[e]=t,this},e.prototype.trigger=function(e){this.event&&void 0!==this.event[e.type]&&this.event[e.type](e)},e.prototype.kick=function(){for(;!this.tick(););},e.prototype.tick=function(){if(this._alpha0){var t=0;this._links.forEach((function(e){t=Math.max(t,e.source,e.target)})),this._nodes=new Array(++t);for(var n=0;n0?e:0:e>0&&(this._running||(this._running=!0,this.trigger({type:r.start,alpha:this._alpha=e}),this.kick())),this):this._alpha},e.prototype.getLinkLength=function(e){return"function"==typeof this._linkDistance?+this._linkDistance(e):this._linkDistance},e.setLinkLength=function(e,t){e.length=t},e.prototype.getLinkType=function(e){return"function"==typeof this._linkType?this._linkType(e):0},e.prototype.symmetricDiffLinkLengths=function(e,t){var n=this;return void 0===t&&(t=1),this.linkDistance((function(t){return e*t.length})),this._linkLengthCalculator=function(){return o.symmetricDiffLinkLengths(n._links,n.linkAccessor,t)},this},e.prototype.jaccardLinkLengths=function(e,t){var n=this;return void 0===t&&(t=1),this.linkDistance((function(t){return e*t.length})),this._linkLengthCalculator=function(){return o.jaccardLinkLengths(n._links,n.linkAccessor,t)},this},e.prototype.start=function(t,n,r,i,u,l){var h=this;void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=0),void 0===u&&(u=!0),void 0===l&&(l=!0);var f,d=this.nodes().length,g=d+2*this._groups.length,p=(this._links.length,this._canvasSize[0]),v=this._canvasSize[1],b=new Array(g),y=new Array(g),w=null,m=this._avoidOverlaps;this._nodes.forEach((function(e,t){e.index=t,void 0===e.x&&(e.x=p/2,e.y=v/2),b[t]=e.x,y[t]=e.y})),this._linkLengthCalculator&&this._linkLengthCalculator(),this._distanceMatrix?f=this._distanceMatrix:(f=new c.Calculator(g,this._links,e.getSourceIndex,e.getTargetIndex,(function(e){return h.getLinkLength(e)})).DistanceMatrix(),w=a.Descent.createSquareMatrix(g,(function(){return 2})),this._links.forEach((function(e){"number"==typeof e.source&&(e.source=h._nodes[e.source]),"number"==typeof e.target&&(e.target=h._nodes[e.target])})),this._links.forEach((function(t){var n=e.getSourceIndex(t),r=e.getTargetIndex(t);w[n][r]=w[r][n]=t.weight||1})));var x=a.Descent.createSquareMatrix(g,(function(e,t){return f[e][t]}));if(this._rootGroup&&void 0!==this._rootGroup.groups){var E=d;this._groups.forEach((function(e){!function(e,t,n,r){w[e][t]=w[t][e]=n,x[e][t]=x[t][e]=.1}(E,E+1,h._groupCompactness),b[E]=0,y[E++]=0,b[E]=0,y[E++]=0}))}else this._rootGroup={leaves:this._nodes,groups:[]};var C=this._constraints||[];for(this._directedLinkConstraints&&(this.linkAccessor.getMinSeparation=this._directedLinkConstraints.getMinSeparation,C=C.concat(o.generateDirectedEdgeConstraints(d,this._links,this._directedLinkConstraints.axis,this.linkAccessor))),this.avoidOverlaps(!1),this._descent=new a.Descent([b,y],x),this._descent.locks.clear(),E=0;E0&&(this._descent.project=new s.Projection(this._nodes,this._groups,this._rootGroup,C).projectFunctions()),this._descent.run(n),this.separateOverlappingComponents(p,v,l),this.avoidOverlaps(m),m&&(this._nodes.forEach((function(e,t){e.x=b[t],e.y=y[t]})),this._descent.project=new s.Projection(this._nodes,this._groups,this._rootGroup,C,!0).projectFunctions(),this._nodes.forEach((function(e,t){b[t]=e.x,y[t]=e.y}))),this._descent.G=w,this._descent.run(r),i){this._descent.snapStrength=1e3,this._descent.snapGridSize=this._nodes[0].width,this._descent.numGridSnapNodes=d,this._descent.scaleSnapByMaxH=d!=g;var N=a.Descent.createSquareMatrix(g,(function(e,t){return e>=d||t>=d?w[e][t]:0}));this._descent.G=N,this._descent.run(i)}return this.updateNodePositions(),this.separateOverlappingComponents(p,v,l),u?this.resume():this},e.prototype.initialLayout=function(t,n,r){if(this._groups.length>0&&t>0){var i=this._nodes.length,o=this._links.map((function(e){return{source:e.source.index,target:e.target.index}})),a=this._nodes.map((function(e){return{index:e.index}}));this._groups.forEach((function(e,t){a.push({index:e.index=i+t})})),this._groups.forEach((function(e,t){void 0!==e.leaves&&e.leaves.forEach((function(t){return o.push({source:e.index,target:t.index})})),void 0!==e.groups&&e.groups.forEach((function(t){return o.push({source:e.index,target:t.index})}))})),(new e).size(this.size()).nodes(a).links(o).avoidOverlaps(!1).linkDistance(this.linkDistance()).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(t,0,0,0,!1),this._nodes.forEach((function(e){n[e.index]=a[e.index].x,r[e.index]=a[e.index].y}))}else this._descent.run(t)},e.prototype.separateOverlappingComponents=function(e,t,n){var r=this;if(void 0===n&&(n=!0),!this._distanceMatrix&&this._handleDisconnected){var i=this._descent.x[0],o=this._descent.x[1];this._nodes.forEach((function(e,t){e.x=i[t],e.y=o[t]}));var a=l.separateGraphs(this._nodes,this._links);l.applyPacking(a,e,t,this._defaultNodeSize,1,n),this._nodes.forEach((function(e,t){r._descent.x[0][t]=e.x,r._descent.x[1][t]=e.y,e.bounds&&(e.bounds.setXCentre(e.x),e.bounds.setYCentre(e.y))}))}},e.prototype.resume=function(){return this.alpha(.1)},e.prototype.stop=function(){return this.alpha(0)},e.prototype.prepareEdgeRouting=function(e){void 0===e&&(e=0),this._visibilityGraph=new u.TangentVisibilityGraph(this._nodes.map((function(t){return t.bounds.inflate(-e).vertices()})))},e.prototype.routeEdge=function(e,t,n){void 0===t&&(t=5);var r=[],i=new u.TangentVisibilityGraph(this._visibilityGraph.P,{V:this._visibilityGraph.V,E:this._visibilityGraph.E}),o={x:e.source.x,y:e.source.y},a={x:e.target.x,y:e.target.y},l=i.addPoint(o,e.source.index),h=i.addPoint(a,e.target.index);i.addEdgeIfVisible(o,a,e.source.index,e.target.index),void 0!==n&&n(i);var f=new c.Calculator(i.V.length,i.E,(function(e){return e.source.id}),(function(e){return e.target.id}),(function(e){return e.length()})).PathFromNodeToNode(l.id,h.id);if(1===f.length||f.length===i.V.length){var d=s.makeEdgeBetween(e.source.innerBounds,e.target.innerBounds,t);r=[d.sourceIntersection,d.arrowStart]}else{for(var g=f.length-2,p=i.V[f[g]].p,v=i.V[f[0]].p,b=(r=[e.source.innerBounds.rayIntersection(p.x,p.y)],g);b>=0;--b)r.push(i.V[f[b]].p);r.push(s.makeEdgeTo(v,e.target.innerBounds,t))}return r},e.getSourceIndex=function(e){return"number"==typeof e.source?e.source:e.source.index},e.getTargetIndex=function(e){return"number"==typeof e.target?e.target:e.target.index},e.linkId=function(t){return e.getSourceIndex(t)+"-"+e.getTargetIndex(t)},e.dragStart=function(t){h(t)?e.storeOffset(t,e.dragOrigin(t)):(e.stopNode(t),t.fixed|=2)},e.stopNode=function(e){e.px=e.x,e.py=e.y},e.storeOffset=function(t,n){void 0!==t.leaves&&t.leaves.forEach((function(t){t.fixed|=2,e.stopNode(t),t._dragGroupOffsetX=t.x-n.x,t._dragGroupOffsetY=t.y-n.y})),void 0!==t.groups&&t.groups.forEach((function(t){return e.storeOffset(t,n)}))},e.dragOrigin=function(e){return h(e)?{x:e.bounds.cx(),y:e.bounds.cy()}:e},e.drag=function(t,n){h(t)?(void 0!==t.leaves&&t.leaves.forEach((function(e){t.bounds.setXCentre(n.x),t.bounds.setYCentre(n.y),e.px=e._dragGroupOffsetX+n.x,e.py=e._dragGroupOffsetY+n.y})),void 0!==t.groups&&t.groups.forEach((function(t){return e.drag(t,n)}))):(t.px=n.x,t.py=n.y)},e.dragEnd=function(t){h(t)?(void 0!==t.leaves&&t.leaves.forEach((function(t){e.dragEnd(t),delete t._dragGroupOffsetX,delete t._dragGroupOffsetY})),void 0!==t.groups&&t.groups.forEach(e.dragEnd)):t.fixed&=-7},e.mouseOver=function(e){e.fixed|=4,e.px=e.x,e.py=e.y},e.mouseOut=function(e){e.fixed&=-5},e}();t.Layout=f},6749:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2867),i=n(7069),o=n(31),a=n(9427),s=function(){function e(e,t){this.source=e,this.target=t}return e.prototype.actualLength=function(e){var t=this;return Math.sqrt(e.reduce((function(e,n){var r=n[t.target]-n[t.source];return e+r*r}),0))},e}();t.Link3D=s;t.Node3D=function(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),this.x=e,this.y=t,this.z=n};var c=function(){function e(t,n,r){var i=this;void 0===r&&(r=1),this.nodes=t,this.links=n,this.idealLinkLength=r,this.constraints=null,this.useJaccardLinkLengths=!0,this.result=new Array(e.k);for(var o=0;o{"use strict";function n(e,t){var n={};for(var r in e)n[r]={};for(var r in t)n[r]={};return Object.keys(n).length}function r(e,t){var n=0;for(var r in e)void 0!==t[r]&&++n;return n}function i(e,t,n,r){var i=function(e,t){var n={},r=function(e,t){void 0===n[e]&&(n[e]={}),n[e][t]={}};return e.forEach((function(e){var n=t.getSourceIndex(e),i=t.getTargetIndex(e);r(n,i),r(i,n)})),n}(e,r);e.forEach((function(e){var o=i[r.getSourceIndex(e)],a=i[r.getTargetIndex(e)];r.setLength(e,1+t*n(o,a))}))}function o(e,t,n){var r=[],i=0,o=[],a=[];function s(e){e.index=e.lowlink=i++,o.push(e),e.onStack=!0;for(var t=0,n=e.out;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,n){this.source=e,this.target=t,this.type=n};t.PowerEdge=n;var r=function(){function e(e,t,n,r){var i=this;if(this.linkAccessor=n,this.modules=new Array(e),this.roots=[],r)this.initModulesFromGroup(r);else{this.roots.push(new a);for(var s=0;s=this.R))return this.merge(t.a,t.b,e),!0}},e.prototype.nEdges=function(e,t){var n=e.incoming.intersection(t.incoming),r=e.outgoing.intersection(t.outgoing);return this.R-n.count()-r.count()},e.prototype.getGroupHierarchy=function(e){var t=this,r=[];return i(this.roots[0],{},r),this.allEdges().forEach((function(i){var o=t.modules[i.source],a=t.modules[i.target];e.push(new n(void 0===o.gid?i.source:r[o.gid],void 0===a.gid?i.target:r[a.gid],i.type))})),r},e.prototype.allEdges=function(){var t=[];return e.getEdges(this.roots[0],t),t},e.getEdges=function(t,n){t.forAll((function(t){t.getEdges(n),e.getEdges(t.children,n)}))},e}();function i(e,t,n){e.forAll((function(e){if(e.isLeaf())t.leaves||(t.leaves=[]),t.leaves.push(e.id);else{var r=t;if(e.gid=n.length,!e.isIsland()||e.isPredefined()){if(r={id:e.gid},e.isPredefined())for(var o in e.definition)r[o]=e.definition[o];t.groups||(t.groups=[]),t.groups.push(e.gid),n.push(r)}i(e.children,r,n)}}))}t.Configuration=r;var o=function(){function e(e,t,n,r,i){void 0===t&&(t=new s),void 0===n&&(n=new s),void 0===r&&(r=new a),this.id=e,this.outgoing=t,this.incoming=n,this.children=r,this.definition=i}return e.prototype.getEdges=function(e){var t=this;this.outgoing.forAll((function(r,i){r.forAll((function(r){e.push(new n(t.id,r.id,i))}))}))},e.prototype.isLeaf=function(){return 0===this.children.count()},e.prototype.isIsland=function(){return 0===this.outgoing.count()&&0===this.incoming.count()},e.prototype.isPredefined=function(){return void 0!==this.definition},e}();t.Module=o;var a=function(){function e(){this.table={}}return e.prototype.count=function(){return Object.keys(this.table).length},e.prototype.intersection=function(t){var n=new e;return n.table=function(e,t){var n={};for(var r in e)r in t&&(n[r]=e[r]);return n}(this.table,t.table),n},e.prototype.intersectionCount=function(e){return this.intersection(e).count()},e.prototype.contains=function(e){return e in this.table},e.prototype.add=function(e){this.table[e.id]=e},e.prototype.remove=function(e){delete this.table[e.id]},e.prototype.forAll=function(e){for(var t in this.table)e(this.table[t])},e.prototype.modules=function(){var e=[];return this.forAll((function(t){t.isPredefined()||e.push(t)})),e},e}();t.ModuleSet=a;var s=function(){function e(){this.sets={},this.n=0}return e.prototype.count=function(){return this.n},e.prototype.contains=function(e){var t=!1;return this.forAllModules((function(n){t||n.id!=e||(t=!0)})),t},e.prototype.add=function(e,t){(e in this.sets?this.sets[e]:this.sets[e]=new a).add(t),++this.n},e.prototype.remove=function(e,t){var n=this.sets[e];n.remove(t),0===n.count()&&delete this.sets[e],--this.n},e.prototype.forAll=function(e){for(var t in this.sets)e(this.sets[t],Number(t))},e.prototype.forAllModules=function(e){this.forAll((function(t,n){return t.forAll(e)}))},e.prototype.intersection=function(t){var n=new e;return this.forAll((function(e,r){if(r in t.sets){var i=e.intersection(t.sets[r]),o=i.count();o>0&&(n.sets[r]=i,n.n+=o)}})),n},e}();t.LinkSets=s,t.getGroups=function(e,t,n,i){for(var o=e.length,a=new r(o,t,n,i);a.greedyMerge(););var s=[],c=a.getGroupHierarchy(s);return s.forEach((function(t){var n=function(n){var r=t[n];"number"==typeof r&&(t[n]=e[r])};n("source"),n("target")})),{groups:c,powerEdges:s}}},7421:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.elem=e,this.subheaps=[]}return e.prototype.toString=function(e){for(var t="",n=!1,r=0;r0)}return null}}return e.prototype.clear=function(){this._root=null,this.size=0},e.prototype.find=function(e){for(var t=this._root;null!==t;){var n=this._comparator(e,t.data);if(0===n)return t.data;t=t.get_child(n>0)}return null},e.prototype.lowerBound=function(e){return this._bound(e,this._comparator)},e.prototype.upperBound=function(e){var t=this._comparator;return this._bound(e,(function(e,n){return t(n,e)}))},e.prototype.min=function(){var e=this._root;if(null===e)return null;for(;null!==e.left;)e=e.left;return e.data},e.prototype.max=function(){var e=this._root;if(null===e)return null;for(;null!==e.right;)e=e.right;return e.data},e.prototype.iterator=function(){return new o(this)},e.prototype.each=function(e){for(var t,n=this.iterator();null!==(t=n.next());)e(t)},e.prototype.reach=function(e){for(var t,n=this.iterator();null!==(t=n.prev());)e(t)},e.prototype._bound=function(e,t){for(var n=this._root,r=this.iterator();null!==n;){var i=this._comparator(e,n.data);if(0===i)return r._cursor=n,r;r._ancestors.push(n),n=n.get_child(i>0)}for(var o=r._ancestors.length-1;o>=0;--o)if(t(e,(n=r._ancestors[o]).data)>0)return r._cursor=n,r._ancestors.length=o,r;return r._ancestors.length=0,r},e}();t.TreeBase=i;var o=function(){function e(e){this._tree=e,this._ancestors=[],this._cursor=null}return e.prototype.data=function(){return null!==this._cursor?this._cursor.data:null},e.prototype.next=function(){if(null===this._cursor){var e=this._tree._root;null!==e&&this._minNode(e)}else{var t;if(null===this._cursor.right)do{if(t=this._cursor,!this._ancestors.length){this._cursor=null;break}this._cursor=this._ancestors.pop()}while(this._cursor.right===t);else this._ancestors.push(this._cursor),this._minNode(this._cursor.right)}return null!==this._cursor?this._cursor.data:null},e.prototype.prev=function(){if(null===this._cursor){var e=this._tree._root;null!==e&&this._maxNode(e)}else{var t;if(null===this._cursor.left)do{if(t=this._cursor,!this._ancestors.length){this._cursor=null;break}this._cursor=this._ancestors.pop()}while(this._cursor.left===t);else this._ancestors.push(this._cursor),this._maxNode(this._cursor.left)}return null!==this._cursor?this._cursor.data:null},e.prototype._minNode=function(e){for(;null!==e.left;)this._ancestors.push(e),e=e.left;this._cursor=e},e.prototype._maxNode=function(e){for(;null!==e.right;)this._ancestors.push(e),e=e.right;this._cursor=e},e}();t.Iterator=o;var a=function(){function e(e){this.data=e,this.left=null,this.right=null,this.red=!0}return e.prototype.get_child=function(e){return e?this.right:this.left},e.prototype.set_child=function(e,t){e?this.right=t:this.left=t},e}(),s=function(e){function t(t){var n=e.call(this)||this;return n._root=null,n._comparator=t,n.size=0,n}return r(t,e),t.prototype.insert=function(e){var n=!1;if(null===this._root)this._root=new a(e),n=!0,this.size++;else{var r=new a(void 0),i=!1,o=!1,s=null,c=r,u=null,l=this._root;for(c.right=this._root;;){if(null===l?(l=new a(e),u.set_child(i,l),n=!0,this.size++):t.is_red(l.left)&&t.is_red(l.right)&&(l.red=!0,l.left.red=!1,l.right.red=!1),t.is_red(l)&&t.is_red(u)){var h=c.right===s;l===u.get_child(o)?c.set_child(h,t.single_rotate(s,!o)):c.set_child(h,t.double_rotate(s,!o))}var f=this._comparator(l.data,e);if(0===f)break;o=i,i=f<0,null!==s&&(c=s),s=u,u=l,l=l.get_child(i)}this._root=r.right}return this._root.red=!1,n},t.prototype.remove=function(e){if(null===this._root)return!1;var n=new a(void 0),r=n;r.right=this._root;for(var i=null,o=null,s=null,c=!0;null!==r.get_child(c);){var u=c;o=i,i=r,r=r.get_child(c);var l=this._comparator(e,r.data);if(c=l>0,0===l&&(s=r),!t.is_red(r)&&!t.is_red(r.get_child(c)))if(t.is_red(r.get_child(!c))){var h=t.single_rotate(r,c);i.set_child(u,h),i=h}else if(!t.is_red(r.get_child(!c))){var f=i.get_child(!u);if(null!==f)if(t.is_red(f.get_child(!u))||t.is_red(f.get_child(u))){var d=o.right===i;t.is_red(f.get_child(u))?o.set_child(d,t.double_rotate(i,u)):t.is_red(f.get_child(!u))&&o.set_child(d,t.single_rotate(i,u));var g=o.get_child(d);g.red=!0,r.red=!0,g.left.red=!1,g.right.red=!1}else i.red=!1,f.red=!0,r.red=!0}}return null!==s&&(s.data=r.data,i.set_child(i.right===r,r.get_child(null===r.left)),this.size--),this._root=n.right,null!==this._root&&(this._root.red=!1),null!==s},t.is_red=function(e){return null!==e&&e.red},t.single_rotate=function(e,t){var n=e.get_child(!t);return e.set_child(!t,n.get_child(t)),n.set_child(t,e),e.red=!0,n.red=!1,n},t.double_rotate=function(e,n){return e.set_child(!n,t.single_rotate(e.get_child(!n),!n)),t.single_rotate(e,n)},t}(i);t.RBTree=s},31:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(4926),a=n(1138);function s(e){return e.bounds=void 0!==e.leaves?e.leaves.reduce((function(e,t){return t.bounds.union(e)}),c.empty()):c.empty(),void 0!==e.groups&&(e.bounds=e.groups.reduce((function(e,t){return s(t).union(e)}),e.bounds)),e.bounds=e.bounds.inflate(e.padding),e.bounds}t.computeGroupBounds=s;var c=function(){function e(e,t,n,r){this.x=e,this.X=t,this.y=n,this.Y=r}return e.empty=function(){return new e(Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY)},e.prototype.cx=function(){return(this.x+this.X)/2},e.prototype.cy=function(){return(this.y+this.Y)/2},e.prototype.overlapX=function(e){var t=this.cx(),n=e.cx();return t<=n&&e.x0?n[0]:null},e.prototype.vertices=function(){return[{x:this.x,y:this.y},{x:this.X,y:this.y},{x:this.X,y:this.Y},{x:this.x,y:this.Y}]},e.lineIntersection=function(e,t,n,r,i,o,a,s){var c=n-e,u=a-i,l=r-t,h=s-o,f=h*c-u*l;if(0==f)return null;var d=e-i,g=t-o,p=(u*g-h*d)/f,v=(c*g-l*d)/f;return p>=0&&p<=1&&v>=0&&v<=1?{x:e+p*c,y:t+p*l}:null},e.prototype.inflate=function(t){return new e(this.x-t,this.X+t,this.y-t,this.Y+t)},e}();t.Rectangle=c,t.makeEdgeBetween=function(e,t,n){var r=e.rayIntersection(t.cx(),t.cy())||{x:e.cx(),y:e.cy()},i=t.rayIntersection(e.cx(),e.cy())||{x:t.cx(),y:t.cy()},o=i.x-r.x,a=i.y-r.y,s=Math.sqrt(o*o+a*a),c=s-n;return{sourceIntersection:r,targetIntersection:i,arrowStart:{x:r.x+c*o/s,y:r.y+c*a/s}}},t.makeEdgeTo=function(e,t,n){var r=t.rayIntersection(e.x,e.y);r||(r={x:t.cx(),y:t.cy()});var i=r.x-e.x,o=r.y-e.y,a=Math.sqrt(i*i+o*o);return{x:r.x-n*i/a,y:r.y-n*o/a}};var u=function(e,t,n){this.v=e,this.r=t,this.pos=n,this.prev=f(),this.next=f()},l=function(e,t,n){this.isOpen=e,this.v=t,this.pos=n};function h(e,t){return e.pos>t.pos?1:e.pos0&&(e[n].insert(i),i[r].insert(e))};n("next","prev"),n("prev","next")}};function p(e,t,n,r){void 0===r&&(r=!1);var i=e.padding,o=void 0!==e.groups?e.groups.length:0,a=void 0!==e.leaves?e.leaves.length:0,s=o?e.groups.reduce((function(e,r){return e.concat(p(r,t,n,!0))}),[]):[],c=(r?2:0)+a+o,u=new Array(c),l=new Array(c),h=0,f=function(e,t){l[h]=e,u[h++]=t};if(r){var d=e.bounds,g=t.getCentre(d),b=t.getSize(d)/2,y=t.getOpen(d),w=t.getClose(d),m=g-b+i/2,x=g+b-i/2;e.minVar.desiredPosition=m,f(t.makeRect(y,w,m,i),e.minVar),e.maxVar.desiredPosition=x,f(t.makeRect(y,w,x,i),e.maxVar)}a&&e.leaves.forEach((function(e){return f(e.bounds,e.variable)})),o&&e.groups.forEach((function(e){var n=e.bounds;f(t.makeRect(t.getOpen(n),t.getClose(n),t.getCentre(n),t.getSize(n)),e.minVar)}));var E=v(l,u,t,n);return o&&(u.forEach((function(e){e.cOut=[],e.cIn=[]})),E.forEach((function(e){e.left.cOut.push(e),e.right.cIn.push(e)})),e.groups.forEach((function(e){var n=(e.padding-t.getSize(e.bounds))/2;e.minVar.cIn.forEach((function(e){return e.gap+=n})),e.minVar.cOut.forEach((function(t){t.left=e.maxVar,t.gap+=n}))}))),s.concat(E)}function v(e,t,n,r){var i,a=e.length,s=2*a;console.assert(t.length>=a);var c=new Array(s);for(i=0;ie[n]&&(e[n]=t)}o=e}))}},e.prototype.createAlignment=function(e){var t=this,n=this.nodes[e.offsets[0].node].variable;this.makeFeasible(e);var r="x"===e.axis?this.xConstraints:this.yConstraints;e.offsets.slice(1).forEach((function(e){var i=t.nodes[e.node].variable;r.push(new o.Constraint(n,i,e.offset,!0))}))},e.prototype.createConstraints=function(e){var t=this,n=function(e){return void 0===e.type||"separation"===e.type};this.xConstraints=e.filter((function(e){return"x"===e.axis&&n(e)})).map((function(e){return t.createSeparation(e)})),this.yConstraints=e.filter((function(e){return"y"===e.axis&&n(e)})).map((function(e){return t.createSeparation(e)})),e.filter((function(e){return"alignment"===e.type})).forEach((function(e){return t.createAlignment(e)}))},e.prototype.setupVariablesAndBounds=function(e,t,n,r){this.nodes.forEach((function(i,o){i.fixed?(i.variable.weight=i.fixedWeight?i.fixedWeight:1e3,n[o]=r(i)):i.variable.weight=1;var a=(i.width||0)/2,s=(i.height||0)/2,u=e[o],l=t[o];i.bounds=new c(u-a,u+a,l-s,l+s)}))},e.prototype.xProject=function(e,t,n){(this.rootGroup||this.avoidOverlaps||this.xConstraints)&&this.project(e,t,e,n,(function(e){return e.px}),this.xConstraints,w,(function(e){return e.bounds.setXCentre(n[e.variable.index]=e.variable.position())}),(function(e){var t=n[e.minVar.index]=e.minVar.position(),r=n[e.maxVar.index]=e.maxVar.position(),i=e.padding/2;e.bounds.x=t-i,e.bounds.X=r+i}))},e.prototype.yProject=function(e,t,n){(this.rootGroup||this.yConstraints)&&this.project(e,t,t,n,(function(e){return e.py}),this.yConstraints,m,(function(e){return e.bounds.setYCentre(n[e.variable.index]=e.variable.position())}),(function(e){var t=n[e.minVar.index]=e.minVar.position(),r=n[e.maxVar.index]=e.maxVar.position(),i=e.padding/2;e.bounds.y=t-i,e.bounds.Y=r+i}))},e.prototype.projectFunctions=function(){var e=this;return[function(t,n,r){return e.xProject(t,n,r)},function(t,n,r){return e.yProject(t,n,r)}]},e.prototype.project=function(e,t,n,r,i,o,a,c,u){this.setupVariablesAndBounds(e,t,r,i),this.rootGroup&&this.avoidOverlaps&&(s(this.rootGroup),o=o.concat(a(this.rootGroup))),this.solve(this.variables,o,n,r),this.nodes.forEach(c),this.rootGroup&&this.avoidOverlaps&&(this.groups.forEach(u),s(this.rootGroup))},e.prototype.solve=function(e,t,n,r){var i=new o.Solver(e,t);i.setStartingPositions(n),i.setDesiredPositions(r),i.solve()},e}();t.Projection=E},2867:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7421),i=function(e,t){this.id=e,this.distance=t},o=function(e){this.id=e,this.neighbours=[]},a=function(e,t,n){this.node=e,this.prev=t,this.d=n},s=function(){function e(e,t,n,r,a){this.n=e,this.es=t,this.neighbours=new Array(this.n);for(var s=this.n;s--;)this.neighbours[s]=new o(s);for(s=this.es.length;s--;){var c=this.es[s],u=n(c),l=r(c),h=a(c);this.neighbours[u].neighbours.push(new i(l,h)),this.neighbours[l].neighbours.push(new i(u,h))}}return e.prototype.DistanceMatrix=function(){for(var e=new Array(this.n),t=0;th&&(u.d=h,u.prev=s,n.reduceKey(u.q,u,(function(e,t){return e.q=t})))}}return o},e}();t.Calculator=s},4926:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.scale=e,this.AB=0,this.AD=0,this.A2=0}return e.prototype.addVariable=function(e){var t=this.scale/e.scale,n=e.offset/e.scale,r=e.weight;this.AB+=r*t*n,this.AD+=r*t*e.desiredPosition,this.A2+=r*t*t},e.prototype.getPosn=function(){return(this.AD-this.AB)/this.A2},e}();t.PositionStats=n;var r=function(){function e(e,t,n,r){void 0===r&&(r=!1),this.left=e,this.right=t,this.gap=n,this.equality=r,this.active=!1,this.unsatisfiable=!1,this.left=e,this.right=t,this.gap=n,this.equality=r}return e.prototype.slack=function(){return this.unsatisfiable?Number.MAX_VALUE:this.right.scale*this.right.position()-this.gap-this.left.scale*this.left.position()},e}();t.Constraint=r;var i=function(){function e(e,t,n){void 0===t&&(t=1),void 0===n&&(n=1),this.desiredPosition=e,this.weight=t,this.scale=n,this.offset=0}return e.prototype.dfdv=function(){return 2*this.weight*(this.position()-this.desiredPosition)},e.prototype.position=function(){return(this.block.ps.scale*this.block.posn+this.offset)/this.scale},e.prototype.visitNeighbours=function(e,t){var n=function(n,r){return n.active&&e!==r&&t(n,r)};this.cOut.forEach((function(e){return n(e,e.right)})),this.cIn.forEach((function(e){return n(e,e.left)}))},e}();t.Variable=i;var o=function(){function e(e){this.vars=[],e.offset=0,this.ps=new n(e.scale),this.addVariable(e)}return e.prototype.addVariable=function(e){e.block=this,this.vars.push(e),this.ps.addVariable(e),this.posn=this.ps.getPosn()},e.prototype.updateWeightedPosition=function(){this.ps.AB=this.ps.AD=this.ps.A2=0;for(var e=0,t=this.vars.length;e=0?this.inactive.push(t):this.bs.merge(t)}}},e.prototype.solve=function(){this.satisfy();for(var e=Number.MAX_VALUE,t=this.bs.cost();Math.abs(e-t)>1e-4;)this.satisfy(),e=t,t=this.bs.cost();return t},e.LAGRANGIAN_TOLERANCE=-1e-4,e.ZERO_UPPERBOUND=-1e-10,e}();t.Solver=s,t.removeOverlapInOneDimension=function(e,t,n){for(var o=e.map((function(e){return new i(e.desiredCenter)})),a=[],c=e.length,u=0;u{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e={};n.r(e),n.d(e,{VERSION:()=>t,after:()=>At,all:()=>Qt,allKeys:()=>ge,any:()=>Jt,assign:()=>Ae,before:()=>Mt,bind:()=>mt,bindAll:()=>Ct,chain:()=>vt,chunk:()=>jn,clone:()=>je,collect:()=>qt,compact:()=>_n,compose:()=>It,constant:()=>$,contains:()=>en,countBy:()=>dn,create:()=>De,debounce:()=>Ot,default:()=>Bn,defaults:()=>Me,defer:()=>Nt,delay:()=>_t,detect:()=>zt,difference:()=>Sn,drop:()=>Cn,each:()=>Ut,escape:()=>it,every:()=>Qt,extend:()=>Ie,extendOwn:()=>Ae,filter:()=>$t,find:()=>zt,findIndex:()=>Rt,findKey:()=>Dt,findLastIndex:()=>Gt,findWhere:()=>Vt,first:()=>En,flatten:()=>Nn,foldl:()=>Wt,foldr:()=>Zt,forEach:()=>Ut,functions:()=>Te,get:()=>Fe,groupBy:()=>hn,has:()=>Ye,head:()=>En,identity:()=>ze,include:()=>en,includes:()=>en,indexBy:()=>fn,indexOf:()=>Ft,initial:()=>xn,inject:()=>Wt,intersection:()=>In,invert:()=>Oe,invoke:()=>tn,isArguments:()=>X,isArray:()=>V,isArrayBuffer:()=>D,isBoolean:()=>N,isDataView:()=>z,isDate:()=>I,isElement:()=>S,isEmpty:()=>ae,isEqual:()=>de,isError:()=>M,isFinite:()=>W,isFunction:()=>G,isMap:()=>Ee,isMatch:()=>se,isNaN:()=>Z,isNull:()=>k,isNumber:()=>L,isObject:()=>C,isRegExp:()=>A,isSet:()=>ke,isString:()=>T,isSymbol:()=>P,isTypedArray:()=>ne,isUndefined:()=>_,isWeakMap:()=>Ce,isWeakSet:()=>_e,iteratee:()=>We,keys:()=>oe,last:()=>kn,lastIndexOf:()=>Yt,map:()=>qt,mapObject:()=>$e,matcher:()=>Ve,matches:()=>Ve,max:()=>on,memoize:()=>kt,methods:()=>Te,min:()=>an,mixin:()=>Gn,negate:()=>Lt,noop:()=>Ke,now:()=>tt,object:()=>Pn,omit:()=>mn,once:()=>Pt,pairs:()=>Se,partial:()=>wt,partition:()=>gn,pick:()=>wn,pluck:()=>nn,property:()=>Ue,propertyOf:()=>Qe,random:()=>et,range:()=>Dn,reduce:()=>Wt,reduceRight:()=>Zt,reject:()=>Kt,rest:()=>Cn,restArguments:()=>E,result:()=>dt,sample:()=>sn,select:()=>$t,shuffle:()=>cn,size:()=>bn,some:()=>Jt,sortBy:()=>un,sortedIndex:()=>Bt,tail:()=>Cn,take:()=>En,tap:()=>Re,template:()=>ft,templateSettings:()=>at,throttle:()=>St,times:()=>Je,toArray:()=>vn,toPath:()=>Ge,transpose:()=>An,unescape:()=>ot,union:()=>Ln,uniq:()=>Tn,unique:()=>Tn,uniqueId:()=>pt,unzip:()=>An,values:()=>Ne,where:()=>rn,without:()=>On,wrap:()=>Tt,zip:()=>Mn});var t="1.13.1",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},i=Array.prototype,o=Object.prototype,a="undefined"!=typeof Symbol?Symbol.prototype:null,s=i.push,c=i.slice,u=o.toString,l=o.hasOwnProperty,h="undefined"!=typeof ArrayBuffer,f="undefined"!=typeof DataView,d=Array.isArray,g=Object.keys,p=Object.create,v=h&&ArrayBuffer.isView,b=isNaN,y=isFinite,w=!{toString:null}.propertyIsEnumerable("toString"),m=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],x=Math.pow(2,53)-1;function E(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;i=0&&n<=x}}function Q(e){return function(t){return null==t?void 0:t[e]}}const J=Q("byteLength"),ee=K(J);var te=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;const ne=h?function(e){return v?v(e)&&!z(e):ee(e)&&te.test(u.call(e))}:$(!1),re=Q("length");function ie(e,t){t=function(e){for(var t={},n=e.length,r=0;r":">",'"':""","'":"'","`":"`"},it=nt(rt),ot=nt(Oe(rt)),at=ce.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var st=/(.)^/,ct={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},ut=/\\|'|\r|\n|\u2028|\u2029/g;function lt(e){return"\\"+ct[e]}var ht=/^\s*(\w|\$)+\s*$/;function ft(e,t,n){!t&&n&&(t=n),t=Me({},t,ce.templateSettings);var r=RegExp([(t.escape||st).source,(t.interpolate||st).source,(t.evaluate||st).source].join("|")+"|$","g"),i=0,o="__p+='";e.replace(r,(function(t,n,r,a,s){return o+=e.slice(i,s).replace(ut,lt),i=s+t.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),t})),o+="';\n";var a,s=t.variable;if(s){if(!ht.test(s))throw new Error("variable is not a bare identifier: "+s)}else o="with(obj||{}){\n"+o+"}\n",s="obj";o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{a=new Function(s,"_",o)}catch(e){throw e.source=o,e}var c=function(e){return a.call(this,e,ce)};return c.source="function("+s+"){\n"+o+"}",c}function dt(e,t,n){var r=(t=Be(t)).length;if(!r)return G(n)?n.call(e):n;for(var i=0;i1)Et(s,t-1,n,r),i=r.length;else for(var c=0,u=s.length;ct?(r&&(clearTimeout(r),r=null),s=u,a=e.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(c,l)),a};return u.cancel=function(){clearTimeout(r),s=0,r=i=o=null},u}function Ot(e,t,n){var r,i,o,a,s,c=function(){var u=tt()-i;t>u?r=setTimeout(c,t-u):(r=null,n||(a=e.apply(s,o)),r||(o=s=null))},u=E((function(u){return s=this,o=u,i=tt(),r||(r=setTimeout(c,t),n&&(a=e.apply(s,o))),a}));return u.cancel=function(){clearTimeout(r),r=o=s=null},u}function Tt(e,t){return wt(t,e)}function Lt(e){return function(){return!e.apply(this,arguments)}}function It(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}}function At(e,t){return function(){if(--e<1)return t.apply(this,arguments)}}function Mt(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}}const Pt=wt(Mt,2);function Dt(e,t,n){t=Ze(t,n);for(var r,i=oe(e),o=0,a=i.length;o0?0:i-1;o>=0&&o0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=t(c.call(r,a,s),Z))>=0?o+a:-1;for(o=e>0?a:s-1;o>=0&&o0?0:a-1;for(i||(r=t[o?o[s]:s],s+=e);s>=0&&s=3;return t(e,qe(n,i,4),r,o)}}const Wt=Xt(1),Zt=Xt(-1);function $t(e,t,n){var r=[];return t=Ze(t,n),Ut(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function Kt(e,t,n){return $t(e,Lt(Ze(t)),n)}function Qt(e,t,n){t=Ze(t,n);for(var r=!xt(e)&&oe(e),i=(r||e).length,o=0;o=0}const tn=E((function(e,t,n){var r,i;return G(t)?i=t:(t=Be(t),r=t.slice(0,-1),t=t[t.length-1]),qt(e,(function(e){var o=i;if(!o){if(r&&r.length&&(e=He(e,r)),null==e)return;o=e[t]}return null==o?o:o.apply(e,n)}))}));function nn(e,t){return qt(e,Ue(t))}function rn(e,t){return $t(e,Ve(t))}function on(e,t,n){var r,i,o=-1/0,a=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,c=(e=xt(e)?e:Ne(e)).length;so&&(o=r);else t=Ze(t,n),Ut(e,(function(e,n,r){((i=t(e,n,r))>a||i===-1/0&&o===-1/0)&&(o=e,a=i)}));return o}function an(e,t,n){var r,i,o=1/0,a=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,c=(e=xt(e)?e:Ne(e)).length;sr||void 0===n)return 1;if(n1&&(r=qe(r,t[1])),t=ge(e)):(r=yn,t=Et(t,!1,!1),e=Object(e));for(var i=0,o=t.length;i1&&(n=t[1])):(t=qt(Et(t,!1,!1),String),r=function(e,n){return!en(t,n)}),wn(e,r,n)}));function xn(e,t,n){return c.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))}function En(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[0]:xn(e,e.length-t)}function Cn(e,t,n){return c.call(e,null==t||n?1:t)}function kn(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[e.length-1]:Cn(e,Math.max(0,e.length-t))}function _n(e){return $t(e,Boolean)}function Nn(e,t){return Et(e,t,!1)}const Sn=E((function(e,t){return t=Et(t,!0,!0),$t(e,(function(e){return!en(t,e)}))})),On=E((function(e,t){return Sn(e,t)}));function Tn(e,t,n,r){N(t)||(r=n,n=t,t=!1),null!=n&&(n=Ze(n,r));for(var i=[],o=[],a=0,s=re(e);a\n\n \n \n <%= letter %>\n \n\n\n'),n=e.charAt(0).toUpperCase(),r=jr[e]||"#B99435";return{color:r,shape:"ellipse",image:Pr(t({nodeType:e,color:r,letter:n}))}}(e.type);if("marking-definition"===e.type)if(e.definition&&e.definition.tlp){const n=e.definition.tlp.toLowerCase();t.color=Rr[n]||"#2E8BC0"}else t.color="#2E8BC0";return t}zn().use(Un()),zn().use(Xn()),zn().use(Zn()),zn().use(Kn()),zn().use(Jn()),zn().use(tr()),zn().use(rr()),or()(zn());const qr={euler:{pull:.006,mass:e=>10,animation:!1,dragCoeff:.3},"cose-bilkent":{animate:"end",animationEasing:"ease-out",animationDuration:300,nodeRepulsion:200,idealEdgeLength:90,gravityRange:50,gravity:8.2,padding:50},cola:{convergenceThreshold:100,animate:!1}},Xr=[{selector:"node",style:{shape:"data(shape)",width:30,height:30,"background-color":"data(color)","background-width":"90%","background-height":"90%","background-position-x":"50%","text-valign":"bottom","text-halign":"center",label:"","font-size":"10pt","text-max-width":"300px","text-wrap":"ellipsis"}},{selector:"node[image]",style:{"background-image":"data(image)"}},{selector:'node[type="relationship"]',style:{"background-image":"data(image)",width:15,height:15,"font-size":"8pt"}},{selector:'node[type="marking-definition"]',style:{width:15,height:15,"font-size":"8pt"}},{selector:'node[type="idref"]',style:{width:15,height:15,"font-size":"8pt"}},{selector:"edge",style:{width:1,opacity:.5,label:"data(label)","curve-style":"bezier","line-color":"#bbb","target-arrow-color":"#ccc","target-arrow-shape":"triangle","min-zoomed-font-size":"5pt"}},{selector:'edge[label="x_eclecticiq_alternative_hypothesis_refs"]',style:{"curve-style":"bezier","control-point-step-size":40,"line-color":"#ccc"}},{selector:".bleak",style:{opacity:.1}},{selector:"edge.autorotate",style:{"font-size":"9pt",color:"#222","edge-text-rotation":"autorotate"}},{selector:"node:selected",style:{"background-color":"black"}}];function Wr(e,t){const n=e.layout({name:t,...qr[t]});n.run(),setTimeout((function(){n.stop()}),300),e.layoutName=t}function Zr(e){const t=e.querySelector(".viewer-placeholder");t&&t.parentNode&&t.parentNode.removeChild(t)}function $r(e,t,n,r){const{highlightedObjects:i,hiddenObjects:o,showTlpAsTags:a,showMarkingNodes:s,showIdrefs:c}=n,u=e.cy;u.remove("node"),u.remove("edge"),u.mount(u.stixviewContainer),Zr(e.element);const l=function(e,t){const{highlightedObjects:n,hiddenObjects:r,showTlpAsTags:i,showMarkingNodes:o,showIdrefs:a}=t;let s=[];const c={},u={},l=e.objects.filter((e=>"relationship"!=e.type)),h=e.objects.filter((e=>"relationship"==e.type)),f=function(e){const t={"marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9":{id:"marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9",value:"white",css:"marking-tag-tlp-white"},"marking-definition--34098fce-860f-48ae-8e50-ebd3cc5e41da":{id:"marking-definition--34098fce-860f-48ae-8e50-ebd3cc5e41da",value:"green",css:"marking-tag-tlp-green"},"marking-definition--f88d31f6-486f-44da-b317-01333bde0b82":{id:"marking-definition--f88d31f6-486f-44da-b317-01333bde0b82",value:"amber",css:"marking-tag-tlp-amber"},"marking-definition--5e57c739-391a-4eb3-b6be-7d15ca92d5ed":{id:"marking-definition--5e57c739-391a-4eb3-b6be-7d15ca92d5ed",value:"red",css:"marking-tag-tlp-red"}};return e.objects.filter((e=>"marking-definition"==e.type&&e.definition&&e.definition.tlp)).forEach((e=>{e.id in t||(t[e.id]={value:e.name,css:"marking-tag-tlp-custom"})})),t}(e);function d(e){e.data.id in c||(s.push(e),c[e.data.id]=e)}l.forEach((e=>d(Yr(e))));let g=[];const p={};function v(e){e.data.id in p||(g.push(e),p[e.data.id]=e)}if(h.forEach((e=>v(zr(e)))),s.forEach((e=>function(e){const t=e.data.raw,n=[];if(!t)return n;function r(e,r){(r.endsWith("_ref")||r.endsWith("_refs"))&&("string"==typeof e?[e]:e).forEach((e=>{const i=zr({id:"rel-"+t.id+"-"+e,source_ref:t.id,target_ref:e,relationship_type:r});n.push(i)}))}return Fn.forEach(t,r),t.extensions&&t.extensions["archive-ext"]&&t.extensions["archive-ext"].contains_refs&&r(t.extensions["archive-ext"].contains_refs,"contains_refs"),t.granular_markings&&t.granular_markings.forEach((e=>r(e.marking_ref,"marking_ref"))),n}(e).forEach(v))),g.filter((e=>!(c[e.data.source]&&c[e.data.target]))).forEach((e=>{e.data.source in f&&!(e.data.source in c)&&d(Hr(f[e.data.source])),e.data.target in f&&!(e.data.target in c)&&d(Hr(f[e.data.target]))})),a){const e=[],t=[];g.filter((e=>!(c[e.data.source]&&c[e.data.target]))).forEach((n=>{const{newNodes:r,newEdges:i,edgesToDelete:o}=function(e,t,n){let r=e[n.data.source],i=e[n.data.target];const o=[],a=[];let s=[];if(!r){if(n.data.source.startsWith("relationship")){const e=t[n.data.source];if(e){a.push(e);const{node:t,edges:n}=Fr(e);r=t,s=s.concat(n)}}r=r||Br(n.data.source,n.data.raw),o.push(r)}if(!i){if(n.data.target.startsWith("relationship")){const e=t[n.data.target];if(e){a.push(e);const{node:t,edges:n}=Fr(e);i=t,s=s.concat(n)}}i=i||Br(n.data.target,n.data.raw),o.push(i)}return{newNodes:o,newEdges:s,edgesToDelete:a}}(c,p,n);t.push(...o),e.push(...i),r.forEach(d)})),g=Fn.difference(g,t),e.forEach(v)}else g=g.filter((e=>c[e.data.source]&&c[e.data.target]));return s=s.filter((e=>!(e.data.id in u||(n.length>0&&-1==n.indexOf(e.data.id)||r.length>0&&r.indexOf(e.data.id)>-1||e.data.id.startsWith("marking-definition")&&e.data.raw.definition&&"tlp"in e.data.raw.definition&&i||e.data.id.startsWith("marking-definition")&&!o)&&(u[e.data.id]=e,1)))),g=g.filter((e=>!(u[e.data.source]||u[e.data.target]))),function(e,t,n,r){n.showTlpAsTags&&e.forEach((e=>{const t=(n=r,(i=e.data.raw).object_marking_refs&&i.object_marking_refs.length?i.object_marking_refs.filter((e=>e in n)).map((e=>n[e])):[]);var n,i;if(0==t.length)return;let o=null;t.length>1?(console.warn("More than one TLP marking for "+e.data.id+", showing the most relaxed one"),o=function(e){if(0==e.length)return;const t=["white","green","amber","red"],n=e.map((e=>t.indexOf(e.value.toLowerCase()))).filter((e=>e>-1)).sort()[0],r=t[n];return e.filter((e=>e.value.toLowerCase()==r))[0]}(t)):o=t[0],o&&e.data.tags.push(o)})),n.showAttackAsTags&&e.forEach((e=>{const t=(e.data.raw,[]);if(0==t.length)return;const n=t.sort().join(", ");e.data.tags.push(n)}))}(s,0,{showTlpAsTags:i,showAttackAsTags:!0},f),s.concat(g)}(t,{highlightedObjects:i,hiddenObjects:o,showTlpAsTags:a,showMarkingNodes:s,showIdrefs:c});u.add(l),u.bundle=t,u.once("layoutstop",(()=>r&&r(e))),u.tags&&(u.tags.forEach((e=>{e.removeListeners();const t=e.element;t.parentNode&&t.parentNode.removeChild(t)})),u.tags=[]),a&&(u.tags=[],u.nodes().forEach((e=>{const t=e.data();if(!t.tags||!t.tags.length)return;const n=["right-start","right","right-end"];t.tags.slice(0,3).forEach(((t,r)=>{const i=function(e,t,n,r){const i=document.createElement("div");i.innerHTML=n.value.toUpperCase(),i.classList.add("marking-tag"),i.classList.add(n.css),r=r||"right-start";const o=t.popper({content:()=>(e.element.appendChild(i),i),popper:{placement:r}}),a=()=>{o.update();const t=Math.min(Math.max(8*e.zoom(),2),10);i.style.fontSize=t+"pt",i.style.lineHeight=Math.ceil(t)+"pt"};return t.on("position",a),e.on("pan zoom resize",a),{element:i,removeListeners:()=>{e.off("pan zoom resize",a)}}}(u,e,t,n[r]);u.tags.push(i)}))}))),e.toggleLabels(e.viewProps.showLabels),l||r&&r(e),function(e){const t=e.element.querySelector(".download-json");t&&(t.onclick=function(t){t.preventDefault(),function(e){const t=document.createElement("a");t.href="data:application/json,"+encodeURIComponent(JSON.stringify(e,null,4)),t.download=e.id+".json",t.target="_blank",t.click()}(e.bundle)});const n=e.element.querySelector(".download-png");n&&(n.onclick=function(t){t.preventDefault(),function(e,t){const n=document.createElement("a");n.href=t,n.download="graph-"+e.id+".png",n.target="_blank",n.click()}(e.bundle,e.png())})}(u),Wr(u,u.layoutName||"cola"),u.sidebar&&function(e){e.nodes().on("click",(t=>{t.preventDefault();const n=t.target.data();e.sidebar.innerHTML=e.sidebarRender?e.sidebarRender(n):function(e){const t=e.raw;return Fn.template("\n \n <%= obj.type %>\n ×\n \n

<%= obj.description %>

\n

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

\n

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

\n

Created: <%= obj.created %>

\n

ID: <%= obj.id %>

\n

\n JSON:
\n \n

\n ")({obj:t,nodeLabel:Vr(t),icon:Ur(t).image})}(n);const r=e.sidebar.querySelector(".sidebar-close-icon");r&&(r.onclick=()=>{e.sidebar.style.display="none"}),e.sidebar.style.display="block"}))}(u)}var Kr=n(3379),Qr=n.n(Kr),Jr=n(7795),ei=n.n(Jr),ti=n(569),ni=n.n(ti),ri=n(3565),ii=n.n(ri),oi=n(9216),ai=n.n(oi),si=n(4589),ci=n.n(si),ui=n(5150),li=n.n(ui),hi={};hi.styleTagTransform=ci(),hi.setAttributes=ii(),hi.insert=ni().bind(null,"head"),hi.domAPI=ei(),hi.insertStyleElement=ai(),Qr()(li(),hi),li()&&li().locals&&li().locals;const fi={},di={},gi={};function pi(e,t,n,r,i){if(e.stixViewId&&e.stixViewId in fi)return fi[e.stixViewId];const o=e.dataset.stixGistId,a=e.dataset.gistFile,s=e.dataset.stixUrl;let c={showIdrefs:lr(ur(e.dataset.showIdrefs,!1)),highlightedObjects:e.dataset.highlightedObjects?e.dataset.highlightedObjects.split(","):[],hiddenObjects:e.dataset.hiddenObjects?e.dataset.hiddenObjects.split(","):[],showTlpAsTags:lr(ur(e.dataset.showTlpAsTags,!0)),showMarkingNodes:lr(ur(e.dataset.showMarkingNodes,!0)),...r};const u={layout:e.dataset.graphLayout,caption:e.dataset.caption,showFooter:lr(ur(e.dataset.showFooter,!0)),showSidebar:lr(ur(e.dataset.showSidebar,!0)),showLabels:lr(ur(e.dataset.showLabels,!0)),allowDragDrop:lr(ur(e.dataset.stixAllowDragdrop,!1)),enableMouseZoom:lr(ur(e.dataset.enableMouseZoom,!0)),enablePanning:lr(ur(e.dataset.enablePanning,!0)),graphWidth:e.dataset.graphWidth||e.clientWidth||800,graphHeight:e.dataset.graphHeight||600,minZoom:e.dataset.minZoom,maxZoom:e.dataset.maxZoom,...i},l=e=>{$r(h,e,c,(e=>{e.toggleLoading(!1),n&&n(e)}))};let h=function(e,t,n){const{layout:r,caption:i,showFooter:o,showSidebar:a,showLabels:s,allowDragDrop:c,enableMouseZoom:u,enablePanning:l,graphWidth:h,graphHeight:f,minZoom:d,maxZoom:g,graphStyle:p,onClickNode:v,sidebarRender:b}=t,y=h||e.clientWidth||800;e=function(e,t){const{caption:n,width:r,height:i,showFooter:o}=t;e.classList.add("stix-viewer-block");const a=document.createElement("div");a.classList.add("stix-viewer"),e.appendChild(a);const s=document.createElement("div");if(s.classList.add("stix-graph"),a.appendChild(s),e.style.width=isNaN(r)&&r||r+"px",s.style.width="100%",s.style.height=isNaN(i)&&i||i+"px",n){const t=document.createElement("div");t.setAttribute("class","viewer-header"),t.innerText=n,e.insertBefore(t,e.firstChild)}if(o){const t=document.createElement("div");t.setAttribute("class","viewer-footer"),t.innerHTML='\n made with stixview\n \n STIX2 \n PNG\n \n ',e.appendChild(t)}return e}(e,{width:y,height:f||600,caption:i,showFooter:o});const w=e.querySelector(".stix-viewer");var m,x;c&&(w.querySelector(".stix-graph").innerHTML="
Drag and drop STIX2 json file here
",x=e=>n(e),(m=e).addEventListener("dragover",(e=>{e.stopPropagation(),e.preventDefault(),m.classList.add("dragover-active"),e.dataTransfer.dropEffect="copy"})),m.addEventListener("dragleave",(e=>{e.stopPropagation(),e.preventDefault(),m.classList.remove("dragover-active")})),m.addEventListener("drop",(e=>{e.stopPropagation(),e.preventDefault(),m.classList.remove("dragover-active");const t=e.dataTransfer.files;t.length>1&&console.error("More than 1 file dropped, picking the first one",t),0!=t.lengh&&hr(t[0],x)})));const E=zn()({style:p||Xr,userZoomingEnabled:u,userPanningEnabled:l});if(E.stixviewContainer=w.querySelector(".stix-graph"),E.minZoom(d||.3),E.maxZoom(g||2.5),a){const e=document.createElement("div");e.setAttribute("class","sidebar"),w.appendChild(e),E.sidebar=e}v&&E.on("click","node",(e=>{e.preventDefault();const t=e.target.data();v(t)})),E.layoutName=r,E.stixId=e.dataset.stixViewId,E.element=e,E.sidebarRender=b;const C={cy:E,element:e,viewProps:{showLabels:s},runLayout:e=>Wr(E,e),toggleLabels:e=>{E.style().selector("node").style("label",e?"data(label)":"").update()},fit:()=>E.fit(),toggleLoading:t=>{t?(e.classList.add("loading"),Zr(e)):e.classList.remove("loading")},setSidebarRender:()=>{E.sidebarRender=b}};return E.resize(),C}(e,u,l);return h={...h,dataProps:c,viewProps:u,loadData:l,loadDataFromFile:function(e){e&&"application/json"==e.type&&(h.toggleLoading(!0),hr(e,l))},loadDataFromParamUrl:function(e){h.toggleLoading(!0),function(e){return cr(new URL(window.location.href).searchParams.get(e))}(e).then(l,(t=>{h.toggleLoading(!1),console.error("Can not load a url from a parameter "+e,t)}))},loadDataFromGist:function(e,t){h.toggleLoading(!0),function(e,t){const n="https://api.github.com/gists/"+e,r=ar[n]||new Promise((function(e,r){sr(n,(function(n){t=t||Object.keys(n.files)[0];const r=n.files[t];e(JSON.parse(r.content))}),r)}));return ar[n]=r,r}(e,t).then(l,(t=>{h.toggleLoading(!1),console.error("Can not load gist "+e,t)}))},loadDataFromUrl:function(e){h.toggleLoading(!0),cr(e).then(l,(t=>{h.toggleLoading(!1),console.error("Can not load data from url "+e,t)}))},reloadData:function(e,t,r){setTimeout((()=>{t=t||h.cy.bundle,c={...c,...e},$r(h,t,c,n),r&&r()}),20)},setSidebarRender:function(e){h.setSidebarRender(e)}},t&&t(h),(o||s)&&setTimeout((()=>{o?h.loadDataFromGist(o,a):s&&h.loadDataFromUrl(s)}),20),e.dataset.stixViewId=Math.random().toString(16).slice(2),fi[e.dataset.stixViewId]=h,e.stixViewId=e.dataset.stixViewId,h}function vi(e,t){const n=[];return Fn.keys(e).forEach((function(r){t.matches(r)&&n.push(e[r])})),n}"undefined"!=typeof window&&(window.addEventListener("load",(()=>{document.querySelectorAll("[data-stix-gist-id],[data-stix-url],[data-stix-allow-dragdrop]").forEach((e=>{pi(e,(t=>vi(di,e).forEach((e=>e(t)))),(t=>vi(gi,e).forEach((e=>e(t)))))}))})),window.stixview={registry:fi,onInit:function(e,t){di[e]=t},onLoad:function(e,t){gi[e]=t},init:pi})})()})(); \ No newline at end of file diff --git a/src/index.js b/src/index.js index 2f82d8a..42acf14 100644 --- a/src/index.js +++ b/src/index.js @@ -10,8 +10,8 @@ const initCallbacks = {}; const loadCallbacks = {}; function init(element, initCallback, loadCallback, extraDataProps, extraViewProps) { - if (element in registry) { - return registry[element]; + if (element.stixViewId && element.stixViewId in registry) { + return registry[element.stixViewId]; } const gistId = element.dataset.stixGistId; const gistFile = element.dataset.gistFile; @@ -137,7 +137,9 @@ function init(element, initCallback, loadCallback, extraDataProps, extraViewProp } element.dataset.stixViewId = Math.random().toString(16).slice(2); - registry[element] = graph; + registry[element.dataset.stixViewId] = graph; + + element.stixViewId = element.dataset.stixViewId; return graph; }