@hpcc-js/graph 3.5.2 → 3.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- var e,t,r=Object.defineProperty,n=(e,t)=>r(e,"name",{value:t,configurable:!0}),i=(e,t,n)=>((e,t,n)=>t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);import{SVGWidget as o,TextBox as a,Platform as s,map as u,dispatch as c,Text as h,Icon as l,Palette as f,select as d,SVGZoomWidget as p,ToggleButton as _,Spacer as g,Utility as m,d3Event as v,drag as y,SVGGlowFilter as b,PropertyExt as w,sum as x,max as E,min as k,median as D,mean as C,interpolateNumberArray as j}from"@hpcc-js/common";import{hashSum as B,Graph2 as M,compare2 as I}from"@hpcc-js/util";import{IGraph as O,ITooltip as F}from"@hpcc-js/api";import{render as q,Subgraph as S,Vertex as N,Edge as P,Icons as R,Vertex3 as G,CentroidVertex3 as L,React as T,Text as H}from"@hpcc-js/react";import{HTMLTooltip as V}from"@hpcc-js/html";const K="@hpcc-js/graph",z="3.5.2",W="3.16.0";var Z=Math.PI,U=2*Z,$=1e-6,X=U-$;function Y(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Q(){return new Y}function J(e){/* @__PURE__ */
1
+ var e,t,r=Object.defineProperty,n=(e,t)=>r(e,"name",{value:t,configurable:!0}),i=(e,t,n)=>((e,t,n)=>t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);import{SVGWidget as o,TextBox as a,Platform as s,map as u,dispatch as c,Text as h,Icon as l,Palette as f,select as d,SVGZoomWidget as p,ToggleButton as _,Spacer as g,Utility as m,d3Event as v,drag as y,SVGGlowFilter as b,PropertyExt as w,sum as x,max as E,min as k,median as D,mean as C,interpolateNumberArray as j}from"@hpcc-js/common";import{hashSum as B,Graph2 as M,compare2 as I}from"@hpcc-js/util";import{IGraph as O,ITooltip as F}from"@hpcc-js/api";import{render as q,Subgraph as S,Vertex as N,Edge as P,Icons as R,Vertex3 as G,CentroidVertex3 as L,React as T,Text as H}from"@hpcc-js/react";import{HTMLTooltip as V}from"@hpcc-js/html";const K="@hpcc-js/graph",z="3.5.3",W="3.16.1";var Z=Math.PI,U=2*Z,$=1e-6,X=U-$;function Y(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Q(){return new Y}function J(e){/* @__PURE__ */
2
2
  return n(function(){return e},"constant")}function A(e){this._context=e}function ee(e){return new A(e)}function te(e){return e[0]}function re(e){return e[1]}function ne(){var e=te,t=re,r=J(!0),i=null,o=ee,a=null;function s(n){var s,u,c,h=n.length,l=!1;for(null==i&&(a=o(c=Q())),s=0;s<=h;++s)!(s<h&&r(u=n[s],s,n))===l&&((l=!l)?a.lineStart():a.lineEnd()),l&&a.point(+e(u,s,n),+t(u,s,n));if(c)return a=null,c+""||null}return n(s,"line"),s.x=function(t){return arguments.length?(e="function"==typeof t?t:J(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:J(+e),s):t},s.defined=function(e){return arguments.length?(r="function"==typeof e?e:J(!!e),s):r},s.curve=function(e){return arguments.length?(o=e,null!=i&&(a=o(i)),s):o},s.context=function(e){return arguments.length?(null==e?i=a=null:a=o(i=e),s):i},s}n(Y,"Path"),n(Q,"path"),Y.prototype=Q.prototype={constructor:Y,moveTo:/* @__PURE__ */n(function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},"moveTo"),closePath:/* @__PURE__ */n(function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:/* @__PURE__ */n(function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},"lineTo"),quadraticCurveTo:/* @__PURE__ */n(function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},"quadraticCurveTo"),bezierCurveTo:/* @__PURE__ */n(function(e,t,r,n,i,o){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+o)},"bezierCurveTo"),arcTo:/* @__PURE__ */n(function(e,t,r,n,i){e=+e,t=+t,r=+r,n=+n,i=+i;var o=this._x1,a=this._y1,s=r-e,u=n-t,c=o-e,h=a-t,l=c*c+h*h;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(l>$)if(Math.abs(h*s-u*c)>$&&i){var f=r-o,d=n-a,p=s*s+u*u,_=f*f+d*d,g=Math.sqrt(p),m=Math.sqrt(l),v=i*Math.tan((Z-Math.acos((p+l-_)/(2*g*m)))/2),y=v/m,b=v/g;Math.abs(y-1)>$&&(this._+="L"+(e+y*c)+","+(t+y*h)),this._+="A"+i+","+i+",0,0,"+ +(h*f>c*d)+","+(this._x1=e+b*s)+","+(this._y1=t+b*u)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},"arcTo"),arc:/* @__PURE__ */n(function(e,t,r,n,i,o){e=+e,t=+t,o=!!o;var a=(r=+r)*Math.cos(n),s=r*Math.sin(n),u=e+a,c=t+s,h=1^o,l=o?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);null===this._x1?this._+="M"+u+","+c:(Math.abs(this._x1-u)>$||Math.abs(this._y1-c)>$)&&(this._+="L"+u+","+c),r&&(l<0&&(l=l%U+U),l>X?this._+="A"+r+","+r+",0,1,"+h+","+(e-a)+","+(t-s)+"A"+r+","+r+",0,1,"+h+","+(this._x1=u)+","+(this._y1=c):l>$&&(this._+="A"+r+","+r+",0,"+ +(l>=Z)+","+h+","+(this._x1=e+r*Math.cos(i))+","+(this._y1=t+r*Math.sin(i))))},"arc"),rect:/* @__PURE__ */n(function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},"rect"),toString:/* @__PURE__ */n(function(){return this._},"toString")},n(J,"constant$2"),n(A,"Linear"),A.prototype={areaStart:/* @__PURE__ */n(function(){this._line=0},"areaStart"),areaEnd:/* @__PURE__ */n(function(){this._line=NaN},"areaEnd"),lineStart:/* @__PURE__ */n(function(){this._point=0},"lineStart"),lineEnd:/* @__PURE__ */n(function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:/* @__PURE__ */n(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}},"point")},n(ee,"d3CurveLinear"),n(te,"x$1"),n(re,"y$2"),n(ne,"d3Line");var ie=Array.prototype.slice;function oe(e){return e.source}function ae(e){return e.target}function se(e){var t=oe,r=ae,i=te,o=re,a=null;function s(){var n,s=ie.call(arguments),u=t.apply(this,s),c=r.apply(this,s);if(a||(a=n=Q()),e(a,+i.apply(this,(s[0]=u,s)),+o.apply(this,s),+i.apply(this,(s[0]=c,s)),+o.apply(this,s)),n)return a=null,n+""||null}return n(s,"link"),s.source=function(e){return arguments.length?(t=e,s):t},s.target=function(e){return arguments.length?(r=e,s):r},s.x=function(e){return arguments.length?(i="function"==typeof e?e:J(+e),s):i},s.y=function(e){return arguments.length?(o="function"==typeof e?e:J(+e),s):o},s.context=function(e){return arguments.length?(a=null==e?null:e,s):a},s}function ue(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,i,n,i)}function ce(){return se(ue)}function he(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function le(e){this._context=e}function fe(e){return new le(e)}function de(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function pe(e,t){this._context=e,this._k=(1-t)/6}n(oe,"linkSource"),n(ae,"linkTarget"),n(se,"link"),n(ue,"curveHorizontal"),n(ce,"linkHorizontal$1"),n(he,"point$1"),n(le,"Basis"),le.prototype={areaStart:/* @__PURE__ */n(function(){this._line=0},"areaStart"),areaEnd:/* @__PURE__ */n(function(){this._line=NaN},"areaEnd"),lineStart:/* @__PURE__ */n(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:/* @__PURE__ */n(function(){switch(this._point){case 3:he(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:/* @__PURE__ */n(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:he(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},n(fe,"d3CurveBasis"),n(de,"point"),n(pe,"Cardinal"),pe.prototype={areaStart:/* @__PURE__ */n(function(){this._line=0},"areaStart"),areaEnd:/* @__PURE__ */n(function(){this._line=NaN},"areaEnd"),lineStart:/* @__PURE__ */n(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:/* @__PURE__ */n(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:de(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:/* @__PURE__ */n(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:de(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")};const _e=/* @__PURE__ */n(function e(t){function r(e){return new pe(e,t)}return n(r,"cardinal"),r.tension=function(t){return e(+t)},r},"custom")(0),ge=fe,me=class _Edge extends o{_points;_weight;_strokeDasharray;_hidden;_textBox;_sourceVertex;_targetVertex;_elementPath;_graphID;constructor(){super(),this._points=[],this._weight=100,this._strokeDasharray=null,this._hidden=!1,this._textBox=(new a).padding(0)}graphID(e){return arguments.length?(this._graphID=e,this):this._graphID}sourceVertex(e){return arguments.length?(this._sourceVertex=e,this):this._sourceVertex}targetVertex(e){return arguments.length?(this._targetVertex=e,this):this._targetVertex}weight(e){return arguments.length?(this._weight=e,this):this._weight}points(e,t,r){return arguments.length?(this._points=e,this._elementPath&&this.update(null,this._element,t,r),this):this._points}hidden(e){return arguments.length?(this._hidden=e,this):this._hidden}text(e){return arguments.length?(this._textBox.text(e),this):this._textBox.text()}enter(e,t){super.enter(e,t),this._elementPath=t.append("path"),this._textBox.text()&&this._textBox.target(e).tooltip(this.tooltip()).render()}update(e,t,r,n){super.update(e,t);const i=this;s.svgMarkerGlitch&&!n&&t.transition().duration((r||0)+100).on("start",function(){i._pushMarkers(t)}).on("end",function(){i._popMarkers(t)});const o=i._calculateEdgePoints(this._sourceVertex,this._targetVertex,this._points),a=t.selectAll(".point2").data(this.showControlPoints()?o:[]);a.enter().append("circle").attr("class","point2").style("stroke","red").merge(a).attr("cx",e=>e.x).attr("cy",e=>e.y).attr("r",1),a.exit().remove();const u=ne().x(function(e){return e.x}).y(function(e){return e.y}).curve(ge)(o);let c=this._elementPath;r&&(c=c.transition().duration(r)),c.attr("opacity",this._hidden?0:1).attr("marker-start",s.svgMarkerGlitch&&n||!this.sourceMarker_exists()?null:"url(#"+this._graphID+"_"+this.sourceMarker()+"Foot)").attr("marker-end",s.svgMarkerGlitch&&n||!this.targetMarker_exists()?null:"url(#"+this._graphID+"_"+this.targetMarker()+"Head)").attr("stroke",this.strokeColor_exists()?this.strokeColor():null).attr("stroke-dasharray",this.strokeDasharray_exists()?this.strokeDasharray():null).attr("d",u),this._textBox.text()&&this._textBox.tooltip(this.tooltip()).move(this._findMidPoint(o),r)}exit(e,t){this._textBox&&this._textBox.target(null),super.exit(e,t)}_findMidPoint(e){const t=e.length/2;if(e.length%2)return e[Math.floor(t)];if(e.length){const r=e[t-1],n=e[t];return{x:(r.x+n.x)/2,y:(r.y+n.y)/2}}return{x:0,y:0}}_calculateEdgePoints(e,t,r){if(!e||!t)return[{x:0,y:0},{x:0,y:0}];let n=r?r.filter(r=>!e.contains(r)&&!t.contains(r)):[];const i=0===n.length?t.pos():n[0],o=0===n.length?e.pos():n[n.length-1];if(n.unshift(e.intersection(e._pos,i)),n.push(t.intersection(t._pos,o)),n[0]||(n[0]=e._pos),n[n.length-1]||(n[n.length-1]=t._pos),(!r||0===r.length)&&2===n.length&&n[0]&&n[1]){const e=n[0].x-n[1].x,t=n[0].y-n[1].y;if(Math.sqrt(e*e+t*t))if(this.showArc()){const r=(n[0].x+n[1].x)/2-t*this.arcDepth()/100,i=(n[0].y+n[1].y)/2+e*this.arcDepth()/100;n=[{x:n[0].x,y:n[0].y},{x:r,y:i},{x:n[1].x,y:n[1].y}]}else n=[{x:n[0].x,y:n[0].y},{x:n[1].x,y:n[1].y}]}return n}};n(me,"Edge");let ve=me;ve.prototype._class+=" graph_Edge",ve.prototype.publish("arcDepth",16,"number","Arc Depth",null,{tags:["Basic"]}),ve.prototype.publish("showControlPoints",!1,"boolean","Show/Hide Control Points",null,{tags:["Basic"]}),ve.prototype.publish("showArc",!0,"boolean","Show/Hide Arc",null,{tags:["Basic"]}),ve.prototype.publish("tooltip","","string","Tooltip",null,{tags:["Private"]}),ve.prototype.publish("sourceMarker","circle","set","Source Marker",["none","circle"],{optional:!0}),ve.prototype.publish("targetMarker","arrow","set","Source Marker",["none","arrow","circle"],{optional:!0}),ve.prototype.publish("strokeDasharray",null,"string","Stroke Dash Array",null,{optional:!0}),ve.prototype.publish("strokeColor",null,"html-color","Stroke Color",null,{optional:!0}),ve.prototype.publish("textColor",null,"html-color","Text Color",null,{optional:!0}),ve.prototype.publishProxy("text_shape_colorFill","_textBox","shape_colorFill"),ve.prototype.publishProxy("text_shape_colorStroke","_textBox","shape_colorStroke"),ve.prototype.publishProxy("text_text_colorFill","_textBox","text_colorFill");var ye,be,we,xe,Ee,ke,De,Ce,je,Be,Me,Ie,Oe,Fe,qe,Se,Ne,Pe,Re,Ge,Le,Te,He,Ve,Ke,ze,We,Ze,Ue,$e,Xe,Ye,Qe,Je,Ae,et,tt,rt,nt,it,ot,at,st,ut,ct,ht,lt,ft,dt,pt,_t,gt,mt,vt,yt,bt,wt,xt,Et,kt,Dt,Ct,jt,Bt,Mt,It,Ot,Ft,qt,St,Nt,Pt,Rt,Gt,Lt,Tt,Ht,Vt,Kt,zt,Wt,Zt,Ut,$t,Xt,Yt,Qt,Jt,At,er,tr,rr,nr,ir,or,ar,sr,ur,cr,hr,lr,fr,dr,pr,_r,gr,mr,vr,yr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function br(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}function wr(){if(be)return ye;function e(){this.__data__=[],this.size=0}return be=1,n(e,"listCacheClear"),ye=e}function xr(){if(xe)return we;function e(e,t){return e===t||e!=e&&t!=t}return xe=1,n(e,"eq"),we=e}function Er(){if(ke)return Ee;ke=1;var e=xr();function t(t,r){for(var n=t.length;n--;)if(e(t[n][0],r))return n;return-1}return n(t,"assocIndexOf"),Ee=t}function kr(){if(Ce)return De;Ce=1;var e=Er(),t=Array.prototype.splice;function r(r){var n=this.__data__,i=e(n,r);return!(i<0)&&(i==n.length-1?n.pop():t.call(n,i,1),--this.size,!0)}return n(r,"listCacheDelete"),De=r}function Dr(){if(Be)return je;Be=1;var e=Er();function t(t){var r=this.__data__,n=e(r,t);return n<0?void 0:r[n][1]}return n(t,"listCacheGet"),je=t}function Cr(){if(Ie)return Me;Ie=1;var e=Er();function t(t){return e(this.__data__,t)>-1}return n(t,"listCacheHas"),Me=t}function jr(){if(Fe)return Oe;Fe=1;var e=Er();function t(t,r){var n=this.__data__,i=e(n,t);return i<0?(++this.size,n.push([t,r])):n[i][1]=r,this}return n(t,"listCacheSet"),Oe=t}function Br(){if(Se)return qe;Se=1;var e=wr(),t=kr(),r=Dr(),i=Cr(),o=jr();function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}return n(a,"ListCache"),a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=i,a.prototype.set=o,qe=a}function Mr(){if(Pe)return Ne;Pe=1;var e=Br();function t(){this.__data__=new e,this.size=0}return n(t,"stackClear"),Ne=t}function Ir(){if(Ge)return Re;function e(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}return Ge=1,n(e,"stackDelete"),Re=e}function Or(){if(Te)return Le;function e(e){return this.__data__.get(e)}return Te=1,n(e,"stackGet"),Le=e}function Fr(){if(Ve)return He;function e(e){return this.__data__.has(e)}return Ve=1,n(e,"stackHas"),He=e}function qr(){if(ze)return Ke;ze=1;var e="object"==typeof yr&&yr&&yr.Object===Object&&yr;return Ke=e}function Sr(){if(Ze)return We;Ze=1;var e=qr(),t="object"==typeof self&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return We=r}function Nr(){if($e)return Ue;$e=1;var e=Sr().Symbol;return Ue=e}function Pr(){if(Ye)return Xe;Ye=1;var e=Nr(),t=Object.prototype,r=t.hasOwnProperty,i=t.toString,o=e?e.toStringTag:void 0;function a(e){var t=r.call(e,o),n=e[o];try{e[o]=void 0;var a=!0}catch(u){}var s=i.call(e);return a&&(t?e[o]=n:delete e[o]),s}return n(a,"getRawTag"),Xe=a}function Rr(){if(Je)return Qe;Je=1;var e=Object.prototype.toString;function t(t){return e.call(t)}return n(t,"objectToString"),Qe=t}function Gr(){if(et)return Ae;et=1;var e=Nr(),t=Pr(),r=Rr(),i=e?e.toStringTag:void 0;function o(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?t(e):r(e)}return n(o,"baseGetTag"),Ae=o}function Lr(){if(rt)return tt;function e(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}return rt=1,n(e,"isObject"),tt=e}function Tr(){if(it)return nt;it=1;var e=Gr(),t=Lr();function r(r){if(!t(r))return!1;var n=e(r);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}return n(r,"isFunction"),nt=r}function Hr(){if(at)return ot;at=1;var e=Sr()["__core-js_shared__"];return ot=e}function Vr(){if(ut)return st;ut=1;var e,t=Hr(),r=(e=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"";function i(e){return!!r&&r in e}return n(i,"isMasked"),st=i}function Kr(){if(ht)return ct;ht=1;var e=Function.prototype.toString;function t(t){if(null!=t){try{return e.call(t)}catch(r){}try{return t+""}catch(r){}}return""}return n(t,"toSource"),ct=t}function zr(){if(ft)return lt;ft=1;var e=Tr(),t=Vr(),r=Lr(),i=Kr(),o=/^\[object .+?Constructor\]$/,a=Function.prototype,s=Object.prototype,u=a.toString,c=s.hasOwnProperty,h=RegExp("^"+u.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function l(n){return!(!r(n)||t(n))&&(e(n)?h:o).test(i(n))}return n(l,"baseIsNative"),lt=l}function Wr(){if(pt)return dt;function e(e,t){return null==e?void 0:e[t]}return pt=1,n(e,"getValue"),dt=e}function Zr(){if(gt)return _t;gt=1;var e=zr(),t=Wr();function r(r,n){var i=t(r,n);return e(i)?i:void 0}return n(r,"getNative"),_t=r}function Ur(){if(vt)return mt;vt=1;var e=Zr()(Sr(),"Map");return mt=e}function $r(){if(bt)return yt;bt=1;var e=Zr()(Object,"create");return yt=e}function Xr(){if(xt)return wt;xt=1;var e=$r();function t(){this.__data__=e?e(null):{},this.size=0}return n(t,"hashClear"),wt=t}function Yr(){if(kt)return Et;function e(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}return kt=1,n(e,"hashDelete"),Et=e}function Qr(){if(Ct)return Dt;Ct=1;var e=$r(),t=Object.prototype.hasOwnProperty;function r(r){var n=this.__data__;if(e){var i=n[r];return"__lodash_hash_undefined__"===i?void 0:i}return t.call(n,r)?n[r]:void 0}return n(r,"hashGet"),Dt=r}function Jr(){if(Bt)return jt;Bt=1;var e=$r(),t=Object.prototype.hasOwnProperty;function r(r){var n=this.__data__;return e?void 0!==n[r]:t.call(n,r)}return n(r,"hashHas"),jt=r}function Ar(){if(It)return Mt;It=1;var e=$r();function t(t,r){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=e&&void 0===r?"__lodash_hash_undefined__":r,this}return n(t,"hashSet"),Mt=t}function en(){if(Ft)return Ot;Ft=1;var e=Xr(),t=Yr(),r=Qr(),i=Jr(),o=Ar();function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}return n(a,"Hash"),a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=i,a.prototype.set=o,Ot=a}function tn(){if(St)return qt;St=1;var e=en(),t=Br(),r=Ur();function i(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return n(i,"mapCacheClear"),qt=i}function rn(){if(Pt)return Nt;function e(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}return Pt=1,n(e,"isKeyable"),Nt=e}function nn(){if(Gt)return Rt;Gt=1;var e=rn();function t(t,r){var n=t.__data__;return e(r)?n["string"==typeof r?"string":"hash"]:n.map}return n(t,"getMapData"),Rt=t}function on(){if(Tt)return Lt;Tt=1;var e=nn();function t(t){var r=e(this,t).delete(t);return this.size-=r?1:0,r}return n(t,"mapCacheDelete"),Lt=t}function an(){if(Vt)return Ht;Vt=1;var e=nn();function t(t){return e(this,t).get(t)}return n(t,"mapCacheGet"),Ht=t}function sn(){if(zt)return Kt;zt=1;var e=nn();function t(t){return e(this,t).has(t)}return n(t,"mapCacheHas"),Kt=t}function un(){if(Zt)return Wt;Zt=1;var e=nn();function t(t,r){var n=e(this,t),i=n.size;return n.set(t,r),this.size+=n.size==i?0:1,this}return n(t,"mapCacheSet"),Wt=t}function cn(){if($t)return Ut;$t=1;var e=tn(),t=on(),r=an(),i=sn(),o=un();function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}return n(a,"MapCache"),a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=i,a.prototype.set=o,Ut=a}function hn(){if(Yt)return Xt;Yt=1;var e=Br(),t=Ur(),r=cn();function i(n,i){var o=this.__data__;if(o instanceof e){var a=o.__data__;if(!t||a.length<199)return a.push([n,i]),this.size=++o.size,this;o=this.__data__=new r(a)}return o.set(n,i),this.size=o.size,this}return n(i,"stackSet"),Xt=i}function ln(){if(Jt)return Qt;Jt=1;var e=Br(),t=Mr(),r=Ir(),i=Or(),o=Fr(),a=hn();function s(t){var r=this.__data__=new e(t);this.size=r.size}return n(s,"Stack"),s.prototype.clear=t,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=o,s.prototype.set=a,Qt=s}function fn(){if(er)return At;function e(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}return er=1,n(e,"arrayEach"),At=e}function dn(){if(rr)return tr;rr=1;var e=Zr(),t=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch(r){}}();return tr=t}function pn(){if(ir)return nr;ir=1;var e=dn();function t(t,r,n){"__proto__"==r&&e?e(t,r,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[r]=n}return n(t,"baseAssignValue"),nr=t}function _n(){if(ar)return or;ar=1;var e=pn(),t=xr(),r=Object.prototype.hasOwnProperty;function i(n,i,o){var a=n[i];r.call(n,i)&&t(a,o)&&(void 0!==o||i in n)||e(n,i,o)}return n(i,"assignValue"),or=i}function gn(){if(ur)return sr;ur=1;var e=_n(),t=pn();function r(r,n,i,o){var a=!i;i||(i={});for(var s=-1,u=n.length;++s<u;){var c=n[s],h=o?o(i[c],r[c],c,i,r):void 0;void 0===h&&(h=r[c]),a?t(i,c,h):e(i,c,h)}return i}return n(r,"copyObject"),sr=r}function mn(){if(hr)return cr;function e(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}return hr=1,n(e,"baseTimes"),cr=e}function vn(){if(fr)return lr;function e(e){return null!=e&&"object"==typeof e}return fr=1,n(e,"isObjectLike"),lr=e}function yn(){if(pr)return dr;pr=1;var e=Gr(),t=vn();function r(r){return t(r)&&"[object Arguments]"==e(r)}return n(r,"baseIsArguments"),dr=r}function bn(){if(gr)return _r;gr=1;var e=yn(),t=vn(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,o=e(/* @__PURE__ */function(){return arguments}())?e:function(e){return t(e)&&n.call(e,"callee")&&!i.call(e,"callee")};return _r=o}function wn(){if(vr)return mr;vr=1;var e=Array.isArray;return mr=e}n(br,"commonjsRequire"),n(wr,"require_listCacheClear"),n(xr,"requireEq"),n(Er,"require_assocIndexOf"),n(kr,"require_listCacheDelete"),n(Dr,"require_listCacheGet"),n(Cr,"require_listCacheHas"),n(jr,"require_listCacheSet"),n(Br,"require_ListCache"),n(Mr,"require_stackClear"),n(Ir,"require_stackDelete"),n(Or,"require_stackGet"),n(Fr,"require_stackHas"),n(qr,"require_freeGlobal"),n(Sr,"require_root"),n(Nr,"require_Symbol"),n(Pr,"require_getRawTag"),n(Rr,"require_objectToString"),n(Gr,"require_baseGetTag"),n(Lr,"requireIsObject"),n(Tr,"requireIsFunction"),n(Hr,"require_coreJsData"),n(Vr,"require_isMasked"),n(Kr,"require_toSource"),n(zr,"require_baseIsNative"),n(Wr,"require_getValue"),n(Zr,"require_getNative"),n(Ur,"require_Map"),n($r,"require_nativeCreate"),n(Xr,"require_hashClear"),n(Yr,"require_hashDelete"),n(Qr,"require_hashGet"),n(Jr,"require_hashHas"),n(Ar,"require_hashSet"),n(en,"require_Hash"),n(tn,"require_mapCacheClear"),n(rn,"require_isKeyable"),n(nn,"require_getMapData"),n(on,"require_mapCacheDelete"),n(an,"require_mapCacheGet"),n(sn,"require_mapCacheHas"),n(un,"require_mapCacheSet"),n(cn,"require_MapCache"),n(hn,"require_stackSet"),n(ln,"require_Stack"),n(fn,"require_arrayEach"),n(dn,"require_defineProperty"),n(pn,"require_baseAssignValue"),n(_n,"require_assignValue"),n(gn,"require_copyObject"),n(mn,"require_baseTimes"),n(vn,"requireIsObjectLike"),n(yn,"require_baseIsArguments"),n(bn,"requireIsArguments"),n(wn,"requireIsArray");var xn,En,kn,Dn,Cn,jn,Bn,Mn,In,On,Fn,qn={exports:{}};function Sn(){if(En)return xn;function e(){return!1}return En=1,n(e,"stubFalse"),xn=e}function Nn(){return kn||(kn=1,e=qn,t=qn.exports,r=Sr(),n=Sn(),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=(a?a.isBuffer:void 0)||n,e.exports=s),qn.exports;var e,t,r,n,i,o,a,s}function Pn(){if(Cn)return Dn;Cn=1;var e=/^(?:0|[1-9]\d*)$/;function t(t,r){var n=typeof t;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&e.test(t))&&t>-1&&t%1==0&&t<r}return n(t,"isIndex"),Dn=t}function Rn(){if(Bn)return jn;Bn=1;function e(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}return n(e,"isLength"),jn=e}function Gn(){if(In)return Mn;In=1;var e=Gr(),t=Rn(),r=vn(),i={};function o(n){return r(n)&&t(n.length)&&!!i[e(n)]}return i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,n(o,"baseIsTypedArray"),Mn=o}function Ln(){if(Fn)return On;function e(e){return function(t){return e(t)}}return Fn=1,n(e,"baseUnary"),On=e}n(Sn,"requireStubFalse"),n(Nn,"requireIsBuffer"),n(Pn,"require_isIndex"),n(Rn,"requireIsLength"),n(Gn,"require_baseIsTypedArray"),n(Ln,"require_baseUnary");var Tn,Hn,Vn,Kn,zn,Wn,Zn,Un,$n,Xn,Yn,Qn,Jn,An,ei,ti,ri,ni,ii,oi,ai,si,ui,ci,hi,li,fi,di={exports:{}};function pi(){return Tn||(Tn=1,e=di,t=di.exports,r=qr(),n=t&&!t.nodeType&&t,i=n&&e&&!e.nodeType&&e,o=i&&i.exports===n&&r.process,a=function(){try{var e=i&&i.require&&i.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(t){}}(),e.exports=a),di.exports;var e,t,r,n,i,o,a}function _i(){if(Vn)return Hn;Vn=1;var e=Gn(),t=Ln(),r=pi(),n=r&&r.isTypedArray,i=n?t(n):e;return Hn=i}function gi(){if(zn)return Kn;zn=1;var e=mn(),t=bn(),r=wn(),i=Nn(),o=Pn(),a=_i(),s=Object.prototype.hasOwnProperty;function u(n,u){var c=r(n),h=!c&&t(n),l=!c&&!h&&i(n),f=!c&&!h&&!l&&a(n),d=c||h||l||f,p=d?e(n.length,String):[],_=p.length;for(var g in n)!u&&!s.call(n,g)||d&&("length"==g||l&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||o(g,_))||p.push(g);return p}return n(u,"arrayLikeKeys"),Kn=u}function mi(){if(Zn)return Wn;Zn=1;var e=Object.prototype;function t(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||e)}return n(t,"isPrototype"),Wn=t}function vi(){if($n)return Un;function e(e,t){return function(r){return e(t(r))}}return $n=1,n(e,"overArg"),Un=e}function yi(){if(Yn)return Xn;Yn=1;var e=vi()(Object.keys,Object);return Xn=e}function bi(){if(Jn)return Qn;Jn=1;var e=mi(),t=yi(),r=Object.prototype.hasOwnProperty;function i(n){if(!e(n))return t(n);var i=[];for(var o in Object(n))r.call(n,o)&&"constructor"!=o&&i.push(o);return i}return n(i,"baseKeys"),Qn=i}function wi(){if(ei)return An;ei=1;var e=Tr(),t=Rn();function r(r){return null!=r&&t(r.length)&&!e(r)}return n(r,"isArrayLike"),An=r}function xi(){if(ri)return ti;ri=1;var e=gi(),t=bi(),r=wi();function i(n){return r(n)?e(n):t(n)}return n(i,"keys"),ti=i}function Ei(){if(ii)return ni;ii=1;var e=gn(),t=xi();function r(r,n){return r&&e(n,t(n),r)}return n(r,"baseAssign"),ni=r}function ki(){if(ai)return oi;function e(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}return ai=1,n(e,"nativeKeysIn"),oi=e}function Di(){if(ui)return si;ui=1;var e=Lr(),t=mi(),r=ki(),i=Object.prototype.hasOwnProperty;function o(n){if(!e(n))return r(n);var o=t(n),a=[];for(var s in n)("constructor"!=s||!o&&i.call(n,s))&&a.push(s);return a}return n(o,"baseKeysIn"),si=o}function Ci(){if(hi)return ci;hi=1;var e=gi(),t=Di(),r=wi();function i(n){return r(n)?e(n,!0):t(n)}return n(i,"keysIn"),ci=i}function ji(){if(fi)return li;fi=1;var e=gn(),t=Ci();function r(r,n){return r&&e(n,t(n),r)}return n(r,"baseAssignIn"),li=r}n(pi,"require_nodeUtil"),n(_i,"requireIsTypedArray"),n(gi,"require_arrayLikeKeys"),n(mi,"require_isPrototype"),n(vi,"require_overArg"),n(yi,"require_nativeKeys"),n(bi,"require_baseKeys"),n(wi,"requireIsArrayLike"),n(xi,"requireKeys"),n(Ei,"require_baseAssign"),n(ki,"require_nativeKeysIn"),n(Di,"require_baseKeysIn"),n(Ci,"requireKeysIn"),n(ji,"require_baseAssignIn");var Bi,Mi,Ii,Oi,Fi,qi,Si,Ni,Pi,Ri,Gi,Li,Ti,Hi,Vi,Ki,zi,Wi,Zi,Ui,$i,Xi,Yi,Qi,Ji,Ai,eo,to,ro,no,io,oo,ao,so,uo,co,ho,lo,fo,po,_o,go,mo,vo,yo,bo,wo,xo,Eo,ko,Do,Co,jo,Bo,Mo,Io,Oo,Fo,qo,So,No,Po,Ro,Go,Lo,To,Ho,Vo,Ko,zo,Wo,Zo,Uo,$o,Xo,Yo,Qo,Jo,Ao,ea,ta,ra,na,ia,oa,aa,sa,ua,ca,ha,la,fa,da,pa,_a,ga,ma,va,ya,ba,wa,xa,Ea,ka,Da,Ca,ja,Ba,Ma,Ia,Oa,Fa,qa,Sa,Na,Pa,Ra,Ga,La,Ta,Ha,Va,Ka,za,Wa,Za,Ua,$a,Xa,Ya,Qa,Ja,Aa,es,ts,rs,ns,is,os,as,ss,us,cs,hs,ls,fs,ds,ps,_s,gs,ms,vs,ys,bs,ws,xs,Es,ks,Ds,Cs,js,Bs,Ms,Is,Os,Fs,qs,Ss,Ns,Ps,Rs,Gs,Ls,Ts,Hs,Vs,Ks,zs,Ws,Zs,Us,$s,Xs,Ys,Qs,Js,As,eu,tu,ru,nu,iu,ou,au,su,uu,cu,hu,lu,fu,du,pu,_u,gu,mu,vu,yu,bu,wu,xu,Eu,ku,Du,Cu,ju,Bu,Mu,Iu,Ou,Fu,qu,Su,Nu,Pu,Ru,Gu,Lu,Tu,Hu,Vu,Ku,zu,Wu,Zu,Uu,$u,Xu,Yu,Qu,Ju,Au,ec,tc,rc,nc,ic,oc,ac,sc,uc,cc,hc,lc,fc,dc,pc,_c,gc,mc,vc,yc,bc,wc,xc,Ec,kc,Dc,Cc,jc,Bc,Mc,Ic,Oc,Fc,qc,Sc,Nc,Pc,Rc,Gc,Lc,Tc,Hc,Vc,Kc,zc,Wc,Zc,Uc,$c,Xc,Yc,Qc,Jc,Ac,eh,th,rh,nh,ih,oh,ah,sh,uh,ch,hh,lh,fh,dh,ph,_h,gh,mh,vh,yh,bh,wh,xh,Eh,kh,Dh,Ch,jh,Bh,Mh,Ih,Oh,Fh,qh,Sh,Nh,Ph,Rh,Gh,Lh,Th,Hh,Vh,Kh,zh,Wh,Zh,Uh,$h,Xh,Yh,Qh,Jh,Ah,el,tl,rl,nl,il,ol,al,sl,ul,cl,hl,ll,fl,dl,pl,_l,gl,ml,vl,yl,bl,wl,xl,El,kl,Dl,Cl,jl,Bl,Ml,Il,Ol,Fl,ql,Sl,Nl,Pl,Rl,Gl,Ll,Tl,Hl,Vl,Kl,zl,Wl,Zl,Ul,$l,Xl,Yl,Ql,Jl,Al,ef,tf,rf,nf,of,af,sf,uf,cf,hf,lf,ff,df,pf,_f,gf,mf,vf,yf,bf,wf,xf,Ef,kf,Df,Cf,jf,Bf,Mf={exports:{}};function If(){return Bi||(Bi=1,function(e,t){var r=Sr(),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;function u(e,t){if(t)return e.slice();var r=e.length,n=s?s(r):new e.constructor(r);return e.copy(n),n}n(u,"cloneBuffer"),e.exports=u}(Mf,Mf.exports)),Mf.exports}function Of(){if(Ii)return Mi;function e(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}return Ii=1,n(e,"copyArray"),Mi=e}function Ff(){if(Fi)return Oi;function e(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}return Fi=1,n(e,"arrayFilter"),Oi=e}function qf(){if(Si)return qi;function e(){return[]}return Si=1,n(e,"stubArray"),qi=e}function Sf(){if(Pi)return Ni;Pi=1;var e=Ff(),t=qf(),r=Object.prototype.propertyIsEnumerable,n=Object.getOwnPropertySymbols;return Ni=n?function(t){return null==t?[]:(t=Object(t),e(n(t),function(e){return r.call(t,e)}))}:t}function Nf(){if(Gi)return Ri;Gi=1;var e=gn(),t=Sf();function r(r,n){return e(r,t(r),n)}return n(r,"copySymbols"),Ri=r}function Pf(){if(Ti)return Li;function e(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}return Ti=1,n(e,"arrayPush"),Li=e}function Rf(){if(Vi)return Hi;Vi=1;var e=vi()(Object.getPrototypeOf,Object);return Hi=e}function Gf(){if(zi)return Ki;zi=1;var e=Pf(),t=Rf(),r=Sf(),n=qf(),i=Object.getOwnPropertySymbols;return Ki=i?function(n){for(var i=[];n;)e(i,r(n)),n=t(n);return i}:n}function Lf(){if(Zi)return Wi;Zi=1;var e=gn(),t=Gf();function r(r,n){return e(r,t(r),n)}return n(r,"copySymbolsIn"),Wi=r}function Tf(){if($i)return Ui;$i=1;var e=Pf(),t=wn();function r(r,n,i){var o=n(r);return t(r)?o:e(o,i(r))}return n(r,"baseGetAllKeys"),Ui=r}function Hf(){if(Yi)return Xi;Yi=1;var e=Tf(),t=Sf(),r=xi();function i(n){return e(n,r,t)}return n(i,"getAllKeys"),Xi=i}function Vf(){if(Ji)return Qi;Ji=1;var e=Tf(),t=Gf(),r=Ci();function i(n){return e(n,r,t)}return n(i,"getAllKeysIn"),Qi=i}function Kf(){if(eo)return Ai;eo=1;var e=Zr()(Sr(),"DataView");return Ai=e}function zf(){if(ro)return to;ro=1;var e=Zr()(Sr(),"Promise");return to=e}function Wf(){if(io)return no;io=1;var e=Zr()(Sr(),"Set");return no=e}function Zf(){if(ao)return oo;ao=1;var e=Zr()(Sr(),"WeakMap");return oo=e}function Uf(){if(uo)return so;uo=1;var e=Kf(),t=Ur(),r=zf(),i=Wf(),o=Zf(),a=Gr(),s=Kr(),u="[object Map]",c="[object Promise]",h="[object Set]",l="[object WeakMap]",f="[object DataView]",d=s(e),p=s(t),_=s(r),g=s(i),m=s(o),v=a;return(e&&v(new e(new ArrayBuffer(1)))!=f||t&&v(new t)!=u||r&&v(r.resolve())!=c||i&&v(new i)!=h||o&&v(new o)!=l)&&(v=/* @__PURE__ */n(function(e){var t=a(e),r="[object Object]"==t?e.constructor:void 0,n=r?s(r):"";if(n)switch(n){case d:return f;case p:return u;case _:return c;case g:return h;case m:return l}return t},"getTag")),so=v}function $f(){if(ho)return co;ho=1;var e=Object.prototype.hasOwnProperty;function t(t){var r=t.length,n=new t.constructor(r);return r&&"string"==typeof t[0]&&e.call(t,"index")&&(n.index=t.index,n.input=t.input),n}return n(t,"initCloneArray"),co=t}function Xf(){if(fo)return lo;fo=1;var e=Sr().Uint8Array;return lo=e}function Yf(){if(_o)return po;_o=1;var e=Xf();function t(t){var r=new t.constructor(t.byteLength);return new e(r).set(new e(t)),r}return n(t,"cloneArrayBuffer"),po=t}function Qf(){if(mo)return go;mo=1;var e=Yf();function t(t,r){var n=r?e(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}return n(t,"cloneDataView"),go=t}function Jf(){if(yo)return vo;yo=1;var e=/\w*$/;function t(t){var r=new t.constructor(t.source,e.exec(t));return r.lastIndex=t.lastIndex,r}return n(t,"cloneRegExp"),vo=t}function Af(){if(wo)return bo;wo=1;var e=Nr(),t=e?e.prototype:void 0,r=t?t.valueOf:void 0;function i(e){return r?Object(r.call(e)):{}}return n(i,"cloneSymbol"),bo=i}function ed(){if(Eo)return xo;Eo=1;var e=Yf();function t(t,r){var n=r?e(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}return n(t,"cloneTypedArray"),xo=t}function td(){if(Do)return ko;Do=1;var e=Yf(),t=Qf(),r=Jf(),i=Af(),o=ed();function a(n,a,s){var u=n.constructor;switch(a){case"[object ArrayBuffer]":return e(n);case"[object Boolean]":case"[object Date]":return new u(+n);case"[object DataView]":return t(n,s);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o(n,s);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(n);case"[object RegExp]":return r(n);case"[object Symbol]":return i(n)}}return n(a,"initCloneByTag"),ko=a}function rd(){if(jo)return Co;jo=1;var e=Lr(),t=Object.create;return Co=/* @__PURE__ */function(){function r(){}return n(r,"object"),function(n){if(!e(n))return{};if(t)return t(n);r.prototype=n;var i=new r;return r.prototype=void 0,i}}()}function nd(){if(Mo)return Bo;Mo=1;var e=rd(),t=Rf(),r=mi();function i(n){return"function"!=typeof n.constructor||r(n)?{}:e(t(n))}return n(i,"initCloneObject"),Bo=i}function id(){if(Oo)return Io;Oo=1;var e=Uf(),t=vn();function r(r){return t(r)&&"[object Map]"==e(r)}return n(r,"baseIsMap"),Io=r}function od(){if(qo)return Fo;qo=1;var e=id(),t=Ln(),r=pi(),n=r&&r.isMap,i=n?t(n):e;return Fo=i}function ad(){if(No)return So;No=1;var e=Uf(),t=vn();function r(r){return t(r)&&"[object Set]"==e(r)}return n(r,"baseIsSet"),So=r}function sd(){if(Ro)return Po;Ro=1;var e=ad(),t=Ln(),r=pi(),n=r&&r.isSet,i=n?t(n):e;return Po=i}function ud(){if(Lo)return Go;Lo=1;var e=ln(),t=fn(),r=_n(),i=Ei(),o=ji(),a=If(),s=Of(),u=Nf(),c=Lf(),h=Hf(),l=Vf(),f=Uf(),d=$f(),p=td(),_=nd(),g=wn(),m=Nn(),v=od(),y=Lr(),b=sd(),w=xi(),x=Ci(),E="[object Arguments]",k="[object Function]",D="[object Object]",C={};function j(n,B,M,I,O,F){var q,S=1&B,N=2&B,P=4&B;if(M&&(q=O?M(n,I,O,F):M(n)),void 0!==q)return q;if(!y(n))return n;var R=g(n);if(R){if(q=d(n),!S)return s(n,q)}else{var G=f(n),L=G==k||"[object GeneratorFunction]"==G;if(m(n))return a(n,S);if(G==D||G==E||L&&!O){if(q=N||L?{}:_(n),!S)return N?c(n,o(q,n)):u(n,i(q,n))}else{if(!C[G])return O?n:{};q=p(n,G,S)}}F||(F=new e);var T=F.get(n);if(T)return T;F.set(n,q),b(n)?n.forEach(function(e){q.add(j(e,B,M,e,n,F))}):v(n)&&n.forEach(function(e,t){q.set(t,j(e,B,M,t,n,F))});var H=R?void 0:(P?N?l:h:N?x:w)(n);return t(H||n,function(e,t){H&&(e=n[t=e]),r(q,t,j(e,B,M,t,n,F))}),q}return C[E]=C["[object Array]"]=C["[object ArrayBuffer]"]=C["[object DataView]"]=C["[object Boolean]"]=C["[object Date]"]=C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Map]"]=C["[object Number]"]=C[D]=C["[object RegExp]"]=C["[object Set]"]=C["[object String]"]=C["[object Symbol]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C["[object Error]"]=C[k]=C["[object WeakMap]"]=!1,n(j,"baseClone"),Go=j}function cd(){if(Ho)return To;Ho=1;var e=ud();function t(t){return e(t,4)}return n(t,"clone"),To=t}function hd(){if(Ko)return Vo;function e(e){return function(){return e}}return Ko=1,n(e,"constant"),Vo=e}function ld(){if(Wo)return zo;function e(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===r(o[u],u,o))break}return t}}return Wo=1,n(e,"createBaseFor"),zo=e}function fd(){if(Uo)return Zo;Uo=1;var e=ld()();return Zo=e}function dd(){if(Xo)return $o;Xo=1;var e=fd(),t=xi();function r(r,n){return r&&e(r,n,t)}return n(r,"baseForOwn"),$o=r}function pd(){if(Qo)return Yo;Qo=1;var e=wi();function t(t,r){return function(n,i){if(null==n)return n;if(!e(n))return t(n,i);for(var o=n.length,a=r?o:-1,s=Object(n);(r?a--:++a<o)&&!1!==i(s[a],a,s););return n}}return n(t,"createBaseEach"),Yo=t}function _d(){if(Ao)return Jo;Ao=1;var e=dd(),t=pd()(e);return Jo=t}function gd(){if(ta)return ea;function e(e){return e}return ta=1,n(e,"identity"),ea=e}function md(){if(na)return ra;na=1;var e=gd();function t(t){return"function"==typeof t?t:e}return n(t,"castFunction"),ra=t}function vd(){if(oa)return ia;oa=1;var e=fn(),t=_d(),r=md(),i=wn();function o(n,o){return(i(n)?e:t)(n,r(o))}return n(o,"forEach"),ia=o}function yd(){return sa?aa:(sa=1,aa=vd())}function bd(){if(ca)return ua;ca=1;var e=_d();function t(t,r){var n=[];return e(t,function(e,t,i){r(e,t,i)&&n.push(e)}),n}return n(t,"baseFilter"),ua=t}function wd(){if(la)return ha;la=1;function e(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}return n(e,"setCacheAdd"),ha=e}function xd(){if(da)return fa;function e(e){return this.__data__.has(e)}return da=1,n(e,"setCacheHas"),fa=e}function Ed(){if(_a)return pa;_a=1;var e=cn(),t=wd(),r=xd();function i(t){var r=-1,n=null==t?0:t.length;for(this.__data__=new e;++r<n;)this.add(t[r])}return n(i,"SetCache"),i.prototype.add=i.prototype.push=t,i.prototype.has=r,pa=i}function kd(){if(ma)return ga;function e(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}return ma=1,n(e,"arraySome"),ga=e}function Dd(){if(ya)return va;function e(e,t){return e.has(t)}return ya=1,n(e,"cacheHas"),va=e}function Cd(){if(wa)return ba;wa=1;var e=Ed(),t=kd(),r=Dd();function i(n,i,o,a,s,u){var c=1&o,h=n.length,l=i.length;if(h!=l&&!(c&&l>h))return!1;var f=u.get(n),d=u.get(i);if(f&&d)return f==i&&d==n;var p=-1,_=!0,g=2&o?new e:void 0;for(u.set(n,i),u.set(i,n);++p<h;){var m=n[p],v=i[p];if(a)var y=c?a(v,m,p,i,n,u):a(m,v,p,n,i,u);if(void 0!==y){if(y)continue;_=!1;break}if(g){if(!t(i,function(e,t){if(!r(g,t)&&(m===e||s(m,e,o,a,u)))return g.push(t)})){_=!1;break}}else if(m!==v&&!s(m,v,o,a,u)){_=!1;break}}return u.delete(n),u.delete(i),_}return n(i,"equalArrays"),ba=i}function jd(){if(Ea)return xa;function e(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}return Ea=1,n(e,"mapToArray"),xa=e}function Bd(){if(Da)return ka;function e(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}return Da=1,n(e,"setToArray"),ka=e}function Md(){if(ja)return Ca;ja=1;var e=Nr(),t=Xf(),r=xr(),i=Cd(),o=jd(),a=Bd(),s=e?e.prototype:void 0,u=s?s.valueOf:void 0;function c(e,n,s,c,h,l,f){switch(s){case"[object DataView]":if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=n.byteLength||!l(new t(e),new t(n)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+e,+n);case"[object Error]":return e.name==n.name&&e.message==n.message;case"[object RegExp]":case"[object String]":return e==n+"";case"[object Map]":var d=o;case"[object Set]":var p=1&c;if(d||(d=a),e.size!=n.size&&!p)return!1;var _=f.get(e);if(_)return _==n;c|=2,f.set(e,n);var g=i(d(e),d(n),c,h,l,f);return f.delete(e),g;case"[object Symbol]":if(u)return u.call(e)==u.call(n)}return!1}return n(c,"equalByTag"),Ca=c}function Id(){if(Ma)return Ba;Ma=1;var e=Hf(),t=Object.prototype.hasOwnProperty;function r(r,n,i,o,a,s){var u=1&i,c=e(r),h=c.length;if(h!=e(n).length&&!u)return!1;for(var l=h;l--;){var f=c[l];if(!(u?f in n:t.call(n,f)))return!1}var d=s.get(r),p=s.get(n);if(d&&p)return d==n&&p==r;var _=!0;s.set(r,n),s.set(n,r);for(var g=u;++l<h;){var m=r[f=c[l]],v=n[f];if(o)var y=u?o(v,m,f,n,r,s):o(m,v,f,r,n,s);if(!(void 0===y?m===v||a(m,v,i,o,s):y)){_=!1;break}g||(g="constructor"==f)}if(_&&!g){var b=r.constructor,w=n.constructor;b==w||!("constructor"in r)||!("constructor"in n)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(_=!1)}return s.delete(r),s.delete(n),_}return n(r,"equalObjects"),Ba=r}function Od(){if(Oa)return Ia;Oa=1;var e=ln(),t=Cd(),r=Md(),i=Id(),o=Uf(),a=wn(),s=Nn(),u=_i(),c="[object Arguments]",h="[object Array]",l="[object Object]",f=Object.prototype.hasOwnProperty;function d(n,d,p,_,g,m){var v=a(n),y=a(d),b=v?h:o(n),w=y?h:o(d),x=(b=b==c?l:b)==l,E=(w=w==c?l:w)==l,k=b==w;if(k&&s(n)){if(!s(d))return!1;v=!0,x=!1}if(k&&!x)return m||(m=new e),v||u(n)?t(n,d,p,_,g,m):r(n,d,b,p,_,g,m);if(!(1&p)){var D=x&&f.call(n,"__wrapped__"),C=E&&f.call(d,"__wrapped__");if(D||C){var j=D?n.value():n,B=C?d.value():d;return m||(m=new e),g(j,B,p,_,m)}}return!!k&&(m||(m=new e),i(n,d,p,_,g,m))}return n(d,"baseIsEqualDeep"),Ia=d}function Fd(){if(qa)return Fa;qa=1;var e=Od(),t=vn();function r(n,i,o,a,s){return n===i||(null==n||null==i||!t(n)&&!t(i)?n!=n&&i!=i:e(n,i,o,a,r,s))}return n(r,"baseIsEqual"),Fa=r}function qd(){if(Na)return Sa;Na=1;var e=ln(),t=Fd();function r(r,n,i,o){var a=i.length,s=a,u=!o;if(null==r)return!s;for(r=Object(r);a--;){var c=i[a];if(u&&c[2]?c[1]!==r[c[0]]:!(c[0]in r))return!1}for(;++a<s;){var h=(c=i[a])[0],l=r[h],f=c[1];if(u&&c[2]){if(void 0===l&&!(h in r))return!1}else{var d=new e;if(o)var p=o(l,f,h,r,n,d);if(!(void 0===p?t(f,l,3,o,d):p))return!1}}return!0}return n(r,"baseIsMatch"),Sa=r}function Sd(){if(Ra)return Pa;Ra=1;var e=Lr();function t(t){return t==t&&!e(t)}return n(t,"isStrictComparable"),Pa=t}function Nd(){if(La)return Ga;La=1;var e=Sd(),t=xi();function r(r){for(var n=t(r),i=n.length;i--;){var o=n[i],a=r[o];n[i]=[o,a,e(a)]}return n}return n(r,"getMatchData"),Ga=r}function Pd(){if(Ha)return Ta;function e(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}return Ha=1,n(e,"matchesStrictComparable"),Ta=e}function Rd(){if(Ka)return Va;Ka=1;var e=qd(),t=Nd(),r=Pd();function i(n){var i=t(n);return 1==i.length&&i[0][2]?r(i[0][0],i[0][1]):function(t){return t===n||e(t,n,i)}}return n(i,"baseMatches"),Va=i}function Gd(){if(Wa)return za;Wa=1;var e=Gr(),t=vn();function r(r){return"symbol"==typeof r||t(r)&&"[object Symbol]"==e(r)}return n(r,"isSymbol"),za=r}function Ld(){if(Ua)return Za;Ua=1;var e=wn(),t=Gd(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function o(n,o){if(e(n))return!1;var a=typeof n;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=n&&!t(n))||(i.test(n)||!r.test(n)||null!=o&&n in Object(o))}return n(o,"isKey"),Za=o}function Td(){if(Xa)return $a;Xa=1;var e=cn();function t(r,i){if("function"!=typeof r||null!=i&&"function"!=typeof i)throw new TypeError("Expected a function");var o=/* @__PURE__ */n(function(){var e=arguments,t=i?i.apply(this,e):e[0],n=o.cache;if(n.has(t))return n.get(t);var a=r.apply(this,e);return o.cache=n.set(t,a)||n,a},"memoized");return o.cache=new(t.Cache||e),o}return n(t,"memoize"),t.Cache=e,$a=t}function Hd(){if(Qa)return Ya;Qa=1;var e=Td();function t(t){var r=e(t,function(e){return 500===n.size&&n.clear(),e}),n=r.cache;return r}return n(t,"memoizeCapped"),Ya=t}function Vd(){if(Aa)return Ja;Aa=1;var e=Hd(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(e){var n=[];return 46===e.charCodeAt(0)&&n.push(""),e.replace(t,function(e,t,i,o){n.push(i?o.replace(r,"$1"):t||e)}),n});return Ja=n}function Kd(){if(ts)return es;function e(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}return ts=1,n(e,"arrayMap"),es=e}function zd(){if(ns)return rs;ns=1;var e=Nr(),t=Kd(),r=wn(),i=Gd(),o=e?e.prototype:void 0,a=o?o.toString:void 0;function s(e){if("string"==typeof e)return e;if(r(e))return t(e,s)+"";if(i(e))return a?a.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}return n(s,"baseToString"),rs=s}function Wd(){if(os)return is;os=1;var e=zd();function t(t){return null==t?"":e(t)}return n(t,"toString"),is=t}function Zd(){if(ss)return as;ss=1;var e=wn(),t=Ld(),r=Vd(),i=Wd();function o(n,o){return e(n)?n:t(n,o)?[n]:r(i(n))}return n(o,"castPath"),as=o}function Ud(){if(cs)return us;cs=1;var e=Gd();function t(t){if("string"==typeof t||e(t))return t;var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}return n(t,"toKey"),us=t}function $d(){if(ls)return hs;ls=1;var e=Zd(),t=Ud();function r(r,n){for(var i=0,o=(n=e(n,r)).length;null!=r&&i<o;)r=r[t(n[i++])];return i&&i==o?r:void 0}return n(r,"baseGet"),hs=r}function Xd(){if(ds)return fs;ds=1;var e=$d();function t(t,r,n){var i=null==t?void 0:e(t,r);return void 0===i?n:i}return n(t,"get"),fs=t}function Yd(){if(_s)return ps;function e(e,t){return null!=e&&t in Object(e)}return _s=1,n(e,"baseHasIn"),ps=e}function Qd(){if(ms)return gs;ms=1;var e=Zd(),t=bn(),r=wn(),i=Pn(),o=Rn(),a=Ud();function s(n,s,u){for(var c=-1,h=(s=e(s,n)).length,l=!1;++c<h;){var f=a(s[c]);if(!(l=null!=n&&u(n,f)))break;n=n[f]}return l||++c!=h?l:!!(h=null==n?0:n.length)&&o(h)&&i(f,h)&&(r(n)||t(n))}return n(s,"hasPath"),gs=s}function Jd(){if(ys)return vs;ys=1;var e=Yd(),t=Qd();function r(r,n){return null!=r&&t(r,n,e)}return n(r,"hasIn"),vs=r}function Ad(){if(ws)return bs;ws=1;var e=Fd(),t=Xd(),r=Jd(),i=Ld(),o=Sd(),a=Pd(),s=Ud();function u(n,u){return i(n)&&o(u)?a(s(n),u):function(i){var o=t(i,n);return void 0===o&&o===u?r(i,n):e(u,o,3)}}return n(u,"baseMatchesProperty"),bs=u}function ep(){if(Es)return xs;function e(e){return function(t){return null==t?void 0:t[e]}}return Es=1,n(e,"baseProperty"),xs=e}function tp(){if(Ds)return ks;Ds=1;var e=$d();function t(t){return function(r){return e(r,t)}}return n(t,"basePropertyDeep"),ks=t}function rp(){if(js)return Cs;js=1;var e=ep(),t=tp(),r=Ld(),i=Ud();function o(n){return r(n)?e(i(n)):t(n)}return n(o,"property"),Cs=o}function np(){if(Ms)return Bs;Ms=1;var e=Rd(),t=Ad(),r=gd(),i=wn(),o=rp();function a(n){return"function"==typeof n?n:null==n?r:"object"==typeof n?i(n)?t(n[0],n[1]):e(n):o(n)}return n(a,"baseIteratee"),Bs=a}function ip(){if(Os)return Is;Os=1;var e=Ff(),t=bd(),r=np(),i=wn();function o(n,o){return(i(n)?e:t)(n,r(o,3))}return n(o,"filter"),Is=o}function op(){if(qs)return Fs;qs=1;var e=Object.prototype.hasOwnProperty;function t(t,r){return null!=t&&e.call(t,r)}return n(t,"baseHas"),Fs=t}function ap(){if(Ns)return Ss;Ns=1;var e=op(),t=Qd();function r(r,n){return null!=r&&t(r,n,e)}return n(r,"has"),Ss=r}function sp(){if(Rs)return Ps;Rs=1;var e=bi(),t=Uf(),r=bn(),i=wn(),o=wi(),a=Nn(),s=mi(),u=_i(),c=Object.prototype.hasOwnProperty;function h(n){if(null==n)return!0;if(o(n)&&(i(n)||"string"==typeof n||"function"==typeof n.splice||a(n)||u(n)||r(n)))return!n.length;var h=t(n);if("[object Map]"==h||"[object Set]"==h)return!n.size;if(s(n))return!e(n).length;for(var l in n)if(c.call(n,l))return!1;return!0}return n(h,"isEmpty"),Ps=h}function up(){if(Ls)return Gs;function e(e){return void 0===e}return Ls=1,n(e,"isUndefined"),Gs=e}function cp(){if(Hs)return Ts;Hs=1;var e=_d(),t=wi();function r(r,n){var i=-1,o=t(r)?Array(r.length):[];return e(r,function(e,t,r){o[++i]=n(e,t,r)}),o}return n(r,"baseMap"),Ts=r}function hp(){if(Ks)return Vs;Ks=1;var e=Kd(),t=np(),r=cp(),i=wn();function o(n,o){return(i(n)?e:r)(n,t(o,3))}return n(o,"map"),Vs=o}function lp(){if(Ws)return zs;function e(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}return Ws=1,n(e,"arrayReduce"),zs=e}function fp(){if(Us)return Zs;function e(e,t,r,n,i){return i(e,function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)}),r}return Us=1,n(e,"baseReduce"),Zs=e}function dp(){if(Xs)return $s;Xs=1;var e=lp(),t=_d(),r=np(),i=fp(),o=wn();function a(n,a,s){var u=o(n)?e:i,c=arguments.length<3;return u(n,r(a,4),s,c,t)}return n(a,"reduce"),$s=a}function pp(){if(Qs)return Ys;Qs=1;var e=Gr(),t=wn(),r=vn();function i(n){return"string"==typeof n||!t(n)&&r(n)&&"[object String]"==e(n)}return n(i,"isString"),Ys=i}function _p(){if(As)return Js;As=1;var e=ep()("length");return Js=e}function gp(){if(tu)return eu;tu=1;var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function t(t){return e.test(t)}return n(t,"hasUnicode"),eu=t}function mp(){if(nu)return ru;nu=1;var e="\\ud800-\\udfff",t="["+e+"]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^"+e+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+r+"|"+i+")"+"?",c="[\\ufe0e\\ufe0f]?",h=c+u+("(?:\\u200d(?:"+[o,a,s].join("|")+")"+c+u+")*"),l="(?:"+[o+r+"?",r,a,s,t].join("|")+")",f=RegExp(i+"(?="+i+")|"+l+h,"g");function d(e){for(var t=f.lastIndex=0;f.test(e);)++t;return t}return n(d,"unicodeSize"),ru=d}function vp(){if(ou)return iu;ou=1;var e=_p(),t=gp(),r=mp();function i(n){return t(n)?r(n):e(n)}return n(i,"stringSize"),iu=i}function yp(){if(su)return au;su=1;var e=bi(),t=Uf(),r=wi(),i=pp(),o=vp();function a(n){if(null==n)return 0;if(r(n))return i(n)?o(n):n.length;var a=t(n);return"[object Map]"==a||"[object Set]"==a?n.size:e(n).length}return n(a,"size"),au=a}function bp(){if(cu)return uu;cu=1;var e=fn(),t=rd(),r=dd(),i=np(),o=Rf(),a=wn(),s=Nn(),u=Tr(),c=Lr(),h=_i();function l(n,l,f){var d=a(n),p=d||s(n)||h(n);if(l=i(l,4),null==f){var _=n&&n.constructor;f=p?d?new _:[]:c(n)&&u(_)?t(o(n)):{}}return(p?e:r)(n,function(e,t,r){return l(f,e,t,r)}),f}return n(l,"transform"),uu=l}function wp(){if(lu)return hu;lu=1;var e=Nr(),t=bn(),r=wn(),i=e?e.isConcatSpreadable:void 0;function o(e){return r(e)||t(e)||!!(i&&e&&e[i])}return n(o,"isFlattenable"),hu=o}function xp(){if(du)return fu;du=1;var e=Pf(),t=wp();function r(n,i,o,a,s){var u=-1,c=n.length;for(o||(o=t),s||(s=[]);++u<c;){var h=n[u];i>0&&o(h)?i>1?r(h,i-1,o,a,s):e(s,h):a||(s[s.length]=h)}return s}return n(r,"baseFlatten"),fu=r}function Ep(){if(_u)return pu;function e(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}return _u=1,n(e,"apply"),pu=e}function kp(){if(mu)return gu;mu=1;var e=Ep(),t=Math.max;function r(r,n,i){return n=t(void 0===n?r.length-1:n,0),function(){for(var o=arguments,a=-1,s=t(o.length-n,0),u=Array(s);++a<s;)u[a]=o[n+a];a=-1;for(var c=Array(n+1);++a<n;)c[a]=o[a];return c[n]=i(u),e(r,this,c)}}return n(r,"overRest"),gu=r}function Dp(){if(yu)return vu;yu=1;var e=hd(),t=dn(),r=gd();return vu=t?function(r,n){return t(r,"toString",{configurable:!0,enumerable:!1,value:e(n),writable:!0})}:r}function Cp(){if(wu)return bu;wu=1;var e=Date.now;function t(t){var r=0,n=0;return function(){var i=e(),o=16-(i-n);if(n=i,o>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}return n(t,"shortOut"),bu=t}function jp(){if(Eu)return xu;Eu=1;var e=Dp(),t=Cp()(e);return xu=t}function Bp(){if(Du)return ku;Du=1;var e=gd(),t=kp(),r=jp();function i(n,i){return r(t(n,i,e),n+"")}return n(i,"baseRest"),ku=i}function Mp(){if(ju)return Cu;function e(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}return ju=1,n(e,"baseFindIndex"),Cu=e}function Ip(){if(Mu)return Bu;function e(e){return e!=e}return Mu=1,n(e,"baseIsNaN"),Bu=e}function Op(){if(Ou)return Iu;function e(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}return Ou=1,n(e,"strictIndexOf"),Iu=e}function Fp(){if(qu)return Fu;qu=1;var e=Mp(),t=Ip(),r=Op();function i(n,i,o){return i==i?r(n,i,o):e(n,t,o)}return n(i,"baseIndexOf"),Fu=i}function qp(){if(Nu)return Su;Nu=1;var e=Fp();function t(t,r){return!!(null==t?0:t.length)&&e(t,r,0)>-1}return n(t,"arrayIncludes"),Su=t}function Sp(){if(Ru)return Pu;function e(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}return Ru=1,n(e,"arrayIncludesWith"),Pu=e}function Np(){if(Lu)return Gu;function e(){}return Lu=1,n(e,"noop"),Gu=e}function Pp(){if(Hu)return Tu;Hu=1;var e=Wf(),t=Np(),r=Bd(),n=e&&1/r(new e([,-0]))[1]==1/0?function(t){return new e(t)}:t;return Tu=n}function Rp(){if(Ku)return Vu;Ku=1;var e=Ed(),t=qp(),r=Sp(),i=Dd(),o=Pp(),a=Bd();function s(n,s,u){var c=-1,h=t,l=n.length,f=!0,d=[],p=d;if(u)f=!1,h=r;else if(l>=200){var _=s?null:o(n);if(_)return a(_);f=!1,h=i,p=new e}else p=s?[]:d;e:for(;++c<l;){var g=n[c],m=s?s(g):g;if(g=u||0!==g?g:0,f&&m==m){for(var v=p.length;v--;)if(p[v]===m)continue e;s&&p.push(m),d.push(g)}else h(p,m,u)||(p!==d&&p.push(m),d.push(g))}return d}return n(s,"baseUniq"),Vu=s}function Gp(){if(Wu)return zu;Wu=1;var e=wi(),t=vn();function r(r){return t(r)&&e(r)}return n(r,"isArrayLikeObject"),zu=r}function Lp(){if(Uu)return Zu;Uu=1;var e=xp(),t=Bp(),r=Rp(),n=Gp(),i=t(function(t){return r(e(t,1,n,!0))});return Zu=i}function Tp(){if(Xu)return $u;Xu=1;var e=Kd();function t(t,r){return e(r,function(e){return t[e]})}return n(t,"baseValues"),$u=t}function Hp(){if(Qu)return Yu;Qu=1;var e=Tp(),t=xi();function r(r){return null==r?[]:e(r,t(r))}return n(r,"values"),Yu=r}function Vp(){if(Au)return Ju;var e;Au=1;try{e={clone:cd(),constant:hd(),each:yd(),filter:ip(),has:ap(),isArray:wn(),isEmpty:sp(),isFunction:Tr(),isUndefined:up(),keys:xi(),map:hp(),reduce:dp(),size:yp(),transform:bp(),union:Lp(),values:Hp()}}catch(t){}return e||(e=window._),Ju=e}function Kp(){if(tc)return ec;tc=1;var e=Vp();ec=r;var t="\0";function r(r){this._isDirected=!e.has(r,"directed")||r.directed,this._isMultigraph=!!e.has(r,"multigraph")&&r.multigraph,this._isCompound=!!e.has(r,"compound")&&r.compound,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[t]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function i(e,t){e[t]?e[t]++:e[t]=1}function o(e,t){--e[t]||delete e[t]}function a(t,r,n,i){var o=""+r,a=""+n;if(!t&&o>a){var s=o;o=a,a=s}return o+""+a+""+(e.isUndefined(i)?"\0":i)}function s(e,t,r,n){var i=""+t,o=""+r;if(!e&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return n&&(s.name=n),s}function u(e,t){return a(e,t.v,t.w,t.name)}return n(r,"Graph"),r.prototype._nodeCount=0,r.prototype._edgeCount=0,r.prototype.isDirected=function(){return this._isDirected},r.prototype.isMultigraph=function(){return this._isMultigraph},r.prototype.isCompound=function(){return this._isCompound},r.prototype.setGraph=function(e){return this._label=e,this},r.prototype.graph=function(){return this._label},r.prototype.setDefaultNodeLabel=function(t){return e.isFunction(t)||(t=e.constant(t)),this._defaultNodeLabelFn=t,this},r.prototype.nodeCount=function(){return this._nodeCount},r.prototype.nodes=function(){return e.keys(this._nodes)},r.prototype.sources=function(){var t=this;return e.filter(this.nodes(),function(r){return e.isEmpty(t._in[r])})},r.prototype.sinks=function(){var t=this;return e.filter(this.nodes(),function(r){return e.isEmpty(t._out[r])})},r.prototype.setNodes=function(t,r){var n=arguments,i=this;return e.each(t,function(e){n.length>1?i.setNode(e,r):i.setNode(e)}),this},r.prototype.setNode=function(r,n){return e.has(this._nodes,r)?(arguments.length>1&&(this._nodes[r]=n),this):(this._nodes[r]=arguments.length>1?n:this._defaultNodeLabelFn(r),this._isCompound&&(this._parent[r]=t,this._children[r]={},this._children[t][r]=!0),this._in[r]={},this._preds[r]={},this._out[r]={},this._sucs[r]={},++this._nodeCount,this)},r.prototype.node=function(e){return this._nodes[e]},r.prototype.hasNode=function(t){return e.has(this._nodes,t)},r.prototype.removeNode=function(t){var r=this;if(e.has(this._nodes,t)){var i=/* @__PURE__ */n(function(e){r.removeEdge(r._edgeObjs[e])},"removeEdge");delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],e.each(this.children(t),function(e){r.setParent(e)}),delete this._children[t]),e.each(e.keys(this._in[t]),i),delete this._in[t],delete this._preds[t],e.each(e.keys(this._out[t]),i),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},r.prototype.setParent=function(r,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(n))n=t;else{for(var i=n+="";!e.isUndefined(i);i=this.parent(i))if(i===r)throw new Error("Setting "+n+" as parent of "+r+" would create a cycle");this.setNode(n)}return this.setNode(r),this._removeFromParentsChildList(r),this._parent[r]=n,this._children[n][r]=!0,this},r.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},r.prototype.parent=function(e){if(this._isCompound){var r=this._parent[e];if(r!==t)return r}},r.prototype.children=function(r){if(e.isUndefined(r)&&(r=t),this._isCompound){var n=this._children[r];if(n)return e.keys(n)}else{if(r===t)return this.nodes();if(this.hasNode(r))return[]}},r.prototype.predecessors=function(t){var r=this._preds[t];if(r)return e.keys(r)},r.prototype.successors=function(t){var r=this._sucs[t];if(r)return e.keys(r)},r.prototype.neighbors=function(t){var r=this.predecessors(t);if(r)return e.union(r,this.successors(t))},r.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},r.prototype.filterNodes=function(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;e.each(this._nodes,function(e,n){t(n)&&r.setNode(n,e)}),e.each(this._edgeObjs,function(e){r.hasNode(e.v)&&r.hasNode(e.w)&&r.setEdge(e,i.edge(e))});var o={};function a(e){var t=i.parent(e);return void 0===t||r.hasNode(t)?(o[e]=t,t):t in o?o[t]:a(t)}return n(a,"findParent"),this._isCompound&&e.each(r.nodes(),function(e){r.setParent(e,a(e))}),r},r.prototype.setDefaultEdgeLabel=function(t){return e.isFunction(t)||(t=e.constant(t)),this._defaultEdgeLabelFn=t,this},r.prototype.edgeCount=function(){return this._edgeCount},r.prototype.edges=function(){return e.values(this._edgeObjs)},r.prototype.setPath=function(t,r){var n=this,i=arguments;return e.reduce(t,function(e,t){return i.length>1?n.setEdge(e,t,r):n.setEdge(e,t),t}),this},r.prototype.setEdge=function(){var t,r,n,o,u=!1,c=arguments[0];"object"==typeof c&&null!==c&&"v"in c?(t=c.v,r=c.w,n=c.name,2===arguments.length&&(o=arguments[1],u=!0)):(t=c,r=arguments[1],n=arguments[3],arguments.length>2&&(o=arguments[2],u=!0)),t=""+t,r=""+r,e.isUndefined(n)||(n=""+n);var h=a(this._isDirected,t,r,n);if(e.has(this._edgeLabels,h))return u&&(this._edgeLabels[h]=o),this;if(!e.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[h]=u?o:this._defaultEdgeLabelFn(t,r,n);var l=s(this._isDirected,t,r,n);return t=l.v,r=l.w,Object.freeze(l),this._edgeObjs[h]=l,i(this._preds[r],t),i(this._sucs[t],r),this._in[r][h]=l,this._out[t][h]=l,this._edgeCount++,this},r.prototype.edge=function(e,t,r){var n=1===arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,e,t,r);return this._edgeLabels[n]},r.prototype.hasEdge=function(t,r,n){var i=1===arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,t,r,n);return e.has(this._edgeLabels,i)},r.prototype.removeEdge=function(e,t,r){var n=1===arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,e,t,r),i=this._edgeObjs[n];return i&&(e=i.v,t=i.w,delete this._edgeLabels[n],delete this._edgeObjs[n],o(this._preds[t],e),o(this._sucs[e],t),delete this._in[t][n],delete this._out[e][n],this._edgeCount--),this},r.prototype.inEdges=function(t,r){var n=this._in[t];if(n){var i=e.values(n);return r?e.filter(i,function(e){return e.v===r}):i}},r.prototype.outEdges=function(t,r){var n=this._out[t];if(n){var i=e.values(n);return r?e.filter(i,function(e){return e.w===r}):i}},r.prototype.nodeEdges=function(e,t){var r=this.inEdges(e,t);if(r)return r.concat(this.outEdges(e,t))},n(i,"incrementOrInitEntry"),n(o,"decrementOrRemoveEntry"),n(a,"edgeArgsToId"),n(s,"edgeArgsToObj"),n(u,"edgeObjToId"),ec}function zp(){return nc?rc:(nc=1,rc="2.1.8")}function Wp(){return oc?ic:(oc=1,ic={Graph:Kp(),version:zp()})}function Zp(){if(sc)return ac;sc=1;var e=Vp(),t=Kp();function r(t){var r={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:i(t),edges:o(t)};return e.isUndefined(t.graph())||(r.value=e.clone(t.graph())),r}function i(t){return e.map(t.nodes(),function(r){var n=t.node(r),i=t.parent(r),o={v:r};return e.isUndefined(n)||(o.value=n),e.isUndefined(i)||(o.parent=i),o})}function o(t){return e.map(t.edges(),function(r){var n=t.edge(r),i={v:r.v,w:r.w};return e.isUndefined(r.name)||(i.name=r.name),e.isUndefined(n)||(i.value=n),i})}function a(r){var n=new t(r.options).setGraph(r.value);return e.each(r.nodes,function(e){n.setNode(e.v,e.value),e.parent&&n.setParent(e.v,e.parent)}),e.each(r.edges,function(e){n.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),n}return ac={write:r,read:a},n(r,"write"),n(i,"writeNodes"),n(o,"writeEdges"),n(a,"read"),ac}function Up(){if(cc)return uc;cc=1;var e=Vp();function t(t){var r,i={},o=[];function a(n){e.has(i,n)||(i[n]=!0,r.push(n),e.each(t.successors(n),a),e.each(t.predecessors(n),a))}return n(a,"dfs"),e.each(t.nodes(),function(e){r=[],a(e),r.length&&o.push(r)}),o}return uc=t,n(t,"components"),uc}function $p(){if(lc)return hc;lc=1;var e=Vp();function t(){this._arr=[],this._keyIndices={}}return hc=t,n(t,"PriorityQueue"),t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(e){return e.key})},t.prototype.has=function(t){return e.has(this._keyIndices,t)},t.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},t.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(t,r){var n=this._keyIndices;if(t=String(t),!e.has(n,t)){var i=this._arr,o=i.length;return n[t]=o,i.push({key:t,priority:r}),this._decrease(o),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},t.prototype.decrease=function(e,t){var r=this._keyIndices[e];if(t>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[r].priority+" New: "+t);this._arr[r].priority=t,this._decrease(r)},t.prototype._heapify=function(e){var t=this._arr,r=2*e,n=r+1,i=e;r<t.length&&(i=t[r].priority<t[i].priority?r:i,n<t.length&&(i=t[n].priority<t[i].priority?n:i),i!==e&&(this._swap(e,i),this._heapify(i)))},t.prototype._decrease=function(e){for(var t,r=this._arr,n=r[e].priority;0!==e&&!(r[t=e>>1].priority<n);)this._swap(e,t),e=t},t.prototype._swap=function(e,t){var r=this._arr,n=this._keyIndices,i=r[e],o=r[t];r[e]=o,r[t]=i,n[o.key]=e,n[i.key]=t},hc}function Xp(){if(dc)return fc;dc=1;var e=Vp(),t=$p();fc=i;var r=e.constant(1);function i(e,t,n,i){return o(e,String(t),n||r,i||function(t){return e.outEdges(t)})}function o(e,r,i,o){var a,s,u={},c=new t,h=/* @__PURE__ */n(function(e){var t=e.v!==a?e.v:e.w,r=u[t],n=i(e),o=s.distance+n;if(n<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+n);o<r.distance&&(r.distance=o,r.predecessor=a,c.decrease(t,o))},"updateNeighbors");for(e.nodes().forEach(function(e){var t=e===r?0:Number.POSITIVE_INFINITY;u[e]={distance:t},c.add(e,t)});c.size()>0&&(a=c.removeMin(),(s=u[a]).distance!==Number.POSITIVE_INFINITY);)o(a).forEach(h);return u}return n(i,"dijkstra"),n(o,"runDijkstra"),fc}function Yp(){if(_c)return pc;_c=1;var e=Xp(),t=Vp();function r(r,n,i){return t.transform(r.nodes(),function(t,o){t[o]=e(r,o,n,i)},{})}return pc=r,n(r,"dijkstraAll"),pc}function Qp(){if(mc)return gc;mc=1;var e=Vp();function t(t){var r=0,i=[],o={},a=[];function s(n){var u=o[n]={onStack:!0,lowlink:r,index:r++};if(i.push(n),t.successors(n).forEach(function(t){e.has(o,t)?o[t].onStack&&(u.lowlink=Math.min(u.lowlink,o[t].index)):(s(t),u.lowlink=Math.min(u.lowlink,o[t].lowlink))}),u.lowlink===u.index){var c,h=[];do{c=i.pop(),o[c].onStack=!1,h.push(c)}while(n!==c);a.push(h)}}return n(s,"dfs"),t.nodes().forEach(function(t){e.has(o,t)||s(t)}),a}return gc=t,n(t,"tarjan"),gc}function Jp(){if(yc)return vc;yc=1;var e=Vp(),t=Qp();function r(r){return e.filter(t(r),function(e){return e.length>1||1===e.length&&r.hasEdge(e[0],e[0])})}return vc=r,n(r,"findCycles"),vc}function Ap(){if(wc)return bc;wc=1;var e=Vp();bc=r;var t=e.constant(1);function r(e,r,n){return i(e,r||t,n||function(t){return e.outEdges(t)})}function i(e,t,r){var n={},i=e.nodes();return i.forEach(function(e){n[e]={},n[e][e]={distance:0},i.forEach(function(t){e!==t&&(n[e][t]={distance:Number.POSITIVE_INFINITY})}),r(e).forEach(function(r){var i=r.v===e?r.w:r.v,o=t(r);n[e][i]={distance:o,predecessor:e}})}),i.forEach(function(e){var t=n[e];i.forEach(function(r){var o=n[r];i.forEach(function(r){var n=o[e],i=t[r],a=o[r],s=n.distance+i.distance;s<a.distance&&(a.distance=s,a.predecessor=i.predecessor)})})}),n}return n(r,"floydWarshall"),n(i,"runFloydWarshall"),bc}function e_(){if(Ec)return xc;Ec=1;var e=Vp();function t(t){var i={},o={},a=[];function s(n){if(e.has(o,n))throw new r;e.has(i,n)||(o[n]=!0,i[n]=!0,e.each(t.predecessors(n),s),delete o[n],a.push(n))}if(n(s,"visit"),e.each(t.sinks(),s),e.size(i)!==t.nodeCount())throw new r;return a}function r(){}return xc=t,t.CycleException=r,n(t,"topsort"),n(r,"CycleException"),r.prototype=new Error,xc}function t_(){if(Dc)return kc;Dc=1;var e=e_();function t(t){try{e(t)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return kc=t,n(t,"isAcyclic"),kc}function r_(){if(jc)return Cc;jc=1;var e=Vp();function t(t,n,i){e.isArray(n)||(n=[n]);var o=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],s={};return e.each(n,function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);r(t,e,"post"===i,s,o,a)}),a}function r(t,n,i,o,a,s){e.has(o,n)||(o[n]=!0,i||s.push(n),e.each(a(n),function(e){r(t,e,i,o,a,s)}),i&&s.push(n))}return Cc=t,n(t,"dfs"),n(r,"doDfs"),Cc}function n_(){if(Mc)return Bc;Mc=1;var e=r_();function t(t,r){return e(t,r,"post")}return Bc=t,n(t,"postorder"),Bc}function i_(){if(Oc)return Ic;Oc=1;var e=r_();function t(t,r){return e(t,r,"pre")}return Ic=t,n(t,"preorder"),Ic}function o_(){if(qc)return Fc;qc=1;var e=Vp(),t=Kp(),r=$p();function i(i,o){var a,s=new t,u={},c=new r;function h(e){var t=e.v===a?e.w:e.v,r=c.priority(t);if(void 0!==r){var n=o(e);n<r&&(u[t]=a,c.decrease(t,n))}}if(n(h,"updateNeighbors"),0===i.nodeCount())return s;e.each(i.nodes(),function(e){c.add(e,Number.POSITIVE_INFINITY),s.setNode(e)}),c.decrease(i.nodes()[0],0);for(var l=!1;c.size()>0;){if(a=c.removeMin(),e.has(u,a))s.setEdge(a,u[a]);else{if(l)throw new Error("Input graph is not connected: "+i);l=!0}i.nodeEdges(a).forEach(h)}return s}return Fc=i,n(i,"prim"),Fc}function a_(){return Nc?Sc:(Nc=1,Sc={components:Up(),dijkstra:Xp(),dijkstraAll:Yp(),findCycles:Jp(),floydWarshall:Ap(),isAcyclic:t_(),postorder:n_(),preorder:i_(),prim:o_(),tarjan:Qp(),topsort:e_()})}function s_(){if(Rc)return Pc;Rc=1;var e=Wp();return Pc={Graph:e.Graph,json:Zp(),alg:a_(),version:e.version}}function u_(){if(Lc)return Gc;var e;Lc=1;try{e=s_()}catch(t){}return e||(e=window.graphlib),Gc=e}function c_(){if(Hc)return Tc;Hc=1;var e=ud();function t(t){return e(t,5)}return n(t,"cloneDeep"),Tc=t}function h_(){if(Kc)return Vc;Kc=1;var e=xr(),t=wi(),r=Pn(),i=Lr();function o(n,o,a){if(!i(a))return!1;var s=typeof o;return!!("number"==s?t(a)&&r(o,a.length):"string"==s&&o in a)&&e(a[o],n)}return n(o,"isIterateeCall"),Vc=o}function l_(){if(Wc)return zc;Wc=1;var e=Bp(),t=xr(),r=h_(),n=Ci(),i=Object.prototype,o=i.hasOwnProperty,a=e(function(e,a){e=Object(e);var s=-1,u=a.length,c=u>2?a[2]:void 0;for(c&&r(a[0],a[1],c)&&(u=1);++s<u;)for(var h=a[s],l=n(h),f=-1,d=l.length;++f<d;){var p=l[f],_=e[p];(void 0===_||t(_,i[p])&&!o.call(e,p))&&(e[p]=h[p])}return e});return zc=a}function f_(){if(Uc)return Zc;Uc=1;var e=np(),t=wi(),r=xi();function i(i){return function(o,a,s){var u=Object(o);if(!t(o)){var c=e(a,3);o=r(o),a=/* @__PURE__ */n(function(e){return c(u[e],e,u)},"predicate")}var h=i(o,a,s);return h>-1?u[c?o[h]:h]:void 0}}return n(i,"createFind"),Zc=i}function d_(){if(Xc)return $c;Xc=1;var e=/\s/;function t(t){for(var r=t.length;r--&&e.test(t.charAt(r)););return r}return n(t,"trimmedEndIndex"),$c=t}function p_(){if(Qc)return Yc;Qc=1;var e=d_(),t=/^\s+/;function r(r){return r?r.slice(0,e(r)+1).replace(t,""):r}return n(r,"baseTrim"),Yc=r}function __(){if(Ac)return Jc;Ac=1;var e=p_(),t=Lr(),r=Gd(),i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt;function u(n){if("number"==typeof n)return n;if(r(n))return NaN;if(t(n)){var u="function"==typeof n.valueOf?n.valueOf():n;n=t(u)?u+"":u}if("string"!=typeof n)return 0===n?n:+n;n=e(n);var c=o.test(n);return c||a.test(n)?s(n.slice(2),c?2:8):i.test(n)?NaN:+n}return n(u,"toNumber"),Jc=u}function g_(){if(th)return eh;th=1;var e=__(),t=1/0;function r(r){return r?(r=e(r))===t||r===-1/0?17976931348623157e292*(r<0?-1:1):r==r?r:0:0===r?r:0}return n(r,"toFinite"),eh=r}function m_(){if(nh)return rh;nh=1;var e=g_();function t(t){var r=e(t),n=r%1;return r==r?n?r-n:r:0}return n(t,"toInteger"),rh=t}function v_(){if(oh)return ih;oh=1;var e=Mp(),t=np(),r=m_(),i=Math.max;function o(n,o,a){var s=null==n?0:n.length;if(!s)return-1;var u=null==a?0:r(a);return u<0&&(u=i(s+u,0)),e(n,t(o,3),u)}return n(o,"findIndex"),ih=o}function y_(){if(sh)return ah;sh=1;var e=f_()(v_());return ah=e}function b_(){if(ch)return uh;ch=1;var e=xp();function t(t){return(null==t?0:t.length)?e(t,1):[]}return n(t,"flatten"),uh=t}function w_(){if(lh)return hh;lh=1;var e=fd(),t=md(),r=Ci();function i(n,i){return null==n?n:e(n,t(i),r)}return n(i,"forIn"),hh=i}function x_(){if(dh)return fh;function e(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}return dh=1,n(e,"last"),fh=e}function E_(){if(_h)return ph;_h=1;var e=pn(),t=dd(),r=np();function i(n,i){var o={};return i=r(i,3),t(n,function(t,r,n){e(o,r,i(t,r,n))}),o}return n(i,"mapValues"),ph=i}function k_(){if(mh)return gh;mh=1;var e=Gd();function t(t,r,n){for(var i=-1,o=t.length;++i<o;){var a=t[i],s=r(a);if(null!=s&&(void 0===u?s==s&&!e(s):n(s,u)))var u=s,c=a}return c}return n(t,"baseExtremum"),gh=t}function D_(){if(yh)return vh;function e(e,t){return e>t}return yh=1,n(e,"baseGt"),vh=e}function C_(){if(wh)return bh;wh=1;var e=k_(),t=D_(),r=gd();function i(n){return n&&n.length?e(n,r,t):void 0}return n(i,"max"),bh=i}function j_(){if(Eh)return xh;Eh=1;var e=pn(),t=xr();function r(r,n,i){(void 0!==i&&!t(r[n],i)||void 0===i&&!(n in r))&&e(r,n,i)}return n(r,"assignMergeValue"),xh=r}function B_(){if(Dh)return kh;Dh=1;var e=Gr(),t=Rf(),r=vn(),i=Function.prototype,o=Object.prototype,a=i.toString,s=o.hasOwnProperty,u=a.call(Object);function c(n){if(!r(n)||"[object Object]"!=e(n))return!1;var i=t(n);if(null===i)return!0;var o=s.call(i,"constructor")&&i.constructor;return"function"==typeof o&&o instanceof o&&a.call(o)==u}return n(c,"isPlainObject"),kh=c}function M_(){if(jh)return Ch;function e(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}return jh=1,n(e,"safeGet"),Ch=e}function I_(){if(Mh)return Bh;Mh=1;var e=gn(),t=Ci();function r(r){return e(r,t(r))}return n(r,"toPlainObject"),Bh=r}function O_(){if(Oh)return Ih;Oh=1;var e=j_(),t=If(),r=ed(),i=Of(),o=nd(),a=bn(),s=wn(),u=Gp(),c=Nn(),h=Tr(),l=Lr(),f=B_(),d=_i(),p=M_(),_=I_();function g(n,g,m,v,y,b,w){var x=p(n,m),E=p(g,m),k=w.get(E);if(k)e(n,m,k);else{var D=b?b(x,E,m+"",n,g,w):void 0,C=void 0===D;if(C){var j=s(E),B=!j&&c(E),M=!j&&!B&&d(E);D=E,j||B||M?s(x)?D=x:u(x)?D=i(x):B?(C=!1,D=t(E,!0)):M?(C=!1,D=r(E,!0)):D=[]:f(E)||a(E)?(D=x,a(x)?D=_(x):l(x)&&!h(x)||(D=o(E))):C=!1}C&&(w.set(E,D),y(D,E,v,b,w),w.delete(E)),e(n,m,D)}}return n(g,"baseMergeDeep"),Ih=g}function F_(){if(qh)return Fh;qh=1;var e=ln(),t=j_(),r=fd(),i=O_(),o=Lr(),a=Ci(),s=M_();function u(n,c,h,l,f){n!==c&&r(c,function(r,a){if(f||(f=new e),o(r))i(n,c,a,h,u,l,f);else{var d=l?l(s(n,a),r,a+"",n,c,f):void 0;void 0===d&&(d=r),t(n,a,d)}},a)}return n(u,"baseMerge"),Fh=u}function q_(){if(Nh)return Sh;Nh=1;var e=Bp(),t=h_();function r(r){return e(function(e,n){var i=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=r.length>3&&"function"==typeof a?(o--,a):void 0,s&&t(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++i<o;){var u=n[i];u&&r(e,u,i,a)}return e})}return n(r,"createAssigner"),Sh=r}function S_(){if(Rh)return Ph;Rh=1;var e=F_(),t=q_()(function(t,r,n){e(t,r,n)});return Ph=t}function N_(){if(Lh)return Gh;function e(e,t){return e<t}return Lh=1,n(e,"baseLt"),Gh=e}function P_(){if(Hh)return Th;Hh=1;var e=k_(),t=N_(),r=gd();function i(n){return n&&n.length?e(n,r,t):void 0}return n(i,"min"),Th=i}function R_(){if(Kh)return Vh;Kh=1;var e=k_(),t=np(),r=N_();function i(n,i){return n&&n.length?e(n,t(i,2),r):void 0}return n(i,"minBy"),Vh=i}function G_(){if(Wh)return zh;Wh=1;var e=Sr();return zh=/* @__PURE__ */n(function(){return e.Date.now()},"now")}function L_(){if(Uh)return Zh;Uh=1;var e=_n(),t=Zd(),r=Pn(),i=Lr(),o=Ud();function a(n,a,s,u){if(!i(n))return n;for(var c=-1,h=(a=t(a,n)).length,l=h-1,f=n;null!=f&&++c<h;){var d=o(a[c]),p=s;if("__proto__"===d||"constructor"===d||"prototype"===d)return n;if(c!=l){var _=f[d];void 0===(p=u?u(_,d,f):void 0)&&(p=i(_)?_:r(a[c+1])?[]:{})}e(f,d,p),f=f[d]}return n}return n(a,"baseSet"),Zh=a}function T_(){if(Xh)return $h;Xh=1;var e=$d(),t=L_(),r=Zd();function i(n,i,o){for(var a=-1,s=i.length,u={};++a<s;){var c=i[a],h=e(n,c);o(h,c)&&t(u,r(c,n),h)}return u}return n(i,"basePickBy"),$h=i}function H_(){if(Qh)return Yh;Qh=1;var e=T_(),t=Jd();function r(r,n){return e(r,n,function(e,n){return t(r,n)})}return n(r,"basePick"),Yh=r}function V_(){if(Ah)return Jh;Ah=1;var e=b_(),t=kp(),r=jp();function i(n){return r(t(n,void 0,e),n+"")}return n(i,"flatRest"),Jh=i}function K_(){if(tl)return el;tl=1;var e=H_(),t=V_()(function(t,r){return null==t?{}:e(t,r)});return el=t}function z_(){if(nl)return rl;nl=1;var e=Math.ceil,t=Math.max;function r(r,n,i,o){for(var a=-1,s=t(e((n-r)/(i||1)),0),u=Array(s);s--;)u[o?s:++a]=r,r+=i;return u}return n(r,"baseRange"),rl=r}function W_(){if(ol)return il;ol=1;var e=z_(),t=h_(),r=g_();function i(n){return function(i,o,a){return a&&"number"!=typeof a&&t(i,o,a)&&(o=a=void 0),i=r(i),void 0===o?(o=i,i=0):o=r(o),a=void 0===a?i<o?1:-1:r(a),e(i,o,a,n)}}return n(i,"createRange"),il=i}function Z_(){if(sl)return al;sl=1;var e=W_()();return al=e}function U_(){if(cl)return ul;function e(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}return cl=1,n(e,"baseSortBy"),ul=e}function $_(){if(ll)return hl;ll=1;var e=Gd();function t(t,r){if(t!==r){var n=void 0!==t,i=null===t,o=t==t,a=e(t),s=void 0!==r,u=null===r,c=r==r,h=e(r);if(!u&&!h&&!a&&t>r||a&&s&&c&&!u&&!h||i&&s&&c||!n&&c||!o)return 1;if(!i&&!a&&!h&&t<r||h&&n&&o&&!i&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}return n(t,"compareAscending"),hl=t}function X_(){if(dl)return fl;dl=1;var e=$_();function t(t,r,n){for(var i=-1,o=t.criteria,a=r.criteria,s=o.length,u=n.length;++i<s;){var c=e(o[i],a[i]);if(c)return i>=u?c:c*("desc"==n[i]?-1:1)}return t.index-r.index}return n(t,"compareMultiple"),fl=t}function Y_(){if(_l)return pl;_l=1;var e=Kd(),t=$d(),r=np(),i=cp(),o=U_(),a=Ln(),s=X_(),u=gd(),c=wn();function h(n,h,l){h=h.length?e(h,function(e){return c(e)?function(r){return t(r,1===e.length?e[0]:e)}:e}):[u];var f=-1;h=e(h,a(r));var d=i(n,function(t,r,n){return{criteria:e(h,function(e){return e(t)}),index:++f,value:t}});return o(d,function(e,t){return s(e,t,l)})}return n(h,"baseOrderBy"),pl=h}function Q_(){if(ml)return gl;ml=1;var e=xp(),t=Y_(),r=Bp(),n=h_(),i=r(function(r,i){if(null==r)return[];var o=i.length;return o>1&&n(r,i[0],i[1])?i=[]:o>2&&n(i[0],i[1],i[2])&&(i=[i[0]]),t(r,e(i,1),[])});return gl=i}function J_(){if(yl)return vl;yl=1;var e=Wd(),t=0;function r(r){var n=++t;return e(r)+n}return n(r,"uniqueId"),vl=r}function A_(){if(wl)return bl;function e(e,t,r){for(var n=-1,i=e.length,o=t.length,a={};++n<i;){var s=n<o?t[n]:void 0;r(a,e[n],s)}return a}return wl=1,n(e,"baseZipObject"),bl=e}function eg(){if(El)return xl;El=1;var e=_n(),t=A_();function r(r,n){return t(r||[],n||[],e)}return n(r,"zipObject"),xl=r}function tg(){if(Dl)return kl;var e;Dl=1;try{e={cloneDeep:c_(),constant:hd(),defaults:l_(),each:yd(),filter:ip(),find:y_(),flatten:b_(),forEach:vd(),forIn:w_(),has:ap(),isUndefined:up(),last:x_(),map:hp(),mapValues:E_(),max:C_(),merge:S_(),min:P_(),minBy:R_(),now:G_(),pick:K_(),range:Z_(),reduce:dp(),sortBy:Q_(),uniqueId:J_(),values:Hp(),zipObject:eg()}}catch(t){}return e||(e=window._),kl=e}function rg(){if(jl)return Cl;function e(){var e={};e._next=e._prev=e,this._sentinel=e}function t(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function r(e,t){if("_next"!==e&&"_prev"!==e)return t}return jl=1,Cl=e,n(e,"List"),e.prototype.dequeue=function(){var e=this._sentinel,r=e._prev;if(r!==e)return t(r),r},e.prototype.enqueue=function(e){var r=this._sentinel;e._prev&&e._next&&t(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r},e.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,r)),n=n._prev;return"["+e.join(", ")+"]"},n(t,"unlink"),n(r,"filterOutLinks"),Cl}function ng(){if(Ml)return Bl;Ml=1;var e=tg(),t=u_().Graph,r=rg();Bl=o;var i=e.constant(1);function o(t,r){if(t.nodeCount()<=1)return[];var n=u(t,r||i),o=a(n.graph,n.buckets,n.zeroIdx);return e.flatten(e.map(o,function(e){return t.outEdges(e.v,e.w)}),!0)}function a(e,t,r){for(var n,i=[],o=t[t.length-1],a=t[0];e.nodeCount();){for(;n=a.dequeue();)s(e,t,r,n);for(;n=o.dequeue();)s(e,t,r,n);if(e.nodeCount())for(var u=t.length-2;u>0;--u)if(n=t[u].dequeue()){i=i.concat(s(e,t,r,n,!0));break}}return i}function s(t,r,n,i,o){var a=o?[]:void 0;return e.forEach(t.inEdges(i.v),function(e){var i=t.edge(e),s=t.node(e.v);o&&a.push({v:e.v,w:e.w}),s.out-=i,c(r,n,s)}),e.forEach(t.outEdges(i.v),function(e){var i=t.edge(e),o=e.w,a=t.node(o);a.in-=i,c(r,n,a)}),t.removeNode(i.v),a}function u(n,i){var o=new t,a=0,s=0;e.forEach(n.nodes(),function(e){o.setNode(e,{v:e,in:0,out:0})}),e.forEach(n.edges(),function(e){var t=o.edge(e.v,e.w)||0,r=i(e),n=t+r;o.setEdge(e.v,e.w,n),s=Math.max(s,o.node(e.v).out+=r),a=Math.max(a,o.node(e.w).in+=r)});var u=e.range(s+a+3).map(function(){return new r}),h=a+1;return e.forEach(o.nodes(),function(e){c(u,h,o.node(e))}),{graph:o,buckets:u,zeroIdx:h}}function c(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}return n(o,"greedyFAS"),n(a,"doGreedyFAS"),n(s,"removeNode"),n(u,"buildState"),n(c,"assignBucket"),Bl}function ig(){if(Ol)return Il;Ol=1;var e=tg(),t=ng();function r(r){var o="greedy"===r.graph().acyclicer?t(r,a(r)):i(r);function a(e){return function(t){return e.edge(t).weight}}e.forEach(o,function(t){var n=r.edge(t);r.removeEdge(t),n.forwardName=t.name,n.reversed=!0,r.setEdge(t.w,t.v,n,e.uniqueId("rev"))}),n(a,"weightFn")}function i(t){var r=[],i={},o={};function a(n){e.has(o,n)||(o[n]=!0,i[n]=!0,e.forEach(t.outEdges(n),function(t){e.has(i,t.w)?r.push(t):a(t.w)}),delete i[n])}return n(a,"dfs"),e.forEach(t.nodes(),a),r}function o(t){e.forEach(t.edges(),function(e){var r=t.edge(e);if(r.reversed){t.removeEdge(e);var n=r.forwardName;delete r.reversed,delete r.forwardName,t.setEdge(e.w,e.v,r,n)}})}return Il={run:r,undo:o},n(r,"run"),n(i,"dfsFAS"),n(o,"undo"),Il}function og(){if(ql)return Fl;ql=1;var e=tg(),t=u_().Graph;function r(t,r,n,i){var o;do{o=e.uniqueId(i)}while(t.hasNode(o));return n.dummy=r,t.setNode(o,n),o}function i(r){var n=(new t).setGraph(r.graph());return e.forEach(r.nodes(),function(e){n.setNode(e,r.node(e))}),e.forEach(r.edges(),function(e){var t=n.edge(e.v,e.w)||{weight:0,minlen:1},i=r.edge(e);n.setEdge(e.v,e.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),n}function o(r){var n=new t({multigraph:r.isMultigraph()}).setGraph(r.graph());return e.forEach(r.nodes(),function(e){r.children(e).length||n.setNode(e,r.node(e))}),e.forEach(r.edges(),function(e){n.setEdge(e,r.edge(e))}),n}function a(t){var r=e.map(t.nodes(),function(r){var n={};return e.forEach(t.outEdges(r),function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight}),n});return e.zipObject(t.nodes(),r)}function s(t){var r=e.map(t.nodes(),function(r){var n={};return e.forEach(t.inEdges(r),function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight}),n});return e.zipObject(t.nodes(),r)}function u(e,t){var r,n,i=e.x,o=e.y,a=t.x-i,s=t.y-o,u=e.width/2,c=e.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*u>Math.abs(a)*c?(s<0&&(c=-c),r=c*a/s,n=c):(a<0&&(u=-u),r=u,n=u*s/a),{x:i+r,y:o+n}}function c(t){var r=e.map(e.range(d(t)+1),function(){return[]});return e.forEach(t.nodes(),function(n){var i=t.node(n),o=i.rank;e.isUndefined(o)||(r[o][i.order]=n)}),r}function h(t){var r=e.min(e.map(t.nodes(),function(e){return t.node(e).rank}));e.forEach(t.nodes(),function(n){var i=t.node(n);e.has(i,"rank")&&(i.rank-=r)})}function l(t){var r=e.min(e.map(t.nodes(),function(e){return t.node(e).rank})),n=[];e.forEach(t.nodes(),function(e){var i=t.node(e).rank-r;n[i]||(n[i]=[]),n[i].push(e)});var i=0,o=t.graph().nodeRankFactor;e.forEach(n,function(r,n){e.isUndefined(r)&&n%o!==0?--i:i&&e.forEach(r,function(e){t.node(e).rank+=i})})}function f(e,t,n,i){var o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=i),r(e,"border",o,t)}function d(t){return e.max(e.map(t.nodes(),function(r){var n=t.node(r).rank;if(!e.isUndefined(n))return n}))}function p(t,r){var n={lhs:[],rhs:[]};return e.forEach(t,function(e){r(e)?n.lhs.push(e):n.rhs.push(e)}),n}function _(t,r){var n=e.now();try{return r()}finally{console.log(t+" time: "+(e.now()-n)+"ms")}}function g(e,t){return t()}return Fl={addDummyNode:r,simplify:i,asNonCompoundGraph:o,successorWeights:a,predecessorWeights:s,intersectRect:u,buildLayerMatrix:c,normalizeRanks:h,removeEmptyRanks:l,addBorderNode:f,maxRank:d,partition:p,time:_,notime:g},n(r,"addDummyNode"),n(i,"simplify"),n(o,"asNonCompoundGraph"),n(a,"successorWeights"),n(s,"predecessorWeights"),n(u,"intersectRect"),n(c,"buildLayerMatrix"),n(h,"normalizeRanks"),n(l,"removeEmptyRanks"),n(f,"addBorderNode"),n(d,"maxRank"),n(p,"partition"),n(_,"time"),n(g,"notime"),Fl}function ag(){if(Nl)return Sl;Nl=1;var e=tg(),t=og();function r(t){t.graph().dummyChains=[],e.forEach(t.edges(),function(e){i(t,e)})}function i(e,r){var n=r.v,i=e.node(n).rank,o=r.w,a=e.node(o).rank,s=r.name,u=e.edge(r),c=u.labelRank;if(a!==i+1){var h,l,f;for(e.removeEdge(r),f=0,++i;i<a;++f,++i)u.points=[],l={width:0,height:0,edgeLabel:u,edgeObj:r,rank:i},h=t.addDummyNode(e,"edge",l,"_d"),i===c&&(l.width=u.width,l.height=u.height,l.dummy="edge-label",l.labelpos=u.labelpos),e.setEdge(n,h,{weight:u.weight},s),0===f&&e.graph().dummyChains.push(h),n=h;e.setEdge(n,o,{weight:u.weight},s)}}function o(t){e.forEach(t.graph().dummyChains,function(e){var r,n=t.node(e),i=n.edgeLabel;for(t.setEdge(n.edgeObj,i);n.dummy;)r=t.successors(e)[0],t.removeNode(e),i.points.push({x:n.x,y:n.y}),"edge-label"===n.dummy&&(i.x=n.x,i.y=n.y,i.width=n.width,i.height=n.height),e=r,n=t.node(e)})}return Sl={run:r,undo:o},n(r,"run"),n(i,"normalizeEdge"),n(o,"undo"),Sl}function sg(){if(Rl)return Pl;Rl=1;var e=tg();function t(t){var r={};function i(n){var o=t.node(n);if(e.has(r,n))return o.rank;r[n]=!0;var a=e.min(e.map(t.outEdges(n),function(e){return i(e.w)-t.edge(e).minlen}));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),o.rank=a}n(i,"dfs"),e.forEach(t.sources(),i)}function r(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}return Pl={longestPath:t,slack:r},n(t,"longestPath"),n(r,"slack"),Pl}function ug(){if(Ll)return Gl;Ll=1;var e=tg(),t=u_().Graph,r=sg().slack;function i(e){var n,i,u=new t({directed:!1}),c=e.nodes()[0],h=e.nodeCount();for(u.setNode(c,{});o(u,e)<h;)n=a(u,e),i=u.hasNode(n.v)?r(e,n):-r(e,n),s(u,e,i);return u}function o(t,i){function o(n){e.forEach(i.nodeEdges(n),function(e){var a=e.v,s=n===a?e.w:a;t.hasNode(s)||r(i,e)||(t.setNode(s,{}),t.setEdge(n,s,{}),o(s))})}return n(o,"dfs"),e.forEach(t.nodes(),o),t.nodeCount()}function a(t,n){return e.minBy(n.edges(),function(e){if(t.hasNode(e.v)!==t.hasNode(e.w))return r(n,e)})}function s(t,r,n){e.forEach(t.nodes(),function(e){r.node(e).rank+=n})}return Gl=i,n(i,"feasibleTree"),n(o,"tightTree"),n(a,"findMinSlackEdge"),n(s,"shiftRanks"),Gl}function cg(){if(Hl)return Tl;Hl=1;var e=tg(),t=ug(),r=sg().slack,i=sg().longestPath,o=u_().alg.preorder,a=u_().alg.postorder,s=og().simplify;function u(e){e=s(e),i(e);var r,n=t(e);for(f(n),c(n,e);r=p(n);)g(n,e,r,_(n,e,r))}function c(t,r){var n=a(t,t.nodes());n=n.slice(0,n.length-1),e.forEach(n,function(e){h(t,r,e)})}function h(e,t,r){var n=e.node(r).parent;e.edge(r,n).cutvalue=l(e,t,r)}function l(t,r,n){var i=t.node(n).parent,o=!0,a=r.edge(n,i),s=0;return a||(o=!1,a=r.edge(i,n)),s=a.weight,e.forEach(r.nodeEdges(n),function(e){var a=e.v===n,u=a?e.w:e.v;if(u!==i){var c=a===o,h=r.edge(e).weight;if(s+=c?h:-h,v(t,n,u)){var l=t.edge(n,u).cutvalue;s+=c?-l:l}}}),s}function f(e,t){arguments.length<2&&(t=e.nodes()[0]),d(e,{},1,t)}function d(t,r,n,i,o){var a=n,s=t.node(i);return r[i]=!0,e.forEach(t.neighbors(i),function(o){e.has(r,o)||(n=d(t,r,n,o,i))}),s.low=a,s.lim=n++,o?s.parent=o:delete s.parent,n}function p(t){return e.find(t.edges(),function(e){return t.edge(e).cutvalue<0})}function _(t,n,i){var o=i.v,a=i.w;n.hasEdge(o,a)||(o=i.w,a=i.v);var s=t.node(o),u=t.node(a),c=s,h=!1;s.lim>u.lim&&(c=u,h=!0);var l=e.filter(n.edges(),function(e){return h===y(t,t.node(e.v),c)&&h!==y(t,t.node(e.w),c)});return e.minBy(l,function(e){return r(n,e)})}function g(e,t,r,n){var i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(n.v,n.w,{}),f(e),c(e,t),m(e,t)}function m(t,r){var n=e.find(t.nodes(),function(e){return!r.node(e).parent}),i=o(t,n);i=i.slice(1),e.forEach(i,function(e){var n=t.node(e).parent,i=r.edge(e,n),o=!1;i||(i=r.edge(n,e),o=!0),r.node(e).rank=r.node(n).rank+(o?i.minlen:-i.minlen)})}function v(e,t,r){return e.hasEdge(t,r)}function y(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}return Tl=u,u.initLowLimValues=f,u.initCutValues=c,u.calcCutValue=l,u.leaveEdge=p,u.enterEdge=_,u.exchangeEdges=g,n(u,"networkSimplex"),n(c,"initCutValues"),n(h,"assignCutValue"),n(l,"calcCutValue"),n(f,"initLowLimValues"),n(d,"dfsAssignLowLim"),n(p,"leaveEdge"),n(_,"enterEdge"),n(g,"exchangeEdges"),n(m,"updateRanks"),n(v,"isTreeEdge"),n(y,"isDescendant"),Tl}function hg(){if(Kl)return Vl;Kl=1;var e=sg().longestPath,t=ug(),r=cg();function i(e){switch(e.graph().ranker){case"network-simplex":default:s(e);break;case"tight-tree":a(e);break;case"longest-path":o(e)}}Vl=i,n(i,"rank");var o=e;function a(r){e(r),t(r)}function s(e){r(e)}return n(a,"tightTreeRanker"),n(s,"networkSimplexRanker"),Vl}function lg(){if(Wl)return zl;Wl=1;var e=tg();function t(t){var n=i(t);e.forEach(t.graph().dummyChains,function(e){for(var i=t.node(e),o=i.edgeObj,a=r(t,n,o.v,o.w),s=a.path,u=a.lca,c=0,h=s[c],l=!0;e!==o.w;){if(i=t.node(e),l){for(;(h=s[c])!==u&&t.node(h).maxRank<i.rank;)c++;h===u&&(l=!1)}if(!l){for(;c<s.length-1&&t.node(h=s[c+1]).minRank<=i.rank;)c++;h=s[c]}t.setParent(e,h),e=t.successors(e)[0]}})}function r(e,t,r,n){var i,o,a=[],s=[],u=Math.min(t[r].low,t[n].low),c=Math.max(t[r].lim,t[n].lim);i=r;do{i=e.parent(i),a.push(i)}while(i&&(t[i].low>u||c>t[i].lim));for(o=i,i=n;(i=e.parent(i))!==o;)s.push(i);return{path:a.concat(s.reverse()),lca:o}}function i(t){var r={},i=0;function o(n){var a=i;e.forEach(t.children(n),o),r[n]={low:a,lim:i++}}return n(o,"dfs"),e.forEach(t.children(),o),r}return zl=t,n(t,"parentDummyChains"),n(r,"findPath"),n(i,"postorder"),zl}function fg(){if(Ul)return Zl;Ul=1;var e=tg(),t=og();function r(r){var n=t.addDummyNode(r,"root",{},"_root"),s=o(r),u=e.max(e.values(s))-1,c=2*u+1;r.graph().nestingRoot=n,e.forEach(r.edges(),function(e){r.edge(e).minlen*=c});var h=a(r)+1;e.forEach(r.children(),function(e){i(r,n,c,h,u,s,e)}),r.graph().nodeRankFactor=c}function i(r,n,o,a,s,u,c){var h=r.children(c);if(h.length){var l=t.addBorderNode(r,"_bt"),f=t.addBorderNode(r,"_bb"),d=r.node(c);r.setParent(l,c),d.borderTop=l,r.setParent(f,c),d.borderBottom=f,e.forEach(h,function(e){i(r,n,o,a,s,u,e);var t=r.node(e),h=t.borderTop?t.borderTop:e,d=t.borderBottom?t.borderBottom:e,p=t.borderTop?a:2*a,_=h!==d?1:s-u[c]+1;r.setEdge(l,h,{weight:p,minlen:_,nestingEdge:!0}),r.setEdge(d,f,{weight:p,minlen:_,nestingEdge:!0})}),r.parent(c)||r.setEdge(n,l,{weight:0,minlen:s+u[c]})}else c!==n&&r.setEdge(n,c,{weight:0,minlen:o})}function o(t){var r={};function i(n,o){var a=t.children(n);a&&a.length&&e.forEach(a,function(e){i(e,o+1)}),r[n]=o}return n(i,"dfs"),e.forEach(t.children(),function(e){i(e,1)}),r}function a(t){return e.reduce(t.edges(),function(e,r){return e+t.edge(r).weight},0)}function s(t){var r=t.graph();t.removeNode(r.nestingRoot),delete r.nestingRoot,e.forEach(t.edges(),function(e){t.edge(e).nestingEdge&&t.removeEdge(e)})}return Zl={run:r,cleanup:s},n(r,"run"),n(i,"dfs"),n(o,"treeDepths"),n(a,"sumWeights"),n(s,"cleanup"),Zl}function dg(){if(Xl)return $l;Xl=1;var e=tg(),t=og();function r(t){function r(n){var o=t.children(n),a=t.node(n);if(o.length&&e.forEach(o,r),e.has(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var s=a.minRank,u=a.maxRank+1;s<u;++s)i(t,"borderLeft","_bl",n,a,s),i(t,"borderRight","_br",n,a,s)}}n(r,"dfs"),e.forEach(t.children(),r)}function i(e,r,n,i,o,a){var s={width:0,height:0,rank:a,borderType:r},u=o[r][a-1],c=t.addDummyNode(e,"border",s,n);o[r][a]=c,e.setParent(c,i),u&&e.setEdge(u,c,{weight:1})}return $l=r,n(r,"addBorderSegments"),n(i,"addBorderNode"),$l}function pg(){if(Ql)return Yl;Ql=1;var e=tg();function t(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||i(e)}function r(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||a(e),"lr"!==t&&"rl"!==t||(u(e),i(e))}function i(t){e.forEach(t.nodes(),function(e){o(t.node(e))}),e.forEach(t.edges(),function(e){o(t.edge(e))})}function o(e){var t=e.width;e.width=e.height,e.height=t}function a(t){e.forEach(t.nodes(),function(e){s(t.node(e))}),e.forEach(t.edges(),function(r){var n=t.edge(r);e.forEach(n.points,s),e.has(n,"y")&&s(n)})}function s(e){e.y=-e.y}function u(t){e.forEach(t.nodes(),function(e){c(t.node(e))}),e.forEach(t.edges(),function(r){var n=t.edge(r);e.forEach(n.points,c),e.has(n,"x")&&c(n)})}function c(e){var t=e.x;e.x=e.y,e.y=t}return Yl={adjust:t,undo:r},n(t,"adjust"),n(r,"undo"),n(i,"swapWidthHeight"),n(o,"swapWidthHeightOne"),n(a,"reverseY"),n(s,"reverseYOne"),n(u,"swapXY"),n(c,"swapXYOne"),Yl}function _g(){if(Al)return Jl;Al=1;var e=tg();function t(t){var r={},i=e.filter(t.nodes(),function(e){return!t.children(e).length}),o=e.max(e.map(i,function(e){return t.node(e).rank})),a=e.map(e.range(o+1),function(){return[]});function s(n){if(!e.has(r,n)){r[n]=!0;var i=t.node(n);a[i.rank].push(n),e.forEach(t.successors(n),s)}}n(s,"dfs");var u=e.sortBy(i,function(e){return t.node(e).rank});return e.forEach(u,s),a}return Jl=t,n(t,"initOrder"),Jl}function gg(){if(tf)return ef;tf=1;var e=tg();function t(e,t){for(var n=0,i=1;i<t.length;++i)n+=r(e,t[i-1],t[i]);return n}function r(t,r,n){for(var i=e.zipObject(n,e.map(n,function(e,t){return t})),o=e.flatten(e.map(r,function(r){return e.sortBy(e.map(t.outEdges(r),function(e){return{pos:i[e.w],weight:t.edge(e).weight}}),"pos")}),!0),a=1;a<n.length;)a<<=1;var s=2*a-1;a-=1;var u=e.map(new Array(s),function(){return 0}),c=0;return e.forEach(o.forEach(function(e){var t=e.pos+a;u[t]+=e.weight;for(var r=0;t>0;)t%2&&(r+=u[t+1]),u[t=t-1>>1]+=e.weight;c+=e.weight*r})),c}return ef=t,n(t,"crossCount"),n(r,"twoLayerCrossCount"),ef}function mg(){if(nf)return rf;nf=1;var e=tg();function t(t,r){return e.map(r,function(r){var n=t.inEdges(r);if(n.length){var i=e.reduce(n,function(e,r){var n=t.edge(r),i=t.node(r.v);return{sum:e.sum+n.weight*i.order,weight:e.weight+n.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}return{v:r}})}return rf=t,n(t,"barycenter"),rf}function vg(){if(af)return of;af=1;var e=tg();function t(t,n){var i={};return e.forEach(t,function(t,r){var n=i[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:r};e.isUndefined(t.barycenter)||(n.barycenter=t.barycenter,n.weight=t.weight)}),e.forEach(n.edges(),function(t){var r=i[t.v],n=i[t.w];e.isUndefined(r)||e.isUndefined(n)||(n.indegree++,r.out.push(i[t.w]))}),r(e.filter(i,function(e){return!e.indegree}))}function r(t){var r=[];function o(t){return function(r){r.merged||(e.isUndefined(r.barycenter)||e.isUndefined(t.barycenter)||r.barycenter>=t.barycenter)&&i(t,r)}}function a(e){return function(r){r.in.push(e),0===--r.indegree&&t.push(r)}}for(n(o,"handleIn"),n(a,"handleOut");t.length;){var s=t.pop();r.push(s),e.forEach(s.in.reverse(),o(s)),e.forEach(s.out,a(s))}return e.map(e.filter(r,function(e){return!e.merged}),function(t){return e.pick(t,["vs","i","barycenter","weight"])})}function i(e,t){var r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}return of=t,n(t,"resolveConflicts"),n(r,"doResolveConflicts"),n(i,"mergeEntries"),of}function yg(){if(uf)return sf;uf=1;var e=tg(),t=og();function r(r,n){var a=t.partition(r,function(t){return e.has(t,"barycenter")}),s=a.lhs,u=e.sortBy(a.rhs,function(e){return-e.i}),c=[],h=0,l=0,f=0;s.sort(o(!!n)),f=i(c,u,f),e.forEach(s,function(e){f+=e.vs.length,c.push(e.vs),h+=e.barycenter*e.weight,l+=e.weight,f=i(c,u,f)});var d={vs:e.flatten(c,!0)};return l&&(d.barycenter=h/l,d.weight=l),d}function i(t,r,n){for(var i;r.length&&(i=e.last(r)).i<=n;)r.pop(),t.push(i.vs),n++;return n}function o(e){return function(t,r){return t.barycenter<r.barycenter?-1:t.barycenter>r.barycenter?1:e?r.i-t.i:t.i-r.i}}return sf=r,n(r,"sort"),n(i,"consumeUnsortable"),n(o,"compareWithBias"),sf}function bg(){if(hf)return cf;hf=1;var e=tg(),t=mg(),r=vg(),i=yg();function o(n,u,c,h){var l=n.children(u),f=n.node(u),d=f?f.borderLeft:void 0,p=f?f.borderRight:void 0,_={};d&&(l=e.filter(l,function(e){return e!==d&&e!==p}));var g=t(n,l);e.forEach(g,function(t){if(n.children(t.v).length){var r=o(n,t.v,c,h);_[t.v]=r,e.has(r,"barycenter")&&s(t,r)}});var m=r(g,c);a(m,_);var v=i(m,h);if(d&&(v.vs=e.flatten([d,v.vs,p],!0),n.predecessors(d).length)){var y=n.node(n.predecessors(d)[0]),b=n.node(n.predecessors(p)[0]);e.has(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+y.order+b.order)/(v.weight+2),v.weight+=2}return v}function a(t,r){e.forEach(t,function(t){t.vs=e.flatten(t.vs.map(function(e){return r[e]?r[e].vs:e}),!0)})}function s(t,r){e.isUndefined(t.barycenter)?(t.barycenter=r.barycenter,t.weight=r.weight):(t.barycenter=(t.barycenter*t.weight+r.barycenter*r.weight)/(t.weight+r.weight),t.weight+=r.weight)}return cf=o,n(o,"sortSubgraph"),n(a,"expandSubgraphs"),n(s,"mergeBarycenters"),cf}function wg(){if(ff)return lf;ff=1;var e=tg(),t=u_().Graph;function r(r,n,o){var a=i(r),s=new t({compound:!0}).setGraph({root:a}).setDefaultNodeLabel(function(e){return r.node(e)});return e.forEach(r.nodes(),function(t){var i=r.node(t),u=r.parent(t);(i.rank===n||i.minRank<=n&&n<=i.maxRank)&&(s.setNode(t),s.setParent(t,u||a),e.forEach(r[o](t),function(n){var i=n.v===t?n.w:n.v,o=s.edge(i,t),a=e.isUndefined(o)?0:o.weight;s.setEdge(i,t,{weight:r.edge(n).weight+a})}),e.has(i,"minRank")&&s.setNode(t,{borderLeft:i.borderLeft[n],borderRight:i.borderRight[n]}))}),s}function i(t){for(var r;t.hasNode(r=e.uniqueId("_root")););return r}return lf=r,n(r,"buildLayerGraph"),n(i,"createRootNode"),lf}function xg(){if(pf)return df;pf=1;var e=tg();function t(t,r,n){var i,o={};e.forEach(n,function(e){for(var n,a,s=t.parent(e);s;){if((n=t.parent(s))?(a=o[n],o[n]=s):(a=i,i=s),a&&a!==s)return void r.setEdge(a,s);s=n}})}return df=t,n(t,"addSubgraphConstraints"),df}function Eg(){if(gf)return _f;gf=1;var e=tg(),t=_g(),r=gg(),i=bg(),o=wg(),a=xg(),s=u_().Graph,u=og();function c(n){var i=u.maxRank(n),o=h(n,e.range(1,i+1),"inEdges"),a=h(n,e.range(i-1,-1,-1),"outEdges"),s=t(n);f(n,s);for(var c,d=Number.POSITIVE_INFINITY,p=0,_=0;_<4;++p,++_){l(p%2?o:a,p%4>=2),s=u.buildLayerMatrix(n);var g=r(n,s);g<d&&(_=0,c=e.cloneDeep(s),d=g)}f(n,c)}function h(t,r,n){return e.map(r,function(e){return o(t,e,n)})}function l(t,r){var n=new s;e.forEach(t,function(t){var o=t.graph().root,s=i(t,o,n,r);e.forEach(s.vs,function(e,r){t.node(e).order=r}),a(t,n,s.vs)})}function f(t,r){e.forEach(r,function(r){e.forEach(r,function(e,r){t.node(e).order=r})})}return _f=c,n(c,"order"),n(h,"buildLayerGraphs"),n(l,"sweepLayerGraphs"),n(f,"assignOrder"),_f}function kg(){if(vf)return mf;vf=1;var e=tg(),t=u_().Graph,r=og();function i(t,r){var i={};function o(r,n){var o=0,u=0,c=r.length,h=e.last(n);return e.forEach(n,function(r,l){var f=a(t,r),d=f?t.node(f).order:c;(f||r===h)&&(e.forEach(n.slice(u,l+1),function(r){e.forEach(t.predecessors(r),function(e){var n=t.node(e),a=n.order;!(a<o||d<a)||n.dummy&&t.node(r).dummy||s(i,e,r)})}),u=l+1,o=d)}),n}return n(o,"visitLayer"),e.reduce(r,o),i}function o(t,r){var i={};function o(r,n,o,a,u){var c;e.forEach(e.range(n,o),function(n){c=r[n],t.node(c).dummy&&e.forEach(t.predecessors(c),function(e){var r=t.node(e);r.dummy&&(r.order<a||r.order>u)&&s(i,e,c)})})}function a(r,n){var i,a=-1,s=0;return e.forEach(n,function(e,u){if("border"===t.node(e).dummy){var c=t.predecessors(e);c.length&&(i=t.node(c[0]).order,o(n,s,u,a,i),s=u,a=i)}o(n,s,n.length,i,r.length)}),n}return n(o,"scan"),n(a,"visitLayer"),e.reduce(r,a),i}function a(t,r){if(t.node(r).dummy)return e.find(t.predecessors(r),function(e){return t.node(e).dummy})}function s(e,t,r){if(t>r){var n=t;t=r,r=n}var i=e[t];i||(e[t]=i={}),i[r]=!0}function u(t,r,n){if(r>n){var i=r;r=n,n=i}return e.has(t[r],n)}function c(t,r,n,i){var o={},a={},s={};return e.forEach(r,function(t){e.forEach(t,function(e,t){o[e]=e,a[e]=e,s[e]=t})}),e.forEach(r,function(t){var r=-1;e.forEach(t,function(t){var c=i(t);if(c.length)for(var h=((c=e.sortBy(c,function(e){return s[e]})).length-1)/2,l=Math.floor(h),f=Math.ceil(h);l<=f;++l){var d=c[l];a[t]===t&&r<s[d]&&!u(n,t,d)&&(a[d]=t,a[t]=o[t]=o[d],r=s[d])}})}),{root:o,align:a}}function h(t,r,i,o,a){var s={},u=l(t,r,i,a),c=a?"borderLeft":"borderRight";function h(e,t){for(var r=u.nodes(),n=r.pop(),i={};n;)i[n]?e(n):(i[n]=!0,r.push(n),r=r.concat(t(n))),n=r.pop()}function f(e){s[e]=u.inEdges(e).reduce(function(e,t){return Math.max(e,s[t.v]+u.edge(t))},0)}function d(e){var r=u.outEdges(e).reduce(function(e,t){return Math.min(e,s[t.w]-u.edge(t))},Number.POSITIVE_INFINITY),n=t.node(e);r!==Number.POSITIVE_INFINITY&&n.borderType!==c&&(s[e]=Math.max(s[e],r))}return n(h,"iterate"),n(f,"pass1"),n(d,"pass2"),h(f,u.predecessors.bind(u)),h(d,u.successors.bind(u)),e.forEach(o,function(e){s[e]=s[i[e]]}),s}function l(r,n,i,o){var a=new t,s=r.graph(),u=g(s.nodesep,s.edgesep,o);return e.forEach(n,function(t){var n;e.forEach(t,function(e){var t=i[e];if(a.setNode(t),n){var o=i[n],s=a.edge(o,t);a.setEdge(o,t,Math.max(u(r,e,n),s||0))}n=e})}),a}function f(t,r){return e.minBy(e.values(r),function(r){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return e.forIn(r,function(e,r){var o=m(t,r)/2;n=Math.max(e+o,n),i=Math.min(e-o,i)}),n-i})}function d(t,r){var n=e.values(r),i=e.min(n),o=e.max(n);e.forEach(["u","d"],function(n){e.forEach(["l","r"],function(a){var s,u=n+a,c=t[u];if(c!==r){var h=e.values(c);(s="l"===a?i-e.min(h):o-e.max(h))&&(t[u]=e.mapValues(c,function(e){return e+s}))}})})}function p(t,r){return e.mapValues(t.ul,function(n,i){if(r)return t[r.toLowerCase()][i];var o=e.sortBy(e.map(t,i));return(o[1]+o[2])/2})}function _(t){var n,a=r.buildLayerMatrix(t),s=e.merge(i(t,a),o(t,a)),u={};e.forEach(["u","d"],function(r){n="u"===r?a:e.values(a).reverse(),e.forEach(["l","r"],function(i){"r"===i&&(n=e.map(n,function(t){return e.values(t).reverse()}));var o=("u"===r?t.predecessors:t.successors).bind(t),a=c(0,n,s,o),l=h(t,n,a.root,a.align,"r"===i);"r"===i&&(l=e.mapValues(l,function(e){return-e})),u[r+i]=l})});var l=f(t,u);return d(u,l),p(u,t.graph().align)}function g(t,r,n){return function(i,o,a){var s,u=i.node(o),c=i.node(a),h=0;if(h+=u.width/2,e.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=-u.width/2;break;case"r":s=u.width/2}if(s&&(h+=n?s:-s),s=0,h+=(u.dummy?r:t)/2,h+=(c.dummy?r:t)/2,h+=c.width/2,e.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":s=c.width/2;break;case"r":s=-c.width/2}return s&&(h+=n?s:-s),s=0,h}}function m(e,t){return e.node(t).width}return mf={positionX:_,findType1Conflicts:i,findType2Conflicts:o,addConflict:s,hasConflict:u,verticalAlignment:c,horizontalCompaction:h,alignCoordinates:d,findSmallestWidthAlignment:f,balance:p},n(i,"findType1Conflicts"),n(o,"findType2Conflicts"),n(a,"findOtherInnerSegmentNode"),n(s,"addConflict"),n(u,"hasConflict"),n(c,"verticalAlignment"),n(h,"horizontalCompaction"),n(l,"buildBlockGraph"),n(f,"findSmallestWidthAlignment"),n(d,"alignCoordinates"),n(p,"balance"),n(_,"positionX"),n(g,"sep"),n(m,"width"),mf}function Dg(){if(bf)return yf;bf=1;var e=tg(),t=og(),r=kg().positionX;function i(n){o(n=t.asNonCompoundGraph(n)),e.forEach(r(n),function(e,t){n.node(t).x=e})}function o(r){var n=t.buildLayerMatrix(r),i=r.graph().ranksep,o=0;e.forEach(n,function(t){var n=e.max(e.map(t,function(e){return r.node(e).height}));e.forEach(t,function(e){r.node(e).y=o+n/2}),o+=n+i})}return yf=i,n(i,"position"),n(o,"positionY"),yf}function Cg(){if(xf)return wf;xf=1;var e=tg(),t=ig(),r=ag(),i=hg(),o=og().normalizeRanks,a=lg(),s=og().removeEmptyRanks,u=fg(),c=dg(),h=pg(),l=Eg(),f=Dg(),d=og(),p=u_().Graph;function _(e,t){var r=t&&t.debugTiming?d.time:d.notime;r("layout",function(){var t=r(" buildLayoutGraph",function(){return C(e)});r(" runLayout",function(){g(t,r)}),r(" updateInputGraph",function(){m(e,t)})})}function g(e,n){n(" makeSpaceForEdgeLabels",function(){j(e)}),n(" removeSelfEdges",function(){P(e)}),n(" acyclic",function(){t.run(e)}),n(" nestingGraph.run",function(){u.run(e)}),n(" rank",function(){i(d.asNonCompoundGraph(e))}),n(" injectEdgeLabelProxies",function(){B(e)}),n(" removeEmptyRanks",function(){s(e)}),n(" nestingGraph.cleanup",function(){u.cleanup(e)}),n(" normalizeRanks",function(){o(e)}),n(" assignRankMinMax",function(){M(e)}),n(" removeEdgeLabelProxies",function(){I(e)}),n(" normalize.run",function(){r.run(e)}),n(" parentDummyChains",function(){a(e)}),n(" addBorderSegments",function(){c(e)}),n(" order",function(){l(e)}),n(" insertSelfEdges",function(){R(e)}),n(" adjustCoordinateSystem",function(){h.adjust(e)}),n(" position",function(){f(e)}),n(" positionSelfEdges",function(){G(e)}),n(" removeBorderNodes",function(){N(e)}),n(" normalize.undo",function(){r.undo(e)}),n(" fixupEdgeLabelCoords",function(){q(e)}),n(" undoCoordinateSystem",function(){h.undo(e)}),n(" translateGraph",function(){O(e)}),n(" assignNodeIntersects",function(){F(e)}),n(" reversePoints",function(){S(e)}),n(" acyclic.undo",function(){t.undo(e)})}function m(t,r){e.forEach(t.nodes(),function(e){var n=t.node(e),i=r.node(e);n&&(n.x=i.x,n.y=i.y,r.children(e).length&&(n.width=i.width,n.height=i.height))}),e.forEach(t.edges(),function(n){var i=t.edge(n),o=r.edge(n);i.points=o.points,e.has(o,"x")&&(i.x=o.x,i.y=o.y)}),t.graph().width=r.graph().width,t.graph().height=r.graph().height}wf=_,n(_,"layout"),n(g,"runLayout"),n(m,"updateInputGraph");var v=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],w=["width","height"],x={width:0,height:0},E=["minlen","weight","width","height","labeloffset"],k={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},D=["labelpos"];function C(t){var r=new p({multigraph:!0,compound:!0}),n=T(t.graph());return r.setGraph(e.merge({},y,L(n,v),e.pick(n,b))),e.forEach(t.nodes(),function(n){var i=T(t.node(n));r.setNode(n,e.defaults(L(i,w),x)),r.setParent(n,t.parent(n))}),e.forEach(t.edges(),function(n){var i=T(t.edge(n));r.setEdge(n,e.merge({},k,L(i,E),e.pick(i,D)))}),r}function j(t){var r=t.graph();r.ranksep/=2,e.forEach(t.edges(),function(e){var n=t.edge(e);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function B(t){e.forEach(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var n=t.node(e.v),i={rank:(t.node(e.w).rank-n.rank)/2+n.rank,e:e};d.addDummyNode(t,"edge-proxy",i,"_ep")}})}function M(t){var r=0;e.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,r=e.max(r,i.maxRank))}),t.graph().maxRank=r}function I(t){e.forEach(t.nodes(),function(e){var r=t.node(e);"edge-proxy"===r.dummy&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}function O(t){var r=Number.POSITIVE_INFINITY,i=0,o=Number.POSITIVE_INFINITY,a=0,s=t.graph(),u=s.marginx||0,c=s.marginy||0;function h(e){var t=e.x,n=e.y,s=e.width,u=e.height;r=Math.min(r,t-s/2),i=Math.max(i,t+s/2),o=Math.min(o,n-u/2),a=Math.max(a,n+u/2)}n(h,"getExtremes"),e.forEach(t.nodes(),function(e){h(t.node(e))}),e.forEach(t.edges(),function(r){var n=t.edge(r);e.has(n,"x")&&h(n)}),r-=u,o-=c,e.forEach(t.nodes(),function(e){var n=t.node(e);n.x-=r,n.y-=o}),e.forEach(t.edges(),function(n){var i=t.edge(n);e.forEach(i.points,function(e){e.x-=r,e.y-=o}),e.has(i,"x")&&(i.x-=r),e.has(i,"y")&&(i.y-=o)}),s.width=i-r+u,s.height=a-o+c}function F(t){e.forEach(t.edges(),function(e){var r,n,i=t.edge(e),o=t.node(e.v),a=t.node(e.w);i.points?(r=i.points[0],n=i.points[i.points.length-1]):(i.points=[],r=a,n=o),i.points.unshift(d.intersectRect(o,r)),i.points.push(d.intersectRect(a,n))})}function q(t){e.forEach(t.edges(),function(r){var n=t.edge(r);if(e.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}})}function S(t){e.forEach(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}function N(t){e.forEach(t.nodes(),function(r){if(t.children(r).length){var n=t.node(r),i=t.node(n.borderTop),o=t.node(n.borderBottom),a=t.node(e.last(n.borderLeft)),s=t.node(e.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}}),e.forEach(t.nodes(),function(e){"border"===t.node(e).dummy&&t.removeNode(e)})}function P(t){e.forEach(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}})}function R(t){var r=d.buildLayerMatrix(t);e.forEach(r,function(r){var n=0;e.forEach(r,function(r,i){var o=t.node(r);o.order=i+n,e.forEach(o.selfEdges,function(e){d.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})})}function G(t){e.forEach(t.nodes(),function(e){var r=t.node(e);if("selfedge"===r.dummy){var n=t.node(r.e.v),i=n.x+n.width/2,o=n.y,a=r.x-i,s=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.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}],r.label.x=r.x,r.label.y=r.y}})}function L(t,r){return e.mapValues(e.pick(t,r),Number)}function T(t){var r={};return e.forEach(t,function(e,t){r[t.toLowerCase()]=e}),r}return n(C,"buildLayoutGraph"),n(j,"makeSpaceForEdgeLabels"),n(B,"injectEdgeLabelProxies"),n(M,"assignRankMinMax"),n(I,"removeEdgeLabelProxies"),n(O,"translateGraph"),n(F,"assignNodeIntersects"),n(q,"fixupEdgeLabelCoords"),n(S,"reversePointsForReversedEdges"),n(N,"removeBorderNodes"),n(P,"removeSelfEdges"),n(R,"insertSelfEdges"),n(G,"positionSelfEdges"),n(L,"selectNumberAttrs"),n(T,"canonicalize"),wf}function jg(){if(kf)return Ef;kf=1;var e=tg(),t=og(),r=u_().Graph;function i(n){var i=t.buildLayerMatrix(n),o=new r({compound:!0,multigraph:!0}).setGraph({});return e.forEach(n.nodes(),function(e){o.setNode(e,{label:e}),o.setParent(e,"layer"+n.node(e).rank)}),e.forEach(n.edges(),function(e){o.setEdge(e.v,e.w,{},e.name)}),e.forEach(i,function(t,r){var n="layer"+r;o.setNode(n,{rank:"same"}),e.reduce(t,function(e,t){return o.setEdge(e,t,{style:"invis"}),t})}),o}return Ef={debugOrdering:i},n(i,"debugOrdering"),Ef}function Bg(){return Cf?Df:(Cf=1,Df="0.8.5")}function Mg(){return Bf?jf:(Bf=1,jf={graphlib:u_(),layout:Cg(),debug:jg(),util:{time:og().time,notime:og().notime},version:Bg()})}n(If,"require_cloneBuffer"),n(Of,"require_copyArray"),n(Ff,"require_arrayFilter"),n(qf,"requireStubArray"),n(Sf,"require_getSymbols"),n(Nf,"require_copySymbols"),n(Pf,"require_arrayPush"),n(Rf,"require_getPrototype"),n(Gf,"require_getSymbolsIn"),n(Lf,"require_copySymbolsIn"),n(Tf,"require_baseGetAllKeys"),n(Hf,"require_getAllKeys"),n(Vf,"require_getAllKeysIn"),n(Kf,"require_DataView"),n(zf,"require_Promise"),n(Wf,"require_Set"),n(Zf,"require_WeakMap"),n(Uf,"require_getTag"),n($f,"require_initCloneArray"),n(Xf,"require_Uint8Array"),n(Yf,"require_cloneArrayBuffer"),n(Qf,"require_cloneDataView"),n(Jf,"require_cloneRegExp"),n(Af,"require_cloneSymbol"),n(ed,"require_cloneTypedArray"),n(td,"require_initCloneByTag"),n(rd,"require_baseCreate"),n(nd,"require_initCloneObject"),n(id,"require_baseIsMap"),n(od,"requireIsMap"),n(ad,"require_baseIsSet"),n(sd,"requireIsSet"),n(ud,"require_baseClone"),n(cd,"requireClone"),n(hd,"requireConstant"),n(ld,"require_createBaseFor"),n(fd,"require_baseFor"),n(dd,"require_baseForOwn"),n(pd,"require_createBaseEach"),n(_d,"require_baseEach"),n(gd,"requireIdentity"),n(md,"require_castFunction"),n(vd,"requireForEach"),n(yd,"requireEach"),n(bd,"require_baseFilter"),n(wd,"require_setCacheAdd"),n(xd,"require_setCacheHas"),n(Ed,"require_SetCache"),n(kd,"require_arraySome"),n(Dd,"require_cacheHas"),n(Cd,"require_equalArrays"),n(jd,"require_mapToArray"),n(Bd,"require_setToArray"),n(Md,"require_equalByTag"),n(Id,"require_equalObjects"),n(Od,"require_baseIsEqualDeep"),n(Fd,"require_baseIsEqual"),n(qd,"require_baseIsMatch"),n(Sd,"require_isStrictComparable"),n(Nd,"require_getMatchData"),n(Pd,"require_matchesStrictComparable"),n(Rd,"require_baseMatches"),n(Gd,"requireIsSymbol"),n(Ld,"require_isKey"),n(Td,"requireMemoize"),n(Hd,"require_memoizeCapped"),n(Vd,"require_stringToPath"),n(Kd,"require_arrayMap"),n(zd,"require_baseToString"),n(Wd,"requireToString"),n(Zd,"require_castPath"),n(Ud,"require_toKey"),n($d,"require_baseGet"),n(Xd,"requireGet"),n(Yd,"require_baseHasIn"),n(Qd,"require_hasPath"),n(Jd,"requireHasIn"),n(Ad,"require_baseMatchesProperty"),n(ep,"require_baseProperty"),n(tp,"require_basePropertyDeep"),n(rp,"requireProperty"),n(np,"require_baseIteratee"),n(ip,"requireFilter"),n(op,"require_baseHas"),n(ap,"requireHas"),n(sp,"requireIsEmpty"),n(up,"requireIsUndefined"),n(cp,"require_baseMap"),n(hp,"requireMap"),n(lp,"require_arrayReduce"),n(fp,"require_baseReduce"),n(dp,"requireReduce"),n(pp,"requireIsString"),n(_p,"require_asciiSize"),n(gp,"require_hasUnicode"),n(mp,"require_unicodeSize"),n(vp,"require_stringSize"),n(yp,"requireSize"),n(bp,"requireTransform"),n(wp,"require_isFlattenable"),n(xp,"require_baseFlatten"),n(Ep,"require_apply"),n(kp,"require_overRest"),n(Dp,"require_baseSetToString"),n(Cp,"require_shortOut"),n(jp,"require_setToString"),n(Bp,"require_baseRest"),n(Mp,"require_baseFindIndex"),n(Ip,"require_baseIsNaN"),n(Op,"require_strictIndexOf"),n(Fp,"require_baseIndexOf"),n(qp,"require_arrayIncludes"),n(Sp,"require_arrayIncludesWith"),n(Np,"requireNoop"),n(Pp,"require_createSet"),n(Rp,"require_baseUniq"),n(Gp,"requireIsArrayLikeObject"),n(Lp,"requireUnion"),n(Tp,"require_baseValues"),n(Hp,"requireValues"),n(Vp,"requireLodash$1"),n(Kp,"requireGraph"),n(zp,"requireVersion$1"),n(Wp,"requireLib"),n(Zp,"requireJson"),n(Up,"requireComponents"),n($p,"requirePriorityQueue"),n(Xp,"requireDijkstra"),n(Yp,"requireDijkstraAll"),n(Qp,"requireTarjan"),n(Jp,"requireFindCycles"),n(Ap,"requireFloydWarshall"),n(e_,"requireTopsort"),n(t_,"requireIsAcyclic"),n(r_,"requireDfs"),n(n_,"requirePostorder"),n(i_,"requirePreorder"),n(o_,"requirePrim"),n(a_,"requireAlg"),n(s_,"requireGraphlib$1"),n(u_,"requireGraphlib"),n(c_,"requireCloneDeep"),n(h_,"require_isIterateeCall"),n(l_,"requireDefaults"),n(f_,"require_createFind"),n(d_,"require_trimmedEndIndex"),n(p_,"require_baseTrim"),n(__,"requireToNumber"),n(g_,"requireToFinite"),n(m_,"requireToInteger"),n(v_,"requireFindIndex"),n(y_,"requireFind"),n(b_,"requireFlatten"),n(w_,"requireForIn"),n(x_,"requireLast"),n(E_,"requireMapValues"),n(k_,"require_baseExtremum"),n(D_,"require_baseGt"),n(C_,"requireMax"),n(j_,"require_assignMergeValue"),n(B_,"requireIsPlainObject"),n(M_,"require_safeGet"),n(I_,"requireToPlainObject"),n(O_,"require_baseMergeDeep"),n(F_,"require_baseMerge"),n(q_,"require_createAssigner"),n(S_,"requireMerge"),n(N_,"require_baseLt"),n(P_,"requireMin"),n(R_,"requireMinBy"),n(G_,"requireNow"),n(L_,"require_baseSet"),n(T_,"require_basePickBy"),n(H_,"require_basePick"),n(V_,"require_flatRest"),n(K_,"requirePick"),n(z_,"require_baseRange"),n(W_,"require_createRange"),n(Z_,"requireRange"),n(U_,"require_baseSortBy"),n($_,"require_compareAscending"),n(X_,"require_compareMultiple"),n(Y_,"require_baseOrderBy"),n(Q_,"requireSortBy"),n(J_,"requireUniqueId"),n(A_,"require_baseZipObject"),n(eg,"requireZipObject"),n(tg,"requireLodash"),n(rg,"requireList"),n(ng,"requireGreedyFas"),n(ig,"requireAcyclic"),n(og,"requireUtil$1"),n(ag,"requireNormalize"),n(sg,"requireUtil"),n(ug,"requireFeasibleTree"),n(cg,"requireNetworkSimplex"),n(hg,"requireRank"),n(lg,"requireParentDummyChains"),n(fg,"requireNestingGraph"),n(dg,"requireAddBorderSegments"),n(pg,"requireCoordinateSystem"),n(_g,"requireInitOrder"),n(gg,"requireCrossCount"),n(mg,"requireBarycenter"),n(vg,"requireResolveConflicts"),n(yg,"requireSort"),n(bg,"requireSortSubgraph"),n(wg,"requireBuildLayerGraph"),n(xg,"requireAddSubgraphConstraints"),n(Eg,"requireOrder"),n(kg,"requireBk"),n(Dg,"requirePosition"),n(Cg,"requireLayout"),n(jg,"requireDebug"),n(Bg,"requireVersion"),n(Mg,"requireDagre");var Ig=Mg();const Og=class _GraphlibGraph extends Ig.graphlib.Graph{};n(Og,"GraphlibGraph");let Fg=Og;const qg=class _GraphData{_g;constructor(){this._g=new Fg({multigraph:!0,compound:!0}),this._g.setGraph({}),this._g.setDefaultNodeLabel(function(){return{debug:"error"}}),this._g.setDefaultEdgeLabel(function(){return{debug:"error"}})}parent(e){return this._g.parent(e)}filterNodes(e){const t=[];return this.eachNode(function(r){e(r)&&t.push(r)}),t}eachNode(e){this._g.nodes().forEach(t=>{e(t,this.node(t))})}filterEdges(e){const t=[];return this.eachEdge(function(r){e(r)&&t.push(r)}),t}eachEdge(e){this._g.edges().forEach(t=>{e(t,t.v,t.w,this.edge(t))})}setData(e,t,r,n,i){const o={addedVertices:[],addedEdges:[]},a=e.concat(t);for(let s=0;s<a.length;++s){const e=a[s];i&&this._g.hasNode(e._id)||(this._g.setNode(e._id,e),o.addedVertices.push(e))}for(let s=0;s<r.length;++s){const e=r[s];i&&this._g.hasEdge(e._id)||(e._sourceVertex&&e._targetVertex?(this._g.setEdge(e._sourceVertex._id,e._targetVertex._id,e,e._id),o.addedEdges.push(e)):console.warn("Bad edge definition"))}if(n)for(let s=0;s<n.length;++s)this._g.setParent(n[s].child._id,n[s].parent._id);if(i){const e=r.map(function(e){return e._id});this.filterEdges(t=>e.indexOf(t.name)<0).forEach(e=>this._g.removeEdge(e.v,e.w));const t=a.map(function(e){return e._id});this.filterNodes(e=>t.indexOf(e)<0).forEach(e=>this._g.removeNode(e))}return o}node(e){return this._g.node(e)}nodeCount(){return this._g.nodeCount()}nodes(){return this._g.nodes().map(e=>this._g.node(e))}nodeEdges(e){return this._g.nodeEdges(e)}edge(e){return this._g.edge(e)}edges(){return this._g.edges().map(e=>this._g.edge(e))}neighbors(e){return this._g.neighbors(e).map(e=>this._g.node(e))}singleNeighbors(e){return this._g.neighbors(e).filter(e=>1===this._g.neighbors(e).length).map(e=>this._g.node(e))}gatherShortestPath(e,t){const r=[];let n=t,i=e[n];for(;i;){if(i.distance<1/0&&i.predecessor){const e=this._g.nodeEdges(n,i.predecessor)[0];r.push(this._g.edge(e))}n=i.predecessor,i=e[n]}return r}shortestPath(e,t){return this.gatherShortestPath(Ig.graphlib.alg.dijkstra(this._g,e),t)}undirectedShortestPath(e,t){return this.gatherShortestPath(Ig.graphlib.alg.dijkstra(this._g,e,null,e=>this._g.nodeEdges(e)),t)}getJSON(){const e=Ig.graphlib.json.write(this._g);return JSON.stringify(e,function(e,t){return"value"===e?t._text&&t._text._text?t._text._text:t._id:t}," ")}};n(qg,"GraphData");let Sg=qg;function Ng(e,t){var r;function i(){var n,i,o=r.length,a=0,s=0;for(n=0;n<o;++n)a+=(i=r[n]).x,s+=i.y;for(a=a/o-e,s=s/o-t,n=0;n<o;++n)(i=r[n]).x-=a,i.y-=s}return null==e&&(e=0),null==t&&(t=0),n(i,"force"),i.initialize=function(e){r=e},i.x=function(t){return arguments.length?(e=+t,i):e},i.y=function(e){return arguments.length?(t=+e,i):t},i}function Pg(e){return function(){return e}}function Rg(){return 1e-6*(Math.random()-.5)}function Gg(e){var t=+this._x.call(null,e),r=+this._y.call(null,e);return Lg(this.cover(t,r),t,r,e)}function Lg(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var i,o,a,s,u,c,h,l,f,d=e._root,p={data:n},_=e._x0,g=e._y0,m=e._x1,v=e._y1;if(!d)return e._root=p,e;for(;d.length;)if((c=t>=(o=(_+m)/2))?_=o:m=o,(h=r>=(a=(g+v)/2))?g=a:v=a,i=d,!(d=d[l=h<<1|c]))return i[l]=p,e;if(s=+e._x.call(null,d.data),u=+e._y.call(null,d.data),t===s&&r===u)return p.next=d,i?i[l]=p:e._root=p,e;do{i=i?i[l]=new Array(4):e._root=new Array(4),(c=t>=(o=(_+m)/2))?_=o:m=o,(h=r>=(a=(g+v)/2))?g=a:v=a}while((l=h<<1|c)==(f=(u>=a)<<1|s>=o));return i[f]=d,i[l]=p,e}function Tg(e){var t,r,n,i,o=e.length,a=new Array(o),s=new Array(o),u=1/0,c=1/0,h=-1/0,l=-1/0;for(r=0;r<o;++r)isNaN(n=+this._x.call(null,t=e[r]))||isNaN(i=+this._y.call(null,t))||(a[r]=n,s[r]=i,n<u&&(u=n),n>h&&(h=n),i<c&&(c=i),i>l&&(l=i));if(u>h||c>l)return this;for(this.cover(u,c).cover(h,l),r=0;r<o;++r)Lg(this,a[r],s[r],e[r]);return this}function Hg(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,n=this._y0,i=this._x1,o=this._y1;if(isNaN(r))i=(r=Math.floor(e))+1,o=(n=Math.floor(t))+1;else{for(var a,s,u=i-r,c=this._root;r>e||e>=i||n>t||t>=o;)switch(s=(t<n)<<1|e<r,(a=new Array(4))[s]=c,c=a,u*=2,s){case 0:i=r+u,o=n+u;break;case 1:r=i-u,o=n+u;break;case 2:i=r+u,n=o-u;break;case 3:r=i-u,n=o-u}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=n,this._x1=i,this._y1=o,this}function Vg(){var e=[];return this.visit(function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)}),e}function Kg(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function zg(e,t,r,n,i){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=i}function Wg(e,t,r){var n,i,o,a,s,u,c,h=this._x0,l=this._y0,f=this._x1,d=this._y1,p=[],_=this._root;for(_&&p.push(new zg(_,h,l,f,d)),null==r?r=1/0:(h=e-r,l=t-r,f=e+r,d=t+r,r*=r);u=p.pop();)if(!(!(_=u.node)||(i=u.x0)>f||(o=u.y0)>d||(a=u.x1)<h||(s=u.y1)<l))if(_.length){var g=(i+a)/2,m=(o+s)/2;p.push(new zg(_[3],g,m,a,s),new zg(_[2],i,m,g,s),new zg(_[1],g,o,a,m),new zg(_[0],i,o,g,m)),(c=(t>=m)<<1|e>=g)&&(u=p[p.length-1],p[p.length-1]=p[p.length-1-c],p[p.length-1-c]=u)}else{var v=e-+this._x.call(null,_.data),y=t-+this._y.call(null,_.data),b=v*v+y*y;if(b<r){var w=Math.sqrt(r=b);h=e-w,l=t-w,f=e+w,d=t+w,n=_.data}}return n}function Zg(e){if(isNaN(o=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e)))return this;var t,r,n,i,o,a,s,u,c,h,l,f,d=this._root,p=this._x0,_=this._y0,g=this._x1,m=this._y1;if(!d)return this;if(d.length)for(;;){if((c=o>=(s=(p+g)/2))?p=s:g=s,(h=a>=(u=(_+m)/2))?_=u:m=u,t=d,!(d=d[l=h<<1|c]))return this;if(!d.length)break;(t[l+1&3]||t[l+2&3]||t[l+3&3])&&(r=t,f=l)}for(;d.data!==e;)if(n=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,n?(i?n.next=i:delete n.next,this):t?(i?t[l]=i:delete t[l],(d=t[0]||t[1]||t[2]||t[3])&&d===(t[3]||t[2]||t[1]||t[0])&&!d.length&&(r?r[f]=d:this._root=d),this):(this._root=i,this)}function Ug(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this}function $g(){return this._root}function Xg(){var e=0;return this.visit(function(t){if(!t.length)do{++e}while(t=t.next)}),e}function Yg(e){var t,r,n,i,o,a,s=[],u=this._root;for(u&&s.push(new zg(u,this._x0,this._y0,this._x1,this._y1));t=s.pop();)if(!e(u=t.node,n=t.x0,i=t.y0,o=t.x1,a=t.y1)&&u.length){var c=(n+o)/2,h=(i+a)/2;(r=u[3])&&s.push(new zg(r,c,h,o,a)),(r=u[2])&&s.push(new zg(r,n,h,c,a)),(r=u[1])&&s.push(new zg(r,c,i,o,h)),(r=u[0])&&s.push(new zg(r,n,i,c,h))}return this}function Qg(e){var t,r=[],n=[];for(this._root&&r.push(new zg(this._root,this._x0,this._y0,this._x1,this._y1));t=r.pop();){var i=t.node;if(i.length){var o,a=t.x0,s=t.y0,u=t.x1,c=t.y1,h=(a+u)/2,l=(s+c)/2;(o=i[0])&&r.push(new zg(o,a,s,h,l)),(o=i[1])&&r.push(new zg(o,h,s,u,l)),(o=i[2])&&r.push(new zg(o,a,l,h,c)),(o=i[3])&&r.push(new zg(o,h,l,u,c))}n.push(t)}for(;t=n.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this}function Jg(e){return e[0]}function Ag(e){return arguments.length?(this._x=e,this):this._x}function em(e){return e[1]}function tm(e){return arguments.length?(this._y=e,this):this._y}function rm(e,t,r){var n=new nm(null==t?Jg:t,null==r?em:r,NaN,NaN,NaN,NaN);return null==e?n:n.addAll(e)}function nm(e,t,r,n,i,o){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=i,this._y1=o,this._root=void 0}function im(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}n(Ng,"d3ForceCenter"),n(Pg,"constant$1"),n(Rg,"jiggle"),n(Gg,"tree_add"),n(Lg,"add"),n(Tg,"addAll"),n(Hg,"tree_cover"),n(Vg,"tree_data"),n(Kg,"tree_extent"),n(zg,"Quad"),n(Wg,"tree_find"),n(Zg,"tree_remove"),n(Ug,"removeAll"),n($g,"tree_root"),n(Xg,"tree_size"),n(Yg,"tree_visit"),n(Qg,"tree_visitAfter"),n(Jg,"defaultX"),n(Ag,"tree_x"),n(em,"defaultY"),n(tm,"tree_y"),n(rm,"quadtree"),n(nm,"Quadtree"),n(im,"leaf_copy");var om=rm.prototype=nm.prototype;function am(e){return e.index}function sm(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function um(e){var t,r,i,o,a,s=am,c=f,h=Pg(30),l=1;function f(e){return 1/Math.min(o[e.source.index],o[e.target.index])}function d(n){for(var i=0,o=e.length;i<l;++i)for(var s,u,c,h,f,d,p,_=0;_<o;++_)u=(s=e[_]).source,h=(c=s.target).x+c.vx-u.x-u.vx||Rg(),f=c.y+c.vy-u.y-u.vy||Rg(),h*=d=((d=Math.sqrt(h*h+f*f))-r[_])/d*n*t[_],f*=d,c.vx-=h*(p=a[_]),c.vy-=f*p,u.vx+=h*(p=1-p),u.vy+=f*p}function p(){if(i){var n,c,h=i.length,l=e.length,f=u(i,s);for(n=0,o=new Array(h);n<l;++n)(c=e[n]).index=n,"object"!=typeof c.source&&(c.source=sm(f,c.source)),"object"!=typeof c.target&&(c.target=sm(f,c.target)),o[c.source.index]=(o[c.source.index]||0)+1,o[c.target.index]=(o[c.target.index]||0)+1;for(n=0,a=new Array(l);n<l;++n)c=e[n],a[n]=o[c.source.index]/(o[c.source.index]+o[c.target.index]);t=new Array(l),_(),r=new Array(l),g()}}function _(){if(i)for(var r=0,n=e.length;r<n;++r)t[r]=+c(e[r],r,e)}function g(){if(i)for(var t=0,n=e.length;t<n;++t)r[t]=+h(e[t],t,e)}return null==e&&(e=[]),n(f,"defaultStrength"),n(d,"force"),n(p,"initialize"),n(_,"initializeStrength"),n(g,"initializeDistance"),d.initialize=function(e){i=e,p()},d.links=function(t){return arguments.length?(e=t,p(),d):e},d.id=function(e){return arguments.length?(s=e,d):s},d.iterations=function(e){return arguments.length?(l=+e,d):l},d.strength=function(e){return arguments.length?(c="function"==typeof e?e:Pg(+e),_(),d):c},d.distance=function(e){return arguments.length?(h="function"==typeof e?e:Pg(+e),g(),d):h},d}om.copy=function(){var e,t,r=new nm(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=im(n),r;for(e=[{source:n,target:r._root=new Array(4)}];n=e.pop();)for(var i=0;i<4;++i)(t=n.source[i])&&(t.length?e.push({source:t,target:n.target[i]=new Array(4)}):n.target[i]=im(t));return r},om.add=Gg,om.addAll=Tg,om.cover=Hg,om.data=Vg,om.extent=Kg,om.find=Wg,om.remove=Zg,om.removeAll=Ug,om.root=$g,om.size=Xg,om.visit=Yg,om.visitAfter=Qg,om.x=Ag,om.y=tm,n(am,"index"),n(sm,"find$1"),n(um,"d3ForceLink");var cm,hm,lm=0,fm=0,dm=0,pm=0,_m=0,gm=0,mm="object"==typeof performance&&performance.now?performance:Date,vm="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ym(){return _m||(vm(bm),_m=mm.now()+gm)}function bm(){_m=0}function wm(){this._call=this._time=this._next=null}function xm(e,t,r){var n=new wm;return n.restart(e,t,r),n}function Em(){ym(),++lm;for(var e,t=cm;t;)(e=_m-t._time)>=0&&t._call.call(null,e),t=t._next;--lm}function km(){_m=(pm=mm.now())+gm,lm=fm=0;try{Em()}finally{lm=0,Cm(),_m=0}}function Dm(){var e=mm.now(),t=e-pm;t>1e3&&(gm-=t,pm=e)}function Cm(){for(var e,t,r=cm,n=1/0;r;)r._call?(n>r._time&&(n=r._time),e=r,r=r._next):(t=r._next,r._next=null,r=e?e._next=t:cm=t);hm=e,jm(n)}function jm(e){lm||(fm&&(fm=clearTimeout(fm)),e-_m>24?(e<1/0&&(fm=setTimeout(km,e-mm.now()-gm)),dm&&(dm=clearInterval(dm))):(dm||(pm=mm.now(),dm=setInterval(Dm,1e3)),lm=1,vm(km)))}function Bm(e){return e.x}function Mm(e){return e.y}n(ym,"now"),n(bm,"clearNow"),n(wm,"Timer"),wm.prototype=xm.prototype={constructor:wm,restart:/* @__PURE__ */n(function(e,t,r){if("function"!=typeof e)throw new TypeError("callback is not a function");r=(null==r?ym():+r)+(null==t?0:+t),this._next||hm===this||(hm?hm._next=this:cm=this,hm=this),this._call=e,this._time=r,jm()},"restart"),stop:/* @__PURE__ */n(function(){this._call&&(this._call=null,this._time=1/0,jm())},"stop")},n(xm,"timer"),n(Em,"timerFlush"),n(km,"wake"),n(Dm,"poke"),n(Cm,"nap"),n(jm,"sleep"),n(Bm,"x"),n(Mm,"y$1");var Im=Math.PI*(3-Math.sqrt(5));function Om(e){var t,r=1,i=.001,o=1-Math.pow(i,1/300),a=0,s=.6,h=u(),l=xm(d),f=c("tick","end");function d(){p(),f.call("tick",t),r<i&&(l.stop(),f.call("end",t))}function p(n){var i,u,c=e.length;void 0===n&&(n=1);for(var l=0;l<n;++l)for(r+=(a-r)*o,h.each(function(e){e(r)}),i=0;i<c;++i)null==(u=e[i]).fx?u.x+=u.vx*=s:(u.x=u.fx,u.vx=0),null==u.fy?u.y+=u.vy*=s:(u.y=u.fy,u.vy=0);return t}function _(){for(var t,r=0,n=e.length;r<n;++r){if((t=e[r]).index=r,null!=t.fx&&(t.x=t.fx),null!=t.fy&&(t.y=t.fy),isNaN(t.x)||isNaN(t.y)){var i=10*Math.sqrt(r),o=r*Im;t.x=i*Math.cos(o),t.y=i*Math.sin(o)}(isNaN(t.vx)||isNaN(t.vy))&&(t.vx=t.vy=0)}}function g(t){return t.initialize&&t.initialize(e),t}return null==e&&(e=[]),n(d,"step"),n(p,"tick"),n(_,"initializeNodes"),n(g,"initializeForce"),_(),t={tick:p,restart:/* @__PURE__ */n(function(){return l.restart(d),t},"restart"),stop:/* @__PURE__ */n(function(){return l.stop(),t},"stop"),nodes:/* @__PURE__ */n(function(r){return arguments.length?(e=r,_(),h.each(g),t):e},"nodes"),alpha:/* @__PURE__ */n(function(e){return arguments.length?(r=+e,t):r},"alpha"),alphaMin:/* @__PURE__ */n(function(e){return arguments.length?(i=+e,t):i},"alphaMin"),alphaDecay:/* @__PURE__ */n(function(e){return arguments.length?(o=+e,t):+o},"alphaDecay"),alphaTarget:/* @__PURE__ */n(function(e){return arguments.length?(a=+e,t):a},"alphaTarget"),velocityDecay:/* @__PURE__ */n(function(e){return arguments.length?(s=1-e,t):1-s},"velocityDecay"),force:/* @__PURE__ */n(function(e,r){return arguments.length>1?(null==r?h.remove(e):h.set(e,g(r)),t):h.get(e)},"force"),find:/* @__PURE__ */n(function(t,r,n){var i,o,a,s,u,c=0,h=e.length;for(null==n?n=1/0:n*=n,c=0;c<h;++c)(a=(i=t-(s=e[c]).x)*i+(o=r-s.y)*o)<n&&(u=s,n=a);return u},"find"),on:/* @__PURE__ */n(function(e,r){return arguments.length>1?(f.on(e,r),t):f.on(e)},"on")}}function Fm(){var e,t,r,i,o=Pg(-30),a=1,s=1/0,u=.81;function c(n){var i,o=e.length,a=rm(e,Bm,Mm).visitAfter(l);for(r=n,i=0;i<o;++i)t=e[i],a.visit(f)}function h(){if(e){var t,r,n=e.length;for(i=new Array(n),t=0;t<n;++t)r=e[t],i[r.index]=+o(r,t,e)}}function l(e){var t,r,n,o,a,s=0,u=0;if(e.length){for(n=o=a=0;a<4;++a)(t=e[a])&&(r=Math.abs(t.value))&&(s+=t.value,u+=r,n+=r*t.x,o+=r*t.y);e.x=n/u,e.y=o/u}else{(t=e).x=t.data.x,t.y=t.data.y;do{s+=i[t.data.index]}while(t=t.next)}e.value=s}function f(e,n,o,c){if(!e.value)return!0;var h=e.x-t.x,l=e.y-t.y,f=c-n,d=h*h+l*l;if(f*f/u<d)return d<s&&(0===h&&(d+=(h=Rg())*h),0===l&&(d+=(l=Rg())*l),d<a&&(d=Math.sqrt(a*d)),t.vx+=h*e.value*r/d,t.vy+=l*e.value*r/d),!0;if(!(e.length||d>=s)){(e.data!==t||e.next)&&(0===h&&(d+=(h=Rg())*h),0===l&&(d+=(l=Rg())*l),d<a&&(d=Math.sqrt(a*d)));do{e.data!==t&&(f=i[e.data.index]*r/d,t.vx+=h*f,t.vy+=l*f)}while(e=e.next)}}return n(c,"force"),n(h,"initialize"),n(l,"accumulate"),n(f,"apply"),c.initialize=function(t){e=t,h()},c.strength=function(e){return arguments.length?(o="function"==typeof e?e:Pg(+e),h(),c):o},c.distanceMin=function(e){return arguments.length?(a=e*e,c):Math.sqrt(a)},c.distanceMax=function(e){return arguments.length?(s=e*e,c):Math.sqrt(s)},c.theta=function(e){return arguments.length?(u=e*e,c):Math.sqrt(u)},c}function qm(e){var t,r,i,o=Pg(.1);function a(e){for(var n,o=0,a=t.length;o<a;++o)(n=t[o]).vx+=(i[o]-n.x)*r[o]*e}function s(){if(t){var n,a=t.length;for(r=new Array(a),i=new Array(a),n=0;n<a;++n)r[n]=isNaN(i[n]=+e(t[n],n,t))?0:+o(t[n],n,t)}}return"function"!=typeof e&&(e=Pg(null==e?0:+e)),n(a,"force"),n(s,"initialize"),a.initialize=function(e){t=e,s()},a.strength=function(e){return arguments.length?(o="function"==typeof e?e:Pg(+e),s(),a):o},a.x=function(t){return arguments.length?(e="function"==typeof t?t:Pg(+t),s(),a):e},a}function Sm(e){var t,r,i,o=Pg(.1);function a(e){for(var n,o=0,a=t.length;o<a;++o)(n=t[o]).vy+=(i[o]-n.y)*r[o]*e}function s(){if(t){var n,a=t.length;for(r=new Array(a),i=new Array(a),n=0;n<a;++n)r[n]=isNaN(i[n]=+e(t[n],n,t))?0:+o(t[n],n,t)}}return"function"!=typeof e&&(e=Pg(null==e?0:+e)),n(a,"force"),n(s,"initialize"),a.initialize=function(e){t=e,s()},a.strength=function(e){return arguments.length?(o="function"==typeof e?e:Pg(+e),s(),a):o},a.y=function(t){return arguments.length?(e="function"==typeof t?t:Pg(+t),s(),a):e},a}n(Om,"d3ForceSimulation"),n(Fm,"d3ForceManyBody"),n(qm,"d3ForceX"),n(Sm,"d3ForceY");let Nm=(n(e=class{pos={};constructor(e,t,r,n){const i=this;this.pos={};n=n||(t<r?t-0:r-0)/2;const o=e.nodeCount();let a=-Math.PI/2;const s=2*Math.PI/o;e.eachNode(function(e,o){const u=o.getBBox();i.pos[e]={x:o.fixed?o.x:t/2+Math.cos(a)*(n-0),y:o.fixed?o.y:r/2+Math.sin(a)*(n-0),width:u.width,height:u.height},a+=s})}nodePos(e){return this.pos[e]}edgePoints(e){return[]}},"Circle"),e),Pm=(n(t=class{pos={};vertices=[];vertexMap={};edges=[];force;constructor(e,t,r,n){n=n||{},this.pos={},this.vertices=[],this.vertexMap={},e.eachNode(t=>{const r=e.node(t),n=r.getBBox(),i={id:t,x:r.pos().x,y:r.pos().y,width:n.width,height:n.height,value:r};this.vertices.push(i),this.vertexMap[t]=i}),this.edges=[],e.eachEdge((e,t,r)=>{this.edges.push({source:t,target:r})});const i=um().id(function(e){return e.id}).distance(n.linkDistance).strength(n.linkStrength),o=Fm().strength(function(e){const t=e.value.getBBox();return n.charge*Math.max(t.width,t.height)});if(this.force=Om().force("link",i).force("charge",o).force("center",Ng(t/2,r/2)).velocityDecay(n.oneShot?.1:n.friction).nodes(this.vertices),i.links(this.edges),n.oneShot){this.force.restart();let t=e.nodeCount();t=Math.min(t*t,500);for(let e=0;e<t;++e)this.force.tick();this.force.stop()}}nodePos(e){return this.vertexMap[e]}edgePoints(e){return[]}},"ForceDirected"),t);const Rm=class _Hierarchy{digraph;dagreLayout;constructor(e,t,r,n){this.digraph=new Ig.graphlib.Graph({multigraph:!0,compound:!0}).setGraph(n).setDefaultNodeLabel(function(){return{}}).setDefaultEdgeLabel(function(){return{}}),e.eachNode(t=>{const r=e.node(t).getBBox();this.digraph.setNode(t,{width:r.width,height:r.height})}),e.eachEdge((t,r,i)=>{const o=e.edge(t);this.digraph.setEdge(r,i,{weight:o.weight()},o._id),n.digraph||this.digraph.setEdge(i,r,{weight:o.weight()},o._id)}),e.eachNode(t=>{this.digraph.setParent(t,e.parent(t))}),this.dagreLayout=Ig.layout(this.digraph,{debugTiming:!1});const i=-this.digraph.graph().width/2,o=-this.digraph.graph().height/2;this.digraph.nodes().forEach(e=>{const n=this.digraph.node(e);n.x+=i+t/2,n.y+=o+r/2}),this.digraph.edges().forEach(e=>{const n=this.digraph.edge(e);for(let a=0;a<n.points.length;++a)n.points[a].x+=i+t/2,n.points[a].y+=o+r/2}),this.digraph=this.digraph}nodePos(e){return this.digraph.node(e)}edgePoints(e){return this.digraph.edge(e._sourceVertex.id(),e._targetVertex.id(),e._id).points}};n(Rm,"Hierarchy");let Gm=Rm;const Lm=class _Subgraph extends o{_border;_textWidget=(new h).anchor("start").fontSize(14);_buttonMin=(new l).diameter(18).shape_colorStroke("#1f77b4").shape_colorFill("#dcf1ff").image_colorFill("#1f77b4").on("click",()=>{this.minClick()},!0).on("dblclick",()=>{},!0);_minState="normal";constructor(){super()}minState(e){return arguments.length?(this._minState=e,this):this._minState}calcIcon(){switch(this._minState){case"normal":return"";case"partial":return""}}getBBox(e=!1,t=!1){const r=this.width(),n=this.height();return{x:-r/2,y:-n/2-14,width:r,height:n}}enter(e,t){super.enter(e,t),this._border=t.append("rect").attr("class","border"),this._textWidget.target(e),this._buttonMin.target(e)}update(e,t){super.update(e,t);const r=this.getBBox();this._border.attr("x",r.x).attr("y",r.y).attr("width",r.width).attr("height",r.height).style("fill",this.border_colorFill()).style("stroke",this.border_colorStroke()),this.border_colorFill_exists()&&!this.title_colorFill_exists()&&this.title_colorFill(f.textColor(this.border_colorFill())),this._textWidget.pos({x:r.x+4,y:r.y+14}).width(this.width()-8).text(this.showTitle()?this.title():"").render(),this._buttonMin.visible(this.showMinMax()).pos({x:r.x+r.width-13,y:r.y+13}).faChar(this.calcIcon()).render()}exit(e,t){this._buttonMin.target(null),this._textWidget.target(null),this._border.remove(),super.exit(e,t)}intersection(e,t){let r=null;return[].forEach(function(e){(null===r||r.d>e.d)&&(r=e)}),r&&r.i?r.i:null}click(e){}minClick(){switch(this._minState){case"normal":this._minState="partial";break;case"partial":this._minState="normal"}this._buttonMin.faChar(this.calcIcon()).render()}};n(Lm,"Subgraph");let Tm=Lm;Tm.prototype._class+=" graph_Subgraph",Tm.prototype.publish("border_colorStroke",null,"html-color","Stroke Color",null,{optional:!0}),Tm.prototype.publish("border_colorFill",null,"html-color","Fill Color",null,{optional:!0}),Tm.prototype.publish("showTitle",!0,"boolean","Show Title",null,{tags:["Basic"]}),Tm.prototype.publish("title","","string","Title",null,{tags:["Basic"]}),Tm.prototype.publishProxy("titleFontSize","_textWidget","fontSize"),Tm.prototype.publishProxy("title_colorFill","_textWidget","colorFill"),Tm.prototype.publish("showMinMax",!1,"boolean","Show Min/Max",null,{tags:["Basic"]});const Hm=class _Vertex extends o{_icon;_textBox;_annotationWidgets;_graphID;constructor(){super(),this._icon=new l,this._textBox=new a,this._annotationWidgets={},this.pos({x:void 0,y:void 0})}getIconBBox(){const e=this._icon.getBBox(!0),t=this._textBox.getBBox(!0);switch(this.iconAnchor()){case"start":return{x:-t.width/2+e.width/3,y:-t.height/2-e.height/3,width:e.width,height:e.height};case"middle":return{x:0,y:-t.height/2-e.height/3,width:e.width,height:e.height};case"end":return{x:t.width/2-e.width/3,y:-t.height/2-e.height/3,width:e.width,height:e.height};case"left":return{x:-t.width/2-e.width/2,y:0,width:e.width,height:e.height}}return{x:0,y:0,width:e.width,height:e.height}}getBBox(e=!1,t=!1){const r=this.getIconBBox(),n=this._textBox.getBBox(!0),i=Math.min(r.x,n.x),o=Math.min(r.y,n.y);return{x:i,y:o,width:Math.max(r.x+r.width,n.x+n.width)-i,height:Math.max(r.y+r.height,n.y+n.height)-o}}enter(e,t){super.enter(e,t),delete this._prevHash,this._icon.target(e),this._textBox.target(e),t.on("mouseover",e=>this.mouseover(e.data())).on("mouseout",e=>this.mouseout(e.data()))}_prevHash;update(e,t){super.update(e,t);const r=this.hashSum();if(this._prevHash!==r){this._prevHash=r,t.classed("centroid",this.centroid()),t.style("filter",this.centroid()?"url(#"+this._graphID+"_glow)":null),this._icon.tooltip(this.iconTooltip()?this.iconTooltip():this.tooltip()).render(),this._textBox.tooltip(this.tooltip()).render();const e=this.getIconBBox();this._icon.move(e);const n=this,i=t.selectAll(".annotation").data(this.annotationIcons()),o=i.enter().append("g").attr("class","annotation").each(function(e,t){n._annotationWidgets[t]=(new l).target(this).shape("square")}),a=this._textBox.getBBox(!0);let s=a.width/2;const u=a.height/2;o.merge(i).each(function(e,t){const r=n._annotationWidgets[t];r.diameter(n.annotationDiameter()).shape_colorFill(n.textbox_shape_colorFill()).shape_colorStroke(n.textbox_shape_colorStroke());for(const n in e)r[n]?r[n](e[n]):globalThis.__hpcc_debug&&console.warn("Invalid annotation property: "+n);r.render();const i=r.getBBox(!0);r.move({x:s-i.width/2+4,y:u+i.height/2-4}),s-=i.width+n.annotationSpacing()}),i.exit().each(function(e,t){const r=d(this);n._annotationWidgets[t].target(null),delete n._annotationWidgets[t],r.remove()})}}exit(e,t){for(const r in this._annotationWidgets)this._annotationWidgets[r].target(null);this._icon.target(null),this._textBox.target(null),super.exit(e,t)}contains(e){return this._icon.contains(e)||this._textBox.contains(e)}intersection(e,t){const r=this._icon.intersection(e,t),n=this._textBox.intersection(e,t);return r&&n?this.distance(r,t)<this.distance(n,t)?r:n:r||n}mouseover(e){}mouseout(e){}};n(Hm,"Vertex");let Vm=Hm;Vm.prototype._class+=" graph_Vertex",Vm.prototype.publishProxy("faChar","_icon"),Vm.prototype.publishProxy("imageUrl","_icon"),Vm.prototype.publishProxy("icon_diameter","_icon","diameter"),Vm.prototype.publishProxy("icon_paddingPercent","_icon","paddingPercent"),Vm.prototype.publishProxy("icon_shape_colorFill","_icon","shape_colorFill"),Vm.prototype.publishProxy("icon_shape_colorStroke","_icon","shape_colorStroke"),Vm.prototype.publishProxy("icon_image_colorFill","_icon","image_colorFill"),Vm.prototype.publishProxy("icon_fontFamily","_icon","fontFamily"),Vm.prototype.publish("centroid",!1,"boolean","Centroid Vertex"),Vm.prototype.publishProxy("text","_textBox"),Vm.prototype.publishProxy("anchor","_textBox"),Vm.prototype.publishProxy("textbox_shape_colorStroke","_textBox","shape_colorStroke"),Vm.prototype.publishProxy("textbox_shape_colorFill","_textBox","shape_colorFill"),Vm.prototype.publishProxy("textbox_text_colorFill","_textBox","text_colorFill"),Vm.prototype.publishProxy("textbox_text_fontFamily","_textBox","text_fontFamily"),Vm.prototype.publish("iconAnchor","start","set","Horizontal anchor position of icon",["","start","middle","end","left"],{tags:["Basic"]}),Vm.prototype.publish("iconTooltip","","string","iconTooltip",null,{tags:["Private"]}),Vm.prototype.publish("tooltip","","string","Tooltip",null,{tags:["Private"]}),Vm.prototype.publish("annotationDiameter",14,"number","Annotation Diameter",null,{tags:["Private"]}),Vm.prototype.publish("annotationSpacing",3,"number","Annotation Spacing",null,{tags:["Private"]}),Vm.prototype.publish("annotationIcons",[],"array","Annotations",null,{tags:["Private"]});const Km=class _Graph extends p{_toggleHierarchy=(new _).faChar("fa-sitemap").tooltip("Hierarchy").on("click",()=>this.layoutClick("Hierarchy"));_toggleForceDirected=(new _).faChar("fa-expand").tooltip("Force Directed").on("click",()=>this.layoutClick("ForceDirected"));_toggleForceDirected2=(new _).faChar("fa-arrows").tooltip("Spring").on("click",()=>this.layoutClick("ForceDirected2"));_toggleCircle=(new _).faChar("fa-circle-o").tooltip("Circle").on("click",()=>this.layoutClick("Circle"));_graphData;highlight;_selection;_dragging;forceLayout;_d3Drag;defs;_centroidFilter;svgFragment;svg;svgC;svgE;svgV;constructor(){super(),O.call(this),F.call(this),this.tooltipHTML(function(e){let t;return e instanceof Tm?t=e.title().replace(/\n/g,"<br>"):(e instanceof Vm||e instanceof ve)&&(t=e.text().replace(/\n/g,"<br>")),t?`<p style="text-align:center">${t}</p>`:null}),this._drawStartPos="origin";const e=[this._toggleHierarchy,this._toggleForceDirected,this._toggleForceDirected2,this._toggleCircle,new g];this._iconBar.buttons(e.concat(this._iconBar.buttons())),this._graphData=new Sg,this.highlight={zoom:1.1,opacity:.33,edge:"1.25px"},this._selection=new m.Selection(this),this.zoomToFitLimit(1)}iconBarButtons(){return this._iconBar.buttons()}layoutClick(e){this.layout(e),"ForceDirected2"!==e&&this.applyScaleOnLayout(!0),this.layout(e).render(e=>{this.applyScaleOnLayout(!1)})}getOffsetPos(){return{x:0,y:0}}size(e){return super.size.apply(this,arguments)}clear(){this.data({subgraphs:[],vertices:[],edges:[],hierarchy:[]},!1)}_dataHash=0;data(e,t){const r=super.data.apply(this,arguments);if(arguments.length){t||(this._graphData=new Sg,this._renderCount=0);const r=this._graphData.setData(e.subgraphs||[],e.vertices||[],e.edges||[],e.hierarchy||[],t||!1);r.addedVertices.length&&this._dataHash++;const n=this;r.addedVertices.forEach(function(e){e._graphID=n._id}),r.addedEdges.forEach(function(e){e._graphID=n._id});const i={};this._graphData.edges().forEach(function(e){i[e._sourceVertex._id]||(i[e._sourceVertex._id]={}),i[e._sourceVertex._id][e._targetVertex._id]||(i[e._sourceVertex._id][e._targetVertex._id]=0);const t=++i[e._sourceVertex._id][e._targetVertex._id];e.arcDepth(16*t)})}return r}graphData(){return this._graphData}selection(e){return arguments.length?(this._selection.set(e),this):this._selection.get()}_linkcolor;linkcolor_default(e){return arguments.length?(this._linkcolor=e,this):this._linkcolor}_linktooltip;linktooltip_default(e){return arguments.length?(this._linktooltip=e,this):this._linktooltip}_neighborOffsets=[];dragstart(e){if(this.allowDragging()){const t=v();if(t.sourceEvent.stopPropagation(),e.__drag_dx=t.x-e.x(),e.__drag_dy=t.y-e.y(),this._dragging=!0,this.forceLayout){t.active||this.forceLayout.force.alphaTarget(.3).restart();const r=this.forceLayout.vertexMap[e.id()];r.fixed=!0,r.fx=r.x,r.fy=r.y}this._neighborOffsets=[],this.dragSingleNeighbors()&&(this._neighborOffsets=this._graphData.singleNeighbors(e.id()).map(t=>(d(t.target()).raise(),{neighbor:t,offsetX:e.x()-t.x(),offsetY:e.y()-t.y()})));const r=e.target();let n=r.nextSibling;for(;n;)r.parentNode.insertBefore(n,r),n=r.nextSibling;s.svgMarkerGlitch&&this._graphData.nodeEdges(e.id()).forEach(e=>{const t=this._graphData.edge(e);this._pushMarkers(t.element())})}}dragging(e){if(this.allowDragging()){const t=v();if(t.sourceEvent.stopPropagation(),e.move({x:t.x-e.__drag_dx,y:t.y-e.__drag_dy}),this.forceLayout){const r=this.forceLayout.vertexMap[e.id()];r.fixed=!0,r.fx=t.x-e.__drag_dx,r.fy=t.y-e.__drag_dy}this._neighborOffsets.forEach(r=>{const n=t.x-e.__drag_dx-r.offsetX,i=t.y-e.__drag_dy-r.offsetY;if(this.forceLayout){const e=this.forceLayout.vertexMap[r.neighbor.id()];e.fixed=!0,e.fx=n,e.fy=i}r.neighbor.move({x:n,y:i})}),this.refreshIncidentEdges(e,!0)}}dragend(e){if(this.allowDragging()){if(v().sourceEvent.stopPropagation(),this._dragging=!1,this.snapToGrid()){const t=e.calcSnap(this.snapToGrid());e.move(t[0]),this.refreshIncidentEdges(e,!0)}if(this.forceLayout){const t=this.forceLayout.vertexMap[e.id()];t.fixed=!1,t.fx=null,t.fy=null,this._neighborOffsets.forEach(e=>{const t=this.forceLayout.vertexMap[e.neighbor.id()];t.fixed=!1,t.fx=null,t.fy=null})}this._neighborOffsets=[],s.svgMarkerGlitch&&this._graphData.nodeEdges(e.id()).forEach(function(e){const t=this._graphData.edge(e);this._popMarkers(t.element())})}}enter(e,t){super.enter(e,t),this._zoomGrab.on("click.clear",()=>{this.selectionClearOnBackgroundClick()&&this._selection.clear()}),this._d3Drag=y().on("start",e=>this.dragstart(e)).on("end",e=>this.dragend(e)).on("drag",e=>this.dragging(e)),this.defs=this._renderElement.append("defs"),this.addMarkers(),this._centroidFilter=new b(this.defs,this._id+"_glow"),this.svg=this._renderElement.append("svg:g"),this.svgC=this.svg.append("g").attr("id",this._id+"C"),this.svgE=this.svg.append("g").attr("id",this._id+"E"),this.svgV=this.svg.append("g").attr("id",this._id+"V")}getBounds(e,t){const r=[[null,null],[null,null]];return e.forEach(function(e){const n=t?t.nodePos(e._id):{x:e.x(),y:e.y(),width:e.width(),height:e.height()},i=n.x-n.width/2,o=n.x+n.width/2,a=n.y-n.height/2,s=n.y+n.height/2;(null===r[0][0]||r[0][0]>i)&&(r[0][0]=i),(null===r[0][1]||r[0][1]>a)&&(r[0][1]=a),(null===r[1][0]||r[1][0]<o)&&(r[1][0]=o),(null===r[1][1]||r[1][1]<s)&&(r[1][1]=s)}),r}getVertexBounds(e){return this.getBounds(this._graphData.nodes(),e)}getSelectionBounds(e){return this.getBounds(this._selection.get(),e)}centerOnItem(e){const t=e.getBBox(!0),r=t.x+t.width/2,n=t.y+t.height/2,i={x:e.x()+r-t.width/2,y:e.y()+n-t.height/2,width:t.width,height:t.height};this.centerOnBBox(i)}zoomToItem(e){const t=e.getBBox(!0),r=t.x+t.width/2,n=t.y+t.height/2,i={x:e.x()+r-t.width/2,y:e.y()+n-t.height/2,width:t.width,height:t.height};this.zoomToBBox(i)}updateVertices(e,t,r){const i=this.width(),o=this.height(),a=this,s=e.selectAll("#"+this._id+t+" > .graphVertex").data(r,function(e){return e.id()});function u(e){d(this).style("cursor",a.allowDragging()?"move":"pointer"),e.target(this).pos({x:e.x()||i/2,y:e.y()||o/2}).animationFrameRender(),a.allowDragging()&&d(this).call(a._d3Drag),e.dispatch&&(e.dispatch.on("sizestart",function(e){e.allowResize(a.allowDragging()),a.allowDragging()&&(a._dragging=!0)}),e.dispatch.on("size",function(e){a.refreshIncidentEdges(e,!1)}),e.dispatch.on("sizeend",function(e){if(a._dragging=!1,a.snapToGrid()){const t=e.calcSnap(a.snapToGrid());e.pos(t[0]).size(t[1]).render(),a.refreshIncidentEdges(e,!1)}}))}function c(e){e.animationFrameRender()}s.enter().append("g").attr("class","graphVertex").style("opacity",1e-6).on("click.selectionBag",function(e){a._selection.click(e,v()),a.selectionChanged()}).on("click",function(e){const t=d(this).select(".graph_Vertex");let r=!1;t.empty()||(r=t.classed("selected")),a.vertex_click(a.rowToObj(e.data()),"",r,{vertex:e})}).on("dblclick",function(e){v().stopPropagation();const t=d(this).select(".graph_Vertex");let r=!1;t.empty()||(r=t.classed("selected")),a.vertex_dblclick(a.rowToObj(e.data()),"",r,{vertex:e})}).on("contextmenu",function(e){const t=d(this).select(".graph_Vertex");let r=!1;t.empty()||(r=t.classed("selected")),a.vertex_contextmenu(a.rowToObj(e.data()),"",r,{vertex:e})}).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).on("mouseover",function(e){a._dragging||a.vertex_mouseover(d(this),e)}).on("mouseout",function(e){a._dragging||a.vertex_mouseout(d(this),e)}).each(u).transition().duration(750).style("opacity",1),n(u,"createV"),s.each(c),n(c,"updateV"),s.exit().each(function(e){e.target(null)}).remove(),s.order()}update(e,t){super.update(e,t),this.tooltip.hide(),this._centroidFilter.update(this.centroidColor());const r=this.layout();this._toggleHierarchy.selected("Hierarchy"===r).render(),this._toggleForceDirected.selected("ForceDirected"===r).render(),this._toggleForceDirected2.selected("ForceDirected2"===r).render(),this._toggleCircle.selected("Circle"===r).render();const i=this;this.updateVertices(this.svgC,"C",this._graphData.nodes().filter(e=>"Hierarchy"===this.layout()&&e instanceof Tm)),this.updateVertices(this.svgV,"V",this._graphData.nodes().filter(e=>!(e instanceof Tm)));const o=this.svgE.selectAll("#"+this._id+"E > .graphEdge").data(this.showEdges()?this._graphData.edges():[],function(e){return e.id()});function a(e){e.target(this).animationFrameRender()}function s(e){e.animationFrameRender()}o.enter().append("g").attr("class","graphEdge").style("opacity",1e-6).on("click.selectionBag",function(e){i._selection.click(e,v())}).on("click",function(e){const t=d(this).select(".graph_Edge");let r=!1;t.empty()||(r=t.classed("selected")),i.edge_click(i.rowToObj(e.data()),"",r,{edge:e})}).on("dblclick",function(e){const t=d(this).select(".graph_Edge");let r=!1;t.empty()||(r=t.classed("selected")),i.edge_dblclick(i.rowToObj(e.data()),"",r,{edge:e})}).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).on("mouseover",function(e){i._dragging||i.edge_mouseover(d(this),e)}).on("mouseout",function(e){i._dragging||i.edge_mouseout(d(this),e)}).each(a).transition().duration(750).style("opacity",1),n(a,"createE"),o.each(s),n(s,"updateE"),o.exit().each(function(e){e.target(null)}).remove(),this._renderCount||(this._renderCount++,this.layout(this.layout()))}exit(e,t){this._graphData.nodes().forEach(e=>e.target(null)),this._graphData.edges().forEach(e=>e.target(null)),super.exit(e,t)}render(e){return this.progress("start"),super.render(t=>{this.doLayout().then(()=>{this.progress("end"),e&&e(t)})}),this}_prevLayout;_prevDataHash;doLayout(e=0){return new Promise((t,r)=>{requestAnimationFrame(()=>{this._prevLayout!==this.layout()||this._prevDataHash!==this._dataHash?(this._prevLayout=this.layout(),this._prevDataHash=this._dataHash,this._doLayout(e).then(()=>{t()})):t()})})}_doLayout(e=0){return new Promise((t,r)=>{this.progress("layout-start"),this.forceLayout&&(this.forceLayout.force.stop(),this.forceLayout=null);const n=this,i=this.getLayoutEngine();"ForceDirected2"===this.layout()?(this.forceLayout=i,this.forceLayout.force.on("tick",function(){n.progress("layout-tick"),i.vertices.forEach(function(e){if(e.fixed);else{const t=n._graphData.node(e.id);t&&t.move({x:e.x,y:e.y})}}),n._graphData.edges().forEach(e=>{e.points([],!1,!1)}),n.applyScaleOnLayout()}).on("end",function(){n.progress("layout-end")}),this.forceLayout.force.restart(),t()):i&&(this.forceLayout=null,n._dragging=!0,n._graphData.nodes().forEach(function(e){const t=i.nodePos(e.id());e instanceof _Graph.Subgraph?e.pos({x:t.x,y:t.y}).size({width:t.width,height:t.height}).animationFrameRender():e.move({x:t.x,y:t.y},0)}),n._graphData.edges().forEach(t=>{const r=i.edgePoints(t);t.points(r,e)}),n.applyScaleOnLayout()&&requestAnimationFrame(()=>{n.zoomToFit(),t()}),this._fixIEMarkers(),setTimeout(function(){n._dragging=!1},e?e+50:50),this.progress("layout-end"),n.applyScaleOnLayout()||t())})}getLayoutEngine(){switch(this.layout()){case"Circle":return new Nm(this._graphData,this._size.width,this._size.height);case"ForceDirected":return new Pm(this._graphData,this._size.width,this._size.height,{oneShot:!0,linkDistance:this.forceDirectedLinkDistance(),linkStrength:this.forceDirectedLinkStrength(),friction:this.forceDirectedFriction(),charge:this.forceDirectedCharge(),chargeDistance:this.forceDirectedChargeDistance(),theta:this.forceDirectedTheta(),gravity:this.forceDirectedGravity()});case"ForceDirected2":return new Pm(this._graphData,this._size.width,this._size.height,{linkDistance:this.forceDirectedLinkDistance(),linkStrength:this.forceDirectedLinkStrength(),friction:this.forceDirectedFriction(),charge:this.forceDirectedCharge(),chargeDistance:this.forceDirectedChargeDistance(),theta:this.forceDirectedTheta(),gravity:this.forceDirectedGravity()});case"Hierarchy":return new Gm(this._graphData,this._size.width,this._size.height,{rankdir:this.hierarchyRankDirection(),nodesep:this.hierarchyNodeSeparation(),edgesep:this.hierarchyEdgeSeparation(),ranksep:this.hierarchyRankSeparation(),digraph:this.hierarchyDigraph()})}return null}getNeighborMap(e){const t={},r={};if(e){const n=this._graphData.nodeEdges(e.id());for(let i=0;i<n.length;++i){const o=this._graphData.edge(n[i]);r[o.id()]=o,o._sourceVertex.id()!==e.id()&&(t[o._sourceVertex.id()]=o._sourceVertex),o._targetVertex.id()!==e.id()&&(t[o._targetVertex.id()]=o._targetVertex)}}return{vertices:t,edges:r}}highlightVerticies(e){const t=this;return this.svgV.selectAll(".graphVertex").classed("graphVertex-highlighted",t=>!e||e[t.id()]).style("filter",t=>e&&e[t.id()]?"url(#"+this.id()+"_glow)":null).transition().duration(this.transitionDuration()).on("end",function(t){e&&e[t.id()]&&t._placeholderElement.node()&&t._placeholderElement.node().parentNode&&t._placeholderElement.node().parentNode.appendChild(t._placeholderElement.node())}).style("opacity",function(r){return!e||e[r.id()]?1:t.highlight.opacity}),this}highlightEdges(e){const t=this;return this.svgE.selectAll(".graphEdge").classed("graphEdge-highlighted",function(t){return!e||e[t.id()]}).style("stroke-width",function(r){return e&&e[r.id()]?t.highlight.edge:"1px"}).transition().duration(this.transitionDuration()).style("opacity",function(r){return!e||e[r.id()]?1:t.highlight.opacity}),this}highlightVertex(e,t){if(this.highlightOnMouseOverVertex())if(t){const e=this.getNeighborMap(t);e.vertices[t.id()]=t,this.highlightVerticies(e.vertices),this.highlightEdges(e.edges)}else this.highlightVerticies(null),this.highlightEdges(null)}highlightEdge(e,t){if(this.highlightOnMouseOverEdge())if(t){const e={};e[t._sourceVertex.id()]=t._sourceVertex,e[t._targetVertex.id()]=t._targetVertex;const r={};r[t.id()]=t,this.highlightVerticies(e),this.highlightEdges(r)}else this.highlightVerticies(null),this.highlightEdges(null)}refreshIncidentEdges(e,t){this._graphData.nodeEdges(e.id()).forEach(e=>{this._graphData.edge(e).points([],!1,t)})}centroids(){return this._graphData.nodes().filter(e=>e.centroid())}selectionChanged(){if(this.highlightSelectedPathToCentroid()){const e={};this.centroids().forEach(t=>{this.selection().forEach(r=>{this._graphData.undirectedShortestPath(t.id(),r.id()).forEach(t=>{e[t.id()]=!0})})}),this.svgE.selectAll(".graphEdge").classed("shortest-path",t=>!0===e[t.id()])}}vertex_click(e,t,r,n){n&&n.vertex&&n.vertex._placeholderElement.node().parentNode.appendChild(n.vertex._placeholderElement.node()),O.prototype.vertex_click.apply(this,arguments)}vertex_dblclick(e,t,r,n){}vertex_contextmenu(e,t,r,n){}vertex_mouseover(e,t){this.highlightVertex(e,t)}vertex_mouseout(e,t){this.highlightVertex(null,null)}edge_mouseover(e,t){this.highlightEdge(e,t)}edge_mouseout(e,t){this.highlightEdge(null,null)}addMarkers(e=!1){e&&(this.defs.select("#"+this._id+"_arrowHead").remove(),this.defs.select("#"+this._id+"_circleFoot").remove(),this.defs.select("#"+this._id+"_circleHead").remove(),this.defs.select("#"+this._id+"_glow").remove()),this.defs.append("marker").attr("class","marker").attr("id",this._id+"_arrowHead").attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerWidth",8).attr("markerHeight",8).attr("markerUnits","strokeWidth").attr("orient","auto").append("polyline").attr("points","0,0 10,5 0,10 1,5"),this.defs.append("marker").attr("class","marker").attr("id",this._id+"_circleFoot").attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",7).attr("markerHeight",7).attr("markerUnits","strokeWidth").attr("orient","auto").append("circle").attr("cx",5).attr("cy",5).attr("r",4),this.defs.append("marker").attr("class","marker").attr("id",this._id+"_circleHead").attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",7).attr("markerHeight",7).attr("markerUnits","strokeWidth").attr("orient","auto").append("circle").attr("cx",5).attr("cy",5).attr("r",4)}progress(e){}};n(Km,"Graph"),i(Km,"Subgraph",Tm),i(Km,"Vertex",Vm),i(Km,"Edge",ve),i(Km,"profileID",0);let zm=Km;zm.prototype._class+=" graph_Graph",zm.prototype.implements(O.prototype),zm.prototype.implements(F.prototype),zm.prototype.publish("allowDragging",!0,"boolean","Allow Dragging of Vertices",null,{tags:["Advanced"]}),zm.prototype.publish("dragSingleNeighbors",!1,"boolean","Dragging a Vertex also moves its singleton neighbors",null,{tags:["Advanced"]}),zm.prototype.publish("layout","Circle","set","Default Layout",["Circle","ForceDirected","ForceDirected2","Hierarchy","None"],{tags:["Basic"]}),zm.prototype.publish("scale","100%","set","Zoom Level",["all","width","selection","100%","90%","75%","50%","25%","10%"],{tags:["Basic"]}),zm.prototype.publish("applyScaleOnLayout",!1,"boolean","Shrink to fit on Layout",null,{tags:["Basic"]}),zm.prototype.publish("highlightOnMouseOverVertex",!1,"boolean","Highlight Vertex on Mouse Over",null,{tags:["Basic"]}),zm.prototype.publish("highlightOnMouseOverEdge",!1,"boolean","Highlight Edge on Mouse Over",null,{tags:["Basic"]}),zm.prototype.publish("transitionDuration",250,"number","Transition Duration",null,{tags:["Intermediate"]}),zm.prototype.publish("showEdges",!0,"boolean","Show Edges",null,{tags:["Intermediate"]}),zm.prototype.publish("snapToGrid",0,"number","Snap to Grid",null,{tags:["Private"]}),zm.prototype.publish("selectionClearOnBackgroundClick",!1,"boolean","Clear selection on background click"),zm.prototype.publish("centroidColor","#00A000","html-color","Centroid Color",null,{tags:["Basic"]}),zm.prototype.publish("highlightSelectedPathToCentroid",!1,"boolean","Highlight path to Center Vertex (for selected vertices)",null,{tags:["Basic"]}),zm.prototype.publish("hierarchyRankDirection","TB","set","Direction for Rank Nodes",["TB","BT","LR","RL"],{tags:["Advanced"]}),zm.prototype.publish("hierarchyNodeSeparation",50,"number","Number of pixels that separate nodes horizontally in the layout",null,{tags:["Advanced"]}),zm.prototype.publish("hierarchyEdgeSeparation",10,"number","Number of pixels that separate edges horizontally in the layout",null,{tags:["Advanced"]}),zm.prototype.publish("hierarchyRankSeparation",50,"number","Number of pixels between each rank in the layout",null,{tags:["Advanced"]}),zm.prototype.publish("hierarchyDigraph",!0,"boolean","Directional Graph",null,{tags:["Advanced"]}),zm.prototype.publish("forceDirectedLinkDistance",300,"number","Target distance between linked nodes",null,{tags:["Advanced"]}),zm.prototype.publish("forceDirectedLinkStrength",1,"number","Strength (rigidity) of links",null,{tags:["Advanced"]}),zm.prototype.publish("forceDirectedFriction",.9,"number","Friction coefficient",null,{tags:["Advanced"]}),zm.prototype.publish("forceDirectedCharge",-25,"number","Charge strength ",null,{tags:["Advanced"]}),zm.prototype.publish("forceDirectedChargeDistance",1e4,"number","Maximum distance over which charge forces are applied",null,{tags:["Advanced"]}),zm.prototype.publish("forceDirectedTheta",.8,"number","Barnes–Hut approximation criterion",null,{tags:["Advanced"]}),zm.prototype.publish("forceDirectedGravity",.1,"number","Gravitational strength",null,{tags:["Advanced"]});const Wm=zm.prototype.scale;zm.prototype.scale=function(e,t){const r=Wm.apply(this,arguments);return arguments.length&&this.zoomTo(e,t),r};const Zm=class _Annotation extends w{_owner;owner(e){return arguments.length?(this._owner=e,this):this._owner}valid(){return!!this.iconColumn()}indexes(){const e=this._owner.columns();return{iconCol:e.indexOf(this.iconColumn()),iconFillCol:e.indexOf(this.iconFillColumn()),tooltipCol:e.indexOf(this.tooltipColumn()),shapeStrokeCol:e.indexOf(this.shapeStrokeColumn()),shapeFillCol:e.indexOf(this.shapeFillColumn())}}mapper(){const e=this.indexes();return t=>({faChar:t[e.iconCol],tooltip:t[e.tooltipCol],shape_colorFill:t[e.shapeFillCol]||this.shapeFillDefault(),shape_colorStroke:t[e.shapeStrokeCol]||this.shapeStrokeDefault(),image_colorFill:t[e.iconFillCol]||this.iconFillDefault()})}};n(Zm,"Annotation");let Um=Zm;Um.prototype._class+=" graph_Annotation",Um.prototype.publish("iconColumn","","set","Icon column",function(){return this._owner.columns()},{optional:!0}),Um.prototype.publish("iconFillDefault","white","html-color","Icon fill default color"),Um.prototype.publish("iconFillColumn","","set","Icon fill color column",function(){return this._owner.columns()},{optional:!0}),Um.prototype.publish("tooltipColumn","","set","Tooltip column",function(){return this._owner.columns()},{optional:!0}),Um.prototype.publish("shapeStrokeDefault","darkred","html-color","Shape stroke default color"),Um.prototype.publish("shapeStrokeColumn","","set","Shape stroke color column",function(){return this._owner.columns()},{optional:!0}),Um.prototype.publish("shapeFillDefault","red","html-color","Shape fill default color"),Um.prototype.publish("shapeFillColumn","","set","Shape fill color column",function(){return this._owner.columns()},{optional:!0});const $m=class _AdjacencyGraph extends zm{_vertexMap={};_edgeMap={};_prevAdjacencyDataHash;_merge=!1;_adjacencyData=[];constructor(){super()}linksColumns(){const e=this.columns().indexOf(this.linksColumn()),t=this._db.field(e);return t?t.children().map(e=>e.label()):[]}validAnnotations(){return this.annotations().filter(e=>e.valid())}updateData(){const e=B([this._adjacencyData,this.uidColumn(),this.labelColumn(),this.iconColumn(),this.linksColumn(),this.linkUidColumn(),this.linkLabelColumn(),this.validAnnotations().map(e=>e.hashSum())]);if(this._prevAdjacencyDataHash!==e){this._prevAdjacencyDataHash=e;const t=this.columns(),r=t.indexOf(this.uidColumn()),n=t.indexOf(this.labelColumn()),i=t.indexOf(this.iconColumn()),o=t.indexOf(this.linksColumn()),a=this.linksColumns(),s=a.indexOf(this.linkUidColumn()),u=a.indexOf(this.linkLabelColumn()),c=this.validAnnotations().map(e=>e.mapper()),h={},l={},f={vertices:this._adjacencyData.map(e=>{const t=e[r];if(void 0!==t){let r=h[t]||this._vertexMap[t];return r||(r=new Vm),h[t]=r,r.text(e[n]).data(e).faChar(e[i]).annotationIcons(c.map(t=>t(e))),r}}).filter(e=>!!e),edges:[]};for(const e of this._adjacencyData){const t=e[r],n=e[o];if(void 0!==t&&void 0!==n)for(const e of n){const r=e[s],n=e[u],i=`${t}->${r}`;let o=l[i]||this._edgeMap[i];o||(h[t]&&h[r]?o=(new ve).sourceVertex(h[t]).targetVertex(h[r]).data(e):console.warn("Missing vertices for edge: "+i)),o&&(o.text(n),l[i]=o,f.edges.push(o))}}this._vertexMap=h,this._edgeMap=l,super.data(f,this._merge)}}data(e,t){if(!arguments.length)return this._adjacencyData;if(e instanceof Array)return this._merge=t,this._adjacencyData=e,this;throw new Error("Invalid data shape.")}update(e,t){this.updateData(),super.update(e,t)}click(e,t,r){}};n($m,"AdjacencyGraph");let Xm=$m;function Ym(e,t){return e.sourceLinks.length?e.depth:t-1}function Qm(e){return function(){return e}}function Jm(e,t){return ev(e.source,t.source)||e.index-t.index}function Am(e,t){return ev(e.target,t.target)||e.index-t.index}function ev(e,t){return e.y0-t.y0}function tv(e){return e.value}function rv(e){return e.index}function nv(e){return e.nodes}function iv(e){return e.links}function ov(e,t){const r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function av({nodes:e}){for(const t of e){let e=t.y0,r=e;for(const n of t.sourceLinks)n.y0=e+n.width/2,e+=n.width;for(const n of t.targetLinks)n.y1=r+n.width/2,r+=n.width}}function sv(){let e,t,r,i=0,o=0,a=1,s=1,u=24,c=8,h=rv,l=Ym,f=nv,d=iv,p=6;function _(){const e={nodes:f.apply(null,arguments),links:d.apply(null,arguments)};return g(e),m(e),v(e),y(e),D(e),av(e),e}function g({nodes:e,links:t}){for(const[r,i]of e.entries())i.index=r,i.sourceLinks=[],i.targetLinks=[];const n=new Map(e.map((t,r)=>[h(t,r,e),t]));for(const[r,i]of t.entries()){i.index=r;let{source:e,target:t}=i;"object"!=typeof e&&(e=i.source=ov(n,e)),"object"!=typeof t&&(t=i.target=ov(n,t)),e.sourceLinks.push(i),t.targetLinks.push(i)}if(null!=r)for(const{sourceLinks:i,targetLinks:o}of e)i.sort(r),o.sort(r)}function m({nodes:e}){for(const t of e)t.value=void 0===t.fixedValue?Math.max(x(t.sourceLinks,tv),x(t.targetLinks,tv)):t.fixedValue}function v({nodes:e}){const t=e.length;let r=new Set(e),n=/* @__PURE__ */new Set,i=0;for(;r.size;){for(const e of r){e.depth=i;for(const{target:t}of e.sourceLinks)n.add(t)}if(++i>t)throw new Error("circular link");r=n,n=/* @__PURE__ */new Set}}function y({nodes:e}){const t=e.length;let r=new Set(e),n=/* @__PURE__ */new Set,i=0;for(;r.size;){for(const e of r){e.height=i;for(const{source:t}of e.targetLinks)n.add(t)}if(++i>t)throw new Error("circular link");r=n,n=/* @__PURE__ */new Set}}function b({nodes:e}){const r=E(e,e=>e.depth)+1,n=(a-i-u)/(r-1),o=new Array(r);for(const t of e){const e=Math.max(0,Math.min(r-1,Math.floor(l.call(null,t,r))));t.layer=e,t.x0=i+e*n,t.x1=t.x0+u,o[e]?o[e].push(t):o[e]=[t]}if(t)for(const i of o)i.sort(t);return o}function w(t){const r=k(t,t=>(s-o-(t.length-1)*e)/x(t,tv));for(const n of t){let t=o;for(const i of n){i.y0=t,i.y1=t+i.value*r,t=i.y1+e;for(const e of i.sourceLinks)e.width=e.value*r}t=(s-t+e)/(n.length+1);for(let e=0;e<n.length;++e){const r=n[e];r.y0+=t*(e+1),r.y1+=t*(e+1)}F(n)}}function D(t){const r=b(t);e=Math.min(c,(s-o)/(E(r,e=>e.length)-1)),w(r);for(let e=0;e<p;++e){const t=Math.pow(.99,e),n=Math.max(1-t,(e+1)/p);j(r,t,n),C(r,t,n)}}function C(e,r,n){for(let i=1,o=e.length;i<o;++i){const o=e[i];for(const e of o){let t=0,n=0;for(const{source:r,value:o}of e.targetLinks){let i=o*(e.layer-r.layer);t+=q(r,e)*i,n+=i}if(!(n>0))continue;let i=(t/n-e.y0)*r;e.y0+=i,e.y1+=i,O(e)}void 0===t&&o.sort(ev),B(o,n)}}function j(e,r,n){for(let i=e.length-2;i>=0;--i){const o=e[i];for(const e of o){let t=0,n=0;for(const{target:r,value:o}of e.sourceLinks){let i=o*(r.layer-e.layer);t+=S(e,r)*i,n+=i}if(!(n>0))continue;let i=(t/n-e.y0)*r;e.y0+=i,e.y1+=i,O(e)}void 0===t&&o.sort(ev),B(o,n)}}function B(t,r){const n=t.length>>1,i=t[n];I(t,i.y0-e,n-1,r),M(t,i.y1+e,n+1,r),I(t,s,t.length-1,r),M(t,o,0,r)}function M(t,r,n,i){for(;n<t.length;++n){const o=t[n],a=(r-o.y0)*i;a>1e-6&&(o.y0+=a,o.y1+=a),r=o.y1+e}}function I(t,r,n,i){for(;n>=0;--n){const o=t[n],a=(o.y1-r)*i;a>1e-6&&(o.y0-=a,o.y1-=a),r=o.y0-e}}function O({sourceLinks:e,targetLinks:t}){if(void 0===r){for(const{source:{sourceLinks:e}}of t)e.sort(Am);for(const{target:{targetLinks:t}}of e)t.sort(Jm)}}function F(e){if(void 0===r)for(const{sourceLinks:t,targetLinks:r}of e)t.sort(Am),r.sort(Jm)}function q(t,r){let n=t.y0-(t.sourceLinks.length-1)*e/2;for(const{target:i,width:o}of t.sourceLinks){if(i===r)break;n+=o+e}for(const{source:e,width:i}of r.targetLinks){if(e===t)break;n-=i}return n}function S(t,r){let n=r.y0-(r.targetLinks.length-1)*e/2;for(const{source:i,width:o}of r.targetLinks){if(i===t)break;n+=o+e}for(const{target:e,width:i}of t.sourceLinks){if(e===r)break;n-=i}return n}return n(_,"sankey"),_.update=function(e){return av(e),e},_.nodeId=function(e){return arguments.length?(h="function"==typeof e?e:Qm(e),_):h},_.nodeAlign=function(e){return arguments.length?(l="function"==typeof e?e:Qm(e),_):l},_.nodeSort=function(e){return arguments.length?(t=e,_):t},_.nodeWidth=function(e){return arguments.length?(u=+e,_):u},_.nodePadding=function(t){return arguments.length?(c=e=+t,_):c},_.nodes=function(e){return arguments.length?(f="function"==typeof e?e:Qm(e),_):f},_.links=function(e){return arguments.length?(d="function"==typeof e?e:Qm(e),_):d},_.linkSort=function(e){return arguments.length?(r=e,_):r},_.size=function(e){return arguments.length?(i=o=0,a=+e[0],s=+e[1],_):[a-i,s-o]},_.extent=function(e){return arguments.length?(i=+e[0][0],a=+e[1][0],o=+e[0][1],s=+e[1][1],_):[[i,o],[a,s]]},_.iterations=function(e){return arguments.length?(p=+e,_):p},n(g,"computeNodeLinks"),n(m,"computeNodeValues"),n(v,"computeNodeDepths"),n(y,"computeNodeHeights"),n(b,"computeNodeLayers"),n(w,"initializeNodeBreadths"),n(D,"computeNodeBreadths"),n(C,"relaxLeftToRight"),n(j,"relaxRightToLeft"),n(B,"resolveCollisions"),n(M,"resolveCollisionsTopToBottom"),n(I,"resolveCollisionsBottomToTop"),n(O,"reorderNodeLinks"),n(F,"reorderLinks"),n(q,"targetTop"),n(S,"sourceTop"),_}function uv(e){return[e.source.x1,e.y0]}function cv(e){return[e.target.x0,e.y1]}function hv(){return ce().source(uv).target(cv)}Xm.prototype._class+=" graph_AdjacencyGraph",Xm.prototype.publish("uidColumn","","set","UID column",function(){return this.columns()},{optional:!0}),Xm.prototype.publish("labelColumn","","set","Label column",function(){return this.columns()},{optional:!0}),Xm.prototype.publish("iconColumn","","set","Icon column",function(){return this.columns()},{optional:!0}),Xm.prototype.publish("linksColumn","","set","Links column",function(){return this.columns()},{optional:!0}),Xm.prototype.publish("linkUidColumn","","set","Link UID column",function(){return this.linksColumns()},{optional:!0}),Xm.prototype.publish("linkLabelColumn","","set","Link Label column",function(){return this.linksColumns()},{optional:!0}),Xm.prototype.publish("annotations",[],"propertyArray","Annotations",null,{autoExpand:Um}),n(Ym,"justify"),n(Qm,"constant"),n(Jm,"ascendingSourceBreadth"),n(Am,"ascendingTargetBreadth"),n(ev,"ascendingBreadth"),n(tv,"value"),n(rv,"defaultId"),n(nv,"defaultNodes"),n(iv,"defaultLinks"),n(ov,"find"),n(av,"computeLinkBreadths"),n(sv,"Sankey$1"),n(uv,"horizontalSource"),n(cv,"horizontalTarget"),n(hv,"d3SankeyLinkHorizontal");const lv={mean:C,median:D,min:k,max:E,sum:x},fv=class _SankeyColumn extends w{_owner;constructor(){super()}owner(e){return arguments.length?(this._owner=e,this):this._owner}valid(){return!!this.column()}aggregate(e){switch(this.aggrType()){case null:case void 0:case"":return e.length;default:const t=this._owner.columns().indexOf(this.aggrColumn());return lv[this.aggrType()](e,function(e){return+e[t]})}}};n(fv,"SankeyColumn");let dv=fv;dv.prototype._class+=" graph_Sankey.SankeyColumn",dv.prototype.publish("column",null,"set","Field",function(){return this._owner?this._owner.columns():[]},{optional:!0}),dv.prototype.publish("aggrType",null,"set","Aggregation Type",[null,"mean","median","sum","min","max"],{optional:!0,disable:/* @__PURE__ */n(e=>!e._owner||0===e._owner.mappings().indexOf(e),"disable")}),dv.prototype.publish("aggrColumn",null,"set","Aggregation Field",function(){return this._owner?this._owner.columns():[]},{optional:!0,disable:/* @__PURE__ */n(e=>!e._owner||!e.aggrType()||0===e._owner.mappings().indexOf(e),"disable")});const pv=class _Sankey extends o{Column;_d3Sankey;_d3SankeyPath;_selection;constructor(){super(),m.SimpleSelectionMixin.call(this,!1),this._drawStartPos="origin"}sankeyData(){const e={vertices:[],edges:[]};if(0===this.data().length)return e;const t={},r=this.mappings().filter(e=>e.valid());return r.forEach((r,n)=>{this._db.rollupView([r.column()]).entries().forEach(function(i){const o=r.column()+":"+n+":"+i.key;t[o]||(e.vertices.push({__id:o,__category:r.column(),name:i.key,origRow:i.value,value:i.value[n][2]}),t[o]=e.vertices.length-1)},this)}),r.forEach((n,i)=>{if(i<r.length-1){const o=r[i+1];this._db.rollupView([n.column(),o.column()]).entries().forEach(function(r){const a=n.column()+":"+i+":"+r.key;r.values.forEach(function(r){const n=o.column()+":"+(i+1)+":"+r.key;e.edges.push({__id:a+"_"+n,source:t[a],target:t[n],value:r.value[0][2]})})})}}),e}enter(e,t){super.enter(e,t),this._d3Sankey=new sv,this._selection.widgetElement(t)}update(e,t){super.update(e,t),this._palette=this._palette.switch(this.paletteID());const r=this.vertexStrokeWidth(),n=this.sankeyData(),i=2*r;this._d3Sankey.extent([[r,r],[this.width()-i,this.height()-i]]).nodeWidth(this.vertexWidth()).nodePadding(this.vertexPadding()),this._d3Sankey({nodes:n.vertices,links:n.edges});const o=this,a=t.selectAll(".link").data(n.edges);a.enter().append("path").attr("class","link").each(function(){d(this).append("title")}).merge(a).attr("d",hv()).style("stroke-width",function(e){return Math.max(1,e.width)}).sort(function(e,t){return t.width-e.width}).select("title").text(function(e){return e.source.name+" → "+e.target.name+"\n"+e.value}),a.exit().remove();const s=t.selectAll(".node").data(n.vertices);s.enter().append("g").attr("class","node").call(this._selection.enter.bind(this._selection)).on("click",function(e){o.click(o.rowToObj(e.origRow[0]),"",o._selection.selected(this))}).on("dblclick",function(e){o.dblclick(o.rowToObj(e.origRow[0]),"",o._selection.selected(this))}).each(function(){const e=d(this);e.append("rect"),e.append("text")}).merge(s).attr("transform",function(e){let t=0,n=0;return e.x0&&(t=e.x0),e.y0&&(n=e.y0),"translate("+(t+r)+","+(n+r)+")"}).each(function(){const e=d(this);e.select("rect").attr("height",function(e){return e.y1-e.y0}).attr("width",o._d3Sankey.nodeWidth()).style("fill",function(e){return o._palette(e.name)}).style("stroke",function(e){return o.vertexStrokeColor()}).style("stroke-width",function(e){return r}).style("cursor",o.xAxisMovement()||o.yAxisMovement()?null:"default"),e.select("text").attr("x",-6).attr("y",function(e){return(e.y1-e.y0)/2}).attr("dy",".35em").attr("text-anchor","end").attr("transform",null).text(function(e){return e.name}).filter(function(e){return e.x0<o.width()/2}).attr("x",6+o._d3Sankey.nodeWidth()).attr("text-anchor","start")}),s.exit().remove()}exit(e,t){super.exit(e,t)}click(e,t,r){}dblclick(e,t,r){}};n(pv,"Sankey");let _v=pv;function gv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function mv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?gv(Object(r),!0).forEach(function(t){yv(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gv(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function vv(e){return(vv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?/* @__PURE__ */n(function(e){return typeof e},"_typeof"):/* @__PURE__ */n(function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},"_typeof"))(e)}function yv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bv(){return bv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bv.apply(this,arguments)}function wv(e,t){if(e){if("string"==typeof e)return xv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xv(e,t):void 0}}function xv(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ev(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=wv(e))||t){r&&(e=r);var i=0,o=/* @__PURE__ */n(function(){},"F");return{s:o,n:/* @__PURE__ */n(function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},"n"),e:/* @__PURE__ */n(function(e){throw e},"e"),f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:/* @__PURE__ */n(function(){r=r.call(e)},"s"),n:/* @__PURE__ */n(function(){var e=r.next();return s=e.done,e},"n"),e:/* @__PURE__ */n(function(e){u=!0,a=e},"e"),f:/* @__PURE__ */n(function(){try{s||null==r.return||r.return()}finally{if(u)throw a}},"f")}}function kv(e,t){var r=[],i=[];function o(e,t){if(1===e.length)r.push(e[0]),i.push(e[0]);else{for(var n=Array(e.length-1),a=0;a<n.length;a++)0===a&&r.push(e[0]),a===n.length-1&&i.push(e[a+1]),n[a]=[(1-t)*e[a][0]+t*e[a+1][0],(1-t)*e[a][1]+t*e[a+1][1]];o(n,t)}}return n(o,"decasteljauRecurse"),e.length&&o(e,t),{left:r,right:i.reverse()}}function Dv(e){var t={};return 4===e.length&&(t.x2=e[2][0],t.y2=e[2][1]),e.length>=3&&(t.x1=e[1][0],t.y1=e[1][1]),t.x=e[e.length-1][0],t.y=e[e.length-1][1],4===e.length?t.type="C":3===e.length?t.type="Q":t.type="L",t}function Cv(e,t){for(var r=[],n=e,i=1/(t=t||2),o=0;o<t-1;o++){var a=kv(n,i/(1-i*o));r.push(a.left),n=a.right}return r.push(n),r}function jv(e,t,r){var n=[[e.x,e.y]];return null!=t.x1&&n.push([t.x1,t.y1]),null!=t.x2&&n.push([t.x2,t.y2]),n.push([t.x,t.y]),Cv(n,r).map(Dv)}_v.prototype._class+=" graph_Sankey",_v.prototype.Column=dv,_v.prototype.mixin(m.SimpleSelectionMixin),_v.prototype._palette=f.ordinal("default"),_v.prototype.publish("paletteID","default","set","Color palette for this widget",_v.prototype._palette.switch()),_v.prototype.publish("mappings",[],"propertyArray","Source Columns",null,{autoExpand:dv}),_v.prototype.publish("vertexStrokeWidth",1,"number","Vertex Stroke Width"),_v.prototype.publish("vertexStrokeColor","darkgray","string","Vertex Stroke Color"),_v.prototype.publish("vertexWidth",36,"number","Vertex Width"),_v.prototype.publish("vertexPadding",40,"number","Vertex Padding"),_v.prototype.publish("xAxisMovement",!1,"boolean","Enable x-axis movement"),_v.prototype.publish("yAxisMovement",!1,"boolean","Enable y-axis movement"),n(gv,"ownKeys"),n(mv,"_objectSpread2"),n(vv,"_typeof"),n(yv,"_defineProperty"),n(bv,"_extends"),n(wv,"_unsupportedIterableToArray"),n(xv,"_arrayLikeToArray"),n(Ev,"_createForOfIteratorHelper"),n(kv,"decasteljau"),n(Dv,"pointsToCommand"),n(Cv,"splitCurveAsPoints"),n(jv,"splitCurve");var Bv=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,Mv={M:["x","y"],L:["x","y"],H:["x"],V:["y"],C:["x1","y1","x2","y2","x","y"],S:["x2","y2","x","y"],Q:["x1","y1","x","y"],T:["x","y"],A:["rx","ry","xAxisRotation","largeArcFlag","sweepFlag","x","y"],Z:[]};function Iv(e,t){for(var r=Array(e),n=0;n<e;n++)r[n]=t;return r}function Ov(e){return"".concat(e.type).concat(Mv[e.type].map(function(t){return e[t]}).join(","))}function Fv(e,t){var r={x1:"x",y1:"y",x2:"x",y2:"y"},n=["xAxisRotation","largeArcFlag","sweepFlag"];if(e.type!==t.type&&"M"!==t.type.toUpperCase()){var i={};Object.keys(t).forEach(function(o){var a=t[o],s=e[o];void 0===s&&(n.includes(o)?s=a:(void 0===s&&r[o]&&(s=e[r[o]]),void 0===s&&(s=0))),i[o]=s}),i.type=t.type,e=i}return e}function qv(e,t,r){var n=[];if("L"===t.type||"Q"===t.type||"C"===t.type)n=n.concat(jv(e,t,r));else{var i=bv({},e);"M"===i.type&&(i.type="L"),(n=n.concat(Iv(r-1).map(function(){return i}))).push(t)}return n}function Sv(e,t,r){var n=e.length-1,i=t.length-1,o=n/i,a=Iv(i).reduce(function(t,n,i){var a=Math.floor(o*i);if(r&&a<e.length-1&&r(e[a],e[a+1])){var s=o*i%1<.5;t[a]&&(s?a>0?a-=1:a<e.length-1&&(a+=1):a<e.length-1?a+=1:a>0&&(a-=1))}return t[a]=(t[a]||0)+1,t},[]).reduce(function(t,r,n){if(n===e.length-1){var i=Iv(r,bv({},e[e.length-1]));return"M"===i[0].type&&i.forEach(function(e){e.type="L"}),t.concat(i)}return t.concat(qv(e[n],e[n+1],r))},[]);return a.unshift(e[0]),a}function Nv(e){for(var t,r,n=(e||"").match(Bv)||[],i=[],o=0;o<n.length;++o)if(t=Mv[n[o]]){r={type:n[o]};for(var a=0;a<t.length;++a)r[t[a]]=+n[o+a+1];o+=t.length,i.push(r)}return i}function Pv(e,t,r){var i=null==e?[]:e.slice(),o=null==t?[]:t.slice(),a="object"===vv(r)?r:{excludeSegment:r,snapEndsToInput:!0},s=a.excludeSegment,u=a.snapEndsToInput;if(!i.length&&!o.length)/* @__PURE__ */
3
3
  return n(function(){return[]},"nullInterpolator");var c=!(0!==i.length&&"Z"!==i[i.length-1].type||0!==o.length&&"Z"!==o[o.length-1].type);i.length>0&&"Z"===i[i.length-1].type&&i.pop(),o.length>0&&"Z"===o[o.length-1].type&&o.pop(),i.length?o.length||o.push(i[0]):i.push(o[0]),0!==Math.abs(o.length-i.length)&&(o.length>i.length?i=Sv(i,o,s):o.length<i.length&&(o=Sv(o,i,s)));var h=(i=i.map(function(e,t){return Fv(e,o[t])})).map(function(e){return mv({},e)});return c&&(h.push({type:"Z"}),i.push({type:"Z"})),/* @__PURE__ */n(function(e){if(1===e&&u)return null==t?[]:t;if(0===e)return i;for(var r=0;r<h.length;++r){var n,a=i[r],s=o[r],c=h[r],l=Ev(Mv[c.type]);try{for(l.s();!(n=l.n()).done;){var f=n.value;c[f]=(1-e)*a[f]+e*s[f],"largeArcFlag"!==f&&"sweepFlag"!==f||(c[f]=Math.round(c[f]))}}catch(d){l.e(d)}finally{l.f()}}return h},"pathCommandInterpolator")}function Rv(e,t,r){var i=Nv(e),o=Nv(t),a="object"===vv(r)?r:{excludeSegment:r,snapEndsToInput:!0},s=a.excludeSegment,u=a.snapEndsToInput;if(!i.length&&!o.length)/* @__PURE__ */
4
4
  return n(function(){return""},"nullInterpolator");var c=Pv(i,o,{excludeSegment:s,snapEndsToInput:u});/* @__PURE__ */
@@ -65,6 +65,6 @@ ${f}
65
65
  <g transform="translate(${l.extent.width/2+v} ${g-y})">
66
66
  ${l}
67
67
  </g>
68
- `,f.extent.width,f.extent.height,(e,t)=>h.intersection({x:e.x,y:g+e.y},t)??f.intersection({x:e.x,y:e.y},t))},"vertex"),kw=c(({graphInstance:e,strokeWidth:t,path:r})=>Cb`<path d="${r}" marker-start="url(#${e.id()}_source${e.sourceMarker()})" marker-end="url(#${e.id()}_target${e.targetMarker()})" style="stroke-width:${t}px"></path>`,"edge"),Dw=class _GraphHtml extends xw{constructor(){super(void 0,Ew,kw)}};c(Dw,"GraphHtml");let Cw=Dw;Cw.prototype._class+=" graph_GraphHtml";const jw=c(({label:e="",labelFill:t="black",labelHeight:r=12,width:n=0,height:o=0,rectFill:a,rectStroke:s="#627ae7",rectStrokeWidth:u=2})=>i.React.createElement("g",{transform:`translate(${-n/2} ${-o/2})`},i.React.createElement("rect",{width:n,height:o,fill:a,stroke:s,style:{strokeWidth:u}}),i.React.createElement("g",{transform:`translate(8 ${8+r})`},i.React.createElement(i.Text,{text:e,fill:t,height:r}))),"BasicSubgraph"),Bw=c(({text:e,textFill:t="black",textHeight:r=12,scale:n=1,circleRadius:o=16,circleFill:a="#a2bcf9",circleStroke:s="#627ae7",circleStrokeWidth:u=2})=>i.React.createElement("g",{transform:`scale(${n})`},i.React.createElement("circle",{cx:"0",cy:"0",r:o,fill:a,stroke:s,style:{strokeWidth:u}}),i.React.createElement("g",{transform:`translate(0 ${o+r})`},i.React.createElement(i.Text,{text:e,fill:t,height:r}))),"BasicVertex");e.AdjacencyGraph=mm,e.Annotation=_m,e.AnnotationColumn=tb,e.BUILD_VERSION="3.16.0",e.BasicSubgraph=jw,e.BasicVertex=Bw,e.DEFAULT_SHAPE_SIZE=iw,e.DataGraph=nb,e.Edge=L,e.Graph=fm,e.Graph2=Qy,e.GraphHtml=Cw,e.GraphReact=Jy,e.GraphReactT=Xy,e.GraphT=zy,e.Image=pw,e.ImageChar=_w,e.PKG_NAME="@hpcc-js/graph",e.PKG_VERSION="3.5.2",e.Sankey=Rm,e.SankeyColumn=Nm,e.SankeyGraph=ob,e.Subgraph=um,e.Text=hw,e.TextLine=cw,e.Vertex=hm,e.annotation=fw,e.annotations=dw,e.circle=ow,e.graphviz=Zy,e.icon=gw,e.rectangle=aw,e.shape=uw,e.square=sw,e.toJsonObj=Ay,e.vertex=Ew,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
68
+ `,f.extent.width,f.extent.height,(e,t)=>h.intersection({x:e.x,y:g+e.y},t)??f.intersection({x:e.x,y:e.y},t))},"vertex"),kw=c(({graphInstance:e,strokeWidth:t,path:r})=>Cb`<path d="${r}" marker-start="url(#${e.id()}_source${e.sourceMarker()})" marker-end="url(#${e.id()}_target${e.targetMarker()})" style="stroke-width:${t}px"></path>`,"edge"),Dw=class _GraphHtml extends xw{constructor(){super(void 0,Ew,kw)}};c(Dw,"GraphHtml");let Cw=Dw;Cw.prototype._class+=" graph_GraphHtml";const jw=c(({label:e="",labelFill:t="black",labelHeight:r=12,width:n=0,height:o=0,rectFill:a,rectStroke:s="#627ae7",rectStrokeWidth:u=2})=>i.React.createElement("g",{transform:`translate(${-n/2} ${-o/2})`},i.React.createElement("rect",{width:n,height:o,fill:a,stroke:s,style:{strokeWidth:u}}),i.React.createElement("g",{transform:`translate(8 ${8+r})`},i.React.createElement(i.Text,{text:e,fill:t,height:r}))),"BasicSubgraph"),Bw=c(({text:e,textFill:t="black",textHeight:r=12,scale:n=1,circleRadius:o=16,circleFill:a="#a2bcf9",circleStroke:s="#627ae7",circleStrokeWidth:u=2})=>i.React.createElement("g",{transform:`scale(${n})`},i.React.createElement("circle",{cx:"0",cy:"0",r:o,fill:a,stroke:s,style:{strokeWidth:u}}),i.React.createElement("g",{transform:`translate(0 ${o+r})`},i.React.createElement(i.Text,{text:e,fill:t,height:r}))),"BasicVertex");e.AdjacencyGraph=mm,e.Annotation=_m,e.AnnotationColumn=tb,e.BUILD_VERSION="3.16.1",e.BasicSubgraph=jw,e.BasicVertex=Bw,e.DEFAULT_SHAPE_SIZE=iw,e.DataGraph=nb,e.Edge=L,e.Graph=fm,e.Graph2=Qy,e.GraphHtml=Cw,e.GraphReact=Jy,e.GraphReactT=Xy,e.GraphT=zy,e.Image=pw,e.ImageChar=_w,e.PKG_NAME="@hpcc-js/graph",e.PKG_VERSION="3.5.3",e.Sankey=Rm,e.SankeyColumn=Nm,e.SankeyGraph=ob,e.Subgraph=um,e.Text=hw,e.TextLine=cw,e.Vertex=hm,e.annotation=fw,e.annotations=dw,e.circle=ow,e.graphviz=Zy,e.icon=gw,e.rectangle=aw,e.shape=uw,e.square=sw,e.toJsonObj=Ay,e.vertex=Ew,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
69
69
  //# sourceMappingURL=index.umd.cjs.map
70
70
  !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".graph_Edge{fill:none;stroke:#656565;stroke-width:1px}.graph_Edge .common_TextBox .common_Text{fill:#000;stroke:none}.graph_Edge .common_TextBox .common_Shape{fill:#fff;stroke:none}.graph_Edge.selected{stroke:red!important}.graph_Edge.selected .common_Text{fill:red!important}.graph_Subgraph .border{fill:none;stroke:#1f77b4;stroke-width:1px;pointer-events:none}.graph_Subgraph.selected>rect{stroke:red!important}.graph_Vertex.selected .common_Shape{stroke:red!important}.graph_Graph .marker{fill:#656565;stroke:none;stroke-width:1px}.graph_Graph .zoom{fill:none;pointer-events:all}.graph_Graph .selectionBrush{fill:none;stroke:#a9a9a9}.graph_Graph .graphEdge.shortest-path .graph_Edge{stroke:red}.graph_Sankey .node rect{cursor:move;fill-opacity:.9;shape-rendering:crispEdges;stroke:#a9a9a9}.graph_Sankey .node.selected rect{stroke:red}.graph_Sankey .node.over rect{stroke:orange}.graph_Sankey .node.selected.over rect{stroke:red}.graph_Sankey .node text{pointer-events:none;text-shadow:0 1px 0 #fff}.graph_Sankey .node.selected text{fill:red}.graph_Sankey .node.over text{fill:orange}.graph_Sankey .node.selected.over text{fill:red}.graph_Sankey .link{fill:none;stroke:#000;stroke-opacity:.2}.graph_Sankey .link:hover{stroke-opacity:.5}.graph_GraphT .graphVertex,.graph_GraphT .allowDragging .graphVertex{cursor:pointer}.graph_GraphT .allowDragging .graphVertex.grabbed{cursor:grabbing}.graph_GraphT .graphEdge{stroke:#a9a9a9;fill:none}.graph_GraphT .graphEdge>text{stroke:none;fill:#000}.graph_GraphT .graphEdge.hide-text>text{display:none}.graph_GraphT g.selected rect{stroke:navy!important}.graph_GraphT g.selected circle{stroke:navy!important}.graph_SankeyGraph .node rect{cursor:move;fill-opacity:.9;shape-rendering:crispEdges;stroke:#a9a9a9}.graph_SankeyGraph .node.selected rect{stroke:red}.graph_SankeyGraph .node.over rect{stroke:orange}.graph_SankeyGraph .node.selected.over rect{stroke:red}.graph_SankeyGraph .node text{pointer-events:none;text-shadow:0 1px 0 #fff}.graph_SankeyGraph .node.selected text{fill:red}.graph_SankeyGraph .node.over text{fill:orange}.graph_SankeyGraph .node.selected.over text{fill:red}.graph_SankeyGraph .link{fill:none;stroke:#000;stroke-opacity:.2}.graph_SankeyGraph .link:hover{stroke-opacity:.5}")),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}}();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hpcc-js/graph",
3
- "version": "3.5.2",
3
+ "version": "3.5.3",
4
4
  "description": "hpcc-js - Viz Graph",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.cjs",
@@ -38,11 +38,11 @@
38
38
  "update-major": "npx --yes npm-check-updates -u"
39
39
  },
40
40
  "dependencies": {
41
- "@hpcc-js/api": "^3.4.2",
42
- "@hpcc-js/common": "^3.5.2",
43
- "@hpcc-js/html": "^3.3.2",
44
- "@hpcc-js/react": "^3.4.2",
45
- "@hpcc-js/util": "^3.4.2"
41
+ "@hpcc-js/api": "^3.4.3",
42
+ "@hpcc-js/common": "^3.5.3",
43
+ "@hpcc-js/html": "^3.3.3",
44
+ "@hpcc-js/react": "^3.4.3",
45
+ "@hpcc-js/util": "^3.4.3"
46
46
  },
47
47
  "optionalPeerDependencies": {
48
48
  "react": ">=17.0.0"
@@ -73,5 +73,5 @@
73
73
  "url": "https://github.com/hpcc-systems/Visualization/issues"
74
74
  },
75
75
  "homepage": "https://github.com/hpcc-systems/Visualization",
76
- "gitHead": "5e5fc8d746e6a42c58da2ec4f55f2f7cbaeff611"
76
+ "gitHead": "0289b8552e19395a8da9b70a154821cf70ce42e7"
77
77
  }