import{A as M,B as He,S as C,C as _,D as L,E as Fr,F as nn,G as D,H as X,I as Z,J as Un,K as Dr,L as ke,M as Gr,N as Br,O as Yn,P as Ur,Q as qe,R as Hn,T as V,U as cn,V as kn,W as Yr,X as Mn,Y as Ln,Z as se}from"./mermaid.core-f8a4d2e4.js";var Hr="[object Symbol]";function R(n){return typeof n=="symbol"||M(n)&&He(n)==Hr}function H(n,e){for(var r=-1,t=n==null?0:n.length,i=Array(t);++r0){if(++e>=at)return arguments[0]}else e=0;return n.apply(void 0,arguments)}}function Y(n){return function(){return n}}var ft=function(){try{var n=Fr(Object,"defineProperty");return n({},"",{}),n}catch{}}();const ln=ft;var dt=ln?function(n,e){return ln(n,"toString",{configurable:!0,enumerable:!1,value:Y(e),writable:!0})}:G;const ct=dt;var lt=st(ct);const Xe=lt;function Ze(n,e){for(var r=-1,t=n==null?0:n.length;++r-1}var bt=9007199254740991,wt=/^(?:0|[1-9]\d*)$/;function pn(n,e){var r=typeof n;return e=e??bt,!!e&&(r=="number"||r!="symbol"&&wt.test(n))&&n>-1&&n%1==0&&n1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(a=n.length>3&&typeof a=="function"?(i--,a):void 0,o&&J(r[0],r[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++t0&&r(u)?e>1?yn(u,e-1,r,t,i):Kn(i,u):t||(i[i.length]=u)}return i}function q(n){var e=n==null?0:n.length;return e?yn(n,1):[]}function Ut(n){return Xe(Je(n,void 0,q),n+"")}var Yt=Br(Object.getPrototypeOf,Object);const Wn=Yt;var Ht="[object Object]",kt=Function.prototype,qt=Object.prototype,je=kt.toString,Kt=qt.hasOwnProperty,Wt=je.call(Object);function Xt(n){if(!M(n)||He(n)!=Ht)return!1;var e=Wn(n);if(e===null)return!0;var r=Kt.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&je.call(r)==Wt}function Zt(n,e,r,t){var i=-1,a=n==null?0:n.length;for(t&&a&&(r=n[++i]);++iu))return!1;var f=a.get(n),d=a.get(e);if(f&&d)return f==e&&d==n;var l=-1,h=!0,g=r&Pa?new z:void 0;for(a.set(n,e),a.set(e,n);++l2?e[2]:void 0;for(i&&J(e[0],e[1],i)&&(t=1);++r-1?i[a?e[o]:o]:void 0}}var xo=Math.max;function To(n,e,r){var t=n==null?0:n.length;if(!t)return-1;var i=r==null?0:nt(r);return i<0&&(i=xo(t+i,0)),Ve(n,$(e),i)}var Oo=yo(To);const ne=Oo;function _r(n,e){var r=-1,t=D(n)?Array(n.length):[];return xn(n,function(i,a,o){t[++r]=e(i,a,o)}),t}function y(n,e){var r=_(n)?H:_r;return r(n,$(e))}function Lo(n,e){return n==null?n:zn(n,jn(e),B)}function Ao(n,e){return n&&Qn(n,jn(e))}function Po(n,e){return n>e}var No=Object.prototype,Co=No.hasOwnProperty;function $o(n,e){return n!=null&&Co.call(n,e)}function b(n,e){return n!=null&&gr(n,e,$o)}function Io(n,e){return H(e,function(r){return n[r]})}function N(n){return n==null?[]:Io(n,T(n))}function x(n){return n===void 0}function Er(n,e){return ne||a&&o&&s&&!u&&!f||t&&o&&s||!r&&s||!i)return 1;if(!t&&!a&&!f&&n=u)return s;var f=r[t];return s*(f=="desc"?-1:1)}}return n.index-e.index}function Bo(n,e,r){e.length?e=H(e,function(a){return _(a)?function(o){return En(o,a.length===1?a[0]:a)}:a}):e=[G];var t=-1;e=H(e,kn($));var i=_r(n,function(a,o,u){var s=H(e,function(f){return f(a)});return{criteria:s,index:++t,value:a}});return Fo(i,function(a,o){return Go(a,o,r)})}function Uo(n,e){return Ro(n,e,function(r,t){return pr(n,t)})}var Yo=Ut(function(n,e){return n==null?{}:Uo(n,e)});const gn=Yo;var Ho=Math.ceil,ko=Math.max;function qo(n,e,r,t){for(var i=-1,a=ko(Ho((e-n)/(r||1)),0),o=Array(a);a--;)o[t?a:++i]=n,n+=r;return o}function Ko(n){return function(e,r,t){return t&&typeof t!="number"&&J(e,r,t)&&(r=t=void 0),e=fn(e),r===void 0?(r=e,e=0):r=fn(r),t=t===void 0?e1&&J(n,e[0],e[1])?e=[]:r>2&&J(e[0],e[1],e[2])&&(e=[e[0]]),Bo(n,yn(e,1),[])});const an=Zo;var Vo=1/0,Jo=Ln&&1/Vn(new Ln([,-0]))[1]==Vo?function(n){return new Ln(n)}:it;const zo=Jo;var Qo=200;function jo(n,e,r){var t=-1,i=pt,a=n.length,o=!0,u=[],s=u;if(r)o=!1,i=_o;else if(a>=Qo){var f=e?null:zo(n);if(f)return Vn(f);o=!1,i=cr,s=new z}else s=e?[]:u;n:for(;++t1?i.setNode(a,r):i.setNode(a)}),this}setNode(e,r){return b(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=S,this._children[e]={},this._children[S][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return b(this._nodes,e)}removeNode(e){var r=this;if(b(this._nodes,e)){var t=function(i){r.removeEdge(r._edgeObjs[i])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],c(this.children(e),function(i){r.setParent(i)}),delete this._children[e]),c(T(this._in[e]),t),delete this._in[e],delete this._preds[e],c(T(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(x(r))r=S;else{r+="";for(var t=r;!x(t);t=this.parent(t))if(t===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==S)return r}}children(e){if(x(e)&&(e=S),this._isCompound){var r=this._children[e];if(r)return T(r)}else{if(e===S)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return T(r)}successors(e){var r=this._sucs[e];if(r)return T(r)}neighbors(e){var r=this.predecessors(e);if(r)return eu(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var t=this;c(this._nodes,function(o,u){e(u)&&r.setNode(u,o)}),c(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,t.edge(o))});var i={};function a(o){var u=t.parent(o);return u===void 0||r.hasNode(u)?(i[o]=u,u):u in i?i[u]:a(u)}return this._isCompound&&c(r.nodes(),function(o){r.setParent(o,a(o))}),r}setDefaultEdgeLabel(e){return Mn(e)||(e=Y(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return N(this._edgeObjs)}setPath(e,r){var t=this,i=arguments;return tn(e,function(a,o){return i.length>1?t.setEdge(a,o,r):t.setEdge(a,o),o}),this}setEdge(){var e,r,t,i,a=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(e=o.v,r=o.w,t=o.name,arguments.length===2&&(i=arguments[1],a=!0)):(e=o,r=arguments[1],t=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),e=""+e,r=""+r,x(t)||(t=""+t);var u=W(this._isDirected,e,r,t);if(b(this._edgeLabels,u))return a&&(this._edgeLabels[u]=i),this;if(!x(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[u]=a?i:this._defaultEdgeLabelFn(e,r,t);var s=ou(this._isDirected,e,r,t);return e=s.v,r=s.w,Object.freeze(s),this._edgeObjs[u]=s,Ce(this._preds[r],e),Ce(this._sucs[e],r),this._in[r][u]=s,this._out[e][u]=s,this._edgeCount++,this}edge(e,r,t){var i=arguments.length===1?Pn(this._isDirected,arguments[0]):W(this._isDirected,e,r,t);return this._edgeLabels[i]}hasEdge(e,r,t){var i=arguments.length===1?Pn(this._isDirected,arguments[0]):W(this._isDirected,e,r,t);return b(this._edgeLabels,i)}removeEdge(e,r,t){var i=arguments.length===1?Pn(this._isDirected,arguments[0]):W(this._isDirected,e,r,t),a=this._edgeObjs[i];return a&&(e=a.v,r=a.w,delete this._edgeLabels[i],delete this._edgeObjs[i],$e(this._preds[r],e),$e(this._sucs[e],r),delete this._in[r][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,r){var t=this._in[e];if(t){var i=N(t);return r?P(i,function(a){return a.v===r}):i}}outEdges(e,r){var t=this._out[e];if(t){var i=N(t);return r?P(i,function(a){return a.w===r}):i}}nodeEdges(e,r){var t=this.inEdges(e,r);if(t)return t.concat(this.outEdges(e,r))}}A.prototype._nodeCount=0;A.prototype._edgeCount=0;function Ce(n,e){n[e]?n[e]++:n[e]=1}function $e(n,e){--n[e]||delete n[e]}function W(n,e,r,t){var i=""+e,a=""+r;if(!n&&i>a){var o=i;i=a,a=o}return i+Ne+a+Ne+(x(t)?au:t)}function ou(n,e,r,t){var i=""+e,a=""+r;if(!n&&i>a){var o=i;i=a,a=o}var u={v:i,w:a};return t&&(u.name=t),u}function Pn(n,e){return W(n,e.v,e.w,e.name)}class uu{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return Ie(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&Ie(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,t=r._prev;t!==r;)e.push(JSON.stringify(t,su)),t=t._prev;return"["+e.join(", ")+"]"}}function Ie(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function su(n,e){if(n!=="_next"&&n!=="_prev")return e}var fu=Y(1);function du(n,e){if(n.nodeCount()<=1)return[];var r=lu(n,e||fu),t=cu(r.graph,r.buckets,r.zeroIdx);return q(y(t,function(i){return n.outEdges(i.v,i.w)}))}function cu(n,e,r){for(var t=[],i=e[e.length-1],a=e[0],o;n.nodeCount();){for(;o=a.dequeue();)Nn(n,e,r,o);for(;o=i.dequeue();)Nn(n,e,r,o);if(n.nodeCount()){for(var u=e.length-2;u>0;--u)if(o=e[u].dequeue(),o){t=t.concat(Nn(n,e,r,o,!0));break}}}return t}function Nn(n,e,r,t,i){var a=i?[]:void 0;return c(n.inEdges(t.v),function(o){var u=n.edge(o),s=n.node(o.v);i&&a.push({v:o.v,w:o.w}),s.out-=u,Bn(e,r,s)}),c(n.outEdges(t.v),function(o){var u=n.edge(o),s=o.w,f=n.node(s);f.in-=u,Bn(e,r,f)}),n.removeNode(t.v),a}function lu(n,e){var r=new A,t=0,i=0;c(n.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),c(n.edges(),function(u){var s=r.edge(u.v,u.w)||0,f=e(u),d=s+f;r.setEdge(u.v,u.w,d),i=Math.max(i,r.node(u.v).out+=f),t=Math.max(t,r.node(u.w).in+=f)});var a=k(i+t+3).map(function(){return new uu}),o=t+1;return c(r.nodes(),function(u){Bn(a,o,r.node(u))}),{graph:r,buckets:a,zeroIdx:o}}function Bn(n,e,r){r.out?r.in?n[r.out-r.in+e].enqueue(r):n[n.length-1].enqueue(r):n[0].enqueue(r)}function hu(n){var e=n.graph().acyclicer==="greedy"?du(n,r(n)):vu(n);c(e,function(t){var i=n.edge(t);n.removeEdge(t),i.forwardName=t.name,i.reversed=!0,n.setEdge(t.w,t.v,i,te("rev"))});function r(t){return function(i){return t.edge(i).weight}}}function vu(n){var e=[],r={},t={};function i(a){b(t,a)||(t[a]=!0,r[a]=!0,c(n.outEdges(a),function(o){b(r,o.w)?e.push(o):i(o.w)}),delete r[a])}return c(n.nodes(),i),e}function gu(n){c(n.edges(),function(e){var r=n.edge(e);if(r.reversed){n.removeEdge(e);var t=r.forwardName;delete r.reversed,delete r.forwardName,n.setEdge(e.w,e.v,r,t)}})}function K(n,e,r,t){var i;do i=te(t);while(n.hasNode(i));return r.dummy=e,n.setNode(i,r),i}function pu(n){var e=new A().setGraph(n.graph());return c(n.nodes(),function(r){e.setNode(r,n.node(r))}),c(n.edges(),function(r){var t=e.edge(r.v,r.w)||{weight:0,minlen:1},i=n.edge(r);e.setEdge(r.v,r.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),e}function yr(n){var e=new A({multigraph:n.isMultigraph()}).setGraph(n.graph());return c(n.nodes(),function(r){n.children(r).length||e.setNode(r,n.node(r))}),c(n.edges(),function(r){e.setEdge(r,n.edge(r))}),e}function Se(n,e){var r=n.x,t=n.y,i=e.x-r,a=e.y-t,o=n.width/2,u=n.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var s,f;return Math.abs(a)*o>Math.abs(i)*u?(a<0&&(u=-u),s=u*i/a,f=u):(i<0&&(o=-o),s=o,f=o*a/i),{x:r+s,y:t+f}}function On(n){var e=y(k(xr(n)+1),function(){return[]});return c(n.nodes(),function(r){var t=n.node(r),i=t.rank;x(i)||(e[i][t.order]=r)}),e}function bu(n){var e=Q(y(n.nodes(),function(r){return n.node(r).rank}));c(n.nodes(),function(r){var t=n.node(r);b(t,"rank")&&(t.rank-=e)})}function wu(n){var e=Q(y(n.nodes(),function(a){return n.node(a).rank})),r=[];c(n.nodes(),function(a){var o=n.node(a).rank-e;r[o]||(r[o]=[]),r[o].push(a)});var t=0,i=n.graph().nodeRankFactor;c(r,function(a,o){x(a)&&o%i!==0?--t:t&&c(a,function(u){n.node(u).rank+=t})})}function Me(n,e,r,t){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=t),K(n,"border",i,e)}function xr(n){return F(y(n.nodes(),function(e){var r=n.node(e).rank;if(!x(r))return r}))}function mu(n,e){var r={lhs:[],rhs:[]};return c(n,function(t){e(t)?r.lhs.push(t):r.rhs.push(t)}),r}function _u(n,e){var r=Pe();try{return e()}finally{console.log(n+" time: "+(Pe()-r)+"ms")}}function Eu(n,e){return e()}function yu(n){function e(r){var t=n.children(r),i=n.node(r);if(t.length&&c(t,e),b(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;ao.lim&&(u=o,s=!0);var f=P(e.edges(),function(d){return s===De(n,n.node(d.v),u)&&s!==De(n,n.node(d.w),u)});return re(f,function(d){return j(e,d)})}function Ir(n,e,r,t){var i=r.v,a=r.w;n.removeEdge(i,a),n.setEdge(t.v,t.w,{}),oe(n),ae(n,e),Du(n,e)}function Du(n,e){var r=ne(n.nodes(),function(i){return!e.node(i).parent}),t=Ru(n,r);t=t.slice(1),c(t,function(i){var a=n.node(i).parent,o=e.edge(i,a),u=!1;o||(o=e.edge(a,i),u=!0),e.node(i).rank=e.node(a).rank+(u?o.minlen:-o.minlen)})}function Gu(n,e,r){return n.hasEdge(e,r)}function De(n,e,r){return r.low<=e.lim&&e.lim<=r.lim}function Bu(n){switch(n.graph().ranker){case"network-simplex":Ge(n);break;case"tight-tree":Yu(n);break;case"longest-path":Uu(n);break;default:Ge(n)}}var Uu=ie;function Yu(n){ie(n),Or(n)}function Ge(n){U(n)}function Hu(n){var e=K(n,"root",{},"_root"),r=ku(n),t=F(N(r))-1,i=2*t+1;n.graph().nestingRoot=e,c(n.edges(),function(o){n.edge(o).minlen*=i});var a=qu(n)+1;c(n.children(),function(o){Sr(n,e,i,a,t,r,o)}),n.graph().nodeRankFactor=i}function Sr(n,e,r,t,i,a,o){var u=n.children(o);if(!u.length){o!==e&&n.setEdge(e,o,{weight:0,minlen:r});return}var s=Me(n,"_bt"),f=Me(n,"_bb"),d=n.node(o);n.setParent(s,o),d.borderTop=s,n.setParent(f,o),d.borderBottom=f,c(u,function(l){Sr(n,e,r,t,i,a,l);var h=n.node(l),g=h.borderTop?h.borderTop:l,v=h.borderBottom?h.borderBottom:l,p=h.borderTop?t:2*t,m=g!==v?1:i-a[o]+1;n.setEdge(s,g,{weight:p,minlen:m,nestingEdge:!0}),n.setEdge(v,f,{weight:p,minlen:m,nestingEdge:!0})}),n.parent(o)||n.setEdge(e,s,{weight:0,minlen:i+a[o]})}function ku(n){var e={};function r(t,i){var a=n.children(t);a&&a.length&&c(a,function(o){r(o,i+1)}),e[t]=i}return c(n.children(),function(t){r(t,1)}),e}function qu(n){return tn(n.edges(),function(e,r){return e+n.edge(r).weight},0)}function Ku(n){var e=n.graph();n.removeNode(e.nestingRoot),delete e.nestingRoot,c(n.edges(),function(r){var t=n.edge(r);t.nestingEdge&&n.removeEdge(r)})}function Wu(n,e,r){var t={},i;c(r,function(a){for(var o=n.parent(a),u,s;o;){if(u=n.parent(o),u?(s=t[u],t[u]=o):(s=i,i=o),s&&s!==o){e.setEdge(s,o);return}o=u}})}function Xu(n,e,r){var t=Zu(n),i=new A({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(a){return n.node(a)});return c(n.nodes(),function(a){var o=n.node(a),u=n.parent(a);(o.rank===e||o.minRank<=e&&e<=o.maxRank)&&(i.setNode(a),i.setParent(a,u||t),c(n[r](a),function(s){var f=s.v===a?s.w:s.v,d=i.edge(f,a),l=x(d)?0:d.weight;i.setEdge(f,a,{weight:n.edge(s).weight+l})}),b(o,"minRank")&&i.setNode(a,{borderLeft:o.borderLeft[e],borderRight:o.borderRight[e]}))}),i}function Zu(n){for(var e;n.hasNode(e=te("_root")););return e}function Vu(n,e){for(var r=0,t=1;t0;)d%2&&(l+=u[d+1]),d=d-1>>1,u[d]+=f.weight;s+=f.weight*l})),s}function zu(n){var e={},r=P(n.nodes(),function(u){return!n.children(u).length}),t=F(y(r,function(u){return n.node(u).rank})),i=y(k(t+1),function(){return[]});function a(u){if(!b(e,u)){e[u]=!0;var s=n.node(u);i[s.rank].push(u),c(n.successors(u),a)}}var o=an(r,function(u){return n.node(u).rank});return c(o,a),i}function Qu(n,e){return y(e,function(r){var t=n.inEdges(r);if(t.length){var i=tn(t,function(a,o){var u=n.edge(o),s=n.node(o.v);return{sum:a.sum+u.weight*s.order,weight:a.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function ju(n,e){var r={};c(n,function(i,a){var o=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};x(i.barycenter)||(o.barycenter=i.barycenter,o.weight=i.weight)}),c(e.edges(),function(i){var a=r[i.v],o=r[i.w];!x(a)&&!x(o)&&(o.indegree++,a.out.push(r[i.w]))});var t=P(r,function(i){return!i.indegree});return ns(t)}function ns(n){var e=[];function r(a){return function(o){o.merged||(x(o.barycenter)||x(a.barycenter)||o.barycenter>=a.barycenter)&&es(a,o)}}function t(a){return function(o){o.in.push(a),--o.indegree===0&&n.push(o)}}for(;n.length;){var i=n.pop();e.push(i),c(i.in.reverse(),r(i)),c(i.out,t(i))}return y(P(e,function(a){return!a.merged}),function(a){return gn(a,["vs","i","barycenter","weight"])})}function es(n,e){var r=0,t=0;n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.vs=e.vs.concat(n.vs),n.barycenter=r/t,n.weight=t,n.i=Math.min(e.i,n.i),e.merged=!0}function rs(n,e){var r=mu(n,function(d){return b(d,"barycenter")}),t=r.lhs,i=an(r.rhs,function(d){return-d.i}),a=[],o=0,u=0,s=0;t.sort(ts(!!e)),s=Be(a,i,s),c(t,function(d){s+=d.vs.length,a.push(d.vs),o+=d.barycenter*d.weight,u+=d.weight,s=Be(a,i,s)});var f={vs:q(a)};return u&&(f.barycenter=o/u,f.weight=u),f}function Be(n,e,r){for(var t;e.length&&(t=vn(e)).i<=r;)e.pop(),n.push(t.vs),r++;return r}function ts(n){return function(e,r){return e.barycenterr.barycenter?1:n?r.i-e.i:e.i-r.i}}function Mr(n,e,r,t){var i=n.children(e),a=n.node(e),o=a?a.borderLeft:void 0,u=a?a.borderRight:void 0,s={};o&&(i=P(i,function(v){return v!==o&&v!==u}));var f=Qu(n,i);c(f,function(v){if(n.children(v.v).length){var p=Mr(n,v.v,r,t);s[v.v]=p,b(p,"barycenter")&&as(v,p)}});var d=ju(f,r);is(d,s);var l=rs(d,t);if(o&&(l.vs=q([o,l.vs,u]),n.predecessors(o).length)){var h=n.node(n.predecessors(o)[0]),g=n.node(n.predecessors(u)[0]);b(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+h.order+g.order)/(l.weight+2),l.weight+=2}return l}function is(n,e){c(n,function(r){r.vs=q(r.vs.map(function(t){return e[t]?e[t].vs:t}))})}function as(n,e){x(n.barycenter)?(n.barycenter=e.barycenter,n.weight=e.weight):(n.barycenter=(n.barycenter*n.weight+e.barycenter*e.weight)/(n.weight+e.weight),n.weight+=e.weight)}function os(n){var e=xr(n),r=Ue(n,k(1,e+1),"inEdges"),t=Ue(n,k(e-1,-1,-1),"outEdges"),i=zu(n);Ye(n,i);for(var a=Number.POSITIVE_INFINITY,o,u=0,s=0;s<4;++u,++s){us(u%2?r:t,u%4>=2),i=On(n);var f=Vu(n,i);fo||u>e[s].lim));for(f=s,s=t;(s=n.parent(s))!==f;)a.push(s);return{path:i.concat(a.reverse()),lca:f}}function ds(n){var e={},r=0;function t(i){var a=r;c(n.children(i),t),e[i]={low:a,lim:r++}}return c(n.children(),t),e}function cs(n,e){var r={};function t(i,a){var o=0,u=0,s=i.length,f=vn(a);return c(a,function(d,l){var h=hs(n,d),g=h?n.node(h).order:s;(h||d===f)&&(c(a.slice(u,l+1),function(v){c(n.predecessors(v),function(p){var m=n.node(p),E=m.order;(Ef)&&Rr(r,h,d)})})}function i(a,o){var u=-1,s,f=0;return c(o,function(d,l){if(n.node(d).dummy==="border"){var h=n.predecessors(d);h.length&&(s=n.node(h[0]).order,t(o,f,l,u,s),f=l,u=s)}t(o,f,o.length,s,a.length)}),o}return tn(e,i),r}function hs(n,e){if(n.node(e).dummy)return ne(n.predecessors(e),function(r){return n.node(r).dummy})}function Rr(n,e,r){if(e>r){var t=e;e=r,r=t}var i=n[e];i||(n[e]=i={}),i[r]=!0}function vs(n,e,r){if(e>r){var t=e;e=r,r=t}return b(n[e],r)}function gs(n,e,r,t){var i={},a={},o={};return c(e,function(u){c(u,function(s,f){i[s]=s,a[s]=s,o[s]=f})}),c(e,function(u){var s=-1;c(u,function(f){var d=t(f);if(d.length){d=an(d,function(p){return o[p]});for(var l=(d.length-1)/2,h=Math.floor(l),g=Math.ceil(l);h<=g;++h){var v=d[h];a[f]===f&&s