window.dash_cytoscape=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=131)}([function(t,e,n){var r;try{r={cloneDeep:n(271),constant:n(60),defaults:n(272),each:n(96),filter:n(99),find:n(273),flatten:n(126),forEach:n(97),forIn:n(278),has:n(110),isUndefined:n(111),last:n(279),map:n(112),mapValues:n(280),max:n(281),merge:n(283),min:n(289),minBy:n(290),now:n(291),pick:n(292),range:n(297),reduce:n(114),sortBy:n(300),uniqueId:n(305),values:n(119),zipObject:n(306)}}catch(t){}r||(r=window._),t.exports=r},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){"use strict";var r=n(0),i=n(5).Graph;function o(t,e,n,i){var o;do{o=r.uniqueId(i)}while(t.hasNode(o));return n.dummy=e,t.setNode(o,n),o}function a(t){return r.max(r.map(t.nodes(),(function(e){var n=t.node(e).rank;if(!r.isUndefined(n))return n})))}t.exports={addDummyNode:o,simplify:function(t){var e=(new i).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e},successorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,o=t.y,a=e.x-i,s=e.y-o,u=t.width/2,c=t.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*u>Math.abs(a)*c?(s<0&&(c=-c),n=c*a/s,r=c):(a<0&&(u=-u),n=u,r=u*s/a);return{x:i+n,y:o+r}},buildLayerMatrix:function(t){var e=r.map(r.range(a(t)+1),(function(){return[]}));return r.forEach(t.nodes(),(function(n){var i=t.node(n),o=i.rank;r.isUndefined(o)||(e[o][i.order]=n)})),e},normalizeRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank})));r.forEach(t.nodes(),(function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)}))},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];r.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,o=t.graph().nodeRankFactor;r.forEach(n,(function(e,n){r.isUndefined(e)&&n%o!=0?--i:i&&r.forEach(e,(function(e){t.node(e).rank+=i}))}))},addBorderNode:function(t,e,n,r){var i={width:0,height:0};arguments.length>=4&&(i.rank=n,i.order=r);return o(t,"border",i,e)},maxRank:a,partition:function(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}},notime:function(t,e){return e()}}},function(t,e,n){var r;try{r={clone:n(159),constant:n(60),each:n(96),filter:n(99),has:n(110),isArray:n(1),isEmpty:n(235),isFunction:n(23),isUndefined:n(111),keys:n(10),map:n(112),reduce:n(114),size:n(238),transform:n(244),union:n(245),values:n(119)}}catch(t){}r||(r=window._),t.exports=r},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r;try{r=n(157)}catch(t){}r||(r=window.graphlib),t.exports=r},function(t,e,n){var r=n(79),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){var r=n(23),i=n(54);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e,n){var r=n(215),i=n(225),o=n(13),a=n(1),s=n(232);t.exports=function(t){return"function"==typeof t?t:null==t?o:"object"==typeof t?a(t)?i(t[0],t[1]):r(t):s(t)}},function(t,e,n){var r=n(82),i=n(56),o=n(8);t.exports=function(t){return o(t)?r(t):i(t)}},function(t,e,n){var r=n(170),i=n(175);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(15),i=n(171),o=n(172),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?i(t):o(t)}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(6).Symbol;t.exports=r},function(t,e,n){(function(t){var r=n(6),i=n(191),o=e&&!e.nodeType&&e,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;t.exports=u}).call(this,n(28)(t))},function(t,e,n){var r=n(82),i=n(195),o=n(8);t.exports=function(t){return o(t)?r(t,!0):i(t)}},function(t,e,n){var r=n(200),i=n(51),o=n(201),a=n(91),s=n(202),u=n(12),c=n(80),l=c(r),f=c(i),h=c(o),d=c(a),p=c(s),g=u;(r&&"[object DataView]"!=g(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=g(new i)||o&&"[object Promise]"!=g(o.resolve())||a&&"[object Set]"!=g(new a)||s&&"[object WeakMap]"!=g(new s))&&(g=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?c(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case h:return"[object Promise]";case d:return"[object Set]";case p:return"[object WeakMap]"}return e}),t.exports=g},function(t,e,n){var r=n(12),i=n(7);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(72),o=n(47),a=n(48),s=n(22),u=n(29),c=n(75),l=n(76);function f(t){return void 0!==t.leaves||void 0!==t.groups}!function(t){t[t.start=0]="start",t[t.tick=1]="tick",t[t.end=2]="end"}(r=e.EventType||(e.EventType={}));var h=function(){function t(){var e=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:t.getSourceIndex,getTargetIndex:t.getTargetIndex,setLength:t.setLinkLength,getType:function(t){return"function"==typeof e._linkType?e._linkType(t):0}}}return t.prototype.on=function(t,e){return this.event||(this.event={}),"string"==typeof t?this.event[r[t]]=e:this.event[t]=e,this},t.prototype.trigger=function(t){this.event&&void 0!==this.event[t.type]&&this.event[t.type](t)},t.prototype.kick=function(){for(;!this.tick(););},t.prototype.tick=function(){if(this._alpha0){var e=0;this._links.forEach((function(t){e=Math.max(e,t.source,t.target)})),this._nodes=new Array(++e);for(var n=0;n0?t:0:t>0&&(this._running||(this._running=!0,this.trigger({type:r.start,alpha:this._alpha=t}),this.kick())),this):this._alpha},t.prototype.getLinkLength=function(t){return"function"==typeof this._linkDistance?+this._linkDistance(t):this._linkDistance},t.setLinkLength=function(t,e){t.length=e},t.prototype.getLinkType=function(t){return"function"==typeof this._linkType?this._linkType(t):0},t.prototype.symmetricDiffLinkLengths=function(t,e){var n=this;return void 0===e&&(e=1),this.linkDistance((function(e){return t*e.length})),this._linkLengthCalculator=function(){return o.symmetricDiffLinkLengths(n._links,n.linkAccessor,e)},this},t.prototype.jaccardLinkLengths=function(t,e){var n=this;return void 0===e&&(e=1),this.linkDistance((function(e){return t*e.length})),this._linkLengthCalculator=function(){return o.jaccardLinkLengths(n._links,n.linkAccessor,e)},this},t.prototype.start=function(e,n,r,i,c,l){var f=this;void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=0),void 0===c&&(c=!0),void 0===l&&(l=!0);var h,d=this.nodes().length,p=d+2*this._groups.length,g=(this._links.length,this._canvasSize[0]),v=this._canvasSize[1],b=new Array(p),y=new Array(p),w=null,m=this._avoidOverlaps;this._nodes.forEach((function(t,e){t.index=e,void 0===t.x&&(t.x=g/2,t.y=v/2),b[e]=t.x,y[e]=t.y})),this._linkLengthCalculator&&this._linkLengthCalculator(),this._distanceMatrix?h=this._distanceMatrix:(h=new u.Calculator(p,this._links,t.getSourceIndex,t.getTargetIndex,(function(t){return f.getLinkLength(t)})).DistanceMatrix(),w=a.Descent.createSquareMatrix(p,(function(){return 2})),this._links.forEach((function(t){"number"==typeof t.source&&(t.source=f._nodes[t.source]),"number"==typeof t.target&&(t.target=f._nodes[t.target])})),this._links.forEach((function(e){var n=t.getSourceIndex(e),r=t.getTargetIndex(e);w[n][r]=w[r][n]=e.weight||1})));var x=a.Descent.createSquareMatrix(p,(function(t,e){return h[t][e]}));if(this._rootGroup&&void 0!==this._rootGroup.groups){var _=d;this._groups.forEach((function(t){!function(t,e,n,r){w[t][e]=w[e][t]=n,x[t][e]=x[e][t]=r}(_,_+1,f._groupCompactness,.1),b[_]=0,y[_++]=0,b[_]=0,y[_++]=0}))}else this._rootGroup={leaves:this._nodes,groups:[]};var E=this._constraints||[];this._directedLinkConstraints&&(this.linkAccessor.getMinSeparation=this._directedLinkConstraints.getMinSeparation,E=E.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();for(_=0;_0&&(this._descent.project=new s.Projection(this._nodes,this._groups,this._rootGroup,E).projectFunctions()),this._descent.run(n),this.separateOverlappingComponents(g,v,l),this.avoidOverlaps(m),m&&(this._nodes.forEach((function(t,e){t.x=b[e],t.y=y[e]})),this._descent.project=new s.Projection(this._nodes,this._groups,this._rootGroup,E,!0).projectFunctions(),this._nodes.forEach((function(t,e){b[e]=t.x,y[e]=t.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!=p;var C=a.Descent.createSquareMatrix(p,(function(t,e){return t>=d||e>=d?w[t][e]:0}));this._descent.G=C,this._descent.run(i)}return this.updateNodePositions(),this.separateOverlappingComponents(g,v,l),c?this.resume():this},t.prototype.initialLayout=function(e,n,r){if(this._groups.length>0&&e>0){var i=this._nodes.length,o=this._links.map((function(t){return{source:t.source.index,target:t.target.index}})),a=this._nodes.map((function(t){return{index:t.index}}));this._groups.forEach((function(t,e){a.push({index:t.index=i+e})})),this._groups.forEach((function(t,e){void 0!==t.leaves&&t.leaves.forEach((function(e){return o.push({source:t.index,target:e.index})})),void 0!==t.groups&&t.groups.forEach((function(e){return o.push({source:t.index,target:e.index})}))})),(new t).size(this.size()).nodes(a).links(o).avoidOverlaps(!1).linkDistance(this.linkDistance()).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(e,0,0,0,!1),this._nodes.forEach((function(t){n[t.index]=a[t.index].x,r[t.index]=a[t.index].y}))}else this._descent.run(e)},t.prototype.separateOverlappingComponents=function(t,e,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(t,e){t.x=i[e],t.y=o[e]}));var a=l.separateGraphs(this._nodes,this._links);l.applyPacking(a,t,e,this._defaultNodeSize,1,n),this._nodes.forEach((function(t,e){r._descent.x[0][e]=t.x,r._descent.x[1][e]=t.y,t.bounds&&(t.bounds.setXCentre(t.x),t.bounds.setYCentre(t.y))}))}},t.prototype.resume=function(){return this.alpha(.1)},t.prototype.stop=function(){return this.alpha(0)},t.prototype.prepareEdgeRouting=function(t){void 0===t&&(t=0),this._visibilityGraph=new c.TangentVisibilityGraph(this._nodes.map((function(e){return e.bounds.inflate(-t).vertices()})))},t.prototype.routeEdge=function(t,e,n){void 0===e&&(e=5);var r=[],i=new c.TangentVisibilityGraph(this._visibilityGraph.P,{V:this._visibilityGraph.V,E:this._visibilityGraph.E}),o={x:t.source.x,y:t.source.y},a={x:t.target.x,y:t.target.y},l=i.addPoint(o,t.source.index),f=i.addPoint(a,t.target.index);i.addEdgeIfVisible(o,a,t.source.index,t.target.index),void 0!==n&&n(i);var h=new u.Calculator(i.V.length,i.E,(function(t){return t.source.id}),(function(t){return t.target.id}),(function(t){return t.length()})).PathFromNodeToNode(l.id,f.id);if(1===h.length||h.length===i.V.length){var d=s.makeEdgeBetween(t.source.innerBounds,t.target.innerBounds,e);r=[d.sourceIntersection,d.arrowStart]}else{for(var p=h.length-2,g=i.V[h[p]].p,v=i.V[h[0]].p,b=(r=[t.source.innerBounds.rayIntersection(g.x,g.y)],p);b>=0;--b)r.push(i.V[h[b]].p);r.push(s.makeEdgeTo(v,t.target.innerBounds,e))}return r},t.getSourceIndex=function(t){return"number"==typeof t.source?t.source:t.source.index},t.getTargetIndex=function(t){return"number"==typeof t.target?t.target:t.target.index},t.linkId=function(e){return t.getSourceIndex(e)+"-"+t.getTargetIndex(e)},t.dragStart=function(e){f(e)?t.storeOffset(e,t.dragOrigin(e)):(t.stopNode(e),e.fixed|=2)},t.stopNode=function(t){t.px=t.x,t.py=t.y},t.storeOffset=function(e,n){void 0!==e.leaves&&e.leaves.forEach((function(e){e.fixed|=2,t.stopNode(e),e._dragGroupOffsetX=e.x-n.x,e._dragGroupOffsetY=e.y-n.y})),void 0!==e.groups&&e.groups.forEach((function(e){return t.storeOffset(e,n)}))},t.dragOrigin=function(t){return f(t)?{x:t.bounds.cx(),y:t.bounds.cy()}:t},t.drag=function(e,n){f(e)?(void 0!==e.leaves&&e.leaves.forEach((function(t){e.bounds.setXCentre(n.x),e.bounds.setYCentre(n.y),t.px=t._dragGroupOffsetX+n.x,t.py=t._dragGroupOffsetY+n.y})),void 0!==e.groups&&e.groups.forEach((function(e){return t.drag(e,n)}))):(e.px=n.x,e.py=n.y)},t.dragEnd=function(e){f(e)?(void 0!==e.leaves&&e.leaves.forEach((function(e){t.dragEnd(e),delete e._dragGroupOffsetX,delete e._dragGroupOffsetY})),void 0!==e.groups&&e.groups.forEach(t.dragEnd)):e.fixed&=-7},t.mouseOver=function(t){t.fixed|=4,t.px=t.x,t.py=t.y},t.mouseOut=function(t){t.fixed&=-5},t}();e.Layout=h},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(49),a=n(73);function s(t){return t.bounds=void 0!==t.leaves?t.leaves.reduce((function(t,e){return e.bounds.union(t)}),u.empty()):u.empty(),void 0!==t.groups&&(t.bounds=t.groups.reduce((function(t,e){return s(e).union(t)}),t.bounds)),t.bounds=t.bounds.inflate(t.padding),t.bounds}e.computeGroupBounds=s;var u=function(){function t(t,e,n,r){this.x=t,this.X=e,this.y=n,this.Y=r}return t.empty=function(){return new t(Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY)},t.prototype.cx=function(){return(this.x+this.X)/2},t.prototype.cy=function(){return(this.y+this.Y)/2},t.prototype.overlapX=function(t){var e=this.cx(),n=t.cx();return e<=n&&t.x0?n[0]:null},t.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}]},t.lineIntersection=function(t,e,n,r,i,o,a,s){var u=n-t,c=a-i,l=r-e,f=s-o,h=f*u-c*l;if(0==h)return null;var d=t-i,p=e-o,g=(c*p-f*d)/h,v=(u*p-l*d)/h;return g>=0&&g<=1&&v>=0&&v<=1?{x:t+g*u,y:e+g*l}:null},t.prototype.inflate=function(e){return new t(this.x-e,this.X+e,this.y-e,this.Y+e)},t}();e.Rectangle=u,e.makeEdgeBetween=function(t,e,n){var r=t.rayIntersection(e.cx(),e.cy())||{x:t.cx(),y:t.cy()},i=e.rayIntersection(t.cx(),t.cy())||{x:e.cx(),y:e.cy()},o=i.x-r.x,a=i.y-r.y,s=Math.sqrt(o*o+a*a),u=s-n;return{sourceIntersection:r,targetIntersection:i,arrowStart:{x:r.x+u*o/s,y:r.y+u*a/s}}},e.makeEdgeTo=function(t,e,n){var r=e.rayIntersection(t.x,t.y);r||(r={x:e.cx(),y:e.cy()});var i=r.x-t.x,o=r.y-t.y,a=Math.sqrt(i*i+o*o);return{x:r.x-n*i/a,y:r.y-n*o/a}};var c=function(t,e,n){this.v=t,this.r=e,this.pos=n,this.prev=h(),this.next=h()},l=function(t,e,n){this.isOpen=t,this.v=e,this.pos=n};function f(t,e){return t.pos>e.pos?1:t.pos0&&(t[n].insert(i),i[r].insert(t))};n("next","prev"),n("prev","next")}};function g(t,e,n,r){void 0===r&&(r=!1);var i=t.padding,o=void 0!==t.groups?t.groups.length:0,a=void 0!==t.leaves?t.leaves.length:0,s=o?t.groups.reduce((function(t,r){return t.concat(g(r,e,n,!0))}),[]):[],u=(r?2:0)+a+o,c=new Array(u),l=new Array(u),f=0,h=function(t,e){l[f]=t,c[f++]=e};if(r){var d=t.bounds,p=e.getCentre(d),b=e.getSize(d)/2,y=e.getOpen(d),w=e.getClose(d),m=p-b+i/2,x=p+b-i/2;t.minVar.desiredPosition=m,h(e.makeRect(y,w,m,i),t.minVar),t.maxVar.desiredPosition=x,h(e.makeRect(y,w,x,i),t.maxVar)}a&&t.leaves.forEach((function(t){return h(t.bounds,t.variable)})),o&&t.groups.forEach((function(t){var n=t.bounds;h(e.makeRect(e.getOpen(n),e.getClose(n),e.getCentre(n),e.getSize(n)),t.minVar)}));var _=v(l,c,e,n);return o&&(c.forEach((function(t){t.cOut=[],t.cIn=[]})),_.forEach((function(t){t.left.cOut.push(t),t.right.cIn.push(t)})),t.groups.forEach((function(t){var n=(t.padding-e.getSize(t.bounds))/2;t.minVar.cIn.forEach((function(t){return t.gap+=n})),t.minVar.cOut.forEach((function(e){e.left=t.maxVar,e.gap+=n}))}))),s.concat(_)}function v(t,e,n,r){var i,a=t.length,s=2*a;console.assert(e.length>=a);var u=new Array(s);for(i=0;it[n]&&(t[n]=e)}o=t}))}},t.prototype.createAlignment=function(t){var e=this,n=this.nodes[t.offsets[0].node].variable;this.makeFeasible(t);var r="x"===t.axis?this.xConstraints:this.yConstraints;t.offsets.slice(1).forEach((function(t){var i=e.nodes[t.node].variable;r.push(new o.Constraint(n,i,t.offset,!0))}))},t.prototype.createConstraints=function(t){var e=this,n=function(t){return void 0===t.type||"separation"===t.type};this.xConstraints=t.filter((function(t){return"x"===t.axis&&n(t)})).map((function(t){return e.createSeparation(t)})),this.yConstraints=t.filter((function(t){return"y"===t.axis&&n(t)})).map((function(t){return e.createSeparation(t)})),t.filter((function(t){return"alignment"===t.type})).forEach((function(t){return e.createAlignment(t)}))},t.prototype.setupVariablesAndBounds=function(t,e,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,c=t[o],l=e[o];i.bounds=new u(c-a,c+a,l-s,l+s)}))},t.prototype.xProject=function(t,e,n){(this.rootGroup||this.avoidOverlaps||this.xConstraints)&&this.project(t,e,t,n,(function(t){return t.px}),this.xConstraints,w,(function(t){return t.bounds.setXCentre(n[t.variable.index]=t.variable.position())}),(function(t){var e=n[t.minVar.index]=t.minVar.position(),r=n[t.maxVar.index]=t.maxVar.position(),i=t.padding/2;t.bounds.x=e-i,t.bounds.X=r+i}))},t.prototype.yProject=function(t,e,n){(this.rootGroup||this.yConstraints)&&this.project(t,e,e,n,(function(t){return t.py}),this.yConstraints,m,(function(t){return t.bounds.setYCentre(n[t.variable.index]=t.variable.position())}),(function(t){var e=n[t.minVar.index]=t.minVar.position(),r=n[t.maxVar.index]=t.maxVar.position(),i=t.padding/2;t.bounds.y=e-i,t.bounds.Y=r+i}))},t.prototype.projectFunctions=function(){var t=this;return[function(e,n,r){return t.xProject(e,n,r)},function(e,n,r){return t.yProject(e,n,r)}]},t.prototype.project=function(t,e,n,r,i,o,a,u,c){this.setupVariablesAndBounds(t,e,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(u),this.rootGroup&&this.avoidOverlaps&&(this.groups.forEach(c),s(this.rootGroup))},t.prototype.solve=function(t,e,n,r){var i=new o.Solver(t,e);i.setStartingPositions(n),i.setDesiredPositions(r),i.solve()},t}();e.Projection=_},function(t,e,n){var r=n(12),i=n(4);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r=n(35),i=n(36);t.exports=function(t,e,n,o){var a=!n;n||(n={});for(var s=-1,u=e.length;++sf&&(c.d=f,c.prev=s,n.reduceKey(c.q,c,(function(t,e){return t.q=e})))}}return o},t}();e.Calculator=s},function(t,e,n){var r=n(31),i=n(165),o=n(166),a=n(167),s=n(168),u=n(169);function c(t){var e=this.__data__=new r(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,t.exports=c},function(t,e,n){var r=n(160),i=n(161),o=n(162),a=n(163),s=n(164);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&ts;){var u=e[s][a];u>0&&u1e-9)break;var d=this.offsetDir();for(r=0;r1&&p>g||!isFinite(g))for(r=0;r1&&(v=1);var b=g*g,y=2*v*(p-g)/(b*p),w=p*p*p,m=2*-v/(b*w);for(isFinite(y)||console.log(y),r=0;r0?S-(A+1)*_:S-(A-1)*_)&&h<=x&&(this.scaleSnapByMaxH?(this.g[r][u]+=s*E*h,this.H[r][u][u]+=s*E):(this.g[r][u]+=E*h,this.H[r][u][u]+=E))}this.locks.isEmpty()||this.locks.apply((function(n,i){for(r=0;r0;)for(var i=e;i-- >0;)n(r,i)},t.prototype.matrixApply=function(e){t.mApply(this.k,this.n,e)},t.prototype.computeNextPosition=function(t,e){var n=this;this.computeDerivatives(t);var r=this.computeStepSize(this.g);if(this.stepAndProject(t,e,this.g,r),this.project){this.matrixApply((function(r,i){return n.e[r][i]=t[r][i]-e[r][i]}));var i=this.computeStepSize(this.e);i=Math.max(.2,Math.min(i,1)),this.stepAndProject(t,e,this.e,i)}},t.prototype.run=function(t){for(var e=Number.MAX_VALUE,n=!1;!n&&t-- >0;){var r=this.rungeKutta();n=Math.abs(e/r-1)>16)/this.range},t.prototype.getNextBetween=function(t,e){return t+this.getNext()*(e-t)},t}();e.PseudoRandom=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t){this.scale=t,this.AB=0,this.AD=0,this.A2=0}return t.prototype.addVariable=function(t){var e=this.scale/t.scale,n=t.offset/t.scale,r=t.weight;this.AB+=r*e*n,this.AD+=r*e*t.desiredPosition,this.A2+=r*e*e},t.prototype.getPosn=function(){return(this.AD-this.AB)/this.A2},t}();e.PositionStats=r;var i=function(){function t(t,e,n,r){void 0===r&&(r=!1),this.left=t,this.right=e,this.gap=n,this.equality=r,this.active=!1,this.unsatisfiable=!1,this.left=t,this.right=e,this.gap=n,this.equality=r}return t.prototype.slack=function(){return this.unsatisfiable?Number.MAX_VALUE:this.right.scale*this.right.position()-this.gap-this.left.scale*this.left.position()},t}();e.Constraint=i;var o=function(){function t(t,e,n){void 0===e&&(e=1),void 0===n&&(n=1),this.desiredPosition=t,this.weight=e,this.scale=n,this.offset=0}return t.prototype.dfdv=function(){return 2*this.weight*(this.position()-this.desiredPosition)},t.prototype.position=function(){return(this.block.ps.scale*this.block.posn+this.offset)/this.scale},t.prototype.visitNeighbours=function(t,e){var n=function(n,r){return n.active&&t!==r&&e(n,r)};this.cOut.forEach((function(t){return n(t,t.right)})),this.cIn.forEach((function(t){return n(t,t.left)}))},t}();e.Variable=o;var a=function(){function t(t){this.vars=[],t.offset=0,this.ps=new r(t.scale),this.addVariable(t)}return t.prototype.addVariable=function(t){t.block=this,this.vars.push(t),this.ps.addVariable(t),this.posn=this.ps.getPosn()},t.prototype.updateWeightedPosition=function(){this.ps.AB=this.ps.AD=this.ps.A2=0;for(var t=0,e=this.vars.length;t=0?this.inactive.push(e):this.bs.merge(e)}}},t.prototype.solve=function(){this.satisfy();for(var t=Number.MAX_VALUE,e=this.bs.cost();Math.abs(t-e)>1e-4;)this.satisfy(),t=e,e=this.bs.cost();return e},t.LAGRANGIAN_TOLERANCE=-1e-4,t.ZERO_UPPERBOUND=-1e-10,t}();e.Solver=u,e.removeOverlapInOneDimension=function(t,e,n){for(var r=t.map((function(t){return new o(t.desiredCenter)})),a=[],s=t.length,c=0;ca){var s=o;o=a,a=s}return o+""+a+""+(r.isUndefined(i)?"\0":i)}function u(t,e,n,r){var i=""+e,o=""+n;if(!t&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return r&&(s.name=r),s}function c(t,e){return s(t,e.v,e.w,e.name)}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(t){return this._label=t,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultNodeLabelFn=t,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return r.keys(this._nodes)},i.prototype.sources=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._in[e])}))},i.prototype.sinks=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._out[e])}))},i.prototype.setNodes=function(t,e){var n=arguments,i=this;return r.each(t,(function(t){n.length>1?i.setNode(t,e):i.setNode(t)})),this},i.prototype.setNode=function(t,e){return r.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]="\0",this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},i.prototype.node=function(t){return this._nodes[t]},i.prototype.hasNode=function(t){return r.has(this._nodes,t)},i.prototype.removeNode=function(t){var e=this;if(r.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],r.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),r.each(r.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],r.each(r.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},i.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(e))e="\0";else{for(var n=e+="";!r.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},i.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},i.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if("\0"!==e)return e}},i.prototype.children=function(t){if(r.isUndefined(t)&&(t="\0"),this._isCompound){var e=this._children[t];if(e)return r.keys(e)}else{if("\0"===t)return this.nodes();if(this.hasNode(t))return[]}},i.prototype.predecessors=function(t){var e=this._preds[t];if(e)return r.keys(e)},i.prototype.successors=function(t){var e=this._sucs[t];if(e)return r.keys(e)},i.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return r.union(e,this.successors(t))},i.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},i.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),r.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var i={};return this._isCompound&&r.each(e.nodes(),(function(t){e.setParent(t,function t(r){var o=n.parent(r);return void 0===o||e.hasNode(o)?(i[r]=o,o):o in i?i[o]:t(o)}(t))})),e},i.prototype.setDefaultEdgeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultEdgeLabelFn=t,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return r.values(this._edgeObjs)},i.prototype.setPath=function(t,e){var n=this,i=arguments;return r.reduce(t,(function(t,r){return i.length>1?n.setEdge(t,r,e):n.setEdge(t,r),r})),this},i.prototype.setEdge=function(){var t,e,n,i,a=!1,c=arguments[0];"object"==typeof c&&null!==c&&"v"in c?(t=c.v,e=c.w,n=c.name,2===arguments.length&&(i=arguments[1],a=!0)):(t=c,e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),t=""+t,e=""+e,r.isUndefined(n)||(n=""+n);var l=s(this._isDirected,t,e,n);if(r.has(this._edgeLabels,l))return a&&(this._edgeLabels[l]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[l]=a?i:this._defaultEdgeLabelFn(t,e,n);var f=u(this._isDirected,t,e,n);return t=f.v,e=f.w,Object.freeze(f),this._edgeObjs[l]=f,o(this._preds[e],t),o(this._sucs[t],e),this._in[e][l]=f,this._out[t][l]=f,this._edgeCount++,this},i.prototype.edge=function(t,e,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):s(this._isDirected,t,e,n);return this._edgeLabels[r]},i.prototype.hasEdge=function(t,e,n){var i=1===arguments.length?c(this._isDirected,arguments[0]):s(this._isDirected,t,e,n);return r.has(this._edgeLabels,i)},i.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):s(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],a(this._preds[e],t),a(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},i.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.v===e})):i}},i.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.w===e})):i}},i.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},function(t,e,n){var r=n(11)(n(6),"Map");t.exports=r},function(t,e,n){var r=n(176),i=n(183),o=n(185),a=n(186),s=n(187);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t<=9007199254740991}},function(t,e,n){(function(t){var r=n(79),i=e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i&&r.process,s=function(){try{var t=o&&o.require&&o.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=s}).call(this,n(28)(t))},function(t,e,n){var r=n(39),i=n(193),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e,n){var r=n(86),i=n(87),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(t){return null==t?[]:(t=Object(t),r(a(t),(function(e){return o.call(t,e)})))}:i;t.exports=s},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n0&&o(l)?n>1?t(l,n-1,o,a,s):r(s,l):a||(s[s.length]=l)}return s}},function(t,e,n){var r=n(19);t.exports=function(t,e,n){for(var i=-1,o=t.length;++ie?1:0},G=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments,n=1;n255)return;e.push(Math.floor(o))}var a=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(a&&!s)return;var u=n[4];if(void 0!==u){if((u=parseFloat(u))<0||u>1)return;e.push(u)}}return e}(t)||function(t){var e,n,r,i,o,a,s,u;function c(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}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(t);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=u=Math.round(255*i);else{var f=i<.5?i*(1+r):i+r-i*r,h=2*i-f;a=Math.round(255*c(h,f,n+1/3)),s=Math.round(255*c(h,f,n)),u=Math.round(255*c(h,f,n-1/3))}e=[a,s,u,o]}return e}(t)},F={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},z=function(t){for(var e=t.map,n=t.keys,r=n.length,i=0;i1&&void 0!==arguments[1]?arguments[1]:9261,r=n;!(e=t.next()).done;)r=r*$+e.value|0;return r},Z=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9261;return e*$+t|0},Q=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5381;return(e<<5)+e+t|0},J=function(t){return 2097152*t[0]+t[1]},tt=function(t,e){return[Z(t[0],e[0]),Q(t[1],e[1])]},et=function(t,e){var n={value:0,done:!1},r=0,i=t.length;return K({next:function(){return r=0&&(t[r]!==e||(t.splice(r,1),n));r--);},xt=function(t){t.splice(0,t.length)},_t=function(t,e,n){return n&&(e=M(n,e)),t[e]},Et=function(t,e,n,r){n&&(e=M(n,e)),t[e]=r},kt="undefined"!=typeof Map?Map:function(){function t(){s(this,t),this._obj={}}return c(t,[{key:"set",value:function(t,e){return this._obj[t]=e,this}},{key:"delete",value:function(t){return this._obj[t]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(t){return void 0!==this._obj[t]}},{key:"get",value:function(t){return this._obj[t]}}]),t}(),St=function(){function t(e){if(s(this,t),this._obj=Object.create(null),this.size=0,null!=e){var n;n=null!=e.instanceString&&e.instanceString()===this.instanceString()?e.toArray():e;for(var r=0;r0;){var k=y.pop(),S=v(k),C=k.id();if(h[C]=S,S!==1/0)for(var T=k.neighborhood().intersect(p),A=0;A0)for(n.unshift(e);f[i];){var o=f[i];n.unshift(o.edge),n.unshift(o.node),i=(r=o.node).id()}return s.spawn(n)}}}},Pt={kruskal:function(t){t=t||function(t){return 1};for(var e=this.byGroup(),n=e.nodes,r=e.edges,i=n.length,o=new Array(i),a=n,s=function(t){for(var e=0;e0;){if(c=v.pop(),l=c.id(),b.delete(l),_++,l===h){for(var E=[],k=i,S=h,C=w[S];E.unshift(k),null!=C&&E.unshift(C),null!=(k=y[S]);)C=w[S=k.id()];return{found:!0,distance:d[l],path:this.spawn(E),steps:_}}g[l]=!0;for(var T=c._private.edges,A=0;AT&&(d[C]=T,b[C]=S,y[C]=x),!i){var A=S*c+k;!i&&d[A]>T&&(d[A]=T,b[A]=k,y[A]=x)}}}for(var N=0;N1&&void 0!==arguments[1]?arguments[1]:o,r=b(t),i=[],a=r;;){if(null==a)return e.spawn();var u=v(a),c=u.edge,l=u.pred;if(i.unshift(a[0]),a.same(n)&&i.length>0)break;null!=c&&i.unshift(c),a=l}return s.spawn(i)},hasNegativeWeightCycle:p,negativeWeightCycles:[]}}},Gt=Math.sqrt(2),Ht=function(t,e,n){0===n.length&&ht("Karger-Stein must be run on a connected (sub)graph");for(var r=n[t],i=r[1],o=r[2],a=e[i],s=e[o],u=n,c=u.length-1;c>=0;c--){var l=u[c],f=l[1],h=l[2];(e[f]===a&&e[h]===s||e[f]===s&&e[h]===a)&&u.splice(c,1)}for(var d=0;dr;){var i=Math.floor(Math.random()*e.length);e=Ht(i,t,e),n--}return e},zt={kargerStein:function(){var t=this,e=this.byGroup(),n=e.nodes,r=e.edges;r.unmergeBy((function(t){return t.isLoop()}));var i=n.length,o=r.length,a=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),s=Math.floor(i/Gt);if(!(i<2)){for(var u=[],c=0;c0?1:t<0?-1:0},$t=function(t,e){return Math.sqrt(Kt(t,e))},Kt=function(t,e){var n=e.x-t.x,r=e.y-t.y;return n*n+r*r},Zt=function(t){for(var e=t.length,n=0,r=0;r=t.x1&&t.y2>=t.y1)return{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,w:t.x2-t.x1,h:t.y2-t.y1};if(null!=t.w&&null!=t.h&&t.w>=0&&t.h>=0)return{x1:t.x1,y1:t.y1,x2:t.x1+t.w,y2:t.y1+t.h,w:t.w,h:t.h}}},ne=function(t,e,n){t.x1=Math.min(t.x1,e),t.x2=Math.max(t.x2,e),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,n),t.y2=Math.max(t.y2,n),t.h=t.y2-t.y1},re=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.x1-=e,t.x2+=e,t.y1-=e,t.y2+=e,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},ie=function(t){var e,n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===o.length)e=n=r=i=o[0];else if(2===o.length)e=r=o[0],i=n=o[1];else if(4===o.length){var a=f(o,4);e=a[0],n=a[1],r=a[2],i=a[3]}return t.x1-=i,t.x2+=n,t.y1-=e,t.y2+=r,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},oe=function(t,e){t.x1=e.x1,t.y1=e.y1,t.x2=e.x2,t.y2=e.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1},ae=function(t,e){t.x1+=e.x,t.x2+=e.x,t.y1+=e.y,t.y2+=e.y},se=function(t,e){return!(t.x1>e.x2)&&(!(e.x1>t.x2)&&(!(t.x2e.y2)&&!(e.y1>t.y2)))))))},ue=function(t,e,n){return t.x1<=e&&e<=t.x2&&t.y1<=n&&n<=t.y2},ce=function(t,e){return ue(t,e.x1,e.y1)&&ue(t,e.x2,e.y2)},le=function(t,e,n,r,i,o,a){var s,u=Ae(i,o),c=i/2,l=o/2,f=r-l-a;if((s=_e(t,e,n,r,n-c+u-a,f,n+c-u+a,f,!1)).length>0)return s;var h=n+c+a;if((s=_e(t,e,n,r,h,r-l+u-a,h,r+l-u+a,!1)).length>0)return s;var d=r+l+a;if((s=_e(t,e,n,r,n-c+u-a,d,n+c-u+a,d,!1)).length>0)return s;var p,g=n-c-a;if((s=_e(t,e,n,r,g,r-l+u-a,g,r+l-u+a,!1)).length>0)return s;var v=n-c+u,b=r-l+u;if((p=me(t,e,n,r,v,b,u+a)).length>0&&p[0]<=v&&p[1]<=b)return[p[0],p[1]];var y=n+c-u,w=r-l+u;if((p=me(t,e,n,r,y,w,u+a)).length>0&&p[0]>=y&&p[1]<=w)return[p[0],p[1]];var m=n+c-u,x=r+l-u;if((p=me(t,e,n,r,m,x,u+a)).length>0&&p[0]>=m&&p[1]>=x)return[p[0],p[1]];var _=n-c+u,E=r+l-u;return(p=me(t,e,n,r,_,E,u+a)).length>0&&p[0]<=_&&p[1]>=E?[p[0],p[1]]:[]},fe=function(t,e,n,r,i,o,a){var s=a,u=Math.min(n,i),c=Math.max(n,i),l=Math.min(r,o),f=Math.max(r,o);return u-s<=t&&t<=c+s&&l-s<=e&&e<=f+s},he=function(t,e,n,r,i,o,a,s,u){var c=Math.min(n,a,i)-u,l=Math.max(n,a,i)+u,f=Math.min(r,s,o)-u,h=Math.max(r,s,o)+u;return!(tl||eh)},de=function(t,e,n,r,i,o,a,s){var u=[];!function(t,e,n,r,i){var o,a,s,u,c,l,f,h;0===t&&(t=1e-5),s=-27*(r/=t)+(e/=t)*(9*(n/=t)-e*e*2),o=(a=(3*n-e*e)/9)*a*a+(s/=54)*s,i[1]=0,f=e/3,o>0?(c=(c=s+Math.sqrt(o))<0?-Math.pow(-c,1/3):Math.pow(c,1/3),l=(l=s-Math.sqrt(o))<0?-Math.pow(-l,1/3):Math.pow(l,1/3),i[0]=-f+c+l,f+=(c+l)/2,i[4]=i[2]=-f,f=Math.sqrt(3)*(-l+c)/2,i[3]=f,i[5]=-f):(i[5]=i[3]=0,0===o?(h=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3),i[0]=2*h-f,i[4]=i[2]=-(h+f)):(u=(a=-a)*a*a,u=Math.acos(s/Math.sqrt(u)),h=2*Math.sqrt(a),i[0]=-f+h*Math.cos(u/3),i[2]=-f+h*Math.cos((u+2*Math.PI)/3),i[4]=-f+h*Math.cos((u+4*Math.PI)/3)))}(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,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,3*n*n-6*n*i+n*a-n*t+2*i*i+2*i*t-a*t+3*r*r-6*r*o+r*s-r*e+2*o*o+2*o*e-s*e,1*n*i-n*n+n*t-i*t+r*o-r*r+r*e-o*e,u);for(var c=[],l=0;l<6;l+=2)Math.abs(u[l+1])<1e-7&&u[l]>=0&&u[l]<=1&&c.push(u[l]);c.push(1),c.push(0);for(var f,h,d,p=-1,g=0;g=0?du?(t-i)*(t-i)+(e-o)*(e-o):c-f},ge=function(t,e,n){for(var r,i,o,a,s=0,u=0;u=t&&t>=o||r<=t&&t<=o))continue;(t-r)/(o-r)*(a-i)+i>e&&s++}return s%2!=0},ve=function(t,e,n,r,i,o,a,s,u){var c,l=new Array(n.length);null!=s[0]?(c=Math.atan(s[1]/s[0]),s[0]<0?c+=Math.PI/2:c=-c-Math.PI/2):c=s;for(var f,h=Math.cos(-c),d=Math.sin(-c),p=0;p0){var g=ye(l,-u);f=be(g)}else f=l;return ge(t,e,f)},be=function(t){for(var e,n,r,i,o,a,s,u,c=new Array(t.length/2),l=0;l=0&&p<=1&&v.push(p),g>=0&&g<=1&&v.push(g),0===v.length)return[];var b=v[0]*s[0]+t,y=v[0]*s[1]+e;return v.length>1?v[0]==v[1]?[b,y]:[b,y,v[1]*s[0]+t,v[1]*s[1]+e]:[b,y]},xe=function(t,e,n){return e<=t&&t<=n||n<=t&&t<=e?t:t<=e&&e<=n||n<=e&&e<=t?e:n},_e=function(t,e,n,r,i,o,a,s,u){var c=t-i,l=n-t,f=a-i,h=e-o,d=r-e,p=s-o,g=f*h-p*c,v=l*h-d*c,b=p*l-f*d;if(0!==b){var y=g/b,w=v/b;return-.001<=y&&y<=1.001&&-.001<=w&&w<=1.001||u?[t+y*l,e+y*d]:[]}return 0===g||0===v?xe(t,n,a)===a?[a,s]:xe(t,n,i)===i?[i,o]:xe(i,a,n)===n?[n,r]:[]:[]},Ee=function(t,e,n,r,i,o,a,s){var u,c,l,f,h,d,p=[],g=new Array(n.length),v=!0;if(null==o&&(v=!1),v){for(var b=0;b0){var y=ye(g,-s);c=be(y)}else c=g}else c=n;for(var w=0;wl&&(l=e)},h=function(t){return c[t]},d=0;d0?m.edgesTo(w)[0]:w.edgesTo(m)[0];var _=r(x);w=w.id(),d[w]>d[b]+_&&(d[w]=d[b]+_,p.nodes.indexOf(w)<0?p.push(w):p.updateItem(w),l[w]=0,c[w]=[]),d[w]==d[b]+_&&(l[w]=l[w]+l[b],c[w].push(b))}else for(var E=0;E0;)for(var T=n.pop(),A=0;A0&&a.push(n[s]);0!==a.length&&i.push(r.collection(a))}return i}(l,u,e,r);return w=function(t){for(var e=0;e5&&void 0!==arguments[5]?arguments[5]:$e,a=r,s=0;s=2?en(t,e,n,0,Qe,Je):en(t,e,n,0,Ze)},squaredEuclidean:function(t,e,n){return en(t,e,n,0,Qe)},manhattan:function(t,e,n){return en(t,e,n,0,Ze)},max:function(t,e,n){return en(t,e,n,-1/0,tn)}};function rn(t,e,n,r,i,o){var a;return a=m(t)?t:nn[t]||nn.euclidean,0===e&&m(t)?a(i,o):a(e,n,r,i,o)}nn["squared-euclidean"]=nn.squaredEuclidean,nn.squaredeuclidean=nn.squaredEuclidean;var on=wt({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),an=function(t){return on(t)},sn=function(t,e,n,r,i){var o="kMedoids"!==i?function(t){return n[t]}:function(t){return r[t](n)},a=n,s=e;return rn(t,r.length,o,(function(t){return r[t](e)}),a,s)},un=function(t,e,n){for(var r=n.length,i=new Array(r),o=new Array(r),a=new Array(e),s=null,u=0;un)return!1}return!0},hn=function(t,e,n){for(var r=0;ri&&(i=e[u][c],o=c);a[o].push(t[u])}for(var l=0;l=i.threshold||"dendrogram"===i.mode&&1===t.length)return!1;var d,p=e[a],g=e[r[a]];d="dendrogram"===i.mode?{left:p,right:g,key:p.key}:{value:p.value.concat(g.value),key:p.key},t[p.index]=d,t.splice(g.index,1),e[p.key]=d;for(var v=0;vn[g.key][b.key]&&(o=n[g.key][b.key])):"max"===i.linkage?(o=n[p.key][b.key],n[p.key][b.key]1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=!(arguments.length>3&&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];r?t=t.slice(e,n):(n0&&t.splice(0,e));for(var a=0,s=t.length-1;s>=0;s--){var u=t[s];o?isFinite(u)||(t[s]=-1/0,a++):t.splice(s,1)}i&&t.sort((function(t,e){return t-e}));var c=t.length,l=Math.floor(c/2);return c%2!=0?t[l+1+a]:(t[l-1+a]+t[l+a])/2}(t):"mean"===e?function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=0,i=0,o=e;o1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=1/0,i=e;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=-1/0,i=e;ia&&(o=u,a=e[i*t+u])}o>0&&r.push(o)}for(var c=0;c=T?(A=T,T=O,N=L):O>A&&(A=O);for(var P=0;P0?1:0;k[_%c.minIterations*e+B]=G,R+=G}if(R>0&&(_>=c.minIterations-1||_==c.maxIterations-1)){for(var H=0,F=0;F0&&r.push(i);return r}(e,o,a),V=function(t,e,n){for(var r=An(t,e,n),i=0;iu&&(s=c,u=l)}n[i]=o[s]}return r=An(t,e,n)}(e,r,Y),q={},U=0;U1)}}));var u=Object.keys(e).filter((function(t){return e[t].cutVertex})).map((function(e){return t.getElementById(e)}));return{cut:t.spawn(u),components:i}},In=function(){var t=this,e={},n=0,r=[],i=[],o=t.spawn(t);return t.forEach((function(a){if(a.isNode()){var s=a.id();s in e||function a(s){if(i.push(s),e[s]={index:n,low:n++,explored:!1},t.getElementById(s).connectedEdges().intersection(t).forEach((function(t){var n=t.target().id();n!==s&&(n in e||a(n),e[n].explored||(e[s].low=Math.min(e[s].low,e[n].low)))})),e[s].index===e[s].low){for(var u=t.spawn();;){var c=i.pop();if(u.merge(t.getElementById(c)),e[c].low=e[s].index,e[c].explored=!0,c===s)break}var l=u.edgesWith(u),f=u.merge(l);r.push(f),o=o.difference(f)}}(s)}})),{cut:o,components:r}},jn={};[Nt,Lt,Pt,jt,Dt,Bt,zt,Pe,je,De,Be,We,yn,kn,On,{hierholzer:function(t){if(!_(t)){var e=arguments;t={root:e[0],directed:e[1]}}var n,r,i,o=Ln(t),a=o.root,s=o.directed,u=this,c=!1;a&&(i=w(a)?this.filter(a)[0].id():a[0].id());var l={},f={};s?u.forEach((function(t){var e=t.id();if(t.isNode()){var i=t.indegree(!0),o=t.outdegree(!0),a=i-o,s=o-i;1==a?n?c=!0:n=e:1==s?r?c=!0:r=e:(s>1||a>1)&&(c=!0),l[e]=[],t.outgoers().forEach((function(t){t.isEdge()&&l[e].push(t.id())}))}else f[e]=[void 0,t.target().id()]})):u.forEach((function(t){var e=t.id();t.isNode()?(t.degree(!0)%2&&(n?r?c=!0:r=e:n=e),l[e]=[],t.connectedEdges().forEach((function(t){return l[e].push(t.id())}))):f[e]=[t.source().id(),t.target().id()]}));var h={found:!1,trail:void 0};if(c)return h;if(r&&n)if(s){if(i&&r!=i)return h;i=r}else{if(i&&r!=i&&n!=i)return h;i||(i=r)}else i||(i=u[0].id());var d=function(t){for(var e,n,r,i=t,o=[t];l[i].length;)e=l[i].shift(),n=f[e][0],i!=(r=f[e][1])?(l[r]=l[r].filter((function(t){return t!=e})),i=r):s||i==n||(l[n]=l[n].filter((function(t){return t!=e})),i=n),o.unshift(e),o.unshift(i);return o},p=[],g=[];for(g=d(i);1!=g.length;)0==l[g[0]].length?(p.unshift(u.getElementById(g.shift())),p.unshift(u.getElementById(g.shift()))):g=d(g.shift()).concat(g);for(var v in p.unshift(u.getElementById(g.shift())),l)if(l[v].length)return h;return h.found=!0,h.trail=this.spawn(p),h}},{hopcroftTarjanBiconnected:Pn,htbc:Pn,htb:Pn,hopcroftTarjanBiconnectedComponents:Pn},{tarjanStronglyConnected:In,tsc:In,tscc:In,tarjanStronglyConnectedComponents:In}].forEach((function(t){G(jn,t)})); /*! Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) Licensed under The MIT License (http://opensource.org/licenses/MIT) */ var Mn=function t(e){if(!(this instanceof t))return new t(e);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 e&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};Mn.prototype={fulfill:function(t){return Dn(this,1,"fulfillValue",t)},reject:function(t){return Dn(this,2,"rejectReason",t)},then:function(t,e){var n=new Mn;return this.onFulfilled.push(Gn(t,n,"fulfill")),this.onRejected.push(Gn(e,n,"reject")),Rn(this),n.proxy}};var Dn=function(t,e,n,r){return 0===t.state&&(t.state=e,t[n]=r,Rn(t)),t},Rn=function(t){1===t.state?Bn(t,"onFulfilled",t.fulfillValue):2===t.state&&Bn(t,"onRejected",t.rejectReason)},Bn=function(t,n,r){if(0!==t[n].length){var i=t[n];t[n]=[];var o=function(){for(var t=0;t0:void 0}},clearQueue:function(){return function(){var t=void 0!==this.length?this:[this];if(!(this._private.cy||this).styleEnabled())return this;for(var e=0;e0&&this.spawn(n).updateStyle().emit("class"),this},addClass:function(t){return this.toggleClass(t,!0)},hasClass:function(t){var e=this[0];return null!=e&&e._private.classes.has(t)},toggleClass:function(t,e){x(t)||(t=t.match(/\S+/g)||[]);for(var n=void 0===e,r=[],i=0,o=this.length;i0&&this.spawn(r).updateStyle().emit("class"),this},removeClass:function(t){return this.toggleClass(t,!1)},flashClass:function(t,e){var n=this;if(null==e)e=250;else if(0===e)return n;return n.addClass(t),setTimeout((function(){n.removeClass(t)}),e),n}};Un.className=Un.classNames=Un.classes;var Xn={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+"};Xn.variable="(?:[\\w-]|(?:\\\\"+Xn.metaChar+"))+",Xn.value=Xn.string+"|"+Xn.number,Xn.className=Xn.variable,Xn.id=Xn.variable,function(){var t,e,n;for(t=Xn.comparatorOp.split("|"),n=0;n=0||"="!==e&&(Xn.comparatorOp+="|\\!"+e)}();var Wn=0,$n=1,Kn=2,Zn=3,Qn=4,Jn=5,tr=6,er=7,nr=8,rr=9,ir=10,or=11,ar=12,sr=13,ur=14,cr=15,lr=16,fr=17,hr=18,dr=19,pr=20,gr=[{selector:":selected",matches:function(t){return t.selected()}},{selector:":unselected",matches:function(t){return!t.selected()}},{selector:":selectable",matches:function(t){return t.selectable()}},{selector:":unselectable",matches:function(t){return!t.selectable()}},{selector:":locked",matches:function(t){return t.locked()}},{selector:":unlocked",matches:function(t){return!t.locked()}},{selector:":visible",matches:function(t){return t.visible()}},{selector:":hidden",matches:function(t){return!t.visible()}},{selector:":transparent",matches:function(t){return t.transparent()}},{selector:":grabbed",matches:function(t){return t.grabbed()}},{selector:":free",matches:function(t){return!t.grabbed()}},{selector:":removed",matches:function(t){return t.removed()}},{selector:":inside",matches:function(t){return!t.removed()}},{selector:":grabbable",matches:function(t){return t.grabbable()}},{selector:":ungrabbable",matches:function(t){return!t.grabbable()}},{selector:":animated",matches:function(t){return t.animated()}},{selector:":unanimated",matches:function(t){return!t.animated()}},{selector:":parent",matches:function(t){return t.isParent()}},{selector:":childless",matches:function(t){return t.isChildless()}},{selector:":child",matches:function(t){return t.isChild()}},{selector:":orphan",matches:function(t){return t.isOrphan()}},{selector:":nonorphan",matches:function(t){return t.isChild()}},{selector:":compound",matches:function(t){return t.isNode()?t.isParent():t.source().isParent()||t.target().isParent()}},{selector:":loop",matches:function(t){return t.isLoop()}},{selector:":simple",matches:function(t){return t.isSimple()}},{selector:":active",matches:function(t){return t.active()}},{selector:":inactive",matches:function(t){return!t.active()}},{selector:":backgrounding",matches:function(t){return t.backgrounding()}},{selector:":nonbackgrounding",matches:function(t){return!t.backgrounding()}}].sort((function(t,e){return function(t,e){return-1*B(t,e)}(t.selector,e.selector)})),vr=function(){for(var t,e={},n=0;n0&&u.edgeCount>0)return pt("The selector `"+t+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(u.edgeCount>1)return pt("The selector `"+t+"` is invalid because it uses multiple edge selectors"),!1;1===u.edgeCount&&pt("The selector `"+t+"` 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 t=function(t){return null==t?"":t},e=function(e){return w(e)?'"'+e+'"':t(e)},n=function(t){return" "+t+" "},r=function(r,o){var a=r.type,s=r.value;switch(a){case Wn:var u=t(s);return u.substring(0,u.length-1);case Zn:var c=r.field,l=r.operator;return"["+c+n(t(l))+e(s)+"]";case Jn:var f=r.operator,h=r.field;return"["+t(f)+h+"]";case Qn:return"["+r.field+"]";case tr:var d=r.operator;return"[["+r.field+n(t(d))+e(s)+"]]";case er:return s;case nr:return"#"+s;case rr:return"."+s;case fr:case cr:return i(r.parent,o)+n(">")+i(r.child,o);case hr:case lr:return i(r.ancestor,o)+" "+i(r.descendant,o);case dr:var p=i(r.left,o),g=i(r.subject,o),v=i(r.right,o);return p+(p.length>0?" ":"")+g+v;case pr:return""}},i=function(t,e){return t.checks.reduce((function(n,i,o){return n+(e===t&&0===o?"$":"")+r(i,e)}),"")},o="",a=0;a1&&a=0&&(e=e.replace("!",""),l=!0),e.indexOf("@")>=0&&(e=e.replace("@",""),c=!0),(a||u||c)&&(i=a||s?""+t:"",o=""+n),c&&(t=i=i.toLowerCase(),n=o=o.toLowerCase()),e){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=t===n;break;case">":f=!0,r=t>n;break;case">=":f=!0,r=t>=n;break;case"<":f=!0,r=t0;){var c=i.shift();e(c),o.add(c.id()),a&&r(i,o,c)}return t}function Mr(t,e,n){if(n.isParent())for(var r=n._private.children,i=0;i1&&void 0!==arguments[1])||arguments[1];return jr(this,t,e,Mr)},Ir.forEachUp=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return jr(this,t,e,Dr)},Ir.forEachUpAndDown=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return jr(this,t,e,Rr)},Ir.ancestors=Ir.parents,(Or=Lr={data:Vn.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:Vn.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Vn.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Vn.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Vn.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Vn.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var t=this[0];if(t)return t._private.data.id}}).attr=Or.data,Or.removeAttr=Or.removeData;var Br,Gr,Hr=Lr,Fr={};function zr(t){return function(e){if(void 0===e&&(e=!0),0!==this.length&&this.isNode()&&!this.removed()){for(var n=0,r=this[0],i=r._private.edges,o=0;oe})),minIndegree:Yr("indegree",(function(t,e){return te})),minOutdegree:Yr("outdegree",(function(t,e){return te}))}),G(Fr,{totalDegree:function(t){for(var e=0,n=this.nodes(),r=0;r0,l=c;c&&(u=u[0]);var f=l?u.position():{x:0,y:0};return i={x:s.x-f.x,y:s.y-f.y},void 0===t?i:i[t]}for(var h=0;h0,v=g;g&&(p=p[0]);var b=v?p.position():{x:0,y:0};void 0!==e?d.position(t,e+b[t]):void 0!==i&&d.position({x:i.x+b.x,y:i.y+b.y})}}else if(!o)return;return this}}).modelPosition=Br.point=Br.position,Br.modelPositions=Br.points=Br.positions,Br.renderedPoint=Br.renderedPosition,Br.relativePoint=Br.relativePosition;var Ur,Xr,Wr=Gr;Ur=Xr={},Xr.renderedBoundingBox=function(t){var e=this.boundingBox(t),n=this.cy(),r=n.zoom(),i=n.pan(),o=e.x1*r+i.x,a=e.x2*r+i.x,s=e.y1*r+i.y,u=e.y2*r+i.y;return{x1:o,x2:a,y1:s,y2:u,w:a-o,h:u-s}},Xr.dirtyCompoundBoundsCache=function(){var t=this.cy();return t.styleEnabled()&&t.hasCompoundNodes()?(this.forEachUp((function(t){if(t.isParent()){var e=t._private;e.compoundBoundsClean=!1,e.bbCache=null,t.emitAndNotify("bounds")}})),this):this},Xr.updateCompoundBounds=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function n(t){if(t.isParent()){var e=t._private,n=t.children(),r="include"===t.pstyle("compound-sizing-wrt-labels").value,i={width:{val:t.pstyle("min-width").pfValue,left:t.pstyle("min-width-bias-left"),right:t.pstyle("min-width-bias-right")},height:{val:t.pstyle("min-height").pfValue,top:t.pstyle("min-height-bias-top"),bottom:t.pstyle("min-height-bias-bottom")}},o=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),a=e.position;0!==o.w&&0!==o.h||((o={w:t.pstyle("width").pfValue,h:t.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 u=i.width.right.value;"px"===i.width.right.units&&i.width.val>0&&(u=100*u/i.width.val);var c=i.height.top.value;"px"===i.height.top.units&&i.height.val>0&&(c=100*c/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 f=b(i.width.val-o.w,s,u),h=f.biasDiff,d=f.biasComplementDiff,p=b(i.height.val-o.h,c,l),g=p.biasDiff,v=p.biasComplementDiff;e.autoPadding=function(t,e,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return t>0?n.pfValue*t:0;case"height":return e>0?n.pfValue*e:0;case"average":return t>0&&e>0?n.pfValue*(t+e)/2:0;case"min":return t>0&&e>0?t>e?n.pfValue*e:n.pfValue*t:0;case"max":return t>0&&e>0?t>e?n.pfValue*t:n.pfValue*e:0;default:return 0}}(o.w,o.h,t.pstyle("padding"),t.pstyle("padding-relative-to").value),e.autoWidth=Math.max(o.w,i.width.val),a.x=(-h+o.x1+o.x2+d)/2,e.autoHeight=Math.max(o.h,i.height.val),a.y=(-g+o.y1+o.y2+v)/2}function b(t,e,n){var r=0,i=0,o=e+n;return t>0&&o>0&&(r=e/o*t,i=n/o*t),{biasDiff:r,biasComplementDiff:i}}}for(var r=0;rt.x2?r:t.x2,t.y1=nt.y2?i:t.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1)},Zr=function(t,e){return null==e?t:Kr(t,e.x1,e.y1,e.x2,e.y2)},Qr=function(t,e,n){return _t(t,e,n)},Jr=function(t,e,n){if(!e.cy().headless()){var r,i,o=e._private,a=o.rstyle,s=a.arrowWidth/2;if("none"!==e.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 u=o.arrowBounds=o.arrowBounds||{},c=u[n]=u[n]||{};c.x1=r-s,c.y1=i-s,c.x2=r+s,c.y2=i+s,c.w=c.x2-c.x1,c.h=c.y2-c.y1,re(c,1),Kr(t,c.x1,c.y1,c.x2,c.y2)}}},ti=function(t,e,n){if(!e.cy().headless()){var r;r=n?n+"-":"";var i=e._private,o=i.rstyle;if(e.pstyle(r+"label").strValue){var a,s,u,c,l=e.pstyle("text-halign"),f=e.pstyle("text-valign"),h=Qr(o,"labelWidth",n),d=Qr(o,"labelHeight",n),p=Qr(o,"labelX",n),g=Qr(o,"labelY",n),v=e.pstyle(r+"text-margin-x").pfValue,b=e.pstyle(r+"text-margin-y").pfValue,y=e.isEdge(),w=e.pstyle(r+"text-rotation"),m=e.pstyle("text-outline-width").pfValue,x=e.pstyle("text-border-width").pfValue/2,_=e.pstyle("text-background-padding").pfValue,E=d,k=h,S=k/2,C=E/2;if(y)a=p-S,s=p+S,u=g-C,c=g+C;else{switch(l.value){case"left":a=p-k,s=p;break;case"center":a=p-S,s=p+S;break;case"right":a=p,s=p+k}switch(f.value){case"top":u=g-E,c=g;break;case"center":u=g-C,c=g+C;break;case"bottom":u=g,c=g+E}}a+=v-Math.max(m,x)-_,s+=v+Math.max(m,x)+_,u+=b-Math.max(m,x)-_,c+=b+Math.max(m,x)+_;var T=n||"main",A=i.labelBounds,N=A[T]=A[T]||{};N.x1=a,N.y1=u,N.x2=s,N.y2=c,N.w=s-a,N.h=c-u,re(N,1);var O=y&&"autorotate"===w.strValue,L=null!=w.pfValue&&0!==w.pfValue;if(O||L){var P=O?Qr(i.rstyle,"labelAngle",n):w.pfValue,I=Math.cos(P),j=Math.sin(P),M=(a+s)/2,D=(u+c)/2;if(!y){switch(l.value){case"left":M=s;break;case"right":M=a}switch(f.value){case"top":D=c;break;case"bottom":D=u}}var R=function(t,e){return{x:(t-=M)*I-(e-=D)*j+M,y:t*j+e*I+D}},B=R(a,u),G=R(a,c),H=R(s,u),F=R(s,c);a=Math.min(B.x,G.x,H.x,F.x),s=Math.max(B.x,G.x,H.x,F.x),u=Math.min(B.y,G.y,H.y,F.y),c=Math.max(B.y,G.y,H.y,F.y)}var z=T+"Rot",Y=A[z]=A[z]||{};Y.x1=a,Y.y1=u,Y.x2=s,Y.y2=c,Y.w=s-a,Y.h=c-u,Kr(t,a,u,s,c),Kr(i.labelBounds.all,a,u,s,c)}return t}},ei=function(t){var e=0,n=function(t){return(t?1:0)<(r=C[1].x)){var T=n;n=r,r=T}if(i>(o=C[1].y)){var A=i;i=o,o=A}Kr(h,n-x,i-x,r+x,o+x)}}else if("bezier"===S||"unbundled-bezier"===S||"segments"===S||"taxi"===S){var N;switch(S){case"bezier":case"unbundled-bezier":N=v.bezierPts;break;case"segments":case"taxi":N=v.linePts}if(null!=N)for(var O=0;O(r=I.x)){var j=n;n=r,r=j}if((i=P.y)>(o=I.y)){var M=i;i=o,o=M}Kr(h,n-=x,i-=x,r+=x,o+=x)}if(l&&e.includeEdges&&g&&(Jr(h,t,"mid-source"),Jr(h,t,"mid-target"),Jr(h,t,"source"),Jr(h,t,"target")),l)if("yes"===t.pstyle("ghost").value){var D=t.pstyle("ghost-offset-x").pfValue,R=t.pstyle("ghost-offset-y").pfValue;Kr(h,h.x1+D,h.y1+R,h.x2+D,h.y2+R)}var B=d.bodyBounds=d.bodyBounds||{};oe(B,h),ie(B,b),re(B,1),l&&(n=h.x1,r=h.x2,i=h.y1,o=h.y2,Kr(h,n-m,i-m,r+m,o+m));var G=d.overlayBounds=d.overlayBounds||{};oe(G,h),ie(G,b),re(G,1);var H=d.labelBounds=d.labelBounds||{};null!=H.all?((u=H.all).x1=1/0,u.y1=1/0,u.x2=-1/0,u.y2=-1/0,u.w=0,u.h=0):H.all=ee(),l&&e.includeLabels&&(e.includeMainLabels&&ti(h,t,null),g&&(e.includeSourceLabels&&ti(h,t,"source"),e.includeTargetLabels&&ti(h,t,"target")))}return h.x1=$r(h.x1),h.y1=$r(h.y1),h.x2=$r(h.x2),h.y2=$r(h.y2),h.w=$r(h.x2-h.x1),h.h=$r(h.y2-h.y1),h.w>0&&h.h>0&&w&&(ie(h,b),re(h,1)),h}(t,ii),r.bbCache=n,r.bbCacheShift.x=r.bbCacheShift.y=0,r.bbCachePosKey=a):n=r.bbCache,!c&&(0!==r.bbCacheShift.x||0!==r.bbCacheShift.y)){var l=ae,f=r.bbCacheShift,h=function(t,e){null!=t&&l(t,e)};l(n,f);var d=r.bodyBounds,p=r.overlayBounds,g=r.labelBounds,v=r.arrowBounds;h(d,f),h(p,f),null!=v&&(h(v.source,f),h(v.target,f),h(v["mid-source"],f),h(v["mid-target"],f)),null!=g&&(h(g.main,f),h(g.all,f),h(g.source,f),h(g.target,f))}if(r.bbCacheShift.x=r.bbCacheShift.y=0,!o){var b=t.isNode();n=ee(),(e.includeNodes&&b||e.includeEdges&&!b)&&(e.includeOverlays?Zr(n,r.overlayBounds):Zr(n,r.bodyBounds)),e.includeLabels&&(e.includeMainLabels&&(!i||e.includeSourceLabels&&e.includeTargetLabels)?Zr(n,r.labelBounds.all):(e.includeMainLabels&&Zr(n,r.labelBounds.mainRot),e.includeSourceLabels&&Zr(n,r.labelBounds.sourceRot),e.includeTargetLabels&&Zr(n,r.labelBounds.targetRot))),n.w=n.x2-n.x1,n.h=n.y2-n.y1}return n},ii={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,useCache:!0},oi=ei(ii),ai=wt(ii);Xr.boundingBox=function(t){var e;if(1!==this.length||null==this[0]._private.bbCache||void 0!==t&&void 0!==t.useCache&&!0!==t.useCache){e=ee();var n=ai(t=t||ii);if(this.cy().styleEnabled())for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:xi,e=arguments.length>1?arguments[1]:void 0,n=0;n=0;s--)a(s);return this},Ei.removeAllListeners=function(){return this.removeListener("*")},Ei.emit=Ei.trigger=function(t,e,n){var r=this.listeners,i=r.length;return this.emitting++,x(e)||(e=[e]),Ci(this,(function(t,o){null!=n&&(r=[{event:o.event,type:o.type,namespace:o.namespace,callback:n}],i=r.length);for(var a=function(n){var i=r[n];if(i.type===o.type&&(!i.namespace||i.namespace===o.namespace||".*"===i.namespace)&&t.eventMatches(t.context,i,o)){var a=[o];null!=e&&function(t,e){for(var n=0;n1&&!r){var i=this.length-1,o=this[i],a=o._private.data.id;this[i]=void 0,this[t]=o,n.set(a,{ele:o,index:t})}return this.length--,this},unmergeOne:function(t){t=t[0];var e=this._private,n=t._private.data.id,r=e.map.get(n);if(!r)return this;var i=r.index;return this.unmergeAt(i),this},unmerge:function(t){var e=this._private.cy;if(!t)return this;if(t&&w(t)){var n=t;t=e.mutableElements().filter(n)}for(var r=0;r=0;e--){t(this[e])&&this.unmergeAt(e)}return this},map:function(t,e){for(var n=[],r=0;rr&&(r=a,n=o)}return{value:r,ele:n}},min:function(t,e){for(var n,r=1/0,i=0;i=0&&i1&&void 0!==arguments[1])||arguments[1],n=this[0],r=n.cy();if(r.styleEnabled()&&n){var i=n._private.style[t];return null!=i?i:e?r.style().getDefaultProperty(t):null}},numericStyle:function(t){var e=this[0];if(e.cy().styleEnabled()&&e){var n=e.pstyle(t);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(t){var e=this[0];if(e.cy().styleEnabled())return e?e.pstyle(t).units:void 0},renderedStyle:function(t){var e=this.cy();if(!e.styleEnabled())return this;var n=this[0];return n?e.style().getRenderedStyle(n,t):void 0},style:function(t,e){var n=this.cy();if(!n.styleEnabled())return this;var r=n.style();if(_(t)){var i=t;r.applyBypass(this,i,!1),this.emitAndNotify("style")}else if(w(t)){if(void 0===e){var o=this[0];return o?r.getStylePropertyValue(o,t):void 0}r.applyBypass(this,t,e,!1),this.emitAndNotify("style")}else if(void 0===t){var a=this[0];return a?r.getRawStyle(a):void 0}return this},removeStyle:function(t){var e=this.cy();if(!e.styleEnabled())return this;var n=e.style();if(void 0===t)for(var r=0;r0&&e.push(l[0]),e.push(s[0])}return this.spawn(e,{unique:!0}).filter(t)}),"neighborhood"),closedNeighborhood:function(t){return this.neighborhood().add(this).filter(t)},openNeighborhood:function(t){return this.neighborhood(t)}}),Ki.neighbourhood=Ki.neighborhood,Ki.closedNeighbourhood=Ki.closedNeighborhood,Ki.openNeighbourhood=Ki.openNeighborhood,G(Ki,{source:Pr((function(t){var e,n=this[0];return n&&(e=n._private.source||n.cy().collection()),e&&t?e.filter(t):e}),"source"),target:Pr((function(t){var e,n=this[0];return n&&(e=n._private.target||n.cy().collection()),e&&t?e.filter(t):e}),"target"),sources:to({attr:"source"}),targets:to({attr:"target"})}),G(Ki,{edgesWith:Pr(eo(),"edgesWith"),edgesTo:Pr(eo({thisIsSrc:!0}),"edgesTo")}),G(Ki,{connectedEdges:Pr((function(t){for(var e=[],n=0;n0);return o},component:function(){var t=this[0];return t.cy().mutableElements().components(t)[0]}}),Ki.componentsOf=Ki.components;var ro=function(t,e,n){for(var r=null!=n?n:vt();t.hasElementWithId(r);)r=vt();return r},io=function(t,e,n){if(void 0!==t&&A(t)){var r=new kt,i=!1;if(e){if(e.length>0&&_(e[0])&&!C(e[0])){i=!0;for(var o=[],a=new Ct,s=0,u=e.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=[],u=[],c=0,l=i.length;c0){for(var B=new io(o,t),G=0;G0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=[],i={},o=n._private.cy;function a(t){for(var e=t._private.edges,n=0;n0&&(t?T.emitAndNotify("remove"):e&&T.emit("remove"));for(var A=0;A1e-4&&Math.abs(s.v)>1e-4;);return o?function(t){return c[t*(c.length-1)|0]}:l}}(),uo=function(t,e,n,r){var i=function(t,e,n,r){var i=4,o=.001,a=1e-7,s=10,u=11,c=1/(u-1),l="undefined"!=typeof Float32Array;if(4!==arguments.length)return!1;for(var f=0;f<4;++f)if("number"!=typeof arguments[f]||isNaN(arguments[f])||!isFinite(arguments[f]))return!1;t=Math.min(t,1),n=Math.min(n,1),t=Math.max(t,0),n=Math.max(n,0);var h=l?new Float32Array(u):new Array(u);function d(t,e){return 1-3*e+3*t}function p(t,e){return 3*e-6*t}function g(t){return 3*t}function v(t,e,n){return((d(e,n)*t+p(e,n))*t+g(e))*t}function b(t,e,n){return 3*d(e,n)*t*t+2*p(e,n)*t+g(e)}function y(e,r){for(var o=0;o0?i=u:r=u}while(Math.abs(o)>a&&++c=o?y(e,s):0===l?s:m(e,r,r+c)}var _=!1;function E(){_=!0,t===e&&n===r||w()}var k=function(i){return _||E(),t===e&&n===r?i:0===i?0:1===i?1:v(x(i),e,r)};k.getControlPoints=function(){return[{x:t,y:e},{x:n,y:r}]};var S="generateBezier("+[t,e,n,r]+")";return k.toString=function(){return S},k}(t,e,n,r);return function(t,e,n){return t+(e-t)*i(n)}},co={linear:function(t,e,n){return t+(e-t)*n},ease:uo(.25,.1,.25,1),"ease-in":uo(.42,0,1,1),"ease-out":uo(0,0,.58,1),"ease-in-out":uo(.42,0,.58,1),"ease-in-sine":uo(.47,0,.745,.715),"ease-out-sine":uo(.39,.575,.565,1),"ease-in-out-sine":uo(.445,.05,.55,.95),"ease-in-quad":uo(.55,.085,.68,.53),"ease-out-quad":uo(.25,.46,.45,.94),"ease-in-out-quad":uo(.455,.03,.515,.955),"ease-in-cubic":uo(.55,.055,.675,.19),"ease-out-cubic":uo(.215,.61,.355,1),"ease-in-out-cubic":uo(.645,.045,.355,1),"ease-in-quart":uo(.895,.03,.685,.22),"ease-out-quart":uo(.165,.84,.44,1),"ease-in-out-quart":uo(.77,0,.175,1),"ease-in-quint":uo(.755,.05,.855,.06),"ease-out-quint":uo(.23,1,.32,1),"ease-in-out-quint":uo(.86,0,.07,1),"ease-in-expo":uo(.95,.05,.795,.035),"ease-out-expo":uo(.19,1,.22,1),"ease-in-out-expo":uo(1,0,0,1),"ease-in-circ":uo(.6,.04,.98,.335),"ease-out-circ":uo(.075,.82,.165,1),"ease-in-out-circ":uo(.785,.135,.15,.86),spring:function(t,e,n){if(0===n)return co.linear;var r=so(t,e,n);return function(t,e,n){return t+(e-t)*r(n)}},"cubic-bezier":uo};function lo(t,e,n,r,i){if(1===r)return n;if(e===n)return n;var o=i(e,n,r);return null==t||((t.roundValue||t.color)&&(o=Math.round(o)),void 0!==t.min&&(o=Math.max(o,t.min)),void 0!==t.max&&(o=Math.min(o,t.max))),o}function fo(t,e){return null!=t.pfValue||null!=t.value?null==t.pfValue||null!=e&&"%"===e.type.units?t.value:t.pfValue:t}function ho(t,e,n,r,i){var o=null!=i?i.type:null;n<0?n=0:n>1&&(n=1);var a=fo(t,i),s=fo(e,i);if(E(a)&&E(s))return lo(o,a,s,n,r);if(x(a)&&x(s)){for(var u=[],c=0;c0?("spring"===f&&h.push(a.duration),a.easingImpl=co[f].apply(null,h)):a.easingImpl=co[f]}var d,p=a.easingImpl;if(d=0===a.duration?1:(n-u)/a.duration,a.applying&&(d=a.progress),d<0?d=0:d>1&&(d=1),null==a.delay){var g=a.startPosition,v=a.position;if(v&&i&&!t.locked()){var b={};go(g.x,v.x)&&(b.x=ho(g.x,v.x,d,p)),go(g.y,v.y)&&(b.y=ho(g.y,v.y,d,p)),t.position(b)}var y=a.startPan,m=a.pan,x=o.pan,_=null!=m&&r;_&&(go(y.x,m.x)&&(x.x=ho(y.x,m.x,d,p)),go(y.y,m.y)&&(x.y=ho(y.y,m.y,d,p)),t.emit("pan"));var E=a.startZoom,k=a.zoom,S=null!=k&&r;S&&(go(E,k)&&(o.zoom=te(o.minZoom,ho(E,k,d,p),o.maxZoom)),t.emit("zoom")),(_||S)&&t.emit("viewport");var C=a.style;if(C&&C.length>0&&i){for(var T=0;T=0;e--){(0,t[e])()}t.splice(0,t.length)},l=o.length-1;l>=0;l--){var f=o[l],h=f._private;h.stopped?(o.splice(l,1),h.hooked=!1,h.playing=!1,h.started=!1,c(h.frames)):(h.playing||h.applying)&&(h.playing&&h.applying&&(h.applying=!1),h.started||vo(0,f,t),po(e,f,t,n),h.applying&&(h.applying=!1),c(h.frames),null!=h.step&&h.step(t),f.completed()&&(o.splice(l,1),h.hooked=!1,h.playing=!1,h.started=!1,c(h.completes)),s=!0)}return n||0!==o.length||0!==a.length||r.push(e),s}for(var o=!1,a=0;a0?e.notify("draw",n):e.notify("draw")),n.unmerge(r),e.emit("step")}var yo={animate:Vn.animate(),animation:Vn.animation(),animated:Vn.animated(),clearQueue:Vn.clearQueue(),delay:Vn.delay(),delayAnimation:Vn.delayAnimation(),stop:Vn.stop(),addToAnimationPool:function(t){this.styleEnabled()&&this._private.aniEles.merge(t)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var t=this;if(t._private.animationsRunning=!0,t.styleEnabled()){var e=t.renderer();e&&e.beforeRender?e.beforeRender((function(e,n){bo(n,t)}),e.beforeRenderPriorities.animations):function e(){t._private.animationsRunning&&X((function(n){bo(n,t),e()}))}()}}},wo={qualifierCompare:function(t,e){return null==t||null==e?null==t&&null==e:t.sameText(e)},eventMatches:function(t,e,n){var r=e.qualifier;return null==r||t!==n.target&&C(n.target)&&r.matches(n.target)},addEventFields:function(t,e){e.cy=t,e.target=t},callbackContext:function(t,e,n){return null!=e.qualifier?n.target:t}},mo=function(t){return w(t)?new Tr(t):t},xo={createEmitter:function(){var t=this._private;return t.emitter||(t.emitter=new _i(wo,this)),this},emitter:function(){return this._private.emitter},on:function(t,e,n){return this.emitter().on(t,mo(e),n),this},removeListener:function(t,e,n){return this.emitter().removeListener(t,mo(e),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(t,e,n){return this.emitter().one(t,mo(e),n),this},once:function(t,e,n){return this.emitter().one(t,mo(e),n),this},emit:function(t,e){return this.emitter().emit(t,e),this},emitAndNotify:function(t,e){return this.emit(t),this.notify(t,e),this}};Vn.eventAliasesOn(xo);var _o={png:function(t){return t=t||{},this._private.renderer.png(t)},jpg:function(t){var e=this._private.renderer;return(t=t||{}).bg=t.bg||"#fff",e.jpg(t)}};_o.jpeg=_o.jpg;var Eo={layout:function(t){if(null!=t)if(null!=t.name){var e=t.name,n=this.extension("layout",e);if(null!=n){var r;r=w(t.eles)?this.$(t.eles):null!=t.eles?t.eles:this.$();var i=new n(G({},t,{cy:this,eles:r}));return i}ht("No such layout `"+e+"` found. Did you forget to import it and `cytoscape.use()` it?")}else ht("A `name` must be specified to make a layout");else ht("Layout options must be specified to make a layout")}};Eo.createLayout=Eo.makeLayout=Eo.layout;var ko={notify:function(t,e){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[t]=n.batchNotifications[t]||this.collection();null!=e&&r.merge(e)}else if(n.notificationsEnabled){var i=this.renderer();!this.destroyed()&&i&&i.notify(t,e)}},notifications:function(t){var e=this._private;return void 0===t?e.notificationsEnabled:(e.notificationsEnabled=!!t,this)},noNotifications:function(t){this.notifications(!1),t(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var t=this._private;return null==t.batchCount&&(t.batchCount=0),0===t.batchCount&&(t.batchStyleEles=this.collection(),t.batchNotifications={}),t.batchCount++,this},endBatch:function(){var t=this._private;if(0===t.batchCount)return this;if(t.batchCount--,0===t.batchCount){t.batchStyleEles.updateStyle();var e=this.renderer();Object.keys(t.batchNotifications).forEach((function(n){var r=t.batchNotifications[n];r.empty()?e.notify(n):e.notify(n,r)}))}return this},batch:function(t){return this.startBatch(),t(),this.endBatch(),this},batchData:function(t){var e=this;return this.batch((function(){for(var n=Object.keys(t),r=0;r0;)t.removeChild(t.childNodes[0]);this._private.renderer=null,this.mutableElements().forEach((function(t){var e=t._private;e.rscratch={},e.rstyle={},e.animation.current=[],e.animation.queue=[]}))},onRender:function(t){return this.on("render",t)},offRender:function(t){return this.off("render",t)}};Co.invalidateDimensions=Co.resize;var To={collection:function(t,e){return w(t)?this.$(t):S(t)?t.collection():x(t)?new io(this,t,e):new io(this)},nodes:function(t){var e=this.$((function(t){return t.isNode()}));return t?e.filter(t):e},edges:function(t){var e=this.$((function(t){return t.isEdge()}));return t?e.filter(t):e},$:function(t){var e=this._private.elements;return t?e.filter(t):e.spawnSelf()},mutableElements:function(){return this._private.elements}};To.elements=To.filter=To.$;var Ao={};Ao.apply=function(t){var e=this._private,n=e.cy.collection();e.newStyle&&(e.contextStyles={},e.propDiffs={},this.cleanElements(t,!0));for(var r=0;r0;if(f||l&&h){var d=void 0;f&&h||f?d=u.properties:h&&(d=u.mappedProperties);for(var p=0;p1&&(g=1),s.color){var m=i.valueMin[0],x=i.valueMax[0],_=i.valueMin[1],k=i.valueMax[1],S=i.valueMin[2],C=i.valueMax[2],T=null==i.valueMin[3]?1:i.valueMin[3],A=null==i.valueMax[3]?1:i.valueMax[3],N=[Math.round(m+(x-m)*g),Math.round(_+(k-_)*g),Math.round(S+(C-S)*g),Math.round(T+(A-T)*g)];n={bypass:i.bypass,name:i.name,value:N,strValue:"rgb("+N[0]+", "+N[1]+", "+N[2]+")"}}else{if(!s.number)return!1;var O=i.valueMin+(i.valueMax-i.valueMin)*g;n=this.parse(i.name,O,i.bypass,"mapping")}if(!n)return p(),!1;n.mapping=i,i=n;break;case a.data:for(var L=i.field.split("."),P=f.data,I=0;I0&&o>0){for(var s={},u=!1,c=0;c0?t.delayAnimation(a).play().promise().then(e):e()})).then((function(){return t.animation({style:s,duration:o,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()})).then((function(){n.removeBypasses(t,i),t.emitAndNotify("style"),r.transitioning=!1}))}else r.transitioning&&(this.removeBypasses(t,i),t.emitAndNotify("style"),r.transitioning=!1)},Ao.checkTrigger=function(t,e,n,r,i,o){var a=this.properties[e],s=i(a);null!=s&&s(n,r)&&o(a)},Ao.checkZOrderTrigger=function(t,e,n,r){var i=this;this.checkTrigger(t,e,n,r,(function(t){return t.triggersZOrder}),(function(){i._private.cy.notify("zorder",t)}))},Ao.checkBoundsTrigger=function(t,e,n,r){this.checkTrigger(t,e,n,r,(function(t){return t.triggersBounds}),(function(i){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache(),"bezier"!==t.pstyle("curve-style").value&&("curve-style"!==e||"bezier"!==n&&"bezier"!==r)||!i.triggersBoundsOfParallelBeziers||t.parallelEdges().forEach((function(t){t.isBundledBezier()&&t.dirtyBoundingBoxCache()}))}))},Ao.checkTriggers=function(t,e,n,r){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,n,r),this.checkBoundsTrigger(t,e,n,r)};var No={applyBypass:function(t,e,n,r){var i=[];if("*"===e||"**"===e){if(void 0!==n)for(var o=0;oe.length?i.substr(e.length):""}function a(){n=n.length>r.length?n.substr(r.length):""}for(i=i.replace(/[/][*](\s|.)+?[*][/]/g,"");;){if(i.match(/^\s*$/))break;var s=i.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!s){pt("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+i);break}e=s[0];var u=s[1];if("core"!==u)if(new Tr(u).invalid){pt("Skipping parsing of block: Invalid selector found in string stylesheet: "+u),o();continue}var c=s[2],l=!1;n=c;for(var f=[];;){if(n.match(/^\s*$/))break;var h=n.match(/^\s*(.+?)\s*:\s*(.+?)\s*;/);if(!h){pt("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+c),l=!0;break}r=h[0];var d=h[1],p=h[2];if(this.properties[d])this.parse(d,p)?(f.push({name:d,val:p}),a()):(pt("Skipping property: Invalid property definition in: "+r),a());else pt("Skipping property: Invalid property name in: "+r),a()}if(l){o();break}this.selector(u);for(var g=0;g=7&&"d"===e[0]&&(u=new RegExp(a.data.regex).exec(e))){if(n)return!1;var f=a.data;return{name:t,value:u,strValue:""+e,mapped:f,field:u[1],bypass:n}}if(e.length>=10&&"m"===e[0]&&(c=new RegExp(a.mapData.regex).exec(e))){if(n)return!1;if(l.multiple)return!1;var h=a.mapData;if(!l.color&&!l.number)return!1;var d=this.parse(t,c[4]);if(!d||d.mapped)return!1;var p=this.parse(t,c[5]);if(!p||p.mapped)return!1;if(d.pfValue===p.pfValue||d.strValue===p.strValue)return pt("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+d.strValue+"`"),this.parse(t,d.strValue);if(l.color){var g=d.value,v=p.value;if(!(g[0]!==v[0]||g[1]!==v[1]||g[2]!==v[2]||g[3]!==v[3]&&(null!=g[3]&&1!==g[3]||null!=v[3]&&1!==v[3])))return!1}return{name:t,value:c,strValue:""+e,mapped:h,field:c[1],fieldMin:parseFloat(c[2]),fieldMax:parseFloat(c[3]),valueMin:d.value,valueMax:p.value,bypass:n}}}if(l.multiple&&"multiple"!==r){var b;if(b=s?e.split(/\s+/):x(e)?e:[e],l.evenMultiple&&b.length%2!=0)return null;for(var y=[],_=[],k=[],S="",C=!1,T=0;T0?" ":"")+A.strValue}return l.validate&&!l.validate(y,_)?null:l.singleEnum&&C?1===y.length&&w(y[0])?{name:t,value:y[0],strValue:y[0],bypass:n}:null:{name:t,value:y,pfValue:k,strValue:S,bypass:n,units:_}}var N,O,L=function(){for(var r=0;rl.max||l.strictMax&&e===l.max))return null;var B={name:t,value:e,strValue:""+e+(P||""),units:P,bypass:n};return l.unitless||"px"!==P&&"em"!==P?B.pfValue=e:B.pfValue="px"!==P&&P?this.getEmSizeInPixels()*e:e,"ms"!==P&&"s"!==P||(B.pfValue="ms"===P?e:1e3*e),"deg"!==P&&"rad"!==P||(B.pfValue="rad"===P?e:(N=e,Math.PI*N/180)),"%"===P&&(B.pfValue=e/100),B}if(l.propList){var G=[],F=""+e;if("none"===F);else{for(var z=F.split(/\s*,\s*|\s+/),Y=0;Y0&&u>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:a=(a=(a=Math.min((s-2*e)/n.w,(u-2*e)/n.h))>this._private.maxZoom?this._private.maxZoom:a)=n.minZoom&&(n.maxZoom=e),this},minZoom:function(t){return void 0===t?this._private.minZoom:this.zoomRange({min:t})},maxZoom:function(t){return void 0===t?this._private.maxZoom:this.zoomRange({max:t})},getZoomedViewport:function(t){var e,n,r=this._private,i=r.pan,o=r.zoom,a=!1;if(r.zoomingEnabled||(a=!0),E(t)?n=t:_(t)&&(n=t.level,null!=t.position?e=Yt(t.position,o,i):null!=t.renderedPosition&&(e=t.renderedPosition),null==e||r.panningEnabled||(a=!0)),n=(n=n>r.maxZoom?r.maxZoom:n)e.maxZoom||!e.zoomingEnabled?o=!0:(e.zoom=s,i.push("zoom"))}if(r&&(!o||!t.cancelOnFailedZoom)&&e.panningEnabled){var u=t.pan;E(u.x)&&(e.pan.x=u.x,a=!1),E(u.y)&&(e.pan.y=u.y,a=!1),a||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(t){var e=this.getCenterPan(t);return e&&(this._private.pan=e,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(t,e){if(this._private.panningEnabled){if(w(t)){var n=t;t=this.mutableElements().filter(n)}else S(t)||(t=this.mutableElements());if(0!==t.length){var r=t.boundingBox(),i=this.width(),o=this.height();return{x:(i-(e=void 0===e?this._private.zoom:e)*(r.x1+r.x2))/2,y:(o-e*(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 t,e,n=this._private,r=n.container;return n.sizeCache=n.sizeCache||(r?(t=h.getComputedStyle(r),e=function(e){return parseFloat(t.getPropertyValue(e))},{width:r.clientWidth-e("padding-left")-e("padding-right"),height:r.clientHeight-e("padding-top")-e("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var t=this._private.pan,e=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-t.x)/e,x2:(n.x2-t.x)/e,y1:(n.y1-t.y)/e,y2:(n.y2-t.y)/e};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var t=this.width(),e=this.height();return{x1:0,y1:0,x2:t,y2:e,w:t,h:e}}};Go.centre=Go.center,Go.autolockNodes=Go.autolock,Go.autoungrabifyNodes=Go.autoungrabify;var Ho={data:Vn.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0}),removeData:Vn.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0}),scratch:Vn.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0}),removeScratch:Vn.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0})};Ho.attr=Ho.data,Ho.removeAttr=Ho.removeData;var Fo=function(t){var e=this,n=(t=G({},t)).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=e;var o=void 0!==h&&void 0!==n&&!t.headless,a=t;a.layout=G({name:o?"grid":"null"},a.layout),a.renderer=G({name:o?"canvas":"null"},a.renderer);var s=function(t,e,n){return void 0!==e?e:void 0!==n?n:t},u=this._private={container:n,ready:!1,options:a,elements:new io(this),listeners:[],aniEles:new io(this),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:E(a.zoom)?a.zoom:1,pan:{x:_(a.pan)&&E(a.pan.x)?a.pan.x:0,y:_(a.pan)&&E(a.pan.y)?a.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1};this.createEmitter(),this.selectionType(a.selectionType),this.zoomRange({min:a.minZoom,max:a.maxZoom});u.styleEnabled&&e.setStyle([]);var c=G({},a,a.renderer);e.initRenderer(c);!function(t,e){if(t.some(L))return Fn.all(t).then(e);e(t)}([a.style,a.elements],(function(t){var n=t[0],o=t[1];u.styleEnabled&&e.style().append(n),function(t,n,r){e.notifications(!1);var i=e.mutableElements();i.length>0&&i.remove(),null!=t&&(_(t)||x(t))&&e.add(t),e.one("layoutready",(function(t){e.notifications(!0),e.emit(t),e.one("load",n),e.emitAndNotify("load")})).one("layoutstop",(function(){e.one("done",r),e.emit("done")}));var o=G({},e._private.options.layout);o.eles=e.elements(),e.layout(o).run()}(o,(function(){e.startAnimationLoop(),u.ready=!0,m(a.ready)&&e.on("ready",a.ready);for(var t=0;t0,c=ee(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(S(n.roots))t=n.roots;else if(x(n.roots)){for(var l=[],f=0;f0;){var P=N.shift(),I=A(P,O);if(I)P.outgoers().filter((function(t){return t.isNode()&&i.has(t)})).forEach(L);else if(null===I){pt("Detected double maximal shift for node `"+P.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}T();var j=0;if(n.avoidOverlap)for(var M=0;M0&&b[0].length<=3?u/2:0),f=2*Math.PI/b[r].length*i;return 0===r&&1===b[0].length&&(l=1),{x:W+l*Math.cos(f),y:$+l*Math.sin(f)}}return{x:W+(i+1-(o+1)/2)*a,y:(r+1)*s}})),this};var Xo={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(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function Wo(t){this.options=G({},Xo,t)}Wo.prototype.run=function(){var t=this.options,e=t,n=t.cy,r=e.eles,i=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise,o=r.nodes().not(":parent");e.sort&&(o=o.sort(e.sort));for(var a,s=ee(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),u=s.x1+s.w/2,c=s.y1+s.h/2,l=(void 0===e.sweep?2*Math.PI-2*Math.PI/o.length:e.sweep)/Math.max(1,o.length-1),f=0,h=0;h1&&e.avoidOverlap){f*=1.75;var v=Math.cos(l)-Math.cos(0),b=Math.sin(l)-Math.sin(0),y=Math.sqrt(f*f/(v*v+b*b));a=Math.max(y,a)}return o.layoutPositions(this,e,(function(t,n){var r=e.startAngle+n*l*(i?1:-1),o=a*Math.cos(r),s=a*Math.sin(r);return{x:u+o,y:c+s}})),this};var $o,Ko={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(t){return t.degree()},levelWidth:function(t){return t.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function Zo(t){this.options=G({},Ko,t)}Zo.prototype.run=function(){for(var t=this.options,e=t,n=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise,r=t.cy,i=e.eles.nodes().not(":parent"),o=ee(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),a=o.x1+o.w/2,s=o.y1+o.h/2,u=[],c=0,l=0;l0)Math.abs(b[0].value-w.value)>=g&&(b=[],v.push(b));b.push(w)}var m=c+e.minNodeSpacing;if(!e.avoidOverlap){var x=v.length>0&&v[0].length>1,_=(Math.min(o.w,o.h)/2-m)/(v.length+x?1:0);m=Math.min(m,_)}for(var E=0,k=0;k1&&e.avoidOverlap){var A=Math.cos(T)-Math.cos(0),N=Math.sin(T)-Math.sin(0),O=Math.sqrt(m*m/(A*A+N*N));E=Math.max(O,E)}S.r=E,E+=m}if(e.equidistant){for(var L=0,P=0,I=0;I=t.numIter)&&(aa(r,t),r.temperature=r.temperature*t.coolingFactor,!(r.temperature=t.animationThreshold&&o(),X(e)):(ya(r,t),s())}()}else{for(;c;)c=a(u),u++;ya(r,t),s()}return this},Jo.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},Jo.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var ta=function(t,e,n){for(var r=n.eles.edges(),i=n.eles.nodes(),o={isCompound:t.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:t.width(),clientHeight:t.width(),boundingBox:ee(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()})},a=n.eles.components(),s={},u=0;u0){o.graphSet.push(x);for(u=0;ur.count?0:r.graph},na=function t(e,n,r,i){var o=i.graphSet[r];if(-10)var s=(c=r.nodeOverlap*a)*i/(g=Math.sqrt(i*i+o*o)),u=c*o/g;else{var c,l=fa(t,i,o),f=fa(e,-1*i,-1*o),h=f.x-l.x,d=f.y-l.y,p=h*h+d*d,g=Math.sqrt(p);s=(c=(t.nodeRepulsion+e.nodeRepulsion)/p)*h/g,u=c*d/g}t.isLocked||(t.offsetX-=s,t.offsetY-=u),e.isLocked||(e.offsetX+=s,e.offsetY+=u)}},la=function(t,e,n,r){if(n>0)var i=t.maxX-e.minX;else i=e.maxX-t.minX;if(r>0)var o=t.maxY-e.minY;else o=e.maxY-t.minY;return i>=0&&o>=0?Math.sqrt(i*i+o*o):0},fa=function(t,e,n){var r=t.positionX,i=t.positionY,o=t.height||1,a=t.width||1,s=n/e,u=o/a,c={};return 0===e&&0n?(c.x=r,c.y=i+o/2,c):0e&&-1*u<=s&&s<=u?(c.x=r-a/2,c.y=i-a*n/2/e,c):0=u)?(c.x=r+o*e/2/n,c.y=i+o/2,c):0>n&&(s<=-1*u||s>=u)?(c.x=r-o*e/2/n,c.y=i-o/2,c):c},ha=function(t,e){for(var n=0;n1){var p=e.gravity*f/d,g=e.gravity*h/d;l.offsetX+=p,l.offsetY+=g}}}}},pa=function(t,e){var n=[],r=0,i=-1;for(n.push.apply(n,t.graphSet[0]),i+=t.graphSet[0].length;r<=i;){var o=n[r++],a=t.idToIndex[o],s=t.layoutNodes[a],u=s.children;if(0n)var i={x:n*t/r,y:n*e/r};else i={x:t,y:e};return i},ba=function t(e,n){var r=e.parentId;if(null!=r){var i=n.layoutNodes[n.idToIndex[r]],o=!1;return(null==i.maxX||e.maxX+i.padRight>i.maxX)&&(i.maxX=e.maxX+i.padRight,o=!0),(null==i.minX||e.minX-i.padLefti.maxY)&&(i.maxY=e.maxY+i.padBottom,o=!0),(null==i.minY||e.minY-i.padTopp&&(f+=d+e.componentSpacing,l=0,h=0,d=0)}}},wa={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(t){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function ma(t){this.options=G({},wa,t)}ma.prototype.run=function(){var t=this.options,e=t,n=t.cy,r=e.eles.nodes().not(":parent");e.sort&&(r=r.sort(e.sort));var i=ee(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===i.h||0===i.w)r.layoutPositions(this,e,(function(t){return{x:i.x1,y:i.y1}}));else{var o=r.size(),a=Math.sqrt(o*i.h/i.w),s=Math.round(a),u=Math.round(i.w/i.h*a),c=function(t){if(null==t)return Math.min(s,u);Math.min(s,u)==s?s=t:u=t},l=function(t){if(null==t)return Math.max(s,u);Math.max(s,u)==s?s=t:u=t},f=e.rows,h=null!=e.cols?e.cols:e.columns;if(null!=f&&null!=h)s=f,u=h;else if(null!=f&&null==h)s=f,u=Math.ceil(o/s);else if(null==f&&null!=h)u=h,s=Math.ceil(o/u);else if(u*s>o){var d=c(),p=l();(d-1)*p>=o?c(d-1):(p-1)*d>=o&&l(p-1)}else for(;u*s=o?l(v+1):c(g+1)}var b=i.w/u,y=i.h/s;if(e.condense&&(b=0,y=0),e.avoidOverlap)for(var w=0;w=u&&(O=0,N++)},P={},I=0;I(r=pe(t,e,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=de(t,e,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 _=a.getArrowWidth(u,l),E=[{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(t,e,n){return _t(t,e,n)}function m(n,r){var i,o=n._private,a=p;i=r?r+"-":"",n.boundingBox();var s=o.labelBounds[r||"main"],u=n.pstyle(i+"label").value;if("yes"===n.pstyle("text-events").strValue&&u){var c=o.rstyle,l=w(c,"labelX",r),f=w(c,"labelY",r),h=w(o.rscratch,"labelAngle",r),d=s.x1-a,g=s.x2+a,b=s.y1-a,y=s.y2+a;if(h){var m=Math.cos(h),x=Math.sin(h),_=function(t,e){return{x:(t-=l)*m-(e-=f)*x+l,y:t*x+e*m+f}},E=_(d,b),k=_(d,y),S=_(g,b),C=_(g,y),T=[E.x,E.y,S.x,S.y,C.x,C.y,k.x,k.y];if(ge(t,e,T))return v(n),!0}else if(ue(s,t,e))return v(n),!0}}n&&(u=u.interactive);for(var x=u.length-1;x>=0;x--){var _=u[x];_.isNode()?b(_)||m(_):y(_)||m(_)||m(_,"source")||m(_,"target")}return c},getAllInBox:function(t,e,n,r){for(var i,o,a=this.getCachedZSortedEles().interactive,s=[],u=Math.min(t,n),c=Math.max(t,n),l=Math.min(e,r),f=Math.max(e,r),h=ee({x1:t=u,y1:e=l,x2:n=c,y2:r=f}),d=0;d0?Math.max(t-e,0):Math.min(t+e,0)},x=m(y,v),_=m(w,b),E=!1;"auto"===l?c=Math.abs(x)>Math.abs(_)?"horizontal":"vertical":"upward"===l||"downward"===l?(c="vertical",E=!0):"leftward"!==l&&"rightward"!==l||(c="horizontal",E=!0);var k,S="vertical"===c,C=S?_:x,T=S?w:y,A=Wt(T),N=!1;(E&&(h||p)||!("downward"===l&&T<0||"upward"===l&&T>0||"leftward"===l&&T>0||"rightward"===l&&T<0)||(C=(A*=-1)*Math.abs(C),N=!0),h)?k=(d<0?1+d:d)*C:k=(d<0?C:0)+d*A;var O=function(t){return Math.abs(t)=Math.abs(C)},L=O(k),P=O(Math.abs(C)-Math.abs(k));if((L||P)&&!N)if(S){var I=Math.abs(T)<=o/2,j=Math.abs(y)<=a/2;if(I){var M=(r.x1+r.x2)/2,D=r.y1,R=r.y2;n.segpts=[M,D,M,R]}else if(j){var B=(r.y1+r.y2)/2,G=r.x1,H=r.x2;n.segpts=[G,B,H,B]}else n.segpts=[r.x1,r.y2]}else{var F=Math.abs(T)<=i/2,z=Math.abs(w)<=s/2;if(F){var Y=(r.y1+r.y2)/2,V=r.x1,q=r.x2;n.segpts=[V,Y,q,Y]}else if(z){var U=(r.x1+r.x2)/2,X=r.y1,W=r.y2;n.segpts=[U,X,U,W]}else n.segpts=[r.x2,r.y1]}else if(S){var $=r.y1+k+(u?o/2*A:0),K=r.x1,Z=r.x2;n.segpts=[K,$,Z,$]}else{var Q=r.x1+k+(u?i/2*A:0),J=r.y1,tt=r.y2;n.segpts=[Q,J,Q,tt]}},ja.tryToCorrectInvalidPoints=function(t,e){var n=t._private.rscratch;if("bezier"===n.edgeType){var r=e.srcPos,i=e.tgtPos,o=e.srcW,a=e.srcH,s=e.tgtW,u=e.tgtH,c=e.srcShape,l=e.tgtShape,f=!E(n.startX)||!E(n.startY),h=!E(n.arrowStartX)||!E(n.arrowStartY),d=!E(n.endX)||!E(n.endY),p=!E(n.arrowEndX)||!E(n.arrowEndY),g=3*(this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth),v=$t({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),b=vh.poolIndex()){var d=f;f=h,h=d}var p=s.srcPos=f.position(),g=s.tgtPos=h.position(),v=s.srcW=f.outerWidth(),b=s.srcH=f.outerHeight(),y=s.tgtW=h.outerWidth(),w=s.tgtH=h.outerHeight(),m=s.srcShape=n.nodeShapes[e.getNodeShape(f)],x=s.tgtShape=n.nodeShapes[e.getNodeShape(h)];s.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var _=0;_0){var z=c,Y=Kt(z,qt(e)),V=Kt(z,qt(F)),q=Y;if(V2)Kt(z,{x:F[2],y:F[3]})0){var it=l,ot=Kt(it,qt(e)),at=Kt(it,qt(rt)),st=ot;if(at2)Kt(it,{x:rt[2],y:rt[3]})=l||w){f={cp:v,segment:y};break}}if(f)break}var m=f.cp,x=f.segment,_=(l-d)/x.length,E=x.t1-x.t0,k=c?x.t0+E*_:x.t1-E*_;k=te(0,k,1),e=Jt(m.p0,m.p1,m.p2,k),u=function(t,e,n,r){var i=te(0,r-.001,1),o=te(0,r+.001,1),a=Jt(t,e,n,i),s=Jt(t,e,n,o);return Fa(a,s)}(m.p0,m.p1,m.p2,k);break;case"straight":case"segments":case"haystack":for(var S,C,T,A,N=0,O=r.allpts.length,L=0;L+3=l));L+=2);var P=(l-C)/S;P=te(0,P,1),e=function(t,e,n,r){var i=e.x-t.x,o=e.y-t.y,a=$t(t,e),s=i/a,u=o/a;return n=null==n?0:n,r=null!=r?r:n*a,{x:t.x+s*r,y:t.y+u*r}}(T,A,P),u=Fa(T,A)}a("labelX",s,e.x),a("labelY",s,e.y),a("labelAutoAngle",s,u)}};u("source"),u("target"),this.applyLabelDimensions(t)}},Ga.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))},Ga.applyPrefixedLabelDimensions=function(t,e){var n=t._private,r=this.getLabelText(t,e),i=this.calculateLabelDimensions(t,r),o=t.pstyle("line-height").pfValue,a=t.pstyle("text-wrap").strValue,s=_t(n.rscratch,"labelWrapCachedLines",e)||[],u="wrap"!==a?1:Math.max(s.length,1),c=i.height/u,l=c*o,f=i.width,h=i.height+(u-1)*(o-1)*c;Et(n.rstyle,"labelWidth",e,f),Et(n.rscratch,"labelWidth",e,f),Et(n.rstyle,"labelHeight",e,h),Et(n.rscratch,"labelHeight",e,h),Et(n.rscratch,"labelLineHeight",e,l)},Ga.getLabelText=function(t,e){var n=t._private,r=e?e+"-":"",i=t.pstyle(r+"label").strValue,o=t.pstyle("text-transform").value,a=function(t,r){return r?(Et(n.rscratch,t,e,r),r):_t(n.rscratch,t,e)};if(!i)return"";"none"==o||("uppercase"==o?i=i.toUpperCase():"lowercase"==o&&(i=i.toLowerCase()));var s=t.pstyle("text-wrap").value;if("wrap"===s){var u=a("labelKey");if(null!=u&&a("labelWrapKey")===u)return a("labelWrapCachedText");for(var c=i.split("\n"),l=t.pstyle("text-max-width").pfValue,f="anywhere"===t.pstyle("text-overflow-wrap").value,h=[],d=/[\s\u200b]+/,p=f?"":" ",g=0;gl){for(var w=v.split(d),m="",x=0;xk)break;S+=i[T],T===i.length-1&&(C=!0)}return C||(S+="…"),S}return i},Ga.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,n=t.pstyle("text-halign").strValue;if("auto"!==e)return e;if(!t.isNode())return"center";switch(n){case"left":return"right";case"right":return"left";default:return"center"}},Ga.calculateLabelDimensions=function(t,e){var n=et(e,t._private.labelDimsKey),r=this.labelDimCache||(this.labelDimCache=[]),i=r[n];if(null!=i)return i;var o=t.pstyle("font-style").strValue,a=1*t.pstyle("font-size").pfValue+"px",s=t.pstyle("font-family").strValue,u=t.pstyle("font-weight").strValue,c=this.labelCalcDiv;c||(c=this.labelCalcDiv=document.createElement("div"),document.body.appendChild(c));var l=c.style;return l.fontFamily=s,l.fontStyle=o,l.fontSize=a,l.fontWeight=u,l.position="absolute",l.left="-9999px",l.top="-9999px",l.zIndex="-1",l.visibility="hidden",l.pointerEvents="none",l.padding="0",l.lineHeight="1",l.whiteSpace="pre",c.textContent=e,r[n]={width:Math.ceil(c.clientWidth/1),height:Math.ceil(c.clientHeight/1)}},Ga.calculateLabelAngle=function(t,e){var n=t._private.rscratch,r=t.isEdge(),i=e?e+"-":"",o=t.pstyle(i+"text-rotation"),a=o.strValue;return"none"===a?0:r&&"autorotate"===a?n.labelAutoAngle:"autorotate"===a?0:o.pfValue},Ga.calculateLabelAngles=function(t){var e=this,n=t.isEdge(),r=t._private.rscratch;r.labelAngle=e.calculateLabelAngle(t),n&&(r.sourceLabelAngle=e.calculateLabelAngle(t,"source"),r.targetLabelAngle=e.calculateLabelAngle(t,"target"))};var za={},Ya=!1;za.getNodeShape=function(t){var e=t.pstyle("shape").value;if("cutrectangle"===e&&(t.width()<28||t.height()<28))return Ya||(pt("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),Ya=!0),"rectangle";if(t.isParent())return"rectangle"===e||"roundrectangle"===e||"round-rectangle"===e||"cutrectangle"===e||"cut-rectangle"===e||"barrel"===e?e:"rectangle";if("polygon"===e){var n=t.pstyle("shape-polygon-points").value;return this.nodeShapes.makePolygon(n).name}return e};var Va={registerCalculationListeners:function(){var t=this.cy,e=t.collection(),n=this,r=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.merge(t),n)for(var r=0;r=t.desktopTapThreshold2}var T=r(e);v&&(t.hoverData.tapholdCancelled=!0);i=!0,n(g,["mousemove","vmousemove","tapdrag"],e,{x:l[0],y:l[1]});var A=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||a.emit({originalEvent:e,type:"boxstart",position:{x:l[0],y:l[1]}}),p[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()};if(3===t.hoverData.which){if(v){var N={originalEvent:e,type:"cxtdrag",position:{x:l[0],y:l[1]}};w?w.emit(N):a.emit(N),t.hoverData.cxtDragged=!0,t.hoverData.cxtOver&&g===t.hoverData.cxtOver||(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit({originalEvent:e,type:"cxtdragout",position:{x:l[0],y:l[1]}}),t.hoverData.cxtOver=g,g&&g.emit({originalEvent:e,type:"cxtdragover",position:{x:l[0],y:l[1]}}))}}else if(t.hoverData.dragging){if(i=!0,a.panningEnabled()&&a.userPanningEnabled()){var O;if(t.hoverData.justStartedPan){var L=t.hoverData.mdownPos;O={x:(l[0]-L[0])*s,y:(l[1]-L[1])*s},t.hoverData.justStartedPan=!1}else O={x:m[0]*s,y:m[1]*s};a.panBy(O),t.hoverData.dragged=!0}l=t.projectIntoViewport(e.clientX,e.clientY)}else if(1!=p[4]||null!=w&&!w.pannable()){if(w&&w.pannable()&&w.active()&&w.unactivate(),w&&w.grabbed()||g==b||(b&&n(b,["mouseout","tapdragout"],e,{x:l[0],y:l[1]}),g&&n(g,["mouseover","tapdragover"],e,{x:l[0],y:l[1]}),t.hoverData.last=g),w)if(v){if(a.boxSelectionEnabled()&&T)w&&w.grabbed()&&(f(x),w.emit("freeon"),x.emit("free"),t.dragData.didDrag&&(w.emit("dragfreeon"),x.emit("dragfree"))),A();else if(w&&w.grabbed()&&t.nodeIsDraggable(w)){var P=!t.dragData.didDrag;P&&t.redrawHint("eles",!0),t.dragData.didDrag=!0;var I=a.collection();t.hoverData.draggingEles||c(x,{inDragLayer:!0});var j={x:0,y:0};if(E(m[0])&&E(m[1])&&(j.x+=m[0],j.y+=m[1],P)){var M=t.hoverData.dragDelta;M&&E(M[0])&&E(M[1])&&(j.x+=M[0],j.y+=M[1])}for(var D=0;D0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=c=o.collection()),u!=l||t.dragData.didDrag||t.hoverData.selecting||null!=u&&u._private.selectable&&(t.hoverData.dragging||("additive"===o.selectionType()||h?u.selected()?u.unselect(["tapunselect"]):u.select(["tapselect"]):h||(o.$(e).unmerge(u).unselect(["tapunselect"]),u.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var g=o.collection(t.getAllInBox(s[0],s[1],s[2],s[3]));t.redrawHint("select",!0),g.length>0&&t.redrawHint("eles",!0),o.emit({type:"boxend",originalEvent:i,position:{x:a[0],y:a[1]}});var v=function(t){return t.selectable()&&!t.selected()};"additive"===o.selectionType()||h||o.$(e).unmerge(g).unselect(),g.emit("box").stdFilter(v).select().emit("boxselect"),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!s[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var b=l&&l.grabbed();f(c),b&&(l.emit("freeon"),c.emit("free"),t.dragData.didDrag&&(l.emit("dragfreeon"),c.emit("dragfree")))}}s[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null}}),!1);var w,m,x,_,k,S,C,T,A,N,O,L,P,I=function(e){if(!t.scrollingPage){var n=t.cy,r=n.zoom(),i=n.pan(),o=t.projectIntoViewport(e.clientX,e.clientY),a=[o[0]*r+i.x,o[1]*r+i.y];if(t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.cxtStarted||0!==t.selection[4])e.preventDefault();else if(n.panningEnabled()&&n.userPanningEnabled()&&n.zoomingEnabled()&&n.userZoomingEnabled()){var s;e.preventDefault(),t.data.wheelZooming=!0,clearTimeout(t.data.wheelTimeout),t.data.wheelTimeout=setTimeout((function(){t.data.wheelZooming=!1,t.redrawHint("eles",!0),t.redraw()}),150),s=null!=e.deltaY?e.deltaY/-250:null!=e.wheelDeltaY?e.wheelDeltaY/1e3:e.wheelDelta/1e3,s*=t.wheelSensitivity,1===e.deltaMode&&(s*=33);var u=n.zoom()*Math.pow(10,s);"gesturechange"===e.type&&(u=t.gestureStartZoom*e.scale),n.zoom({level:u,renderedPosition:{x:a[0],y:a[1]}})}}};t.registerBinding(t.container,"wheel",I,!0),t.registerBinding(window,"scroll",(function(e){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout((function(){t.scrollingPage=!1}),250)}),!0),t.registerBinding(t.container,"gesturestart",(function(e){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||e.preventDefault()}),!0),t.registerBinding(t.container,"gesturechange",(function(e){t.hasTouchStarted||I(e)}),!0),t.registerBinding(t.container,"mouseout",(function(e){var n=t.projectIntoViewport(e.clientX,e.clientY);t.cy.emit({originalEvent:e,type:"mouseout",position:{x:n[0],y:n[1]}})}),!1),t.registerBinding(t.container,"mouseover",(function(e){var n=t.projectIntoViewport(e.clientX,e.clientY);t.cy.emit({originalEvent:e,type:"mouseover",position:{x:n[0],y:n[1]}})}),!1);var j,M,D,R,B=function(t,e,n,r){return Math.sqrt((n-t)*(n-t)+(r-e)*(r-e))},G=function(t,e,n,r){return(n-t)*(n-t)+(r-e)*(r-e)};if(t.registerBinding(t.container,"touchstart",j=function(e){if(t.hasTouchStarted=!0,y(e)){d(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var r=t.cy,i=t.touchData.now,o=t.touchData.earlier;if(e.touches[0]){var a=t.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY);i[0]=a[0],i[1]=a[1]}if(e.touches[1]){a=t.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY);i[2]=a[0],i[3]=a[1]}if(e.touches[2]){a=t.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY);i[4]=a[0],i[5]=a[1]}if(e.touches[1]){t.touchData.singleTouchMoved=!0,f(t.dragData.touchDragEles);var u=t.findContainerClientCoords();A=u[0],N=u[1],O=u[2],L=u[3],w=e.touches[0].clientX-A,m=e.touches[0].clientY-N,x=e.touches[1].clientX-A,_=e.touches[1].clientY-N,P=0<=w&&w<=O&&0<=x&&x<=O&&0<=m&&m<=L&&0<=_&&_<=L;var h=r.pan(),p=r.zoom();k=B(w,m,x,_),S=G(w,m,x,_),T=[((C=[(w+x)/2,(m+_)/2])[0]-h.x)/p,(C[1]-h.y)/p];if(S<4e4&&!e.touches[2]){var g=t.findNearestElement(i[0],i[1],!0,!0),v=t.findNearestElement(i[2],i[3],!0,!0);return g&&g.isNode()?(g.activate().emit({originalEvent:e,type:"cxttapstart",position:{x:i[0],y:i[1]}}),t.touchData.start=g):v&&v.isNode()?(v.activate().emit({originalEvent:e,type:"cxttapstart",position:{x:i[0],y:i[1]}}),t.touchData.start=v):r.emit({originalEvent:e,type:"cxttapstart",position:{x:i[0],y:i[1]}}),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!0,t.touchData.cxtDragged=!1,t.data.bgActivePosistion=void 0,void t.redraw()}}if(e.touches[2])r.boxSelectionEnabled()&&e.preventDefault();else if(e.touches[1]);else if(e.touches[0]){var b=t.findNearestElements(i[0],i[1],!0,!0),E=b[0];if(null!=E&&(E.activate(),t.touchData.start=E,t.touchData.starts=b,t.nodeIsGrabbable(E))){var I=t.dragData.touchDragEles=r.collection(),j=null;t.redrawHint("eles",!0),t.redrawHint("drag",!0),E.selected()?(j=r.$((function(e){return e.selected()&&t.nodeIsGrabbable(e)})),c(j,{addToList:I})):l(E,{addToList:I}),s(E);var M=function(t){return{originalEvent:e,type:t,position:{x:i[0],y:i[1]}}};E.emit(M("grabon")),j?j.forEach((function(t){t.emit(M("grab"))})):E.emit(M("grab"))}n(E,["touchstart","tapstart","vmousedown"],e,{x:i[0],y:i[1]}),null==E&&(t.data.bgActivePosistion={x:a[0],y:a[1]},t.redrawHint("select",!0),t.redraw()),t.touchData.singleTouchMoved=!1,t.touchData.singleTouchStartTime=+new Date,clearTimeout(t.touchData.tapholdTimeout),t.touchData.tapholdTimeout=setTimeout((function(){!1!==t.touchData.singleTouchMoved||t.pinching||t.touchData.selecting||n(t.touchData.start,["taphold"],e,{x:i[0],y:i[1]})}),t.tapholdDuration)}if(e.touches.length>=1){for(var D=t.touchData.startPosition=[],R=0;R=t.touchTapThreshold2}if(r&&t.touchData.cxt){e.preventDefault();var L=e.touches[0].clientX-A,I=e.touches[0].clientY-N,j=e.touches[1].clientX-A,M=e.touches[1].clientY-N,D=G(L,I,j,M);if(D/S>=2.25||D>=22500){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var R={originalEvent:e,type:"cxttapend",position:{x:s[0],y:s[1]}};t.touchData.start?(t.touchData.start.unactivate().emit(R),t.touchData.start=null):a.emit(R)}}if(r&&t.touchData.cxt){R={originalEvent:e,type:"cxtdrag",position:{x:s[0],y:s[1]}};t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit(R):a.emit(R),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var H=t.findNearestElement(s[0],s[1],!0,!0);t.touchData.cxtOver&&H===t.touchData.cxtOver||(t.touchData.cxtOver&&t.touchData.cxtOver.emit({originalEvent:e,type:"cxtdragout",position:{x:s[0],y:s[1]}}),t.touchData.cxtOver=H,H&&H.emit({originalEvent:e,type:"cxtdragover",position:{x:s[0],y:s[1]}}))}else if(r&&e.touches[2]&&a.boxSelectionEnabled())e.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||a.emit({originalEvent:e,type:"boxstart",position:{x:s[0],y:s[1]}}),t.touchData.selecting=!0,t.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),t.redrawHint("select",!0),t.redraw();else if(r&&e.touches[1]&&!t.touchData.didSelect&&a.zoomingEnabled()&&a.panningEnabled()&&a.userZoomingEnabled()&&a.userPanningEnabled()){if(e.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),tt=t.dragData.touchDragEles){t.redrawHint("drag",!0);for(var F=0;F0&&!t.hoverData.draggingEles&&!t.swipePanning&&null!=t.data.bgActivePosistion&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},!1),t.registerBinding(window,"touchcancel",D=function(e){var n=t.touchData.start;t.touchData.capture=!1,n&&n.unactivate()}),t.registerBinding(window,"touchend",R=function(r){var i=t.touchData.start;if(t.touchData.capture){0===r.touches.length&&(t.touchData.capture=!1),r.preventDefault();var o=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var a,s=t.cy,u=s.zoom(),c=t.touchData.now,l=t.touchData.earlier;if(r.touches[0]){var h=t.projectIntoViewport(r.touches[0].clientX,r.touches[0].clientY);c[0]=h[0],c[1]=h[1]}if(r.touches[1]){h=t.projectIntoViewport(r.touches[1].clientX,r.touches[1].clientY);c[2]=h[0],c[3]=h[1]}if(r.touches[2]){h=t.projectIntoViewport(r.touches[2].clientX,r.touches[2].clientY);c[4]=h[0],c[5]=h[1]}if(i&&i.unactivate(),t.touchData.cxt){if(a={originalEvent:r,type:"cxttapend",position:{x:c[0],y:c[1]}},i?i.emit(a):s.emit(a),!t.touchData.cxtDragged){var d={originalEvent:r,type:"cxttap",position:{x:c[0],y:c[1]}};i?i.emit(d):s.emit(d)}return t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,void t.redraw()}if(!r.touches[2]&&s.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var p=s.collection(t.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,t.redrawHint("select",!0),s.emit({type:"boxend",originalEvent:r,position:{x:c[0],y:c[1]}});p.emit("box").stdFilter((function(t){return t.selectable()&&!t.selected()})).select().emit("boxselect"),p.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(null!=i&&i.unactivate(),r.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(r.touches[1]);else if(r.touches[0]);else if(!r.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var g=t.dragData.touchDragEles;if(null!=i){var v=i._private.grabbed;f(g),t.redrawHint("drag",!0),t.redrawHint("eles",!0),v&&(i.emit("freeon"),g.emit("free"),t.dragData.didDrag&&(i.emit("dragfreeon"),g.emit("dragfree"))),n(i,["touchend","tapend","vmouseup","tapdragout"],r,{x:c[0],y:c[1]}),i.unactivate(),t.touchData.start=null}else{var b=t.findNearestElement(c[0],c[1],!0,!0);n(b,["touchend","tapend","vmouseup","tapdragout"],r,{x:c[0],y:c[1]})}var y=t.touchData.startPosition[0]-c[0],w=y*y,m=t.touchData.startPosition[1]-c[1],x=(w+m*m)*u*u;t.touchData.singleTouchMoved||(i||s.$(":selected").unselect(["tapunselect"]),n(i,["tap","vclick"],r,{x:c[0],y:c[1]})),null!=i&&!t.dragData.didDrag&&i._private.selectable&&x2){for(var A=[c[0],c[1]],N=Math.pow(A[0]-t,2)+Math.pow(A[1]-e,2),O=1;O0)return g[0]}return null},h=Object.keys(l),d=0;d0?u:le(i,o,t,e,n,r,a)},checkPoint:function(t,e,n,r,i,o,a){var s=Ae(r,i),u=2*s;if(ve(t,e,this.points,o,a,r,i-u,[0,-1],n))return!0;if(ve(t,e,this.points,o,a,r-u,i,[0,-1],n))return!0;var c=r/2+2*n,l=i/2+2*n;return!!ge(t,e,[o-c,a-l,o-c,a,o+c,a,o+c,a-l])||(!!we(t,e,u,u,o+r/2-s,a+i/2-s,n)||!!we(t,e,u,u,o-r/2+s,a+i/2-s,n))}}},$a.registerNodeShapes=function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",Se(3,0)),this.generateRoundPolygon("round-triangle",Se(3,0)),this.generatePolygon("rectangle",Se(4,0)),t.square=t.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",Se(5,0)),this.generateRoundPolygon("round-pentagon",Se(5,0)),this.generatePolygon("hexagon",Se(6,0)),this.generateRoundPolygon("round-hexagon",Se(6,0)),this.generatePolygon("heptagon",Se(7,0)),this.generateRoundPolygon("round-heptagon",Se(7,0)),this.generatePolygon("octagon",Se(8,0)),this.generateRoundPolygon("round-octagon",Se(8,0));var r=new Array(20),i=Te(5,0),o=Te(5,Math.PI/5),a=.5*(3-Math.sqrt(5));a*=1.57;for(var s=0;s=t.deqFastCost*g)break}else if(i){if(d>=t.deqCost*u||d>=t.deqAvgCost*s)break}else if(p>=t.deqNoDrawCost*(1e3/60))break;var v=t.deq(e,f,l);if(!(v.length>0))break;for(var b=0;b0&&(t.onDeqd(e,c),!i&&t.shouldRedraw(e,c,f,l)&&r())}),o(e))}}},es=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ct;s(this,t),this.idsByKey=new kt,this.keyForId=new kt,this.cachesByLvl=new kt,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=n}return c(t,[{key:"getIdsFor",value:function(t){null==t&&ht("Can not get id list for null key");var e=this.idsByKey,n=this.idsByKey.get(t);return n||(n=new Ct,e.set(t,n)),n}},{key:"addIdForKey",value:function(t,e){null!=t&&this.getIdsFor(t).add(e)}},{key:"deleteIdForKey",value:function(t,e){null!=t&&this.getIdsFor(t).delete(e)}},{key:"getNumberOfIdsForKey",value:function(t){return null==t?0:this.getIdsFor(t).size}},{key:"updateKeyMappingFor",value:function(t){var e=t.id(),n=this.keyForId.get(e),r=this.getKey(t);this.deleteIdForKey(n,e),this.addIdForKey(r,e),this.keyForId.set(e,r)}},{key:"deleteKeyMappingFor",value:function(t){var e=t.id(),n=this.keyForId.get(e);this.deleteIdForKey(n,e),this.keyForId.delete(e)}},{key:"keyHasChangedFor",value:function(t){var e=t.id();return this.keyForId.get(e)!==this.getKey(t)}},{key:"isInvalid",value:function(t){return this.keyHasChangedFor(t)||this.doesEleInvalidateKey(t)}},{key:"getCachesAt",value:function(t){var e=this.cachesByLvl,n=this.lvls,r=e.get(t);return r||(r=new kt,e.set(t,r),n.push(t)),r}},{key:"getCache",value:function(t,e){return this.getCachesAt(e).get(t)}},{key:"get",value:function(t,e){var n=this.getKey(t),r=this.getCache(n,e);return null!=r&&this.updateKeyMappingFor(t),r}},{key:"getForCachedKey",value:function(t,e){var n=this.keyForId.get(t.id());return this.getCache(n,e)}},{key:"hasCache",value:function(t,e){return this.getCachesAt(e).has(t)}},{key:"has",value:function(t,e){var n=this.getKey(t);return this.hasCache(n,e)}},{key:"setCache",value:function(t,e,n){n.key=t,this.getCachesAt(e).set(t,n)}},{key:"set",value:function(t,e,n){var r=this.getKey(t);this.setCache(r,e,n),this.updateKeyMappingFor(t)}},{key:"deleteCache",value:function(t,e){this.getCachesAt(e).delete(t)}},{key:"delete",value:function(t,e){var n=this.getKey(t);this.deleteCache(n,e)}},{key:"invalidateKey",value:function(t){var e=this;this.lvls.forEach((function(n){return e.deleteCache(t,n)}))}},{key:"invalidate",value:function(t){var e=t.id(),n=this.keyForId.get(e);this.deleteKeyMappingFor(t);var r=this.doesEleInvalidateKey(t);return r&&this.invalidateKey(n),r||0===this.getNumberOfIdsForKey(n)}}]),t}(),ns={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},rs=wt({getKey:null,doesEleInvalidateKey:ct,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:ut,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),is=function(t,e){this.renderer=t,this.onDequeues=[];var n=rs(e);G(this,n),this.lookup=new es(n.getKey,n.doesEleInvalidateKey),this.setupDequeueing()},os=is.prototype;os.reasons=ns,os.getTextureQueue=function(t){return this.eleImgCaches=this.eleImgCaches||{},this.eleImgCaches[t]=this.eleImgCaches[t]||[]},os.getRetiredTextureQueue=function(t){var e=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return e[t]=e[t]||[]},os.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new o((function(t,e){return e.reqs-t.reqs}))},os.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},os.getElement=function(t,e,n,r,i){var o=this,a=this.renderer,s=a.cy.zoom(),u=this.lookup;if(0===e.w||0===e.h||isNaN(e.w)||isNaN(e.h)||!t.visible())return null;if(!o.allowEdgeTxrCaching&&t.isEdge()||!o.allowParentTxrCaching&&t.isParent())return null;if(null==r&&(r=Math.ceil(Xt(s*n))),r<-4)r=-4;else if(s>=7.99||r>3)return null;var c=Math.pow(2,r),l=e.h*c,f=e.w*c,h=a.eleTextBiggerThanMin(t,c);if(!this.isVisible(t,h))return null;var d,p=u.get(t,r);if(p&&p.invalidated&&(p.invalidated=!1,p.texture.invalidatedWidth-=p.width),p)return p;if(d=l<=25?25:l<=50?50:50*Math.ceil(l/50),l>1024||f>1024)return null;var g=o.getTextureQueue(d),v=g[g.length-2],b=function(){return o.recycleTexture(d,f)||o.addTexture(d,f)};v||(v=g[g.length-1]),v||(v=b()),v.width-v.usedWidthr;T--)S=o.getElement(t,e,n,T,ns.downscale);C()}else{var A;if(!m&&!x&&!_)for(var N=r-1;N>=-4;N--){var O=u.get(t,N);if(O){A=O;break}}if(w(A))return o.queueElement(t,r),A;v.context.translate(v.usedWidth,0),v.context.scale(c,c),this.drawElement(v.context,t,e,h,!1),v.context.scale(1/c,1/c),v.context.translate(-v.usedWidth,0)}return p={x:v.usedWidth,texture:v,level:r,scale:c,width:f,height:l,scaledLabelShown:h},v.usedWidth+=Math.ceil(f+8),v.eleCaches.push(p),u.set(t,r,p),o.checkTextureFullness(v),p},os.invalidateElements=function(t){for(var e=0;e=.2*t.width&&this.retireTexture(t)},os.checkTextureFullness=function(t){var e=this.getTextureQueue(t.height);t.usedWidth/t.width>.8&&t.fullnessChecks>=10?mt(e,t):t.fullnessChecks++},os.retireTexture=function(t){var e=t.height,n=this.getTextureQueue(e),r=this.lookup;mt(n,t),t.retired=!0;for(var i=t.eleCaches,o=0;o=e)return o.retired=!1,o.usedWidth=0,o.invalidatedWidth=0,o.fullnessChecks=0,xt(o.eleCaches),o.context.setTransform(1,0,0,1,0,0),o.context.clearRect(0,0,o.width,o.height),mt(r,o),n.push(o),o}},os.queueElement=function(t,e){var n=this.getElementQueue(),r=this.getElementKeyToQueue(),i=this.getKey(t),o=r[i];if(o)o.level=Math.max(o.level,e),o.eles.merge(t),o.reqs++,n.updateItem(o);else{var a={eles:t.spawn().merge(t),level:e,reqs:1,key:i};n.push(a),r[i]=a}},os.dequeue=function(t){for(var e=this.getElementQueue(),n=this.getElementKeyToQueue(),r=[],i=this.lookup,o=0;o<1&&e.size()>0;o++){var a=e.pop(),s=a.key,u=a.eles[0],c=i.hasCache(u,a.level);if(n[s]=null,!c){r.push(a);var l=this.getBoundingBox(u);this.getElement(u,l,t,a.level,ns.dequeue)}}return r},os.removeFromQueue=function(t){var e=this.getElementQueue(),n=this.getElementKeyToQueue(),r=this.getKey(t),i=n[r];null!=i&&(1===i.eles.length?(i.reqs=st,e.updateItem(i),e.pop(),n[r]=null):i.eles.unmerge(t))},os.onDequeue=function(t){this.onDequeues.push(t)},os.offDequeue=function(t){mt(this.onDequeues,t)},os.setupDequeueing=ts({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(t,e,n){return t.dequeue(e,n)},onDeqd:function(t,e){for(var n=0;n=3.99||n>2)return null;r.validateLayersElesOrdering(n,t);var a,s,u=r.layersByLevel,c=Math.pow(2,n),l=u[n]=u[n]||[];if(r.levelIsComplete(n,t))return l;!function(){var e=function(e){if(r.validateLayersElesOrdering(e,t),r.levelIsComplete(e,t))return s=u[e],!0},i=function(t){if(!s)for(var r=n+t;-4<=r&&r<=2&&!e(r);r+=t);};i(1),i(-1);for(var o=l.length-1;o>=0;o--){var a=l[o];a.invalid&&mt(l,a)}}();var f=function(e){var i=(e=e||{}).after;if(function(){if(!a){a=ee();for(var e=0;e16e6)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===e.insert||e.insert)&&l.unshift(o);return o};if(r.skipping&&!o)return null;for(var h=null,d=t.length/1,p=!o,g=0;g=d||!ce(h.bb,v.boundingBox()))&&!(h=f({insert:!0,after:h})))return null;s||p?r.queueLayer(h,v):r.drawEleInLayer(h,v,n,e),h.eles.push(v),y[n]=h}}return s||(p?null:l)},ss.getEleLevelForLayerLevel=function(t,e){return t},ss.drawEleInLayer=function(t,e,n,r){var i=this.renderer,o=t.context,a=e.boundingBox();0!==a.w&&0!==a.h&&e.visible()&&(n=this.getEleLevelForLayerLevel(n,r),i.setImgSmoothing(o,!1),i.drawCachedElement(o,e,null,null,n,!0),i.setImgSmoothing(o,!0))},ss.levelIsComplete=function(t,e){var n=this.layersByLevel[t];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===e.length},ss.validateLayersElesOrdering=function(t,e){var n=this.layersByLevel[t];if(n)for(var r=0;r0){t=!0;break}}return t},ss.invalidateElements=function(t){var e=this;0!==t.length&&(e.lastInvalidationTime=W(),0!==t.length&&e.haveLayers()&&e.updateElementsInLayers(t,(function(t,n,r){e.invalidateLayer(t)})))},ss.invalidateLayer=function(t){if(this.lastInvalidationTime=W(),!t.invalid){var e=t.level,n=t.eles,r=this.layersByLevel[e];mt(r,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.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=e._private.rscratch;if((!o||e.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var u;n&&(u=n,t.translate(-u.x1,-u.y1));var c=o?e.pstyle("opacity").value:1,l=e.pstyle("line-style").value,f=e.pstyle("width").pfValue,h=e.pstyle("line-cap").value,d=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c;t.lineWidth=f,t.lineCap=h,a.eleStrokeStyle(t,e,n),a.drawEdgePath(e,t,s.allpts,l),t.lineCap="butt"},p=function(){i&&a.drawEdgeOverlay(t,e)},g=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c;a.drawArrowheads(t,e,n)},v=function(){a.drawElementText(t,e,null,r)};t.lineJoin="round";var b="yes"===e.pstyle("ghost").value;if(b){var y=e.pstyle("ghost-offset-x").pfValue,w=e.pstyle("ghost-offset-y").pfValue,m=e.pstyle("ghost-opacity").value,x=c*m;t.translate(y,w),d(x),g(x),t.translate(-y,-w)}d(),g(),p(),v(),n&&t.translate(u.x1,u.y1)}},drawEdgeOverlay:function(t,e){if(e.visible()){var n=e.pstyle("overlay-opacity").value;if(0!==n){var r=this,i=r.usePaths(),o=e._private.rscratch,a=2*e.pstyle("overlay-padding").pfValue,s=e.pstyle("overlay-color").value;t.lineWidth=a,"self"!==o.edgeType||i?t.lineCap="round":t.lineCap="butt",r.colorStrokeStyle(t,s[0],s[1],s[2],n),r.drawEdgePath(e,t,o.allpts,"solid")}}},drawEdgePath:function(t,e,n,r){var i,o=t._private.rscratch,a=e,s=!1,u=this.usePaths(),c=t.pstyle("line-dash-pattern").pfValue,l=t.pstyle("line-dash-offset").pfValue;if(u){var f=n.join("$");o.pathCacheKey&&o.pathCacheKey===f?(i=e=o.pathCache,s=!0):(i=e=new Path2D,o.pathCacheKey=f,o.pathCache=i)}if(a.setLineDash)switch(r){case"dotted":a.setLineDash([1,1]);break;case"dashed":a.setLineDash(c),a.lineDashOffset=l;break;case"solid":a.setLineDash([])}if(!s&&!o.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(n[0],n[1]),o.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var h=2;h+35&&void 0!==arguments[5]?arguments[5]:5;t.beginPath(),t.moveTo(e+o,n),t.lineTo(e+r-o,n),t.quadraticCurveTo(e+r,n,e+r,n+o),t.lineTo(e+r,n+i-o),t.quadraticCurveTo(e+r,n+i,e+r-o,n+i),t.lineTo(e+o,n+i),t.quadraticCurveTo(e,n+i,e,n+i-o),t.lineTo(e,n+o),t.quadraticCurveTo(e,n,e+o,n),t.closePath(),t.fill()}Cs.eleTextBiggerThanMin=function(t,e){if(!e){var n=t.cy().zoom(),r=this.getPixelRatio(),i=Math.ceil(Xt(n*r));e=Math.pow(2,i)}return!(t.pstyle("font-size").pfValue*e5&&void 0!==arguments[5])||arguments[5],a=this;if(null==r){if(o&&!a.eleTextBiggerThanMin(e))return}else if(!1===r)return;if(e.isNode()){var s=e.pstyle("label");if(!s||!s.value)return;var u=a.getLabelJustification(e);t.textAlign=u,t.textBaseline="bottom"}else{var c=e.element()._private.rscratch.badLine,l=e.pstyle("label"),f=e.pstyle("source-label"),h=e.pstyle("target-label");if(c||(!l||!l.value)&&(!f||!f.value)&&(!h||!h.value))return;t.textAlign="center",t.textBaseline="bottom"}var d,p=!n;n&&(d=n,t.translate(-d.x1,-d.y1)),null==i?(a.drawText(t,e,null,p,o),e.isEdge()&&(a.drawText(t,e,"source",p,o),a.drawText(t,e,"target",p,o))):a.drawText(t,e,i,p,o),n&&t.translate(d.x1,d.y1)},Cs.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var n=0;n2&&void 0!==arguments[2])||arguments[2],r=e.pstyle("font-style").strValue,i=e.pstyle("font-size").pfValue+"px",o=e.pstyle("font-family").strValue,a=e.pstyle("font-weight").strValue,s=n?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,u=e.pstyle("text-outline-opacity").value*s,c=e.pstyle("color").value,l=e.pstyle("text-outline-color").value;t.font=r+" "+a+" "+i+" "+o,t.lineJoin="round",this.colorFillStyle(t,c[0],c[1],c[2],s),this.colorStrokeStyle(t,l[0],l[1],l[2],u)},Cs.getTextAngle=function(t,e){var n=t._private.rscratch,r=e?e+"-":"",i=t.pstyle(r+"text-rotation"),o=_t(n,"labelAngle",e);return"autorotate"===i.strValue?t.isEdge()?o:0:"none"===i.strValue?0:i.pfValue},Cs.drawText=function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=e._private,a=o.rscratch,s=i?e.effectiveOpacity():1;if(!i||0!==s&&0!==e.pstyle("text-opacity").value){"main"===n&&(n=null);var u,c,l=_t(a,"labelX",n),f=_t(a,"labelY",n),h=this.getLabelText(e,n);if(null!=h&&""!==h&&!isNaN(l)&&!isNaN(f)){this.setupTextStyle(t,e,i);var d,p=n?n+"-":"",g=_t(a,"labelWidth",n),v=_t(a,"labelHeight",n),b=e.pstyle(p+"text-margin-x").pfValue,y=e.pstyle(p+"text-margin-y").pfValue,w=e.isEdge(),m=e.pstyle("text-halign").value,x=e.pstyle("text-valign").value;switch(w&&(m="center",x="center"),l+=b,f+=y,0!==(d=r?this.getTextAngle(e,n):0)&&(u=l,c=f,t.translate(u,c),t.rotate(d),l=0,f=0),x){case"top":break;case"center":f+=v/2;break;case"bottom":f+=v}var _=e.pstyle("text-background-opacity").value,E=e.pstyle("text-border-opacity").value,k=e.pstyle("text-border-width").pfValue,S=e.pstyle("text-background-padding").pfValue;if(_>0||k>0&&E>0){var C=l-S;switch(m){case"left":C-=g;break;case"center":C-=g/2}var T=f-v-S,A=g+2*S,N=v+2*S;if(_>0){var O=t.fillStyle,L=e.pstyle("text-background-color").value;t.fillStyle="rgba("+L[0]+","+L[1]+","+L[2]+","+_*s+")";var P=e.pstyle("text-background-shape").strValue;0===P.indexOf("round")?Ts(t,C,T,A,N,2):t.fillRect(C,T,A,N),t.fillStyle=O}if(k>0&&E>0){var I=t.strokeStyle,j=t.lineWidth,M=e.pstyle("text-border-color").value,D=e.pstyle("text-border-style").value;if(t.strokeStyle="rgba("+M[0]+","+M[1]+","+M[2]+","+E*s+")",t.lineWidth=k,t.setLineDash)switch(D){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=k/4,t.setLineDash([]);break;case"solid":t.setLineDash([])}if(t.strokeRect(C,T,A,N),"double"===D){var R=k/2;t.strokeRect(C+R,T+R,A-2*R,N-2*R)}t.setLineDash&&t.setLineDash([]),t.lineWidth=j,t.strokeStyle=I}}var B=2*e.pstyle("text-outline-width").pfValue;if(B>0&&(t.lineWidth=B),"wrap"===e.pstyle("text-wrap").value){var G=_t(a,"labelWrapCachedLines",n),H=_t(a,"labelLineHeight",n),F=g/2,z=this.getLabelJustification(e);switch("auto"===z||("left"===m?"left"===z?l+=-g:"center"===z&&(l+=-F):"center"===m?"left"===z?l+=-F:"right"===z&&(l+=F):"right"===m&&("center"===z?l+=F:"right"===z&&(l+=g))),x){case"top":f-=(G.length-1)*H;break;case"center":case"bottom":f-=(G.length-1)*H}for(var Y=0;Y0&&t.strokeText(G[Y],l,f),t.fillText(G[Y],l,f),f+=H}else B>0&&t.strokeText(h,l,f),t.fillText(h,l,f);0!==d&&(t.rotate(-d),t.translate(-u,-c))}}};var As={drawNode:function(t,e,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],u=this,c=e._private,l=c.rscratch,f=e.position();if(E(f.x)&&E(f.y)&&(!s||e.visible())){var h,d,p=s?e.effectiveOpacity():1,g=u.usePaths(),v=!1,b=e.padding();r=e.width()+2*b,i=e.height()+2*b,n&&(d=n,t.translate(-d.x1,-d.y1));for(var y=e.pstyle("background-image"),w=y.value,m=new Array(w.length),x=new Array(w.length),_=0,k=0;k0&&void 0!==arguments[0]?arguments[0]:O;u.eleFillStyle(t,e,n)},M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:I;u.colorStrokeStyle(t,L[0],L[1],L[2],e)},D=e.pstyle("shape").strValue,R=e.pstyle("shape-polygon-points").pfValue;if(g){t.translate(f.x,f.y);var B=u.nodePathCache=u.nodePathCache||[],G=nt("polygon"===D?D+","+R.join(","):D,""+i,""+r),H=B[G];null!=H?(h=H,v=!0,l.pathCache=h):(h=new Path2D,B[G]=l.pathCache=h)}var F=function(){if(!v){var n=f;g&&(n={x:0,y:0}),u.nodeShapes[u.getNodeShape(e)].draw(h||t,n.x,n.y,r,i)}g?t.fill(h):t.fill()},z=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,r=c.backgrounding,i=0,o=0;o0&&void 0!==arguments[0]&&arguments[0],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;u.hasPie(e)&&(u.drawPie(t,e,o),n&&(g||u.nodeShapes[u.getNodeShape(e)].draw(t,f.x,f.y,r,i)))},V=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,n=(A>0?A:-A)*e,r=A>0?0:255;0!==A&&(u.colorFillStyle(t,r,r,r,n),g?t.fill(h):t.fill())},q=function(){if(N>0){if(t.lineWidth=N,t.lineCap="butt",t.setLineDash)switch(P){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([])}if(g?t.stroke(h):t.stroke(),"double"===P){t.lineWidth=N/3;var e=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",g?t.stroke(h):t.stroke(),t.globalCompositeOperation=e}t.setLineDash&&t.setLineDash([])}},U=function(){a&&u.drawNodeOverlay(t,e,f,r,i)},X=function(){u.drawElementText(t,e,null,o)},W="yes"===e.pstyle("ghost").value;if(W){var $=e.pstyle("ghost-offset-x").pfValue,K=e.pstyle("ghost-offset-y").pfValue,Z=e.pstyle("ghost-opacity").value,Q=Z*p;t.translate($,K),j(Z*O),F(),z(Q),Y(0!==A||0!==N),V(Q),M(Z*I),q(),t.translate(-$,-K)}j(),F(),z(),Y(0!==A||0!==N),V(),M(),q(),g&&t.translate(-f.x,-f.y),X(),U(),n&&t.translate(d.x1,d.y1)}},drawNodeOverlay:function(t,e,n,r,i){if(e.visible()){var o=e.pstyle("overlay-padding").pfValue,a=e.pstyle("overlay-opacity").value,s=e.pstyle("overlay-color").value;if(a>0){if(n=n||e.position(),null==r||null==i){var u=e.padding();r=e.width()+2*u,i=e.height()+2*u}this.colorFillStyle(t,s[0],s[1],s[2],a),this.nodeShapes.roundrectangle.draw(t,n.x,n.y,r+2*o,i+2*o),t.fill()}}},hasPie:function(t){return(t=t[0])._private.hasPie},drawPie:function(t,e,n,r){e=e[0],r=r||e.position();var i=e.cy().style(),o=e.pstyle("pie-size"),a=r.x,s=r.y,u=e.width(),c=e.height(),l=Math.min(u,c)/2,f=0;this.usePaths()&&(a=0,s=0),"%"===o.units?l*=o.pfValue:void 0!==o.pfValue&&(l=o.pfValue/2);for(var h=1;h<=i.pieBackgroundN;h++){var d=e.pstyle("pie-"+h+"-background-size").value,p=e.pstyle("pie-"+h+"-background-color").value,g=e.pstyle("pie-"+h+"-background-opacity").value*n,v=d/100;v+f>1&&(v=1-f);var b=1.5*Math.PI+2*Math.PI*f,y=b+2*Math.PI*v;0===d||f>=1||f+v>1||(t.beginPath(),t.moveTo(a,s),t.arc(a,s,l,b,y),t.closePath(),this.colorFillStyle(t,p[0],p[1],p[2],g),t.fill(),f+=v)}}},Ns={};Ns.getPixelRatio=function(){var t=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var e=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/e},Ns.paintCache=function(t){for(var e,n=this.paintCaches=this.paintCaches||[],r=!0,i=0;ia.minMbLowQualFrames&&(a.motionBlurPxRatio=a.mbPxRBlurry)),a.clearingMotionBlur&&(a.motionBlurPxRatio=1),a.textureDrawLastFrame&&!f&&(l[a.NODE]=!0,l[a.SELECT_BOX]=!0);var y=u.style(),w=u.zoom(),m=void 0!==i?i:w,x=u.pan(),_={x:x.x,y:x.y},E={zoom:w,pan:{x:x.x,y:x.y}},k=a.prevViewport;void 0===k||E.zoom!==k.zoom||E.pan.x!==k.pan.x||E.pan.y!==k.pan.y||g&&!p||(a.motionBlurPxRatio=1),o&&(_=o),m*=s,_.x*=s,_.y*=s;var S=a.getCachedZSortedEles();function C(t,e,n,r,i){var o=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",a.colorFillStyle(t,255,255,255,a.motionBlurTransparency),t.fillRect(e,n,r,i),t.globalCompositeOperation=o}function T(t,r){var s,u,l,f;a.clearingMotionBlur||t!==c.bufferContexts[a.MOTIONBLUR_BUFFER_NODE]&&t!==c.bufferContexts[a.MOTIONBLUR_BUFFER_DRAG]?(s=_,u=m,l=a.canvasWidth,f=a.canvasHeight):(s={x:x.x*d,y:x.y*d},u=w*d,l=a.canvasWidth*d,f=a.canvasHeight*d),t.setTransform(1,0,0,1,0,0),"motionBlur"===r?C(t,0,0,l,f):e||void 0!==r&&!r||t.clearRect(0,0,l,f),n||(t.translate(s.x,s.y),t.scale(u,u)),o&&t.translate(o.x,o.y),i&&t.scale(i,i)}if(f||(a.textureDrawLastFrame=!1),f){if(a.textureDrawLastFrame=!0,!a.textureCache){a.textureCache={},a.textureCache.bb=u.mutableElements().boundingBox(),a.textureCache.texture=a.data.bufferCanvases[a.TEXTURE_BUFFER];var A=a.data.bufferContexts[a.TEXTURE_BUFFER];A.setTransform(1,0,0,1,0,0),A.clearRect(0,0,a.canvasWidth*a.textureMult,a.canvasHeight*a.textureMult),a.render({forcedContext:A,drawOnlyNodeLayer:!0,forcedPxRatio:s*a.textureMult}),(E=a.textureCache.viewport={zoom:u.zoom(),pan:u.pan(),width:a.canvasWidth,height:a.canvasHeight}).mpan={x:(0-E.pan.x)/E.zoom,y:(0-E.pan.y)/E.zoom}}l[a.DRAG]=!1,l[a.NODE]=!1;var N=c.contexts[a.NODE],O=a.textureCache.texture;E=a.textureCache.viewport;N.setTransform(1,0,0,1,0,0),h?C(N,0,0,E.width,E.height):N.clearRect(0,0,E.width,E.height);var L=y.core("outside-texture-bg-color").value,P=y.core("outside-texture-bg-opacity").value;a.colorFillStyle(N,L[0],L[1],L[2],P),N.fillRect(0,0,E.width,E.height);w=u.zoom();T(N,!1),N.clearRect(E.mpan.x,E.mpan.y,E.width/E.zoom/s,E.height/E.zoom/s),N.drawImage(O,E.mpan.x,E.mpan.y,E.width/E.zoom/s,E.height/E.zoom/s)}else a.textureOnViewport&&!e&&(a.textureCache=null);var I=u.extent(),j=a.pinching||a.hoverData.dragging||a.swipePanning||a.data.wheelZooming||a.hoverData.draggingEles||a.cy.animated(),M=a.hideEdgesOnViewport&&j,D=[];if(D[a.NODE]=!l[a.NODE]&&h&&!a.clearedForMotionBlur[a.NODE]||a.clearingMotionBlur,D[a.NODE]&&(a.clearedForMotionBlur[a.NODE]=!0),D[a.DRAG]=!l[a.DRAG]&&h&&!a.clearedForMotionBlur[a.DRAG]||a.clearingMotionBlur,D[a.DRAG]&&(a.clearedForMotionBlur[a.DRAG]=!0),l[a.NODE]||n||r||D[a.NODE]){var R=h&&!D[a.NODE]&&1!==d;T(N=e||(R?a.data.bufferContexts[a.MOTIONBLUR_BUFFER_NODE]:c.contexts[a.NODE]),h&&!R?"motionBlur":void 0),M?a.drawCachedNodes(N,S.nondrag,s,I):a.drawLayeredElements(N,S.nondrag,s,I),a.debug&&a.drawDebugPoints(N,S.nondrag),n||h||(l[a.NODE]=!1)}if(!r&&(l[a.DRAG]||n||D[a.DRAG])){R=h&&!D[a.DRAG]&&1!==d;T(N=e||(R?a.data.bufferContexts[a.MOTIONBLUR_BUFFER_DRAG]:c.contexts[a.DRAG]),h&&!R?"motionBlur":void 0),M?a.drawCachedNodes(N,S.drag,s,I):a.drawCachedElements(N,S.drag,s,I),a.debug&&a.drawDebugPoints(N,S.drag),n||h||(l[a.DRAG]=!1)}if(a.showFps||!r&&l[a.SELECT_BOX]&&!n){if(T(N=e||c.contexts[a.SELECT_BOX]),1==a.selection[4]&&(a.hoverData.selecting||a.touchData.selecting)){w=a.cy.zoom();var B=y.core("selection-box-border-width").value/w;N.lineWidth=B,N.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+")",N.fillRect(a.selection[0],a.selection[1],a.selection[2]-a.selection[0],a.selection[3]-a.selection[1]),B>0&&(N.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+")",N.strokeRect(a.selection[0],a.selection[1],a.selection[2]-a.selection[0],a.selection[3]-a.selection[1]))}if(c.bgActivePosistion&&!a.hoverData.selecting){w=a.cy.zoom();var G=c.bgActivePosistion;N.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+")",N.beginPath(),N.arc(G.x,G.y,y.core("active-bg-size").pfValue/w,0,2*Math.PI),N.fill()}var H=a.lastRedrawTime;if(a.showFps&&H){H=Math.round(H);var F=Math.round(1e3/H);N.setTransform(1,0,0,1,0,0),N.fillStyle="rgba(255, 0, 0, 0.75)",N.strokeStyle="rgba(255, 0, 0, 0.75)",N.lineWidth=1,N.fillText("1 frame = "+H+" ms = "+F+" fps",0,20);N.strokeRect(0,30,250,20),N.fillRect(0,30,250*Math.min(F/60,1),20)}n||(l[a.SELECT_BOX]=!1)}if(h&&1!==d){var z=c.contexts[a.NODE],Y=a.data.bufferCanvases[a.MOTIONBLUR_BUFFER_NODE],V=c.contexts[a.DRAG],q=a.data.bufferCanvases[a.MOTIONBLUR_BUFFER_DRAG],U=function(t,e,n){t.setTransform(1,0,0,1,0,0),n||!b?t.clearRect(0,0,a.canvasWidth,a.canvasHeight):C(t,0,0,a.canvasWidth,a.canvasHeight);var r=d;t.drawImage(e,0,0,a.canvasWidth*r,a.canvasHeight*r,0,0,a.canvasWidth,a.canvasHeight)};(l[a.NODE]||D[a.NODE])&&(U(z,Y,D[a.NODE]),l[a.NODE]=!1),(l[a.DRAG]||D[a.DRAG])&&(U(V,q,D[a.DRAG]),l[a.DRAG]=!1)}a.prevViewport=E,a.clearingMotionBlur&&(a.clearingMotionBlur=!1,a.motionBlurCleared=!0,a.motionBlur=!0),h&&(a.motionBlurTimeout=setTimeout((function(){a.motionBlurTimeout=null,a.clearedForMotionBlur[a.NODE]=!1,a.clearedForMotionBlur[a.DRAG]=!1,a.motionBlur=!1,a.clearingMotionBlur=!f,a.mbFrames=0,l[a.NODE]=!0,l[a.DRAG]=!0,a.redraw()}),100)),e||u.emit("render")};for(var Os={drawPolygonPath:function(t,e,n,r,i,o){var a=r/2,s=i/2;t.beginPath&&t.beginPath(),t.moveTo(e+a*o[0],n+s*o[1]);for(var u=1;u0&&o>0){h.clearRect(0,0,i,o),h.globalCompositeOperation="source-over";var d=this.getCachedZSortedEles();if(t.full)h.translate(-n.x1*u,-n.y1*u),h.scale(u,u),this.drawElements(h,d),h.scale(1/u,1/u),h.translate(n.x1*u,n.y1*u);else{var p=e.pan(),g={x:p.x*u,y:p.y*u};u*=e.zoom(),h.translate(g.x,g.y),h.scale(u,u),this.drawElements(h,d),h.scale(1/u,1/u),h.translate(-g.x,-g.y)}t.bg&&(h.globalCompositeOperation="destination-over",h.fillStyle=t.bg,h.rect(0,0,i,o),h.fill())}return f},Rs.png=function(t){return Gs(t,this.bufferCanvasImage(t),"image/png")},Rs.jpg=function(t){return Gs(t,this.bufferCanvasImage(t),"image/jpeg")};var Hs={nodeShapeImpl:function(t,e,n,r,i,o,a){switch(t){case"ellipse":return this.drawEllipsePath(e,n,r,i,o);case"polygon":return this.drawPolygonPath(e,n,r,i,o,a);case"round-polygon":return this.drawRoundPolygonPath(e,n,r,i,o,a);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,n,r,i,o);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,n,r,i,o);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,n,r,i,o);case"barrel":return this.drawBarrelPath(e,n,r,i,o)}}},Fs=Ys,zs=Ys.prototype;function Ys(t){var e=this;e.data={canvases:new Array(zs.CANVAS_LAYERS),contexts:new Array(zs.CANVAS_LAYERS),canvasNeedsRedraw:new Array(zs.CANVAS_LAYERS),bufferCanvases:new Array(zs.BUFFER_COUNT),bufferContexts:new Array(zs.CANVAS_LAYERS)};e.data.canvasContainer=document.createElement("div");var n=e.data.canvasContainer.style;e.data.canvasContainer.style["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",n.position="relative",n.zIndex="0",n.overflow="hidden";var r=t.cy.container();r.appendChild(e.data.canvasContainer),r.style["-webkit-tap-highlight-color"]="rgba(0,0,0,0)";var i={"-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)&&(i["-ms-touch-action"]="none",i["touch-action"]="none");for(var o=0;o=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(137),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(20))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e,n){this.source=t,this.target=e,this.type=n};e.PowerEdge=r;var i=function(){function t(t,e,n,r){var i=this;if(this.linkAccessor=n,this.modules=new Array(t),this.roots=[],r)this.initModulesFromGroup(r);else{this.roots.push(new s);for(var a=0;a=this.R))return this.merge(e.a,e.b,t),!0}},t.prototype.nEdges=function(t,e){var n=t.incoming.intersection(e.incoming),r=t.outgoing.intersection(e.outgoing);return this.R-n.count()-r.count()},t.prototype.getGroupHierarchy=function(t){var e=this,n=[];return function t(e,n,r){e.forAll((function(e){if(e.isLeaf())n.leaves||(n.leaves=[]),n.leaves.push(e.id);else{var i=n;if(e.gid=r.length,!e.isIsland()||e.isPredefined()){if(i={id:e.gid},e.isPredefined())for(var o in e.definition)i[o]=e.definition[o];n.groups||(n.groups=[]),n.groups.push(e.gid),r.push(i)}t(e.children,i,r)}}))}(this.roots[0],{},n),this.allEdges().forEach((function(i){var o=e.modules[i.source],a=e.modules[i.target];t.push(new r(void 0===o.gid?i.source:n[o.gid],void 0===a.gid?i.target:n[a.gid],i.type))})),n},t.prototype.allEdges=function(){var e=[];return t.getEdges(this.roots[0],e),e},t.getEdges=function(e,n){e.forAll((function(e){e.getEdges(n),t.getEdges(e.children,n)}))},t}();e.Configuration=i;var o=function(){function t(t,e,n,r,i){void 0===e&&(e=new u),void 0===n&&(n=new u),void 0===r&&(r=new s),this.id=t,this.outgoing=e,this.incoming=n,this.children=r,this.definition=i}return t.prototype.getEdges=function(t){var e=this;this.outgoing.forAll((function(n,i){n.forAll((function(n){t.push(new r(e.id,n.id,i))}))}))},t.prototype.isLeaf=function(){return 0===this.children.count()},t.prototype.isIsland=function(){return 0===this.outgoing.count()&&0===this.incoming.count()},t.prototype.isPredefined=function(){return void 0!==this.definition},t}();function a(t,e){var n={};for(var r in t)r in e&&(n[r]=t[r]);return n}e.Module=o;var s=function(){function t(){this.table={}}return t.prototype.count=function(){return Object.keys(this.table).length},t.prototype.intersection=function(e){var n=new t;return n.table=a(this.table,e.table),n},t.prototype.intersectionCount=function(t){return this.intersection(t).count()},t.prototype.contains=function(t){return t in this.table},t.prototype.add=function(t){this.table[t.id]=t},t.prototype.remove=function(t){delete this.table[t.id]},t.prototype.forAll=function(t){for(var e in this.table)t(this.table[e])},t.prototype.modules=function(){var t=[];return this.forAll((function(e){e.isPredefined()||t.push(e)})),t},t}();e.ModuleSet=s;var u=function(){function t(){this.sets={},this.n=0}return t.prototype.count=function(){return this.n},t.prototype.contains=function(t){var e=!1;return this.forAllModules((function(n){e||n.id!=t||(e=!0)})),e},t.prototype.add=function(t,e){(t in this.sets?this.sets[t]:this.sets[t]=new s).add(e),++this.n},t.prototype.remove=function(t,e){var n=this.sets[t];n.remove(e),0===n.count()&&delete this.sets[t],--this.n},t.prototype.forAll=function(t){for(var e in this.sets)t(this.sets[e],Number(e))},t.prototype.forAllModules=function(t){this.forAll((function(e,n){return e.forAll(t)}))},t.prototype.intersection=function(e){var n=new t;return this.forAll((function(t,r){if(r in e.sets){var i=t.intersection(e.sets[r]),o=i.count();o>0&&(n.sets[r]=i,n.n+=o)}})),n},t}();e.LinkSets=u,e.getGroups=function(t,e,n,r){for(var o=t.length,a=new i(o,e,n,r);a.greedyMerge(););var s=[],u=a.getGroupHierarchy(s);return s.forEach((function(e){var n=function(n){var r=e[n];"number"==typeof r&&(e[n]=t[r])};n("source"),n("target")})),{groups:u,powerEdges:s}}},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(){this.findIter=function(t){for(var e=this._root,n=this.iterator();null!==e;){var r=this._comparator(t,e.data);if(0===r)return n._cursor=e,n;n._ancestors.push(e),e=e.get_child(r>0)}return null}}return t.prototype.clear=function(){this._root=null,this.size=0},t.prototype.find=function(t){for(var e=this._root;null!==e;){var n=this._comparator(t,e.data);if(0===n)return e.data;e=e.get_child(n>0)}return null},t.prototype.lowerBound=function(t){return this._bound(t,this._comparator)},t.prototype.upperBound=function(t){var e=this._comparator;return this._bound(t,(function(t,n){return e(n,t)}))},t.prototype.min=function(){var t=this._root;if(null===t)return null;for(;null!==t.left;)t=t.left;return t.data},t.prototype.max=function(){var t=this._root;if(null===t)return null;for(;null!==t.right;)t=t.right;return t.data},t.prototype.iterator=function(){return new a(this)},t.prototype.each=function(t){for(var e,n=this.iterator();null!==(e=n.next());)t(e)},t.prototype.reach=function(t){for(var e,n=this.iterator();null!==(e=n.prev());)t(e)},t.prototype._bound=function(t,e){for(var n=this._root,r=this.iterator();null!==n;){var i=this._comparator(t,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(e(t,(n=r._ancestors[o]).data)>0)return r._cursor=n,r._ancestors.length=o,r;return r._ancestors.length=0,r},t}();e.TreeBase=o;var a=function(){function t(t){this._tree=t,this._ancestors=[],this._cursor=null}return t.prototype.data=function(){return null!==this._cursor?this._cursor.data:null},t.prototype.next=function(){if(null===this._cursor){var t=this._tree._root;null!==t&&this._minNode(t)}else{var e;if(null===this._cursor.right)do{if(e=this._cursor,!this._ancestors.length){this._cursor=null;break}this._cursor=this._ancestors.pop()}while(this._cursor.right===e);else this._ancestors.push(this._cursor),this._minNode(this._cursor.right)}return null!==this._cursor?this._cursor.data:null},t.prototype.prev=function(){if(null===this._cursor){var t=this._tree._root;null!==t&&this._maxNode(t)}else{var e;if(null===this._cursor.left)do{if(e=this._cursor,!this._ancestors.length){this._cursor=null;break}this._cursor=this._ancestors.pop()}while(this._cursor.left===e);else this._ancestors.push(this._cursor),this._maxNode(this._cursor.left)}return null!==this._cursor?this._cursor.data:null},t.prototype._minNode=function(t){for(;null!==t.left;)this._ancestors.push(t),t=t.left;this._cursor=t},t.prototype._maxNode=function(t){for(;null!==t.right;)this._ancestors.push(t),t=t.right;this._cursor=t},t}();e.Iterator=a;var s=function(){function t(t){this.data=t,this.left=null,this.right=null,this.red=!0}return t.prototype.get_child=function(t){return t?this.right:this.left},t.prototype.set_child=function(t,e){t?this.right=e:this.left=e},t}(),u=function(t){function e(e){var n=t.call(this)||this;return n._root=null,n._comparator=e,n.size=0,n}return i(e,t),e.prototype.insert=function(t){var n=!1;if(null===this._root)this._root=new s(t),n=!0,this.size++;else{var r=new s(void 0),i=!1,o=!1,a=null,u=r,c=null,l=this._root;for(u.right=this._root;;){if(null===l?(l=new s(t),c.set_child(i,l),n=!0,this.size++):e.is_red(l.left)&&e.is_red(l.right)&&(l.red=!0,l.left.red=!1,l.right.red=!1),e.is_red(l)&&e.is_red(c)){var f=u.right===a;l===c.get_child(o)?u.set_child(f,e.single_rotate(a,!o)):u.set_child(f,e.double_rotate(a,!o))}var h=this._comparator(l.data,t);if(0===h)break;o=i,i=h<0,null!==a&&(u=a),a=c,c=l,l=l.get_child(i)}this._root=r.right}return this._root.red=!1,n},e.prototype.remove=function(t){if(null===this._root)return!1;var n=new s(void 0),r=n;r.right=this._root;for(var i=null,o=null,a=null,u=!0;null!==r.get_child(u);){var c=u;o=i,i=r,r=r.get_child(u);var l=this._comparator(t,r.data);if(u=l>0,0===l&&(a=r),!e.is_red(r)&&!e.is_red(r.get_child(u)))if(e.is_red(r.get_child(!u))){var f=e.single_rotate(r,u);i.set_child(c,f),i=f}else if(!e.is_red(r.get_child(!u))){var h=i.get_child(!c);if(null!==h)if(e.is_red(h.get_child(!c))||e.is_red(h.get_child(c))){var d=o.right===i;e.is_red(h.get_child(c))?o.set_child(d,e.double_rotate(i,c)):e.is_red(h.get_child(!c))&&o.set_child(d,e.single_rotate(i,c));var p=o.get_child(d);p.red=!0,r.red=!0,p.left.red=!1,p.right.red=!1}else i.red=!1,h.red=!0,r.red=!0}}return null!==a&&(a.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!==a},e.is_red=function(t){return null!==t&&t.red},e.single_rotate=function(t,e){var n=t.get_child(!e);return t.set_child(!e,n.get_child(e)),n.set_child(e,t),t.red=!0,n.red=!1,n},e.double_rotate=function(t,n){return t.set_child(!n,e.single_rotate(t.get_child(!n),!n)),e.single_rotate(t,n)},e}(o);e.RBTree=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t){this.elem=t,this.subheaps=[]}return t.prototype.toString=function(t){for(var e="",n=!1,r=0;r0}function f(t,e,n){return c(t,e,n)<0}function h(t,e){var n,r,i,o,a=e.length-1;if(f(t,e[1],e[0])&&!l(t,e[a-1],e[0]))return 0;for(n=0,r=a;;){if(r-n==1)return l(t,e[n],e[r])?n:r;if((o=f(t,e[(i=Math.floor((n+r)/2))+1],e[i]))&&!l(t,e[i-1],e[i]))return i;l(t,e[n+1],e[n])?o||l(t,e[n],e[i])?r=i:n=i:o&&f(t,e[n],e[i])?r=i:n=i}}function d(t,e){var n,r,i,o,a=e.length-1;if(l(t,e[a-1],e[0])&&!f(t,e[1],e[0]))return 0;for(n=0,r=a;;){if(r-n==1)return f(t,e[n],e[r])?n:r;if(o=f(t,e[(i=Math.floor((n+r)/2))+1],e[i]),l(t,e[i-1],e[i])&&!o)return i;f(t,e[n+1],e[n])?o?f(t,e[n],e[i])?r=i:n=i:r=i:o?n=i:l(t,e[n],e[i])?r=i:n=i}}function p(t,e,n,r,i,o){var a,s;s=r(t[a=n(e[0],t)],e);for(var u=!1;!u;){for(u=!0;a===t.length-1&&(a=0),!i(e[s],t[a],t[a+1]);)++a;for(;0===s&&(s=e.length-1),!o(t[a],e[s],e[s-1]);)--s,u=!1}return{t1:a,t2:s}}function g(t,e){return p(t,e,h,d,l,f)}e.PolyPoint=u,e.isLeft=c,e.ConvexHull=function(t){var e,n=t.slice(0).sort((function(t,e){return t.x!==e.x?e.x-t.x:e.y-t.y})),r=t.length,i=n[0].x;for(e=1;e=0&&n[e].x===l;e--);for(s=e+1,e=o;++e<=s;)if(!(c(n[0],n[s],n[e])>=0&&e1&&!(c(a[a.length-2],a[a.length-1],n[e])>0);)a.length-=1;0!=e&&a.push(n[e])}u!=s&&a.push(n[u]);var f=a.length;for(e=s;--e>=o;)if(!(c(n[u],n[o],n[e])>=0&&e>o)){for(;a.length>f&&!(c(a[a.length-2],a[a.length-1],n[e])>0);)a.length-=1;0!=e&&a.push(n[e])}}return a},e.clockwiseRadialSweep=function(t,e,n){e.slice(0).sort((function(e,n){return Math.atan2(e.y-t.y,e.x-t.x)-Math.atan2(n.y-t.y,n.x-t.x)})).forEach(n)},e.tangent_PolyPolyC=p,e.LRtangent_PolyPolyC=function(t,e){var n=g(e,t);return{t1:n.t2,t2:n.t1}},e.RLtangent_PolyPolyC=g,e.LLtangent_PolyPolyC=function(t,e){return p(t,e,d,d,f,f)},e.RRtangent_PolyPolyC=function(t,e){return p(t,e,h,h,l,l)};var v=function(t,e){this.t1=t,this.t2=e};e.BiTangent=v;var b=function(){};e.BiTangents=b;var y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(a);e.TVGPoint=y;var w=function(t,e,n,r){this.id=t,this.polyid=e,this.polyvertid=n,this.p=r,r.vv=this};e.VisibilityVertex=w;var m=function(){function t(t,e){this.source=t,this.target=e}return t.prototype.length=function(){var t=this.source.p.x-this.target.p.x,e=this.source.p.y-this.target.p.y;return Math.sqrt(t*t+e*e)},t}();e.VisibilityEdge=m;var x=function(){function t(t,e){if(this.P=t,this.V=[],this.E=[],e)this.V=e.V.slice(0),this.E=e.E.slice(0);else{for(var n=t.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},t}();function _(t,e){for(var n=[],r=1,i=e.length;r=0&&g>=0&&y<0&&w>=0&&m>=0&&x<0?i.ll=new v(o,a):p<=0&&g<=0&&y>0&&w<=0&&m<=0&&x>0?i.rr=new v(o,a):p<=0&&g>0&&y<=0&&w>=0&&m<0&&x>=0?i.rl=new v(o,a):p>=0&&g<0&&y>=0&&w<=0&&m>0&&x<=0&&(i.lr=new v(o,a))}return i}function k(t,e){return!t.every((function(t){return!function(t,e){for(var n=1,r=e.length;n0)return!0}return!1}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=10,i=(1+Math.sqrt(5))/2,o=1e-4;e.applyPacking=function(t,e,n,a,s,u){void 0===s&&(s=1),void 0===u&&(u=!0);var c=e,l=n,f=(s=void 0!==s?s:1,a=void 0!==a?a:0,0),h=0,d=0,p=0,g=[];function v(t,e){g=[],f=0,h=0,p=0;for(var n=0;n=t.height&&g[i].x+g[i].width+t.width+r-e<=o){n=g[i];break}g.push(t),void 0!==n?(t.x=n.x+n.width+r,t.y=n.bottom,t.space_left=t.height,t.bottom=t.y,n.space_left-=t.height+r,n.bottom+=t.height+r):(t.y=p,p+=t.height+r,t.x=0,t.bottom=t.y,t.space_left=t.height),t.y+t.height-h>-o&&(h=t.y+t.height-0),t.x+t.width-f>-o&&(f=t.x+t.width-0)}0!=t.length&&(function(t){t.forEach((function(t){var e,n,r,i,o;e=t,n=Number.MAX_VALUE,r=Number.MAX_VALUE,i=0,o=0,e.array.forEach((function(t){var e=void 0!==t.width?t.width:a,s=void 0!==t.height?t.height:a;e/=2,s/=2,i=Math.max(t.x+e,i),n=Math.min(t.x-e,n),o=Math.max(t.y+s,o),r=Math.min(t.y-s,r)})),e.width=i-n,e.height=o-r}))}(t),function(t,e){var n=Number.POSITIVE_INFINITY,a=0;t.sort((function(t,e){return e.height-t.height})),d=t.reduce((function(t,e){return t.widthd||g>o;){if(1!=h){var b=u-(u-s)/i;l=v(t,b)}if(0!=h){var y=s+(u-s)/i;f=v(t,y)}if(p=Math.abs(b-y),g=Math.abs(l-f),lf?(s=b,b=y,l=f,h=1):(u=y,y=b,f=l,h=0),c++>100)break}v(t,a)}(t),u&&function(t){t.forEach((function(t){var e={x:0,y:0};t.array.forEach((function(t){e.x+=t.x,e.y+=t.y})),e.x/=t.array.length,e.y/=t.array.length;var n=e.x-t.width/2,r=e.y-t.height/2,i=t.x-n+c/2-f/2,o=t.y-r+l/2-h/2;t.array.forEach((function(t){t.x+=i,t.y+=o}))}))}(t))},e.separateGraphs=function(t,e){for(var n={},r={},i=[],o=0,a=0;a=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 t.findMatch=function(t,e){for(var n=t.length,r=e.length,i={length:0,si:-1,ti:-1},o=new Array(n),a=0;ai.length&&(i.length=u,i.si=a-u+1,i.ti=s-u+1)}else o[a][s]=0}return i},t.prototype.getSequence=function(){return this.length>=0?this.s.slice(this.si,this.si+this.length):[]},t}();e.LongestCommonSubsequence=u;var c=function(){function t(t,e,n){var i=this;void 0===n&&(n=12),this.originalnodes=t,this.groupPadding=n,this.leaves=null,this.nodes=t.map((function(t,n){return new a(n,e.getBounds(t),e.getChildren(t))})),this.leaves=this.nodes.filter((function(t){return t.leaf})),this.groups=this.nodes.filter((function(t){return!t.leaf})),this.cols=this.getGridLines("x"),this.rows=this.getGridLines("y"),this.groups.forEach((function(t){return t.children.forEach((function(e){return i.nodes[e].parent=t}))})),this.root={children:[]},this.nodes.forEach((function(t){void 0===t.parent&&(t.parent=i.root,i.root.children.push(t.id)),t.ports=[]})),this.backToFront=this.nodes.slice(0),this.backToFront.sort((function(t,e){return i.getDepth(t)-i.getDepth(e)})),this.backToFront.slice(0).reverse().filter((function(t){return!t.leaf})).forEach((function(t){var e=r.Rectangle.empty();t.children.forEach((function(t){return e=e.union(i.nodes[t].rect)})),t.rect=e.inflate(i.groupPadding)}));var o=this.midPoints(this.cols.map((function(t){return t.pos}))),u=this.midPoints(this.rows.map((function(t){return t.pos}))),c=o[0],l=o[o.length-1],f=u[0],h=u[u.length-1],d=this.rows.map((function(t){return{x1:c,x2:l,y1:t.pos,y2:t.pos}})).concat(u.map((function(t){return{x1:c,x2:l,y1:t,y2:t}}))),p=this.cols.map((function(t){return{x1:t.pos,x2:t.pos,y1:f,y2:h}})).concat(o.map((function(t){return{x1:t,x2:t,y1:f,y2:h}}))),g=d.concat(p);g.forEach((function(t){return t.verts=[]})),this.verts=[],this.edges=[],d.forEach((function(t){return p.forEach((function(e){var n=new s(i.verts.length,e.x1,t.y1);t.verts.push(n),e.verts.push(n),i.verts.push(n);for(var r=i.backToFront.length;r-- >0;){var o=i.backToFront[r],a=o.rect,u=Math.abs(n.x-a.cx()),c=Math.abs(n.y-a.cy());if(u0;){var r=n.filter((function(e){return e.rect["overlap"+t.toUpperCase()](n[0].rect)})),i={nodes:r,pos:this.avg(r.map((function(e){return e.rect["c"+t]()})))};e.push(i),i.nodes.forEach((function(t){return n.splice(n.indexOf(t),1)}))}return e.sort((function(t,e){return t.pos-e.pos})),e},t.prototype.getDepth=function(t){for(var e=0;t.parent!==this.root;)e++,t=t.parent;return e},t.prototype.midPoints=function(t){for(var e=t[1]-t[0],n=[t[0]-e/2],r=1;r.1)&&(c={pos:f[0][e],segments:[]},u.push(c)),c.segments.push(f)}return u},t.nudgeSegs=function(t,e,n,r,o,a){var s=r.length;if(!(s<=1)){for(var u=r.map((function(e){return new i.Variable(e[0][t])})),c=[],l=0;l=0&&c.push(new i.Constraint(u[v],u[b],a))}new i.Solver(u,c).solve(),u.forEach((function(e,i){var o=r[i],a=e.position();o[0][t]=o[1][t]=a;var s=n[o.edgeid];o.i>0&&(s[o.i-1][1][t]=a),o.iMath.PI||i<-Math.PI)&&(i=r-n),i},t.isLeft=function(t,e,n){return(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x)<=0},t.getOrder=function(t){for(var e={},n=0;n=c.length||f.ti+f.length>=l.length)?n.push({l:r,r:i}):(f.si+f.length>=c.length||f.ti+f.length>=l.length?(o=c[f.si+1],s=c[f.si-1],a=l[f.ti-1]):(o=c[f.si+f.length-2],a=c[f.si+f.length],s=l[f.ti+f.length]),t.isLeft(o,a,s)?n.push({l:i,r:r}):n.push({l:r,r:i})))}return t.getOrder(n)},t.makeSegments=function(t){function e(t){return{x:t.x,y:t.y}}for(var n=function(t,e,n){return Math.abs((e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x))<.001},r=[],i=e(t[0]),o=1;o1&&l>1?1e3:0})).reverse().map((function(t){return n.verts[t]}));return l.push(this.nodes[i.id].ports[0]),l.filter((function(t,e){return!(e0&&t.node===i&&l[e-1].node===i)}))},t.getRoutePath=function(e,n,r,i){var o={routepath:"M "+e[0][0].x+" "+e[0][0].y+" ",arrowpath:""};if(e.length>1)for(var a=0;a0?s-=c/Math.abs(c)*n:u-=l/Math.abs(l)*n,o.routepath+="L "+s+" "+u+" ";var f=e[a+1],h=f[0].x,d=f[0].y;c=f[1].x-h,l=f[1].y-d;var p,g,v=t.angleBetween2Lines(m,f)<0?1:0;Math.abs(c)>0?(p=h+c/Math.abs(c)*n,g=d):(p=h,g=d+l/Math.abs(l)*n);var b=Math.abs(p-s),y=Math.abs(g-u);o.routepath+="A "+b+" "+y+" 0 0 "+v+" "+p+" "+g+" "}else{var w=[s,u];Math.abs(c)>0?(x=[s-=c/Math.abs(c)*i,u+r],_=[s,u-r]):(x=[s+r,u-=l/Math.abs(l)*i],_=[s-r,u]),o.routepath+="L "+s+" "+u+" ",i>0&&(o.arrowpath="M "+w[0]+" "+w[1]+" L "+x[0]+" "+x[1]+" L "+_[0]+" "+_[1])}}else{var m,x,_;s=(m=e[0])[1].x,u=m[1].y,c=s-m[0].x,l=u-m[0].y,w=[s,u];Math.abs(c)>0?(x=[s-=c/Math.abs(c)*i,u+r],_=[s,u-r]):(x=[s+r,u-=l/Math.abs(l)*i],_=[s-r,u]),o.routepath+="L "+s+" "+u+" ",i>0&&(o.arrowpath="M "+w[0]+" "+w[1]+" L "+x[0]+" "+x[1]+" L "+_[0]+" "+_[1])}return o},t}();e.GridRouter=c},function(t,e,n){var r=n(30),i=n(53),o=n(35),a=n(188),s=n(194),u=n(84),c=n(85),l=n(197),f=n(198),h=n(89),d=n(199),p=n(18),g=n(203),v=n(204),b=n(94),y=n(1),w=n(16),m=n(208),x=n(4),_=n(210),E=n(10),k={};k["[object Arguments]"]=k["[object Array]"]=k["[object ArrayBuffer]"]=k["[object DataView]"]=k["[object Boolean]"]=k["[object Date]"]=k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Map]"]=k["[object Number]"]=k["[object Object]"]=k["[object RegExp]"]=k["[object Set]"]=k["[object String]"]=k["[object Symbol]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k["[object Error]"]=k["[object Function]"]=k["[object WeakMap]"]=!1,t.exports=function t(e,n,S,C,T,A){var N,O=1&n,L=2&n,P=4&n;if(S&&(N=T?S(e,C,T,A):S(e)),void 0!==N)return N;if(!x(e))return e;var I=y(e);if(I){if(N=g(e),!O)return c(e,N)}else{var j=p(e),M="[object Function]"==j||"[object GeneratorFunction]"==j;if(w(e))return u(e,O);if("[object Object]"==j||"[object Arguments]"==j||M&&!T){if(N=L||M?{}:b(e),!O)return L?f(e,s(N,e)):l(e,a(N,e))}else{if(!k[j])return T?e:{};N=v(e,j,O)}}A||(A=new r);var D=A.get(e);if(D)return D;A.set(e,N),_(e)?e.forEach((function(r){N.add(t(r,n,S,r,e,A))})):m(e)&&e.forEach((function(r,i){N.set(i,t(r,n,S,i,e,A))}));var R=P?L?d:h:L?keysIn:E,B=I?void 0:R(e);return i(B||e,(function(r,i){B&&(r=e[i=r]),o(N,i,t(r,n,S,i,e,A))})),N}},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(20))},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,n){var r=n(11),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,n){var r=n(189),i=n(25),o=n(1),a=n(16),s=n(37),u=n(26),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),l=!n&&i(t),f=!n&&!l&&a(t),h=!n&&!l&&!f&&u(t),d=n||l||f||h,p=d?r(t.length,String):[],g=p.length;for(var v in t)!e&&!c.call(t,v)||d&&("length"==v||f&&("offset"==v||"parent"==v)||h&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,g))||p.push(v);return p}},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){(function(t){var r=n(6),i=e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r}}).call(this,n(28)(t))},function(t,e){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++nl))return!1;var h=u.get(t);if(h&&u.get(e))return h==e;var d=-1,p=!0,g=2&n?new r:void 0;for(u.set(t,e),u.set(e,t);++d0&&(o=u.removeMin(),(a=s[o]).distance!==Number.POSITIVE_INFINITY);)r(o).forEach(c);return s}(t,String(e),n||o,r||function(e){return t.outEdges(e)})};var o=r.constant(1)},function(t,e,n){var r=n(3);function i(){this._arr=[],this._keyIndices={}}t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},i.prototype.has=function(t){return r.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,o=i.length;return n[t]=o,i.push({key:t,priority:e}),this._decrease(o),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},i.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},i.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n>1].priority0&&(this.props.setProps({generateImage:{}}),this._cy&&this.handleImageGeneration(x.type,x.options,x.action,x.filename)),this.cyResponsiveClass&&this.cyResponsiveClass.toggle(_),o.default.createElement(s.default,{id:e,cy:this.handleCy,className:r,style:n,elements:s.default.normalizeElements(i),stylesheet:a,layout:u,pan:c,zoom:l,panningEnabled:f,userPanningEnabled:h,minZoom:d,maxZoom:p,zoomingEnabled:g,userZoomingEnabled:v,boxSelectionEnabled:b,autoungrabify:y,autolock:w,autounselectify:m})}}]),e}(i.Component);f.propTypes={id:a.default.string,className:a.default.string,style:a.default.object,setProps:a.default.func,elements:a.default.oneOfType([a.default.arrayOf(a.default.shape({group:a.default.string,data:a.default.shape({id:a.default.string,label:a.default.string,parent:a.default.string,source:a.default.string,target:a.default.string}),position:a.default.shape({x:a.default.number,y:a.default.number}),selected:a.default.bool,selectable:a.default.bool,locked:a.default.bool,grabbable:a.default.bool,classes:a.default.string})),a.default.exact({nodes:a.default.array,edges:a.default.array})]),stylesheet:a.default.arrayOf(a.default.exact({selector:a.default.string.isRequired,style:a.default.object.isRequired})),layout:a.default.shape({name:a.default.oneOf(["random","preset","circle","concentric","grid","breadthfirst","cose","close-bilkent","cola","euler","spread","dagre","klay"]).isRequired,fit:a.default.bool,padding:a.default.number,animate:a.default.bool,animationDuration:a.default.number,boundingBox:a.default.object}),pan:a.default.exact({x:a.default.number,y:a.default.number}),zoom:a.default.number,panningEnabled:a.default.bool,userPanningEnabled:a.default.bool,minZoom:a.default.number,maxZoom:a.default.number,zoomingEnabled:a.default.bool,userZoomingEnabled:a.default.bool,boxSelectionEnabled:a.default.bool,autoungrabify:a.default.bool,autolock:a.default.bool,autounselectify:a.default.bool,autoRefreshLayout:a.default.bool,tapNode:a.default.exact({edgesData:a.default.array,renderedPosition:a.default.object,timeStamp:a.default.number,classes:a.default.string,data:a.default.object,grabbable:a.default.bool,group:a.default.string,locked:a.default.bool,position:a.default.object,selectable:a.default.bool,selected:a.default.bool,style:a.default.object,ancestorsData:a.default.oneOfType([a.default.object,a.default.array]),childrenData:a.default.oneOfType([a.default.object,a.default.array]),descendantsData:a.default.oneOfType([a.default.object,a.default.array]),parentData:a.default.oneOfType([a.default.object,a.default.array]),siblingsData:a.default.oneOfType([a.default.object,a.default.array]),isParent:a.default.bool,isChildless:a.default.bool,isChild:a.default.bool,isOrphan:a.default.bool,relativePosition:a.default.object}),tapNodeData:a.default.object,tapEdge:a.default.exact({isLoop:a.default.bool,isSimple:a.default.bool,midpoint:a.default.object,sourceData:a.default.object,sourceEndpoint:a.default.object,targetData:a.default.object,targetEndpoint:a.default.object,timeStamp:a.default.number,classes:a.default.string,data:a.default.object,grabbable:a.default.bool,group:a.default.string,locked:a.default.bool,selectable:a.default.bool,selected:a.default.bool,style:a.default.object}),tapEdgeData:a.default.object,mouseoverNodeData:a.default.object,mouseoverEdgeData:a.default.object,selectedNodeData:a.default.array,selectedEdgeData:a.default.array,generateImage:a.default.shape({type:a.default.oneOf(["svg","png","jpg","jpeg"]),options:a.default.object,action:a.default.oneOf(["store","download","both"]),filename:a.default.string}),imageData:a.default.string,responsive:a.default.bool},f.defaultProps={style:{width:"600px",height:"600px"},layout:{name:"grid"},pan:{x:0,y:0},zoom:1,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:!0,userZoomingEnabled:!0,panningEnabled:!0,userPanningEnabled:!0,boxSelectionEnabled:!1,autolock:!1,autoungrabify:!1,autounselectify:!1,autoRefreshLayout:!0,generateImage:{},imageData:null,responsive:!1,elements:[]},e.default=f},function(t,e,n){"use strict";var r=n(134);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function t(t,e,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){window,t.exports=function(t,e,n,r){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=r({}),o=function(t,e){return null==t||null==e};e.hashDiff=function(t,e){return o(t,e)||t.hash()!==e.hash()},e.shallowObjDiff=function(t,e){if(o(t,e)&&(null!=t||null!=e))return!0;if(t===e)return!1;if((void 0===t?"undefined":r(t))!==i||(void 0===e?"undefined":r(e))!==i)return t!==e;var n=Object.keys(t),a=Object.keys(e),s=function(n){return t[n]!==e[n]};return n.length!==a.length||!(!n.some(s)&&!a.some(s))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.get=function(t,e){return null!=t?t[e]:null},e.toJson=function(t){return t},e.forEach=function(t,e){return t.forEach(e)}},function(t,e,n){"use strict";t.exports=n(3).default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0&&t.remove(u),s.length>0&&t.add(s),c.forEach((function(e){var n=e.ele1,o=e.ele2;return l(t,n,o,r,i,a)}))},l=function(t,e,n,r,i,o){var a=i(i(n,"data"),"id"),s=t.getElementById(a),u={};["data","position","selected","selectable","locked","grabbable","classes"].forEach((function(t){var a=i(n,t);o(a,i(e,t))&&(u[t]=r(a))}));var c=i(n,"scratch");o(c,i(e,"scratch"))&&s.scratch(r(c)),Object.keys(u).length>0&&s.json(u)}}])}(n(68),n(136),n(69),n(70))},function(t,e){t.exports=window.ReactDOM},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,a,s,u=1,c={},l=!1,f=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){p(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){p(t.data)},r=function(t){o.port2.postMessage(t)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,r=function(t){var e=f.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(p,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&p(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),r=function(e){t.postMessage(a+e,"*")}),h.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n1)for(var n=1;n=e||n<0||v&&t-c>=o}function x(){var t=d();if(m(t))return _(t);s=setTimeout(x,function(t){var n=e-(t-u);return v?h(n,o-(t-c)):n}(t))}function _(t){return s=void 0,b&&r?y(t):(r=i=void 0,a)}function E(){var t=d(),n=m(t);if(r=arguments,i=this,u=t,n){if(void 0===s)return w(u);if(v)return s=setTimeout(x,e),y(u)}return void 0===s&&(s=setTimeout(x,e)),a}return e=g(e)||0,p(n)&&(l=!!n.leading,o=(v="maxWait"in n)?f(g(n.maxWait)||0,e):o,b="trailing"in n?!!n.trailing:b),E.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0},E.flush=function(){return void 0===s?a:_(d())},E}}).call(this,n(20))},function(t,e,n){t.exports=n(141)},function(t,e,n){var r,i,o;(function(){var n,a,s,u,c,l,f,h,d,p,g,v,b,y,w;s=Math.floor,p=Math.min,a=function(t,e){return te?1:0},d=function(t,e,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=t.length);nn;0<=n?e++:e--)c.push(e);return c}.apply(this).reverse()).length;rg;0<=g?++l:--l)v.push(c(t,n));return v},y=function(t,e,n,r){var i,o,s;for(null==r&&(r=a),i=t[n];n>e&&r(i,o=t[s=n-1>>1])<0;)t[n]=o,n=s;return t[n]=i},w=function(t,e,n){var r,i,o,s,u;for(null==n&&(n=a),i=t.length,u=e,o=t[e],r=2*e+1;r * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */(function(){var o="Expected a function",a="__lodash_placeholder__",s=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],u="[object Arguments]",c="[object Array]",l="[object Boolean]",f="[object Date]",h="[object Error]",d="[object Function]",p="[object GeneratorFunction]",g="[object Map]",v="[object Number]",b="[object Object]",y="[object RegExp]",w="[object Set]",m="[object String]",x="[object Symbol]",_="[object WeakMap]",E="[object ArrayBuffer]",k="[object DataView]",S="[object Float32Array]",C="[object Float64Array]",T="[object Int8Array]",A="[object Int16Array]",N="[object Int32Array]",O="[object Uint8Array]",L="[object Uint16Array]",P="[object Uint32Array]",I=/\b__p \+= '';/g,j=/\b(__p \+=) '' \+/g,M=/(__e\(.*?\)|\b__t\)) \+\n'';/g,D=/&(?:amp|lt|gt|quot|#39);/g,R=/[&<>"']/g,B=RegExp(D.source),G=RegExp(R.source),H=/<%-([\s\S]+?)%>/g,F=/<%([\s\S]+?)%>/g,z=/<%=([\s\S]+?)%>/g,Y=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,V=/^\w*$/,q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,U=/[\\^$.*+?()[\]{}|]/g,X=RegExp(U.source),W=/^\s+|\s+$/g,$=/^\s+/,K=/\s+$/,Z=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Q=/\{\n\/\* \[wrapped with (.+)\] \*/,J=/,? & /,tt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,et=/\\(\\)?/g,nt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,rt=/\w*$/,it=/^[-+]0x[0-9a-f]+$/i,ot=/^0b[01]+$/i,at=/^\[object .+?Constructor\]$/,st=/^0o[0-7]+$/i,ut=/^(?:0|[1-9]\d*)$/,ct=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,lt=/($^)/,ft=/['\n\r\u2028\u2029\\]/g,ht="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",dt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pt="[\\ud800-\\udfff]",gt="["+dt+"]",vt="["+ht+"]",bt="\\d+",yt="[\\u2700-\\u27bf]",wt="[a-z\\xdf-\\xf6\\xf8-\\xff]",mt="[^\\ud800-\\udfff"+dt+bt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",xt="\\ud83c[\\udffb-\\udfff]",_t="[^\\ud800-\\udfff]",Et="(?:\\ud83c[\\udde6-\\uddff]){2}",kt="[\\ud800-\\udbff][\\udc00-\\udfff]",St="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ct="(?:"+wt+"|"+mt+")",Tt="(?:"+St+"|"+mt+")",At="(?:"+vt+"|"+xt+")"+"?",Nt="[\\ufe0e\\ufe0f]?"+At+("(?:\\u200d(?:"+[_t,Et,kt].join("|")+")[\\ufe0e\\ufe0f]?"+At+")*"),Ot="(?:"+[yt,Et,kt].join("|")+")"+Nt,Lt="(?:"+[_t+vt+"?",vt,Et,kt,pt].join("|")+")",Pt=RegExp("['’]","g"),It=RegExp(vt,"g"),jt=RegExp(xt+"(?="+xt+")|"+Lt+Nt,"g"),Mt=RegExp([St+"?"+wt+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[gt,St,"$"].join("|")+")",Tt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[gt,St+Ct,"$"].join("|")+")",St+"?"+Ct+"+(?:['’](?:d|ll|m|re|s|t|ve))?",St+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",bt,Ot].join("|"),"g"),Dt=RegExp("[\\u200d\\ud800-\\udfff"+ht+"\\ufe0e\\ufe0f]"),Rt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Bt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Gt=-1,Ht={};Ht[S]=Ht[C]=Ht[T]=Ht[A]=Ht[N]=Ht[O]=Ht["[object Uint8ClampedArray]"]=Ht[L]=Ht[P]=!0,Ht[u]=Ht[c]=Ht[E]=Ht[l]=Ht[k]=Ht[f]=Ht[h]=Ht[d]=Ht[g]=Ht[v]=Ht[b]=Ht[y]=Ht[w]=Ht[m]=Ht[_]=!1;var Ft={};Ft[u]=Ft[c]=Ft[E]=Ft[k]=Ft[l]=Ft[f]=Ft[S]=Ft[C]=Ft[T]=Ft[A]=Ft[N]=Ft[g]=Ft[v]=Ft[b]=Ft[y]=Ft[w]=Ft[m]=Ft[x]=Ft[O]=Ft["[object Uint8ClampedArray]"]=Ft[L]=Ft[P]=!0,Ft[h]=Ft[d]=Ft[_]=!1;var zt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Yt=parseFloat,Vt=parseInt,qt="object"==typeof t&&t&&t.Object===Object&&t,Ut="object"==typeof self&&self&&self.Object===Object&&self,Xt=qt||Ut||Function("return this")(),Wt=e&&!e.nodeType&&e,$t=Wt&&"object"==typeof r&&r&&!r.nodeType&&r,Kt=$t&&$t.exports===Wt,Zt=Kt&&qt.process,Qt=function(){try{var t=$t&&$t.require&&$t.require("util").types;return t||Zt&&Zt.binding&&Zt.binding("util")}catch(t){}}(),Jt=Qt&&Qt.isArrayBuffer,te=Qt&&Qt.isDate,ee=Qt&&Qt.isMap,ne=Qt&&Qt.isRegExp,re=Qt&&Qt.isSet,ie=Qt&&Qt.isTypedArray;function oe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function ae(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i-1}function he(t,e,n){for(var r=-1,i=null==t?0:t.length;++r-1;);return n}function je(t,e){for(var n=t.length;n--&&xe(e,t[n],0)>-1;);return n}function Me(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var De=Ce({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Re=Ce({"&":"&","<":"<",">":">",'"':""","'":"'"});function Be(t){return"\\"+zt[t]}function Ge(t){return Dt.test(t)}function He(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Fe(t,e){return function(n){return t(e(n))}}function ze(t,e){for(var n=-1,r=t.length,i=0,o=[];++n",""":'"',"'":"'"});var We=function t(e){var n,r=(e=null==e?Xt:We.defaults(Xt.Object(),e,We.pick(Xt,Bt))).Array,i=e.Date,ht=e.Error,dt=e.Function,pt=e.Math,gt=e.Object,vt=e.RegExp,bt=e.String,yt=e.TypeError,wt=r.prototype,mt=dt.prototype,xt=gt.prototype,_t=e["__core-js_shared__"],Et=mt.toString,kt=xt.hasOwnProperty,St=0,Ct=(n=/[^.]+$/.exec(_t&&_t.keys&&_t.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Tt=xt.toString,At=Et.call(gt),Nt=Xt._,Ot=vt("^"+Et.call(kt).replace(U,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lt=Kt?e.Buffer:void 0,jt=e.Symbol,Dt=e.Uint8Array,zt=Lt?Lt.allocUnsafe:void 0,qt=Fe(gt.getPrototypeOf,gt),Ut=gt.create,Wt=xt.propertyIsEnumerable,$t=wt.splice,Zt=jt?jt.isConcatSpreadable:void 0,Qt=jt?jt.iterator:void 0,ye=jt?jt.toStringTag:void 0,Ce=function(){try{var t=Ji(gt,"defineProperty");return t({},"",{}),t}catch(t){}}(),$e=e.clearTimeout!==Xt.clearTimeout&&e.clearTimeout,Ke=i&&i.now!==Xt.Date.now&&i.now,Ze=e.setTimeout!==Xt.setTimeout&&e.setTimeout,Qe=pt.ceil,Je=pt.floor,tn=gt.getOwnPropertySymbols,en=Lt?Lt.isBuffer:void 0,nn=e.isFinite,rn=wt.join,on=Fe(gt.keys,gt),an=pt.max,sn=pt.min,un=i.now,cn=e.parseInt,ln=pt.random,fn=wt.reverse,hn=Ji(e,"DataView"),dn=Ji(e,"Map"),pn=Ji(e,"Promise"),gn=Ji(e,"Set"),vn=Ji(e,"WeakMap"),bn=Ji(gt,"create"),yn=vn&&new vn,wn={},mn=To(hn),xn=To(dn),_n=To(pn),En=To(gn),kn=To(vn),Sn=jt?jt.prototype:void 0,Cn=Sn?Sn.valueOf:void 0,Tn=Sn?Sn.toString:void 0;function An(t){if(Va(t)&&!Ia(t)&&!(t instanceof Pn)){if(t instanceof Ln)return t;if(kt.call(t,"__wrapped__"))return Ao(t)}return new Ln(t)}var Nn=function(){function t(){}return function(e){if(!Ya(e))return{};if(Ut)return Ut(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function On(){}function Ln(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}function Pn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function In(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=e?t:e)),t}function Kn(t,e,n,r,i,o){var a,s=1&e,c=2&e,h=4&e;if(n&&(a=i?n(t,r,i,o):n(t)),void 0!==a)return a;if(!Ya(t))return t;var _=Ia(t);if(_){if(a=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&kt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!s)return bi(t,a)}else{var I=no(t),j=I==d||I==p;if(Ra(t))return fi(t,s);if(I==b||I==u||j&&!i){if(a=c||j?{}:io(t),!s)return c?function(t,e){return yi(t,eo(t),e)}(t,function(t,e){return t&&yi(e,xs(e),t)}(a,t)):function(t,e){return yi(t,to(t),e)}(t,Un(a,t))}else{if(!Ft[I])return i?t:{};a=function(t,e,n){var r=t.constructor;switch(e){case E:return hi(t);case l:case f:return new r(+t);case k:return function(t,e){var n=e?hi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case S:case C:case T:case A:case N:case O:case"[object Uint8ClampedArray]":case L:case P:return di(t,n);case g:return new r;case v:case m:return new r(t);case y:return function(t){var e=new t.constructor(t.source,rt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case w:return new r;case x:return i=t,Cn?gt(Cn.call(i)):{}}var i}(t,I,s)}}o||(o=new Rn);var M=o.get(t);if(M)return M;o.set(t,a),$a(t)?t.forEach((function(r){a.add(Kn(r,e,n,r,t,o))})):qa(t)&&t.forEach((function(r,i){a.set(i,Kn(r,e,n,i,t,o))}));var D=_?void 0:(h?c?Ui:qi:c?xs:ms)(t);return se(D||t,(function(r,i){D&&(r=t[i=r]),Yn(a,i,Kn(r,e,n,i,t,o))})),a}function Zn(t,e,n){var r=n.length;if(null==t)return!r;for(t=gt(t);r--;){var i=n[r],o=e[i],a=t[i];if(void 0===a&&!(i in t)||!o(a))return!1}return!0}function Qn(t,e,n){if("function"!=typeof t)throw new yt(o);return mo((function(){t.apply(void 0,n)}),e)}function Jn(t,e,n,r){var i=-1,o=fe,a=!0,s=t.length,u=[],c=e.length;if(!s)return u;n&&(e=de(e,Oe(n))),r?(o=he,a=!1):e.length>=200&&(o=Pe,a=!1,e=new Dn(e));t:for(;++i-1},jn.prototype.set=function(t,e){var n=this.__data__,r=Vn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Mn.prototype.clear=function(){this.size=0,this.__data__={hash:new In,map:new(dn||jn),string:new In}},Mn.prototype.delete=function(t){var e=Zi(this,t).delete(t);return this.size-=e?1:0,e},Mn.prototype.get=function(t){return Zi(this,t).get(t)},Mn.prototype.has=function(t){return Zi(this,t).has(t)},Mn.prototype.set=function(t,e){var n=Zi(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Dn.prototype.add=Dn.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Dn.prototype.has=function(t){return this.__data__.has(t)},Rn.prototype.clear=function(){this.__data__=new jn,this.size=0},Rn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Rn.prototype.get=function(t){return this.__data__.get(t)},Rn.prototype.has=function(t){return this.__data__.has(t)},Rn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof jn){var r=n.__data__;if(!dn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Mn(r)}return n.set(t,e),this.size=n.size,this};var tr=xi(ur),er=xi(cr,!0);function nr(t,e){var n=!0;return tr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function rr(t,e,n){for(var r=-1,i=t.length;++r0&&n(s)?e>1?or(s,e-1,n,r,i):pe(i,s):r||(i[i.length]=s)}return i}var ar=_i(),sr=_i(!0);function ur(t,e){return t&&ar(t,e,ms)}function cr(t,e){return t&&sr(t,e,ms)}function lr(t,e){return le(e,(function(e){return Ha(t[e])}))}function fr(t,e){for(var n=0,r=(e=si(e,t)).length;null!=t&&ne}function gr(t,e){return null!=t&&kt.call(t,e)}function vr(t,e){return null!=t&&e in gt(t)}function br(t,e,n){for(var i=n?he:fe,o=t[0].length,a=t.length,s=a,u=r(a),c=1/0,l=[];s--;){var f=t[s];s&&e&&(f=de(f,Oe(e))),c=sn(f.length,c),u[s]=!n&&(e||o>=120&&f.length>=120)?new Dn(s&&f):void 0}f=t[0];var h=-1,d=u[0];t:for(;++h=s)return u;var c=n[r];return u*("desc"==c?-1:1)}}return t.index-e.index}(t,e,n)}))}function Ir(t,e,n){for(var r=-1,i=e.length,o={};++r-1;)s!==t&&$t.call(s,u,1),$t.call(t,u,1);return t}function Mr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;ao(i)?$t.call(t,i,1):Jr(t,i)}}return t}function Dr(t,e){return t+Je(ln()*(e-t+1))}function Rr(t,e){var n="";if(!t||e<1||e>9007199254740991)return n;do{e%2&&(n+=t),(e=Je(e/2))&&(t+=t)}while(e);return n}function Br(t,e){return xo(go(t,e,Us),t+"")}function Gr(t){return Gn(Ns(t))}function Hr(t,e){var n=Ns(t);return ko(n,$n(e,0,n.length))}function Fr(t,e,n,r){if(!Ya(t))return t;for(var i=-1,o=(e=si(e,t)).length,a=o-1,s=t;null!=s&&++io?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i>>1,a=t[o];null!==a&&!Za(a)&&(n?a<=e:a=200){var c=e?null:Ri(t);if(c)return Ye(c);a=!1,i=Pe,u=new Dn}else u=e?[]:s;t:for(;++r=r?t:qr(t,e,n)}var li=$e||function(t){return Xt.clearTimeout(t)};function fi(t,e){if(e)return t.slice();var n=t.length,r=zt?zt(n):new t.constructor(n);return t.copy(r),r}function hi(t){var e=new t.constructor(t.byteLength);return new Dt(e).set(new Dt(t)),e}function di(t,e){var n=e?hi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function pi(t,e){if(t!==e){var n=void 0!==t,r=null===t,i=t==t,o=Za(t),a=void 0!==e,s=null===e,u=e==e,c=Za(e);if(!s&&!c&&!o&&t>e||o&&a&&u&&!s&&!c||r&&a&&u||!n&&u||!i)return 1;if(!r&&!o&&!c&&t1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,a&&so(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),e=gt(e);++r-1?i[o?e[a]:a]:void 0}}function Ti(t){return Vi((function(e){var n=e.length,r=n,i=Ln.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new yt(o);if(i&&!s&&"wrapper"==Wi(a))var s=new Ln([],!0)}for(r=s?r:n;++r1&&w.reverse(),f&&cs))return!1;var c=o.get(t),l=o.get(e);if(c&&l)return c==e&&l==t;var f=-1,h=!0,d=2&n?new Dn:void 0;for(o.set(t,e),o.set(e,t);++f-1&&t%1==0&&t1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Z,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return se(s,(function(n){var r="_."+n[0];e&n[1]&&!fe(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(Q);return e?e[1].split(J):[]}(r),n)))}function Eo(t){var e=0,n=0;return function(){var r=un(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function ko(t,e){var n=-1,r=t.length,i=r-1;for(e=void 0===e?r:e;++n1?t[e-1]:void 0;return n="function"==typeof n?(t.pop(),n):void 0,Wo(t,n)}));function ea(t){var e=An(t);return e.__chain__=!0,e}function na(t,e){return e(t)}var ra=Vi((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Wn(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Pn&&ao(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:na,args:[i],thisArg:void 0}),new Ln(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(void 0),t}))):this.thru(i)}));var ia=wi((function(t,e,n){kt.call(t,n)?++t[n]:Xn(t,n,1)}));var oa=Ci(Po),aa=Ci(Io);function sa(t,e){return(Ia(t)?se:tr)(t,Ki(e,3))}function ua(t,e){return(Ia(t)?ue:er)(t,Ki(e,3))}var ca=wi((function(t,e,n){kt.call(t,n)?t[n].push(e):Xn(t,n,[e])}));var la=Br((function(t,e,n){var i=-1,o="function"==typeof e,a=Ma(t)?r(t.length):[];return tr(t,(function(t){a[++i]=o?oe(e,t,n):yr(t,e,n)})),a})),fa=wi((function(t,e,n){Xn(t,n,e)}));function ha(t,e){return(Ia(t)?de:Tr)(t,Ki(e,3))}var da=wi((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var pa=Br((function(t,e){if(null==t)return[];var n=e.length;return n>1&&so(t,e[0],e[1])?e=[]:n>2&&so(e[0],e[1],e[2])&&(e=[e[0]]),Pr(t,or(e,1),[])})),ga=Ke||function(){return Xt.Date.now()};function va(t,e,n){return e=n?void 0:e,Gi(t,128,void 0,void 0,void 0,void 0,e=t&&null==e?t.length:e)}function ba(t,e){var n;if("function"!=typeof e)throw new yt(o);return t=rs(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}var ya=Br((function(t,e,n){var r=1;if(n.length){var i=ze(n,$i(ya));r|=32}return Gi(t,r,e,n,i)})),wa=Br((function(t,e,n){var r=3;if(n.length){var i=ze(n,$i(wa));r|=32}return Gi(e,r,t,n,i)}));function ma(t,e,n){var r,i,a,s,u,c,l=0,f=!1,h=!1,d=!0;if("function"!=typeof t)throw new yt(o);function p(e){var n=r,o=i;return r=i=void 0,l=e,s=t.apply(o,n)}function g(t){return l=t,u=mo(b,e),f?p(t):s}function v(t){var n=t-c;return void 0===c||n>=e||n<0||h&&t-l>=a}function b(){var t=ga();if(v(t))return y(t);u=mo(b,function(t){var n=e-(t-c);return h?sn(n,a-(t-l)):n}(t))}function y(t){return u=void 0,d&&r?p(t):(r=i=void 0,s)}function w(){var t=ga(),n=v(t);if(r=arguments,i=this,c=t,n){if(void 0===u)return g(c);if(h)return li(u),u=mo(b,e),p(c)}return void 0===u&&(u=mo(b,e)),s}return e=os(e)||0,Ya(n)&&(f=!!n.leading,a=(h="maxWait"in n)?an(os(n.maxWait)||0,e):a,d="trailing"in n?!!n.trailing:d),w.cancel=function(){void 0!==u&&li(u),l=0,r=c=i=u=void 0},w.flush=function(){return void 0===u?s:y(ga())},w}var xa=Br((function(t,e){return Qn(t,1,e)})),_a=Br((function(t,e,n){return Qn(t,os(e)||0,n)}));function Ea(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new yt(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ea.Cache||Mn),n}function ka(t){if("function"!=typeof t)throw new yt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ea.Cache=Mn;var Sa=ui((function(t,e){var n=(e=1==e.length&&Ia(e[0])?de(e[0],Oe(Ki())):de(or(e,1),Oe(Ki()))).length;return Br((function(r){for(var i=-1,o=sn(r.length,n);++i=e})),Pa=wr(function(){return arguments}())?wr:function(t){return Va(t)&&kt.call(t,"callee")&&!Wt.call(t,"callee")},Ia=r.isArray,ja=Jt?Oe(Jt):function(t){return Va(t)&&dr(t)==E};function Ma(t){return null!=t&&za(t.length)&&!Ha(t)}function Da(t){return Va(t)&&Ma(t)}var Ra=en||ou,Ba=te?Oe(te):function(t){return Va(t)&&dr(t)==f};function Ga(t){if(!Va(t))return!1;var e=dr(t);return e==h||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!Xa(t)}function Ha(t){if(!Ya(t))return!1;var e=dr(t);return e==d||e==p||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Fa(t){return"number"==typeof t&&t==rs(t)}function za(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Ya(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Va(t){return null!=t&&"object"==typeof t}var qa=ee?Oe(ee):function(t){return Va(t)&&no(t)==g};function Ua(t){return"number"==typeof t||Va(t)&&dr(t)==v}function Xa(t){if(!Va(t)||dr(t)!=b)return!1;var e=qt(t);if(null===e)return!0;var n=kt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Et.call(n)==At}var Wa=ne?Oe(ne):function(t){return Va(t)&&dr(t)==y};var $a=re?Oe(re):function(t){return Va(t)&&no(t)==w};function Ka(t){return"string"==typeof t||!Ia(t)&&Va(t)&&dr(t)==m}function Za(t){return"symbol"==typeof t||Va(t)&&dr(t)==x}var Qa=ie?Oe(ie):function(t){return Va(t)&&za(t.length)&&!!Ht[dr(t)]};var Ja=ji(Cr),ts=ji((function(t,e){return t<=e}));function es(t){if(!t)return[];if(Ma(t))return Ka(t)?Ue(t):bi(t);if(Qt&&t[Qt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Qt]());var e=no(t);return(e==g?He:e==w?Ye:Ns)(t)}function ns(t){return t?(t=os(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function rs(t){var e=ns(t),n=e%1;return e==e?n?e-n:e:0}function is(t){return t?$n(rs(t),0,4294967295):0}function os(t){if("number"==typeof t)return t;if(Za(t))return NaN;if(Ya(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Ya(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(W,"");var n=ot.test(t);return n||st.test(t)?Vt(t.slice(2),n?2:8):it.test(t)?NaN:+t}function as(t){return yi(t,xs(t))}function ss(t){return null==t?"":Zr(t)}var us=mi((function(t,e){if(fo(e)||Ma(e))yi(e,ms(e),t);else for(var n in e)kt.call(e,n)&&Yn(t,n,e[n])})),cs=mi((function(t,e){yi(e,xs(e),t)})),ls=mi((function(t,e,n,r){yi(e,xs(e),t,r)})),fs=mi((function(t,e,n,r){yi(e,ms(e),t,r)})),hs=Vi(Wn);var ds=Br((function(t,e){t=gt(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&so(e[0],e[1],i)&&(r=1);++n1),e})),yi(t,Ui(t),n),r&&(n=Kn(n,7,zi));for(var i=e.length;i--;)Jr(n,e[i]);return n}));var Ss=Vi((function(t,e){return null==t?{}:function(t,e){return Ir(t,e,(function(e,n){return vs(t,n)}))}(t,e)}));function Cs(t,e){if(null==t)return{};var n=de(Ui(t),(function(t){return[t]}));return e=Ki(e),Ir(t,n,(function(t,n){return e(t,n[0])}))}var Ts=Bi(ms),As=Bi(xs);function Ns(t){return null==t?[]:Le(t,ms(t))}var Os=ki((function(t,e,n){return e=e.toLowerCase(),t+(n?Ls(e):e)}));function Ls(t){return Gs(ss(t).toLowerCase())}function Ps(t){return(t=ss(t))&&t.replace(ct,De).replace(It,"")}var Is=ki((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),js=ki((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Ms=Ei("toLowerCase");var Ds=ki((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Rs=ki((function(t,e,n){return t+(n?" ":"")+Gs(e)}));var Bs=ki((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Gs=Ei("toUpperCase");function Hs(t,e,n){return t=ss(t),void 0===(e=n?void 0:e)?function(t){return Rt.test(t)}(t)?function(t){return t.match(Mt)||[]}(t):function(t){return t.match(tt)||[]}(t):t.match(e)||[]}var Fs=Br((function(t,e){try{return oe(t,void 0,e)}catch(t){return Ga(t)?t:new ht(t)}})),zs=Vi((function(t,e){return se(e,(function(e){e=Co(e),Xn(t,e,ya(t[e],t))})),t}));function Ys(t){return function(){return t}}var Vs=Ti(),qs=Ti(!0);function Us(t){return t}function Xs(t){return Er("function"==typeof t?t:Kn(t,1))}var Ws=Br((function(t,e){return function(n){return yr(n,t,e)}})),$s=Br((function(t,e){return function(n){return yr(t,n,e)}}));function Ks(t,e,n){var r=ms(e),i=lr(e,r);null!=n||Ya(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=lr(e,ms(e)));var o=!(Ya(n)&&"chain"in n&&!n.chain),a=Ha(t);return se(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=bi(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,pe([this.value()],arguments))})})),t}function Zs(){}var Qs=Li(de),Js=Li(ce),tu=Li(be);function eu(t){return uo(t)?Se(Co(t)):function(t){return function(e){return fr(e,t)}}(t)}var nu=Ii(),ru=Ii(!0);function iu(){return[]}function ou(){return!1}var au=Oi((function(t,e){return t+e}),0),su=Di("ceil"),uu=Oi((function(t,e){return t/e}),1),cu=Di("floor");var lu,fu=Oi((function(t,e){return t*e}),1),hu=Di("round"),du=Oi((function(t,e){return t-e}),0);return An.after=function(t,e){if("function"!=typeof e)throw new yt(o);return t=rs(t),function(){if(--t<1)return e.apply(this,arguments)}},An.ary=va,An.assign=us,An.assignIn=cs,An.assignInWith=ls,An.assignWith=fs,An.at=hs,An.before=ba,An.bind=ya,An.bindAll=zs,An.bindKey=wa,An.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ia(t)?t:[t]},An.chain=ea,An.chunk=function(t,e,n){e=(n?so(t,e,n):void 0===e)?1:an(rs(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var o=0,a=0,s=r(Qe(i/e));oi?0:i+n),(r=void 0===r||r>i?i:rs(r))<0&&(r+=i),r=n>r?0:is(r);n>>0)?(t=ss(t))&&("string"==typeof e||null!=e&&!Wa(e))&&!(e=Zr(e))&&Ge(t)?ci(Ue(t),0,n):t.split(e,n):[]},An.spread=function(t,e){if("function"!=typeof t)throw new yt(o);return e=null==e?0:an(rs(e),0),Br((function(n){var r=n[e],i=ci(n,0,e);return r&&pe(i,r),oe(t,this,i)}))},An.tail=function(t){var e=null==t?0:t.length;return e?qr(t,1,e):[]},An.take=function(t,e,n){return t&&t.length?qr(t,0,(e=n||void 0===e?1:rs(e))<0?0:e):[]},An.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?qr(t,(e=r-(e=n||void 0===e?1:rs(e)))<0?0:e,r):[]},An.takeRightWhile=function(t,e){return t&&t.length?ei(t,Ki(e,3),!1,!0):[]},An.takeWhile=function(t,e){return t&&t.length?ei(t,Ki(e,3)):[]},An.tap=function(t,e){return e(t),t},An.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new yt(o);return Ya(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ma(t,e,{leading:r,maxWait:e,trailing:i})},An.thru=na,An.toArray=es,An.toPairs=Ts,An.toPairsIn=As,An.toPath=function(t){return Ia(t)?de(t,Co):Za(t)?[t]:bi(So(ss(t)))},An.toPlainObject=as,An.transform=function(t,e,n){var r=Ia(t),i=r||Ra(t)||Qa(t);if(e=Ki(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Ya(t)&&Ha(o)?Nn(qt(t)):{}}return(i?se:ur)(t,(function(t,r,i){return e(n,t,r,i)})),n},An.unary=function(t){return va(t,1)},An.union=Vo,An.unionBy=qo,An.unionWith=Uo,An.uniq=function(t){return t&&t.length?Qr(t):[]},An.uniqBy=function(t,e){return t&&t.length?Qr(t,Ki(e,2)):[]},An.uniqWith=function(t,e){return e="function"==typeof e?e:void 0,t&&t.length?Qr(t,void 0,e):[]},An.unset=function(t,e){return null==t||Jr(t,e)},An.unzip=Xo,An.unzipWith=Wo,An.update=function(t,e,n){return null==t?t:ti(t,e,ai(n))},An.updateWith=function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:ti(t,e,ai(n),r)},An.values=Ns,An.valuesIn=function(t){return null==t?[]:Le(t,xs(t))},An.without=$o,An.words=Hs,An.wrap=function(t,e){return Ca(ai(e),t)},An.xor=Ko,An.xorBy=Zo,An.xorWith=Qo,An.zip=Jo,An.zipObject=function(t,e){return ii(t||[],e||[],Yn)},An.zipObjectDeep=function(t,e){return ii(t||[],e||[],Fr)},An.zipWith=ta,An.entries=Ts,An.entriesIn=As,An.extend=cs,An.extendWith=ls,Ks(An,An),An.add=au,An.attempt=Fs,An.camelCase=Os,An.capitalize=Ls,An.ceil=su,An.clamp=function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=os(n))==n?n:0),void 0!==e&&(e=(e=os(e))==e?e:0),$n(os(t),e,n)},An.clone=function(t){return Kn(t,4)},An.cloneDeep=function(t){return Kn(t,5)},An.cloneDeepWith=function(t,e){return Kn(t,5,e="function"==typeof e?e:void 0)},An.cloneWith=function(t,e){return Kn(t,4,e="function"==typeof e?e:void 0)},An.conformsTo=function(t,e){return null==e||Zn(t,e,ms(e))},An.deburr=Ps,An.defaultTo=function(t,e){return null==t||t!=t?e:t},An.divide=uu,An.endsWith=function(t,e,n){t=ss(t),e=Zr(e);var r=t.length,i=n=void 0===n?r:$n(rs(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},An.eq=Na,An.escape=function(t){return(t=ss(t))&&G.test(t)?t.replace(R,Re):t},An.escapeRegExp=function(t){return(t=ss(t))&&X.test(t)?t.replace(U,"\\$&"):t},An.every=function(t,e,n){var r=Ia(t)?ce:nr;return n&&so(t,e,n)&&(e=void 0),r(t,Ki(e,3))},An.find=oa,An.findIndex=Po,An.findKey=function(t,e){return we(t,Ki(e,3),ur)},An.findLast=aa,An.findLastIndex=Io,An.findLastKey=function(t,e){return we(t,Ki(e,3),cr)},An.floor=cu,An.forEach=sa,An.forEachRight=ua,An.forIn=function(t,e){return null==t?t:ar(t,Ki(e,3),xs)},An.forInRight=function(t,e){return null==t?t:sr(t,Ki(e,3),xs)},An.forOwn=function(t,e){return t&&ur(t,Ki(e,3))},An.forOwnRight=function(t,e){return t&&cr(t,Ki(e,3))},An.get=gs,An.gt=Oa,An.gte=La,An.has=function(t,e){return null!=t&&ro(t,e,gr)},An.hasIn=vs,An.head=Mo,An.identity=Us,An.includes=function(t,e,n,r){t=Ma(t)?t:Ns(t),n=n&&!r?rs(n):0;var i=t.length;return n<0&&(n=an(i+n,0)),Ka(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&xe(t,e,n)>-1},An.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:rs(n);return i<0&&(i=an(r+i,0)),xe(t,e,i)},An.inRange=function(t,e,n){return e=ns(e),void 0===n?(n=e,e=0):n=ns(n),function(t,e,n){return t>=sn(e,n)&&t=-9007199254740991&&t<=9007199254740991},An.isSet=$a,An.isString=Ka,An.isSymbol=Za,An.isTypedArray=Qa,An.isUndefined=function(t){return void 0===t},An.isWeakMap=function(t){return Va(t)&&no(t)==_},An.isWeakSet=function(t){return Va(t)&&"[object WeakSet]"==dr(t)},An.join=function(t,e){return null==t?"":rn.call(t,e)},An.kebabCase=Is,An.last=Go,An.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=rs(n))<0?an(r+i,0):sn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):me(t,Ee,i,!0)},An.lowerCase=js,An.lowerFirst=Ms,An.lt=Ja,An.lte=ts,An.max=function(t){return t&&t.length?rr(t,Us,pr):void 0},An.maxBy=function(t,e){return t&&t.length?rr(t,Ki(e,2),pr):void 0},An.mean=function(t){return ke(t,Us)},An.meanBy=function(t,e){return ke(t,Ki(e,2))},An.min=function(t){return t&&t.length?rr(t,Us,Cr):void 0},An.minBy=function(t,e){return t&&t.length?rr(t,Ki(e,2),Cr):void 0},An.stubArray=iu,An.stubFalse=ou,An.stubObject=function(){return{}},An.stubString=function(){return""},An.stubTrue=function(){return!0},An.multiply=fu,An.nth=function(t,e){return t&&t.length?Lr(t,rs(e)):void 0},An.noConflict=function(){return Xt._===this&&(Xt._=Nt),this},An.noop=Zs,An.now=ga,An.pad=function(t,e,n){t=ss(t);var r=(e=rs(e))?qe(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Pi(Je(i),n)+t+Pi(Qe(i),n)},An.padEnd=function(t,e,n){t=ss(t);var r=(e=rs(e))?qe(t):0;return e&&re){var r=t;t=e,e=r}if(n||t%1||e%1){var i=ln();return sn(t+i*(e-t+Yt("1e-"+((i+"").length-1))),e)}return Dr(t,e)},An.reduce=function(t,e,n){var r=Ia(t)?ge:Te,i=arguments.length<3;return r(t,Ki(e,4),n,i,tr)},An.reduceRight=function(t,e,n){var r=Ia(t)?ve:Te,i=arguments.length<3;return r(t,Ki(e,4),n,i,er)},An.repeat=function(t,e,n){return e=(n?so(t,e,n):void 0===e)?1:rs(e),Rr(ss(t),e)},An.replace=function(){var t=arguments,e=ss(t[0]);return t.length<3?e:e.replace(t[1],t[2])},An.result=function(t,e,n){var r=-1,i=(e=si(e,t)).length;for(i||(i=1,t=void 0);++r9007199254740991)return[];var n=4294967295,r=sn(t,4294967295);t-=4294967295;for(var i=Ne(r,e=Ki(e));++n=o)return t;var s=n-qe(r);if(s<1)return r;var u=a?ci(a,0,s).join(""):t.slice(0,s);if(void 0===i)return u+r;if(a&&(s+=u.length-s),Wa(i)){if(t.slice(s).search(i)){var c,l=u;for(i.global||(i=vt(i.source,ss(rt.exec(i))+"g")),i.lastIndex=0;c=i.exec(l);)var f=c.index;u=u.slice(0,void 0===f?s:f)}}else if(t.indexOf(Zr(i),s)!=s){var h=u.lastIndexOf(i);h>-1&&(u=u.slice(0,h))}return u+r},An.unescape=function(t){return(t=ss(t))&&B.test(t)?t.replace(D,Xe):t},An.uniqueId=function(t){var e=++St;return ss(t)+e},An.upperCase=Bs,An.upperFirst=Gs,An.each=sa,An.eachRight=ua,An.first=Mo,Ks(An,(lu={},ur(An,(function(t,e){kt.call(An.prototype,e)||(lu[e]=t)})),lu),{chain:!1}),An.VERSION="4.17.19",se(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){An[t].placeholder=An})),se(["drop","take"],(function(t,e){Pn.prototype[t]=function(n){n=void 0===n?1:an(rs(n),0);var r=this.__filtered__&&!e?new Pn(this):this.clone();return r.__filtered__?r.__takeCount__=sn(n,r.__takeCount__):r.__views__.push({size:sn(n,4294967295),type:t+(r.__dir__<0?"Right":"")}),r},Pn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),se(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Pn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Ki(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),se(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Pn.prototype[t]=function(){return this[n](1).value()[0]}})),se(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Pn.prototype[t]=function(){return this.__filtered__?new Pn(this):this[n](1)}})),Pn.prototype.compact=function(){return this.filter(Us)},Pn.prototype.find=function(t){return this.filter(t).head()},Pn.prototype.findLast=function(t){return this.reverse().find(t)},Pn.prototype.invokeMap=Br((function(t,e){return"function"==typeof t?new Pn(this):this.map((function(n){return yr(n,t,e)}))})),Pn.prototype.reject=function(t){return this.filter(ka(Ki(t)))},Pn.prototype.slice=function(t,e){t=rs(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Pn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),void 0!==e&&(n=(e=rs(e))<0?n.dropRight(-e):n.take(e-t)),n)},Pn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Pn.prototype.toArray=function(){return this.take(4294967295)},ur(Pn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=An[r?"take"+("last"==e?"Right":""):e],o=r||/^find/.test(e);i&&(An.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,s=e instanceof Pn,u=a[0],c=s||Ia(e),l=function(t){var e=i.apply(An,pe([t],a));return r&&f?e[0]:e};c&&n&&"function"==typeof u&&1!=u.length&&(s=c=!1);var f=this.__chain__,h=!!this.__actions__.length,d=o&&!f,p=s&&!h;if(!o&&c){e=p?e:new Pn(this);var g=t.apply(e,a);return g.__actions__.push({func:na,args:[l],thisArg:void 0}),new Ln(g,f)}return d&&p?t.apply(this,a):(g=this.thru(l),d?r?g.value()[0]:g.value():g)})})),se(["pop","push","shift","sort","splice","unshift"],(function(t){var e=wt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);An.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Ia(i)?i:[],t)}return this[n]((function(n){return e.apply(Ia(n)?n:[],t)}))}})),ur(Pn.prototype,(function(t,e){var n=An[e];if(n){var r=n.name+"";kt.call(wn,r)||(wn[r]=[]),wn[r].push({name:e,func:n})}})),wn[Ai(void 0,2).name]=[{name:"wrapper",func:void 0}],Pn.prototype.clone=function(){var t=new Pn(this.__wrapped__);return t.__actions__=bi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=bi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=bi(this.__views__),t},Pn.prototype.reverse=function(){if(this.__filtered__){var t=new Pn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Pn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ia(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},An.prototype.plant=function(t){for(var e,n=this;n instanceof On;){var r=Ao(n);r.__index__=0,r.__values__=void 0,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},An.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Pn){var e=t;return this.__actions__.length&&(e=new Pn(this)),(e=e.reverse()).__actions__.push({func:na,args:[Yo],thisArg:void 0}),new Ln(e,this.__chain__)}return this.thru(Yo)},An.prototype.toJSON=An.prototype.valueOf=An.prototype.value=function(){return ni(this.__wrapped__,this.__actions__)},An.prototype.first=An.prototype.head,Qt&&(An.prototype[Qt]=function(){return this}),An}();Xt._=We,void 0===(i=function(){return We}.call(e,n,e,r))||(r.exports=i)}).call(this)}).call(this,n(20),n(28)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:!this.shouldResize,e=this.cy;t!==this.shouldResize&&(t?(e.on("render",this.updateViewport),e.on("resize",this.resize),this.updateViewport(e)):(e.removeListener("render",this.updateViewport),e.removeListener("resize",this.resize)),this.shouldResize=t)}},{key:"getViewport",value:function(){var t=this.cy;return{position:t.pan(),zoom:t.zoom(),renderedBB:Object.assign({},t.elements().renderedBoundingBox()),height:t.height(),width:t.width()}}},{key:"updateViewport",value:function(){var t=this.cy;this.prev=this.getViewport(t)}},{key:"_xConstrainedZoom",value:function(t){var e=this.curr,n=this.prev,r=this.marginPercentage.left*e.width;e.position.x=r+(n.position.x-n.renderedBB.x1);var i=e.renderedBB.y1+e.renderedBB.h/2-e.renderedBB.h/n.zoom*t/2;i+=(e.height-n.height)/2,e.position.y=i+(n.position.y-n.renderedBB.y1)}},{key:"_xChangeMargin",value:function(t){var e=this.curr,n=this.prev,r=n.renderedBB.x1+n.renderedBB.w/2,i=r/n.width*t;e.position.x=e.position.x+(i-r)}},{key:"_yConstrainedZoom",value:function(t){var e=this.curr,n=this.prev,r=this.marginPercentage.top*e.height;e.position.y=r+(n.position.y-n.renderedBB.y1);var i=e.renderedBB.x1+e.renderedBB.w/2-e.renderedBB.w/n.zoom*t/2;i+=(e.width-n.width)/2,e.position.x=i+(n.position.x-n.renderedBB.x1)}},{key:"_yChangeMargin",value:function(){var t=this.curr,e=this.prev,n=e.renderedBB.y1+e.renderedBB.h/2,r=n/e.height*t.height;t.position.y=t.position.y+(r-n)}},{key:"resize",value:function(){var t=this.cy;this.curr=this.getViewport(t);var e=this.curr,n=this.prev,r=n.renderedBB.x1>=0&&n.renderedBB.y1>=0&&n.renderedBB.x2<=n.width&&n.renderedBB.y2<=n.height;if(this.marginPercentage={left:n.renderedBB.x1/n.width,top:n.renderedBB.y1/n.height},Math.abs(1-e.width/n.width)>Math.abs(1-e.height/n.height)){var i=n.zoom/n.width*e.width;if(r)for(var o=Math.min((e.renderedBB.y1+e.renderedBB.h/2)*n.zoom*2/e.renderedBB.h,-(e.renderedBB.y1+e.renderedBB.h/2-n.height)*n.zoom*2/e.renderedBB.h)-this.containedZoomMargin,a=n.width/n.zoom*o,s=e.zoom0&&(a=n.getGraphManager().add(n.newGraph(),o),this.processChildrenList(a,f,n))}},f.prototype.stop=function(){return this.stopped=!0,this};var d=function(t){t("layout","cose-bilkent",f)};"undefined"!=typeof cytoscape&&d(cytoscape),t.exports=d}])},t.exports=r(n(145))},function(t,e,n){var r;r=function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=7)}([function(e,n){e.exports=t},function(t,e,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,t.exports=i},function(t,e,n){"use strict";var r=n(0).FDLayoutEdge;function i(t,e,n){r.call(this,t,e,n)}for(var o in i.prototype=Object.create(r.prototype),r)i[o]=r[o];t.exports=i},function(t,e,n){"use strict";var r=n(0).LGraph;function i(t,e,n){r.call(this,t,e,n)}for(var o in i.prototype=Object.create(r.prototype),r)i[o]=r[o];t.exports=i},function(t,e,n){"use strict";var r=n(0).LGraphManager;function i(t){r.call(this,t)}for(var o in i.prototype=Object.create(r.prototype),r)i[o]=r[o];t.exports=i},function(t,e,n){"use strict";var r=n(0).FDLayoutNode,i=n(0).IMath;function o(t,e,n,i){r.call(this,t,e,n,i)}for(var a in o.prototype=Object.create(r.prototype),r)o[a]=r[a];o.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.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),t.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(t,e){for(var n,r=this.getChild().getNodes(),i=0;i0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter((function(t){return e.has(t)}));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%c.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 t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter((function(e){return t.has(e)}));this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=c.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=c.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 t=this.graphManager.getAllNodes(),e={},n=0;n1)for(s=0;sr&&(r=Math.floor(a.y)),o=Math.floor(a.x+u.DEFAULT_COMPONENT_SEPERATION)}this.transform(new h(l.WORLD_CENTER_X-a.x/2,l.WORLD_CENTER_Y-a.y/2))},y.radialLayout=function(t,e,n){var r=Math.max(this.maxDiagonalInTree(t),u.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(e,null,0,359,0,r);var i=v.calculateBounds(t),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),p--,f--}h=null!=e?(l.indexOf(v[0])+1)%p:0;for(var m=Math.abs(r-n)/f,x=h;d!=f;x=++x%p){var _=l[x].getOtherEnd(t);if(_!=e){var E=(n+d*m)%360,k=(E+m)%360;y.branchRadialLayout(_,t,E,k,i+o,o),d++}}},y.maxDiagonalInTree=function(t){for(var e=p.MIN_VALUE,n=0;ne&&(e=r)}return e},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){var r="DummyCompound_"+n;t.memberGroups[r]=e[n];var i=e[n][0].getParent(),o=new a(t.graphManager);o.id=r,o.paddingLeft=i.paddingLeft||0,o.paddingRight=i.paddingRight||0,o.paddingBottom=i.paddingBottom||0,o.paddingTop=i.paddingTop||0,t.idToDummyNode[r]=o;var s=t.getGraphManager().add(t.newGraph(),o),u=i.getChild();u.add(o);for(var c=0;c=0;t--){var e=this.compoundOrder[t],n=e.id,r=e.paddingLeft,i=e.paddingTop;this.adjustLocations(this.tiledMemberPack[n],e.rect.x,e.rect.y,r,i)}},y.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach((function(n){var r=t.idToDummyNode[n],i=r.paddingLeft,o=r.paddingTop;t.adjustLocations(e[n],r.rect.x,r.rect.y,i,o)}))},y.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var n=t.getChild();if(null==n)return this.toBeTiled[e]=!1,!1;for(var r=n.getNodes(),i=0;i0)return this.toBeTiled[e]=!1,!1;if(null!=o.getChild()){if(!this.getToBeTiled(o))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[o.id]=!1}return this.toBeTiled[e]=!0,!0},y.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),n=0,r=0;ru&&(u=l.rect.height)}n+=u+t.verticalPadding}},y.prototype.tileCompoundMembers=function(t,e){var n=this;this.tiledMemberPack=[],Object.keys(t).forEach((function(r){var i=e[r];n.tiledMemberPack[r]=n.tileNodes(t[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height}))},y.prototype.tileNodes=function(t,e){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:u.TILING_PADDING_VERTICAL,horizontalPadding:u.TILING_PADDING_HORIZONTAL};t.sort((function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:t.rect.width*t.rect.height0&&(o+=t.horizontalPadding),t.rowWidth[n]=o,t.width0&&(a+=t.verticalPadding);var s=0;a>t.rowHeight[n]&&(s=t.rowHeight[n],t.rowHeight[n]=a,s=t.rowHeight[n]-s),t.height+=s,t.rows[n].push(e)},y.prototype.getShortestRowIndex=function(t){for(var e=-1,n=Number.MAX_VALUE,r=0;rn&&(e=r,n=t.rowWidth[r]);return e},y.prototype.canAddHorizontal=function(t,e,n){var r=this.getShortestRowIndex(t);if(r<0)return!0;var i=t.rowWidth[r];if(i+t.horizontalPadding+e<=t.width)return!0;var o,a,s=0;return t.rowHeight[r]0&&(s=n+t.verticalPadding-t.rowHeight[r]),o=t.width-i>=e+t.horizontalPadding?(t.height+s)/(i+e+t.horizontalPadding):(t.height+s)/t.width,s=n+t.verticalPadding,(a=t.widtho&&e!=n){r.splice(-1,1),t.rows[n].push(i),t.rowWidth[e]=t.rowWidth[e]-o,t.rowWidth[n]=t.rowWidth[n]+o,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var a=Number.MIN_VALUE,s=0;sa&&(a=r[s].height);e>0&&(a+=t.verticalPadding);var u=t.rowHeight[e]+t.rowHeight[n];t.rowHeight[e]=a,t.rowHeight[n]0)for(var l=i;l<=o;l++)u[0]+=this.grid[l][a-1].length+this.grid[l][a].length-1;if(o0)for(l=a;l<=s;l++)u[3]+=this.grid[i-1][l].length+this.grid[i][l].length-1;for(var f,h,d=p.MAX_VALUE,g=0;ge&&(this.rect.x-=(this.labelWidth-e)/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))}}},c.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},c.prototype.transform=function(t){var e=this.rect.x;e>a.WORLD_BOUNDARY?e=a.WORLD_BOUNDARY:e<-a.WORLD_BOUNDARY&&(e=-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 u(e,n),i=t.inverseTransformPoint(r);this.setLocation(i.x,i.y)},c.prototype.getLeft=function(){return this.rect.x},c.prototype.getRight=function(){return this.rect.x+this.rect.width},c.prototype.getTop=function(){return this.rect.y},c.prototype.getBottom=function(){return this.rect.y+this.rect.height},c.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=c},function(t,e,n){"use strict";function r(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=r},function(t,e,n){"use strict";var r=n(2),i=n(10),o=n(0),a=n(6),s=n(3),u=n(1),c=n(13),l=n(12),f=n(11);function h(t,e,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=t,null!=e&&e instanceof a?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var d in h.prototype=Object.create(r.prototype),r)h[d]=r[d];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(t,e,n){if(null==e&&null==n){var r=t;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=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(n)>-1))throw"Source or target not in graph!";if(e.owner!=n.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=n.owner?null:(i.source=e,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),e.edges.push(i),n!=e&&n.edges.push(i),i)},h.prototype.remove=function(t){var e=t;if(t instanceof s){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var n=e.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(c,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)}},h.prototype.updateLeftTop=function(){for(var t,e,n,r=i.MAX_VALUE,o=i.MAX_VALUE,a=this.getNodes(),s=a.length,u=0;u(t=c.getTop())&&(r=t),o>(e=c.getLeft())&&(o=e)}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))},h.prototype.updateBounds=function(t){for(var e,n,r,o,a,s=i.MAX_VALUE,u=-i.MAX_VALUE,l=i.MAX_VALUE,f=-i.MAX_VALUE,h=this.nodes,d=h.length,p=0;p(e=g.getLeft())&&(s=e),u<(n=g.getRight())&&(u=n),l>(r=g.getTop())&&(l=r),f<(o=g.getBottom())&&(f=o)}var v=new c(s,l,u-s,f-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!=h[0].getParent().paddingLeft?h[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},h.calculateBounds=function(t){for(var e,n,r,o,a=i.MAX_VALUE,s=-i.MAX_VALUE,u=i.MAX_VALUE,l=-i.MAX_VALUE,f=t.length,h=0;h(e=d.getLeft())&&(a=e),s<(n=d.getRight())&&(s=n),u>(r=d.getTop())&&(u=r),l<(o=d.getBottom())&&(l=o)}return new c(a,u,s-a,l-u)},h.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,n=e.length,r=0;r=this.nodes.length){var u=0;i.forEach((function(e){e.owner==t&&u++})),u==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=h},function(t,e,n){"use strict";var r,i=n(1);function o(t){r=n(5),this.layout=t,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),n=this.add(t,e);return this.setRootGraph(n),this.rootGraph},o.prototype.add=function(t,e,n,r,i){if(null==n&&null==r&&null==i){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}i=n,n=t;var o=(r=e).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(t){if(t instanceof r){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var n,o=[],a=(o=o.concat(e.getEdges())).length,s=0;s=e.getRight()?n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var o=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(o=1);var a=o*n[0],s=n[1]/o;n[0]a)return n[0]=r,n[1]=u,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]=f,E=!0):(n[0]=c,n[1]=u,E=!0):S===T&&(r>o?(n[0]=s,n[1]=u,E=!0):(n[0]=h,n[1]=f,E=!0)),-C===T?o>r?(n[2]=y,n[3]=w,k=!0):(n[2]=b,n[3]=v,k=!0):C===T&&(o>r?(n[2]=g,n[3]=v,k=!0):(n[2]=m,n[3]=w,k=!0)),E&&k)return!1;if(r>o?i>a?(A=this.getCardinalDirection(S,T,4),N=this.getCardinalDirection(C,T,2)):(A=this.getCardinalDirection(-S,T,3),N=this.getCardinalDirection(-C,T,1)):i>a?(A=this.getCardinalDirection(-S,T,1),N=this.getCardinalDirection(-C,T,3)):(A=this.getCardinalDirection(S,T,2),N=this.getCardinalDirection(C,T,4)),!E)switch(A){case 1:L=u,O=r+-p/T,n[0]=O,n[1]=L;break;case 2:O=h,L=i+d*T,n[0]=O,n[1]=L;break;case 3:L=f,O=r+p/T,n[0]=O,n[1]=L;break;case 4:O=l,L=i+-d*T,n[0]=O,n[1]=L}if(!k)switch(N){case 1:I=v,P=o+-_/T,n[2]=P,n[3]=I;break;case 2:P=m,I=a+x*T,n[2]=P,n[3]=I;break;case 3:I=w,P=o+_/T,n[2]=P,n[3]=I;break;case 4:P=y,I=a+-x*T,n[2]=P,n[3]=I}}return!1},i.getCardinalDirection=function(t,e,n){return t>e?n:1+n%4},i.getIntersection=function(t,e,n,i){if(null==i)return this.getIntersection2(t,e,n);var o,a,s,u,c,l,f,h=t.x,d=t.y,p=e.x,g=e.y,v=n.x,b=n.y,y=i.x,w=i.y;return 0==(f=(o=g-d)*(u=v-y)-(a=w-b)*(s=h-p))?null:new r((s*(l=y*b-v*w)-u*(c=p*d-h*g))/f,(a*c-o*l)/f)},i.angleOfVector=function(t,e,n,r){var i=void 0;return t!==n?(i=Math.atan((r-e)/(n-t)),n0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=r},function(t,e,n){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,t.exports=r},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n0&&e;){for(s.push(c[0]);s.length>0&&e;){var l=s[0];s.splice(0,1),a.add(l);var f=l.getEdges();for(o=0;o-1&&c.splice(g,1)}a=new Set,u=new Map}else t=[]}return t},h.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],n=t.source,r=this.graphManager.calcLowestCommonAncestor(t.source,t.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(n),o=0;o=0&&e.splice(f,1),l.getNeighborsList().forEach((function(t){if(n.indexOf(t)<0){var e=r.get(t)-1;1==e&&u.push(t),r.set(t,e)}}))}n=n.concat(u),1!=e.length&&2!=e.length||(i=!0,o=e[0])}return o},h.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=h},function(t,e,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)},t.exports=r},function(t,e,n){"use strict";var r=n(4);function i(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(t){this.lworldExtX=t},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(t){this.lworldExtY=t},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},i.prototype.transformX=function(t){var e=0,n=this.lworldExtX;return 0!=n&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/n),e},i.prototype.transformY=function(t){var e=0,n=this.lworldExtY;return 0!=n&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/n),e},i.prototype.inverseTransformX=function(t){var e=0,n=this.ldeviceExtX;return 0!=n&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/n),e},i.prototype.inverseTransformY=function(t){var e=0,n=this.ldeviceExtY;return 0!=n&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/n),e},i.prototype.inverseTransformPoint=function(t){return new r(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=i},function(t,e,n){"use strict";var r=n(15),i=n(7),o=n(0),a=n(8),s=n(9);function u(){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 c in u.prototype=Object.create(r.prototype),r)u[c]=r[c];u.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=[]},u.prototype.calcIdealEdgeLengths=function(){for(var t,e,n,r,a,s,u=this.getGraphManager().getAllEdges(),c=0;ci.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-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):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-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()},u.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),n=0;n0&&void 0!==arguments[0])||arguments[0],s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],u=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&a&&this.updateGrid(),o=new Set,t=0;t(u=e.getEstimatedSize()*this.gravityRangeFactor)||s>u)&&(t.gravitationForceX=-this.gravityConstant*i,t.gravitationForceY=-this.gravityConstant*o):(a>(u=e.getEstimatedSize()*this.compoundGravityRangeFactor)||s>u)&&(t.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},u.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=s.length||c>=s[0].length))for(var l=0;lt}}]),t}();t.exports=o},function(t,e,n){"use strict";var r=function(){function t(t,e){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,t),this.sequence1=e,this.sequence2=n,this.match_score=r,this.mismatch_penalty=o,this.gap_penalty=a,this.iMax=e.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===t&&r.callback===e&&this.listeners.splice(n,1)}},i.emit=function(t,e){for(var n=0;n0&&S.push({type:"alignment",axis:"x",offsets:C}),T.length>0&&S.push({type:"alignment",axis:"y",offsets:T})}e.gapInequalities&&e.gapInequalities.forEach((function(t){var e=t.left.scratch().cola.index,n=t.right.scratch().cola.index;S.push({axis:t.axis,left:e,right:n,gap:t.gap,equality:t.equality})})),S.length>0&&m.constraints(S),m.groups(d.map((function(t,n){var r=l(e.nodeSpacing,t),i=function(e){return parseFloat(t.style("padding-"+e))},o=i("left")+r,a=i("right")+r,s=i("top")+r,u=i("bottom")+r;return t.scratch().cola={index:n,padding:Math.max(o,a,s,u),leaves:t.children().intersection(p).map((function(t){return t[0].scratch().cola.index})),fixed:t.locked()},t})).map((function(t){return t.scratch().cola.groups=t.children().intersection(d).map((function(t){return t.scratch().cola.index})),t.scratch().cola})));var A=void 0,N=void 0;if(null!=e.edgeLength?(A=e.edgeLength,N="linkDistance"):null!=e.edgeSymDiffLength?(A=e.edgeSymDiffLength,N="symmetricDiffLinkLengths"):null!=e.edgeJaccardLength?(A=e.edgeJaccardLength,N="jaccardLinkLengths"):(A=100,N="linkDistance"),m.links(f.stdFilter((function(t){return p.contains(t.source())&&p.contains(t.target())})).map((function(t){var e=t.scratch().cola={source:t.source()[0].scratch().cola.index,target:t.target()[0].scratch().cola.index};return null!=A&&(e.calcLength=l(A,t)),e}))),m.size([g.w,g.h]),null!=A&&m[N]((function(t){return t.calcLength})),e.flow){var O=void 0;!function(t){return(void 0===t?"undefined":r(t))===r("")}(e.flow)?u(e.flow)?O={axis:"y",minSeparation:e.flow}:function(t){return null!=t&&(void 0===t?"undefined":r(t))===r({})}(e.flow)?((O=e.flow).axis=O.axis||"y",O.minSeparation=null!=O.minSeparation?O.minSeparation:50):O={axis:"y",minSeparation:50}:O={axis:e.flow,minSeparation:50},m.flowLayout(O.axis,O.minSeparation)}return t.trigger({type:"layoutstart",layout:t}),m.avoidOverlaps(e.avoidOverlap).handleDisconnected(e.handleDisconnected).start(e.unconstrIter,e.userConstIter,e.allConstIter),e.infinite||setTimeout((function(){t.manuallyStopped||m.stop()}),e.maxSimulationTime),this},f.prototype.stop=function(){return this.adaptor&&(this.manuallyStopped=!0,this.adaptor.stop()),this},t.exports=f},function(t,e,n){"use strict";t.exports=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r1?e-1:0),r=1;r-1}},function(t,e,n){var r=n(32);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(31);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(31),i=n(51),o=n(52);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(23),i=n(173),o=n(4),a=n(80),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,h=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?h:s).test(a(t))}},function(t,e,n){var r=n(15),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=a.call(t);return r&&(e?t[s]=n:delete t[s]),i}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r,i=n(174),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!o&&o in t}},function(t,e,n){var r=n(6)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(177),i=n(31),o=n(51);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(t,e,n){var r=n(178),i=n(179),o=n(180),a=n(181),s=n(182);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(102),i=n(251),o=n(255),a=n(103),s=n(256),u=n(63);t.exports=function(t,e,n){var c=-1,l=i,f=t.length,h=!0,d=[],p=d;if(n)h=!1,l=o;else if(f>=200){var g=e?null:s(t);if(g)return u(g);h=!1,l=a,p=new r}else p=e?[]:d;t:for(;++c-1}},function(t,e,n){var r=n(117),i=n(253),o=n(254);t.exports=function(t,e,n){return e==e?o(t,e,n):r(t,i,n)}},function(t,e){t.exports=function(t){return t!=t}},function(t,e){t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r1||1===e.length&&t.hasEdge(e[0],e[0])}))}},function(t,e,n){var r=n(3);t.exports=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,o=e(n);r[t][i]={distance:o,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var o=r[n];i.forEach((function(n){var r=o[t],i=e[n],a=o[n],s=r.distance+i.distance;s0;){if(n=u.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(n).forEach(c)}return a}},function(t,e,n){"use strict";var r=n(0),i=n(308),o=n(311),a=n(312),s=n(2).normalizeRanks,u=n(314),c=n(2).removeEmptyRanks,l=n(315),f=n(316),h=n(317),d=n(318),p=n(327),g=n(2),v=n(5).Graph;t.exports=function(t,e){var n=e&&e.debugTiming?g.time:g.notime;n("layout",(function(){var e=n(" buildLayoutGraph",(function(){return function(t){var e=new v({multigraph:!0,compound:!0}),n=C(t.graph());return e.setGraph(r.merge({},y,S(n,b),r.pick(n,w))),r.forEach(t.nodes(),(function(n){var i=C(t.node(n));e.setNode(n,r.defaults(S(i,m),x)),e.setParent(n,t.parent(n))})),r.forEach(t.edges(),(function(n){var i=C(t.edge(n));e.setEdge(n,r.merge({},E,S(i,_),r.pick(i,k)))})),e}(t)}));n(" runLayout",(function(){!function(t,e){e(" makeSpaceForEdgeLabels",(function(){!function(t){var e=t.graph();e.ranksep/=2,r.forEach(t.edges(),(function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t)})),e(" removeSelfEdges",(function(){!function(t){r.forEach(t.edges(),(function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}}))}(t)})),e(" acyclic",(function(){i.run(t)})),e(" nestingGraph.run",(function(){l.run(t)})),e(" rank",(function(){a(g.asNonCompoundGraph(t))})),e(" injectEdgeLabelProxies",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e:e};g.addDummyNode(t,"edge-proxy",i,"_ep")}}))}(t)})),e(" removeEmptyRanks",(function(){c(t)})),e(" nestingGraph.cleanup",(function(){l.cleanup(t)})),e(" normalizeRanks",(function(){s(t)})),e(" assignRankMinMax",(function(){!function(t){var e=0;r.forEach(t.nodes(),(function(n){var i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=r.max(e,i.maxRank))})),t.graph().maxRank=e}(t)})),e(" removeEdgeLabelProxies",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t)})),e(" normalize.run",(function(){o.run(t)})),e(" parentDummyChains",(function(){u(t)})),e(" addBorderSegments",(function(){f(t)})),e(" order",(function(){d(t)})),e(" insertSelfEdges",(function(){!function(t){var e=g.buildLayerMatrix(t);r.forEach(e,(function(e){var n=0;r.forEach(e,(function(e,i){var o=t.node(e);o.order=i+n,r.forEach(o.selfEdges,(function(e){g.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:o.rank,order:i+ ++n,e:e.e,label:e.label},"_se")})),delete o.selfEdges}))}))}(t)})),e(" adjustCoordinateSystem",(function(){h.adjust(t)})),e(" position",(function(){p(t)})),e(" positionSelfEdges",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,o=r.y,a=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),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}}))}(t)})),e(" removeBorderNodes",(function(){!function(t){r.forEach(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),i=t.node(n.borderTop),o=t.node(n.borderBottom),a=t.node(r.last(n.borderLeft)),s=t.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(t.nodes(),(function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}(t)})),e(" normalize.undo",(function(){o.undo(t)})),e(" fixupEdgeLabelCoords",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);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}}))}(t)})),e(" undoCoordinateSystem",(function(){h.undo(t)})),e(" translateGraph",(function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,o=0,a=t.graph(),s=a.marginx||0,u=a.marginy||0;function c(t){var r=t.x,a=t.y,s=t.width,u=t.height;e=Math.min(e,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,a-u/2),o=Math.max(o,a+u/2)}r.forEach(t.nodes(),(function(e){c(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.has(n,"x")&&c(n)})),e-=s,i-=u,r.forEach(t.nodes(),(function(n){var r=t.node(n);r.x-=e,r.y-=i})),r.forEach(t.edges(),(function(n){var o=t.edge(n);r.forEach(o.points,(function(t){t.x-=e,t.y-=i})),r.has(o,"x")&&(o.x-=e),r.has(o,"y")&&(o.y-=i)})),a.width=n-e+s,a.height=o-i+u}(t)})),e(" assignNodeIntersects",(function(){!function(t){r.forEach(t.edges(),(function(e){var n,r,i=t.edge(e),o=t.node(e.v),a=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=a,r=o),i.points.unshift(g.intersectRect(o,n)),i.points.push(g.intersectRect(a,r))}))}(t)})),e(" reversePoints",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse()}))}(t)})),e(" acyclic.undo",(function(){i.undo(t)}))}(e,n)})),n(" updateInputGraph",(function(){!function(t,e){r.forEach(t.nodes(),(function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(t.edges(),(function(n){var i=t.edge(n),o=e.edge(n);i.points=o.points,r.has(o,"x")&&(i.x=o.x,i.y=o.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)}))}))};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},_=["minlen","weight","width","height","labeloffset"],E={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},k=["labelpos"];function S(t,e){return r.mapValues(r.pick(t,e),Number)}function C(t){var e={};return r.forEach(t,(function(t,n){e[n.toLowerCase()]=t})),e}},function(t,e,n){var r=n(78);t.exports=function(t){return r(t,5)}},function(t,e,n){var r=n(44),i=n(14),o=n(45),a=n(17),s=Object.prototype,u=s.hasOwnProperty,c=r((function(t,e){t=Object(t);var n=-1,r=e.length,c=r>2?e[2]:void 0;for(c&&o(e[0],e[1],c)&&(r=1);++n-1?s[u?e[c]:c]:void 0}}},function(t,e,n){var r=n(117),i=n(9),o=n(276),a=Math.max;t.exports=function(t,e,n){var s=null==t?0:t.length;if(!s)return-1;var u=null==n?0:o(n);return u<0&&(u=a(s+u,0)),r(t,i(e,3),u)}},function(t,e,n){var r=n(125);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},function(t,e,n){var r=n(4),i=n(19),o=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var n=s.test(t);return n||u.test(t)?c(t.slice(2),n?2:8):a.test(t)?NaN:+t}},function(t,e,n){var r=n(62),i=n(98),o=n(17);t.exports=function(t,e){return null==t?t:r(t,i(e),o)}},function(t,e){t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},function(t,e,n){var r=n(36),i=n(61),o=n(9);t.exports=function(t,e){var n={};return e=o(e,3),i(t,(function(t,i,o){r(n,i,e(t,i,o))})),n}},function(t,e,n){var r=n(67),i=n(282),o=n(13);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},function(t,e){t.exports=function(t,e){return t>e}},function(t,e,n){var r=n(284),i=n(288)((function(t,e,n){r(t,e,n)}));t.exports=i},function(t,e,n){var r=n(30),i=n(127),o=n(62),a=n(285),s=n(4),u=n(17),c=n(128);t.exports=function t(e,n,l,f,h){e!==n&&o(n,(function(o,u){if(h||(h=new r),s(o))a(e,n,u,l,t,f,h);else{var d=f?f(c(e,u),o,u+"",e,n,h):void 0;void 0===d&&(d=o),i(e,u,d)}}),u)}},function(t,e,n){var r=n(127),i=n(84),o=n(93),a=n(85),s=n(94),u=n(25),c=n(1),l=n(118),f=n(16),h=n(23),d=n(4),p=n(286),g=n(26),v=n(128),b=n(287);t.exports=function(t,e,n,y,w,m,x){var _=v(t,n),E=v(e,n),k=x.get(E);if(k)r(t,n,k);else{var S=m?m(_,E,n+"",t,e,x):void 0,C=void 0===S;if(C){var T=c(E),A=!T&&f(E),N=!T&&!A&&g(E);S=E,T||A||N?c(_)?S=_:l(_)?S=a(_):A?(C=!1,S=i(E,!0)):N?(C=!1,S=o(E,!0)):S=[]:p(E)||u(E)?(S=_,u(_)?S=b(_):d(_)&&!h(_)||(S=s(E))):C=!1}C&&(x.set(E,S),w(S,E,y,m,x),x.delete(E)),r(t,n,S)}}},function(t,e,n){var r=n(12),i=n(40),o=n(7),a=Function.prototype,s=Object.prototype,u=a.toString,c=s.hasOwnProperty,l=u.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=c.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==l}},function(t,e,n){var r=n(24),i=n(17);t.exports=function(t){return r(t,i(t))}},function(t,e,n){var r=n(44),i=n(45);t.exports=function(t){return r((function(e,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++r1&&a(t,e[0],e[1])?e=[]:n>2&&a(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=s},function(t,e,n){var r=n(43),i=n(9),o=n(113),a=n(302),s=n(38),u=n(303),c=n(13);t.exports=function(t,e,n){var l=-1;e=r(e.length?e:[c],s(i));var f=o(t,(function(t,n,i){return{criteria:r(e,(function(e){return e(t)})),index:++l,value:t}}));return a(f,(function(t,e){return u(t,e,n)}))}},function(t,e){t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},function(t,e,n){var r=n(304);t.exports=function(t,e,n){for(var i=-1,o=t.criteria,a=e.criteria,s=o.length,u=n.length;++i=u?c:c*("desc"==n[i]?-1:1)}return t.index-e.index}},function(t,e,n){var r=n(19);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,o=t==t,a=r(t),s=void 0!==e,u=null===e,c=e==e,l=r(e);if(!u&&!l&&!a&&t>e||a&&s&&c&&!u&&!l||i&&s&&c||!n&&c||!o)return 1;if(!i&&!a&&!l&&t0;--u)if(r=e[u].dequeue()){i=i.concat(s(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(c,(function(e){return t.outEdges(e.v,e.w)})),!0)};var a=r.constant(1);function s(t,e,n,i,o){var a=o?[]:void 0;return r.forEach(t.inEdges(i.v),(function(r){var i=t.edge(r),s=t.node(r.v);o&&a.push({v:r.v,w:r.w}),s.out-=i,u(e,n,s)})),r.forEach(t.outEdges(i.v),(function(r){var i=t.edge(r),o=r.w,a=t.node(o);a.in-=i,u(e,n,a)})),t.removeNode(i.v),a}function u(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},function(t,e){function n(){var t={};t._next=t._prev=t,this._sentinel=t}function r(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function i(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=n,n.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return r(e),e},n.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&r(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},n.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,i)),n=n._prev;return"["+t.join(", ")+"]"}},function(t,e,n){"use strict";var r=n(0),i=n(2);t.exports={run:function(t){t.graph().dummyChains=[],r.forEach(t.edges(),(function(e){!function(t,e){var n,r,o,a=e.v,s=t.node(a).rank,u=e.w,c=t.node(u).rank,l=e.name,f=t.edge(e),h=f.labelRank;if(c===s+1)return;for(t.removeEdge(e),o=0,++s;su.lim&&(c=u,l=!0);var f=r.filter(e.edges(),(function(e){return l===y(t,t.node(e.v),c)&&l!==y(t,t.node(e.w),c)}));return r.minBy(f,(function(t){return o(e,t)}))}function b(t,e,n,i){var o=n.v,a=n.w;t.removeEdge(o,a),t.setEdge(i.v,i.w,{}),d(t),f(t,e),function(t,e){var n=r.find(t.nodes(),(function(t){return!e.node(t).parent})),i=s(t,n);i=i.slice(1),r.forEach(i,(function(n){var r=t.node(n).parent,i=e.edge(n,r),o=!1;i||(i=e.edge(r,n),o=!0),e.node(n).rank=e.node(r).rank+(o?i.minlen:-i.minlen)}))}(t,e)}function y(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=l,l.initLowLimValues=d,l.initCutValues=f,l.calcCutValue=h,l.leaveEdge=g,l.enterEdge=v,l.exchangeEdges=b},function(t,e,n){var r=n(0);t.exports=function(t){var e=function(t){var e={},n=0;function i(o){var a=n;r.forEach(t.children(o),i),e[o]={low:a,lim:n++}}return r.forEach(t.children(),i),e}(t);r.forEach(t.graph().dummyChains,(function(n){for(var r=t.node(n),i=r.edgeObj,o=function(t,e,n,r){var i,o,a=[],s=[],u=Math.min(e[n].low,e[r].low),c=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),a.push(i)}while(i&&(e[i].low>u||c>e[i].lim));o=i,i=r;for(;(i=t.parent(i))!==o;)s.push(i);return{path:a.concat(s.reverse()),lca:o}}(t,e,i.v,i.w),a=o.path,s=o.lca,u=0,c=a[u],l=!0;n!==i.w;){if(r=t.node(n),l){for(;(c=a[u])!==s&&t.node(c).maxRank=2),s=l.buildLayerMatrix(t);var v=o(t,s);v0;)e%2&&(n+=u[e+1]),u[e=e-1>>1]+=t.weight;c+=t.weight*n}))),c}t.exports=function(t,e){for(var n=0,r=1;r=t.barycenter)&&function(t,e){var n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function i(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var o=t.pop();e.push(o),r.forEach(o.in.reverse(),n(o)),r.forEach(o.out,i(o))}return r.map(r.filter(e,(function(t){return!t.merged})),(function(t){return r.pick(t,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(t){return!t.indegree})))}},function(t,e,n){var r=n(0),i=n(2);function o(t,e,n){for(var i;e.length&&(i=r.last(e)).i<=n;)e.pop(),t.push(i.vs),n++;return n}t.exports=function(t,e){var n=i.partition(t,(function(t){return r.has(t,"barycenter")})),a=n.lhs,s=r.sortBy(n.rhs,(function(t){return-t.i})),u=[],c=0,l=0,f=0;a.sort((h=!!e,function(t,e){return t.barycentere.barycenter?1:h?e.i-t.i:t.i-e.i})),f=o(u,s,f),r.forEach(a,(function(t){f+=t.vs.length,u.push(t.vs),c+=t.barycenter*t.weight,l+=t.weight,f=o(u,s,f)}));var h;var d={vs:r.flatten(u,!0)};l&&(d.barycenter=c/l,d.weight=l);return d}},function(t,e,n){var r=n(0),i=n(5).Graph;t.exports=function(t,e,n){var o=function(t){var e;for(;t.hasNode(e=r.uniqueId("_root")););return e}(t),a=new i({compound:!0}).setGraph({root:o}).setDefaultNodeLabel((function(e){return t.node(e)}));return r.forEach(t.nodes(),(function(i){var s=t.node(i),u=t.parent(i);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(a.setNode(i),a.setParent(i,u||o),r.forEach(t[n](i),(function(e){var n=e.v===i?e.w:e.v,o=a.edge(n,i),s=r.isUndefined(o)?0:o.weight;a.setEdge(n,i,{weight:t.edge(e).weight+s})})),r.has(s,"minRank")&&a.setNode(i,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))})),a}},function(t,e,n){var r=n(0);t.exports=function(t,e,n){var i,o={};r.forEach(n,(function(n){for(var r,a,s=t.parent(n);s;){if((r=t.parent(s))?(a=o[r],o[r]=s):(a=i,i=s),a&&a!==s)return void e.setEdge(a,s);s=r}}))}},function(t,e,n){"use strict";var r=n(0),i=n(2),o=n(328).positionX;t.exports=function(t){(function(t){var e=i.buildLayerMatrix(t),n=t.graph().ranksep,o=0;r.forEach(e,(function(e){var i=r.max(r.map(e,(function(e){return t.node(e).height})));r.forEach(e,(function(e){t.node(e).y=o+i/2})),o+=i+n}))})(t=i.asNonCompoundGraph(t)),r.forEach(o(t),(function(e,n){t.node(n).x=e}))}},function(t,e,n){"use strict";var r=n(0),i=n(5).Graph,o=n(2);function a(t,e){var n={};return r.reduce(e,(function(e,i){var o=0,a=0,s=e.length,c=r.last(i);return r.forEach(i,(function(e,l){var f=function(t,e){if(t.node(e).dummy)return r.find(t.predecessors(e),(function(e){return t.node(e).dummy}))}(t,e),h=f?t.node(f).order:s;(f||e===c)&&(r.forEach(i.slice(a,l+1),(function(e){r.forEach(t.predecessors(e),(function(r){var i=t.node(r),a=i.order;!(as)&&u(n,e,c)}))}))}return r.reduce(e,(function(e,n){var o,a=-1,s=0;return r.forEach(n,(function(r,u){if("border"===t.node(r).dummy){var c=t.predecessors(r);c.length&&(o=t.node(c[0]).order,i(n,s,u,a,o),s=u,a=o)}i(n,s,n.length,o,e.length)})),n})),n}function u(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function c(t,e,n){if(e>n){var i=e;e=n,n=i}return r.has(t[e],n)}function l(t,e,n,i){var o={},a={},s={};return r.forEach(e,(function(t){r.forEach(t,(function(t,e){o[t]=t,a[t]=t,s[t]=e}))})),r.forEach(e,(function(t){var e=-1;r.forEach(t,(function(t){var u=i(t);if(u.length)for(var l=((u=r.sortBy(u,(function(t){return s[t]}))).length-1)/2,f=Math.floor(l),h=Math.ceil(l);f<=h;++f){var d=u[f];a[t]===t&&e1?e-1:0),r=1;r1&&(u.velocity.x=l/h,u.velocity.y=f/h),r=e*u.velocity.x,o=e*u.velocity.y,u.pos.x+=r,u.pos.y+=o,i+=Math.abs(r),a+=Math.abs(o)}}return(i*i+a*a)/s}}},function(t,e,n){"use strict";var r=n(9),i=n(8),o=function(t,e){var n=Math.abs(t.x-e.x),r=Math.abs(t.y-e.y);return n<1e-8&&r<1e-8};function a(t,e){return 0===e?t.quad0:1===e?t.quad1:2===e?t.quad2:3===e?t.quad3:null}function s(t,e,n){0===e?t.quad0=n:1===e?t.quad1=n:2===e?t.quad2=n:3===e&&(t.quad3=n)}t.exports={makeQuadtree:function(){var t=[],e=new i,n=[],u=0,c=l();function l(){var t=n[u];return t?(t.quad0=null,t.quad1=null,t.quad2=null,t.quad3=null,t.body=null,t.mass=t.massX=t.massY=0,t.left=t.right=t.top=t.bottom=0):(t=new r,n[u]=t),++u,t}function f(t){for(e.reset(),e.push(c,t);!e.isEmpty();){var n=e.pop(),r=n.node,i=n.body;if(r.body){var u=r.body;if(r.body=null,o(u.pos,i.pos)){var f=3;do{var h=Math.random(),d=(r.right-r.left)*h,p=(r.bottom-r.top)*h;u.pos.x=r.left+d,u.pos.y=r.top+p,f-=1}while(f>0&&o(u.pos,i.pos));if(0===f&&o(u.pos,i.pos))return}e.push(r,u),e.push(r,i)}else{var g=i.pos.x,v=i.pos.y;r.mass=r.mass+i.mass,r.massX=r.massX+i.mass*g,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;g>w&&(b+=1,y=w,w=r.right),v>x&&(b+=2,m=x,x=r.bottom);var _=a(r,b);_?e.push(_,i):((_=l()).left=y,_.top=m,_.right=w,_.bottom=x,_.body=i,s(r,b,_))}}}return{insertBodies:function(t){if(0!==t.length){var e=Number.MAX_VALUE,n=Number.MAX_VALUE,r=Number.MIN_VALUE,i=Number.MIN_VALUE,o=void 0,a=t.length;for(o=a;o--;){var s=t[o].pos.x,h=t[o].pos.y;sr&&(r=s),hi&&(i=h)}var d=r-e,p=i-n;for(d>p?i=n+d:r=e+p,u=0,(c=l()).left=e,c.right=r,c.top=n,c.bottom=i,(o=a-1)>=0&&(c.body=t[o]);o--;)f(t[o])}},updateBodyForce:function(e,n,r,i){var o=t,a=void 0,s=void 0,u=void 0,l=void 0,f=0,h=0,d=1,p=0,g=1;o[0]=c,function(t){t.x=0,t.y=0}(e.force);var v=-e.pos.x,b=-e.pos.y,y=Math.sqrt(v*v+b*b),w=e.mass*i/y;for(f+=w*v,h+=w*b;d;){var m=o[p],x=m.body;d-=1,p+=1;var _=x!==e;x&&_?(s=x.pos.x-e.pos.x,u=x.pos.y-e.pos.y,0===(l=Math.sqrt(s*s+u*u))&&(s=(Math.random()-.5)/50,u=(Math.random()-.5)/50,l=Math.sqrt(s*s+u*u)),f+=(a=n*x.mass*e.mass/(l*l*l))*s,h+=a*u):_&&(s=m.massX/m.mass-e.pos.x,u=m.massY/m.mass-e.pos.y,0===(l=Math.sqrt(s*s+u*u))&&(s=(Math.random()-.5)/50,u=(Math.random()-.5)/50,l=Math.sqrt(s*s+u*u)),(m.right-m.left)/l0)return this.stack[--this.popIdx]},reset:function(){this.popIdx=0}}},function(t,e,n){"use strict";t.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(t,e,n){"use strict";var r=n(6).integrate,i=n(5).applyDrag,o=n(1).applySpring;t.exports={tick:function(t){var e=t.bodies,n=t.springs,a=t.quadtree,s=t.timeStep,u=t.gravity,c=t.theta,l=t.dragCoeff,f=t.pull;e.forEach((function(t){var e=t._scratch;e&&(t.locked=e.locked,t.grabbed=e.grabbed,t.pos.x=e.x,t.pos.y=e.y)})),a.insertBodies(e);for(var h=0;h=e.maxIterations||r>=e.maxSimulationTime)};t.exports={tick:i,multitick:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r,o=!1,a=t,s=0;s1?e-1:0),r=1;r=t.length)return{done:!0};var r=t[n++];return{value:[r,e.get(r)],done:!1}}}},function(){if(!Object.create||!Object.getOwnPropertyNames)return!1;var t="__proto__",e=Object.create(null);return void 0===e[t]&&(0==Object.getOwnPropertyNames(e).length&&(e[t]=42,42===e[t]&&0!=Object.getOwnPropertyNames(e).length))}()||(t.prototype.createObject=function(){return{}},t.prototype.get=function(t){return this.obj[":"+t]},t.prototype.set=function(t,e){this.obj[":"+t]=e},t.prototype[iM]=function(t){delete this.obj[":"+t]},t.prototype.keys=function(){var t=[];for(var e in this.obj)58==e.charCodeAt(0)&&t.push(e.substring(1));return t}),t}()}function No(t,e){Tx(),UL.dc(t,e)}function Oo(t,e){return Av(t,e)}function Lo(t,e){return t.a.B(e)}function Po(t,e){return t.g[e.e]}function Io(t,e){return t.i[e.e]}function jo(t,e){return t.j[e.e]}function Mo(t,e){return t.n[e.e]}function Do(t,e){return t.o[e.e]}function Ro(t,e){return t>e?t:e}function Bo(t,e){return t>e?t:e}function Go(t,e){return t>e?t:e}function Ho(t,e){return te?1:0}function Bc(t){return null!=t?V_(t):0}function Gc(t){this.a=Hu(),this.b=t}function Hc(t){this.a=Hu(),this.b=t}function Fc(t){this.a=t,$h.call(this,t)}function zc(){Zc(),this.b=new En(this)}function Yc(){var t;Yc=r,t=new oo(", "),Od(tP),NM=new Xh(t,t)}function Vc(){Vc=r,TM=new cc,CM=new Lc}function qc(){qc=r,LM=new d,PM=new p}function Uc(){Uc=r,jM=new Xs,MM=new mc}function Xc(){Xc=r,FM=new lc,HM=new yl}function Wc(){Wc=r,iD=new b,oD=new y}function $c(t){t.g=new je,t.b=new je}function Kc(t){t.a=new ve,t.c=new ve}function Zc(){Zc=r,lz=new Wt,cz=new Kh}function Qc(){Ba.call(this,"IS_NULL",2)}function Jc(){Mu.call(this,"Head",1)}function tl(){Mu.call(this,"Tail",3)}function el(t,e){rm.call(this,t,e,null)}function nl(t,e){Mk(t,0,t.length,e)}function rl(t,e){return Oh(e.a,t.a),t.a}function il(t,e){return t.a*=e,t.b*=e,t}function ol(t,e){Qp(),this.a=t,this.b=e}function al(t,e){return t.a[e.d.k][e.k]}function sl(t,e){return t.a[e.d.k][e.k]}function ul(t,e){return sa(function(t,e){var n,r;n=null,r=t.b;for(;r;)t.a.$b(e,r.d)>=0?r=r.a[1]:(n=r,r=r.a[0]);return n}(t.a,e))}function cl(t,e){return sa(function(t,e){var n,r;n=null,r=t.b;for(;r;)t.a.$b(e,r.d)<=0?r=r.a[0]:(n=r,r=r.a[1]);return n}(t.a,e))}function ll(t,e){return Gh(GS(t.a,e),20)}function fl(t,e){return null!=t&&Ak(t,e)}function hl(t){return t.a=e)throw new ki}function Fh(t,e){return Od(t),Od(e),new rd(t,e)}function zh(t,e){return Od(t),Od(e),new id(t,e)}function Yh(t,e,n){return t=e+1&&t.splice(0,e+1);break}return t}(UL.ec(t))}function yd(t,e){var n;return(n=Ip(t,e)).g=2,n}function wd(t,e){t.b=e.b,t.c=e.c,t.d=e.d,t.a=e.a}function md(t){t.a.b=t.b,t.b.a=t.a,t.a=t.b=null}function xd(t){return t.b.c.length+t.e.c.length}function _d(t){return Array.isArray(t)&&t.ad===n}function Ed(t,e){return qc(),-1!=jx(new $n(t),e)}function kd(t,e,n,r,i,o){return function t(e,n,r,i,o,a,s){var u,c,l,f,h;if(f=o[a],h=rS(u=(l=a==s-1)?i:0,f),9!=i&&_x(Oo(e,s-a),n[a],r[a],u,h),!l)for(++a,c=0;c0),t.a.sb(t.c=--t.b)}function up(t){t.b?up(t.b):t.d.V()&&qd(t.f.b,t.e)}function cp(t){if($_(t.d),t.d.d!=t.c)throw new wi}function lp(t,e){if(e[tM]!=t[tM])throw new wi}function fp(t,e){return qc(),Od(t),Od(e),new Ia(t,e)}function hp(t,e){Qp(),Ya.call(this,t,Cx(new Kn(e)))}function dp(t,e,n,r){this.a=t,Sy.call(this,t,e,n,r)}function pp(t){this.a=Math.cos(t),this.b=Math.sin(t)}function gp(t,e,n){Fi.call(this,t),this.b=e,this.a=n}function vp(t){this.b=new je,this.a=new je,this.c=t}function bp(t){this.c=new ao,this.a=new je,this.b=t}function yp(t,e){return++t.d,t.c[t.c.length]=e,!0}function wp(t,e){Ob(t.d,e,t.b.b,t.b),++t.a,t.c=null}function mp(t,e){return null==t.a.db(e,t)}function xp(t,e){return Ry(t.slice(0,e),t)}function _p(t,e){return Ry(new Array(e),t)}function Ep(t,e,n){var r;return r=t.b[e],t.b[e]=n,r}function kp(t){return ml(),xh(function(t){var e;return Gh((e=t.g)?e:t.g=new Ue(t),20)}(t.a).mb(),(Uc(),jM))}function Sp(t){return qc(),new Pc(Mc(zh(t.a,new h)))}function Cp(t){return typeof t===KL||typeof t===rP}function Tp(t){e.setTimeout((function(){throw t}),0)}function Ap(t){return Od(t),fl(t,345)?Gh(t,345):Bk(t)}function Np(t,e){return null==Dx(t.a,e,(Hd(),gX))}function Op(t,e){var n;return function(t,e){if(t<0||t>=e)throw new ro(function(t,e){if(t<0)return TA(EP,_x(Oo(fM,1),kP,1,4,["index",F_(t)]));if(e<0)throw new io(SP+e);return TA("%s (%s) must be less than size (%s)",_x(Oo(fM,1),kP,1,4,["index",F_(t),F_(e)]))}(t,e))}(e,n=t.a.Y()),n-1-e}function Lp(t,e,n){var r;return r=Tw(t,e),function(t,e,n){if(n){var r=n.gc();n=r(n)}else n=void 0;t.a[e]=n}(t,e,n),r}function Pp(t,e,n){var r;return Uw(n,r=Ip(t,e)),r}function Ip(t,e){var n;return(n=new Yx).i=t,n.d=e,n}function jp(t,e,n){this.a=t,Tb(n,e),this.c=e,this.b=n}function Mp(t,e,r){return function(t){if(!t)throw new Ur}(null==r||function(t,e){switch(yw(t)){case 5:return Sl(e);case 6:return kl(e);case 7:return gf(e);case 0:return Ak(e,t.__elementTypeId$);case 2:return Cp(e)&&!(e.ad===n);case 1:return Cp(e)&&!(e.ad===n)||Ak(e,t.__elementTypeId$);default:return!0}}(t,r)),t[e]=r}function Dp(t){t.a=null,t.e=null,by(t.b),t.d=0,++t.c}function Rp(t){return t.f||(t.f=new Ks(t))}function Bp(t){return t.k||(t.k=new He(t))}function Gp(t){return t.e||(t.e=new $a(t))}function Hp(t){var e;return!(e=t.e)&&(t.e=e=t.gb()),e}function Fp(t){return t.c.f.d==t.d.f.d}function zp(t,e){var n;return Gw(n=new Pb(t),e),n}function Yp(t,e){return t.a+=String.fromCharCode(e),t}function Vp(t){return!t.a&&t.d?t.d.b:t.a}function qp(t){return Vl(t)?0|t:t.l|t.m<<22}function Up(t,e){return Sl(e)?hv(t,e):Wu(uv(t.d,e))}function Xp(t){return fl(t,19)?Gh(t,19).Y():Zb(t.mb())}function Wp(t){return t?new Rd((Yc(),t)):function(t){var e;return Fw(e=new Qi,t),e}(null.mb())}function $p(t,e){return Xu(t)===Xu(e)||null!=t&&e_(t,e)}function Kp(t,e){return to(),Sx(no(Nf(t)),no(Nf(e)))}function Zp(t){return ml(),xh(t.a.bb().mb(),(Uc(),MM))}function Qp(){Qp=r,ch(),OM=new ib((Dg(),Dg(),kX))}function Jp(){Jp=r,ch(),GM=new Ws((Dg(),Dg(),CX))}function tg(t,e){if(null==t)throw new Eo((oi(),e))}function eg(t,e,n,r){t.g[e.e][n.e]=r,t.g[n.e][e.e]=r}function ng(t){Cc(-1!=t.c),t.d.vb(t.c),t.b=t.c,t.c=-1}function rg(t){this.c=t,this.b=t.a.b.a,Ul(t.a.c,this)}function ig(t){FN.call(this,new Kn(t)),this.a=new ao}function og(){Ni.call(this,new ji(new _r)),this.a=this}function ag(){UG=vd(gd(gd(new Z_,(ML(),xF)),cF),vF),XG=pd(new Z_,dF),this.b=(ml(),new _r),this.a=new _r}function sg(t){fg(t.a),t.b=Ey(fM,kP,1,t.b.length,4,1)}function ug(t){return!t.b&&(t.b=new $o(t.c.W())),t.b}function cg(t,e){var n;return qO(t,e,n=new be),n.d}function lg(t,e){var n;return(n=Ip("",t)).k=e,n.g=1,n}function fg(t){var e;for(e=t.mb();e.G();)e.H(),e.I()}function hg(t,e){return fl(e,79)&&Mi(t.b,Gh(e,79).mc())}function dg(t,e,n){return Sl(e)?Rv(t,e,n):jC(t.d,e,n)}function pg(t,e,n,r){this.d=t,this.b=e,this.a=n,this.c=r}function gg(t,e,n,r){this.d=t,this.e=e,this.c=n,this.b=r}function vg(t,e,n,r){this.a=t,this.c=e,this.b=n,this.d=r}function bg(t,e,n,r){La.call(this,t,e),this.a=n,this.b=r}function yg(t,e){return oi(),t==e?0:t0?1:0}function Vg(t,e){return Bm(function(t,e){return Sh(t.l&e.l,t.m&e.m,t.h&e.h)}(Vl(t)?Xm(t):t,Vl(e)?Xm(e):e))}function qg(t){return 0==t.b?null:(Nc(0!=t.b),Hw(t,t.a.a))}function Ug(t){t.d=t.d-15,t.b=t.b-15,t.c=t.c+15,t.a=t.a+15}function Xg(t){this.b=t,this.c=t,t.e=null,t.c=null,this.a=1}function Wg(t,e,n){this.d=t,this.b=new je,this.c=e,this.a=n}function $g(t,e){!function(t,e){t.a=e}(this,new Za(t.a,t.b)),function(t,e){t.b=e}(this,Rh(e))}function Kg(t){hl(new $n(Uk(t.e)))&&(function(t){var e,n,r;for(r=new Bd(new ir(t.c).a);dl(r.a);)switch(r.b=Kb(r.a),n=new Du(r.c,r.b),e=Gh(n.b.b[n.a.e],62),Gh(n.a,67).e){case 0:e.d=0,e.e=-(e.b+t.d);break;case 1:e.d=(t.e.e.j.a-e.c)/2,e.e=-(e.b+t.d);break;case 2:e.d=t.e.e.j.a-e.c,e.e=-(e.b+t.d);break;case 3:e.d=0,e.e=t.e.e.j.b+t.d;break;case 4:e.d=(t.e.e.j.a-e.c)/2,e.e=t.e.e.j.b+t.d;break;case 5:e.d=t.e.e.j.a-e.c,e.e=t.e.e.j.b+t.d;break;case 6:e.d=-(e.c+t.d),e.e=0;break;case 7:e.d=-(e.c+t.d),e.e=(t.e.e.j.b-e.b)/2;break;case 8:e.d=-(e.c+t.d),e.e=t.e.e.j.b-e.b;break;case 9:e.d=t.e.e.j.a+t.d,e.e=0;break;case 10:e.d=t.e.e.j.a+t.d,e.e=(t.e.e.j.b-e.b)/2;break;case 11:e.d=t.e.e.j.a+t.d,e.e=t.e.e.j.b-e.b;break;case 12:e.d=t.q.b+t.d,e.e=t.q.d+t.d;break;case 13:e.d=(t.e.e.j.a-e.c)/2,e.e=t.q.d+t.d;break;case 14:e.d=t.e.e.j.a-t.q.c-e.c-t.d,e.e=t.q.d+t.d;break;case 15:e.d=t.q.b+t.d,e.e=(t.e.e.j.b-e.b)/2;break;case 16:e.d=(t.e.e.j.a-e.c)/2,e.e=(t.e.e.j.b-e.b)/2;break;case 17:e.d=t.e.e.j.a-t.q.c-e.c-t.d,e.e=(t.e.e.j.b-e.b)/2;break;case 18:e.d=t.q.b+t.d,e.e=t.e.e.j.b-t.q.a-e.b-t.d;break;case 19:e.d=(t.e.e.j.a-e.c)/2,e.e=t.e.e.j.b-t.q.a-e.b-t.d;break;case 20:e.d=t.e.e.j.a-t.q.c-e.c-t.d,e.e=t.e.e.j.b-t.q.a-e.b-t.d}}(t),function(t){var e,n,r,i,o;for(r=new $n(Uk(t.e));r.a>>0).toString(16)}function fv(t,e){return function(t,e){return Hd(),t==e?0:t?1:-1}(eo((Md(t),t)),eo((Md(e),e)))}function hv(t,e){return null==e?Wu(uv(t.d,null)):Pu(t.e,e)}function dv(t,e,n){return new Ov(t.c,RN(t.b,function(t,e,n){return new JC(t,!1,null,(Vc(),TM),!0,e,n)}(t.d,e,n)),t.a)}function pv(t){return 0|Math.max(Math.min(t,iP),-2147483648)}function gv(t){this.e=t,this.b=this.e.a.entries(),this.a=[]}function vv(t){this.c=t,this.b=new zx(new Hn(this.c.a).a)}function bv(t){this.b=(qc(),qc(),qc(),LM),this.a=Gh(Od(t),35)}function yv(t,e,n){Wc(),Lh.call(this,t,e),null!=n&&(this.c=n)}function wv(t,e,n){if(t<0||en)throw new ro(function(t,e,n){if(t<0||t>n)return MC(t,n,"start index");if(e<0||e>n)return MC(e,n,"end index");return TA("end index (%s) must not be less than start index (%s)",_x(Oo(fM,1),kP,1,4,[F_(e),F_(t)]))}(t,e,n))}function mv(t,e){if(null==t)throw new Eo((oi(),e));return t}function xv(t){if(!X_(t))throw new xi;return t.c=t.b,t.b.H()}function _v(t){function e(){}return e.prototype=t||{},new e}function Ev(t){var e;return ex(e=new Ca(nx(t.length)),t),e}function kv(t){var e;e=t.c.b.b,t.b=e,t.a=t.c.b,e.a=t.c.b.b=t}function Sv(t){this.b=null,!t&&(Qs(),Qs(),t=NX),this.a=t}function Cv(t){this.b=t,this.a=new Uv(this.b,this.b.c.length)}function Tv(t){return Qp(),Od(t),dk(t||Dh(new $n(null)))}function Av(t,e){var n=t.a=t.a||[];return n[e]||(n[e]=t.Oc(e))}function Nv(t,e,n){var r;tS(e,n,t.c.length),r=n-e,ya(t.c,e,r)}function Ov(t,e,n){Oa.call(this,e.a),this.c=t,this.b=e,this.a=n}function Lv(t){return Yu(t.c),t.e=t.a=t.c,t.c=t.c.c,++t.d,t.a.f}function Pv(t){return Yu(t.e),t.c=t.a=t.e,t.e=t.e.e,--t.d,t.a.f}function Iv(t){return Gm(_x(Oo(nD,1),RI,10,0,[t.f.i,t.i,t.a]))}function jv(){jv=r,yz=qx((Bg(),_x(Oo(mz,1),CP,193,0,[vz,bz])))}function Mv(){Mv=r,tz=qx((kb(),_x(Oo(sz,1),CP,175,0,[QF,JF])))}function Dv(){Dv=r,Dz=qx((sb(),_x(Oo(Bz,1),CP,192,0,[Mz,jz])))}function Rv(t,e,n){return null==e?jC(t.d,null,n):tE(t.e,e,n)}function Bv(t,e){return Xd(t.a,e)?Ep(t,Gh(e,17).e,null):null}function Gv(t){return Od(t),Kk((qc(),new Pc(Mc(zh(t.a,new h)))))}function Hv(t,e){var n,r;return r=Zd(t,e),n=t.a.ub(r),new Fa(t,n)}function Fv(t,e,n){var r;(r=new oe).b=e,r.a=n,++e.b,Oh(t.d,r)}function zv(t,e,n){t.d&&Dy(t.d.b,t),t.d=e,t.d&&Td(t.d.b,n,t)}function Yv(t,e,n){tS(e,n,t.Y()),this.c=t,this.a=e,this.b=n-e}function Vv(t,e,n,r){this.d=t,this.b=e,this.a=n,this.c=r}function qv(t,e){Ni.call(this,cm(Od(t),Od(e))),this.b=t,this.c=e}function Uv(t,e){this.a=t,Fn.call(this,t),wy(e,t.Y()),this.b=e}function Xv(t,e,n,r){Wc(),yv.call(this,t,e,n),null!=r&&(this.d=r)}function Wv(t){return Nc(t.a2e3&&(XM=t,WM=e.setTimeout(la,10));if(0==UM++)return function(t){var e,n;if(t.a){n=null;do{e=t.a,t.a=null,n=xC(e,n)}while(t.a);t.a=n}}((ci(),qM)),!0;return!1}();try{return function(t,e,n){return t.apply(e,n)}(t,n,r)}finally{!function(t){t&&function(t){var e,n;if(t.b){n=null;do{e=t.b,t.b=null,n=xC(e,n)}while(t.b);t.b=n}}((ci(),qM)),--UM,t&&-1!=WM&&(!function(t){e.clearTimeout(t)}(WM),WM=-1)}(i)}}function rb(t){return fl(t,19)?Gh(t,19).V():!t.mb().G()}function ib(t){Qp(),this.a=(Dg(),fl(t,63)?new Zo(t):new Wl(t))}function ob(){ob=r,fq=new mu(_I,0),hq=new mu("TOP_LEFT",1)}function ab(){ab=r,uY=new su("DOWN",0),cY=new su("UP",1)}function sb(){sb=r,Mz=new Ds("LAYER_SWEEP",0),jz=new Ds(Lj,1)}function ub(){ub=r,Yz=new iu("UPPER",0),zz=new iu("LOWER",1)}function cb(t,e){return!!fl(e,21)&&eS(t.a,Gh(e,21))}function lb(t,e){return!!fl(e,21)&&eS(t.a,Gh(e,21))}function fb(t,e){return!!fl(e,21)&&eS(t.a,Gh(e,21))}function hb(t){var e;return S_(e=new Og,t),$y(e,(HL(),fR),null),e}function db(t,e){return e===t?"(this Map)":(oi(),null==e?tP:Bk(e))}function pb(t,e,n,r){return fl(n,63)?new wf(t,e,n,r):new dp(t,e,n,r)}function gb(){gb=r,bB=qx((jw(),_x(Oo(GB,1),CP,149,0,[gB,pB,dB])))}function vb(){vb=r,qD=qx((w_(),_x(Oo(KR,1),CP,166,0,[zD,FD,YD])))}function bb(){bb=r,Sz=qx((lw(),_x(Oo(Nz,1),CP,173,0,[kz,Ez,_z])))}function yb(t,e){var n;Dg(),Mk(n=t.ob(),0,n.length,e),function(t,e){var n,r;for(r=t.Y(),n=0;ne)throw new ro(MC(t,e,"index"));return t}function Ab(t,e,n){Od(t),function(t){var e,n,r;for(yb(t.c,t.a),r=new $n(t.c);r.a>22&aI,t<0?sI:0)}function cy(){cy=r,mD=qx((b_(),_x(Oo(SD,1),CP,59,0,[bD,vD,gD,pD,yD])))}function ly(){ly=r,HB=qx((uL(),_x(Oo(qB,1),CP,32,0,[RB,wB,yB,DB,BB])))}function fy(){fy=r,iB=qx((EE(),_x(Oo(fB,1),CP,100,0,[nB,eB,QR,JR,tB])))}function hy(t,e){var n;for(n=e.mb();n.G();)uN(t,Gh(n.H(),55),0,0)}function dy(t,e,n){var r;for(r=t.mb();r.G();)KA(Gh(r.H(),55),e,n)}function py(t,e,n){var r,i;for(r=0,i=0;ie)throw new ro("Index: "+t+", Size: "+e)}function my(t,e){if(t<0||t>=e)throw new ro("Index: "+t+", Size: "+e)}function xy(t,e){var n;return!!(n=$x(t,e.yb()))&&xg(n.e,e.zb())}function _y(t,e){var n;return n=t.d,e>0?Gh(ld(n.a,e-1),9):null}function Ey(t,e,n,r,i,o){var a;return a=rS(i,r),9!=i&&_x(Oo(t,o),e,n,i,a),a}function ky(t){var e;if(!am(t))throw new xi;return t.d=1,e=t.c,t.c=null,e}function Sy(t,e,n,r){this.f=t,this.e=e,this.d=n,this.b=r,this.c=r?r.d:null}function Cy(t){var e;return e=Gh(ld(t.f,0),7),Gh(yx(e,(DL(),Uq)),7)}function Ty(t){var e;return e=Gh(ld(t.f,0),7),Gh(yx(e,(DL(),Uq)),7)}function Ay(){Ay=r,uX=qx((CE(),_x(Oo(cX,1),CP,153,0,[iX,aX,oX])))}function Ny(){Ny=r,dX=qx((jm(),_x(Oo(pX,1),CP,172,0,[lX,fX,hX])))}function Oy(){Oy=r,dD=qx((ok(),_x(Oo(wD,1),CP,103,0,[sD,lD,fD,hD,uD,cD])))}function Ly(){Ly=r,HD=qx((TS(),_x(Oo(VD,1),CP,133,0,[RD,MD,BD,ID,DD,jD])))}function Py(){Py=r,hB=qx((cS(),_x(Oo(vB,1),CP,28,0,[lB,cB,uB,oB,sB,aB])))}function Iy(){Iy=r,uz=qx((aC(),_x(Oo(fz,1),CP,125,0,[oz,nz,az,iz,rz,ez])))}function jy(){jy=r,aD=new Lh("de.cau.cs.kieler.labels.labelManager",null)}function My(t,e){var n;return(n=new be).c=!0,n.d=e.zb(),qO(t,e.yb(),n)}function Dy(t,e){var n;return-1!=(n=Ky(t,e,0))&&(t.vb(n),!0)}function Ry(t,e){return 9!=yw(e)&&_x(bw(e),e._c,e.__elementTypeId$,yw(e),t),t}function By(t){return lp(t.c.a.c,t),Nc(t.b!=t.c.a.b),t.a=t.b,t.b=t.b.a,t.a}function Gy(t){Cc(!!t.c),lp(t.e,t),t.c.I(),t.c=null,t.b=Qm(t),Ul(t.e,t)}function Hy(t,e,n){Ni.call(this,cm(Od(t),Od(e))),this.b=t,this.c=e,this.a=n}function Fy(t,e,n,r){this.b=new An(this),this.a=t,this.c=e,this.e=n,this.d=r}function zy(t){Fx.call(this,t,0),vf(this),this.b.b=this.b,this.b.a=this.b}function Yy(t,e){Ru.call(this,t,e),this.a=Ey(jX,kP,183,2,0,1),this.b=!0}function Vy(t,e){return Sl(e)?null==e?!!uv(t.d,null):function(t,e){return!(void 0===Ea(t.a,e))}(t.e,e):!!uv(t.d,e)}function qy(t,e){return To(),(t-e>0?t-e:-(t-e))<=iI||t==e||isNaN(t)&&isNaN(e)}function Uy(t,e){return To(),(t-e>0?t-e:-(t-e))<=iI||t==e||isNaN(t)&&isNaN(e)}function Xy(t){var e,n;e=!0;do{n=e?Q_(t):vE(t),e=!e}while(n);tx(t,t.d)}function Wy(t,e,n){var r;if(null==e)throw new Wr;return r=_g(t,e),function(t,e,n){if(n){var r=n.gc();t.a[e]=r(n)}else delete t.a[e]}(t,e,n),r}function $y(t,e,n){return!t.n&&(t.n=new _r),null==n?qd(t.n,e):dg(t.n,e,n),t}function Ky(t,e,n){for(;n=t.a.c.length;)Oh(t.a,new so);return Gh(ld(t.a,e),20)}function Qy(t,e,n,r,i){var o;return Uw(n,o=Ip(t,e)),o.g=i?8:0,o.f=r,o.e=i,o}function Jy(t,e){var n;this.f=t,this.b=e,n=Gh(Up(t.b,e),126),this.c=n?n.b:null}function tw(t,e){var n,r;for(n=0,r=e.length;n0&&(r+=function(t){var e,n,r,i,o,a,s,u,c,l,f,h,d,p,g,v,b,y,w,m,x,_,E;for(i=0,y=0,ml(),b=new _r,r=new _r,o=new _r,E=new _r,function(t,e,n){var r,i,o,a,s,u,c,l,f,h,d;for(r=0,i=0,l=0;l0&&(r+=o.b.c.length+o.e.c.length,dg(e,o,F_(r)));else{for(s=fC(u,(uL(),yB)).mb();s.G();)o=Gh(s.H(),7),r+=o.b.c.length+o.e.c.length;for(a=fC(u,yB).mb();a.G();)(o=Gh(a.H(),7)).b.c.length+o.e.c.length>0&&dg(e,o,F_(r))}for(c=t.length-1;c>=0;c--)if(Yl(Gh(yx(u=t[c],(HL(),AR)),28)))for(h=fC(u,(uL(),BB)).mb();h.G();)(f=Gh(h.H(),7)).b.c.length+f.e.c.length>0&&(i+=f.b.c.length+f.e.c.length,dg(n,f,F_(i)));else{for(d=fC(u,(uL(),BB)).mb();d.G();)f=Gh(d.H(),7),i+=f.b.c.length+f.e.c.length;for(h=fC(u,BB).mb();h.G();)(f=Gh(h.H(),7)).b.c.length+f.e.c.length>0&&dg(n,f,F_(i))}}(t,o,E),e=null,v=0,_=0,w=!0,u=!0,h=0,p=t.length;hc.k&&(++e,d=!0),p&&c&&p.k>c.k&&(++e,g=!0),h&&s&&h.ks.k&&(++e,u=!0),h&&s&&h.kc.k&&(++e,l=!0),u&&l&&s==c&&--e)}}return e}(e)),r}function rw(t,e){var n;return(n=Gh(qd(t.c,e),176))?(md(n),n.e):null}function iw(t){return Zx(t,iP)>0?iP:Zx(t,lP)<0?lP:qp(t)}function ow(t){return Yc(),kw(t,"size"),qp(function(t,e){return Zx(t,e)<0}(g_(t,8),qP)?g_(t,8):qP),new Jo}function aw(t){ah.call(this,(oi(),null==t?tP:Bk(t)),fl(t,46)?Gh(t,46):null)}function sw(t){wc(this),Id(t>=0,"Initial capacity must not be negative")}function uw(){uw=r,LH=new z,NH=new Y,OH=new V,AH=new q,PH=new U,IH=new X}function cw(){cw=r,MX=new Mu("All",0),DX=new Jc,RX=new bl,BX=new tl}function lw(){lw=r,kz=new Ms(Mj,0),Ez=new Ms("LONGEST_PATH",1),_z=new Ms(Lj,2)}function fw(){fw=r,JM=Sh(aI,aI,524287),tD=Sh(0,0,524288),uy(1),uy(2),eD=uy(0)}function hw(){hw=r,$F=qx((UT(),_x(Oo(KF,1),CP,109,0,[XF,zF,qF,YF,VF,FF,UF,WF])))}function dw(){dw=r,rY=qx((Gk(),_x(Oo(oY,1),CP,141,0,[nY,Jz,tY,Qz,eY])))}function pw(){pw=r,LV=qx((fS(),_x(Oo(BV,1),CP,115,0,[CV,SV,AV,TV,NV])))}function gw(){gw=r,xU=qx((Hk(),_x(Oo(SU,1),CP,85,0,[wU,gU,vU,bU,yU])))}function vw(t){qS(),function(t,e,n){t.a=1502^e,t.b=n^oM}(this,qp(Vg(Bm(function(t,e){var n,r,i,o,a;e&=63,n=t.h,(r=0!=(524288&n))&&(n|=-1048576),e<22?(a=n>>e,o=t.m>>e|n<<22-e,i=t.l>>e|t.m<<22-e):e<44?(a=r?sI:0,o=n>>e-22,i=t.m>>e-22|n<<44-e):(a=r?sI:0,o=r?aI:0,i=n>>e-44);return Sh(i&aI,o&aI,a&sI)}(Vl(t)?Xm(t):t,24)),sM)),qp(Vg(t,sM)))}function bw(t){return Sl(t)?pM:kl(t)?yX:gf(t)?bX:Vd(t)||_d(t)?t.$c:t.$c||VM}function yw(t){return null==t.__elementTypeCategory$?9:t.__elementTypeCategory$}function ww(t){var e,n;for(nu(),n=gI,e=0;en&&(n=t[e]);return n}function mw(t,e){var n;return(n=Gh(Up(t.b,e),106))||(n=e.rc(),dg(t.b,e,n)),n}function xw(t,e){var n;return(n=Gh(Up(t.c,e),176))?(Gl(t,n),n.e):null}function _w(t,e,n,r){var i;(i=Gh(xw(t.e,e),116)).b+=n,i.a+=r,Sk(t.e,e,i),t.d=!0}function Ew(t){var e;for(++t.a,e=t.c.a.length;t.a"+t.d.f+"("+t.d+")":"e_"+ff(t)}function Iw(){Iw=r,ZR=qx((uT(),_x(Oo(rB,1),CP,41,0,[zR,FR,VR,$R,WR,XR,qR,UR,YR])))}function jw(){jw=r,gB=new ps("OUTSIDE",0),pB=new ps("INSIDE",1),dB=new ps("FIXED",2)}function Mw(){Mw=r,uq=new wu(SI,0),cq=new wu("TOP",1),sq=new wu("BOTTOM",2)}function Dw(){Dw=r,dY=new cu("CLASSIC",0),pY=new cu("IMPROVE_STRAIGHTNESS",1)}function Rw(){this.e=new ao,this.a=new jg,this.d=new ao,this.b=new je,this.c=new je}function Bw(t,e,n){this.b=e,this.a=t,this.c=n,Oh(this.a.e,this),Oh(this.b.b,this)}function Gw(t,e){t.d=Ho(t.d,e.d),t.c=Ro(t.c,e.c),t.a=Ro(t.a,e.a),t.b=Ho(t.b,e.b)}function Hw(t,e){var n;return n=e.c,e.a.b=e.b,e.b.a=e.a,e.a=e.b=null,e.c=null,--t.b,n}function Fw(t,e){var n;for(qc(),Od(t),Od(e),n=!1;e.G();)n|=t.ib(e.H());return n}function zw(t){var e;return lp(t.e,t),Nc(t.b),t.c=t.a,e=Gh(t.a.H(),21),t.b=Qm(t),e}function Yw(t){return lI=0x8000000000000000)return fw(),JM;i=!1,t<0&&(i=!0,t=-t);r=0,t>=cI&&(r=pv(t/cI),t-=r*cI);n=0,t>=uI&&(n=pv(t/uI),t-=n*uI);return e=pv(t),o=Sh(e,n,r),i&&(a=1+~o.l&aI,s=~o.m+(0==a?1:0)&aI,u=~o.h+(0==a&&0==s?1:0)&sI,o.l=a,o.m=s,o.h=u),o}(t))}function Vw(t){if(t){if(t.V())throw new xi;return t.sb(t.Y()-1)}return function(t){var e;for(qc();;)if(e=t.H(),!t.G())return e}(null.mb())}function qw(t,e){var n;return e<(n=t.d).a.c.length-1?Gh(ld(n.a,e+1),9):null}function Uw(t,e){if(t){e.k=t;var n=function(t){if(t.Tc())return null;var e=t.k;return YL[e]}(e);n?n.$c=e:YL[t]=[e]}}function Xw(t,e){var n,r;r=!1;do{r|=n=t.i?gx(t,e):px(t,e)}while(n);return r}function Ww(t,e,n){var r,i;r=e;do{i=no(t.n[r.k])+n,t.n[r.k]=i,r=t.a[r.k]}while(r!=e)}function $w(t,e){return mv(t,"set1"),mv(e,"set2"),eu(),new dh(t,new Aa(e),e)}function Kw(t){var e=/function(?:\s+([\w$]+))?\s*\(/.exec(t);return e&&e[1]||eP}function Zw(){Zw=r,mV=qx((CS(),_x(Oo(kV,1),CP,123,0,[wV,yV,bV,gV,pV,vV])))}function Qw(){Qw=r,GV=qx((SS(),_x(Oo(KV,1),CP,124,0,[MV,jV,RV,IV,DV,PV])))}function Jw(){Jw=r,xX=_x(Oo(UX,1),nI,26,12,[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15])}function tm(){tm=r,kU=new _u(kI,0),_U=new _u("INPUT",1),EU=new _u("OUTPUT",2)}function em(t){this.c=t,this.b=new zx(new Hn(t.b).a),this.a=null,this.d=(qc(),qc(),PM)}function nm(t){this.e=t,this.d=new Ca(nx(Qd(this.e).Y())),this.c=this.e.a,this.b=this.e.c}function rm(t,e,n){this.c=t,Mb.call(this),this.b=e,this.j=new gg(e.d,e.e,e.c,e.b),this.a=n}function im(t){return t.b.d.f.g==(AS(),_H)?Gh(yx(t.b.d.f,(DL(),Uq)),7):t.b.d}function om(t){return t.b.c.f.g==(AS(),_H)?Gh(yx(t.b.c.f,(DL(),Uq)),7):t.b.c}function am(t){switch(zu(3!=t.d),t.d){case 2:return!1;case 0:return!0}return function(t){return t.d=3,t.c=function(t){var e;for(;t.b.G();)if(e=t.b.H(),t.a.D(e))return e;return t.d=2,null}(t),2!=t.d&&(t.d=0,!0)}(t)}function sm(t){switch(t.e){case 2:return uL(),BB;case 4:return uL(),yB;default:return t}}function um(t){switch(t.e){case 1:return uL(),DB;case 3:return uL(),wB;default:return t}}function cm(t,e){var n;return Dg(),n=new Vs(1),Sl(t)?Rv(n,t,e):jC(n.d,t,e),new er(n)}function lm(t,e){var n,r,i;for(Md(e),n=!1,i=e.mb();i.G();)r=i.H(),n|=t.ib(r);return n}function fm(t){var e,n;for(n=new Br,e=t.b.mb();e.G();)Nh(n,Gh(e.H(),92).a);return n}function hm(t){var e,n,r;for(e=0,r=t.mb();r.G();)e+=(Md(n=Nf(r.H())),n);return e/t.Y()}function dm(t,e){var n;return(n=Gh(Up(t.c,e),200))||((n=new Zr).c=e,dg(t.c,n.c,n)),n}function pm(t,e){var n;return Md(e),n=e.e,!t.b[n]&&(Mp(t.b,n,e),++t.c,!0)}function gm(t,e){var n,r;return n=1-e,r=t.a[n],t.a[n]=r.a[e],r.a[e]=t,t.b=!0,r.b=!1,r}function vm(t,e){var n;return!!fl(e,10)&&(n=Gh(e,10),t.a==n.a&&t.b==n.b)}function bm(t,e,n){return t.g=new _m(e,n),kf(t,t.g,t.i),t.d=Go(2,t.d),++t.a,t.j=p_(t.j,n),t}function ym(t,e,n){return t.e=new _m(e,n),kf(t.f,t.e,t),t.d=Go(2,t.d),++t.a,t.j=p_(t.j,n),t}function wm(t,e){var n=t.a,r=0;for(var i in n)n.hasOwnProperty(i)&&(e[r++]=i);return e}function mm(t,e){var n,r;for(Md(e),r=e.bb().mb();r.G();)n=Gh(r.H(),21),t.db(n.yb(),n.zb())}function xm(t,e,n){this.g=t,this.d=e,this.e=n,this.a=new je,function(t){var e,n,r,i,o,a;for(a=new Yf(t.d,t.e),o=sA(a);o.G();)for(i=Gh(o.H(),7),r=t.e==(uL(),BB)?i.b:i.e,n=new $n(r);n.a0),this.b=t,this.c=e,this.j=e,this.a=1,this.d=1,this.e=null,this.g=null}function Em(t){return 1.4901161193847656e-8*mT(t,26)+11102230246251565e-32*mT(t,27)}function km(t){return fl(t,87)?Jv(Gh(t,87)):fl(t,88)?Gh(t,88).a:fl(t,63)?new Ii(t):new Wa(t)}function Sm(t){var e;return e=Gh(yx(t,(DL(),Iq)),32),t.g==(AS(),_H)&&(e==(uL(),BB)||e==yB)}function Cm(t,e){return!!function(t,e){var n,r,i,o;for(n=Gh(yx(e,(DL(),Lq)),18),o=Gh(GS(bH,n),18),i=o.mb();i.G();)if(r=Gh(i.H(),18),!Gh(GS(t.a,r),20).V())return!1;return!0}(t,e)&&(rT(t.a,Gh(yx(e,(DL(),Lq)),18),e),!0)}function Tm(t,e){var n;if(e)for(n=0;n<6;n++)Gh(ld(t.a,n),18).jb(Gh(ld(e.a,n),19));return t}function Am(t,e){var n;return t.b?null:(n=function(t,e){return new Sf(t>0?t-1:t,e)}(t.e,t.f),Nh(t.a,n),n.g=t,t.d=e,n)}function Nm(t,e){var n,r;for(r=_k(t,0);r.b!=r.d.c;)(n=Gh(Cb(r),10)).a+=e.a,n.b+=e.b;return t}function Om(t,e){var n,r;for(n=0;n0|0==n&t.f==(Vc(),TM))}function Bm(t){var e;return 0==(e=t.h)?t.l+t.m*uI:e==sI?t.l+t.m*uI-cI:t}function Gm(t){var e,n,r,i;for(e=new ao,r=0,i=t.length;r=i;o--)t[o+1]=t[o];t[i]=r}function qm(t,e,n,r){var i,o;for((i=function(t,e,n,r){var i,o,a,s;o=e,i=n-1;for(;o<=i;)if((s=t[a=o+i>>>1])r))return a;i=a-1}return-(o+1)}(t,e,n,r))<0&&(i=-i-1),o=n-1;o>=i;o--)t[o+1]=t[o];t[i]=r}function Um(t,e){var n,r;for(Md(e),r=e.mb();r.G();)if(n=r.H(),!t.kb(n))return!1;return!0}function Xm(t){var e,n,r;return n=0,(r=t)<0&&(r+=cI,n=sI),e=pv(r/uI),Sh(pv(r-e*uI),e,n)}function Wm(t,e){return t.c.c=Ey(fM,kP,1,0,4,1),uC(t,t.e,e),uC(t,t.a,e),Dg(),yb(t.c,null),function(t){var e,n,r;for(e=0,r=new $n(t.c);r.a0||!a&&0==s))return!1;return!0}(e,r,i.d,o,a,s,u)&&n.ib(i),(l=i.a[1])&&t(e,n,r,l,o,a,s,u)}(t,n=new je,e,t.b,null,!1,null,!1),this.a=new Uv(n,0)}function sx(t){return!!t.a&&(!Rm(t.c.b,t.a.b)||(t.a=null,!1))}function ux(t){if(!t)throw new xo((oi(),"no calls to next() since the last call to remove()"))}function cx(){cx=r,QM={boolean:es,number:yo,string:wo,object:UC,function:UC,undefined:yr}}function lx(){lx=r,QG=Ev(_x(Oo(SD,1),CP,59,0,[(b_(),gD),vD])),JG=Ev(_x(Oo(SD,1),CP,59,0,[yD,pD]))}function fx(t){var e,n,r;for(Dg(),r=0,n=t.mb();n.G();)r+=null!=(e=n.H())?V_(e):0,r|=0;return r}function hx(t){var e;for(e=new $n(t.a.b);e.a0;r--)n|=BE(t,e,r-1,r);return n}function gx(t,e){var n,r,i;for(n=!1,r=t.d[e].length,i=0;i1&&(yb(e,t.b),function(t,e){var n,r,i,o,a,s,u,c,l;for(i=new je,u=new $n(e);u.ae?1:t==e?0:isNaN(t)?isNaN(e)?0:1:-1}function Cx(t){switch(t.Y()){case 0:return OM;case 1:return new Gd(t.mb().H());default:return new ib(t)}}function Tx(){var t,e;Tx=r,e=!(Error.stackTraceLimit||"stack"in new Error),t=new ye,UL=e?new s:t}function Ax(){Ax=r,IG=new Lh("intCoordinates",(Hd(),Hd(),gX)),jG=new sd("jsonObject"),MG=new Za(0,0)}function Nx(){Nx=r,BH=new Ns("MIRROR_X",0),GH=new Ns("TRANSPOSE",1),RH=new Ns("MIRROR_AND_TRANSPOSE",2)}function Ox(){Ox=r,_V=new gu(SI,0),xV=new gu("INCOMING_ONLY",1),EV=new gu("OUTGOING_ONLY",2)}function Lx(){return pL(),_x(Oo(oV,1),CP,60,0,[RY,jY,IY,HY,GY,iV,rV,BY,MY,DY,FY,eV,nV])}function Px(){var t,e,n,i;for(Px=r,ZF=new yE(oV),n=0,i=(e=Lx()).length;n0)return t(e,n,r.g);if(0!=i)return p_(p_(n.ac(r.g),n._b(r)),t(e,n,r.e));switch(e.b.f.e){case 0:return p_(n._b(r),n.ac(r.g));case 1:return n.ac(r.g);default:throw new xr}}(t,e,n))),r}function Dx(t,e,n){var r,i;return r=new Yy(e,n),i=new be,t.b=function t(e,n,r,i){var o,a;if(!n)return r;if(0==(o=e.a.$b(r.d,n.d)))return i.d=vh(n,r.e),i.b=!0,n;a=o<0?0:1,n.a[a]=t(e,n.a[a],r,i),Yo(n.a[a])&&(Yo(n.a[1-a])?(n.b=!0,n.a[0].b=!1,n.a[1].b=!1):Yo(n.a[a].a[a])?n=gm(n,1-a):Yo(n.a[a].a[1-a])&&(n=Kv(n,1-a)));return n}(t,t.b,r,i),i.b||++t.c,t.b.b=!1,i.d}function Rx(t,e,n){var r,i;for(r=new so,i=_k(n,0);i.b!=i.d.c;)Nh(r,new Uu(Gh(Cb(i),10)));!function(t,e,n){var r,i,o,a;for(Md(n),a=!1,o=_k(t,e),i=_k(n,0);i.b!=i.d.c;)r=Cb(i),wp(o,r),a=!0}(t,e,r)}function Bx(t,e){var n;return e===t||!!fl(e,144)&&(n=Gh(e,144),t.P().t(n.P()))}function Gx(t){var e;if((e=t.a.c.length)>0)return Hh(e-1,t.a.c.length),gy(t.a,e-1);throw new mi}function Hx(t){t.b.c.length-t.e.c.length<0?(Hf(t,(uL(),yB)),t.a.a=t.j.a):(Hf(t,(uL(),BB)),t.a.a=0)}function Fx(t,e){Id(t>=0,"Negative initial capacity"),Id(e>=0,"Non-positive load factor"),by(this)}function zx(t){var e;this.e=t,this.d=new Qb(this.e.e),this.a=this.d,this.b=Qm(this),e=t[tM],this[tM]=e}function Yx(){this.n=null,this.j=null,this.i=null,this.d=null,this.b=null,this.k=null,this.a=null}function Vx(t){var e,n,r,i;for(i=1,n=0,r=t.length;n=48&&t<58?t-48:t>=97&&t<97?t-97+10:t>=65&&t<65?t-65+10:-1}function d_(t){switch(ch(),t.Y()){case 0:return Jp(),GM;case 1:return new ua(t.mb().H());default:return new Ws(t)}}function p_(t,e){var n;return Vl(t)&&Vl(e)&&lI<(n=t+e)&&n>22),i=t.h+e.h+(r>>22),Sh(n&aI,r&aI,i&sI)}(Vl(t)?Xm(t):t,Vl(e)?Xm(e):e))}function g_(t,e){var n;return Vl(t)&&Vl(e)&&lI<(n=t*e)&&n>13|(15&t.m)<<9,i=t.m>>4&8191,o=t.m>>17|(255&t.h)<<5,a=(1048320&t.h)>>8,s=8191&e.l,u=e.l>>13|(15&e.m)<<9,c=e.m>>4&8191,l=e.m>>17|(255&e.h)<<5,f=(1048320&e.h)>>8,v=r*s,b=i*s,y=o*s,w=a*s,0!=u&&(v+=n*u,b+=r*u,y+=i*u,w+=o*u);0!=c&&(b+=n*c,y+=r*c,w+=i*c);0!=l&&(y+=n*l,w+=r*l);return 0!=f&&(w+=n*f),d=((g=n*s)>>22)+(v>>9)+((262143&b)<<4)+((31&y)<<17),p=(b>>18)+(y>>5)+((4095&w)<<8),p+=(d+=(h=(g&aI)+((511&v)<<13))>>22)>>22,Sh(h&=aI,d&=aI,p&=sI)}(Vl(t)?Xm(t):t,Vl(e)?Xm(e):e))}function v_(t,e){var n;return Vl(t)&&Vl(e)&&lI<(n=t-e)&&n>22),i=t.h-e.h+(r>>22),Sh(n&aI,r&aI,i&sI)}(Vl(t)?Xm(t):t,Vl(e)?Xm(e):e))}function b_(){b_=r,bD=new as(kI,0),vD=new as(xI,1),gD=new as(mI,2),pD=new as("DOWN",3),yD=new as("UP",4)}function y_(){y_=r,OD=new us(kI,0),AD=new us("POLYLINE",1),TD=new us("ORTHOGONAL",2),ND=new us("SPLINES",3)}function w_(){w_=r,zD=new ls("INHERIT",0),FD=new ls("INCLUDE_CHILDREN",1),YD=new ls("SEPARATE_CHILDREN",2)}function m_(t){this.a=new Oc,this.d=new Oc,this.b=new Oc,this.c=new Oc,this.g=new Oc,this.i=new Oc,this.f=t}function x_(t,e,n,r,i,o){this.e=new je,this.f=(tm(),kU),Oh(this.e,t),this.d=e,this.a=n,this.b=r,this.f=i,this.c=o}function __(t,e,n,r,i){var o,a;for(a=t.mb();a.G();)(o=Gh(a.H(),33)).i.a=e.a,o.i.b=i?e.b:e.b+r.b-o.j.b,e.a+=o.j.a+n}function E_(t,e){var n,r;for(jh(),r=Sp(NS(t));X_(r);)if((n=Gh(xv(r),12)).d.f==e||n.c.f==e)return n;return null}function k_(t,e,n){var r,i,o;for(r=0,o=_k(t,0);o.b!=o.d.c&&!((i=no(Nf(Cb(o))))>n);)i>=e&&++r;return r}function S_(t,e){var n;return e?((n=e.n?e.n:(Dg(),Dg(),SX)).V()||(t.n?mm(t.n,n):t.n=new sc(n)),t):t}function C_(t,e,n){try{!function(t,e,n){if(Od(e),n.G())for(Ju(e,t.C(n.H()));n.G();)Ju(e,t.c),Ju(e,t.C(n.H()))}(t,e,n)}catch(t){throw fl(t=Qx(t),181)?new aw(t):A_(t)}return e}function T_(t,e,n){try{!function(t,e,n){var r,i;if(Od(e),n.G())for(i=Gh(n.H(),21),Ju(e,El(t.a,i.yb())),Ju(e,t.b),Ju(e,El(t.a,i.zb()));n.G();)Ju(e,t.a.c),r=Gh(n.H(),21),Ju(e,El(t.a,r.yb())),Ju(e,t.b),Ju(e,El(t.a,r.zb()))}(t,e,n)}catch(t){throw fl(t=Qx(t),181)?new aw(t):A_(t)}return e}function A_(t){var e;return fl(t,164)&&Xu((e=Gh(t,164)).b)!==Xu((ii(),qL))?Xu(e.b)===Xu(qL)?null:e.b:t}function N_(t,e){var n;for(n=Gh(yx(Vp(t),(DL(),Zq)),9);n;){if(n==e)return!0;n=Gh(yx(Vp(n),Zq),9)}return!1}function O_(t){switch(Gh(yx(t,(DL(),Bq)),140).e){case 1:$y(t,Bq,(Mw(),sq));break;case 2:$y(t,Bq,(Mw(),cq))}}function L_(t){switch(ch(),t.c){case 0:return Jp(),GM;case 1:return new ua(CC(new Ys(t)));default:return new Oi(t)}}function P_(t){var e,n;for(Qp(),e=0,n=t.length;e0&&e.c0&&0!=e.e&&t(e.g,n/e.j*e.g.d))}(t,t.j-t.c),t.b=!0)}function M_(t,e){var n,r;for(r=new $n(e);r.a-129&&t<128?(e=t+128,!(n=(Fd(),mX)[e])&&(n=mX[e]=new Ln(t)),n):new Ln(t)}function z_(t){var e,n;for(e=wS(t.b,t.d),n=iP;n>e;){if(tx(t,t.d),0==e){n=0;break}Q_(t),vE(t),n=e,e=wS(t.b,t.d)}t.c=n}function Y_(){var t,e,n;qS(),n=IX+++(Date.now?Date.now():(new Date).getTime()),t=pv(Math.floor(n*Rj))&sM,e=pv(n-t*aM),this.a=1502^t,this.b=e^oM}function V_(t){return Sl(t)?ak(t):kl(t)?pv((Md(t),t)):gf(t)?eo((Md(t),t))?1231:1237:Vd(t)?t.v():(_d(t),ff(t))}function q_(t,e,n,r){var i,o,a;for(a=0,o=sA(new Yf(e,r));o.G();)i=Gh(o.H(),7),dg(t.i,i,F_(a++));dg(n,e,F_(a))}function U_(t){var e;return(e=Gh(yx(t,(HL(),eR)),59))==(b_(),bD)?Gh(yx(t,(DL(),gq)),15).a>=1?vD:pD:e}function X_(t){if(Od(t.b),t.b.G())return!0;for(;t.a.G();)if(Od(t.b=t.Wb(t.a.H())),t.b.G())return!0;return!1}function W_(t){return t.d==t.c.d&&t.i==t.g.d||(t.a.c=Ey(fM,kP,1,0,4,1),Jm(t.a,t.c),Jm(t.a,t.g),t.d=t.c.d,t.i=t.g.d),t.a}function $_(t){var e;if(t.b){if($_(t.b),t.b.d!=t.c)throw new wi}else t.d.V()&&(e=Gh(Up(t.f.b,t.e),19))&&(t.d=e)}function K_(t,e,n,r,i){var o,a,s,u;for(xx(e,u=sy(t),r,i,n),o=0,s=new $n(u);s.ae){$v(n);break}}wp(n,e)}function tE(t,e,n){var r;return r=Ea(t.a,e),function(t,e,n){t.set(e,n)}(t.a,e,void 0===n?null:n),void 0===r?(++t.c,th(t.b)):++t.d,r}function eE(t,e,n){return(e-t<=0?0-(e-t):e-t)Cj?t-n>Cj:n-t>Cj)}function nE(t){switch(t.e){case 0:return SV;case 1:return CV;case 2:return TV;case 3:return AV;default:return NV}}function rE(t,e){switch(e.e){case 2:return t.b;case 1:return t.c;case 4:return t.d;case 3:return t.a;default:return!1}}function iE(t){switch(uL(),t.e){case 4:return wB;case 1:return yB;case 3:return DB;case 2:return BB;default:return RB}}function oE(t,e){if(e==t.c)return t.d;if(e==t.d)return t.c;throw new io("Node "+e+" not part of edge "+t)}function aE(t,e){var n;return ql(t.a,e)?Gh(ql(t.a,e)?t.b[e.e]:null,62):(n=new Gr,pm(t.a,e),Ep(t,e.e,n),n)}function sE(t,e){var n,r,i;for(i=t.g.tb(),n=0;i.G();){if((r=no(Nf(i.H()))-e)>$j)return n;r>Kj&&++n}return n}function uE(t){var e,n,r,i;return pm(n=new qh(e=Gh(na((i=(r=t.$c).f)==EM?r:i),11),Gh(_p(e,e.length),11),0),t),n}function cE(t,e){var n,r;for(r=new $n(e);r.a %s",_x(Oo(fM,1),kP,1,4,[F_(e),F_(n)])),tS(e,n=n<(r=t.length)?n:r,r),n-e}function gE(t,e){var n,r,i;for(n=t,i=0;;){if(n==e)return i;if(!(r=Gh(yx(n,(DL(),Zq)),9)))throw new Vr;n=Vp(r),++i}}function vE(t){var e,n,r;for(r=!1,n=t.d.length-1;n>=0;n--)t.j=(e=new sC(t.e,t.d,n,1),new OS(n,t.d,e)),r|=Xw(t,n);return r}function bE(t){this.f=(ml(),new _r),this.n=new _r,this.k=new _r,this.g=new Qi,this.i=new rk((si(),RM)),this.j=t,function(t,e){var n,r,i,o,a;for(n=0,a=0,i=0,o=e.length;i0?t-e:-(t-e))<=iI||t==e||isNaN(t)&&isNaN(e)?0:te?1:vc(isNaN(t),isNaN(e)))>0}function AE(t,e){return To(),To(),((t-e>0?t-e:-(t-e))<=iI||t==e||isNaN(t)&&isNaN(e)?0:te?1:vc(isNaN(t),isNaN(e)))<0}function NE(t){var e,n;for(t.d||function(t){var e,n,r,i,o,a;if(i=t.g.tb(),r=t.b.tb(),t.e)for(n=0;n$j;){for(o=e,a=0;(e-o<=0?0-(e-o):e-o)<$j;)++a,e=no(Nf(i.H())),r.H();ai}(t.j,n,r)&&(Xi(t.j,t.d[e][n],t.d[e][r]),a=(o=t.d[e])[r],o[r]=o[n],o[n]=a,i=!0),i}function GE(t,e,n){var r,i,o,a,s;i=(s=Vp(t)).a,r=Gh(yx(s,(DL(),xq)),15).a,o=s.d,a=t.i,e&&(a.a=a.a-i.b-r-o.a),n&&(a.b=a.b-i.d-r-o.b)}function HE(t,e){var n,r,i;for(r=Sp(NS(t));X_(r);)return n=Gh(xv(r),12),new Be(Od((i=Gh(e.B(n),9)).i.b+i.j.b/2));return ai(),ai(),gM}function FE(t){var e,n,r,i;for(n=rO(t),e=Ej,i=0,r=0;e>.5&&i<50;)e=ka(BS(n,r=nA(n),!0).b),++i;return BS(t,r,!1)}function zE(t){var e,n,r,i;for(n=rO(t),e=Ej,i=0,r=0;e>.5&&i<50;)e=ka(BS(n,r=eA(n),!0).a),++i;return BS(t,r,!1)}function YE(t){var e,n,r;for(this.a=new Oc,this.e=new Qi,this.f=0,n=0,r=t.length;n0),e.a.sb(e.c=--e.b))}function ZE(t,e,n){jE(n,"Compound graph preprocessor",1),t.a=new Us,function t(e,n,r){var i,o,a,s,u,c,l,f,h;for(o=new je,l=new $n(n.b);l.a0)for(yb(r=new hh(Gh(GS(t.a,o),18)),new an(e)),i=new Uv(o.b,0);i.b=t.b>>1)for(r=t.c,n=t.b;n>e;--n)r=r.b;else for(r=t.a.a,n=0;n0&&(i.b+=e),i}function kk(t,e){var n,r,i;for(i=new ao,r=t.mb();r.G();)KA(n=Gh(r.H(),55),0,i.b),i.b+=n.e.b+e,i.a=Ro(i.a,n.e.a);return i.a>0&&(i.a+=e),i}function Sk(t,e,n){var r,i,o;return(i=Gh(Up(t.c,e),176))?(o=vh(i,n),Gl(t,i),o):(r=new nd(t,e,n),dg(t.c,e,r),kv(r),null)}function Ck(t,e){return!!function(t){switch(t.e){case 0:return UY;case 1:return YY;case 2:return zY;case 3:return $Y;case 4:return WY;case 5:return tV;case 6:return JY;case 7:return XY;case 8:return VY;case 9:return qY;case 11:return ZY;case 10:return KY;default:return QY}}(t.b).kb(e.c)&&(function(t){return t==BY||t==MY}(t.b)?!(Yh(e.d,t.c,t.a)&&Yh(e.a,t.c,t.a)):Yh(e.d,t.c,t.a)&&Yh(e.a,t.c,t.a))}function Tk(t){switch(t.e){case 8:return uL(),wB;case 9:return uL(),DB;case 10:return uL(),yB;case 11:return uL(),BB;default:return uL(),RB}}function Ak(t,e){return Sl(t)?!!$L[e]:t._c?!!t._c[e]:kl(t)?!!WL[e]:!!gf(t)&&!!XL[e]}function Nk(){Ax(),this.i=(ml(),new _r),this.a=new _r,this.k=new _r,this.j=new _r,this.b=new _r,this.n=new _r,this.f=new _r,this.e=new _r}function Ok(t,e){var n,r;e.a.R(t)||(r=Gh(yx(t,(DL(),Iq)),32),n=Gh(ld(t.f,0),7),r==(uL(),wB)?Hf(n,DB):r==DB&&Hf(n,wB),e.a.db(t,e))}function Lk(t){return Go(1,Gh(yx(t,(DL(),nU)),24).a)*(t.c.f.g==(AS(),SH)&&t.d.f.g==SH?1:t.c.f.g==SH||t.d.f.g==SH?2:8)}function Pk(t){var e,n,r,i;for(i=Gh(yx(t,(DL(),Uq)),7),n=0,r=(e=Gh(Dk(t.b,Ey(wH,hj,12,t.b.c.length,0,1)),47)).length;ne&&r.$b(t[o-1],t[o])>0;--o)a=t[o],Mp(t,o,t[o-1]),Mp(t,o-1,a)}(n,r,i,a);if(t(n,e,u=r+o,c=u+((s=i+o)-u>>1),-o,a),t(n,e,c,s,-o,a),a.$b(e[c-1],e[c])<=0){for(;r=r||er&&Mp(e,r,null),e}function Rk(t,e){var n,r;for(r=t.a.length,e.lengthr&&Mp(e,r,null),e}function Bk(t){return Sl(t)?t:kl(t)?Sa((Md(t),t)):gf(t)?vl(eo((Md(t),t))):Vd(t)?t.w():_d(t)?lv(t):t.toString?t.toString():"[JavaScriptObject]"}function Gk(){Gk=r,nY=new ou("SIMPLE",0),Jz=new ou(Lj,1),tY=new ou("LINEAR_SEGMENTS",2),Qz=new ou("BRANDES_KOEPF",3),eY=new ou(Mj,4)}function Hk(){Hk=r,wU=new xu(SI,0),gU=new xu("FIRST",1),vU=new xu("FIRST_SEPARATE",2),bU=new xu("LAST",3),yU=new xu("LAST_SEPARATE",4)}function Fk(){Fk=r,NY=new ue,TY=pd(new Z_,(ML(),sF)),AY=fd(pd(new Z_,kF),EF),SY=fd(gd(pd(dd(new Z_,lF),hF),pF),fF),CY=fd(gd(new Z_,pF),ZH)}function zk(t){var e,n,r;for(n=new Yn(new zn(t.d.a).a.bb().mb());n.a.G();)r=Gh(n.a.H(),21),Oh((e=Gh(r.yb(),12)).c.e,e),Oh(e.d.b,e)}function Yk(t,e){var n,r;if(Tc(e>0),(e&-e)==e)return pv(e*mT(t,31)*4.656612873077393e-10);do{r=(n=mT(t,31))%e}while(n-r+(e-1)<0);return pv(r)}function Vk(t,e){if(t.c.f==e)return t.d.f;if(t.d.f==e)return t.c.f;throw new io("Node "+e+" is neither source nor target of edge "+t)}function qk(t,e,n){return Tc(t>=0&&t<=1114111),t>=aP?(e[n++]=55296+(t-aP>>10&1023)&sP,e[n]=56320+(t-aP&1023)&sP,2):(e[n]=t&sP,1)}function Uk(t){var e,n;if(!t.a)for(t.a=Al(Gh(t.e,9).c.c.length),n=new $n(Gh(t.e,9).c);n.ai&&Mp(e,i,null),e}function Jk(t,e,n){if(n&&(e<0||e>n.a.c.length))throw new io("index must be >= 0 and <= layer node count");t.d&&Dy(t.d.a,t),t.d=n,n&&Td(n.a,e,t)}function tS(t,e,n){if(t<0)throw new ro(gP+t+" < 0");if(e>n)throw new ro("toIndex: "+e+" > size "+n);if(t>e)throw new io(gP+t+" > toIndex: "+e)}function eS(t,e){var n,r,i;return n=e.yb(),i=e.zb(),r=t.cb(n),!!(Xu(i)===Xu(r)||null!=i&&e_(i,r))&&!(null==r&&!t.R(n))}function nS(t,e,n){var r;(r=e.c.f).g==(AS(),kH)?($y(t,(DL(),zq),Gh(yx(r,zq),7)),$y(t,Yq,Gh(yx(r,Yq),7))):($y(t,(DL(),zq),e.c),$y(t,Yq,n.d))}function rS(t,e){var n,r=new Array(e);switch(t){case 11:case 12:n=0;break;case 13:n=!1;break;default:return r}for(var i=0;ir&&t.charCodeAt(e-1)<=32;)--e;return r>0||e>19)!=(s=e.h>>19)?s-a:(r=t.h)!=(o=e.h)?r-o:(n=t.m)!=(i=e.m)?n-i:t.l-e.l}function dS(t){var e,n,r;for(n=new Yn(new zn(t.p.a).a.bb().mb());n.a.G();)if(r=Gh(n.a.H(),21),(e=Gh(r.yb(),89)).e&&t.b[e.b]<0)return e;return null}function pS(t,e){var n,r,i,o,a;r=Ho(t.d,e.d),o=Ho(t.e,e.e),(i=Ro(t.d+t.c,e.d+e.c))0?e.g?t(e.g,n,r):0:e.c}(n,t.d,e):0}catch(t){if(fl(t=Qx(t),119))return 0;if(fl(t,76))return 0;throw A_(t)}}function _S(t,e){var n,r,i,o;for(i=0;i=e.length)throw new ro("Greedy SwitchDecider: Free layer layer not in graph.");this.b=e[t],this.c=new Wf(this.b),this.d=new Hm(this.b)}function LS(t,e){var n;if(this.f=t,this.b=this.f.c,Tb(e,n=t.d),e>=(n/2|0))for(this.e=t.e,this.d=n;e++0;)tb(this);this.a=null}function PS(t){var e,n,r;for(n=new $n(t.a.b);n.a0&&(t.g=KS(t.g)),$S(t);case 2:return bc(t.e)<0&&(t.e=$S(t.e)),KS(t);default:return t.d=1+Go(Ri(t.e),Ri(t.g)),t}}function FS(t,e){this.f=(ml(),new _r),this.b=new _r,this.j=new _r,this.a=t,this.c=e,this.c>0&&WC(this,this.c-1,(uL(),yB)),this.c0&&0==o[0]&&++e.a,e.j=p_(e.j,i-o[0]),HS(e)):(o[0]=0,i>0?ym(e,r,i):e);if(a>0)return(u=e.g)?(e.g=t(u,n,r,i,o),0==i&&0!=o[0]?--e.a:i>0&&0==o[0]&&++e.a,e.j=p_(e.j,i-o[0]),HS(e)):(o[0]=0,i>0?bm(e,r,i):e);if(o[0]=e.c,0==i)return MT(e);return e.j=p_(e.j,i-e.c),e.c=i,e}(o,t.d,e,n,i),Pd(t.c,o,r),i[0]):(n>0&&eT(t,e,n),0):(Fu(0==n),0)}function VS(t,e){var n,r,i,o,a;for(i=Gh(yx(e,(DL(),sU)),15).a*Gh(yx(e,(RL(),DU)),15).a,a=t[0].i.a+t[0].j.a,o=1;o=0;e--)PX[e]=i,i*=.5;for(n=1,t=24;t>=0;t--)LX[t]=n,n*=.5}function US(t){for(;0!=t.g.c&&0!=t.d.c;)Fl(t.g).c>Fl(t.d).c?(t.i+=t.g.c,DE(t.d)):Fl(t.d).c>Fl(t.g).c?(t.e+=t.d.c,DE(t.g)):(t.i+=Jh(t.g),t.e+=Jh(t.d),DE(t.g),DE(t.d))}function XS(t){var e,n,r,i;for(i=new Uo("["),e=!1,r=t.mb();r.G();)n=r.H(),e?i.a+=", ":e=!0,ec(i,n===t?"(this Collection)":(oi(),null==n?tP:Bk(n)));return i.a+="]",i.a}function WS(t){var e,n,r,i;for(i=new Uo("{"),e=!1,r=t.bb().mb();r.G();)n=Gh(r.H(),21),e?i.a+=", ":e=!0,ec(i,db(t,n.yb())),i.a+="=",ec(i,db(t,n.zb()));return i.a+="}",i.a}function $S(t){var e;return zu(!!t.g),e=t.g,t.g=e.e,e.e=t,e.j=t.j,e.a=t.a,t.a=1+Di(t.e)+Di(t.g),t.j=p_(p_(t.c,Bi(t.e)),Bi(t.g)),t.d=1+Go(Ri(t.e),Ri(t.g)),e.d=1+Go(Ri(e.e),Ri(e.g)),e}function KS(t){var e;return zu(!!t.e),e=t.e,t.e=e.g,e.g=t,e.j=t.j,e.a=t.a,t.a=1+Di(t.e)+Di(t.g),t.j=p_(p_(t.c,Bi(t.e)),Bi(t.g)),t.d=1+Go(Ri(t.e),Ri(t.g)),e.d=1+Go(Ri(e.e),Ri(e.g)),e}function ZS(t){var e;hl(new $n(iS(t.e)))&&((e=Gh(hE(t.e,(HL(),AR)),28))==(cS(),aB)?function(t){var e,n,r,i,o;for(e=t.e.j,r=new $n(iS(t));r.a=aP?(e=55296+(t-aP>>10&1023)&sP,n=56320+(t-aP&1023)&sP,String.fromCharCode(e)+""+String.fromCharCode(n)):String.fromCharCode(t&sP)}function vC(t,e,n,r){var i;Oh(t.c,new pg(t,n,r,Gh(Up(t.k,n),24).a)),Fp(r)&&(e==t.e?r.d.f!=t.a&&r.c.f!=t.a:r.d.f!=t.e&&r.c.f!=t.e)&&(i=n==r.c?r.d:r.c,Oh(t.c,new pg(t,i,r,Gh(Up(t.k,i),24).a)))}function bC(t,e){var n,r,i;if(e===t)return!0;if(!fl(e,57))return!1;if(i=Gh(e,57),t.Y()!=i.Y())return!1;for(r=i.bb().mb();r.G();)if(n=Gh(r.H(),21),!t._(n))return!1;return!0}function yC(t,e){var n,r,i;return S_(r=new wk(t),e),$y(r,(DL(),Pq),e),$y(r,(HL(),AR),(cS(),aB)),$y(r,WD,(ok(),cD)),lr(r,(AS(),_H)),tv(n=new bS,r),Hf(n,(uL(),BB)),tv(i=new bS,r),Hf(i,yB),r}function wC(t,e){var n,r,i;for(i=iP,r=new $n(W_(e));r.a0&&EC(t,o,n));e.k=0}function kC(t,e){if(0>e)throw new io("Top must be smaller or equal to bottom.");if(0>t)throw new io("Left must be smaller or equal to right.");this.d=0,this.c=t,this.a=e,this.b=0}function SC(t){var e,n,r;if(0==t.length)throw new io(Zj);for(n=0,r=t.length;n1)throw new io("In straight hyperEdges there may be only one edge.");Nh((i=new zn(n.a).a.bb().mb(),r=Gh(new Yn(i).a.H(),21),Gh(r.yb(),12)).a,new Za(e,t.b))}function HC(t,e,n){var r,i;if(this.f=t,Tb(n,i=(r=Gh(Up(t.b,e),126))?r.a:0),n>=(i/2|0))for(this.e=r?r.c:null,this.d=i;n++0;)Lv(this);this.b=e,this.a=null}function FC(e,n){"undefined"===rP?(void 0)(n):((typeof document!==jI||typeof t===KL&&t.exports)&&ZX(e(n)),typeof document===jI&&typeof self!==jI&&self.postMessage(n))}function zC(t,e){var n,r,i,o;"x"in t.a&&(i=Gh(_g(t,"x"),104),e.i.a=i.a),"y"in t.a&&(o=Gh(_g(t,"y"),104),e.i.b=o.a),FI in t.a&&(r=Gh(_g(t,FI),104),e.j.a=r.a),zI in t.a&&(n=Gh(_g(t,zI),104),e.j.b=n.a)}function YC(t,e,n){var r;yy(this),e==(av(),fV)?mp(this.g,t.c):mp(this.o,t.c),mp(n==fV?this.g:this.o,t.d),mp(this.c,t),nk(this,Iv(t.c).b,r=Iv(t.d).b,r),this.f=function(t,e){return ES(),(t-e<=0?0-(t-e):t-e)<.2}(Iv(t.c).b,Iv(t.d).b)}function VC(t,e,n){var r,i,o,a,s;for(Dg(),s=new sw((a=new $o(Gh(ld(e.a,n),18))).b.Y()),i=new tr(a.b.mb());i.b.G();)r=Gh(i.b.H(),37),(o=Gh(Up(t.a,r),31))||(o=AL(r),dg(t.a,r,o)),s.c[s.c.length]=o;return s}function qC(t){var e,n;if(zs(Gh(yx(t,(HL(),AR)),28)))for(n=new $n(t.f);n.a upperEndpoint (%s)",_x(Oo(fM,1),kP,1,4,[e,n])))}((s=t.$b(n,o))<=0,n,o),0==s&&Fu(r!=(Vc(),TM)|a!=TM))}function tT(t){if(this.a=t,t.c.f.g==(AS(),_H))this.c=t.c,this.d=Gh(yx(t.c.f,(DL(),Iq)),32);else{if(t.d.f.g!=_H)throw new io("Edge "+t+" is not an external edge.");this.c=t.d,this.d=Gh(yx(t.d.f,(DL(),Iq)),32)}}function eT(t,e,n){var r,i,o,a;return kw(n,eI),0==n?xS(t,e):(Fu(lf(t.b,e)),(a=t.c.a)?(o=Ey(UX,nI,26,1,12,1),r=function t(e,n,r,i,o){var a,s,u,c;if((a=n.$b(r,e.b))<0)return(u=e.e)?(s=u.d,e.e=t(u,n,r,i,o),0==o[0]&&++e.a,e.j=p_(e.j,i),e.e.d==s?e:HS(e)):(o[0]=0,ym(e,r,i));if(a>0)return(c=e.g)?(s=c.d,e.g=t(c,n,r,i,o),0==o[0]&&++e.a,e.j=p_(e.j,i),e.g.d==s?e:HS(e)):(o[0]=0,bm(e,r,i));return o[0]=e.c,Fu(Zx(p_(e.c,i),iP)<=0),e.c+=i,e.j=p_(e.j,i),e}(a,t.d,e,n,o),Pd(t.c,a,r),o[0]):(t.d.$b(e,e),i=new _m(e,n),kf(t.a,i,t.a),Pd(t.c,null,i),0))}function nT(t,e,n){var r,i,o,a,s;for(r=0,s=n,e||(r=n*(t.c.length-1),s*=-1),o=new $n(t);o.a0&&((!ns(t.b.d)||!r.q.d)&&(!rs(t.b.d)||!r.q.b)&&(r.j.e-=0>o/2-.5?0:o/2-.5),(!ns(t.b.d)||!r.q.a)&&(!rs(t.b.d)||!r.q.c)&&(r.j.b+=0>o-1?0:o-1))}(t,e,n),o=new je,i=new $n(t.b.a.b);i.a0&&((!ns(t.b.d)||!r.q.d)&&(!rs(t.b.d)||!r.q.b)&&(r.j.e+=0>o/2-.5?0:o/2-.5),(!ns(t.b.d)||!r.q.a)&&(!rs(t.b.d)||!r.q.c)&&(r.j.b-=o-1))}(t,e,n)}function oT(t,e){var n,r,i,o;for(t.c[e.k]=!0,Oh(t.a,e),o=new $n(e.f);o.a(a=s+no(t.b[t.f[i.k].k]))?n:a;return n-r}function hT(t){var e;return Wy(e=new Yi,"type",new Ld((Gf(WG),WG.n))),Wy(e,MI,new Ld(t.f)),t.b&&Wy(e,"value",t.b),t.a&&Wy(e,"context",t.a),Wy(e,DI,new Ld(_l(new oo("\n"),new Fn(new Kn((null==t.g&&(t.g=bd(t)),t.g)))))),e}function dT(t,e){var n,r,i,o,a;if(e===t)return!0;if(!fl(e,20))return!1;if(a=Gh(e,20),t.Y()!=a.Y())return!1;for(o=a.mb(),r=t.mb();r.G();)if(n=r.H(),i=o.H(),!(Xu(n)===Xu(i)||null!=n&&e_(n,i)))return!1;return!0}function pT(t){var e;!YM&&((e=["\\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]='\\"',e[92]="\\\\",e[173]="\\u00ad",e[1536]="\\u0600",e[1537]="\\u0601",e[1538]="\\u0602",e[1539]="\\u0603",e[1757]="\\u06dd",e[1807]="\\u070f",e[6068]="\\u17b4",e[6069]="\\u17b5",e[8203]="\\u200b",e[8204]="\\u200c",e[8205]="\\u200d",e[8206]="\\u200e",e[8207]="\\u200f",e[8232]="\\u2028",e[8233]="\\u2029",e[8234]="\\u202a",e[8235]="\\u202b",e[8236]="\\u202c",e[8237]="\\u202d",e[8238]="\\u202e",e[8288]="\\u2060",e[8289]="\\u2061",e[8290]="\\u2062",e[8291]="\\u2063",e[8292]="\\u2064",e[8298]="\\u206a",e[8299]="\\u206b",e[8300]="\\u206c",e[8301]="\\u206d",e[8302]="\\u206e",e[8303]="\\u206f",e[65279]="\\ufeff",e[65529]="\\ufff9",e[65530]="\\ufffa",e[65531]="\\ufffb",YM=e);return'"'+t.replace(/[\x00-\x1f\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u2028-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb"\\]/g,(function(t){return function(t,e){var n=YM[t.charCodeAt(0)];return null==n?t:n}(t)}))+'"'}function gT(t,e){var n,r,i,o,a;for(r=new Yn(new zn((1==e?JG:QG).a).a.bb().mb());r.a.G();)for(i=Gh(r.a.H(),21),n=Gh(i.yb(),59),a=Gh(GS(t.f.c,n),18).mb();a.G();)o=Gh(a.H(),27),Dy(t.b.b,o.b),Dy(t.b.a,Gh(o.b,25).f)}function vT(t,e){Mb.call(this),this.d=new Qi,this.b=Gh(yx(e,(DL(),sU)),15).a*Gh(yx(e,(RL(),DU)),15).a,this.e=this.b*Gh(yx(e,KU),15).a,this.a=new Br,this.c=new Br,this.j=new gg(t.j,t.k,0,t.n-t.k),this.o=t.g,this.g.a=t.i,cO(this,t)}function bT(t,e){var n,r,i,o,a;for(o=null==e?0:t.b.Vc(e),r=null==(n=_a(t.a,o))?[]:n,a=0;a=2147483648&&(r-=4294967296),r)}function xT(t,e,n){var r,i,o;if(e!=n){r=e;do{Lf(t,r.d),(o=Gh(yx(r,(DL(),Zq)),9))&&(jl(t,(i=r.a).b,i.d),Lf(t,o.i),r=Vp(o))}while(o);r=n;do{Pf(t,r.d),(o=Gh(yx(r,(DL(),Zq)),9))&&(Ml(t,(i=r.a).b,i.d),Pf(t,o.i),r=Vp(o))}while(o)}}function _T(t,e){var n,r,i,o,a;for(n=new je,a=new Zs,i=new Yn(new zn(t.a).a.bb().mb());i.a.G();)o=Gh(i.a.H(),21),hN(a,(r=Gh(o.yb(),12)).c,r,null),hN(a,r.d,r,null);for(;a.a;)Oh(n,NN(a,e,Yl(Gh(yx(e,(HL(),AR)),28))));return n}function ET(t,e){var n,r,i,o,a;for(r=new Yn(new zn((1==e?JG:QG).a).a.bb().mb());r.a.G();)for(i=Gh(r.a.H(),21),n=Gh(i.yb(),59),a=Gh(GS(t.f.c,n),18).mb();a.G();)o=Gh(a.H(),27),Oh(t.b.b,Gh(o.b,25)),Oh(t.b.a,Gh(o.b,25).f)}function kT(t){var e,n,r,i,o,a;for(jh(),ml(),n=new ey,r=new $n(t.e.c);r.a0&&i0):i<0&&-i0)}function AT(t,e,n,r,i){var o,a;vm(Gm(_x(Oo(nD,1),RI,10,0,[i.f.i,i.i,i.a])),n)||(e.c==i?Hl(e.a,0,new Uu(n)):Nh(e.a,new Uu(n)),r&&!xa(t.a,n)&&((a=Gh(yx(e,(HL(),fR)),44))||(a=new Br,$y(e,fR,a)),Ob(a,o=new Uu(n),a.c.b,a.c),mp(t.a,o)))}function NT(t){var e,n,r,i,o,a;for(e=0,n=new $n(t.a);n.a((a=Iv(r.d).b)-o<=0?0-(a-o):a-o)?e:a-o<=0?0-(a-o):a-o);return e}function OT(t,e){var n,r,i;if(Xu(e)===Xu(Od(t)))return!0;if(!fl(e,20))return!1;if(r=Gh(e,20),(i=t.Y())!=r.Y())return!1;if(fl(r,63)){for(n=0;n=0)return r;for(i=1,o=new $n(e.f);o.a(a=LT(t,s))+1?i:a+1);return function(t,e,n){var r,i;for(r=(i=t.a.c).c.length;ru-n&&s=t.g.d?((e=t.f).e=function t(e,n){return e.g?(e.g=t(e.g,n),--e.a,e.j=v_(e.j,n.c),HS(e)):e.e}(t.e,e),e.g=t.g,e.a=t.a-1,e.j=v_(t.j,n),HS(e)):((e=t.i).g=function t(e,n){return e.e?(e.e=t(e.e,n),--e.a,e.j=v_(e.j,n.c),HS(e)):e.g}(t.g,e),e.e=t.e,e.a=t.a-1,e.j=v_(t.j,n),HS(e)):t.e:t.g}function DT(t){var e,n,r,i,o,a;for(i=new $n(t.a);i.ao.k?Hf(a,DB):a.g==DB&&o.k>r.k&&Hf(a,wB))}function RT(t,e,n){var r,i,o,a,s,u;for(u=t.b,o=0,i=new $n(t.a.b);i.a0&&(i>=o[0]?(--e.a,e.j=v_(e.j,o[0])):e.j=v_(e.j,i)),0==o[0]?e:HS(e)):(o[0]=0,e);if(a>0)return(u=e.g)?(e.g=t(u,n,r,i,o),o[0]>0&&(i>=o[0]?(--e.a,e.j=v_(e.j,o[0])):e.j=v_(e.j,i)),HS(e)):(o[0]=0,e);return o[0]=e.c,i>=e.c?MT(e):(e.c-=i,e.j=v_(e.j,i),e)}(o,t.d,e,n,i)}catch(t){if(fl(t=Qx(t),119))return 0;if(fl(t,76))return 0;throw A_(t)}return Pd(t.c,o,r),i[0]}function GT(t){var e,n,r,i,o,a;for(nl(a=Gh(Dk(t.a,Ey(TH,qI,9,t.a.c.length,0,1)),51),new rt),n=null,i=0,o=a.length;i.5&&i<50;)e=ka(BS(n,r=eA(n),!0).a),++i;return BS(t,(Md(o=Nf(tk(Rh(t.g),Rh(t.g).b-1))),o-r),!1)}(f);break;case 2:case 4:f.a=w,y=function(t){var e,n,r,i,o;for(n=gN(rO(t)),e=Ej,i=0,r=0;e>.5&&i<50;)e=ka(BS(n,r=nA(n),!0).b),++i;return BS(t,(Md(o=Nf(tk(Rh(t.g),Rh(t.g).b-1))),o-r),!1)}(f);break;default:return null}return fr(f,new SC(_x(Oo(nD,1),RI,10,0,[u,w,y,p,v]))),f}(t.a.c,e,t.a.d,r,Tk(t.b),n),lm(t.a.a,NE(s)),a=QS(t.a.b,s.a,t.b),Ug(i=new Pb((!s.k&&(s.k=new lC(fm(s))),s.k))),a?zp(i,a):i}function qT(t,e){var n,r,i;for(n=new $n(t.b);n.an.a&&(o=Go(o,a.a-n.a-1));return o}function WT(t){var e,n;switch(e=Gh(yx(t,(HL(),vR)),15).a,n=Gh(yx(t,bR),15).a,$y(t,bR,new Gn(e)),$y(t,vR,new Gn(n)),Gh(yx(t,WD),103).e){case 1:$y(t,WD,(ok(),hD));break;case 2:$y(t,WD,(ok(),uD));break;case 3:$y(t,WD,(ok(),lD));break;case 4:$y(t,WD,(ok(),fD))}}function $T(t,e,n){var r,i,o;for(o=new $n(t.e);o.a0&&(r.b.c-=r.c,r.b.c<=0&&r.b.f>0&&Nh(e,r.b));for(i=new $n(t.b);i.a0&&(r.a.f-=r.c,r.a.f<=0&&r.a.c>0&&Nh(n,r.a))}function KT(t,e,n){var r,i,o;for(o=new $n(t.j);o.a0&&(r.b.e-=r.c,r.b.e<=0&&r.b.k>0&&Nh(e,r.b));for(i=new $n(t.d);i.a0&&(r.a.k-=r.c,r.a.k<=0&&r.a.e>0&&Nh(n,r.a))}function ZT(t,e){switch(t.e){case 1:switch(e.e){case 1:return Gj;case 4:return.5;case 3:return Hj;case 2:return Fj}break;case 2:switch(e.e){case 1:return Gj;case 2:return.5;case 3:return Hj;case 4:return Fj}break;default:throw new io(Bj)}return 0}function QT(t,e){var n,r,i,o;for(Nc((o=new Uv(t,0)).b0),o.a.sb(o.c=--o.b),eh(o,i),Nc(o.b1)&&(++o,++a);return!Yl(Gh(yx(n,(HL(),AR)),28))&&s&&(++o,++a),dg(i,n,F_(o)),a}function eA(t){var e,n,r,i,o,a,s,u,c,l;for(c=(l=(s=Gh((a=t.b.mb()).H(),92)).a.a)>$j,u=l$j)&&!u)return hm(s.b);if(i&&u||r&&c)return(e=o/(o-l))*hm(n.b)+(1-e)*hm(s.b)}return 0}function nA(t){var e,n,r,i,o,a,s,u,c,l;for(c=(l=(s=Gh((a=t.b.mb()).H(),92)).a.b)>$j,u=l$j)&&!u)return hm(s.b);if(i&&u||r&&c)return(e=o/(o-l))*hm(n.b)+(1-e)*hm(s.b)}return 0}function rA(t,e,n){var r,i;return r=0,Fp(e)?xa(t.g,e)?(BT(t.i,F_(If(t,e.c)),1),BT(t.i,F_(If(t,e.d)),1),pl(t.g,e),r+=ck(t,e,t.i)):(mp(t.g,e),eT(t.i,F_(If(t,e.c)),1),eT(t.i,F_(If(t,e.d)),1)):(i=xS(t.i,F_(Gh(Up(t.k,n),24).a)),r+=t.g.a.Y()-i),r}function iA(t){switch(t.e){case 0:return BY;case 1:return RY;case 2:return jY;case 3:return IY;case 4:return HY;case 5:return GY;case 6:return iV;case 7:return rV;case 8:return DY;case 9:return MY;case 10:return eV;case 11:return FY;default:return nV}}function oA(t){switch(t.e){case 0:return GY;case 1:return iV;case 2:return rV;case 3:return BY;case 4:return RY;case 5:return jY;case 6:return IY;case 7:return HY;case 8:return DY;case 9:return MY;case 10:return eV;case 11:return FY;default:return nV}}function aA(t){switch(t.e){case 0:return jY;case 1:return IY;case 2:return HY;case 3:return GY;case 4:return iV;case 5:return rV;case 6:return BY;case 7:return RY;case 8:return DY;case 9:return MY;case 10:return eV;case 11:return FY;default:return nV}}function sA(t){var e;switch(e=t.a.f,t.b){case 0:return new $n(t.a.f);case 1:return fp(new Cv(e),mS(t));case 2:switch(t.c.e){case 2:case 1:return fp(new $n(e),mS(t));case 3:case 4:return fp(new Cv(e),mS(t))}}throw new ko("PortOrder not implemented.")}function uA(t,e){var n;t.d&&(e.c!=t.e.c||function(t,e){return Pm(),t==oH&&e==aH||t==oH&&e==sH||t==uH&&e==sH||t==uH&&e==aH}(t.e.b,e.b))&&(Oh(t.f,t.d),t.a=t.d.d+t.d.c,t.d=null,t.e=null),!function(t){return t==oH||t==aH}(e.b)?t.b=e:t.c=e,(e.b==(Pm(),oH)&&!e.a||e.b==aH&&e.a||e.b==sH&&e.a||e.b==uH&&!e.a)&&t.c&&t.b&&(n=new gg(t.a,t.c.d,e.c-t.a,t.b.d-t.c.d),t.d=n,t.e=e)}function cA(t,e,n,r){this.e=t,this.j=Gh(yx(t,(DL(),uU)),134),this.f=Ey(TH,qI,9,e,0,1),this.b=Ey(yX,ZL,184,e,6,1),this.a=Ey(TH,qI,9,e,0,1),this.d=Ey(yX,ZL,184,e,6,1),this.i=Ey(TH,qI,9,e,0,1),this.g=Ey(yX,ZL,184,e,6,1),this.n=Ey(yX,ZL,184,e,6,1),this.k=n,this.c=r}function lA(t){if(!t.a.c||!t.a.d)throw new xo((Gf(pz),pz.j+" must have a source and target "+(Gf(gz),gz.j+" specified.")));if(t.a.c==t.a.d)throw new xo("Network simplex does not support self-loops: "+t.a+" "+t.a.c+" "+t.a.d);return yp(t.a.c.g,t.a),yp(t.a.d.c,t.a),t.a}function fA(t,e,n,r,i){r==(uL(),yB)&&i==yB?Hg(t,e)>Hg(t,n)?t.d=vk(t,n):t.b=vk(t,e):r==BB&&i==BB?Hg(t,e)Hg(t,n)&&(t.d=vk(t,n),t.b=vk(t,e)):Hg(t,e)0&&o>0?e++:r>0?n++:o>0?i++:n++}yb(t.f,new jt)}function dA(t,e,n,r){var i,o,a,s,u;n.d.f!=e.f&&(lr(i=new wk(t),(AS(),kH)),$y(i,(DL(),Uq),n),$y(i,(HL(),AR),(cS(),aB)),r.c[r.c.length]=i,tv(a=new bS,i),Hf(a,(uL(),BB)),tv(s=new bS,i),Hf(s,yB),u=n.d,nv(n,a),S_(o=new Og,n),$y(o,fR,null),rv(o,s),nv(o,u),sT(i,a,s))}function pA(t){var e,n,r,i,o,a,s;for(i=Ej,a=Ej,o=null,n=new rg(new sr(t.e));n.b!=n.c.a.b;)if(1==Gh((e=By(n)).d,60).c&&(r=Gh(e.e,116).a,s=Gh(e.e,116).b,(i-r>Cj||r-iCj)&&(a=Gh(e.e,116).b,i=Gh(e.e,116).a,o=Gh(e.d,60),0==a&&0==i)))return o;return o}function gA(t,e){var n,r,i,o,a,s;return o=t.d,(s=Gh(yx(t,(HL(),HR)),15).a)<0&&$y(t,HR,new Gn(s=0)),e.j.b=s,a=Math.floor(s/2),Hf(r=new bS,(uL(),BB)),tv(r,e),r.i.b=a,Hf(i=new bS,yB),tv(i,e),i.i.b=a,nv(t,r),S_(n=new Og,t),$y(n,fR,null),rv(n,i),nv(n,o),function(t,e,n){var r;(r=e.c.f).g==(AS(),kH)?($y(t,(DL(),zq),Gh(yx(r,zq),7)),$y(t,Yq,Gh(yx(r,Yq),7))):($y(t,(DL(),zq),e.c),$y(t,Yq,n.d))}(e,t,n),function(t,e){var n,r;for(r=new Uv(t.b,0);r.b$j&&(this.b.ib(n),s=!1),this.b.ib(u);s&&this.b.ib(n)}function wA(t){var e,n,r,i;if(function(t,e){var n,r,i,o,a,s,u;for(i=Ey(UX,nI,26,t.e.a.c.length,12,1),a=new $n(t.e.a);a.a0){for(qo(t.c);lT(t,Gh(Wv(new $n(t.e.a)),61))0?n:0,r.i.b=n+rh(t.a,o,s)):r.i.b=(Md(a),a)),u=rh(t.a,o,s),r.i.bo?0:o)o?0:o:s,(0>(uo?0:o)o?0:o:s)),o=u,u+=a,r=Gh(ld(t.c,i),9),(n=new xc(c)).j.b=e.j.b,rT(t.b,e,n),Oh(r.c,n);Dy(t.g.c,e),Oh(t.i,new As(t,e))}function NA(t,e,n){var r,i,o,a,s,u;for(e.k=1,i=e.d,u=fE(e,(tm(),EU)).mb();u.G();)for(r=new $n(Gh(u.H(),7).e);r.af+s&&r.I();for(a=new $n(h);a.aCj||r-iCj)&&(a=Gh(e.e,116).b,i=Gh(e.e,116).a,o=Gh(e.d,60),0==a&&0==i)))return o;return o}function RA(t,e){var n,r,i;t.d=e,by(t.b),t.c=!1;t:for(n=new $n(t.d.c);n.ao.j.e+o.j.b?p.d=!0:(p.d=!0,p.c=!0))),r.b!=r.d.c&&(e=n);p&&(a=Gh(Up(m,u.d.f),25),e.ba.j.e+a.j.b?p.d=!0:(p.d=!0,p.c=!0))}for(c=Sp(G_(y));X_(c);)0!=(u=Gh(xv(c),12)).a.b&&(e=Gh(Bl(u.a),10),u.d.g==(uL(),wB)&&((S=new EA(e,new Za(e.a,o.j.e),o,u)).c=!0,k.c[k.c.length]=S),u.d.g==DB&&((S=new EA(e,new Za(e.a,o.j.e+o.j.b),o,u)).d=!0,k.c[k.c.length]=S))}if(0!=k.c.length){for(Dg(),yb(k,null),my(0,k.c.length),d=Gh(k.c[0],142),i=new vT(d,t.d),h=1;ha?new Bw(e,t,o-a):o>0&&a>0&&(new Bw(t,e,0),new Bw(e,t,0)))}function HA(t,e){var n,r,i,o,a,s,u,c;for(u=new je,c=null,r=Gh(mg(ZF,t),20).mb();r.G();){for(s=new Yn(new zn((n=Gh(r.H(),75)).c.a).a.bb().mb());s.a.G();)i=Gh(s.a.H(),21),eh(e,o=Gh(i.yb(),7)),wT(o,t.b);Jm(u,n.b),c=t.a}for(NC(u),Aw(u,c),a=new $n(u);a.an.k&&s1&&(o=n?Nu(e.d)+1:Nu(a.d)-1,ev(a,Gh(ld(t.a.c,o),16))),qA(t,a,n));return e}function UA(t,e){var n,r,i,o;for(i=e.d?t.a.c==(ov(),sY)?G_(e.b):H_(e.b):t.a.c==(ov(),aY)?G_(e.b):H_(e.b),o=!1,qc(),r=new Pc(Mc(zh(i.a,new h)));X_(r);)if(n=Gh(xv(r),12),t.c.a[n.c.f.d.k]!==t.c.a[n.d.f.d.k]&&(o=!0,xa(t.b,t.a.f[Vk(n,e.b).k])))return e.c=!0,e.a=n,e;return e.c=o,e.a=null,e}function XA(t){var e,n,r,i,o,a,s;for(o=new $n(t.a.a);o.a0&&Ex(this.n,!0,(b_(),vD)),t.g==(AS(),_H)&&Ah(this.n,!1,!1,!1,!1)}function KA(t,e,n){var r,i,o,a,s,u,c,l;for(o=new Za(e,n),c=new $n(t.b);c.ar?f:r)>t.j.a&&(c=(s-t.j.a)/2,a.b=Ro(a.b,c),a.c=Ro(a.c,c))}function uN(t,e,n,r){var i,o,a,s,u,c,l,f;for(a=jl(e.d,n,r),l=new $n(e.b);l.a=40)&&function(t){var e,n,r,i,o,a,s;for(t.o=new ri,r=new so,a=new $n(t.e.a);a.a0,s=oE(e,o),Ic(n?s.c:s.g,e),1==W_(s).c.length&&Ob(r,s,r.c.b,r.c),i=new Qa(o,e),ac(t.o,i),Dy(t.e.a,o))}(t),function(t){var e,n,r,i,o,a,s,u,c,l;for(c=t.e.a.c.length,o=new $n(t.e.a);o.ac&&r>c)){i=!1,t.a&&Ih();break}c=no(n.n[s.k])+no(n.d[s.k])+s.j.b+s.e.a}if(!i)break}return t.a&&Ih(),i}function bN(t){var e,n,r,i,o,a;if(hl(new $n(r=Xk(t)))){for(a=new gg(0,0,t.e.j.a,t.e.j.b),n=new $n(r);n.aa.i.b-a.e.d+c.a+f&&(h=u.i+c.i,c.a=(c.i*c.a+u.i*u.a)/h,c.i=h,u.g=c,n=!0)),o=a,u=c;return n}function _N(t){var e,n,r,i,o;if(Xu(yx(t,(HL(),AR)))===Xu((cS(),sB))||Xu(yx(t,AR))===Xu(aB))for(o=new $n(t.f);o.aa)return uL(),yB;break;case 4:case 3:if(l<0)return uL(),wB;if(l+n>o)return uL(),DB}return(u=(c+s/2)/a)+(r=(l+n/2)/o)<=1&&u-r<=0?(uL(),BB):u+r>=1&&u-r>=0?(uL(),yB):r<.5?(uL(),wB):(uL(),DB)}function kN(t,e,n,r,i,o,a){var s,u,c,l,f;for(f=new ru,u=e.mb();u.G();)for(l=new $n(gk(Gh(u.H(),627)));l.a0&&Nh(t.e,o)):(t.c[a]-=c+1,t.c[a]<=0&&t.a[a]>0&&Nh(t.d,o))))}function CN(t){var e,n,r,i,o,a,s,u;for(Px(),this.b=new $t,this.c=new je,this.a=new je,s=0,u=(a=Lx()).length;s0){for(i=s.length;i>0&&""==s[i-1];)--i;ie.a&&(r.kb((CS(),pV))?t.d.a+=(n.a-e.a)/2:r.kb(vV)&&(t.d.a+=n.a-e.a)),n.b>e.b&&(r.kb((CS(),yV))?t.d.b+=(n.b-e.b)/2:r.kb(bV)&&(t.d.b+=n.b-e.b)),Gh(yx(t,(DL(),Mq)),18).kb((YA(),YV))&&(n.a>e.a||n.b>e.b))for(s=new $n(t.b);s.a0||0==n&&e.f==(Vc(),TM))&&(s=e.g,u=e.f):(i=e.c,s=e.g,u=e.f),r&&i&&((n=t.a.$b(o,s))>0||0==n&&a==(Vc(),TM)&&u==(Vc(),TM))&&(o=s,Vc(),a=TM,u=CM),new JC(t.a,r,o,a,i,s,u)}function BN(t,e,n,r){var i,o,a,s,u,c;if(n.c.f!=e.f)for(lr(i=new wk(t),(AS(),kH)),$y(i,(DL(),Uq),n),$y(i,(HL(),AR),(cS(),aB)),r.c[r.c.length]=i,tv(a=new bS,i),Hf(a,(uL(),BB)),tv(s=new bS,i),Hf(s,yB),nv(n,a),S_(o=new Og,n),$y(o,fR,null),rv(o,s),nv(o,e),sT(i,a,s),c=new Uv(n.b,0);c.b=r&&c.a>=r&&(l.a=r),h.a<=n&&c.a<=n&&(d.a=n-10),1==e.c.a.Y()?tw(a.a,_x(Oo(nD,1),RI,10,0,[l,f,p,d])):tw(a.a,_x(Oo(nD,1),RI,10,0,[l,f,i,p,d]))}function HN(t,e){var n,r,i,o,a,s;for(o=t.c,a=t.d,rv(t,null),nv(t,null),e&&eo(no(Af(yx(a,(DL(),Dq)))))?rv(t,DN(a.f,(tm(),EU),(uL(),yB))):rv(t,a),e&&eo(no(Af(yx(o,(DL(),Kq)))))?nv(t,DN(o.f,(tm(),_U),(uL(),BB))):nv(t,o),r=new $n(t.b);r.aa&&(a=Gh(yx(n,nU),24).a);for(r=Sp(G_(s));X_(r);)n=Gh(xv(r),12),s.d!=n.c.f.d&&Gh(yx(n,(DL(),nU)),24).a==a&&Oh(c,new Qa(n.c.f,n));yb(c,t.c),Td(t.b,s.k,c)}}(f,t),f.f=Al(f.d),function(t,e){var n,r,i,o,a,s,u,c;for(o=new $n(e.c);o.aa&&(a=Gh(yx(n,nU),24).a);for(r=Sp(H_(s));X_(r);)n=Gh(xv(r),12),s.d!=n.d.f.d&&Gh(yx(n,(DL(),nU)),24).a==a&&Oh(c,new Qa(n.d.f,n));yb(c,t.c),Td(t.f,s.k,c)}}(f,t),f}function YN(t){var e,n,r,i,o,a,s,u;for(a=new $n(t.a);a.ano(sl(a.g,a.d[0]).a)?(Nc(u.b>0),u.a.sb(u.c=--u.b),eh(u,a),i=!0):s.e&&s.e.Y()>0&&(o=(!s.e&&(s.e=new je),s.e).nb(e),c=(!s.e&&(s.e=new je),s.e).nb(n),(o||c)&&((!s.e&&(s.e=new je),s.e).ib(a),++a.c));i||(r.c[r.c.length]=a)}function qN(t,e,n,r){var i,o,a,s,u,c,l,f,h,d,p;n.d.f!=e.f&&(lr(i=new wk(t),(AS(),kH)),$y(i,(DL(),Uq),n),$y(i,(HL(),AR),(cS(),aB)),r.c[r.c.length]=i,tv(a=new bS,i),Hf(a,(uL(),BB)),tv(s=new bS,i),Hf(s,yB),u=n.d,nv(n,a),S_(o=new Og,n),$y(o,fR,null),rv(o,s),nv(o,u),f=(l=(c=Gh(ld(a.b,0),12).c).f).g,p=(d=(h=Gh(ld(s.e,0),12).d).f).g,$y(i,zq,f==kH?Gh(yx(l,zq),7):c),$y(i,Yq,p==kH?Gh(yx(d,Yq),7):h))}function UN(t,e){var n,r,i,o,a,s,u,c,l,f,h,d,p;for(a=e,f=e.d,c=e.c.f,h=e.d.f,l=Nu(c.d),d=Nu(h.d),s=l;se&&(t.a=e),t.b<0?t.b=0:t.b>n&&(t.b=n)}(c,t.j.a,t.j.b),Hf(s,EN(s,o)),a=Gh(yx(r,(DL(),Mq)),18),u=s.g,o.e){case 2:case 1:(u==(uL(),wB)||u==DB)&&a.ib((YA(),XV));break;case 4:case 3:(u==(uL(),yB)||u==BB)&&a.ib((YA(),XV))}else i=iE(o),s=DN(t,n,n==(tm(),EU)?i:l_(i));return s}function ZN(t){var e,n,r,i,o,a,s,u;for(r=sf(qb(t.a)),i=new qh(e=Gh(na(oV),11),Gh(_p(e,e.length),11),0);r.a.G()||r.b.mb().G();)s=(n=Gh(Sw(r),12)).c.g,u=n.d.g,s==(uL(),RB)?u!=RB&&(a=mE(u),$y(n,(DL(),lU),a),Hf(n.c,u),pm(i,a),r.a.I()):u==RB?(a=mE(s),$y(n,(DL(),lU),a),Hf(n.d,s),pm(i,a),r.a.I()):(a=XN(s,u),$y(n,(DL(),lU),a),pm(i,a),r.a.I());return 1==i.c?o=Gh(Kb(new Ys(i)),60):(pL(),o=nV),oC(t,o,!1),o}function QN(t,e,n){var r,i,o,a,s,u,c,l,f;for(u=n+e.d.c.a,f=new $n(e.f);f.a1,s=Sp(dc((Qp(),new ib(P_(_x(Oo(fM,1),kP,1,4,[l.b,l.e]))))));X_(s);)c=(a=Gh(xv(s),12)).c==l?a.d:a.c,ka(Gm(_x(Oo(nD,1),RI,10,0,[c.f.i,c.i,c.a])).b-o.b)>1&&AT(t,a,o,i,l)}}function JN(t,e){var n,r,i,o,a;for(a=new zx(new Hn(t.f.b).a);a.b;){if(i=Gh((o=zw(a)).yb(),251),1==e){if(i.yc()!=(b_(),yD)&&i.yc()!=pD)continue}else if(i.yc()!=(b_(),gD)&&i.yc()!=vD)continue;switch(r=Gh(Gh(o.zb(),27).b,25),n=Gh(Gh(o.zb(),27).a,78).c,i.yc().e){case 2:r.j.d=t.e.a,r.j.c=Ro(1,r.j.c+n);break;case 1:r.j.d=r.j.d+n,r.j.c=Ro(1,r.j.c-n);break;case 4:r.j.e=t.e.b,r.j.b=Ro(1,r.j.b+n);break;case 3:r.j.e=r.j.e+n,r.j.b=Ro(1,r.j.b-n)}}}function tO(t,e,n,r,i){var o,a,s,u,c,l,f,h;for(ml(),f=new _r,a=new je,BC(t,n,t.d.Mc(),a,f),BC(t,r,t.d.Nc(),a,f),s=new Uv(a,0);s.b=h&&(m>h&&(f.c=Ey(fM,kP,1,0,4,1),h=m),f.c[f.c.length]=v);0!=f.c.length&&(l=Gh(ld(f,Yk(e,f.c.length)),80),cg(N.a,l),l.d=d++,$T(l,T,k),f.c=Ey(fM,kP,1,0,4,1))}for(_=t.c.length+1,b=new $n(t);b.aA.d&&(ng(n),Dy(A.b,r),r.c>0&&(r.a=A,Oh(A.e,r),r.b=S,Oh(S.b,r)))}(a,Gh(yx(e,(DL(),iU)),154)),function(t){var e,n,r,i,o,a,s,u,c,l;for(c=new je,s=new je,a=new $n(t);a.a-1){for(o=new $n(s);o.a0||(u.i=zo(u.i,i.i-1),--u.f,0==u.f&&(s.c[s.c.length]=u))}}(a),h=-1,l=new $n(a);l.af||r+i>u)throw new qr;if(0!=(1&c.g)&&0==(4&c.g)||l==s)i>0&&uS(t,e,n,r,i,!0);else if(t===n&&er;)n[a]=t[--e];else for(a=r+i;r0&&(u=t.i.a/o);break;case 2:case 4:(i=t.f.j.b)>0&&(u=t.i.b/i)}$y(t,(DL(),tU),u)}if(s=t.j,r)t.a.a=r.a,t.a.b=r.b;else if(e!=cB&&e!=lB&&a!=RB)switch(a.e){case 1:t.a.a=s.a/2;break;case 2:t.a.a=s.a,t.a.b=s.b/2;break;case 3:t.a.a=s.a/2,t.a.b=s.b;break;case 4:t.a.b=s.b/2}else t.a.a=s.a/2,t.a.b=s.b/2}(u,c,i,Gh(yx(u,TR),10)),i.e){case 2:case 1:(u.g==(uL(),wB)||u.g==DB)&&o.ib((YA(),XV));break;case 4:case 3:(u.g==(uL(),yB)||u.g==BB)&&o.ib((YA(),XV))}}function sO(t){var e,n,r,i,o;for(r=new je,o=new $n(t.c.f);o.a=g-1)return null;for((i=new je).c[i.c.length]=e,y=e,a=n,d=-1,s=Gh(ld(t.d.c.c,n),16),h=0;h1&&a1&&a>1;)c=AN(t,y),s=Gh(ld(t.d.c.c,a),16),l=Gh(ld(t.d.c.c,a-1),16),m=Gh(p.sb(f++),24).a,g=zo(m,l.a.c.length),Jk(y,g,l),Jk(c,b,s),b=g,y&&(i.c[i.c.length]=y),y=c,--w,++o,--a;for(v=(r-(i.c.length-1)*t.d.d)/i.c.length,u=new $n(i);u.a=0)return!1;if(n.e&&r==(AS(),xH)&&r!=n.e)return!1;if(e.k=n.b,Oh(n.f,e),n.e=r,r==(AS(),kH)||r==CH||r==xH)for(i=new $n(e.f);i.a0&&(Ex(t.n,!1,(b_(),gD)),Ex(t.n,!0,vD))}function lO(t,e,n){var r,i,o,a;switch(o=t.i,i=Gm(_x(Oo(nD,1),RI,10,0,[e.i,e.f.i])),r=Gm(_x(Oo(nD,1),RI,10,0,[e.f.i,e.i,e.a])),a=e.d,e.g.e){case 4:o.a=Ho(i.a,r.a)-a.b-t.j.a-n,o.b=Gm(_x(Oo(nD,1),RI,10,0,[e.f.i,e.i,e.a])).b+n;break;case 2:o.a=Ro(i.a+e.j.a,r.a)+a.c+n,o.b=Gm(_x(Oo(nD,1),RI,10,0,[e.f.i,e.i,e.a])).b+n;break;case 1:o.a=Gm(_x(Oo(nD,1),RI,10,0,[e.f.i,e.i,e.a])).a+n,o.b=Ho(i.b,r.b)-a.d-t.j.b-n;break;case 3:o.a=Gm(_x(Oo(nD,1),RI,10,0,[e.f.i,e.i,e.a])).a+n,o.b=Ro(i.b+e.j.b,r.b)+a.a+n}}function fO(t,e,n){var r,i,o,a;switch(o=t.i,i=Gm(_x(Oo(nD,1),RI,10,0,[e.i,e.f.i])),r=Gm(_x(Oo(nD,1),RI,10,0,[e.f.i,e.i,e.a])),a=e.d,e.g.e){case 4:o.a=Ho(i.a,r.a)-a.b-t.j.a-n,o.b=Gm(_x(Oo(nD,1),RI,10,0,[e.f.i,e.i,e.a])).b-t.j.b-n;break;case 2:o.a=Ro(i.a+e.j.a,r.a)+a.c+n,o.b=Gm(_x(Oo(nD,1),RI,10,0,[e.f.i,e.i,e.a])).b-t.j.b-n;break;case 1:o.a=Gm(_x(Oo(nD,1),RI,10,0,[e.f.i,e.i,e.a])).a+n,o.b=Ho(i.b,r.b)-a.d-t.j.b-n;break;case 3:o.a=Gm(_x(Oo(nD,1),RI,10,0,[e.f.i,e.i,e.a])).a+n,o.b=Ro(i.b+e.j.b,r.b)+a.a+n}}function hO(){hO=r,QV=new xb("ONE_SIDED",0,!0,!1,!1),nq=new xb("TWO_SIDED",1,!1,!1,!1),JV=new xb("ONE_SIDED_BEST_OF_UP_OR_DOWN",2,!0,!0,!1),rq=new xb("TWO_SIDED_BEST_OF_UP_OR_DOWN",3,!1,!0,!1),tq=new xb("ONE_SIDED_BEST_OF_UP_OR_DOWN_ORTHOGONAL_HYPEREDGES",4,!0,!0,!0),iq=new xb("TWO_SIDED_BEST_OF_UP_OR_DOWN_ORTHOGONAL_HYPEREDGES",5,!1,!0,!0),eq=new xb("ONE_SIDED_ORTHOGONAL_HYPEREDGES",6,!0,!1,!0),ZV=new xb("OFF",7,!1,!1,!1)}function dO(t,e,n,r,i,o,a){var s,u,c,l,f,h,d;return f=eo(no(Af(yx(e,(RL(),VU))))),h=null,o==(tm(),_U)&&r.c.f==n?h=r.c:o==EU&&r.d.f==n&&(h=r.d),c=a,a&&f&&!h?(Oh(a.e,r),d=Bo(Gh(yx(a.d,(HL(),HR)),15).a,Gh(yx(r,HR),15).a),$y(a.d,HR,new Gn(d))):(uL(),l=RB,h?l=h.g:zs(Gh(yx(n,(HL(),AR)),28))&&(l=o==_U?BB:yB),u=function(t,e,n,r,i,o){var a,s,u,c,l,f,h;c=r==(tm(),_U)?o.c:o.d,u=U_(e),c.f==n?(a=Gh(Up(t.b,c),9))||($y(a=aL(c,Gh(yx(n,(HL(),AR)),28),i,r==_U?-1:1,c.j,u,e),(DL(),Uq),c),dg(t.b,c,a)):(l=Gh(yx(o,(HL(),HR)),15).a,a=aL((f=new v,h=Gh(yx(e,(DL(),sU)),15).a*Gh(yx(e,(RL(),DU)),15).a/2,$y(f,qq,new Gn(h)),f),Gh(yx(n,AR),28),i,r==_U?-1:1,new Za(l,l),u,e),s=function(t,e,n,r){var i,o;switch(i=U_(Vp(n)),tv(o=new bS,n),r.e){case 1:Hf(o,l_(iE(i)));break;case 2:Hf(o,iE(i))}return $y(o,(DL(),qq),Gh(yx(e,qq),15)),$y(e,Uq,o),dg(t.b,o,e),o}(t,a,n,r),$y(a,Uq,s),dg(t.b,s,a));return Gh(yx(e,(DL(),Mq)),18).ib((YA(),YV)),zs(Gh(yx(e,(HL(),AR)),28))?$y(e,AR,(cS(),uB)):$y(e,AR,(cS(),cB)),a}(t,e,n,o,l,r),s=hb((Vp(n),r)),o==_U?(rv(s,Gh(ld(u.f,0),7)),nv(s,i)):(rv(s,i),nv(s,Gh(ld(u.f,0),7))),c=new x_(r,s,u,Gh(yx(u,(DL(),Uq)),7),o,!h)),rT(t.a,r,new gh(c.d,e,o)),c}function pO(t,e,n,r){var i,o,a,s,u,c,l;if(lr(o=new wk(t),(AS(),CH)),$y(o,(HL(),AR),(cS(),aB)),i=0,e){for($y(a=new bS,(DL(),Uq),e),$y(o,Uq,e.f),Hf(a,(uL(),BB)),tv(a,o),u=0,c=(l=Gh(Dk(e.b,Ey(wH,hj,12,e.b.c.length,0,1)),47)).length;uh?l:h;for(nk(this,Gm(_x(Oo(nD,1),RI,10,0,[t.f.i,t.i,t.a])).b,f,l),a=new Yn(new zn(e.a).a.bb().mb());a.a.G();)i=Gh(a.a.H(),21),o=Gh(i.yb(),27),mp(this.c,Gh(o.b,12));this.f=!1}function xO(t,e,n,r){var i,o,a,s,u;if(!((s=(HL(),wR).b)in e.a)||!_g(e,s).ic().a){if(!(u=_g(e,MI)))throw new gp("Labels must have a property 'text'.",null,e);if(!u.lc())throw new gp("A label's 'text' property must be a string.",u,e);if($y(o=new xc(u.lc().a),(DL(),Uq),e),dg(t.f,o,e),zC(e,o),gS(e,o),fl(n,9)?Oh(Gh(n,9).c,o):fl(n,12)?Oh(Gh(n,12).b,o):fl(n,7)&&Oh(Gh(n,7).c,o),fl(n,12))switch(a=Gh(yx(o,nR),107),zC(e,o),$y(o,nR,a),i=Gh(yx(r,Mq),18),a.e){case 2:case 3:i.ib((YA(),zV));case 1:case 0:i.ib((YA(),HV)),$y(o,nR,(Im(),xD))}}}function _O(t,e){var n,r,i,o,a,s,u,c,l,f,h,d,p,g,v;for(i=0,o=0,u=new $n(t.a);u.a.5?v-=2*o*(d-.5):d<.5&&(v+=2*i*(.5-d)),v<(r=a.e.b)&&(v=r),p=a.e.c,v>g.a-p-c&&(v=g.a-p-c),a.i.a=e+v}}function EO(){EO=r,VG=new Qi,YG=lN(_x(Oo(rD,1),kP,79,0,[(HL(),XD),aR])),HG=lN(_x(Oo(rD,1),kP,79,0,[xR,NR,(RL(),JU),sR,(DL(),nU),nX,WU])),DG=lN(_x(Oo(rD,1),kP,79,0,[$D,JD,wR,oR,lR,dR,pR,MR,DR,cR,CU,PU,IU,YU,RU,VU,tX,$U,AU])),GG=lN(_x(Oo(rD,1),kP,79,0,[bR,vR,hR,HR,mR,eU,xq,gq,sU,KU,DU,zU])),BG=lN(_x(Oo(rD,1),kP,79,0,[LR,WD,eR,rR,nR,iR,uR,_R,ER,kR,SR,CR,AR,OR,TU,LU,qU,jU,OU,UU,XU,BU,GU,FU,ZU,QU,eX,rX,HU])),RG=lN(_x(Oo(rD,1),kP,79,0,[yR,RR,BR,NU])),zG=lN(_x(Oo(rD,1),kP,79,0,[UD,ZD,fR,gR,TR,IR])),FG=lN(_x(Oo(rD,1),kP,79,0,[(Ax(),IG)]))}function kO(t){var e,n,r,i,o,a,s;for(e=0,o=new $n(t.b.a);o.aiI)&&s<10);fo(t.c,new N),kO(t),function(t){KO(t,(b_(),gD)),t.e=!0}(t.c),function(t){var e,n,r,i,o,a,s;for(i=new $n(t.a.b);i.a0;){for(my(0,s.c.length),d=Gh(s.c[0],12),my(0,f.c.length),i=Ky((r=Gh(f.c[0],12)).d.b,r,0),zv(d,r.d,i),rv(r,null),nv(r,null),h=d.a,e&&Nh(h,new Uu(v)),n=_k(r.a,0);n.b!=n.d.c;)Nh(h,new Uu(Gh(Cb(n),10)));for(g=d.b,l=new $n(r.b);l.a0?Nw(this,this.f/this.a):null!=sl(e.g,e.d[0]).a&&null!=sl(n.g,n.d[0]).a?Nw(this,(no(sl(e.g,e.d[0]).a)+no(sl(n.g,n.d[0]).a))/2):null!=sl(e.g,e.d[0]).a?Nw(this,sl(e.g,e.d[0]).a):null!=sl(n.g,n.d[0]).a&&Nw(this,sl(n.g,n.d[0]).a)}function OO(t,e){var n,r,i,o,a,s,u,c,l,f,h;switch(t.g.e){case 1:if(r=Gh(yx(t,(DL(),Uq)),12),(n=Gh(yx(r,Xq),44))?eo(no(Af(yx(r,aU))))&&(n=wx(n)):n=new Br,c=Gh(yx(t,zq),7),e<=(l=Gm(_x(Oo(nD,1),RI,10,0,[c.f.i,c.i,c.a]))).a)return l.b;if(Ob(n,l,n.a,n.a.a),f=Gh(yx(t,Yq),7),(h=Gm(_x(Oo(nD,1),RI,10,0,[f.f.i,f.i,f.a]))).a<=e)return h.b;for(Ob(n,h,n.c.b,n.c),a=Gh(Cb(u=_k(n,0)),10),s=Gh(Cb(u),10);s.a=2)for(Cg(t.a),r=0,h=_k(n,0);h.b!=h.d.c;)f=Gh(Cb(h),10),0==r?(e=Pf(Pf(new Za(f.a,f.b),t.c.i),t.c.f.i),t.c.a.a=e.a,t.c.a.b=e.b):r==n.b-1?(e=Pf(Pf(new Za(f.a,f.b),t.d.i),t.d.f.i),t.d.a.a=e.a,t.d.a.b=e.b):Nh(t.a,f),++r;if(l)for(u=_k(t.a,0);u.b!=u.d.c;)s=Gh(Cb(u),10),a.a=Ro(a.a,s.a),a.b=Ro(a.b,s.b);for(o=new $n(t.b);o.a0&&$y(a,kq,(Hd(),Hd(),vX)),(s=Gh(yx(a,(HL(),AR)),28))==(cS(),lB)||s!=cB&&r.ib((YA(),UV)),eo(no(Af(yx(a,JD))))&&r.ib((YA(),FV)),eo(no(Af(yx(a,cR))))&&(r.ib((YA(),qV)),r.ib(VV),$y(a,AR,cB)),a}function IO(t,e){e.V()&&Ah(t.n,!0,!0,!0,!0),e.t((uL(),SB))&&Ah(t.n,!0,!0,!0,!1),e.t(mB)&&Ah(t.n,!1,!0,!0,!0),e.t(IB)&&Ah(t.n,!0,!0,!1,!0),e.t(MB)&&Ah(t.n,!0,!1,!0,!0),e.t(CB)&&Ah(t.n,!1,!0,!0,!1),e.t(xB)&&Ah(t.n,!1,!0,!1,!0),e.t(jB)&&Ah(t.n,!0,!1,!1,!0),e.t(PB)&&Ah(t.n,!0,!1,!0,!1),e.t(OB)&&Ah(t.n,!0,!0,!0,!0),e.t(EB)&&Ah(t.n,!0,!0,!0,!0),e.t(OB)&&Ah(t.n,!0,!0,!0,!0),e.t(_B)&&Ah(t.n,!0,!0,!0,!0),e.t(LB)&&Ah(t.n,!0,!0,!0,!0),e.t(NB)&&Ah(t.n,!0,!0,!0,!0),e.t(AB)&&Ah(t.n,!0,!0,!0,!0)}function jO(t,e){var n,r,i,o,a,s,u,c,l;for(s=!0,i=0,u=t.f[e.k],c=e.j.b+t.n,n=t.c[e.k][2],$b(t.a,u,F_(Gh(ld(t.a,u),24).a-1+n)),$b(t.b,u,no(Nf(ld(t.b,u)))-c+n*t.e),++u>=t.i?(++t.i,Oh(t.a,F_(1)),Oh(t.b,c)):(r=t.c[e.k][1],$b(t.a,u,F_(Gh(ld(t.a,u),24).a+1-r)),$b(t.b,u,no(Nf(ld(t.b,u)))+c-r*t.e)),(t.q==(UT(),zF)&&(Gh(ld(t.a,u),24).a>t.j||Gh(ld(t.a,u-1),24).a>t.j)||t.q==qF&&(no(Nf(ld(t.b,u)))>t.k||no(Nf(ld(t.b,u-1)))>t.k))&&(s=!1),o=Sp(G_(e));X_(o);)a=Gh(xv(o),12).c.f,t.f[a.k]==u&&(i+=Gh((l=jO(t,a)).a,24).a,s=s&&eo(no(Af(l.b))));return t.f[e.k]=u,new Qa(F_(i+=t.c[e.k][0]),(Hd(),s?vX:gX))}function MO(t,e,n){var r,i,o,a,s,u,c,l,f,h,d,p,g,v,b;if(h=new Uu(t.j),b=e.a/h.a,s=e.b/h.b,g=e.a-h.a,o=e.b-h.b,n)for(i=Xu(yx(t,(HL(),AR)))===Xu((cS(),aB)),p=new $n(t.f);p.a=1&&(v-a>0&&f>=0?(u.i.a+=g,u.i.b+=o*a):v-a<0&&l>=0&&(u.i.a+=g*v,u.i.b+=o));t.j.a=e.a,t.j.b=e.b,$y(t,(HL(),RR),(kE(),new qh(r=Gh(na(ZB),11),Gh(_p(r,r.length),11),0)))}function DO(t){var e,n,r,i,o,a,s,u,c,l;for(r=new je,a=new $n(t.e.a);a.a-1){for(r=_k(a,0);r.b!=r.d.c;)(n=Gh(Cb(r),77)).n=o;for(;0!=a.b;)for(e=new $n((n=Gh(Zk(a,0),77)).d);e.a0),o.a.sb(o.c=--o.b),eh(o,n),wp(u,n),wT(n,s.g),$v(u),$v(u),r.a.eb(n)}}function zO(t){var e,n,r,i,o,a,s,u;for(e=null,r=new $n(t);r.a0&&0==n.c&&(!e&&(e=new je),e.c[e.c.length]=n);if(e)for(;0!=e.c.length;){if((n=Gh(gy(e,0),102)).b&&n.b.c.length>0)for(!n.b&&(n.b=new je),o=new $n(n.b);o.aKy(t,n,0))return new Qa(i,n)}else if(no(sl(i.g,i.d[0]).a)>no(sl(n.g,n.d[0]).a))return new Qa(i,n);for(s=(!n.e&&(n.e=new je),n.e).mb();s.G();)!(a=Gh(s.H(),102)).b&&(a.b=new je),wy(0,(u=a.b).c.length),Su(u.c,0,n),a.c==u.c.length&&(e.c[e.c.length]=a)}return null}function YO(t,e){var n,r,i,o,a,s,u,c,l;if(1!=Xp(H_(e))||Gh(Gv(H_(e)),12).d.f.g!=(AS(),kH))return null;for(lr(n=(o=Gh(Gv(H_(e)),12)).d.f,(AS(),xH)),$y(n,(DL(),zq),null),$y(n,Yq,null),$y(n,(HL(),AR),Gh(yx(e,AR),28)),$y(n,yR,Gh(yx(e,yR),86)),i=yx(o.c,Uq),a=null,c=fC(n,(uL(),yB)).mb();c.G();)if(0!=(s=Gh(c.H(),7)).e.c.length){$y(s,Uq,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,Jm(s.c,l.c),l.c.c=Ey(fM,kP,1,0,4,1),a=s;break}if($y(o.c,Uq,null),!rb(fC(e,yB)))for(u=new $n(qb(fC(e,yB)));u.a0?i+t.i[1]*e+t.n[1]:0,t.o[3]>0?i+t.i[3]*e+t.n[3]:0),Ro(t.o[4]>0?n+t.i[4]*e+t.n[4]:0,t.o[2]>0?n+t.i[2]*e+t.n[2]:0))}(t,t.k);break;case 4:r=new Uu(a);break;case 5:r=function(t,e){var n,r,i,o,a;for(a=new ao,o=new $n(iS(t));o.a0&&(o.a=Ro(o.a,i+t.q.b+t.q.c)),n>0&&(o.b=Ro(o.b,n+t.q.d+t.q.a))):(i>0&&(o.a=Ro(o.a,i)),n>0&&(o.b=Ro(o.b,n)))),function(t,e){t.e.j.a=e.a,t.e.j.b=e.b}(t.e,o)}}function qO(t,e,n){var r,i,o,a,s,u,c,l,f,h,d;if(!t.b)return!1;for(a=null,h=null,i=1,(u=new Yy(null,null)).a[1]=t.b,f=u;f.a[i];)c=i,s=h,h=f,f=f.a[i],i=(r=t.a.$b(e,f.d))<0?0:1,0==r&&(!n.c||xg(f.e,n.d))&&(a=f),f&&f.b||Yo(f.a[i])||(Yo(f.a[1-i])?h=h.a[c]=gm(f,i):Yo(f.a[1-i])||(d=h.a[1-c])&&(Yo(d.a[1-c])||Yo(d.a[c])?(o=s.a[1]==h?1:0,Yo(d.a[c])?s.a[o]=Kv(h,c):Yo(d.a[1-c])&&(s.a[o]=gm(h,c)),f.b=s.a[o].b=!0,s.a[o].a[0].b=!1,s.a[o].a[1].b=!1):(h.b=!1,d.b=!0,f.b=!0)));return a&&(n.b=!0,n.d=a.e,f!=a&&(function(t,e,n,r){var i,o;for(i=null==(o=e).d||t.a.$b(n.d,o.d)>0?1:0;o.a[i]!=n;)o=o.a[i],i=t.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}(t,u,a,l=new Yy(f.d,f.e)),h==a&&(h=l)),h.a[h.a[1]==f?1:0]=f.a[f.a[0]?0:1],--t.c),t.b=u.a[1],t.b&&(t.b.b=!1),n.b}function UO(t){var e,n,r,i,o,a,s,u,c,l,f,h,d,p;for(h=new $n(t);h.a(b=r?Gh(yx(l,$z),24).a:lP)?u:b,w=new $n(l.f);w.a=c&&x>=v&&(h+=p.i.b+g.i.b+g.a.b-m,++s));if(n)for(a=new $n(y.b);a.a=c&&x>=v&&(h+=p.i.b+g.i.b+g.a.b-m,++s))}s>0&&(_+=h/s,++d)}d>0?(e.a=i*_/d,e.i=d):(e.a=0,e.i=0)}function KO(t,e){var n;if(t.e)throw new xo((Gf(rH),"The "+rH.j+nj));if(!function(t,e){return ql(t.c,e)}(t.a,e))throw new Ci("The direction "+e+" is not supported by the CGraph instance.");if(e==t.d)return t;switch(n=t.d,t.d=e,n.e){case 0:switch(e.e){case 2:hx(t);break;case 1:$E(t),hx(t);break;case 4:PS(t),hx(t);break;case 3:PS(t),$E(t),hx(t)}break;case 2:switch(e.e){case 1:$E(t),eN(t);break;case 4:PS(t),hx(t);break;case 3:PS(t),$E(t),hx(t)}break;case 1:switch(e.e){case 2:$E(t),eN(t);break;case 4:$E(t),PS(t),hx(t);break;case 3:$E(t),PS(t),$E(t),hx(t)}break;case 4:switch(e.e){case 2:PS(t),hx(t);break;case 1:PS(t),$E(t),hx(t);break;case 3:$E(t),eN(t)}break;case 3:switch(e.e){case 2:$E(t),PS(t),hx(t);break;case 1:$E(t),PS(t),$E(t),hx(t);break;case 4:$E(t),eN(t)}}return t}function ZO(t,e,n){var r,i,o,a,s,u,c,l;if(!t.a[e.d.k][e.k].e){for(t.a[e.d.k][e.k].e=!0,t.a[e.d.k][e.k].b=0,t.a[e.d.k][e.k].d=0,t.a[e.d.k][e.k].a=null,l=new $n(e.f);l.a0&&(t.a[e.d.k][e.k].d+=mT(t.e,24)*Rj*.07000000029802322-.03500000014901161,t.a[e.d.k][e.k].a=t.a[e.d.k][e.k].d/t.a[e.d.k][e.k].b)}}function QO(t,e){var n,r,i,o,a,s,u,c,l,f;for(r=new $n(t.a.c);r.aJI||e.k==uY&&cv?c:v}for(n.e.b+=c-s.b,f=new $n(t.a);f.a1;)e=Ho(i,t.c),lr(l=new wk(t.e.c),(AS(),xH)),$y(l,(HL(),AR),Gh(yx(u,AR),28)),$y(l,yR,Gh(yx(u,yR),86)),l.k=t.e.b++,Oh(t.b,l),l.j.b=u.j.b,l.j.a=e,Hf(f=new bS,(uL(),yB)),tv(f,u),f.i.a=l.j.a,f.i.b=l.j.b/2,Hf(h=new bS,BB),tv(h,l),h.i.b=l.j.b/2,h.i.a=-h.j.a,rv(d=new Og,f),nv(d,h),u=l,Oh(t.e.c.b,u),--c,i-=t.c+t.e.d;for(new lS(t.d,t.b,t.c),a=new $n(r);a.ae.a||e.p>t.a)){for(n=0,r=0,s=new Yn(new zn(t.o.a).a.bb().mb());s.a.G();)i=Gh(s.a.H(),21),o=Gh(i.yb(),7),eE(Gm(_x(Oo(nD,1),RI,10,0,[o.f.i,o.i,o.a])).b,e.p,e.a)&&++n;for(u=new Yn(new zn(t.g.a).a.bb().mb());u.a.G();)i=Gh(u.a.H(),21),o=Gh(i.yb(),7),eE(Gm(_x(Oo(nD,1),RI,10,0,[o.f.i,o.i,o.a])).b,e.p,e.a)&&--n;for(c=new Yn(new zn(e.o.a).a.bb().mb());c.a.G();)i=Gh(c.a.H(),21),o=Gh(i.yb(),7),eE(Gm(_x(Oo(nD,1),RI,10,0,[o.f.i,o.i,o.a])).b,t.p,t.a)&&++r;for(a=new Yn(new zn(e.g.a).a.bb().mb());a.a.G();)i=Gh(a.a.H(),21),o=Gh(i.yb(),7),eE(Gm(_x(Oo(nD,1),RI,10,0,[o.f.i,o.i,o.a])).b,t.p,t.a)&&--r;n1)for(u=_k(Rh(fC(e,BB)),0);u.b!=u.d.c;)0==(s=Gh(Cb(u),7)).b.c.length?(Hf(i=new bS,BB),i.j.a=s.j.a,i.j.b=s.j.b,tv(i,r),$y(i,Uq,yx(s,Uq)),tv(s,null)):tv(a,r);return $y(e,Uq,null),$y(e,wq,gX),lr(e,xH),$y(r,(HL(),AR),Gh(yx(e,AR),28)),$y(r,yR,Gh(yx(e,yR),86)),Td(t.b,0,r),r}function aL(t,e,n,r,i,o,a){var s,u,c,l,f,h;switch(f=n,lr(c=new wk(a),(AS(),_H)),$y(c,(DL(),jq),i),$y(c,(HL(),AR),(cS(),aB)),$y(c,qq,Gh(yx(t,mR),15)),!(u=Gh(yx(t,TR),10))&&(u=new Za(i.a/2,i.b/2)),$y(c,TR,u),tv(l=new bS,c),e!=cB&&e!=lB||(s=o!=(b_(),bD)?o:vD,f=r>0?iE(s):l_(iE(s)),$y(t,LR,f)),f.e){case 4:$y(c,(RL(),FU),(Hk(),vU)),$y(c,Nq,(Ox(),EV)),c.j.b=i.b,Hf(l,(uL(),yB)),l.i.b=u.b;break;case 2:$y(c,(RL(),FU),(Hk(),yU)),$y(c,Nq,(Ox(),xV)),c.j.b=i.b,Hf(l,(uL(),BB)),l.i.b=u.b;break;case 1:$y(c,Bq,(Mw(),cq)),c.j.a=i.a,Hf(l,(uL(),DB)),l.i.a=u.a;break;case 3:$y(c,Bq,(Mw(),sq)),c.j.a=i.a,Hf(l,(uL(),wB)),l.i.a=u.a}if(e==oB||e==sB||e==aB){switch(h=0,f.e){case 4:case 2:h=null.cd,e==sB&&(h/=null.cd);break;case 1:case 3:h=null.cd,e==sB&&(h/=null.cd)}$y(c,tU,h)}return $y(c,Iq,f),c}function sL(t){var e,n,r,i,o,a,s,u,c,l,f,h,d,p,g,v,b,y,w;for(c=new Br,ml(),dg(b=new _r,t,MS(t)),kw(2,JP),r=new sw(2),t.c&&Oh(r,t.c),t.d&&Oh(r,t.d),d=new $n(r);d.a1&&Ob(c,p,c.c.b,c.c),Lw(n)));p=g}return c}function uL(){var t;uL=r,RB=new gs(kI,0),wB=new gs("NORTH",1),yB=new gs("EAST",2),DB=new gs("SOUTH",3),BB=new gs("WEST",4),Dg(),kB=new $o(new qh(t=Gh(na(qB),11),Gh(_p(t,t.length),11),0)),SB=L_(Wd(wB,_x(Oo(qB,1),CP,32,0,[]))),mB=L_(Wd(yB,_x(Oo(qB,1),CP,32,0,[]))),IB=L_(Wd(DB,_x(Oo(qB,1),CP,32,0,[]))),MB=L_(Wd(BB,_x(Oo(qB,1),CP,32,0,[]))),OB=L_(Wd(wB,_x(Oo(qB,1),CP,32,0,[DB]))),EB=L_(Wd(yB,_x(Oo(qB,1),CP,32,0,[BB]))),PB=L_(Wd(wB,_x(Oo(qB,1),CP,32,0,[BB]))),CB=L_(Wd(wB,_x(Oo(qB,1),CP,32,0,[yB]))),jB=L_(Wd(DB,_x(Oo(qB,1),CP,32,0,[BB]))),xB=L_(Wd(yB,_x(Oo(qB,1),CP,32,0,[DB]))),NB=L_(Wd(wB,_x(Oo(qB,1),CP,32,0,[yB,BB]))),_B=L_(Wd(yB,_x(Oo(qB,1),CP,32,0,[DB,BB]))),LB=L_(Wd(wB,_x(Oo(qB,1),CP,32,0,[DB,BB]))),TB=L_(Wd(wB,_x(Oo(qB,1),CP,32,0,[yB,DB]))),AB=L_(Wd(wB,_x(Oo(qB,1),CP,32,0,[yB,DB,BB])))}function cL(t,e){var n,r,i,o,a,s,u,c,l,f,h,d,p,g;if(hl(new $n(iS(t.e)))){for(s=new $n(iS(t.e));s.a1)for(Oh(o,new mO(d,y,n)),f=new Yn(new zn(y.a).a.bb().mb());f.a.G();)c=Gh(f.a.H(),21),Dy(i,Gh(c.yb(),27).b);if(a.a.Y()>1)for(Oh(o,new mO(d,a,n)),f=new Yn(new zn(a.a).a.bb().mb());f.a.G();)c=Gh(f.a.H(),21),Dy(i,Gh(c.yb(),27).b)}}function hL(t,e){var n,r,i,o,a,s,u,c,l;switch(yb(o=qb(Fh(e,new Wh(t))),new Qt),(i=t.b).c){case 2:mp(e,new RC(r=VT(t,a=am(n=jc(Fh(o,new _n(i.a))))?Gh(ky(n),91).b:15,am(n=jc(Fh(o,new _n(Tk(i)))))?Gh(ky(n),91).b:15,am(n=jc(Fh(o,new _n(i.b))))?Gh(ky(n),91).b:15),t.c,t.e,t.a.c.f,i.a)),mp(e,new RC(r,t.c,t.e,t.a.c.f,Tk(i))),mp(e,new RC(r,t.c,t.e,t.a.c.f,i.b));break;case 1:mp(e,new RC(r=RT(t,a=am(n=jc(Fh(o,new _n(i.a))))?Gh(ky(n),91).b:15,am(n=jc(Fh(o,new _n(i.b))))?Gh(ky(n),91).b:15),t.c,t.e,t.a.c.f,i.a)),mp(e,new RC(r,t.c,t.e,t.a.c.f,i.b));break;case 0:a=am(n=jc(Fh(o,new _n(i.a))))?Gh(ky(n),91).b:15,s=t.b,u=function(t,e,n){var r,i,o,a,s,u,c,l,f;return r=$k(t.g),c=Lf(yc(t.i),t.a),l=Lf(yc(e.i),e.a),i=Lf(new Uu(c),il(new pp(r),n)),f=Lf(new Uu(l),il(new pp(r),n)),a=il(Pf(new Uu(i),f),.5),u=Lf(Lf(new Uu(f),a),il(new pp(r),Lu(a.a*a.a+a.b*a.b))),o=BS(s=new ig(_x(Oo(nD,1),RI,10,0,[c,i,u,f,l])),.5,!1),s.a=o,fr(s,new SC(_x(Oo(nD,1),RI,10,0,[o,c,l]))),s}(t.a.c,t.a.d,a),lm(t.a.a,NE(u)),c=QS(t.a.b,u.a,s),Ug(l=new Pb((!u.k&&(u.k=new lC(fm(u))),u.k))),mp(e,new RC(r=c?zp(l,c):l,t.c,t.e,t.a.c.f,i.a));break;default:throw new io("The loopside must be defined.")}return r}function dL(t,e,n){var r,i,o,a,s,u,c,l,f,h,d,p,g,v,b,y,w,m;for(a=new $n(t.a.c);a.a0)if(r=l.Y(),u=pv(Math.floor((r+1)/2))-1,i=pv(Math.ceil((r+1)/2))-1,e.k==cY)for(c=i;c>=u;c--)e.a[w.k]==w&&(p=Gh(l.sb(c),27),d=Gh(p.a,9),!xa(n,p.b)&&h>t.b.e[d.k]&&(e.a[d.k]=w,e.f[w.k]=e.f[d.k],e.a[w.k]=e.f[w.k],h=t.b.e[d.k]));else for(c=u;c<=i;c++)e.a[w.k]==w&&(v=Gh(l.sb(c),27),g=Gh(v.a,9),!xa(n,v.b)&&h0||n.k==cY&&iv?d:v):n.n[e.k]=r>(d>v?d:v)?r:d>v?d:v)):(g=t.d.f,p=dm(t,n.i[e.k]),h=dm(t,n.i[f.k]),n.k==cY?Fv(p,h,no(n.n[e.k])+no(n.d[a.k])+a.j.b+a.e.a+g-(no(n.n[f.k])+no(n.d[c.k])-c.e.d)):Fv(p,h,no(n.n[e.k])+no(n.d[a.k])-a.e.d-no(n.n[f.k])-no(n.d[c.k])-c.j.b-c.e.a-g))):v=t.e.Ic(v,e,a),a=n.a[a.k]}while(a!=e);!function(t,e){mp(t.b,e)}(t.e,e)}}function yL(t,e,n,r){var i,o,a,s,u,c,l,f,h,d,p,g,v,b;if(h=!1,f=!1,zs(Gh(yx(r,(HL(),AR)),28))){a=!1,s=!1;t:for(p=new $n(r.f);p.a=r.j.b/2}b?(v=Gh(yx(r,(DL(),pU)),20))?h?o=v:(i=Gh(yx(r,_q),20))?o=v.Y()<=i.Y()?v:i:(o=new je,$y(r,_q,o)):(o=new je,$y(r,pU,o)):(i=Gh(yx(r,(DL(),_q)),20))?f?o=i:(v=Gh(yx(r,pU),20))?o=i.Y()<=v.Y()?i:v:(o=new je,$y(r,pU,o)):(o=new je,$y(r,_q,o)),o.ib(t),$y(t,(DL(),Eq),n),e.d==n?(nv(e,null),n.b.c.length+n.e.c.length==0&&tv(n,null)):(rv(e,null),n.b.c.length+n.e.c.length==0&&tv(n,null)),Cg(e.a)}function wL(t,e){var n,r,i,o,a,s,u,c,l,f,h,d,p,g,v,b,y;for((n=new yk(e)).a||function(t){var e,n,r,i,o;switch(i=Gh(ld(t.b,0),9),e=new wk(t),Oh(t.b,e),e.j.a=Ro(1,i.j.a),e.j.b=Ro(1,i.j.b),e.i.a=i.i.a,e.i.b=i.i.b,Gh(yx(i,(DL(),Iq)),32).e){case 4:e.i.a+=2;break;case 1:e.i.b+=2;break;case 2:e.i.a-=2;break;case 3:e.i.b-=2}tv(r=new bS,e),rv(n=new Og,o=Gh(ld(i.f,0),7)),nv(n,r),Lf(Au(r.i),o.i),Lf(Au(r.a),o.a)}(e),c=function(t){var e,n,r,i,o,a,s;for(s=new Eb,a=new $n(t.b);a.a=s.b.c)&&(s.b=e),(!s.c||e.c<=s.c.c)&&(s.d=s.c,s.c=e),(!s.e||e.d>=s.e.d)&&(s.e=e),(!s.f||e.d<=s.f.d)&&(s.f=e);return r=new ik((Pm(),oH)),Ab(t,dH,new Kn(_x(Oo(iH,1),kP,160,0,[r]))),a=new ik(uH),Ab(t,hH,new Kn(_x(Oo(iH,1),kP,160,0,[a]))),i=new ik(aH),Ab(t,fH,new Kn(_x(Oo(iH,1),kP,160,0,[i]))),o=new ik(sH),Ab(t,lH,new Kn(_x(Oo(iH,1),kP,160,0,[o]))),QT(r.c,oH),QT(i.c,aH),QT(o.c,sH),QT(a.c,uH),s.a.c=Ey(fM,kP,1,0,4,1),Jm(s.a,r.c),Jm(s.a,km(i.c)),Jm(s.a,o.c),Jm(s.a,km(a.c)),s}(c)),n}function mL(t,e){var n,r,i,o,a,s,u,c,l,f,h,d,p,g,v,b,y,w,m,x,_,E,k,S,C;return f=function(t,e){var n,r,i,o,a,s,u,c,l,f,h;if(t.V())return new ao;for(u=0,l=0,r=t.mb();r.G();)u=Ro(u,(i=Gh(r.H(),55).e).a),l+=i.a*i.b;for(u=Ro(u,Math.sqrt(l)*Gh(yx(Gh(t.mb().H(),55),(DL(),gq)),15).a),f=0,h=0,s=0,n=e,a=t.mb();a.G();)f+(c=(o=Gh(a.H(),55)).e).a>u&&(f=0,h+=s+e,s=0),KA(o,f,h),n=Ro(n,f+c.a),s=Ro(s,c.b),f+=c.a+e;return new Za(n+e,h+s+e)}(ll(t,(uL(),kB)),e),p=Ek(ll(t,SB),e),m=Ek(ll(t,IB),e),k=kk(ll(t,MB),e),h=kk(ll(t,mB),e),y=Ek(ll(t,PB),e),g=Ek(ll(t,CB),e),_=Ek(ll(t,jB),e),x=Ek(ll(t,xB),e),S=kk(ll(t,EB),e),b=Ek(ll(t,OB),e),w=Ek(ll(t,NB),e),E=Ek(ll(t,_B),e),C=kk(ll(t,LB),e),d=kk(ll(t,TB),e),v=Ek(ll(t,AB),e),n=ww(_x(Oo($X,1),dP,26,12,[y.a,k.a,_.a,C.a])),r=ww(_x(Oo($X,1),dP,26,12,[p.a,f.a,m.a,v.a])),i=b.a,o=ww(_x(Oo($X,1),dP,26,12,[g.a,h.a,x.a,d.a])),c=ww(_x(Oo($X,1),dP,26,12,[y.b,p.b,g.b,w.b])),u=ww(_x(Oo($X,1),dP,26,12,[k.b,f.b,h.b,v.b])),l=S.b,s=ww(_x(Oo($X,1),dP,26,12,[_.b,m.b,x.b,E.b])),dy(ll(t,kB),n+i,c+l),dy(ll(t,AB),n+i,c+l),dy(ll(t,SB),n+i,0),dy(ll(t,IB),n+i,c+l+u),dy(ll(t,MB),0,c+l),dy(ll(t,mB),n+i+r,c+l),dy(ll(t,CB),n+i+r,0),dy(ll(t,jB),0,c+l+u),dy(ll(t,xB),n+i+r,c+l+u),dy(ll(t,EB),0,c),dy(ll(t,OB),n,0),dy(ll(t,_B),0,c+l+u),dy(ll(t,TB),n+i+r,0),(a=new ao).a=ww(_x(Oo($X,1),dP,26,12,[n+r+i+o,S.a,w.a,E.a])),a.b=ww(_x(Oo($X,1),dP,26,12,[c+u+l+s,b.b,C.b,d.b])),a}function xL(t,e){var n,r,i,o,a,s,u,c,l,f,h,d,p,g;if(r=new Br,c=null,(d=(p=t.c).f.g)!=(AS(),SH)&&d!=CH)throw new io("The target node of the edge must be a normal node or a northSouthPort.");for(d==CH&&(h=Gh(yx(p,(DL(),Uq)),7),c=new Za(Gm(_x(Oo(nD,1),RI,10,0,[h.f.i,h.i,h.a])).a,Gm(_x(Oo(nD,1),RI,10,0,[p.f.i,p.i,p.a])).b),p=h),os(r,Gm(_x(Oo(nD,1),RI,10,0,[p.f.i,p.i,p.a]))),a=Ro(5,xE(p.f,p.g)),(f=new pp($k(p.g))).a*=a,f.b*=a,Nh(r,Lf(f,Gm(_x(Oo(nD,1),RI,10,0,[p.f.i,p.i,p.a])))),c&&Ob(r,c,r.c.b,r.c),o=t,u=t,s=null,n=!1;o;)0!=(i=o.a).b&&(n?(Nh(r,il(Lf(s,(Nc(0!=i.b),Gh(i.a.a.c,10))),.5)),n=!1):n=!0,s=yc((Nc(0!=i.b),Gh(i.c.b.c,10))),lm(r,i),Cg(i)),u=o,o=Gh(Wu(uv(e.d,o)),12);(g=u.d).f.g==CH&&(h=Gh(yx(g,(DL(),Uq)),7),Nh(r,new Za(Gm(_x(Oo(nD,1),RI,10,0,[h.f.i,h.i,h.a])).a,Gm(_x(Oo(nD,1),RI,10,0,[g.f.i,g.i,g.a])).b)),g=h),a=Ro(5,xE(g.f,g.g)),il(f=new pp($k(g.g)),a),Nh(r,Lf(f,Gm(_x(Oo(nD,1),RI,10,0,[g.f.i,g.i,g.a])))),os(r,Gm(_x(Oo(nD,1),RI,10,0,[g.f.i,g.i,g.a]))),l=new FN(r),lm(t.a,NE(l))}function _L(t){var e,n,r,i,o,a,s,u,c,l,f,d,p,g;if(Xu(yx(t.c,(HL(),AR)))===Xu((cS(),sB))||Xu(yx(t.c,AR))===Xu(aB))for(l=new $n(t.c.f);l.a1&&(a=Ho(a,ka(Gh(tk(s.a,1),10).b-l.b)))));else for(p=new $n(e.f);p.ai&&(o=h.a-i,a=iP,r.c=Ey(fM,kP,1,0,4,1),i=h.a),h.a>=i&&(r.c[r.c.length]=s,s.a.b>1&&(a=Ho(a,ka(Gh(tk(s.a,s.a.b-2),10).b-h.b)))));if(0!=r.c.length&&o>e.j.a/2&&a>e.j.b/2){for(tv(d=new bS,e),Hf(d,(uL(),wB)),d.i.a=e.j.a/2,tv(g=new bS,e),Hf(g,DB),g.i.a=e.j.a/2,g.i.b=e.j.b,u=new $n(r);u.a=c.b?rv(s,g):rv(s,d)):(c=Gh(mh(s.a),10),(0==s.a.b?Iv(s.c):Gh(Bl(s.a),10)).b>=c.b?nv(s,g):nv(s,d)),(f=Gh(yx(s,(HL(),fR)),44))&&dE(f,c,!0);e.i.a=i-e.j.a/2}}function kL(t,e){var n,r,i,o,a,s,u,c,l,f,h,d,p,g,v,b,y,w;for(b=new je,y=new je,w=new je,o=new $n(e);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&&(Jm(b,y),y.c=Ey(fM,kP,1,0,4,1)),0!=b.c.length&&ql(ic(t.a),(pL(),RY))&&ql(ic(t.a),(pL(),GY))?function(t,e){var n,r,i;for(r=new $n(e);r.a1&&(oC(i,g=Gh(Sw(u),60),!0),ap(l),Zg(t.a,g))}for(h=w.c.length,r=function(t){var e,n,r,i;switch(oc(t.a).c){case 4:return pL(),GY;case 3:return Gh(Zv(t.a).mb().H(),60);case 2:return e=Gh(Kb(n=new Ys(r=oc(t.a))),60),i=Gh(Kb(n),60),oA(e)==i?ql(r,(pL(),GY))?IY:GY:iA(iA(e))==i?iA(e):aA(e);case 1:return oA(Gh(Kb(new Ys(r=oc(t.a))),60));case 0:return pL(),HY;default:return null}}(t),d=new je,a=h/rc(t.a).c|0,s=0;s3&&(Jm(d,(pL(),pL(),LY)),p-=4),p){case 3:Oh(d,oA(r));case 2:v=iA(oA(r));do{v=iA(v)}while(!ql(ic(t.a),v));d.c[d.c.length]=v,v=aA(oA(r));do{v=aA(v)}while(!ql(ic(t.a),v));d.c[d.c.length]=v;break;case 1:Oh(d,oA(r))}for(f=new $n(d),c=new $n(w);f.a0,v=w.e.c.length>0,c&&v?h.c[h.c.length]=w:c?p.c[p.c.length]=w:v&&(y.c[y.c.length]=w);for(d=new $n(p);d.a=g&&(w>g&&(p.c=Ey(fM,kP,1,0,4,1),g=w),p.c[p.c.length]=a);0!=p.c.length&&(d=Gh(ld(p,Yk(e,p.c.length)),77),A.a.eb(d),d.i=v++,KT(d,C,E),p.c=Ey(fM,kP,1,0,4,1))}for(x=t.c.length+1,s=new $n(t);s.aT.i&&(ng(n),Dy(T.d,r),r.c>0&&(r.a=T,Oh(T.j,r),r.b=k,Oh(k.d,r)))}function AL(t){switch(t.e){case 14:return new W;case 37:return new K;case 8:return new Ki;case 30:return new Zi;case 38:return new Q;case 3:return new J;case 47:case 1:return new gn((Nx(),GH));case 4:return new tt;case 49:return new et;case 23:return new te;case 13:return new nt;case 34:return new it;case 40:return new ot;case 35:return new ut;case 44:return new zc;case 28:return new ct;case 39:return new lt;case 27:return new ft;case 6:return new ht;case 31:return new vt;case 9:return new Ee;case 43:return new yt;case 17:return new wt;case 18:return new _t;case 29:return new ke;case 11:return new Ot;case 12:return new kt;case 36:return new St;case 46:case 0:return new gn((Nx(),BH));case 41:return new Tt;case 15:return new At;case 33:return new Nt;case 42:return new Pt;case 22:return new It;case 19:return new gt;case 10:return new Ct;case 7:return new Mt;case 24:return new Dt;case 21:return new Rt;case 16:return new Gt;case 45:return new Ht;case 26:return new Ft;case 20:return new zt;case 25:return new Yt;case 5:return new Kt;case 32:return new Zt;case 48:case 2:return new gn((Nx(),RH));default:throw new io("No implementation is available for the layout processor "+(null!=t.d?t.d:""+t.e))}}function NL(t,e,n){var r,i,o,a,s,u,c,l,f,h,d,p,g,v,b,y,w,m,x,_,E,k,S,C,T,A,N;for(T=0,o=0,l=e[0].d,E=n[0].d,d=0,g=n.length;d0;){for(Nc(_.b>0),x=0,i=new $n((w=Gh(_.a.sb(_.c=--_.b),7)).b);i.a0&&(w.g==(uL(),wB)?(t.a[w.k]=T,++T):(t.a[w.k]=T+b+y,++y),o+=x)}T+=y}else{for(v=0,m=new $n(f.f);m.a0&&(++T,o+=v)}for(k=Ey(UX,nI,26,o,12,1),s=0,h=0,p=e.length;h0;)u%2>0&&(r+=A[u+1]),++A[u=(u-1)/2|0];return r}function OL(t,e){var n,r,i,o,a,s,u,c,l,f,h,d,p,g,v,b,y,w,m,x,_,E,k,S,C,T,A,N,O;for(jE(e,"Compound graph postprocessor",1),n=eo(no(Af(yx(t,(RL(),CU))))),s=Gh(yx(t,(DL(),Tq)),144),f=new Qi,_=s.W().mb();_.G();){for(x=Gh(_.H(),12),yb(a=new hh(s.U(x)),new an(t)),C=om((my(0,a.c.length),Gh(a.c[0],114))),A=im(Gh(ld(a,a.c.length-1),114)),Cg(x.a),k=C.f,E=N_(A.f,k)?Gh(yx(k,Vq),55):Vp(k),p=Gh(yx(x,(HL(),fR)),44),Ed(a,yH)?p?Cg(p):(p=new Br,$y(x,fR,p)):p&&$y(x,fR,null),v=null,o=new $n(a);o.acj,O=ka(v.b-w.b)>cj,(!n&&N&&O||n&&(N||O))&&Nh(x.a,S)),lm(x.a,r),0==r.b?v=S:(Nc(0!=r.b),v=Gh(r.c.b.c,10)),(y=Gh(yx(b,fR),44))&&(Rx(d=new Br,0,y),Nm(d,m),lm(p,d)),im(i)==A&&(Vp(A.f)!=i.a&&xT(m=new ao,Vp(A.f),E),$y(x,dU,m)),g=new Uv(b.b,0);g.b(C=Gh(yx(n,(DL(),nU)),24).a)?f:C;for(r=new $n(k.e);r.a(C=Gh(yx(n,(DL(),nU)),24).a)?E:C}$y(w,Wz,F_(f)),$y(w,$z,F_(E))}for(v=0,h=new $n(e.c);h.a=0){for(u=null,s=new Uv(l.a,c+1);s.b1){x=Ey(wX,ZL,15,t.a.length,0,1),c=Al(t.a.length),p=0,d=0,n=2*e.d.a.c.length+1;t:for(m=new $n(e.f);m.a0?(x[w.k]=new Gn(C/(w.b.c.length+w.e.c.length)),p=Fo(p,x[w.k].a),d=Bo(d,x[w.k].a)):v&&(x[w.k]=new Gn(C))}for(g=(e.d?Ky(e.d.a,e,0):-1)+1,h=e.d.a.c.length+1,u=new $n(c);u.an&&g.a.db(w,g);for(A=new Qi,v=new Qi,x=new Yn(new zn(T.a).a.bb().mb());x.a.G();)for(f=Gh(x.a.H(),21),w=Gh(f.yb(),9),a=1==e?H_(w):G_(w),qc(),c=new Pc(Mc(zh(a.a,new h)));X_(c);)u=Gh(xv(c),12),Nu(w.d)!=Nu(u.d.f.d)&&mp(A,u.d.f);for(_=new Yn(new zn(g.a).a.bb().mb());_.a.G();)for(f=Gh(_.a.H(),21),w=Gh(f.yb(),9),a=1==e?H_(w):G_(w),qc(),c=new Pc(Mc(zh(a.a,new h)));X_(c);)u=Gh(xv(c),12),Nu(w.d)!=Nu(u.d.f.d)&&mp(v,u.d.f);for(DH&&Ih(),S=Gh(ld(t.d.c.c,r+(1==e?1:-1)),16),b=lP,y=iP,d=0;dd?b:d:v.a.R(w)&&(y=y1||Xp(dc(new ib(P_(_x(Oo(fM,1),kP,1,4,[y.b,y.e])))))>1)&&i.ib((YA(),VV)),Xu(yx(p,(RL(),OU)))===Xu((sb(),jz))&&!(GI in e.a)){n=new Br;try{for(s=_g(e,GI).hc(),o=0;o0&&(t.a[G.k]=W++)}else{for(I=0,H=new $n(C.f);H.a0&&++W}for(J=0,N=0,P=n.length;N0;){for(Nc(Y.b>0),z=0,s=new $n((G=Gh(Y.a.sb(Y.c=--Y.b),7)).b);s.a0&&(G.g==(uL(),wB)?(t.a[G.k]=J,++J):(t.a[G.k]=J+j+D,++D))}J+=D}else{for(I=0,H=new $n(C.f);H.a0&&++J}for(ml(),F=new _r,d=new Oc,T=0,O=e.length;Tc.b&&(c.b=V)):G.f.d==X&&(Vc.c&&(c.c=V));for(Mk(p,0,p.length,(Qs(),Qs(),NX)),Q=Ey(UX,nI,26,p.length,12,1),r=Ey(UX,nI,26,J+1,12,1),v=0;v0;)_%2>0&&(i+=nt[_+1]),++nt[_=(_-1)/2|0];for(k=Ey(Vz,kP,156,2*p.length,0,1),w=0;w0&&(45==t.charCodeAt(0)||43==t.charCodeAt(0))?1:0;eiP)throw new Wo(cP+t+'"');return i}((oi(),""+n.jc().a))),void $y(t,h,g)}catch(t){throw fl(t=Qx(t),130)?new Fi("Invalid integer format for property '"+e+WI+n+")."):A_(t)}else{if(Gh(DG.a,18).kb(e)){if(!n.ic())throw new Fi(XI+e+WI+n+").");return h=Gh(Gh(DG.b,57).cb(e),79),Hd(),void $y(t,h,g=n.ic().a?vX:gX)}if(Gh(GG.a,18).kb(e)){if(!n.jc())throw new Fi("Invalid float format for property '"+e+WI+n+").");return void $y(t,h=Gh(Gh(GG.b,57).cb(e),79),g=new Bn(n.jc().a))}if(Gh(BG.a,18).kb(e)){if(!n.lc())throw new Fi($I+e+WI+n+").");c=n.lc().a,l=null;try{n_((HL(),LR),e)?(uL(),l=Gh(u_((ly(),HB),c),32)):n_(WD,e)?(ok(),l=Gh(u_((Oy(),dD),c),103)):n_(eR,e)?(b_(),l=Gh(u_((cy(),mD),c),59)):n_(rR,e)?(y_(),l=Gh(u_((Hb(),PD),c),122)):n_(uR,e)?(w_(),l=Gh(u_((vb(),qD),c),166)):n_(_R,e)||n_(ER,e)||n_(kR,e)||n_(SR,e)||n_(CR,e)?(EE(),l=Gh(u_((fy(),iB),c),100)):n_(AR,e)?(cS(),l=Gh(u_((Py(),hB),c),28)):n_(OR,e)?(jw(),l=Gh(u_((gb(),bB),c),149)):n_(iR,e)?(TS(),l=Gh(u_((Ly(),HD),c),133)):n_(nR,e)?(Im(),l=Gh(u_((Gb(),CD),c),107)):n_((RL(),LU),e)?(Bg(),l=Gh(u_((jv(),yz),c),193)):n_(qU,e)?(lw(),l=Gh(u_((bb(),Sz),c),173)):n_(jU,e)?(fS(),l=Gh(u_((pw(),LV),c),115)):n_(TU,e)?(Dw(),l=Gh(u_((Yb(),gY),c),194)):n_(OU,e)?(sb(),l=Gh(u_((Dv(),Dz),c),192)):n_(XU,e)?(UT(),l=Gh(u_((hw(),$F),c),109)):n_(UU,e)?(Gk(),l=Gh(u_((dw(),rY),c),141)):n_(ZU,e)?(aC(),l=Gh(u_((Iy(),uz),c),125)):n_(QU,e)?(kb(),l=Gh(u_((Mv(),tz),c),175)):n_(BU,e)?(SS(),l=Gh(u_((Qw(),GV),c),124)):n_(GU,e)?(hO(),l=Gh(u_((Mm(),aq),c),110)):n_(FU,e)?(Hk(),l=Gh(u_((gw(),xU),c),85)):n_(eX,e)?(CE(),l=Gh(u_((Ay(),uX),c),153)):n_(rX,e)?(jm(),l=Gh(u_((Ny(),dX),c),172)):n_(HU,e)&&(ob(),l=Gh(u_((Vb(),pq),c),174))}catch(t){throw fl(t=Qx(t),54)?new Fi($I+e+WI+n+")."):A_(t)}return void $y(t,h=Gh(Gh(BG.b,57).cb(e),79),l)}if(Gh(RG.a,18).kb(e)){if(!n.lc())throw new Fi($I+e+WI+n+").");for(d=null,a=0,s=(u=ON(n.lc().a,"[\\[\\]\\s,]+")).length;a0&&vx(e.charCodeAt(n-1),hI);)--n;if(r>=n)throw new io("The given string does not contain any numbers.");if(2!=(i=ON(e.substr(r,n-r),",|;|\r|\n")).length)throw new io("Exactly two numbers are expected, "+i.length+" were found.");try{t.a=kS(sS(i[0])),t.b=kS(sS(i[1]))}catch(t){throw fl(t=Qx(t),130)?new io(dI+t):A_(t)}}(p=new ao,n.lc().a),void $y(t,h=Gh(Gh(zG.b,57).cb(e),79),p)}catch(t){throw fl(t=Qx(t),29)?new Fi("Invalid KVector format for property '"+e+"' "+n+"."):A_(t)}else if(n_(ZD,e)||n_(fR,e))try{return function(t,e){var n,r,i,o,a;r=ON(e,",|;|\\(|\\)|\\[|\\]|\\{|\\}| |\t|\n"),Cg(t);try{for(n=0,o=0,i=0,a=0;n0&&(o%2==0?i=kS(r[n]):a=kS(r[n]),o>0&&o%2!=0&&Nh(t,new Za(i,a)),++o),++n}catch(t){throw fl(t=Qx(t),130)?new io("The given string does not match the expected format for vectors."+t):A_(t)}}(v=new Br,n.lc().a),void $y(t,h=Gh(Gh(zG.b,57).cb(e),79),v)}catch(t){throw fl(t=Qx(t),29)?new Fi("Invalid KVectorChain format for property '"+e+"' "+n+"."):A_(t)}else if(n_(gR,e)||n_(UD,e))try{return function(t,e){var n,r,i,o,a,s,u,c;for(o=0;o<(oi(),e.length)&&bx(e.charCodeAt(o),fI);)++o;for(n=e.length;n>0&&bx(e.charCodeAt(n-1),hI);)--n;if(o1?Av(this,t-1):this,e},zL.Pc=function(){return Gf(this),this.b},zL.Qc=function(){return ta(this)},zL.Rc=function(){return ea(this)},zL.Sc=function(){return 0!=(4&this.g)},zL.Tc=function(){return 0!=(1&this.g)},zL.w=function(){return(0!=(2&this.g)?"interface ":0!=(1&this.g)?"":"class ")+(Gf(this),this.n)},zL.g=0;var lM;FT(119,72,{3:1,119:1,54:1,46:1},Yr),FT(29,72,uP,Vr,io),FT(95,72,JL,qr,ro),FT(231,1,{3:1,231:1}),FT(24,231,{3:1,23:1,24:1,231:1},Ln),zL.F=function(t){return function(t,e){return Rc(t.a,e.a)}(this,Gh(t,24))},zL.t=function(t){return fl(t,24)&&Gh(t,24).a==this.a},zL.v=function(){return this.a},zL.w=function(){return aa(this.a)},zL.a=0,$L={3:1,345:1,23:1,2:1},FT(350,1,fP,ie),zL.$b=function(t,e){return function(t,e){return yg((oi(),t.toLowerCase()),e.toLowerCase())}(Of(t),Of(e))},FT(257,95,JL,(function(t){ro.call(this,t)})),FT(145,1,{23:1,145:1}),zL.F=function(t){return gc(this,Gh(t,145))},zL.t=function(t){var e;return t===this||!!fl(t,145)&&(e=Gh(t,145),Mi(this.a,e.a))},zL.v=function(){return ak(this.a)},zL.w=function(){return this.a},FT(358,29,uP,(function(t){io.call(this,(oi(),null==t?tP:t))})),FT(256,29,{3:1,54:1,29:1,46:1,256:1},(function(t){io.call(this,(oi(),null==t?tP:t))})),FT(185,145,hP),FT(289,185,hP,Xo),zL.Zc=function(t,e,n){var r,i;for(r=Ey(WX,dP,26,n,12,1),i=0;in)throw new ro(pP)}for(a=Ey(WX,dP,26,o,12,1),l=0,s=0,u=0;u0;){if(128!=(192&(r=t[e+u++])))throw new io("Invalid UTF8 sequence at "+(e+u-1)+", byte="+(r>>>0).toString(16));i=i<<6|63&r}l+=qk(i,a,l)}return a};var fM=Pp(vP,"Object",1),hM=Pp(vP,"Throwable",46),dM=(Pp(vP,"Exception",54),Pp(vP,"RuntimeException",72),Pp(bP,"JavaScriptException",164),Pp(yP,"StackTraceCreator/Collector",642),Pp(yP,"StackTraceCreator/CollectorLegacy",356),Pp(yP,"StackTraceCreator/CollectorModern",643),Pp(yP,"StackTraceCreator/CollectorModernNoSourceMap",357),Pp(wP,"IOException",181),Pp(wP,"UnsupportedEncodingException",351),Pp(vP,"Class",288),Pp(vP,"ClassCastException",119),Pp(vP,"IllegalArgumentException",29),Pp(vP,"IndexOutOfBoundsException",95),Pp(vP,"Number",231),Pp(vP,"Integer",24)),pM=Pp(vP,"String",2);Pp(vP,"String/1",350),Pp(vP,"StringIndexOutOfBoundsException",257),Pp(mP,"Charset",145),Pp(mP,"IllegalCharsetNameException",358),Pp(mP,"UnsupportedCharsetException",256),Pp(xP,"EmulatedCharset",185),Pp(xP,"EmulatedCharset/LatinCharset",289),Pp(xP,"EmulatedCharset/UtfCharset",355);FT(669,1,{3:1});var gM;Pp(_P,"Optional",669);FT(601,669,{3:1},a),zL.t=function(t){return t===this},zL.v=function(){return 2040732332},zL.w=function(){return"Optional.absent()"},zL.A=function(t){return Od(t),ai(),gM};Pp(_P,"Absent",601);var vM=yd(_P,"Function");FT(208,1,{},oo),zL.C=function(t){return Ap(t)};Pp(_P,"Joiner",208);FT(363,208,{},Xh),zL.C=function(t){return El(this,t)};Pp(_P,"Joiner/1",363);FT(362,1,{},tf);Pp(_P,"Joiner/MapJoiner",362);var bM,yM=yd(_P,"Predicate");FT(244,1,{68:1,244:1,3:1},De),zL.D=function(t){var e;for(e=0;e0},zL.H=function(){if(this.b>=this.c)throw new xi;return ra(this,this.b++)},zL.L=function(){return this.b},zL.M=function(){if(this.b<=0)throw new xi;return ra(this,--this.b)},zL.N=function(){return this.b-1},zL.b=0,zL.c=0;Pp(NP,"AbstractIndexedListIterator",378);FT(428,108,AP),zL.G=function(){return am(this)},zL.H=function(){return ky(this)},zL.d=1;Pp(NP,"AbstractIterator",428);FT(653,1,{144:1}),zL.P=function(){return this.f||(this.f=this.S())},zL.T=function(){return new Na(this.P())},zL.t=function(t){return Bx(this,t)},zL.v=function(){return this.P().v()},zL.V=function(){return 0==this.Y()},zL.W=function(){return Qd(this)},zL.w=function(){return this.P().w()};Pp(NP,"AbstractMultimap",653);FT(294,653,LP),zL.Q=function(){xk(this)},zL.R=function(t){return Vy(this.b,t)},zL.S=function(){return new Pa(this,this.b)},zL.T=function(){return new Ll(this,this.b)},zL.$=function(){return fl(t=this.Z(),137)?(Dg(),new Kl(Gh(t,137))):fl(t,18)?(Dg(),new $o(Gh(t,18))):fl(t,20)?sv(Gh(t,20)):(Dg(),new Jn(t));var t},zL.U=function(t){return GS(this,t)},zL.X=function(t){return $C(this,t)},zL.Y=function(){return this.c},zL.c=0;Pp(NP,"AbstractMapBasedMultimap",294);FT(600,294,LP),zL.Z=function(){return new sw(this.a)},zL.$=function(){return Qp(),Qp(),OM},zL.U=function(t){return Gh(GS(this,t),20)},zL.X=function(t){return Gh($C(this,t),20)},zL.P=function(){return this.f||(this.f=new Pa(this,this.b))},zL.t=function(t){return Bx(this,t)};Pp(NP,"AbstractListMultimap",600);FT(388,1,PP),zL.G=function(){return this.b.b||this.d.G()},zL.H=function(){var t;return this.d.G()||((t=zw(this.b)).yb(),this.a=Gh(t.zb(),19),this.d=this.a.mb()),this.d.H()},zL.I=function(){this.d.I(),this.a.V()&&Gy(this.b),--this.c.c};Pp(NP,"AbstractMapBasedMultimap/Itr",388);FT(389,388,PP,em);Pp(NP,"AbstractMapBasedMultimap/1",389);FT(638,1,IP),zL.Q=function(){this.bb().Q()},zL._=function(t){return eS(this,t)},zL.R=function(t){return!!DS(this,t,!1)},zL.ab=function(t){var e,n;for(e=this.bb().mb();e.G();)if(n=Gh(e.H(),21).zb(),Xu(t)===Xu(n)||null!=t&&e_(t,n))return!0;return!1},zL.t=function(t){return bC(this,t)},zL.cb=function(t){return Wu(DS(this,t,!1))},zL.v=function(){return fx(this.bb())},zL.V=function(){return 0==this.Y()},zL.W=function(){return new zn(this)},zL.db=function(t,e){throw new ko("Put not supported on this map")},zL.eb=function(t){return Wu(DS(this,t,!0))},zL.Y=function(){return this.bb().Y()},zL.w=function(){return WS(this)},zL.fb=function(){return new Vn(this)};Pp(jP,"AbstractMap",638);FT(654,638,IP),zL.bb=function(){return Jd(this)},zL.W=function(){return this.d||(this.d=new Na(this))},zL.fb=function(){return Gp(this)};Pp(NP,"Maps/ViewCachingAbstractMap",654);FT(262,654,IP,Pa),zL.cb=function(t){return function(t,e){var n;return(n=Gh(ek(t.a,e),19))?JE(t.b,e,n):null}(this,t)},zL.eb=function(t){return function(t,e){var n,r;return(n=Gh(qd(t.a,e),19))?((r=t.b.Z()).jb(n),t.b.c-=n.Y(),n.Q(),r):null}(this,t)},zL.Q=function(){this.a==this.b.b?xk(this.b):ip(new vv(this))},zL.R=function(t){return lk(this.a,t)},zL.hb=function(){return new Ge(this)},zL.gb=function(){return this.hb()},zL.t=function(t){return this===t||bC(this.a,t)},zL.v=function(){return fx(new Hn(this.a))},zL.W=function(){return Qd(this.b)},zL.Y=function(){return Bs(this.a)},zL.w=function(){return WS(this.a)};Pp(NP,"AbstractMapBasedMultimap/AsMap",262);FT(640,1,MP),zL.ib=function(t){return function(){throw new ko("Add not supported on this collection")}()},zL.jb=function(t){return lm(this,t)},zL.Q=function(){fg(this)},zL.kb=function(t){return dE(this,t,!1)},zL.lb=function(t){return Um(this,t)},zL.V=function(){return 0==this.Y()},zL.nb=function(t){return dE(this,t,!0)},zL.ob=function(){return this.pb(Ey(fM,kP,1,this.Y(),4,1))},zL.pb=function(t){return Qk(this,t)},zL.w=function(){return XS(this)};Pp(jP,"AbstractCollection",640);FT(641,640,DP),zL.t=function(t){return wE(this,t)},zL.v=function(){return fx(this)};Pp(jP,"AbstractSet",641);FT(649,641,DP);Pp(NP,"Sets/ImprovedAbstractSet",649);FT(655,649,DP),zL.Q=function(){this.qb().Q()},zL.kb=function(t){return LE(this,t)},zL.V=function(){return this.qb().V()},zL.nb=function(t){var e;return!!this.kb(t)&&(e=Gh(t,21),this.qb().W().nb(e.yb()))},zL.Y=function(){return this.qb().Y()};Pp(NP,"Maps/EntrySet",655);FT(387,655,DP,Ge),zL.kb=function(t){return fk(new Hn(this.a.a),t)},zL.mb=function(){return new vv(this.a)},zL.qb=function(){return this.a},zL.nb=function(t){var e;return!!fk(new Hn(this.a.a),t)&&(e=Gh(t,21),Wb(this.a.b,e.yb()),!0)};Pp(NP,"AbstractMapBasedMultimap/AsMap/AsMapEntries",387);FT(299,1,PP,vv),zL.H=function(){var t;return t=zw(this.b),this.a=Gh(t.zb(),19),function(t,e){var n;return n=e.yb(),ml(),new Ma(n,JE(t.b,n,Gh(e.zb(),19)))}(this.c,t)},zL.G=function(){return this.b.b},zL.I=function(){Gy(this.b),this.c.b.c-=this.a.Y(),this.a.Q()};Pp(NP,"AbstractMapBasedMultimap/AsMap/AsMapIterator",299);FT(260,649,DP,Na),zL.Q=function(){this.b.Q()},zL.kb=function(t){return this.b.R(t)},zL.V=function(){return this.b.V()},zL.mb=function(){return ml(),xh(this.b.bb().mb(),(Uc(),jM))},zL.nb=function(t){return!!this.b.R(t)&&(this.b.eb(t),!0)},zL.Y=function(){return this.b.Y()};Pp(NP,"Maps/KeySet",260);FT(386,260,DP,Ll),zL.Q=function(){ip(new ja(this,this.b.bb().mb()))},zL.lb=function(t){return this.b.W().lb(t)},zL.t=function(t){return this===t||this.b.W().t(t)},zL.v=function(){return this.b.W().v()},zL.mb=function(){return new ja(this,this.b.bb().mb())},zL.nb=function(t){var e,n;return n=0,(e=Gh(this.b.eb(t),19))&&(n=e.Y(),e.Q(),this.a.c-=n),n>0};Pp(NP,"AbstractMapBasedMultimap/KeySet",386);FT(300,1,PP,ja),zL.G=function(){return this.c.G()},zL.H=function(){return this.a=Gh(this.c.H(),21),this.a.yb()},zL.I=function(){var t;ux(!!this.a),t=Gh(this.a.zb(),19),this.c.I(),this.b.a.c-=t.Y(),t.Q()};Pp(NP,"AbstractMapBasedMultimap/KeySet/1",300);FT(216,640,MP,Sy),zL.ib=function(t){return function(t,e){var n,r;return $_(t),r=t.d.V(),(n=t.d.ib(e))&&(++t.f.c,r&&yh(t)),n}(this,t)},zL.jb=function(t){return function(t,e){var n,r,i;return!e.V()&&(i=t.Y(),(n=t.d.jb(e))&&(r=t.d.Y(),t.f.c+=r-i,0==i&&yh(t)),n)}(this,t)},zL.Q=function(){var t,e;0!=(e=(t=this).Y())&&(t.d.Q(),t.f.c-=e,up(t))},zL.kb=function(t){return $_(this),this.d.kb(t)},zL.lb=function(t){return $_(this),this.d.lb(t)},zL.t=function(t){return function(t,e){return e===t||($_(t),t.d.t(e))}(this,t)},zL.v=function(){return $_(this),this.d.v()},zL.mb=function(){return $_(this),new $h(this)},zL.nb=function(t){return function(t,e){var n;return $_(t),(n=t.d.nb(e))&&(--t.f.c,up(t)),n}(this,t)},zL.Y=function(){return $_(this),this.d.Y()},zL.w=function(){return $_(this),Bk(this.d)};Pp(NP,"AbstractMapBasedMultimap/WrappedCollection",216);var SM=yd(jP,"List");FT(297,216,RP,dp),zL.rb=function(t,e){var n;$_(this),n=this.d.V(),Gh(this.d,20).rb(t,e),++this.a.c,n&&yh(this)},zL.sb=function(t){return $_(this),Gh(this.d,20).sb(t)},zL.tb=function(){return $_(this),new Fc(this)},zL.ub=function(t){return $_(this),new Lg(this,t)},zL.vb=function(t){var e;return $_(this),e=Gh(this.d,20).vb(t),--this.a.c,up(this),e},zL.wb=function(t,e){return $_(this),Gh(this.d,20).wb(t,e)},zL.xb=function(t,e){return $_(this),pb(this.a,this.e,Gh(this.d,20).xb(t,e),this.b?this.b:this)};Pp(NP,"AbstractMapBasedMultimap/WrappedList",297);FT(385,297,BP,wf);Pp(NP,"AbstractMapBasedMultimap/RandomAccessWrappedList",385);FT(189,1,PP,$h),zL.G=function(){return cp(this),this.b.G()},zL.H=function(){return cp(this),this.b.H()},zL.I=function(){this.b.I(),--this.d.f.c,up(this.d)};Pp(NP,"AbstractMapBasedMultimap/WrappedCollection/WrappedIterator",189);FT(298,189,GP,Fc,Lg),zL.J=function(t){var e;e=0==function(t){return $_(t),t.d.Y()}(this.a),(cp(this),Gh(this.b,96)).J(t),++this.a.a.c,e&&yh(this.a)},zL.K=function(){return(cp(this),Gh(this.b,96)).K()},zL.L=function(){return(cp(this),Gh(this.b,96)).L()},zL.M=function(){return(cp(this),Gh(this.b,96)).M()},zL.N=function(){return(cp(this),Gh(this.b,96)).N()},zL.O=function(t){(cp(this),Gh(this.b,96)).O(t)};Pp(NP,"AbstractMapBasedMultimap/WrappedList/WrappedListIterator",298);FT(295,216,DP,_f);Pp(NP,"AbstractMapBasedMultimap/WrappedSet",295);FT(296,216,HP,Ef);Pp(NP,"AbstractMapBasedMultimap/WrappedSortedSet",296);FT(668,1,FP),zL.t=function(t){var e;return!!fl(t,21)&&(e=Gh(t,21),$p(this.yb(),e.yb())&&$p(this.zb(),e.zb()))},zL.v=function(){var t,e;return t=this.yb(),e=this.zb(),(null==t?0:V_(t))^(null==e?0:V_(e))},zL.Ab=function(t){throw new $r},zL.w=function(){return this.yb()+"="+this.zb()};Pp(NP,zP,668);FT(390,640,MP,He),zL.Q=function(){xk(this.a)},zL.kb=function(t){return function(t,e){var n;for(n=Zp(Gp(t.P()));n.b.G();)if(Gh(Lo(n,n.b.H()),19).kb(e))return!0;return!1}(this.a,t)},zL.mb=function(){return new em(this.a)},zL.Y=function(){return this.a.c};Pp(NP,"AbstractMultimap/Values",390);FT(656,640,YP),zL.ib=function(t){return this.Bb(t,1),!0},zL.Bb=function(t,e){throw new $r},zL.jb=function(t){return function(t,e){var n,r;if(Ar(),e.V())return!1;if(fl(e,207))for(r=Gh(e,207).bb().mb();r.G();)n=Gh(r.H(),83),t.Bb(n.Zb(),n.Yb());else Fw(t,e.mb());return!0}(this,t)},zL.Q=function(){ip(this.Eb())},zL.kb=function(t){return this.Cb(t)>0},zL.Cb=function(t){var e,n;for(n=Hp(this).mb();n.G();)if($p((e=Gh(n.H(),83)).Zb(),t))return e.Yb();return 0},zL.gb=function(){return new Fe(this)},zL.bb=function(){return Hp(this)},zL.t=function(t){return function(t,e){var n,r,i;if(Ar(),e===t)return!0;if(fl(e,207)){if(i=Gh(e,207),t.Y()!=i.Y()||Hp(t).Y()!=i.bb().Y())return!1;for(r=i.bb().mb();r.G();)if(n=Gh(r.H(),83),t.Cb(n.Zb())!=n.Yb())return!1;return!0}return!1}(this,t)},zL.v=function(){return Hp(this).v()},zL.V=function(){return Hp(this).V()},zL.mb=function(){return Ar(),new za(this,Hp(this).mb())},zL.nb=function(t){return this.Fb(t,1)>0},zL.Fb=function(t,e){throw new $r},zL.Gb=function(t,e){var n,r;return Ar(),kw(e,"count"),(r=e-(n=this.Cb(t)))>0?this.Bb(t,r):r<0&&this.Fb(t,-r),n},zL.Hb=function(t,e,n){return function(t,e,n,r){return Ar(),kw(n,"oldCount"),kw(r,"newCount"),t.Cb(e)==n&&(t.Gb(e,r),!0)}(this,t,e,n)},zL.Y=function(){return function(t){var e,n;for(Ar(),n=0,e=Hp(t).mb();e.G();)n=p_(n,Gh(e.H(),83).Yb());return iw(n)}(this)},zL.w=function(){return Bk(Hp(this))};Pp(NP,"AbstractMultiset",656);FT(657,649,DP),zL.Q=function(){this.Ib().Q()},zL.kb=function(t){var e;return!!fl(t,83)&&(!((e=Gh(t,83)).Yb()<=0)&&this.Ib().Cb(e.Zb())==e.Yb())},zL.nb=function(t){var e,n,r;return!(!fl(t,83)||(e=(n=Gh(t,83)).Zb(),0==(r=n.Yb())))&&this.Ib().Hb(e,r,0)};Pp(NP,"Multisets/EntrySet",657);FT(396,657,DP,Fe),zL.mb=function(){return this.a.Eb()},zL.Ib=function(){return this.a},zL.Y=function(){return this.a.Db()};Pp(NP,"AbstractMultiset/EntrySet",396);FT(384,294,LP),zL.Z=function(){return new Ca(nx(this.a))},zL.$=function(){return ch(),Jp(),GM},zL.U=function(t){return Gh(GS(this,t),18)},zL.X=function(t){return Gh($C(this,t),18)},zL.P=function(){return this.f||(this.f=new Pa(this,this.b))},zL.t=function(t){return Bx(this,t)};Pp(NP,"AbstractSetMultimap",384);FT(342,656,YP);Pp(NP,"AbstractSortedMultiset",342);FT(280,600,LP,qf),zL.a=0;var CM,TM;Pp(NP,"ArrayListMultimap",280);FT(159,17,VP);var AM=Qy(NP,"BoundType",159,EM,(function(){return Vc(),_x(Oo(AM,1),CP,159,0,[TM,CM])}));FT(623,159,VP,cc);Qy(NP,"BoundType/1",623,AM,null);FT(624,159,VP,Lc);var NM;Qy(NP,"BoundType/2",624,AM,null);FT(234,1,UP),zL.w=function(){return t=this.c.mb(),qc(),Yp(C_((Yc(),NM),Yp(new Qo,91),t),93).a;var t};Pp(NP,"FluentIterable",234);FT(170,234,UP,Ec),zL.mb=function(){return Sp(this)};Pp(NP,"FluentIterable/2",170);FT(664,1,{}),zL.w=function(){return Bk(kg(this.a.d).b)};Pp(NP,"ForwardingObject",664);FT(665,664,MP),zL.ib=function(t){return kg(this.a.d),Jr()},zL.jb=function(t){return kg(this.a.d),ti()},zL.Q=function(){kg(this.a.d),ei()},zL.kb=function(t){return Hs(kg(this.a.d),t)},zL.lb=function(t){return Fs(kg(this.a.d),t)},zL.V=function(){return kg(this.a.d).b.V()},zL.mb=function(){return new nr(kg(this.a.d).b.mb())},zL.nb=function(t){return kg(this.a.d),ni()},zL.Y=function(){return kg(this.a.d).b.Y()},zL.ob=function(){return zg(kg(this.a.d))},zL.pb=function(t){return Qg(kg(this.a.d),t)};Pp(NP,"ForwardingCollection",665);FT(660,640,XP),zL.mb=function(){return this.Kb()},zL.ib=function(t){return function(){throw new $r}()},zL.jb=function(t){return function(){throw new $r}()},zL.Q=function(){!function(){throw new $r}()},zL.kb=function(t){return null!=t&&dE(this,t,!1)},zL.Jb=function(){switch(this.Y()){case 0:return Qp(),Qp(),OM;case 1:return Qp(),new Gd(this.Kb().H());default:return new hp(this,this.ob())}},zL.nb=function(t){return function(){throw new $r}()};Pp(NP,"ImmutableCollection",660);FT(316,660,XP,gi),zL.mb=function(){return Cw(this.a.mb())},zL.kb=function(t){return null!=t&&this.a.kb(t)},zL.lb=function(t){return this.a.lb(t)},zL.V=function(){return this.a.V()},zL.Kb=function(){return Cw(this.a.mb())},zL.Y=function(){return this.a.Y()},zL.ob=function(){return this.a.ob()},zL.pb=function(t){return this.a.pb(t)},zL.w=function(){return Bk(this.a)};var OM;Pp(NP,"ForwardingImmutableCollection",316);FT(87,660,WP),zL.mb=function(){return this.Kb()},zL.tb=function(){return this.Lb(0)},zL.ub=function(t){return this.Lb(t)},zL.xb=function(t,e){return this.Mb(t,e)},zL.rb=function(t,e){throw new $r},zL.t=function(t){return OT(this,t)},zL.v=function(){return function(t){var e,n,r;for(e=1,r=t.mb();r.G();)e=~~(e=31*e+(null==(n=r.H())?0:V_(n)));return e}(this)},zL.Kb=function(){return this.Lb(0)},zL.Lb=function(t){return Cl(this,t)},zL.vb=function(t){throw new $r},zL.wb=function(t,e){throw new $r},zL.Mb=function(t,e){return Cx(new Yv(new Xa(this),t,e))};Pp(NP,"ImmutableList",87);FT(667,87,WP),zL.mb=function(){return Cw(this.Nb().mb())},zL.xb=function(t,e){return Cx(this.Nb().xb(t,e))},zL.kb=function(t){return oh(this,t)},zL.lb=function(t){return this.Nb().lb(t)},zL.t=function(t){return this.Nb().t(t)},zL.sb=function(t){return $u(this,t)},zL.v=function(){return this.Nb().v()},zL.V=function(){return this.Nb().V()},zL.Kb=function(){return Cw(this.Nb().mb())},zL.Y=function(){return this.Nb().Y()},zL.Mb=function(t,e){return Cx(this.Nb().xb(t,e))},zL.ob=function(){return this.Nb().pb(Ey(fM,kP,1,this.Nb().Y(),4,1))},zL.pb=function(t){return this.Nb().pb(t)},zL.w=function(){return Bk(this.Nb())};Pp(NP,"ForwardingImmutableList",667);FT(524,1,$P),zL.bb=function(){return ep(this)},zL.W=function(){return np(this)},zL.fb=function(){return this.Rb()},zL.Q=function(){throw new $r},zL.R=function(t){return null!=this.cb(t)},zL.ab=function(t){return this.Rb().kb(t)},zL.Pb=function(){return new vi(this)},zL.Qb=function(){return new bi(this)},zL.t=function(t){return function(t,e){var n;return ml(),t===e||!!fl(e,57)&&(n=Gh(e,57),IC(ep(t),n.bb()))}(this,t)},zL.v=function(){return ep(this).v()},zL.V=function(){return 0==this.Y()},zL.db=function(t,e){return function(){throw new $r}()},zL.eb=function(t){throw new $r},zL.w=function(){var t;return ml(),t=Yp(ow(this.Y()),123),T_(IM,t,ep(this).mb()),t.a+="}",t.a},zL.Rb=function(){return this.g?this.g:this.g=this.Qb()},zL.e=null,zL.f=null,zL.g=null;Pp(NP,"ImmutableMap",524);FT(320,524,$P),zL.R=function(t){return lk(this.d,t)},zL.ab=function(t){return Gs(this.d,t)},zL.Ob=function(){return d_(new ze(this))},zL.Pb=function(){return d_(ug(this.d))},zL.Qb=function(){return ch(),new gi(Sg(this.d))},zL.t=function(t){return ma(this.d,t)},zL.cb=function(t){return null==t?null:ek(this.d,t)},zL.v=function(){return this.d.c.v()},zL.V=function(){return this.d.c.V()},zL.Y=function(){return this.d.c.Y()},zL.w=function(){return Bk(this.d.c)};Pp(NP,"ForwardingImmutableMap",320);FT(666,665,DP),zL.t=function(t){return t===this||wa(kg(this.a.d),t)},zL.v=function(){return kg(this.a.d).b.v()};Pp(NP,"ForwardingSet",666);FT(523,666,DP,ze),zL.kb=function(t){if(fl(t,21)&&null==Gh(t,21).yb())return!1;try{return Hs(kg(this.a.d),t)}catch(t){if(fl(t=Qx(t),119))return!1;throw A_(t)}},zL.pb=function(t){var e;return e=Qg(kg(this.a.d),t),kg(this.a.d).b.Y()=(i=o.Y()))o.Q();else for(r=o.mb(),n=0;ne?1:0}(e.Yb(),t.Yb())}(Gh(t,83),Gh(e,83))};Pp(NP,"Multisets/1",398);FT(397,658,{83:1,3:1},od),zL.Yb=function(){return this.a},zL.Zb=function(){return this.b},zL.a=0;Pp(NP,"Multisets/ImmutableEntry",397);FT(303,1,PP,za),zL.G=function(){return this.d>0||this.c.G()},zL.H=function(){if(!(this.d>0||this.c.G()))throw new xi;return 0==this.d&&(this.b=Gh(this.c.H(),83),this.f=this.d=this.b.Yb()),--this.d,this.a=!0,this.b.Zb()},zL.I=function(){ux(this.a),1==this.f?this.c.I():this.e.Fb(this.b.Zb(),1),--this.f,this.a=!1},zL.a=!1,zL.d=0,zL.f=0;var RM;Pp(NP,"Multisets/MultisetIteratorImpl",303);FT(622,659,{3:1,56:1},l),zL.$b=function(t,e){return function(t,e){return Od(t),Od(e),Dm(t,e)}(Gh(t,23),Gh(e,23))},zL.w=function(){return"Ordering.natural()"};Pp(NP,"NaturalOrdering",622);FT(343,661,WP,hp),zL.ub=function(t){return Cl(this.b,t)},zL.Sb=function(){return this.a},zL.sb=function(t){return $u(this.b,t)},zL.Lb=function(t){return Cl(this.b,t)};var BM;Pp(NP,"RegularImmutableAsList",343);FT(559,275,$P,og),zL.Tb=function(){return this.a};Pp(NP,"RegularImmutableBiMap",559);FT(53,667,WP,ib),zL.Nb=function(){return this.a};Pp(NP,"RegularImmutableList",53);FT(321,320,$P,ji);var GM;Pp(NP,"RegularImmutableMap",321);FT(265,315,KP,Ws);Pp(NP,"RegularImmutableSet",265);FT(650,641,DP);Pp(NP,"Sets/SetView",650);FT(377,650,DP,dh),zL.kb=function(t){return xa(this.b,t)&&xa(this.c,t)},zL.lb=function(t){return Um(this.b,t)&&Um(this.c,t)},zL.V=function(){return Ow(this)},zL.mb=function(){return fp(new Yn(new zn(this.b.a).a.bb().mb()),this.a)},zL.Y=function(){return Zb(fp(new Yn(new zn(this.b.a).a.bb().mb()),this.a))};Pp(NP,"Sets/2",377);FT(328,275,$P,qv,Hy),zL.fb=function(){return ch(),new ua(this.c)},zL.Tb=function(){return this.a||(this.a=new Hy(this.c,this.b,this))},zL.Ub=function(){return ch(),new ua(this.c)};Pp(NP,"SingletonImmutableBiMap",328);FT(127,667,WP,Gd),zL.Nb=function(){return this.a};Pp(NP,"SingletonImmutableList",127);FT(135,663,KP,ua),zL.mb=function(){return qc(),new qe(this.a)},zL.kb=function(t){return e_(this.a,t)},zL.Kb=function(){return qc(),new qe(this.a)},zL.Y=function(){return 1};Pp(NP,"SingletonImmutableSet",135);FT(285,342,{207:1,3:1,22:1,19:1},Ov,rk),zL.Bb=function(t,e){return eT(this,t,e)},zL.Cb=function(t){return xS(this,t)},zL.Db=function(){return iw(Mx(this,(Xc(),HM)))},zL.Eb=function(){return new Pl(this)},zL.Fb=function(t,e){return BT(this,t,e)},zL.Gb=function(t,e){return YS(this,t,e)},zL.Hb=function(t,e,n){var r,i,o;return kw(n,"newCount"),kw(e,"oldCount"),Fu(lf(this.b,t)),(o=this.c.a)?(i=Ey(UX,nI,26,1,12,1),r=function t(e,n,r,i,o,a){var s,u,c;if((s=n.$b(r,e.b))<0)return(u=e.e)?(e.e=t(u,n,r,i,o,a),a[0]==i&&(0==o&&0!=a[0]?--e.a:o>0&&0==a[0]&&++e.a,e.j=p_(e.j,o-a[0])),HS(e)):(a[0]=0,0==i&&o>0?ym(e,r,o):e);if(s>0)return(c=e.g)?(e.g=t(c,n,r,i,o,a),a[0]==i&&(0==o&&0!=a[0]?--e.a:o>0&&0==a[0]&&++e.a,e.j=p_(e.j,o-a[0])),HS(e)):(a[0]=0,0==i&&o>0?bm(e,r,o):e);if(a[0]=e.c,i==e.c){if(0==o)return MT(e);e.j=p_(e.j,o-e.c),e.c=o}return e}(o,this.d,t,e,n,i),Pd(this.c,o,r),i[0]==e):0==e&&(n>0&&eT(this,t,n),!0)},zL.Y=function(){return iw(Mx(this,(Xc(),FM)))};Pp(NP,"TreeMultiset",285);FT(619,658,{83:1},Va),zL.Yb=function(){var t;return 0==(t=this.b.c)?xS(this.a,this.b.b):t},zL.Zb=function(){return this.b.b};Pp(NP,"TreeMultiset/1",619);FT(620,1,PP,Pl),zL.H=function(){return function(t){var e;if(!sx(t))throw new xi;return e=new Va(t.c,t.a),t.b=e,t.a.i==t.c.a?t.a=null:t.a=t.a.i,e}(this)},zL.G=function(){return sx(this)},zL.I=function(){ux(!!this.b),YS(this.c,this.b.b.b,0),this.b=null};var HM,FM;Pp(NP,"TreeMultiset/2",620);FT(205,17,rI);var zM=Qy(NP,"TreeMultiset/Aggregate",205,EM,(function(){return Xc(),_x(Oo(zM,1),CP,205,0,[FM,HM])}));FT(617,205,rI,lc),zL._b=function(t){return t.c},zL.ac=function(t){return t?t.j:0};Qy(NP,"TreeMultiset/Aggregate/1",617,zM,null);FT(618,205,rI,yl),zL._b=function(t){return 1},zL.ac=function(t){return t?t.a:0};Qy(NP,"TreeMultiset/Aggregate/2",618,zM,null);FT(206,658,{83:1,206:1},_m),zL.Yb=function(){return this.c},zL.Zb=function(){return this.b},zL.w=function(){return Ar(),Sb(new od(this.b,this.c))},zL.a=0,zL.c=0,zL.d=0,zL.j=0;Pp(NP,"TreeMultiset/AvlNode",206);FT(616,1,{},f);Pp(NP,"TreeMultiset/Reference",616);var YM,VM=Pp(bP,"JavaScriptObject$",0);FT(628,1,{});Pp(bP,"Scheduler",628);var qM,UM=0,XM=0,WM=-1;FT(360,628,{},u);Pp(yP,"SchedulerImpl",360);FT(646,1,{}),zL.hc=function(){return null},zL.ic=function(){return null},zL.jc=function(){return null},zL.kc=function(){return null},zL.lc=function(){return null};Pp(oI,"JSONValue",646);FT(214,646,{214:1},or,Je),zL.t=function(t){return!!fl(t,214)&&this.a==Gh(t,214).a},zL.gc=function(){return dr},zL.v=function(){return ff(this.a)},zL.hc=function(){return this},zL.w=function(){var t,e,n;for(n=new Uo("["),e=0,t=this.a.length;e0&&(n.a+=","),tc(n,Tw(this,e));return n.a+="]",n.a};var $M,KM;Pp(oI,"JSONArray",214);FT(292,646,{},tn),zL.gc=function(){return pr},zL.ic=function(){return this},zL.w=function(){return vl(this.a)},zL.a=!1;Pp(oI,"JSONBoolean",292);FT(371,72,JL,Gi);var ZM;Pp(oI,"JSONException",371);FT(435,646,{},g),zL.gc=function(){return wr},zL.w=function(){return tP};Pp(oI,"JSONNull",435);FT(104,646,{104:1},en),zL.t=function(t){return!!fl(t,104)&&this.a==Gh(t,104).a},zL.gc=function(){return gr},zL.v=function(){return pv(no(this.a))},zL.jc=function(){return this},zL.w=function(){return this.a+""},zL.a=0;Pp(oI,"JSONNumber",104);FT(69,646,{69:1},Yi,nn),zL.t=function(t){return!!fl(t,69)&&this.a==Gh(t,69).a},zL.gc=function(){return vr},zL.v=function(){return ff(this.a)},zL.kc=function(){return this},zL.w=function(){var t,e,n,r,i,o;for(o=new Uo("{"),t=!0,n=0,r=(i=wm(this,Ey(pM,ZL,2,0,5,1))).length;n>>28]|e[t>>24&15]<<4|e[t>>20&15]<<8|e[t>>16&15]<<12|e[t>>12&15]<<16|e[t>>8&15]<<20|e[t>>4&15]<<24|e[15&t]<<28);var t,e},zL.w=function(){return"("+this.a+","+this.b+")"},zL.a=0,zL.b=0;var nD=Pp(pI,"KVector",10);FT(58,648,{3:1,5:1,22:1,19:1,58:1,20:1},so),zL.ib=function(t){return Nh(this,t)},zL.Q=function(){Cg(this)},zL.ub=function(t){return _k(this,t)},zL.Y=function(){return this.b},zL.b=0;Pp(jP,"LinkedList",58);FT(44,58,{44:1,286:1,3:1,5:1,22:1,19:1,58:1,20:1},Br,Tf),zL.w=function(){var t,e,n;for(t=new Uo("("),e=_k(this,0);e.b!=e.d.c;)ec(t,(n=Gh(Cb(e),10)).a+","+n.b),e.b!=e.d.c&&(t.a+="; ");return t.a+=")",t.a};Pp(pI,"KVectorChain",44);var rD=yd(vI,"IProperty");FT(131,1,{179:1,131:1,3:1},v);var iD,oD;Pp(vI,"MapPropertyHolder",131);FT(14,1,bI,Cd,Sd,sd,Lh,yv,Xv),zL.F=function(t){return function(t,e){return yg(t.b,e.mc())}(this,Gh(t,79))},zL.t=function(t){return hg(this,t)},zL.mc=function(){return this.b},zL.nc=function(){return this.c},zL.oc=function(){return this.d},zL.v=function(){return ak(this.b)},zL.w=function(){return this.b};Pp(vI,"Property",14);FT(366,1,{23:1},b),zL.F=function(t){return-1};Pp(vI,"Property/1",366);FT(367,1,{23:1},y),zL.F=function(t){return 1};Pp(vI,"Property/2",367);FT(27,1,{27:1,22:1},Qa),zL.t=function(t){var e,n,r;return!!fl(t,27)&&(n=Gh(t,27),e=null==this.a?null==n.a:e_(this.a,n.a),r=null==this.b?null==n.b:e_(this.b,n.b),e&&r)},zL.v=function(){var t,e,n;return t=-65536&(e=null==this.a?0:V_(this.a)),e&sP^(-65536&(n=null==this.b?0:V_(this.b)))>>16&sP|t^(n&sP)<<16},zL.mb=function(){return new rn(this)},zL.w=function(){return null==this.a&&null==this.b?"pair(null,null)":null==this.a?"pair(null,"+Bk(this.b)+")":null==this.b?"pair("+Bk(this.a)+",null)":"pair("+Bk(this.a)+","+Bk(this.b)+")"};Pp(yI,"Pair",27);FT(431,1,PP,rn),zL.G=function(){return!this.c&&(!this.b&&null!=this.a.a||null!=this.a.b)},zL.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},zL.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},zL.b=!1,zL.c=!1;Pp(yI,"Pair/1",431);FT(228,72,JL,Hi);Pp(wI,"UnsupportedConfigurationException",228);FT(99,72,JL,Fi);var aD,sD,uD,cD,lD,fD,hD;Pp(wI,"UnsupportedGraphException",99);FT(103,17,{103:1,3:1,23:1,17:1},Ja);var dD,pD,gD,vD,bD,yD,wD=Qy(EI,"Alignment",103,EM,(function(){return ok(),_x(Oo(wD,1),CP,103,0,[sD,lD,fD,hD,uD,cD])}));FT(59,17,{59:1,3:1,23:1,17:1},as);var mD,xD,_D,ED,kD,SD=Qy(EI,"Direction",59,EM,(function(){return b_(),_x(Oo(SD,1),CP,59,0,[bD,vD,gD,pD,yD])}));FT(107,17,{107:1,3:1,23:1,17:1},ss);var CD,TD,AD,ND,OD,LD=Qy(EI,"EdgeLabelPlacement",107,EM,(function(){return Im(),_x(Oo(LD,1),CP,107,0,[kD,xD,_D,ED])}));FT(122,17,{122:1,3:1,23:1,17:1},us);var PD,ID,jD,MD,DD,RD,BD,GD=Qy(EI,"EdgeRouting",122,EM,(function(){return y_(),_x(Oo(GD,1),CP,122,0,[OD,AD,TD,ND])}));FT(133,17,{133:1,3:1,23:1,17:1},cs);var HD,FD,zD,YD,VD=Qy(EI,"EdgeType",133,EM,(function(){return TS(),_x(Oo(VD,1),CP,133,0,[RD,MD,BD,ID,DD,jD])}));FT(166,17,{166:1,3:1,23:1,17:1},ls);var qD,UD,XD,WD,$D,KD,ZD,QD,JD,tR,eR,nR,rR,iR,oR,aR,sR,uR,cR,lR,fR,hR,dR,pR,gR,vR,bR,yR,wR,mR,xR,_R,ER,kR,SR,CR,TR,AR,NR,OR,LR,PR,IR,jR,MR,DR,RR,BR,GR,HR,FR,zR,YR,VR,qR,UR,XR,WR,$R,KR=Qy(EI,"HierarchyHandling",166,EM,(function(){return w_(),_x(Oo(KR,1),CP,166,0,[zD,FD,YD])}));FT(41,17,{41:1,3:1,23:1,17:1},fs);var ZR,QR,JR,tB,eB,nB,rB=Qy(EI,"NodeLabelPlacement",41,EM,(function(){return uT(),_x(Oo(rB,1),CP,41,0,[zR,FR,VR,$R,WR,XR,qR,UR,YR])}));FT(100,17,{100:1,3:1,23:1,17:1},hs);var iB,oB,aB,sB,uB,cB,lB,fB=Qy(EI,"PortAlignment",100,EM,(function(){return EE(),_x(Oo(fB,1),CP,100,0,[nB,eB,QR,JR,tB])}));FT(28,17,{28:1,3:1,23:1,17:1},ds);var hB,dB,pB,gB,vB=Qy(EI,"PortConstraints",28,EM,(function(){return cS(),_x(Oo(vB,1),CP,28,0,[lB,cB,uB,oB,sB,aB])}));FT(149,17,{149:1,3:1,23:1,17:1},ps);var bB,yB,wB,mB,xB,_B,EB,kB,SB,CB,TB,AB,NB,OB,LB,PB,IB,jB,MB,DB,RB,BB,GB=Qy(EI,"PortLabelPlacement",149,EM,(function(){return jw(),_x(Oo(GB,1),CP,149,0,[gB,pB,dB])}));FT(32,17,{32:1,3:1,23:1,17:1},gs);var HB,FB,zB,YB,VB,qB=Qy(EI,"PortSide",32,EM,(function(){return uL(),_x(Oo(qB,1),CP,32,0,[RB,wB,yB,DB,BB])}));FT(150,17,{150:1,3:1,23:1,17:1},vs);var UB,XB,WB,$B,KB,ZB=Qy(EI,"SizeConstraint",150,EM,(function(){return kE(),_x(Oo(ZB,1),CP,150,0,[YB,VB,zB,FB])}));FT(139,17,{139:1,3:1,23:1,17:1},bs);var QB,JB=Qy(EI,"SizeOptions",139,EM,(function(){return jS(),_x(Oo(JB,1),CP,139,0,[$B,KB,WB,XB])}));FT(62,1,{62:1},ru,gg),zL.t=function(t){var e;return!(null==t||!fl(t,62))&&(e=Gh(t,62),xg(this.d,e.d)&&xg(this.e,e.e)&&xg(this.c,e.c)&&xg(this.b,e.b))},zL.v=function(){return Vx(_x(Oo(fM,1),kP,1,4,[this.d,this.e,this.c,this.b]))},zL.w=function(){return"Rect[x="+this.d+",y="+this.e+",w="+this.c+",h="+this.b+"]"},zL.b=0,zL.c=0,zL.d=0,zL.e=0;Pp(AI,"Rectangle",62);FT(283,62,{283:1,62:1},Gr),zL.a=0;var tG,eG,nG,rG,iG,oG,aG,sG,uG,cG,lG,fG,hG,dG,pG,gG,vG,bG,yG,wG,mG,xG;Pp(NI,"LabelGroup",283);FT(67,17,{67:1,3:1,23:1,17:1},bg);var _G,EG,kG,SG=Qy(NI,"LabelLocation",67,EM,_E);FT(225,17,{225:1,3:1,23:1,17:1},ys);var CG,TG=Qy(NI,"TextAlignment",225,EM,(function(){return Bb(),_x(Oo(TG,1),CP,225,0,[EG,_G,kG])}));FT(589,1,{},iO),zL.a=0,zL.b=!1,zL.d=0,zL.f=0,zL.k=0,zL.r=0,zL.s=0;var AG,NG,OG,LG;Pp(AI,"LabelAndNodeSizeProcessor/NodeData",589);FT(171,17,{171:1,3:1,23:1,17:1},ws);var PG=Qy(AI,"LabelSide",171,EM,(function(){return SE(),_x(Oo(PG,1),CP,171,0,[LG,AG,NG])}));FT(590,1,{},on),zL.b=!0,zL.c=!0,zL.d=!0,zL.e=!0;Pp(AI,LI,590);FT(121,1,II),zL.t=function(t){var e;return!!fl(t,121)&&(e=Gh(t,121),this.d==e.d&&this.a==e.a&&this.b==e.b&&this.c==e.c)},zL.v=function(){var t,e;return t=pv(no(this.b))<<16,t|=pv(no(this.a))&sP,e=pv(no(this.c))<<16,t^(e|=pv(no(this.d))&sP)},zL.w=function(){return"[top="+this.d+",left="+this.b+",bottom="+this.a+",right="+this.c+"]"},zL.a=0,zL.b=0,zL.c=0,zL.d=0;Pp(AI,"Spacing",121);FT(232,121,II,Hr,mf,Uf);Pp(AI,"Spacing/Insets",232);FT(65,121,{286:1,121:1,65:1,3:1,5:1},Fr,xf,Xf);var IG,jG,MG;Pp(AI,"Spacing/Margins",65);FT(364,1,{},Nk),zL.c=!1,zL.d=null,zL.g=null;var DG,RG,BG,GG,HG,FG,zG,YG,VG;Pp(UI,"JsonGraphImporter",364);FT(417,14,bI,uu);var qG;Pp(UI,"LayoutOptionResolver/DummyProperty",417);FT(348,1,{},xe);Pp(UI,"RecursiveLGraphLayout",348);FT(73,99,{73:1,3:1,54:1,46:1},zi,Xl,gp);var UG,XG,WG=Pp(UI,"UnsupportedJsonGraphException",73);FT(380,1,{},ag);Pp(KI,"GraphConfigurator",380);FT(49,1,{},Z_);Pp(KI,"IntermediateProcessingConfiguration",49);FT(365,1,{},jb);var $G;Pp(KI,"KlayLayered",365);FT(577,1,{},Fm),zL.i=0;var KG;Pp(tj,"ComponentsToCGraphTransformer",577);FT(578,1,{},C),zL.tc=function(t,e){return Ho(t.wc(),e.wc())},zL.uc=function(t,e){return Ho(t.xc(),e.xc())};Pp(tj,"ComponentsToCGraphTransformer/1",578);FT(25,1,{25:1}),zL.k=0,zL.o=null,zL.p=!0,zL.r=JI;var ZG=Pp(ej,"CNode",25);FT(198,25,{198:1,25:1},el,rm),zL.vc=function(){this.b.d=this.j.d,this.b.e=this.j.e},zL.wc=function(){return null!=this.a?no(this.a):this.c.i},zL.xc=function(){return null!=this.a?no(this.a):this.c.i},zL.w=function(){return""};var QG,JG;Pp(tj,"ComponentsToCGraphTransformer/CRectNode",198);FT(549,1,{},T);Pp(tj,"OneDimensionalComponentsCompaction",549);FT(550,1,ZP,A),zL.B=function(t){return lx(),Hd(),0!=Gh(Gh(t,27).a,25).f.f?vX:gX};Pp(tj,"OneDimensionalComponentsCompaction/lambda$0$Type",550);FT(551,1,ZP,N),zL.B=function(t){return lx(),Hd(),rE(Gh(Gh(t,27).a,25).n,Gh(Gh(t,27).b,59))||0!=Gh(Gh(t,27).a,25).f.f&&rE(Gh(Gh(t,27).a,25).n,Gh(Gh(t,27).b,59))?vX:gX};Pp(tj,"OneDimensionalComponentsCompaction/lambda$1$Type",551);FT(324,1,{},vp);Pp(ej,"CGraph",324);FT(78,1,{78:1},YE),zL.b=0,zL.c=0,zL.d=0,zL.f=0,zL.i=!0,zL.j=JI;Pp(ej,"CGroup",78);FT(470,1,{},O),zL.tc=function(t,e){return Ro(t.wc(),e.wc())},zL.uc=function(t,e){return Ro(t.xc(),e.xc())};var tH,eH,nH;Pp(ej,"ISpacingsHandler/1",470);FT(323,1,{},cT),zL.e=!1;var rH=Pp(ej,"OneDimensionalCompactor",323);FT(554,1,ZP,m),zL.B=function(t){return zd(),Hd(),0!=Gh(Gh(t,27).a,25).f.f?vX:gX};Pp(ej,"OneDimensionalCompactor/lambda$0$Type",554);FT(335,1,{},Mh),zL.a=!1,zL.b=!1,zL.c=!1,zL.d=!1;Pp(ej,"Quadruplet",335);FT(587,1,{},x),zL.Cc=function(t){var e,n,r,i,o,a,s,u,c,l,f,h,d,p,g,v;for(l=QI,r=new $n(t.a.b);r.an.j.d||n.j.d==i.j.d&&n.j.c0&&(Oh(t.c,new ph(e.c,e.d,t.d)),t.b=e.d)}(this,Gh(t,48))},zL.b=0;Pp(ij,"RectilinearConvexHull/MaximalElementsEventHandler",243);FT(571,1,fP,L),zL.$b=function(t,e){return Kp(t,e)};Pp(ij,"RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type",571);FT(570,1,{160:1},Jb),zL.Ec=function(t){uA(this,Gh(t,48))},zL.a=0,zL.b=null,zL.c=null,zL.d=null,zL.e=null;Pp(ij,"RectilinearConvexHull/RectangleEventHandler",570);FT(572,1,fP,P),zL.$b=function(t,e){return Rb(),Gh(t,48).c==Gh(e,48).c?Sx(Gh(e,48).d,Gh(t,48).d):Sx(Gh(t,48).c,Gh(e,48).c)};Pp(ij,"RectilinearConvexHull/lambda$0$Type",572);FT(573,1,fP,I),zL.$b=function(t,e){return Rb(),Gh(t,48).c==Gh(e,48).c?Sx(Gh(t,48).d,Gh(e,48).d):Sx(Gh(t,48).c,Gh(e,48).c)};Pp(ij,"RectilinearConvexHull/lambda$1$Type",573);FT(574,1,fP,j),zL.$b=function(t,e){return Rb(),Gh(t,48).c==Gh(e,48).c?Sx(Gh(e,48).d,Gh(t,48).d):Sx(Gh(e,48).c,Gh(t,48).c)};Pp(ij,"RectilinearConvexHull/lambda$2$Type",574);FT(575,1,fP,M),zL.$b=function(t,e){return Rb(),Gh(t,48).c==Gh(e,48).c?Sx(Gh(t,48).d,Gh(e,48).d):Sx(Gh(e,48).c,Gh(t,48).c)};Pp(ij,"RectilinearConvexHull/lambda$3$Type",575);FT(576,1,fP,D),zL.$b=function(t,e){return JS(t,e)};Pp(ij,"RectilinearConvexHull/lambda$4$Type",576);FT(469,1,{},_b);Pp(ij,"Scanline",469);FT(662,1,{});var bH;Pp(aj,"AbstractGraphPlacer",662);FT(222,1,{222:1},Zf);Pp(aj,"ComponentGroup",222);FT(434,662,{},Lr),zL.Fc=function(t,e){var n,r,i,o,a,s,u,c,l,f,h,d;if(this.a.c=Ey(fM,kP,1,0,4,1),e.b.c=Ey(fM,kP,1,0,4,1),t.V())return e.e.a=0,void(e.e.b=0);for(S_(e,i=Gh(t.sb(0),55)),r=t.mb();r.G();)D_(this,Gh(r.H(),55));for(h=new ao,d=2*Gh(yx(i,(DL(),sU)),15).a,s=new $n(this.a);s.af&&(x=0,_+=l+w,l=0),KA(o,x+(p=o.d).a,_+p.b),p.a=0,p.b=0,n=Ro(n,x+b.a),l=Ro(l,b.b),x+=b.a+w;if(e.e.a=n,e.e.b=_+l,v=Gh(yx(e,sU),15).a,eo(no(Af(yx(i,(RL(),AU)))))){for(SL(r=new R,t,v),c=t.mb();c.G();)Lf(Au(Gh(c.H(),55).d),r.e);Lf(Au(e.e),r.a)}hy(e,t)}else(y=Gh(t.sb(0),55))!=e&&(e.b.c=Ey(fM,kP,1,0,4,1),uN(e,y,0,0),S_(e,y),wd(e.a,y.a),e.e.a=y.e.a,e.e.b=y.e.b)};Pp(aj,"SimpleRowGraphPlacer",432);FT(433,1,fP,G),zL.$b=function(t,e){return function(t,e){var n;return 0==(n=e.k-t.k)?Sx(t.e.a*t.e.b,e.e.a*e.e.b):n}(Gh(t,55),Gh(e,55))};var yH;Pp(aj,"SimpleRowGraphPlacer/1",433);FT(369,1,lj,_e),zL.sc=function(t,e){OL(t,e)};Pp(fj,"CompoundGraphPostprocessor",369);FT(370,1,oj,H),zL.D=function(t){var e;return!!(e=Gh(yx(Gh(t,114).b,(HL(),fR)),44))&&0!=e.b};Pp(fj,"CompoundGraphPostprocessor/1",370);FT(368,1,lj,Vu),zL.sc=function(t,e){ZE(this,t,e)};Pp(fj,"CompoundGraphPreprocessor",368);FT(187,1,{187:1},x_),zL.c=!1;Pp(fj,"CompoundGraphPreprocessor/ExternalPort",187);FT(114,1,{114:1},gh),zL.w=function(){return df(this.c)+":"+Pw(this.b)};Pp(fj,"CrossHierarchyEdge",114);FT(310,1,fP,an),zL.$b=function(t,e){return function(t,e,n){var r,i;return e.c==(tm(),EU)&&n.c==_U?-1:e.c==_U&&n.c==EU?1:(r=gE(e.a,t.a),i=gE(n.a,t.a),e.c==EU?i-r:r-i)}(this,Gh(t,114),Gh(e,114))};Pp(fj,"CrossHierarchyEdgeComparator",310);FT(147,131,{179:1,131:1,147:1,3:1}),zL.k=0;Pp(dj,"LGraphElement",147);FT(12,147,{179:1,131:1,12:1,147:1,3:1},Og),zL.w=function(){return Pw(this)};var wH=Pp(dj,"LEdge",12);FT(55,147,{179:1,131:1,55:1,147:1,3:1,22:1},Rw),zL.mb=function(){return new $n(this.c)},zL.w=function(){return 0==this.c.c.length?"G-unlayered"+XS(this.b):0==this.b.c.length?"G-layered"+XS(this.c):"G[layerless"+XS(this.b)+", layers"+XS(this.c)+"]"};var mH=Pp(dj,"LGraph",55);FT(273,1,{}),zL.pc=function(){return this.e.j};Pp(dj,"LGraphAdapters/AbstractLShapeAdapter",273);FT(240,1,{627:1},sn),zL.b=null;Pp(dj,"LGraphAdapters/LEdgeAdapter",240);FT(325,1,{},_s),zL.pc=function(){return this.a.e},zL.b=null,zL.c=!1;Pp(dj,"LGraphAdapters/LGraphAdapter",325);FT(224,273,{129:1,224:1},un);Pp(dj,"LGraphAdapters/LLabelAdapter",224);FT(555,273,{626:1},Es),zL.a=null,zL.b=null,zL.c=!1;Pp(dj,"LGraphAdapters/LNodeAdapter",555);FT(556,273,{161:1},ks),zL.a=null,zL.b=null,zL.c=null,zL.d=!1;Pp(dj,"LGraphAdapters/LPortAdapter",556);FT(557,1,fP,F),zL.$b=function(t,e){return function(t,e){var n,r,i,o;if(0!=(o=t.g.e-e.g.e))return o;if(n=Gh(yx(t,(HL(),NR)),24),r=Gh(yx(e,NR),24),n&&r&&0!=(i=n.a-r.a))return i;switch(t.g.e){case 1:return Sx(t.i.a,e.i.a);case 2:return Sx(t.i.b,e.i.b);case 3:return Sx(e.i.a,t.i.a);case 4:return Sx(e.i.b,t.i.b);default:throw new xo(pj)}}(Gh(t,7),Gh(e,7))};Pp(dj,"LGraphAdapters/PortComparator",557);FT(168,1,{168:1},Me,jg),zL.t=function(t){var e;return!!fl(t,168)&&(e=Gh(t,168),this.d==e.d&&this.a==e.a&&this.b==e.b&&this.c==e.c)},zL.v=function(){var t,e;return t=pv(no(this.b))<<16,t|=pv(no(this.a))&sP,e=pv(no(this.c))<<16,t^(e|=pv(no(this.d))&sP)},zL.w=function(){return"Insets[top="+this.d+",left="+this.b+",bottom="+this.a+",right="+this.c+"]"},zL.a=0,zL.b=0,zL.c=0,zL.d=0;Pp(dj,"LInsets",168);FT(165,147,{179:1,131:1,147:1,165:1,3:1});Pp(dj,"LShape",165);FT(33,165,{179:1,131:1,147:1,33:1,165:1,3:1},xc),zL.w=function(){return null==this.a?"l_"+this.k:"l_"+this.a};Pp(dj,"LLabel",33);FT(9,165,{179:1,131:1,147:1,9:1,165:1,3:1},wk),zL.w=function(){return cv(this)};var xH,_H,EH,kH,SH,CH,TH=Pp(dj,"LNode",9);FT(132,17,{132:1,3:1,23:1,17:1},Cs);var AH,NH,OH,LH,PH,IH,jH=Qy(dj,"LNode/NodeType",132,EM,(function(){return AS(),_x(Oo(jH,1),CP,132,0,[SH,kH,_H,CH,EH,xH])}));FT(7,165,{179:1,131:1,147:1,7:1,165:1,3:1},bS),zL.w=function(){var t;return null==(t=iy(this))?"p_"+this.k:"p_"+t};var MH=Pp(dj,"LPort",7);FT(399,1,oj,z),zL.D=function(t){return Rf(t)};Pp(dj,"LPort/1",399);FT(400,1,oj,Y),zL.D=function(t){return Df(t)};Pp(dj,"LPort/2",400);FT(401,1,oj,V),zL.D=function(t){return Gh(t,7).g==(uL(),wB)};Pp(dj,"LPort/3",401);FT(402,1,oj,q),zL.D=function(t){return Gh(t,7).g==(uL(),yB)};Pp(dj,"LPort/4",402);FT(403,1,oj,U),zL.D=function(t){return Gh(t,7).g==(uL(),DB)};Pp(dj,"LPort/5",403);FT(404,1,oj,X),zL.D=function(t){return Gh(t,7).g==(uL(),BB)};Pp(dj,"LPort/6",404);FT(190,1,UP,cn),zL.mb=function(){return new ln(new $n(this.a.b))};Pp(dj,"LPort/7",190);FT(405,1,PP,ln),zL.H=function(){return Gh(Wv(this.a),12).c},zL.G=function(){return hl(this.a)},zL.I=function(){ap(this.a)};Pp(dj,"LPort/7/1",405);FT(169,1,UP,fn),zL.mb=function(){return new hn(new $n(this.a.e))};Pp(dj,"LPort/8",169);FT(304,1,PP,hn),zL.H=function(){return Gh(Wv(this.a),12).d},zL.G=function(){return hl(this.a)},zL.I=function(){ap(this.a)};Pp(dj,"LPort/8/1",304);FT(16,147,{179:1,131:1,147:1,16:1,3:1,22:1},bp),zL.mb=function(){return new $n(this.a)},zL.w=function(){return"L_"+Ky(this.b.c,this,0)+XS(this.a)};Pp(dj,"Layer",16);FT(437,1,lj,W),zL.sc=function(t,e){var n,r,i,o;for(jE(e,"Big nodes intermediate-processing",1),this.a=t,r=new $n(this.a.c);r.ao?50:o,n=new je,d=o+this.d,l=new $n(f);l.ad){for(h=1,r=a.j.a;r>o;)++h,r=(a.j.a-(h-1)*this.d)/h;Oh(n,new Db(this,a,h,r))}for(s=new $n(n);s.aa?50:a,n=new je,p=a+this.d,f=new $n(h);f.ap){for(d=1,r=s.j.a;r>a;)++d,r=(s.j.a-(d-1)*this.d)/d;Oh(n,new Wg(this,s,d))}for(u=new $n(n);u.a0||l.g==BB&&l.b.c.length-l.e.c.length<0)){n=!1;break}if(l.g==BB)for(i=new $n(l.e);i.a0&&(t.a=u+(h-1)*i,e.d.b+=t.a,e.e.b+=t.a),0!=d.a.Y()&&(h=tO(new hC(1,i),e,d,p,e.e.b+u-e.d.b))>0&&(e.e.b+=u+(h-1)*i)}(this,t,n),function(t){var e,n,r,i,o,a,s,u,c,l,f,h,d,p,g,v,b,y,w,m,x,_,E;for(y=new je,l=new $n(t.c);l.a0&&TN((my(0,n.c.length),Gh(n.c[0],16)),t),n.c.length>1&&TN(Gh(ld(n,n.c.length-1),16),t),j_(e)};Pp(gj,"HierarchicalPortPositionProcessor",454);FT(471,1,lj,ct),zL.sc=function(t,e){var n,r,i,o,a,s,u,c,l,f,h;for(jE(e,"Hyperedge merging",1),l=new Uv(t.c,0);l.b(d=h.c.length)+1?Oh(l,new Qa(u,(my(f=(s+d)/2|0,a.c.length),Gh(a.c[f],9)))):d>s+1&&Oh(l,new Qa(u,(my(f=((d-s)/2|0)-1,h.c.length),Gh(h.c[f],9))))}for(v=new $n(l);v.a=2){for(u=!0,my(1,s.c.length),p=Gh(s.c[1],16),f=new $n(r.a);f.a=2){for(u=!0,g=Gh(ld(s,s.c.length-2),16),f=new $n(i.a);f.an?u:n}t.e.b=u-c,t.d.b-=c,j_(e)};Pp(gj,"LayerSizeAndGraphHeightCalculator",496);FT(497,1,lj,Tt),zL.sc=function(t,e){var n,r,i,o;for(jE(e,"Edge joining",1),n=eo(no(Af(yx(t,(RL(),CU))))),r=new $n(t.c);r.a0&&Oh(t.p,l),Oh(t.o,l);d=u+(e-=r),c+=e*t.e,$b(t.a,s,F_(d)),$b(t.b,s,c),t.j=Go(t.j,d),t.k=Ro(t.k,c),t.d+=e,e+=g}}(this),this.q=Gh(yx(t,(RL(),XU)),109),u=Gh(yx(this.g,WU),24).a,i=new Lt,this.q.e){case 2:case 1:yO(this,i);break;case 3:for(this.q=(UT(),WF),yO(this,i),a=0,o=new $n(this.a);o.athis.j&&(this.q=zF,yO(this,i));break;case 4:for(this.q=(UT(),WF),yO(this,i),s=0,r=new $n(this.b);r.athis.k&&(this.q=qF,yO(this,i));break;case 6:yO(this,new mn(pv(Ou(this.f.length*u/100))));break;case 5:yO(this,new xn(pv(Ou(this.d*u/100))));break;default:yO(this,i)}!function(t,e){var n,r,i,o,a,s;for(i=new je,n=0;n<=t.i;n++)(r=new bp(e)).k=t.i-n,i.c[i.c.length]=r;for(s=new $n(t.o);s.a=2){for(p=!0,n=Gh(Wv(f=new $n(o.f)),7);f.a(r-=t.a)?i:r}return i}(this,t),C=(d=t.c.c.length)*function(t,e){var n,r,i,o,a;for(r=0,n=new $n(e.c);n.a(a=(i=Gh(Wv(o),9)).j.a+i.e.c+i.e.b+t.b)?r:a;return r}(this,t),(r=(i=Gh(yx(t,(HL(),eR)),59))==(b_(),gD)||i==vD||i==bD?Gh(yx(t,gq),15).a:1/Gh(yx(t,gq),15).a)>(n=C/p))j_(e);else{k=0,o=Ej;do{h=o,o=(n=C/++k/(p*k))-r<=0?0-(n-r):n-r}while(n>r);for(hk?1:k)|0,w=_,N=!0;c=_&&(N=!0),++w,++c}for(l=new Uv(t.c,0);l.b "+this.a+" "+df(this.c)},zL.a=0,zL.b=0,zL.d=0;Pp(gj,"SplineSelfLoopRouter/LoopPadding",91);FT(521,1,oj,Wh),zL.D=function(t){return Ck(this,Gh(t,91))},zL.a=0,zL.c=0;Pp(gj,"SplineSelfLoopRouter/LoopPadding/EnclosingPredicate",521);FT(520,1,fP,Qt),zL.$b=function(t,e){return function(t,e){return Sx(e.b,t.b)}(Gh(t,91),Gh(e,91))};Pp(gj,"SplineSelfLoopRouter/LoopPadding/MarginComparator",520);FT(196,1,oj,_n),zL.D=function(t){return Gh(t,91).c==this.a};Pp(gj,"SplineSelfLoopRouter/LoopPadding/PortSidePredicate",196);FT(195,1,{195:1},wb),zL.c=0,zL.d=0,zL.e=0;Pp(gj,"SplineSelfLoopRouter/SelfLoopEdge",195);FT(519,1,fP,Jt),zL.$b=function(t,e){return function(t,e){return t.d-e.d}(Gh(t,195),Gh(e,195))};Pp(gj,"SplineSelfLoopRouter/SelfLoopEdge/StepSizeComparator",519);FT(82,25,{25:1,82:1},vT),zL.vc=function(){var t,e;for(t=_k(this.a,0);t.b!=t.d.c;)Gh(Cb(t),10).a=this.j.d;for(e=_k(this.c,0);e.b!=e.d.c;)Gh(Cb(e),10).a=this.j.d},zL.wc=function(){return this.b},zL.xc=function(){return this.e},zL.w=function(){return XS(new zn(this.d.a))},zL.b=0,zL.e=0;Pp(Tj,"CLEdge",82);FT(93,25,{25:1,93:1},$A),zL.vc=function(){this.b.i.a=this.j.d+this.b.e.b},zL.wc=function(){return this.b.g==(AS(),_H)?0:this.a},zL.xc=function(){return this.b.g==(AS(),_H)?0:this.c},zL.w=function(){return Bk(yx(this.b,(DL(),Uq)))},zL.a=0,zL.c=0;var QF,JF;Pp(Tj,"CLNode",93);FT(175,17,{175:1,3:1,23:1,17:1},Ps);var tz,ez,nz,rz,iz,oz,az,sz=Qy(Tj,"ConstraintCalculationStrategy",175,EM,(function(){return kb(),_x(Oo(sz,1),CP,175,0,[QF,JF])}));FT(125,17,{125:1,3:1,23:1,17:1},Is);var uz,cz,lz,fz=Qy(Tj,"GraphCompactionStrategy",125,EM,(function(){return aC(),_x(Oo(fz,1),CP,125,0,[oz,nz,az,iz,rz,ez])}));FT(455,1,lj,zc),zL.sc=function(t,e){var n,r,i;if((r=Gh(yx(t,(RL(),ZU)),125))!=(aC(),oz)){switch(jE(e,"Horizontal Compaction",1),this.a=t,ho(n=new cT(RA(i=new qu,t)),this.b),Gh(yx(t,QU),175).e){case 1:lo(n,cz);break;default:lo(n,(zd(),eH))}switch(r.e){case 1:dN(n);break;case 2:dN(KO(n,(b_(),vD)));break;case 3:dN(fa(KO(dN(n),(b_(),vD))));break;case 4:dN(fa(fo(KO(dN(n),(b_(),vD)),new Vt)));break;case 5:dN(function(t,e){return t.b=e,t}(n,lz))}KO(n,(b_(),gD)),n.e=!0,aN(i),j_(e)}};Pp(Tj,"HorizontalGraphCompactor",455);FT(462,1,{},En),zL.tc=function(t,e){var n,r;return fl(t,82)&&fl(e,82)&&!Ow($w(Gh(t,82).d,Gh(e,82).d))?0:(n=null,fl(t,93)&&(n=Gh(t,93).b),r=null,fl(e,93)&&(r=Gh(e,93).b),n&&n.g==(AS(),_H)||r&&r.g==(AS(),_H)?0:gl(Gh(yx(this.a.a,(DL(),uU)),134),n?n.g:(AS(),kH),r?r.g:(AS(),kH)))},zL.uc=function(t,e){return fl(t,82)&&fl(e,82)&&!Ow($w(Gh(t,82).d,Gh(e,82).d))?1:Ho(t.xc(),e.xc())};Pp(Tj,"HorizontalGraphCompactor/1",462);FT(456,317,{},Kh),zL.Dc=function(t){var e,n,r;for(this.b=t,iT(this,new qt,this.a),iT(this,new Ut,this.a),e=QI,r=new $n(this.b.a.b);r.a(r=Math.ceil(r))?0:r,e.o&&o.o&&fl(e,82)&&fl(o,82)&&!Ow($w(Gh(e,82).d,Gh(o,82).d))?(i=rl(new Dr,t.d),s=pv(Ou(o.g.a-e.g.a)),lA(ha(pa(ga(da(new Mr,0>s?0:s),1),i),t.c[e.f.d])),lA(ha(pa(ga(da(new Mr,0>-s?0:-s),1),i),t.c[o.f.d]))):(c=1,(fl(e,82)&&fl(o,93)||fl(o,82)&&fl(e,93))&&(c=2),lA(ha(pa(ga(da(new Mr,pv(r)),c),t.c[e.f.d]),t.c[o.f.d]))))}(this),function(t){var e,n,r,i,o,a,s,u,c,l,f,h,d,p,g,v,b;for(ml(),l=new _r,u=new Us,r=new $n(t.a.a.b);r.ae.j.d){if((d=t.c[e.f.d])==(v=t.c[f.f.d]))continue;lA(ha(pa(ga(da(new Mr,1),100),d),v))}}}(this),function(t){var e,n,r,i,o,a;for(i=new so,r=new $n(t.d.a);r.a1)for(e=rl(ba(new Dr,t.b++),t.d),a=_k(i,0);a.b!=a.d.c;)o=Gh(Cb(a),61),lA(ha(pa(ga(da(new Mr,1),0),e),o))}(this),cN(Jf(this.d),new Vf),i=new $n(this.a.a.b);i.a0&&(this.a[G.k]=K++)}else{for(I=0,H=new $n(C.f);H.a0&&++K}for(et=0,N=0,P=e.length;N0;){for(Nc(Y.b>0),z=0,a=new $n((G=Gh(Y.a.sb(Y.c=--Y.b),7)).b);a.a0&&(G.g==(uL(),wB)?(this.a[G.k]=et,++et):(this.a[G.k]=et+j+D,++D))}et+=D}else{for(I=0,H=new $n(C.f);H.a0&&++et}for(F=new _r,p=new Qi,T=0,O=t.length;Tl.c&&(l.c=V)):G.f.d==$&&(Vl.d&&(l.d=V));for(Mk(g,0,g.length,(Qs(),Qs(),NX)),tt=Ey(UX,nI,26,g.length,12,1),n=Ey(UX,nI,26,et+1,12,1),b=0;b0;)x%2>0&&(r+=it[x+1]),++it[x=(x-1)/2|0];for(k=Ey(dz,kP,158,2*g.length,0,1),m=0;me.f?1:t.ge.g?1:t.b-e.b}(this,Gh(t,204))},zL.b=0,zL.c=0,zL.d=0,zL.f=0,zL.g=0;var hz=Pp(Aj,"BetweenLayerHyperedgeAllCrossingsCounter/Hyperedge",204);FT(158,1,{158:1,23:1},vg),zL.F=function(t){return function(t,e){return t.ce.c?1:t.be.b?1:t.a!=e.a?t.a.b-e.a.b:0==t.d&&1==e.d?-1:1==t.d&&0==e.d?1:0}(this,Gh(t,158))},zL.b=0,zL.c=0,zL.d=0;var dz=Pp(Aj,"BetweenLayerHyperedgeAllCrossingsCounter/HyperedgeCorner",158);FT(611,339,{},qi),zL.Gc=function(t,e){var n,r,i,o,a,s,u,c,l,f,h,d,p,g,v,b,y,w,m,x,_;for(_=0,r=0,o=t[0].d,y=e[0].d,u=0,l=e.length;u0;){for(Nc(b.b>0),v=0,n=new $n((p=Gh(b.a.sb(b.c=--b.b),7)).b);n.a0&&(p.g==(uL(),wB)?(this.a[p.k]=_,++_):(this.a[p.k]=_+h+d,++d),r+=v)}_+=d}else{for(f=0,g=new $n(a.f);g.a0&&(++_,r+=f)}for(w=Ey(UX,nI,26,r,12,1),i=0,s=0,c=t.length;s0;)o%2>0&&(r+=s[o+1]),++s[o=(o-1)/2|0];return r}(_,r,w)};Pp(Aj,"BetweenLayerStraightEdgeAllCrossingsCounter",611);FT(338,1,{},sC),zL.b=0,zL.e=!1;Pp(Aj,"CrossingMatrixFiller",338);FT(447,1,lj,te),zL.sc=function(t,e){var n,r;jE(e,"Greedy switch crossing reduction",1),this.e=Gh(yx(t,(RL(),GU)),110),t.c.c.length<2||this.e==(hO(),ZV)||(function(t,e){var n,r,i,o,a,s,u,c;for(t.f=e,i=e.c.c.length,t.a=Ey(TH,ZL,51,i,0,2),t.d=Ey(TH,ZL,51,i,0,2),t.g=Ey(TH,ZL,51,i,0,2),a=new Uv(e.c,0);a.bIf(t.d,Dc(e.a,e.b))?-1:t.c==e.c&&Dc(t.a,t.b)==Dc(t.a,t.b)?0:1}(this,Gh(t,226))},zL.w=function(){return"ComparableEdgeAndPort [port="+this.b+", edge="+this.a+", portPosition="+this.c+"]"},zL.c=0;Pp(Aj,"InLayerEdgeTwoNodeCrossingCounter/ComparableEdgeAndPort",226);FT(612,1,{},Wk),zL.e=!0,zL.f=0,zL.g=0,zL.k=!1;Pp(Aj,"NorthSouthEdgeAllCrossingsCounter",612);FT(615,1,{},Hm),zL.b=0,zL.d=0,zL.e=!1;Pp(Aj,"NorthSouthEdgeNeighbouringNodeCrossingsCounter",615);FT(143,1,UP,Yf),zL.mb=function(){return sA(this)},zL.b=0;Pp(Aj,"PortIterable",143);FT(344,1,PP,Cv),zL.H=function(){return Gh(sp(this.a),7)},zL.G=function(){return this.a.b>0},zL.I=function(){throw new $r};Pp(Aj,"PortIterable/1",344);FT(336,1,{},OS);Pp(Aj,"SwitchDecider",336);FT(89,1,{89:1},ee),zL.w=function(){return"NEdge[id="+this.b+" w="+this.f+" d="+this.a+"]"},zL.a=1,zL.b=0,zL.e=!1,zL.f=0;var pz=Pp(Oj,"NEdge",89);FT(157,1,{},Mr);Pp(Oj,"NEdge/NEdgeBuilder",157);FT(278,1,{},jr);Pp(Oj,"NGraph",278);FT(61,1,{61:1},Ib),zL.b=0,zL.d=-1,zL.e=0,zL.i=-1,zL.j=!1;var gz=Pp(Oj,"NNode",61);FT(333,13,sj,zr),zL.rb=function(t,e){++this.d,wy(t,this.c.length),Su(this.c,t,e)},zL.ib=function(t){return yp(this,t)},zL.jb=function(t){return++this.d,Jm(this,t)},zL.Q=function(){++this.d,this.c=Ey(fM,kP,1,0,4,1)},zL.vb=function(t){return++this.d,gy(this,t)},zL.nb=function(t){return Ic(this,t)};Pp(Oj,"NNode/ChangeAwareArrayList",333);FT(199,1,{},Dr);Pp(Oj,"NNode/NNodeBuilder",199);FT(595,1,{},ne),zL.a=!1,zL.f=iP,zL.j=0;var vz,bz;Pp(Oj,"NetworkSimplex",595);FT(193,17,{180:1,193:1,3:1,23:1,17:1},js),zL.rc=function(){switch(this.e){case 0:return new Ph;case 1:return new me;default:throw new io("No implementation is available for the cycle breaker "+(null!=this.d?this.d:""+this.e))}};var yz,wz,mz=Qy(Pj,"CycleBreakingStrategy",193,EM,(function(){return Bg(),_x(Oo(mz,1),CP,193,0,[vz,bz])}));FT(539,1,Ij,Ph),zL.qc=function(t){return wz},zL.sc=function(t,e){var n,r,i,o,a,s,u,c,l,f,h,d,p,g,v,b,y,w,m,x,_,E,k,S,C,T,A,N,O,L;for(jE(e,"Greedy cycle removal",1),L=(b=t.b).c.length,this.a=Ey(UX,nI,26,L,12,1),this.c=Ey(UX,nI,26,L,12,1),this.b=Ey(UX,nI,26,L,12,1),s=0,g=new $n(b);g.a0?S+1:1);for(i=new $n(m.e);i.a0?S+1:1)}0==this.c[s]?Nh(this.d,d):0==this.a[s]&&Nh(this.e,d),++s}for(h=-1,f=1,c=new je,C=Gh(yx(t,(DL(),iU)),154);L>0;){for(;0!=this.d.b;)A=Gh(wh(this.d),9),this.b[A.k]=h--,SN(this,A),--L;for(;0!=this.e.b;)N=Gh(wh(this.e),9),this.b[N.k]=f++,SN(this,N),--L;if(L>0){for(l=lP,v=new $n(b);v.a=l&&(y>l&&(c.c=Ey(fM,kP,1,0,4,1),l=y),c.c[c.c.length]=d);u=Gh(ld(c,Yk(C,c.c.length)),9),this.b[u.k]=f++,SN(this,u),--L}}for(T=b.c.length+1,s=0;sthis.b[O]&&(HN(n,!0),$y(t,Aq,(Hd(),Hd(),vX)));this.a=null,this.c=null,this.b=null,Cg(this.e),Cg(this.d),j_(e)};var xz;Pp(Pj,"GreedyCycleBreaker",539);FT(540,1,Ij,me),zL.qc=function(t){return xz},zL.sc=function(t,e){var n,r,i,o,a,s,u,c,l,f,h,d;for(jE(e,"Interactive cycle breaking",1),c=new je,f=new $n(t.b);f.a0&&EC(this,a,c);for(r=new $n(c);r.a(a=s+c.j.a)?s+1:a,g=new Uv(n,0),r=null;g.b=a){Nc(g.b>0),g.a.sb(g.c=--g.b);break}d.a>s&&(r?(Jm(r.b,d.b),r.a=Ro(r.a,d.a),ng(g)):(Oh(d.b,c),d.c=Ho(d.c,s),d.a=Ro(d.a,a),r=d))}r||((r=new Rr).c=s,r.a=a,eh(g,r),Oh(r.b,c))}for(o=t.c,u=0,p=new $n(n);p.a0&&(n+=a.i.a+a.j.a/2,++c),l=new $n(a.f);l.a1&&(t.c[l]=!0):y.g==BB&&y.e.c.length+y.b.c.length>1&&(t.d[l]=!0)}g.g==(AS(),CH)&&(++s[l],o[l]=!0)}for(n=!0,p=!0,a=0;a0;T++){u=(c=0!=mT(C,1))?0:g-1,s=this.b[u],k=0!=mT(C,1)?_:y,K_(s,i,c,!1,!0),o=iP,a=!0;do{if(Om(this.b,this.k),S=o,o=0,o+=nw(this.f,s,u),c){for(v=1;v=0;v--)l=this.b[v],py(k,s,(tm(),_U)),K_(l,i,!1,!a,!1),o+=nw(this.f,l,v),this.c[v]||this.d[v+1]?o+=GL(this.e,l,s):o+=NL(this.i,l,s),s=l;u=0}a=!1,c=!c}while(o0);(or?o:r;if(o>a){for(l=fE(t,n).mb();l.G();)h[(c=Gh(l.H(),7)).k]=e+IT(n,c.g)-a;return o-a}return 0}switch(n.e){case 1:for(i=0,s=0,f=new $n(t.f);f.a"),te.e?1:t.fe.f?1:ff(t)-ff(e)}(this,Gh(t,197))},zL.b=0,zL.c=0,zL.e=0,zL.f=0;var Fz=Pp(Yj,"HyperedgeCrossingsCounter/Hyperedge",197);FT(156,1,{156:1,23:1},Pg),zL.F=function(t){return function(t,e){return t.ce.c?1:t.be.b?1:t.a!=e.a?ff(t.a)-ff(e.a):t.d==(ub(),Yz)&&e.d==zz?-1:t.d==zz&&e.d==Yz?1:0}(this,Gh(t,156))},zL.b=0,zL.c=0;var zz,Yz,Vz=Pp(Yj,"HyperedgeCrossingsCounter/HyperedgeCorner",156);FT(242,17,{242:1,3:1,23:1,17:1},iu);var qz,Uz=Qy(Yj,"HyperedgeCrossingsCounter/HyperedgeCorner/Type",242,EM,(function(){return ub(),_x(Oo(Uz,1),CP,242,0,[Yz,zz])}));FT(545,1,Ij,Ce),zL.qc=function(t){return Gh(yx(t,(DL(),Mq)),18).kb((YA(),YV))?qz:null},zL.sc=function(t,e){var n;for(jE(e,"Interactive node placement",1),this.a=Gh(yx(t,(DL(),uU)),134),n=new $n(t.c);n.a0&&c[r]&&(p=rh(t.b,c[r],u)),g=Ro(g,i.d.c.b+p);for(o=new $n(l.f);o.am)?(u=2,a=iP):0==u?(u=1,a=_):(u=0,a=_):(h=_>=a||a-_0?(l=Gh(ld(f.d.a,o-1),9),E=kh(t.b,f,l),g=f.i.b-f.e.d-(l.i.b+l.j.b+l.e.a+E)):g=f.i.b-f.e.d,u=g0?E:0,d.c=n,d.d=Gh(Up(w,c.c.f),61),yp(d.c.g,d),yp(d.d.c,d),(C=new ee).f=Lk(c),C.a=E<0?-E:0,C.c=n,C.d=Gh(Up(w,c.d.f),61),yp(C.c.g,C),yp(C.d.c,C));for(i=Gh(yx(t,(RL(),nX)),24).a*pv(Math.sqrt(y)),cN(po(go(Jf(r),i),!1),Am(e,1)),g=new $n(r.a);g.aa)&&mp(t.c,Gh(v.b,12));++s}o=a}}}(this,t),kw(4,JP),h=new sw(4),Gh(yx(t,BU),124).e){case 3:d=new cA(t,this.d.d,(ab(),uY),(ov(),aY)),h.c[h.c.length]=d;break;case 1:p=new cA(t,this.d.d,(ab(),cY),(ov(),aY)),h.c[h.c.length]=p;break;case 4:b=new cA(t,this.d.d,(ab(),uY),(ov(),sY)),h.c[h.c.length]=b;break;case 2:y=new cA(t,this.d.d,(ab(),cY),(ov(),sY)),h.c[h.c.length]=y;break;default:d=new cA(t,this.d.d,(ab(),uY),(ov(),aY)),p=new cA(t,this.d.d,cY,aY),b=new cA(t,this.d.d,uY,sY),y=new cA(t,this.d.d,cY,sY),h.c[h.c.length]=b,h.c[h.c.length]=y,h.c[h.c.length]=d,h.c[h.c.length]=p}for(n=new fu(t,this.d),o=new $n(h);o.a_[u]&&(p=u),l=new $n(t.b.c);l.afT(r))&&(c=r);for(!c&&(my(0,h.c.length),c=Gh(h.c[0],81)),f=new $n(t.c);f.a0?1:r<0?-1:0)}(this,Gh(t,27),Gh(e,27))};Pp(Uj,"NeighborhoodInformation/NeighborComparator",598);FT(334,1,{});Pp(Uj,"ThresholdStrategy",334);FT(602,334,{},_i),zL.Ic=function(t,e,n){return this.a.k==(ab(),cY)?QI:JI},zL.Jc=function(){};Pp(Uj,"ThresholdStrategy/NullThresholdStrategy",602);FT(249,1,{249:1},hu),zL.c=!1,zL.d=!1;Pp(Uj,"ThresholdStrategy/Postprocessable",249);FT(603,334,{},Ei),zL.Ic=function(t,e,n){var r,i,o;return i=e==n,r=this.a.a[n.k]==e,i||r?(o=t,this.a.c,ov(),i&&(o=$N(this,e,!0)),(o==1/0||o==-1/0)&&r&&(o=$N(this,n,!1)),o):t},zL.Jc=function(){for(var t,e,n;0!=this.d.b;)(e=UA(this,n=Gh(qg(this.d),249))).a&&(t=e.a,this.c.a[t.c.f.d.k]!==this.c.a[t.d.f.d.k]&&(TT(this,n)||ac(this.e,n)));for(;0!=this.e.a.c.length;)TT(this,Gh(Gx(this.e),249))};Pp(Uj,"ThresholdStrategy/SimpleThresholdStrategy",603);FT(423,1,{180:1},se),zL.rc=function(){switch(this.a.e){case 1:return new Gu;case 3:return new Le;default:return new Oe}};var bY,yY,wY,mY,xY,_Y,EY,kY;Pp(Xj,"EdgeRouterFactory",423);FT(538,1,Ij,Oe),zL.qc=function(t){var e,n;return n=Gh(yx(t,(DL(),Mq)),18),e=new Z_,n.kb((YA(),VV))&&(Tm(e,mY),Tm(e,_Y)),(n.kb(UV)||eo(no(Af(yx(t,(RL(),RU))))))&&(Tm(e,_Y),n.kb(XV)&&Tm(e,EY)),n.kb(YV)&&Tm(e,wY),n.kb($V)&&Tm(e,kY),n.kb(qV)&&Tm(e,xY),n.kb(HV)&&Tm(e,bY),n.kb(zV)&&Tm(e,yY),e},zL.sc=function(t,e){var n,r,i,o,a,s,u,c,l,f,h,d;jE(e,"Orthogonal edge routing",1),h=Gh(yx(t,(DL(),uU)),134),eo(no(Af(yx(t,(HL(),tR))))),l=new hC(0,h.a),d=0,o=new Uv(t.c,0),a=null,s=null;do{c=(u=o.b0?(n=h.b+(f-1)*h.a,u&&(n+=h.b),n"+this.b},zL.c=0;Pp(Xj,"OrthogonalRoutingGenerator/Dependency",118);FT(80,1,{80:1,23:1},zm),zL.F=function(t){return function(t,e){return t.d-e.d}(this,Gh(t,80))},zL.t=function(t){var e;return!!fl(t,80)&&(e=Gh(t,80),this.d==e.d)},zL.v=function(){return this.d},zL.w=function(){var t,e,n,r;for(t=new Uo("{"),r=new $n(this.g);r.acj&&(i=new Za(u,f),Nh(n.a,i),FA(this.a,n,t,i,!1),o=new Za(l,f),Nh(n.a,o),FA(this.a,n,t,o,!1))},zL.Lc=function(t){return t.f.i.a+t.i.a+t.a.a},zL.Mc=function(){return uL(),DB},zL.Nc=function(){return uL(),wB};Pp(Xj,"OrthogonalRoutingGenerator/NorthToSouthRoutingStrategy",580);FT(581,1,{},Mn),zL.Kc=function(t,e){var n,r,i,o,a,s,u,c,l,f;for(f=e-t.i*this.a.c,s=new $n(t.g);s.acj&&(i=new Za(u,f),Nh(n.a,i),FA(this.a,n,t,i,!1),o=new Za(l,f),Nh(n.a,o),FA(this.a,n,t,o,!1))},zL.Lc=function(t){return t.f.i.a+t.i.a+t.a.a},zL.Mc=function(){return uL(),wB},zL.Nc=function(){return uL(),DB};Pp(Xj,"OrthogonalRoutingGenerator/SouthToNorthRoutingStrategy",581);FT(579,1,{},Dn),zL.Kc=function(t,e){var n,r,i,o,a,s,u,c,l,f;for(f=e+t.i*this.a.c,s=new $n(t.g);s.acj&&(i=new Za(f,u),Nh(n.a,i),FA(this.a,n,t,i,!0),o=new Za(f,l),Nh(n.a,o),FA(this.a,n,t,o,!0))},zL.Lc=function(t){return t.f.i.b+t.i.b+t.a.b},zL.Mc=function(){return uL(),yB},zL.Nc=function(){return uL(),BB};var SY,CY,TY,AY,NY;Pp(Xj,"OrthogonalRoutingGenerator/WestToEastRoutingStrategy",579);FT(535,1,Ij,Gu),zL.qc=function(t){var e,n;return n=Gh(yx(t,(DL(),Mq)),18),e=new Z_,(n.kb((YA(),UV))||eo(no(Af(yx(t,(RL(),RU))))))&&(Tm(e,TY),n.kb(XV)&&Tm(e,AY)),n.kb(HV)&&Tm(e,SY),n.kb(zV)&&Tm(e,CY),e},zL.sc=function(t,e){var n,r,i,o,a,s,u,c,l,f,h,d,p,g,v,b,y,w,m,x;for(jE(e,"Polyline edge routing",1),f=Gh(yx(t,(DL(),sU)),15).a,n=Gh(yx(t,(RL(),DU)),15).a,v=0,0!=t.c.c.length&&(v=.4*n*(b=NT(Gh(ld(t.c,0),16)))),o=new Uv(t.c,0);o.b0&&(v-=f),_O(i,v),u=0,l=new $n(i.a);l.a(g-p<=0?0-(g-p):g-p)?s:g-p<=0?0-(g-p):g-p;switch(c.g.e){case 0:case 4:case 1:case 3:QN(this,c,v)}u=u>s?u:s}o.b(b=NT((Nc(o.b0),o.a.sb(o.c=--o.b)),a=.4*n*u,!r&&o.b0?((h=(b+1)*this.a)=0&&(O+=(b+2)*this.a)}g=m,u=c}while(m);for(r=new $n(T);r.a("+this.c+") "+this.b},zL.c=0;var fV,hV;Pp(Wj,"SplineEdgeRouter/Dependency",117);FT(223,17,{223:1,3:1,23:1,17:1},du);var dV=Qy(Wj,"SplineEdgeRouter/SideToProcess",223,EM,(function(){return av(),_x(Oo(dV,1),CP,223,0,[fV,hV])}));FT(77,1,{77:1,23:1},YC,mO),zL.F=function(t){return function(t,e){return t.i-e.i}(this,Gh(t,77))},zL.a=0,zL.b=0,zL.e=0,zL.f=!1,zL.i=0,zL.k=0,zL.n=0,zL.p=0;var pV,gV,vV,bV,yV,wV;Pp(Wj,"SplineEdgeRouter/SplineHyperEdge",77);FT(123,17,{123:1,3:1,23:1,17:1},pu);var mV,xV,_V,EV,kV=Qy(Jj,"ContentAlignment",123,EM,(function(){return CS(),_x(Oo(kV,1),CP,123,0,[wV,yV,bV,gV,pV,vV])}));FT(218,17,{218:1,3:1,23:1,17:1},gu);var SV,CV,TV,AV,NV,OV=Qy(Jj,"EdgeConstraint",218,EM,(function(){return Ox(),_x(Oo(OV,1),CP,218,0,[_V,xV,EV])}));FT(115,17,{115:1,3:1,23:1,17:1},vu);var LV,PV,IV,jV,MV,DV,RV,BV=Qy(Jj,"EdgeLabelSideSelection",115,EM,(function(){return fS(),_x(Oo(BV,1),CP,115,0,[CV,SV,AV,TV,NV])}));FT(124,17,{124:1,3:1,23:1,17:1},bu);var GV,HV,FV,zV,YV,VV,qV,UV,XV,WV,$V,KV=Qy(Jj,"FixedAlignment",124,EM,(function(){return SS(),_x(Oo(KV,1),CP,124,0,[MV,jV,RV,IV,DV,PV])}));FT(113,17,{113:1,3:1,23:1,17:1},yu);var ZV,QV,JV,tq,eq,nq,rq,iq,oq=Qy(Jj,"GraphProperties",113,EM,(function(){return YA(),_x(Oo(oq,1),CP,113,0,[FV,YV,VV,qV,UV,XV,$V,HV,zV,WV])}));FT(110,17,{110:1,3:1,23:1,17:1},xb),zL.a=!1,zL.b=!1,zL.c=!1;var aq,sq,uq,cq,lq=Qy(Jj,"GreedySwitchType",110,EM,(function(){return hO(),_x(Oo(lq,1),CP,110,0,[QV,nq,JV,rq,tq,iq,eq,ZV])}));FT(140,17,{140:1,3:1,23:1,17:1},wu);var fq,hq,dq=Qy(Jj,"InLayerConstraint",140,EM,(function(){return Mw(),_x(Oo(dq,1),CP,140,0,[uq,cq,sq])}));FT(174,17,{174:1,3:1,23:1,17:1},mu);var pq,gq,vq,bq,yq,wq,mq,xq,_q,Eq,kq,Sq,Cq,Tq,Aq,Nq,Oq,Lq,Pq,Iq,jq,Mq,Dq,Rq,Bq,Gq,Hq,Fq,zq,Yq,Vq,qq,Uq,Xq,Wq,$q,Kq,Zq,Qq,Jq,tU,eU,nU,rU,iU,oU,aU,sU,uU,cU,lU,fU,hU,dU,pU,gU,vU,bU,yU,wU,mU=Qy(Jj,"InteractiveReferencePoint",174,EM,(function(){return ob(),_x(Oo(mU,1),CP,174,0,[fq,hq])}));FT(85,17,{85:1,3:1,23:1,17:1},xu);var xU,_U,EU,kU,SU=Qy(Jj,"LayerConstraint",85,EM,(function(){return Hk(),_x(Oo(SU,1),CP,85,0,[wU,gU,vU,bU,yU])}));FT(219,17,{219:1,3:1,23:1,17:1},_u);var CU,TU,AU,NU,OU,LU,PU,IU,jU,MU,DU,RU,BU,GU,HU,FU,zU,YU,VU,qU,UU,XU,WU,$U,KU,ZU,QU,JU,tX,eX,nX,rX,iX,oX,aX,sX=Qy(Jj,"PortType",219,EM,(function(){return tm(),_x(Oo(sX,1),CP,219,0,[kU,_U,EU])}));FT(153,17,{153:1,3:1,23:1,17:1},Eu);var uX,cX=Qy(Jj,"SelfLoopPlacement",153,EM,(function(){return CE(),_x(Oo(cX,1),CP,153,0,[iX,aX,oX])}));FT(134,1,{134:1},iL),zL.a=0,zL.b=0,zL.c=0,zL.d=0,zL.e=0,zL.f=0;var lX,fX,hX;Pp(Jj,"Spacings",134);FT(172,17,{172:1,3:1,23:1,17:1},ku);var dX,pX=Qy(Jj,"WideNodesStrategy",172,EM,(function(){return jm(),_x(Oo(pX,1),CP,172,0,[lX,fX,hX])}));FT(644,1,{});Pp(wP,"OutputStream",644);FT(645,644,{});Pp(wP,"FilterOutputStream",645);FT(291,645,{},ce);Pp(wP,"PrintStream",291);FT(255,1,{}),zL.w=function(){return this.a};Pp(vP,"AbstractStringBuilder",255);FT(621,95,JL,ki);Pp(vP,"ArrayIndexOutOfBoundsException",621);FT(290,72,JL,Ur,mo);Pp(vP,"ArrayStoreException",290);FT(252,46,QL);Pp(vP,"Error",252);FT(84,252,QL,xr,aw);var gX,vX;Pp(vP,"AssertionError",84);XL={3:1,349:1,23:1};var bX=Pp(vP,"Boolean",349);WL={3:1,23:1,184:1,231:1};var yX=Pp(vP,"Double",184);FT(15,231,{3:1,23:1,15:1,231:1},Bn,Gn),zL.F=function(t){return function(t,e){return Sx(t.a,e.a)}(this,Gh(t,15))},zL.t=function(t){return fl(t,15)&&Gh(t,15).a==this.a},zL.v=function(){return pv(this.a)},zL.w=function(){return t=this.a,oi(),""+t;var t},zL.a=0;var wX=Pp(vP,"Float",15);FT(101,72,JL,Xr,xo);var mX,xX;Pp(vP,"IllegalStateException",101);FT(608,72,JL,_o);Pp(vP,"NegativeArraySizeException",608);FT(76,72,{3:1,54:1,76:1,46:1},Wr,Eo);Pp(vP,"NullPointerException",76);FT(130,29,{3:1,54:1,29:1,130:1,46:1},Si,Wo);Pp(vP,"NumberFormatException",130);FT(146,1,{3:1,146:1},Ig),zL.t=function(t){var e;return!!fl(t,146)&&(e=Gh(t,146),this.c==e.c&&xg(this.d,e.d)&&xg(this.a,e.a)&&xg(this.b,e.b))},zL.v=function(){return Vx(_x(Oo(fM,1),kP,1,4,[F_(this.c),this.a,this.d,this.b]))},zL.w=function(){return this.a+"."+this.d+"("+(null!=this.b?this.b:"Unknown Source")+(this.c>=0?":"+this.c:"")+")"},zL.c=0;var _X=Pp(vP,"StackTraceElement",146);FT(98,255,{345:1},Qo,Jo,Uo);var EX;Pp(vP,"StringBuilder",98);FT(45,72,{3:1,54:1,46:1,45:1},$r,ko);Pp(vP,"UnsupportedOperationException",45);FT(213,638,IP),zL.Q=function(){by(this)},zL.R=function(t){return Vy(this,t)},zL.ab=function(t){return Wx(this,t,this.e)||Wx(this,t,this.d)},zL.bb=function(){return new Hn(this)},zL.cb=function(t){return Up(this,t)},zL.db=function(t,e){return dg(this,t,e)},zL.eb=function(t){return qd(this,t)},zL.Y=function(){return Bs(this)};Pp(jP,"AbstractHashMap",213);FT(120,641,DP,Hn),zL.Q=function(){this.a.Q()},zL.kb=function(t){return cb(this,t)},zL.mb=function(){return new zx(this.a)},zL.nb=function(t){var e;return!!cb(this,t)&&(e=Gh(t,21).yb(),this.a.eb(e),!0)},zL.Y=function(){return this.a.Y()};Pp(jP,"AbstractHashMap/EntrySet",120);FT(148,1,PP,zx),zL.H=function(){return zw(this)},zL.G=function(){return this.b},zL.I=function(){Gy(this)},zL.b=!1;Pp(jP,"AbstractHashMap/EntrySetIterator",148);FT(162,1,PP,Fn),zL.G=function(){return this.b0},zL.L=function(){return this.b},zL.M=function(){return sp(this)},zL.N=function(){return this.b-1},zL.O=function(t){nh(this,t)};Pp(jP,"AbstractList/ListIteratorImpl",43);FT(258,647,RP,Yv),zL.rb=function(t,e){wy(t,this.b),this.c.rb(this.a+t,e),++this.b},zL.sb=function(t){return my(t,this.b),this.c.sb(this.a+t)},zL.vb=function(t){var e;return my(t,this.b),e=this.c.vb(this.a+t),--this.b,e},zL.wb=function(t,e){return my(t,this.b),this.c.wb(this.a+t,e)},zL.Y=function(){return this.b},zL.a=0,zL.b=0;Pp(jP,"AbstractList/SubList",258);FT(36,641,DP,zn),zL.Q=function(){this.a.Q()},zL.kb=function(t){return this.a.R(t)},zL.mb=function(){return new Yn(this.a.bb().mb())},zL.nb=function(t){return!!this.a.R(t)&&(this.a.eb(t),!0)},zL.Y=function(){return this.a.Y()};Pp(jP,"AbstractMap/1",36);FT(40,1,PP,Yn),zL.G=function(){return this.a.G()},zL.H=function(){return Gh(this.a.H(),21).yb()},zL.I=function(){this.a.I()};Pp(jP,"AbstractMap/1/1",40);FT(211,640,MP,Vn),zL.Q=function(){this.a.Q()},zL.kb=function(t){return this.a.ab(t)},zL.mb=function(){return new qn(this.a.bb().mb())},zL.Y=function(){return this.a.Y()};Pp(jP,"AbstractMap/2",211);FT(212,1,PP,qn),zL.G=function(){return this.a.G()},zL.H=function(){return Gh(this.a.H(),21).zb()},zL.I=function(){this.a.I()};Pp(jP,"AbstractMap/2/1",212);FT(210,1,{210:1,21:1}),zL.t=function(t){var e;return!!fl(t,21)&&(e=Gh(t,21),xg(this.d,e.yb())&&xg(this.e,e.zb()))},zL.yb=function(){return this.d},zL.zb=function(){return this.e},zL.v=function(){return Bc(this.d)^Bc(this.e)},zL.Ab=function(t){return vh(this,t)},zL.w=function(){return this.d+"="+this.e};Pp(jP,"AbstractMap/AbstractEntry",210);FT(163,210,{210:1,163:1,21:1},Ru);Pp(jP,"AbstractMap/SimpleEntry",163);FT(652,1,FP),zL.t=function(t){var e;return!!fl(t,21)&&(e=Gh(t,21),xg(this.yb(),e.yb())&&xg(this.zb(),e.zb()))},zL.v=function(){return Bc(this.yb())^Bc(this.zb())},zL.w=function(){return this.yb()+"="+this.zb()};Pp(jP,zP,652);FT(639,638,IP),zL._=function(t){return xy(this,t)},zL.R=function(t){return Iu(this,t)},zL.bb=function(){return new Un(this)},zL.cb=function(t){return Wu($x(this,t))},zL.W=function(){return new Xn(this)};Pp(jP,"AbstractNavigableMap",639);FT(287,641,DP,Un),zL.kb=function(t){return fl(t,21)&&xy(this.b,Gh(t,21))},zL.mb=function(){return new fh(this.b)},zL.nb=function(t){var e;return!!fl(t,21)&&(e=Gh(t,21),My(this.b,e))},zL.Y=function(){return this.b.c};Pp(jP,"AbstractNavigableMap/EntrySet",287);FT(229,641,HP,Xn),zL.Q=function(){co(this.a)},zL.kb=function(t){return Iu(this.a,t)},zL.mb=function(){return new Wn(new fh(new Ql(this.a).b))},zL.nb=function(t){return!!Iu(this.a,t)&&(cg(this.a,t),!0)},zL.Y=function(){return this.a.c};Pp(jP,"AbstractNavigableMap/NavigableKeySet",229);FT(230,1,PP,Wn),zL.G=function(){return Rs(this.a.a)},zL.H=function(){return pf(this.a).yb()},zL.I=function(){Qh(this.a)};Pp(jP,"AbstractNavigableMap/NavigableKeySet/1",230);FT(4,1,PP,$n),zL.G=function(){return hl(this)},zL.H=function(){return Wv(this)},zL.I=function(){ap(this)},zL.a=0,zL.b=-1;Pp(jP,"ArrayList/1",4);FT(94,647,eM,Kn),zL.kb=function(t){return-1!=function(t,e){var n,r;for(n=0,r=t.Y();n0){for(r&&$y(r,Vq,f),u=Ey(TH,qI,9,l.a.length,0,1),p=0;p0&&c>0&&MO(b,new Za(S,c),!0))),g=Ro(g,b.i.a+b.j.a),v=Ro(v,b.i.b+b.j.b),d=new $n(b.c);d.a=0;w--){var m=a[w].id(),x=a[w].position();e.randomize&&(x={x:Math.round(d.x1+(d.x2-d.x1)*Math.random()),y:Math.round(d.y1+(d.y2-d.y1)*Math.random())}),y.vertices.push({id:m,x:x.x,y:x.y})}for(w=s.length-1;w>=0;w--){var _=s[w].source().id(),E=s[w].target().id();y.edges.push({src:_,tgt:E})}var k=t.thread;function S(t){for(var r=t.vertices,i=[],o=0;o=C||A>=4)&&(N>=s?T=!0:(y={xl:0,xr:n+=n*a,yt:0,yb:r+=r*a},++N,A=0)),C=I,u(),c()}return u(),t})).then((function(n){var r=n.vertices;S(n);var i=n.startTime,o=new Date;console.info("Layout on "+r.length+" nodes took "+(o-i)+" ms"),t.one("layoutstop",e.stop),e.animate||t.trigger("layoutready"),t.trigger("layoutstop"),k.stop()}))}return this},a.prototype.stop=function(){this.thread&&this.thread.stop(),this.trigger("layoutstop")},a.prototype.destroy=function(){this.thread&&this.thread.stop()},t.exports=a},function(t,e,n){"use strict";var r=n(0),i=function(t){t("layout","spread",r)};"undefined"!=typeof cytoscape&&i(cytoscape),t.exports=i},function(t,e){ /*! Copyright (C) 2010-2013 Raymond Hill: https://github.com/gorhill/Javascript-Voronoi MIT License: See https://github.com/gorhill/Javascript-Voronoi/LICENSE.md */ function n(){this.vertices=null,this.edges=null,this.cells=null,this.toRecycle=null,this.beachsectionJunkyard=[],this.circleEventJunkyard=[],this.vertexJunkyard=[],this.edgeJunkyard=[],this.cellJunkyard=[]}n.prototype.reset=function(){if(this.beachline||(this.beachline=new this.RBTree),this.beachline.root)for(var t=this.beachline.getFirst(this.beachline.root);t;)this.beachsectionJunkyard.push(t),t=t.rbNext;this.beachline.root=null,this.circleEvents||(this.circleEvents=new this.RBTree),this.circleEvents.root=this.firstCircleEvent=null,this.vertices=[],this.edges=[],this.cells=[]},n.prototype.sqrt=function(t){return Math.sqrt(t)},n.prototype.abs=function(t){return Math.abs(t)},n.prototype.ε=n.ε=1e-9,n.prototype.invε=n.invε=1/n.ε,n.prototype.equalWithEpsilon=function(t,e){return this.abs(t-e)<1e-9},n.prototype.greaterThanWithEpsilon=function(t,e){return t-e>1e-9},n.prototype.greaterThanOrEqualWithEpsilon=function(t,e){return e-t<1e-9},n.prototype.lessThanWithEpsilon=function(t,e){return e-t>1e-9},n.prototype.lessThanOrEqualWithEpsilon=function(t,e){return t-e<1e-9},n.prototype.RBTree=function(){this.root=null},n.prototype.RBTree.prototype.rbInsertSuccessor=function(t,e){var n,r,i;if(t){if(e.rbPrevious=t,e.rbNext=t.rbNext,t.rbNext&&(t.rbNext.rbPrevious=e),t.rbNext=e,t.rbRight){for(t=t.rbRight;t.rbLeft;)t=t.rbLeft;t.rbLeft=e}else t.rbRight=e;n=t}else this.root?(t=this.getFirst(this.root),e.rbPrevious=null,e.rbNext=t,t.rbPrevious=e,t.rbLeft=e,n=t):(e.rbPrevious=e.rbNext=null,this.root=e,n=null);for(e.rbLeft=e.rbRight=null,e.rbParent=n,e.rbRed=!0,t=e;n&&n.rbRed;)n===(r=n.rbParent).rbLeft?(i=r.rbRight)&&i.rbRed?(n.rbRed=i.rbRed=!1,r.rbRed=!0,t=r):(t===n.rbRight&&(this.rbRotateLeft(n),n=(t=n).rbParent),n.rbRed=!1,r.rbRed=!0,this.rbRotateRight(r)):(i=r.rbLeft)&&i.rbRed?(n.rbRed=i.rbRed=!1,r.rbRed=!0,t=r):(t===n.rbLeft&&(this.rbRotateRight(n),n=(t=n).rbParent),n.rbRed=!1,r.rbRed=!0,this.rbRotateLeft(r)),n=t.rbParent;this.root.rbRed=!1},n.prototype.RBTree.prototype.rbRemoveNode=function(t){t.rbNext&&(t.rbNext.rbPrevious=t.rbPrevious),t.rbPrevious&&(t.rbPrevious.rbNext=t.rbNext),t.rbNext=t.rbPrevious=null;var e,n,r=t.rbParent,i=t.rbLeft,o=t.rbRight;if(e=i?o?this.getFirst(o):i:o,r?r.rbLeft===t?r.rbLeft=e:r.rbRight=e:this.root=e,i&&o?(n=e.rbRed,e.rbRed=t.rbRed,e.rbLeft=i,i.rbParent=e,e!==o?(r=e.rbParent,e.rbParent=t.rbParent,t=e.rbRight,r.rbLeft=t,e.rbRight=o,o.rbParent=e):(e.rbParent=r,r=e,t=e.rbRight)):(n=t.rbRed,t=e),t&&(t.rbParent=r),!n)if(t&&t.rbRed)t.rbRed=!1;else{var a;do{if(t===this.root)break;if(t===r.rbLeft){if((a=r.rbRight).rbRed&&(a.rbRed=!1,r.rbRed=!0,this.rbRotateLeft(r),a=r.rbRight),a.rbLeft&&a.rbLeft.rbRed||a.rbRight&&a.rbRight.rbRed){a.rbRight&&a.rbRight.rbRed||(a.rbLeft.rbRed=!1,a.rbRed=!0,this.rbRotateRight(a),a=r.rbRight),a.rbRed=r.rbRed,r.rbRed=a.rbRight.rbRed=!1,this.rbRotateLeft(r),t=this.root;break}}else if((a=r.rbLeft).rbRed&&(a.rbRed=!1,r.rbRed=!0,this.rbRotateRight(r),a=r.rbLeft),a.rbLeft&&a.rbLeft.rbRed||a.rbRight&&a.rbRight.rbRed){a.rbLeft&&a.rbLeft.rbRed||(a.rbRight.rbRed=!1,a.rbRed=!0,this.rbRotateLeft(a),a=r.rbLeft),a.rbRed=r.rbRed,r.rbRed=a.rbLeft.rbRed=!1,this.rbRotateRight(r),t=this.root;break}a.rbRed=!0,t=r,r=r.rbParent}while(!t.rbRed);t&&(t.rbRed=!1)}},n.prototype.RBTree.prototype.rbRotateLeft=function(t){var e=t,n=t.rbRight,r=e.rbParent;r?r.rbLeft===e?r.rbLeft=n:r.rbRight=n:this.root=n,n.rbParent=r,e.rbParent=n,e.rbRight=n.rbLeft,e.rbRight&&(e.rbRight.rbParent=e),n.rbLeft=e},n.prototype.RBTree.prototype.rbRotateRight=function(t){var e=t,n=t.rbLeft,r=e.rbParent;r?r.rbLeft===e?r.rbLeft=n:r.rbRight=n:this.root=n,n.rbParent=r,e.rbParent=n,e.rbLeft=n.rbRight,e.rbLeft&&(e.rbLeft.rbParent=e),n.rbRight=e},n.prototype.RBTree.prototype.getFirst=function(t){for(;t.rbLeft;)t=t.rbLeft;return t},n.prototype.RBTree.prototype.getLast=function(t){for(;t.rbRight;)t=t.rbRight;return t},n.prototype.Diagram=function(t){this.site=t},n.prototype.Cell=function(t){this.site=t,this.halfedges=[],this.closeMe=!1},n.prototype.Cell.prototype.init=function(t){return this.site=t,this.halfedges=[],this.closeMe=!1,this},n.prototype.createCell=function(t){var e=this.cellJunkyard.pop();return e?e.init(t):new this.Cell(t)},n.prototype.Cell.prototype.prepareHalfedges=function(){for(var t,e=this.halfedges,n=e.length;n--;)(t=e[n].edge).vb&&t.va||e.splice(n,1);return e.sort((function(t,e){return e.angle-t.angle})),e.length},n.prototype.Cell.prototype.getNeighborIds=function(){for(var t,e=[],n=this.halfedges.length;n--;)null!==(t=this.halfedges[n].edge).lSite&&t.lSite.voronoiId!=this.site.voronoiId?e.push(t.lSite.voronoiId):null!==t.rSite&&t.rSite.voronoiId!=this.site.voronoiId&&e.push(t.rSite.voronoiId);return e},n.prototype.Cell.prototype.getBbox=function(){for(var t,e,n,r=this.halfedges,i=r.length,o=1/0,a=1/0,s=-1/0,u=-1/0;i--;)(e=(t=r[i].getStartpoint()).x)s&&(s=e),n>u&&(u=n);return{x:o,y:a,width:s-o,height:u-a}},n.prototype.Cell.prototype.pointIntersection=function(t,e){for(var n,r,i,o,a=this.halfedges,s=a.length;s--;){if(r=(n=a[s]).getStartpoint(),i=n.getEndpoint(),!(o=(e-r.y)*(i.x-r.x)-(t-r.x)*(i.y-r.y)))return 0;if(o>0)return-1}return 1},n.prototype.Vertex=function(t,e){this.x=t,this.y=e},n.prototype.Edge=function(t,e){this.lSite=t,this.rSite=e,this.va=this.vb=null},n.prototype.Halfedge=function(t,e,n){if(this.site=e,this.edge=t,n)this.angle=Math.atan2(n.y-e.y,n.x-e.x);else{var r=t.va,i=t.vb;this.angle=t.lSite===e?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}},n.prototype.createHalfedge=function(t,e,n){return new this.Halfedge(t,e,n)},n.prototype.Halfedge.prototype.getStartpoint=function(){return this.edge.lSite===this.site?this.edge.va:this.edge.vb},n.prototype.Halfedge.prototype.getEndpoint=function(){return this.edge.lSite===this.site?this.edge.vb:this.edge.va},n.prototype.createVertex=function(t,e){var n=this.vertexJunkyard.pop();return n?(n.x=t,n.y=e):n=new this.Vertex(t,e),this.vertices.push(n),n},n.prototype.createEdge=function(t,e,n,r){var i=this.edgeJunkyard.pop();return i?(i.lSite=t,i.rSite=e,i.va=i.vb=null):i=new this.Edge(t,e),this.edges.push(i),n&&this.setEdgeStartpoint(i,t,e,n),r&&this.setEdgeEndpoint(i,t,e,r),this.cells[t.voronoiId].halfedges.push(this.createHalfedge(i,t,e)),this.cells[e.voronoiId].halfedges.push(this.createHalfedge(i,e,t)),i},n.prototype.createBorderEdge=function(t,e,n){var r=this.edgeJunkyard.pop();return r?(r.lSite=t,r.rSite=null):r=new this.Edge(t,null),r.va=e,r.vb=n,this.edges.push(r),r},n.prototype.setEdgeStartpoint=function(t,e,n,r){t.va||t.vb?t.lSite===n?t.vb=r:t.va=r:(t.va=r,t.lSite=e,t.rSite=n)},n.prototype.setEdgeEndpoint=function(t,e,n,r){this.setEdgeStartpoint(t,n,e,r)},n.prototype.Beachsection=function(){},n.prototype.createBeachsection=function(t){var e=this.beachsectionJunkyard.pop();return e||(e=new this.Beachsection),e.site=t,e},n.prototype.leftBreakPoint=function(t,e){var n=t.site,r=n.x,i=n.y,o=i-e;if(!o)return r;var a=t.rbPrevious;if(!a)return-1/0;var s=(n=a.site).x,u=n.y,c=u-e;if(!c)return s;var l=s-r,f=1/o-1/c,h=l/c;return f?(-h+this.sqrt(h*h-2*f*(l*l/(-2*c)-u+c/2+i-o/2)))/f+r:(r+s)/2},n.prototype.rightBreakPoint=function(t,e){var n=t.rbNext;if(n)return this.leftBreakPoint(n,e);var r=t.site;return r.y===e?r.x:1/0},n.prototype.detachBeachsection=function(t){this.detachCircleEvent(t),this.beachline.rbRemoveNode(t),this.beachsectionJunkyard.push(t)},n.prototype.removeBeachsection=function(t){var e=t.circleEvent,n=e.x,r=e.ycenter,i=this.createVertex(n,r),o=t.rbPrevious,a=t.rbNext,s=[t],u=Math.abs;this.detachBeachsection(t);for(var c=o;c.circleEvent&&u(n-c.circleEvent.x)<1e-9&&u(r-c.circleEvent.ycenter)<1e-9;)o=c.rbPrevious,s.unshift(c),this.detachBeachsection(c),c=o;s.unshift(c),this.detachCircleEvent(c);for(var l=a;l.circleEvent&&u(n-l.circleEvent.x)<1e-9&&u(r-l.circleEvent.ycenter)<1e-9;)a=l.rbNext,s.push(l),this.detachBeachsection(l),l=a;s.push(l),this.detachCircleEvent(l);var f,h=s.length;for(f=1;f1e-9)s=s.rbLeft;else{if(!((i=o-this.rightBreakPoint(s,a))>1e-9)){r>-1e-9?(e=s.rbPrevious,n=s):i>-1e-9?(e=s,n=s.rbNext):e=n=s;break}if(!s.rbRight){e=s;break}s=s.rbRight}var u=this.createBeachsection(t);if(this.beachline.rbInsertSuccessor(e,u),e||n){if(e===n)return this.detachCircleEvent(e),n=this.createBeachsection(e.site),this.beachline.rbInsertSuccessor(u,n),u.edge=n.edge=this.createEdge(e.site,u.site),this.attachCircleEvent(e),void this.attachCircleEvent(n);if(!e||n){if(e!==n){this.detachCircleEvent(e),this.detachCircleEvent(n);var c=e.site,l=c.x,f=c.y,h=t.x-l,d=t.y-f,p=n.site,g=p.x-l,v=p.y-f,b=2*(h*v-d*g),y=h*h+d*d,w=g*g+v*v,m=this.createVertex((v*y-d*w)/b+l,(h*w-g*y)/b+f);return this.setEdgeStartpoint(n.edge,c,p,m),u.edge=this.createEdge(c,t,void 0,m),n.edge=this.createEdge(t,p,void 0,m),this.attachCircleEvent(e),void this.attachCircleEvent(n)}}else u.edge=this.createEdge(e.site,u.site)}},n.prototype.CircleEvent=function(){this.arc=null,this.rbLeft=null,this.rbNext=null,this.rbParent=null,this.rbPrevious=null,this.rbRed=!1,this.rbRight=null,this.site=null,this.x=this.y=this.ycenter=0},n.prototype.attachCircleEvent=function(t){var e=t.rbPrevious,n=t.rbNext;if(e&&n){var r=e.site,i=t.site,o=n.site;if(r!==o){var a=i.x,s=i.y,u=r.x-a,c=r.y-s,l=o.x-a,f=o.y-s,h=2*(u*f-c*l);if(!(h>=-2e-12)){var d=u*u+c*c,p=l*l+f*f,g=(f*d-c*p)/h,v=(u*p-l*d)/h,b=v+s,y=this.circleEventJunkyard.pop();y||(y=new this.CircleEvent),y.arc=t,y.site=i,y.x=g+a,y.y=b+this.sqrt(g*g+v*v),y.ycenter=b,t.circleEvent=y;for(var w=null,m=this.circleEvents.root;m;)if(y.y=s)return!1;if(h>p){if(!o||o.y=c)return!1;n=this.createVertex(v,c)}else{if(!o||o.y>c)o=this.createVertex(v,c);else if(o.y1)if(h>p){if(!o||o.y=c)return!1;n=this.createVertex((c-i)/r,c)}else{if(!o||o.y>c)o=this.createVertex((c-i)/r,c);else if(o.y=s)return!1;n=this.createVertex(s,r*s+i)}else{if(!o||o.x>s)o=this.createVertex(s,r*s+i);else if(o.x0){if(c>o)return!1;c>i&&(i=c)}if(u=e.xr-n,0===a&&u<0)return!1;if(c=u/a,a<0){if(c>o)return!1;c>i&&(i=c)}else if(a>0){if(c0){if(c>o)return!1;c>i&&(i=c)}if(u=e.yb-r,0===s&&u<0)return!1;if(c=u/s,s<0){if(c>o)return!1;c>i&&(i=c)}else if(s>0){if(c0&&(t.va=this.createVertex(n+i*a,r+i*s)),o<1&&(t.vb=this.createVertex(n+o*a,r+o*s)),(i>0||o<1)&&(this.cells[t.lSite.voronoiId].closeMe=!0,this.cells[t.rSite.voronoiId].closeMe=!0),!0},n.prototype.clipEdges=function(t){for(var e,n=this.edges,r=n.length,i=Math.abs;r--;)e=n[r],(!this.connectEdge(e,t)||!this.clipEdge(e,t)||i(e.va.x-e.vb.x)<1e-9&&i(e.va.y-e.vb.y)<1e-9)&&(e.va=e.vb=null,n.splice(r,1))},n.prototype.closeCells=function(t){for(var e,n,r,i,o,a,s,u,c,l=t.xl,f=t.xr,h=t.yt,d=t.yb,p=this.cells,g=p.length,v=Math.abs;g--;)if((e=p[g]).prepareHalfedges()&&e.closeMe){for(i=(r=e.halfedges).length,n=0;n=1e-9||v(a.y-u.y)>=1e-9)switch(!0){case this.equalWithEpsilon(a.x,l)&&this.lessThanWithEpsilon(a.y,d):if(c=this.equalWithEpsilon(u.x,l),s=this.createVertex(l,c?u.y:d),o=this.createBorderEdge(e.site,a,s),n++,r.splice(n,0,this.createHalfedge(o,e.site,null)),i++,c)break;a=s;case this.equalWithEpsilon(a.y,d)&&this.lessThanWithEpsilon(a.x,f):if(c=this.equalWithEpsilon(u.y,d),s=this.createVertex(c?u.x:f,d),o=this.createBorderEdge(e.site,a,s),n++,r.splice(n,0,this.createHalfedge(o,e.site,null)),i++,c)break;a=s;case this.equalWithEpsilon(a.x,f)&&this.greaterThanWithEpsilon(a.y,h):if(c=this.equalWithEpsilon(u.x,f),s=this.createVertex(f,c?u.y:h),o=this.createBorderEdge(e.site,a,s),n++,r.splice(n,0,this.createHalfedge(o,e.site,null)),i++,c)break;a=s;case this.equalWithEpsilon(a.y,h)&&this.greaterThanWithEpsilon(a.x,l):if(c=this.equalWithEpsilon(u.y,h),s=this.createVertex(c?u.x:l,h),o=this.createBorderEdge(e.site,a,s),n++,r.splice(n,0,this.createHalfedge(o,e.site,null)),i++,c)break;if(a=s,c=this.equalWithEpsilon(u.x,l),s=this.createVertex(l,c?u.y:d),o=this.createBorderEdge(e.site,a,s),n++,r.splice(n,0,this.createHalfedge(o,e.site,null)),i++,c)break;if(a=s,c=this.equalWithEpsilon(u.y,d),s=this.createVertex(c?u.x:f,d),o=this.createBorderEdge(e.site,a,s),n++,r.splice(n,0,this.createHalfedge(o,e.site,null)),i++,c)break;if(a=s,c=this.equalWithEpsilon(u.x,f),s=this.createVertex(f,c?u.y:h),o=this.createBorderEdge(e.site,a,s),n++,r.splice(n,0,this.createHalfedge(o,e.site,null)),i++,c)break;default:throw"Voronoi.closeCells() > this makes no sense!"}n++}e.closeMe=!1}},n.prototype.quantizeSites=function(t){for(var e,n=this.ε,r=t.length;r--;)(e=t[r]).x=Math.floor(e.x/n)*n,e.y=Math.floor(e.y/n)*n},n.prototype.recycle=function(t){if(t){if(!(t instanceof this.Diagram))throw"Voronoi.recycleDiagram() > Need a Diagram object.";this.toRecycle=t}},n.prototype.compute=function(t,e){var n=new Date;this.reset(),this.toRecycle&&(this.vertexJunkyard=this.vertexJunkyard.concat(this.toRecycle.vertices),this.edgeJunkyard=this.edgeJunkyard.concat(this.toRecycle.edges),this.cellJunkyard=this.cellJunkyard.concat(this.toRecycle.cells),this.toRecycle=null);var r=t.slice(0);r.sort((function(t,e){var n=e.y-t.y;return n||e.x-t.x}));for(var i,o,a,s=r.pop(),u=0,c=this.cells;;)if(a=this.firstCircleEvent,s&&(!a||s.ye?1:0},this.require(t,"_$_$_cmp"),this.spread((function(t){var e=t.sort(_$_$_cmp);resolve(e)})).then((function(r){for(var i=function(n,i,o){i=Math.min(i,e),o=Math.min(o,e);for(var a=n,s=i,u=[],c=a;c=o||t(l,f)<=0)?(u.push(l),n++):(u.push(f),i++)}for(c=0;c1?", "+JSON.stringify(n):"")+" );"," "," resolve = origResolve;"," resolve( res.length > 0 ? res : ret );","}"].join("\n"))}};util.extend(thdfn,{reduce:defineFnal({name:"reduce"}),reduceRight:defineFnal({name:"reduceRight"}),map:defineFnal({name:"map"})});var fn=thdfn;fn.promise=fn.run,fn.terminate=fn.halt=fn.stop,fn.include=fn.require,util.extend(thdfn,{on:define.on(),one:define.on({unbindSelfOnTrigger:!0}),off:define.off(),trigger:define.trigger()}),define.eventAliasesOn(thdfn),module.exports=Thread},{"./define":1,"./event":2,"./is":5,"./promise":6,"./util":8,"./window":9,child_process:void 0,path:void 0}],8:[function(t,e,n){"use strict";var r,i=t("./is");r={extend:function(){var t,e,n,o,a,s,u=arguments[0]||{},c=1,l=arguments.length,f=!1;for("boolean"==typeof u&&(f=u,u=arguments[1]||{},c=2),"object"==typeof u||i.fn(u)||(u={}),l===c&&(u=this,--c);c0&&c>0){g.clearRect(0,0,u,c),g.globalCompositeOperation="source-over";var b=r.getCachedZSortedEles();if(t.full)g.translate(-o.x1*h,-o.y1*h),g.scale(h,h),r.drawElements(g,b),g.scale(1/h,1/h),g.translate(o.x1*h,o.y1*h);else{var y=e.pan(),w={x:y.x*h,y:y.y*h};h*=e.zoom(),g.translate(w.x,w.y),g.scale(h,h),r.drawElements(g,b),g.scale(1/h,1/h),g.translate(-w.x,-w.y)}t.bg&&(g.globalCompositeOperation="destination-over",g.fillStyle=t.bg,g.rect(0,0,u,c),g.fill())}return e.renderer().usePaths=n,v},o.svg=function(t){return o.bufferCanvasImage(t||{},this).getSerializedSvg()},t.exports=o},function(t,e,n){"use strict";var r=n(0),i=function(t){t&&t("core","svg",r.svg)};"undefined"!=typeof cytoscape&&i(cytoscape),t.exports=i},function(t,e,n){!function(){"use strict";var e,n,r,i,o;function a(t,e){var n,r=Object.keys(e);for(n=0;n1?((e=r).width=arguments[0],e.height=arguments[1]):e=t||r,!(this instanceof n))return new n(e);this.width=e.width||r.width,this.height=e.height||r.height,this.enableMirroring=void 0!==e.enableMirroring?e.enableMirroring:r.enableMirroring,this.canvas=this,this.__document=e.document||document,e.ctx?this.__ctx=e.ctx:(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d")),this.__setDefaultStyles(),this.__stack=[this.__getStyleState()],this.__groupStack=[],this.__root=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__root.setAttribute("version",1.1),this.__root.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__root.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__root.setAttribute("width",this.width),this.__root.setAttribute("height",this.height),this.__ids={},this.__defs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__root.appendChild(this.__defs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__root.appendChild(this.__currentElement)}).prototype.__createElement=function(t,e,n){void 0===e&&(e={});var r,i,o=this.__document.createElementNS("http://www.w3.org/2000/svg",t),a=Object.keys(e);for(n&&(o.setAttribute("fill","none"),o.setAttribute("stroke","none")),r=0;r0){"path"===this.__currentElement.nodeName&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());var n=this.__createElement("g");e.appendChild(n),this.__currentElement=n}var r=this.__currentElement.getAttribute("transform");r?r+=" ":r="",r+=t,this.__currentElement.setAttribute("transform",r)},n.prototype.scale=function(t,e){void 0===e&&(e=t),this.__addTransform(a("scale({x},{y})",{x:t,y:e}))},n.prototype.rotate=function(t){var e=180*t/Math.PI;this.__addTransform(a("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))},n.prototype.translate=function(t,e){this.__addTransform(a("translate({x},{y})",{x:t,y:e}))},n.prototype.transform=function(t,e,n,r,i,o){this.__addTransform(a("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:n,d:r,e:i,f:o}))},n.prototype.beginPath=function(){var t;this.__currentDefaultPath="",this.__currentPosition={},t=this.__createElement("path",{},!0),this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t},n.prototype.__applyCurrentDefaultPath=function(){var t=this.__currentElement;"path"===t.nodeName?t.setAttribute("d",this.__currentDefaultPath):console.error("Attempted to apply path command to node",t.nodeName)},n.prototype.__addPathCommand=function(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t},n.prototype.moveTo=function(t,e){"path"!==this.__currentElement.nodeName&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(a("M {x} {y}",{x:t,y:e}))},n.prototype.closePath=function(){this.__currentDefaultPath&&this.__addPathCommand("Z")},n.prototype.lineTo=function(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(a("L {x} {y}",{x:t,y:e})):this.__addPathCommand(a("M {x} {y}",{x:t,y:e}))},n.prototype.bezierCurveTo=function(t,e,n,r,i,o){this.__currentPosition={x:i,y:o},this.__addPathCommand(a("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:n,cp2y:r,x:i,y:o}))},n.prototype.quadraticCurveTo=function(t,e,n,r){this.__currentPosition={x:n,y:r},this.__addPathCommand(a("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:n,y:r}))};var c=function(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]};n.prototype.arcTo=function(t,e,n,r,i){var o=this.__currentPosition&&this.__currentPosition.x,a=this.__currentPosition&&this.__currentPosition.y;if(void 0!==o&&void 0!==a){if(i<0)throw new Error("IndexSizeError: The radius provided ("+i+") is negative.");if(o===t&&a===e||t===n&&e===r||0===i)this.lineTo(t,e);else{var s=c([o-t,a-e]),u=c([n-t,r-e]);if(s[0]*u[1]!=s[1]*u[0]){var l=s[0]*u[0]+s[1]*u[1],f=Math.acos(Math.abs(l)),h=c([s[0]+u[0],s[1]+u[1]]),d=i/Math.sin(f/2),p=t+d*h[0],g=e+d*h[1],v=[-s[1],s[0]],b=[u[1],-u[0]],y=function(t){var e=t[0];return t[1]>=0?Math.acos(e):-Math.acos(e)},w=y(v),m=y(b);this.lineTo(p+v[0]*i,g+v[1]*i),this.arc(p,g,i,w,m)}else this.lineTo(t,e)}}},n.prototype.stroke=function(){"path"===this.__currentElement.nodeName&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")},n.prototype.fill=function(){"path"===this.__currentElement.nodeName&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")},n.prototype.rect=function(t,e,n,r){"path"!==this.__currentElement.nodeName&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+n,e),this.lineTo(t+n,e+r),this.lineTo(t,e+r),this.lineTo(t,e),this.closePath()},n.prototype.fillRect=function(t,e,n,r){var i;i=this.__createElement("rect",{x:t,y:e,width:n,height:r},!0),this.__closestGroupOrSvg().appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement("fill")},n.prototype.strokeRect=function(t,e,n,r){var i;i=this.__createElement("rect",{x:t,y:e,width:n,height:r},!0),this.__closestGroupOrSvg().appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement("stroke")},n.prototype.__clearCanvas=function(){for(var t=this.__closestGroupOrSvg().getAttribute("transform"),e=this.__root.childNodes[1],n=e.childNodes,r=n.length-1;r>=0;r--)n[r]&&e.removeChild(n[r]);this.__currentElement=e,this.__groupStack=[],t&&this.__addTransform(t)},n.prototype.clearRect=function(t,e,n,r){if(0!==t||0!==e||n!==this.width||r!==this.height){var i,o=this.__closestGroupOrSvg();i=this.__createElement("rect",{x:t,y:e,width:n,height:r,fill:"#FFFFFF"},!0),o.appendChild(i)}else this.__clearCanvas()},n.prototype.createLinearGradient=function(t,e,n,i){var o=this.__createElement("linearGradient",{id:s(this.__ids),x1:t+"px",x2:n+"px",y1:e+"px",y2:i+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__defs.appendChild(o),new r(o,this)},n.prototype.createRadialGradient=function(t,e,n,i,o,a){var u=this.__createElement("radialGradient",{id:s(this.__ids),cx:i+"px",cy:o+"px",r:a+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__defs.appendChild(u),new r(u,this)},n.prototype.__parseFont=function(){var t=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-,\'\"\sa-z0-9]+?)\s*$/i.exec(this.font),e={style:t[1]||"normal",size:t[4]||"10px",family:t[6]||"sans-serif",weight:t[3]||"normal",decoration:t[2]||"normal",href:null};return"underline"===this.__fontUnderline&&(e.decoration="underline"),this.__fontHref&&(e.href=this.__fontHref),e},n.prototype.__wrapTextLink=function(t,e){if(t.href){var n=this.__createElement("a");return n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),n.appendChild(e),n}return e},n.prototype.__applyText=function(t,e,n,r){var i,o,a=this.__parseFont(),s=this.__closestGroupOrSvg(),c=this.__createElement("text",{"font-family":a.family,"font-size":a.size,"font-style":a.style,"font-weight":a.weight,"text-decoration":a.decoration,x:e,y:n,"text-anchor":(i=this.textAlign,o={left:"start",right:"end",center:"middle",start:"start",end:"end"},o[i]||o.start),"dominant-baseline":u(this.textBaseline)},!0);c.appendChild(this.__document.createTextNode(t)),this.__currentElement=c,this.__applyStyleToCurrentElement(r),s.appendChild(this.__wrapTextLink(a,c))},n.prototype.fillText=function(t,e,n){this.__applyText(t,e,n,"fill")},n.prototype.strokeText=function(t,e,n){this.__applyText(t,e,n,"stroke")},n.prototype.measureText=function(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)},n.prototype.arc=function(t,e,n,r,i,o){if(r!==i){(r%=2*Math.PI)==(i%=2*Math.PI)&&(i=(i+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));var s=t+n*Math.cos(i),u=e+n*Math.sin(i),c=t+n*Math.cos(r),l=e+n*Math.sin(r),f=o?0:1,h=0,d=i-r;d<0&&(d+=2*Math.PI),h=o?d>Math.PI?0:1:d>Math.PI?1:0,this.lineTo(c,l),this.__addPathCommand(a("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:n,ry:n,xAxisRotation:0,largeArcFlag:h,sweepFlag:f,endX:s,endY:u})),this.__currentPosition={x:s,y:u}}},n.prototype.clip=function(){var t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),n=s(this.__ids),r=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",n),e.appendChild(this.__currentElement),this.__defs.appendChild(e),t.setAttribute("clip-path",a("url(#{id})",{id:n})),t.appendChild(r),this.__currentElement=r},n.prototype.drawImage=function(){var t,e,r,i,o,a,s,u,c,l,f,h,d,p=Array.prototype.slice.call(arguments),g=p[0],v=0,b=0;if(3===p.length)t=p[1],e=p[2],r=o=g.width,i=a=g.height;else if(5===p.length)t=p[1],e=p[2],r=p[3],i=p[4],o=g.width,a=g.height;else{if(9!==p.length)throw new Error("Inavlid number of arguments passed to drawImage: "+arguments.length);v=p[1],b=p[2],o=p[3],a=p[4],t=p[5],e=p[6],r=p[7],i=p[8]}s=this.__closestGroupOrSvg(),this.__currentElement;var y="translate("+t+", "+e+")";if(g instanceof n){if((u=g.getSvg().cloneNode(!0)).childNodes&&u.childNodes.length>1){for(c=u.childNodes[0];c.childNodes.length;)d=c.childNodes[0].getAttribute("id"),this.__ids[d]=d,this.__defs.appendChild(c.childNodes[0]);if(l=u.childNodes[1]){var w,m=l.getAttribute("transform");w=m?m+" "+y:y,l.setAttribute("transform",w),s.appendChild(l)}}}else"CANVAS"!==g.nodeName&&"IMG"!==g.nodeName||((f=this.__createElement("image")).setAttribute("width",r),f.setAttribute("height",i),f.setAttribute("opacity",this.globalAlpha),f.setAttribute("preserveAspectRatio","none"),(h=this.__document.createElement("canvas")).width=r,h.height=i,h.getContext("2d").drawImage(g,v,b,o,a,0,0,r,i),g=h,f.setAttribute("transform",y),f.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","CANVAS"===g.nodeName?g.toDataURL():g.getAttribute("src")),s.appendChild(f))},n.prototype.createPattern=function(t,e){var r,o=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),a=s(this.__ids);return o.setAttribute("id",a),o.setAttribute("width",t.width),o.setAttribute("height",t.height),"CANVAS"===t.nodeName||"IMG"===t.nodeName?((r=this.__document.createElementNS("http://www.w3.org/2000/svg","image")).setAttribute("width",t.width),r.setAttribute("height",t.height),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","CANVAS"===t.nodeName?t.toDataURL():t.getAttribute("src")),o.appendChild(r),this.__defs.appendChild(o)):t instanceof n&&(o.appendChild(t.__root.childNodes[1]),this.__defs.appendChild(o)),new i(o,this)},n.prototype.setLineDash=function(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null},n.prototype.drawFocusRing=function(){},n.prototype.createImageData=function(){},n.prototype.getImageData=function(){},n.prototype.putImageData=function(){},n.prototype.globalCompositeOperation=function(){},n.prototype.setTransform=function(){},"object"==typeof window&&(window.C2S=n),"object"==typeof t&&"object"==typeof t.exports&&(t.exports=n)}()}])},t.exports=r()}]);