@hpcc-js/graph 2.80.0 → 2.80.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.min.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@hpcc-js/common"),require("@hpcc-js/util"),require("@hpcc-js/api"),require("@hpcc-js/react"),require("@hpcc-js/html")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common","@hpcc-js/util","@hpcc-js/api","@hpcc-js/react","@hpcc-js/html"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@hpcc-js/graph"]={},e["@hpcc-js/common"],e["@hpcc-js/util"],e["@hpcc-js/api"],e["@hpcc-js/react"],e["@hpcc-js/html"])}(this,(function(e,t,r,n,o,i){"use strict";var a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},a(e,t)};function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var u=function(){return u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},u.apply(this,arguments)};function c(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function h(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var f=Math.PI,d=2*f,p=1e-6,g=d-p;function v(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function y(){return new v}function _(e){return function(){return e}}v.prototype=y.prototype={constructor:v,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,o,i){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+o)+","+(this._y1=+i)},arcTo:function(e,t,r,n,o){e=+e,t=+t,r=+r,n=+n,o=+o;var i=this._x1,a=this._y1,s=r-e,u=n-t,c=i-e,h=a-t,l=c*c+h*h;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(l>p)if(Math.abs(h*s-u*c)>p&&o){var d=r-i,g=n-a,v=s*s+u*u,y=d*d+g*g,_=Math.sqrt(v),m=Math.sqrt(l),b=o*Math.tan((f-Math.acos((v+l-y)/(2*_*m)))/2),w=b/m,x=b/_;Math.abs(w-1)>p&&(this._+="L"+(e+w*c)+","+(t+w*h)),this._+="A"+o+","+o+",0,0,"+ +(h*d>c*g)+","+(this._x1=e+x*s)+","+(this._y1=t+x*u)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,r,n,o,i){e=+e,t=+t,i=!!i;var a=(r=+r)*Math.cos(n),s=r*Math.sin(n),u=e+a,c=t+s,h=1^i,l=i?n-o:o-n;if(r<0)throw new Error("negative radius: "+r);null===this._x1?this._+="M"+u+","+c:(Math.abs(this._x1-u)>p||Math.abs(this._y1-c)>p)&&(this._+="L"+u+","+c),r&&(l<0&&(l=l%d+d),l>g?this._+="A"+r+","+r+",0,1,"+h+","+(e-a)+","+(t-s)+"A"+r+","+r+",0,1,"+h+","+(this._x1=u)+","+(this._y1=c):l>p&&(this._+="A"+r+","+r+",0,"+ +(l>=f)+","+h+","+(this._x1=e+r*Math.cos(o))+","+(this._y1=t+r*Math.sin(o))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};function m(e){this._context=e}function b(e){return new m(e)}function w(e){return e[0]}function x(e){return e[1]}function E(){var e=w,t=x,r=_(!0),n=null,o=b,i=null;function a(a){var s,u,c,h=a.length,l=!1;for(null==n&&(i=o(c=y())),s=0;s<=h;++s)!(s<h&&r(u=a[s],s,a))===l&&((l=!l)?i.lineStart():i.lineEnd()),l&&i.point(+e(u,s,a),+t(u,s,a));if(c)return i=null,c+""||null}return a.x=function(t){return arguments.length?(e="function"==typeof t?t:_(+t),a):e},a.y=function(e){return arguments.length?(t="function"==typeof e?e:_(+e),a):t},a.defined=function(e){return arguments.length?(r="function"==typeof e?e:_(!!e),a):r},a.curve=function(e){return arguments.length?(o=e,null!=n&&(i=o(n)),a):o},a.context=function(e){return arguments.length?(null==e?n=i=null:i=o(n=e),a):n},a}m.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point: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)}}};var k=Array.prototype.slice;function S(e){return e.source}function D(e){return e.target}function C(e,t,r,n,o){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,o,n,o)}function A(){return function(e){var t=S,r=D,n=w,o=x,i=null;function a(){var a,s=k.call(arguments),u=t.apply(this,s),c=r.apply(this,s);if(i||(i=a=y()),e(i,+n.apply(this,(s[0]=u,s)),+o.apply(this,s),+n.apply(this,(s[0]=c,s)),+o.apply(this,s)),a)return i=null,a+""||null}return a.source=function(e){return arguments.length?(t=e,a):t},a.target=function(e){return arguments.length?(r=e,a):r},a.x=function(e){return arguments.length?(n="function"==typeof e?e:_(+e),a):n},a.y=function(e){return arguments.length?(o="function"==typeof e?e:_(+e),a):o},a.context=function(e){return arguments.length?(i=null==e?null:e,a):i},a}(C)}function j(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 O(e){this._context=e}function I(e){return new O(e)}function M(e,t){this._basis=new O(e),this._beta=t}O.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:j(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},point: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:j(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},M.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n,o=e[0],i=t[0],a=e[r]-o,s=t[r]-i,u=-1;++u<=r;)n=u/r,this._basis.point(this._beta*e[u]+(1-this._beta)*(o+n*a),this._beta*t[u]+(1-this._beta)*(i+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};(function e(t){function r(e){return 1===t?new O(e):new M(e,t)}return r.beta=function(t){return e(+t)},r})(.85);function F(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 P(e,t){this._context=e,this._k=(1-t)/6}P.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:F(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point: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:F(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}};var T=function e(t){function r(e){return new P(e,t)}return r.tension=function(t){return e(+t)},r}(0);function N(e,t){this._context=e,this._alpha=t}N.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(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;default:!function(e,t,r){var n=e._x1,o=e._y1,i=e._x2,a=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,o=(o*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>1e-12){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);i=(i*c+e._x1*e._l23_2a-t*e._l12_2a)/h,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(n,o,i,a,e._x2,e._y2)}(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};(function e(t){function r(e){return t?new N(e,t):new P(e,0)}return r.alpha=function(t){return e(+t)},r})(.5);function L(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}L(".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}");var Y=I,R=function(e){function r(){var r=e.call(this)||this;return r._points=[],r._weight=100,r._strokeDasharray=null,r._hidden=!1,r._textBox=(new t.TextBox).padding(0),r}return s(r,e),r.prototype.graphID=function(e){return arguments.length?(this._graphID=e,this):this._graphID},r.prototype.sourceVertex=function(e){return arguments.length?(this._sourceVertex=e,this):this._sourceVertex},r.prototype.targetVertex=function(e){return arguments.length?(this._targetVertex=e,this):this._targetVertex},r.prototype.weight=function(e){return arguments.length?(this._weight=e,this):this._weight},r.prototype.points=function(e,t,r){return arguments.length?(this._points=e,this._elementPath&&this.update(null,this._element,t,r),this):this._points},r.prototype.hidden=function(e){return arguments.length?(this._hidden=e,this):this._hidden},r.prototype.text=function(e){return arguments.length?(this._textBox.text(e),this):this._textBox.text()},r.prototype.enter=function(t,r){e.prototype.enter.call(this,t,r),this._elementPath=r.append("path"),this._textBox.text()&&this._textBox.target(t).tooltip(this.tooltip()).render()},r.prototype.update=function(r,n,o,i){e.prototype.update.call(this,r,n);var a=this;t.Platform.svgMarkerGlitch&&!i&&n.transition().duration((o||0)+100).on("start",(function(){a._pushMarkers(n)})).on("end",(function(){a._popMarkers(n)}));var s=a._calculateEdgePoints(this._sourceVertex,this._targetVertex,this._points),u=n.selectAll(".point2").data(this.showControlPoints()?s:[]);u.enter().append("circle").attr("class","point2").style("stroke","red").merge(u).attr("cx",(function(e){return e.x})).attr("cy",(function(e){return e.y})).attr("r",1),u.exit().remove();var c=E().x((function(e){return e.x})).y((function(e){return e.y})).curve(Y)(s),h=this._elementPath;o&&(h=h.transition().duration(o)),h.attr("opacity",this._hidden?0:1).attr("marker-start",t.Platform.svgMarkerGlitch&&i||!this.sourceMarker_exists()?null:"url(#"+this._graphID+"_"+this.sourceMarker()+"Foot)").attr("marker-end",t.Platform.svgMarkerGlitch&&i||!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",c),this._textBox.text()&&this._textBox.tooltip(this.tooltip()).move(this._findMidPoint(s),o)},r.prototype.exit=function(t,r){this._textBox&&this._textBox.target(null),e.prototype.exit.call(this,t,r)},r.prototype._findMidPoint=function(e){var t=e.length/2;if(e.length%2)return e[Math.floor(t)];if(e.length){var 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}},r.prototype._calculateEdgePoints=function(e,t,r){if(!e||!t)return[{x:0,y:0},{x:0,y:0}];var n=r?r.filter((function(r){return!e.contains(r)&&!t.contains(r)})):[],o=0===n.length?t.pos():n[0],i=0===n.length?e.pos():n[n.length-1];if(n.unshift(e.intersection(e._pos,o)),n.push(t.intersection(t._pos,i)),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]){var a=n[0].x-n[1].x,s=n[0].y-n[1].y;if(Math.sqrt(a*a+s*s))if(this.showArc()){var u=(n[0].x+n[1].x)/2-s*this.arcDepth()/100,c=(n[0].y+n[1].y)/2+a*this.arcDepth()/100;n=[{x:n[0].x,y:n[0].y},{x:u,y:c},{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},r}(t.SVGWidget);R.prototype._class+=" graph_Edge",R.prototype.publish("arcDepth",16,"number","Arc Depth",null,{tags:["Basic"]}),R.prototype.publish("showControlPoints",!1,"boolean","Show/Hide Control Points",null,{tags:["Basic"]}),R.prototype.publish("showArc",!0,"boolean","Show/Hide Arc",null,{tags:["Basic"]}),R.prototype.publish("tooltip","","string","Tooltip",null,{tags:["Private"]}),R.prototype.publish("sourceMarker","circle","set","Source Marker",["none","circle"],{optional:!0}),R.prototype.publish("targetMarker","arrow","set","Source Marker",["none","arrow","circle"],{optional:!0}),R.prototype.publish("strokeDasharray",null,"string","Stroke Dash Array",null,{optional:!0}),R.prototype.publish("strokeColor",null,"html-color","Stroke Color",null,{optional:!0}),R.prototype.publish("textColor",null,"html-color","Text Color",null,{optional:!0}),R.prototype.publishProxy("text_shape_colorFill","_textBox","shape_colorFill"),R.prototype.publishProxy("text_shape_colorStroke","_textBox","shape_colorStroke"),R.prototype.publishProxy("text_text_colorFill","_textBox","text_colorFill");var B="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var z=function(){this.__data__=[],this.size=0};var V=function(e,t){return e===t||e!=e&&t!=t},G=V;var H=function(e,t){for(var r=e.length;r--;)if(G(e[r][0],t))return r;return-1},U=H,W=Array.prototype.splice;var q=function(e){var t=this.__data__,r=U(t,e);return!(r<0)&&(r==t.length-1?t.pop():W.call(t,r,1),--this.size,!0)},X=H;var K=function(e){var t=this.__data__,r=X(t,e);return r<0?void 0:t[r][1]},$=H;var J=H;var Q=function(e,t){var r=this.__data__,n=J(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Z=z,ee=q,te=K,re=function(e){return $(this.__data__,e)>-1},ne=Q;function oe(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])}}oe.prototype.clear=Z,oe.prototype.delete=ee,oe.prototype.get=te,oe.prototype.has=re,oe.prototype.set=ne;var ie=oe,ae=ie;var se=function(){this.__data__=new ae,this.size=0};var ue=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r};var ce=function(e){return this.__data__.get(e)};var he=function(e){return this.__data__.has(e)},le="object"==typeof B&&B&&B.Object===Object&&B,fe=le,de="object"==typeof self&&self&&self.Object===Object&&self,pe=fe||de||Function("return this")(),ge=pe.Symbol,ve=ge,ye=Object.prototype,_e=ye.hasOwnProperty,me=ye.toString,be=ve?ve.toStringTag:void 0;var we=function(e){var t=_e.call(e,be),r=e[be];try{e[be]=void 0;var n=!0}catch(e){}var o=me.call(e);return n&&(t?e[be]=r:delete e[be]),o},xe=Object.prototype.toString;var Ee=function(e){return xe.call(e)},ke=we,Se=Ee,De=ge?ge.toStringTag:void 0;var Ce=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":De&&De in Object(e)?ke(e):Se(e)};var Ae=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},je=Ce,Oe=Ae;var Ie,Me=function(e){if(!Oe(e))return!1;var t=je(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Fe=pe["__core-js_shared__"],Pe=(Ie=/[^.]+$/.exec(Fe&&Fe.keys&&Fe.keys.IE_PROTO||""))?"Symbol(src)_1."+Ie:"";var Te=function(e){return!!Pe&&Pe in e},Ne=Function.prototype.toString;var Le=function(e){if(null!=e){try{return Ne.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Ye=Me,Re=Te,Be=Ae,ze=Le,Ve=/^\[object .+?Constructor\]$/,Ge=Function.prototype,He=Object.prototype,Ue=Ge.toString,We=He.hasOwnProperty,qe=RegExp("^"+Ue.call(We).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Xe=function(e){return!(!Be(e)||Re(e))&&(Ye(e)?qe:Ve).test(ze(e))};var Ke=Xe,$e=function(e,t){return null==e?void 0:e[t]};var Je=function(e,t){var r=$e(e,t);return Ke(r)?r:void 0},Qe=Je(pe,"Map"),Ze=Je(Object,"create"),et=Ze;var tt=function(){this.__data__=et?et(null):{},this.size=0};var rt=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},nt=Ze,ot=Object.prototype.hasOwnProperty;var it=function(e){var t=this.__data__;if(nt){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return ot.call(t,e)?t[e]:void 0},at=Ze,st=Object.prototype.hasOwnProperty;var ut=Ze;var ct=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ut&&void 0===t?"__lodash_hash_undefined__":t,this},ht=tt,lt=rt,ft=it,dt=function(e){var t=this.__data__;return at?void 0!==t[e]:st.call(t,e)},pt=ct;function gt(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])}}gt.prototype.clear=ht,gt.prototype.delete=lt,gt.prototype.get=ft,gt.prototype.has=dt,gt.prototype.set=pt;var vt=gt,yt=ie,_t=Qe;var mt=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},bt=mt;var wt=function(e,t){var r=e.__data__;return bt(t)?r["string"==typeof t?"string":"hash"]:r.map},xt=wt;var Et=wt;var kt=wt;var St=wt;var Dt=function(e,t){var r=St(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Ct=function(){this.size=0,this.__data__={hash:new vt,map:new(_t||yt),string:new vt}},At=function(e){var t=xt(this,e).delete(e);return this.size-=t?1:0,t},jt=function(e){return Et(this,e).get(e)},Ot=function(e){return kt(this,e).has(e)},It=Dt;function Mt(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])}}Mt.prototype.clear=Ct,Mt.prototype.delete=At,Mt.prototype.get=jt,Mt.prototype.has=Ot,Mt.prototype.set=It;var Ft=Mt,Pt=ie,Tt=Qe,Nt=Ft;var Lt=function(e,t){var r=this.__data__;if(r instanceof Pt){var n=r.__data__;if(!Tt||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Nt(n)}return r.set(e,t),this.size=r.size,this},Yt=ie,Rt=se,Bt=ue,zt=ce,Vt=he,Gt=Lt;function Ht(e){var t=this.__data__=new Yt(e);this.size=t.size}Ht.prototype.clear=Rt,Ht.prototype.delete=Bt,Ht.prototype.get=zt,Ht.prototype.has=Vt,Ht.prototype.set=Gt;var Ut=Ht;var Wt=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e},qt=Je,Xt=function(){try{var e=qt(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Kt=Xt;var $t=function(e,t,r){"__proto__"==t&&Kt?Kt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},Jt=$t,Qt=V,Zt=Object.prototype.hasOwnProperty;var er=function(e,t,r){var n=e[t];Zt.call(e,t)&&Qt(n,r)&&(void 0!==r||t in e)||Jt(e,t,r)},tr=er,rr=$t;var nr=function(e,t,r,n){var o=!r;r||(r={});for(var i=-1,a=t.length;++i<a;){var s=t[i],u=n?n(r[s],e[s],s,r,e):void 0;void 0===u&&(u=e[s]),o?rr(r,s,u):tr(r,s,u)}return r};var or=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n};var ir=function(e){return null!=e&&"object"==typeof e},ar=Ce,sr=ir;var ur=function(e){return sr(e)&&"[object Arguments]"==ar(e)},cr=ur,hr=ir,lr=Object.prototype,fr=lr.hasOwnProperty,dr=lr.propertyIsEnumerable,pr=cr(function(){return arguments}())?cr:function(e){return hr(e)&&fr.call(e,"callee")&&!dr.call(e,"callee")},gr=pr,vr=Array.isArray,yr={exports:{}};var _r=function(){return!1};!function(e,t){var r=pe,n=_r,o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,s=(a?a.isBuffer:void 0)||n;e.exports=s}(yr,yr.exports);var mr=/^(?:0|[1-9]\d*)$/;var br=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&mr.test(e))&&e>-1&&e%1==0&&e<t};var wr=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},xr=Ce,Er=wr,kr=ir,Sr={};Sr["[object Float32Array]"]=Sr["[object Float64Array]"]=Sr["[object Int8Array]"]=Sr["[object Int16Array]"]=Sr["[object Int32Array]"]=Sr["[object Uint8Array]"]=Sr["[object Uint8ClampedArray]"]=Sr["[object Uint16Array]"]=Sr["[object Uint32Array]"]=!0,Sr["[object Arguments]"]=Sr["[object Array]"]=Sr["[object ArrayBuffer]"]=Sr["[object Boolean]"]=Sr["[object DataView]"]=Sr["[object Date]"]=Sr["[object Error]"]=Sr["[object Function]"]=Sr["[object Map]"]=Sr["[object Number]"]=Sr["[object Object]"]=Sr["[object RegExp]"]=Sr["[object Set]"]=Sr["[object String]"]=Sr["[object WeakMap]"]=!1;var Dr=function(e){return kr(e)&&Er(e.length)&&!!Sr[xr(e)]};var Cr=function(e){return function(t){return e(t)}},Ar={exports:{}};!function(e,t){var r=le,n=t&&!t.nodeType&&t,o=n&&e&&!e.nodeType&&e,i=o&&o.exports===n&&r.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=a}(Ar,Ar.exports);var jr=Dr,Or=Cr,Ir=Ar.exports,Mr=Ir&&Ir.isTypedArray,Fr=Mr?Or(Mr):jr,Pr=or,Tr=gr,Nr=vr,Lr=yr.exports,Yr=br,Rr=Fr,Br=Object.prototype.hasOwnProperty;var zr=function(e,t){var r=Nr(e),n=!r&&Tr(e),o=!r&&!n&&Lr(e),i=!r&&!n&&!o&&Rr(e),a=r||n||o||i,s=a?Pr(e.length,String):[],u=s.length;for(var c in e)!t&&!Br.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Yr(c,u))||s.push(c);return s},Vr=Object.prototype;var Gr=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Vr)};var Hr=function(e,t){return function(r){return e(t(r))}},Ur=Hr(Object.keys,Object),Wr=Gr,qr=Ur,Xr=Object.prototype.hasOwnProperty;var Kr=function(e){if(!Wr(e))return qr(e);var t=[];for(var r in Object(e))Xr.call(e,r)&&"constructor"!=r&&t.push(r);return t},$r=Me,Jr=wr;var Qr=function(e){return null!=e&&Jr(e.length)&&!$r(e)},Zr=zr,en=Kr,tn=Qr;var rn=function(e){return tn(e)?Zr(e):en(e)},nn=nr,on=rn;var an=function(e,t){return e&&nn(t,on(t),e)};var sn=Ae,un=Gr,cn=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t},hn=Object.prototype.hasOwnProperty;var ln=zr,fn=function(e){if(!sn(e))return cn(e);var t=un(e),r=[];for(var n in e)("constructor"!=n||!t&&hn.call(e,n))&&r.push(n);return r},dn=Qr;var pn=function(e){return dn(e)?ln(e,!0):fn(e)},gn=nr,vn=pn;var yn=function(e,t){return e&&gn(t,vn(t),e)},_n={exports:{}};!function(e,t){var r=pe,n=t&&!t.nodeType&&t,o=n&&e&&!e.nodeType&&e,i=o&&o.exports===n?r.Buffer:void 0,a=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=a?a(r):new e.constructor(r);return e.copy(n),n}}(_n,_n.exports);var mn=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t};var bn=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i};var wn=function(){return[]},xn=bn,En=wn,kn=Object.prototype.propertyIsEnumerable,Sn=Object.getOwnPropertySymbols,Dn=Sn?function(e){return null==e?[]:(e=Object(e),xn(Sn(e),(function(t){return kn.call(e,t)})))}:En,Cn=nr,An=Dn;var jn=function(e,t){return Cn(e,An(e),t)};var On=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e},In=Hr(Object.getPrototypeOf,Object),Mn=On,Fn=In,Pn=Dn,Tn=wn,Nn=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Mn(t,Pn(e)),e=Fn(e);return t}:Tn,Ln=nr,Yn=Nn;var Rn=function(e,t){return Ln(e,Yn(e),t)},Bn=On,zn=vr;var Vn=function(e,t,r){var n=t(e);return zn(e)?n:Bn(n,r(e))},Gn=Vn,Hn=Dn,Un=rn;var Wn=function(e){return Gn(e,Un,Hn)},qn=Vn,Xn=Nn,Kn=pn;var $n=function(e){return qn(e,Kn,Xn)},Jn=Je(pe,"DataView"),Qn=Je(pe,"Promise"),Zn=Je(pe,"Set"),eo=Jn,to=Qe,ro=Qn,no=Zn,oo=Je(pe,"WeakMap"),io=Ce,ao=Le,so="[object Map]",uo="[object Promise]",co="[object Set]",ho="[object WeakMap]",lo="[object DataView]",fo=ao(eo),po=ao(to),go=ao(ro),vo=ao(no),yo=ao(oo),_o=io;(eo&&_o(new eo(new ArrayBuffer(1)))!=lo||to&&_o(new to)!=so||ro&&_o(ro.resolve())!=uo||no&&_o(new no)!=co||oo&&_o(new oo)!=ho)&&(_o=function(e){var t=io(e),r="[object Object]"==t?e.constructor:void 0,n=r?ao(r):"";if(n)switch(n){case fo:return lo;case po:return so;case go:return uo;case vo:return co;case yo:return ho}return t});var mo=_o,bo=Object.prototype.hasOwnProperty;var wo=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&bo.call(e,"index")&&(r.index=e.index,r.input=e.input),r},xo=pe.Uint8Array,Eo=xo;var ko=function(e){var t=new e.constructor(e.byteLength);return new Eo(t).set(new Eo(e)),t},So=ko;var Do=function(e,t){var r=t?So(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)},Co=/\w*$/;var Ao=function(e){var t=new e.constructor(e.source,Co.exec(e));return t.lastIndex=e.lastIndex,t},jo=ge?ge.prototype:void 0,Oo=jo?jo.valueOf:void 0;var Io=ko;var Mo=function(e,t){var r=t?Io(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)},Fo=ko,Po=Do,To=Ao,No=function(e){return Oo?Object(Oo.call(e)):{}},Lo=Mo;var Yo=function(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return Fo(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return Po(e,r);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 Lo(e,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return To(e);case"[object Symbol]":return No(e)}},Ro=Ae,Bo=Object.create,zo=function(){function e(){}return function(t){if(!Ro(t))return{};if(Bo)return Bo(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),Vo=zo,Go=In,Ho=Gr;var Uo=function(e){return"function"!=typeof e.constructor||Ho(e)?{}:Vo(Go(e))},Wo=mo,qo=ir;var Xo=function(e){return qo(e)&&"[object Map]"==Wo(e)},Ko=Xo,$o=Cr,Jo=Ar.exports,Qo=Jo&&Jo.isMap,Zo=Qo?$o(Qo):Ko,ei=mo,ti=ir;var ri=function(e){return ti(e)&&"[object Set]"==ei(e)},ni=ri,oi=Cr,ii=Ar.exports,ai=ii&&ii.isSet,si=ai?oi(ai):ni,ui=Ut,ci=Wt,hi=er,li=an,fi=yn,di=_n.exports,pi=mn,gi=jn,vi=Rn,yi=Wn,_i=$n,mi=mo,bi=wo,wi=Yo,xi=Uo,Ei=vr,ki=yr.exports,Si=Zo,Di=Ae,Ci=si,Ai=rn,ji=pn,Oi="[object Arguments]",Ii="[object Function]",Mi="[object Object]",Fi={};Fi[Oi]=Fi["[object Array]"]=Fi["[object ArrayBuffer]"]=Fi["[object DataView]"]=Fi["[object Boolean]"]=Fi["[object Date]"]=Fi["[object Float32Array]"]=Fi["[object Float64Array]"]=Fi["[object Int8Array]"]=Fi["[object Int16Array]"]=Fi["[object Int32Array]"]=Fi["[object Map]"]=Fi["[object Number]"]=Fi[Mi]=Fi["[object RegExp]"]=Fi["[object Set]"]=Fi["[object String]"]=Fi["[object Symbol]"]=Fi["[object Uint8Array]"]=Fi["[object Uint8ClampedArray]"]=Fi["[object Uint16Array]"]=Fi["[object Uint32Array]"]=!0,Fi["[object Error]"]=Fi[Ii]=Fi["[object WeakMap]"]=!1;var Pi=function e(t,r,n,o,i,a){var s,u=1&r,c=2&r,h=4&r;if(n&&(s=i?n(t,o,i,a):n(t)),void 0!==s)return s;if(!Di(t))return t;var l=Ei(t);if(l){if(s=bi(t),!u)return pi(t,s)}else{var f=mi(t),d=f==Ii||"[object GeneratorFunction]"==f;if(ki(t))return di(t,u);if(f==Mi||f==Oi||d&&!i){if(s=c||d?{}:xi(t),!u)return c?vi(t,fi(s,t)):gi(t,li(s,t))}else{if(!Fi[f])return i?t:{};s=wi(t,f,u)}}a||(a=new ui);var p=a.get(t);if(p)return p;a.set(t,s),Ci(t)?t.forEach((function(o){s.add(e(o,r,n,o,t,a))})):Si(t)&&t.forEach((function(o,i){s.set(i,e(o,r,n,i,t,a))}));var g=l?void 0:(h?c?_i:yi:c?ji:Ai)(t);return ci(g||t,(function(o,i){g&&(o=t[i=o]),hi(s,i,e(o,r,n,i,t,a))})),s},Ti=Pi;var Ni=function(e){return Ti(e,4)};var Li=function(e){return function(){return e}};var Yi=function(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===r(i[u],u,i))break}return t}},Ri=Yi(),Bi=Ri,zi=rn;var Vi=function(e,t){return e&&Bi(e,t,zi)},Gi=Qr;var Hi=function(e,t){return function(r,n){if(null==r)return r;if(!Gi(r))return e(r,n);for(var o=r.length,i=t?o:-1,a=Object(r);(t?i--:++i<o)&&!1!==n(a[i],i,a););return r}},Ui=Hi(Vi);var Wi=function(e){return e},qi=Wi;var Xi=function(e){return"function"==typeof e?e:qi},Ki=Wt,$i=Ui,Ji=Xi,Qi=vr;var Zi=function(e,t){return(Qi(e)?Ki:$i)(e,Ji(t))},ea=Zi,ta=Ui;var ra=function(e,t){var r=[];return ta(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r};var na=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var oa=function(e){return this.__data__.has(e)},ia=Ft,aa=na,sa=oa;function ua(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new ia;++t<r;)this.add(e[t])}ua.prototype.add=ua.prototype.push=aa,ua.prototype.has=sa;var ca=ua;var ha=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1};var la=function(e,t){return e.has(t)},fa=ca,da=ha,pa=la;var ga=function(e,t,r,n,o,i){var a=1&r,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=i.get(e),h=i.get(t);if(c&&h)return c==t&&h==e;var l=-1,f=!0,d=2&r?new fa:void 0;for(i.set(e,t),i.set(t,e);++l<s;){var p=e[l],g=t[l];if(n)var v=a?n(g,p,l,t,e,i):n(p,g,l,e,t,i);if(void 0!==v){if(v)continue;f=!1;break}if(d){if(!da(t,(function(e,t){if(!pa(d,t)&&(p===e||o(p,e,r,n,i)))return d.push(t)}))){f=!1;break}}else if(p!==g&&!o(p,g,r,n,i)){f=!1;break}}return i.delete(e),i.delete(t),f};var va=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r};var ya=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r},_a=xo,ma=V,ba=ga,wa=va,xa=ya,Ea=ge?ge.prototype:void 0,ka=Ea?Ea.valueOf:void 0;var Sa=function(e,t,r,n,o,i,a){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new _a(e),new _a(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ma(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=wa;case"[object Set]":var u=1&n;if(s||(s=xa),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;n|=2,a.set(e,t);var h=ba(s(e),s(t),n,o,i,a);return a.delete(e),h;case"[object Symbol]":if(ka)return ka.call(e)==ka.call(t)}return!1},Da=Wn,Ca=Object.prototype.hasOwnProperty;var Aa=function(e,t,r,n,o,i){var a=1&r,s=Da(e),u=s.length;if(u!=Da(t).length&&!a)return!1;for(var c=u;c--;){var h=s[c];if(!(a?h in t:Ca.call(t,h)))return!1}var l=i.get(e),f=i.get(t);if(l&&f)return l==t&&f==e;var d=!0;i.set(e,t),i.set(t,e);for(var p=a;++c<u;){var g=e[h=s[c]],v=t[h];if(n)var y=a?n(v,g,h,t,e,i):n(g,v,h,e,t,i);if(!(void 0===y?g===v||o(g,v,r,n,i):y)){d=!1;break}p||(p="constructor"==h)}if(d&&!p){var _=e.constructor,m=t.constructor;_==m||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof m&&m instanceof m||(d=!1)}return i.delete(e),i.delete(t),d},ja=Ut,Oa=ga,Ia=Sa,Ma=Aa,Fa=mo,Pa=vr,Ta=yr.exports,Na=Fr,La="[object Arguments]",Ya="[object Array]",Ra="[object Object]",Ba=Object.prototype.hasOwnProperty;var za=function(e,t,r,n,o,i){var a=Pa(e),s=Pa(t),u=a?Ya:Fa(e),c=s?Ya:Fa(t),h=(u=u==La?Ra:u)==Ra,l=(c=c==La?Ra:c)==Ra,f=u==c;if(f&&Ta(e)){if(!Ta(t))return!1;a=!0,h=!1}if(f&&!h)return i||(i=new ja),a||Na(e)?Oa(e,t,r,n,o,i):Ia(e,t,u,r,n,o,i);if(!(1&r)){var d=h&&Ba.call(e,"__wrapped__"),p=l&&Ba.call(t,"__wrapped__");if(d||p){var g=d?e.value():e,v=p?t.value():t;return i||(i=new ja),o(g,v,r,n,i)}}return!!f&&(i||(i=new ja),Ma(e,t,r,n,o,i))},Va=ir;var Ga=function e(t,r,n,o,i){return t===r||(null==t||null==r||!Va(t)&&!Va(r)?t!=t&&r!=r:za(t,r,n,o,e,i))},Ha=Ut,Ua=Ga;var Wa=function(e,t,r,n){var o=r.length,i=o,a=!n;if(null==e)return!i;for(e=Object(e);o--;){var s=r[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var u=(s=r[o])[0],c=e[u],h=s[1];if(a&&s[2]){if(void 0===c&&!(u in e))return!1}else{var l=new Ha;if(n)var f=n(c,h,u,e,t,l);if(!(void 0===f?Ua(h,c,3,n,l):f))return!1}}return!0},qa=Ae;var Xa=function(e){return e==e&&!qa(e)},Ka=Xa,$a=rn;var Ja=function(e){for(var t=$a(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Ka(o)]}return t};var Qa=function(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}},Za=Wa,es=Ja,ts=Qa;var rs=function(e){var t=es(e);return 1==t.length&&t[0][2]?ts(t[0][0],t[0][1]):function(r){return r===e||Za(r,e,t)}},ns=Ce,os=ir;var is=function(e){return"symbol"==typeof e||os(e)&&"[object Symbol]"==ns(e)},as=vr,ss=is,us=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cs=/^\w*$/;var hs=function(e,t){if(as(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!ss(e))||(cs.test(e)||!us.test(e)||null!=t&&e in Object(t))},ls=Ft;function fs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(fs.Cache||ls),r}fs.Cache=ls;var ds=fs;var ps=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gs=/\\(\\)?/g,vs=function(e){var t=ds(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ps,(function(e,r,n,o){t.push(n?o.replace(gs,"$1"):r||e)})),t}));var ys=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o},_s=ys,ms=vr,bs=is,ws=ge?ge.prototype:void 0,xs=ws?ws.toString:void 0;var Es=function e(t){if("string"==typeof t)return t;if(ms(t))return _s(t,e)+"";if(bs(t))return xs?xs.call(t):"";var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r},ks=Es;var Ss=function(e){return null==e?"":ks(e)},Ds=vr,Cs=hs,As=vs,js=Ss;var Os=function(e,t){return Ds(e)?e:Cs(e,t)?[e]:As(js(e))},Is=is;var Ms=function(e){if("string"==typeof e||Is(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},Fs=Os,Ps=Ms;var Ts=function(e,t){for(var r=0,n=(t=Fs(t,e)).length;null!=e&&r<n;)e=e[Ps(t[r++])];return r&&r==n?e:void 0},Ns=Ts;var Ls=function(e,t,r){var n=null==e?void 0:Ns(e,t);return void 0===n?r:n};var Ys=Os,Rs=gr,Bs=vr,zs=br,Vs=wr,Gs=Ms;var Hs=function(e,t,r){for(var n=-1,o=(t=Ys(t,e)).length,i=!1;++n<o;){var a=Gs(t[n]);if(!(i=null!=e&&r(e,a)))break;e=e[a]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&Vs(o)&&zs(a,o)&&(Bs(e)||Rs(e))},Us=function(e,t){return null!=e&&t in Object(e)},Ws=Hs;var qs=function(e,t){return null!=e&&Ws(e,t,Us)},Xs=Ga,Ks=Ls,$s=qs,Js=hs,Qs=Xa,Zs=Qa,eu=Ms;var tu=function(e,t){return Js(e)&&Qs(t)?Zs(eu(e),t):function(r){var n=Ks(r,e);return void 0===n&&n===t?$s(r,e):Xs(t,n,3)}};var ru=function(e){return function(t){return null==t?void 0:t[e]}},nu=Ts;var ou=function(e){return function(t){return nu(t,e)}},iu=ru,au=ou,su=hs,uu=Ms;var cu=function(e){return su(e)?iu(uu(e)):au(e)},hu=rs,lu=tu,fu=Wi,du=vr,pu=cu;var gu=function(e){return"function"==typeof e?e:null==e?fu:"object"==typeof e?du(e)?lu(e[0],e[1]):hu(e):pu(e)},vu=bn,yu=ra,_u=gu,mu=vr;var bu=function(e,t){return(mu(e)?vu:yu)(e,_u(t))},wu=Object.prototype.hasOwnProperty;var xu=function(e,t){return null!=e&&wu.call(e,t)},Eu=Hs;var ku=function(e,t){return null!=e&&Eu(e,t,xu)},Su=Kr,Du=mo,Cu=gr,Au=vr,ju=Qr,Ou=yr.exports,Iu=Gr,Mu=Fr,Fu=Object.prototype.hasOwnProperty;var Pu=function(e){if(null==e)return!0;if(ju(e)&&(Au(e)||"string"==typeof e||"function"==typeof e.splice||Ou(e)||Mu(e)||Cu(e)))return!e.length;var t=Du(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(Iu(e))return!Su(e).length;for(var r in e)if(Fu.call(e,r))return!1;return!0};var Tu=function(e){return void 0===e},Nu=Ui,Lu=Qr;var Yu=function(e,t){var r=-1,n=Lu(e)?Array(e.length):[];return Nu(e,(function(e,o,i){n[++r]=t(e,o,i)})),n},Ru=ys,Bu=gu,zu=Yu,Vu=vr;var Gu=function(e,t){return(Vu(e)?Ru:zu)(e,Bu(t))};var Hu=function(e,t,r,n){var o=-1,i=null==e?0:e.length;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r};var Uu=function(e,t,r,n,o){return o(e,(function(e,o,i){r=n?(n=!1,e):t(r,e,o,i)})),r},Wu=Hu,qu=Ui,Xu=gu,Ku=Uu,$u=vr;var Ju=function(e,t,r){var n=$u(e)?Wu:Ku,o=arguments.length<3;return n(e,Xu(t),r,o,qu)},Qu=Ce,Zu=vr,ec=ir;var tc=function(e){return"string"==typeof e||!Zu(e)&&ec(e)&&"[object String]"==Qu(e)},rc=ru("length"),nc=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var oc=function(e){return nc.test(e)},ic="[\\ud800-\\udfff]",ac="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",sc="\\ud83c[\\udffb-\\udfff]",uc="[^\\ud800-\\udfff]",cc="(?:\\ud83c[\\udde6-\\uddff]){2}",hc="[\\ud800-\\udbff][\\udc00-\\udfff]",lc="(?:"+ac+"|"+sc+")"+"?",fc="[\\ufe0e\\ufe0f]?",dc=fc+lc+("(?:\\u200d(?:"+[uc,cc,hc].join("|")+")"+fc+lc+")*"),pc="(?:"+[uc+ac+"?",ac,cc,hc,ic].join("|")+")",gc=RegExp(sc+"(?="+sc+")|"+pc+dc,"g");var vc=rc,yc=oc,_c=function(e){for(var t=gc.lastIndex=0;gc.test(e);)++t;return t};var mc=Kr,bc=mo,wc=Qr,xc=tc,Ec=function(e){return yc(e)?_c(e):vc(e)};var kc=function(e){if(null==e)return 0;if(wc(e))return xc(e)?Ec(e):e.length;var t=bc(e);return"[object Map]"==t||"[object Set]"==t?e.size:mc(e).length},Sc=Wt,Dc=zo,Cc=Vi,Ac=gu,jc=In,Oc=vr,Ic=yr.exports,Mc=Me,Fc=Ae,Pc=Fr;var Tc=function(e,t,r){var n=Oc(e),o=n||Ic(e)||Pc(e);if(t=Ac(t),null==r){var i=e&&e.constructor;r=o?n?new i:[]:Fc(e)&&Mc(i)?Dc(jc(e)):{}}return(o?Sc:Cc)(e,(function(e,n,o){return t(r,e,n,o)})),r},Nc=gr,Lc=vr,Yc=ge?ge.isConcatSpreadable:void 0;var Rc=function(e){return Lc(e)||Nc(e)||!!(Yc&&e&&e[Yc])},Bc=On,zc=Rc;var Vc=function e(t,r,n,o,i){var a=-1,s=t.length;for(n||(n=zc),i||(i=[]);++a<s;){var u=t[a];r>0&&n(u)?r>1?e(u,r-1,n,o,i):Bc(i,u):o||(i[i.length]=u)}return i};var Gc=function(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)},Hc=Math.max;var Uc=function(e,t,r){return t=Hc(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=Hc(n.length-t,0),a=Array(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),Gc(e,this,s)}},Wc=Li,qc=Xt,Xc=qc?function(e,t){return qc(e,"toString",{configurable:!0,enumerable:!1,value:Wc(t),writable:!0})}:Wi,Kc=Date.now;var $c=function(e){var t=0,r=0;return function(){var n=Kc(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},Jc=$c(Xc),Qc=Wi,Zc=Uc,eh=Jc;var th=function(e,t){return eh(Zc(e,t,Qc),e+"")};var rh=function(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1};var nh=function(e){return e!=e};var oh=function(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1},ih=rh,ah=nh,sh=oh;var uh=function(e,t,r){return t==t?sh(e,t,r):ih(e,ah,r)},ch=uh;var hh=function(e,t){return!!(null==e?0:e.length)&&ch(e,t,0)>-1};var lh=function(e,t,r){for(var n=-1,o=null==e?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1};var fh=Zn,dh=function(){},ph=fh&&1/ya(new fh([,-0]))[1]==1/0?function(e){return new fh(e)}:dh,gh=ca,vh=hh,yh=lh,_h=la,mh=ph,bh=ya;var wh=function(e,t,r){var n=-1,o=vh,i=e.length,a=!0,s=[],u=s;if(r)a=!1,o=yh;else if(i>=200){var c=t?null:mh(e);if(c)return bh(c);a=!1,o=_h,u=new gh}else u=t?[]:s;e:for(;++n<i;){var h=e[n],l=t?t(h):h;if(h=r||0!==h?h:0,a&&l==l){for(var f=u.length;f--;)if(u[f]===l)continue e;t&&u.push(l),s.push(h)}else o(u,l,r)||(u!==s&&u.push(l),s.push(h))}return s},xh=Qr,Eh=ir;var kh=function(e){return Eh(e)&&xh(e)},Sh=Vc,Dh=wh,Ch=kh,Ah=th((function(e){return Dh(Sh(e,1,Ch,!0))})),jh=ys;var Oh=function(e,t){return jh(t,(function(t){return e[t]}))},Ih=rn;var Mh,Fh=function(e){return null==e?[]:Oh(e,Ih(e))};try{Mh={clone:Ni,constant:Li,each:ea,filter:bu,has:ku,isArray:vr,isEmpty:Pu,isFunction:Me,isUndefined:Tu,keys:rn,map:Gu,reduce:Ju,size:kc,transform:Tc,union:Ah,values:Fh}}catch(e){}Mh||(Mh=window._);var Ph=Mh,Th=Ph,Nh=Yh,Lh="\0";function Yh(e){this._isDirected=!Th.has(e,"directed")||e.directed,this._isMultigraph=!!Th.has(e,"multigraph")&&e.multigraph,this._isCompound=!!Th.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=Th.constant(void 0),this._defaultEdgeLabelFn=Th.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function Rh(e,t){e[t]?e[t]++:e[t]=1}function Bh(e,t){--e[t]||delete e[t]}function zh(e,t,r,n){var o=""+t,i=""+r;if(!e&&o>i){var a=o;o=i,i=a}return o+""+i+""+(Th.isUndefined(n)?"\0":n)}function Vh(e,t,r,n){var o=""+t,i=""+r;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};return n&&(s.name=n),s}function Gh(e,t){return zh(e,t.v,t.w,t.name)}Yh.prototype._nodeCount=0,Yh.prototype._edgeCount=0,Yh.prototype.isDirected=function(){return this._isDirected},Yh.prototype.isMultigraph=function(){return this._isMultigraph},Yh.prototype.isCompound=function(){return this._isCompound},Yh.prototype.setGraph=function(e){return this._label=e,this},Yh.prototype.graph=function(){return this._label},Yh.prototype.setDefaultNodeLabel=function(e){return Th.isFunction(e)||(e=Th.constant(e)),this._defaultNodeLabelFn=e,this},Yh.prototype.nodeCount=function(){return this._nodeCount},Yh.prototype.nodes=function(){return Th.keys(this._nodes)},Yh.prototype.sources=function(){var e=this;return Th.filter(this.nodes(),(function(t){return Th.isEmpty(e._in[t])}))},Yh.prototype.sinks=function(){var e=this;return Th.filter(this.nodes(),(function(t){return Th.isEmpty(e._out[t])}))},Yh.prototype.setNodes=function(e,t){var r=arguments,n=this;return Th.each(e,(function(e){r.length>1?n.setNode(e,t):n.setNode(e)})),this},Yh.prototype.setNode=function(e,t){return Th.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=Lh,this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},Yh.prototype.node=function(e){return this._nodes[e]},Yh.prototype.hasNode=function(e){return Th.has(this._nodes,e)},Yh.prototype.removeNode=function(e){var t=this;if(Th.has(this._nodes,e)){var r=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],Th.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),Th.each(Th.keys(this._in[e]),r),delete this._in[e],delete this._preds[e],Th.each(Th.keys(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},Yh.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Th.isUndefined(t))t=Lh;else{for(var r=t+="";!Th.isUndefined(r);r=this.parent(r))if(r===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},Yh.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},Yh.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==Lh)return t}},Yh.prototype.children=function(e){if(Th.isUndefined(e)&&(e=Lh),this._isCompound){var t=this._children[e];if(t)return Th.keys(t)}else{if(e===Lh)return this.nodes();if(this.hasNode(e))return[]}},Yh.prototype.predecessors=function(e){var t=this._preds[e];if(t)return Th.keys(t)},Yh.prototype.successors=function(e){var t=this._sucs[e];if(t)return Th.keys(t)},Yh.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return Th.union(t,this.successors(e))},Yh.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},Yh.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var r=this;Th.each(this._nodes,(function(r,n){e(n)&&t.setNode(n,r)})),Th.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,r.edge(e))}));var n={};function o(e){var i=r.parent(e);return void 0===i||t.hasNode(i)?(n[e]=i,i):i in n?n[i]:o(i)}return this._isCompound&&Th.each(t.nodes(),(function(e){t.setParent(e,o(e))})),t},Yh.prototype.setDefaultEdgeLabel=function(e){return Th.isFunction(e)||(e=Th.constant(e)),this._defaultEdgeLabelFn=e,this},Yh.prototype.edgeCount=function(){return this._edgeCount},Yh.prototype.edges=function(){return Th.values(this._edgeObjs)},Yh.prototype.setPath=function(e,t){var r=this,n=arguments;return Th.reduce(e,(function(e,o){return n.length>1?r.setEdge(e,o,t):r.setEdge(e,o),o})),this},Yh.prototype.setEdge=function(){var e,t,r,n,o=!1,i=arguments[0];"object"==typeof i&&null!==i&&"v"in i?(e=i.v,t=i.w,r=i.name,2===arguments.length&&(n=arguments[1],o=!0)):(e=i,t=arguments[1],r=arguments[3],arguments.length>2&&(n=arguments[2],o=!0)),e=""+e,t=""+t,Th.isUndefined(r)||(r=""+r);var a=zh(this._isDirected,e,t,r);if(Th.has(this._edgeLabels,a))return o&&(this._edgeLabels[a]=n),this;if(!Th.isUndefined(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[a]=o?n:this._defaultEdgeLabelFn(e,t,r);var s=Vh(this._isDirected,e,t,r);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[a]=s,Rh(this._preds[t],e),Rh(this._sucs[e],t),this._in[t][a]=s,this._out[e][a]=s,this._edgeCount++,this},Yh.prototype.edge=function(e,t,r){var n=1===arguments.length?Gh(this._isDirected,arguments[0]):zh(this._isDirected,e,t,r);return this._edgeLabels[n]},Yh.prototype.hasEdge=function(e,t,r){var n=1===arguments.length?Gh(this._isDirected,arguments[0]):zh(this._isDirected,e,t,r);return Th.has(this._edgeLabels,n)},Yh.prototype.removeEdge=function(e,t,r){var n=1===arguments.length?Gh(this._isDirected,arguments[0]):zh(this._isDirected,e,t,r),o=this._edgeObjs[n];return o&&(e=o.v,t=o.w,delete this._edgeLabels[n],delete this._edgeObjs[n],Bh(this._preds[t],e),Bh(this._sucs[e],t),delete this._in[t][n],delete this._out[e][n],this._edgeCount--),this},Yh.prototype.inEdges=function(e,t){var r=this._in[e];if(r){var n=Th.values(r);return t?Th.filter(n,(function(e){return e.v===t})):n}},Yh.prototype.outEdges=function(e,t){var r=this._out[e];if(r){var n=Th.values(r);return t?Th.filter(n,(function(e){return e.w===t})):n}},Yh.prototype.nodeEdges=function(e,t){var r=this.inEdges(e,t);if(r)return r.concat(this.outEdges(e,t))};var Hh={Graph:Nh,version:"2.1.8"},Uh=Ph,Wh=Nh,qh={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:Xh(e),edges:Kh(e)};Uh.isUndefined(e.graph())||(t.value=Uh.clone(e.graph()));return t},read:function(e){var t=new Wh(e.options).setGraph(e.value);return Uh.each(e.nodes,(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),Uh.each(e.edges,(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}};function Xh(e){return Uh.map(e.nodes(),(function(t){var r=e.node(t),n=e.parent(t),o={v:t};return Uh.isUndefined(r)||(o.value=r),Uh.isUndefined(n)||(o.parent=n),o}))}function Kh(e){return Uh.map(e.edges(),(function(t){var r=e.edge(t),n={v:t.v,w:t.w};return Uh.isUndefined(t.name)||(n.name=t.name),Uh.isUndefined(r)||(n.value=r),n}))}var $h=Ph,Jh=function(e){var t,r={},n=[];function o(n){$h.has(r,n)||(r[n]=!0,t.push(n),$h.each(e.successors(n),o),$h.each(e.predecessors(n),o))}return $h.each(e.nodes(),(function(e){t=[],o(e),t.length&&n.push(t)})),n};var Qh=Ph,Zh=el;function el(){this._arr=[],this._keyIndices={}}el.prototype.size=function(){return this._arr.length},el.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},el.prototype.has=function(e){return Qh.has(this._keyIndices,e)},el.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},el.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},el.prototype.add=function(e,t){var r=this._keyIndices;if(e=String(e),!Qh.has(r,e)){var n=this._arr,o=n.length;return r[e]=o,n.push({key:e,priority:t}),this._decrease(o),!0}return!1},el.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},el.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)},el.prototype._heapify=function(e){var t=this._arr,r=2*e,n=r+1,o=e;r<t.length&&(o=t[r].priority<t[o].priority?r:o,n<t.length&&(o=t[n].priority<t[o].priority?n:o),o!==e&&(this._swap(e,o),this._heapify(o)))},el.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},el.prototype._swap=function(e,t){var r=this._arr,n=this._keyIndices,o=r[e],i=r[t];r[e]=i,r[t]=o,n[i.key]=e,n[o.key]=t};var tl=Zh,rl=function(e,t,r,n){return function(e,t,r,n){var o,i,a={},s=new tl,u=function(e){var t=e.v!==o?e.v:e.w,n=a[t],u=r(e),c=i.distance+u;if(u<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+u);c<n.distance&&(n.distance=c,n.predecessor=o,s.decrease(t,c))};e.nodes().forEach((function(e){var r=e===t?0:Number.POSITIVE_INFINITY;a[e]={distance:r},s.add(e,r)}));for(;s.size()>0&&(o=s.removeMin(),(i=a[o]).distance!==Number.POSITIVE_INFINITY);)n(o).forEach(u);return a}(e,String(t),r||nl,n||function(t){return e.outEdges(t)})},nl=Ph.constant(1);var ol=rl,il=Ph,al=function(e,t,r){return il.transform(e.nodes(),(function(n,o){n[o]=ol(e,o,t,r)}),{})};var sl=Ph,ul=function(e){var t=0,r=[],n={},o=[];function i(a){var s=n[a]={onStack:!0,lowlink:t,index:t++};if(r.push(a),e.successors(a).forEach((function(e){sl.has(n,e)?n[e].onStack&&(s.lowlink=Math.min(s.lowlink,n[e].index)):(i(e),s.lowlink=Math.min(s.lowlink,n[e].lowlink))})),s.lowlink===s.index){var u,c=[];do{u=r.pop(),n[u].onStack=!1,c.push(u)}while(a!==u);o.push(c)}}return e.nodes().forEach((function(e){sl.has(n,e)||i(e)})),o};var cl=Ph,hl=ul,ll=function(e){return cl.filter(hl(e),(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))};var fl=function(e,t,r){return function(e,t,r){var n={},o=e.nodes();return o.forEach((function(e){n[e]={},n[e][e]={distance:0},o.forEach((function(t){e!==t&&(n[e][t]={distance:Number.POSITIVE_INFINITY})})),r(e).forEach((function(r){var o=r.v===e?r.w:r.v,i=t(r);n[e][o]={distance:i,predecessor:e}}))})),o.forEach((function(e){var t=n[e];o.forEach((function(r){var i=n[r];o.forEach((function(r){var n=i[e],o=t[r],a=i[r],s=n.distance+o.distance;s<a.distance&&(a.distance=s,a.predecessor=o.predecessor)}))}))})),n}(e,t||dl,r||function(t){return e.outEdges(t)})},dl=Ph.constant(1);var pl=Ph,gl=vl;function vl(e){var t={},r={},n=[];if(pl.each(e.sinks(),(function o(i){if(pl.has(r,i))throw new yl;pl.has(t,i)||(r[i]=!0,t[i]=!0,pl.each(e.predecessors(i),o),delete r[i],n.push(i))})),pl.size(t)!==e.nodeCount())throw new yl;return n}function yl(){}vl.CycleException=yl,yl.prototype=new Error;var _l=gl;var ml=Ph,bl=function(e,t,r){ml.isArray(t)||(t=[t]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),o=[],i={};return ml.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);wl(e,t,"post"===r,i,n,o)})),o};function wl(e,t,r,n,o,i){ml.has(n,t)||(n[t]=!0,r||i.push(t),ml.each(o(t),(function(t){wl(e,t,r,n,o,i)})),r&&i.push(t))}var xl=bl;var El=bl;var kl=Ph,Sl=Nh,Dl=Zh;var Cl,Al={Graph:Hh.Graph,json:qh,alg:{components:Jh,dijkstra:rl,dijkstraAll:al,findCycles:ll,floydWarshall:fl,isAcyclic:function(e){try{_l(e)}catch(e){if(e instanceof _l.CycleException)return!1;throw e}return!0},postorder:function(e,t){return xl(e,t,"post")},preorder:function(e,t){return El(e,t,"pre")},prim:function(e,t){var r,n=new Sl,o={},i=new Dl;function a(e){var n=e.v===r?e.w:e.v,a=i.priority(n);if(void 0!==a){var s=t(e);s<a&&(o[n]=r,i.decrease(n,s))}}if(0===e.nodeCount())return n;kl.each(e.nodes(),(function(e){i.add(e,Number.POSITIVE_INFINITY),n.setNode(e)})),i.decrease(e.nodes()[0],0);var s=!1;for(;i.size()>0;){if(r=i.removeMin(),kl.has(o,r))n.setEdge(r,o[r]);else{if(s)throw new Error("Input graph is not connected: "+e);s=!0}e.nodeEdges(r).forEach(a)}return n},tarjan:ul,topsort:gl},version:Hh.version};try{Cl=Al}catch(e){}Cl||(Cl=window.graphlib);var jl=Cl,Ol=Pi;var Il=function(e){return Ol(e,5)},Ml=V,Fl=Qr,Pl=br,Tl=Ae;var Nl=function(e,t,r){if(!Tl(r))return!1;var n=typeof t;return!!("number"==n?Fl(r)&&Pl(t,r.length):"string"==n&&t in r)&&Ml(r[t],e)},Ll=th,Yl=V,Rl=Nl,Bl=pn,zl=Object.prototype,Vl=zl.hasOwnProperty,Gl=Ll((function(e,t){e=Object(e);var r=-1,n=t.length,o=n>2?t[2]:void 0;for(o&&Rl(t[0],t[1],o)&&(n=1);++r<n;)for(var i=t[r],a=Bl(i),s=-1,u=a.length;++s<u;){var c=a[s],h=e[c];(void 0===h||Yl(h,zl[c])&&!Vl.call(e,c))&&(e[c]=i[c])}return e})),Hl=Gl,Ul=gu,Wl=Qr,ql=rn;var Xl=function(e){return function(t,r,n){var o=Object(t);if(!Wl(t)){var i=Ul(r);t=ql(t),r=function(e){return i(o[e],e,o)}}var a=e(t,r,n);return a>-1?o[i?t[a]:a]:void 0}},Kl=/\s/;var $l=function(e){for(var t=e.length;t--&&Kl.test(e.charAt(t)););return t},Jl=$l,Ql=/^\s+/;var Zl=function(e){return e?e.slice(0,Jl(e)+1).replace(Ql,""):e},ef=Ae,tf=is,rf=/^[-+]0x[0-9a-f]+$/i,nf=/^0b[01]+$/i,of=/^0o[0-7]+$/i,af=parseInt;var sf=function(e){if("number"==typeof e)return e;if(tf(e))return NaN;if(ef(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ef(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Zl(e);var r=nf.test(e);return r||of.test(e)?af(e.slice(2),r?2:8):rf.test(e)?NaN:+e},uf=sf,cf=1/0;var hf=function(e){return e?(e=uf(e))===cf||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},lf=hf;var ff=function(e){var t=lf(e),r=t%1;return t==t?r?t-r:t:0},df=rh,pf=gu,gf=ff,vf=Math.max;var yf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:gf(r);return o<0&&(o=vf(n+o,0)),df(e,pf(t),o)},_f=Xl(yf),mf=Vc;var bf=function(e){return(null==e?0:e.length)?mf(e,1):[]},wf=Ri,xf=Xi,Ef=pn;var kf=function(e,t){return null==e?e:wf(e,xf(t),Ef)};var Sf=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0},Df=$t,Cf=Vi,Af=gu;var jf=function(e,t){var r={};return t=Af(t),Cf(e,(function(e,n,o){Df(r,n,t(e,n,o))})),r},Of=is;var If=function(e,t,r){for(var n=-1,o=e.length;++n<o;){var i=e[n],a=t(i);if(null!=a&&(void 0===s?a==a&&!Of(a):r(a,s)))var s=a,u=i}return u};var Mf=function(e,t){return e>t},Ff=If,Pf=Mf,Tf=Wi;var Nf=function(e){return e&&e.length?Ff(e,Tf,Pf):void 0},Lf=$t,Yf=V;var Rf=function(e,t,r){(void 0!==r&&!Yf(e[t],r)||void 0===r&&!(t in e))&&Lf(e,t,r)},Bf=Ce,zf=In,Vf=ir,Gf=Function.prototype,Hf=Object.prototype,Uf=Gf.toString,Wf=Hf.hasOwnProperty,qf=Uf.call(Object);var Xf=function(e){if(!Vf(e)||"[object Object]"!=Bf(e))return!1;var t=zf(e);if(null===t)return!0;var r=Wf.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Uf.call(r)==qf};var Kf=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},$f=nr,Jf=pn;var Qf=function(e){return $f(e,Jf(e))},Zf=Rf,ed=_n.exports,td=Mo,rd=mn,nd=Uo,od=gr,id=vr,ad=kh,sd=yr.exports,ud=Me,cd=Ae,hd=Xf,ld=Fr,fd=Kf,dd=Qf;var pd=Ut,gd=Rf,vd=Ri,yd=function(e,t,r,n,o,i,a){var s=fd(e,r),u=fd(t,r),c=a.get(u);if(c)Zf(e,r,c);else{var h=i?i(s,u,r+"",e,t,a):void 0,l=void 0===h;if(l){var f=id(u),d=!f&&sd(u),p=!f&&!d&&ld(u);h=u,f||d||p?id(s)?h=s:ad(s)?h=rd(s):d?(l=!1,h=ed(u,!0)):p?(l=!1,h=td(u,!0)):h=[]:hd(u)||od(u)?(h=s,od(s)?h=dd(s):cd(s)&&!ud(s)||(h=nd(u))):l=!1}l&&(a.set(u,h),o(h,u,n,i,a),a.delete(u)),Zf(e,r,h)}},_d=Ae,md=pn,bd=Kf;var wd=function e(t,r,n,o,i){t!==r&&vd(r,(function(a,s){if(i||(i=new pd),_d(a))yd(t,r,s,n,e,o,i);else{var u=o?o(bd(t,s),a,s+"",t,r,i):void 0;void 0===u&&(u=a),gd(t,s,u)}}),md)},xd=th,Ed=Nl;var kd=function(e){return xd((function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&Ed(r[0],r[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,i)}return t}))},Sd=wd,Dd=kd((function(e,t,r){Sd(e,t,r)}));var Cd=function(e,t){return e<t},Ad=If,jd=Cd,Od=Wi;var Id=function(e){return e&&e.length?Ad(e,Od,jd):void 0},Md=If,Fd=gu,Pd=Cd;var Td=function(e,t){return e&&e.length?Md(e,Fd(t),Pd):void 0},Nd=pe,Ld=function(){return Nd.Date.now()},Yd=er,Rd=Os,Bd=br,zd=Ae,Vd=Ms;var Gd=function(e,t,r,n){if(!zd(e))return e;for(var o=-1,i=(t=Rd(t,e)).length,a=i-1,s=e;null!=s&&++o<i;){var u=Vd(t[o]),c=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(o!=a){var h=s[u];void 0===(c=n?n(h,u,s):void 0)&&(c=zd(h)?h:Bd(t[o+1])?[]:{})}Yd(s,u,c),s=s[u]}return e},Hd=Ts,Ud=Gd,Wd=Os;var qd=function(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],s=Hd(e,a);r(s,a)&&Ud(i,Wd(a,e),s)}return i},Xd=qd,Kd=qs;var $d=function(e,t){return Xd(e,t,(function(t,r){return Kd(e,r)}))},Jd=bf,Qd=Uc,Zd=Jc;var ep=$d,tp=function(e){return Zd(Qd(e,void 0,Jd),e+"")}((function(e,t){return null==e?{}:ep(e,t)})),rp=Math.ceil,np=Math.max;var op=function(e,t,r,n){for(var o=-1,i=np(rp((t-e)/(r||1)),0),a=Array(i);i--;)a[n?i:++o]=e,e+=r;return a},ip=op,ap=Nl,sp=hf;var up=function(e){return function(t,r,n){return n&&"number"!=typeof n&&ap(t,r,n)&&(r=n=void 0),t=sp(t),void 0===r?(r=t,t=0):r=sp(r),n=void 0===n?t<r?1:-1:sp(n),ip(t,r,n,e)}}();var cp=is;var hp=function(e,t){if(e!==t){var r=void 0!==e,n=null===e,o=e==e,i=cp(e),a=void 0!==t,s=null===t,u=t==t,c=cp(t);if(!s&&!c&&!i&&e>t||i&&a&&u&&!s&&!c||n&&a&&u||!r&&u||!o)return 1;if(!n&&!i&&!c&&e<t||c&&r&&o&&!n&&!i||s&&r&&o||!a&&o||!u)return-1}return 0},lp=hp;var fp=function(e,t,r){for(var n=-1,o=e.criteria,i=t.criteria,a=o.length,s=r.length;++n<a;){var u=lp(o[n],i[n]);if(u)return n>=s?u:u*("desc"==r[n]?-1:1)}return e.index-t.index},dp=ys,pp=Ts,gp=gu,vp=Yu,yp=function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e},_p=Cr,mp=fp,bp=Wi,wp=vr;var xp=function(e,t,r){t=t.length?dp(t,(function(e){return wp(e)?function(t){return pp(t,1===e.length?e[0]:e)}:e})):[bp];var n=-1;t=dp(t,_p(gp));var o=vp(e,(function(e,r,o){return{criteria:dp(t,(function(t){return t(e)})),index:++n,value:e}}));return yp(o,(function(e,t){return mp(e,t,r)}))},Ep=Vc,kp=xp,Sp=Nl,Dp=th((function(e,t){if(null==e)return[];var r=t.length;return r>1&&Sp(e,t[0],t[1])?t=[]:r>2&&Sp(t[0],t[1],t[2])&&(t=[t[0]]),kp(e,Ep(t,1),[])})),Cp=Ss,Ap=0;var jp=function(e){var t=++Ap;return Cp(e)+t};var Op=function(e,t,r){for(var n=-1,o=e.length,i=t.length,a={};++n<o;){var s=n<i?t[n]:void 0;r(a,e[n],s)}return a},Ip=er,Mp=Op;var Fp,Pp=function(e,t){return Mp(e||[],t||[],Ip)};try{Fp={cloneDeep:Il,constant:Li,defaults:Hl,each:ea,filter:bu,find:_f,flatten:bf,forEach:Zi,forIn:kf,has:ku,isUndefined:Tu,last:Sf,map:Gu,mapValues:jf,max:Nf,merge:Dd,min:Id,minBy:Td,now:Ld,pick:tp,range:up,reduce:Ju,sortBy:Dp,uniqueId:jp,values:Fh,zipObject:Pp}}catch(e){}Fp||(Fp=window._);var Tp=Fp,Np=Lp;function Lp(){var e={};e._next=e._prev=e,this._sentinel=e}function Yp(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Rp(e,t){if("_next"!==e&&"_prev"!==e)return t}Lp.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return Yp(t),t},Lp.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&Yp(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},Lp.prototype.toString=function(){for(var e=[],t=this._sentinel,r=t._prev;r!==t;)e.push(JSON.stringify(r,Rp)),r=r._prev;return"["+e.join(", ")+"]"};var Bp=Tp,zp=jl.Graph,Vp=Np,Gp=function(e,t){if(e.nodeCount()<=1)return[];var r=function(e,t){var r=new zp,n=0,o=0;Bp.forEach(e.nodes(),(function(e){r.setNode(e,{v:e,in:0,out:0})})),Bp.forEach(e.edges(),(function(e){var i=r.edge(e.v,e.w)||0,a=t(e),s=i+a;r.setEdge(e.v,e.w,s),o=Math.max(o,r.node(e.v).out+=a),n=Math.max(n,r.node(e.w).in+=a)}));var i=Bp.range(o+n+3).map((function(){return new Vp})),a=n+1;return Bp.forEach(r.nodes(),(function(e){Wp(i,a,r.node(e))})),{graph:r,buckets:i,zeroIdx:a}}(e,t||Hp),n=function(e,t,r){var n,o=[],i=t[t.length-1],a=t[0];for(;e.nodeCount();){for(;n=a.dequeue();)Up(e,t,r,n);for(;n=i.dequeue();)Up(e,t,r,n);if(e.nodeCount())for(var s=t.length-2;s>0;--s)if(n=t[s].dequeue()){o=o.concat(Up(e,t,r,n,!0));break}}return o}(r.graph,r.buckets,r.zeroIdx);return Bp.flatten(Bp.map(n,(function(t){return e.outEdges(t.v,t.w)})),!0)},Hp=Bp.constant(1);function Up(e,t,r,n,o){var i=o?[]:void 0;return Bp.forEach(e.inEdges(n.v),(function(n){var a=e.edge(n),s=e.node(n.v);o&&i.push({v:n.v,w:n.w}),s.out-=a,Wp(t,r,s)})),Bp.forEach(e.outEdges(n.v),(function(n){var o=e.edge(n),i=n.w,a=e.node(i);a.in-=o,Wp(t,r,a)})),e.removeNode(n.v),i}function Wp(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)}var qp=Tp,Xp=Gp,Kp={run:function(e){var t="greedy"===e.graph().acyclicer?Xp(e,function(e){return function(t){return e.edge(t).weight}}(e)):function(e){var t=[],r={},n={};function o(i){qp.has(n,i)||(n[i]=!0,r[i]=!0,qp.forEach(e.outEdges(i),(function(e){qp.has(r,e.w)?t.push(e):o(e.w)})),delete r[i])}return qp.forEach(e.nodes(),o),t}(e);qp.forEach(t,(function(t){var r=e.edge(t);e.removeEdge(t),r.forwardName=t.name,r.reversed=!0,e.setEdge(t.w,t.v,r,qp.uniqueId("rev"))}))},undo:function(e){qp.forEach(e.edges(),(function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}}))}};var $p=Tp,Jp=jl.Graph,Qp={addDummyNode:Zp,simplify:function(e){var t=(new Jp).setGraph(e.graph());return $p.forEach(e.nodes(),(function(r){t.setNode(r,e.node(r))})),$p.forEach(e.edges(),(function(r){var n=t.edge(r.v,r.w)||{weight:0,minlen:1},o=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+o.weight,minlen:Math.max(n.minlen,o.minlen)})})),t},asNonCompoundGraph:function(e){var t=new Jp({multigraph:e.isMultigraph()}).setGraph(e.graph());return $p.forEach(e.nodes(),(function(r){e.children(r).length||t.setNode(r,e.node(r))})),$p.forEach(e.edges(),(function(r){t.setEdge(r,e.edge(r))})),t},successorWeights:function(e){var t=$p.map(e.nodes(),(function(t){var r={};return $p.forEach(e.outEdges(t),(function(t){r[t.w]=(r[t.w]||0)+e.edge(t).weight})),r}));return $p.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=$p.map(e.nodes(),(function(t){var r={};return $p.forEach(e.inEdges(t),(function(t){r[t.v]=(r[t.v]||0)+e.edge(t).weight})),r}));return $p.zipObject(e.nodes(),t)},intersectRect:function(e,t){var r,n,o=e.x,i=e.y,a=t.x-o,s=t.y-i,u=e.width/2,c=e.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*u>Math.abs(a)*c?(s<0&&(c=-c),r=c*a/s,n=c):(a<0&&(u=-u),r=u,n=u*s/a);return{x:o+r,y:i+n}},buildLayerMatrix:function(e){var t=$p.map($p.range(eg(e)+1),(function(){return[]}));return $p.forEach(e.nodes(),(function(r){var n=e.node(r),o=n.rank;$p.isUndefined(o)||(t[o][n.order]=r)})),t},normalizeRanks:function(e){var t=$p.min($p.map(e.nodes(),(function(t){return e.node(t).rank})));$p.forEach(e.nodes(),(function(r){var n=e.node(r);$p.has(n,"rank")&&(n.rank-=t)}))},removeEmptyRanks:function(e){var t=$p.min($p.map(e.nodes(),(function(t){return e.node(t).rank}))),r=[];$p.forEach(e.nodes(),(function(n){var o=e.node(n).rank-t;r[o]||(r[o]=[]),r[o].push(n)}));var n=0,o=e.graph().nodeRankFactor;$p.forEach(r,(function(t,r){$p.isUndefined(t)&&r%o!=0?--n:n&&$p.forEach(t,(function(t){e.node(t).rank+=n}))}))},addBorderNode:function(e,t,r,n){var o={width:0,height:0};arguments.length>=4&&(o.rank=r,o.order=n);return Zp(e,"border",o,t)},maxRank:eg,partition:function(e,t){var r={lhs:[],rhs:[]};return $p.forEach(e,(function(e){t(e)?r.lhs.push(e):r.rhs.push(e)})),r},time:function(e,t){var r=$p.now();try{return t()}finally{console.log(e+" time: "+($p.now()-r)+"ms")}},notime:function(e,t){return t()}};function Zp(e,t,r,n){var o;do{o=$p.uniqueId(n)}while(e.hasNode(o));return r.dummy=t,e.setNode(o,r),o}function eg(e){return $p.max($p.map(e.nodes(),(function(t){var r=e.node(t).rank;if(!$p.isUndefined(r))return r})))}var tg=Tp,rg=Qp,ng={run:function(e){e.graph().dummyChains=[],tg.forEach(e.edges(),(function(t){!function(e,t){var r,n,o,i=t.v,a=e.node(i).rank,s=t.w,u=e.node(s).rank,c=t.name,h=e.edge(t),l=h.labelRank;if(u===a+1)return;for(e.removeEdge(t),o=0,++a;a<u;++o,++a)h.points=[],n={width:0,height:0,edgeLabel:h,edgeObj:t,rank:a},r=rg.addDummyNode(e,"edge",n,"_d"),a===l&&(n.width=h.width,n.height=h.height,n.dummy="edge-label",n.labelpos=h.labelpos),e.setEdge(i,r,{weight:h.weight},c),0===o&&e.graph().dummyChains.push(r),i=r;e.setEdge(i,s,{weight:h.weight},c)}(e,t)}))},undo:function(e){tg.forEach(e.graph().dummyChains,(function(t){var r,n=e.node(t),o=n.edgeLabel;for(e.setEdge(n.edgeObj,o);n.dummy;)r=e.successors(t)[0],e.removeNode(t),o.points.push({x:n.x,y:n.y}),"edge-label"===n.dummy&&(o.x=n.x,o.y=n.y,o.width=n.width,o.height=n.height),t=r,n=e.node(t)}))}};var og=Tp,ig={longestPath:function(e){var t={};og.forEach(e.sources(),(function r(n){var o=e.node(n);if(og.has(t,n))return o.rank;t[n]=!0;var i=og.min(og.map(e.outEdges(n),(function(t){return r(t.w)-e.edge(t).minlen})));return i!==Number.POSITIVE_INFINITY&&null!=i||(i=0),o.rank=i}))},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}};var ag=Tp,sg=jl.Graph,ug=ig.slack,cg=function(e){var t,r,n=new sg({directed:!1}),o=e.nodes()[0],i=e.nodeCount();n.setNode(o,{});for(;hg(n,e)<i;)t=lg(n,e),r=n.hasNode(t.v)?ug(e,t):-ug(e,t),fg(n,e,r);return n};function hg(e,t){return ag.forEach(e.nodes(),(function r(n){ag.forEach(t.nodeEdges(n),(function(o){var i=o.v,a=n===i?o.w:i;e.hasNode(a)||ug(t,o)||(e.setNode(a,{}),e.setEdge(n,a,{}),r(a))}))})),e.nodeCount()}function lg(e,t){return ag.minBy(t.edges(),(function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return ug(t,r)}))}function fg(e,t,r){ag.forEach(e.nodes(),(function(e){t.node(e).rank+=r}))}var dg=Tp,pg=cg,gg=ig.slack,vg=ig.longestPath,yg=jl.alg.preorder,_g=jl.alg.postorder,mg=Qp.simplify,bg=wg;function wg(e){e=mg(e),vg(e);var t,r=pg(e);for(kg(r),xg(r,e);t=Dg(r);)Ag(r,e,t,Cg(r,e,t))}function xg(e,t){var r=_g(e,e.nodes());r=r.slice(0,r.length-1),dg.forEach(r,(function(r){!function(e,t,r){var n=e.node(r).parent;e.edge(r,n).cutvalue=Eg(e,t,r)}(e,t,r)}))}function Eg(e,t,r){var n=e.node(r).parent,o=!0,i=t.edge(r,n),a=0;return i||(o=!1,i=t.edge(n,r)),a=i.weight,dg.forEach(t.nodeEdges(r),(function(i){var s=i.v===r,u=s?i.w:i.v;if(u!==n){var c=s===o,h=t.edge(i).weight;if(a+=c?h:-h,function(e,t,r){return e.hasEdge(t,r)}(e,r,u)){var l=e.edge(r,u).cutvalue;a+=c?-l:l}}})),a}function kg(e,t){arguments.length<2&&(t=e.nodes()[0]),Sg(e,{},1,t)}function Sg(e,t,r,n,o){var i=r,a=e.node(n);return t[n]=!0,dg.forEach(e.neighbors(n),(function(o){dg.has(t,o)||(r=Sg(e,t,r,o,n))})),a.low=i,a.lim=r++,o?a.parent=o:delete a.parent,r}function Dg(e){return dg.find(e.edges(),(function(t){return e.edge(t).cutvalue<0}))}function Cg(e,t,r){var n=r.v,o=r.w;t.hasEdge(n,o)||(n=r.w,o=r.v);var i=e.node(n),a=e.node(o),s=i,u=!1;i.lim>a.lim&&(s=a,u=!0);var c=dg.filter(t.edges(),(function(t){return u===jg(e,e.node(t.v),s)&&u!==jg(e,e.node(t.w),s)}));return dg.minBy(c,(function(e){return gg(t,e)}))}function Ag(e,t,r,n){var o=r.v,i=r.w;e.removeEdge(o,i),e.setEdge(n.v,n.w,{}),kg(e),xg(e,t),function(e,t){var r=dg.find(e.nodes(),(function(e){return!t.node(e).parent})),n=yg(e,r);n=n.slice(1),dg.forEach(n,(function(r){var n=e.node(r).parent,o=t.edge(r,n),i=!1;o||(o=t.edge(n,r),i=!0),t.node(r).rank=t.node(n).rank+(i?o.minlen:-o.minlen)}))}(e,t)}function jg(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}wg.initLowLimValues=kg,wg.initCutValues=xg,wg.calcCutValue=Eg,wg.leaveEdge=Dg,wg.enterEdge=Cg,wg.exchangeEdges=Ag;var Og=ig.longestPath,Ig=cg,Mg=bg,Fg=function(e){switch(e.graph().ranker){case"network-simplex":default:Tg(e);break;case"tight-tree":!function(e){Og(e),Ig(e)}(e);break;case"longest-path":Pg(e)}};var Pg=Og;function Tg(e){Mg(e)}var Ng=Tp,Lg=function(e){var t=function(e){var t={},r=0;function n(o){var i=r;Ng.forEach(e.children(o),n),t[o]={low:i,lim:r++}}return Ng.forEach(e.children(),n),t}(e);Ng.forEach(e.graph().dummyChains,(function(r){for(var n=e.node(r),o=n.edgeObj,i=function(e,t,r,n){var o,i,a=[],s=[],u=Math.min(t[r].low,t[n].low),c=Math.max(t[r].lim,t[n].lim);o=r;do{o=e.parent(o),a.push(o)}while(o&&(t[o].low>u||c>t[o].lim));i=o,o=n;for(;(o=e.parent(o))!==i;)s.push(o);return{path:a.concat(s.reverse()),lca:i}}(e,t,o.v,o.w),a=i.path,s=i.lca,u=0,c=a[u],h=!0;r!==o.w;){if(n=e.node(r),h){for(;(c=a[u])!==s&&e.node(c).maxRank<n.rank;)u++;c===s&&(h=!1)}if(!h){for(;u<a.length-1&&e.node(c=a[u+1]).minRank<=n.rank;)u++;c=a[u]}e.setParent(r,c),r=e.successors(r)[0]}}))};var Yg=Tp,Rg=Qp,Bg={run:function(e){var t=Rg.addDummyNode(e,"root",{},"_root"),r=function(e){var t={};function r(n,o){var i=e.children(n);i&&i.length&&Yg.forEach(i,(function(e){r(e,o+1)})),t[n]=o}return Yg.forEach(e.children(),(function(e){r(e,1)})),t}(e),n=Yg.max(Yg.values(r))-1,o=2*n+1;e.graph().nestingRoot=t,Yg.forEach(e.edges(),(function(t){e.edge(t).minlen*=o}));var i=function(e){return Yg.reduce(e.edges(),(function(t,r){return t+e.edge(r).weight}),0)}(e)+1;Yg.forEach(e.children(),(function(a){zg(e,t,o,i,n,r,a)})),e.graph().nodeRankFactor=o},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,Yg.forEach(e.edges(),(function(t){e.edge(t).nestingEdge&&e.removeEdge(t)}))}};function zg(e,t,r,n,o,i,a){var s=e.children(a);if(s.length){var u=Rg.addBorderNode(e,"_bt"),c=Rg.addBorderNode(e,"_bb"),h=e.node(a);e.setParent(u,a),h.borderTop=u,e.setParent(c,a),h.borderBottom=c,Yg.forEach(s,(function(s){zg(e,t,r,n,o,i,s);var h=e.node(s),l=h.borderTop?h.borderTop:s,f=h.borderBottom?h.borderBottom:s,d=h.borderTop?n:2*n,p=l!==f?1:o-i[a]+1;e.setEdge(u,l,{weight:d,minlen:p,nestingEdge:!0}),e.setEdge(f,c,{weight:d,minlen:p,nestingEdge:!0})})),e.parent(a)||e.setEdge(t,u,{weight:0,minlen:o+i[a]})}else a!==t&&e.setEdge(t,a,{weight:0,minlen:r})}var Vg=Tp,Gg=Qp,Hg=function(e){Vg.forEach(e.children(),(function t(r){var n=e.children(r),o=e.node(r);if(n.length&&Vg.forEach(n,t),Vg.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var i=o.minRank,a=o.maxRank+1;i<a;++i)Ug(e,"borderLeft","_bl",r,o,i),Ug(e,"borderRight","_br",r,o,i)}}))};function Ug(e,t,r,n,o,i){var a={width:0,height:0,rank:i,borderType:t},s=o[t][i-1],u=Gg.addDummyNode(e,"border",a,r);o[t][i]=u,e.setParent(u,n),s&&e.setEdge(s,u,{weight:1})}var Wg=Tp,qg={adjust:function(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||Xg(e)},undo:function(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||function(e){Wg.forEach(e.nodes(),(function(t){$g(e.node(t))})),Wg.forEach(e.edges(),(function(t){var r=e.edge(t);Wg.forEach(r.points,$g),Wg.has(r,"y")&&$g(r)}))}(e);"lr"!==t&&"rl"!==t||(!function(e){Wg.forEach(e.nodes(),(function(t){Jg(e.node(t))})),Wg.forEach(e.edges(),(function(t){var r=e.edge(t);Wg.forEach(r.points,Jg),Wg.has(r,"x")&&Jg(r)}))}(e),Xg(e))}};function Xg(e){Wg.forEach(e.nodes(),(function(t){Kg(e.node(t))})),Wg.forEach(e.edges(),(function(t){Kg(e.edge(t))}))}function Kg(e){var t=e.width;e.width=e.height,e.height=t}function $g(e){e.y=-e.y}function Jg(e){var t=e.x;e.x=e.y,e.y=t}var Qg=Tp,Zg=function(e){var t={},r=Qg.filter(e.nodes(),(function(t){return!e.children(t).length})),n=Qg.max(Qg.map(r,(function(t){return e.node(t).rank}))),o=Qg.map(Qg.range(n+1),(function(){return[]}));function i(r){if(!Qg.has(t,r)){t[r]=!0;var n=e.node(r);o[n.rank].push(r),Qg.forEach(e.successors(r),i)}}var a=Qg.sortBy(r,(function(t){return e.node(t).rank}));return Qg.forEach(a,i),o};var ev=Tp,tv=function(e,t){for(var r=0,n=1;n<t.length;++n)r+=rv(e,t[n-1],t[n]);return r};function rv(e,t,r){for(var n=ev.zipObject(r,ev.map(r,(function(e,t){return t}))),o=ev.flatten(ev.map(t,(function(t){return ev.sortBy(ev.map(e.outEdges(t),(function(t){return{pos:n[t.w],weight:e.edge(t).weight}})),"pos")})),!0),i=1;i<r.length;)i<<=1;var a=2*i-1;i-=1;var s=ev.map(new Array(a),(function(){return 0})),u=0;return ev.forEach(o.forEach((function(e){var t=e.pos+i;s[t]+=e.weight;for(var r=0;t>0;)t%2&&(r+=s[t+1]),s[t=t-1>>1]+=e.weight;u+=e.weight*r}))),u}var nv=Tp;var ov=Tp;var iv=Tp,av=Qp;function sv(e,t,r){for(var n;t.length&&(n=iv.last(t)).i<=r;)t.pop(),e.push(n.vs),r++;return r}var uv=Tp,cv=function(e,t){return nv.map(t,(function(t){var r=e.inEdges(t);if(r.length){var n=nv.reduce(r,(function(t,r){var n=e.edge(r),o=e.node(r.v);return{sum:t.sum+n.weight*o.order,weight:t.weight+n.weight}}),{sum:0,weight:0});return{v:t,barycenter:n.sum/n.weight,weight:n.weight}}return{v:t}}))},hv=function(e,t){var r={};return ov.forEach(e,(function(e,t){var n=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};ov.isUndefined(e.barycenter)||(n.barycenter=e.barycenter,n.weight=e.weight)})),ov.forEach(t.edges(),(function(e){var t=r[e.v],n=r[e.w];ov.isUndefined(t)||ov.isUndefined(n)||(n.indegree++,t.out.push(r[e.w]))})),function(e){var t=[];function r(e){return function(t){t.merged||(ov.isUndefined(t.barycenter)||ov.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&function(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}(e,t)}}function n(t){return function(r){r.in.push(t),0==--r.indegree&&e.push(r)}}for(;e.length;){var o=e.pop();t.push(o),ov.forEach(o.in.reverse(),r(o)),ov.forEach(o.out,n(o))}return ov.map(ov.filter(t,(function(e){return!e.merged})),(function(e){return ov.pick(e,["vs","i","barycenter","weight"])}))}(ov.filter(r,(function(e){return!e.indegree})))},lv=function(e,t){var r=av.partition(e,(function(e){return iv.has(e,"barycenter")})),n=r.lhs,o=iv.sortBy(r.rhs,(function(e){return-e.i})),i=[],a=0,s=0,u=0;n.sort((c=!!t,function(e,t){return e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:c?t.i-e.i:e.i-t.i})),u=sv(i,o,u),iv.forEach(n,(function(e){u+=e.vs.length,i.push(e.vs),a+=e.barycenter*e.weight,s+=e.weight,u=sv(i,o,u)}));var c;var h={vs:iv.flatten(i,!0)};s&&(h.barycenter=a/s,h.weight=s);return h},fv=function e(t,r,n,o){var i=t.children(r),a=t.node(r),s=a?a.borderLeft:void 0,u=a?a.borderRight:void 0,c={};s&&(i=uv.filter(i,(function(e){return e!==s&&e!==u})));var h=cv(t,i);uv.forEach(h,(function(r){if(t.children(r.v).length){var i=e(t,r.v,n,o);c[r.v]=i,uv.has(i,"barycenter")&&(a=r,s=i,uv.isUndefined(a.barycenter)?(a.barycenter=s.barycenter,a.weight=s.weight):(a.barycenter=(a.barycenter*a.weight+s.barycenter*s.weight)/(a.weight+s.weight),a.weight+=s.weight))}var a,s}));var l=hv(h,n);!function(e,t){uv.forEach(e,(function(e){e.vs=uv.flatten(e.vs.map((function(e){return t[e]?t[e].vs:e})),!0)}))}(l,c);var f=lv(l,o);if(s&&(f.vs=uv.flatten([s,f.vs,u],!0),t.predecessors(s).length)){var d=t.node(t.predecessors(s)[0]),p=t.node(t.predecessors(u)[0]);uv.has(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+d.order+p.order)/(f.weight+2),f.weight+=2}return f};var dv=Tp,pv=jl.Graph,gv=function(e,t,r){var n=function(e){var t;for(;e.hasNode(t=dv.uniqueId("_root")););return t}(e),o=new pv({compound:!0}).setGraph({root:n}).setDefaultNodeLabel((function(t){return e.node(t)}));return dv.forEach(e.nodes(),(function(i){var a=e.node(i),s=e.parent(i);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(o.setNode(i),o.setParent(i,s||n),dv.forEach(e[r](i),(function(t){var r=t.v===i?t.w:t.v,n=o.edge(r,i),a=dv.isUndefined(n)?0:n.weight;o.setEdge(r,i,{weight:e.edge(t).weight+a})})),dv.has(a,"minRank")&&o.setNode(i,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))})),o};var vv=Tp;var yv=Tp,_v=Zg,mv=tv,bv=fv,wv=gv,xv=function(e,t,r){var n,o={};vv.forEach(r,(function(r){for(var i,a,s=e.parent(r);s;){if((i=e.parent(s))?(a=o[i],o[i]=s):(a=n,n=s),a&&a!==s)return void t.setEdge(a,s);s=i}}))},Ev=jl.Graph,kv=Qp,Sv=function(e){var t=kv.maxRank(e),r=Dv(e,yv.range(1,t+1),"inEdges"),n=Dv(e,yv.range(t-1,-1,-1),"outEdges"),o=_v(e);Av(e,o);for(var i,a=Number.POSITIVE_INFINITY,s=0,u=0;u<4;++s,++u){Cv(s%2?r:n,s%4>=2),o=kv.buildLayerMatrix(e);var c=mv(e,o);c<a&&(u=0,i=yv.cloneDeep(o),a=c)}Av(e,i)};function Dv(e,t,r){return yv.map(t,(function(t){return wv(e,t,r)}))}function Cv(e,t){var r=new Ev;yv.forEach(e,(function(e){var n=e.graph().root,o=bv(e,n,r,t);yv.forEach(o.vs,(function(t,r){e.node(t).order=r})),xv(e,r,o.vs)}))}function Av(e,t){yv.forEach(t,(function(t){yv.forEach(t,(function(t,r){e.node(t).order=r}))}))}var jv=Tp,Ov=jl.Graph,Iv=Qp,Mv=function(e){var t,r=Iv.buildLayerMatrix(e),n=jv.merge(Fv(e,r),Pv(e,r)),o={};jv.forEach(["u","d"],(function(i){t="u"===i?r:jv.values(r).reverse(),jv.forEach(["l","r"],(function(r){"r"===r&&(t=jv.map(t,(function(e){return jv.values(e).reverse()})));var a=("u"===i?e.predecessors:e.successors).bind(e),s=Lv(e,t,n,a),u=Yv(e,t,s.root,s.align,"r"===r);"r"===r&&(u=jv.mapValues(u,(function(e){return-e}))),o[i+r]=u}))}));var i=Rv(e,o);return Bv(o,i),zv(o,e.graph().align)};function Fv(e,t){var r={};return jv.reduce(t,(function(t,n){var o=0,i=0,a=t.length,s=jv.last(n);return jv.forEach(n,(function(t,u){var c=function(e,t){if(e.node(t).dummy)return jv.find(e.predecessors(t),(function(t){return e.node(t).dummy}))}(e,t),h=c?e.node(c).order:a;(c||t===s)&&(jv.forEach(n.slice(i,u+1),(function(t){jv.forEach(e.predecessors(t),(function(n){var i=e.node(n),a=i.order;!(a<o||h<a)||i.dummy&&e.node(t).dummy||Tv(r,n,t)}))})),i=u+1,o=h)})),n})),r}function Pv(e,t){var r={};function n(t,n,o,i,a){var s;jv.forEach(jv.range(n,o),(function(n){s=t[n],e.node(s).dummy&&jv.forEach(e.predecessors(s),(function(t){var n=e.node(t);n.dummy&&(n.order<i||n.order>a)&&Tv(r,t,s)}))}))}return jv.reduce(t,(function(t,r){var o,i=-1,a=0;return jv.forEach(r,(function(s,u){if("border"===e.node(s).dummy){var c=e.predecessors(s);c.length&&(o=e.node(c[0]).order,n(r,a,u,i,o),a=u,i=o)}n(r,a,r.length,o,t.length)})),r})),r}function Tv(e,t,r){if(t>r){var n=t;t=r,r=n}var o=e[t];o||(e[t]=o={}),o[r]=!0}function Nv(e,t,r){if(t>r){var n=t;t=r,r=n}return jv.has(e[t],r)}function Lv(e,t,r,n){var o={},i={},a={};return jv.forEach(t,(function(e){jv.forEach(e,(function(e,t){o[e]=e,i[e]=e,a[e]=t}))})),jv.forEach(t,(function(e){var t=-1;jv.forEach(e,(function(e){var s=n(e);if(s.length){s=jv.sortBy(s,(function(e){return a[e]}));for(var u=(s.length-1)/2,c=Math.floor(u),h=Math.ceil(u);c<=h;++c){var l=s[c];i[e]===e&&t<a[l]&&!Nv(r,e,l)&&(i[l]=e,i[e]=o[e]=o[l],t=a[l])}}}))})),{root:o,align:i}}function Yv(e,t,r,n,o){var i={},a=function(e,t,r,n){var o=new Ov,i=e.graph(),a=function(e,t,r){return function(n,o,i){var a,s=n.node(o),u=n.node(i),c=0;if(c+=s.width/2,jv.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":a=-s.width/2;break;case"r":a=s.width/2}if(a&&(c+=r?a:-a),a=0,c+=(s.dummy?t:e)/2,c+=(u.dummy?t:e)/2,c+=u.width/2,jv.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":a=u.width/2;break;case"r":a=-u.width/2}return a&&(c+=r?a:-a),a=0,c}}(i.nodesep,i.edgesep,n);return jv.forEach(t,(function(t){var n;jv.forEach(t,(function(t){var i=r[t];if(o.setNode(i),n){var s=r[n],u=o.edge(s,i);o.setEdge(s,i,Math.max(a(e,t,n),u||0))}n=t}))})),o}(e,t,r,o),s=o?"borderLeft":"borderRight";function u(e,t){for(var r=a.nodes(),n=r.pop(),o={};n;)o[n]?e(n):(o[n]=!0,r.push(n),r=r.concat(t(n))),n=r.pop()}return u((function(e){i[e]=a.inEdges(e).reduce((function(e,t){return Math.max(e,i[t.v]+a.edge(t))}),0)}),a.predecessors.bind(a)),u((function(t){var r=a.outEdges(t).reduce((function(e,t){return Math.min(e,i[t.w]-a.edge(t))}),Number.POSITIVE_INFINITY),n=e.node(t);r!==Number.POSITIVE_INFINITY&&n.borderType!==s&&(i[t]=Math.max(i[t],r))}),a.successors.bind(a)),jv.forEach(n,(function(e){i[e]=i[r[e]]})),i}function Rv(e,t){return jv.minBy(jv.values(t),(function(t){var r=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY;return jv.forIn(t,(function(t,o){var i=function(e,t){return e.node(t).width}(e,o)/2;r=Math.max(t+i,r),n=Math.min(t-i,n)})),r-n}))}function Bv(e,t){var r=jv.values(t),n=jv.min(r),o=jv.max(r);jv.forEach(["u","d"],(function(r){jv.forEach(["l","r"],(function(i){var a,s=r+i,u=e[s];if(u!==t){var c=jv.values(u);(a="l"===i?n-jv.min(c):o-jv.max(c))&&(e[s]=jv.mapValues(u,(function(e){return e+a})))}}))}))}function zv(e,t){return jv.mapValues(e.ul,(function(r,n){if(t)return e[t.toLowerCase()][n];var o=jv.sortBy(jv.map(e,n));return(o[1]+o[2])/2}))}var Vv=Tp,Gv=Qp,Hv=Mv,Uv=function(e){(function(e){var t=Gv.buildLayerMatrix(e),r=e.graph().ranksep,n=0;Vv.forEach(t,(function(t){var o=Vv.max(Vv.map(t,(function(t){return e.node(t).height})));Vv.forEach(t,(function(t){e.node(t).y=n+o/2})),n+=o+r}))})(e=Gv.asNonCompoundGraph(e)),Vv.forEach(Hv(e),(function(t,r){e.node(r).x=t}))};var Wv=Tp,qv=Kp,Xv=ng,Kv=Fg,$v=Qp.normalizeRanks,Jv=Lg,Qv=Qp.removeEmptyRanks,Zv=Bg,ey=Hg,ty=qg,ry=Sv,ny=Uv,oy=Qp,iy=jl.Graph,ay=function(e,t){var r=t&&t.debugTiming?oy.time:oy.notime;r("layout",(function(){var t=r(" buildLayoutGraph",(function(){return function(e){var t=new iy({multigraph:!0,compound:!0}),r=vy(e.graph());return t.setGraph(Wv.merge({},uy,gy(r,sy),Wv.pick(r,cy))),Wv.forEach(e.nodes(),(function(r){var n=vy(e.node(r));t.setNode(r,Wv.defaults(gy(n,hy),ly)),t.setParent(r,e.parent(r))})),Wv.forEach(e.edges(),(function(r){var n=vy(e.edge(r));t.setEdge(r,Wv.merge({},dy,gy(n,fy),Wv.pick(n,py)))})),t}(e)}));r(" runLayout",(function(){!function(e,t){t(" makeSpaceForEdgeLabels",(function(){!function(e){var t=e.graph();t.ranksep/=2,Wv.forEach(e.edges(),(function(r){var n=e.edge(r);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)}))}(e)})),t(" removeSelfEdges",(function(){!function(e){Wv.forEach(e.edges(),(function(t){if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}}))}(e)})),t(" acyclic",(function(){qv.run(e)})),t(" nestingGraph.run",(function(){Zv.run(e)})),t(" rank",(function(){Kv(oy.asNonCompoundGraph(e))})),t(" injectEdgeLabelProxies",(function(){!function(e){Wv.forEach(e.edges(),(function(t){var r=e.edge(t);if(r.width&&r.height){var n=e.node(t.v),o={rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t};oy.addDummyNode(e,"edge-proxy",o,"_ep")}}))}(e)})),t(" removeEmptyRanks",(function(){Qv(e)})),t(" nestingGraph.cleanup",(function(){Zv.cleanup(e)})),t(" normalizeRanks",(function(){$v(e)})),t(" assignRankMinMax",(function(){!function(e){var t=0;Wv.forEach(e.nodes(),(function(r){var n=e.node(r);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,t=Wv.max(t,n.maxRank))})),e.graph().maxRank=t}(e)})),t(" removeEdgeLabelProxies",(function(){!function(e){Wv.forEach(e.nodes(),(function(t){var r=e.node(t);"edge-proxy"===r.dummy&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))}))}(e)})),t(" normalize.run",(function(){Xv.run(e)})),t(" parentDummyChains",(function(){Jv(e)})),t(" addBorderSegments",(function(){ey(e)})),t(" order",(function(){ry(e)})),t(" insertSelfEdges",(function(){!function(e){var t=oy.buildLayerMatrix(e);Wv.forEach(t,(function(t){var r=0;Wv.forEach(t,(function(t,n){var o=e.node(t);o.order=n+r,Wv.forEach(o.selfEdges,(function(t){oy.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:o.rank,order:n+ ++r,e:t.e,label:t.label},"_se")})),delete o.selfEdges}))}))}(e)})),t(" adjustCoordinateSystem",(function(){ty.adjust(e)})),t(" position",(function(){ny(e)})),t(" positionSelfEdges",(function(){!function(e){Wv.forEach(e.nodes(),(function(t){var r=e.node(t);if("selfedge"===r.dummy){var n=e.node(r.e.v),o=n.x+n.width/2,i=n.y,a=r.x-o,s=n.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:o+2*a/3,y:i-s},{x:o+5*a/6,y:i-s},{x:o+a,y:i},{x:o+5*a/6,y:i+s},{x:o+2*a/3,y:i+s}],r.label.x=r.x,r.label.y=r.y}}))}(e)})),t(" removeBorderNodes",(function(){!function(e){Wv.forEach(e.nodes(),(function(t){if(e.children(t).length){var r=e.node(t),n=e.node(r.borderTop),o=e.node(r.borderBottom),i=e.node(Wv.last(r.borderLeft)),a=e.node(Wv.last(r.borderRight));r.width=Math.abs(a.x-i.x),r.height=Math.abs(o.y-n.y),r.x=i.x+r.width/2,r.y=n.y+r.height/2}})),Wv.forEach(e.nodes(),(function(t){"border"===e.node(t).dummy&&e.removeNode(t)}))}(e)})),t(" normalize.undo",(function(){Xv.undo(e)})),t(" fixupEdgeLabelCoords",(function(){!function(e){Wv.forEach(e.edges(),(function(t){var r=e.edge(t);if(Wv.has(r,"x"))switch("l"!==r.labelpos&&"r"!==r.labelpos||(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}}))}(e)})),t(" undoCoordinateSystem",(function(){ty.undo(e)})),t(" translateGraph",(function(){!function(e){var t=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,o=0,i=e.graph(),a=i.marginx||0,s=i.marginy||0;function u(e){var i=e.x,a=e.y,s=e.width,u=e.height;t=Math.min(t,i-s/2),r=Math.max(r,i+s/2),n=Math.min(n,a-u/2),o=Math.max(o,a+u/2)}Wv.forEach(e.nodes(),(function(t){u(e.node(t))})),Wv.forEach(e.edges(),(function(t){var r=e.edge(t);Wv.has(r,"x")&&u(r)})),t-=a,n-=s,Wv.forEach(e.nodes(),(function(r){var o=e.node(r);o.x-=t,o.y-=n})),Wv.forEach(e.edges(),(function(r){var o=e.edge(r);Wv.forEach(o.points,(function(e){e.x-=t,e.y-=n})),Wv.has(o,"x")&&(o.x-=t),Wv.has(o,"y")&&(o.y-=n)})),i.width=r-t+a,i.height=o-n+s}(e)})),t(" assignNodeIntersects",(function(){!function(e){Wv.forEach(e.edges(),(function(t){var r,n,o=e.edge(t),i=e.node(t.v),a=e.node(t.w);o.points?(r=o.points[0],n=o.points[o.points.length-1]):(o.points=[],r=a,n=i),o.points.unshift(oy.intersectRect(i,r)),o.points.push(oy.intersectRect(a,n))}))}(e)})),t(" reversePoints",(function(){!function(e){Wv.forEach(e.edges(),(function(t){var r=e.edge(t);r.reversed&&r.points.reverse()}))}(e)})),t(" acyclic.undo",(function(){qv.undo(e)}))}(t,r)})),r(" updateInputGraph",(function(){!function(e,t){Wv.forEach(e.nodes(),(function(r){var n=e.node(r),o=t.node(r);n&&(n.x=o.x,n.y=o.y,t.children(r).length&&(n.width=o.width,n.height=o.height))})),Wv.forEach(e.edges(),(function(r){var n=e.edge(r),o=t.edge(r);n.points=o.points,Wv.has(o,"x")&&(n.x=o.x,n.y=o.y)})),e.graph().width=t.graph().width,e.graph().height=t.graph().height}(e,t)}))}))};var sy=["nodesep","edgesep","ranksep","marginx","marginy"],uy={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},cy=["acyclicer","ranker","rankdir","align"],hy=["width","height"],ly={width:0,height:0},fy=["minlen","weight","width","height","labeloffset"],dy={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},py=["labelpos"];function gy(e,t){return Wv.mapValues(Wv.pick(e,t),Number)}function vy(e){var t={};return Wv.forEach(e,(function(e,r){t[r.toLowerCase()]=e})),t}var yy=Tp,_y=Qp,my=jl.Graph;var by={graphlib:jl,layout:ay,debug:{debugOrdering:function(e){var t=_y.buildLayerMatrix(e),r=new my({compound:!0,multigraph:!0}).setGraph({});return yy.forEach(e.nodes(),(function(t){r.setNode(t,{label:t}),r.setParent(t,"layer"+e.node(t).rank)})),yy.forEach(e.edges(),(function(e){r.setEdge(e.v,e.w,{},e.name)})),yy.forEach(t,(function(e,t){var n="layer"+t;r.setNode(n,{rank:"same"}),yy.reduce(e,(function(e,t){return r.setEdge(e,t,{style:"invis"}),t}))})),r}},util:{time:Qp.time,notime:Qp.notime},version:"0.8.5"},wy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t}(by.graphlib.Graph),xy=function(){function e(){this._g=new wy({multigraph:!0,compound:!0}),this._g.setGraph({}),this._g.setDefaultNodeLabel((function(){return{debug:"error"}})),this._g.setDefaultEdgeLabel((function(){return{debug:"error"}}))}return e.prototype.parent=function(e){return this._g.parent(e)},e.prototype.filterNodes=function(e){var t=[];return this.eachNode((function(r){e(r)&&t.push(r)})),t},e.prototype.eachNode=function(e){this._g.nodes().forEach((function(t){e(t,this.node(t))}),this)},e.prototype.filterEdges=function(e){var t=[];return this.eachEdge((function(r){e(r)&&t.push(r)})),t},e.prototype.eachEdge=function(e){this._g.edges().forEach((function(t){e(t,t.v,t.w,this.edge(t))}),this)},e.prototype.setData=function(e,t,r,n,o){for(var i=this,a={addedVertices:[],addedEdges:[]},s=e.concat(t),u=0;u<s.length;++u){var c=s[u];o&&this._g.hasNode(c._id)||(this._g.setNode(c._id,c),a.addedVertices.push(c))}for(u=0;u<r.length;++u){var h=r[u];o&&this._g.hasEdge(h._id)||(h._sourceVertex&&h._targetVertex?(this._g.setEdge(h._sourceVertex._id,h._targetVertex._id,h,h._id),a.addedEdges.push(h)):console.warn("Bad edge definition"))}if(n)for(u=0;u<n.length;++u)this._g.setParent(n[u].child._id,n[u].parent._id);if(o){var l=r.map((function(e){return e._id}));this.filterEdges((function(e){return l.indexOf(e.name)<0})).forEach((function(e){return i._g.removeEdge(e.v,e.w)}));var f=s.map((function(e){return e._id}));this.filterNodes((function(e){return f.indexOf(e)<0})).forEach((function(e){return i._g.removeNode(e)}))}return a},e.prototype.node=function(e){return this._g.node(e)},e.prototype.nodeCount=function(){return this._g.nodeCount()},e.prototype.nodes=function(){var e=this;return this._g.nodes().map((function(t){return e._g.node(t)}))},e.prototype.nodeEdges=function(e){return this._g.nodeEdges(e)},e.prototype.edge=function(e){return this._g.edge(e)},e.prototype.edges=function(){var e=this;return this._g.edges().map((function(t){return e._g.edge(t)}))},e.prototype.neighbors=function(e){var t=this;return this._g.neighbors(e).map((function(e){return t._g.node(e)}))},e.prototype.singleNeighbors=function(e){var t=this;return this._g.neighbors(e).filter((function(e){return 1===t._g.neighbors(e).length})).map((function(e){return t._g.node(e)}))},e.prototype.gatherShortestPath=function(e,t){for(var r=[],n=t,o=e[n];o;){if(o.distance<1/0&&o.predecessor){var i=this._g.nodeEdges(n,o.predecessor)[0];r.push(this._g.edge(i))}o=e[n=o.predecessor]}return r},e.prototype.shortestPath=function(e,t){return this.gatherShortestPath(by.graphlib.alg.dijkstra(this._g,e),t)},e.prototype.undirectedShortestPath=function(e,t){var r=this;return this.gatherShortestPath(by.graphlib.alg.dijkstra(this._g,e,null,(function(e){return r._g.nodeEdges(e)})),t)},e.prototype.getJSON=function(){var e=by.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})," ")},e}();function Ey(e,t){var r;function n(){var n,o,i=r.length,a=0,s=0;for(n=0;n<i;++n)a+=(o=r[n]).x,s+=o.y;for(a=a/i-e,s=s/i-t,n=0;n<i;++n)(o=r[n]).x-=a,o.y-=s}return null==e&&(e=0),null==t&&(t=0),n.initialize=function(e){r=e},n.x=function(t){return arguments.length?(e=+t,n):e},n.y=function(e){return arguments.length?(t=+e,n):t},n}function ky(e){return function(){return e}}function Sy(){return 1e-6*(Math.random()-.5)}function Dy(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var o,i,a,s,u,c,h,l,f,d=e._root,p={data:n},g=e._x0,v=e._y0,y=e._x1,_=e._y1;if(!d)return e._root=p,e;for(;d.length;)if((c=t>=(i=(g+y)/2))?g=i:y=i,(h=r>=(a=(v+_)/2))?v=a:_=a,o=d,!(d=d[l=h<<1|c]))return o[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,o?o[l]=p:e._root=p,e;do{o=o?o[l]=new Array(4):e._root=new Array(4),(c=t>=(i=(g+y)/2))?g=i:y=i,(h=r>=(a=(v+_)/2))?v=a:_=a}while((l=h<<1|c)==(f=(u>=a)<<1|s>=i));return o[f]=d,o[l]=p,e}function Cy(e,t,r,n,o){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=o}function Ay(e){return e[0]}function jy(e){return e[1]}function Oy(e,t,r){var n=new Iy(null==t?Ay:t,null==r?jy:r,NaN,NaN,NaN,NaN);return null==e?n:n.addAll(e)}function Iy(e,t,r,n,o,i){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=o,this._y1=i,this._root=void 0}function My(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var Fy=Oy.prototype=Iy.prototype;function Py(e){return e.index}function Ty(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function Ny(e){var r,n,o,i,a,s=Py,u=function(e){return 1/Math.min(i[e.source.index],i[e.target.index])},c=ky(30),h=1;function l(t){for(var o=0,i=e.length;o<h;++o)for(var s,u,c,l,f,d,p,g=0;g<i;++g)u=(s=e[g]).source,l=(c=s.target).x+c.vx-u.x-u.vx||Sy(),f=c.y+c.vy-u.y-u.vy||Sy(),l*=d=((d=Math.sqrt(l*l+f*f))-n[g])/d*t*r[g],f*=d,c.vx-=l*(p=a[g]),c.vy-=f*p,u.vx+=l*(p=1-p),u.vy+=f*p}function f(){if(o){var u,c,h=o.length,l=e.length,f=t.map(o,s);for(u=0,i=new Array(h);u<l;++u)(c=e[u]).index=u,"object"!=typeof c.source&&(c.source=Ty(f,c.source)),"object"!=typeof c.target&&(c.target=Ty(f,c.target)),i[c.source.index]=(i[c.source.index]||0)+1,i[c.target.index]=(i[c.target.index]||0)+1;for(u=0,a=new Array(l);u<l;++u)c=e[u],a[u]=i[c.source.index]/(i[c.source.index]+i[c.target.index]);r=new Array(l),d(),n=new Array(l),p()}}function d(){if(o)for(var t=0,n=e.length;t<n;++t)r[t]=+u(e[t],t,e)}function p(){if(o)for(var t=0,r=e.length;t<r;++t)n[t]=+c(e[t],t,e)}return null==e&&(e=[]),l.initialize=function(e){o=e,f()},l.links=function(t){return arguments.length?(e=t,f(),l):e},l.id=function(e){return arguments.length?(s=e,l):s},l.iterations=function(e){return arguments.length?(h=+e,l):h},l.strength=function(e){return arguments.length?(u="function"==typeof e?e:ky(+e),d(),l):u},l.distance=function(e){return arguments.length?(c="function"==typeof e?e:ky(+e),p(),l):c},l}Fy.copy=function(){var e,t,r=new Iy(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=My(n),r;for(e=[{source:n,target:r._root=new Array(4)}];n=e.pop();)for(var o=0;o<4;++o)(t=n.source[o])&&(t.length?e.push({source:t,target:n.target[o]=new Array(4)}):n.target[o]=My(t));return r},Fy.add=function(e){var t=+this._x.call(null,e),r=+this._y.call(null,e);return Dy(this.cover(t,r),t,r,e)},Fy.addAll=function(e){var t,r,n,o,i=e.length,a=new Array(i),s=new Array(i),u=1/0,c=1/0,h=-1/0,l=-1/0;for(r=0;r<i;++r)isNaN(n=+this._x.call(null,t=e[r]))||isNaN(o=+this._y.call(null,t))||(a[r]=n,s[r]=o,n<u&&(u=n),n>h&&(h=n),o<c&&(c=o),o>l&&(l=o));if(u>h||c>l)return this;for(this.cover(u,c).cover(h,l),r=0;r<i;++r)Dy(this,a[r],s[r],e[r]);return this},Fy.cover=function(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,n=this._y0,o=this._x1,i=this._y1;if(isNaN(r))o=(r=Math.floor(e))+1,i=(n=Math.floor(t))+1;else{for(var a,s,u=o-r,c=this._root;r>e||e>=o||n>t||t>=i;)switch(s=(t<n)<<1|e<r,(a=new Array(4))[s]=c,c=a,u*=2,s){case 0:o=r+u,i=n+u;break;case 1:r=o-u,i=n+u;break;case 2:o=r+u,n=i-u;break;case 3:r=o-u,n=i-u}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=n,this._x1=o,this._y1=i,this},Fy.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},Fy.extent=function(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]]},Fy.find=function(e,t,r){var n,o,i,a,s,u,c,h=this._x0,l=this._y0,f=this._x1,d=this._y1,p=[],g=this._root;for(g&&p.push(new Cy(g,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(!(!(g=u.node)||(o=u.x0)>f||(i=u.y0)>d||(a=u.x1)<h||(s=u.y1)<l))if(g.length){var v=(o+a)/2,y=(i+s)/2;p.push(new Cy(g[3],v,y,a,s),new Cy(g[2],o,y,v,s),new Cy(g[1],v,i,a,y),new Cy(g[0],o,i,v,y)),(c=(t>=y)<<1|e>=v)&&(u=p[p.length-1],p[p.length-1]=p[p.length-1-c],p[p.length-1-c]=u)}else{var _=e-+this._x.call(null,g.data),m=t-+this._y.call(null,g.data),b=_*_+m*m;if(b<r){var w=Math.sqrt(r=b);h=e-w,l=t-w,f=e+w,d=t+w,n=g.data}}return n},Fy.remove=function(e){if(isNaN(i=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e)))return this;var t,r,n,o,i,a,s,u,c,h,l,f,d=this._root,p=this._x0,g=this._y0,v=this._x1,y=this._y1;if(!d)return this;if(d.length)for(;;){if((c=i>=(s=(p+v)/2))?p=s:v=s,(h=a>=(u=(g+y)/2))?g=u:y=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(o=d.next)&&delete d.next,n?(o?n.next=o:delete n.next,this):t?(o?t[l]=o: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=o,this)},Fy.removeAll=function(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this},Fy.root=function(){return this._root},Fy.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},Fy.visit=function(e){var t,r,n,o,i,a,s=[],u=this._root;for(u&&s.push(new Cy(u,this._x0,this._y0,this._x1,this._y1));t=s.pop();)if(!e(u=t.node,n=t.x0,o=t.y0,i=t.x1,a=t.y1)&&u.length){var c=(n+i)/2,h=(o+a)/2;(r=u[3])&&s.push(new Cy(r,c,h,i,a)),(r=u[2])&&s.push(new Cy(r,n,h,c,a)),(r=u[1])&&s.push(new Cy(r,c,o,i,h)),(r=u[0])&&s.push(new Cy(r,n,o,c,h))}return this},Fy.visitAfter=function(e){var t,r=[],n=[];for(this._root&&r.push(new Cy(this._root,this._x0,this._y0,this._x1,this._y1));t=r.pop();){var o=t.node;if(o.length){var i,a=t.x0,s=t.y0,u=t.x1,c=t.y1,h=(a+u)/2,l=(s+c)/2;(i=o[0])&&r.push(new Cy(i,a,s,h,l)),(i=o[1])&&r.push(new Cy(i,h,s,u,l)),(i=o[2])&&r.push(new Cy(i,a,l,h,c)),(i=o[3])&&r.push(new Cy(i,h,l,u,c))}n.push(t)}for(;t=n.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this},Fy.x=function(e){return arguments.length?(this._x=e,this):this._x},Fy.y=function(e){return arguments.length?(this._y=e,this):this._y};var Ly,Yy,Ry=0,By=0,zy=0,Vy=0,Gy=0,Hy=0,Uy="object"==typeof performance&&performance.now?performance:Date,Wy="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function qy(){return Gy||(Wy(Xy),Gy=Uy.now()+Hy)}function Xy(){Gy=0}function Ky(){this._call=this._time=this._next=null}function $y(e,t,r){var n=new Ky;return n.restart(e,t,r),n}function Jy(){Gy=(Vy=Uy.now())+Hy,Ry=By=0;try{!function(){qy(),++Ry;for(var e,t=Ly;t;)(e=Gy-t._time)>=0&&t._call.call(null,e),t=t._next;--Ry}()}finally{Ry=0,function(){var e,t,r=Ly,n=1/0;for(;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:Ly=t);Yy=e,Zy(n)}(),Gy=0}}function Qy(){var e=Uy.now(),t=e-Vy;t>1e3&&(Hy-=t,Vy=e)}function Zy(e){Ry||(By&&(By=clearTimeout(By)),e-Gy>24?(e<1/0&&(By=setTimeout(Jy,e-Uy.now()-Hy)),zy&&(zy=clearInterval(zy))):(zy||(Vy=Uy.now(),zy=setInterval(Qy,1e3)),Ry=1,Wy(Jy)))}function e_(e){return e.x}function t_(e){return e.y}Ky.prototype=$y.prototype={constructor:Ky,restart:function(e,t,r){if("function"!=typeof e)throw new TypeError("callback is not a function");r=(null==r?qy():+r)+(null==t?0:+t),this._next||Yy===this||(Yy?Yy._next=this:Ly=this,Yy=this),this._call=e,this._time=r,Zy()},stop:function(){this._call&&(this._call=null,this._time=1/0,Zy())}};var r_=Math.PI*(3-Math.sqrt(5));function n_(e){var r,n=1,o=.001,i=1-Math.pow(o,1/300),a=0,s=.6,u=t.map(),c=$y(l),h=t.dispatch("tick","end");function l(){f(),h.call("tick",r),n<o&&(c.stop(),h.call("end",r))}function f(t){var o,c,h=e.length;void 0===t&&(t=1);for(var l=0;l<t;++l)for(n+=(a-n)*i,u.each((function(e){e(n)})),o=0;o<h;++o)null==(c=e[o]).fx?c.x+=c.vx*=s:(c.x=c.fx,c.vx=0),null==c.fy?c.y+=c.vy*=s:(c.y=c.fy,c.vy=0);return r}function d(){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 o=10*Math.sqrt(r),i=r*r_;t.x=o*Math.cos(i),t.y=o*Math.sin(i)}(isNaN(t.vx)||isNaN(t.vy))&&(t.vx=t.vy=0)}}function p(t){return t.initialize&&t.initialize(e),t}return null==e&&(e=[]),d(),r={tick:f,restart:function(){return c.restart(l),r},stop:function(){return c.stop(),r},nodes:function(t){return arguments.length?(e=t,d(),u.each(p),r):e},alpha:function(e){return arguments.length?(n=+e,r):n},alphaMin:function(e){return arguments.length?(o=+e,r):o},alphaDecay:function(e){return arguments.length?(i=+e,r):+i},alphaTarget:function(e){return arguments.length?(a=+e,r):a},velocityDecay:function(e){return arguments.length?(s=1-e,r):1-s},force:function(e,t){return arguments.length>1?(null==t?u.remove(e):u.set(e,p(t)),r):u.get(e)},find:function(t,r,n){var o,i,a,s,u,c=0,h=e.length;for(null==n?n=1/0:n*=n,c=0;c<h;++c)(a=(o=t-(s=e[c]).x)*o+(i=r-s.y)*i)<n&&(u=s,n=a);return u},on:function(e,t){return arguments.length>1?(h.on(e,t),r):h.on(e)}}}function o_(){var e,t,r,n,o=ky(-30),i=1,a=1/0,s=.81;function u(n){var o,i=e.length,a=Oy(e,e_,t_).visitAfter(h);for(r=n,o=0;o<i;++o)t=e[o],a.visit(l)}function c(){if(e){var t,r,i=e.length;for(n=new Array(i),t=0;t<i;++t)r=e[t],n[r.index]=+o(r,t,e)}}function h(e){var t,r,o,i,a,s=0,u=0;if(e.length){for(o=i=a=0;a<4;++a)(t=e[a])&&(r=Math.abs(t.value))&&(s+=t.value,u+=r,o+=r*t.x,i+=r*t.y);e.x=o/u,e.y=i/u}else{(t=e).x=t.data.x,t.y=t.data.y;do{s+=n[t.data.index]}while(t=t.next)}e.value=s}function l(e,o,u,c){if(!e.value)return!0;var h=e.x-t.x,l=e.y-t.y,f=c-o,d=h*h+l*l;if(f*f/s<d)return d<a&&(0===h&&(d+=(h=Sy())*h),0===l&&(d+=(l=Sy())*l),d<i&&(d=Math.sqrt(i*d)),t.vx+=h*e.value*r/d,t.vy+=l*e.value*r/d),!0;if(!(e.length||d>=a)){(e.data!==t||e.next)&&(0===h&&(d+=(h=Sy())*h),0===l&&(d+=(l=Sy())*l),d<i&&(d=Math.sqrt(i*d)));do{e.data!==t&&(f=n[e.data.index]*r/d,t.vx+=h*f,t.vy+=l*f)}while(e=e.next)}}return u.initialize=function(t){e=t,c()},u.strength=function(e){return arguments.length?(o="function"==typeof e?e:ky(+e),c(),u):o},u.distanceMin=function(e){return arguments.length?(i=e*e,u):Math.sqrt(i)},u.distanceMax=function(e){return arguments.length?(a=e*e,u):Math.sqrt(a)},u.theta=function(e){return arguments.length?(s=e*e,u):Math.sqrt(s)},u}function i_(e,t,r,n){var o=this;this.pos={};n=n||(t<r?t-0:r-0)/2;var i=e.nodeCount(),a=-Math.PI/2,s=2*Math.PI/i;e.eachNode((function(e,i){var u=i.getBBox();o.pos[e]={x:i.fixed?i.x:t/2+Math.cos(a)*(n-0),y:i.fixed?i.y:r/2+Math.sin(a)*(n-0),width:u.width,height:u.height},a+=s}))}function a_(e,t,r,n){n=n||{};var o=this;this.pos={},this.vertices=[],this.vertexMap={},e.eachNode((function(t){var 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};o.vertices.push(i),o.vertexMap[t]=i})),this.edges=[],e.eachEdge((function(e,t,r){o.edges.push({source:t,target:r})}));var i=Ny().id((function(e){return e.id})).distance(n.linkDistance).strength(n.linkStrength),a=o_().strength((function(e){var t=e.value.getBBox();return n.charge*Math.max(t.width,t.height)}));if(this.force=n_().force("link",i).force("charge",a).force("center",Ey(t/2,r/2)).velocityDecay(n.oneShot?.1:n.friction).nodes(this.vertices),i.links(this.edges),n.oneShot){this.force.restart();var s=e.nodeCount();s=Math.min(s*s,500);for(var u=0;u<s;++u)this.force.tick();this.force.stop()}}function s_(e,t,r,n){var o=new by.graphlib.Graph({multigraph:!0,compound:!0}).setGraph(n).setDefaultNodeLabel((function(){return{}})).setDefaultEdgeLabel((function(){return{}}));e.eachNode((function(t){var r=e.node(t).getBBox();o.setNode(t,{width:r.width,height:r.height})})),e.eachEdge((function(t,r,i){var a=e.edge(t);o.setEdge(r,i,{weight:a.weight()},a._id),n.digraph||o.setEdge(i,r,{weight:a.weight()},a._id)})),e.eachNode((function(t){o.setParent(t,e.parent(t))})),this.dagreLayout=by.layout(o,{debugTiming:!1});var i=-o.graph().width/2,a=-o.graph().height/2;o.nodes().forEach((function(e){var n=o.node(e);n.x+=i+t/2,n.y+=a+r/2})),o.edges().forEach((function(e){for(var n=o.edge(e),s=0;s<n.points.length;++s)n.points[s].x+=i+t/2,n.points[s].y+=a+r/2})),this.digraph=o}i_.prototype.nodePos=function(e){return this.pos[e]},i_.prototype.edgePoints=function(e){return[]},a_.prototype.nodePos=function(e){return this.vertexMap[e]},a_.prototype.edgePoints=function(e){return[]},s_.prototype.nodePos=function(e){return this.digraph.node(e)},s_.prototype.edgePoints=function(e){return this.digraph.edge(e._sourceVertex.id(),e._targetVertex.id(),e._id).points};L(".graph_Subgraph .border{fill:none;stroke:#1f77b4;stroke-width:1px;pointer-events:none}.graph_Subgraph.selected>rect{stroke:red!important}");var u_=function(e){function r(){var r=e.call(this)||this;return r._textWidget=(new t.Text).anchor("start").fontSize(14),r._buttonMin=(new t.Icon).diameter(18).shape_colorStroke("#1f77b4").shape_colorFill("#dcf1ff").image_colorFill("#1f77b4").on("click",(function(){r.minClick()}),!0).on("dblclick",(function(){}),!0),r._minState="normal",r}return s(r,e),r.prototype.minState=function(e){return arguments.length?(this._minState=e,this):this._minState},r.prototype.calcIcon=function(){switch(this._minState){case"normal":return"";case"partial":return""}},r.prototype.getBBox=function(e,t){var r=this.width(),n=this.height();return{x:-r/2,y:-n/2-14,width:r,height:n}},r.prototype.enter=function(t,r){e.prototype.enter.call(this,t,r),this._border=r.append("rect").attr("class","border"),this._textWidget.target(t),this._buttonMin.target(t)},r.prototype.update=function(r,n){e.prototype.update.call(this,r,n);var o=this.getBBox();this._border.attr("x",o.x).attr("y",o.y).attr("width",o.width).attr("height",o.height).style("fill",this.border_colorFill()).style("stroke",this.border_colorStroke()),this.border_colorFill_exists()&&!this.title_colorFill_exists()&&this.title_colorFill(t.Palette.textColor(this.border_colorFill())),this._textWidget.pos({x:o.x+4,y:o.y+14}).width(this.width()-8).text(this.showTitle()?this.title():"").render(),this._buttonMin.visible(this.showMinMax()).pos({x:o.x+o.width-13,y:o.y+13}).faChar(this.calcIcon()).render()},r.prototype.exit=function(t,r){this._buttonMin.target(null),this._textWidget.target(null),this._border.remove(),e.prototype.exit.call(this,t,r)},r.prototype.intersection=function(e,t){var r=null;return[].forEach((function(e){(null===r||r.d>e.d)&&(r=e)})),r&&r.i?r.i:null},r.prototype.click=function(e){},r.prototype.minClick=function(){switch(this._minState){case"normal":this._minState="partial";break;case"partial":this._minState="normal"}this._buttonMin.faChar(this.calcIcon()).render()},r}(t.SVGWidget);u_.prototype._class+=" graph_Subgraph",u_.prototype.publish("border_colorStroke",null,"html-color","Stroke Color",null,{optional:!0}),u_.prototype.publish("border_colorFill",null,"html-color","Fill Color",null,{optional:!0}),u_.prototype.publish("showTitle",!0,"boolean","Show Title",null,{tags:["Basic"]}),u_.prototype.publish("title","","string","Title",null,{tags:["Basic"]}),u_.prototype.publishProxy("titleFontSize","_textWidget","fontSize"),u_.prototype.publishProxy("title_colorFill","_textWidget","colorFill"),u_.prototype.publish("showMinMax",!1,"boolean","Show Min/Max",null,{tags:["Basic"]});L(".graph_Vertex.selected .common_Shape{stroke:red!important}");var c_=function(e){function r(){var r=e.call(this)||this;return r._icon=new t.Icon,r._textBox=new t.TextBox,r._annotationWidgets={},r.pos({x:void 0,y:void 0}),r}return s(r,e),r.prototype.getIconBBox=function(){var 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}},r.prototype.getBBox=function(e,t){var r=this.getIconBBox(),n=this._textBox.getBBox(!0),o=Math.min(r.x,n.x),i=Math.min(r.y,n.y);return{x:o,y:i,width:Math.max(r.x+r.width,n.x+n.width)-o,height:Math.max(r.y+r.height,n.y+n.height)-i}},r.prototype.enter=function(t,r){var n=this;e.prototype.enter.call(this,t,r),delete this._prevHash,this._icon.target(t),this._textBox.target(t),r.on("mouseover",(function(e){return n.mouseover(e.data())})).on("mouseout",(function(e){return n.mouseout(e.data())}))},r.prototype.update=function(r,n){e.prototype.update.call(this,r,n);var o=this.hashSum();if(this._prevHash!==o){this._prevHash=o,n.classed("centroid",this.centroid()),n.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();var i=this.getIconBBox();this._icon.move(i);var a=this,s=n.selectAll(".annotation").data(this.annotationIcons()),u=s.enter().append("g").attr("class","annotation").each((function(e,r){a._annotationWidgets[r]=(new t.Icon).target(this).shape("square")})),c=this._textBox.getBBox(!0),h=c.width/2,l=c.height/2;u.merge(s).each((function(e,t){var r=a._annotationWidgets[t];for(var n in r.diameter(a.annotationDiameter()).shape_colorFill(a.textbox_shape_colorFill()).shape_colorStroke(a.textbox_shape_colorStroke()),e)r[n]?r[n](e[n]):globalThis.__hpcc_debug&&console.warn("Invalid annotation property: "+n);r.render();var o=r.getBBox(!0);r.move({x:h-o.width/2+4,y:l+o.height/2-4}),h-=o.width+a.annotationSpacing()})),s.exit().each((function(e,r){var n=t.select(this);a._annotationWidgets[r].target(null),delete a._annotationWidgets[r],n.remove()}))}},r.prototype.exit=function(t,r){for(var n in this._annotationWidgets)this._annotationWidgets[n].target(null);this._icon.target(null),this._textBox.target(null),e.prototype.exit.call(this,t,r)},r.prototype.contains=function(e){return this._icon.contains(e)||this._textBox.contains(e)},r.prototype.intersection=function(e,t){var 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},r.prototype.mouseover=function(e){},r.prototype.mouseout=function(e){},r}(t.SVGWidget);c_.prototype._class+=" graph_Vertex",c_.prototype.publishProxy("faChar","_icon"),c_.prototype.publishProxy("imageUrl","_icon"),c_.prototype.publishProxy("icon_diameter","_icon","diameter"),c_.prototype.publishProxy("icon_paddingPercent","_icon","paddingPercent"),c_.prototype.publishProxy("icon_shape_colorFill","_icon","shape_colorFill"),c_.prototype.publishProxy("icon_shape_colorStroke","_icon","shape_colorStroke"),c_.prototype.publishProxy("icon_image_colorFill","_icon","image_colorFill"),c_.prototype.publishProxy("icon_fontFamily","_icon","fontFamily"),c_.prototype.publish("centroid",!1,"boolean","Centroid Vertex"),c_.prototype.publishProxy("text","_textBox"),c_.prototype.publishProxy("anchor","_textBox"),c_.prototype.publishProxy("textbox_shape_colorStroke","_textBox","shape_colorStroke"),c_.prototype.publishProxy("textbox_shape_colorFill","_textBox","shape_colorFill"),c_.prototype.publishProxy("textbox_text_colorFill","_textBox","text_colorFill"),c_.prototype.publishProxy("textbox_text_fontFamily","_textBox","text_fontFamily"),c_.prototype.publish("iconAnchor","start","set","Horizontal anchor position of icon",["","start","middle","end","left"],{tags:["Basic"]}),c_.prototype.publish("iconTooltip","","string","iconTooltip",null,{tags:["Private"]}),c_.prototype.publish("tooltip","","string","Tooltip",null,{tags:["Private"]}),c_.prototype.publish("annotationDiameter",14,"number","Annotation Diameter",null,{tags:["Private"]}),c_.prototype.publish("annotationSpacing",3,"number","Annotation Spacing",null,{tags:["Private"]}),c_.prototype.publish("annotationIcons",[],"array","Annotations",null,{tags:["Private"]});L(".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}");var h_=function(e){function r(){var r=e.call(this)||this;r._toggleHierarchy=(new t.ToggleButton).faChar("fa-sitemap").tooltip("Hierarchy").on("click",(function(){return r.layoutClick("Hierarchy")})),r._toggleForceDirected=(new t.ToggleButton).faChar("fa-expand").tooltip("Force Directed").on("click",(function(){return r.layoutClick("ForceDirected")})),r._toggleForceDirected2=(new t.ToggleButton).faChar("fa-arrows").tooltip("Spring").on("click",(function(){return r.layoutClick("ForceDirected2")})),r._toggleCircle=(new t.ToggleButton).faChar("fa-circle-o").tooltip("Circle").on("click",(function(){return r.layoutClick("Circle")})),r._dataHash=0,r._neighborOffsets=[],n.IGraph.call(r),n.ITooltip.call(r),r.tooltipHTML((function(e){var t;return e instanceof u_?t=e.title().replace(/\n/g,"<br>"):(e instanceof c_||e instanceof R)&&(t=e.text().replace(/\n/g,"<br>")),t?'<p style="text-align:center">'.concat(t,"</p>"):null})),r._drawStartPos="origin";var o=[r._toggleHierarchy,r._toggleForceDirected,r._toggleForceDirected2,r._toggleCircle,new t.Spacer];return r._iconBar.buttons(o.concat(r._iconBar.buttons())),r._graphData=new xy,r.highlight={zoom:1.1,opacity:.33,edge:"1.25px"},r._selection=new t.Utility.Selection(r),r.zoomToFitLimit(1),r}return s(r,e),r.prototype.iconBarButtons=function(){return this._iconBar.buttons()},r.prototype.layoutClick=function(e){var t=this;this.layout(e),"ForceDirected2"!==e&&this.applyScaleOnLayout(!0),this.layout(e).render((function(e){t.applyScaleOnLayout(!1)}))},r.prototype.getOffsetPos=function(){return{x:0,y:0}},r.prototype.size=function(t){var r=e.prototype.size.apply(this,arguments);return r},r.prototype.clear=function(){this.data({subgraphs:[],vertices:[],edges:[],hierarchy:[]},!1)},r.prototype.data=function(t,r){var n=e.prototype.data.apply(this,arguments);if(arguments.length){r||(this._graphData=new xy,this._renderCount=0);var o=this._graphData.setData(t.subgraphs||[],t.vertices||[],t.edges||[],t.hierarchy||[],r||!1);o.addedVertices.length&&this._dataHash++;var i=this;o.addedVertices.forEach((function(e){e._graphID=i._id})),o.addedEdges.forEach((function(e){e._graphID=i._id}));var a={};this._graphData.edges().forEach((function(e){a[e._sourceVertex._id]||(a[e._sourceVertex._id]={}),a[e._sourceVertex._id][e._targetVertex._id]||(a[e._sourceVertex._id][e._targetVertex._id]=0);var t=++a[e._sourceVertex._id][e._targetVertex._id];e.arcDepth(16*t)}))}return n},r.prototype.graphData=function(){return this._graphData},r.prototype.selection=function(e){return arguments.length?(this._selection.set(e),this):this._selection.get()},r.prototype.linkcolor_default=function(e){return arguments.length?(this._linkcolor=e,this):this._linkcolor},r.prototype.linktooltip_default=function(e){return arguments.length?(this._linktooltip=e,this):this._linktooltip},r.prototype.dragstart=function(e){var r=this;if(this.allowDragging()){var n=t.d3Event();if(n.sourceEvent.stopPropagation(),e.__drag_dx=n.x-e.x(),e.__drag_dy=n.y-e.y(),this._dragging=!0,this.forceLayout){n.active||this.forceLayout.force.alphaTarget(.3).restart();var o=this.forceLayout.vertexMap[e.id()];o.fixed=!0,o.fx=o.x,o.fy=o.y}this._neighborOffsets=[],this.dragSingleNeighbors()&&(this._neighborOffsets=this._graphData.singleNeighbors(e.id()).map((function(r){return t.select(r.target()).raise(),{neighbor:r,offsetX:e.x()-r.x(),offsetY:e.y()-r.y()}})));for(var i=e.target(),a=i.nextSibling;a;)i.parentNode.insertBefore(a,i),a=i.nextSibling;t.Platform.svgMarkerGlitch&&this._graphData.nodeEdges(e.id()).forEach((function(e){var t=r._graphData.edge(e);r._pushMarkers(t.element())}))}},r.prototype.dragging=function(e){var r=this;if(this.allowDragging()){var n=t.d3Event();if(n.sourceEvent.stopPropagation(),e.move({x:n.x-e.__drag_dx,y:n.y-e.__drag_dy}),this.forceLayout){var o=this.forceLayout.vertexMap[e.id()];o.fixed=!0,o.fx=n.x-e.__drag_dx,o.fy=n.y-e.__drag_dy}this._neighborOffsets.forEach((function(t){var o=n.x-e.__drag_dx-t.offsetX,i=n.y-e.__drag_dy-t.offsetY;if(r.forceLayout){var a=r.forceLayout.vertexMap[t.neighbor.id()];a.fixed=!0,a.fx=o,a.fy=i}t.neighbor.move({x:o,y:i})})),this.refreshIncidentEdges(e,!0)}},r.prototype.dragend=function(e){var r=this;if(this.allowDragging()){if(t.d3Event().sourceEvent.stopPropagation(),this._dragging=!1,this.snapToGrid()){var n=e.calcSnap(this.snapToGrid());e.move(n[0]),this.refreshIncidentEdges(e,!0)}if(this.forceLayout){var o=this.forceLayout.vertexMap[e.id()];o.fixed=!1,o.fx=null,o.fy=null,this._neighborOffsets.forEach((function(e){var t=r.forceLayout.vertexMap[e.neighbor.id()];t.fixed=!1,t.fx=null,t.fy=null}))}this._neighborOffsets=[],t.Platform.svgMarkerGlitch&&this._graphData.nodeEdges(e.id()).forEach((function(e){var t=this._graphData.edge(e);this._popMarkers(t.element())}))}},r.prototype.enter=function(r,n){var o=this;e.prototype.enter.call(this,r,n),this._zoomGrab.on("click.clear",(function(){o.selectionClearOnBackgroundClick()&&o._selection.clear()})),this._d3Drag=t.drag().on("start",(function(e){return o.dragstart(e)})).on("end",(function(e){return o.dragend(e)})).on("drag",(function(e){return o.dragging(e)})),this.defs=this._renderElement.append("defs"),this.addMarkers(),this._centroidFilter=new t.SVGGlowFilter(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")},r.prototype.getBounds=function(e,t){var r=[[null,null],[null,null]];return e.forEach((function(e){var n=t?t.nodePos(e._id):{x:e.x(),y:e.y(),width:e.width(),height:e.height()},o=n.x-n.width/2,i=n.x+n.width/2,a=n.y-n.height/2,s=n.y+n.height/2;(null===r[0][0]||r[0][0]>o)&&(r[0][0]=o),(null===r[0][1]||r[0][1]>a)&&(r[0][1]=a),(null===r[1][0]||r[1][0]<i)&&(r[1][0]=i),(null===r[1][1]||r[1][1]<s)&&(r[1][1]=s)})),r},r.prototype.getVertexBounds=function(e){return this.getBounds(this._graphData.nodes(),e)},r.prototype.getSelectionBounds=function(e){return this.getBounds(this._selection.get(),e)},r.prototype.centerOnItem=function(e){var t=e.getBBox(!0),r=t.x+t.width/2,n=t.y+t.height/2,o={x:e.x()+r-t.width/2,y:e.y()+n-t.height/2,width:t.width,height:t.height};this.centerOnBBox(o)},r.prototype.zoomToItem=function(e){var t=e.getBBox(!0),r=t.x+t.width/2,n=t.y+t.height/2,o={x:e.x()+r-t.width/2,y:e.y()+n-t.height/2,width:t.width,height:t.height};this.zoomToBBox(o)},r.prototype.updateVertices=function(e,r,n){var o=this.width(),i=this.height(),a=this,s=e.selectAll("#"+this._id+r+" > .graphVertex").data(n,(function(e){return e.id()}));s.enter().append("g").attr("class","graphVertex").style("opacity",1e-6).on("click.selectionBag",(function(e){a._selection.click(e,t.d3Event()),a.selectionChanged()})).on("click",(function(e){var r=t.select(this).select(".graph_Vertex"),n=!1;r.empty()||(n=r.classed("selected")),a.vertex_click(a.rowToObj(e.data()),"",n,{vertex:e})})).on("dblclick",(function(e){t.d3Event().stopPropagation();var r=t.select(this).select(".graph_Vertex"),n=!1;r.empty()||(n=r.classed("selected")),a.vertex_dblclick(a.rowToObj(e.data()),"",n,{vertex:e})})).on("contextmenu",(function(e){var r=t.select(this).select(".graph_Vertex"),n=!1;r.empty()||(n=r.classed("selected")),a.vertex_contextmenu(a.rowToObj(e.data()),"",n,{vertex:e})})).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).on("mouseover",(function(e){a._dragging||a.vertex_mouseover(t.select(this),e)})).on("mouseout",(function(e){a._dragging||a.vertex_mouseout(t.select(this),e)})).each((function(e){t.select(this).style("cursor",a.allowDragging()?"move":"pointer"),e.target(this).pos({x:e.x()||o/2,y:e.y()||i/2}).animationFrameRender(),a.allowDragging()&&t.select(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()){var t=e.calcSnap(a.snapToGrid());e.pos(t[0]).size(t[1]).render(),a.refreshIncidentEdges(e,!1)}})))})).transition().duration(750).style("opacity",1),s.each((function(e){e.animationFrameRender()})),s.exit().each((function(e){e.target(null)})).remove(),s.order()},r.prototype.update=function(r,n){var o=this;e.prototype.update.call(this,r,n),this.tooltip.hide(),this._centroidFilter.update(this.centroidColor());var i=this.layout();this._toggleHierarchy.selected("Hierarchy"===i).render(),this._toggleForceDirected.selected("ForceDirected"===i).render(),this._toggleForceDirected2.selected("ForceDirected2"===i).render(),this._toggleCircle.selected("Circle"===i).render();var a=this;this.updateVertices(this.svgC,"C",this._graphData.nodes().filter((function(e){return"Hierarchy"===o.layout()&&e instanceof u_}))),this.updateVertices(this.svgV,"V",this._graphData.nodes().filter((function(e){return!(e instanceof u_)})));var s=this.svgE.selectAll("#"+this._id+"E > .graphEdge").data(this.showEdges()?this._graphData.edges():[],(function(e){return e.id()}));s.enter().append("g").attr("class","graphEdge").style("opacity",1e-6).on("click.selectionBag",(function(e){a._selection.click(e,t.d3Event())})).on("click",(function(e){var r=t.select(this).select(".graph_Edge"),n=!1;r.empty()||(n=r.classed("selected")),a.edge_click(a.rowToObj(e.data()),"",n,{edge:e})})).on("dblclick",(function(e){var r=t.select(this).select(".graph_Edge"),n=!1;r.empty()||(n=r.classed("selected")),a.edge_dblclick(a.rowToObj(e.data()),"",n,{edge:e})})).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).on("mouseover",(function(e){a._dragging||a.edge_mouseover(t.select(this),e)})).on("mouseout",(function(e){a._dragging||a.edge_mouseout(t.select(this),e)})).each((function(e){e.target(this).animationFrameRender()})).transition().duration(750).style("opacity",1),s.each((function(e){e.animationFrameRender()})),s.exit().each((function(e){e.target(null)})).remove(),this._renderCount||(this._renderCount++,this.layout(this.layout()))},r.prototype.exit=function(t,r){this._graphData.nodes().forEach((function(e){return e.target(null)})),this._graphData.edges().forEach((function(e){return e.target(null)})),e.prototype.exit.call(this,t,r)},r.prototype.render=function(t){var r=this;return this.progress("start"),e.prototype.render.call(this,(function(e){r.doLayout().then((function(){r.progress("end"),t&&t(e)}))})),this},r.prototype.doLayout=function(e){var t=this;return void 0===e&&(e=0),new Promise((function(r,n){requestAnimationFrame((function(){t._prevLayout!==t.layout()||t._prevDataHash!==t._dataHash?(t._prevLayout=t.layout(),t._prevDataHash=t._dataHash,t._doLayout(e).then((function(){r()}))):r()}))}))},r.prototype._doLayout=function(e){var t=this;return void 0===e&&(e=0),new Promise((function(n,o){t.progress("layout-start"),t.forceLayout&&(t.forceLayout.force.stop(),t.forceLayout=null);var i=t,a=t.getLayoutEngine();"ForceDirected2"===t.layout()?(t.forceLayout=a,t.forceLayout.force.on("tick",(function(){i.progress("layout-tick"),a.vertices.forEach((function(e){if(e.fixed);else{var t=i._graphData.node(e.id);t&&t.move({x:e.x,y:e.y})}})),i._graphData.edges().forEach((function(e){e.points([],!1,!1)})),i.applyScaleOnLayout()})).on("end",(function(){i.progress("layout-end")})),t.forceLayout.force.restart(),n()):a&&(t.forceLayout=null,i._dragging=!0,i._graphData.nodes().forEach((function(e){var t=a.nodePos(e.id());e instanceof r.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)})),i._graphData.edges().forEach((function(t){var r=a.edgePoints(t);t.points(r,e)})),i.applyScaleOnLayout()&&requestAnimationFrame((function(){i.zoomToFit(),n()})),t._fixIEMarkers(),setTimeout((function(){i._dragging=!1}),e?e+50:50),t.progress("layout-end"),i.applyScaleOnLayout()||n())}))},r.prototype.getLayoutEngine=function(){switch(this.layout()){case"Circle":return new i_(this._graphData,this._size.width,this._size.height);case"ForceDirected":return new a_(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 a_(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 s_(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},r.prototype.getNeighborMap=function(e){var t={},r={};if(e)for(var n=this._graphData.nodeEdges(e.id()),o=0;o<n.length;++o){var i=this._graphData.edge(n[o]);r[i.id()]=i,i._sourceVertex.id()!==e.id()&&(t[i._sourceVertex.id()]=i._sourceVertex),i._targetVertex.id()!==e.id()&&(t[i._targetVertex.id()]=i._targetVertex)}return{vertices:t,edges:r}},r.prototype.highlightVerticies=function(e){var t=this,r=this;return this.svgV.selectAll(".graphVertex").classed("graphVertex-highlighted",(function(t){return!e||e[t.id()]})).style("filter",(function(r){return e&&e[r.id()]?"url(#"+t.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(t){return!e||e[t.id()]?1:r.highlight.opacity})),this},r.prototype.highlightEdges=function(e){var 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},r.prototype.highlightVertex=function(e,t){if(this.highlightOnMouseOverVertex())if(t){var r=this.getNeighborMap(t);r.vertices[t.id()]=t,this.highlightVerticies(r.vertices),this.highlightEdges(r.edges)}else this.highlightVerticies(null),this.highlightEdges(null)},r.prototype.highlightEdge=function(e,t){if(this.highlightOnMouseOverEdge())if(t){var r={};r[t._sourceVertex.id()]=t._sourceVertex,r[t._targetVertex.id()]=t._targetVertex;var n={};n[t.id()]=t,this.highlightVerticies(r),this.highlightEdges(n)}else this.highlightVerticies(null),this.highlightEdges(null)},r.prototype.refreshIncidentEdges=function(e,t){var r=this;this._graphData.nodeEdges(e.id()).forEach((function(e){r._graphData.edge(e).points([],!1,t)}))},r.prototype.centroids=function(){return this._graphData.nodes().filter((function(e){return e.centroid()}))},r.prototype.selectionChanged=function(){var e=this;if(this.highlightSelectedPathToCentroid()){var t={};this.centroids().forEach((function(r){e.selection().forEach((function(n){e._graphData.undirectedShortestPath(r.id(),n.id()).forEach((function(e){t[e.id()]=!0}))}))})),this.svgE.selectAll(".graphEdge").classed("shortest-path",(function(e){return!0===t[e.id()]}))}},r.prototype.vertex_click=function(e,t,r,o){o&&o.vertex&&o.vertex._placeholderElement.node().parentNode.appendChild(o.vertex._placeholderElement.node()),n.IGraph.prototype.vertex_click.apply(this,arguments)},r.prototype.vertex_dblclick=function(e,t,r,n){},r.prototype.vertex_contextmenu=function(e,t,r,n){},r.prototype.vertex_mouseover=function(e,t){this.highlightVertex(e,t)},r.prototype.vertex_mouseout=function(e,t){this.highlightVertex(null,null)},r.prototype.edge_mouseover=function(e,t){this.highlightEdge(e,t)},r.prototype.edge_mouseout=function(e,t){this.highlightEdge(null,null)},r.prototype.addMarkers=function(e){void 0===e&&(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)},r.prototype.progress=function(e){},r.Subgraph=u_,r.Vertex=c_,r.Edge=R,r.profileID=0,r}(t.SVGZoomWidget);h_.prototype._class+=" graph_Graph",h_.prototype.implements(n.IGraph.prototype),h_.prototype.implements(n.ITooltip.prototype),h_.prototype.publish("allowDragging",!0,"boolean","Allow Dragging of Vertices",null,{tags:["Advanced"]}),h_.prototype.publish("dragSingleNeighbors",!1,"boolean","Dragging a Vertex also moves its singleton neighbors",null,{tags:["Advanced"]}),h_.prototype.publish("layout","Circle","set","Default Layout",["Circle","ForceDirected","ForceDirected2","Hierarchy","None"],{tags:["Basic"]}),h_.prototype.publish("scale","100%","set","Zoom Level",["all","width","selection","100%","90%","75%","50%","25%","10%"],{tags:["Basic"]}),h_.prototype.publish("applyScaleOnLayout",!1,"boolean","Shrink to fit on Layout",null,{tags:["Basic"]}),h_.prototype.publish("highlightOnMouseOverVertex",!1,"boolean","Highlight Vertex on Mouse Over",null,{tags:["Basic"]}),h_.prototype.publish("highlightOnMouseOverEdge",!1,"boolean","Highlight Edge on Mouse Over",null,{tags:["Basic"]}),h_.prototype.publish("transitionDuration",250,"number","Transition Duration",null,{tags:["Intermediate"]}),h_.prototype.publish("showEdges",!0,"boolean","Show Edges",null,{tags:["Intermediate"]}),h_.prototype.publish("snapToGrid",0,"number","Snap to Grid",null,{tags:["Private"]}),h_.prototype.publish("selectionClearOnBackgroundClick",!1,"boolean","Clear selection on background click"),h_.prototype.publish("centroidColor","#00A000","html-color","Centroid Color",null,{tags:["Basic"]}),h_.prototype.publish("highlightSelectedPathToCentroid",!1,"boolean","Highlight path to Center Vertex (for selected vertices)",null,{tags:["Basic"]}),h_.prototype.publish("hierarchyRankDirection","TB","set","Direction for Rank Nodes",["TB","BT","LR","RL"],{tags:["Advanced"]}),h_.prototype.publish("hierarchyNodeSeparation",50,"number","Number of pixels that separate nodes horizontally in the layout",null,{tags:["Advanced"]}),h_.prototype.publish("hierarchyEdgeSeparation",10,"number","Number of pixels that separate edges horizontally in the layout",null,{tags:["Advanced"]}),h_.prototype.publish("hierarchyRankSeparation",50,"number","Number of pixels between each rank in the layout",null,{tags:["Advanced"]}),h_.prototype.publish("hierarchyDigraph",!0,"boolean","Directional Graph",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedLinkDistance",300,"number","Target distance between linked nodes",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedLinkStrength",1,"number","Strength (rigidity) of links",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedFriction",.9,"number","Friction coefficient",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedCharge",-25,"number","Charge strength ",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedChargeDistance",1e4,"number","Maximum distance over which charge forces are applied",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedTheta",.8,"number","Barnes–Hut approximation criterion",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedGravity",.1,"number","Gravitational strength",null,{tags:["Advanced"]});var l_=h_.prototype.scale;h_.prototype.scale=function(e,t){var r=l_.apply(this,arguments);return arguments.length&&this.zoomTo(e,t),r};var f_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.owner=function(e){return arguments.length?(this._owner=e,this):this._owner},t.prototype.valid=function(){return!!this.iconColumn()},t.prototype.indexes=function(){var 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())}},t.prototype.mapper=function(){var e=this,t=this.indexes();return function(r){return{faChar:r[t.iconCol],tooltip:r[t.tooltipCol],shape_colorFill:r[t.shapeFillCol]||e.shapeFillDefault(),shape_colorStroke:r[t.shapeStrokeCol]||e.shapeStrokeDefault(),image_colorFill:r[t.iconFillCol]||e.iconFillDefault()}}},t}(t.PropertyExt);f_.prototype._class+=" graph_Annotation",f_.prototype.publish("iconColumn","","set","Icon column",(function(){return this._owner.columns()}),{optional:!0}),f_.prototype.publish("iconFillDefault","white","html-color","Icon fill default color"),f_.prototype.publish("iconFillColumn","","set","Icon fill color column",(function(){return this._owner.columns()}),{optional:!0}),f_.prototype.publish("tooltipColumn","","set","Tooltip column",(function(){return this._owner.columns()}),{optional:!0}),f_.prototype.publish("shapeStrokeDefault","darkred","html-color","Shape stroke default color"),f_.prototype.publish("shapeStrokeColumn","","set","Shape stroke color column",(function(){return this._owner.columns()}),{optional:!0}),f_.prototype.publish("shapeFillDefault","red","html-color","Shape fill default color"),f_.prototype.publish("shapeFillColumn","","set","Shape fill color column",(function(){return this._owner.columns()}),{optional:!0});var d_=function(e){function t(){var t=e.call(this)||this;return t._vertexMap={},t._edgeMap={},t._merge=!1,t._adjacencyData=[],t}return s(t,e),t.prototype.linksColumns=function(){var e=this.columns().indexOf(this.linksColumn()),t=this._db.field(e);return t?t.children().map((function(e){return e.label()})):[]},t.prototype.validAnnotations=function(){return this.annotations().filter((function(e){return e.valid()}))},t.prototype.updateData=function(){var t=this,n=r.hashSum([this._adjacencyData,this.uidColumn(),this.labelColumn(),this.iconColumn(),this.linksColumn(),this.linkUidColumn(),this.linkLabelColumn(),this.validAnnotations().map((function(e){return e.hashSum()}))]);if(this._prevAdjacencyDataHash!==n){this._prevAdjacencyDataHash=n;for(var o=this.columns(),i=o.indexOf(this.uidColumn()),a=o.indexOf(this.labelColumn()),s=o.indexOf(this.iconColumn()),u=o.indexOf(this.linksColumn()),c=this.linksColumns(),h=c.indexOf(this.linkUidColumn()),l=c.indexOf(this.linkLabelColumn()),f=this.validAnnotations().map((function(e){return e.mapper()})),d={},p={},g={vertices:this._adjacencyData.map((function(e){var r=e[i];if(void 0!==r){var n=d[r]||t._vertexMap[r];return n||(n=new c_),d[r]=n,n.text(e[a]).data(e).faChar(e[s]).annotationIcons(f.map((function(t){return t(e)}))),n}})).filter((function(e){return!!e})),edges:[]},v=0,y=this._adjacencyData;v<y.length;v++){var _=y[v],m=_[i],b=_[u];if(void 0!==m&&void 0!==b)for(var w=0,x=b;w<x.length;w++){var E=x[w],k=E[h],S=E[l],D="".concat(m,"->").concat(k),C=p[D]||this._edgeMap[D];C||(d[m]&&d[k]?C=(new R).sourceVertex(d[m]).targetVertex(d[k]).data(E):console.warn("Missing vertices for edge: "+D)),C&&(C.text(S),p[D]=C,g.edges.push(C))}}this._vertexMap=d,this._edgeMap=p,e.prototype.data.call(this,g,this._merge)}},t.prototype.data=function(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.")},t.prototype.update=function(t,r){this.updateData(),e.prototype.update.call(this,t,r)},t.prototype.click=function(e,t,r){},t}(h_);function p_(e,t){return e.sourceLinks.length?e.depth:t-1}function g_(e){return function(){return e}}function v_(e,t){return __(e.source,t.source)||e.index-t.index}function y_(e,t){return __(e.target,t.target)||e.index-t.index}function __(e,t){return e.y0-t.y0}function m_(e){return e.value}function b_(e){return e.index}function w_(e){return e.nodes}function x_(e){return e.links}function E_(e,t){const r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function k_({nodes:e}){for(const t of e){let e=t.y0,r=e;for(const r of t.sourceLinks)r.y0=e+r.width/2,e+=r.width;for(const e of t.targetLinks)e.y1=r+e.width/2,r+=e.width}}function S_(){let e,r,n,o=0,i=0,a=1,s=1,u=24,c=8,h=b_,l=p_,f=w_,d=x_,p=6;function g(){const e={nodes:f.apply(null,arguments),links:d.apply(null,arguments)};return v(e),y(e),_(e),m(e),b(e),k_(e),e}function v({nodes:e,links:t}){for(const[t,r]of e.entries())r.index=t,r.sourceLinks=[],r.targetLinks=[];const r=new Map(e.map(((t,r)=>[h(t,r,e),t])));for(const[e,n]of t.entries()){n.index=e;let{source:t,target:o}=n;"object"!=typeof t&&(t=n.source=E_(r,t)),"object"!=typeof o&&(o=n.target=E_(r,o)),t.sourceLinks.push(n),o.targetLinks.push(n)}if(null!=n)for(const{sourceLinks:t,targetLinks:r}of e)t.sort(n),r.sort(n)}function y({nodes:e}){for(const r of e)r.value=void 0===r.fixedValue?Math.max(t.sum(r.sourceLinks,m_),t.sum(r.targetLinks,m_)):r.fixedValue}function _({nodes:e}){const t=e.length;let r=new Set(e),n=new Set,o=0;for(;r.size;){for(const e of r){e.depth=o;for(const{target:t}of e.sourceLinks)n.add(t)}if(++o>t)throw new Error("circular link");r=n,n=new Set}}function m({nodes:e}){const t=e.length;let r=new Set(e),n=new Set,o=0;for(;r.size;){for(const e of r){e.height=o;for(const{source:t}of e.targetLinks)n.add(t)}if(++o>t)throw new Error("circular link");r=n,n=new Set}}function b(n){const h=function({nodes:e}){const n=t.max(e,(e=>e.depth))+1,i=(a-o-u)/(n-1),s=new Array(n);for(const t of e){const e=Math.max(0,Math.min(n-1,Math.floor(l.call(null,t,n))));t.layer=e,t.x0=o+e*i,t.x1=t.x0+u,s[e]?s[e].push(t):s[e]=[t]}if(r)for(const e of s)e.sort(r);return s}(n);e=Math.min(c,(s-i)/(t.max(h,(e=>e.length))-1)),function(r){const n=t.min(r,(r=>(s-i-(r.length-1)*e)/t.sum(r,m_)));for(const t of r){let r=i;for(const o of t){o.y0=r,o.y1=r+o.value*n,r=o.y1+e;for(const e of o.sourceLinks)e.width=e.value*n}r=(s-r+e)/(t.length+1);for(let e=0;e<t.length;++e){const n=t[e];n.y0+=r*(e+1),n.y1+=r*(e+1)}C(t)}}(h);for(let e=0;e<p;++e){const t=Math.pow(.99,e),r=Math.max(1-t,(e+1)/p);x(h,t,r),w(h,t,r)}}function w(e,t,n){for(let o=1,i=e.length;o<i;++o){const i=e[o];for(const e of i){let r=0,n=0;for(const{source:t,value:o}of e.targetLinks){let i=o*(e.layer-t.layer);r+=A(t,e)*i,n+=i}if(!(n>0))continue;let o=(r/n-e.y0)*t;e.y0+=o,e.y1+=o,D(e)}void 0===r&&i.sort(__),E(i,n)}}function x(e,t,n){for(let o=e.length-2;o>=0;--o){const i=e[o];for(const e of i){let r=0,n=0;for(const{target:t,value:o}of e.sourceLinks){let i=o*(t.layer-e.layer);r+=j(e,t)*i,n+=i}if(!(n>0))continue;let o=(r/n-e.y0)*t;e.y0+=o,e.y1+=o,D(e)}void 0===r&&i.sort(__),E(i,n)}}function E(t,r){const n=t.length>>1,o=t[n];S(t,o.y0-e,n-1,r),k(t,o.y1+e,n+1,r),S(t,s,t.length-1,r),k(t,i,0,r)}function k(t,r,n,o){for(;n<t.length;++n){const i=t[n],a=(r-i.y0)*o;a>1e-6&&(i.y0+=a,i.y1+=a),r=i.y1+e}}function S(t,r,n,o){for(;n>=0;--n){const i=t[n],a=(i.y1-r)*o;a>1e-6&&(i.y0-=a,i.y1-=a),r=i.y0-e}}function D({sourceLinks:e,targetLinks:t}){if(void 0===n){for(const{source:{sourceLinks:e}}of t)e.sort(y_);for(const{target:{targetLinks:t}}of e)t.sort(v_)}}function C(e){if(void 0===n)for(const{sourceLinks:t,targetLinks:r}of e)t.sort(y_),r.sort(v_)}function A(t,r){let n=t.y0-(t.sourceLinks.length-1)*e/2;for(const{target:o,width:i}of t.sourceLinks){if(o===r)break;n+=i+e}for(const{source:e,width:o}of r.targetLinks){if(e===t)break;n-=o}return n}function j(t,r){let n=r.y0-(r.targetLinks.length-1)*e/2;for(const{source:o,width:i}of r.targetLinks){if(o===t)break;n+=i+e}for(const{target:e,width:o}of t.sourceLinks){if(e===r)break;n-=o}return n}return g.update=function(e){return k_(e),e},g.nodeId=function(e){return arguments.length?(h="function"==typeof e?e:g_(e),g):h},g.nodeAlign=function(e){return arguments.length?(l="function"==typeof e?e:g_(e),g):l},g.nodeSort=function(e){return arguments.length?(r=e,g):r},g.nodeWidth=function(e){return arguments.length?(u=+e,g):u},g.nodePadding=function(t){return arguments.length?(c=e=+t,g):c},g.nodes=function(e){return arguments.length?(f="function"==typeof e?e:g_(e),g):f},g.links=function(e){return arguments.length?(d="function"==typeof e?e:g_(e),g):d},g.linkSort=function(e){return arguments.length?(n=e,g):n},g.size=function(e){return arguments.length?(o=i=0,a=+e[0],s=+e[1],g):[a-o,s-i]},g.extent=function(e){return arguments.length?(o=+e[0][0],a=+e[1][0],i=+e[0][1],s=+e[1][1],g):[[o,i],[a,s]]},g.iterations=function(e){return arguments.length?(p=+e,g):p},g}function D_(e){return[e.source.x1,e.y0]}function C_(e){return[e.target.x0,e.y1]}function A_(){return A().source(D_).target(C_)}d_.prototype._class+=" graph_AdjacencyGraph",d_.prototype.publish("uidColumn","","set","UID column",(function(){return this.columns()}),{optional:!0}),d_.prototype.publish("labelColumn","","set","Label column",(function(){return this.columns()}),{optional:!0}),d_.prototype.publish("iconColumn","","set","Icon column",(function(){return this.columns()}),{optional:!0}),d_.prototype.publish("linksColumn","","set","Links column",(function(){return this.columns()}),{optional:!0}),d_.prototype.publish("linkUidColumn","","set","Link UID column",(function(){return this.linksColumns()}),{optional:!0}),d_.prototype.publish("linkLabelColumn","","set","Link Label column",(function(){return this.linksColumns()}),{optional:!0}),d_.prototype.publish("annotations",[],"propertyArray","Annotations",null,{autoExpand:f_});L(".graph_Sankey .node rect{fill-opacity:.9;shape-rendering:crispEdges;stroke:#a9a9a9;cursor:move}.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}");var j_={mean:t.mean,median:t.median,min:t.min,max:t.max,sum:t.sum},O_=function(e){function t(){return e.call(this)||this}return s(t,e),t.prototype.owner=function(e){return arguments.length?(this._owner=e,this):this._owner},t.prototype.valid=function(){return!!this.column()},t.prototype.aggregate=function(e){switch(this.aggrType()){case null:case void 0:case"":return e.length;default:var t=this._owner.columns().indexOf(this.aggrColumn());return j_[this.aggrType()](e,(function(e){return+e[t]}))}},t}(t.PropertyExt);O_.prototype._class+=" graph_Sankey.SankeyColumn",O_.prototype.publish("column",null,"set","Field",(function(){return this._owner?this._owner.columns():[]}),{optional:!0}),O_.prototype.publish("aggrType",null,"set","Aggregation Type",[null,"mean","median","sum","min","max"],{optional:!0,disable:function(e){return!e._owner||0===e._owner.mappings().indexOf(e)}}),O_.prototype.publish("aggrColumn",null,"set","Aggregation Field",(function(){return this._owner?this._owner.columns():[]}),{optional:!0,disable:function(e){return!e._owner||!e.aggrType()||0===e._owner.mappings().indexOf(e)}});var I_=function(e){function r(){var r=e.call(this)||this;return t.Utility.SimpleSelectionMixin.call(r),r._drawStartPos="origin",r}return s(r,e),r.prototype.sankeyData=function(){var e={vertices:[],edges:[]};if(0===this.data().length)return e;var t={},r=this.mappings().filter((function(e){return e.valid()}));return r.forEach((function(r,n){this._db.rollupView([r.column()]).entries().forEach((function(o){var i=r.column()+":"+n+":"+o.key;t[i]||(e.vertices.push({__id:i,__category:r.column(),name:o.key,origRow:o.value,value:o.value[n][2]}),t[i]=e.vertices.length-1)}),this)}),this),r.forEach((function(n,o){if(o<r.length-1){var i=r[o+1];this._db.rollupView([n.column(),i.column()]).entries().forEach((function(r){var a=n.column()+":"+o+":"+r.key;r.values.forEach((function(r){var n=i.column()+":"+(o+1)+":"+r.key;e.edges.push({__id:a+"_"+n,source:t[a],target:t[n],value:r.value[0][2]})}))}))}}),this),e},r.prototype.enter=function(t,r){e.prototype.enter.call(this,t,r),this._d3Sankey=new S_,this._selection.widgetElement(r)},r.prototype.update=function(r,n){e.prototype.update.call(this,r,n),this._palette=this._palette.switch(this.paletteID());var o=this.vertexStrokeWidth(),i=this.sankeyData(),a=2*o;this._d3Sankey.extent([[o,o],[this.width()-a,this.height()-a]]).nodeWidth(this.vertexWidth()).nodePadding(this.vertexPadding()),this._d3Sankey({nodes:i.vertices,links:i.edges});var s=this,u=n.selectAll(".link").data(i.edges);u.enter().append("path").attr("class","link").each((function(){t.select(this).append("title")})).merge(u).attr("d",A_()).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})),u.exit().remove();var c=n.selectAll(".node").data(i.vertices);c.enter().append("g").attr("class","node").call(this._selection.enter.bind(this._selection)).on("click",(function(e){s.click(s.rowToObj(e.origRow[0]),"",s._selection.selected(this))})).on("dblclick",(function(e){s.dblclick(s.rowToObj(e.origRow[0]),"",s._selection.selected(this))})).each((function(){var e=t.select(this);e.append("rect"),e.append("text")})).merge(c).attr("transform",(function(e){var t=0,r=0;return e.x0&&(t=e.x0),e.y0&&(r=e.y0),"translate("+(t+o)+","+(r+o)+")"})).each((function(){var e=t.select(this);e.select("rect").attr("height",(function(e){return e.y1-e.y0})).attr("width",s._d3Sankey.nodeWidth()).style("fill",(function(e){return s._palette(e.name)})).style("stroke",(function(e){return s.vertexStrokeColor()})).style("stroke-width",(function(e){return o})).style("cursor",s.xAxisMovement()||s.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<s.width()/2})).attr("x",6+s._d3Sankey.nodeWidth()).attr("text-anchor","start")})),c.exit().remove()},r.prototype.exit=function(t,r){e.prototype.exit.call(this,t,r)},r.prototype.click=function(e,t,r){},r.prototype.dblclick=function(e,t,r){},r}(t.SVGWidget);I_.prototype._class+=" graph_Sankey",I_.prototype.Column=O_,I_.prototype.mixin(t.Utility.SimpleSelectionMixin),I_.prototype._palette=t.Palette.ordinal("default"),I_.prototype.publish("paletteID","default","set","Color palette for this widget",I_.prototype._palette.switch()),I_.prototype.publish("mappings",[],"propertyArray","Source Columns",null,{autoExpand:O_}),I_.prototype.publish("vertexStrokeWidth",1,"number","Vertex Stroke Width"),I_.prototype.publish("vertexStrokeColor","darkgray","string","Vertex Stroke Color"),I_.prototype.publish("vertexWidth",36,"number","Vertex Width"),I_.prototype.publish("vertexPadding",40,"number","Vertex Padding"),I_.prototype.publish("xAxisMovement",!1,"boolean","Enable x-axis movement"),I_.prototype.publish("yAxisMovement",!1,"boolean","Enable y-axis movement");var M_=E().x((function(e){return e[0]})).y((function(e){return e[1]})).curve(I),F_=E().x((function(e){return e[0]})).y((function(e){return e[1]})).curve(T),P_=function(){function e(e){this._running=!1,this._graph=e}return e.prototype.start=function(){return this._running=!0,this._graph.progress("layout-start"),Promise.resolve(this)},e.prototype.stop=function(){return this._running=!1,this._graph.progress("layout-stop"),this},e.prototype.running=function(){return this._running},e.prototype.center=function(e){if(e.length%2==1)return e[Math.floor(e.length/2)];var t=e[e.length/2-1],r=e[e.length/2];return[(t[0]+r[0])/2,(t[1]+r[1])/2]},e.prototype.edgePath=function(e,t){var r=this._graph.projectPlacholder(e.source),n=this._graph.projectPlacholder(e.target),o=[[r.x,r.y],[n.x,n.y]];if(t){var i=o[0][0]-o[1][0],a=o[0][1]-o[1][1];if(Math.sqrt(i*i+a*a)){var s=(o[0][0]+o[1][0])/2-a*t/100,u=(o[0][1]+o[1][1])/2+i*t/100;return{path:F_([o[0],[s,u],o[1]]),labelPos:[s,u]}}}return{path:M_(o),labelPos:this.center(o)}},e}(),T_=function(e){return e*Math.PI/180},N_=function(e){function t(t,r){void 0===r&&(r=60);var n=e.call(this,t)||this;return n.sideLength=r,n}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=t._graph.size(),r=t._graph.graphData(),n=r.allVertices();r.allEdges().forEach((function(e){return delete e.points}));var o,i=(o=n.length,t.sideLength/(2*Math.sin(T_(180/o)))),a=360/n.length;return n.forEach((function(t,r){delete t.fx,delete t.fy,t.x=e.width/2+Math.cos(T_(r*a))*i,t.y=e.height/2+Math.sin(T_(r*a))*i})),t._graph.moveVertices(!0).moveEdges(!0),t.stop(),t._running=!1,t}))},t}(P_);var L_=E().x((function(e){return e[0]})).y((function(e){return e[1]})).curve(I),Y_=function(e){return"cluster_".concat(e)};function R_(e,t,r,n){var o=e-r,i=t-n;return Math.sqrt(o*o+i*i)}var B_=function(e){function t(t,r){var n=e.call(this,t)||this;return n._options=r,n}return s(t,e),t.prototype.start=function(){var t=this;e.prototype.start.call(this);var r=this._graph.size(),n=this._graph.graphData();return function(e,t){var r=new Blob(['!function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(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.\')}var n={exports:{}};n.exports=function(){function e(n,r,o){function i(s,u){if(!r[s]){if(!n[s]){if(!u&&t)return t(s);if(a)return a(s,!0);var c=new Error("Cannot find module \'"+s+"\'");throw c.code="MODULE_NOT_FOUND",c}var f=r[s]={exports:{}};n[s][0].call(f.exports,(function(e){return i(n[s][1][e]||e)}),f,f.exports,e,n,r,o)}return r[s].exports}for(var a=t,s=0;s<o.length;s++)i(o[s]);return i}return e}()({1:[function(e,t,n){t.exports={graphlib:e("./lib/graphlib"),layout:e("./lib/layout"),debug:e("./lib/debug"),util:{time:e("./lib/util").time,notime:e("./lib/util").notime},version:e("./lib/version")}},{"./lib/debug":6,"./lib/graphlib":7,"./lib/layout":9,"./lib/util":29,"./lib/version":30}],2:[function(e,t,n){var r=e("./lodash"),o=e("./greedy-fas");function i(e){var t="greedy"===e.graph().acyclicer?o(e,n(e)):a(e);function n(e){return function(t){return e.edge(t).weight}}r.forEach(t,(function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r.uniqueId("rev"))}))}function a(e){var t=[],n={},o={};function i(a){r.has(o,a)||(o[a]=!0,n[a]=!0,r.forEach(e.outEdges(a),(function(e){r.has(n,e.w)?t.push(e):i(e.w)})),delete n[a])}return r.forEach(e.nodes(),i),t}function s(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}}))}t.exports={run:i,undo:s}},{"./greedy-fas":8,"./lodash":10}],3:[function(e,t,n){var r=e("./lodash"),o=e("./util");function i(e){function t(n){var o=e.children(n),i=e.node(n);if(o.length&&r.forEach(o,t),r.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var s=i.minRank,u=i.maxRank+1;s<u;++s)a(e,"borderLeft","_bl",n,i,s),a(e,"borderRight","_br",n,i,s)}}r.forEach(e.children(),t)}function a(e,t,n,r,i,a){var s={width:0,height:0,rank:a,borderType:t},u=i[t][a-1],c=o.addDummyNode(e,"border",s,n);i[t][a]=c,e.setParent(c,r),u&&e.setEdge(u,c,{weight:1})}t.exports=i},{"./lodash":10,"./util":29}],4:[function(e,t,n){var r=e("./lodash");function o(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||a(e)}function i(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||u(e),"lr"!==t&&"rl"!==t||(f(e),a(e))}function a(e){r.forEach(e.nodes(),(function(t){s(e.node(t))})),r.forEach(e.edges(),(function(t){s(e.edge(t))}))}function s(e){var t=e.width;e.width=e.height,e.height=t}function u(e){r.forEach(e.nodes(),(function(t){c(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,c),r.has(n,"y")&&c(n)}))}function c(e){e.y=-e.y}function f(e){r.forEach(e.nodes(),(function(t){d(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,d),r.has(n,"x")&&d(n)}))}function d(e){var t=e.x;e.x=e.y,e.y=t}t.exports={adjust:o,undo:i}},{"./lodash":10}],5:[function(e,t,n){function r(){var e={};e._next=e._prev=e,this._sentinel=e}function o(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function i(e,t){if("_next"!==e&&"_prev"!==e)return t}t.exports=r,r.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return o(t),t},r.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&o(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},r.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,i)),n=n._prev;return"["+e.join(", ")+"]"}},{}],6:[function(e,t,n){var r=e("./lodash"),o=e("./util"),i=e("./graphlib").Graph;function a(e){var t=o.buildLayerMatrix(e),n=new i({compound:!0,multigraph:!0}).setGraph({});return r.forEach(e.nodes(),(function(t){n.setNode(t,{label:t}),n.setParent(t,"layer"+e.node(t).rank)})),r.forEach(e.edges(),(function(e){n.setEdge(e.v,e.w,{},e.name)})),r.forEach(t,(function(e,t){var o="layer"+t;n.setNode(o,{rank:"same"}),r.reduce(e,(function(e,t){return n.setEdge(e,t,{style:"invis"}),t}))})),n}t.exports={debugOrdering:a}},{"./graphlib":7,"./lodash":10,"./util":29}],7:[function(e,t,n){var r;if("function"==typeof e)try{r=e("graphlib")}catch(e){}r||(r=window.graphlib),t.exports=r},{graphlib:31}],8:[function(e,t,n){var r=e("./lodash"),o=e("./graphlib").Graph,i=e("./data/list");t.exports=s;var a=r.constant(1);function s(e,t){if(e.nodeCount()<=1)return[];var n=f(e,t||a),o=u(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(o,(function(t){return e.outEdges(t.v,t.w)})),!0)}function u(e,t,n){for(var r,o=[],i=t[t.length-1],a=t[0];e.nodeCount();){for(;r=a.dequeue();)c(e,t,n,r);for(;r=i.dequeue();)c(e,t,n,r);if(e.nodeCount())for(var s=t.length-2;s>0;--s)if(r=t[s].dequeue()){o=o.concat(c(e,t,n,r,!0));break}}return o}function c(e,t,n,o,i){var a=i?[]:void 0;return r.forEach(e.inEdges(o.v),(function(r){var o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,d(t,n,s)})),r.forEach(e.outEdges(o.v),(function(r){var o=e.edge(r),i=r.w,a=e.node(i);a.in-=o,d(t,n,a)})),e.removeNode(o.v),a}function f(e,t){var n=new o,a=0,s=0;r.forEach(e.nodes(),(function(e){n.setNode(e,{v:e,in:0,out:0})})),r.forEach(e.edges(),(function(e){var r=n.edge(e.v,e.w)||0,o=t(e),i=r+o;n.setEdge(e.v,e.w,i),s=Math.max(s,n.node(e.v).out+=o),a=Math.max(a,n.node(e.w).in+=o)}));var u=r.range(s+a+3).map((function(){return new i})),c=a+1;return r.forEach(n.nodes(),(function(e){d(u,c,n.node(e))})),{graph:n,buckets:u,zeroIdx:c}}function d(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}},{"./data/list":5,"./graphlib":7,"./lodash":10}],9:[function(e,t,n){var r=e("./lodash"),o=e("./acyclic"),i=e("./normalize"),a=e("./rank"),s=e("./util").normalizeRanks,u=e("./parent-dummy-chains"),c=e("./util").removeEmptyRanks,f=e("./nesting-graph"),d=e("./add-border-segments"),h=e("./coordinate-system"),l=e("./order"),p=e("./position"),v=e("./util"),_=e("./graphlib").Graph;function y(e,t){var n=t&&t.debugTiming?v.time:v.notime;n("layout",(function(){var t=n(" buildLayoutGraph",(function(){return I(e)}));n(" runLayout",(function(){g(t,n)})),n(" updateInputGraph",(function(){b(e,t)}))}))}function g(e,t){t(" makeSpaceForEdgeLabels",(function(){S(e)})),t(" removeSelfEdges",(function(){B(e)})),t(" acyclic",(function(){o.run(e)})),t(" nestingGraph.run",(function(){f.run(e)})),t(" rank",(function(){a(v.asNonCompoundGraph(e))})),t(" injectEdgeLabelProxies",(function(){C(e)})),t(" removeEmptyRanks",(function(){c(e)})),t(" nestingGraph.cleanup",(function(){f.cleanup(e)})),t(" normalizeRanks",(function(){s(e)})),t(" assignRankMinMax",(function(){N(e)})),t(" removeEdgeLabelProxies",(function(){T(e)})),t(" normalize.run",(function(){i.run(e)})),t(" parentDummyChains",(function(){u(e)})),t(" addBorderSegments",(function(){d(e)})),t(" order",(function(){l(e)})),t(" insertSelfEdges",(function(){G(e)})),t(" adjustCoordinateSystem",(function(){h.adjust(e)})),t(" position",(function(){p(e)})),t(" positionSelfEdges",(function(){R(e)})),t(" removeBorderNodes",(function(){D(e)})),t(" normalize.undo",(function(){i.undo(e)})),t(" fixupEdgeLabelCoords",(function(){P(e)})),t(" undoCoordinateSystem",(function(){h.undo(e)})),t(" translateGraph",(function(){M(e)})),t(" assignNodeIntersects",(function(){L(e)})),t(" reversePoints",(function(){F(e)})),t(" acyclic.undo",(function(){o.undo(e)}))}function b(e,t){r.forEach(e.nodes(),(function(n){var r=e.node(n),o=t.node(n);r&&(r.x=o.x,r.y=o.y,t.children(n).length&&(r.width=o.width,r.height=o.height))})),r.forEach(e.edges(),(function(n){var o=e.edge(n),i=t.edge(n);o.points=i.points,r.has(i,"x")&&(o.x=i.x,o.y=i.y)})),e.graph().width=t.graph().width,e.graph().height=t.graph().height}t.exports=y;var m=["nodesep","edgesep","ranksep","marginx","marginy"],x={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},w=["acyclicer","ranker","rankdir","align"],E=["width","height"],j={width:0,height:0},k=["minlen","weight","width","height","labeloffset"],A={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},O=["labelpos"];function I(e){var t=new _({multigraph:!0,compound:!0}),n=z(e.graph());return t.setGraph(r.merge({},x,U(n,m),r.pick(n,w))),r.forEach(e.nodes(),(function(n){var o=z(e.node(n));t.setNode(n,r.defaults(U(o,E),j)),t.setParent(n,e.parent(n))})),r.forEach(e.edges(),(function(n){var o=z(e.edge(n));t.setEdge(n,r.merge({},A,U(o,k),r.pick(o,O)))})),t}function S(e){var t=e.graph();t.ranksep/=2,r.forEach(e.edges(),(function(n){var r=e.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}function C(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),o={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};v.addDummyNode(e,"edge-proxy",o,"_ep")}}))}function N(e){var t=0;r.forEach(e.nodes(),(function(n){var o=e.node(n);o.borderTop&&(o.minRank=e.node(o.borderTop).rank,o.maxRank=e.node(o.borderBottom).rank,t=r.max(t,o.maxRank))})),e.graph().maxRank=t}function T(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))}))}function M(e){var t=Number.POSITIVE_INFINITY,n=0,o=Number.POSITIVE_INFINITY,i=0,a=e.graph(),s=a.marginx||0,u=a.marginy||0;function c(e){var r=e.x,a=e.y,s=e.width,u=e.height;t=Math.min(t,r-s/2),n=Math.max(n,r+s/2),o=Math.min(o,a-u/2),i=Math.max(i,a+u/2)}r.forEach(e.nodes(),(function(t){c(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.has(n,"x")&&c(n)})),t-=s,o-=u,r.forEach(e.nodes(),(function(n){var r=e.node(n);r.x-=t,r.y-=o})),r.forEach(e.edges(),(function(n){var i=e.edge(n);r.forEach(i.points,(function(e){e.x-=t,e.y-=o})),r.has(i,"x")&&(i.x-=t),r.has(i,"y")&&(i.y-=o)})),a.width=n-t+s,a.height=i-o+u}function L(e){r.forEach(e.edges(),(function(t){var n,r,o=e.edge(t),i=e.node(t.v),a=e.node(t.w);o.points?(n=o.points[0],r=o.points[o.points.length-1]):(o.points=[],n=a,r=i),o.points.unshift(v.intersectRect(i,n)),o.points.push(v.intersectRect(a,r))}))}function P(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}function F(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);n.reversed&&n.points.reverse()}))}function D(e){r.forEach(e.nodes(),(function(t){if(e.children(t).length){var n=e.node(t),o=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(r.last(n.borderLeft)),s=e.node(r.last(n.borderRight));n.width=Math.abs(s.x-a.x),n.height=Math.abs(i.y-o.y),n.x=a.x+n.width/2,n.y=o.y+n.height/2}})),r.forEach(e.nodes(),(function(t){"border"===e.node(t).dummy&&e.removeNode(t)}))}function B(e){r.forEach(e.edges(),(function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}}))}function G(e){var t=v.buildLayerMatrix(e);r.forEach(t,(function(t){var n=0;r.forEach(t,(function(t,o){var i=e.node(t);i.order=o+n,r.forEach(i.selfEdges,(function(t){v.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:i.rank,order:o+ ++n,e:t.e,label:t.label},"_se")})),delete i.selfEdges}))}))}function R(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);if("selfedge"===n.dummy){var r=e.node(n.e.v),o=r.x+r.width/2,i=r.y,a=n.x-o,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:o+2*a/3,y:i-s},{x:o+5*a/6,y:i-s},{x:o+a,y:i},{x:o+5*a/6,y:i+s},{x:o+2*a/3,y:i+s}],n.label.x=n.x,n.label.y=n.y}}))}function U(e,t){return r.mapValues(r.pick(e,t),Number)}function z(e){var t={};return r.forEach(e,(function(e,n){t[n.toLowerCase()]=e})),t}},{"./acyclic":2,"./add-border-segments":3,"./coordinate-system":4,"./graphlib":7,"./lodash":10,"./nesting-graph":11,"./normalize":12,"./order":17,"./parent-dummy-chains":22,"./position":24,"./rank":26,"./util":29}],10:[function(e,t,n){var r;if("function"==typeof e)try{r={cloneDeep:e("lodash/cloneDeep"),constant:e("lodash/constant"),defaults:e("lodash/defaults"),each:e("lodash/each"),filter:e("lodash/filter"),find:e("lodash/find"),flatten:e("lodash/flatten"),forEach:e("lodash/forEach"),forIn:e("lodash/forIn"),has:e("lodash/has"),isUndefined:e("lodash/isUndefined"),last:e("lodash/last"),map:e("lodash/map"),mapValues:e("lodash/mapValues"),max:e("lodash/max"),merge:e("lodash/merge"),min:e("lodash/min"),minBy:e("lodash/minBy"),now:e("lodash/now"),pick:e("lodash/pick"),range:e("lodash/range"),reduce:e("lodash/reduce"),sortBy:e("lodash/sortBy"),uniqueId:e("lodash/uniqueId"),values:e("lodash/values"),zipObject:e("lodash/zipObject")}}catch(e){}r||(r=window._),t.exports=r},{"lodash/cloneDeep":227,"lodash/constant":228,"lodash/defaults":229,"lodash/each":230,"lodash/filter":232,"lodash/find":233,"lodash/flatten":235,"lodash/forEach":236,"lodash/forIn":237,"lodash/has":239,"lodash/isUndefined":258,"lodash/last":261,"lodash/map":262,"lodash/mapValues":263,"lodash/max":264,"lodash/merge":266,"lodash/min":267,"lodash/minBy":268,"lodash/now":270,"lodash/pick":271,"lodash/range":273,"lodash/reduce":274,"lodash/sortBy":276,"lodash/uniqueId":286,"lodash/values":287,"lodash/zipObject":288}],11:[function(e,t,n){var r=e("./lodash"),o=e("./util");function i(e){var t=o.addDummyNode(e,"root",{},"_root"),n=s(e),i=r.max(r.values(n))-1,c=2*i+1;e.graph().nestingRoot=t,r.forEach(e.edges(),(function(t){e.edge(t).minlen*=c}));var f=u(e)+1;r.forEach(e.children(),(function(r){a(e,t,c,f,i,n,r)})),e.graph().nodeRankFactor=c}function a(e,t,n,i,s,u,c){var f=e.children(c);if(f.length){var d=o.addBorderNode(e,"_bt"),h=o.addBorderNode(e,"_bb"),l=e.node(c);e.setParent(d,c),l.borderTop=d,e.setParent(h,c),l.borderBottom=h,r.forEach(f,(function(r){a(e,t,n,i,s,u,r);var o=e.node(r),f=o.borderTop?o.borderTop:r,l=o.borderBottom?o.borderBottom:r,p=o.borderTop?i:2*i,v=f!==l?1:s-u[c]+1;e.setEdge(d,f,{weight:p,minlen:v,nestingEdge:!0}),e.setEdge(l,h,{weight:p,minlen:v,nestingEdge:!0})})),e.parent(c)||e.setEdge(t,d,{weight:0,minlen:s+u[c]})}else c!==t&&e.setEdge(t,c,{weight:0,minlen:n})}function s(e){var t={};function n(o,i){var a=e.children(o);a&&a.length&&r.forEach(a,(function(e){n(e,i+1)})),t[o]=i}return r.forEach(e.children(),(function(e){n(e,1)})),t}function u(e){return r.reduce(e.edges(),(function(t,n){return t+e.edge(n).weight}),0)}function c(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,r.forEach(e.edges(),(function(t){e.edge(t).nestingEdge&&e.removeEdge(t)}))}t.exports={run:i,cleanup:c}},{"./lodash":10,"./util":29}],12:[function(e,t,n){var r=e("./lodash"),o=e("./util");function i(e){e.graph().dummyChains=[],r.forEach(e.edges(),(function(t){a(e,t)}))}function a(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,s=t.name,u=e.edge(t),c=u.labelRank;if(a!==r+1){var f,d,h;for(e.removeEdge(t),h=0,++r;r<a;++h,++r)u.points=[],d={width:0,height:0,edgeLabel:u,edgeObj:t,rank:r},f=o.addDummyNode(e,"edge",d,"_d"),r===c&&(d.width=u.width,d.height=u.height,d.dummy="edge-label",d.labelpos=u.labelpos),e.setEdge(n,f,{weight:u.weight},s),0===h&&e.graph().dummyChains.push(f),n=f;e.setEdge(n,i,{weight:u.weight},s)}}function s(e){r.forEach(e.graph().dummyChains,(function(t){var n,r=e.node(t),o=r.edgeLabel;for(e.setEdge(r.edgeObj,o);r.dummy;)n=e.successors(t)[0],e.removeNode(t),o.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(o.x=r.x,o.y=r.y,o.width=r.width,o.height=r.height),t=n,r=e.node(t)}))}t.exports={run:i,undo:s}},{"./lodash":10,"./util":29}],13:[function(e,t,n){var r=e("../lodash");function o(e,t,n){var o,i={};r.forEach(n,(function(n){for(var r,a,s=e.parent(n);s;){if((r=e.parent(s))?(a=i[r],i[r]=s):(a=o,o=s),a&&a!==s)return void t.setEdge(a,s);s=r}}))}t.exports=o},{"../lodash":10}],14:[function(e,t,n){var r=e("../lodash");function o(e,t){return r.map(t,(function(t){var n=e.inEdges(t);if(n.length){var o=r.reduce(n,(function(t,n){var r=e.edge(n),o=e.node(n.v);return{sum:t.sum+r.weight*o.order,weight:t.weight+r.weight}}),{sum:0,weight:0});return{v:t,barycenter:o.sum/o.weight,weight:o.weight}}return{v:t}}))}t.exports=o},{"../lodash":10}],15:[function(e,t,n){var r=e("../lodash"),o=e("../graphlib").Graph;function i(e,t,n){var i=a(e),s=new o({compound:!0}).setGraph({root:i}).setDefaultNodeLabel((function(t){return e.node(t)}));return r.forEach(e.nodes(),(function(o){var a=e.node(o),u=e.parent(o);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(s.setNode(o),s.setParent(o,u||i),r.forEach(e[n](o),(function(t){var n=t.v===o?t.w:t.v,i=s.edge(n,o),a=r.isUndefined(i)?0:i.weight;s.setEdge(n,o,{weight:e.edge(t).weight+a})})),r.has(a,"minRank")&&s.setNode(o,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))})),s}function a(e){for(var t;e.hasNode(t=r.uniqueId("_root")););return t}t.exports=i},{"../graphlib":7,"../lodash":10}],16:[function(e,t,n){var r=e("../lodash");function o(e,t){for(var n=0,r=1;r<t.length;++r)n+=i(e,t[r-1],t[r]);return n}function i(e,t,n){for(var o=r.zipObject(n,r.map(n,(function(e,t){return t}))),i=r.flatten(r.map(t,(function(t){return r.sortBy(r.map(e.outEdges(t),(function(t){return{pos:o[t.w],weight:e.edge(t).weight}})),"pos")})),!0),a=1;a<n.length;)a<<=1;var s=2*a-1;a-=1;var u=r.map(new Array(s),(function(){return 0})),c=0;return r.forEach(i.forEach((function(e){var t=e.pos+a;u[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=u[t+1]),u[t=t-1>>1]+=e.weight;c+=e.weight*n}))),c}t.exports=o},{"../lodash":10}],17:[function(e,t,n){var r=e("../lodash"),o=e("./init-order"),i=e("./cross-count"),a=e("./sort-subgraph"),s=e("./build-layer-graph"),u=e("./add-subgraph-constraints"),c=e("../graphlib").Graph,f=e("../util");function d(e){var t=f.maxRank(e),n=h(e,r.range(1,t+1),"inEdges"),a=h(e,r.range(t-1,-1,-1),"outEdges"),s=o(e);p(e,s);for(var u,c=Number.POSITIVE_INFINITY,d=0,v=0;v<4;++d,++v){l(d%2?n:a,d%4>=2),s=f.buildLayerMatrix(e);var _=i(e,s);_<c&&(v=0,u=r.cloneDeep(s),c=_)}p(e,u)}function h(e,t,n){return r.map(t,(function(t){return s(e,t,n)}))}function l(e,t){var n=new c;r.forEach(e,(function(e){var o=e.graph().root,i=a(e,o,n,t);r.forEach(i.vs,(function(t,n){e.node(t).order=n})),u(e,n,i.vs)}))}function p(e,t){r.forEach(t,(function(t){r.forEach(t,(function(t,n){e.node(t).order=n}))}))}t.exports=d},{"../graphlib":7,"../lodash":10,"../util":29,"./add-subgraph-constraints":13,"./build-layer-graph":15,"./cross-count":16,"./init-order":18,"./sort-subgraph":20}],18:[function(e,t,n){var r=e("../lodash");function o(e){var t={},n=r.filter(e.nodes(),(function(t){return!e.children(t).length})),o=r.max(r.map(n,(function(t){return e.node(t).rank}))),i=r.map(r.range(o+1),(function(){return[]}));function a(n){if(!r.has(t,n)){t[n]=!0;var o=e.node(n);i[o.rank].push(n),r.forEach(e.successors(n),a)}}var s=r.sortBy(n,(function(t){return e.node(t).rank}));return r.forEach(s,a),i}t.exports=o},{"../lodash":10}],19:[function(e,t,n){var r=e("../lodash");function o(e,t){var n={};return r.forEach(e,(function(e,t){var o=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};r.isUndefined(e.barycenter)||(o.barycenter=e.barycenter,o.weight=e.weight)})),r.forEach(t.edges(),(function(e){var t=n[e.v],o=n[e.w];r.isUndefined(t)||r.isUndefined(o)||(o.indegree++,t.out.push(n[e.w]))})),i(r.filter(n,(function(e){return!e.indegree})))}function i(e){var t=[];function n(e){return function(t){t.merged||(r.isUndefined(t.barycenter)||r.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&a(e,t)}}function o(t){return function(n){n.in.push(t),0==--n.indegree&&e.push(n)}}for(;e.length;){var i=e.pop();t.push(i),r.forEach(i.in.reverse(),n(i)),r.forEach(i.out,o(i))}return r.map(r.filter(t,(function(e){return!e.merged})),(function(e){return r.pick(e,["vs","i","barycenter","weight"])}))}function a(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}t.exports=o},{"../lodash":10}],20:[function(e,t,n){var r=e("../lodash"),o=e("./barycenter"),i=e("./resolve-conflicts"),a=e("./sort");function s(e,t,n,f){var d=e.children(t),h=e.node(t),l=h?h.borderLeft:void 0,p=h?h.borderRight:void 0,v={};l&&(d=r.filter(d,(function(e){return e!==l&&e!==p})));var _=o(e,d);r.forEach(_,(function(t){if(e.children(t.v).length){var o=s(e,t.v,n,f);v[t.v]=o,r.has(o,"barycenter")&&c(t,o)}}));var y=i(_,n);u(y,v);var g=a(y,f);if(l&&(g.vs=r.flatten([l,g.vs,p],!0),e.predecessors(l).length)){var b=e.node(e.predecessors(l)[0]),m=e.node(e.predecessors(p)[0]);r.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+b.order+m.order)/(g.weight+2),g.weight+=2}return g}function u(e,t){r.forEach(e,(function(e){e.vs=r.flatten(e.vs.map((function(e){return t[e]?t[e].vs:e})),!0)}))}function c(e,t){r.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}t.exports=s},{"../lodash":10,"./barycenter":14,"./resolve-conflicts":19,"./sort":21}],21:[function(e,t,n){var r=e("../lodash"),o=e("../util");function i(e,t){var n=o.partition(e,(function(e){return r.has(e,"barycenter")})),i=n.lhs,u=r.sortBy(n.rhs,(function(e){return-e.i})),c=[],f=0,d=0,h=0;i.sort(s(!!t)),h=a(c,u,h),r.forEach(i,(function(e){h+=e.vs.length,c.push(e.vs),f+=e.barycenter*e.weight,d+=e.weight,h=a(c,u,h)}));var l={vs:r.flatten(c,!0)};return d&&(l.barycenter=f/d,l.weight=d),l}function a(e,t,n){for(var o;t.length&&(o=r.last(t)).i<=n;)t.pop(),e.push(o.vs),n++;return n}function s(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}t.exports=i},{"../lodash":10,"../util":29}],22:[function(e,t,n){var r=e("./lodash");function o(e){var t=a(e);r.forEach(e.graph().dummyChains,(function(n){for(var r=e.node(n),o=r.edgeObj,a=i(e,t,o.v,o.w),s=a.path,u=a.lca,c=0,f=s[c],d=!0;n!==o.w;){if(r=e.node(n),d){for(;(f=s[c])!==u&&e.node(f).maxRank<r.rank;)c++;f===u&&(d=!1)}if(!d){for(;c<s.length-1&&e.node(f=s[c+1]).minRank<=r.rank;)c++;f=s[c]}e.setParent(n,f),n=e.successors(n)[0]}}))}function i(e,t,n,r){var o,i,a=[],s=[],u=Math.min(t[n].low,t[r].low),c=Math.max(t[n].lim,t[r].lim);o=n;do{o=e.parent(o),a.push(o)}while(o&&(t[o].low>u||c>t[o].lim));for(i=o,o=r;(o=e.parent(o))!==i;)s.push(o);return{path:a.concat(s.reverse()),lca:i}}function a(e){var t={},n=0;function o(i){var a=n;r.forEach(e.children(i),o),t[i]={low:a,lim:n++}}return r.forEach(e.children(),o),t}t.exports=o},{"./lodash":10}],23:[function(e,t,n){var r=e("../lodash"),o=e("../graphlib").Graph,i=e("../util");function a(e,t){var n={};function o(t,o){var i=0,a=0,s=t.length,f=r.last(o);return r.forEach(o,(function(t,d){var h=u(e,t),l=h?e.node(h).order:s;(h||t===f)&&(r.forEach(o.slice(a,d+1),(function(t){r.forEach(e.predecessors(t),(function(r){var o=e.node(r),a=o.order;!(a<i||l<a)||o.dummy&&e.node(t).dummy||c(n,r,t)}))})),a=d+1,i=l)})),o}return r.reduce(t,o),n}function s(e,t){var n={};function o(t,o,i,a,s){var u;r.forEach(r.range(o,i),(function(o){u=t[o],e.node(u).dummy&&r.forEach(e.predecessors(u),(function(t){var r=e.node(t);r.dummy&&(r.order<a||r.order>s)&&c(n,t,u)}))}))}function i(t,n){var i,a=-1,s=0;return r.forEach(n,(function(r,u){if("border"===e.node(r).dummy){var c=e.predecessors(r);c.length&&(i=e.node(c[0]).order,o(n,s,u,a,i),s=u,a=i)}o(n,s,n.length,i,t.length)})),n}return r.reduce(t,i),n}function u(e,t){if(e.node(t).dummy)return r.find(e.predecessors(t),(function(t){return e.node(t).dummy}))}function c(e,t,n){if(t>n){var r=t;t=n,n=r}var o=e[t];o||(e[t]=o={}),o[n]=!0}function f(e,t,n){if(t>n){var o=t;t=n,n=o}return r.has(e[t],n)}function d(e,t,n,o){var i={},a={},s={};return r.forEach(t,(function(e){r.forEach(e,(function(e,t){i[e]=e,a[e]=e,s[e]=t}))})),r.forEach(t,(function(e){var t=-1;r.forEach(e,(function(e){var u=o(e);if(u.length){u=r.sortBy(u,(function(e){return s[e]}));for(var c=(u.length-1)/2,d=Math.floor(c),h=Math.ceil(c);d<=h;++d){var l=u[d];a[e]===e&&t<s[l]&&!f(n,e,l)&&(a[l]=e,a[e]=i[e]=i[l],t=s[l])}}}))})),{root:i,align:a}}function h(e,t,n,o,i){var a={},s=l(e,t,n,i),u=i?"borderLeft":"borderRight";function c(e,t){for(var n=s.nodes(),r=n.pop(),o={};r;)o[r]?e(r):(o[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function f(e){a[e]=s.inEdges(e).reduce((function(e,t){return Math.max(e,a[t.v]+s.edge(t))}),0)}function d(t){var n=s.outEdges(t).reduce((function(e,t){return Math.min(e,a[t.w]-s.edge(t))}),Number.POSITIVE_INFINITY),r=e.node(t);n!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(a[t]=Math.max(a[t],n))}return c(f,s.predecessors.bind(s)),c(d,s.successors.bind(s)),r.forEach(o,(function(e){a[e]=a[n[e]]})),a}function l(e,t,n,i){var a=new o,s=e.graph(),u=g(s.nodesep,s.edgesep,i);return r.forEach(t,(function(t){var o;r.forEach(t,(function(t){var r=n[t];if(a.setNode(r),o){var i=n[o],s=a.edge(i,r);a.setEdge(i,r,Math.max(u(e,t,o),s||0))}o=t}))})),a}function p(e,t){return r.minBy(r.values(t),(function(t){var n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;return r.forIn(t,(function(t,r){var i=b(e,r)/2;n=Math.max(t+i,n),o=Math.min(t-i,o)})),n-o}))}function v(e,t){var n=r.values(t),o=r.min(n),i=r.max(n);r.forEach(["u","d"],(function(n){r.forEach(["l","r"],(function(a){var s,u=n+a,c=e[u];if(c!==t){var f=r.values(c);(s="l"===a?o-r.min(f):i-r.max(f))&&(e[u]=r.mapValues(c,(function(e){return e+s})))}}))}))}function _(e,t){return r.mapValues(e.ul,(function(n,o){if(t)return e[t.toLowerCase()][o];var i=r.sortBy(r.map(e,o));return(i[1]+i[2])/2}))}function y(e){var t,n=i.buildLayerMatrix(e),o=r.merge(a(e,n),s(e,n)),u={};r.forEach(["u","d"],(function(i){t="u"===i?n:r.values(n).reverse(),r.forEach(["l","r"],(function(n){"r"===n&&(t=r.map(t,(function(e){return r.values(e).reverse()})));var a=("u"===i?e.predecessors:e.successors).bind(e),s=d(e,t,o,a),c=h(e,t,s.root,s.align,"r"===n);"r"===n&&(c=r.mapValues(c,(function(e){return-e}))),u[i+n]=c}))}));var c=p(e,u);return v(u,c),_(u,e.graph().align)}function g(e,t,n){return function(o,i,a){var s,u=o.node(i),c=o.node(a),f=0;if(f+=u.width/2,r.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=-u.width/2;break;case"r":s=u.width/2}if(s&&(f+=n?s:-s),s=0,f+=(u.dummy?t:e)/2,f+=(c.dummy?t:e)/2,f+=c.width/2,r.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":s=c.width/2;break;case"r":s=-c.width/2}return s&&(f+=n?s:-s),s=0,f}}function b(e,t){return e.node(t).width}t.exports={positionX:y,findType1Conflicts:a,findType2Conflicts:s,addConflict:c,hasConflict:f,verticalAlignment:d,horizontalCompaction:h,alignCoordinates:v,findSmallestWidthAlignment:p,balance:_}},{"../graphlib":7,"../lodash":10,"../util":29}],24:[function(e,t,n){var r=e("../lodash"),o=e("../util"),i=e("./bk").positionX;function a(e){s(e=o.asNonCompoundGraph(e)),r.forEach(i(e),(function(t,n){e.node(n).x=t}))}function s(e){var t=o.buildLayerMatrix(e),n=e.graph().ranksep,i=0;r.forEach(t,(function(t){var o=r.max(r.map(t,(function(t){return e.node(t).height})));r.forEach(t,(function(t){e.node(t).y=i+o/2})),i+=o+n}))}t.exports=a},{"../lodash":10,"../util":29,"./bk":23}],25:[function(e,t,n){var r=e("../lodash"),o=e("../graphlib").Graph,i=e("./util").slack;function a(e){var t,n,r=new o({directed:!1}),a=e.nodes()[0],f=e.nodeCount();for(r.setNode(a,{});s(r,e)<f;)t=u(r,e),n=r.hasNode(t.v)?i(e,t):-i(e,t),c(r,e,n);return r}function s(e,t){function n(o){r.forEach(t.nodeEdges(o),(function(r){var a=r.v,s=o===a?r.w:a;e.hasNode(s)||i(t,r)||(e.setNode(s,{}),e.setEdge(o,s,{}),n(s))}))}return r.forEach(e.nodes(),n),e.nodeCount()}function u(e,t){return r.minBy(t.edges(),(function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return i(t,n)}))}function c(e,t,n){r.forEach(e.nodes(),(function(e){t.node(e).rank+=n}))}t.exports=a},{"../graphlib":7,"../lodash":10,"./util":28}],26:[function(e,t,n){var r=e("./util").longestPath,o=e("./feasible-tree"),i=e("./network-simplex");function a(e){switch(e.graph().ranker){case"network-simplex":default:c(e);break;case"tight-tree":u(e);break;case"longest-path":s(e)}}t.exports=a;var s=r;function u(e){r(e),o(e)}function c(e){i(e)}},{"./feasible-tree":25,"./network-simplex":27,"./util":28}],27:[function(e,t,n){var r=e("../lodash"),o=e("./feasible-tree"),i=e("./util").slack,a=e("./util").longestPath,s=e("../graphlib").alg.preorder,u=e("../graphlib").alg.postorder,c=e("../util").simplify;function f(e){e=c(e),a(e);var t,n=o(e);for(p(n),d(n,e);t=_(n);)g(n,e,t,y(n,e,t))}function d(e,t){var n=u(e,e.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){h(e,t,n)}))}function h(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=l(e,t,n)}function l(e,t,n){var o=e.node(n).parent,i=!0,a=t.edge(n,o),s=0;return a||(i=!1,a=t.edge(o,n)),s=a.weight,r.forEach(t.nodeEdges(n),(function(r){var a=r.v===n,u=a?r.w:r.v;if(u!==o){var c=a===i,f=t.edge(r).weight;if(s+=c?f:-f,m(e,n,u)){var d=e.edge(n,u).cutvalue;s+=c?-d:d}}})),s}function p(e,t){arguments.length<2&&(t=e.nodes()[0]),v(e,{},1,t)}function v(e,t,n,o,i){var a=n,s=e.node(o);return t[o]=!0,r.forEach(e.neighbors(o),(function(i){r.has(t,i)||(n=v(e,t,n,i,o))})),s.low=a,s.lim=n++,i?s.parent=i:delete s.parent,n}function _(e){return r.find(e.edges(),(function(t){return e.edge(t).cutvalue<0}))}function y(e,t,n){var o=n.v,a=n.w;t.hasEdge(o,a)||(o=n.w,a=n.v);var s=e.node(o),u=e.node(a),c=s,f=!1;s.lim>u.lim&&(c=u,f=!0);var d=r.filter(t.edges(),(function(t){return f===x(e,e.node(t.v),c)&&f!==x(e,e.node(t.w),c)}));return r.minBy(d,(function(e){return i(t,e)}))}function g(e,t,n,r){var o=n.v,i=n.w;e.removeEdge(o,i),e.setEdge(r.v,r.w,{}),p(e),d(e,t),b(e,t)}function b(e,t){var n=r.find(e.nodes(),(function(e){return!t.node(e).parent})),o=s(e,n);o=o.slice(1),r.forEach(o,(function(n){var r=e.node(n).parent,o=t.edge(n,r),i=!1;o||(o=t.edge(r,n),i=!0),t.node(n).rank=t.node(r).rank+(i?o.minlen:-o.minlen)}))}function m(e,t,n){return e.hasEdge(t,n)}function x(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}t.exports=f,f.initLowLimValues=p,f.initCutValues=d,f.calcCutValue=l,f.leaveEdge=_,f.enterEdge=y,f.exchangeEdges=g},{"../graphlib":7,"../lodash":10,"../util":29,"./feasible-tree":25,"./util":28}],28:[function(e,t,n){var r=e("../lodash");function o(e){var t={};function n(o){var i=e.node(o);if(r.has(t,o))return i.rank;t[o]=!0;var a=r.min(r.map(e.outEdges(o),(function(t){return n(t.w)-e.edge(t).minlen})));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),i.rank=a}r.forEach(e.sources(),n)}function i(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}t.exports={longestPath:o,slack:i}},{"../lodash":10}],29:[function(e,t,n){var r=e("./lodash"),o=e("./graphlib").Graph;function i(e,t,n,o){var i;do{i=r.uniqueId(o)}while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function a(e){var t=(new o).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})})),t}function s(e){var t=new o({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){e.children(n).length||t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){t.setEdge(n,e.edge(n))})),t}function u(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.outEdges(t),(function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)}function c(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.inEdges(t),(function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)}function f(e,t){var n,r,o=e.x,i=e.y,a=t.x-o,s=t.y-i,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),n=c*a/s,r=c):(a<0&&(u=-u),n=u,r=u*s/a),{x:o+n,y:i+r}}function d(e){var t=r.map(r.range(v(e)+1),(function(){return[]}));return r.forEach(e.nodes(),(function(n){var o=e.node(n),i=o.rank;r.isUndefined(i)||(t[i][o.order]=n)})),t}function h(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank})));r.forEach(e.nodes(),(function(n){var o=e.node(n);r.has(o,"rank")&&(o.rank-=t)}))}function l(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank}))),n=[];r.forEach(e.nodes(),(function(r){var o=e.node(r).rank-t;n[o]||(n[o]=[]),n[o].push(r)}));var o=0,i=e.graph().nodeRankFactor;r.forEach(n,(function(t,n){r.isUndefined(t)&&n%i!=0?--o:o&&r.forEach(t,(function(t){e.node(t).rank+=o}))}))}function p(e,t,n,r){var o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=r),i(e,"border",o,t)}function v(e){return r.max(r.map(e.nodes(),(function(t){var n=e.node(t).rank;if(!r.isUndefined(n))return n})))}function _(e,t){var n={lhs:[],rhs:[]};return r.forEach(e,(function(e){t(e)?n.lhs.push(e):n.rhs.push(e)})),n}function y(e,t){var n=r.now();try{return t()}finally{console.log(e+" time: "+(r.now()-n)+"ms")}}function g(e,t){return t()}t.exports={addDummyNode:i,simplify:a,asNonCompoundGraph:s,successorWeights:u,predecessorWeights:c,intersectRect:f,buildLayerMatrix:d,normalizeRanks:h,removeEmptyRanks:l,addBorderNode:p,maxRank:v,partition:_,time:y,notime:g}},{"./graphlib":7,"./lodash":10}],30:[function(e,t,n){t.exports="0.8.5"},{}],31:[function(e,t,n){var r=e("./lib");t.exports={Graph:r.Graph,json:e("./lib/json"),alg:e("./lib/alg"),version:r.version}},{"./lib":47,"./lib/alg":38,"./lib/json":48}],32:[function(e,t,n){var r=e("../lodash");function o(e){var t,n={},o=[];function i(o){r.has(n,o)||(n[o]=!0,t.push(o),r.each(e.successors(o),i),r.each(e.predecessors(o),i))}return r.each(e.nodes(),(function(e){t=[],i(e),t.length&&o.push(t)})),o}t.exports=o},{"../lodash":49}],33:[function(e,t,n){var r=e("../lodash");function o(e,t,n){r.isArray(t)||(t=[t]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],s={};return r.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);i(e,t,"post"===n,s,o,a)})),a}function i(e,t,n,o,a,s){r.has(o,t)||(o[t]=!0,n||s.push(t),r.each(a(t),(function(t){i(e,t,n,o,a,s)})),n&&s.push(t))}t.exports=o},{"../lodash":49}],34:[function(e,t,n){var r=e("./dijkstra"),o=e("../lodash");function i(e,t,n){return o.transform(e.nodes(),(function(o,i){o[i]=r(e,i,t,n)}),{})}t.exports=i},{"../lodash":49,"./dijkstra":35}],35:[function(e,t,n){var r=e("../lodash"),o=e("../data/priority-queue");t.exports=a;var i=r.constant(1);function a(e,t,n,r){return s(e,String(t),n||i,r||function(t){return e.outEdges(t)})}function s(e,t,n,r){var i,a,s={},u=new o,c=function(e){var t=e.v!==i?e.v:e.w,r=s[t],o=n(e),c=a.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);c<r.distance&&(r.distance=c,r.predecessor=i,u.decrease(t,c))};for(e.nodes().forEach((function(e){var n=e===t?0:Number.POSITIVE_INFINITY;s[e]={distance:n},u.add(e,n)}));u.size()>0&&(i=u.removeMin(),(a=s[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(c);return s}},{"../data/priority-queue":45,"../lodash":49}],36:[function(e,t,n){var r=e("../lodash"),o=e("./tarjan");function i(e){return r.filter(o(e),(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))}t.exports=i},{"../lodash":49,"./tarjan":43}],37:[function(e,t,n){var r=e("../lodash");t.exports=i;var o=r.constant(1);function i(e,t,n){return a(e,t||o,n||function(t){return e.outEdges(t)})}function a(e,t,n){var r={},o=e.nodes();return o.forEach((function(e){r[e]={},r[e][e]={distance:0},o.forEach((function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})})),n(e).forEach((function(n){var o=n.v===e?n.w:n.v,i=t(n);r[e][o]={distance:i,predecessor:e}}))})),o.forEach((function(e){var t=r[e];o.forEach((function(n){var i=r[n];o.forEach((function(n){var r=i[e],o=t[n],a=i[n],s=r.distance+o.distance;s<a.distance&&(a.distance=s,a.predecessor=o.predecessor)}))}))})),r}},{"../lodash":49}],38:[function(e,t,n){t.exports={components:e("./components"),dijkstra:e("./dijkstra"),dijkstraAll:e("./dijkstra-all"),findCycles:e("./find-cycles"),floydWarshall:e("./floyd-warshall"),isAcyclic:e("./is-acyclic"),postorder:e("./postorder"),preorder:e("./preorder"),prim:e("./prim"),tarjan:e("./tarjan"),topsort:e("./topsort")}},{"./components":32,"./dijkstra":35,"./dijkstra-all":34,"./find-cycles":36,"./floyd-warshall":37,"./is-acyclic":39,"./postorder":40,"./preorder":41,"./prim":42,"./tarjan":43,"./topsort":44}],39:[function(e,t,n){var r=e("./topsort");function o(e){try{r(e)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}t.exports=o},{"./topsort":44}],40:[function(e,t,n){var r=e("./dfs");function o(e,t){return r(e,t,"post")}t.exports=o},{"./dfs":33}],41:[function(e,t,n){var r=e("./dfs");function o(e,t){return r(e,t,"pre")}t.exports=o},{"./dfs":33}],42:[function(e,t,n){var r=e("../lodash"),o=e("../graph"),i=e("../data/priority-queue");function a(e,t){var n,a=new o,s={},u=new i;function c(e){var r=e.v===n?e.w:e.v,o=u.priority(r);if(void 0!==o){var i=t(e);i<o&&(s[r]=n,u.decrease(r,i))}}if(0===e.nodeCount())return a;r.each(e.nodes(),(function(e){u.add(e,Number.POSITIVE_INFINITY),a.setNode(e)})),u.decrease(e.nodes()[0],0);for(var f=!1;u.size()>0;){if(n=u.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(f)throw new Error("Input graph is not connected: "+e);f=!0}e.nodeEdges(n).forEach(c)}return a}t.exports=a},{"../data/priority-queue":45,"../graph":46,"../lodash":49}],43:[function(e,t,n){var r=e("../lodash");function o(e){var t=0,n=[],o={},i=[];function a(s){var u=o[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach((function(e){r.has(o,e)?o[e].onStack&&(u.lowlink=Math.min(u.lowlink,o[e].index)):(a(e),u.lowlink=Math.min(u.lowlink,o[e].lowlink))})),u.lowlink===u.index){var c,f=[];do{c=n.pop(),o[c].onStack=!1,f.push(c)}while(s!==c);i.push(f)}}return e.nodes().forEach((function(e){r.has(o,e)||a(e)})),i}t.exports=o},{"../lodash":49}],44:[function(e,t,n){var r=e("../lodash");function o(e){var t={},n={},o=[];function a(s){if(r.has(n,s))throw new i;r.has(t,s)||(n[s]=!0,t[s]=!0,r.each(e.predecessors(s),a),delete n[s],o.push(s))}if(r.each(e.sinks(),a),r.size(t)!==e.nodeCount())throw new i;return o}function i(){}t.exports=o,o.CycleException=i,i.prototype=new Error},{"../lodash":49}],45:[function(e,t,n){var r=e("../lodash");function o(){this._arr=[],this._keyIndices={}}t.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},o.prototype.has=function(e){return r.has(this._keyIndices,e)},o.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},o.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var o=this._arr,i=o.length;return n[e]=i,o.push({key:e,priority:t}),this._decrease(i),!0}return!1},o.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},o.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},o.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,o=e;n<t.length&&(o=t[n].priority<t[o].priority?n:o,r<t.length&&(o=t[r].priority<t[o].priority?r:o),o!==e&&(this._swap(e,o),this._heapify(o)))},o.prototype._decrease=function(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t},o.prototype._swap=function(e,t){var n=this._arr,r=this._keyIndices,o=n[e],i=n[t];n[e]=i,n[t]=o,r[i.key]=e,r[o.key]=t}},{"../lodash":49}],46:[function(e,t,n){var r=e("./lodash");t.exports=s;var o="\\0",i="\\0",a="";function s(e){this._isDirected=!r.has(e,"directed")||e.directed,this._isMultigraph=!!r.has(e,"multigraph")&&e.multigraph,this._isCompound=!!r.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[i]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function u(e,t){e[t]?e[t]++:e[t]=1}function c(e,t){--e[t]||delete e[t]}function f(e,t,n,i){var s=""+t,u=""+n;if(!e&&s>u){var c=s;s=u,u=c}return s+a+u+a+(r.isUndefined(i)?o:i)}function d(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};return r&&(s.name=r),s}function h(e,t){return f(e,t.v,t.w,t.name)}s.prototype._nodeCount=0,s.prototype._edgeCount=0,s.prototype.isDirected=function(){return this._isDirected},s.prototype.isMultigraph=function(){return this._isMultigraph},s.prototype.isCompound=function(){return this._isCompound},s.prototype.setGraph=function(e){return this._label=e,this},s.prototype.graph=function(){return this._label},s.prototype.setDefaultNodeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultNodeLabelFn=e,this},s.prototype.nodeCount=function(){return this._nodeCount},s.prototype.nodes=function(){return r.keys(this._nodes)},s.prototype.sources=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._in[t])}))},s.prototype.sinks=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._out[t])}))},s.prototype.setNodes=function(e,t){var n=arguments,o=this;return r.each(e,(function(e){n.length>1?o.setNode(e,t):o.setNode(e)})),this},s.prototype.setNode=function(e,t){return r.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=i,this._children[e]={},this._children[i][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},s.prototype.node=function(e){return this._nodes[e]},s.prototype.hasNode=function(e){return r.has(this._nodes,e)},s.prototype.removeNode=function(e){var t=this;if(r.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],r.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),r.each(r.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],r.each(r.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},s.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(t))t=i;else{for(var n=t+="";!r.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},s.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},s.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==i)return t}},s.prototype.children=function(e){if(r.isUndefined(e)&&(e=i),this._isCompound){var t=this._children[e];if(t)return r.keys(t)}else{if(e===i)return this.nodes();if(this.hasNode(e))return[]}},s.prototype.predecessors=function(e){var t=this._preds[e];if(t)return r.keys(t)},s.prototype.successors=function(e){var t=this._sucs[e];if(t)return r.keys(t)},s.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return r.union(t,this.successors(e))},s.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},s.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){e(r)&&t.setNode(r,n)})),r.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var o={};function i(e){var r=n.parent(e);return void 0===r||t.hasNode(r)?(o[e]=r,r):r in o?o[r]:i(r)}return this._isCompound&&r.each(t.nodes(),(function(e){t.setParent(e,i(e))})),t},s.prototype.setDefaultEdgeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultEdgeLabelFn=e,this},s.prototype.edgeCount=function(){return this._edgeCount},s.prototype.edges=function(){return r.values(this._edgeObjs)},s.prototype.setPath=function(e,t){var n=this,o=arguments;return r.reduce(e,(function(e,r){return o.length>1?n.setEdge(e,r,t):n.setEdge(e,r),r})),this},s.prototype.setEdge=function(){var e,t,n,o,i=!1,a=arguments[0];"object"==typeof a&&null!==a&&"v"in a?(e=a.v,t=a.w,n=a.name,2===arguments.length&&(o=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(o=arguments[2],i=!0)),e=""+e,t=""+t,r.isUndefined(n)||(n=""+n);var s=f(this._isDirected,e,t,n);if(r.has(this._edgeLabels,s))return i&&(this._edgeLabels[s]=o),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[s]=i?o:this._defaultEdgeLabelFn(e,t,n);var c=d(this._isDirected,e,t,n);return e=c.v,t=c.w,Object.freeze(c),this._edgeObjs[s]=c,u(this._preds[t],e),u(this._sucs[e],t),this._in[t][s]=c,this._out[e][s]=c,this._edgeCount++,this},s.prototype.edge=function(e,t,n){var r=1===arguments.length?h(this._isDirected,arguments[0]):f(this._isDirected,e,t,n);return this._edgeLabels[r]},s.prototype.hasEdge=function(e,t,n){var o=1===arguments.length?h(this._isDirected,arguments[0]):f(this._isDirected,e,t,n);return r.has(this._edgeLabels,o)},s.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?h(this._isDirected,arguments[0]):f(this._isDirected,e,t,n),o=this._edgeObjs[r];return o&&(e=o.v,t=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],c(this._preds[t],e),c(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},s.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var o=r.values(n);return t?r.filter(o,(function(e){return e.v===t})):o}},s.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var o=r.values(n);return t?r.filter(o,(function(e){return e.w===t})):o}},s.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},{"./lodash":49}],47:[function(e,t,n){t.exports={Graph:e("./graph"),version:e("./version")}},{"./graph":46,"./version":50}],48:[function(e,t,n){var r=e("./lodash"),o=e("./graph");function i(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:a(e),edges:s(e)};return r.isUndefined(e.graph())||(t.value=r.clone(e.graph())),t}function a(e){return r.map(e.nodes(),(function(t){var n=e.node(t),o=e.parent(t),i={v:t};return r.isUndefined(n)||(i.value=n),r.isUndefined(o)||(i.parent=o),i}))}function s(e){return r.map(e.edges(),(function(t){var n=e.edge(t),o={v:t.v,w:t.w};return r.isUndefined(t.name)||(o.name=t.name),r.isUndefined(n)||(o.value=n),o}))}function u(e){var t=new o(e.options).setGraph(e.value);return r.each(e.nodes,(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),r.each(e.edges,(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}t.exports={write:i,read:u}},{"./graph":46,"./lodash":49}],49:[function(e,t,n){var r;if("function"==typeof e)try{r={clone:e("lodash/clone"),constant:e("lodash/constant"),each:e("lodash/each"),filter:e("lodash/filter"),has:e("lodash/has"),isArray:e("lodash/isArray"),isEmpty:e("lodash/isEmpty"),isFunction:e("lodash/isFunction"),isUndefined:e("lodash/isUndefined"),keys:e("lodash/keys"),map:e("lodash/map"),reduce:e("lodash/reduce"),size:e("lodash/size"),transform:e("lodash/transform"),union:e("lodash/union"),values:e("lodash/values")}}catch(e){}r||(r=window._),t.exports=r},{"lodash/clone":226,"lodash/constant":228,"lodash/each":230,"lodash/filter":232,"lodash/has":239,"lodash/isArray":243,"lodash/isEmpty":247,"lodash/isFunction":248,"lodash/isUndefined":258,"lodash/keys":259,"lodash/map":262,"lodash/reduce":274,"lodash/size":275,"lodash/transform":284,"lodash/union":285,"lodash/values":287}],50:[function(e,t,n){t.exports="2.1.8"},{}],51:[function(e,t,n){var r=e("./_getNative")(e("./_root"),"DataView");t.exports=r},{"./_getNative":163,"./_root":208}],52:[function(e,t,n){var r=e("./_hashClear"),o=e("./_hashDelete"),i=e("./_hashGet"),a=e("./_hashHas"),s=e("./_hashSet");function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,t.exports=u},{"./_hashClear":172,"./_hashDelete":173,"./_hashGet":174,"./_hashHas":175,"./_hashSet":176}],53:[function(e,t,n){var r=e("./_listCacheClear"),o=e("./_listCacheDelete"),i=e("./_listCacheGet"),a=e("./_listCacheHas"),s=e("./_listCacheSet");function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,t.exports=u},{"./_listCacheClear":188,"./_listCacheDelete":189,"./_listCacheGet":190,"./_listCacheHas":191,"./_listCacheSet":192}],54:[function(e,t,n){var r=e("./_getNative")(e("./_root"),"Map");t.exports=r},{"./_getNative":163,"./_root":208}],55:[function(e,t,n){var r=e("./_mapCacheClear"),o=e("./_mapCacheDelete"),i=e("./_mapCacheGet"),a=e("./_mapCacheHas"),s=e("./_mapCacheSet");function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,t.exports=u},{"./_mapCacheClear":193,"./_mapCacheDelete":194,"./_mapCacheGet":195,"./_mapCacheHas":196,"./_mapCacheSet":197}],56:[function(e,t,n){var r=e("./_getNative")(e("./_root"),"Promise");t.exports=r},{"./_getNative":163,"./_root":208}],57:[function(e,t,n){var r=e("./_getNative")(e("./_root"),"Set");t.exports=r},{"./_getNative":163,"./_root":208}],58:[function(e,t,n){var r=e("./_MapCache"),o=e("./_setCacheAdd"),i=e("./_setCacheHas");function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,t.exports=a},{"./_MapCache":55,"./_setCacheAdd":210,"./_setCacheHas":211}],59:[function(e,t,n){var r=e("./_ListCache"),o=e("./_stackClear"),i=e("./_stackDelete"),a=e("./_stackGet"),s=e("./_stackHas"),u=e("./_stackSet");function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,t.exports=c},{"./_ListCache":53,"./_stackClear":215,"./_stackDelete":216,"./_stackGet":217,"./_stackHas":218,"./_stackSet":219}],60:[function(e,t,n){var r=e("./_root").Symbol;t.exports=r},{"./_root":208}],61:[function(e,t,n){var r=e("./_root").Uint8Array;t.exports=r},{"./_root":208}],62:[function(e,t,n){var r=e("./_getNative")(e("./_root"),"WeakMap");t.exports=r},{"./_getNative":163,"./_root":208}],63:[function(e,t,n){function r(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=r},{}],64:[function(e,t,n){function r(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}t.exports=r},{}],65:[function(e,t,n){function r(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}t.exports=r},{}],66:[function(e,t,n){var r=e("./_baseIndexOf");function o(e,t){return!(null==e||!e.length)&&r(e,t,0)>-1}t.exports=o},{"./_baseIndexOf":95}],67:[function(e,t,n){function r(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}t.exports=r},{}],68:[function(e,t,n){var r=e("./_baseTimes"),o=e("./isArguments"),i=e("./isArray"),a=e("./isBuffer"),s=e("./_isIndex"),u=e("./isTypedArray"),c=Object.prototype.hasOwnProperty;function f(e,t){var n=i(e),f=!n&&o(e),d=!n&&!f&&a(e),h=!n&&!f&&!d&&u(e),l=n||f||d||h,p=l?r(e.length,String):[],v=p.length;for(var _ in e)!t&&!c.call(e,_)||l&&("length"==_||d&&("offset"==_||"parent"==_)||h&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||s(_,v))||p.push(_);return p}t.exports=f},{"./_baseTimes":125,"./_isIndex":181,"./isArguments":242,"./isArray":243,"./isBuffer":246,"./isTypedArray":257}],69:[function(e,t,n){function r(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}t.exports=r},{}],70:[function(e,t,n){function r(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}t.exports=r},{}],71:[function(e,t,n){function r(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}t.exports=r},{}],72:[function(e,t,n){function r(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}t.exports=r},{}],73:[function(e,t,n){var r=e("./_baseProperty")("length");t.exports=r},{"./_baseProperty":117}],74:[function(e,t,n){var r=e("./_baseAssignValue"),o=e("./eq");function i(e,t,n){(void 0!==n&&!o(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}t.exports=i},{"./_baseAssignValue":79,"./eq":231}],75:[function(e,t,n){var r=e("./_baseAssignValue"),o=e("./eq"),i=Object.prototype.hasOwnProperty;function a(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}t.exports=a},{"./_baseAssignValue":79,"./eq":231}],76:[function(e,t,n){var r=e("./eq");function o(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}t.exports=o},{"./eq":231}],77:[function(e,t,n){var r=e("./_copyObject"),o=e("./keys");function i(e,t){return e&&r(t,o(t),e)}t.exports=i},{"./_copyObject":143,"./keys":259}],78:[function(e,t,n){var r=e("./_copyObject"),o=e("./keysIn");function i(e,t){return e&&r(t,o(t),e)}t.exports=i},{"./_copyObject":143,"./keysIn":260}],79:[function(e,t,n){var r=e("./_defineProperty");function o(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}t.exports=o},{"./_defineProperty":153}],80:[function(e,t,n){var r=e("./_Stack"),o=e("./_arrayEach"),i=e("./_assignValue"),a=e("./_baseAssign"),s=e("./_baseAssignIn"),u=e("./_cloneBuffer"),c=e("./_copyArray"),f=e("./_copySymbols"),d=e("./_copySymbolsIn"),h=e("./_getAllKeys"),l=e("./_getAllKeysIn"),p=e("./_getTag"),v=e("./_initCloneArray"),_=e("./_initCloneByTag"),y=e("./_initCloneObject"),g=e("./isArray"),b=e("./isBuffer"),m=e("./isMap"),x=e("./isObject"),w=e("./isSet"),E=e("./keys"),j=1,k=2,A=4,O="[object Arguments]",I="[object Array]",S="[object Boolean]",C="[object Date]",N="[object Error]",T="[object Function]",M="[object GeneratorFunction]",L="[object Map]",P="[object Number]",F="[object Object]",D="[object RegExp]",B="[object Set]",G="[object String]",R="[object Symbol]",U="[object WeakMap]",z="[object ArrayBuffer]",V="[object DataView]",q="[object Float32Array]",K="[object Float64Array]",H="[object Int8Array]",Y="[object Int16Array]",$="[object Int32Array]",W="[object Uint8Array]",J="[object Uint8ClampedArray]",X="[object Uint16Array]",Z="[object Uint32Array]",Q={};function ee(e,t,n,I,S,C){var N,L=t&j,P=t&k,D=t&A;if(n&&(N=S?n(e,I,S,C):n(e)),void 0!==N)return N;if(!x(e))return e;var B=g(e);if(B){if(N=v(e),!L)return c(e,N)}else{var G=p(e),R=G==T||G==M;if(b(e))return u(e,L);if(G==F||G==O||R&&!S){if(N=P||R?{}:y(e),!L)return P?d(e,s(N,e)):f(e,a(N,e))}else{if(!Q[G])return S?e:{};N=_(e,G,L)}}C||(C=new r);var U=C.get(e);if(U)return U;C.set(e,N),w(e)?e.forEach((function(r){N.add(ee(r,t,n,r,e,C))})):m(e)&&e.forEach((function(r,o){N.set(o,ee(r,t,n,o,e,C))}));var z=D?P?l:h:P?keysIn:E,V=B?void 0:z(e);return o(V||e,(function(r,o){V&&(r=e[o=r]),i(N,o,ee(r,t,n,o,e,C))})),N}Q[O]=Q[I]=Q[z]=Q[V]=Q[S]=Q[C]=Q[q]=Q[K]=Q[H]=Q[Y]=Q[$]=Q[L]=Q[P]=Q[F]=Q[D]=Q[B]=Q[G]=Q[R]=Q[W]=Q[J]=Q[X]=Q[Z]=!0,Q[N]=Q[T]=Q[U]=!1,t.exports=ee},{"./_Stack":59,"./_arrayEach":64,"./_assignValue":75,"./_baseAssign":77,"./_baseAssignIn":78,"./_cloneBuffer":135,"./_copyArray":142,"./_copySymbols":144,"./_copySymbolsIn":145,"./_getAllKeys":159,"./_getAllKeysIn":160,"./_getTag":168,"./_initCloneArray":177,"./_initCloneByTag":178,"./_initCloneObject":179,"./isArray":243,"./isBuffer":246,"./isMap":250,"./isObject":251,"./isSet":254,"./keys":259}],81:[function(e,t,n){var r=e("./isObject"),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();t.exports=i},{"./isObject":251}],82:[function(e,t,n){var r=e("./_baseForOwn"),o=e("./_createBaseEach")(r);t.exports=o},{"./_baseForOwn":88,"./_createBaseEach":148}],83:[function(e,t,n){var r=e("./isSymbol");function o(e,t,n){for(var o=-1,i=e.length;++o<i;){var a=e[o],s=t(a);if(null!=s&&(void 0===u?s==s&&!r(s):n(s,u)))var u=s,c=a}return c}t.exports=o},{"./isSymbol":256}],84:[function(e,t,n){var r=e("./_baseEach");function o(e,t){var n=[];return r(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}t.exports=o},{"./_baseEach":82}],85:[function(e,t,n){function r(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}t.exports=r},{}],86:[function(e,t,n){var r=e("./_arrayPush"),o=e("./_isFlattenable");function i(e,t,n,a,s){var u=-1,c=e.length;for(n||(n=o),s||(s=[]);++u<c;){var f=e[u];t>0&&n(f)?t>1?i(f,t-1,n,a,s):r(s,f):a||(s[s.length]=f)}return s}t.exports=i},{"./_arrayPush":70,"./_isFlattenable":180}],87:[function(e,t,n){var r=e("./_createBaseFor")();t.exports=r},{"./_createBaseFor":149}],88:[function(e,t,n){var r=e("./_baseFor"),o=e("./keys");function i(e,t){return e&&r(e,t,o)}t.exports=i},{"./_baseFor":87,"./keys":259}],89:[function(e,t,n){var r=e("./_castPath"),o=e("./_toKey");function i(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n<i;)e=e[o(t[n++])];return n&&n==i?e:void 0}t.exports=i},{"./_castPath":133,"./_toKey":223}],90:[function(e,t,n){var r=e("./_arrayPush"),o=e("./isArray");function i(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}t.exports=i},{"./_arrayPush":70,"./isArray":243}],91:[function(e,t,n){var r=e("./_Symbol"),o=e("./_getRawTag"),i=e("./_objectToString"),a="[object Null]",s="[object Undefined]",u=r?r.toStringTag:void 0;function c(e){return null==e?void 0===e?s:a:u&&u in Object(e)?o(e):i(e)}t.exports=c},{"./_Symbol":60,"./_getRawTag":165,"./_objectToString":205}],92:[function(e,t,n){function r(e,t){return e>t}t.exports=r},{}],93:[function(e,t,n){var r=Object.prototype.hasOwnProperty;function o(e,t){return null!=e&&r.call(e,t)}t.exports=o},{}],94:[function(e,t,n){function r(e,t){return null!=e&&t in Object(e)}t.exports=r},{}],95:[function(e,t,n){var r=e("./_baseFindIndex"),o=e("./_baseIsNaN"),i=e("./_strictIndexOf");function a(e,t,n){return t==t?i(e,t,n):r(e,o,n)}t.exports=a},{"./_baseFindIndex":85,"./_baseIsNaN":101,"./_strictIndexOf":220}],96:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./isObjectLike"),i="[object Arguments]";function a(e){return o(e)&&r(e)==i}t.exports=a},{"./_baseGetTag":91,"./isObjectLike":252}],97:[function(e,t,n){var r=e("./_baseIsEqualDeep"),o=e("./isObjectLike");function i(e,t,n,a,s){return e===t||(null==e||null==t||!o(e)&&!o(t)?e!=e&&t!=t:r(e,t,n,a,i,s))}t.exports=i},{"./_baseIsEqualDeep":98,"./isObjectLike":252}],98:[function(e,t,n){var r=e("./_Stack"),o=e("./_equalArrays"),i=e("./_equalByTag"),a=e("./_equalObjects"),s=e("./_getTag"),u=e("./isArray"),c=e("./isBuffer"),f=e("./isTypedArray"),d=1,h="[object Arguments]",l="[object Array]",p="[object Object]",v=Object.prototype.hasOwnProperty;function _(e,t,n,_,y,g){var b=u(e),m=u(t),x=b?l:s(e),w=m?l:s(t),E=(x=x==h?p:x)==p,j=(w=w==h?p:w)==p,k=x==w;if(k&&c(e)){if(!c(t))return!1;b=!0,E=!1}if(k&&!E)return g||(g=new r),b||f(e)?o(e,t,n,_,y,g):i(e,t,x,n,_,y,g);if(!(n&d)){var A=E&&v.call(e,"__wrapped__"),O=j&&v.call(t,"__wrapped__");if(A||O){var I=A?e.value():e,S=O?t.value():t;return g||(g=new r),y(I,S,n,_,g)}}return!!k&&(g||(g=new r),a(e,t,n,_,y,g))}t.exports=_},{"./_Stack":59,"./_equalArrays":154,"./_equalByTag":155,"./_equalObjects":156,"./_getTag":168,"./isArray":243,"./isBuffer":246,"./isTypedArray":257}],99:[function(e,t,n){var r=e("./_getTag"),o=e("./isObjectLike"),i="[object Map]";function a(e){return o(e)&&r(e)==i}t.exports=a},{"./_getTag":168,"./isObjectLike":252}],100:[function(e,t,n){var r=e("./_Stack"),o=e("./_baseIsEqual"),i=1,a=2;function s(e,t,n,s){var u=n.length,c=u,f=!s;if(null==e)return!c;for(e=Object(e);u--;){var d=n[u];if(f&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++u<c;){var h=(d=n[u])[0],l=e[h],p=d[1];if(f&&d[2]){if(void 0===l&&!(h in e))return!1}else{var v=new r;if(s)var _=s(l,p,h,e,t,v);if(!(void 0===_?o(p,l,i|a,s,v):_))return!1}}return!0}t.exports=s},{"./_Stack":59,"./_baseIsEqual":97}],101:[function(e,t,n){function r(e){return e!=e}t.exports=r},{}],102:[function(e,t,n){var r=e("./isFunction"),o=e("./_isMasked"),i=e("./isObject"),a=e("./_toSource"),s=/[\\\\^$.*+?()[\\]{}|]/g,u=/^\\[object .+?Constructor\\]$/,c=Function.prototype,f=Object.prototype,d=c.toString,h=f.hasOwnProperty,l=RegExp("^"+d.call(h).replace(s,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$");function p(e){return!(!i(e)||o(e))&&(r(e)?l:u).test(a(e))}t.exports=p},{"./_isMasked":185,"./_toSource":224,"./isFunction":248,"./isObject":251}],103:[function(e,t,n){var r=e("./_getTag"),o=e("./isObjectLike"),i="[object Set]";function a(e){return o(e)&&r(e)==i}t.exports=a},{"./_getTag":168,"./isObjectLike":252}],104:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./isLength"),i=e("./isObjectLike"),a="[object Arguments]",s="[object Array]",u="[object Boolean]",c="[object Date]",f="[object Error]",d="[object Function]",h="[object Map]",l="[object Number]",p="[object Object]",v="[object RegExp]",_="[object Set]",y="[object String]",g="[object WeakMap]",b="[object ArrayBuffer]",m="[object DataView]",x="[object Float64Array]",w="[object Int8Array]",E="[object Int16Array]",j="[object Int32Array]",k="[object Uint8Array]",A="[object Uint8ClampedArray]",O="[object Uint16Array]",I="[object Uint32Array]",S={};function C(e){return i(e)&&o(e.length)&&!!S[r(e)]}S["[object Float32Array]"]=S[x]=S[w]=S[E]=S[j]=S[k]=S[A]=S[O]=S[I]=!0,S[a]=S[s]=S[b]=S[u]=S[m]=S[c]=S[f]=S[d]=S[h]=S[l]=S[p]=S[v]=S[_]=S[y]=S[g]=!1,t.exports=C},{"./_baseGetTag":91,"./isLength":249,"./isObjectLike":252}],105:[function(e,t,n){var r=e("./_baseMatches"),o=e("./_baseMatchesProperty"),i=e("./identity"),a=e("./isArray"),s=e("./property");function u(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):r(e):s(e)}t.exports=u},{"./_baseMatches":110,"./_baseMatchesProperty":111,"./identity":241,"./isArray":243,"./property":272}],106:[function(e,t,n){var r=e("./_isPrototype"),o=e("./_nativeKeys"),i=Object.prototype.hasOwnProperty;function a(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}t.exports=a},{"./_isPrototype":186,"./_nativeKeys":202}],107:[function(e,t,n){var r=e("./isObject"),o=e("./_isPrototype"),i=e("./_nativeKeysIn"),a=Object.prototype.hasOwnProperty;function s(e){if(!r(e))return i(e);var t=o(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}t.exports=s},{"./_isPrototype":186,"./_nativeKeysIn":203,"./isObject":251}],108:[function(e,t,n){function r(e,t){return e<t}t.exports=r},{}],109:[function(e,t,n){var r=e("./_baseEach"),o=e("./isArrayLike");function i(e,t){var n=-1,i=o(e)?Array(e.length):[];return r(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}t.exports=i},{"./_baseEach":82,"./isArrayLike":244}],110:[function(e,t,n){var r=e("./_baseIsMatch"),o=e("./_getMatchData"),i=e("./_matchesStrictComparable");function a(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}t.exports=a},{"./_baseIsMatch":100,"./_getMatchData":162,"./_matchesStrictComparable":199}],111:[function(e,t,n){var r=e("./_baseIsEqual"),o=e("./get"),i=e("./hasIn"),a=e("./_isKey"),s=e("./_isStrictComparable"),u=e("./_matchesStrictComparable"),c=e("./_toKey"),f=1,d=2;function h(e,t){return a(e)&&s(t)?u(c(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?i(n,e):r(t,a,f|d)}}t.exports=h},{"./_baseIsEqual":97,"./_isKey":183,"./_isStrictComparable":187,"./_matchesStrictComparable":199,"./_toKey":223,"./get":238,"./hasIn":240}],112:[function(e,t,n){var r=e("./_Stack"),o=e("./_assignMergeValue"),i=e("./_baseFor"),a=e("./_baseMergeDeep"),s=e("./isObject"),u=e("./keysIn"),c=e("./_safeGet");function f(e,t,n,d,h){e!==t&&i(t,(function(i,u){if(h||(h=new r),s(i))a(e,t,u,n,f,d,h);else{var l=d?d(c(e,u),i,u+"",e,t,h):void 0;void 0===l&&(l=i),o(e,u,l)}}),u)}t.exports=f},{"./_Stack":59,"./_assignMergeValue":74,"./_baseFor":87,"./_baseMergeDeep":113,"./_safeGet":209,"./isObject":251,"./keysIn":260}],113:[function(e,t,n){var r=e("./_assignMergeValue"),o=e("./_cloneBuffer"),i=e("./_cloneTypedArray"),a=e("./_copyArray"),s=e("./_initCloneObject"),u=e("./isArguments"),c=e("./isArray"),f=e("./isArrayLikeObject"),d=e("./isBuffer"),h=e("./isFunction"),l=e("./isObject"),p=e("./isPlainObject"),v=e("./isTypedArray"),_=e("./_safeGet"),y=e("./toPlainObject");function g(e,t,n,g,b,m,x){var w=_(e,n),E=_(t,n),j=x.get(E);if(j)r(e,n,j);else{var k=m?m(w,E,n+"",e,t,x):void 0,A=void 0===k;if(A){var O=c(E),I=!O&&d(E),S=!O&&!I&&v(E);k=E,O||I||S?c(w)?k=w:f(w)?k=a(w):I?(A=!1,k=o(E,!0)):S?(A=!1,k=i(E,!0)):k=[]:p(E)||u(E)?(k=w,u(w)?k=y(w):l(w)&&!h(w)||(k=s(E))):A=!1}A&&(x.set(E,k),b(k,E,g,m,x),x.delete(E)),r(e,n,k)}}t.exports=g},{"./_assignMergeValue":74,"./_cloneBuffer":135,"./_cloneTypedArray":139,"./_copyArray":142,"./_initCloneObject":179,"./_safeGet":209,"./isArguments":242,"./isArray":243,"./isArrayLikeObject":245,"./isBuffer":246,"./isFunction":248,"./isObject":251,"./isPlainObject":253,"./isTypedArray":257,"./toPlainObject":282}],114:[function(e,t,n){var r=e("./_arrayMap"),o=e("./_baseIteratee"),i=e("./_baseMap"),a=e("./_baseSortBy"),s=e("./_baseUnary"),u=e("./_compareMultiple"),c=e("./identity");function f(e,t,n){var f=-1;t=r(t.length?t:[c],s(o));var d=i(e,(function(e,n,o){return{criteria:r(t,(function(t){return t(e)})),index:++f,value:e}}));return a(d,(function(e,t){return u(e,t,n)}))}t.exports=f},{"./_arrayMap":69,"./_baseIteratee":105,"./_baseMap":109,"./_baseSortBy":124,"./_baseUnary":127,"./_compareMultiple":141,"./identity":241}],115:[function(e,t,n){var r=e("./_basePickBy"),o=e("./hasIn");function i(e,t){return r(e,t,(function(t,n){return o(e,n)}))}t.exports=i},{"./_basePickBy":116,"./hasIn":240}],116:[function(e,t,n){var r=e("./_baseGet"),o=e("./_baseSet"),i=e("./_castPath");function a(e,t,n){for(var a=-1,s=t.length,u={};++a<s;){var c=t[a],f=r(e,c);n(f,c)&&o(u,i(c,e),f)}return u}t.exports=a},{"./_baseGet":89,"./_baseSet":122,"./_castPath":133}],117:[function(e,t,n){function r(e){return function(t){return null==t?void 0:t[e]}}t.exports=r},{}],118:[function(e,t,n){var r=e("./_baseGet");function o(e){return function(t){return r(t,e)}}t.exports=o},{"./_baseGet":89}],119:[function(e,t,n){var r=Math.ceil,o=Math.max;function i(e,t,n,i){for(var a=-1,s=o(r((t-e)/(n||1)),0),u=Array(s);s--;)u[i?s:++a]=e,e+=n;return u}t.exports=i},{}],120:[function(e,t,n){function r(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}t.exports=r},{}],121:[function(e,t,n){var r=e("./identity"),o=e("./_overRest"),i=e("./_setToString");function a(e,t){return i(o(e,t,r),e+"")}t.exports=a},{"./_overRest":207,"./_setToString":213,"./identity":241}],122:[function(e,t,n){var r=e("./_assignValue"),o=e("./_castPath"),i=e("./_isIndex"),a=e("./isObject"),s=e("./_toKey");function u(e,t,n,u){if(!a(e))return e;for(var c=-1,f=(t=o(t,e)).length,d=f-1,h=e;null!=h&&++c<f;){var l=s(t[c]),p=n;if(c!=d){var v=h[l];void 0===(p=u?u(v,l,h):void 0)&&(p=a(v)?v:i(t[c+1])?[]:{})}r(h,l,p),h=h[l]}return e}t.exports=u},{"./_assignValue":75,"./_castPath":133,"./_isIndex":181,"./_toKey":223,"./isObject":251}],123:[function(e,t,n){var r=e("./constant"),o=e("./_defineProperty"),i=e("./identity"),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;t.exports=a},{"./_defineProperty":153,"./constant":228,"./identity":241}],124:[function(e,t,n){function r(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}t.exports=r},{}],125:[function(e,t,n){function r(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}t.exports=r},{}],126:[function(e,t,n){var r=e("./_Symbol"),o=e("./_arrayMap"),i=e("./isArray"),a=e("./isSymbol"),s=1/0,u=r?r.prototype:void 0,c=u?u.toString:void 0;function f(e){if("string"==typeof e)return e;if(i(e))return o(e,f)+"";if(a(e))return c?c.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}t.exports=f},{"./_Symbol":60,"./_arrayMap":69,"./isArray":243,"./isSymbol":256}],127:[function(e,t,n){function r(e){return function(t){return e(t)}}t.exports=r},{}],128:[function(e,t,n){var r=e("./_SetCache"),o=e("./_arrayIncludes"),i=e("./_arrayIncludesWith"),a=e("./_cacheHas"),s=e("./_createSet"),u=e("./_setToArray"),c=200;function f(e,t,n){var f=-1,d=o,h=e.length,l=!0,p=[],v=p;if(n)l=!1,d=i;else if(h>=c){var _=t?null:s(e);if(_)return u(_);l=!1,d=a,v=new r}else v=t?[]:p;e:for(;++f<h;){var y=e[f],g=t?t(y):y;if(y=n||0!==y?y:0,l&&g==g){for(var b=v.length;b--;)if(v[b]===g)continue e;t&&v.push(g),p.push(y)}else d(v,g,n)||(v!==p&&v.push(g),p.push(y))}return p}t.exports=f},{"./_SetCache":58,"./_arrayIncludes":66,"./_arrayIncludesWith":67,"./_cacheHas":131,"./_createSet":152,"./_setToArray":212}],129:[function(e,t,n){var r=e("./_arrayMap");function o(e,t){return r(t,(function(t){return e[t]}))}t.exports=o},{"./_arrayMap":69}],130:[function(e,t,n){function r(e,t,n){for(var r=-1,o=e.length,i=t.length,a={};++r<o;){var s=r<i?t[r]:void 0;n(a,e[r],s)}return a}t.exports=r},{}],131:[function(e,t,n){function r(e,t){return e.has(t)}t.exports=r},{}],132:[function(e,t,n){var r=e("./identity");function o(e){return"function"==typeof e?e:r}t.exports=o},{"./identity":241}],133:[function(e,t,n){var r=e("./isArray"),o=e("./_isKey"),i=e("./_stringToPath"),a=e("./toString");function s(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}t.exports=s},{"./_isKey":183,"./_stringToPath":222,"./isArray":243,"./toString":283}],134:[function(e,t,n){var r=e("./_Uint8Array");function o(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}t.exports=o},{"./_Uint8Array":61}],135:[function(e,t,n){var r=e("./_root"),o="object"==typeof n&&n&&!n.nodeType&&n,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;function u(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}t.exports=u},{"./_root":208}],136:[function(e,t,n){var r=e("./_cloneArrayBuffer");function o(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}t.exports=o},{"./_cloneArrayBuffer":134}],137:[function(e,t,n){var r=/\\w*$/;function o(e){var t=new e.constructor(e.source,r.exec(e));return t.lastIndex=e.lastIndex,t}t.exports=o},{}],138:[function(e,t,n){var r=e("./_Symbol"),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;function a(e){return i?Object(i.call(e)):{}}t.exports=a},{"./_Symbol":60}],139:[function(e,t,n){var r=e("./_cloneArrayBuffer");function o(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}t.exports=o},{"./_cloneArrayBuffer":134}],140:[function(e,t,n){var r=e("./isSymbol");function o(e,t){if(e!==t){var n=void 0!==e,o=null===e,i=e==e,a=r(e),s=void 0!==t,u=null===t,c=t==t,f=r(t);if(!u&&!f&&!a&&e>t||a&&s&&c&&!u&&!f||o&&s&&c||!n&&c||!i)return 1;if(!o&&!a&&!f&&e<t||f&&n&&i&&!o&&!a||u&&n&&i||!s&&i||!c)return-1}return 0}t.exports=o},{"./isSymbol":256}],141:[function(e,t,n){var r=e("./_compareAscending");function o(e,t,n){for(var o=-1,i=e.criteria,a=t.criteria,s=i.length,u=n.length;++o<s;){var c=r(i[o],a[o]);if(c)return o>=u?c:c*("desc"==n[o]?-1:1)}return e.index-t.index}t.exports=o},{"./_compareAscending":140}],142:[function(e,t,n){function r(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}t.exports=r},{}],143:[function(e,t,n){var r=e("./_assignValue"),o=e("./_baseAssignValue");function i(e,t,n,i){var a=!n;n||(n={});for(var s=-1,u=t.length;++s<u;){var c=t[s],f=i?i(n[c],e[c],c,n,e):void 0;void 0===f&&(f=e[c]),a?o(n,c,f):r(n,c,f)}return n}t.exports=i},{"./_assignValue":75,"./_baseAssignValue":79}],144:[function(e,t,n){var r=e("./_copyObject"),o=e("./_getSymbols");function i(e,t){return r(e,o(e),t)}t.exports=i},{"./_copyObject":143,"./_getSymbols":166}],145:[function(e,t,n){var r=e("./_copyObject"),o=e("./_getSymbolsIn");function i(e,t){return r(e,o(e),t)}t.exports=i},{"./_copyObject":143,"./_getSymbolsIn":167}],146:[function(e,t,n){var r=e("./_root")["__core-js_shared__"];t.exports=r},{"./_root":208}],147:[function(e,t,n){var r=e("./_baseRest"),o=e("./_isIterateeCall");function i(e){return r((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var u=n[r];u&&e(t,u,r,a)}return t}))}t.exports=i},{"./_baseRest":121,"./_isIterateeCall":182}],148:[function(e,t,n){var r=e("./isArrayLike");function o(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var i=n.length,a=t?i:-1,s=Object(n);(t?a--:++a<i)&&!1!==o(s[a],a,s););return n}}t.exports=o},{"./isArrayLike":244}],149:[function(e,t,n){function r(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===n(i[u],u,i))break}return t}}t.exports=r},{}],150:[function(e,t,n){var r=e("./_baseIteratee"),o=e("./isArrayLike"),i=e("./keys");function a(e){return function(t,n,a){var s=Object(t);if(!o(t)){var u=r(n,3);t=i(t),n=function(e){return u(s[e],e,s)}}var c=e(t,n,a);return c>-1?s[u?t[c]:c]:void 0}}t.exports=a},{"./_baseIteratee":105,"./isArrayLike":244,"./keys":259}],151:[function(e,t,n){var r=e("./_baseRange"),o=e("./_isIterateeCall"),i=e("./toFinite");function a(e){return function(t,n,a){return a&&"number"!=typeof a&&o(t,n,a)&&(n=a=void 0),t=i(t),void 0===n?(n=t,t=0):n=i(n),a=void 0===a?t<n?1:-1:i(a),r(t,n,a,e)}}t.exports=a},{"./_baseRange":119,"./_isIterateeCall":182,"./toFinite":279}],152:[function(e,t,n){var r=e("./_Set"),o=e("./noop"),i=e("./_setToArray"),a=1/0,s=r&&1/i(new r([,-0]))[1]==a?function(e){return new r(e)}:o;t.exports=s},{"./_Set":57,"./_setToArray":212,"./noop":269}],153:[function(e,t,n){var r=e("./_getNative"),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();t.exports=o},{"./_getNative":163}],154:[function(e,t,n){var r=e("./_SetCache"),o=e("./_arraySome"),i=e("./_cacheHas"),a=1,s=2;function u(e,t,n,u,c,f){var d=n&a,h=e.length,l=t.length;if(h!=l&&!(d&&l>h))return!1;var p=f.get(e);if(p&&f.get(t))return p==t;var v=-1,_=!0,y=n&s?new r:void 0;for(f.set(e,t),f.set(t,e);++v<h;){var g=e[v],b=t[v];if(u)var m=d?u(b,g,v,t,e,f):u(g,b,v,e,t,f);if(void 0!==m){if(m)continue;_=!1;break}if(y){if(!o(t,(function(e,t){if(!i(y,t)&&(g===e||c(g,e,n,u,f)))return y.push(t)}))){_=!1;break}}else if(g!==b&&!c(g,b,n,u,f)){_=!1;break}}return f.delete(e),f.delete(t),_}t.exports=u},{"./_SetCache":58,"./_arraySome":72,"./_cacheHas":131}],155:[function(e,t,n){var r=e("./_Symbol"),o=e("./_Uint8Array"),i=e("./eq"),a=e("./_equalArrays"),s=e("./_mapToArray"),u=e("./_setToArray"),c=1,f=2,d="[object Boolean]",h="[object Date]",l="[object Error]",p="[object Map]",v="[object Number]",_="[object RegExp]",y="[object Set]",g="[object String]",b="[object Symbol]",m="[object ArrayBuffer]",x="[object DataView]",w=r?r.prototype:void 0,E=w?w.valueOf:void 0;function j(e,t,n,r,w,j,k){switch(n){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case m:return!(e.byteLength!=t.byteLength||!j(new o(e),new o(t)));case d:case h:case v:return i(+e,+t);case l:return e.name==t.name&&e.message==t.message;case _:case g:return e==t+"";case p:var A=s;case y:var O=r&c;if(A||(A=u),e.size!=t.size&&!O)return!1;var I=k.get(e);if(I)return I==t;r|=f,k.set(e,t);var S=a(A(e),A(t),r,w,j,k);return k.delete(e),S;case b:if(E)return E.call(e)==E.call(t)}return!1}t.exports=j},{"./_Symbol":60,"./_Uint8Array":61,"./_equalArrays":154,"./_mapToArray":198,"./_setToArray":212,"./eq":231}],156:[function(e,t,n){var r=e("./_getAllKeys"),o=1,i=Object.prototype.hasOwnProperty;function a(e,t,n,a,s,u){var c=n&o,f=r(e),d=f.length;if(d!=r(t).length&&!c)return!1;for(var h=d;h--;){var l=f[h];if(!(c?l in t:i.call(t,l)))return!1}var p=u.get(e);if(p&&u.get(t))return p==t;var v=!0;u.set(e,t),u.set(t,e);for(var _=c;++h<d;){var y=e[l=f[h]],g=t[l];if(a)var b=c?a(g,y,l,t,e,u):a(y,g,l,e,t,u);if(!(void 0===b?y===g||s(y,g,n,a,u):b)){v=!1;break}_||(_="constructor"==l)}if(v&&!_){var m=e.constructor,x=t.constructor;m==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof x&&x instanceof x||(v=!1)}return u.delete(e),u.delete(t),v}t.exports=a},{"./_getAllKeys":159}],157:[function(e,t,n){var r=e("./flatten"),o=e("./_overRest"),i=e("./_setToString");function a(e){return i(o(e,void 0,r),e+"")}t.exports=a},{"./_overRest":207,"./_setToString":213,"./flatten":235}],158:[function(t,n,r){(function(e){var t="object"==typeof e&&e&&e.Object===Object&&e;n.exports=t}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],159:[function(e,t,n){var r=e("./_baseGetAllKeys"),o=e("./_getSymbols"),i=e("./keys");function a(e){return r(e,i,o)}t.exports=a},{"./_baseGetAllKeys":90,"./_getSymbols":166,"./keys":259}],160:[function(e,t,n){var r=e("./_baseGetAllKeys"),o=e("./_getSymbolsIn"),i=e("./keysIn");function a(e){return r(e,i,o)}t.exports=a},{"./_baseGetAllKeys":90,"./_getSymbolsIn":167,"./keysIn":260}],161:[function(e,t,n){var r=e("./_isKeyable");function o(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}t.exports=o},{"./_isKeyable":184}],162:[function(e,t,n){var r=e("./_isStrictComparable"),o=e("./keys");function i(e){for(var t=o(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,r(a)]}return t}t.exports=i},{"./_isStrictComparable":187,"./keys":259}],163:[function(e,t,n){var r=e("./_baseIsNative"),o=e("./_getValue");function i(e,t){var n=o(e,t);return r(n)?n:void 0}t.exports=i},{"./_baseIsNative":102,"./_getValue":169}],164:[function(e,t,n){var r=e("./_overArg")(Object.getPrototypeOf,Object);t.exports=r},{"./_overArg":206}],165:[function(e,t,n){var r=e("./_Symbol"),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;function u(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}t.exports=u},{"./_Symbol":60}],166:[function(e,t,n){var r=e("./_arrayFilter"),o=e("./stubArray"),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;t.exports=s},{"./_arrayFilter":65,"./stubArray":277}],167:[function(e,t,n){var r=e("./_arrayPush"),o=e("./_getPrototype"),i=e("./_getSymbols"),a=e("./stubArray"),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;t.exports=s},{"./_arrayPush":70,"./_getPrototype":164,"./_getSymbols":166,"./stubArray":277}],168:[function(e,t,n){var r=e("./_DataView"),o=e("./_Map"),i=e("./_Promise"),a=e("./_Set"),s=e("./_WeakMap"),u=e("./_baseGetTag"),c=e("./_toSource"),f="[object Map]",d="[object Object]",h="[object Promise]",l="[object Set]",p="[object WeakMap]",v="[object DataView]",_=c(r),y=c(o),g=c(i),b=c(a),m=c(s),x=u;(r&&x(new r(new ArrayBuffer(1)))!=v||o&&x(new o)!=f||i&&x(i.resolve())!=h||a&&x(new a)!=l||s&&x(new s)!=p)&&(x=function(e){var t=u(e),n=t==d?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case _:return v;case y:return f;case g:return h;case b:return l;case m:return p}return t}),t.exports=x},{"./_DataView":51,"./_Map":54,"./_Promise":56,"./_Set":57,"./_WeakMap":62,"./_baseGetTag":91,"./_toSource":224}],169:[function(e,t,n){function r(e,t){return null==e?void 0:e[t]}t.exports=r},{}],170:[function(e,t,n){var r=e("./_castPath"),o=e("./isArguments"),i=e("./isArray"),a=e("./_isIndex"),s=e("./isLength"),u=e("./_toKey");function c(e,t,n){for(var c=-1,f=(t=r(t,e)).length,d=!1;++c<f;){var h=u(t[c]);if(!(d=null!=e&&n(e,h)))break;e=e[h]}return d||++c!=f?d:!!(f=null==e?0:e.length)&&s(f)&&a(h,f)&&(i(e)||o(e))}t.exports=c},{"./_castPath":133,"./_isIndex":181,"./_toKey":223,"./isArguments":242,"./isArray":243,"./isLength":249}],171:[function(e,t,n){var r=RegExp("[\\\\u200d\\\\ud800-\\\\udfff\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff\\\\ufe0e\\\\ufe0f]");function o(e){return r.test(e)}t.exports=o},{}],172:[function(e,t,n){var r=e("./_nativeCreate");function o(){this.__data__=r?r(null):{},this.size=0}t.exports=o},{"./_nativeCreate":201}],173:[function(e,t,n){function r(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}t.exports=r},{}],174:[function(e,t,n){var r=e("./_nativeCreate"),o="__lodash_hash_undefined__",i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(r){var n=t[e];return n===o?void 0:n}return i.call(t,e)?t[e]:void 0}t.exports=a},{"./_nativeCreate":201}],175:[function(e,t,n){var r=e("./_nativeCreate"),o=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}t.exports=i},{"./_nativeCreate":201}],176:[function(e,t,n){var r=e("./_nativeCreate"),o="__lodash_hash_undefined__";function i(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?o:t,this}t.exports=i},{"./_nativeCreate":201}],177:[function(e,t,n){var r=Object.prototype.hasOwnProperty;function o(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&r.call(e,"index")&&(n.index=e.index,n.input=e.input),n}t.exports=o},{}],178:[function(e,t,n){var r=e("./_cloneArrayBuffer"),o=e("./_cloneDataView"),i=e("./_cloneRegExp"),a=e("./_cloneSymbol"),s=e("./_cloneTypedArray"),u="[object Boolean]",c="[object Date]",f="[object Map]",d="[object Number]",h="[object RegExp]",l="[object Set]",p="[object String]",v="[object Symbol]",_="[object ArrayBuffer]",y="[object DataView]",g="[object Float32Array]",b="[object Float64Array]",m="[object Int8Array]",x="[object Int16Array]",w="[object Int32Array]",E="[object Uint8Array]",j="[object Uint8ClampedArray]",k="[object Uint16Array]",A="[object Uint32Array]";function O(e,t,n){var O=e.constructor;switch(t){case _:return r(e);case u:case c:return new O(+e);case y:return o(e,n);case g:case b:case m:case x:case w:case E:case j:case k:case A:return s(e,n);case f:return new O;case d:case p:return new O(e);case h:return i(e);case l:return new O;case v:return a(e)}}t.exports=O},{"./_cloneArrayBuffer":134,"./_cloneDataView":136,"./_cloneRegExp":137,"./_cloneSymbol":138,"./_cloneTypedArray":139}],179:[function(e,t,n){var r=e("./_baseCreate"),o=e("./_getPrototype"),i=e("./_isPrototype");function a(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}t.exports=a},{"./_baseCreate":81,"./_getPrototype":164,"./_isPrototype":186}],180:[function(e,t,n){var r=e("./_Symbol"),o=e("./isArguments"),i=e("./isArray"),a=r?r.isConcatSpreadable:void 0;function s(e){return i(e)||o(e)||!!(a&&e&&e[a])}t.exports=s},{"./_Symbol":60,"./isArguments":242,"./isArray":243}],181:[function(e,t,n){var r=9007199254740991,o=/^(?:0|[1-9]\\d*)$/;function i(e,t){var n=typeof e;return!!(t=null==t?r:t)&&("number"==n||"symbol"!=n&&o.test(e))&&e>-1&&e%1==0&&e<t}t.exports=i},{}],182:[function(e,t,n){var r=e("./eq"),o=e("./isArrayLike"),i=e("./_isIndex"),a=e("./isObject");function s(e,t,n){if(!a(n))return!1;var s=typeof t;return!!("number"==s?o(n)&&i(t,n.length):"string"==s&&t in n)&&r(n[t],e)}t.exports=s},{"./_isIndex":181,"./eq":231,"./isArrayLike":244,"./isObject":251}],183:[function(e,t,n){var r=e("./isArray"),o=e("./isSymbol"),i=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,a=/^\\w*$/;function s(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||a.test(e)||!i.test(e)||null!=t&&e in Object(t)}t.exports=s},{"./isArray":243,"./isSymbol":256}],184:[function(e,t,n){function r(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}t.exports=r},{}],185:[function(e,t,n){var r,o=e("./_coreJsData"),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";function a(e){return!!i&&i in e}t.exports=a},{"./_coreJsData":146}],186:[function(e,t,n){var r=Object.prototype;function o(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}t.exports=o},{}],187:[function(e,t,n){var r=e("./isObject");function o(e){return e==e&&!r(e)}t.exports=o},{"./isObject":251}],188:[function(e,t,n){function r(){this.__data__=[],this.size=0}t.exports=r},{}],189:[function(e,t,n){var r=e("./_assocIndexOf"),o=Array.prototype.splice;function i(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}t.exports=i},{"./_assocIndexOf":76}],190:[function(e,t,n){var r=e("./_assocIndexOf");function o(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}t.exports=o},{"./_assocIndexOf":76}],191:[function(e,t,n){var r=e("./_assocIndexOf");function o(e){return r(this.__data__,e)>-1}t.exports=o},{"./_assocIndexOf":76}],192:[function(e,t,n){var r=e("./_assocIndexOf");function o(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}t.exports=o},{"./_assocIndexOf":76}],193:[function(e,t,n){var r=e("./_Hash"),o=e("./_ListCache"),i=e("./_Map");function a(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}t.exports=a},{"./_Hash":52,"./_ListCache":53,"./_Map":54}],194:[function(e,t,n){var r=e("./_getMapData");function o(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}t.exports=o},{"./_getMapData":161}],195:[function(e,t,n){var r=e("./_getMapData");function o(e){return r(this,e).get(e)}t.exports=o},{"./_getMapData":161}],196:[function(e,t,n){var r=e("./_getMapData");function o(e){return r(this,e).has(e)}t.exports=o},{"./_getMapData":161}],197:[function(e,t,n){var r=e("./_getMapData");function o(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}t.exports=o},{"./_getMapData":161}],198:[function(e,t,n){function r(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}t.exports=r},{}],199:[function(e,t,n){function r(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}t.exports=r},{}],200:[function(e,t,n){var r=e("./memoize"),o=500;function i(e){var t=r(e,(function(e){return n.size===o&&n.clear(),e})),n=t.cache;return t}t.exports=i},{"./memoize":265}],201:[function(e,t,n){var r=e("./_getNative")(Object,"create");t.exports=r},{"./_getNative":163}],202:[function(e,t,n){var r=e("./_overArg")(Object.keys,Object);t.exports=r},{"./_overArg":206}],203:[function(e,t,n){function r(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}t.exports=r},{}],204:[function(e,t,n){var r=e("./_freeGlobal"),o="object"==typeof n&&n&&!n.nodeType&&n,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o&&r.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();t.exports=s},{"./_freeGlobal":158}],205:[function(e,t,n){var r=Object.prototype.toString;function o(e){return r.call(e)}t.exports=o},{}],206:[function(e,t,n){function r(e,t){return function(n){return e(t(n))}}t.exports=r},{}],207:[function(e,t,n){var r=e("./_apply"),o=Math.max;function i(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),u=Array(s);++a<s;)u[a]=i[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=i[a];return c[t]=n(u),r(e,this,c)}}t.exports=i},{"./_apply":63}],208:[function(e,t,n){var r=e("./_freeGlobal"),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},{"./_freeGlobal":158}],209:[function(e,t,n){function r(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}t.exports=r},{}],210:[function(e,t,n){var r="__lodash_hash_undefined__";function o(e){return this.__data__.set(e,r),this}t.exports=o},{}],211:[function(e,t,n){function r(e){return this.__data__.has(e)}t.exports=r},{}],212:[function(e,t,n){function r(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}t.exports=r},{}],213:[function(e,t,n){var r=e("./_baseSetToString"),o=e("./_shortOut")(r);t.exports=o},{"./_baseSetToString":123,"./_shortOut":214}],214:[function(e,t,n){var r=800,o=16,i=Date.now;function a(e){var t=0,n=0;return function(){var a=i(),s=o-(a-n);if(n=a,s>0){if(++t>=r)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=a},{}],215:[function(e,t,n){var r=e("./_ListCache");function o(){this.__data__=new r,this.size=0}t.exports=o},{"./_ListCache":53}],216:[function(e,t,n){function r(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=r},{}],217:[function(e,t,n){function r(e){return this.__data__.get(e)}t.exports=r},{}],218:[function(e,t,n){function r(e){return this.__data__.has(e)}t.exports=r},{}],219:[function(e,t,n){var r=e("./_ListCache"),o=e("./_Map"),i=e("./_MapCache"),a=200;function s(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!o||s.length<a-1)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(s)}return n.set(e,t),this.size=n.size,this}t.exports=s},{"./_ListCache":53,"./_Map":54,"./_MapCache":55}],220:[function(e,t,n){function r(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}t.exports=r},{}],221:[function(e,t,n){var r=e("./_asciiSize"),o=e("./_hasUnicode"),i=e("./_unicodeSize");function a(e){return o(e)?i(e):r(e)}t.exports=a},{"./_asciiSize":73,"./_hasUnicode":171,"./_unicodeSize":225}],222:[function(e,t,n){var r=e("./_memoizeCapped"),o=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,i=/\\\\(\\\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)})),t}));t.exports=a},{"./_memoizeCapped":200}],223:[function(e,t,n){var r=e("./isSymbol"),o=1/0;function i(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}t.exports=i},{"./isSymbol":256}],224:[function(e,t,n){var r=Function.prototype.toString;function o(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}t.exports=o},{}],225:[function(e,t,n){var r="\\\\ud800-\\\\udfff",o="["+r+"]",i="[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]",a="\\\\ud83c[\\\\udffb-\\\\udfff]",s="[^"+r+"]",u="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",c="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",f="(?:"+i+"|"+a+")?",d="[\\\\ufe0e\\\\ufe0f]?",h=d+f+"(?:\\\\u200d(?:"+[s,u,c].join("|")+")"+d+f+")*",l="(?:"+[s+i+"?",i,u,c,o].join("|")+")",p=RegExp(a+"(?="+a+")|"+l+h,"g");function v(e){for(var t=p.lastIndex=0;p.test(e);)++t;return t}t.exports=v},{}],226:[function(e,t,n){var r=e("./_baseClone"),o=4;function i(e){return r(e,o)}t.exports=i},{"./_baseClone":80}],227:[function(e,t,n){var r=e("./_baseClone"),o=1,i=4;function a(e){return r(e,o|i)}t.exports=a},{"./_baseClone":80}],228:[function(e,t,n){function r(e){return function(){return e}}t.exports=r},{}],229:[function(e,t,n){var r=e("./_baseRest"),o=e("./eq"),i=e("./_isIterateeCall"),a=e("./keysIn"),s=Object.prototype,u=s.hasOwnProperty,c=r((function(e,t){e=Object(e);var n=-1,r=t.length,c=r>2?t[2]:void 0;for(c&&i(t[0],t[1],c)&&(r=1);++n<r;)for(var f=t[n],d=a(f),h=-1,l=d.length;++h<l;){var p=d[h],v=e[p];(void 0===v||o(v,s[p])&&!u.call(e,p))&&(e[p]=f[p])}return e}));t.exports=c},{"./_baseRest":121,"./_isIterateeCall":182,"./eq":231,"./keysIn":260}],230:[function(e,t,n){t.exports=e("./forEach")},{"./forEach":236}],231:[function(e,t,n){function r(e,t){return e===t||e!=e&&t!=t}t.exports=r},{}],232:[function(e,t,n){var r=e("./_arrayFilter"),o=e("./_baseFilter"),i=e("./_baseIteratee"),a=e("./isArray");function s(e,t){return(a(e)?r:o)(e,i(t,3))}t.exports=s},{"./_arrayFilter":65,"./_baseFilter":84,"./_baseIteratee":105,"./isArray":243}],233:[function(e,t,n){var r=e("./_createFind")(e("./findIndex"));t.exports=r},{"./_createFind":150,"./findIndex":234}],234:[function(e,t,n){var r=e("./_baseFindIndex"),o=e("./_baseIteratee"),i=e("./toInteger"),a=Math.max;function s(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var u=null==n?0:i(n);return u<0&&(u=a(s+u,0)),r(e,o(t,3),u)}t.exports=s},{"./_baseFindIndex":85,"./_baseIteratee":105,"./toInteger":280}],235:[function(e,t,n){var r=e("./_baseFlatten");function o(e){return null!=e&&e.length?r(e,1):[]}t.exports=o},{"./_baseFlatten":86}],236:[function(e,t,n){var r=e("./_arrayEach"),o=e("./_baseEach"),i=e("./_castFunction"),a=e("./isArray");function s(e,t){return(a(e)?r:o)(e,i(t))}t.exports=s},{"./_arrayEach":64,"./_baseEach":82,"./_castFunction":132,"./isArray":243}],237:[function(e,t,n){var r=e("./_baseFor"),o=e("./_castFunction"),i=e("./keysIn");function a(e,t){return null==e?e:r(e,o(t),i)}t.exports=a},{"./_baseFor":87,"./_castFunction":132,"./keysIn":260}],238:[function(e,t,n){var r=e("./_baseGet");function o(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}t.exports=o},{"./_baseGet":89}],239:[function(e,t,n){var r=e("./_baseHas"),o=e("./_hasPath");function i(e,t){return null!=e&&o(e,t,r)}t.exports=i},{"./_baseHas":93,"./_hasPath":170}],240:[function(e,t,n){var r=e("./_baseHasIn"),o=e("./_hasPath");function i(e,t){return null!=e&&o(e,t,r)}t.exports=i},{"./_baseHasIn":94,"./_hasPath":170}],241:[function(e,t,n){function r(e){return e}t.exports=r},{}],242:[function(e,t,n){var r=e("./_baseIsArguments"),o=e("./isObjectLike"),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};t.exports=u},{"./_baseIsArguments":96,"./isObjectLike":252}],243:[function(e,t,n){var r=Array.isArray;t.exports=r},{}],244:[function(e,t,n){var r=e("./isFunction"),o=e("./isLength");function i(e){return null!=e&&o(e.length)&&!r(e)}t.exports=i},{"./isFunction":248,"./isLength":249}],245:[function(e,t,n){var r=e("./isArrayLike"),o=e("./isObjectLike");function i(e){return o(e)&&r(e)}t.exports=i},{"./isArrayLike":244,"./isObjectLike":252}],246:[function(e,t,n){var r=e("./_root"),o=e("./stubFalse"),i="object"==typeof n&&n&&!n.nodeType&&n,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===i?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||o;t.exports=u},{"./_root":208,"./stubFalse":278}],247:[function(e,t,n){var r=e("./_baseKeys"),o=e("./_getTag"),i=e("./isArguments"),a=e("./isArray"),s=e("./isArrayLike"),u=e("./isBuffer"),c=e("./_isPrototype"),f=e("./isTypedArray"),d="[object Map]",h="[object Set]",l=Object.prototype.hasOwnProperty;function p(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||f(e)||i(e)))return!e.length;var t=o(e);if(t==d||t==h)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(l.call(e,n))return!1;return!0}t.exports=p},{"./_baseKeys":106,"./_getTag":168,"./_isPrototype":186,"./isArguments":242,"./isArray":243,"./isArrayLike":244,"./isBuffer":246,"./isTypedArray":257}],248:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./isObject"),i="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",u="[object Proxy]";function c(e){if(!o(e))return!1;var t=r(e);return t==a||t==s||t==i||t==u}t.exports=c},{"./_baseGetTag":91,"./isObject":251}],249:[function(e,t,n){var r=9007199254740991;function o(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}t.exports=o},{}],250:[function(e,t,n){var r=e("./_baseIsMap"),o=e("./_baseUnary"),i=e("./_nodeUtil"),a=i&&i.isMap,s=a?o(a):r;t.exports=s},{"./_baseIsMap":99,"./_baseUnary":127,"./_nodeUtil":204}],251:[function(e,t,n){function r(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}t.exports=r},{}],252:[function(e,t,n){function r(e){return null!=e&&"object"==typeof e}t.exports=r},{}],253:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./_getPrototype"),i=e("./isObjectLike"),a="[object Object]",s=Function.prototype,u=Object.prototype,c=s.toString,f=u.hasOwnProperty,d=c.call(Object);function h(e){if(!i(e)||r(e)!=a)return!1;var t=o(e);if(null===t)return!0;var n=f.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==d}t.exports=h},{"./_baseGetTag":91,"./_getPrototype":164,"./isObjectLike":252}],254:[function(e,t,n){var r=e("./_baseIsSet"),o=e("./_baseUnary"),i=e("./_nodeUtil"),a=i&&i.isSet,s=a?o(a):r;t.exports=s},{"./_baseIsSet":103,"./_baseUnary":127,"./_nodeUtil":204}],255:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./isArray"),i=e("./isObjectLike"),a="[object String]";function s(e){return"string"==typeof e||!o(e)&&i(e)&&r(e)==a}t.exports=s},{"./_baseGetTag":91,"./isArray":243,"./isObjectLike":252}],256:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./isObjectLike"),i="[object Symbol]";function a(e){return"symbol"==typeof e||o(e)&&r(e)==i}t.exports=a},{"./_baseGetTag":91,"./isObjectLike":252}],257:[function(e,t,n){var r=e("./_baseIsTypedArray"),o=e("./_baseUnary"),i=e("./_nodeUtil"),a=i&&i.isTypedArray,s=a?o(a):r;t.exports=s},{"./_baseIsTypedArray":104,"./_baseUnary":127,"./_nodeUtil":204}],258:[function(e,t,n){function r(e){return void 0===e}t.exports=r},{}],259:[function(e,t,n){var r=e("./_arrayLikeKeys"),o=e("./_baseKeys"),i=e("./isArrayLike");function a(e){return i(e)?r(e):o(e)}t.exports=a},{"./_arrayLikeKeys":68,"./_baseKeys":106,"./isArrayLike":244}],260:[function(e,t,n){var r=e("./_arrayLikeKeys"),o=e("./_baseKeysIn"),i=e("./isArrayLike");function a(e){return i(e)?r(e,!0):o(e)}t.exports=a},{"./_arrayLikeKeys":68,"./_baseKeysIn":107,"./isArrayLike":244}],261:[function(e,t,n){function r(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}t.exports=r},{}],262:[function(e,t,n){var r=e("./_arrayMap"),o=e("./_baseIteratee"),i=e("./_baseMap"),a=e("./isArray");function s(e,t){return(a(e)?r:i)(e,o(t,3))}t.exports=s},{"./_arrayMap":69,"./_baseIteratee":105,"./_baseMap":109,"./isArray":243}],263:[function(e,t,n){var r=e("./_baseAssignValue"),o=e("./_baseForOwn"),i=e("./_baseIteratee");function a(e,t){var n={};return t=i(t,3),o(e,(function(e,o,i){r(n,o,t(e,o,i))})),n}t.exports=a},{"./_baseAssignValue":79,"./_baseForOwn":88,"./_baseIteratee":105}],264:[function(e,t,n){var r=e("./_baseExtremum"),o=e("./_baseGt"),i=e("./identity");function a(e){return e&&e.length?r(e,i,o):void 0}t.exports=a},{"./_baseExtremum":83,"./_baseGt":92,"./identity":241}],265:[function(e,t,n){var r=e("./_MapCache"),o="Expected a function";function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(o);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},{"./_MapCache":55}],266:[function(e,t,n){var r=e("./_baseMerge"),o=e("./_createAssigner")((function(e,t,n){r(e,t,n)}));t.exports=o},{"./_baseMerge":112,"./_createAssigner":147}],267:[function(e,t,n){var r=e("./_baseExtremum"),o=e("./_baseLt"),i=e("./identity");function a(e){return e&&e.length?r(e,i,o):void 0}t.exports=a},{"./_baseExtremum":83,"./_baseLt":108,"./identity":241}],268:[function(e,t,n){var r=e("./_baseExtremum"),o=e("./_baseIteratee"),i=e("./_baseLt");function a(e,t){return e&&e.length?r(e,o(t,2),i):void 0}t.exports=a},{"./_baseExtremum":83,"./_baseIteratee":105,"./_baseLt":108}],269:[function(e,t,n){function r(){}t.exports=r},{}],270:[function(e,t,n){var r=e("./_root"),o=function(){return r.Date.now()};t.exports=o},{"./_root":208}],271:[function(e,t,n){var r=e("./_basePick"),o=e("./_flatRest")((function(e,t){return null==e?{}:r(e,t)}));t.exports=o},{"./_basePick":115,"./_flatRest":157}],272:[function(e,t,n){var r=e("./_baseProperty"),o=e("./_basePropertyDeep"),i=e("./_isKey"),a=e("./_toKey");function s(e){return i(e)?r(a(e)):o(e)}t.exports=s},{"./_baseProperty":117,"./_basePropertyDeep":118,"./_isKey":183,"./_toKey":223}],273:[function(e,t,n){var r=e("./_createRange")();t.exports=r},{"./_createRange":151}],274:[function(e,t,n){var r=e("./_arrayReduce"),o=e("./_baseEach"),i=e("./_baseIteratee"),a=e("./_baseReduce"),s=e("./isArray");function u(e,t,n){var u=s(e)?r:a,c=arguments.length<3;return u(e,i(t,4),n,c,o)}t.exports=u},{"./_arrayReduce":71,"./_baseEach":82,"./_baseIteratee":105,"./_baseReduce":120,"./isArray":243}],275:[function(e,t,n){var r=e("./_baseKeys"),o=e("./_getTag"),i=e("./isArrayLike"),a=e("./isString"),s=e("./_stringSize"),u="[object Map]",c="[object Set]";function f(e){if(null==e)return 0;if(i(e))return a(e)?s(e):e.length;var t=o(e);return t==u||t==c?e.size:r(e).length}t.exports=f},{"./_baseKeys":106,"./_getTag":168,"./_stringSize":221,"./isArrayLike":244,"./isString":255}],276:[function(e,t,n){var r=e("./_baseFlatten"),o=e("./_baseOrderBy"),i=e("./_baseRest"),a=e("./_isIterateeCall"),s=i((function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),o(e,r(t,1),[])}));t.exports=s},{"./_baseFlatten":86,"./_baseOrderBy":114,"./_baseRest":121,"./_isIterateeCall":182}],277:[function(e,t,n){function r(){return[]}t.exports=r},{}],278:[function(e,t,n){function r(){return!1}t.exports=r},{}],279:[function(e,t,n){var r=e("./toNumber"),o=1/0,i=17976931348623157e292;function a(e){return e?(e=r(e))===o||e===-o?(e<0?-1:1)*i:e==e?e:0:0===e?e:0}t.exports=a},{"./toNumber":281}],280:[function(e,t,n){var r=e("./toFinite");function o(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}t.exports=o},{"./toFinite":279}],281:[function(e,t,n){var r=e("./isObject"),o=e("./isSymbol"),i=NaN,a=/^\\s+|\\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,f=parseInt;function d(e){if("number"==typeof e)return e;if(o(e))return i;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var n=u.test(e);return n||c.test(e)?f(e.slice(2),n?2:8):s.test(e)?i:+e}t.exports=d},{"./isObject":251,"./isSymbol":256}],282:[function(e,t,n){var r=e("./_copyObject"),o=e("./keysIn");function i(e){return r(e,o(e))}t.exports=i},{"./_copyObject":143,"./keysIn":260}],283:[function(e,t,n){var r=e("./_baseToString");function o(e){return null==e?"":r(e)}t.exports=o},{"./_baseToString":126}],284:[function(e,t,n){var r=e("./_arrayEach"),o=e("./_baseCreate"),i=e("./_baseForOwn"),a=e("./_baseIteratee"),s=e("./_getPrototype"),u=e("./isArray"),c=e("./isBuffer"),f=e("./isFunction"),d=e("./isObject"),h=e("./isTypedArray");function l(e,t,n){var l=u(e),p=l||c(e)||h(e);if(t=a(t,4),null==n){var v=e&&e.constructor;n=p?l?new v:[]:d(e)&&f(v)?o(s(e)):{}}return(p?r:i)(e,(function(e,r,o){return t(n,e,r,o)})),n}t.exports=l},{"./_arrayEach":64,"./_baseCreate":81,"./_baseForOwn":88,"./_baseIteratee":105,"./_getPrototype":164,"./isArray":243,"./isBuffer":246,"./isFunction":248,"./isObject":251,"./isTypedArray":257}],285:[function(e,t,n){var r=e("./_baseFlatten"),o=e("./_baseRest"),i=e("./_baseUniq"),a=e("./isArrayLikeObject"),s=o((function(e){return i(r(e,1,a,!0))}));t.exports=s},{"./_baseFlatten":86,"./_baseRest":121,"./_baseUniq":128,"./isArrayLikeObject":245}],286:[function(e,t,n){var r=e("./toString"),o=0;function i(e){var t=++o;return r(e)+t}t.exports=i},{"./toString":283}],287:[function(e,t,n){var r=e("./_baseValues"),o=e("./keys");function i(e){return null==e?[]:r(e,o(e))}t.exports=i},{"./_baseValues":129,"./keys":259}],288:[function(e,t,n){var r=e("./_assignValue"),o=e("./_baseZipObject");function i(e,t){return o(e||[],t||[],r)}t.exports=i},{"./_assignValue":75,"./_baseZipObject":130}]},{},[1])(1);var r={exports:{}};\n/*!\n\t * @overview es6-promise - a tiny implementation of Promises/A+.\n\t * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n\t * @license Licensed under MIT license\n\t * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n\t * @version v4.2.8+1e68dce6\n\t */function o(e,t){var r=e.subgraphs,o=e.nodes,i=e.links,a=e.hierarchy,s=new n.exports.graphlib.Graph({multigraph:!0,compound:!0,directed:!1!==t.digraph}).setGraph(t).setDefaultNodeLabel((function(){return{}})).setDefaultEdgeLabel((function(){return{}}));r.forEach((function(e){s.setNode(e.id,e)})),o.forEach((function(e){s.setNode(e.id,e)})),i.forEach((function(e){s.setEdge(e.source.id,e.target.id,e,e.id)})),a.forEach((function(e){s.setParent(e.child,e.parent)})),n.exports.layout(s,{debugTiming:!1});var u=-s.graph().width/2||0,c=-s.graph().height/2;return s.nodes().forEach((function(e){var t=s.node(e);t.x+=u,t.y+=c})),s.edges().forEach((function(e){var t=s.edge(e);t.points=t.points.map((function(e){return[e.x+u,e.y+c]}))})),{subgraphs:r,nodes:o,links:i}}!function(t,n){t.exports=function(){function t(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function n(e){return"function"==typeof e}var r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=0,i=void 0,a=void 0,s=function(e,t){m[o]=e,m[o+1]=t,2===(o+=2)&&(a?a(x):E())};function u(e){a=e}function c(e){s=e}var f="undefined"!=typeof window?window:void 0,d=f||{},h=d.MutationObserver||d.WebKitMutationObserver,l="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function v(){return function(){return process.nextTick(x)}}function _(){return void 0!==i?function(){i(x)}:b()}function y(){var e=0,t=new h(x),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function g(){var e=new MessageChannel;return e.port1.onmessage=x,function(){return e.port2.postMessage(0)}}function b(){var e=setTimeout;return function(){return e(x,1)}}var m=new Array(1e3);function x(){for(var e=0;e<o;e+=2)(0,m[e])(m[e+1]),m[e]=void 0,m[e+1]=void 0;o=0}function w(){try{var e=Function("return this")().require("vertx");return i=e.runOnLoop||e.runOnContext,_()}catch(e){return b()}}var E=void 0;function j(e,t){var n=this,r=new this.constructor(O);void 0===r[A]&&Y(r);var o=n._state;if(o){var i=arguments[o-1];s((function(){return V(o,r,i,n._result)}))}else U(n,r,e,t);return r}function k(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(O);return D(n,e),n}E=l?v():h?y():p?g():void 0===f?w():b();var A=Math.random().toString(36).substring(2);function O(){}var I=void 0,S=1,C=2;function N(){return new TypeError("You cannot resolve a promise with itself")}function T(){return new TypeError("A promises callback cannot return that same promise.")}function M(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}function L(e,t,n){s((function(e){var r=!1,o=M(n,t,(function(n){r||(r=!0,t!==n?D(e,n):G(e,n))}),(function(t){r||(r=!0,R(e,t))}),"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,R(e,o))}),e)}function P(e,t){t._state===S?G(e,t._result):t._state===C?R(e,t._result):U(t,void 0,(function(t){return D(e,t)}),(function(t){return R(e,t)}))}function F(e,t,r){t.constructor===e.constructor&&r===j&&t.constructor.resolve===k?P(e,t):void 0===r?G(e,t):n(r)?L(e,t,r):G(e,t)}function D(e,n){if(e===n)R(e,N());else if(t(n)){var r=void 0;try{r=n.then}catch(t){return void R(e,t)}F(e,n,r)}else G(e,n)}function B(e){e._onerror&&e._onerror(e._result),z(e)}function G(e,t){e._state===I&&(e._result=t,e._state=S,0!==e._subscribers.length&&s(z,e))}function R(e,t){e._state===I&&(e._state=C,e._result=t,s(B,e))}function U(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+S]=n,o[i+C]=r,0===i&&e._state&&s(z,e)}function z(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,o=void 0,i=e._result,a=0;a<t.length;a+=3)r=t[a],o=t[a+n],r?V(n,r,o,i):o(i);e._subscribers.length=0}}function V(e,t,r,o){var i=n(r),a=void 0,s=void 0,u=!0;if(i){try{a=r(o)}catch(e){u=!1,s=e}if(t===a)return void R(t,T())}else a=o;t._state!==I||(i&&u?D(t,a):!1===u?R(t,s):e===S?G(t,a):e===C&&R(t,a))}function q(e,t){try{t((function(t){D(e,t)}),(function(t){R(e,t)}))}catch(t){R(e,t)}}var K=0;function H(){return K++}function Y(e){e[A]=K++,e._state=void 0,e._result=void 0,e._subscribers=[]}function $(){return new Error("Array Methods must be provided an Array")}var W=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(O),this.promise[A]||Y(this.promise),r(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?G(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&G(this.promise,this._result))):R(this.promise,$())}return e.prototype._enumerate=function(e){for(var t=0;this._state===I&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===k){var o=void 0,i=void 0,a=!1;try{o=e.then}catch(e){a=!0,i=e}if(o===j&&e._state!==I)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===te){var s=new n(O);a?R(s,i):F(s,e,o),this._willSettleAt(s,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},e.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===I&&(this._remaining--,e===C?R(r,n):this._result[t]=n),0===this._remaining&&G(r,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;U(e,void 0,(function(e){return n._settledAt(S,t,e)}),(function(e){return n._settledAt(C,t,e)}))},e}();function J(e){return new W(this,e).promise}function X(e){var t=this;return r(e)?new t((function(n,r){for(var o=e.length,i=0;i<o;i++)t.resolve(e[i]).then(n,r)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))}function Z(e){var t=new this(O);return R(t,e),t}function Q(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function ee(){throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.")}var te=function(){function e(t){this[A]=H(),this._result=this._state=void 0,this._subscribers=[],O!==t&&("function"!=typeof t&&Q(),this instanceof e?q(this,t):ee())}return e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(e){var t=this,r=t.constructor;return n(e)?t.then((function(t){return r.resolve(e()).then((function(){return t}))}),(function(t){return r.resolve(e()).then((function(){throw t}))})):t.then(e,e)},e}();function ne(){var t=void 0;if(void 0!==e)t=e;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=te}return te.prototype.then=j,te.all=J,te.race=X,te.resolve=k,te.reject=Z,te._setScheduler=u,te._setAsap=c,te._asap=s,te.polyfill=ne,te.Promise=te,te}()}(r),r.exports.polyfill(),self.onmessage=function(e){var t=o.apply(void 0,e.data);self.postMessage(t)}}();'],{type:"application/javascript"}),n=URL.createObjectURL(r),o=new Worker(n);return{terminate:function(){return o.terminate()},response:new Promise((function(r){o.onmessage=function(e){r(e.data),o.terminate(),URL.revokeObjectURL(n)},o.postMessage([e,t])}))}}({subgraphs:n.allSubgraphs().map((function(e){return u(u({},e.props),{id:Y_(e.id)})})),nodes:n.allVertices().map((function(e){delete e.fx,delete e.fy;var t=e.element.node().getBBox();return u({width:t.width,height:t.height},e.props)})),links:n.allEdges().map((function(e){return e.props})),hierarchy:l(l([],n.allSubgraphs().filter((function(e){return!!n.subgraphParent(e.id)})).map((function(e){return{parent:Y_(n.subgraphParent(e.id).props.id),child:Y_(e.id)}})),!0),n.allVertices().filter((function(e){return void 0!==n.vertexParent(e.id)})).map((function(e){return{parent:Y_(n.vertexParent(e.id).props.id),child:e.id}})),!0)},this._options).response.then((function(e){return t.running()&&(e.subgraphs.forEach((function(e){var t=n.subgraph(e.id.substring(8));t.x=e.x+r.width/2,t.y=e.y+r.height/2,t.props.width=e.width,t.props.height=e.height})),e.nodes.forEach((function(e){var t=n.vertex(e.id);t.x=e.x+r.width/2,t.y=e.y+r.height/2})),e.links.forEach((function(e){var t=n.edge(e.id),o=R_(t.source.x,t.source.y,e.points[0][0]+r.width/2,e.points[0][1]+r.height/2),i=R_(t.target.x,t.target.y,e.points[0][0]+r.width/2,e.points[0][1]+r.height/2);t.points=l(l([o<i?[t.source.x,t.source.y]:[t.target.x,t.target.y]],e.points.map((function(e){return[e[0]+r.width/2,e[1]+r.height/2]})),!0),[o<i?[t.target.x,t.target.y]:[t.source.x,t.source.y]],!1)})),t._graph.moveVertices(!0).moveSubgraphs(!0).moveEdges(!0),t.stop()),t}))},t.prototype.edgePath=function(t,r){var n=this,o=[],i=!1;return t.points&&(o=t.points.map((function(e){var t=n._graph.project(e[0],!1),r=n._graph.project(e[1],!1);return(isNaN(t)||isNaN(r))&&(i=!0),[t,r]}))),i||o.length<2?e.prototype.edgePath.call(this,t,r):{path:L_(o),labelPos:this.center(o)}},t}(P_),z_=function(e){function t(t,r){var n=e.call(this,t)||this;return n._options=r,n}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=t._graph.size(),r=t._graph.graphData(),n=r.allVertices(),o=r.allEdges();o.forEach((function(e){return delete e.points})),t._links=Ny(o).id((function(e){return e.id})).distance(t._options.linkDistance).strength(t._options.linkStrength),t._charge=o_().strength(t._options.repulsionStrength).distanceMin(t._options.distanceMin).distanceMax(t._options.distanceMax),t._center=Ey(e.width/2,e.height/2);var i=function(e){var t,r,n,o=ky(.1);function i(e){for(var o,i=0,a=t.length;i<a;++i)(o=t[i]).vx+=(n[i]-o.x)*r[i]*e}function a(){if(t){var i,a=t.length;for(r=new Array(a),n=new Array(a),i=0;i<a;++i)r[i]=isNaN(n[i]=+e(t[i],i,t))?0:+o(t[i],i,t)}}return"function"!=typeof e&&(e=ky(null==e?0:+e)),i.initialize=function(e){t=e,a()},i.strength=function(e){return arguments.length?(o="function"==typeof e?e:ky(+e),a(),i):o},i.x=function(t){return arguments.length?(e="function"==typeof t?t:ky(+t),a(),i):e},i}().strength(t._options.forceStrength),a=function(e){var t,r,n,o=ky(.1);function i(e){for(var o,i=0,a=t.length;i<a;++i)(o=t[i]).vy+=(n[i]-o.y)*r[i]*e}function a(){if(t){var i,a=t.length;for(r=new Array(a),n=new Array(a),i=0;i<a;++i)r[i]=isNaN(n[i]=+e(t[i],i,t))?0:+o(t[i],i,t)}}return"function"!=typeof e&&(e=ky(null==e?0:+e)),i.initialize=function(e){t=e,a()},i.strength=function(e){return arguments.length?(o="function"==typeof e?e:ky(+e),a(),i):o},i.y=function(t){return arguments.length?(e="function"==typeof t?t:ky(+t),a(),i):e},i}().strength(t._options.forceStrength);return t._simulation=n_(n.map((function(r){var n=r.element.node().getBBox(),o=n.width,i=n.height;return r.fx=t._options.pinCentroid&&r.centroid?e.width/2:void 0,r.fy=t._options.pinCentroid&&r.centroid?e.height/2:void 0,r.width=o,r.height=i,r}))).force("link",t._links).force("charge",t._charge).force("center",t._center).force("x",i).force("y",a).alpha(t._options.alpha/2).alphaMin(t._options.alphaMin).alphaDecay(t._options.alphaDecay).velocityDecay(t._options.velocityDecay).stop(),t}))},t.prototype.stop=function(){return this._simulation.stop(),e.prototype.stop.call(this)},t}(P_),V_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){return t._simulation.tick(t._options.iterations),t.stop(),t._graph.moveVertices(!1).moveEdges(!1),t}))},t}(z_),G_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){return new Promise((function(e){t._simulation.on("tick",(function(){t._graph.moveVertices(!1).moveEdges(!1),t._graph.progress("layout-tick")})).on("end",(function(){t._running=!1,e(t)})).restart()}))}))},t}(z_);function H_(e,t){var r=new Blob(['!function(){"use strict";\n/*! *****************************************************************************\n Copyright (c) Microsoft Corporation.\n\n Permission to use, copy, modify, and/or distribute this software for any\n purpose with or without fee is hereby granted.\n\n THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n PERFORMANCE OF THIS SOFTWARE.\n ***************************************************************************** */function r(r,e,t){if(t||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return r.concat(n||Array.prototype.slice.call(e))}function e(r,e){return e.forEach((function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach((function(t){if("default"!==t&&!(t in r)){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}}))})),Object.freeze(r)}var t,n,o,i={exports:{}};t=i,n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,o=function(r){var e,t,o=void 0!==(r=r||{})?r:{};o.ready=new Promise((function(r,n){e=r,t=n}));var i,a,s=Object.assign({},o),u="./this.program",c="";"undefined"!=typeof document&&document.currentScript&&(c=document.currentScript.src),n&&(c=n),c=0!==c.indexOf("blob:")?c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1):"",i=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},a=(r,e,t)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)};var l,d,f=o.print||console.log.bind(console),p=o.printErr||console.warn.bind(console);Object.assign(o,s),s=null,o.arguments,o.thisProgram&&(u=o.thisProgram),o.quit,o.wasmBinary&&(l=o.wasmBinary),o.noExitRuntime,"object"!=typeof WebAssembly&&L("no native wasm support detected");var h=!1;function m(r,e){r||L(e)}var v,w,_,y,E,g,b="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function k(r,e,t){for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.subarray&&b)return b.decode(r.subarray(e,o));for(var i="";e<o;){var a=r[e++];if(128&a){var s=63&r[e++];if(192!=(224&a)){var u=63&r[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&r[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function D(r,e){return r?k(_,r,e):""}function S(r,e,t,n){if(!(n>0))return 0;for(var o=t,i=t+n-1,a=0;a<r.length;++a){var s=r.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&r.charCodeAt(++a)),s<=127){if(t>=i)break;e[t++]=s}else if(s<=2047){if(t+1>=i)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=i)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=i)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o}function A(r){for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++t)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function P(r){v=r,o.HEAP8=w=new Int8Array(r),o.HEAP16=new Int16Array(r),o.HEAP32=y=new Int32Array(r),o.HEAPU8=_=new Uint8Array(r),o.HEAPU16=new Uint16Array(r),o.HEAPU32=new Uint32Array(r),o.HEAPF32=new Float32Array(r),o.HEAPF64=E=new Float64Array(r)}o.INITIAL_MEMORY;var x,F,M,R,C=[],j=[],z=[],T=0,B=null;function N(r){T++,o.monitorRunDependencies&&o.monitorRunDependencies(T)}function O(r){if(T--,o.monitorRunDependencies&&o.monitorRunDependencies(T),0==T&&B){var e=B;B=null,e()}}function L(r){o.onAbort&&o.onAbort(r),p(r="Aborted("+r+")"),h=!0,r+=". Build with -s ASSERTIONS=1 for more info.";var e=new WebAssembly.RuntimeError(r);throw t(e),e}function I(r){return r.startsWith("data:application/octet-stream;base64,")}function U(r){try{if(r==x&&l)return new Uint8Array(l);throw"both async and sync fetching of the wasm failed"}catch(r){L(r)}}o.preloadedImages={},o.preloadedAudios={},I(x="expatlib.wasm")||(F=x,x=o.locateFile?o.locateFile(F,c):c+F);var H={11678:function(r){var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty("startElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::startElement.";e.startElement()},11896:function(r){var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty("endElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::endElement.";e.endElement()},12108:function(r){var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty("characterData"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::characterData.";e.characterData()}};function G(r){for(;r.length>0;){var e=r.shift();if("function"!=typeof e){var t=e.func;"number"==typeof t?void 0===e.arg?q(t)():q(t)(e.arg):t(void 0===e.arg?null:e.arg)}else e(o)}}function q(r){return g.get(r)}var W={splitPath:function(r){return/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/.exec(r).slice(1)},normalizeArray:function(r,e){for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:function(r){var e="/"===r.charAt(0),t="/"===r.substr(-1);return(r=W.normalizeArray(r.split("/").filter((function(r){return!!r})),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:function(r){var e=W.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:function(r){if("/"===r)return"/";var e=(r=(r=W.normalize(r)).replace(/\\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},extname:function(r){return W.splitPath(r)[3]},join:function(){var r=Array.prototype.slice.call(arguments,0);return W.normalize(r.join("/"))},join2:function(r,e){return W.normalize(r+"/"+e)}},V={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:Y.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e="/"===n.charAt(0)}return(e?"/":"")+(r=W.normalizeArray(r.split("/").filter((function(r){return!!r})),!e).join("/"))||"."},relative:function(r,e){function t(r){for(var e=0;e<r.length&&""===r[e];e++);for(var t=r.length-1;t>=0&&""===r[t];t--);return e>t?[]:r.slice(e,t-e+1)}r=V.resolve(r).substr(1),e=V.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(a))).join("/")}},J={ttys:[],init:function(){},shutdown:function(){},register:function(r,e){J.ttys[r]={input:[],output:[],ops:e},Y.registerDevice(r,J.stream_ops)},stream_ops:{open:function(r){var e=J.ttys[r.node.rdev];if(!e)throw new Y.ErrnoError(43);r.tty=e,r.seekable=!1},close:function(r){r.tty.ops.flush(r.tty)},flush:function(r){r.tty.ops.flush(r.tty)},read:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new Y.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(r){throw new Y.ErrnoError(29)}if(void 0===s&&0===i)throw new Y.ErrnoError(6);if(null==s)break;i++,e[t+a]=s}return i&&(r.node.timestamp=Date.now()),i},write:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new Y.ErrnoError(60);try{for(var i=0;i<n;i++)r.tty.ops.put_char(r.tty,e[t+i])}catch(r){throw new Y.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(r){if(!r.input.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\\n"),!e)return null;r.input=or(e,!0)}return r.input.shift()},put_char:function(r,e){null===e||10===e?(f(k(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(f(k(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,e){null===e||10===e?(p(k(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(p(k(r.output,0)),r.output=[])}}},X={ops_table:null,mount:function(r){return X.createNode(null,"/",16895,0)},createNode:function(r,e,t,n){if(Y.isBlkdev(t)||Y.isFIFO(t))throw new Y.ErrnoError(63);X.ops_table||(X.ops_table={dir:{node:{getattr:X.node_ops.getattr,setattr:X.node_ops.setattr,lookup:X.node_ops.lookup,mknod:X.node_ops.mknod,rename:X.node_ops.rename,unlink:X.node_ops.unlink,rmdir:X.node_ops.rmdir,readdir:X.node_ops.readdir,symlink:X.node_ops.symlink},stream:{llseek:X.stream_ops.llseek}},file:{node:{getattr:X.node_ops.getattr,setattr:X.node_ops.setattr},stream:{llseek:X.stream_ops.llseek,read:X.stream_ops.read,write:X.stream_ops.write,allocate:X.stream_ops.allocate,mmap:X.stream_ops.mmap,msync:X.stream_ops.msync}},link:{node:{getattr:X.node_ops.getattr,setattr:X.node_ops.setattr,readlink:X.node_ops.readlink},stream:{}},chrdev:{node:{getattr:X.node_ops.getattr,setattr:X.node_ops.setattr},stream:Y.chrdev_stream_ops}});var o=Y.createNode(r,e,t,n);return Y.isDir(o.mode)?(o.node_ops=X.ops_table.dir.node,o.stream_ops=X.ops_table.dir.stream,o.contents={}):Y.isFile(o.mode)?(o.node_ops=X.ops_table.file.node,o.stream_ops=X.ops_table.file.stream,o.usedBytes=0,o.contents=null):Y.isLink(o.mode)?(o.node_ops=X.ops_table.link.node,o.stream_ops=X.ops_table.link.stream):Y.isChrdev(o.mode)&&(o.node_ops=X.ops_table.chrdev.node,o.stream_ops=X.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){e=Math.max(e,t*(t<1048576?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var n=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr:function(r){var e={};return e.dev=Y.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,Y.isDir(r.mode)?e.size=4096:Y.isFile(r.mode)?e.size=r.usedBytes:Y.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&X.resizeFileStorage(r,e.size)},lookup:function(r,e){throw Y.genericErrors[44]},mknod:function(r,e,t,n){return X.createNode(r,e,t,n)},rename:function(r,e,t){if(Y.isDir(r.mode)){var n;try{n=Y.lookupNode(e,t)}catch(r){}if(n)for(var o in n.contents)throw new Y.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e},unlink:function(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir:function(r,e){var t=Y.lookupNode(r,e);for(var n in t.contents)throw new Y.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir:function(r){var e=[".",".."];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink:function(r,e,t){var n=X.createNode(r,e,41471,0);return n.link=t,n},readlink:function(r){if(!Y.isLink(r.mode))throw new Y.ErrnoError(28);return r.link}},stream_ops:{read:function(r,e,t,n,o){var i=r.node.contents;if(o>=r.node.usedBytes)return 0;var a=Math.min(r.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),t);else for(var s=0;s<a;s++)e[t+s]=i[o+s];return a},write:function(r,e,t,n,o,i){if(e.buffer===w.buffer&&(i=!1),!n)return 0;var a=r.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(t,t+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(t,t+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(t,t+n),o),n}if(X.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[t+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&Y.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new Y.ErrnoError(28);return n},allocate:function(r,e,t){X.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap:function(r,e,t,n,o,i){if(0!==e)throw new Y.ErrnoError(28);if(!Y.isFile(r.node.mode))throw new Y.ErrnoError(43);var a,s,u=r.node.contents;if(2&i||u.buffer!==v){if((n>0||n+t<u.length)&&(u=u.subarray?u.subarray(n,n+t):Array.prototype.slice.call(u,n,n+t)),s=!0,!(a=void L()))throw new Y.ErrnoError(48);w.set(u,a)}else s=!1,a=u.byteOffset;return{ptr:a,allocated:s}},msync:function(r,e,t,n,o){if(!Y.isFile(r.node.mode))throw new Y.ErrnoError(43);return 2&o||X.stream_ops.write(r,e,0,n,t,!1),0}}},Y={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,e={})=>{if(!(r=V.resolve(Y.cwd(),r)))return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};for(var n in t)void 0===e[n]&&(e[n]=t[n]);if(e.recurse_count>8)throw new Y.ErrnoError(32);for(var o=W.normalizeArray(r.split("/").filter((r=>!!r)),!1),i=Y.root,a="/",s=0;s<o.length;s++){var u=s===o.length-1;if(u&&e.parent)break;if(i=Y.lookupNode(i,o[s]),a=W.join2(a,o[s]),Y.isMountpoint(i)&&(!u||u&&e.follow_mount)&&(i=i.mounted.root),!u||e.follow)for(var c=0;Y.isLink(i.mode);){var l=Y.readlink(a);if(a=V.resolve(W.dirname(a),l),i=Y.lookupPath(a,{recurse_count:e.recurse_count}).node,c++>40)throw new Y.ErrnoError(32)}}return{path:a,node:i}},getPath:r=>{for(var e;;){if(Y.isRoot(r)){var t=r.mount.mountpoint;return e?"/"!==t[t.length-1]?t+"/"+e:t+e:t}e=e?r.name+"/"+e:r.name,r=r.parent}},hashName:(r,e)=>{for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%Y.nameTable.length},hashAddNode:r=>{var e=Y.hashName(r.parent.id,r.name);r.name_next=Y.nameTable[e],Y.nameTable[e]=r},hashRemoveNode:r=>{var e=Y.hashName(r.parent.id,r.name);if(Y.nameTable[e]===r)Y.nameTable[e]=r.name_next;else for(var t=Y.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode:(r,e)=>{var t=Y.mayLookup(r);if(t)throw new Y.ErrnoError(t,r);for(var n=Y.hashName(r.id,e),o=Y.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===r.id&&i===e)return o}return Y.lookup(r,e)},createNode:(r,e,t,n)=>{var o=new Y.FSNode(r,e,t,n);return Y.hashAddNode(o),o},destroyNode:r=>{Y.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>49152==(49152&r),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var e=Y.flagModes[r];if(void 0===e)throw new Error("Unknown file open mode: "+r);return e},flagsToPermissionString:r=>{var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>Y.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2,mayLookup:r=>{var e=Y.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate:(r,e)=>{try{return Y.lookupNode(r,e),20}catch(r){}return Y.nodePermissions(r,"wx")},mayDelete:(r,e,t)=>{var n;try{n=Y.lookupNode(r,e)}catch(r){return r.errno}var o=Y.nodePermissions(r,"wx");if(o)return o;if(t){if(!Y.isDir(n.mode))return 54;if(Y.isRoot(n)||Y.getPath(n)===Y.cwd())return 10}else if(Y.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?Y.isLink(r.mode)?32:Y.isDir(r.mode)&&("r"!==Y.flagsToPermissionString(e)||512&e)?31:Y.nodePermissions(r,Y.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,e=Y.MAX_OPEN_FDS)=>{for(var t=r;t<=e;t++)if(!Y.streams[t])return t;throw new Y.ErrnoError(33)},getStream:r=>Y.streams[r],createStream:(r,e,t)=>{Y.FSStream||(Y.FSStream=function(){},Y.FSStream.prototype={object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}}),r=Object.assign(new Y.FSStream,r);var n=Y.nextfd(e,t);return r.fd=n,Y.streams[n]=r,r},closeStream:r=>{Y.streams[r]=null},chrdev_stream_ops:{open:r=>{var e=Y.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new Y.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice:(r,e)=>{Y.devices[r]={stream_ops:e}},getDevice:r=>Y.devices[r],getMounts:r=>{for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs:(r,e)=>{"function"==typeof r&&(e=r,r=!1),Y.syncFSRequests++,Y.syncFSRequests>1&&p("warning: "+Y.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=Y.getMounts(Y.root.mount),n=0;function o(r){return Y.syncFSRequests--,e(r)}function i(r){if(r)return i.errored?void 0:(i.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return i(null);e.type.syncfs(e,r,i)}))},mount:(r,e,t)=>{var n,o="/"===t,i=!t;if(o&&Y.root)throw new Y.ErrnoError(10);if(!o&&!i){var a=Y.lookupPath(t,{follow_mount:!1});if(t=a.path,n=a.node,Y.isMountpoint(n))throw new Y.ErrnoError(10);if(!Y.isDir(n.mode))throw new Y.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?Y.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:r=>{var e=Y.lookupPath(r,{follow_mount:!1});if(!Y.isMountpoint(e.node))throw new Y.ErrnoError(28);var t=e.node,n=t.mounted,o=Y.getMounts(n);Object.keys(Y.nameTable).forEach((r=>{for(var e=Y.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&Y.destroyNode(e),e=t}})),t.mounted=null;var i=t.mount.mounts.indexOf(n);t.mount.mounts.splice(i,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod:(r,e,t)=>{var n=Y.lookupPath(r,{parent:!0}).node,o=W.basename(r);if(!o||"."===o||".."===o)throw new Y.ErrnoError(28);var i=Y.mayCreate(n,o);if(i)throw new Y.ErrnoError(i);if(!n.node_ops.mknod)throw new Y.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},create:(r,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,Y.mknod(r,e,0)),mkdir:(r,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,Y.mknod(r,e,0)),mkdirTree:(r,e)=>{for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{Y.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,e,t)=>(void 0===t&&(t=e,e=438),e|=8192,Y.mknod(r,e,t)),symlink:(r,e)=>{if(!V.resolve(r))throw new Y.ErrnoError(44);var t=Y.lookupPath(e,{parent:!0}).node;if(!t)throw new Y.ErrnoError(44);var n=W.basename(e),o=Y.mayCreate(t,n);if(o)throw new Y.ErrnoError(o);if(!t.node_ops.symlink)throw new Y.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename:(r,e)=>{var t,n,o=W.dirname(r),i=W.dirname(e),a=W.basename(r),s=W.basename(e);if(t=Y.lookupPath(r,{parent:!0}).node,n=Y.lookupPath(e,{parent:!0}).node,!t||!n)throw new Y.ErrnoError(44);if(t.mount!==n.mount)throw new Y.ErrnoError(75);var u,c=Y.lookupNode(t,a),l=V.relative(r,i);if("."!==l.charAt(0))throw new Y.ErrnoError(28);if("."!==(l=V.relative(e,o)).charAt(0))throw new Y.ErrnoError(55);try{u=Y.lookupNode(n,s)}catch(r){}if(c!==u){var d=Y.isDir(c.mode),f=Y.mayDelete(t,a,d);if(f)throw new Y.ErrnoError(f);if(f=u?Y.mayDelete(n,s,d):Y.mayCreate(n,s))throw new Y.ErrnoError(f);if(!t.node_ops.rename)throw new Y.ErrnoError(63);if(Y.isMountpoint(c)||u&&Y.isMountpoint(u))throw new Y.ErrnoError(10);if(n!==t&&(f=Y.nodePermissions(t,"w")))throw new Y.ErrnoError(f);Y.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(r){throw r}finally{Y.hashAddNode(c)}}},rmdir:r=>{var e=Y.lookupPath(r,{parent:!0}).node,t=W.basename(r),n=Y.lookupNode(e,t),o=Y.mayDelete(e,t,!0);if(o)throw new Y.ErrnoError(o);if(!e.node_ops.rmdir)throw new Y.ErrnoError(63);if(Y.isMountpoint(n))throw new Y.ErrnoError(10);e.node_ops.rmdir(e,t),Y.destroyNode(n)},readdir:r=>{var e=Y.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new Y.ErrnoError(54);return e.node_ops.readdir(e)},unlink:r=>{var e=Y.lookupPath(r,{parent:!0}).node;if(!e)throw new Y.ErrnoError(44);var t=W.basename(r),n=Y.lookupNode(e,t),o=Y.mayDelete(e,t,!1);if(o)throw new Y.ErrnoError(o);if(!e.node_ops.unlink)throw new Y.ErrnoError(63);if(Y.isMountpoint(n))throw new Y.ErrnoError(10);e.node_ops.unlink(e,t),Y.destroyNode(n)},readlink:r=>{var e=Y.lookupPath(r).node;if(!e)throw new Y.ErrnoError(44);if(!e.node_ops.readlink)throw new Y.ErrnoError(28);return V.resolve(Y.getPath(e.parent),e.node_ops.readlink(e))},stat:(r,e)=>{var t=Y.lookupPath(r,{follow:!e}).node;if(!t)throw new Y.ErrnoError(44);if(!t.node_ops.getattr)throw new Y.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>Y.stat(r,!0),chmod:(r,e,t)=>{var n;if(!(n="string"==typeof r?Y.lookupPath(r,{follow:!t}).node:r).node_ops.setattr)throw new Y.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,e)=>{Y.chmod(r,e,!0)},fchmod:(r,e)=>{var t=Y.getStream(r);if(!t)throw new Y.ErrnoError(8);Y.chmod(t.node,e)},chown:(r,e,t,n)=>{var o;if(!(o="string"==typeof r?Y.lookupPath(r,{follow:!n}).node:r).node_ops.setattr)throw new Y.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,e,t)=>{Y.chown(r,e,t,!0)},fchown:(r,e,t)=>{var n=Y.getStream(r);if(!n)throw new Y.ErrnoError(8);Y.chown(n.node,e,t)},truncate:(r,e)=>{if(e<0)throw new Y.ErrnoError(28);var t;if(!(t="string"==typeof r?Y.lookupPath(r,{follow:!0}).node:r).node_ops.setattr)throw new Y.ErrnoError(63);if(Y.isDir(t.mode))throw new Y.ErrnoError(31);if(!Y.isFile(t.mode))throw new Y.ErrnoError(28);var n=Y.nodePermissions(t,"w");if(n)throw new Y.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate:(r,e)=>{var t=Y.getStream(r);if(!t)throw new Y.ErrnoError(8);if(0==(2097155&t.flags))throw new Y.ErrnoError(28);Y.truncate(t.node,e)},utime:(r,e,t)=>{var n=Y.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open:(r,e,t,n,i)=>{if(""===r)throw new Y.ErrnoError(44);var a;if(t=void 0===t?438:t,t=64&(e="string"==typeof e?Y.modeStringToFlags(e):e)?4095&t|32768:0,"object"==typeof r)a=r;else{r=W.normalize(r);try{a=Y.lookupPath(r,{follow:!(131072&e)}).node}catch(r){}}var s=!1;if(64&e)if(a){if(128&e)throw new Y.ErrnoError(20)}else a=Y.mknod(r,t,0),s=!0;if(!a)throw new Y.ErrnoError(44);if(Y.isChrdev(a.mode)&&(e&=-513),65536&e&&!Y.isDir(a.mode))throw new Y.ErrnoError(54);if(!s){var u=Y.mayOpen(a,e);if(u)throw new Y.ErrnoError(u)}512&e&&Y.truncate(a,0),e&=-131713;var c=Y.createStream({node:a,path:Y.getPath(a),flags:e,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},n,i);return c.stream_ops.open&&c.stream_ops.open(c),!o.logReadFiles||1&e||(Y.readFiles||(Y.readFiles={}),r in Y.readFiles||(Y.readFiles[r]=1)),c},close:r=>{if(Y.isClosed(r))throw new Y.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{Y.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,e,t)=>{if(Y.isClosed(r))throw new Y.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new Y.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Y.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read:(r,e,t,n,o)=>{if(n<0||o<0)throw new Y.ErrnoError(28);if(Y.isClosed(r))throw new Y.ErrnoError(8);if(1==(2097155&r.flags))throw new Y.ErrnoError(8);if(Y.isDir(r.node.mode))throw new Y.ErrnoError(31);if(!r.stream_ops.read)throw new Y.ErrnoError(28);var i=void 0!==o;if(i){if(!r.seekable)throw new Y.ErrnoError(70)}else o=r.position;var a=r.stream_ops.read(r,e,t,n,o);return i||(r.position+=a),a},write:(r,e,t,n,o,i)=>{if(n<0||o<0)throw new Y.ErrnoError(28);if(Y.isClosed(r))throw new Y.ErrnoError(8);if(0==(2097155&r.flags))throw new Y.ErrnoError(8);if(Y.isDir(r.node.mode))throw new Y.ErrnoError(31);if(!r.stream_ops.write)throw new Y.ErrnoError(28);r.seekable&&1024&r.flags&&Y.llseek(r,0,2);var a=void 0!==o;if(a){if(!r.seekable)throw new Y.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,i);return a||(r.position+=s),s},allocate:(r,e,t)=>{if(Y.isClosed(r))throw new Y.ErrnoError(8);if(e<0||t<=0)throw new Y.ErrnoError(28);if(0==(2097155&r.flags))throw new Y.ErrnoError(8);if(!Y.isFile(r.node.mode)&&!Y.isDir(r.node.mode))throw new Y.ErrnoError(43);if(!r.stream_ops.allocate)throw new Y.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap:(r,e,t,n,o,i)=>{if(0!=(2&o)&&0==(2&i)&&2!=(2097155&r.flags))throw new Y.ErrnoError(2);if(1==(2097155&r.flags))throw new Y.ErrnoError(2);if(!r.stream_ops.mmap)throw new Y.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o,i)},msync:(r,e,t,n,o)=>r&&r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,munmap:r=>0,ioctl:(r,e,t)=>{if(!r.stream_ops.ioctl)throw new Y.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile:(r,e={})=>{if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error(\'Invalid encoding type "\'+e.encoding+\'"\');var t,n=Y.open(r,e.flags),o=Y.stat(r).size,i=new Uint8Array(o);return Y.read(n,i,0,o,0),"utf8"===e.encoding?t=k(i,0):"binary"===e.encoding&&(t=i),Y.close(n),t},writeFile:(r,e,t={})=>{t.flags=t.flags||577;var n=Y.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(A(e)+1),i=S(e,o,0,o.length);Y.write(n,o,0,i,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");Y.write(n,e,0,e.byteLength,void 0,t.canOwn)}Y.close(n)},cwd:()=>Y.currentPath,chdir:r=>{var e=Y.lookupPath(r,{follow:!0});if(null===e.node)throw new Y.ErrnoError(44);if(!Y.isDir(e.node.mode))throw new Y.ErrnoError(54);var t=Y.nodePermissions(e.node,"x");if(t)throw new Y.ErrnoError(t);Y.currentPath=e.path},createDefaultDirectories:()=>{Y.mkdir("/tmp"),Y.mkdir("/home"),Y.mkdir("/home/web_user")},createDefaultDevices:()=>{Y.mkdir("/dev"),Y.registerDevice(Y.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n}),Y.mkdev("/dev/null",Y.makedev(1,3)),J.register(Y.makedev(5,0),J.default_tty_ops),J.register(Y.makedev(6,0),J.default_tty1_ops),Y.mkdev("/dev/tty",Y.makedev(5,0)),Y.mkdev("/dev/tty1",Y.makedev(6,0));var r=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return function(){return crypto.getRandomValues(r),r[0]}}return function(){L("randomDevice")}}();Y.createDevice("/dev","random",r),Y.createDevice("/dev","urandom",r),Y.mkdir("/dev/shm"),Y.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{Y.mkdir("/proc");var r=Y.mkdir("/proc/self");Y.mkdir("/proc/self/fd"),Y.mount({mount:()=>{var e=Y.createNode(r,"fd",16895,73);return e.node_ops={lookup:(r,e)=>{var t=+e,n=Y.getStream(t);if(!n)throw new Y.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:()=>{o.stdin?Y.createDevice("/dev","stdin",o.stdin):Y.symlink("/dev/tty","/dev/stdin"),o.stdout?Y.createDevice("/dev","stdout",null,o.stdout):Y.symlink("/dev/tty","/dev/stdout"),o.stderr?Y.createDevice("/dev","stderr",null,o.stderr):Y.symlink("/dev/tty1","/dev/stderr"),Y.open("/dev/stdin",0),Y.open("/dev/stdout",1),Y.open("/dev/stderr",1)},ensureErrnoError:()=>{Y.ErrnoError||(Y.ErrnoError=function(r,e){this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},Y.ErrnoError.prototype=new Error,Y.ErrnoError.prototype.constructor=Y.ErrnoError,[44].forEach((r=>{Y.genericErrors[r]=new Y.ErrnoError(r),Y.genericErrors[r].stack="<generic error, no stack>"})))},staticInit:()=>{Y.ensureErrnoError(),Y.nameTable=new Array(4096),Y.mount(X,{},"/"),Y.createDefaultDirectories(),Y.createDefaultDevices(),Y.createSpecialDirectories(),Y.filesystems={MEMFS:X}},init:(r,e,t)=>{Y.init.initialized=!0,Y.ensureErrnoError(),o.stdin=r||o.stdin,o.stdout=e||o.stdout,o.stderr=t||o.stderr,Y.createStandardStreams()},quit:()=>{Y.init.initialized=!1;for(var r=0;r<Y.streams.length;r++){var e=Y.streams[r];e&&Y.close(e)}},getMode:(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},findObject:(r,e)=>{var t=Y.analyzePath(r,e);return t.exists?t.object:null},analyzePath:(r,e)=>{try{r=(n=Y.lookupPath(r,{follow:!e})).path}catch(r){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=Y.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=W.basename(r),n=Y.lookupPath(r,{follow:!e}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(r){t.error=r.errno}return t},createPath:(r,e,t,n)=>{r="string"==typeof r?r:Y.getPath(r);for(var o=e.split("/").reverse();o.length;){var i=o.pop();if(i){var a=W.join2(r,i);try{Y.mkdir(a)}catch(r){}r=a}}return a},createFile:(r,e,t,n,o)=>{var i=W.join2("string"==typeof r?r:Y.getPath(r),e),a=Y.getMode(n,o);return Y.create(i,a)},createDataFile:(r,e,t,n,o,i)=>{var a=e;r&&(r="string"==typeof r?r:Y.getPath(r),a=e?W.join2(r,e):r);var s=Y.getMode(n,o),u=Y.create(a,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),l=0,d=t.length;l<d;++l)c[l]=t.charCodeAt(l);t=c}Y.chmod(u,146|s);var f=Y.open(u,577);Y.write(f,t,0,t.length,0,i),Y.close(f),Y.chmod(u,s)}return u},createDevice:(r,e,t,n)=>{var o=W.join2("string"==typeof r?r:Y.getPath(r),e),i=Y.getMode(!!t,!!n);Y.createDevice.major||(Y.createDevice.major=64);var a=Y.makedev(Y.createDevice.major++,0);return Y.registerDevice(a,{open:r=>{r.seekable=!1},close:r=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(r,e,n,o,i)=>{for(var a=0,s=0;s<o;s++){var u;try{u=t()}catch(r){throw new Y.ErrnoError(29)}if(void 0===u&&0===a)throw new Y.ErrnoError(6);if(null==u)break;a++,e[n+s]=u}return a&&(r.node.timestamp=Date.now()),a},write:(r,e,t,o,i)=>{for(var a=0;a<o;a++)try{n(e[t+a])}catch(r){throw new Y.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),a}}),Y.mkdev(o,i,a)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!i)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=or(i(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new Y.ErrnoError(29)}},createLazyFile:(r,e,t,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}},i.prototype.setDataGetter=function(r){this.getter=r},i.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn\'t load "+t+". Status: "+r.status);var e,n=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,i=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;o||(a=n);var s=this;s.setDataGetter((r=>{var e=r*a,o=(r+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=((r,e)=>{if(r>e)throw new Error("invalid range ("+r+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==a&&o.setRequestHeader("Range","bytes="+r+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn\'t load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):or(o.responseText||"",!0)})(e,o)),void 0===s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,f("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a={isDevice:!1,url:t},s=Y.createFile(r,e,a,n,o);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(s.stream_ops).forEach((r=>{var e=s.stream_ops[r];u[r]=function(){return Y.forceLoadFile(s),e.apply(null,arguments)}})),u.read=(r,e,t,n,o)=>{Y.forceLoadFile(s);var i=r.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var u=0;u<a;u++)e[t+u]=i[o+u];else for(u=0;u<a;u++)e[t+u]=i.get(o+u);return a},s.stream_ops=u,s},createPreloadedFile:(r,e,t,n,o,i,s,u,c,l)=>{var d=e?V.resolve(W.join2(r,e)):r;function f(t){function a(t){l&&l(),u||Y.createDataFile(r,e,t,n,o,c),i&&i(),O()}Browser.handledByPreloadPlugin(t,d,a,(()=>{s&&s(),O()}))||a(t)}N(),"string"==typeof t?function(r,e,t,n){var o=n?"":"al "+r;a(r,(function(t){m(t,\'Loading data file "\'+r+\'" failed (no arrayBuffer).\'),e(new Uint8Array(t)),o&&O()}),(function(e){if(!t)throw\'Loading data file "\'+r+\'" failed.\';t()})),o&&N()}(t,(r=>f(r)),s):f(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=Y.indexedDB();try{var o=n.open(Y.DB_NAME(),Y.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=()=>{f("creating db"),o.result.createObjectStore(Y.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([Y.DB_STORE_NAME],"readwrite"),i=n.objectStore(Y.DB_STORE_NAME),a=0,s=0,u=r.length;function c(){0==s?e():t()}r.forEach((r=>{var e=i.put(Y.analyzePath(r).object.contents,r);e.onsuccess=()=>{++a+s==u&&c()},e.onerror=()=>{s++,a+s==u&&c()}})),n.onerror=t},o.onerror=t},loadFilesFromDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=Y.indexedDB();try{var o=n.open(Y.DB_NAME(),Y.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([Y.DB_STORE_NAME],"readonly")}catch(r){return void t(r)}var a=i.objectStore(Y.DB_STORE_NAME),s=0,u=0,c=r.length;function l(){0==u?e():t()}r.forEach((r=>{var e=a.get(r);e.onsuccess=()=>{Y.analyzePath(r).exists&&Y.unlink(r),Y.createDataFile(W.dirname(r),W.basename(r),e.result,!0,!0,!0),++s+u==c&&l()},e.onerror=()=>{u++,s+u==c&&l()}})),i.onerror=t},o.onerror=t}},K={DEFAULT_POLLMASK:5,calculateAt:function(r,e,t){if("/"===e[0])return e;var n;if(-100===r)n=Y.cwd();else{var o=Y.getStream(r);if(!o)throw new Y.ErrnoError(8);n=o.path}if(0==e.length){if(!t)throw new Y.ErrnoError(44);return n}return W.join2(n,e)},doStat:function(r,e,t){try{var n=r(e)}catch(r){if(r&&r.node&&W.normalize(e)!==W.normalize(Y.getPath(r.node)))return-54;throw r}return y[t>>2]=n.dev,y[t+4>>2]=0,y[t+8>>2]=n.ino,y[t+12>>2]=n.mode,y[t+16>>2]=n.nlink,y[t+20>>2]=n.uid,y[t+24>>2]=n.gid,y[t+28>>2]=n.rdev,y[t+32>>2]=0,R=[n.size>>>0,(M=n.size,+Math.abs(M)>=1?M>0?(0|Math.min(+Math.floor(M/4294967296),4294967295))>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],y[t+40>>2]=R[0],y[t+44>>2]=R[1],y[t+48>>2]=4096,y[t+52>>2]=n.blocks,y[t+56>>2]=n.atime.getTime()/1e3|0,y[t+60>>2]=0,y[t+64>>2]=n.mtime.getTime()/1e3|0,y[t+68>>2]=0,y[t+72>>2]=n.ctime.getTime()/1e3|0,y[t+76>>2]=0,R=[n.ino>>>0,(M=n.ino,+Math.abs(M)>=1?M>0?(0|Math.min(+Math.floor(M/4294967296),4294967295))>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],y[t+80>>2]=R[0],y[t+84>>2]=R[1],0},doMsync:function(r,e,t,n,o){var i=_.slice(r,r+t);Y.msync(e,i,o,t,n)},doMkdir:function(r,e){return"/"===(r=W.normalize(r))[r.length-1]&&(r=r.substr(0,r.length-1)),Y.mkdir(r,e,0),0},doMknod:function(r,e,t){switch(61440&e){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return Y.mknod(r,e,t),0},doReadlink:function(r,e,t){if(t<=0)return-28;var n=Y.readlink(r),o=Math.min(t,A(n)),i=w[e+o];return S(n,_,e,t+1),w[e+o]=i,o},doAccess:function(r,e){if(-8&e)return-28;var t=Y.lookupPath(r,{follow:!0}).node;if(!t)return-44;var n="";return 4&e&&(n+="r"),2&e&&(n+="w"),1&e&&(n+="x"),n&&Y.nodePermissions(t,n)?-2:0},doDup:function(r,e,t){var n=Y.getStream(t);return n&&Y.close(n),Y.open(r,e,0,t,t).fd},doReadv:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=y[e+8*i>>2],s=y[e+(8*i+4)>>2],u=Y.read(r,w,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o},doWritev:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=y[e+8*i>>2],s=y[e+(8*i+4)>>2],u=Y.write(r,w,a,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return K.varargs+=4,y[K.varargs-4>>2]},getStr:function(r){return D(r)},getStreamFromFD:function(r){var e=Y.getStream(r);if(!e)throw new Y.ErrnoError(8);return e},get64:function(r,e){return r}},$=[];function Q(r){try{return d.grow(r-v.byteLength+65535>>>16),P(d.buffer),1}catch(r){}}var Z={};function rr(){if(!rr.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:u||"./this.program"};for(var e in Z)void 0===Z[e]?delete r[e]:r[e]=Z[e];var t=[];for(var e in r)t.push(e+"="+r[e]);rr.strings=t}return rr.strings}var er=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=Y.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},tr=365,nr=146;function or(r,e,t){var n=t>0?t:A(r)+1,o=new Array(n),i=S(r,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(er.prototype,{read:{get:function(){return(this.mode&tr)===tr},set:function(r){r?this.mode|=tr:this.mode&=-366}},write:{get:function(){return(this.mode&nr)===nr},set:function(r){r?this.mode|=nr:this.mode&=-147}},isFolder:{get:function(){return Y.isDir(this.mode)}},isDevice:{get:function(){return Y.isChrdev(this.mode)}}}),Y.FSNode=er,Y.staticInit();var ir={g:function(r,e,t){K.varargs=t;try{var n=K.getStr(r),o=t?K.get():0;return Y.open(n,e,o).fd}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return-r.errno}},d:function(){L("")},a:function(r,e,t){var n=function(r,e){var t;for($.length=0,e>>=2;t=_[r++];){var n=t<105;n&&1&e&&e++,$.push(n?E[e++>>1]:y[e]),++e}return $}(e,t);return H[r].apply(null,n)},j:function(r,e,t){_.copyWithin(r,e,e+t)},e:function(r){var e,t,n=_.length,o=2147483648;if((r>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,r+100663296),Q(Math.min(o,(e=Math.max(r,a))+((t=65536)-e%t)%t)))return!0}return!1},h:function(r,e){var t=0;return rr().forEach((function(n,o){var i=e+t;y[r+4*o>>2]=i,function(r,e,t){for(var n=0;n<r.length;++n)w[e++>>0]=r.charCodeAt(n);t||(w[e>>0]=0)}(n,i),t+=n.length+1})),0},i:function(r,e){var t=rr();y[r>>2]=t.length;var n=0;return t.forEach((function(r){n+=r.length+1})),y[e>>2]=n,0},c:function(r){try{var e=K.getStreamFromFD(r);return Y.close(e),0}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return r.errno}},f:function(r,e,t,n){try{var o=K.getStreamFromFD(r),i=K.doReadv(o,e,t);return y[n>>2]=i,0}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return r.errno}},k:function(r,e,t,n,o){try{var i=K.getStreamFromFD(r),a=4294967296*t+(e>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(Y.llseek(i,a,n),R=[i.position>>>0,(M=i.position,+Math.abs(M)>=1?M>0?(0|Math.min(+Math.floor(M/4294967296),4294967295))>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],y[o>>2]=R[0],y[o+4>>2]=R[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return r.errno}},b:function(r,e,t,n){try{var o=K.getStreamFromFD(r),i=K.doWritev(o,e,t);return y[n>>2]=i,0}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return r.errno}},l:function(r){var e=Date.now();return y[r>>2]=e/1e3|0,y[r+4>>2]=e%1e3*1e3|0,0}};!function(){var r={a:ir};function e(r,e){var t,n=r.exports;o.asm=n,P((d=o.asm.m).buffer),g=o.asm.G,t=o.asm.n,j.unshift(t),O()}function n(r){e(r.instance)}function i(e){return(l||"function"!=typeof fetch?Promise.resolve().then((function(){return U(x)})):fetch(x,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at \'"+x+"\'";return r.arrayBuffer()})).catch((function(){return U(x)}))).then((function(e){return WebAssembly.instantiate(e,r)})).then((function(r){return r})).then(e,(function(r){p("failed to asynchronously prepare wasm: "+r),L(r)}))}if(N(),o.instantiateWasm)try{return o.instantiateWasm(r,e)}catch(r){return p("Module.instantiateWasm callback failed with error: "+r),!1}(l||"function"!=typeof WebAssembly.instantiateStreaming||I(x)||"function"!=typeof fetch?i(n):fetch(x,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(n,(function(r){return p("wasm streaming compile failed: "+r),p("falling back to ArrayBuffer instantiation"),i(n)}))}))).catch(t)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.n).apply(null,arguments)};var ar,sr=o._emscripten_bind_CExpat_CExpat_0=function(){return(sr=o._emscripten_bind_CExpat_CExpat_0=o.asm.o).apply(null,arguments)},ur=o._emscripten_bind_CExpat_version_0=function(){return(ur=o._emscripten_bind_CExpat_version_0=o.asm.p).apply(null,arguments)},cr=o._emscripten_bind_CExpat_create_0=function(){return(cr=o._emscripten_bind_CExpat_create_0=o.asm.q).apply(null,arguments)},lr=o._emscripten_bind_CExpat_destroy_0=function(){return(lr=o._emscripten_bind_CExpat_destroy_0=o.asm.r).apply(null,arguments)},dr=o._emscripten_bind_CExpat_parse_1=function(){return(dr=o._emscripten_bind_CExpat_parse_1=o.asm.s).apply(null,arguments)},fr=o._emscripten_bind_CExpat_tag_0=function(){return(fr=o._emscripten_bind_CExpat_tag_0=o.asm.t).apply(null,arguments)},pr=o._emscripten_bind_CExpat_attrs_0=function(){return(pr=o._emscripten_bind_CExpat_attrs_0=o.asm.u).apply(null,arguments)},hr=o._emscripten_bind_CExpat_content_0=function(){return(hr=o._emscripten_bind_CExpat_content_0=o.asm.v).apply(null,arguments)},mr=o._emscripten_bind_CExpat_startElement_0=function(){return(mr=o._emscripten_bind_CExpat_startElement_0=o.asm.w).apply(null,arguments)},vr=o._emscripten_bind_CExpat_endElement_0=function(){return(vr=o._emscripten_bind_CExpat_endElement_0=o.asm.x).apply(null,arguments)},wr=o._emscripten_bind_CExpat_characterData_0=function(){return(wr=o._emscripten_bind_CExpat_characterData_0=o.asm.y).apply(null,arguments)},_r=o._emscripten_bind_CExpat___destroy___0=function(){return(_r=o._emscripten_bind_CExpat___destroy___0=o.asm.z).apply(null,arguments)},yr=o._emscripten_bind_VoidPtr___destroy___0=function(){return(yr=o._emscripten_bind_VoidPtr___destroy___0=o.asm.A).apply(null,arguments)},Er=o._emscripten_bind_CExpatJS_CExpatJS_0=function(){return(Er=o._emscripten_bind_CExpatJS_CExpatJS_0=o.asm.B).apply(null,arguments)},gr=o._emscripten_bind_CExpatJS_startElement_0=function(){return(gr=o._emscripten_bind_CExpatJS_startElement_0=o.asm.C).apply(null,arguments)},br=o._emscripten_bind_CExpatJS_endElement_0=function(){return(br=o._emscripten_bind_CExpatJS_endElement_0=o.asm.D).apply(null,arguments)},kr=o._emscripten_bind_CExpatJS_characterData_0=function(){return(kr=o._emscripten_bind_CExpatJS_characterData_0=o.asm.E).apply(null,arguments)},Dr=o._emscripten_bind_CExpatJS___destroy___0=function(){return(Dr=o._emscripten_bind_CExpatJS___destroy___0=o.asm.F).apply(null,arguments)};function Sr(r){function t(){ar||(ar=!0,o.calledRun=!0,h||(o.noFSInit||Y.init.initialized||Y.init(),Y.ignorePermissions=!1,G(j),e(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)r=o.postRun.shift(),z.unshift(r);var r;G(z)}()))}T>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),C.unshift(r);var r;G(C)}(),T>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),t()}),1)):t()))}if(o._malloc=function(){return(o._malloc=o.asm.H).apply(null,arguments)},B=function r(){ar||Sr(),ar||(B=r)},o.run=Sr,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function Ar(){}function Pr(r){return(r||Ar).__cache__}function xr(r,e){var t=Pr(e),n=t[r];return n||((n=Object.create((e||Ar).prototype)).ptr=r,t[r]=n)}Sr(),Ar.prototype=Object.create(Ar.prototype),Ar.prototype.constructor=Ar,Ar.prototype.__class__=Ar,Ar.__cache__={},o.WrapperObject=Ar,o.getCache=Pr,o.wrapPointer=xr,o.castObject=function(r,e){return xr(r.ptr,e)},o.NULL=xr(0),o.destroy=function(r){if(!r.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";r.__destroy__(),delete Pr(r.__class__)[r.ptr]},o.compare=function(r,e){return r.ptr===e.ptr},o.getPointer=function(r){return r.ptr},o.getClass=function(r){return r.__class__};var Fr={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(Fr.needed){for(var r=0;r<Fr.temps.length;r++)o._free(Fr.temps[r]);Fr.temps.length=0,o._free(Fr.buffer),Fr.buffer=0,Fr.size+=Fr.needed,Fr.needed=0}Fr.buffer||(Fr.size+=128,Fr.buffer=o._malloc(Fr.size),m(Fr.buffer)),Fr.pos=0},alloc:function(r,e){m(Fr.buffer);var t,n=e.BYTES_PER_ELEMENT,i=r.length*n;return i=i+7&-8,Fr.pos+i>=Fr.size?(m(i>0),Fr.needed+=i,t=o._malloc(i),Fr.temps.push(t)):(t=Fr.buffer+Fr.pos,Fr.pos+=i),t},copy:function(r,e,t){switch(t>>>=0,e.BYTES_PER_ELEMENT){case 2:t>>>=1;break;case 4:t>>>=2;break;case 8:t>>>=3}for(var n=0;n<r.length;n++)e[t+n]=r[n]}};function Mr(){this.ptr=sr(),Pr(Mr)[this.ptr]=this}function Rr(){throw"cannot construct a VoidPtr, no constructor in IDL"}function Cr(){this.ptr=Er(),Pr(Cr)[this.ptr]=this}return Mr.prototype=Object.create(Ar.prototype),Mr.prototype.constructor=Mr,Mr.prototype.__class__=Mr,Mr.__cache__={},o.CExpat=Mr,Mr.prototype.version=Mr.prototype.version=function(){var r=this.ptr;return D(ur(r))},Mr.prototype.create=Mr.prototype.create=function(){var r=this.ptr;return!!cr(r)},Mr.prototype.destroy=Mr.prototype.destroy=function(){var r=this.ptr;lr(r)},Mr.prototype.parse=Mr.prototype.parse=function(r){var e=this.ptr;return Fr.prepare(),r=r&&"object"==typeof r?r.ptr:function(r){if("string"==typeof r){var e=or(r),t=Fr.alloc(e,w);return Fr.copy(e,w,t),t}return r}(r),!!dr(e,r)},Mr.prototype.tag=Mr.prototype.tag=function(){var r=this.ptr;return D(fr(r))},Mr.prototype.attrs=Mr.prototype.attrs=function(){var r=this.ptr;return D(pr(r))},Mr.prototype.content=Mr.prototype.content=function(){var r=this.ptr;return D(hr(r))},Mr.prototype.startElement=Mr.prototype.startElement=function(){var r=this.ptr;mr(r)},Mr.prototype.endElement=Mr.prototype.endElement=function(){var r=this.ptr;vr(r)},Mr.prototype.characterData=Mr.prototype.characterData=function(){var r=this.ptr;wr(r)},Mr.prototype.__destroy__=Mr.prototype.__destroy__=function(){var r=this.ptr;_r(r)},Rr.prototype=Object.create(Ar.prototype),Rr.prototype.constructor=Rr,Rr.prototype.__class__=Rr,Rr.__cache__={},o.VoidPtr=Rr,Rr.prototype.__destroy__=Rr.prototype.__destroy__=function(){var r=this.ptr;yr(r)},Cr.prototype=Object.create(Mr.prototype),Cr.prototype.constructor=Cr,Cr.prototype.__class__=Cr,Cr.__cache__={},o.CExpatJS=Cr,Cr.prototype.startElement=Cr.prototype.startElement=function(){var r=this.ptr;gr(r)},Cr.prototype.endElement=Cr.prototype.endElement=function(){var r=this.ptr;br(r)},Cr.prototype.characterData=Cr.prototype.characterData=function(){var r=this.ptr;kr(r)},Cr.prototype.__destroy__=Cr.prototype.__destroy__=function(){var r=this.ptr;Dr(r)},r.ready},t.exports=o;var a=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}().__hpcc_wasmFolder||void 0;function s(r,e,t){var n=r.default||r;return n.__hpcc_promise||(n.__hpcc_promise=n({wasmBinary:t,locateFile:function(r,t){return"".concat(function(r,e){for(;r.charAt(r.length-1)===e;)r=r.substring(0,r.length-1);return r}(e||function(r){if(!arguments.length)return a;var e=a;return a=r,e}()||t||".","/"),"/").concat(function(r,e){for(;r.charAt(0)===e;)r=r.substring(1);return r}(r,"/"))}})),n.__hpcc_promise}!function(){function r(r,e){this.tag=r,this.attrs=e,this._content=""}Object.defineProperty(r.prototype,"content",{get:function(){return this._content},enumerable:!1,configurable:!0}),r.prototype.appendContent=function(r){this._content+=r}}();var u={exports:{}};!function(r,e){var t=(()=>{var r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return function(e){var t,n,o=void 0!==(e=e||{})?e:{};o.ready=new Promise((function(r,e){t=r,n=e}));var i,a,s=Object.assign({},o),u="./this.program",c=(r,e)=>{throw e},l="";"undefined"!=typeof document&&document.currentScript&&(l=document.currentScript.src),r&&(l=r),l=0!==l.indexOf("blob:")?l.substr(0,l.replace(/[?#].*/,"").lastIndexOf("/")+1):"",i=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},a=(r,e,t)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)};var d=o.print||console.log.bind(console),f=o.printErr||console.warn.bind(console);Object.assign(o,s),s=null,o.arguments,o.thisProgram&&(u=o.thisProgram),o.quit&&(c=o.quit);var p,h=0;o.wasmBinary&&(p=o.wasmBinary);var m,v=o.noExitRuntime||!0;"object"!=typeof WebAssembly&&L("no native wasm support detected");var w=!1;function _(r,e){r||L(e)}var y,E,g,b,k,D,S,A="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function P(r,e,t){for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.subarray&&A)return A.decode(r.subarray(e,o));for(var i="";e<o;){var a=r[e++];if(128&a){var s=63&r[e++];if(192!=(224&a)){var u=63&r[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&r[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function x(r,e){return r?P(g,r,e):""}function F(r,e,t,n){if(!(n>0))return 0;for(var o=t,i=t+n-1,a=0;a<r.length;++a){var s=r.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&r.charCodeAt(++a);if(s<=127){if(t>=i)break;e[t++]=s}else if(s<=2047){if(t+1>=i)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=i)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=i)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o}function M(r){for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++t)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function R(r){y=r,o.HEAP8=E=new Int8Array(r),o.HEAP16=b=new Int16Array(r),o.HEAP32=k=new Int32Array(r),o.HEAPU8=g=new Uint8Array(r),o.HEAPU16=new Uint16Array(r),o.HEAPU32=new Uint32Array(r),o.HEAPF32=new Float32Array(r),o.HEAPF64=D=new Float64Array(r)}o.INITIAL_MEMORY;var C=[],j=[],z=[];var T=0,B=null;function N(r){T++,o.monitorRunDependencies&&o.monitorRunDependencies(T)}function O(r){if(T--,o.monitorRunDependencies&&o.monitorRunDependencies(T),0==T&&B){var e=B;B=null,e()}}function L(r){o.onAbort&&o.onAbort(r),f(r="Aborted("+r+")"),w=!0,r+=". Build with -s ASSERTIONS=1 for more info.";var e=new WebAssembly.RuntimeError(r);throw n(e),e}o.preloadedImages={},o.preloadedAudios={};var I,U,H,G;function q(r){return r.startsWith("data:application/octet-stream;base64,")}function W(r){try{if(r==I&&p)return new Uint8Array(p);throw"both async and sync fetching of the wasm failed"}catch(r){L(r)}}q(I="graphvizlib.wasm")||(U=I,I=o.locateFile?o.locateFile(U,l):l+U);var V,J={161520:function(r,e){var t=x(r),n=x(e);tr.createPath("/",$.dirname(t)),tr.writeFile($.join("/",t),n)}};function X(r){for(;r.length>0;){var e=r.shift();if("function"!=typeof e){var t=e.func;"number"==typeof t?void 0===e.arg?Y(t)():Y(t)(e.arg):t(void 0===e.arg?null:e.arg)}else e(o)}}function Y(r){return S.get(r)}V=()=>performance.now();function K(r){return k[gr()>>2]=r,r}var $={splitPath:function(r){return/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/.exec(r).slice(1)},normalizeArray:function(r,e){for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:function(r){var e="/"===r.charAt(0),t="/"===r.substr(-1);return(r=$.normalizeArray(r.split("/").filter((function(r){return!!r})),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:function(r){var e=$.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:function(r){if("/"===r)return"/";var e=(r=(r=$.normalize(r)).replace(/\\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},extname:function(r){return $.splitPath(r)[3]},join:function(){var r=Array.prototype.slice.call(arguments,0);return $.normalize(r.join("/"))},join2:function(r,e){return $.normalize(r+"/"+e)}};var Q={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:tr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e="/"===n.charAt(0)}return(e?"/":"")+(r=$.normalizeArray(r.split("/").filter((function(r){return!!r})),!e).join("/"))||"."},relative:function(r,e){function t(r){for(var e=0;e<r.length&&""===r[e];e++);for(var t=r.length-1;t>=0&&""===r[t];t--);return e>t?[]:r.slice(e,t-e+1)}r=Q.resolve(r).substr(1),e=Q.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(a))).join("/")}},Z={ttys:[],init:function(){},shutdown:function(){},register:function(r,e){Z.ttys[r]={input:[],output:[],ops:e},tr.registerDevice(r,Z.stream_ops)},stream_ops:{open:function(r){var e=Z.ttys[r.node.rdev];if(!e)throw new tr.ErrnoError(43);r.tty=e,r.seekable=!1},close:function(r){r.tty.ops.flush(r.tty)},flush:function(r){r.tty.ops.flush(r.tty)},read:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new tr.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(r){throw new tr.ErrnoError(29)}if(void 0===s&&0===i)throw new tr.ErrnoError(6);if(null==s)break;i++,e[t+a]=s}return i&&(r.node.timestamp=Date.now()),i},write:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new tr.ErrnoError(60);try{for(var i=0;i<n;i++)r.tty.ops.put_char(r.tty,e[t+i])}catch(r){throw new tr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(r){if(!r.input.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\\n"),!e)return null;r.input=dr(e,!0)}return r.input.shift()},put_char:function(r,e){null===e||10===e?(d(P(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(d(P(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,e){null===e||10===e?(f(P(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(f(P(r.output,0)),r.output=[])}}};function rr(r){r=function(r,e){return Math.ceil(r/e)*e}(r,65536);var e=br(65536,r);return e?(function(r,e){g.fill(0,r,r+e)}(e,r),e):0}var er={ops_table:null,mount:function(r){return er.createNode(null,"/",16895,0)},createNode:function(r,e,t,n){if(tr.isBlkdev(t)||tr.isFIFO(t))throw new tr.ErrnoError(63);er.ops_table||(er.ops_table={dir:{node:{getattr:er.node_ops.getattr,setattr:er.node_ops.setattr,lookup:er.node_ops.lookup,mknod:er.node_ops.mknod,rename:er.node_ops.rename,unlink:er.node_ops.unlink,rmdir:er.node_ops.rmdir,readdir:er.node_ops.readdir,symlink:er.node_ops.symlink},stream:{llseek:er.stream_ops.llseek}},file:{node:{getattr:er.node_ops.getattr,setattr:er.node_ops.setattr},stream:{llseek:er.stream_ops.llseek,read:er.stream_ops.read,write:er.stream_ops.write,allocate:er.stream_ops.allocate,mmap:er.stream_ops.mmap,msync:er.stream_ops.msync}},link:{node:{getattr:er.node_ops.getattr,setattr:er.node_ops.setattr,readlink:er.node_ops.readlink},stream:{}},chrdev:{node:{getattr:er.node_ops.getattr,setattr:er.node_ops.setattr},stream:tr.chrdev_stream_ops}});var o=tr.createNode(r,e,t,n);return tr.isDir(o.mode)?(o.node_ops=er.ops_table.dir.node,o.stream_ops=er.ops_table.dir.stream,o.contents={}):tr.isFile(o.mode)?(o.node_ops=er.ops_table.file.node,o.stream_ops=er.ops_table.file.stream,o.usedBytes=0,o.contents=null):tr.isLink(o.mode)?(o.node_ops=er.ops_table.link.node,o.stream_ops=er.ops_table.link.stream):tr.isChrdev(o.mode)&&(o.node_ops=er.ops_table.chrdev.node,o.stream_ops=er.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){e=Math.max(e,t*(t<1048576?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var n=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr:function(r){var e={};return e.dev=tr.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,tr.isDir(r.mode)?e.size=4096:tr.isFile(r.mode)?e.size=r.usedBytes:tr.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&er.resizeFileStorage(r,e.size)},lookup:function(r,e){throw tr.genericErrors[44]},mknod:function(r,e,t,n){return er.createNode(r,e,t,n)},rename:function(r,e,t){if(tr.isDir(r.mode)){var n;try{n=tr.lookupNode(e,t)}catch(r){}if(n)for(var o in n.contents)throw new tr.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e},unlink:function(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir:function(r,e){var t=tr.lookupNode(r,e);for(var n in t.contents)throw new tr.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir:function(r){var e=[".",".."];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink:function(r,e,t){var n=er.createNode(r,e,41471,0);return n.link=t,n},readlink:function(r){if(!tr.isLink(r.mode))throw new tr.ErrnoError(28);return r.link}},stream_ops:{read:function(r,e,t,n,o){var i=r.node.contents;if(o>=r.node.usedBytes)return 0;var a=Math.min(r.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),t);else for(var s=0;s<a;s++)e[t+s]=i[o+s];return a},write:function(r,e,t,n,o,i){if(e.buffer===E.buffer&&(i=!1),!n)return 0;var a=r.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(t,t+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(t,t+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(t,t+n),o),n}if(er.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[t+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&tr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new tr.ErrnoError(28);return n},allocate:function(r,e,t){er.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap:function(r,e,t,n,o,i){if(0!==e)throw new tr.ErrnoError(28);if(!tr.isFile(r.node.mode))throw new tr.ErrnoError(43);var a,s,u=r.node.contents;if(2&i||u.buffer!==y){if((n>0||n+t<u.length)&&(u=u.subarray?u.subarray(n,n+t):Array.prototype.slice.call(u,n,n+t)),s=!0,!(a=rr(t)))throw new tr.ErrnoError(48);E.set(u,a)}else s=!1,a=u.byteOffset;return{ptr:a,allocated:s}},msync:function(r,e,t,n,o){if(!tr.isFile(r.node.mode))throw new tr.ErrnoError(43);return 2&o||er.stream_ops.write(r,e,0,n,t,!1),0}}};var tr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,e={})=>{if(!(r=Q.resolve(tr.cwd(),r)))return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};for(var n in t)void 0===e[n]&&(e[n]=t[n]);if(e.recurse_count>8)throw new tr.ErrnoError(32);for(var o=$.normalizeArray(r.split("/").filter((r=>!!r)),!1),i=tr.root,a="/",s=0;s<o.length;s++){var u=s===o.length-1;if(u&&e.parent)break;if(i=tr.lookupNode(i,o[s]),a=$.join2(a,o[s]),tr.isMountpoint(i)&&(!u||u&&e.follow_mount)&&(i=i.mounted.root),!u||e.follow)for(var c=0;tr.isLink(i.mode);){var l=tr.readlink(a);if(a=Q.resolve($.dirname(a),l),i=tr.lookupPath(a,{recurse_count:e.recurse_count}).node,c++>40)throw new tr.ErrnoError(32)}}return{path:a,node:i}},getPath:r=>{for(var e;;){if(tr.isRoot(r)){var t=r.mount.mountpoint;return e?"/"!==t[t.length-1]?t+"/"+e:t+e:t}e=e?r.name+"/"+e:r.name,r=r.parent}},hashName:(r,e)=>{for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%tr.nameTable.length},hashAddNode:r=>{var e=tr.hashName(r.parent.id,r.name);r.name_next=tr.nameTable[e],tr.nameTable[e]=r},hashRemoveNode:r=>{var e=tr.hashName(r.parent.id,r.name);if(tr.nameTable[e]===r)tr.nameTable[e]=r.name_next;else for(var t=tr.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode:(r,e)=>{var t=tr.mayLookup(r);if(t)throw new tr.ErrnoError(t,r);for(var n=tr.hashName(r.id,e),o=tr.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===r.id&&i===e)return o}return tr.lookup(r,e)},createNode:(r,e,t,n)=>{var o=new tr.FSNode(r,e,t,n);return tr.hashAddNode(o),o},destroyNode:r=>{tr.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>49152==(49152&r),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var e=tr.flagModes[r];if(void 0===e)throw new Error("Unknown file open mode: "+r);return e},flagsToPermissionString:r=>{var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>tr.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2,mayLookup:r=>{var e=tr.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate:(r,e)=>{try{tr.lookupNode(r,e);return 20}catch(r){}return tr.nodePermissions(r,"wx")},mayDelete:(r,e,t)=>{var n;try{n=tr.lookupNode(r,e)}catch(r){return r.errno}var o=tr.nodePermissions(r,"wx");if(o)return o;if(t){if(!tr.isDir(n.mode))return 54;if(tr.isRoot(n)||tr.getPath(n)===tr.cwd())return 10}else if(tr.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?tr.isLink(r.mode)?32:tr.isDir(r.mode)&&("r"!==tr.flagsToPermissionString(e)||512&e)?31:tr.nodePermissions(r,tr.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,e=tr.MAX_OPEN_FDS)=>{for(var t=r;t<=e;t++)if(!tr.streams[t])return t;throw new tr.ErrnoError(33)},getStream:r=>tr.streams[r],createStream:(r,e,t)=>{tr.FSStream||(tr.FSStream=function(){},tr.FSStream.prototype={object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}}),r=Object.assign(new tr.FSStream,r);var n=tr.nextfd(e,t);return r.fd=n,tr.streams[n]=r,r},closeStream:r=>{tr.streams[r]=null},chrdev_stream_ops:{open:r=>{var e=tr.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new tr.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice:(r,e)=>{tr.devices[r]={stream_ops:e}},getDevice:r=>tr.devices[r],getMounts:r=>{for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs:(r,e)=>{"function"==typeof r&&(e=r,r=!1),tr.syncFSRequests++,tr.syncFSRequests>1&&f("warning: "+tr.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=tr.getMounts(tr.root.mount),n=0;function o(r){return tr.syncFSRequests--,e(r)}function i(r){if(r)return i.errored?void 0:(i.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return i(null);e.type.syncfs(e,r,i)}))},mount:(r,e,t)=>{var n,o="/"===t,i=!t;if(o&&tr.root)throw new tr.ErrnoError(10);if(!o&&!i){var a=tr.lookupPath(t,{follow_mount:!1});if(t=a.path,n=a.node,tr.isMountpoint(n))throw new tr.ErrnoError(10);if(!tr.isDir(n.mode))throw new tr.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?tr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:r=>{var e=tr.lookupPath(r,{follow_mount:!1});if(!tr.isMountpoint(e.node))throw new tr.ErrnoError(28);var t=e.node,n=t.mounted,o=tr.getMounts(n);Object.keys(tr.nameTable).forEach((r=>{for(var e=tr.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&tr.destroyNode(e),e=t}})),t.mounted=null;var i=t.mount.mounts.indexOf(n);t.mount.mounts.splice(i,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod:(r,e,t)=>{var n=tr.lookupPath(r,{parent:!0}).node,o=$.basename(r);if(!o||"."===o||".."===o)throw new tr.ErrnoError(28);var i=tr.mayCreate(n,o);if(i)throw new tr.ErrnoError(i);if(!n.node_ops.mknod)throw new tr.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},create:(r,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,tr.mknod(r,e,0)),mkdir:(r,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,tr.mknod(r,e,0)),mkdirTree:(r,e)=>{for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{tr.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,e,t)=>(void 0===t&&(t=e,e=438),e|=8192,tr.mknod(r,e,t)),symlink:(r,e)=>{if(!Q.resolve(r))throw new tr.ErrnoError(44);var t=tr.lookupPath(e,{parent:!0}).node;if(!t)throw new tr.ErrnoError(44);var n=$.basename(e),o=tr.mayCreate(t,n);if(o)throw new tr.ErrnoError(o);if(!t.node_ops.symlink)throw new tr.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename:(r,e)=>{var t,n,o=$.dirname(r),i=$.dirname(e),a=$.basename(r),s=$.basename(e);if(t=tr.lookupPath(r,{parent:!0}).node,n=tr.lookupPath(e,{parent:!0}).node,!t||!n)throw new tr.ErrnoError(44);if(t.mount!==n.mount)throw new tr.ErrnoError(75);var u,c=tr.lookupNode(t,a),l=Q.relative(r,i);if("."!==l.charAt(0))throw new tr.ErrnoError(28);if("."!==(l=Q.relative(e,o)).charAt(0))throw new tr.ErrnoError(55);try{u=tr.lookupNode(n,s)}catch(r){}if(c!==u){var d=tr.isDir(c.mode),f=tr.mayDelete(t,a,d);if(f)throw new tr.ErrnoError(f);if(f=u?tr.mayDelete(n,s,d):tr.mayCreate(n,s))throw new tr.ErrnoError(f);if(!t.node_ops.rename)throw new tr.ErrnoError(63);if(tr.isMountpoint(c)||u&&tr.isMountpoint(u))throw new tr.ErrnoError(10);if(n!==t&&(f=tr.nodePermissions(t,"w")))throw new tr.ErrnoError(f);tr.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(r){throw r}finally{tr.hashAddNode(c)}}},rmdir:r=>{var e=tr.lookupPath(r,{parent:!0}).node,t=$.basename(r),n=tr.lookupNode(e,t),o=tr.mayDelete(e,t,!0);if(o)throw new tr.ErrnoError(o);if(!e.node_ops.rmdir)throw new tr.ErrnoError(63);if(tr.isMountpoint(n))throw new tr.ErrnoError(10);e.node_ops.rmdir(e,t),tr.destroyNode(n)},readdir:r=>{var e=tr.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new tr.ErrnoError(54);return e.node_ops.readdir(e)},unlink:r=>{var e=tr.lookupPath(r,{parent:!0}).node;if(!e)throw new tr.ErrnoError(44);var t=$.basename(r),n=tr.lookupNode(e,t),o=tr.mayDelete(e,t,!1);if(o)throw new tr.ErrnoError(o);if(!e.node_ops.unlink)throw new tr.ErrnoError(63);if(tr.isMountpoint(n))throw new tr.ErrnoError(10);e.node_ops.unlink(e,t),tr.destroyNode(n)},readlink:r=>{var e=tr.lookupPath(r).node;if(!e)throw new tr.ErrnoError(44);if(!e.node_ops.readlink)throw new tr.ErrnoError(28);return Q.resolve(tr.getPath(e.parent),e.node_ops.readlink(e))},stat:(r,e)=>{var t=tr.lookupPath(r,{follow:!e}).node;if(!t)throw new tr.ErrnoError(44);if(!t.node_ops.getattr)throw new tr.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>tr.stat(r,!0),chmod:(r,e,t)=>{var n;"string"==typeof r?n=tr.lookupPath(r,{follow:!t}).node:n=r;if(!n.node_ops.setattr)throw new tr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,e)=>{tr.chmod(r,e,!0)},fchmod:(r,e)=>{var t=tr.getStream(r);if(!t)throw new tr.ErrnoError(8);tr.chmod(t.node,e)},chown:(r,e,t,n)=>{var o;"string"==typeof r?o=tr.lookupPath(r,{follow:!n}).node:o=r;if(!o.node_ops.setattr)throw new tr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,e,t)=>{tr.chown(r,e,t,!0)},fchown:(r,e,t)=>{var n=tr.getStream(r);if(!n)throw new tr.ErrnoError(8);tr.chown(n.node,e,t)},truncate:(r,e)=>{if(e<0)throw new tr.ErrnoError(28);var t;"string"==typeof r?t=tr.lookupPath(r,{follow:!0}).node:t=r;if(!t.node_ops.setattr)throw new tr.ErrnoError(63);if(tr.isDir(t.mode))throw new tr.ErrnoError(31);if(!tr.isFile(t.mode))throw new tr.ErrnoError(28);var n=tr.nodePermissions(t,"w");if(n)throw new tr.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate:(r,e)=>{var t=tr.getStream(r);if(!t)throw new tr.ErrnoError(8);if(0==(2097155&t.flags))throw new tr.ErrnoError(28);tr.truncate(t.node,e)},utime:(r,e,t)=>{var n=tr.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open:(r,e,t,n,i)=>{if(""===r)throw new tr.ErrnoError(44);var a;if(t=void 0===t?438:t,t=64&(e="string"==typeof e?tr.modeStringToFlags(e):e)?4095&t|32768:0,"object"==typeof r)a=r;else{r=$.normalize(r);try{a=tr.lookupPath(r,{follow:!(131072&e)}).node}catch(r){}}var s=!1;if(64&e)if(a){if(128&e)throw new tr.ErrnoError(20)}else a=tr.mknod(r,t,0),s=!0;if(!a)throw new tr.ErrnoError(44);if(tr.isChrdev(a.mode)&&(e&=-513),65536&e&&!tr.isDir(a.mode))throw new tr.ErrnoError(54);if(!s){var u=tr.mayOpen(a,e);if(u)throw new tr.ErrnoError(u)}512&e&&tr.truncate(a,0),e&=-131713;var c=tr.createStream({node:a,path:tr.getPath(a),flags:e,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},n,i);return c.stream_ops.open&&c.stream_ops.open(c),!o.logReadFiles||1&e||(tr.readFiles||(tr.readFiles={}),r in tr.readFiles||(tr.readFiles[r]=1)),c},close:r=>{if(tr.isClosed(r))throw new tr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{tr.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,e,t)=>{if(tr.isClosed(r))throw new tr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new tr.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new tr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read:(r,e,t,n,o)=>{if(n<0||o<0)throw new tr.ErrnoError(28);if(tr.isClosed(r))throw new tr.ErrnoError(8);if(1==(2097155&r.flags))throw new tr.ErrnoError(8);if(tr.isDir(r.node.mode))throw new tr.ErrnoError(31);if(!r.stream_ops.read)throw new tr.ErrnoError(28);var i=void 0!==o;if(i){if(!r.seekable)throw new tr.ErrnoError(70)}else o=r.position;var a=r.stream_ops.read(r,e,t,n,o);return i||(r.position+=a),a},write:(r,e,t,n,o,i)=>{if(n<0||o<0)throw new tr.ErrnoError(28);if(tr.isClosed(r))throw new tr.ErrnoError(8);if(0==(2097155&r.flags))throw new tr.ErrnoError(8);if(tr.isDir(r.node.mode))throw new tr.ErrnoError(31);if(!r.stream_ops.write)throw new tr.ErrnoError(28);r.seekable&&1024&r.flags&&tr.llseek(r,0,2);var a=void 0!==o;if(a){if(!r.seekable)throw new tr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,i);return a||(r.position+=s),s},allocate:(r,e,t)=>{if(tr.isClosed(r))throw new tr.ErrnoError(8);if(e<0||t<=0)throw new tr.ErrnoError(28);if(0==(2097155&r.flags))throw new tr.ErrnoError(8);if(!tr.isFile(r.node.mode)&&!tr.isDir(r.node.mode))throw new tr.ErrnoError(43);if(!r.stream_ops.allocate)throw new tr.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap:(r,e,t,n,o,i)=>{if(0!=(2&o)&&0==(2&i)&&2!=(2097155&r.flags))throw new tr.ErrnoError(2);if(1==(2097155&r.flags))throw new tr.ErrnoError(2);if(!r.stream_ops.mmap)throw new tr.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o,i)},msync:(r,e,t,n,o)=>r&&r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,munmap:r=>0,ioctl:(r,e,t)=>{if(!r.stream_ops.ioctl)throw new tr.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile:(r,e={})=>{if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error(\'Invalid encoding type "\'+e.encoding+\'"\');var t,n=tr.open(r,e.flags),o=tr.stat(r).size,i=new Uint8Array(o);return tr.read(n,i,0,o,0),"utf8"===e.encoding?t=P(i,0):"binary"===e.encoding&&(t=i),tr.close(n),t},writeFile:(r,e,t={})=>{t.flags=t.flags||577;var n=tr.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(M(e)+1),i=F(e,o,0,o.length);tr.write(n,o,0,i,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");tr.write(n,e,0,e.byteLength,void 0,t.canOwn)}tr.close(n)},cwd:()=>tr.currentPath,chdir:r=>{var e=tr.lookupPath(r,{follow:!0});if(null===e.node)throw new tr.ErrnoError(44);if(!tr.isDir(e.node.mode))throw new tr.ErrnoError(54);var t=tr.nodePermissions(e.node,"x");if(t)throw new tr.ErrnoError(t);tr.currentPath=e.path},createDefaultDirectories:()=>{tr.mkdir("/tmp"),tr.mkdir("/home"),tr.mkdir("/home/web_user")},createDefaultDevices:()=>{tr.mkdir("/dev"),tr.registerDevice(tr.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n}),tr.mkdev("/dev/null",tr.makedev(1,3)),Z.register(tr.makedev(5,0),Z.default_tty_ops),Z.register(tr.makedev(6,0),Z.default_tty1_ops),tr.mkdev("/dev/tty",tr.makedev(5,0)),tr.mkdev("/dev/tty1",tr.makedev(6,0));var r=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return function(){return crypto.getRandomValues(r),r[0]}}return function(){L("randomDevice")}}();tr.createDevice("/dev","random",r),tr.createDevice("/dev","urandom",r),tr.mkdir("/dev/shm"),tr.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{tr.mkdir("/proc");var r=tr.mkdir("/proc/self");tr.mkdir("/proc/self/fd"),tr.mount({mount:()=>{var e=tr.createNode(r,"fd",16895,73);return e.node_ops={lookup:(r,e)=>{var t=+e,n=tr.getStream(t);if(!n)throw new tr.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:()=>{o.stdin?tr.createDevice("/dev","stdin",o.stdin):tr.symlink("/dev/tty","/dev/stdin"),o.stdout?tr.createDevice("/dev","stdout",null,o.stdout):tr.symlink("/dev/tty","/dev/stdout"),o.stderr?tr.createDevice("/dev","stderr",null,o.stderr):tr.symlink("/dev/tty1","/dev/stderr"),tr.open("/dev/stdin",0),tr.open("/dev/stdout",1),tr.open("/dev/stderr",1)},ensureErrnoError:()=>{tr.ErrnoError||(tr.ErrnoError=function(r,e){this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},tr.ErrnoError.prototype=new Error,tr.ErrnoError.prototype.constructor=tr.ErrnoError,[44].forEach((r=>{tr.genericErrors[r]=new tr.ErrnoError(r),tr.genericErrors[r].stack="<generic error, no stack>"})))},staticInit:()=>{tr.ensureErrnoError(),tr.nameTable=new Array(4096),tr.mount(er,{},"/"),tr.createDefaultDirectories(),tr.createDefaultDevices(),tr.createSpecialDirectories(),tr.filesystems={MEMFS:er}},init:(r,e,t)=>{tr.init.initialized=!0,tr.ensureErrnoError(),o.stdin=r||o.stdin,o.stdout=e||o.stdout,o.stderr=t||o.stderr,tr.createStandardStreams()},quit:()=>{tr.init.initialized=!1;for(var r=0;r<tr.streams.length;r++){var e=tr.streams[r];e&&tr.close(e)}},getMode:(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},findObject:(r,e)=>{var t=tr.analyzePath(r,e);return t.exists?t.object:null},analyzePath:(r,e)=>{try{r=(n=tr.lookupPath(r,{follow:!e})).path}catch(r){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=tr.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=$.basename(r),n=tr.lookupPath(r,{follow:!e}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(r){t.error=r.errno}return t},createPath:(r,e,t,n)=>{r="string"==typeof r?r:tr.getPath(r);for(var o=e.split("/").reverse();o.length;){var i=o.pop();if(i){var a=$.join2(r,i);try{tr.mkdir(a)}catch(r){}r=a}}return a},createFile:(r,e,t,n,o)=>{var i=$.join2("string"==typeof r?r:tr.getPath(r),e),a=tr.getMode(n,o);return tr.create(i,a)},createDataFile:(r,e,t,n,o,i)=>{var a=e;r&&(r="string"==typeof r?r:tr.getPath(r),a=e?$.join2(r,e):r);var s=tr.getMode(n,o),u=tr.create(a,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),l=0,d=t.length;l<d;++l)c[l]=t.charCodeAt(l);t=c}tr.chmod(u,146|s);var f=tr.open(u,577);tr.write(f,t,0,t.length,0,i),tr.close(f),tr.chmod(u,s)}return u},createDevice:(r,e,t,n)=>{var o=$.join2("string"==typeof r?r:tr.getPath(r),e),i=tr.getMode(!!t,!!n);tr.createDevice.major||(tr.createDevice.major=64);var a=tr.makedev(tr.createDevice.major++,0);return tr.registerDevice(a,{open:r=>{r.seekable=!1},close:r=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(r,e,n,o,i)=>{for(var a=0,s=0;s<o;s++){var u;try{u=t()}catch(r){throw new tr.ErrnoError(29)}if(void 0===u&&0===a)throw new tr.ErrnoError(6);if(null==u)break;a++,e[n+s]=u}return a&&(r.node.timestamp=Date.now()),a},write:(r,e,t,o,i)=>{for(var a=0;a<o;a++)try{n(e[t+a])}catch(r){throw new tr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),a}}),tr.mkdev(o,i,a)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!i)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=dr(i(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new tr.ErrnoError(29)}},createLazyFile:(r,e,t,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}},i.prototype.setDataGetter=function(r){this.getter=r},i.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn\'t load "+t+". Status: "+r.status);var e,n=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,i=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;o||(a=n);var s=this;s.setDataGetter((r=>{var e=r*a,o=(r+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=((r,e)=>{if(r>e)throw new Error("invalid range ("+r+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==a&&o.setRequestHeader("Range","bytes="+r+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn\'t load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):dr(o.responseText||"",!0)})(e,o)),void 0===s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,d("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a={isDevice:!1,url:t},s=tr.createFile(r,e,a,n,o);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(s.stream_ops).forEach((r=>{var e=s.stream_ops[r];u[r]=function(){return tr.forceLoadFile(s),e.apply(null,arguments)}})),u.read=(r,e,t,n,o)=>{tr.forceLoadFile(s);var i=r.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var u=0;u<a;u++)e[t+u]=i[o+u];else for(u=0;u<a;u++)e[t+u]=i.get(o+u);return a},s.stream_ops=u,s},createPreloadedFile:(r,e,t,n,o,i,s,u,c,l)=>{var d=e?Q.resolve($.join2(r,e)):r;function f(t){function a(t){l&&l(),u||tr.createDataFile(r,e,t,n,o,c),i&&i(),O()}Browser.handledByPreloadPlugin(t,d,a,(()=>{s&&s(),O()}))||a(t)}N(),"string"==typeof t?function(r,e,t,n){var o=n?"":"al "+r;a(r,(function(t){_(t,\'Loading data file "\'+r+\'" failed (no arrayBuffer).\'),e(new Uint8Array(t)),o&&O()}),(function(e){if(!t)throw\'Loading data file "\'+r+\'" failed.\';t()})),o&&N()}(t,(r=>f(r)),s):f(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=tr.indexedDB();try{var o=n.open(tr.DB_NAME(),tr.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=()=>{d("creating db"),o.result.createObjectStore(tr.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([tr.DB_STORE_NAME],"readwrite"),i=n.objectStore(tr.DB_STORE_NAME),a=0,s=0,u=r.length;function c(){0==s?e():t()}r.forEach((r=>{var e=i.put(tr.analyzePath(r).object.contents,r);e.onsuccess=()=>{++a+s==u&&c()},e.onerror=()=>{s++,a+s==u&&c()}})),n.onerror=t},o.onerror=t},loadFilesFromDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=tr.indexedDB();try{var o=n.open(tr.DB_NAME(),tr.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([tr.DB_STORE_NAME],"readonly")}catch(r){return void t(r)}var a=i.objectStore(tr.DB_STORE_NAME),s=0,u=0,c=r.length;function l(){0==u?e():t()}r.forEach((r=>{var e=a.get(r);e.onsuccess=()=>{tr.analyzePath(r).exists&&tr.unlink(r),tr.createDataFile($.dirname(r),$.basename(r),e.result,!0,!0,!0),++s+u==c&&l()},e.onerror=()=>{u++,s+u==c&&l()}})),i.onerror=t},o.onerror=t}},nr={DEFAULT_POLLMASK:5,calculateAt:function(r,e,t){if("/"===e[0])return e;var n;if(-100===r)n=tr.cwd();else{var o=tr.getStream(r);if(!o)throw new tr.ErrnoError(8);n=o.path}if(0==e.length){if(!t)throw new tr.ErrnoError(44);return n}return $.join2(n,e)},doStat:function(r,e,t){try{var n=r(e)}catch(r){if(r&&r.node&&$.normalize(e)!==$.normalize(tr.getPath(r.node)))return-54;throw r}return k[t>>2]=n.dev,k[t+4>>2]=0,k[t+8>>2]=n.ino,k[t+12>>2]=n.mode,k[t+16>>2]=n.nlink,k[t+20>>2]=n.uid,k[t+24>>2]=n.gid,k[t+28>>2]=n.rdev,k[t+32>>2]=0,G=[n.size>>>0,(H=n.size,+Math.abs(H)>=1?H>0?(0|Math.min(+Math.floor(H/4294967296),4294967295))>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],k[t+40>>2]=G[0],k[t+44>>2]=G[1],k[t+48>>2]=4096,k[t+52>>2]=n.blocks,k[t+56>>2]=n.atime.getTime()/1e3|0,k[t+60>>2]=0,k[t+64>>2]=n.mtime.getTime()/1e3|0,k[t+68>>2]=0,k[t+72>>2]=n.ctime.getTime()/1e3|0,k[t+76>>2]=0,G=[n.ino>>>0,(H=n.ino,+Math.abs(H)>=1?H>0?(0|Math.min(+Math.floor(H/4294967296),4294967295))>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],k[t+80>>2]=G[0],k[t+84>>2]=G[1],0},doMsync:function(r,e,t,n,o){var i=g.slice(r,r+t);tr.msync(e,i,o,t,n)},doMkdir:function(r,e){return"/"===(r=$.normalize(r))[r.length-1]&&(r=r.substr(0,r.length-1)),tr.mkdir(r,e,0),0},doMknod:function(r,e,t){switch(61440&e){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return tr.mknod(r,e,t),0},doReadlink:function(r,e,t){if(t<=0)return-28;var n=tr.readlink(r),o=Math.min(t,M(n)),i=E[e+o];return F(n,g,e,t+1),E[e+o]=i,o},doAccess:function(r,e){if(-8&e)return-28;var t=tr.lookupPath(r,{follow:!0}).node;if(!t)return-44;var n="";return 4&e&&(n+="r"),2&e&&(n+="w"),1&e&&(n+="x"),n&&tr.nodePermissions(t,n)?-2:0},doDup:function(r,e,t){var n=tr.getStream(t);return n&&tr.close(n),tr.open(r,e,0,t,t).fd},doReadv:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=k[e+8*i>>2],s=k[e+(8*i+4)>>2],u=tr.read(r,E,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o},doWritev:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=k[e+8*i>>2],s=k[e+(8*i+4)>>2],u=tr.write(r,E,a,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return nr.varargs+=4,k[nr.varargs-4>>2]},getStr:function(r){return x(r)},getStreamFromFD:function(r){var e=tr.getStream(r);if(!e)throw new tr.ErrnoError(8);return e},get64:function(r,e){return r}};var or=[];function ir(r){try{return m.grow(r-y.byteLength+65535>>>16),R(m.buffer),1}catch(r){}}var ar={};function sr(){if(!sr.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:u||"./this.program"};for(var e in ar)void 0===ar[e]?delete r[e]:r[e]=ar[e];var t=[];for(var e in r)t.push(e+"="+r[e]);sr.strings=t}return sr.strings}var ur=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=tr.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},cr=365,lr=146;function dr(r,e,t){var n=t>0?t:M(r)+1,o=new Array(n),i=F(r,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(ur.prototype,{read:{get:function(){return(this.mode&cr)===cr},set:function(r){r?this.mode|=cr:this.mode&=-366}},write:{get:function(){return(this.mode&lr)===lr},set:function(r){r?this.mode|=lr:this.mode&=-147}},isFolder:{get:function(){return tr.isDir(this.mode)}},isDevice:{get:function(){return tr.isChrdev(this.mode)}}}),tr.FSNode=ur,tr.staticInit();var fr={s:function(r,e){return function(r,e){var t;if(0===r)t=Date.now();else{if(1!==r&&4!==r)return K(28),-1;t=V()}return k[e>>2]=t/1e3|0,k[e+4>>2]=t%1e3*1e3*1e3|0,0}(r,e)},j:function(r,e,t,n){try{return e=nr.getStr(e),e=nr.calculateAt(r,e),nr.doAccess(e,t)}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},i:function(r,e,t){nr.varargs=t;try{var n=nr.getStreamFromFD(r);switch(e){case 0:return(o=nr.get())<0?-28:tr.open(n.path,n.flags,0,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=nr.get();return n.flags|=o,0;case 5:o=nr.get();return b[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return K(28),-1}}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},z:function(r,e){try{var t=nr.getStreamFromFD(r);return nr.doStat(tr.stat,t.path,e)}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},x:function(r,e,t,n){try{e=nr.getStr(e);var o=256&n,i=4096&n;return n&=-4353,e=nr.calculateAt(r,e,i),nr.doStat(o?tr.lstat:tr.stat,e,t)}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},A:function(r,e,t){nr.varargs=t;try{var n=nr.getStreamFromFD(r);switch(e){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=nr.get();return k[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:o=nr.get();return tr.ioctl(n,e,o);default:L("bad ioctl syscall "+e)}}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},d:function(r,e,t){nr.varargs=t;try{var n=nr.getStr(r),o=t?nr.get():0;return tr.open(n,e,o).fd}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},y:function(r,e){try{return r=nr.getStr(r),nr.doStat(tr.stat,r,e)}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},r:function(r){try{return r=nr.getStr(r),tr.unlink(r),0}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},p:function(){throw 1/0},t:function(r,e,t,n,o,i,a,s){try{var u=tr.getStream(o);if(!u)return-8;var c=tr.mmap(u,r,e,i,t,n),l=c.ptr;return k[a>>2]=c.allocated,l}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},u:function(r,e,t,n,o,i){try{var a=tr.getStream(o);a&&(2&t&&nr.doMsync(r,a,e,n,i),tr.munmap(a))}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},o:function(){L("")},C:function(r,e,t){var n=function(r,e){var t;for(or.length=0,e>>=2;t=g[r++];){var n=t<105;n&&1&e&&e++,or.push(n?D[e++>>1]:k[e]),++e}return or}(e,t);return J[r].apply(null,n)},B:function(r,e,t){g.copyWithin(r,e,e+t)},q:function(r){var e,t,n=g.length,o=2147483648;if((r>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,r+100663296),ir(Math.min(o,(e=Math.max(r,a))+((t=65536)-e%t)%t)))return!0}return!1},v:function(r,e){var t=0;return sr().forEach((function(n,o){var i=e+t;k[r+4*o>>2]=i,function(r,e,t){for(var n=0;n<r.length;++n)E[e++>>0]=r.charCodeAt(n);t||(E[e>>0]=0)}(n,i),t+=n.length+1})),0},w:function(r,e){var t=sr();k[r>>2]=t.length;var n=0;return t.forEach((function(r){n+=r.length+1})),k[e>>2]=n,0},e:function(r){!function(r,e){!function(r){v||(o.onExit&&o.onExit(r),w=!0);c(r,new Ar(r))}(r)}(r)},c:function(r){try{var e=nr.getStreamFromFD(r);return tr.close(e),0}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return r.errno}},g:function(r,e,t,n){try{var o=nr.getStreamFromFD(r),i=nr.doReadv(o,e,t);return k[n>>2]=i,0}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return r.errno}},n:function(r,e,t,n,o){try{var i=nr.getStreamFromFD(r),a=4294967296*t+(e>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(tr.llseek(i,a,n),G=[i.position>>>0,(H=i.position,+Math.abs(H)>=1?H>0?(0|Math.min(+Math.floor(H/4294967296),4294967295))>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],k[o>>2]=G[0],k[o+4>>2]=G[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return r.errno}},h:function(r,e,t,n){try{var o=nr.getStreamFromFD(r),i=nr.doWritev(o,e,t);return k[n>>2]=i,0}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return r.errno}},b:function(){return h},k:function(r){var e=Date.now();return k[r>>2]=e/1e3|0,k[r+4>>2]=e%1e3*1e3|0,0},l:function(r,e,t,n,o,i,a){var s=Dr();try{return Y(r)(e,t,n,o,i,a)}catch(r){if(Sr(s),r!==r+0)throw r;kr(1,0)}},m:function(r,e){var t=Dr();try{Y(r)(e)}catch(r){if(Sr(t),r!==r+0)throw r;kr(1,0)}},a:function(r){h=r},f:function(r){var e=Date.now()/1e3|0;return r&&(k[r>>2]=e),e}};!function(){var r={a:fr};function e(r,e){var t,n=r.exports;o.asm=n,R((m=o.asm.D).buffer),S=o.asm.M,t=o.asm.E,j.unshift(t),O()}function t(r){e(r.instance)}function i(e){return(p||"function"!=typeof fetch?Promise.resolve().then((function(){return W(I)})):fetch(I,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at \'"+I+"\'";return r.arrayBuffer()})).catch((function(){return W(I)}))).then((function(e){return WebAssembly.instantiate(e,r)})).then((function(r){return r})).then(e,(function(r){f("failed to asynchronously prepare wasm: "+r),L(r)}))}if(N(),o.instantiateWasm)try{return o.instantiateWasm(r,e)}catch(r){return f("Module.instantiateWasm callback failed with error: "+r),!1}(p||"function"!=typeof WebAssembly.instantiateStreaming||q(I)||"function"!=typeof fetch?i(t):fetch(I,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(t,(function(r){return f("wasm streaming compile failed: "+r),f("falling back to ArrayBuffer instantiation"),i(t)}))}))).catch(n)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.E).apply(null,arguments)};var pr=o._emscripten_bind_VoidPtr___destroy___0=function(){return(pr=o._emscripten_bind_VoidPtr___destroy___0=o.asm.F).apply(null,arguments)},hr=o._emscripten_bind_Graphviz_Graphviz_2=function(){return(hr=o._emscripten_bind_Graphviz_Graphviz_2=o.asm.G).apply(null,arguments)},mr=o._emscripten_bind_Graphviz_version_0=function(){return(mr=o._emscripten_bind_Graphviz_version_0=o.asm.H).apply(null,arguments)},vr=o._emscripten_bind_Graphviz_lastError_0=function(){return(vr=o._emscripten_bind_Graphviz_lastError_0=o.asm.I).apply(null,arguments)},wr=o._emscripten_bind_Graphviz_layout_3=function(){return(wr=o._emscripten_bind_Graphviz_layout_3=o.asm.J).apply(null,arguments)},_r=o._emscripten_bind_Graphviz_createFile_2=function(){return(_r=o._emscripten_bind_Graphviz_createFile_2=o.asm.K).apply(null,arguments)},yr=o._emscripten_bind_Graphviz___destroy___0=function(){return(yr=o._emscripten_bind_Graphviz___destroy___0=o.asm.L).apply(null,arguments)};o._malloc=function(){return(o._malloc=o.asm.N).apply(null,arguments)},o._free=function(){return(o._free=o.asm.O).apply(null,arguments)};var Er,gr=o.___errno_location=function(){return(gr=o.___errno_location=o.asm.P).apply(null,arguments)},br=o._emscripten_builtin_memalign=function(){return(br=o._emscripten_builtin_memalign=o.asm.Q).apply(null,arguments)},kr=o._setThrew=function(){return(kr=o._setThrew=o.asm.R).apply(null,arguments)},Dr=o.stackSave=function(){return(Dr=o.stackSave=o.asm.S).apply(null,arguments)},Sr=o.stackRestore=function(){return(Sr=o.stackRestore=o.asm.T).apply(null,arguments)};function Ar(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function Pr(r){function e(){Er||(Er=!0,o.calledRun=!0,w||(o.noFSInit||tr.init.initialized||tr.init(),tr.ignorePermissions=!1,X(j),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)r=o.postRun.shift(),z.unshift(r);var r;X(z)}()))}T>0||(!function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),C.unshift(r);var r;X(C)}(),T>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(B=function r(){Er||Pr(),Er||(B=r)},o.run=Pr,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function xr(){}function Fr(r){return(r||xr).__cache__}function Mr(r,e){var t=Fr(e),n=t[r];return n||((n=Object.create((e||xr).prototype)).ptr=r,t[r]=n)}Pr(),xr.prototype=Object.create(xr.prototype),xr.prototype.constructor=xr,xr.prototype.__class__=xr,xr.__cache__={},o.WrapperObject=xr,o.getCache=Fr,o.wrapPointer=Mr,o.castObject=function(r,e){return Mr(r.ptr,e)},o.NULL=Mr(0),o.destroy=function(r){if(!r.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";r.__destroy__(),delete Fr(r.__class__)[r.ptr]},o.compare=function(r,e){return r.ptr===e.ptr},o.getPointer=function(r){return r.ptr},o.getClass=function(r){return r.__class__};var Rr={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(Rr.needed){for(var r=0;r<Rr.temps.length;r++)o._free(Rr.temps[r]);Rr.temps.length=0,o._free(Rr.buffer),Rr.buffer=0,Rr.size+=Rr.needed,Rr.needed=0}Rr.buffer||(Rr.size+=128,Rr.buffer=o._malloc(Rr.size),_(Rr.buffer)),Rr.pos=0},alloc:function(r,e){_(Rr.buffer);var t,n=e.BYTES_PER_ELEMENT,i=r.length*n;return i=i+7&-8,Rr.pos+i>=Rr.size?(_(i>0),Rr.needed+=i,t=o._malloc(i),Rr.temps.push(t)):(t=Rr.buffer+Rr.pos,Rr.pos+=i),t},copy:function(r,e,t){switch(t>>>=0,e.BYTES_PER_ELEMENT){case 2:t>>>=1;break;case 4:t>>>=2;break;case 8:t>>>=3}for(var n=0;n<r.length;n++)e[t+n]=r[n]}};function Cr(r){if("string"==typeof r){var e=dr(r),t=Rr.alloc(e,E);return Rr.copy(e,E,t),t}return r}function jr(){throw"cannot construct a VoidPtr, no constructor in IDL"}function zr(r,e){r&&"object"==typeof r&&(r=r.ptr),e&&"object"==typeof e&&(e=e.ptr),this.ptr=hr(r,e),Fr(zr)[this.ptr]=this}return jr.prototype=Object.create(xr.prototype),jr.prototype.constructor=jr,jr.prototype.__class__=jr,jr.__cache__={},o.VoidPtr=jr,jr.prototype.__destroy__=jr.prototype.__destroy__=function(){var r=this.ptr;pr(r)},zr.prototype=Object.create(xr.prototype),zr.prototype.constructor=zr,zr.prototype.__class__=zr,zr.__cache__={},o.Graphviz=zr,zr.prototype.version=zr.prototype.version=function(){var r=this.ptr;return x(mr(r))},zr.prototype.lastError=zr.prototype.lastError=function(){var r=this.ptr;return x(vr(r))},zr.prototype.layout=zr.prototype.layout=function(r,e,t){var n=this.ptr;return Rr.prepare(),r=r&&"object"==typeof r?r.ptr:Cr(r),e=e&&"object"==typeof e?e.ptr:Cr(e),t=t&&"object"==typeof t?t.ptr:Cr(t),x(wr(n,r,e,t))},zr.prototype.createFile=zr.prototype.createFile=function(r,e){var t=this.ptr;Rr.prepare(),r=r&&"object"==typeof r?r.ptr:Cr(r),e=e&&"object"==typeof e?e.ptr:Cr(e),_r(t,r,e)},zr.prototype.__destroy__=zr.prototype.__destroy__=function(){var r=this.ptr;yr(r)},e.ready}})();r.exports=t}(u);var c=u.exports,l=Object.freeze(e({__proto__:null,default:c},[u.exports])),d=function(){return d=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r},d.apply(this,arguments)},f=function(r,e,t){if(t||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return r.concat(n||Array.prototype.slice.call(e))};function p(r){return{path:r.path,data:\'<?xml version="1.0" encoding="UTF-8" standalone="no"?>\\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\\n<svg width="\'.concat(r.width,\'" height="\').concat(r.height,\'"></svg>\')}}function h(r,e){var t,n=d({images:[],files:[]},e);f(f([],n.files,!0),(t=n.images,t.map(p)),!0).forEach((function(e){return r.createFile(e.path,e.data)}))}var m={layout:function(r,e,t,n){return void 0===e&&(e="svg"),void 0===t&&(t="dot"),r?s(l,null==n?void 0:n.wasmFolder,null==n?void 0:n.wasmBinary).then((function(o){var i=new o.Graphviz(void 0!==(null==n?void 0:n.yInvert)&&(null==n?void 0:n.yInvert),void 0!==(null==n?void 0:n.nop)?null==n?void 0:n.nop:0);h(i,n);var a=i.layout(r,e,t);if(o.destroy(i),!a)throw new Error(o.Graphviz.prototype.lastError());return a})):Promise.resolve("")},circo:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"circo",t)},dot:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"dot",t)},fdp:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"fdp",t)},sfdp:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"sfdp",t)},neato:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"neato",t)},osage:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"osage",t)},patchwork:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"patchwork",t)},twopi:function(r,e,t){return void 0===e&&(e="svg"),this.layout(r,e,"twopi",t)}},v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var w={exports:{}};\n/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.8+1e68dce6\n */function _(r){return void 0!==r.children}!function(r,e){r.exports=function(){function r(r){var e=typeof r;return null!==r&&("object"===e||"function"===e)}function e(r){return"function"==typeof r}var t=Array.isArray?Array.isArray:function(r){return"[object Array]"===Object.prototype.toString.call(r)},n=0,o=void 0,i=void 0,a=function(r,e){E[n]=r,E[n+1]=e,2===(n+=2)&&(i?i(g):k())};function s(r){i=r}function u(r){a=r}var c="undefined"!=typeof window?window:void 0,l=c||{},d=l.MutationObserver||l.WebKitMutationObserver,f="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function h(){return function(){return process.nextTick(g)}}function m(){return void 0!==o?function(){o(g)}:y()}function w(){var r=0,e=new d(g),t=document.createTextNode("");return e.observe(t,{characterData:!0}),function(){t.data=r=++r%2}}function _(){var r=new MessageChannel;return r.port1.onmessage=g,function(){return r.port2.postMessage(0)}}function y(){var r=setTimeout;return function(){return r(g,1)}}var E=new Array(1e3);function g(){for(var r=0;r<n;r+=2)(0,E[r])(E[r+1]),E[r]=void 0,E[r+1]=void 0;n=0}function b(){try{var r=Function("return this")().require("vertx");return o=r.runOnLoop||r.runOnContext,m()}catch(r){return y()}}var k=void 0;function D(r,e){var t=this,n=new this.constructor(P);void 0===n[A]&&J(n);var o=t._state;if(o){var i=arguments[o-1];a((function(){return G(o,n,i,t._result)}))}else U(t,n,r,e);return n}function S(r){var e=this;if(r&&"object"==typeof r&&r.constructor===e)return r;var t=new e(P);return N(t,r),t}k=f?h():d?w():p?_():void 0===c?b():y();var A=Math.random().toString(36).substring(2);function P(){}var x=void 0,F=1,M=2;function R(){return new TypeError("You cannot resolve a promise with itself")}function C(){return new TypeError("A promises callback cannot return that same promise.")}function j(r,e,t,n){try{r.call(e,t,n)}catch(r){return r}}function z(r,e,t){a((function(r){var n=!1,o=j(t,e,(function(t){n||(n=!0,e!==t?N(r,t):L(r,t))}),(function(e){n||(n=!0,I(r,e))}),"Settle: "+(r._label||" unknown promise"));!n&&o&&(n=!0,I(r,o))}),r)}function T(r,e){e._state===F?L(r,e._result):e._state===M?I(r,e._result):U(e,void 0,(function(e){return N(r,e)}),(function(e){return I(r,e)}))}function B(r,t,n){t.constructor===r.constructor&&n===D&&t.constructor.resolve===S?T(r,t):void 0===n?L(r,t):e(n)?z(r,t,n):L(r,t)}function N(e,t){if(e===t)I(e,R());else if(r(t)){var n=void 0;try{n=t.then}catch(r){return void I(e,r)}B(e,t,n)}else L(e,t)}function O(r){r._onerror&&r._onerror(r._result),H(r)}function L(r,e){r._state===x&&(r._result=e,r._state=F,0!==r._subscribers.length&&a(H,r))}function I(r,e){r._state===x&&(r._state=M,r._result=e,a(O,r))}function U(r,e,t,n){var o=r._subscribers,i=o.length;r._onerror=null,o[i]=e,o[i+F]=t,o[i+M]=n,0===i&&r._state&&a(H,r)}function H(r){var e=r._subscribers,t=r._state;if(0!==e.length){for(var n=void 0,o=void 0,i=r._result,a=0;a<e.length;a+=3)n=e[a],o=e[a+t],n?G(t,n,o,i):o(i);r._subscribers.length=0}}function G(r,t,n,o){var i=e(n),a=void 0,s=void 0,u=!0;if(i){try{a=n(o)}catch(r){u=!1,s=r}if(t===a)return void I(t,C())}else a=o;t._state!==x||(i&&u?N(t,a):!1===u?I(t,s):r===F?L(t,a):r===M&&I(t,a))}function q(r,e){try{e((function(e){N(r,e)}),(function(e){I(r,e)}))}catch(e){I(r,e)}}var W=0;function V(){return W++}function J(r){r[A]=W++,r._state=void 0,r._result=void 0,r._subscribers=[]}function X(){return new Error("Array Methods must be provided an Array")}var Y=function(){function r(r,e){this._instanceConstructor=r,this.promise=new r(P),this.promise[A]||J(this.promise),t(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?L(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&L(this.promise,this._result))):I(this.promise,X())}return r.prototype._enumerate=function(r){for(var e=0;this._state===x&&e<r.length;e++)this._eachEntry(r[e],e)},r.prototype._eachEntry=function(r,e){var t=this._instanceConstructor,n=t.resolve;if(n===S){var o=void 0,i=void 0,a=!1;try{o=r.then}catch(r){a=!0,i=r}if(o===D&&r._state!==x)this._settledAt(r._state,e,r._result);else if("function"!=typeof o)this._remaining--,this._result[e]=r;else if(t===er){var s=new t(P);a?I(s,i):B(s,r,o),this._willSettleAt(s,e)}else this._willSettleAt(new t((function(e){return e(r)})),e)}else this._willSettleAt(n(r),e)},r.prototype._settledAt=function(r,e,t){var n=this.promise;n._state===x&&(this._remaining--,r===M?I(n,t):this._result[e]=t),0===this._remaining&&L(n,this._result)},r.prototype._willSettleAt=function(r,e){var t=this;U(r,void 0,(function(r){return t._settledAt(F,e,r)}),(function(r){return t._settledAt(M,e,r)}))},r}();function K(r){return new Y(this,r).promise}function $(r){var e=this;return t(r)?new e((function(t,n){for(var o=r.length,i=0;i<o;i++)e.resolve(r[i]).then(t,n)})):new e((function(r,e){return e(new TypeError("You must pass an array to race."))}))}function Q(r){var e=new this(P);return I(e,r),e}function Z(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function rr(){throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.")}var er=function(){function r(e){this[A]=V(),this._result=this._state=void 0,this._subscribers=[],P!==e&&("function"!=typeof e&&Z(),this instanceof r?q(this,e):rr())}return r.prototype.catch=function(r){return this.then(null,r)},r.prototype.finally=function(r){var t=this,n=t.constructor;return e(r)?t.then((function(e){return n.resolve(r()).then((function(){return e}))}),(function(e){return n.resolve(r()).then((function(){throw e}))})):t.then(r,r)},r}();function tr(){var r=void 0;if(void 0!==v)r=v;else if("undefined"!=typeof self)r=self;else try{r=Function("return this")()}catch(r){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=r.Promise;if(e){var t=null;try{t=Object.prototype.toString.call(e.resolve())}catch(r){}if("[object Promise]"===t&&!e.cast)return}r.Promise=er}return er.prototype.then=D,er.all=K,er.race=$,er.resolve=S,er.reject=Q,er._setScheduler=s,er._setAsap=u,er._asap=a,er.polyfill=tr,er.Promise=er,er}()}(w),w.exports.polyfill();var y=function(r){var e=[];return r.children.forEach((function(r){_(r)?e.push(y(r)):e.push(E(r))})),"subgraph cluster_".concat(r.id,\' {\\nid="\').concat(r.id,\'";\\nlabel="\').concat(r.text,\'";\\nmargin=16;\\n\').concat(e.join("\\n"),"\\n}")},E=function(r){return"".concat(r.id,\' [id="\').concat(r.id,\'" label="\').concat(r.text,\'" width=\').concat(k(r.width)," height=").concat(k(r.height),"]")},g=function(r){return 96*r/72},b=function(r){return 96*r},k=function(r){return r/96};function D(r){var e=r?r.split(",").map((function(r){return g(+r)})):[0,0,0,0],t=e[0],n=e[1],o=e[2]-t,i=e[3]-n;return{x:t-o/2,y:n-i/2,width:o,height:i}}function S(r,e){var t=r.split(",").map((function(r){return g(+r)})),n=t[0],o=t[1];return{x:-n+e.width,y:-o+e.height}}function A(r,e,t){return void 0===t&&(t="json"),m[r](e,t).then((function(r){return"json"===t?JSON.parse(r):r}))}function P(e,t){if(self.document=self.document||{currentScript:{src:t.wasmFolder+"/dummy.js"}},e.raw)return A(t.engine,e.raw,"svg");var n={},o=[],i=[],a={},s=[],u=[],c={},l=[],d=[];function f(r,e){_(r)?(n[r.id]=r,o.push(r),r.children.forEach((function(r){return f(r,!1)})),e&&i.push(y(r))):(a[r.id]=r,s.push(r),e&&u.push(E(r)))}return e.items.forEach((function(r){return f(r,!0)})),e.links.forEach((function(r){var e,t,n,o;c[r.id]=r,l.push(r),d.push((e=r.source.id,t=r.target.id,n=r.id,o=r.text,"".concat(e," -> ").concat(t,\' [id="\').concat(n,\'", label="\').concat(o,\'"]\')))})),A(t.engine,"digraph G {\\n graph [fontname=Verdana,fontsize=11.0];\\n graph [rankdir=TB];\\n node [shape=rect,fontname=Verdana,fontsize=11.0,fixedsize=true];\\n edge [fontname=Verdana,fontsize=11.0];\\n\\n".concat(i.join("\\n"),"\\n\\n").concat(d.join("\\n"),"\\n\\n").concat(u.join("\\n"),"\\n}")).then((function(e){var t=D(e.bb);return e.objects&&e.objects.forEach((function(r){if(r.nodes){var e=function(r,e){var t=D(r);return{x:-t.x+e.width,y:-t.y+e.height,width:t.width,height:t.height}}(r.bb,t),o=n[r.id];o.x=e.x-t.width/2,o.y=e.y-t.height/2,o.width=e.width,o.height=e.height}else{var i=(u=r.pos,c=r.width,l=r.height,d=S(u,t),f=b(+c),p=b(+l),{x:d.x,y:d.y,width:f,height:p}),s=a[r.id];s&&(s.x=i.x-t.width/2,s.y=i.y-t.height/2)}var u,c,l,d,f,p})),e.edges&&e.edges.forEach((function(e){var n=c[e.id];n&&(n.points=function(e,t){if(e.pos){var n=e.pos.substr(2).split(" ").map((function(r){return S(r,t)})).map((function(r){return[r.x-t.width/2,r.y-t.height/2]})),o=n.shift();return r(r([],n,!0),[o],!1)}return[]}(e,t))})),{clusters:o,nodes:s,links:l}}))}self.onmessage=function(r){P.apply(void 0,r.data).then((function(r){self.postMessage(r)}))}}();'],{type:"application/javascript"}),n=URL.createObjectURL(r),o=new Worker(n);return{terminate:function(){return o.terminate()},response:new Promise((function(r){o.onmessage=function(e){r(e.data),o.terminate(),URL.revokeObjectURL(n)},o.postMessage([e,t])}))}}var U_=E().x((function(e){return e[0]})).y((function(e){return e[1]})).curve(I),W_=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o._engine=r,o._wasmFolder=n,o}return s(t,e),t.prototype.start=function(){var t=this;e.prototype.start.call(this);var r=this._graph.size(),n=this._graph.graphData(),o={};return H_({items:n.hierarchy((function(e,t,r){switch(e){case"subgraph":return{id:t.id,text:t.props.text,children:r};case"vertex":delete t.fx,delete t.fy;var n=t.element.node().getBBox(),i={id:t.id,text:t.props.text,width:n.width,height:n.height};return o[i.id]=i,i}})),links:n.allEdges().map((function(e){return{id:e.props.id,source:o[e.source.id],target:o[e.target.id],text:e.props.label||""}})),raw:""},{engine:this._engine,wasmFolder:this._wasmFolder}).response.then((function(e){return t.running()&&(e.clusters.forEach((function(e){var t=n.subgraph(e.id);t.x=e.x+r.width/2-e.width,t.y=e.y+r.height/2-e.height,t.props.width=e.width,t.props.height=e.height})),e.nodes.forEach((function(e){var t=n.vertex(e.id);t.x=e.x+r.width/2,t.y=e.y+r.height/2})),e.links.forEach((function(e){var t=n.edge(e.id);t.points=l(l([[t.source.x,t.source.y]],void 0!==e.points?e.points.map((function(e){return[e[0]+r.width/2,e[1]+r.height/2]})):[],!0),[[t.target.x,t.target.y]],!1)})),t._graph.moveSubgraphs(!0).moveVertices(!0).moveEdges(!0),t.stop()),t}))},t.prototype.edgePath=function(t,r){var n=this,o=[],i=!1;return t.points&&(o=t.points.map((function(e){var t=n._graph.project(e[0],!1),r=n._graph.project(e[1],!1);return(isNaN(t)||isNaN(r))&&(i=!0),[t,r]}))),i||o.length<2?e.prototype.edgePath.call(this,t,r):{path:U_(o),labelPos:this.center(o)}},t}(P_),q_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){return t.stop(),t}))},t}(P_);function X_(e,t){return e.parent===t.parent?1:2}function K_(e,t){return e+t.x}function $_(e,t){return Math.max(e,t.y)}function J_(){var e=X_,t=1,r=1,n=!1;function o(o){var i,a=0;o.eachAfter((function(t){var r=t.children;r?(t.x=function(e){return e.reduce(K_,0)/e.length}(r),t.y=function(e){return 1+e.reduce($_,0)}(r)):(t.x=i?a+=e(t,i):0,t.y=0,i=t)}));var s=function(e){for(var t;t=e.children;)e=t[0];return e}(o),u=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(o),c=s.x-e(s,u)/2,h=u.x+e(u,s)/2;return o.eachAfter(n?function(e){e.x=(e.x-o.x)*t,e.y=(o.y-e.y)*r}:function(e){e.x=(e.x-c)/(h-c)*t,e.y=(1-(o.y?e.y/o.y:1))*r})}return o.separation=function(t){return arguments.length?(e=t,o):e},o.size=function(e){return arguments.length?(n=!1,t=+e[0],r=+e[1],o):n?null:[t,r]},o.nodeSize=function(e){return arguments.length?(n=!0,t=+e[0],r=+e[1],o):n?[t,r]:null},o}function Q_(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function Z_(e,t){var r,n,o,i,a,s=new nm(e),u=+e.value&&(s.value=e.value),c=[s];for(null==t&&(t=em);r=c.pop();)if(u&&(r.value=+r.data.value),(o=t(r.data))&&(a=o.length))for(r.children=new Array(a),i=a-1;i>=0;--i)c.push(n=r.children[i]=new nm(o[i])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(rm)}function em(e){return e.children}function tm(e){e.data=e.data.data}function rm(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function nm(e){this.data=e,this.depth=this.height=0,this.parent=null}function om(e,t){return e.parent===t.parent?1:2}function im(e){var t=e.children;return t?t[0]:e.t}function am(e){var t=e.children;return t?t[t.length-1]:e.t}function sm(e,t,r){var n=r/(t.i-e.i);t.c-=n,t.s+=r,e.c+=n,t.z+=r,t.m+=r}function um(e,t,r){return e.a.parent===t.parent?e.a:r}function cm(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function hm(){var e=om,t=1,r=1,n=null;function o(o){var u=function(e){for(var t,r,n,o,i,a=new cm(e,0),s=[a];t=s.pop();)if(n=t._.children)for(t.children=new Array(i=n.length),o=i-1;o>=0;--o)s.push(r=t.children[o]=new cm(n[o],o)),r.parent=t;return(a.parent=new cm(null,0)).children=[a],a}(o);if(u.eachAfter(i),u.parent.m=-u.z,u.eachBefore(a),n)o.eachBefore(s);else{var c=o,h=o,l=o;o.eachBefore((function(e){e.x<c.x&&(c=e),e.x>h.x&&(h=e),e.depth>l.depth&&(l=e)}));var f=c===h?1:e(c,h)/2,d=f-c.x,p=t/(h.x+f+d),g=r/(l.depth||1);o.eachBefore((function(e){e.x=(e.x+d)*p,e.y=e.depth*g}))}return o}function i(t){var r=t.children,n=t.parent.children,o=t.i?n[t.i-1]:null;if(r){!function(e){for(var t,r=0,n=0,o=e.children,i=o.length;--i>=0;)(t=o[i]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(t);var i=(r[0].z+r[r.length-1].z)/2;o?(t.z=o.z+e(t._,o._),t.m=t.z-i):t.z=i}else o&&(t.z=o.z+e(t._,o._));t.parent.A=function(t,r,n){if(r){for(var o,i=t,a=t,s=r,u=i.parent.children[0],c=i.m,h=a.m,l=s.m,f=u.m;s=am(s),i=im(i),s&&i;)u=im(u),(a=am(a)).a=t,(o=s.z+l-i.z-c+e(s._,i._))>0&&(sm(um(s,t,n),t,o),c+=o,h+=o),l+=s.m,c+=i.m,f+=u.m,h+=a.m;s&&!am(a)&&(a.t=s,a.m+=l-h),i&&!im(u)&&(u.t=i,u.m+=c-f,n=t)}return n}(t,o,t.parent.A||n[0])}function a(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*r}return o.separation=function(t){return arguments.length?(e=t,o):e},o.size=function(e){return arguments.length?(n=!1,t=+e[0],r=+e[1],o):n?null:[t,r]},o.nodeSize=function(e){return arguments.length?(n=!0,t=+e[0],r=+e[1],o):n?[t,r]:null},o}!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=t._graph.size(),r=t._graph.graphData();return r.allEdges().forEach((function(e){return delete e.points})),r.allVertices().forEach((function(t){delete t.fx,delete t.fy,t.x=e.width/2+5*Math.random()-2.5,t.y=e.height/2+5*Math.random()-2.5})),t._graph.moveVertices(!0).moveEdges(!0),t.stop(),t}))}}(P_),nm.prototype=Z_.prototype={constructor:nm,count:function(){return this.eachAfter(Q_)},each:function(e){var t,r,n,o,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(e(i),r=i.children)for(n=0,o=r.length;n<o;++n)a.push(r[n])}while(a.length);return this},eachAfter:function(e){for(var t,r,n,o=this,i=[o],a=[];o=i.pop();)if(a.push(o),t=o.children)for(r=0,n=t.length;r<n;++r)i.push(t[r]);for(;o=a.pop();)e(o);return this},eachBefore:function(e){for(var t,r,n=this,o=[n];n=o.pop();)if(e(n),t=n.children)for(r=t.length-1;r>=0;--r)o.push(t[r]);return this},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,o=n&&n.length;--o>=0;)r+=n[o].value;t.value=r}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),o=null;e=r.pop(),t=n.pop();for(;e===t;)o=e,e=r.pop(),t=n.pop();return o}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var o=n.length;e!==r;)n.splice(o,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(r){r!==e&&t.push({source:r.parent,target:r})})),t},copy:function(){return Z_(this).eachBefore(tm)}},cm.prototype=Object.create(nm.prototype);var lm=A().x((function(e){return e.x})).y((function(e){return e.y})),fm=function(){function e(e,t,r,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=e),void 0===n&&(n=t),this.x1=e,this.y1=t,this.x2=r,this.y2=n}return Object.defineProperty(e.prototype,"x",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.x2-this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.y2-this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"center",{get:function(){return{x:this.x1+this.width/2,y:this.y1+this.height/2}},enumerable:!1,configurable:!0}),e.prototype.reset=function(e,t){this.x1=e,this.x2=e,this.y1=t,this.y2=t},e.prototype.expand=function(e,t){this.x1>e?this.x1=e:this.x2<e&&(this.x2=e),this.y1>t?this.y1=t:this.y2<t&&(this.y2=t)},e}(),dm=function(e){function t(t,r){var n=e.call(this,t)||this;return n.options=r,n._visited={},n}return s(t,e),t.prototype.sortTree=function(e,t){var r=this;t||(t=this._tree),t.children.sort((function(t,r){return e.neighbors(r.origData.id).length-e.neighbors(t.origData.id).length}));var n=[];t.children.forEach((function(e,t){t%2==0?n.push(e):n.unshift(e)})),t.children=n,t.children.forEach((function(t){return r.sortTree(e,t)}))},t.prototype.depthFirst=function(e,t,r){var n=this;if(void 0===r&&(this._visited={},this._tree=void 0),!this._visited[t.id]){this._visited[t.id]=t;var o={origData:t,children:[]};void 0===r?this._tree=o:r.children.push(o),e.neighbors(t.id).forEach((function(t){return n.depthFirst(e,t,o)}))}},t.prototype.breadthFirst=function(e,t){var r=this;this._visited={},this._visited[t.id]=t,this._tree={origData:t,children:[]};var n=[];n.push(this._tree);for(var o=function(){var t=n.shift();e.neighbors(t.origData.id).forEach((function(e){if(!r._visited[e.id]){r._visited[e.id]=e;var o={origData:e,children:[]};t.children.push(o),n.push(o)}}))};n.length;)o();this.sortTree(e)},t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){for(var e,r=t._graph.graphData(),n=0,o=r.allVertices();n<o.length;n++){var i=o[n];if(delete i.fx,delete i.fy,void 0===e&&(e=i),i.centroid){e=i;break}}return r.allEdges().forEach((function(e){return delete e.points})),t.breadthFirst(r,e),t._d3Hierarchy=Z_(t._tree),t}))},t.prototype.finalize=function(e){var t=this._graph.size(),r=new fm;e.forEach((function(e,t){0===t?r.reset(e.origData.x,e.origData.y):r.expand(e.origData.x,e.origData.y)}));var n=t.width/2-r.center.x,o=t.height/2-r.center.y;e.forEach((function(e){e.origData.x+=n,e.origData.y+=o})),this._graph.moveVertices(!0).moveEdges(!0),this.stop()},t}(P_),pm=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.options=r,n}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=hm().nodeSize(["TB"===t.options.rankdir?200:100,"TB"===t.options.rankdir?100:200])(t._d3Hierarchy).descendants().map((function(e){return e.data.origData.x="TB"===t.options.rankdir?e.x:e.y,e.data.origData.y="TB"===t.options.rankdir?e.y:e.x,e.data}));return t.finalize(e),t}))},t.prototype.edgePath=function(e,t){var r=this._graph.projectPlacholder(e.source),n=this._graph.projectPlacholder(e.target);return{path:lm({source:r,target:n}),labelPos:this.center([[r.x,r.y],[n.x,n.y]])}},t}(dm),gm=function(e){function t(t){return e.call(this,t,{})||this}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=hm().size([2*Math.PI,512]).separation((function(e,t){return(e.parent==t.parent?1:2)/e.depth}))(t._d3Hierarchy).descendants().map((function(e){return e.data.origData.angle=e.x,e.data.origData.radius=e.y,e.data.origData.x=Math.sin(e.x)*e.y,e.data.origData.y=Math.cos(e.x)*e.y,e.data}));return t.finalize(e),t}))},t}(dm),vm=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.options=r,n}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=J_().nodeSize(["TB"===t.options.rankdir?200:100,"TB"===t.options.rankdir?100:200])(t._d3Hierarchy).descendants().map((function(e){return e.data.origData.x="TB"===t.options.rankdir?e.x:e.y,e.data.origData.y="TB"===t.options.rankdir?e.y:e.x,e.data}));return t.finalize(e),t}))},t.prototype.edgePath=function(e,t){var r=this._graph.projectPlacholder(e.source),n=this._graph.projectPlacholder(e.target);return{path:lm({source:r,target:n}),labelPos:this.center([[r.x,r.y],[n.x,n.y]])}},t}(dm),ym=function(e){function t(t){return e.call(this,t,{})||this}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=J_().size([2*Math.PI,512]).separation((function(e,t){return(e.parent==t.parent?1:2)/e.depth}))(t._d3Hierarchy).descendants().map((function(e){return e.data.origData.x=Math.sin(e.x)*e.y,e.data.origData.y=Math.cos(e.x)*e.y,e.data}));return t.finalize(e),t}))},t}(dm);L(".graph_Graph2 .allowDragging .graphVertex,.graph_Graph2 .graphVertex{cursor:pointer}.graph_Graph2 .allowDragging .graphVertex.grabbed{cursor:grabbing}.graph_Graph2 .graphEdge{stroke:#a9a9a9;fill:none}.graph_Graph2 .graphEdge>text{stroke:none;fill:#000}.graph_Graph2 .graphEdge.hide-text>text{display:none}.graph_Graph2 g.selected circle,.graph_Graph2 g.selected rect{stroke:red!important}");var _m="".concat(r.getScriptSrc("/graph/lib-umd/graph2/graph")||r.getScriptSrc("/graph/dist/index")||".","/graph/dist"),mm=function(e){e.fx=e.sx=e.x,e.fy=e.sy=e.y},bm=function(e,t){e.fx=e.sx+t.fx-t.sx,e.fy=e.sy+t.fy-t.sy},wm=function(e){e.x=e.fx,e.y=e.fy,e.fx=e.sx=void 0,e.fy=e.sy=void 0},xm=function(e){function n(){var n=e.call(this)||this;n._toggleHierarchy=(new t.ToggleButton).faChar("fa-sitemap").tooltip("Hierarchy").on("click",(function(){return n.layoutClick("Hierarchy")})),n._toggleForceDirected=(new t.ToggleButton).faChar("fa-expand").tooltip("Force Directed").on("click",(function(){return n.layoutClick("ForceDirected")})),n._toggleForceDirected2=(new t.ToggleButton).faChar("fa-arrows").tooltip("Spring").on("click",(function(){return n.layoutClick("ForceDirected2")})),n._toggleCircle=(new t.ToggleButton).faChar("fa-circle-o").tooltip("Circle").on("click",(function(){return n.layoutClick("Circle")})),n._toggleDot=(new t.ToggleButton).faChar("fa-angle-double-down").tooltip("DOT").on("click",(function(){return n.layoutClick("DOT")})),n._toggleNeato=(new t.ToggleButton).faChar("fa-sun-o").tooltip("Neato").on("click",(function(){return n.layoutClick("Neato")})),n._toggleFDP=(new t.ToggleButton).faChar("fa-asterisk").tooltip("FDP").on("click",(function(){return n.layoutClick("FDP")})),n._toggleTwoPI=(new t.ToggleButton).faChar("fa-bullseye").tooltip("TwoPI").on("click",(function(){return n.layoutClick("TwoPI")})),n._toggleCirco=(new t.ToggleButton).faChar("fa-cogs").tooltip("Circo").on("click",(function(){return n.layoutClick("Circo")})),n._toggleT=(new t.ToggleButton).faChar("fa-sitemap fa-rotate-270").tooltip("Tree").on("click",(function(){return n.layoutClick("Tree")})),n._toggleRT=(new t.ToggleButton).faChar("fa-sun-o").tooltip("Radial Tree").on("click",(function(){return n.layoutClick("RadialTree")})),n._toggleD=(new t.ToggleButton).faChar("fa-sitemap fa-rotate-270").tooltip("Dendrogram").on("click",(function(){return n.layoutClick("Dendrogram")})),n._toggleRD=(new t.ToggleButton).faChar("fa-asterisk").tooltip("Radial Dendrogram").on("click",(function(){return n.layoutClick("RadialDendrogram")})),n._graphData=(new r.Graph2).idFunc((function(e){return e.id})).sourceFunc((function(e){return e.source.id})).targetFunc((function(e){return e.target.id})).updateFunc((function(e,t){return e.props=t.props,e})),n._prevDoClickTime=0,n._tooltip=new i.HTMLTooltip,n._selection=new t.Utility.Selection(n),n._dragHandler=t.drag(),n._catPalette=t.Palette.ordinal("hpcc10"),n._categories=[],n._annotations=[],n._origData={subgraphs:[],vertices:[],edges:[],hierarchy:[]},n._layoutAlgo=new q_(n),n.highlight={zoom:1.1,opacity:.33,edge:"1.25px"},n._centroidRenderer=o.Vertex,n._vertexRenderer=o.Vertex,n._transformScale=1;var a=n;n._drawStartPos="origin";var s=[n._toggleHierarchy,n._toggleForceDirected,n._toggleForceDirected2,n._toggleCircle,new t.Spacer,n._toggleDot,n._toggleNeato,n._toggleFDP,n._toggleTwoPI,n._toggleCirco,new t.Spacer,n._toggleT,n._toggleRT,n._toggleD,n._toggleRD,new t.Spacer];return n._iconBar.buttons(s.concat(n._iconBar.buttons())),n._dragHandler.on("start",(function(e){if(a.allowDragging()){t.select(this).classed("grabbed",!0),mm(e),t.Utility.safeRaise(this),a.moveVertexPlaceholder(e,!1,!0);var r=a.selection();a.selected(e.props,r)?r.filter((function(t){return t.id!==e.props.id})).forEach((function(e){var t=a._graphData.vertex(e.id);mm(t)})):a.dragSingleNeighbors()&&a._graphData.singleNeighbors(e.id).forEach((function(e){mm(e)}))}})).on("drag",(function(e){if(a.allowDragging()){e.fx=e.sx+a.rproject(t.d3Event().x-e.sx),e.fy=e.sy+a.rproject(t.d3Event().y-e.sy),a._graphData.vertexEdges(e.id).forEach((function(e){return delete e.points})),a.moveVertexPlaceholder(e,!1,!0);var r=a.selection();a.selected(e.props,r)?r.filter((function(t){return t.id!==e.props.id})).forEach((function(t){var r=a._graphData.vertex(t.id);bm(r,e),a.moveVertexPlaceholder(r,!1,!0)})):a.dragSingleNeighbors()&&a._graphData.singleNeighbors(e.id).forEach((function(t){bm(t,e),a.moveVertexPlaceholder(t,!1,!0)}))}})).on("end",(function(e){var r=!0;if(a.allowDragging()){r=Math.abs(e.sx-e.fx)<1&&Math.abs(e.sy-e.fy)<1,wm(e);var n=a.selection();a.selected(e.props,n)?n.filter((function(t){return t.id!==e.props.id})).forEach((function(e){var t=a._graphData.vertex(e.id);wm(t)})):a.dragSingleNeighbors()&&a._graphData.singleNeighbors(e.id).forEach(wm),t.select(this).classed("grabbed",!1)}if(r){a._selection.click({_id:e.id,element:function(){return e.element}},t.d3Event().sourceEvent),a.selectionChanged();var o=e.element.classed("selected");a.vertex_click(e.props.origData||e.props,"",o);var i=Date.now();i-a._prevDoClickTime<a.doubleClickMaxDelay()&&a.vertex_dblclick(e.props.origData||e.props,"",o),a._prevDoClickTime=i}})).filter((function(){return!0})),n.zoomToFitLimit(1),n}return s(n,e),n.prototype.iconBarButtons=function(){return this._iconBar.buttons()},n.prototype.categories=function(e){return void 0===e?this._categories:(this._categories=e,this)},n.prototype.annotations=function(e){return void 0===e?this._annotations:(this._annotations=e,this)},n.prototype.data=function(e,t){var r=this;return void 0===e?this._origData:(this._origData=e,this._graphData.mergeSubgraphs((e.subgraphs||[]).map((function(e){return{id:e.id,props:e}}))),this._graphData.mergeVertices((e.vertices||[]).map((function(e){return{id:e.id,centroid:e.centroid,props:e}}))),this._graphData.mergeEdges((e.edges||[]).filter((function(e){return r._graphData.vertexExists(e.source.id)&&r._graphData.vertexExists(e.target.id)})).map((function(e){return{id:e.id,props:e,source:r._graphData.vertex(e.source.id),target:r._graphData.vertex(e.target.id)}}))),this._graphData.clearParents(),(e.hierarchy?e.hierarchy:[]).forEach((function(e){r._graphData.subgraphExists(e.child.id)?r._graphData.subgraphParent(e.child.id,e.parent.id):r._graphData.vertexExists(e.child.id)&&r._graphData.vertexParent(e.child.id,e.parent.id)})),this)},n.prototype.selected=function(e,t){return(t||this.selection()).some((function(t){return t.id===e.id}))},n.prototype.selection=function(e){var t=this;return arguments.length?(this._selection.set(e.map((function(e){var r=t._graphData.item(e.id);return{_id:r.id,element:function(){return r.element}}}))),this):this._selection.get().map((function(e){return t._graphData.item(e._id).props}))},n.prototype.graphData=function(){return this._graphData},n.prototype.resetLayout=function(){return delete this._prevLayout,this},n.prototype.layoutRunning=function(){return this._layoutAlgo&&this._layoutAlgo.running()},n.prototype.layoutAlgo=function(e){var t=this;return this._layoutAlgo&&this._layoutAlgo.stop(),this._layoutAlgo=e,this._layoutAlgo.start().then((function(){t.updateIconBar(),t.applyScaleOnLayout()&&setTimeout((function(){t.zoomToFit()}),t.transitionDuration())}))},n.prototype.layoutClick=function(e){this.layoutRunning()?(this._layoutAlgo.stop(),this.updateIconBar()):(delete this._prevLayout,this.layout(e).render())},n.prototype.updateIconBarItem=function(e,t){var r=this.layout(),n=this._layoutAlgo&&this._layoutAlgo.running();e.enabled(!n||r===t).selected(n&&r===t).render()},n.prototype.updateIconBar=function(){e.prototype.updateIconBar.call(this),this.updateIconBarItem(this._toggleHierarchy,"Hierarchy"),this.updateIconBarItem(this._toggleDot,"DOT"),this.updateIconBarItem(this._toggleForceDirected,"ForceDirected"),this.updateIconBarItem(this._toggleNeato,"Neato"),this.updateIconBarItem(this._toggleFDP,"FDP"),this.updateIconBarItem(this._toggleForceDirected2,"ForceDirected2"),this.updateIconBarItem(this._toggleCircle,"Circle"),this.updateIconBarItem(this._toggleTwoPI,"TwoPI"),this.updateIconBarItem(this._toggleCirco,"Circo"),this.updateIconBarItem(this._toggleT,"Tree"),this.updateIconBarItem(this._toggleRT,"RadialTree"),this.updateIconBarItem(this._toggleD,"Dendrogram"),this.updateIconBarItem(this._toggleRD,"RadialDendrogram")},n.prototype.getNeighborMap=function(e){var t={},r={};if(e)for(var n=this._graphData.vertexEdges(e.id),o=0;o<n.length;++o){var i=this._graphData.edge(n[o].id);r[i.id]=i,i.source.id!==e.id&&(t[i.source.id]=i.source),i.target.id!==e.id&&(t[i.target.id]=i.target)}return{vertices:t,edges:r}},n.prototype.centerOnItem=function(e){var t,r,n,o=this._graphData.item(e);if((this._graphData.isSubgraph(o)||this._graphData.isVertex(o))&&(r=o.x,n=o.y),this._graphData.isEdge(o)&&(r=(t=[0,0])[0],n=t[1]),void 0!==r&&void 0!==n){var i=o.element.node().getBBox();if(this._graphData.isVertex(o)){var a=this.projectPlacholder(o);r=a.x,n=a.y}else this._graphData.isSubgraph(o)&&(r=this.project(o.x),n=this.project(o.y));var s=i.x+i.width/2,u=i.y+i.height/2,c={x:r+s-i.width/2,y:n+u-i.height/2,width:i.width,height:i.height};this.centerOnBBox(c)}},n.prototype.hideVertex=function(e){var t=this._graphData.item(e);return this._graphData.isVertex(t)&&(t.props.hidden=!0),this},n.prototype.showVertex=function(e){var t=this._graphData.item(e);return this._graphData.isVertex(t)&&(t.props.hidden=!1),this},n.prototype.highlightVerticies=function(e){var t=this,r=this,n=this._vertexG.selectAll(".graphVertex"),i=!r.showVertexLabels()&&r.showVertexLabelsOnHighlight();return n.classed("graphVertex-highlighted",(function(t){return!e||e[t.id]})).style("filter",(function(r){return e&&e[r.id]?"url(#"+t.id()+"_glow)":null})).each((function(t){if(i){var n=r.calcProps(t.centroid,u({showLabel:!(!e||!e[t.id])},r.vertexMapper(t.props,t.props.origData)));o.render(t.centroid?r._centroidRenderer:r._vertexRenderer,n,this)}})).transition().duration(this.transitionDuration()).on("end",(function(t){e&&e[t.id]&&t.element.node()&&t.element.node().parentNode&&t.element.node().parentNode.appendChild(t.element.node())})).style("opacity",(function(t){return t.props.hidden?0:!e||e[t.id]?1:r.highlight.opacity})),this},n.prototype.highlightEdges=function(e){var t=this;return this._edgeG.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:t.edgeStrokeWidth()+"px"})).transition().duration(this.transitionDuration()).style("opacity",(function(r){return r.source.props.hidden||r.target.props.hidden?0:!e||e[r.id]?1:t.highlight.opacity})),this},n.prototype.highlightVertex=function(e,t){if(this.highlightOnMouseOverVertex())if(t){var r=this.getNeighborMap(t);r.vertices[t.id]=t,this.highlightVerticies(r.vertices),this.highlightEdges(r.edges)}else this.highlightVerticies(null),this.highlightEdges(null)},n.prototype.highlightEdge=function(e,t){if(this.highlightOnMouseOverEdge())if(t){var r={};r[t.source.id]=t.source,r[t.target.id]=t.target;var n={};n[t.id]=t,this.highlightVerticies(r),this.highlightEdges(n)}else this.highlightVerticies(null),this.highlightEdges(null)},n.prototype.moveSubgraphPlaceholder=function(e,t){var r=this.project(e.x),n=this.project(e.y),i=this.project(e.props.width,!0),a=this.project(e.props.height,!0);return e.element&&(t?e.element.transition():e.element).attr("transform","translate(".concat(r," ").concat(n,")")).each((function(e){o.render(o.Subgraph,u(u({},e.props),{width:i,height:a}),this)})),this},n.prototype.moveEdgePlaceholder=function(e,t){var r,n,o=this._layoutAlgo.edgePath(e,this.edgeArcDepth());if(e.elementPath&&(t?e.elementPath.transition():e.elementPath).attr("d",o.path).attr("stroke-dasharray",(function(e){return e.props.strokeDasharray})),e.elementText){var i=null!==(n=null===(r=e.props.label)||void 0===r?void 0:r.split("\n"))&&void 0!==n?n:[];e.elementText.selectAll(".textLine").data(i,(function(e){return e})).join((function(e){return e.append("tspan").attr("class","textLine").attr("x",0)}),(function(e){return e.attr("dy",(function(e,t){return"".concat(t,"em")})).text((function(e){return e}))}),(function(e){return e.remove()})),(t?e.elementText.transition():e.elementText).attr("transform","translate(".concat(o.labelPos[0]," ").concat(o.labelPos[1],")")).attr("font-family",(function(e){return e.props.fontFamily||null}))}return this},n.prototype.moveVertexPlaceholder=function(e,t,r){var n=this,o=this.projectPlacholder(e),i=o.x,a=o.y;return e.element&&(t?e.element.transition():e.element).attr("transform","translate(".concat(i," ").concat(a,")")),r&&this._graphData.vertexEdges(e.id).forEach((function(e){return n.moveEdgePlaceholder(e,t)})),this},n.prototype.moveSubgraphs=function(e){var t=this;return this._graphData.allSubgraphs().forEach((function(r){return t.moveSubgraphPlaceholder(r,e)})),this},n.prototype.moveEdges=function(e){var t=this;return this._graphData.allEdges().forEach((function(r){return t.moveEdgePlaceholder(r,e)})),this},n.prototype.moveVertices=function(e){var t=this;return this._graphData.allVertices().forEach((function(r){return t.moveVertexPlaceholder(r,e,!1)})),this},n.prototype.project=function(e,t){void 0===t&&(t=!1);e=void 0!==e?e:0;var r=this._transformScale;return t&&(this._transformScale>this.maxScale()+(this._transformScale-this.maxScale())/2?r=this.maxScale()+(this._transformScale-this.maxScale())/2:(this._transformScale,this.minScale(),this._transformScale,this.minScale())),Math.round(e*r*10)/10},n.prototype.rproject=function(e){return e=void 0!==e?e:0,Math.round(e/this._transformScale*10)/10},n.prototype.projectPlacholder=function(e){return{x:this.project(void 0!==e.fx?e.fx:e.x),y:this.project(void 0!==e.fy?e.fy:e.y)}},n.prototype.categoryID=function(e,t){return void 0===t&&(t="cat"),void 0===e||""===e?"":"".concat(t).concat(this.id(),"_").concat(e)},n.prototype.updateCategories=function(){var e=this;o.render(o.Icons,{icons:this._categories.map((function(t){return u(u({},t),{id:e.categoryID(t.id),fill:t.fill||"transparent",imageCharFill:t.imageCharFill||e._catPalette(t.id)})}))},this._svgDefsCat.node())},n.prototype.updateAnnotations=function(){var e=this;o.render(o.Icons,{icons:this._annotations.map((function(t){return u(u({},t),{id:e.categoryID(t.id,"ann"),shape:t.shape||"square",height:t.height||12,fill:t.fill||e._catPalette(t.id)})}))},this._svgDefsAnn.node())},n.prototype.updateEdges=function(){var e=this,r=this;return this._edgeG.selectAll(".graphEdge").data(this._graphData.allEdges(),(function(e){return e.id})).join((function(e){return e.append("g").attr("class","graphEdge").on("click.selectionBag",(function(e){r._selection.click({_id:e.id,element:function(){return e.element}},t.d3Event()),r.selectionChanged()})).on("click",(function(e){var t=e.element.classed("selected");r.edge_click(e.props.origData||e.props,"",t)})).on("mouseover",(function(e){t.Utility.safeRaise(this),r.edge_mouseover(t.select(this),e)})).on("mouseout",(function(e){r.edge_mouseout(t.select(this),e)})).each((function(e){e.element=t.select(this),e.elementPath=e.element.append("path"),e.elementText=e.element.append("text").attr("text-anchor","middle")}))}),(function(e){return e.attr("opacity",(function(e){return e.source.props.hidden||e.target.props.hidden?0:1})).classed("hide-text",!r.showEdgeLabels())}),(function(e){return e.each((function(e){delete e.element})).remove()})).style("stroke",(function(t){var r,n;return null!==(n=null===(r=t.props)||void 0===r?void 0:r.color)&&void 0!==n?n:e.edgeColor()})).style("stroke-width",this.edgeStrokeWidth()+"px"),this},n.prototype.centroidRenderer=function(e){return arguments.length?(this._centroidRenderer=e,this):this._centroidRenderer},n.prototype.vertexRenderer=function(e){return arguments.length?(this._vertexRenderer=e,this):this._vertexRenderer},n.prototype.vertexMapper=function(e,t){var r=this;return u(u({},e),{categoryID:this.categoryID(e.categoryID),annotationIDs:e.annotationIDs?e.annotationIDs.map((function(e){return r.categoryID(e,"ann")})):[]})},n.prototype.updateVertices=function(){var e=this,r=this;return this._vertexG.selectAll(".graphVertex").data(this._graphData.allVertices(),(function(e){return e.id})).join((function(n){return n.append("g").attr("class","graphVertex").on("dblclick",(function(e){t.d3Event().stopPropagation()})).on("mousein",(function(e){t.Utility.safeRaise(this),r.highlightVertex(t.select(this),e);var n=e.element.classed("selected");r.vertex_mousein(e.props.origData||e.props,"",n)})).on("mouseover",(function(e){t.Utility.safeRaise(this),r.highlightVertex(t.select(this),e);var n=e.element.classed("selected");e.props.tooltip&&r._tooltip.tooltipHTML(r.tooltipHTML.bind(r)).triggerElement(e.element).tooltipWidth(r.tooltipWidth()).tooltipHeight(r.tooltipHeight()).enablePointerEvents(r.enableTooltipPointerEvents()).closeDelay(r.tooltipCloseDelay()).direction("n").data(e).visible(!0).render(),r.vertex_mouseover(e.props.origData||e.props,"",n)})).on("mouseout",(function(e){r.highlightVertex(null,null);var t=e.element.classed("selected");r.vertex_mouseout(e.props.origData||e.props,"",t),e.props.tooltip&&r._tooltip.mouseout()})).call(e._dragHandler).each((function(e){e.element=t.select(this)}))}),(function(e){return e}),(function(e){return e.each((function(e){delete e.element})).remove()})).classed("centroid",(function(e){return e.centroid})).attr("opacity",(function(e){return e.props.hidden?0:1})).attr("filter",(function(t){return t.centroid?"url(#"+e.id()+"_glow)":null})).each((function(e){var t=r.calcProps(e.centroid,u({showLabel:r.showVertexLabels()},r.vertexMapper(e.props,e.props.origData)));o.render(e.centroid?r._centroidRenderer:r._vertexRenderer,t,this)})),this},n.prototype.calcProps=function(e,t){t.icon||(t.icon={}),e?(t.textHeight=t.textHeight?t.textHeight:this.centroidTextHeight()*this.centroidScale(),t.textPadding=t.textPadding?t.textPadding:this.centroidTextPadding()*this.centroidScale(),t.textFontFamily=t.textFontFamily?t.textFontFamily:this.centroidLabelFontFamily(),t.icon.height=t.icon.height?t.icon.height:this.centroidIconHeight()*this.centroidScale(),t.icon.padding=t.icon.padding?t.icon.padding:this.centroidIconPadding()*this.centroidScale(),t.icon.strokeWidth=t.icon.strokeWidth?t.icon.strokeWidth:this.centroidIconStrokeWidth(),t.icon.imageFontFamily=t.icon.imageFontFamily?t.icon.imageFontFamily:this.centroidIconFontFamily()):(t.textHeight=t.textHeight?t.textHeight:this.vertexTextHeight(),t.textPadding=t.textPadding?t.textPadding:this.vertexTextPadding(),t.textFontFamily=t.textFontFamily?t.textFontFamily:this.vertexLabelFontFamily(),t.icon.height=t.icon.height?t.icon.height:this.vertexIconHeight(),t.icon.padding=t.icon.padding?t.icon.padding:this.vertexIconPadding(),t.icon.strokeWidth=t.icon.strokeWidth?t.icon.strokeWidth:this.vertexIconStrokeWidth(),t.icon.imageFontFamily=t.icon.imageFontFamily?t.icon.imageFontFamily:this.vertexIconFontFamily());var r=t.icon.imageChar,n=t.icon.imageFontFamily,o=t.icon.height-t.icon.padding,i=this.textRect(r,n,o);return t.icon.yOffset=-(i.top-o/2)-i.height/2+(t.icon.padding>0?o/t.icon.padding/2:0),t},n.prototype.hasSubgraphs=function(){switch(this.layout()){case"DOT":case"Hierarchy":return!0}return!1},n.prototype.updateSubgraphs=function(){var e=this;return this._subgraphG.selectAll(".subgraphPlaceholder").data(this.hasSubgraphs()?this._graphData.allSubgraphs():[],(function(e){return e.id})).join((function(r){return r.append("g").attr("class","subgraphPlaceholder").on("click.selectionBag",(function(r){e._selection.click({_id:r.id,element:function(){return r.element}},t.d3Event()),e.selectionChanged()})).on("click",(function(t){var r=t.element.classed("selected");e.subgraph_click(t.props.origData||t.props,"",r)})).on("mouseover",(function(){t.Utility.safeRaise(this)})).each((function(e){e.element=t.select(this)}))}),(function(e){return e}),(function(e){return e.each((function(e){delete e.element})).transition().style("opacity",0).remove()})).each((function(t){e.moveSubgraphPlaceholder(t,!1)})),this},n.prototype.enter=function(r,n){var o=this;e.prototype.enter.call(this,r,n);var i=this.locateSVGNode(r);this._svgDefs=t.select(i).select("defs"),this._centroidFilter=new t.SVGGlowFilter(this._svgDefs,this._id+"_glow"),this._svgDefsCat=this._svgDefs.append("g"),this._svgDefsAnn=this._svgDefs.append("g"),this._subgraphG=this._renderElement.append("g"),this._edgeG=this._renderElement.append("g"),this._vertexG=this._renderElement.append("g"),this._tooltip.target(r),this.on("startMarqueeSelection",(function(){})).on("updateMarqueeSelection",(function(e){var t=o._graphData.allVertices().filter((function(t){return t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height}));o.selection(t.map((function(e){return e.props})))})).on("endMarqueeSelection",(function(){o.selectionChanged()}))},n.prototype.forceDirectedOptions=function(){return{alpha:this.forceDirectedAlpha(),alphaMin:this.forceDirectedAlphaMin(),alphaDecay:this.forceDirectedAlphaDecay(),velocityDecay:this.forceDirectedVelocityDecay(),repulsionStrength:this.forceDirectedRepulsionStrength(),iterations:this.forceDirectedIterations(),linkDistance:this.forceDirectedLinkDistance(),linkStrength:this.forceDirectedLinkStrength(),pinCentroid:this.forceDirectedPinCentroid(),forceStrength:this.forceDirectedForceStrength(),distanceMin:this.forceDirectedMinDistance(),distanceMax:this.forceDirectedMaxDistance()}},n.prototype.layoutOptions=function(e){switch(e){case"ForceDirected":case"ForceDirected2":case"ForceDirectedHybrid":return this.forceDirectedOptions();case"Hierarchy":return{rankdir:this.hierarchyRankDirection(),nodesep:this.hierarchyNodeSeparation(),edgesep:this.hierarchyEdgeSeparation(),ranksep:this.hierarchyRankSeparation(),digraph:this.hierarchyDigraph()};case"Tree":case"Dendrogram":return{rankdir:this.treeRankDirection()};case"DOT":case"Neato":case"FDP":case"TwoPI":case"Circo":return this.wasmFolder()||_m;default:return}},n.prototype.updateLayout=function(){var e=this,t=this.layout(),n=this.layoutOptions(t),o=r.hashSum([t,n]);if(this._prevLayout!==o)switch(this._prevLayout=o,t){case"None":this.layoutAlgo(new q_(this));break;case"Circle":this.layoutAlgo(new N_(this));break;case"ForceDirected":this.layoutAlgo(new V_(this,n));break;case"ForceDirected2":this.layoutAlgo(new G_(this,n));break;case"ForceDirectedHybrid":this.layoutAlgo(new V_(this,n)).then((function(){e.layoutAlgo(new G_(e,n))}));break;case"Hierarchy":this.layoutAlgo(new B_(this,n));break;case"DOT":this.layoutAlgo(new W_(this,"dot",n));break;case"Tree":this.layoutAlgo(new pm(this,n));break;case"RadialTree":this.layoutAlgo(new gm(this));break;case"Dendrogram":this.layoutAlgo(new vm(this,n));break;case"RadialDendrogram":this.layoutAlgo(new ym(this));break;case"Neato":this.layoutAlgo(new W_(this,"neato",n));break;case"FDP":this.layoutAlgo(new W_(this,"fdp",n));break;case"TwoPI":this.layoutAlgo(new W_(this,"twopi",n));break;case"Circo":this.layoutAlgo(new W_(this,"circo",n))}},n.prototype.update=function(t,r){e.prototype.update.call(this,t,r),this._centroidFilter.update(this.centroidColor()),this._renderElement.classed("allowDragging",this.allowDragging()),this.updateCategories(),this.updateAnnotations(),this.updateSubgraphs(),this.updateVertices(),this.updateEdges(),this.updateLayout(),this.updateIconBar()},n.prototype.exit=function(t,r){e.prototype.exit.call(this,t,r),this._tooltip.target(null)},n.prototype.render=function(t){var r=this;return this.progress("start"),e.prototype.render.call(this,(function(e){r.progress("stop"),t&&t(e)})),this},n.prototype.zoomed=function(t){e.prototype.zoomed.call(this,t);var r=this.size(),n=r.width,o=r.height;t.k<this.minScale()?(this._edgeG.attr("transform","scale(".concat(this.minScale()/t.k,")")),this._subgraphG.attr("transform","scale(".concat(this.minScale()/t.k,")")),this._vertexG.attr("transform","scale(".concat(this.minScale()/t.k,")")),this._transformScale=t.k/this.minScale()):t.k>this.maxScale()?(this._edgeG.attr("transform","scale(".concat(this.maxScale()/t.k,")")),this._subgraphG.attr("transform","scale(".concat(this.maxScale()/t.k,")")),this._vertexG.attr("transform","scale(".concat(this.maxScale()/t.k,")")),this._transformScale=t.k/this.maxScale()):(this._transformScale=1,this._edgeG.attr("transform",null),this._subgraphG.attr("transform",null),this._vertexG.attr("transform",null)),this._prevTransformScale===this._transformScale&&this._prevWidth===n&&this._prevHeight===o||(this._prevTransformScale=this._transformScale,this._prevWidth=n,this._prevHeight=o,this.moveSubgraphs(!1).moveVertices(!1).moveEdges(!1))},n.prototype.centroids=function(){return this._graphData.allVertices().filter((function(e){return!!e.centroid}))},n.prototype.selectionChanged=function(){var e=this;if(this.highlightSelectedPathToCentroid()){var t={};this.centroids().forEach((function(r){e.selection().forEach((function(n){var o=e._graphData.dijkstra(r.id,n.id),i=o.ids;o.len&&i.forEach((function(e){t[e]=!0}))}))})),this._edgeG.selectAll(".graphEdge")}},n.prototype.tooltipHTML=function(e){return e.props.tooltip},n.prototype.subgraph_click=function(e,t,r){},n.prototype.vertex_click=function(e,t,r){},n.prototype.vertex_dblclick=function(e,t,r){},n.prototype.vertex_mousein=function(e,t,r){},n.prototype.vertex_mouseover=function(e,t,r){},n.prototype.vertex_mouseout=function(e,t,r){},n.prototype.edge_click=function(e,t,r){},n.prototype.edge_mouseover=function(e,t){this.highlightEdge(e,t)},n.prototype.edge_mouseout=function(e,t){this.highlightEdge(null,null)},n.prototype.progress=function(e){},n}(t.SVGZoomWidget);xm.prototype._class+=" graph_Graph2",xm.prototype.publish("allowDragging",!0,"boolean","Allow Dragging of Vertices"),xm.prototype.publish("dragSingleNeighbors",!0,"boolean","Dragging a Vertex also moves its singleton neighbors"),xm.prototype.publish("layout","ForceDirectedHybrid","set","Default Layout",["Hierarchy","DOT","Tree","Dendrogram","RadialTree","RadialDendrogram","ForceDirected","ForceDirected2","ForceDirectedHybrid","Neato","FDP","Circle","TwoPI","Circo","None"]),xm.prototype.publish("scale","100%","set","Zoom Level",["all","width","selection","100%","90%","75%","50%","25%","10%"]),xm.prototype.publish("applyScaleOnLayout",!1,"boolean","Shrink to fit on Layout"),xm.prototype.publish("highlightOnMouseOverVertex",!0,"boolean","Highlight Vertex on Mouse Over"),xm.prototype.publish("highlightOnMouseOverEdge",!0,"boolean","Highlight Edge on Mouse Over"),xm.prototype.publish("transitionDuration",250,"number","Transition Duration"),xm.prototype.publish("showEdges",!0,"boolean","Show Edges"),xm.prototype.publish("showEdgeLabels",!0,"boolean","Show Edge labels"),xm.prototype.publish("showEdgeLabelsOnHighlight",!0,"boolean","Show Edge labels when highlighted"),xm.prototype.publish("showVertexLabels",!0,"boolean","Show Vertex labels"),xm.prototype.publish("showVertexLabelsOnHighlight",!0,"boolean","Show Vertex labels when highlighted"),xm.prototype.publish("snapToGrid",0,"number","Snap to Grid"),xm.prototype.publish("selectionClearOnBackgroundClick",!1,"boolean","Clear selection on background click"),xm.prototype.publish("edgeArcDepth",8,"number","Edge Arc Depth"),xm.prototype.publish("edgeColor",null,"html-color","Edge line stroke color",null,{optional:!0}),xm.prototype.publish("edgeStrokeWidth",1,"number","Edge line stroke width (pixels)"),xm.prototype.publish("minScale",.6,"number","Min scale size for text"),xm.prototype.publish("maxScale",1,"number","Max scale size for text"),xm.prototype.publish("tooltipWidth",256,"number","Tooltip width (pixels)"),xm.prototype.publish("tooltipHeight",128,"number","Tooltip width (pixels)"),xm.prototype.publish("enableTooltipPointerEvents",!1,"boolean","If true, tooltip will use the style: 'pointer-events: all'"),xm.prototype.publish("tooltipCloseDelay",0,"number","Number of milliseconds to wait before closing tooltip (cancelled on tooltip mouseover event)"),xm.prototype.publish("doubleClickMaxDelay",300,"number","Number of milliseconds to wait before a subsequent click is not considered a double click"),xm.prototype.publish("centroidColor","#00A000","html-color","Centroid Glow Color"),xm.prototype.publish("centroidScale",1,"number","Centroid Scale"),xm.prototype.publish("centroidTextHeight",12,"number","Centroid Text Height"),xm.prototype.publish("centroidTextPadding",4,"number","Centroid Text Padding"),xm.prototype.publish("centroidIconHeight",50,"number","Centroid Icon Height"),xm.prototype.publish("centroidIconPadding",10,"number","Centroid Icon Padding"),xm.prototype.publish("centroidIconStrokeWidth",4,"number","Centroid Icon Stroke Width"),xm.prototype.publish("centroidIconFontFamily","FontAwesome","string","Centroid Icon Font Family"),xm.prototype.publish("centroidLabelFontFamily","FontAwesome","string","Centroid Label Font Family"),xm.prototype.publish("vertexTextHeight",10,"number","Vertex Text Height"),xm.prototype.publish("vertexTextPadding",4,"number","Vertex Text Padding"),xm.prototype.publish("vertexIconHeight",50,"number","Vertex Icon Height"),xm.prototype.publish("vertexIconPadding",10,"number","Vertex Icon Padding"),xm.prototype.publish("vertexIconStrokeWidth",0,"number","Vertex Icon Stroke Width"),xm.prototype.publish("vertexIconFontFamily","FontAwesome","string","Vertex Icon Font Family"),xm.prototype.publish("vertexLabelFontFamily","FontAwesome","string","Vertex Label Font Family"),xm.prototype.publish("highlightSelectedPathToCentroid",!0,"boolean","Highlight path to Center Vertex (for selected vertices)"),xm.prototype.publish("hierarchyRankDirection","TB","set","Direction for Rank Nodes",["TB","BT","LR","RL"],{disable:function(e){return"Hierarchy"!==e.layout()}}),xm.prototype.publish("hierarchyNodeSeparation",50,"number","Number of pixels that separate nodes horizontally in the layout",null,{disable:function(e){return"Hierarchy"!==e.layout()}}),xm.prototype.publish("hierarchyEdgeSeparation",10,"number","Number of pixels that separate edges horizontally in the layout",null,{disable:function(e){return"Hierarchy"!==e.layout()}}),xm.prototype.publish("hierarchyRankSeparation",50,"number","Number of pixels between each rank in the layout",null,{disable:function(e){return"Hierarchy"!==e.layout()}}),xm.prototype.publish("hierarchyDigraph",!0,"boolean","Directional Graph2",null,{disable:function(e){return"Hierarchy"!==e.layout()}}),xm.prototype.publish("forceDirectedAlpha",1,"number","Alpha",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("forceDirectedAlphaMin",.001,"number","Min Alpha",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("forceDirectedAlphaDecay",.0228,"number","Defaults to 1 - pow(alphaMin, 1 / 300)",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("forceDirectedRepulsionStrength",-350,"number","Charge strength ",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("forceDirectedVelocityDecay",.4,"number","Velocity Decay ",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("forceDirectedIterations",300,"number","Iterations",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("forceDirectedLinkDistance",300,"number","Target distance between linked nodes",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("forceDirectedLinkStrength",1,"number","Strength (rigidity) of links",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("forceDirectedPinCentroid",!1,"boolean","Pin centroid to center",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("forceDirectedForceStrength",0,"number","Strength of center force",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("forceDirectedMinDistance",1,"number","Min distance between nodes",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("forceDirectedMaxDistance",1/0,"number","Max distance between nodes",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("treeRankDirection","LR","set","Direction for Rank Nodes",["TB","LR"],{disable:function(e){return"Tree"!==e.layout()&&"Dendrogram"!==e.layout()}}),xm.prototype.publish("wasmFolder",null,"string","WASM Folder",null,{optional:!0,disable:function(e){return["DOT","Neato","FDP","TwoPI","Circo"].indexOf(e.layout())<0}});var Em=xm.prototype.scale;function km(e,t){var r={};return t.forEach((function(t,n){return r[t]=e[n]})),r}xm.prototype.scale=function(e,t){var r=Em.apply(this,arguments);return arguments.length&&this.zoomTo(e,t),r};var Sm=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return s(r,e),r.prototype.owner=function(e){return arguments.length?(this._owner=e,this):this._owner},r.prototype.valid=function(){return!!this.columnID()},c([t.publish("","set","Annotation column (boolean)",(function(){return this._owner.vertexColumns()})),h("design:type",Function)],r.prototype,"columnID",void 0),c([t.publish("","string","Annotation ID"),h("design:type",Function)],r.prototype,"annotationID",void 0),r}(t.PropertyExt);Sm.prototype._class+=" graph_AnnotationColumn";var Dm=function(e){function n(){var t=e.call(this)||this;return t._prevSubgraphs=[],t._masterSubgraphs=[],t._masterSubgraphsMap={},t._prevVertices=[],t._masterVertices=[],t._masterVerticesMap={},t._prevEdges=[],t._masterEdges=[],t._masterEdgesMap={},t._prevHierarchy=[],t._masterHierarchy=[],t._masterHierarchyMap={},t.vertexRenderer(o.Vertex3).centroidRenderer(o.CentroidVertex3).edgeColor("#287EC4").edgeStrokeWidth(2).edgeArcDepth(0),t}return s(n,e),n.prototype.clear=function(){this._prevSubgraphs=[],this._masterSubgraphs=[],this._masterSubgraphsMap={},this._prevVertices=[],this._masterVertices=[],this._masterVerticesMap={},this._prevEdges=[],this._masterEdges=[],this._prevHierarchy=[],this._masterHierarchy=[],this._masterHierarchyMap={},this._graphData.clear(),this.resetLayout()},n.prototype.indexOf=function(e,t,r){void 0===r&&(r="");var n=e.indexOf(t);return n>=0?n:e.indexOf(r)},n.prototype.mergeSubgraphs=function(){var e=this,t=this.subgraphColumns(),n=this.indexOf(t,this.subgraphIDColumn(),"id"),o=this.indexOf(t,this.subgraphLabelColumn(),"label"),i=this.subgraphs().map((function(e){return{id:""+e[n],text:""+e[o],origData:km(e,t)}})),a=r.compare2(this._prevSubgraphs,i,(function(e){return e.id}));a.exit.forEach((function(t){e._masterSubgraphs=e._masterSubgraphs.filter((function(e){return e.id!==t.id})),delete e._masterSubgraphsMap[t.id]})),a.enter.forEach((function(t){e._masterSubgraphs.push(t),e._masterSubgraphsMap[t.id]=t})),a.update.forEach((function(t){e._masterSubgraphsMap[t.id].origData=t.origData})),this._prevSubgraphs=i},n.prototype.mergeVertices=function(){var e=this,t=this.vertexColumns(),n=this.vertexAnnotationColumns(),o=this.indexOf(t,this.vertexCategoryColumn(),"category"),i=this.indexOf(t,this.vertexIDColumn(),"id"),a=this.indexOf(t,this.vertexLabelColumn(),"label"),s=this.indexOf(t,this.vertexCentroidColumn(),"centroid"),u=this.indexOf(t,this.vertexFACharColumn(),"faChar"),c=this.indexOf(t,this.vertexTooltipColumn(),"tooltip"),h=n.map((function(r){return e.indexOf(t,r.columnID(),"")})),l=this.vertices().map((function(r){return{categoryID:""+r[o],id:""+r[i],text:""+r[a],tooltip:""+r[c],origData:km(r,t),centroid:!!r[s],icon:{imageChar:""+(r[u]||e.vertexFAChar())},annotationIDs:h.map((function(e,t){return r[e]?n[t].annotationID():void 0})).filter((function(e){return!!e}))}})),f=r.compare2(this._prevVertices,l,(function(e){return e.id}));f.exit.forEach((function(t){e._masterVertices=e._masterVertices.filter((function(e){return e.id!==t.id})),delete e._masterVerticesMap[t.id]})),f.enter.forEach((function(t){e._masterVertices.push(t),e._masterVerticesMap[t.id]=t})),f.update.forEach((function(t){e._masterVerticesMap[t.id].origData=t.origData})),this._prevVertices=l},n.prototype.mergeEdges=function(){var e=this,t=this.edgeColumns(),n=this.indexOf(t,this.edgeIDColumn(),"id"),o=this.indexOf(t,this.edgeSourceColumn(),"source"),i=this.indexOf(t,this.edgeTargetColumn(),"target"),a=this.indexOf(t,this.edgeLabelColumn(),"label"),s=this.indexOf(t,this.edgeWeightColumn(),"weight"),u=this.indexOf(t,this.edgeColorColumn(),"color"),c=this.edges().map((function(r){var c=e._masterVerticesMap[""+r[o]];c||console.error('Invalid edge source entity "'.concat(r[o],'" does not exist.'));var h=e._masterVerticesMap[""+r[i]];return h||console.error('Invalid edge target entity "'.concat(r[i],'" does not exist.')),{type:"edge",id:n>=0?""+r[n]:r[o]+"->"+r[i],source:c,target:h,weight:+r[s]||1,color:r[u],label:a>=0?""+r[a]:"",origData:km(r,t)}})).filter((function(e){return e.source&&e.target})),h=r.compare2(this._masterEdges,c,(function(e){return e.id}));h.exit.forEach((function(t){e._masterEdges=e._masterEdges.filter((function(e){return e.id!==t.id})),delete e._masterEdgesMap[t.id]})),h.enter.forEach((function(t){e._masterEdges.push(t),e._masterEdgesMap[t.id]=t})),h.update.forEach((function(t){e._masterEdgesMap[t.id].origData=t.origData})),this._prevEdges=c},n.prototype.mergeHierarchy=function(){var e=this,t=this.hierarchyColumns(),n=this.indexOf(t,this.hierarchyParentIDColumn(),"parentID"),o=this.indexOf(t,this.hierarchyChildIDColumn(),"childID"),i=this.hierarchy().map((function(t){return{id:t[n]+"=>"+t[o],parent:e._masterSubgraphsMap[""+t[n]],child:e._masterSubgraphsMap[""+t[o]]||e._masterVerticesMap[""+t[o]]}})),a=r.compare2(this._prevHierarchy,i,(function(e){return e.id}));a.exit.forEach((function(t){e._masterHierarchy=e._masterHierarchy.filter((function(e){return e.id!==t.id})),delete e._masterHierarchyMap[t.id]})),a.enter.forEach((function(t){e._masterHierarchy.push(t),e._masterHierarchyMap[t.id]=t})),this._prevHierarchy=i},n.prototype.update=function(t,r){this.mergeSubgraphs(),this.mergeVertices(),this.mergeEdges(),this.mergeHierarchy(),this.data({subgraphs:this._masterSubgraphs,vertices:this._masterVertices,edges:this._masterEdges,hierarchy:this._masterHierarchy}),e.prototype.update.call(this,t,r)},n.prototype.render=function(t){return e.prototype.render.call(this,(function(e){t&&t(e)})),this},c([t.publish([],"any","Subgraph Columns",null,{internal:!0}),h("design:type",Function)],n.prototype,"subgraphColumns",void 0),c([t.publish([],"any","Subgraphs",null,{internal:!0}),h("design:type",Function)],n.prototype,"subgraphs",void 0),c([t.publish("","string","Subgraph ID column"),h("design:type",Function)],n.prototype,"subgraphIDColumn",void 0),c([t.publish("","string","Subgraph Label column"),h("design:type",Function)],n.prototype,"subgraphLabelColumn",void 0),c([t.publish([],"any","Vertex Columns",null,{internal:!0}),h("design:type",Function)],n.prototype,"vertexColumns",void 0),c([t.publish([],"any","Vertices (Nodes)",null,{internal:!0}),h("design:type",Function)],n.prototype,"vertices",void 0),c([t.publish("","set","Vertex Category ID column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexCategoryColumn",void 0),c([t.publish("","set","Vertex ID column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexIDColumn",void 0),c([t.publish("","set","Vertex label column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexLabelColumn",void 0),c([t.publish("","set","Vertex centroid column (boolean)",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexCentroidColumn",void 0),c([t.publish("?","string","Vertex default FAChar"),h("design:type",Function)],n.prototype,"vertexFAChar",void 0),c([t.publish("","set","Vertex FAChar column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexFACharColumn",void 0),c([t.publish("","set","Vertex tooltip column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexTooltipColumn",void 0),c([t.publish([],"propertyArray","Annotations",null,{autoExpand:Sm}),h("design:type",Function)],n.prototype,"vertexAnnotationColumns",void 0),c([t.publish([],"any","Edge columns",null,{internal:!0}),h("design:type",Function)],n.prototype,"edgeColumns",void 0),c([t.publish([],"any","Edges (Edges)",null,{internal:!0}),h("design:type",Function)],n.prototype,"edges",void 0),c([t.publish("","set","Edge ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeIDColumn",void 0),c([t.publish("","set","Edge label column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeLabelColumn",void 0),c([t.publish("","set","Edge source ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeSourceColumn",void 0),c([t.publish("","set","Edge target ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeTargetColumn",void 0),c([t.publish("","set","Edge weight column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeWeightColumn",void 0),c([t.publish("","set","Edge color column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeColorColumn",void 0),c([t.publish([],"any","Subgraph Columns"),h("design:type",Function)],n.prototype,"hierarchyColumns",void 0),c([t.publish([],"any","Subgraphs"),h("design:type",Function)],n.prototype,"hierarchy",void 0),c([t.publish("","string","Subgraph ID column"),h("design:type",Function)],n.prototype,"hierarchyParentIDColumn",void 0),c([t.publish("","string","Subgraph Label column"),h("design:type",Function)],n.prototype,"hierarchyChildIDColumn",void 0),n}(xm);Dm.prototype._class+=" graph_DataGraph";L(".graph_SankeyGraph .node rect{fill-opacity:.9;shape-rendering:crispEdges;stroke:#a9a9a9;cursor:move}.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}");var Cm=function(e){function n(){var r=e.call(this)||this;return r._prevVertices=[],r._masterVertices=[],r._masterVerticesMap={},r._prevEdges=[],r._masterEdges=[],t.Utility.SimpleSelectionMixin.call(r),r._drawStartPos="origin",r}return s(n,e),n.prototype.mergeVertices=function(){var e=this,t=this.vertexColumns(),n=this.vertexAnnotationColumns(),o=this.indexOf(t,this.vertexCategoryColumn(),"category"),i=this.indexOf(t,this.vertexIDColumn(),"id"),a=this.indexOf(t,this.vertexLabelColumn(),"label"),s=this.indexOf(t,this.vertexCentroidColumn(),"centroid"),u=this.indexOf(t,this.vertexFACharColumn(),"faChar"),c=this.indexOf(t,this.vertexTooltipColumn(),"tooltip"),h=n.map((function(r){return e.indexOf(t,r.columnID(),"")})),l=this.vertices().map((function(r){return{categoryID:""+r[o],id:""+r[i],text:""+r[a],tooltip:""+r[c],origData:km(r,t),centroid:!!r[s],icon:{imageChar:""+(r[u]||e.vertexFAChar())},annotationIDs:h.map((function(e,t){return r[e]?n[t].annotationID():void 0})).filter((function(e){return!!e}))}})),f=r.compare2(this._prevVertices,l,(function(e){return e.id}));f.exit.forEach((function(t){e._masterVertices=e._masterVertices.filter((function(e){return e.id!==t.id}))})),f.enter.forEach((function(t){e._masterVertices.push(t),e._masterVerticesMap[t.id]=t})),this._prevVertices=l},n.prototype.indexOf=function(e,t,r){void 0===r&&(r="");var n=e.indexOf(t);return n>=0?n:e.indexOf(r)},n.prototype.mergeEdges=function(){var e=this,t=this.edgeColumns(),n=this.indexOf(t,this.edgeIDColumn(),"id"),o=this.indexOf(t,this.edgeSourceColumn(),"source"),i=this.indexOf(t,this.edgeTargetColumn(),"target"),a=this.indexOf(t,this.edgeLabelColumn(),"label"),s=this.indexOf(t,this.edgeWeightColumn(),"weight"),u=this.edges().map((function(r){var u=e._masterVerticesMap[""+r[o]];u||console.error('Invalid edge source entity "'.concat(r[o],'" does not exist.'));var c=e._masterVerticesMap[""+r[i]];return c||console.error('Invalid edge target entity "'.concat(r[i],'" does not exist.')),{type:"edge",id:n>=0?""+r[n]:r[o]+"->"+r[i],source:u,target:c,value:+r[s]||0,label:a>=0?""+r[a]:"",origData:km(r,t)}})).filter((function(e){return e.source&&e.target})),c=r.compare2(this._masterEdges,u,(function(e){return e.id}));c.exit.forEach((function(t){e._masterEdges=e._masterEdges.filter((function(e){return e.id!==t.id}))})),c.enter.forEach((function(t){e._masterEdges.push(t)})),this._prevEdges=u},n.prototype.sankeyData=function(){return this.mergeVertices(),this.mergeEdges(),{vertices:this._masterVertices,edges:this._masterEdges}},n.prototype.enter=function(t,r){e.prototype.enter.call(this,t,r),this._d3Sankey=S_(),this._selection.widgetElement(r)},n.prototype.update=function(r,n){e.prototype.update.call(this,r,n),this._palette=this._palette.switch(this.paletteID());var o=this.vertexStrokeWidth(),i=this.sankeyData();this._d3Sankey.nodeId((function(e){return e.id})).extent([[0,0],[this.width(),this.height()]]),i.vertices.length>0&&this._d3Sankey({nodes:i.vertices,links:i.edges});var a=this,s=n.selectAll(".link").data(i.edges);s.enter().append("path").attr("class","link").each((function(){t.select(this).append("title")})).merge(s).attr("d",A_()).style("stroke-width",(function(e){return Math.max(1,e.width)})).select("title").text((function(e){return e.source.text+" → "+e.target.text+"\n"+e.value})),s.exit().remove();var u=n.selectAll(".node").data(i.vertices);u.enter().append("g").attr("class","node").call(this._selection.enter.bind(this._selection)).on("click",(function(e){a.click(e.origData,"",a._selection.selected(this))})).on("dblclick",(function(e){a.dblclick(e.origData,"",a._selection.selected(this))})).each((function(){var e=t.select(this);e.append("rect"),e.append("text")})).merge(u).attr("transform",(function(e){var t=0,r=0;return e.x0&&(t=e.x0),e.y0&&(r=e.y0),"translate("+(t+o)+","+(r+o)+")"})).each((function(){var e=t.select(this);e.select("rect").attr("height",(function(e){return e.y1-e.y0})).attr("width",(function(e){return e.x1-e.x0})).style("fill",(function(e){return a._palette(e.categoryID)})).style("stroke",(function(e){return a.vertexStrokeColor()})).style("stroke-width",(function(e){return o})).style("cursor",a.xAxisMovement()||a.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.text})).filter((function(e){return e.x0<a.width()/2})).attr("x",6+a._d3Sankey.nodeWidth()).attr("text-anchor","start")})),u.exit().remove()},n.prototype.exit=function(t,r){e.prototype.exit.call(this,t,r)},n.prototype.click=function(e,t,r){},n.prototype.dblclick=function(e,t,r){},c([t.publish([],"any","Vertex Columns",null,{internal:!0}),h("design:type",Function)],n.prototype,"vertexColumns",void 0),c([t.publish([],"any","Vertices (Nodes)",null,{internal:!0}),h("design:type",Function)],n.prototype,"vertices",void 0),c([t.publish("","set","Vertex Category ID column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexCategoryColumn",void 0),c([t.publish("","set","Vertex ID column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexIDColumn",void 0),c([t.publish("","set","Vertex label column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexLabelColumn",void 0),c([t.publish("","set","Vertex centroid column (boolean)",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexCentroidColumn",void 0),c([t.publish("?","string","Vertex default FAChar"),h("design:type",Function)],n.prototype,"vertexFAChar",void 0),c([t.publish("","set","Vertex FAChar column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexFACharColumn",void 0),c([t.publish("","set","Vertex tooltip column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexTooltipColumn",void 0),c([t.publish([],"propertyArray","Annotations",null,{autoExpand:Sm}),h("design:type",Function)],n.prototype,"vertexAnnotationColumns",void 0),c([t.publish([],"any","Edge columns",null,{internal:!0}),h("design:type",Function)],n.prototype,"edgeColumns",void 0),c([t.publish([],"any","Edges (Edges)",null,{internal:!0}),h("design:type",Function)],n.prototype,"edges",void 0),c([t.publish("","set","Edge ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeIDColumn",void 0),c([t.publish("","set","Edge label column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeLabelColumn",void 0),c([t.publish("","set","Edge source ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeSourceColumn",void 0),c([t.publish("","set","Edge target ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeTargetColumn",void 0),c([t.publish("","set","Edge target ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeWeightColumn",void 0),n}(t.SVGWidget);Cm.prototype._class+=" graph_SankeyGraph",Cm.prototype.mixin(t.Utility.SimpleSelectionMixin),Cm.prototype._palette=t.Palette.ordinal("category10"),Cm.prototype.publish("paletteID","category10","set","Color palette for this widget",Cm.prototype._palette.switch()),Cm.prototype.publish("vertexStrokeWidth",1,"number","Vertex Stroke Width"),Cm.prototype.publish("vertexStrokeColor","darkgray","string","Vertex Stroke Color"),Cm.prototype.publish("vertexWidth",36,"number","Vertex Width"),Cm.prototype.publish("vertexPadding",20,"number","Vertex Padding"),Cm.prototype.publish("xAxisMovement",!1,"boolean","Enable x-axis movement"),Cm.prototype.publish("yAxisMovement",!1,"boolean","Enable y-axis movement"),e.AdjacencyGraph=d_,e.Annotation=f_,e.AnnotationColumn=Sm,e.BUILD_VERSION="2.103.0",e.DataGraph=Dm,e.Edge=R,e.Graph=h_,e.Graph2=xm,e.PKG_NAME="@hpcc-js/graph",e.PKG_VERSION="2.80.0",e.Sankey=I_,e.SankeyColumn=O_,e.SankeyGraph=Cm,e.Subgraph=u_,e.Vertex=c_,e.graphviz=function(e,t,r){return void 0===t&&(t="dot"),void 0===r&&(r=_m),H_({items:[],links:[],raw:e},{engine:t,wasmFolder:r})},e.toJsonObj=km,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@hpcc-js/common"),require("@hpcc-js/util"),require("@hpcc-js/api"),require("@hpcc-js/react"),require("@hpcc-js/html")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common","@hpcc-js/util","@hpcc-js/api","@hpcc-js/react","@hpcc-js/html"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@hpcc-js/graph"]={},e["@hpcc-js/common"],e["@hpcc-js/util"],e["@hpcc-js/api"],e["@hpcc-js/react"],e["@hpcc-js/html"])}(this,(function(e,t,r,n,o,i){"use strict";var a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},a(e,t)};function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var u=function(){return u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},u.apply(this,arguments)};function c(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function h(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var f=Math.PI,d=2*f,p=1e-6,g=d-p;function v(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function y(){return new v}function _(e){return function(){return e}}v.prototype=y.prototype={constructor:v,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,o,i){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+o)+","+(this._y1=+i)},arcTo:function(e,t,r,n,o){e=+e,t=+t,r=+r,n=+n,o=+o;var i=this._x1,a=this._y1,s=r-e,u=n-t,c=i-e,h=a-t,l=c*c+h*h;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(l>p)if(Math.abs(h*s-u*c)>p&&o){var d=r-i,g=n-a,v=s*s+u*u,y=d*d+g*g,_=Math.sqrt(v),m=Math.sqrt(l),b=o*Math.tan((f-Math.acos((v+l-y)/(2*_*m)))/2),w=b/m,x=b/_;Math.abs(w-1)>p&&(this._+="L"+(e+w*c)+","+(t+w*h)),this._+="A"+o+","+o+",0,0,"+ +(h*d>c*g)+","+(this._x1=e+x*s)+","+(this._y1=t+x*u)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,r,n,o,i){e=+e,t=+t,i=!!i;var a=(r=+r)*Math.cos(n),s=r*Math.sin(n),u=e+a,c=t+s,h=1^i,l=i?n-o:o-n;if(r<0)throw new Error("negative radius: "+r);null===this._x1?this._+="M"+u+","+c:(Math.abs(this._x1-u)>p||Math.abs(this._y1-c)>p)&&(this._+="L"+u+","+c),r&&(l<0&&(l=l%d+d),l>g?this._+="A"+r+","+r+",0,1,"+h+","+(e-a)+","+(t-s)+"A"+r+","+r+",0,1,"+h+","+(this._x1=u)+","+(this._y1=c):l>p&&(this._+="A"+r+","+r+",0,"+ +(l>=f)+","+h+","+(this._x1=e+r*Math.cos(o))+","+(this._y1=t+r*Math.sin(o))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};function m(e){this._context=e}function b(e){return new m(e)}function w(e){return e[0]}function x(e){return e[1]}function E(){var e=w,t=x,r=_(!0),n=null,o=b,i=null;function a(a){var s,u,c,h=a.length,l=!1;for(null==n&&(i=o(c=y())),s=0;s<=h;++s)!(s<h&&r(u=a[s],s,a))===l&&((l=!l)?i.lineStart():i.lineEnd()),l&&i.point(+e(u,s,a),+t(u,s,a));if(c)return i=null,c+""||null}return a.x=function(t){return arguments.length?(e="function"==typeof t?t:_(+t),a):e},a.y=function(e){return arguments.length?(t="function"==typeof e?e:_(+e),a):t},a.defined=function(e){return arguments.length?(r="function"==typeof e?e:_(!!e),a):r},a.curve=function(e){return arguments.length?(o=e,null!=n&&(i=o(n)),a):o},a.context=function(e){return arguments.length?(null==e?n=i=null:i=o(n=e),a):n},a}m.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point: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)}}};var k=Array.prototype.slice;function S(e){return e.source}function D(e){return e.target}function C(e,t,r,n,o){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,o,n,o)}function A(){return function(e){var t=S,r=D,n=w,o=x,i=null;function a(){var a,s=k.call(arguments),u=t.apply(this,s),c=r.apply(this,s);if(i||(i=a=y()),e(i,+n.apply(this,(s[0]=u,s)),+o.apply(this,s),+n.apply(this,(s[0]=c,s)),+o.apply(this,s)),a)return i=null,a+""||null}return a.source=function(e){return arguments.length?(t=e,a):t},a.target=function(e){return arguments.length?(r=e,a):r},a.x=function(e){return arguments.length?(n="function"==typeof e?e:_(+e),a):n},a.y=function(e){return arguments.length?(o="function"==typeof e?e:_(+e),a):o},a.context=function(e){return arguments.length?(i=null==e?null:e,a):i},a}(C)}function j(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 O(e){this._context=e}function I(e){return new O(e)}function M(e,t){this._basis=new O(e),this._beta=t}O.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:j(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},point: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:j(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},M.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n,o=e[0],i=t[0],a=e[r]-o,s=t[r]-i,u=-1;++u<=r;)n=u/r,this._basis.point(this._beta*e[u]+(1-this._beta)*(o+n*a),this._beta*t[u]+(1-this._beta)*(i+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};(function e(t){function r(e){return 1===t?new O(e):new M(e,t)}return r.beta=function(t){return e(+t)},r})(.85);function F(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 P(e,t){this._context=e,this._k=(1-t)/6}P.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:F(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point: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:F(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}};var T=function e(t){function r(e){return new P(e,t)}return r.tension=function(t){return e(+t)},r}(0);function N(e,t){this._context=e,this._alpha=t}N.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(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;default:!function(e,t,r){var n=e._x1,o=e._y1,i=e._x2,a=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,o=(o*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>1e-12){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);i=(i*c+e._x1*e._l23_2a-t*e._l12_2a)/h,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(n,o,i,a,e._x2,e._y2)}(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};(function e(t){function r(e){return t?new N(e,t):new P(e,0)}return r.alpha=function(t){return e(+t)},r})(.5);function L(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}L(".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}");var Y=I,R=function(e){function r(){var r=e.call(this)||this;return r._points=[],r._weight=100,r._strokeDasharray=null,r._hidden=!1,r._textBox=(new t.TextBox).padding(0),r}return s(r,e),r.prototype.graphID=function(e){return arguments.length?(this._graphID=e,this):this._graphID},r.prototype.sourceVertex=function(e){return arguments.length?(this._sourceVertex=e,this):this._sourceVertex},r.prototype.targetVertex=function(e){return arguments.length?(this._targetVertex=e,this):this._targetVertex},r.prototype.weight=function(e){return arguments.length?(this._weight=e,this):this._weight},r.prototype.points=function(e,t,r){return arguments.length?(this._points=e,this._elementPath&&this.update(null,this._element,t,r),this):this._points},r.prototype.hidden=function(e){return arguments.length?(this._hidden=e,this):this._hidden},r.prototype.text=function(e){return arguments.length?(this._textBox.text(e),this):this._textBox.text()},r.prototype.enter=function(t,r){e.prototype.enter.call(this,t,r),this._elementPath=r.append("path"),this._textBox.text()&&this._textBox.target(t).tooltip(this.tooltip()).render()},r.prototype.update=function(r,n,o,i){e.prototype.update.call(this,r,n);var a=this;t.Platform.svgMarkerGlitch&&!i&&n.transition().duration((o||0)+100).on("start",(function(){a._pushMarkers(n)})).on("end",(function(){a._popMarkers(n)}));var s=a._calculateEdgePoints(this._sourceVertex,this._targetVertex,this._points),u=n.selectAll(".point2").data(this.showControlPoints()?s:[]);u.enter().append("circle").attr("class","point2").style("stroke","red").merge(u).attr("cx",(function(e){return e.x})).attr("cy",(function(e){return e.y})).attr("r",1),u.exit().remove();var c=E().x((function(e){return e.x})).y((function(e){return e.y})).curve(Y)(s),h=this._elementPath;o&&(h=h.transition().duration(o)),h.attr("opacity",this._hidden?0:1).attr("marker-start",t.Platform.svgMarkerGlitch&&i||!this.sourceMarker_exists()?null:"url(#"+this._graphID+"_"+this.sourceMarker()+"Foot)").attr("marker-end",t.Platform.svgMarkerGlitch&&i||!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",c),this._textBox.text()&&this._textBox.tooltip(this.tooltip()).move(this._findMidPoint(s),o)},r.prototype.exit=function(t,r){this._textBox&&this._textBox.target(null),e.prototype.exit.call(this,t,r)},r.prototype._findMidPoint=function(e){var t=e.length/2;if(e.length%2)return e[Math.floor(t)];if(e.length){var 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}},r.prototype._calculateEdgePoints=function(e,t,r){if(!e||!t)return[{x:0,y:0},{x:0,y:0}];var n=r?r.filter((function(r){return!e.contains(r)&&!t.contains(r)})):[],o=0===n.length?t.pos():n[0],i=0===n.length?e.pos():n[n.length-1];if(n.unshift(e.intersection(e._pos,o)),n.push(t.intersection(t._pos,i)),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]){var a=n[0].x-n[1].x,s=n[0].y-n[1].y;if(Math.sqrt(a*a+s*s))if(this.showArc()){var u=(n[0].x+n[1].x)/2-s*this.arcDepth()/100,c=(n[0].y+n[1].y)/2+a*this.arcDepth()/100;n=[{x:n[0].x,y:n[0].y},{x:u,y:c},{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},r}(t.SVGWidget);R.prototype._class+=" graph_Edge",R.prototype.publish("arcDepth",16,"number","Arc Depth",null,{tags:["Basic"]}),R.prototype.publish("showControlPoints",!1,"boolean","Show/Hide Control Points",null,{tags:["Basic"]}),R.prototype.publish("showArc",!0,"boolean","Show/Hide Arc",null,{tags:["Basic"]}),R.prototype.publish("tooltip","","string","Tooltip",null,{tags:["Private"]}),R.prototype.publish("sourceMarker","circle","set","Source Marker",["none","circle"],{optional:!0}),R.prototype.publish("targetMarker","arrow","set","Source Marker",["none","arrow","circle"],{optional:!0}),R.prototype.publish("strokeDasharray",null,"string","Stroke Dash Array",null,{optional:!0}),R.prototype.publish("strokeColor",null,"html-color","Stroke Color",null,{optional:!0}),R.prototype.publish("textColor",null,"html-color","Text Color",null,{optional:!0}),R.prototype.publishProxy("text_shape_colorFill","_textBox","shape_colorFill"),R.prototype.publishProxy("text_shape_colorStroke","_textBox","shape_colorStroke"),R.prototype.publishProxy("text_text_colorFill","_textBox","text_colorFill");var B="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var z=function(){this.__data__=[],this.size=0};var V=function(e,t){return e===t||e!=e&&t!=t},G=V;var H=function(e,t){for(var r=e.length;r--;)if(G(e[r][0],t))return r;return-1},U=H,W=Array.prototype.splice;var q=function(e){var t=this.__data__,r=U(t,e);return!(r<0)&&(r==t.length-1?t.pop():W.call(t,r,1),--this.size,!0)},X=H;var K=function(e){var t=this.__data__,r=X(t,e);return r<0?void 0:t[r][1]},$=H;var J=H;var Q=function(e,t){var r=this.__data__,n=J(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Z=z,ee=q,te=K,re=function(e){return $(this.__data__,e)>-1},ne=Q;function oe(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])}}oe.prototype.clear=Z,oe.prototype.delete=ee,oe.prototype.get=te,oe.prototype.has=re,oe.prototype.set=ne;var ie=oe,ae=ie;var se=function(){this.__data__=new ae,this.size=0};var ue=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r};var ce=function(e){return this.__data__.get(e)};var he=function(e){return this.__data__.has(e)},le="object"==typeof B&&B&&B.Object===Object&&B,fe=le,de="object"==typeof self&&self&&self.Object===Object&&self,pe=fe||de||Function("return this")(),ge=pe.Symbol,ve=ge,ye=Object.prototype,_e=ye.hasOwnProperty,me=ye.toString,be=ve?ve.toStringTag:void 0;var we=function(e){var t=_e.call(e,be),r=e[be];try{e[be]=void 0;var n=!0}catch(e){}var o=me.call(e);return n&&(t?e[be]=r:delete e[be]),o},xe=Object.prototype.toString;var Ee=function(e){return xe.call(e)},ke=we,Se=Ee,De=ge?ge.toStringTag:void 0;var Ce=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":De&&De in Object(e)?ke(e):Se(e)};var Ae=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},je=Ce,Oe=Ae;var Ie,Me=function(e){if(!Oe(e))return!1;var t=je(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Fe=pe["__core-js_shared__"],Pe=(Ie=/[^.]+$/.exec(Fe&&Fe.keys&&Fe.keys.IE_PROTO||""))?"Symbol(src)_1."+Ie:"";var Te=function(e){return!!Pe&&Pe in e},Ne=Function.prototype.toString;var Le=function(e){if(null!=e){try{return Ne.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Ye=Me,Re=Te,Be=Ae,ze=Le,Ve=/^\[object .+?Constructor\]$/,Ge=Function.prototype,He=Object.prototype,Ue=Ge.toString,We=He.hasOwnProperty,qe=RegExp("^"+Ue.call(We).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Xe=function(e){return!(!Be(e)||Re(e))&&(Ye(e)?qe:Ve).test(ze(e))};var Ke=Xe,$e=function(e,t){return null==e?void 0:e[t]};var Je=function(e,t){var r=$e(e,t);return Ke(r)?r:void 0},Qe=Je(pe,"Map"),Ze=Je(Object,"create"),et=Ze;var tt=function(){this.__data__=et?et(null):{},this.size=0};var rt=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},nt=Ze,ot=Object.prototype.hasOwnProperty;var it=function(e){var t=this.__data__;if(nt){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return ot.call(t,e)?t[e]:void 0},at=Ze,st=Object.prototype.hasOwnProperty;var ut=Ze;var ct=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ut&&void 0===t?"__lodash_hash_undefined__":t,this},ht=tt,lt=rt,ft=it,dt=function(e){var t=this.__data__;return at?void 0!==t[e]:st.call(t,e)},pt=ct;function gt(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])}}gt.prototype.clear=ht,gt.prototype.delete=lt,gt.prototype.get=ft,gt.prototype.has=dt,gt.prototype.set=pt;var vt=gt,yt=ie,_t=Qe;var mt=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},bt=mt;var wt=function(e,t){var r=e.__data__;return bt(t)?r["string"==typeof t?"string":"hash"]:r.map},xt=wt;var Et=wt;var kt=wt;var St=wt;var Dt=function(e,t){var r=St(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Ct=function(){this.size=0,this.__data__={hash:new vt,map:new(_t||yt),string:new vt}},At=function(e){var t=xt(this,e).delete(e);return this.size-=t?1:0,t},jt=function(e){return Et(this,e).get(e)},Ot=function(e){return kt(this,e).has(e)},It=Dt;function Mt(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])}}Mt.prototype.clear=Ct,Mt.prototype.delete=At,Mt.prototype.get=jt,Mt.prototype.has=Ot,Mt.prototype.set=It;var Ft=Mt,Pt=ie,Tt=Qe,Nt=Ft;var Lt=function(e,t){var r=this.__data__;if(r instanceof Pt){var n=r.__data__;if(!Tt||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Nt(n)}return r.set(e,t),this.size=r.size,this},Yt=ie,Rt=se,Bt=ue,zt=ce,Vt=he,Gt=Lt;function Ht(e){var t=this.__data__=new Yt(e);this.size=t.size}Ht.prototype.clear=Rt,Ht.prototype.delete=Bt,Ht.prototype.get=zt,Ht.prototype.has=Vt,Ht.prototype.set=Gt;var Ut=Ht;var Wt=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e},qt=Je,Xt=function(){try{var e=qt(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Kt=Xt;var $t=function(e,t,r){"__proto__"==t&&Kt?Kt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},Jt=$t,Qt=V,Zt=Object.prototype.hasOwnProperty;var er=function(e,t,r){var n=e[t];Zt.call(e,t)&&Qt(n,r)&&(void 0!==r||t in e)||Jt(e,t,r)},tr=er,rr=$t;var nr=function(e,t,r,n){var o=!r;r||(r={});for(var i=-1,a=t.length;++i<a;){var s=t[i],u=n?n(r[s],e[s],s,r,e):void 0;void 0===u&&(u=e[s]),o?rr(r,s,u):tr(r,s,u)}return r};var or=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n};var ir=function(e){return null!=e&&"object"==typeof e},ar=Ce,sr=ir;var ur=function(e){return sr(e)&&"[object Arguments]"==ar(e)},cr=ur,hr=ir,lr=Object.prototype,fr=lr.hasOwnProperty,dr=lr.propertyIsEnumerable,pr=cr(function(){return arguments}())?cr:function(e){return hr(e)&&fr.call(e,"callee")&&!dr.call(e,"callee")},gr=pr,vr=Array.isArray,yr={exports:{}};var _r=function(){return!1};!function(e,t){var r=pe,n=_r,o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,s=(a?a.isBuffer:void 0)||n;e.exports=s}(yr,yr.exports);var mr=/^(?:0|[1-9]\d*)$/;var br=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&mr.test(e))&&e>-1&&e%1==0&&e<t};var wr=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},xr=Ce,Er=wr,kr=ir,Sr={};Sr["[object Float32Array]"]=Sr["[object Float64Array]"]=Sr["[object Int8Array]"]=Sr["[object Int16Array]"]=Sr["[object Int32Array]"]=Sr["[object Uint8Array]"]=Sr["[object Uint8ClampedArray]"]=Sr["[object Uint16Array]"]=Sr["[object Uint32Array]"]=!0,Sr["[object Arguments]"]=Sr["[object Array]"]=Sr["[object ArrayBuffer]"]=Sr["[object Boolean]"]=Sr["[object DataView]"]=Sr["[object Date]"]=Sr["[object Error]"]=Sr["[object Function]"]=Sr["[object Map]"]=Sr["[object Number]"]=Sr["[object Object]"]=Sr["[object RegExp]"]=Sr["[object Set]"]=Sr["[object String]"]=Sr["[object WeakMap]"]=!1;var Dr=function(e){return kr(e)&&Er(e.length)&&!!Sr[xr(e)]};var Cr=function(e){return function(t){return e(t)}},Ar={exports:{}};!function(e,t){var r=le,n=t&&!t.nodeType&&t,o=n&&e&&!e.nodeType&&e,i=o&&o.exports===n&&r.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=a}(Ar,Ar.exports);var jr=Dr,Or=Cr,Ir=Ar.exports,Mr=Ir&&Ir.isTypedArray,Fr=Mr?Or(Mr):jr,Pr=or,Tr=gr,Nr=vr,Lr=yr.exports,Yr=br,Rr=Fr,Br=Object.prototype.hasOwnProperty;var zr=function(e,t){var r=Nr(e),n=!r&&Tr(e),o=!r&&!n&&Lr(e),i=!r&&!n&&!o&&Rr(e),a=r||n||o||i,s=a?Pr(e.length,String):[],u=s.length;for(var c in e)!t&&!Br.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Yr(c,u))||s.push(c);return s},Vr=Object.prototype;var Gr=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Vr)};var Hr=function(e,t){return function(r){return e(t(r))}},Ur=Hr(Object.keys,Object),Wr=Gr,qr=Ur,Xr=Object.prototype.hasOwnProperty;var Kr=function(e){if(!Wr(e))return qr(e);var t=[];for(var r in Object(e))Xr.call(e,r)&&"constructor"!=r&&t.push(r);return t},$r=Me,Jr=wr;var Qr=function(e){return null!=e&&Jr(e.length)&&!$r(e)},Zr=zr,en=Kr,tn=Qr;var rn=function(e){return tn(e)?Zr(e):en(e)},nn=nr,on=rn;var an=function(e,t){return e&&nn(t,on(t),e)};var sn=Ae,un=Gr,cn=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t},hn=Object.prototype.hasOwnProperty;var ln=zr,fn=function(e){if(!sn(e))return cn(e);var t=un(e),r=[];for(var n in e)("constructor"!=n||!t&&hn.call(e,n))&&r.push(n);return r},dn=Qr;var pn=function(e){return dn(e)?ln(e,!0):fn(e)},gn=nr,vn=pn;var yn=function(e,t){return e&&gn(t,vn(t),e)},_n={exports:{}};!function(e,t){var r=pe,n=t&&!t.nodeType&&t,o=n&&e&&!e.nodeType&&e,i=o&&o.exports===n?r.Buffer:void 0,a=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=a?a(r):new e.constructor(r);return e.copy(n),n}}(_n,_n.exports);var mn=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t};var bn=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i};var wn=function(){return[]},xn=bn,En=wn,kn=Object.prototype.propertyIsEnumerable,Sn=Object.getOwnPropertySymbols,Dn=Sn?function(e){return null==e?[]:(e=Object(e),xn(Sn(e),(function(t){return kn.call(e,t)})))}:En,Cn=nr,An=Dn;var jn=function(e,t){return Cn(e,An(e),t)};var On=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e},In=Hr(Object.getPrototypeOf,Object),Mn=On,Fn=In,Pn=Dn,Tn=wn,Nn=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Mn(t,Pn(e)),e=Fn(e);return t}:Tn,Ln=nr,Yn=Nn;var Rn=function(e,t){return Ln(e,Yn(e),t)},Bn=On,zn=vr;var Vn=function(e,t,r){var n=t(e);return zn(e)?n:Bn(n,r(e))},Gn=Vn,Hn=Dn,Un=rn;var Wn=function(e){return Gn(e,Un,Hn)},qn=Vn,Xn=Nn,Kn=pn;var $n=function(e){return qn(e,Kn,Xn)},Jn=Je(pe,"DataView"),Qn=Je(pe,"Promise"),Zn=Je(pe,"Set"),eo=Jn,to=Qe,ro=Qn,no=Zn,oo=Je(pe,"WeakMap"),io=Ce,ao=Le,so="[object Map]",uo="[object Promise]",co="[object Set]",ho="[object WeakMap]",lo="[object DataView]",fo=ao(eo),po=ao(to),go=ao(ro),vo=ao(no),yo=ao(oo),_o=io;(eo&&_o(new eo(new ArrayBuffer(1)))!=lo||to&&_o(new to)!=so||ro&&_o(ro.resolve())!=uo||no&&_o(new no)!=co||oo&&_o(new oo)!=ho)&&(_o=function(e){var t=io(e),r="[object Object]"==t?e.constructor:void 0,n=r?ao(r):"";if(n)switch(n){case fo:return lo;case po:return so;case go:return uo;case vo:return co;case yo:return ho}return t});var mo=_o,bo=Object.prototype.hasOwnProperty;var wo=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&bo.call(e,"index")&&(r.index=e.index,r.input=e.input),r},xo=pe.Uint8Array,Eo=xo;var ko=function(e){var t=new e.constructor(e.byteLength);return new Eo(t).set(new Eo(e)),t},So=ko;var Do=function(e,t){var r=t?So(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)},Co=/\w*$/;var Ao=function(e){var t=new e.constructor(e.source,Co.exec(e));return t.lastIndex=e.lastIndex,t},jo=ge?ge.prototype:void 0,Oo=jo?jo.valueOf:void 0;var Io=ko;var Mo=function(e,t){var r=t?Io(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)},Fo=ko,Po=Do,To=Ao,No=function(e){return Oo?Object(Oo.call(e)):{}},Lo=Mo;var Yo=function(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return Fo(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return Po(e,r);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 Lo(e,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return To(e);case"[object Symbol]":return No(e)}},Ro=Ae,Bo=Object.create,zo=function(){function e(){}return function(t){if(!Ro(t))return{};if(Bo)return Bo(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),Vo=zo,Go=In,Ho=Gr;var Uo=function(e){return"function"!=typeof e.constructor||Ho(e)?{}:Vo(Go(e))},Wo=mo,qo=ir;var Xo=function(e){return qo(e)&&"[object Map]"==Wo(e)},Ko=Xo,$o=Cr,Jo=Ar.exports,Qo=Jo&&Jo.isMap,Zo=Qo?$o(Qo):Ko,ei=mo,ti=ir;var ri=function(e){return ti(e)&&"[object Set]"==ei(e)},ni=ri,oi=Cr,ii=Ar.exports,ai=ii&&ii.isSet,si=ai?oi(ai):ni,ui=Ut,ci=Wt,hi=er,li=an,fi=yn,di=_n.exports,pi=mn,gi=jn,vi=Rn,yi=Wn,_i=$n,mi=mo,bi=wo,wi=Yo,xi=Uo,Ei=vr,ki=yr.exports,Si=Zo,Di=Ae,Ci=si,Ai=rn,ji=pn,Oi="[object Arguments]",Ii="[object Function]",Mi="[object Object]",Fi={};Fi[Oi]=Fi["[object Array]"]=Fi["[object ArrayBuffer]"]=Fi["[object DataView]"]=Fi["[object Boolean]"]=Fi["[object Date]"]=Fi["[object Float32Array]"]=Fi["[object Float64Array]"]=Fi["[object Int8Array]"]=Fi["[object Int16Array]"]=Fi["[object Int32Array]"]=Fi["[object Map]"]=Fi["[object Number]"]=Fi[Mi]=Fi["[object RegExp]"]=Fi["[object Set]"]=Fi["[object String]"]=Fi["[object Symbol]"]=Fi["[object Uint8Array]"]=Fi["[object Uint8ClampedArray]"]=Fi["[object Uint16Array]"]=Fi["[object Uint32Array]"]=!0,Fi["[object Error]"]=Fi[Ii]=Fi["[object WeakMap]"]=!1;var Pi=function e(t,r,n,o,i,a){var s,u=1&r,c=2&r,h=4&r;if(n&&(s=i?n(t,o,i,a):n(t)),void 0!==s)return s;if(!Di(t))return t;var l=Ei(t);if(l){if(s=bi(t),!u)return pi(t,s)}else{var f=mi(t),d=f==Ii||"[object GeneratorFunction]"==f;if(ki(t))return di(t,u);if(f==Mi||f==Oi||d&&!i){if(s=c||d?{}:xi(t),!u)return c?vi(t,fi(s,t)):gi(t,li(s,t))}else{if(!Fi[f])return i?t:{};s=wi(t,f,u)}}a||(a=new ui);var p=a.get(t);if(p)return p;a.set(t,s),Ci(t)?t.forEach((function(o){s.add(e(o,r,n,o,t,a))})):Si(t)&&t.forEach((function(o,i){s.set(i,e(o,r,n,i,t,a))}));var g=l?void 0:(h?c?_i:yi:c?ji:Ai)(t);return ci(g||t,(function(o,i){g&&(o=t[i=o]),hi(s,i,e(o,r,n,i,t,a))})),s},Ti=Pi;var Ni=function(e){return Ti(e,4)};var Li=function(e){return function(){return e}};var Yi=function(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===r(i[u],u,i))break}return t}},Ri=Yi(),Bi=Ri,zi=rn;var Vi=function(e,t){return e&&Bi(e,t,zi)},Gi=Qr;var Hi=function(e,t){return function(r,n){if(null==r)return r;if(!Gi(r))return e(r,n);for(var o=r.length,i=t?o:-1,a=Object(r);(t?i--:++i<o)&&!1!==n(a[i],i,a););return r}},Ui=Hi(Vi);var Wi=function(e){return e},qi=Wi;var Xi=function(e){return"function"==typeof e?e:qi},Ki=Wt,$i=Ui,Ji=Xi,Qi=vr;var Zi=function(e,t){return(Qi(e)?Ki:$i)(e,Ji(t))},ea=Zi,ta=Ui;var ra=function(e,t){var r=[];return ta(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r};var na=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var oa=function(e){return this.__data__.has(e)},ia=Ft,aa=na,sa=oa;function ua(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new ia;++t<r;)this.add(e[t])}ua.prototype.add=ua.prototype.push=aa,ua.prototype.has=sa;var ca=ua;var ha=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1};var la=function(e,t){return e.has(t)},fa=ca,da=ha,pa=la;var ga=function(e,t,r,n,o,i){var a=1&r,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=i.get(e),h=i.get(t);if(c&&h)return c==t&&h==e;var l=-1,f=!0,d=2&r?new fa:void 0;for(i.set(e,t),i.set(t,e);++l<s;){var p=e[l],g=t[l];if(n)var v=a?n(g,p,l,t,e,i):n(p,g,l,e,t,i);if(void 0!==v){if(v)continue;f=!1;break}if(d){if(!da(t,(function(e,t){if(!pa(d,t)&&(p===e||o(p,e,r,n,i)))return d.push(t)}))){f=!1;break}}else if(p!==g&&!o(p,g,r,n,i)){f=!1;break}}return i.delete(e),i.delete(t),f};var va=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r};var ya=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r},_a=xo,ma=V,ba=ga,wa=va,xa=ya,Ea=ge?ge.prototype:void 0,ka=Ea?Ea.valueOf:void 0;var Sa=function(e,t,r,n,o,i,a){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new _a(e),new _a(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ma(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=wa;case"[object Set]":var u=1&n;if(s||(s=xa),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;n|=2,a.set(e,t);var h=ba(s(e),s(t),n,o,i,a);return a.delete(e),h;case"[object Symbol]":if(ka)return ka.call(e)==ka.call(t)}return!1},Da=Wn,Ca=Object.prototype.hasOwnProperty;var Aa=function(e,t,r,n,o,i){var a=1&r,s=Da(e),u=s.length;if(u!=Da(t).length&&!a)return!1;for(var c=u;c--;){var h=s[c];if(!(a?h in t:Ca.call(t,h)))return!1}var l=i.get(e),f=i.get(t);if(l&&f)return l==t&&f==e;var d=!0;i.set(e,t),i.set(t,e);for(var p=a;++c<u;){var g=e[h=s[c]],v=t[h];if(n)var y=a?n(v,g,h,t,e,i):n(g,v,h,e,t,i);if(!(void 0===y?g===v||o(g,v,r,n,i):y)){d=!1;break}p||(p="constructor"==h)}if(d&&!p){var _=e.constructor,m=t.constructor;_==m||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof m&&m instanceof m||(d=!1)}return i.delete(e),i.delete(t),d},ja=Ut,Oa=ga,Ia=Sa,Ma=Aa,Fa=mo,Pa=vr,Ta=yr.exports,Na=Fr,La="[object Arguments]",Ya="[object Array]",Ra="[object Object]",Ba=Object.prototype.hasOwnProperty;var za=function(e,t,r,n,o,i){var a=Pa(e),s=Pa(t),u=a?Ya:Fa(e),c=s?Ya:Fa(t),h=(u=u==La?Ra:u)==Ra,l=(c=c==La?Ra:c)==Ra,f=u==c;if(f&&Ta(e)){if(!Ta(t))return!1;a=!0,h=!1}if(f&&!h)return i||(i=new ja),a||Na(e)?Oa(e,t,r,n,o,i):Ia(e,t,u,r,n,o,i);if(!(1&r)){var d=h&&Ba.call(e,"__wrapped__"),p=l&&Ba.call(t,"__wrapped__");if(d||p){var g=d?e.value():e,v=p?t.value():t;return i||(i=new ja),o(g,v,r,n,i)}}return!!f&&(i||(i=new ja),Ma(e,t,r,n,o,i))},Va=ir;var Ga=function e(t,r,n,o,i){return t===r||(null==t||null==r||!Va(t)&&!Va(r)?t!=t&&r!=r:za(t,r,n,o,e,i))},Ha=Ut,Ua=Ga;var Wa=function(e,t,r,n){var o=r.length,i=o,a=!n;if(null==e)return!i;for(e=Object(e);o--;){var s=r[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var u=(s=r[o])[0],c=e[u],h=s[1];if(a&&s[2]){if(void 0===c&&!(u in e))return!1}else{var l=new Ha;if(n)var f=n(c,h,u,e,t,l);if(!(void 0===f?Ua(h,c,3,n,l):f))return!1}}return!0},qa=Ae;var Xa=function(e){return e==e&&!qa(e)},Ka=Xa,$a=rn;var Ja=function(e){for(var t=$a(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Ka(o)]}return t};var Qa=function(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}},Za=Wa,es=Ja,ts=Qa;var rs=function(e){var t=es(e);return 1==t.length&&t[0][2]?ts(t[0][0],t[0][1]):function(r){return r===e||Za(r,e,t)}},ns=Ce,os=ir;var is=function(e){return"symbol"==typeof e||os(e)&&"[object Symbol]"==ns(e)},as=vr,ss=is,us=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cs=/^\w*$/;var hs=function(e,t){if(as(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!ss(e))||(cs.test(e)||!us.test(e)||null!=t&&e in Object(t))},ls=Ft;function fs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(fs.Cache||ls),r}fs.Cache=ls;var ds=fs;var ps=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gs=/\\(\\)?/g,vs=function(e){var t=ds(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ps,(function(e,r,n,o){t.push(n?o.replace(gs,"$1"):r||e)})),t}));var ys=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o},_s=ys,ms=vr,bs=is,ws=ge?ge.prototype:void 0,xs=ws?ws.toString:void 0;var Es=function e(t){if("string"==typeof t)return t;if(ms(t))return _s(t,e)+"";if(bs(t))return xs?xs.call(t):"";var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r},ks=Es;var Ss=function(e){return null==e?"":ks(e)},Ds=vr,Cs=hs,As=vs,js=Ss;var Os=function(e,t){return Ds(e)?e:Cs(e,t)?[e]:As(js(e))},Is=is;var Ms=function(e){if("string"==typeof e||Is(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},Fs=Os,Ps=Ms;var Ts=function(e,t){for(var r=0,n=(t=Fs(t,e)).length;null!=e&&r<n;)e=e[Ps(t[r++])];return r&&r==n?e:void 0},Ns=Ts;var Ls=function(e,t,r){var n=null==e?void 0:Ns(e,t);return void 0===n?r:n};var Ys=Os,Rs=gr,Bs=vr,zs=br,Vs=wr,Gs=Ms;var Hs=function(e,t,r){for(var n=-1,o=(t=Ys(t,e)).length,i=!1;++n<o;){var a=Gs(t[n]);if(!(i=null!=e&&r(e,a)))break;e=e[a]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&Vs(o)&&zs(a,o)&&(Bs(e)||Rs(e))},Us=function(e,t){return null!=e&&t in Object(e)},Ws=Hs;var qs=function(e,t){return null!=e&&Ws(e,t,Us)},Xs=Ga,Ks=Ls,$s=qs,Js=hs,Qs=Xa,Zs=Qa,eu=Ms;var tu=function(e,t){return Js(e)&&Qs(t)?Zs(eu(e),t):function(r){var n=Ks(r,e);return void 0===n&&n===t?$s(r,e):Xs(t,n,3)}};var ru=function(e){return function(t){return null==t?void 0:t[e]}},nu=Ts;var ou=function(e){return function(t){return nu(t,e)}},iu=ru,au=ou,su=hs,uu=Ms;var cu=function(e){return su(e)?iu(uu(e)):au(e)},hu=rs,lu=tu,fu=Wi,du=vr,pu=cu;var gu=function(e){return"function"==typeof e?e:null==e?fu:"object"==typeof e?du(e)?lu(e[0],e[1]):hu(e):pu(e)},vu=bn,yu=ra,_u=gu,mu=vr;var bu=function(e,t){return(mu(e)?vu:yu)(e,_u(t))},wu=Object.prototype.hasOwnProperty;var xu=function(e,t){return null!=e&&wu.call(e,t)},Eu=Hs;var ku=function(e,t){return null!=e&&Eu(e,t,xu)},Su=Kr,Du=mo,Cu=gr,Au=vr,ju=Qr,Ou=yr.exports,Iu=Gr,Mu=Fr,Fu=Object.prototype.hasOwnProperty;var Pu=function(e){if(null==e)return!0;if(ju(e)&&(Au(e)||"string"==typeof e||"function"==typeof e.splice||Ou(e)||Mu(e)||Cu(e)))return!e.length;var t=Du(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(Iu(e))return!Su(e).length;for(var r in e)if(Fu.call(e,r))return!1;return!0};var Tu=function(e){return void 0===e},Nu=Ui,Lu=Qr;var Yu=function(e,t){var r=-1,n=Lu(e)?Array(e.length):[];return Nu(e,(function(e,o,i){n[++r]=t(e,o,i)})),n},Ru=ys,Bu=gu,zu=Yu,Vu=vr;var Gu=function(e,t){return(Vu(e)?Ru:zu)(e,Bu(t))};var Hu=function(e,t,r,n){var o=-1,i=null==e?0:e.length;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r};var Uu=function(e,t,r,n,o){return o(e,(function(e,o,i){r=n?(n=!1,e):t(r,e,o,i)})),r},Wu=Hu,qu=Ui,Xu=gu,Ku=Uu,$u=vr;var Ju=function(e,t,r){var n=$u(e)?Wu:Ku,o=arguments.length<3;return n(e,Xu(t),r,o,qu)},Qu=Ce,Zu=vr,ec=ir;var tc=function(e){return"string"==typeof e||!Zu(e)&&ec(e)&&"[object String]"==Qu(e)},rc=ru("length"),nc=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var oc=function(e){return nc.test(e)},ic="[\\ud800-\\udfff]",ac="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",sc="\\ud83c[\\udffb-\\udfff]",uc="[^\\ud800-\\udfff]",cc="(?:\\ud83c[\\udde6-\\uddff]){2}",hc="[\\ud800-\\udbff][\\udc00-\\udfff]",lc="(?:"+ac+"|"+sc+")"+"?",fc="[\\ufe0e\\ufe0f]?",dc=fc+lc+("(?:\\u200d(?:"+[uc,cc,hc].join("|")+")"+fc+lc+")*"),pc="(?:"+[uc+ac+"?",ac,cc,hc,ic].join("|")+")",gc=RegExp(sc+"(?="+sc+")|"+pc+dc,"g");var vc=rc,yc=oc,_c=function(e){for(var t=gc.lastIndex=0;gc.test(e);)++t;return t};var mc=Kr,bc=mo,wc=Qr,xc=tc,Ec=function(e){return yc(e)?_c(e):vc(e)};var kc=function(e){if(null==e)return 0;if(wc(e))return xc(e)?Ec(e):e.length;var t=bc(e);return"[object Map]"==t||"[object Set]"==t?e.size:mc(e).length},Sc=Wt,Dc=zo,Cc=Vi,Ac=gu,jc=In,Oc=vr,Ic=yr.exports,Mc=Me,Fc=Ae,Pc=Fr;var Tc=function(e,t,r){var n=Oc(e),o=n||Ic(e)||Pc(e);if(t=Ac(t),null==r){var i=e&&e.constructor;r=o?n?new i:[]:Fc(e)&&Mc(i)?Dc(jc(e)):{}}return(o?Sc:Cc)(e,(function(e,n,o){return t(r,e,n,o)})),r},Nc=gr,Lc=vr,Yc=ge?ge.isConcatSpreadable:void 0;var Rc=function(e){return Lc(e)||Nc(e)||!!(Yc&&e&&e[Yc])},Bc=On,zc=Rc;var Vc=function e(t,r,n,o,i){var a=-1,s=t.length;for(n||(n=zc),i||(i=[]);++a<s;){var u=t[a];r>0&&n(u)?r>1?e(u,r-1,n,o,i):Bc(i,u):o||(i[i.length]=u)}return i};var Gc=function(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)},Hc=Math.max;var Uc=function(e,t,r){return t=Hc(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=Hc(n.length-t,0),a=Array(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),Gc(e,this,s)}},Wc=Li,qc=Xt,Xc=qc?function(e,t){return qc(e,"toString",{configurable:!0,enumerable:!1,value:Wc(t),writable:!0})}:Wi,Kc=Date.now;var $c=function(e){var t=0,r=0;return function(){var n=Kc(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},Jc=$c(Xc),Qc=Wi,Zc=Uc,eh=Jc;var th=function(e,t){return eh(Zc(e,t,Qc),e+"")};var rh=function(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1};var nh=function(e){return e!=e};var oh=function(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1},ih=rh,ah=nh,sh=oh;var uh=function(e,t,r){return t==t?sh(e,t,r):ih(e,ah,r)},ch=uh;var hh=function(e,t){return!!(null==e?0:e.length)&&ch(e,t,0)>-1};var lh=function(e,t,r){for(var n=-1,o=null==e?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1};var fh=Zn,dh=function(){},ph=fh&&1/ya(new fh([,-0]))[1]==1/0?function(e){return new fh(e)}:dh,gh=ca,vh=hh,yh=lh,_h=la,mh=ph,bh=ya;var wh=function(e,t,r){var n=-1,o=vh,i=e.length,a=!0,s=[],u=s;if(r)a=!1,o=yh;else if(i>=200){var c=t?null:mh(e);if(c)return bh(c);a=!1,o=_h,u=new gh}else u=t?[]:s;e:for(;++n<i;){var h=e[n],l=t?t(h):h;if(h=r||0!==h?h:0,a&&l==l){for(var f=u.length;f--;)if(u[f]===l)continue e;t&&u.push(l),s.push(h)}else o(u,l,r)||(u!==s&&u.push(l),s.push(h))}return s},xh=Qr,Eh=ir;var kh=function(e){return Eh(e)&&xh(e)},Sh=Vc,Dh=wh,Ch=kh,Ah=th((function(e){return Dh(Sh(e,1,Ch,!0))})),jh=ys;var Oh=function(e,t){return jh(t,(function(t){return e[t]}))},Ih=rn;var Mh,Fh=function(e){return null==e?[]:Oh(e,Ih(e))};try{Mh={clone:Ni,constant:Li,each:ea,filter:bu,has:ku,isArray:vr,isEmpty:Pu,isFunction:Me,isUndefined:Tu,keys:rn,map:Gu,reduce:Ju,size:kc,transform:Tc,union:Ah,values:Fh}}catch(e){}Mh||(Mh=window._);var Ph=Mh,Th=Ph,Nh=Yh,Lh="\0";function Yh(e){this._isDirected=!Th.has(e,"directed")||e.directed,this._isMultigraph=!!Th.has(e,"multigraph")&&e.multigraph,this._isCompound=!!Th.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=Th.constant(void 0),this._defaultEdgeLabelFn=Th.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function Rh(e,t){e[t]?e[t]++:e[t]=1}function Bh(e,t){--e[t]||delete e[t]}function zh(e,t,r,n){var o=""+t,i=""+r;if(!e&&o>i){var a=o;o=i,i=a}return o+""+i+""+(Th.isUndefined(n)?"\0":n)}function Vh(e,t,r,n){var o=""+t,i=""+r;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};return n&&(s.name=n),s}function Gh(e,t){return zh(e,t.v,t.w,t.name)}Yh.prototype._nodeCount=0,Yh.prototype._edgeCount=0,Yh.prototype.isDirected=function(){return this._isDirected},Yh.prototype.isMultigraph=function(){return this._isMultigraph},Yh.prototype.isCompound=function(){return this._isCompound},Yh.prototype.setGraph=function(e){return this._label=e,this},Yh.prototype.graph=function(){return this._label},Yh.prototype.setDefaultNodeLabel=function(e){return Th.isFunction(e)||(e=Th.constant(e)),this._defaultNodeLabelFn=e,this},Yh.prototype.nodeCount=function(){return this._nodeCount},Yh.prototype.nodes=function(){return Th.keys(this._nodes)},Yh.prototype.sources=function(){var e=this;return Th.filter(this.nodes(),(function(t){return Th.isEmpty(e._in[t])}))},Yh.prototype.sinks=function(){var e=this;return Th.filter(this.nodes(),(function(t){return Th.isEmpty(e._out[t])}))},Yh.prototype.setNodes=function(e,t){var r=arguments,n=this;return Th.each(e,(function(e){r.length>1?n.setNode(e,t):n.setNode(e)})),this},Yh.prototype.setNode=function(e,t){return Th.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=Lh,this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},Yh.prototype.node=function(e){return this._nodes[e]},Yh.prototype.hasNode=function(e){return Th.has(this._nodes,e)},Yh.prototype.removeNode=function(e){var t=this;if(Th.has(this._nodes,e)){var r=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],Th.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),Th.each(Th.keys(this._in[e]),r),delete this._in[e],delete this._preds[e],Th.each(Th.keys(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},Yh.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Th.isUndefined(t))t=Lh;else{for(var r=t+="";!Th.isUndefined(r);r=this.parent(r))if(r===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},Yh.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},Yh.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==Lh)return t}},Yh.prototype.children=function(e){if(Th.isUndefined(e)&&(e=Lh),this._isCompound){var t=this._children[e];if(t)return Th.keys(t)}else{if(e===Lh)return this.nodes();if(this.hasNode(e))return[]}},Yh.prototype.predecessors=function(e){var t=this._preds[e];if(t)return Th.keys(t)},Yh.prototype.successors=function(e){var t=this._sucs[e];if(t)return Th.keys(t)},Yh.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return Th.union(t,this.successors(e))},Yh.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},Yh.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var r=this;Th.each(this._nodes,(function(r,n){e(n)&&t.setNode(n,r)})),Th.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,r.edge(e))}));var n={};function o(e){var i=r.parent(e);return void 0===i||t.hasNode(i)?(n[e]=i,i):i in n?n[i]:o(i)}return this._isCompound&&Th.each(t.nodes(),(function(e){t.setParent(e,o(e))})),t},Yh.prototype.setDefaultEdgeLabel=function(e){return Th.isFunction(e)||(e=Th.constant(e)),this._defaultEdgeLabelFn=e,this},Yh.prototype.edgeCount=function(){return this._edgeCount},Yh.prototype.edges=function(){return Th.values(this._edgeObjs)},Yh.prototype.setPath=function(e,t){var r=this,n=arguments;return Th.reduce(e,(function(e,o){return n.length>1?r.setEdge(e,o,t):r.setEdge(e,o),o})),this},Yh.prototype.setEdge=function(){var e,t,r,n,o=!1,i=arguments[0];"object"==typeof i&&null!==i&&"v"in i?(e=i.v,t=i.w,r=i.name,2===arguments.length&&(n=arguments[1],o=!0)):(e=i,t=arguments[1],r=arguments[3],arguments.length>2&&(n=arguments[2],o=!0)),e=""+e,t=""+t,Th.isUndefined(r)||(r=""+r);var a=zh(this._isDirected,e,t,r);if(Th.has(this._edgeLabels,a))return o&&(this._edgeLabels[a]=n),this;if(!Th.isUndefined(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[a]=o?n:this._defaultEdgeLabelFn(e,t,r);var s=Vh(this._isDirected,e,t,r);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[a]=s,Rh(this._preds[t],e),Rh(this._sucs[e],t),this._in[t][a]=s,this._out[e][a]=s,this._edgeCount++,this},Yh.prototype.edge=function(e,t,r){var n=1===arguments.length?Gh(this._isDirected,arguments[0]):zh(this._isDirected,e,t,r);return this._edgeLabels[n]},Yh.prototype.hasEdge=function(e,t,r){var n=1===arguments.length?Gh(this._isDirected,arguments[0]):zh(this._isDirected,e,t,r);return Th.has(this._edgeLabels,n)},Yh.prototype.removeEdge=function(e,t,r){var n=1===arguments.length?Gh(this._isDirected,arguments[0]):zh(this._isDirected,e,t,r),o=this._edgeObjs[n];return o&&(e=o.v,t=o.w,delete this._edgeLabels[n],delete this._edgeObjs[n],Bh(this._preds[t],e),Bh(this._sucs[e],t),delete this._in[t][n],delete this._out[e][n],this._edgeCount--),this},Yh.prototype.inEdges=function(e,t){var r=this._in[e];if(r){var n=Th.values(r);return t?Th.filter(n,(function(e){return e.v===t})):n}},Yh.prototype.outEdges=function(e,t){var r=this._out[e];if(r){var n=Th.values(r);return t?Th.filter(n,(function(e){return e.w===t})):n}},Yh.prototype.nodeEdges=function(e,t){var r=this.inEdges(e,t);if(r)return r.concat(this.outEdges(e,t))};var Hh={Graph:Nh,version:"2.1.8"},Uh=Ph,Wh=Nh,qh={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:Xh(e),edges:Kh(e)};Uh.isUndefined(e.graph())||(t.value=Uh.clone(e.graph()));return t},read:function(e){var t=new Wh(e.options).setGraph(e.value);return Uh.each(e.nodes,(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),Uh.each(e.edges,(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}};function Xh(e){return Uh.map(e.nodes(),(function(t){var r=e.node(t),n=e.parent(t),o={v:t};return Uh.isUndefined(r)||(o.value=r),Uh.isUndefined(n)||(o.parent=n),o}))}function Kh(e){return Uh.map(e.edges(),(function(t){var r=e.edge(t),n={v:t.v,w:t.w};return Uh.isUndefined(t.name)||(n.name=t.name),Uh.isUndefined(r)||(n.value=r),n}))}var $h=Ph,Jh=function(e){var t,r={},n=[];function o(n){$h.has(r,n)||(r[n]=!0,t.push(n),$h.each(e.successors(n),o),$h.each(e.predecessors(n),o))}return $h.each(e.nodes(),(function(e){t=[],o(e),t.length&&n.push(t)})),n};var Qh=Ph,Zh=el;function el(){this._arr=[],this._keyIndices={}}el.prototype.size=function(){return this._arr.length},el.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},el.prototype.has=function(e){return Qh.has(this._keyIndices,e)},el.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},el.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},el.prototype.add=function(e,t){var r=this._keyIndices;if(e=String(e),!Qh.has(r,e)){var n=this._arr,o=n.length;return r[e]=o,n.push({key:e,priority:t}),this._decrease(o),!0}return!1},el.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},el.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)},el.prototype._heapify=function(e){var t=this._arr,r=2*e,n=r+1,o=e;r<t.length&&(o=t[r].priority<t[o].priority?r:o,n<t.length&&(o=t[n].priority<t[o].priority?n:o),o!==e&&(this._swap(e,o),this._heapify(o)))},el.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},el.prototype._swap=function(e,t){var r=this._arr,n=this._keyIndices,o=r[e],i=r[t];r[e]=i,r[t]=o,n[i.key]=e,n[o.key]=t};var tl=Zh,rl=function(e,t,r,n){return function(e,t,r,n){var o,i,a={},s=new tl,u=function(e){var t=e.v!==o?e.v:e.w,n=a[t],u=r(e),c=i.distance+u;if(u<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+u);c<n.distance&&(n.distance=c,n.predecessor=o,s.decrease(t,c))};e.nodes().forEach((function(e){var r=e===t?0:Number.POSITIVE_INFINITY;a[e]={distance:r},s.add(e,r)}));for(;s.size()>0&&(o=s.removeMin(),(i=a[o]).distance!==Number.POSITIVE_INFINITY);)n(o).forEach(u);return a}(e,String(t),r||nl,n||function(t){return e.outEdges(t)})},nl=Ph.constant(1);var ol=rl,il=Ph,al=function(e,t,r){return il.transform(e.nodes(),(function(n,o){n[o]=ol(e,o,t,r)}),{})};var sl=Ph,ul=function(e){var t=0,r=[],n={},o=[];function i(a){var s=n[a]={onStack:!0,lowlink:t,index:t++};if(r.push(a),e.successors(a).forEach((function(e){sl.has(n,e)?n[e].onStack&&(s.lowlink=Math.min(s.lowlink,n[e].index)):(i(e),s.lowlink=Math.min(s.lowlink,n[e].lowlink))})),s.lowlink===s.index){var u,c=[];do{u=r.pop(),n[u].onStack=!1,c.push(u)}while(a!==u);o.push(c)}}return e.nodes().forEach((function(e){sl.has(n,e)||i(e)})),o};var cl=Ph,hl=ul,ll=function(e){return cl.filter(hl(e),(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))};var fl=function(e,t,r){return function(e,t,r){var n={},o=e.nodes();return o.forEach((function(e){n[e]={},n[e][e]={distance:0},o.forEach((function(t){e!==t&&(n[e][t]={distance:Number.POSITIVE_INFINITY})})),r(e).forEach((function(r){var o=r.v===e?r.w:r.v,i=t(r);n[e][o]={distance:i,predecessor:e}}))})),o.forEach((function(e){var t=n[e];o.forEach((function(r){var i=n[r];o.forEach((function(r){var n=i[e],o=t[r],a=i[r],s=n.distance+o.distance;s<a.distance&&(a.distance=s,a.predecessor=o.predecessor)}))}))})),n}(e,t||dl,r||function(t){return e.outEdges(t)})},dl=Ph.constant(1);var pl=Ph,gl=vl;function vl(e){var t={},r={},n=[];if(pl.each(e.sinks(),(function o(i){if(pl.has(r,i))throw new yl;pl.has(t,i)||(r[i]=!0,t[i]=!0,pl.each(e.predecessors(i),o),delete r[i],n.push(i))})),pl.size(t)!==e.nodeCount())throw new yl;return n}function yl(){}vl.CycleException=yl,yl.prototype=new Error;var _l=gl;var ml=Ph,bl=function(e,t,r){ml.isArray(t)||(t=[t]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),o=[],i={};return ml.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);wl(e,t,"post"===r,i,n,o)})),o};function wl(e,t,r,n,o,i){ml.has(n,t)||(n[t]=!0,r||i.push(t),ml.each(o(t),(function(t){wl(e,t,r,n,o,i)})),r&&i.push(t))}var xl=bl;var El=bl;var kl=Ph,Sl=Nh,Dl=Zh;var Cl,Al={Graph:Hh.Graph,json:qh,alg:{components:Jh,dijkstra:rl,dijkstraAll:al,findCycles:ll,floydWarshall:fl,isAcyclic:function(e){try{_l(e)}catch(e){if(e instanceof _l.CycleException)return!1;throw e}return!0},postorder:function(e,t){return xl(e,t,"post")},preorder:function(e,t){return El(e,t,"pre")},prim:function(e,t){var r,n=new Sl,o={},i=new Dl;function a(e){var n=e.v===r?e.w:e.v,a=i.priority(n);if(void 0!==a){var s=t(e);s<a&&(o[n]=r,i.decrease(n,s))}}if(0===e.nodeCount())return n;kl.each(e.nodes(),(function(e){i.add(e,Number.POSITIVE_INFINITY),n.setNode(e)})),i.decrease(e.nodes()[0],0);var s=!1;for(;i.size()>0;){if(r=i.removeMin(),kl.has(o,r))n.setEdge(r,o[r]);else{if(s)throw new Error("Input graph is not connected: "+e);s=!0}e.nodeEdges(r).forEach(a)}return n},tarjan:ul,topsort:gl},version:Hh.version};try{Cl=Al}catch(e){}Cl||(Cl=window.graphlib);var jl=Cl,Ol=Pi;var Il=function(e){return Ol(e,5)},Ml=V,Fl=Qr,Pl=br,Tl=Ae;var Nl=function(e,t,r){if(!Tl(r))return!1;var n=typeof t;return!!("number"==n?Fl(r)&&Pl(t,r.length):"string"==n&&t in r)&&Ml(r[t],e)},Ll=th,Yl=V,Rl=Nl,Bl=pn,zl=Object.prototype,Vl=zl.hasOwnProperty,Gl=Ll((function(e,t){e=Object(e);var r=-1,n=t.length,o=n>2?t[2]:void 0;for(o&&Rl(t[0],t[1],o)&&(n=1);++r<n;)for(var i=t[r],a=Bl(i),s=-1,u=a.length;++s<u;){var c=a[s],h=e[c];(void 0===h||Yl(h,zl[c])&&!Vl.call(e,c))&&(e[c]=i[c])}return e})),Hl=Gl,Ul=gu,Wl=Qr,ql=rn;var Xl=function(e){return function(t,r,n){var o=Object(t);if(!Wl(t)){var i=Ul(r);t=ql(t),r=function(e){return i(o[e],e,o)}}var a=e(t,r,n);return a>-1?o[i?t[a]:a]:void 0}},Kl=/\s/;var $l=function(e){for(var t=e.length;t--&&Kl.test(e.charAt(t)););return t},Jl=$l,Ql=/^\s+/;var Zl=function(e){return e?e.slice(0,Jl(e)+1).replace(Ql,""):e},ef=Ae,tf=is,rf=/^[-+]0x[0-9a-f]+$/i,nf=/^0b[01]+$/i,of=/^0o[0-7]+$/i,af=parseInt;var sf=function(e){if("number"==typeof e)return e;if(tf(e))return NaN;if(ef(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ef(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Zl(e);var r=nf.test(e);return r||of.test(e)?af(e.slice(2),r?2:8):rf.test(e)?NaN:+e},uf=sf,cf=1/0;var hf=function(e){return e?(e=uf(e))===cf||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},lf=hf;var ff=function(e){var t=lf(e),r=t%1;return t==t?r?t-r:t:0},df=rh,pf=gu,gf=ff,vf=Math.max;var yf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:gf(r);return o<0&&(o=vf(n+o,0)),df(e,pf(t),o)},_f=Xl(yf),mf=Vc;var bf=function(e){return(null==e?0:e.length)?mf(e,1):[]},wf=Ri,xf=Xi,Ef=pn;var kf=function(e,t){return null==e?e:wf(e,xf(t),Ef)};var Sf=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0},Df=$t,Cf=Vi,Af=gu;var jf=function(e,t){var r={};return t=Af(t),Cf(e,(function(e,n,o){Df(r,n,t(e,n,o))})),r},Of=is;var If=function(e,t,r){for(var n=-1,o=e.length;++n<o;){var i=e[n],a=t(i);if(null!=a&&(void 0===s?a==a&&!Of(a):r(a,s)))var s=a,u=i}return u};var Mf=function(e,t){return e>t},Ff=If,Pf=Mf,Tf=Wi;var Nf=function(e){return e&&e.length?Ff(e,Tf,Pf):void 0},Lf=$t,Yf=V;var Rf=function(e,t,r){(void 0!==r&&!Yf(e[t],r)||void 0===r&&!(t in e))&&Lf(e,t,r)},Bf=Ce,zf=In,Vf=ir,Gf=Function.prototype,Hf=Object.prototype,Uf=Gf.toString,Wf=Hf.hasOwnProperty,qf=Uf.call(Object);var Xf=function(e){if(!Vf(e)||"[object Object]"!=Bf(e))return!1;var t=zf(e);if(null===t)return!0;var r=Wf.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Uf.call(r)==qf};var Kf=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},$f=nr,Jf=pn;var Qf=function(e){return $f(e,Jf(e))},Zf=Rf,ed=_n.exports,td=Mo,rd=mn,nd=Uo,od=gr,id=vr,ad=kh,sd=yr.exports,ud=Me,cd=Ae,hd=Xf,ld=Fr,fd=Kf,dd=Qf;var pd=Ut,gd=Rf,vd=Ri,yd=function(e,t,r,n,o,i,a){var s=fd(e,r),u=fd(t,r),c=a.get(u);if(c)Zf(e,r,c);else{var h=i?i(s,u,r+"",e,t,a):void 0,l=void 0===h;if(l){var f=id(u),d=!f&&sd(u),p=!f&&!d&&ld(u);h=u,f||d||p?id(s)?h=s:ad(s)?h=rd(s):d?(l=!1,h=ed(u,!0)):p?(l=!1,h=td(u,!0)):h=[]:hd(u)||od(u)?(h=s,od(s)?h=dd(s):cd(s)&&!ud(s)||(h=nd(u))):l=!1}l&&(a.set(u,h),o(h,u,n,i,a),a.delete(u)),Zf(e,r,h)}},_d=Ae,md=pn,bd=Kf;var wd=function e(t,r,n,o,i){t!==r&&vd(r,(function(a,s){if(i||(i=new pd),_d(a))yd(t,r,s,n,e,o,i);else{var u=o?o(bd(t,s),a,s+"",t,r,i):void 0;void 0===u&&(u=a),gd(t,s,u)}}),md)},xd=th,Ed=Nl;var kd=function(e){return xd((function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&Ed(r[0],r[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,i)}return t}))},Sd=wd,Dd=kd((function(e,t,r){Sd(e,t,r)}));var Cd=function(e,t){return e<t},Ad=If,jd=Cd,Od=Wi;var Id=function(e){return e&&e.length?Ad(e,Od,jd):void 0},Md=If,Fd=gu,Pd=Cd;var Td=function(e,t){return e&&e.length?Md(e,Fd(t),Pd):void 0},Nd=pe,Ld=function(){return Nd.Date.now()},Yd=er,Rd=Os,Bd=br,zd=Ae,Vd=Ms;var Gd=function(e,t,r,n){if(!zd(e))return e;for(var o=-1,i=(t=Rd(t,e)).length,a=i-1,s=e;null!=s&&++o<i;){var u=Vd(t[o]),c=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(o!=a){var h=s[u];void 0===(c=n?n(h,u,s):void 0)&&(c=zd(h)?h:Bd(t[o+1])?[]:{})}Yd(s,u,c),s=s[u]}return e},Hd=Ts,Ud=Gd,Wd=Os;var qd=function(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],s=Hd(e,a);r(s,a)&&Ud(i,Wd(a,e),s)}return i},Xd=qd,Kd=qs;var $d=function(e,t){return Xd(e,t,(function(t,r){return Kd(e,r)}))},Jd=bf,Qd=Uc,Zd=Jc;var ep=$d,tp=function(e){return Zd(Qd(e,void 0,Jd),e+"")}((function(e,t){return null==e?{}:ep(e,t)})),rp=Math.ceil,np=Math.max;var op=function(e,t,r,n){for(var o=-1,i=np(rp((t-e)/(r||1)),0),a=Array(i);i--;)a[n?i:++o]=e,e+=r;return a},ip=op,ap=Nl,sp=hf;var up=function(e){return function(t,r,n){return n&&"number"!=typeof n&&ap(t,r,n)&&(r=n=void 0),t=sp(t),void 0===r?(r=t,t=0):r=sp(r),n=void 0===n?t<r?1:-1:sp(n),ip(t,r,n,e)}}();var cp=is;var hp=function(e,t){if(e!==t){var r=void 0!==e,n=null===e,o=e==e,i=cp(e),a=void 0!==t,s=null===t,u=t==t,c=cp(t);if(!s&&!c&&!i&&e>t||i&&a&&u&&!s&&!c||n&&a&&u||!r&&u||!o)return 1;if(!n&&!i&&!c&&e<t||c&&r&&o&&!n&&!i||s&&r&&o||!a&&o||!u)return-1}return 0},lp=hp;var fp=function(e,t,r){for(var n=-1,o=e.criteria,i=t.criteria,a=o.length,s=r.length;++n<a;){var u=lp(o[n],i[n]);if(u)return n>=s?u:u*("desc"==r[n]?-1:1)}return e.index-t.index},dp=ys,pp=Ts,gp=gu,vp=Yu,yp=function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e},_p=Cr,mp=fp,bp=Wi,wp=vr;var xp=function(e,t,r){t=t.length?dp(t,(function(e){return wp(e)?function(t){return pp(t,1===e.length?e[0]:e)}:e})):[bp];var n=-1;t=dp(t,_p(gp));var o=vp(e,(function(e,r,o){return{criteria:dp(t,(function(t){return t(e)})),index:++n,value:e}}));return yp(o,(function(e,t){return mp(e,t,r)}))},Ep=Vc,kp=xp,Sp=Nl,Dp=th((function(e,t){if(null==e)return[];var r=t.length;return r>1&&Sp(e,t[0],t[1])?t=[]:r>2&&Sp(t[0],t[1],t[2])&&(t=[t[0]]),kp(e,Ep(t,1),[])})),Cp=Ss,Ap=0;var jp=function(e){var t=++Ap;return Cp(e)+t};var Op=function(e,t,r){for(var n=-1,o=e.length,i=t.length,a={};++n<o;){var s=n<i?t[n]:void 0;r(a,e[n],s)}return a},Ip=er,Mp=Op;var Fp,Pp=function(e,t){return Mp(e||[],t||[],Ip)};try{Fp={cloneDeep:Il,constant:Li,defaults:Hl,each:ea,filter:bu,find:_f,flatten:bf,forEach:Zi,forIn:kf,has:ku,isUndefined:Tu,last:Sf,map:Gu,mapValues:jf,max:Nf,merge:Dd,min:Id,minBy:Td,now:Ld,pick:tp,range:up,reduce:Ju,sortBy:Dp,uniqueId:jp,values:Fh,zipObject:Pp}}catch(e){}Fp||(Fp=window._);var Tp=Fp,Np=Lp;function Lp(){var e={};e._next=e._prev=e,this._sentinel=e}function Yp(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Rp(e,t){if("_next"!==e&&"_prev"!==e)return t}Lp.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return Yp(t),t},Lp.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&Yp(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},Lp.prototype.toString=function(){for(var e=[],t=this._sentinel,r=t._prev;r!==t;)e.push(JSON.stringify(r,Rp)),r=r._prev;return"["+e.join(", ")+"]"};var Bp=Tp,zp=jl.Graph,Vp=Np,Gp=function(e,t){if(e.nodeCount()<=1)return[];var r=function(e,t){var r=new zp,n=0,o=0;Bp.forEach(e.nodes(),(function(e){r.setNode(e,{v:e,in:0,out:0})})),Bp.forEach(e.edges(),(function(e){var i=r.edge(e.v,e.w)||0,a=t(e),s=i+a;r.setEdge(e.v,e.w,s),o=Math.max(o,r.node(e.v).out+=a),n=Math.max(n,r.node(e.w).in+=a)}));var i=Bp.range(o+n+3).map((function(){return new Vp})),a=n+1;return Bp.forEach(r.nodes(),(function(e){Wp(i,a,r.node(e))})),{graph:r,buckets:i,zeroIdx:a}}(e,t||Hp),n=function(e,t,r){var n,o=[],i=t[t.length-1],a=t[0];for(;e.nodeCount();){for(;n=a.dequeue();)Up(e,t,r,n);for(;n=i.dequeue();)Up(e,t,r,n);if(e.nodeCount())for(var s=t.length-2;s>0;--s)if(n=t[s].dequeue()){o=o.concat(Up(e,t,r,n,!0));break}}return o}(r.graph,r.buckets,r.zeroIdx);return Bp.flatten(Bp.map(n,(function(t){return e.outEdges(t.v,t.w)})),!0)},Hp=Bp.constant(1);function Up(e,t,r,n,o){var i=o?[]:void 0;return Bp.forEach(e.inEdges(n.v),(function(n){var a=e.edge(n),s=e.node(n.v);o&&i.push({v:n.v,w:n.w}),s.out-=a,Wp(t,r,s)})),Bp.forEach(e.outEdges(n.v),(function(n){var o=e.edge(n),i=n.w,a=e.node(i);a.in-=o,Wp(t,r,a)})),e.removeNode(n.v),i}function Wp(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)}var qp=Tp,Xp=Gp,Kp={run:function(e){var t="greedy"===e.graph().acyclicer?Xp(e,function(e){return function(t){return e.edge(t).weight}}(e)):function(e){var t=[],r={},n={};function o(i){qp.has(n,i)||(n[i]=!0,r[i]=!0,qp.forEach(e.outEdges(i),(function(e){qp.has(r,e.w)?t.push(e):o(e.w)})),delete r[i])}return qp.forEach(e.nodes(),o),t}(e);qp.forEach(t,(function(t){var r=e.edge(t);e.removeEdge(t),r.forwardName=t.name,r.reversed=!0,e.setEdge(t.w,t.v,r,qp.uniqueId("rev"))}))},undo:function(e){qp.forEach(e.edges(),(function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}}))}};var $p=Tp,Jp=jl.Graph,Qp={addDummyNode:Zp,simplify:function(e){var t=(new Jp).setGraph(e.graph());return $p.forEach(e.nodes(),(function(r){t.setNode(r,e.node(r))})),$p.forEach(e.edges(),(function(r){var n=t.edge(r.v,r.w)||{weight:0,minlen:1},o=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+o.weight,minlen:Math.max(n.minlen,o.minlen)})})),t},asNonCompoundGraph:function(e){var t=new Jp({multigraph:e.isMultigraph()}).setGraph(e.graph());return $p.forEach(e.nodes(),(function(r){e.children(r).length||t.setNode(r,e.node(r))})),$p.forEach(e.edges(),(function(r){t.setEdge(r,e.edge(r))})),t},successorWeights:function(e){var t=$p.map(e.nodes(),(function(t){var r={};return $p.forEach(e.outEdges(t),(function(t){r[t.w]=(r[t.w]||0)+e.edge(t).weight})),r}));return $p.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=$p.map(e.nodes(),(function(t){var r={};return $p.forEach(e.inEdges(t),(function(t){r[t.v]=(r[t.v]||0)+e.edge(t).weight})),r}));return $p.zipObject(e.nodes(),t)},intersectRect:function(e,t){var r,n,o=e.x,i=e.y,a=t.x-o,s=t.y-i,u=e.width/2,c=e.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*u>Math.abs(a)*c?(s<0&&(c=-c),r=c*a/s,n=c):(a<0&&(u=-u),r=u,n=u*s/a);return{x:o+r,y:i+n}},buildLayerMatrix:function(e){var t=$p.map($p.range(eg(e)+1),(function(){return[]}));return $p.forEach(e.nodes(),(function(r){var n=e.node(r),o=n.rank;$p.isUndefined(o)||(t[o][n.order]=r)})),t},normalizeRanks:function(e){var t=$p.min($p.map(e.nodes(),(function(t){return e.node(t).rank})));$p.forEach(e.nodes(),(function(r){var n=e.node(r);$p.has(n,"rank")&&(n.rank-=t)}))},removeEmptyRanks:function(e){var t=$p.min($p.map(e.nodes(),(function(t){return e.node(t).rank}))),r=[];$p.forEach(e.nodes(),(function(n){var o=e.node(n).rank-t;r[o]||(r[o]=[]),r[o].push(n)}));var n=0,o=e.graph().nodeRankFactor;$p.forEach(r,(function(t,r){$p.isUndefined(t)&&r%o!=0?--n:n&&$p.forEach(t,(function(t){e.node(t).rank+=n}))}))},addBorderNode:function(e,t,r,n){var o={width:0,height:0};arguments.length>=4&&(o.rank=r,o.order=n);return Zp(e,"border",o,t)},maxRank:eg,partition:function(e,t){var r={lhs:[],rhs:[]};return $p.forEach(e,(function(e){t(e)?r.lhs.push(e):r.rhs.push(e)})),r},time:function(e,t){var r=$p.now();try{return t()}finally{console.log(e+" time: "+($p.now()-r)+"ms")}},notime:function(e,t){return t()}};function Zp(e,t,r,n){var o;do{o=$p.uniqueId(n)}while(e.hasNode(o));return r.dummy=t,e.setNode(o,r),o}function eg(e){return $p.max($p.map(e.nodes(),(function(t){var r=e.node(t).rank;if(!$p.isUndefined(r))return r})))}var tg=Tp,rg=Qp,ng={run:function(e){e.graph().dummyChains=[],tg.forEach(e.edges(),(function(t){!function(e,t){var r,n,o,i=t.v,a=e.node(i).rank,s=t.w,u=e.node(s).rank,c=t.name,h=e.edge(t),l=h.labelRank;if(u===a+1)return;for(e.removeEdge(t),o=0,++a;a<u;++o,++a)h.points=[],n={width:0,height:0,edgeLabel:h,edgeObj:t,rank:a},r=rg.addDummyNode(e,"edge",n,"_d"),a===l&&(n.width=h.width,n.height=h.height,n.dummy="edge-label",n.labelpos=h.labelpos),e.setEdge(i,r,{weight:h.weight},c),0===o&&e.graph().dummyChains.push(r),i=r;e.setEdge(i,s,{weight:h.weight},c)}(e,t)}))},undo:function(e){tg.forEach(e.graph().dummyChains,(function(t){var r,n=e.node(t),o=n.edgeLabel;for(e.setEdge(n.edgeObj,o);n.dummy;)r=e.successors(t)[0],e.removeNode(t),o.points.push({x:n.x,y:n.y}),"edge-label"===n.dummy&&(o.x=n.x,o.y=n.y,o.width=n.width,o.height=n.height),t=r,n=e.node(t)}))}};var og=Tp,ig={longestPath:function(e){var t={};og.forEach(e.sources(),(function r(n){var o=e.node(n);if(og.has(t,n))return o.rank;t[n]=!0;var i=og.min(og.map(e.outEdges(n),(function(t){return r(t.w)-e.edge(t).minlen})));return i!==Number.POSITIVE_INFINITY&&null!=i||(i=0),o.rank=i}))},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}};var ag=Tp,sg=jl.Graph,ug=ig.slack,cg=function(e){var t,r,n=new sg({directed:!1}),o=e.nodes()[0],i=e.nodeCount();n.setNode(o,{});for(;hg(n,e)<i;)t=lg(n,e),r=n.hasNode(t.v)?ug(e,t):-ug(e,t),fg(n,e,r);return n};function hg(e,t){return ag.forEach(e.nodes(),(function r(n){ag.forEach(t.nodeEdges(n),(function(o){var i=o.v,a=n===i?o.w:i;e.hasNode(a)||ug(t,o)||(e.setNode(a,{}),e.setEdge(n,a,{}),r(a))}))})),e.nodeCount()}function lg(e,t){return ag.minBy(t.edges(),(function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return ug(t,r)}))}function fg(e,t,r){ag.forEach(e.nodes(),(function(e){t.node(e).rank+=r}))}var dg=Tp,pg=cg,gg=ig.slack,vg=ig.longestPath,yg=jl.alg.preorder,_g=jl.alg.postorder,mg=Qp.simplify,bg=wg;function wg(e){e=mg(e),vg(e);var t,r=pg(e);for(kg(r),xg(r,e);t=Dg(r);)Ag(r,e,t,Cg(r,e,t))}function xg(e,t){var r=_g(e,e.nodes());r=r.slice(0,r.length-1),dg.forEach(r,(function(r){!function(e,t,r){var n=e.node(r).parent;e.edge(r,n).cutvalue=Eg(e,t,r)}(e,t,r)}))}function Eg(e,t,r){var n=e.node(r).parent,o=!0,i=t.edge(r,n),a=0;return i||(o=!1,i=t.edge(n,r)),a=i.weight,dg.forEach(t.nodeEdges(r),(function(i){var s=i.v===r,u=s?i.w:i.v;if(u!==n){var c=s===o,h=t.edge(i).weight;if(a+=c?h:-h,function(e,t,r){return e.hasEdge(t,r)}(e,r,u)){var l=e.edge(r,u).cutvalue;a+=c?-l:l}}})),a}function kg(e,t){arguments.length<2&&(t=e.nodes()[0]),Sg(e,{},1,t)}function Sg(e,t,r,n,o){var i=r,a=e.node(n);return t[n]=!0,dg.forEach(e.neighbors(n),(function(o){dg.has(t,o)||(r=Sg(e,t,r,o,n))})),a.low=i,a.lim=r++,o?a.parent=o:delete a.parent,r}function Dg(e){return dg.find(e.edges(),(function(t){return e.edge(t).cutvalue<0}))}function Cg(e,t,r){var n=r.v,o=r.w;t.hasEdge(n,o)||(n=r.w,o=r.v);var i=e.node(n),a=e.node(o),s=i,u=!1;i.lim>a.lim&&(s=a,u=!0);var c=dg.filter(t.edges(),(function(t){return u===jg(e,e.node(t.v),s)&&u!==jg(e,e.node(t.w),s)}));return dg.minBy(c,(function(e){return gg(t,e)}))}function Ag(e,t,r,n){var o=r.v,i=r.w;e.removeEdge(o,i),e.setEdge(n.v,n.w,{}),kg(e),xg(e,t),function(e,t){var r=dg.find(e.nodes(),(function(e){return!t.node(e).parent})),n=yg(e,r);n=n.slice(1),dg.forEach(n,(function(r){var n=e.node(r).parent,o=t.edge(r,n),i=!1;o||(o=t.edge(n,r),i=!0),t.node(r).rank=t.node(n).rank+(i?o.minlen:-o.minlen)}))}(e,t)}function jg(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}wg.initLowLimValues=kg,wg.initCutValues=xg,wg.calcCutValue=Eg,wg.leaveEdge=Dg,wg.enterEdge=Cg,wg.exchangeEdges=Ag;var Og=ig.longestPath,Ig=cg,Mg=bg,Fg=function(e){switch(e.graph().ranker){case"network-simplex":default:Tg(e);break;case"tight-tree":!function(e){Og(e),Ig(e)}(e);break;case"longest-path":Pg(e)}};var Pg=Og;function Tg(e){Mg(e)}var Ng=Tp,Lg=function(e){var t=function(e){var t={},r=0;function n(o){var i=r;Ng.forEach(e.children(o),n),t[o]={low:i,lim:r++}}return Ng.forEach(e.children(),n),t}(e);Ng.forEach(e.graph().dummyChains,(function(r){for(var n=e.node(r),o=n.edgeObj,i=function(e,t,r,n){var o,i,a=[],s=[],u=Math.min(t[r].low,t[n].low),c=Math.max(t[r].lim,t[n].lim);o=r;do{o=e.parent(o),a.push(o)}while(o&&(t[o].low>u||c>t[o].lim));i=o,o=n;for(;(o=e.parent(o))!==i;)s.push(o);return{path:a.concat(s.reverse()),lca:i}}(e,t,o.v,o.w),a=i.path,s=i.lca,u=0,c=a[u],h=!0;r!==o.w;){if(n=e.node(r),h){for(;(c=a[u])!==s&&e.node(c).maxRank<n.rank;)u++;c===s&&(h=!1)}if(!h){for(;u<a.length-1&&e.node(c=a[u+1]).minRank<=n.rank;)u++;c=a[u]}e.setParent(r,c),r=e.successors(r)[0]}}))};var Yg=Tp,Rg=Qp,Bg={run:function(e){var t=Rg.addDummyNode(e,"root",{},"_root"),r=function(e){var t={};function r(n,o){var i=e.children(n);i&&i.length&&Yg.forEach(i,(function(e){r(e,o+1)})),t[n]=o}return Yg.forEach(e.children(),(function(e){r(e,1)})),t}(e),n=Yg.max(Yg.values(r))-1,o=2*n+1;e.graph().nestingRoot=t,Yg.forEach(e.edges(),(function(t){e.edge(t).minlen*=o}));var i=function(e){return Yg.reduce(e.edges(),(function(t,r){return t+e.edge(r).weight}),0)}(e)+1;Yg.forEach(e.children(),(function(a){zg(e,t,o,i,n,r,a)})),e.graph().nodeRankFactor=o},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,Yg.forEach(e.edges(),(function(t){e.edge(t).nestingEdge&&e.removeEdge(t)}))}};function zg(e,t,r,n,o,i,a){var s=e.children(a);if(s.length){var u=Rg.addBorderNode(e,"_bt"),c=Rg.addBorderNode(e,"_bb"),h=e.node(a);e.setParent(u,a),h.borderTop=u,e.setParent(c,a),h.borderBottom=c,Yg.forEach(s,(function(s){zg(e,t,r,n,o,i,s);var h=e.node(s),l=h.borderTop?h.borderTop:s,f=h.borderBottom?h.borderBottom:s,d=h.borderTop?n:2*n,p=l!==f?1:o-i[a]+1;e.setEdge(u,l,{weight:d,minlen:p,nestingEdge:!0}),e.setEdge(f,c,{weight:d,minlen:p,nestingEdge:!0})})),e.parent(a)||e.setEdge(t,u,{weight:0,minlen:o+i[a]})}else a!==t&&e.setEdge(t,a,{weight:0,minlen:r})}var Vg=Tp,Gg=Qp,Hg=function(e){Vg.forEach(e.children(),(function t(r){var n=e.children(r),o=e.node(r);if(n.length&&Vg.forEach(n,t),Vg.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var i=o.minRank,a=o.maxRank+1;i<a;++i)Ug(e,"borderLeft","_bl",r,o,i),Ug(e,"borderRight","_br",r,o,i)}}))};function Ug(e,t,r,n,o,i){var a={width:0,height:0,rank:i,borderType:t},s=o[t][i-1],u=Gg.addDummyNode(e,"border",a,r);o[t][i]=u,e.setParent(u,n),s&&e.setEdge(s,u,{weight:1})}var Wg=Tp,qg={adjust:function(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||Xg(e)},undo:function(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||function(e){Wg.forEach(e.nodes(),(function(t){$g(e.node(t))})),Wg.forEach(e.edges(),(function(t){var r=e.edge(t);Wg.forEach(r.points,$g),Wg.has(r,"y")&&$g(r)}))}(e);"lr"!==t&&"rl"!==t||(!function(e){Wg.forEach(e.nodes(),(function(t){Jg(e.node(t))})),Wg.forEach(e.edges(),(function(t){var r=e.edge(t);Wg.forEach(r.points,Jg),Wg.has(r,"x")&&Jg(r)}))}(e),Xg(e))}};function Xg(e){Wg.forEach(e.nodes(),(function(t){Kg(e.node(t))})),Wg.forEach(e.edges(),(function(t){Kg(e.edge(t))}))}function Kg(e){var t=e.width;e.width=e.height,e.height=t}function $g(e){e.y=-e.y}function Jg(e){var t=e.x;e.x=e.y,e.y=t}var Qg=Tp,Zg=function(e){var t={},r=Qg.filter(e.nodes(),(function(t){return!e.children(t).length})),n=Qg.max(Qg.map(r,(function(t){return e.node(t).rank}))),o=Qg.map(Qg.range(n+1),(function(){return[]}));function i(r){if(!Qg.has(t,r)){t[r]=!0;var n=e.node(r);o[n.rank].push(r),Qg.forEach(e.successors(r),i)}}var a=Qg.sortBy(r,(function(t){return e.node(t).rank}));return Qg.forEach(a,i),o};var ev=Tp,tv=function(e,t){for(var r=0,n=1;n<t.length;++n)r+=rv(e,t[n-1],t[n]);return r};function rv(e,t,r){for(var n=ev.zipObject(r,ev.map(r,(function(e,t){return t}))),o=ev.flatten(ev.map(t,(function(t){return ev.sortBy(ev.map(e.outEdges(t),(function(t){return{pos:n[t.w],weight:e.edge(t).weight}})),"pos")})),!0),i=1;i<r.length;)i<<=1;var a=2*i-1;i-=1;var s=ev.map(new Array(a),(function(){return 0})),u=0;return ev.forEach(o.forEach((function(e){var t=e.pos+i;s[t]+=e.weight;for(var r=0;t>0;)t%2&&(r+=s[t+1]),s[t=t-1>>1]+=e.weight;u+=e.weight*r}))),u}var nv=Tp;var ov=Tp;var iv=Tp,av=Qp;function sv(e,t,r){for(var n;t.length&&(n=iv.last(t)).i<=r;)t.pop(),e.push(n.vs),r++;return r}var uv=Tp,cv=function(e,t){return nv.map(t,(function(t){var r=e.inEdges(t);if(r.length){var n=nv.reduce(r,(function(t,r){var n=e.edge(r),o=e.node(r.v);return{sum:t.sum+n.weight*o.order,weight:t.weight+n.weight}}),{sum:0,weight:0});return{v:t,barycenter:n.sum/n.weight,weight:n.weight}}return{v:t}}))},hv=function(e,t){var r={};return ov.forEach(e,(function(e,t){var n=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};ov.isUndefined(e.barycenter)||(n.barycenter=e.barycenter,n.weight=e.weight)})),ov.forEach(t.edges(),(function(e){var t=r[e.v],n=r[e.w];ov.isUndefined(t)||ov.isUndefined(n)||(n.indegree++,t.out.push(r[e.w]))})),function(e){var t=[];function r(e){return function(t){t.merged||(ov.isUndefined(t.barycenter)||ov.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&function(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}(e,t)}}function n(t){return function(r){r.in.push(t),0==--r.indegree&&e.push(r)}}for(;e.length;){var o=e.pop();t.push(o),ov.forEach(o.in.reverse(),r(o)),ov.forEach(o.out,n(o))}return ov.map(ov.filter(t,(function(e){return!e.merged})),(function(e){return ov.pick(e,["vs","i","barycenter","weight"])}))}(ov.filter(r,(function(e){return!e.indegree})))},lv=function(e,t){var r=av.partition(e,(function(e){return iv.has(e,"barycenter")})),n=r.lhs,o=iv.sortBy(r.rhs,(function(e){return-e.i})),i=[],a=0,s=0,u=0;n.sort((c=!!t,function(e,t){return e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:c?t.i-e.i:e.i-t.i})),u=sv(i,o,u),iv.forEach(n,(function(e){u+=e.vs.length,i.push(e.vs),a+=e.barycenter*e.weight,s+=e.weight,u=sv(i,o,u)}));var c;var h={vs:iv.flatten(i,!0)};s&&(h.barycenter=a/s,h.weight=s);return h},fv=function e(t,r,n,o){var i=t.children(r),a=t.node(r),s=a?a.borderLeft:void 0,u=a?a.borderRight:void 0,c={};s&&(i=uv.filter(i,(function(e){return e!==s&&e!==u})));var h=cv(t,i);uv.forEach(h,(function(r){if(t.children(r.v).length){var i=e(t,r.v,n,o);c[r.v]=i,uv.has(i,"barycenter")&&(a=r,s=i,uv.isUndefined(a.barycenter)?(a.barycenter=s.barycenter,a.weight=s.weight):(a.barycenter=(a.barycenter*a.weight+s.barycenter*s.weight)/(a.weight+s.weight),a.weight+=s.weight))}var a,s}));var l=hv(h,n);!function(e,t){uv.forEach(e,(function(e){e.vs=uv.flatten(e.vs.map((function(e){return t[e]?t[e].vs:e})),!0)}))}(l,c);var f=lv(l,o);if(s&&(f.vs=uv.flatten([s,f.vs,u],!0),t.predecessors(s).length)){var d=t.node(t.predecessors(s)[0]),p=t.node(t.predecessors(u)[0]);uv.has(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+d.order+p.order)/(f.weight+2),f.weight+=2}return f};var dv=Tp,pv=jl.Graph,gv=function(e,t,r){var n=function(e){var t;for(;e.hasNode(t=dv.uniqueId("_root")););return t}(e),o=new pv({compound:!0}).setGraph({root:n}).setDefaultNodeLabel((function(t){return e.node(t)}));return dv.forEach(e.nodes(),(function(i){var a=e.node(i),s=e.parent(i);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(o.setNode(i),o.setParent(i,s||n),dv.forEach(e[r](i),(function(t){var r=t.v===i?t.w:t.v,n=o.edge(r,i),a=dv.isUndefined(n)?0:n.weight;o.setEdge(r,i,{weight:e.edge(t).weight+a})})),dv.has(a,"minRank")&&o.setNode(i,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))})),o};var vv=Tp;var yv=Tp,_v=Zg,mv=tv,bv=fv,wv=gv,xv=function(e,t,r){var n,o={};vv.forEach(r,(function(r){for(var i,a,s=e.parent(r);s;){if((i=e.parent(s))?(a=o[i],o[i]=s):(a=n,n=s),a&&a!==s)return void t.setEdge(a,s);s=i}}))},Ev=jl.Graph,kv=Qp,Sv=function(e){var t=kv.maxRank(e),r=Dv(e,yv.range(1,t+1),"inEdges"),n=Dv(e,yv.range(t-1,-1,-1),"outEdges"),o=_v(e);Av(e,o);for(var i,a=Number.POSITIVE_INFINITY,s=0,u=0;u<4;++s,++u){Cv(s%2?r:n,s%4>=2),o=kv.buildLayerMatrix(e);var c=mv(e,o);c<a&&(u=0,i=yv.cloneDeep(o),a=c)}Av(e,i)};function Dv(e,t,r){return yv.map(t,(function(t){return wv(e,t,r)}))}function Cv(e,t){var r=new Ev;yv.forEach(e,(function(e){var n=e.graph().root,o=bv(e,n,r,t);yv.forEach(o.vs,(function(t,r){e.node(t).order=r})),xv(e,r,o.vs)}))}function Av(e,t){yv.forEach(t,(function(t){yv.forEach(t,(function(t,r){e.node(t).order=r}))}))}var jv=Tp,Ov=jl.Graph,Iv=Qp,Mv=function(e){var t,r=Iv.buildLayerMatrix(e),n=jv.merge(Fv(e,r),Pv(e,r)),o={};jv.forEach(["u","d"],(function(i){t="u"===i?r:jv.values(r).reverse(),jv.forEach(["l","r"],(function(r){"r"===r&&(t=jv.map(t,(function(e){return jv.values(e).reverse()})));var a=("u"===i?e.predecessors:e.successors).bind(e),s=Lv(e,t,n,a),u=Yv(e,t,s.root,s.align,"r"===r);"r"===r&&(u=jv.mapValues(u,(function(e){return-e}))),o[i+r]=u}))}));var i=Rv(e,o);return Bv(o,i),zv(o,e.graph().align)};function Fv(e,t){var r={};return jv.reduce(t,(function(t,n){var o=0,i=0,a=t.length,s=jv.last(n);return jv.forEach(n,(function(t,u){var c=function(e,t){if(e.node(t).dummy)return jv.find(e.predecessors(t),(function(t){return e.node(t).dummy}))}(e,t),h=c?e.node(c).order:a;(c||t===s)&&(jv.forEach(n.slice(i,u+1),(function(t){jv.forEach(e.predecessors(t),(function(n){var i=e.node(n),a=i.order;!(a<o||h<a)||i.dummy&&e.node(t).dummy||Tv(r,n,t)}))})),i=u+1,o=h)})),n})),r}function Pv(e,t){var r={};function n(t,n,o,i,a){var s;jv.forEach(jv.range(n,o),(function(n){s=t[n],e.node(s).dummy&&jv.forEach(e.predecessors(s),(function(t){var n=e.node(t);n.dummy&&(n.order<i||n.order>a)&&Tv(r,t,s)}))}))}return jv.reduce(t,(function(t,r){var o,i=-1,a=0;return jv.forEach(r,(function(s,u){if("border"===e.node(s).dummy){var c=e.predecessors(s);c.length&&(o=e.node(c[0]).order,n(r,a,u,i,o),a=u,i=o)}n(r,a,r.length,o,t.length)})),r})),r}function Tv(e,t,r){if(t>r){var n=t;t=r,r=n}var o=e[t];o||(e[t]=o={}),o[r]=!0}function Nv(e,t,r){if(t>r){var n=t;t=r,r=n}return jv.has(e[t],r)}function Lv(e,t,r,n){var o={},i={},a={};return jv.forEach(t,(function(e){jv.forEach(e,(function(e,t){o[e]=e,i[e]=e,a[e]=t}))})),jv.forEach(t,(function(e){var t=-1;jv.forEach(e,(function(e){var s=n(e);if(s.length){s=jv.sortBy(s,(function(e){return a[e]}));for(var u=(s.length-1)/2,c=Math.floor(u),h=Math.ceil(u);c<=h;++c){var l=s[c];i[e]===e&&t<a[l]&&!Nv(r,e,l)&&(i[l]=e,i[e]=o[e]=o[l],t=a[l])}}}))})),{root:o,align:i}}function Yv(e,t,r,n,o){var i={},a=function(e,t,r,n){var o=new Ov,i=e.graph(),a=function(e,t,r){return function(n,o,i){var a,s=n.node(o),u=n.node(i),c=0;if(c+=s.width/2,jv.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":a=-s.width/2;break;case"r":a=s.width/2}if(a&&(c+=r?a:-a),a=0,c+=(s.dummy?t:e)/2,c+=(u.dummy?t:e)/2,c+=u.width/2,jv.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":a=u.width/2;break;case"r":a=-u.width/2}return a&&(c+=r?a:-a),a=0,c}}(i.nodesep,i.edgesep,n);return jv.forEach(t,(function(t){var n;jv.forEach(t,(function(t){var i=r[t];if(o.setNode(i),n){var s=r[n],u=o.edge(s,i);o.setEdge(s,i,Math.max(a(e,t,n),u||0))}n=t}))})),o}(e,t,r,o),s=o?"borderLeft":"borderRight";function u(e,t){for(var r=a.nodes(),n=r.pop(),o={};n;)o[n]?e(n):(o[n]=!0,r.push(n),r=r.concat(t(n))),n=r.pop()}return u((function(e){i[e]=a.inEdges(e).reduce((function(e,t){return Math.max(e,i[t.v]+a.edge(t))}),0)}),a.predecessors.bind(a)),u((function(t){var r=a.outEdges(t).reduce((function(e,t){return Math.min(e,i[t.w]-a.edge(t))}),Number.POSITIVE_INFINITY),n=e.node(t);r!==Number.POSITIVE_INFINITY&&n.borderType!==s&&(i[t]=Math.max(i[t],r))}),a.successors.bind(a)),jv.forEach(n,(function(e){i[e]=i[r[e]]})),i}function Rv(e,t){return jv.minBy(jv.values(t),(function(t){var r=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY;return jv.forIn(t,(function(t,o){var i=function(e,t){return e.node(t).width}(e,o)/2;r=Math.max(t+i,r),n=Math.min(t-i,n)})),r-n}))}function Bv(e,t){var r=jv.values(t),n=jv.min(r),o=jv.max(r);jv.forEach(["u","d"],(function(r){jv.forEach(["l","r"],(function(i){var a,s=r+i,u=e[s];if(u!==t){var c=jv.values(u);(a="l"===i?n-jv.min(c):o-jv.max(c))&&(e[s]=jv.mapValues(u,(function(e){return e+a})))}}))}))}function zv(e,t){return jv.mapValues(e.ul,(function(r,n){if(t)return e[t.toLowerCase()][n];var o=jv.sortBy(jv.map(e,n));return(o[1]+o[2])/2}))}var Vv=Tp,Gv=Qp,Hv=Mv,Uv=function(e){(function(e){var t=Gv.buildLayerMatrix(e),r=e.graph().ranksep,n=0;Vv.forEach(t,(function(t){var o=Vv.max(Vv.map(t,(function(t){return e.node(t).height})));Vv.forEach(t,(function(t){e.node(t).y=n+o/2})),n+=o+r}))})(e=Gv.asNonCompoundGraph(e)),Vv.forEach(Hv(e),(function(t,r){e.node(r).x=t}))};var Wv=Tp,qv=Kp,Xv=ng,Kv=Fg,$v=Qp.normalizeRanks,Jv=Lg,Qv=Qp.removeEmptyRanks,Zv=Bg,ey=Hg,ty=qg,ry=Sv,ny=Uv,oy=Qp,iy=jl.Graph,ay=function(e,t){var r=t&&t.debugTiming?oy.time:oy.notime;r("layout",(function(){var t=r(" buildLayoutGraph",(function(){return function(e){var t=new iy({multigraph:!0,compound:!0}),r=vy(e.graph());return t.setGraph(Wv.merge({},uy,gy(r,sy),Wv.pick(r,cy))),Wv.forEach(e.nodes(),(function(r){var n=vy(e.node(r));t.setNode(r,Wv.defaults(gy(n,hy),ly)),t.setParent(r,e.parent(r))})),Wv.forEach(e.edges(),(function(r){var n=vy(e.edge(r));t.setEdge(r,Wv.merge({},dy,gy(n,fy),Wv.pick(n,py)))})),t}(e)}));r(" runLayout",(function(){!function(e,t){t(" makeSpaceForEdgeLabels",(function(){!function(e){var t=e.graph();t.ranksep/=2,Wv.forEach(e.edges(),(function(r){var n=e.edge(r);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)}))}(e)})),t(" removeSelfEdges",(function(){!function(e){Wv.forEach(e.edges(),(function(t){if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}}))}(e)})),t(" acyclic",(function(){qv.run(e)})),t(" nestingGraph.run",(function(){Zv.run(e)})),t(" rank",(function(){Kv(oy.asNonCompoundGraph(e))})),t(" injectEdgeLabelProxies",(function(){!function(e){Wv.forEach(e.edges(),(function(t){var r=e.edge(t);if(r.width&&r.height){var n=e.node(t.v),o={rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t};oy.addDummyNode(e,"edge-proxy",o,"_ep")}}))}(e)})),t(" removeEmptyRanks",(function(){Qv(e)})),t(" nestingGraph.cleanup",(function(){Zv.cleanup(e)})),t(" normalizeRanks",(function(){$v(e)})),t(" assignRankMinMax",(function(){!function(e){var t=0;Wv.forEach(e.nodes(),(function(r){var n=e.node(r);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,t=Wv.max(t,n.maxRank))})),e.graph().maxRank=t}(e)})),t(" removeEdgeLabelProxies",(function(){!function(e){Wv.forEach(e.nodes(),(function(t){var r=e.node(t);"edge-proxy"===r.dummy&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))}))}(e)})),t(" normalize.run",(function(){Xv.run(e)})),t(" parentDummyChains",(function(){Jv(e)})),t(" addBorderSegments",(function(){ey(e)})),t(" order",(function(){ry(e)})),t(" insertSelfEdges",(function(){!function(e){var t=oy.buildLayerMatrix(e);Wv.forEach(t,(function(t){var r=0;Wv.forEach(t,(function(t,n){var o=e.node(t);o.order=n+r,Wv.forEach(o.selfEdges,(function(t){oy.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:o.rank,order:n+ ++r,e:t.e,label:t.label},"_se")})),delete o.selfEdges}))}))}(e)})),t(" adjustCoordinateSystem",(function(){ty.adjust(e)})),t(" position",(function(){ny(e)})),t(" positionSelfEdges",(function(){!function(e){Wv.forEach(e.nodes(),(function(t){var r=e.node(t);if("selfedge"===r.dummy){var n=e.node(r.e.v),o=n.x+n.width/2,i=n.y,a=r.x-o,s=n.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:o+2*a/3,y:i-s},{x:o+5*a/6,y:i-s},{x:o+a,y:i},{x:o+5*a/6,y:i+s},{x:o+2*a/3,y:i+s}],r.label.x=r.x,r.label.y=r.y}}))}(e)})),t(" removeBorderNodes",(function(){!function(e){Wv.forEach(e.nodes(),(function(t){if(e.children(t).length){var r=e.node(t),n=e.node(r.borderTop),o=e.node(r.borderBottom),i=e.node(Wv.last(r.borderLeft)),a=e.node(Wv.last(r.borderRight));r.width=Math.abs(a.x-i.x),r.height=Math.abs(o.y-n.y),r.x=i.x+r.width/2,r.y=n.y+r.height/2}})),Wv.forEach(e.nodes(),(function(t){"border"===e.node(t).dummy&&e.removeNode(t)}))}(e)})),t(" normalize.undo",(function(){Xv.undo(e)})),t(" fixupEdgeLabelCoords",(function(){!function(e){Wv.forEach(e.edges(),(function(t){var r=e.edge(t);if(Wv.has(r,"x"))switch("l"!==r.labelpos&&"r"!==r.labelpos||(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}}))}(e)})),t(" undoCoordinateSystem",(function(){ty.undo(e)})),t(" translateGraph",(function(){!function(e){var t=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,o=0,i=e.graph(),a=i.marginx||0,s=i.marginy||0;function u(e){var i=e.x,a=e.y,s=e.width,u=e.height;t=Math.min(t,i-s/2),r=Math.max(r,i+s/2),n=Math.min(n,a-u/2),o=Math.max(o,a+u/2)}Wv.forEach(e.nodes(),(function(t){u(e.node(t))})),Wv.forEach(e.edges(),(function(t){var r=e.edge(t);Wv.has(r,"x")&&u(r)})),t-=a,n-=s,Wv.forEach(e.nodes(),(function(r){var o=e.node(r);o.x-=t,o.y-=n})),Wv.forEach(e.edges(),(function(r){var o=e.edge(r);Wv.forEach(o.points,(function(e){e.x-=t,e.y-=n})),Wv.has(o,"x")&&(o.x-=t),Wv.has(o,"y")&&(o.y-=n)})),i.width=r-t+a,i.height=o-n+s}(e)})),t(" assignNodeIntersects",(function(){!function(e){Wv.forEach(e.edges(),(function(t){var r,n,o=e.edge(t),i=e.node(t.v),a=e.node(t.w);o.points?(r=o.points[0],n=o.points[o.points.length-1]):(o.points=[],r=a,n=i),o.points.unshift(oy.intersectRect(i,r)),o.points.push(oy.intersectRect(a,n))}))}(e)})),t(" reversePoints",(function(){!function(e){Wv.forEach(e.edges(),(function(t){var r=e.edge(t);r.reversed&&r.points.reverse()}))}(e)})),t(" acyclic.undo",(function(){qv.undo(e)}))}(t,r)})),r(" updateInputGraph",(function(){!function(e,t){Wv.forEach(e.nodes(),(function(r){var n=e.node(r),o=t.node(r);n&&(n.x=o.x,n.y=o.y,t.children(r).length&&(n.width=o.width,n.height=o.height))})),Wv.forEach(e.edges(),(function(r){var n=e.edge(r),o=t.edge(r);n.points=o.points,Wv.has(o,"x")&&(n.x=o.x,n.y=o.y)})),e.graph().width=t.graph().width,e.graph().height=t.graph().height}(e,t)}))}))};var sy=["nodesep","edgesep","ranksep","marginx","marginy"],uy={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},cy=["acyclicer","ranker","rankdir","align"],hy=["width","height"],ly={width:0,height:0},fy=["minlen","weight","width","height","labeloffset"],dy={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},py=["labelpos"];function gy(e,t){return Wv.mapValues(Wv.pick(e,t),Number)}function vy(e){var t={};return Wv.forEach(e,(function(e,r){t[r.toLowerCase()]=e})),t}var yy=Tp,_y=Qp,my=jl.Graph;var by={graphlib:jl,layout:ay,debug:{debugOrdering:function(e){var t=_y.buildLayerMatrix(e),r=new my({compound:!0,multigraph:!0}).setGraph({});return yy.forEach(e.nodes(),(function(t){r.setNode(t,{label:t}),r.setParent(t,"layer"+e.node(t).rank)})),yy.forEach(e.edges(),(function(e){r.setEdge(e.v,e.w,{},e.name)})),yy.forEach(t,(function(e,t){var n="layer"+t;r.setNode(n,{rank:"same"}),yy.reduce(e,(function(e,t){return r.setEdge(e,t,{style:"invis"}),t}))})),r}},util:{time:Qp.time,notime:Qp.notime},version:"0.8.5"},wy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t}(by.graphlib.Graph),xy=function(){function e(){this._g=new wy({multigraph:!0,compound:!0}),this._g.setGraph({}),this._g.setDefaultNodeLabel((function(){return{debug:"error"}})),this._g.setDefaultEdgeLabel((function(){return{debug:"error"}}))}return e.prototype.parent=function(e){return this._g.parent(e)},e.prototype.filterNodes=function(e){var t=[];return this.eachNode((function(r){e(r)&&t.push(r)})),t},e.prototype.eachNode=function(e){this._g.nodes().forEach((function(t){e(t,this.node(t))}),this)},e.prototype.filterEdges=function(e){var t=[];return this.eachEdge((function(r){e(r)&&t.push(r)})),t},e.prototype.eachEdge=function(e){this._g.edges().forEach((function(t){e(t,t.v,t.w,this.edge(t))}),this)},e.prototype.setData=function(e,t,r,n,o){for(var i=this,a={addedVertices:[],addedEdges:[]},s=e.concat(t),u=0;u<s.length;++u){var c=s[u];o&&this._g.hasNode(c._id)||(this._g.setNode(c._id,c),a.addedVertices.push(c))}for(u=0;u<r.length;++u){var h=r[u];o&&this._g.hasEdge(h._id)||(h._sourceVertex&&h._targetVertex?(this._g.setEdge(h._sourceVertex._id,h._targetVertex._id,h,h._id),a.addedEdges.push(h)):console.warn("Bad edge definition"))}if(n)for(u=0;u<n.length;++u)this._g.setParent(n[u].child._id,n[u].parent._id);if(o){var l=r.map((function(e){return e._id}));this.filterEdges((function(e){return l.indexOf(e.name)<0})).forEach((function(e){return i._g.removeEdge(e.v,e.w)}));var f=s.map((function(e){return e._id}));this.filterNodes((function(e){return f.indexOf(e)<0})).forEach((function(e){return i._g.removeNode(e)}))}return a},e.prototype.node=function(e){return this._g.node(e)},e.prototype.nodeCount=function(){return this._g.nodeCount()},e.prototype.nodes=function(){var e=this;return this._g.nodes().map((function(t){return e._g.node(t)}))},e.prototype.nodeEdges=function(e){return this._g.nodeEdges(e)},e.prototype.edge=function(e){return this._g.edge(e)},e.prototype.edges=function(){var e=this;return this._g.edges().map((function(t){return e._g.edge(t)}))},e.prototype.neighbors=function(e){var t=this;return this._g.neighbors(e).map((function(e){return t._g.node(e)}))},e.prototype.singleNeighbors=function(e){var t=this;return this._g.neighbors(e).filter((function(e){return 1===t._g.neighbors(e).length})).map((function(e){return t._g.node(e)}))},e.prototype.gatherShortestPath=function(e,t){for(var r=[],n=t,o=e[n];o;){if(o.distance<1/0&&o.predecessor){var i=this._g.nodeEdges(n,o.predecessor)[0];r.push(this._g.edge(i))}o=e[n=o.predecessor]}return r},e.prototype.shortestPath=function(e,t){return this.gatherShortestPath(by.graphlib.alg.dijkstra(this._g,e),t)},e.prototype.undirectedShortestPath=function(e,t){var r=this;return this.gatherShortestPath(by.graphlib.alg.dijkstra(this._g,e,null,(function(e){return r._g.nodeEdges(e)})),t)},e.prototype.getJSON=function(){var e=by.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})," ")},e}();function Ey(e,t){var r;function n(){var n,o,i=r.length,a=0,s=0;for(n=0;n<i;++n)a+=(o=r[n]).x,s+=o.y;for(a=a/i-e,s=s/i-t,n=0;n<i;++n)(o=r[n]).x-=a,o.y-=s}return null==e&&(e=0),null==t&&(t=0),n.initialize=function(e){r=e},n.x=function(t){return arguments.length?(e=+t,n):e},n.y=function(e){return arguments.length?(t=+e,n):t},n}function ky(e){return function(){return e}}function Sy(){return 1e-6*(Math.random()-.5)}function Dy(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var o,i,a,s,u,c,h,l,f,d=e._root,p={data:n},g=e._x0,v=e._y0,y=e._x1,_=e._y1;if(!d)return e._root=p,e;for(;d.length;)if((c=t>=(i=(g+y)/2))?g=i:y=i,(h=r>=(a=(v+_)/2))?v=a:_=a,o=d,!(d=d[l=h<<1|c]))return o[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,o?o[l]=p:e._root=p,e;do{o=o?o[l]=new Array(4):e._root=new Array(4),(c=t>=(i=(g+y)/2))?g=i:y=i,(h=r>=(a=(v+_)/2))?v=a:_=a}while((l=h<<1|c)==(f=(u>=a)<<1|s>=i));return o[f]=d,o[l]=p,e}function Cy(e,t,r,n,o){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=o}function Ay(e){return e[0]}function jy(e){return e[1]}function Oy(e,t,r){var n=new Iy(null==t?Ay:t,null==r?jy:r,NaN,NaN,NaN,NaN);return null==e?n:n.addAll(e)}function Iy(e,t,r,n,o,i){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=o,this._y1=i,this._root=void 0}function My(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var Fy=Oy.prototype=Iy.prototype;function Py(e){return e.index}function Ty(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function Ny(e){var r,n,o,i,a,s=Py,u=function(e){return 1/Math.min(i[e.source.index],i[e.target.index])},c=ky(30),h=1;function l(t){for(var o=0,i=e.length;o<h;++o)for(var s,u,c,l,f,d,p,g=0;g<i;++g)u=(s=e[g]).source,l=(c=s.target).x+c.vx-u.x-u.vx||Sy(),f=c.y+c.vy-u.y-u.vy||Sy(),l*=d=((d=Math.sqrt(l*l+f*f))-n[g])/d*t*r[g],f*=d,c.vx-=l*(p=a[g]),c.vy-=f*p,u.vx+=l*(p=1-p),u.vy+=f*p}function f(){if(o){var u,c,h=o.length,l=e.length,f=t.map(o,s);for(u=0,i=new Array(h);u<l;++u)(c=e[u]).index=u,"object"!=typeof c.source&&(c.source=Ty(f,c.source)),"object"!=typeof c.target&&(c.target=Ty(f,c.target)),i[c.source.index]=(i[c.source.index]||0)+1,i[c.target.index]=(i[c.target.index]||0)+1;for(u=0,a=new Array(l);u<l;++u)c=e[u],a[u]=i[c.source.index]/(i[c.source.index]+i[c.target.index]);r=new Array(l),d(),n=new Array(l),p()}}function d(){if(o)for(var t=0,n=e.length;t<n;++t)r[t]=+u(e[t],t,e)}function p(){if(o)for(var t=0,r=e.length;t<r;++t)n[t]=+c(e[t],t,e)}return null==e&&(e=[]),l.initialize=function(e){o=e,f()},l.links=function(t){return arguments.length?(e=t,f(),l):e},l.id=function(e){return arguments.length?(s=e,l):s},l.iterations=function(e){return arguments.length?(h=+e,l):h},l.strength=function(e){return arguments.length?(u="function"==typeof e?e:ky(+e),d(),l):u},l.distance=function(e){return arguments.length?(c="function"==typeof e?e:ky(+e),p(),l):c},l}Fy.copy=function(){var e,t,r=new Iy(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=My(n),r;for(e=[{source:n,target:r._root=new Array(4)}];n=e.pop();)for(var o=0;o<4;++o)(t=n.source[o])&&(t.length?e.push({source:t,target:n.target[o]=new Array(4)}):n.target[o]=My(t));return r},Fy.add=function(e){var t=+this._x.call(null,e),r=+this._y.call(null,e);return Dy(this.cover(t,r),t,r,e)},Fy.addAll=function(e){var t,r,n,o,i=e.length,a=new Array(i),s=new Array(i),u=1/0,c=1/0,h=-1/0,l=-1/0;for(r=0;r<i;++r)isNaN(n=+this._x.call(null,t=e[r]))||isNaN(o=+this._y.call(null,t))||(a[r]=n,s[r]=o,n<u&&(u=n),n>h&&(h=n),o<c&&(c=o),o>l&&(l=o));if(u>h||c>l)return this;for(this.cover(u,c).cover(h,l),r=0;r<i;++r)Dy(this,a[r],s[r],e[r]);return this},Fy.cover=function(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,n=this._y0,o=this._x1,i=this._y1;if(isNaN(r))o=(r=Math.floor(e))+1,i=(n=Math.floor(t))+1;else{for(var a,s,u=o-r,c=this._root;r>e||e>=o||n>t||t>=i;)switch(s=(t<n)<<1|e<r,(a=new Array(4))[s]=c,c=a,u*=2,s){case 0:o=r+u,i=n+u;break;case 1:r=o-u,i=n+u;break;case 2:o=r+u,n=i-u;break;case 3:r=o-u,n=i-u}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=n,this._x1=o,this._y1=i,this},Fy.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},Fy.extent=function(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]]},Fy.find=function(e,t,r){var n,o,i,a,s,u,c,h=this._x0,l=this._y0,f=this._x1,d=this._y1,p=[],g=this._root;for(g&&p.push(new Cy(g,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(!(!(g=u.node)||(o=u.x0)>f||(i=u.y0)>d||(a=u.x1)<h||(s=u.y1)<l))if(g.length){var v=(o+a)/2,y=(i+s)/2;p.push(new Cy(g[3],v,y,a,s),new Cy(g[2],o,y,v,s),new Cy(g[1],v,i,a,y),new Cy(g[0],o,i,v,y)),(c=(t>=y)<<1|e>=v)&&(u=p[p.length-1],p[p.length-1]=p[p.length-1-c],p[p.length-1-c]=u)}else{var _=e-+this._x.call(null,g.data),m=t-+this._y.call(null,g.data),b=_*_+m*m;if(b<r){var w=Math.sqrt(r=b);h=e-w,l=t-w,f=e+w,d=t+w,n=g.data}}return n},Fy.remove=function(e){if(isNaN(i=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e)))return this;var t,r,n,o,i,a,s,u,c,h,l,f,d=this._root,p=this._x0,g=this._y0,v=this._x1,y=this._y1;if(!d)return this;if(d.length)for(;;){if((c=i>=(s=(p+v)/2))?p=s:v=s,(h=a>=(u=(g+y)/2))?g=u:y=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(o=d.next)&&delete d.next,n?(o?n.next=o:delete n.next,this):t?(o?t[l]=o: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=o,this)},Fy.removeAll=function(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this},Fy.root=function(){return this._root},Fy.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},Fy.visit=function(e){var t,r,n,o,i,a,s=[],u=this._root;for(u&&s.push(new Cy(u,this._x0,this._y0,this._x1,this._y1));t=s.pop();)if(!e(u=t.node,n=t.x0,o=t.y0,i=t.x1,a=t.y1)&&u.length){var c=(n+i)/2,h=(o+a)/2;(r=u[3])&&s.push(new Cy(r,c,h,i,a)),(r=u[2])&&s.push(new Cy(r,n,h,c,a)),(r=u[1])&&s.push(new Cy(r,c,o,i,h)),(r=u[0])&&s.push(new Cy(r,n,o,c,h))}return this},Fy.visitAfter=function(e){var t,r=[],n=[];for(this._root&&r.push(new Cy(this._root,this._x0,this._y0,this._x1,this._y1));t=r.pop();){var o=t.node;if(o.length){var i,a=t.x0,s=t.y0,u=t.x1,c=t.y1,h=(a+u)/2,l=(s+c)/2;(i=o[0])&&r.push(new Cy(i,a,s,h,l)),(i=o[1])&&r.push(new Cy(i,h,s,u,l)),(i=o[2])&&r.push(new Cy(i,a,l,h,c)),(i=o[3])&&r.push(new Cy(i,h,l,u,c))}n.push(t)}for(;t=n.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this},Fy.x=function(e){return arguments.length?(this._x=e,this):this._x},Fy.y=function(e){return arguments.length?(this._y=e,this):this._y};var Ly,Yy,Ry=0,By=0,zy=0,Vy=0,Gy=0,Hy=0,Uy="object"==typeof performance&&performance.now?performance:Date,Wy="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function qy(){return Gy||(Wy(Xy),Gy=Uy.now()+Hy)}function Xy(){Gy=0}function Ky(){this._call=this._time=this._next=null}function $y(e,t,r){var n=new Ky;return n.restart(e,t,r),n}function Jy(){Gy=(Vy=Uy.now())+Hy,Ry=By=0;try{!function(){qy(),++Ry;for(var e,t=Ly;t;)(e=Gy-t._time)>=0&&t._call.call(null,e),t=t._next;--Ry}()}finally{Ry=0,function(){var e,t,r=Ly,n=1/0;for(;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:Ly=t);Yy=e,Zy(n)}(),Gy=0}}function Qy(){var e=Uy.now(),t=e-Vy;t>1e3&&(Hy-=t,Vy=e)}function Zy(e){Ry||(By&&(By=clearTimeout(By)),e-Gy>24?(e<1/0&&(By=setTimeout(Jy,e-Uy.now()-Hy)),zy&&(zy=clearInterval(zy))):(zy||(Vy=Uy.now(),zy=setInterval(Qy,1e3)),Ry=1,Wy(Jy)))}function e_(e){return e.x}function t_(e){return e.y}Ky.prototype=$y.prototype={constructor:Ky,restart:function(e,t,r){if("function"!=typeof e)throw new TypeError("callback is not a function");r=(null==r?qy():+r)+(null==t?0:+t),this._next||Yy===this||(Yy?Yy._next=this:Ly=this,Yy=this),this._call=e,this._time=r,Zy()},stop:function(){this._call&&(this._call=null,this._time=1/0,Zy())}};var r_=Math.PI*(3-Math.sqrt(5));function n_(e){var r,n=1,o=.001,i=1-Math.pow(o,1/300),a=0,s=.6,u=t.map(),c=$y(l),h=t.dispatch("tick","end");function l(){f(),h.call("tick",r),n<o&&(c.stop(),h.call("end",r))}function f(t){var o,c,h=e.length;void 0===t&&(t=1);for(var l=0;l<t;++l)for(n+=(a-n)*i,u.each((function(e){e(n)})),o=0;o<h;++o)null==(c=e[o]).fx?c.x+=c.vx*=s:(c.x=c.fx,c.vx=0),null==c.fy?c.y+=c.vy*=s:(c.y=c.fy,c.vy=0);return r}function d(){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 o=10*Math.sqrt(r),i=r*r_;t.x=o*Math.cos(i),t.y=o*Math.sin(i)}(isNaN(t.vx)||isNaN(t.vy))&&(t.vx=t.vy=0)}}function p(t){return t.initialize&&t.initialize(e),t}return null==e&&(e=[]),d(),r={tick:f,restart:function(){return c.restart(l),r},stop:function(){return c.stop(),r},nodes:function(t){return arguments.length?(e=t,d(),u.each(p),r):e},alpha:function(e){return arguments.length?(n=+e,r):n},alphaMin:function(e){return arguments.length?(o=+e,r):o},alphaDecay:function(e){return arguments.length?(i=+e,r):+i},alphaTarget:function(e){return arguments.length?(a=+e,r):a},velocityDecay:function(e){return arguments.length?(s=1-e,r):1-s},force:function(e,t){return arguments.length>1?(null==t?u.remove(e):u.set(e,p(t)),r):u.get(e)},find:function(t,r,n){var o,i,a,s,u,c=0,h=e.length;for(null==n?n=1/0:n*=n,c=0;c<h;++c)(a=(o=t-(s=e[c]).x)*o+(i=r-s.y)*i)<n&&(u=s,n=a);return u},on:function(e,t){return arguments.length>1?(h.on(e,t),r):h.on(e)}}}function o_(){var e,t,r,n,o=ky(-30),i=1,a=1/0,s=.81;function u(n){var o,i=e.length,a=Oy(e,e_,t_).visitAfter(h);for(r=n,o=0;o<i;++o)t=e[o],a.visit(l)}function c(){if(e){var t,r,i=e.length;for(n=new Array(i),t=0;t<i;++t)r=e[t],n[r.index]=+o(r,t,e)}}function h(e){var t,r,o,i,a,s=0,u=0;if(e.length){for(o=i=a=0;a<4;++a)(t=e[a])&&(r=Math.abs(t.value))&&(s+=t.value,u+=r,o+=r*t.x,i+=r*t.y);e.x=o/u,e.y=i/u}else{(t=e).x=t.data.x,t.y=t.data.y;do{s+=n[t.data.index]}while(t=t.next)}e.value=s}function l(e,o,u,c){if(!e.value)return!0;var h=e.x-t.x,l=e.y-t.y,f=c-o,d=h*h+l*l;if(f*f/s<d)return d<a&&(0===h&&(d+=(h=Sy())*h),0===l&&(d+=(l=Sy())*l),d<i&&(d=Math.sqrt(i*d)),t.vx+=h*e.value*r/d,t.vy+=l*e.value*r/d),!0;if(!(e.length||d>=a)){(e.data!==t||e.next)&&(0===h&&(d+=(h=Sy())*h),0===l&&(d+=(l=Sy())*l),d<i&&(d=Math.sqrt(i*d)));do{e.data!==t&&(f=n[e.data.index]*r/d,t.vx+=h*f,t.vy+=l*f)}while(e=e.next)}}return u.initialize=function(t){e=t,c()},u.strength=function(e){return arguments.length?(o="function"==typeof e?e:ky(+e),c(),u):o},u.distanceMin=function(e){return arguments.length?(i=e*e,u):Math.sqrt(i)},u.distanceMax=function(e){return arguments.length?(a=e*e,u):Math.sqrt(a)},u.theta=function(e){return arguments.length?(s=e*e,u):Math.sqrt(s)},u}function i_(e,t,r,n){var o=this;this.pos={};n=n||(t<r?t-0:r-0)/2;var i=e.nodeCount(),a=-Math.PI/2,s=2*Math.PI/i;e.eachNode((function(e,i){var u=i.getBBox();o.pos[e]={x:i.fixed?i.x:t/2+Math.cos(a)*(n-0),y:i.fixed?i.y:r/2+Math.sin(a)*(n-0),width:u.width,height:u.height},a+=s}))}function a_(e,t,r,n){n=n||{};var o=this;this.pos={},this.vertices=[],this.vertexMap={},e.eachNode((function(t){var 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};o.vertices.push(i),o.vertexMap[t]=i})),this.edges=[],e.eachEdge((function(e,t,r){o.edges.push({source:t,target:r})}));var i=Ny().id((function(e){return e.id})).distance(n.linkDistance).strength(n.linkStrength),a=o_().strength((function(e){var t=e.value.getBBox();return n.charge*Math.max(t.width,t.height)}));if(this.force=n_().force("link",i).force("charge",a).force("center",Ey(t/2,r/2)).velocityDecay(n.oneShot?.1:n.friction).nodes(this.vertices),i.links(this.edges),n.oneShot){this.force.restart();var s=e.nodeCount();s=Math.min(s*s,500);for(var u=0;u<s;++u)this.force.tick();this.force.stop()}}function s_(e,t,r,n){var o=new by.graphlib.Graph({multigraph:!0,compound:!0}).setGraph(n).setDefaultNodeLabel((function(){return{}})).setDefaultEdgeLabel((function(){return{}}));e.eachNode((function(t){var r=e.node(t).getBBox();o.setNode(t,{width:r.width,height:r.height})})),e.eachEdge((function(t,r,i){var a=e.edge(t);o.setEdge(r,i,{weight:a.weight()},a._id),n.digraph||o.setEdge(i,r,{weight:a.weight()},a._id)})),e.eachNode((function(t){o.setParent(t,e.parent(t))})),this.dagreLayout=by.layout(o,{debugTiming:!1});var i=-o.graph().width/2,a=-o.graph().height/2;o.nodes().forEach((function(e){var n=o.node(e);n.x+=i+t/2,n.y+=a+r/2})),o.edges().forEach((function(e){for(var n=o.edge(e),s=0;s<n.points.length;++s)n.points[s].x+=i+t/2,n.points[s].y+=a+r/2})),this.digraph=o}i_.prototype.nodePos=function(e){return this.pos[e]},i_.prototype.edgePoints=function(e){return[]},a_.prototype.nodePos=function(e){return this.vertexMap[e]},a_.prototype.edgePoints=function(e){return[]},s_.prototype.nodePos=function(e){return this.digraph.node(e)},s_.prototype.edgePoints=function(e){return this.digraph.edge(e._sourceVertex.id(),e._targetVertex.id(),e._id).points};L(".graph_Subgraph .border{fill:none;stroke:#1f77b4;stroke-width:1px;pointer-events:none}.graph_Subgraph.selected>rect{stroke:red!important}");var u_=function(e){function r(){var r=e.call(this)||this;return r._textWidget=(new t.Text).anchor("start").fontSize(14),r._buttonMin=(new t.Icon).diameter(18).shape_colorStroke("#1f77b4").shape_colorFill("#dcf1ff").image_colorFill("#1f77b4").on("click",(function(){r.minClick()}),!0).on("dblclick",(function(){}),!0),r._minState="normal",r}return s(r,e),r.prototype.minState=function(e){return arguments.length?(this._minState=e,this):this._minState},r.prototype.calcIcon=function(){switch(this._minState){case"normal":return"";case"partial":return""}},r.prototype.getBBox=function(e,t){var r=this.width(),n=this.height();return{x:-r/2,y:-n/2-14,width:r,height:n}},r.prototype.enter=function(t,r){e.prototype.enter.call(this,t,r),this._border=r.append("rect").attr("class","border"),this._textWidget.target(t),this._buttonMin.target(t)},r.prototype.update=function(r,n){e.prototype.update.call(this,r,n);var o=this.getBBox();this._border.attr("x",o.x).attr("y",o.y).attr("width",o.width).attr("height",o.height).style("fill",this.border_colorFill()).style("stroke",this.border_colorStroke()),this.border_colorFill_exists()&&!this.title_colorFill_exists()&&this.title_colorFill(t.Palette.textColor(this.border_colorFill())),this._textWidget.pos({x:o.x+4,y:o.y+14}).width(this.width()-8).text(this.showTitle()?this.title():"").render(),this._buttonMin.visible(this.showMinMax()).pos({x:o.x+o.width-13,y:o.y+13}).faChar(this.calcIcon()).render()},r.prototype.exit=function(t,r){this._buttonMin.target(null),this._textWidget.target(null),this._border.remove(),e.prototype.exit.call(this,t,r)},r.prototype.intersection=function(e,t){var r=null;return[].forEach((function(e){(null===r||r.d>e.d)&&(r=e)})),r&&r.i?r.i:null},r.prototype.click=function(e){},r.prototype.minClick=function(){switch(this._minState){case"normal":this._minState="partial";break;case"partial":this._minState="normal"}this._buttonMin.faChar(this.calcIcon()).render()},r}(t.SVGWidget);u_.prototype._class+=" graph_Subgraph",u_.prototype.publish("border_colorStroke",null,"html-color","Stroke Color",null,{optional:!0}),u_.prototype.publish("border_colorFill",null,"html-color","Fill Color",null,{optional:!0}),u_.prototype.publish("showTitle",!0,"boolean","Show Title",null,{tags:["Basic"]}),u_.prototype.publish("title","","string","Title",null,{tags:["Basic"]}),u_.prototype.publishProxy("titleFontSize","_textWidget","fontSize"),u_.prototype.publishProxy("title_colorFill","_textWidget","colorFill"),u_.prototype.publish("showMinMax",!1,"boolean","Show Min/Max",null,{tags:["Basic"]});L(".graph_Vertex.selected .common_Shape{stroke:red!important}");var c_=function(e){function r(){var r=e.call(this)||this;return r._icon=new t.Icon,r._textBox=new t.TextBox,r._annotationWidgets={},r.pos({x:void 0,y:void 0}),r}return s(r,e),r.prototype.getIconBBox=function(){var 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}},r.prototype.getBBox=function(e,t){var r=this.getIconBBox(),n=this._textBox.getBBox(!0),o=Math.min(r.x,n.x),i=Math.min(r.y,n.y);return{x:o,y:i,width:Math.max(r.x+r.width,n.x+n.width)-o,height:Math.max(r.y+r.height,n.y+n.height)-i}},r.prototype.enter=function(t,r){var n=this;e.prototype.enter.call(this,t,r),delete this._prevHash,this._icon.target(t),this._textBox.target(t),r.on("mouseover",(function(e){return n.mouseover(e.data())})).on("mouseout",(function(e){return n.mouseout(e.data())}))},r.prototype.update=function(r,n){e.prototype.update.call(this,r,n);var o=this.hashSum();if(this._prevHash!==o){this._prevHash=o,n.classed("centroid",this.centroid()),n.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();var i=this.getIconBBox();this._icon.move(i);var a=this,s=n.selectAll(".annotation").data(this.annotationIcons()),u=s.enter().append("g").attr("class","annotation").each((function(e,r){a._annotationWidgets[r]=(new t.Icon).target(this).shape("square")})),c=this._textBox.getBBox(!0),h=c.width/2,l=c.height/2;u.merge(s).each((function(e,t){var r=a._annotationWidgets[t];for(var n in r.diameter(a.annotationDiameter()).shape_colorFill(a.textbox_shape_colorFill()).shape_colorStroke(a.textbox_shape_colorStroke()),e)r[n]?r[n](e[n]):globalThis.__hpcc_debug&&console.warn("Invalid annotation property: "+n);r.render();var o=r.getBBox(!0);r.move({x:h-o.width/2+4,y:l+o.height/2-4}),h-=o.width+a.annotationSpacing()})),s.exit().each((function(e,r){var n=t.select(this);a._annotationWidgets[r].target(null),delete a._annotationWidgets[r],n.remove()}))}},r.prototype.exit=function(t,r){for(var n in this._annotationWidgets)this._annotationWidgets[n].target(null);this._icon.target(null),this._textBox.target(null),e.prototype.exit.call(this,t,r)},r.prototype.contains=function(e){return this._icon.contains(e)||this._textBox.contains(e)},r.prototype.intersection=function(e,t){var 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},r.prototype.mouseover=function(e){},r.prototype.mouseout=function(e){},r}(t.SVGWidget);c_.prototype._class+=" graph_Vertex",c_.prototype.publishProxy("faChar","_icon"),c_.prototype.publishProxy("imageUrl","_icon"),c_.prototype.publishProxy("icon_diameter","_icon","diameter"),c_.prototype.publishProxy("icon_paddingPercent","_icon","paddingPercent"),c_.prototype.publishProxy("icon_shape_colorFill","_icon","shape_colorFill"),c_.prototype.publishProxy("icon_shape_colorStroke","_icon","shape_colorStroke"),c_.prototype.publishProxy("icon_image_colorFill","_icon","image_colorFill"),c_.prototype.publishProxy("icon_fontFamily","_icon","fontFamily"),c_.prototype.publish("centroid",!1,"boolean","Centroid Vertex"),c_.prototype.publishProxy("text","_textBox"),c_.prototype.publishProxy("anchor","_textBox"),c_.prototype.publishProxy("textbox_shape_colorStroke","_textBox","shape_colorStroke"),c_.prototype.publishProxy("textbox_shape_colorFill","_textBox","shape_colorFill"),c_.prototype.publishProxy("textbox_text_colorFill","_textBox","text_colorFill"),c_.prototype.publishProxy("textbox_text_fontFamily","_textBox","text_fontFamily"),c_.prototype.publish("iconAnchor","start","set","Horizontal anchor position of icon",["","start","middle","end","left"],{tags:["Basic"]}),c_.prototype.publish("iconTooltip","","string","iconTooltip",null,{tags:["Private"]}),c_.prototype.publish("tooltip","","string","Tooltip",null,{tags:["Private"]}),c_.prototype.publish("annotationDiameter",14,"number","Annotation Diameter",null,{tags:["Private"]}),c_.prototype.publish("annotationSpacing",3,"number","Annotation Spacing",null,{tags:["Private"]}),c_.prototype.publish("annotationIcons",[],"array","Annotations",null,{tags:["Private"]});L(".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}");var h_=function(e){function r(){var r=e.call(this)||this;r._toggleHierarchy=(new t.ToggleButton).faChar("fa-sitemap").tooltip("Hierarchy").on("click",(function(){return r.layoutClick("Hierarchy")})),r._toggleForceDirected=(new t.ToggleButton).faChar("fa-expand").tooltip("Force Directed").on("click",(function(){return r.layoutClick("ForceDirected")})),r._toggleForceDirected2=(new t.ToggleButton).faChar("fa-arrows").tooltip("Spring").on("click",(function(){return r.layoutClick("ForceDirected2")})),r._toggleCircle=(new t.ToggleButton).faChar("fa-circle-o").tooltip("Circle").on("click",(function(){return r.layoutClick("Circle")})),r._dataHash=0,r._neighborOffsets=[],n.IGraph.call(r),n.ITooltip.call(r),r.tooltipHTML((function(e){var t;return e instanceof u_?t=e.title().replace(/\n/g,"<br>"):(e instanceof c_||e instanceof R)&&(t=e.text().replace(/\n/g,"<br>")),t?'<p style="text-align:center">'.concat(t,"</p>"):null})),r._drawStartPos="origin";var o=[r._toggleHierarchy,r._toggleForceDirected,r._toggleForceDirected2,r._toggleCircle,new t.Spacer];return r._iconBar.buttons(o.concat(r._iconBar.buttons())),r._graphData=new xy,r.highlight={zoom:1.1,opacity:.33,edge:"1.25px"},r._selection=new t.Utility.Selection(r),r.zoomToFitLimit(1),r}return s(r,e),r.prototype.iconBarButtons=function(){return this._iconBar.buttons()},r.prototype.layoutClick=function(e){var t=this;this.layout(e),"ForceDirected2"!==e&&this.applyScaleOnLayout(!0),this.layout(e).render((function(e){t.applyScaleOnLayout(!1)}))},r.prototype.getOffsetPos=function(){return{x:0,y:0}},r.prototype.size=function(t){var r=e.prototype.size.apply(this,arguments);return r},r.prototype.clear=function(){this.data({subgraphs:[],vertices:[],edges:[],hierarchy:[]},!1)},r.prototype.data=function(t,r){var n=e.prototype.data.apply(this,arguments);if(arguments.length){r||(this._graphData=new xy,this._renderCount=0);var o=this._graphData.setData(t.subgraphs||[],t.vertices||[],t.edges||[],t.hierarchy||[],r||!1);o.addedVertices.length&&this._dataHash++;var i=this;o.addedVertices.forEach((function(e){e._graphID=i._id})),o.addedEdges.forEach((function(e){e._graphID=i._id}));var a={};this._graphData.edges().forEach((function(e){a[e._sourceVertex._id]||(a[e._sourceVertex._id]={}),a[e._sourceVertex._id][e._targetVertex._id]||(a[e._sourceVertex._id][e._targetVertex._id]=0);var t=++a[e._sourceVertex._id][e._targetVertex._id];e.arcDepth(16*t)}))}return n},r.prototype.graphData=function(){return this._graphData},r.prototype.selection=function(e){return arguments.length?(this._selection.set(e),this):this._selection.get()},r.prototype.linkcolor_default=function(e){return arguments.length?(this._linkcolor=e,this):this._linkcolor},r.prototype.linktooltip_default=function(e){return arguments.length?(this._linktooltip=e,this):this._linktooltip},r.prototype.dragstart=function(e){var r=this;if(this.allowDragging()){var n=t.d3Event();if(n.sourceEvent.stopPropagation(),e.__drag_dx=n.x-e.x(),e.__drag_dy=n.y-e.y(),this._dragging=!0,this.forceLayout){n.active||this.forceLayout.force.alphaTarget(.3).restart();var o=this.forceLayout.vertexMap[e.id()];o.fixed=!0,o.fx=o.x,o.fy=o.y}this._neighborOffsets=[],this.dragSingleNeighbors()&&(this._neighborOffsets=this._graphData.singleNeighbors(e.id()).map((function(r){return t.select(r.target()).raise(),{neighbor:r,offsetX:e.x()-r.x(),offsetY:e.y()-r.y()}})));for(var i=e.target(),a=i.nextSibling;a;)i.parentNode.insertBefore(a,i),a=i.nextSibling;t.Platform.svgMarkerGlitch&&this._graphData.nodeEdges(e.id()).forEach((function(e){var t=r._graphData.edge(e);r._pushMarkers(t.element())}))}},r.prototype.dragging=function(e){var r=this;if(this.allowDragging()){var n=t.d3Event();if(n.sourceEvent.stopPropagation(),e.move({x:n.x-e.__drag_dx,y:n.y-e.__drag_dy}),this.forceLayout){var o=this.forceLayout.vertexMap[e.id()];o.fixed=!0,o.fx=n.x-e.__drag_dx,o.fy=n.y-e.__drag_dy}this._neighborOffsets.forEach((function(t){var o=n.x-e.__drag_dx-t.offsetX,i=n.y-e.__drag_dy-t.offsetY;if(r.forceLayout){var a=r.forceLayout.vertexMap[t.neighbor.id()];a.fixed=!0,a.fx=o,a.fy=i}t.neighbor.move({x:o,y:i})})),this.refreshIncidentEdges(e,!0)}},r.prototype.dragend=function(e){var r=this;if(this.allowDragging()){if(t.d3Event().sourceEvent.stopPropagation(),this._dragging=!1,this.snapToGrid()){var n=e.calcSnap(this.snapToGrid());e.move(n[0]),this.refreshIncidentEdges(e,!0)}if(this.forceLayout){var o=this.forceLayout.vertexMap[e.id()];o.fixed=!1,o.fx=null,o.fy=null,this._neighborOffsets.forEach((function(e){var t=r.forceLayout.vertexMap[e.neighbor.id()];t.fixed=!1,t.fx=null,t.fy=null}))}this._neighborOffsets=[],t.Platform.svgMarkerGlitch&&this._graphData.nodeEdges(e.id()).forEach((function(e){var t=this._graphData.edge(e);this._popMarkers(t.element())}))}},r.prototype.enter=function(r,n){var o=this;e.prototype.enter.call(this,r,n),this._zoomGrab.on("click.clear",(function(){o.selectionClearOnBackgroundClick()&&o._selection.clear()})),this._d3Drag=t.drag().on("start",(function(e){return o.dragstart(e)})).on("end",(function(e){return o.dragend(e)})).on("drag",(function(e){return o.dragging(e)})),this.defs=this._renderElement.append("defs"),this.addMarkers(),this._centroidFilter=new t.SVGGlowFilter(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")},r.prototype.getBounds=function(e,t){var r=[[null,null],[null,null]];return e.forEach((function(e){var n=t?t.nodePos(e._id):{x:e.x(),y:e.y(),width:e.width(),height:e.height()},o=n.x-n.width/2,i=n.x+n.width/2,a=n.y-n.height/2,s=n.y+n.height/2;(null===r[0][0]||r[0][0]>o)&&(r[0][0]=o),(null===r[0][1]||r[0][1]>a)&&(r[0][1]=a),(null===r[1][0]||r[1][0]<i)&&(r[1][0]=i),(null===r[1][1]||r[1][1]<s)&&(r[1][1]=s)})),r},r.prototype.getVertexBounds=function(e){return this.getBounds(this._graphData.nodes(),e)},r.prototype.getSelectionBounds=function(e){return this.getBounds(this._selection.get(),e)},r.prototype.centerOnItem=function(e){var t=e.getBBox(!0),r=t.x+t.width/2,n=t.y+t.height/2,o={x:e.x()+r-t.width/2,y:e.y()+n-t.height/2,width:t.width,height:t.height};this.centerOnBBox(o)},r.prototype.zoomToItem=function(e){var t=e.getBBox(!0),r=t.x+t.width/2,n=t.y+t.height/2,o={x:e.x()+r-t.width/2,y:e.y()+n-t.height/2,width:t.width,height:t.height};this.zoomToBBox(o)},r.prototype.updateVertices=function(e,r,n){var o=this.width(),i=this.height(),a=this,s=e.selectAll("#"+this._id+r+" > .graphVertex").data(n,(function(e){return e.id()}));s.enter().append("g").attr("class","graphVertex").style("opacity",1e-6).on("click.selectionBag",(function(e){a._selection.click(e,t.d3Event()),a.selectionChanged()})).on("click",(function(e){var r=t.select(this).select(".graph_Vertex"),n=!1;r.empty()||(n=r.classed("selected")),a.vertex_click(a.rowToObj(e.data()),"",n,{vertex:e})})).on("dblclick",(function(e){t.d3Event().stopPropagation();var r=t.select(this).select(".graph_Vertex"),n=!1;r.empty()||(n=r.classed("selected")),a.vertex_dblclick(a.rowToObj(e.data()),"",n,{vertex:e})})).on("contextmenu",(function(e){var r=t.select(this).select(".graph_Vertex"),n=!1;r.empty()||(n=r.classed("selected")),a.vertex_contextmenu(a.rowToObj(e.data()),"",n,{vertex:e})})).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).on("mouseover",(function(e){a._dragging||a.vertex_mouseover(t.select(this),e)})).on("mouseout",(function(e){a._dragging||a.vertex_mouseout(t.select(this),e)})).each((function(e){t.select(this).style("cursor",a.allowDragging()?"move":"pointer"),e.target(this).pos({x:e.x()||o/2,y:e.y()||i/2}).animationFrameRender(),a.allowDragging()&&t.select(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()){var t=e.calcSnap(a.snapToGrid());e.pos(t[0]).size(t[1]).render(),a.refreshIncidentEdges(e,!1)}})))})).transition().duration(750).style("opacity",1),s.each((function(e){e.animationFrameRender()})),s.exit().each((function(e){e.target(null)})).remove(),s.order()},r.prototype.update=function(r,n){var o=this;e.prototype.update.call(this,r,n),this.tooltip.hide(),this._centroidFilter.update(this.centroidColor());var i=this.layout();this._toggleHierarchy.selected("Hierarchy"===i).render(),this._toggleForceDirected.selected("ForceDirected"===i).render(),this._toggleForceDirected2.selected("ForceDirected2"===i).render(),this._toggleCircle.selected("Circle"===i).render();var a=this;this.updateVertices(this.svgC,"C",this._graphData.nodes().filter((function(e){return"Hierarchy"===o.layout()&&e instanceof u_}))),this.updateVertices(this.svgV,"V",this._graphData.nodes().filter((function(e){return!(e instanceof u_)})));var s=this.svgE.selectAll("#"+this._id+"E > .graphEdge").data(this.showEdges()?this._graphData.edges():[],(function(e){return e.id()}));s.enter().append("g").attr("class","graphEdge").style("opacity",1e-6).on("click.selectionBag",(function(e){a._selection.click(e,t.d3Event())})).on("click",(function(e){var r=t.select(this).select(".graph_Edge"),n=!1;r.empty()||(n=r.classed("selected")),a.edge_click(a.rowToObj(e.data()),"",n,{edge:e})})).on("dblclick",(function(e){var r=t.select(this).select(".graph_Edge"),n=!1;r.empty()||(n=r.classed("selected")),a.edge_dblclick(a.rowToObj(e.data()),"",n,{edge:e})})).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).on("mouseover",(function(e){a._dragging||a.edge_mouseover(t.select(this),e)})).on("mouseout",(function(e){a._dragging||a.edge_mouseout(t.select(this),e)})).each((function(e){e.target(this).animationFrameRender()})).transition().duration(750).style("opacity",1),s.each((function(e){e.animationFrameRender()})),s.exit().each((function(e){e.target(null)})).remove(),this._renderCount||(this._renderCount++,this.layout(this.layout()))},r.prototype.exit=function(t,r){this._graphData.nodes().forEach((function(e){return e.target(null)})),this._graphData.edges().forEach((function(e){return e.target(null)})),e.prototype.exit.call(this,t,r)},r.prototype.render=function(t){var r=this;return this.progress("start"),e.prototype.render.call(this,(function(e){r.doLayout().then((function(){r.progress("end"),t&&t(e)}))})),this},r.prototype.doLayout=function(e){var t=this;return void 0===e&&(e=0),new Promise((function(r,n){requestAnimationFrame((function(){t._prevLayout!==t.layout()||t._prevDataHash!==t._dataHash?(t._prevLayout=t.layout(),t._prevDataHash=t._dataHash,t._doLayout(e).then((function(){r()}))):r()}))}))},r.prototype._doLayout=function(e){var t=this;return void 0===e&&(e=0),new Promise((function(n,o){t.progress("layout-start"),t.forceLayout&&(t.forceLayout.force.stop(),t.forceLayout=null);var i=t,a=t.getLayoutEngine();"ForceDirected2"===t.layout()?(t.forceLayout=a,t.forceLayout.force.on("tick",(function(){i.progress("layout-tick"),a.vertices.forEach((function(e){if(e.fixed);else{var t=i._graphData.node(e.id);t&&t.move({x:e.x,y:e.y})}})),i._graphData.edges().forEach((function(e){e.points([],!1,!1)})),i.applyScaleOnLayout()})).on("end",(function(){i.progress("layout-end")})),t.forceLayout.force.restart(),n()):a&&(t.forceLayout=null,i._dragging=!0,i._graphData.nodes().forEach((function(e){var t=a.nodePos(e.id());e instanceof r.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)})),i._graphData.edges().forEach((function(t){var r=a.edgePoints(t);t.points(r,e)})),i.applyScaleOnLayout()&&requestAnimationFrame((function(){i.zoomToFit(),n()})),t._fixIEMarkers(),setTimeout((function(){i._dragging=!1}),e?e+50:50),t.progress("layout-end"),i.applyScaleOnLayout()||n())}))},r.prototype.getLayoutEngine=function(){switch(this.layout()){case"Circle":return new i_(this._graphData,this._size.width,this._size.height);case"ForceDirected":return new a_(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 a_(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 s_(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},r.prototype.getNeighborMap=function(e){var t={},r={};if(e)for(var n=this._graphData.nodeEdges(e.id()),o=0;o<n.length;++o){var i=this._graphData.edge(n[o]);r[i.id()]=i,i._sourceVertex.id()!==e.id()&&(t[i._sourceVertex.id()]=i._sourceVertex),i._targetVertex.id()!==e.id()&&(t[i._targetVertex.id()]=i._targetVertex)}return{vertices:t,edges:r}},r.prototype.highlightVerticies=function(e){var t=this,r=this;return this.svgV.selectAll(".graphVertex").classed("graphVertex-highlighted",(function(t){return!e||e[t.id()]})).style("filter",(function(r){return e&&e[r.id()]?"url(#"+t.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(t){return!e||e[t.id()]?1:r.highlight.opacity})),this},r.prototype.highlightEdges=function(e){var 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},r.prototype.highlightVertex=function(e,t){if(this.highlightOnMouseOverVertex())if(t){var r=this.getNeighborMap(t);r.vertices[t.id()]=t,this.highlightVerticies(r.vertices),this.highlightEdges(r.edges)}else this.highlightVerticies(null),this.highlightEdges(null)},r.prototype.highlightEdge=function(e,t){if(this.highlightOnMouseOverEdge())if(t){var r={};r[t._sourceVertex.id()]=t._sourceVertex,r[t._targetVertex.id()]=t._targetVertex;var n={};n[t.id()]=t,this.highlightVerticies(r),this.highlightEdges(n)}else this.highlightVerticies(null),this.highlightEdges(null)},r.prototype.refreshIncidentEdges=function(e,t){var r=this;this._graphData.nodeEdges(e.id()).forEach((function(e){r._graphData.edge(e).points([],!1,t)}))},r.prototype.centroids=function(){return this._graphData.nodes().filter((function(e){return e.centroid()}))},r.prototype.selectionChanged=function(){var e=this;if(this.highlightSelectedPathToCentroid()){var t={};this.centroids().forEach((function(r){e.selection().forEach((function(n){e._graphData.undirectedShortestPath(r.id(),n.id()).forEach((function(e){t[e.id()]=!0}))}))})),this.svgE.selectAll(".graphEdge").classed("shortest-path",(function(e){return!0===t[e.id()]}))}},r.prototype.vertex_click=function(e,t,r,o){o&&o.vertex&&o.vertex._placeholderElement.node().parentNode.appendChild(o.vertex._placeholderElement.node()),n.IGraph.prototype.vertex_click.apply(this,arguments)},r.prototype.vertex_dblclick=function(e,t,r,n){},r.prototype.vertex_contextmenu=function(e,t,r,n){},r.prototype.vertex_mouseover=function(e,t){this.highlightVertex(e,t)},r.prototype.vertex_mouseout=function(e,t){this.highlightVertex(null,null)},r.prototype.edge_mouseover=function(e,t){this.highlightEdge(e,t)},r.prototype.edge_mouseout=function(e,t){this.highlightEdge(null,null)},r.prototype.addMarkers=function(e){void 0===e&&(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)},r.prototype.progress=function(e){},r.Subgraph=u_,r.Vertex=c_,r.Edge=R,r.profileID=0,r}(t.SVGZoomWidget);h_.prototype._class+=" graph_Graph",h_.prototype.implements(n.IGraph.prototype),h_.prototype.implements(n.ITooltip.prototype),h_.prototype.publish("allowDragging",!0,"boolean","Allow Dragging of Vertices",null,{tags:["Advanced"]}),h_.prototype.publish("dragSingleNeighbors",!1,"boolean","Dragging a Vertex also moves its singleton neighbors",null,{tags:["Advanced"]}),h_.prototype.publish("layout","Circle","set","Default Layout",["Circle","ForceDirected","ForceDirected2","Hierarchy","None"],{tags:["Basic"]}),h_.prototype.publish("scale","100%","set","Zoom Level",["all","width","selection","100%","90%","75%","50%","25%","10%"],{tags:["Basic"]}),h_.prototype.publish("applyScaleOnLayout",!1,"boolean","Shrink to fit on Layout",null,{tags:["Basic"]}),h_.prototype.publish("highlightOnMouseOverVertex",!1,"boolean","Highlight Vertex on Mouse Over",null,{tags:["Basic"]}),h_.prototype.publish("highlightOnMouseOverEdge",!1,"boolean","Highlight Edge on Mouse Over",null,{tags:["Basic"]}),h_.prototype.publish("transitionDuration",250,"number","Transition Duration",null,{tags:["Intermediate"]}),h_.prototype.publish("showEdges",!0,"boolean","Show Edges",null,{tags:["Intermediate"]}),h_.prototype.publish("snapToGrid",0,"number","Snap to Grid",null,{tags:["Private"]}),h_.prototype.publish("selectionClearOnBackgroundClick",!1,"boolean","Clear selection on background click"),h_.prototype.publish("centroidColor","#00A000","html-color","Centroid Color",null,{tags:["Basic"]}),h_.prototype.publish("highlightSelectedPathToCentroid",!1,"boolean","Highlight path to Center Vertex (for selected vertices)",null,{tags:["Basic"]}),h_.prototype.publish("hierarchyRankDirection","TB","set","Direction for Rank Nodes",["TB","BT","LR","RL"],{tags:["Advanced"]}),h_.prototype.publish("hierarchyNodeSeparation",50,"number","Number of pixels that separate nodes horizontally in the layout",null,{tags:["Advanced"]}),h_.prototype.publish("hierarchyEdgeSeparation",10,"number","Number of pixels that separate edges horizontally in the layout",null,{tags:["Advanced"]}),h_.prototype.publish("hierarchyRankSeparation",50,"number","Number of pixels between each rank in the layout",null,{tags:["Advanced"]}),h_.prototype.publish("hierarchyDigraph",!0,"boolean","Directional Graph",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedLinkDistance",300,"number","Target distance between linked nodes",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedLinkStrength",1,"number","Strength (rigidity) of links",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedFriction",.9,"number","Friction coefficient",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedCharge",-25,"number","Charge strength ",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedChargeDistance",1e4,"number","Maximum distance over which charge forces are applied",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedTheta",.8,"number","Barnes–Hut approximation criterion",null,{tags:["Advanced"]}),h_.prototype.publish("forceDirectedGravity",.1,"number","Gravitational strength",null,{tags:["Advanced"]});var l_=h_.prototype.scale;h_.prototype.scale=function(e,t){var r=l_.apply(this,arguments);return arguments.length&&this.zoomTo(e,t),r};var f_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.owner=function(e){return arguments.length?(this._owner=e,this):this._owner},t.prototype.valid=function(){return!!this.iconColumn()},t.prototype.indexes=function(){var 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())}},t.prototype.mapper=function(){var e=this,t=this.indexes();return function(r){return{faChar:r[t.iconCol],tooltip:r[t.tooltipCol],shape_colorFill:r[t.shapeFillCol]||e.shapeFillDefault(),shape_colorStroke:r[t.shapeStrokeCol]||e.shapeStrokeDefault(),image_colorFill:r[t.iconFillCol]||e.iconFillDefault()}}},t}(t.PropertyExt);f_.prototype._class+=" graph_Annotation",f_.prototype.publish("iconColumn","","set","Icon column",(function(){return this._owner.columns()}),{optional:!0}),f_.prototype.publish("iconFillDefault","white","html-color","Icon fill default color"),f_.prototype.publish("iconFillColumn","","set","Icon fill color column",(function(){return this._owner.columns()}),{optional:!0}),f_.prototype.publish("tooltipColumn","","set","Tooltip column",(function(){return this._owner.columns()}),{optional:!0}),f_.prototype.publish("shapeStrokeDefault","darkred","html-color","Shape stroke default color"),f_.prototype.publish("shapeStrokeColumn","","set","Shape stroke color column",(function(){return this._owner.columns()}),{optional:!0}),f_.prototype.publish("shapeFillDefault","red","html-color","Shape fill default color"),f_.prototype.publish("shapeFillColumn","","set","Shape fill color column",(function(){return this._owner.columns()}),{optional:!0});var d_=function(e){function t(){var t=e.call(this)||this;return t._vertexMap={},t._edgeMap={},t._merge=!1,t._adjacencyData=[],t}return s(t,e),t.prototype.linksColumns=function(){var e=this.columns().indexOf(this.linksColumn()),t=this._db.field(e);return t?t.children().map((function(e){return e.label()})):[]},t.prototype.validAnnotations=function(){return this.annotations().filter((function(e){return e.valid()}))},t.prototype.updateData=function(){var t=this,n=r.hashSum([this._adjacencyData,this.uidColumn(),this.labelColumn(),this.iconColumn(),this.linksColumn(),this.linkUidColumn(),this.linkLabelColumn(),this.validAnnotations().map((function(e){return e.hashSum()}))]);if(this._prevAdjacencyDataHash!==n){this._prevAdjacencyDataHash=n;for(var o=this.columns(),i=o.indexOf(this.uidColumn()),a=o.indexOf(this.labelColumn()),s=o.indexOf(this.iconColumn()),u=o.indexOf(this.linksColumn()),c=this.linksColumns(),h=c.indexOf(this.linkUidColumn()),l=c.indexOf(this.linkLabelColumn()),f=this.validAnnotations().map((function(e){return e.mapper()})),d={},p={},g={vertices:this._adjacencyData.map((function(e){var r=e[i];if(void 0!==r){var n=d[r]||t._vertexMap[r];return n||(n=new c_),d[r]=n,n.text(e[a]).data(e).faChar(e[s]).annotationIcons(f.map((function(t){return t(e)}))),n}})).filter((function(e){return!!e})),edges:[]},v=0,y=this._adjacencyData;v<y.length;v++){var _=y[v],m=_[i],b=_[u];if(void 0!==m&&void 0!==b)for(var w=0,x=b;w<x.length;w++){var E=x[w],k=E[h],S=E[l],D="".concat(m,"->").concat(k),C=p[D]||this._edgeMap[D];C||(d[m]&&d[k]?C=(new R).sourceVertex(d[m]).targetVertex(d[k]).data(E):console.warn("Missing vertices for edge: "+D)),C&&(C.text(S),p[D]=C,g.edges.push(C))}}this._vertexMap=d,this._edgeMap=p,e.prototype.data.call(this,g,this._merge)}},t.prototype.data=function(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.")},t.prototype.update=function(t,r){this.updateData(),e.prototype.update.call(this,t,r)},t.prototype.click=function(e,t,r){},t}(h_);function p_(e,t){return e.sourceLinks.length?e.depth:t-1}function g_(e){return function(){return e}}function v_(e,t){return __(e.source,t.source)||e.index-t.index}function y_(e,t){return __(e.target,t.target)||e.index-t.index}function __(e,t){return e.y0-t.y0}function m_(e){return e.value}function b_(e){return e.index}function w_(e){return e.nodes}function x_(e){return e.links}function E_(e,t){const r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function k_({nodes:e}){for(const t of e){let e=t.y0,r=e;for(const r of t.sourceLinks)r.y0=e+r.width/2,e+=r.width;for(const e of t.targetLinks)e.y1=r+e.width/2,r+=e.width}}function S_(){let e,r,n,o=0,i=0,a=1,s=1,u=24,c=8,h=b_,l=p_,f=w_,d=x_,p=6;function g(){const e={nodes:f.apply(null,arguments),links:d.apply(null,arguments)};return v(e),y(e),_(e),m(e),b(e),k_(e),e}function v({nodes:e,links:t}){for(const[t,r]of e.entries())r.index=t,r.sourceLinks=[],r.targetLinks=[];const r=new Map(e.map(((t,r)=>[h(t,r,e),t])));for(const[e,n]of t.entries()){n.index=e;let{source:t,target:o}=n;"object"!=typeof t&&(t=n.source=E_(r,t)),"object"!=typeof o&&(o=n.target=E_(r,o)),t.sourceLinks.push(n),o.targetLinks.push(n)}if(null!=n)for(const{sourceLinks:t,targetLinks:r}of e)t.sort(n),r.sort(n)}function y({nodes:e}){for(const r of e)r.value=void 0===r.fixedValue?Math.max(t.sum(r.sourceLinks,m_),t.sum(r.targetLinks,m_)):r.fixedValue}function _({nodes:e}){const t=e.length;let r=new Set(e),n=new Set,o=0;for(;r.size;){for(const e of r){e.depth=o;for(const{target:t}of e.sourceLinks)n.add(t)}if(++o>t)throw new Error("circular link");r=n,n=new Set}}function m({nodes:e}){const t=e.length;let r=new Set(e),n=new Set,o=0;for(;r.size;){for(const e of r){e.height=o;for(const{source:t}of e.targetLinks)n.add(t)}if(++o>t)throw new Error("circular link");r=n,n=new Set}}function b(n){const h=function({nodes:e}){const n=t.max(e,(e=>e.depth))+1,i=(a-o-u)/(n-1),s=new Array(n);for(const t of e){const e=Math.max(0,Math.min(n-1,Math.floor(l.call(null,t,n))));t.layer=e,t.x0=o+e*i,t.x1=t.x0+u,s[e]?s[e].push(t):s[e]=[t]}if(r)for(const e of s)e.sort(r);return s}(n);e=Math.min(c,(s-i)/(t.max(h,(e=>e.length))-1)),function(r){const n=t.min(r,(r=>(s-i-(r.length-1)*e)/t.sum(r,m_)));for(const t of r){let r=i;for(const o of t){o.y0=r,o.y1=r+o.value*n,r=o.y1+e;for(const e of o.sourceLinks)e.width=e.value*n}r=(s-r+e)/(t.length+1);for(let e=0;e<t.length;++e){const n=t[e];n.y0+=r*(e+1),n.y1+=r*(e+1)}C(t)}}(h);for(let e=0;e<p;++e){const t=Math.pow(.99,e),r=Math.max(1-t,(e+1)/p);x(h,t,r),w(h,t,r)}}function w(e,t,n){for(let o=1,i=e.length;o<i;++o){const i=e[o];for(const e of i){let r=0,n=0;for(const{source:t,value:o}of e.targetLinks){let i=o*(e.layer-t.layer);r+=A(t,e)*i,n+=i}if(!(n>0))continue;let o=(r/n-e.y0)*t;e.y0+=o,e.y1+=o,D(e)}void 0===r&&i.sort(__),E(i,n)}}function x(e,t,n){for(let o=e.length-2;o>=0;--o){const i=e[o];for(const e of i){let r=0,n=0;for(const{target:t,value:o}of e.sourceLinks){let i=o*(t.layer-e.layer);r+=j(e,t)*i,n+=i}if(!(n>0))continue;let o=(r/n-e.y0)*t;e.y0+=o,e.y1+=o,D(e)}void 0===r&&i.sort(__),E(i,n)}}function E(t,r){const n=t.length>>1,o=t[n];S(t,o.y0-e,n-1,r),k(t,o.y1+e,n+1,r),S(t,s,t.length-1,r),k(t,i,0,r)}function k(t,r,n,o){for(;n<t.length;++n){const i=t[n],a=(r-i.y0)*o;a>1e-6&&(i.y0+=a,i.y1+=a),r=i.y1+e}}function S(t,r,n,o){for(;n>=0;--n){const i=t[n],a=(i.y1-r)*o;a>1e-6&&(i.y0-=a,i.y1-=a),r=i.y0-e}}function D({sourceLinks:e,targetLinks:t}){if(void 0===n){for(const{source:{sourceLinks:e}}of t)e.sort(y_);for(const{target:{targetLinks:t}}of e)t.sort(v_)}}function C(e){if(void 0===n)for(const{sourceLinks:t,targetLinks:r}of e)t.sort(y_),r.sort(v_)}function A(t,r){let n=t.y0-(t.sourceLinks.length-1)*e/2;for(const{target:o,width:i}of t.sourceLinks){if(o===r)break;n+=i+e}for(const{source:e,width:o}of r.targetLinks){if(e===t)break;n-=o}return n}function j(t,r){let n=r.y0-(r.targetLinks.length-1)*e/2;for(const{source:o,width:i}of r.targetLinks){if(o===t)break;n+=i+e}for(const{target:e,width:o}of t.sourceLinks){if(e===r)break;n-=o}return n}return g.update=function(e){return k_(e),e},g.nodeId=function(e){return arguments.length?(h="function"==typeof e?e:g_(e),g):h},g.nodeAlign=function(e){return arguments.length?(l="function"==typeof e?e:g_(e),g):l},g.nodeSort=function(e){return arguments.length?(r=e,g):r},g.nodeWidth=function(e){return arguments.length?(u=+e,g):u},g.nodePadding=function(t){return arguments.length?(c=e=+t,g):c},g.nodes=function(e){return arguments.length?(f="function"==typeof e?e:g_(e),g):f},g.links=function(e){return arguments.length?(d="function"==typeof e?e:g_(e),g):d},g.linkSort=function(e){return arguments.length?(n=e,g):n},g.size=function(e){return arguments.length?(o=i=0,a=+e[0],s=+e[1],g):[a-o,s-i]},g.extent=function(e){return arguments.length?(o=+e[0][0],a=+e[1][0],i=+e[0][1],s=+e[1][1],g):[[o,i],[a,s]]},g.iterations=function(e){return arguments.length?(p=+e,g):p},g}function D_(e){return[e.source.x1,e.y0]}function C_(e){return[e.target.x0,e.y1]}function A_(){return A().source(D_).target(C_)}d_.prototype._class+=" graph_AdjacencyGraph",d_.prototype.publish("uidColumn","","set","UID column",(function(){return this.columns()}),{optional:!0}),d_.prototype.publish("labelColumn","","set","Label column",(function(){return this.columns()}),{optional:!0}),d_.prototype.publish("iconColumn","","set","Icon column",(function(){return this.columns()}),{optional:!0}),d_.prototype.publish("linksColumn","","set","Links column",(function(){return this.columns()}),{optional:!0}),d_.prototype.publish("linkUidColumn","","set","Link UID column",(function(){return this.linksColumns()}),{optional:!0}),d_.prototype.publish("linkLabelColumn","","set","Link Label column",(function(){return this.linksColumns()}),{optional:!0}),d_.prototype.publish("annotations",[],"propertyArray","Annotations",null,{autoExpand:f_});L(".graph_Sankey .node rect{fill-opacity:.9;shape-rendering:crispEdges;stroke:#a9a9a9;cursor:move}.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}");var j_={mean:t.mean,median:t.median,min:t.min,max:t.max,sum:t.sum},O_=function(e){function t(){return e.call(this)||this}return s(t,e),t.prototype.owner=function(e){return arguments.length?(this._owner=e,this):this._owner},t.prototype.valid=function(){return!!this.column()},t.prototype.aggregate=function(e){switch(this.aggrType()){case null:case void 0:case"":return e.length;default:var t=this._owner.columns().indexOf(this.aggrColumn());return j_[this.aggrType()](e,(function(e){return+e[t]}))}},t}(t.PropertyExt);O_.prototype._class+=" graph_Sankey.SankeyColumn",O_.prototype.publish("column",null,"set","Field",(function(){return this._owner?this._owner.columns():[]}),{optional:!0}),O_.prototype.publish("aggrType",null,"set","Aggregation Type",[null,"mean","median","sum","min","max"],{optional:!0,disable:function(e){return!e._owner||0===e._owner.mappings().indexOf(e)}}),O_.prototype.publish("aggrColumn",null,"set","Aggregation Field",(function(){return this._owner?this._owner.columns():[]}),{optional:!0,disable:function(e){return!e._owner||!e.aggrType()||0===e._owner.mappings().indexOf(e)}});var I_=function(e){function r(){var r=e.call(this)||this;return t.Utility.SimpleSelectionMixin.call(r),r._drawStartPos="origin",r}return s(r,e),r.prototype.sankeyData=function(){var e={vertices:[],edges:[]};if(0===this.data().length)return e;var t={},r=this.mappings().filter((function(e){return e.valid()}));return r.forEach((function(r,n){this._db.rollupView([r.column()]).entries().forEach((function(o){var i=r.column()+":"+n+":"+o.key;t[i]||(e.vertices.push({__id:i,__category:r.column(),name:o.key,origRow:o.value,value:o.value[n][2]}),t[i]=e.vertices.length-1)}),this)}),this),r.forEach((function(n,o){if(o<r.length-1){var i=r[o+1];this._db.rollupView([n.column(),i.column()]).entries().forEach((function(r){var a=n.column()+":"+o+":"+r.key;r.values.forEach((function(r){var n=i.column()+":"+(o+1)+":"+r.key;e.edges.push({__id:a+"_"+n,source:t[a],target:t[n],value:r.value[0][2]})}))}))}}),this),e},r.prototype.enter=function(t,r){e.prototype.enter.call(this,t,r),this._d3Sankey=new S_,this._selection.widgetElement(r)},r.prototype.update=function(r,n){e.prototype.update.call(this,r,n),this._palette=this._palette.switch(this.paletteID());var o=this.vertexStrokeWidth(),i=this.sankeyData(),a=2*o;this._d3Sankey.extent([[o,o],[this.width()-a,this.height()-a]]).nodeWidth(this.vertexWidth()).nodePadding(this.vertexPadding()),this._d3Sankey({nodes:i.vertices,links:i.edges});var s=this,u=n.selectAll(".link").data(i.edges);u.enter().append("path").attr("class","link").each((function(){t.select(this).append("title")})).merge(u).attr("d",A_()).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})),u.exit().remove();var c=n.selectAll(".node").data(i.vertices);c.enter().append("g").attr("class","node").call(this._selection.enter.bind(this._selection)).on("click",(function(e){s.click(s.rowToObj(e.origRow[0]),"",s._selection.selected(this))})).on("dblclick",(function(e){s.dblclick(s.rowToObj(e.origRow[0]),"",s._selection.selected(this))})).each((function(){var e=t.select(this);e.append("rect"),e.append("text")})).merge(c).attr("transform",(function(e){var t=0,r=0;return e.x0&&(t=e.x0),e.y0&&(r=e.y0),"translate("+(t+o)+","+(r+o)+")"})).each((function(){var e=t.select(this);e.select("rect").attr("height",(function(e){return e.y1-e.y0})).attr("width",s._d3Sankey.nodeWidth()).style("fill",(function(e){return s._palette(e.name)})).style("stroke",(function(e){return s.vertexStrokeColor()})).style("stroke-width",(function(e){return o})).style("cursor",s.xAxisMovement()||s.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<s.width()/2})).attr("x",6+s._d3Sankey.nodeWidth()).attr("text-anchor","start")})),c.exit().remove()},r.prototype.exit=function(t,r){e.prototype.exit.call(this,t,r)},r.prototype.click=function(e,t,r){},r.prototype.dblclick=function(e,t,r){},r}(t.SVGWidget);I_.prototype._class+=" graph_Sankey",I_.prototype.Column=O_,I_.prototype.mixin(t.Utility.SimpleSelectionMixin),I_.prototype._palette=t.Palette.ordinal("default"),I_.prototype.publish("paletteID","default","set","Color palette for this widget",I_.prototype._palette.switch()),I_.prototype.publish("mappings",[],"propertyArray","Source Columns",null,{autoExpand:O_}),I_.prototype.publish("vertexStrokeWidth",1,"number","Vertex Stroke Width"),I_.prototype.publish("vertexStrokeColor","darkgray","string","Vertex Stroke Color"),I_.prototype.publish("vertexWidth",36,"number","Vertex Width"),I_.prototype.publish("vertexPadding",40,"number","Vertex Padding"),I_.prototype.publish("xAxisMovement",!1,"boolean","Enable x-axis movement"),I_.prototype.publish("yAxisMovement",!1,"boolean","Enable y-axis movement");var M_=E().x((function(e){return e[0]})).y((function(e){return e[1]})).curve(I),F_=E().x((function(e){return e[0]})).y((function(e){return e[1]})).curve(T),P_=function(){function e(e){this._running=!1,this._graph=e}return e.prototype.start=function(){return this._running=!0,this._graph.progress("layout-start"),Promise.resolve(this)},e.prototype.stop=function(){return this._running=!1,this._graph.progress("layout-stop"),this},e.prototype.running=function(){return this._running},e.prototype.center=function(e){if(e.length%2==1)return e[Math.floor(e.length/2)];var t=e[e.length/2-1],r=e[e.length/2];return[(t[0]+r[0])/2,(t[1]+r[1])/2]},e.prototype.edgePath=function(e,t){var r=this._graph.projectPlacholder(e.source),n=this._graph.projectPlacholder(e.target),o=[[r.x,r.y],[n.x,n.y]];if(t){var i=o[0][0]-o[1][0],a=o[0][1]-o[1][1];if(Math.sqrt(i*i+a*a)){var s=(o[0][0]+o[1][0])/2-a*t/100,u=(o[0][1]+o[1][1])/2+i*t/100;return{path:F_([o[0],[s,u],o[1]]),labelPos:[s,u]}}}return{path:M_(o),labelPos:this.center(o)}},e}(),T_=function(e){return e*Math.PI/180},N_=function(e){function t(t,r){void 0===r&&(r=60);var n=e.call(this,t)||this;return n.sideLength=r,n}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=t._graph.size(),r=t._graph.graphData(),n=r.allVertices();r.allEdges().forEach((function(e){return delete e.points}));var o,i=(o=n.length,t.sideLength/(2*Math.sin(T_(180/o)))),a=360/n.length;return n.forEach((function(t,r){delete t.fx,delete t.fy,t.x=e.width/2+Math.cos(T_(r*a))*i,t.y=e.height/2+Math.sin(T_(r*a))*i})),t._graph.moveVertices(!0).moveEdges(!0),t.stop(),t._running=!1,t}))},t}(P_);var L_=E().x((function(e){return e[0]})).y((function(e){return e[1]})).curve(I),Y_=function(e){return"cluster_".concat(e)};function R_(e,t,r,n){var o=e-r,i=t-n;return Math.sqrt(o*o+i*i)}var B_=function(e){function t(t,r){var n=e.call(this,t)||this;return n._options=r,n}return s(t,e),t.prototype.start=function(){var t=this;e.prototype.start.call(this);var r=this._graph.size(),n=this._graph.graphData();return function(e,t){var r=new Blob(['!function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(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.\')}var n={exports:{}};n.exports=function(){function e(n,r,o){function i(s,u){if(!r[s]){if(!n[s]){if(!u&&t)return t(s);if(a)return a(s,!0);var c=new Error("Cannot find module \'"+s+"\'");throw c.code="MODULE_NOT_FOUND",c}var f=r[s]={exports:{}};n[s][0].call(f.exports,(function(e){return i(n[s][1][e]||e)}),f,f.exports,e,n,r,o)}return r[s].exports}for(var a=t,s=0;s<o.length;s++)i(o[s]);return i}return e}()({1:[function(e,t,n){t.exports={graphlib:e("./lib/graphlib"),layout:e("./lib/layout"),debug:e("./lib/debug"),util:{time:e("./lib/util").time,notime:e("./lib/util").notime},version:e("./lib/version")}},{"./lib/debug":6,"./lib/graphlib":7,"./lib/layout":9,"./lib/util":29,"./lib/version":30}],2:[function(e,t,n){var r=e("./lodash"),o=e("./greedy-fas");function i(e){var t="greedy"===e.graph().acyclicer?o(e,n(e)):a(e);function n(e){return function(t){return e.edge(t).weight}}r.forEach(t,(function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r.uniqueId("rev"))}))}function a(e){var t=[],n={},o={};function i(a){r.has(o,a)||(o[a]=!0,n[a]=!0,r.forEach(e.outEdges(a),(function(e){r.has(n,e.w)?t.push(e):i(e.w)})),delete n[a])}return r.forEach(e.nodes(),i),t}function s(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}}))}t.exports={run:i,undo:s}},{"./greedy-fas":8,"./lodash":10}],3:[function(e,t,n){var r=e("./lodash"),o=e("./util");function i(e){function t(n){var o=e.children(n),i=e.node(n);if(o.length&&r.forEach(o,t),r.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var s=i.minRank,u=i.maxRank+1;s<u;++s)a(e,"borderLeft","_bl",n,i,s),a(e,"borderRight","_br",n,i,s)}}r.forEach(e.children(),t)}function a(e,t,n,r,i,a){var s={width:0,height:0,rank:a,borderType:t},u=i[t][a-1],c=o.addDummyNode(e,"border",s,n);i[t][a]=c,e.setParent(c,r),u&&e.setEdge(u,c,{weight:1})}t.exports=i},{"./lodash":10,"./util":29}],4:[function(e,t,n){var r=e("./lodash");function o(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||a(e)}function i(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||u(e),"lr"!==t&&"rl"!==t||(f(e),a(e))}function a(e){r.forEach(e.nodes(),(function(t){s(e.node(t))})),r.forEach(e.edges(),(function(t){s(e.edge(t))}))}function s(e){var t=e.width;e.width=e.height,e.height=t}function u(e){r.forEach(e.nodes(),(function(t){c(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,c),r.has(n,"y")&&c(n)}))}function c(e){e.y=-e.y}function f(e){r.forEach(e.nodes(),(function(t){d(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,d),r.has(n,"x")&&d(n)}))}function d(e){var t=e.x;e.x=e.y,e.y=t}t.exports={adjust:o,undo:i}},{"./lodash":10}],5:[function(e,t,n){function r(){var e={};e._next=e._prev=e,this._sentinel=e}function o(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function i(e,t){if("_next"!==e&&"_prev"!==e)return t}t.exports=r,r.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return o(t),t},r.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&o(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},r.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,i)),n=n._prev;return"["+e.join(", ")+"]"}},{}],6:[function(e,t,n){var r=e("./lodash"),o=e("./util"),i=e("./graphlib").Graph;function a(e){var t=o.buildLayerMatrix(e),n=new i({compound:!0,multigraph:!0}).setGraph({});return r.forEach(e.nodes(),(function(t){n.setNode(t,{label:t}),n.setParent(t,"layer"+e.node(t).rank)})),r.forEach(e.edges(),(function(e){n.setEdge(e.v,e.w,{},e.name)})),r.forEach(t,(function(e,t){var o="layer"+t;n.setNode(o,{rank:"same"}),r.reduce(e,(function(e,t){return n.setEdge(e,t,{style:"invis"}),t}))})),n}t.exports={debugOrdering:a}},{"./graphlib":7,"./lodash":10,"./util":29}],7:[function(e,t,n){var r;if("function"==typeof e)try{r=e("graphlib")}catch(e){}r||(r=window.graphlib),t.exports=r},{graphlib:31}],8:[function(e,t,n){var r=e("./lodash"),o=e("./graphlib").Graph,i=e("./data/list");t.exports=s;var a=r.constant(1);function s(e,t){if(e.nodeCount()<=1)return[];var n=f(e,t||a),o=u(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(o,(function(t){return e.outEdges(t.v,t.w)})),!0)}function u(e,t,n){for(var r,o=[],i=t[t.length-1],a=t[0];e.nodeCount();){for(;r=a.dequeue();)c(e,t,n,r);for(;r=i.dequeue();)c(e,t,n,r);if(e.nodeCount())for(var s=t.length-2;s>0;--s)if(r=t[s].dequeue()){o=o.concat(c(e,t,n,r,!0));break}}return o}function c(e,t,n,o,i){var a=i?[]:void 0;return r.forEach(e.inEdges(o.v),(function(r){var o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,d(t,n,s)})),r.forEach(e.outEdges(o.v),(function(r){var o=e.edge(r),i=r.w,a=e.node(i);a.in-=o,d(t,n,a)})),e.removeNode(o.v),a}function f(e,t){var n=new o,a=0,s=0;r.forEach(e.nodes(),(function(e){n.setNode(e,{v:e,in:0,out:0})})),r.forEach(e.edges(),(function(e){var r=n.edge(e.v,e.w)||0,o=t(e),i=r+o;n.setEdge(e.v,e.w,i),s=Math.max(s,n.node(e.v).out+=o),a=Math.max(a,n.node(e.w).in+=o)}));var u=r.range(s+a+3).map((function(){return new i})),c=a+1;return r.forEach(n.nodes(),(function(e){d(u,c,n.node(e))})),{graph:n,buckets:u,zeroIdx:c}}function d(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}},{"./data/list":5,"./graphlib":7,"./lodash":10}],9:[function(e,t,n){var r=e("./lodash"),o=e("./acyclic"),i=e("./normalize"),a=e("./rank"),s=e("./util").normalizeRanks,u=e("./parent-dummy-chains"),c=e("./util").removeEmptyRanks,f=e("./nesting-graph"),d=e("./add-border-segments"),h=e("./coordinate-system"),l=e("./order"),p=e("./position"),v=e("./util"),_=e("./graphlib").Graph;function y(e,t){var n=t&&t.debugTiming?v.time:v.notime;n("layout",(function(){var t=n(" buildLayoutGraph",(function(){return I(e)}));n(" runLayout",(function(){g(t,n)})),n(" updateInputGraph",(function(){b(e,t)}))}))}function g(e,t){t(" makeSpaceForEdgeLabels",(function(){S(e)})),t(" removeSelfEdges",(function(){B(e)})),t(" acyclic",(function(){o.run(e)})),t(" nestingGraph.run",(function(){f.run(e)})),t(" rank",(function(){a(v.asNonCompoundGraph(e))})),t(" injectEdgeLabelProxies",(function(){C(e)})),t(" removeEmptyRanks",(function(){c(e)})),t(" nestingGraph.cleanup",(function(){f.cleanup(e)})),t(" normalizeRanks",(function(){s(e)})),t(" assignRankMinMax",(function(){N(e)})),t(" removeEdgeLabelProxies",(function(){T(e)})),t(" normalize.run",(function(){i.run(e)})),t(" parentDummyChains",(function(){u(e)})),t(" addBorderSegments",(function(){d(e)})),t(" order",(function(){l(e)})),t(" insertSelfEdges",(function(){G(e)})),t(" adjustCoordinateSystem",(function(){h.adjust(e)})),t(" position",(function(){p(e)})),t(" positionSelfEdges",(function(){R(e)})),t(" removeBorderNodes",(function(){D(e)})),t(" normalize.undo",(function(){i.undo(e)})),t(" fixupEdgeLabelCoords",(function(){P(e)})),t(" undoCoordinateSystem",(function(){h.undo(e)})),t(" translateGraph",(function(){M(e)})),t(" assignNodeIntersects",(function(){L(e)})),t(" reversePoints",(function(){F(e)})),t(" acyclic.undo",(function(){o.undo(e)}))}function b(e,t){r.forEach(e.nodes(),(function(n){var r=e.node(n),o=t.node(n);r&&(r.x=o.x,r.y=o.y,t.children(n).length&&(r.width=o.width,r.height=o.height))})),r.forEach(e.edges(),(function(n){var o=e.edge(n),i=t.edge(n);o.points=i.points,r.has(i,"x")&&(o.x=i.x,o.y=i.y)})),e.graph().width=t.graph().width,e.graph().height=t.graph().height}t.exports=y;var m=["nodesep","edgesep","ranksep","marginx","marginy"],x={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},w=["acyclicer","ranker","rankdir","align"],E=["width","height"],j={width:0,height:0},k=["minlen","weight","width","height","labeloffset"],A={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},O=["labelpos"];function I(e){var t=new _({multigraph:!0,compound:!0}),n=z(e.graph());return t.setGraph(r.merge({},x,U(n,m),r.pick(n,w))),r.forEach(e.nodes(),(function(n){var o=z(e.node(n));t.setNode(n,r.defaults(U(o,E),j)),t.setParent(n,e.parent(n))})),r.forEach(e.edges(),(function(n){var o=z(e.edge(n));t.setEdge(n,r.merge({},A,U(o,k),r.pick(o,O)))})),t}function S(e){var t=e.graph();t.ranksep/=2,r.forEach(e.edges(),(function(n){var r=e.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}function C(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),o={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};v.addDummyNode(e,"edge-proxy",o,"_ep")}}))}function N(e){var t=0;r.forEach(e.nodes(),(function(n){var o=e.node(n);o.borderTop&&(o.minRank=e.node(o.borderTop).rank,o.maxRank=e.node(o.borderBottom).rank,t=r.max(t,o.maxRank))})),e.graph().maxRank=t}function T(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))}))}function M(e){var t=Number.POSITIVE_INFINITY,n=0,o=Number.POSITIVE_INFINITY,i=0,a=e.graph(),s=a.marginx||0,u=a.marginy||0;function c(e){var r=e.x,a=e.y,s=e.width,u=e.height;t=Math.min(t,r-s/2),n=Math.max(n,r+s/2),o=Math.min(o,a-u/2),i=Math.max(i,a+u/2)}r.forEach(e.nodes(),(function(t){c(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.has(n,"x")&&c(n)})),t-=s,o-=u,r.forEach(e.nodes(),(function(n){var r=e.node(n);r.x-=t,r.y-=o})),r.forEach(e.edges(),(function(n){var i=e.edge(n);r.forEach(i.points,(function(e){e.x-=t,e.y-=o})),r.has(i,"x")&&(i.x-=t),r.has(i,"y")&&(i.y-=o)})),a.width=n-t+s,a.height=i-o+u}function L(e){r.forEach(e.edges(),(function(t){var n,r,o=e.edge(t),i=e.node(t.v),a=e.node(t.w);o.points?(n=o.points[0],r=o.points[o.points.length-1]):(o.points=[],n=a,r=i),o.points.unshift(v.intersectRect(i,n)),o.points.push(v.intersectRect(a,r))}))}function P(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}function F(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);n.reversed&&n.points.reverse()}))}function D(e){r.forEach(e.nodes(),(function(t){if(e.children(t).length){var n=e.node(t),o=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(r.last(n.borderLeft)),s=e.node(r.last(n.borderRight));n.width=Math.abs(s.x-a.x),n.height=Math.abs(i.y-o.y),n.x=a.x+n.width/2,n.y=o.y+n.height/2}})),r.forEach(e.nodes(),(function(t){"border"===e.node(t).dummy&&e.removeNode(t)}))}function B(e){r.forEach(e.edges(),(function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}}))}function G(e){var t=v.buildLayerMatrix(e);r.forEach(t,(function(t){var n=0;r.forEach(t,(function(t,o){var i=e.node(t);i.order=o+n,r.forEach(i.selfEdges,(function(t){v.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:i.rank,order:o+ ++n,e:t.e,label:t.label},"_se")})),delete i.selfEdges}))}))}function R(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);if("selfedge"===n.dummy){var r=e.node(n.e.v),o=r.x+r.width/2,i=r.y,a=n.x-o,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:o+2*a/3,y:i-s},{x:o+5*a/6,y:i-s},{x:o+a,y:i},{x:o+5*a/6,y:i+s},{x:o+2*a/3,y:i+s}],n.label.x=n.x,n.label.y=n.y}}))}function U(e,t){return r.mapValues(r.pick(e,t),Number)}function z(e){var t={};return r.forEach(e,(function(e,n){t[n.toLowerCase()]=e})),t}},{"./acyclic":2,"./add-border-segments":3,"./coordinate-system":4,"./graphlib":7,"./lodash":10,"./nesting-graph":11,"./normalize":12,"./order":17,"./parent-dummy-chains":22,"./position":24,"./rank":26,"./util":29}],10:[function(e,t,n){var r;if("function"==typeof e)try{r={cloneDeep:e("lodash/cloneDeep"),constant:e("lodash/constant"),defaults:e("lodash/defaults"),each:e("lodash/each"),filter:e("lodash/filter"),find:e("lodash/find"),flatten:e("lodash/flatten"),forEach:e("lodash/forEach"),forIn:e("lodash/forIn"),has:e("lodash/has"),isUndefined:e("lodash/isUndefined"),last:e("lodash/last"),map:e("lodash/map"),mapValues:e("lodash/mapValues"),max:e("lodash/max"),merge:e("lodash/merge"),min:e("lodash/min"),minBy:e("lodash/minBy"),now:e("lodash/now"),pick:e("lodash/pick"),range:e("lodash/range"),reduce:e("lodash/reduce"),sortBy:e("lodash/sortBy"),uniqueId:e("lodash/uniqueId"),values:e("lodash/values"),zipObject:e("lodash/zipObject")}}catch(e){}r||(r=window._),t.exports=r},{"lodash/cloneDeep":227,"lodash/constant":228,"lodash/defaults":229,"lodash/each":230,"lodash/filter":232,"lodash/find":233,"lodash/flatten":235,"lodash/forEach":236,"lodash/forIn":237,"lodash/has":239,"lodash/isUndefined":258,"lodash/last":261,"lodash/map":262,"lodash/mapValues":263,"lodash/max":264,"lodash/merge":266,"lodash/min":267,"lodash/minBy":268,"lodash/now":270,"lodash/pick":271,"lodash/range":273,"lodash/reduce":274,"lodash/sortBy":276,"lodash/uniqueId":286,"lodash/values":287,"lodash/zipObject":288}],11:[function(e,t,n){var r=e("./lodash"),o=e("./util");function i(e){var t=o.addDummyNode(e,"root",{},"_root"),n=s(e),i=r.max(r.values(n))-1,c=2*i+1;e.graph().nestingRoot=t,r.forEach(e.edges(),(function(t){e.edge(t).minlen*=c}));var f=u(e)+1;r.forEach(e.children(),(function(r){a(e,t,c,f,i,n,r)})),e.graph().nodeRankFactor=c}function a(e,t,n,i,s,u,c){var f=e.children(c);if(f.length){var d=o.addBorderNode(e,"_bt"),h=o.addBorderNode(e,"_bb"),l=e.node(c);e.setParent(d,c),l.borderTop=d,e.setParent(h,c),l.borderBottom=h,r.forEach(f,(function(r){a(e,t,n,i,s,u,r);var o=e.node(r),f=o.borderTop?o.borderTop:r,l=o.borderBottom?o.borderBottom:r,p=o.borderTop?i:2*i,v=f!==l?1:s-u[c]+1;e.setEdge(d,f,{weight:p,minlen:v,nestingEdge:!0}),e.setEdge(l,h,{weight:p,minlen:v,nestingEdge:!0})})),e.parent(c)||e.setEdge(t,d,{weight:0,minlen:s+u[c]})}else c!==t&&e.setEdge(t,c,{weight:0,minlen:n})}function s(e){var t={};function n(o,i){var a=e.children(o);a&&a.length&&r.forEach(a,(function(e){n(e,i+1)})),t[o]=i}return r.forEach(e.children(),(function(e){n(e,1)})),t}function u(e){return r.reduce(e.edges(),(function(t,n){return t+e.edge(n).weight}),0)}function c(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,r.forEach(e.edges(),(function(t){e.edge(t).nestingEdge&&e.removeEdge(t)}))}t.exports={run:i,cleanup:c}},{"./lodash":10,"./util":29}],12:[function(e,t,n){var r=e("./lodash"),o=e("./util");function i(e){e.graph().dummyChains=[],r.forEach(e.edges(),(function(t){a(e,t)}))}function a(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,s=t.name,u=e.edge(t),c=u.labelRank;if(a!==r+1){var f,d,h;for(e.removeEdge(t),h=0,++r;r<a;++h,++r)u.points=[],d={width:0,height:0,edgeLabel:u,edgeObj:t,rank:r},f=o.addDummyNode(e,"edge",d,"_d"),r===c&&(d.width=u.width,d.height=u.height,d.dummy="edge-label",d.labelpos=u.labelpos),e.setEdge(n,f,{weight:u.weight},s),0===h&&e.graph().dummyChains.push(f),n=f;e.setEdge(n,i,{weight:u.weight},s)}}function s(e){r.forEach(e.graph().dummyChains,(function(t){var n,r=e.node(t),o=r.edgeLabel;for(e.setEdge(r.edgeObj,o);r.dummy;)n=e.successors(t)[0],e.removeNode(t),o.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(o.x=r.x,o.y=r.y,o.width=r.width,o.height=r.height),t=n,r=e.node(t)}))}t.exports={run:i,undo:s}},{"./lodash":10,"./util":29}],13:[function(e,t,n){var r=e("../lodash");function o(e,t,n){var o,i={};r.forEach(n,(function(n){for(var r,a,s=e.parent(n);s;){if((r=e.parent(s))?(a=i[r],i[r]=s):(a=o,o=s),a&&a!==s)return void t.setEdge(a,s);s=r}}))}t.exports=o},{"../lodash":10}],14:[function(e,t,n){var r=e("../lodash");function o(e,t){return r.map(t,(function(t){var n=e.inEdges(t);if(n.length){var o=r.reduce(n,(function(t,n){var r=e.edge(n),o=e.node(n.v);return{sum:t.sum+r.weight*o.order,weight:t.weight+r.weight}}),{sum:0,weight:0});return{v:t,barycenter:o.sum/o.weight,weight:o.weight}}return{v:t}}))}t.exports=o},{"../lodash":10}],15:[function(e,t,n){var r=e("../lodash"),o=e("../graphlib").Graph;function i(e,t,n){var i=a(e),s=new o({compound:!0}).setGraph({root:i}).setDefaultNodeLabel((function(t){return e.node(t)}));return r.forEach(e.nodes(),(function(o){var a=e.node(o),u=e.parent(o);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(s.setNode(o),s.setParent(o,u||i),r.forEach(e[n](o),(function(t){var n=t.v===o?t.w:t.v,i=s.edge(n,o),a=r.isUndefined(i)?0:i.weight;s.setEdge(n,o,{weight:e.edge(t).weight+a})})),r.has(a,"minRank")&&s.setNode(o,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))})),s}function a(e){for(var t;e.hasNode(t=r.uniqueId("_root")););return t}t.exports=i},{"../graphlib":7,"../lodash":10}],16:[function(e,t,n){var r=e("../lodash");function o(e,t){for(var n=0,r=1;r<t.length;++r)n+=i(e,t[r-1],t[r]);return n}function i(e,t,n){for(var o=r.zipObject(n,r.map(n,(function(e,t){return t}))),i=r.flatten(r.map(t,(function(t){return r.sortBy(r.map(e.outEdges(t),(function(t){return{pos:o[t.w],weight:e.edge(t).weight}})),"pos")})),!0),a=1;a<n.length;)a<<=1;var s=2*a-1;a-=1;var u=r.map(new Array(s),(function(){return 0})),c=0;return r.forEach(i.forEach((function(e){var t=e.pos+a;u[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=u[t+1]),u[t=t-1>>1]+=e.weight;c+=e.weight*n}))),c}t.exports=o},{"../lodash":10}],17:[function(e,t,n){var r=e("../lodash"),o=e("./init-order"),i=e("./cross-count"),a=e("./sort-subgraph"),s=e("./build-layer-graph"),u=e("./add-subgraph-constraints"),c=e("../graphlib").Graph,f=e("../util");function d(e){var t=f.maxRank(e),n=h(e,r.range(1,t+1),"inEdges"),a=h(e,r.range(t-1,-1,-1),"outEdges"),s=o(e);p(e,s);for(var u,c=Number.POSITIVE_INFINITY,d=0,v=0;v<4;++d,++v){l(d%2?n:a,d%4>=2),s=f.buildLayerMatrix(e);var _=i(e,s);_<c&&(v=0,u=r.cloneDeep(s),c=_)}p(e,u)}function h(e,t,n){return r.map(t,(function(t){return s(e,t,n)}))}function l(e,t){var n=new c;r.forEach(e,(function(e){var o=e.graph().root,i=a(e,o,n,t);r.forEach(i.vs,(function(t,n){e.node(t).order=n})),u(e,n,i.vs)}))}function p(e,t){r.forEach(t,(function(t){r.forEach(t,(function(t,n){e.node(t).order=n}))}))}t.exports=d},{"../graphlib":7,"../lodash":10,"../util":29,"./add-subgraph-constraints":13,"./build-layer-graph":15,"./cross-count":16,"./init-order":18,"./sort-subgraph":20}],18:[function(e,t,n){var r=e("../lodash");function o(e){var t={},n=r.filter(e.nodes(),(function(t){return!e.children(t).length})),o=r.max(r.map(n,(function(t){return e.node(t).rank}))),i=r.map(r.range(o+1),(function(){return[]}));function a(n){if(!r.has(t,n)){t[n]=!0;var o=e.node(n);i[o.rank].push(n),r.forEach(e.successors(n),a)}}var s=r.sortBy(n,(function(t){return e.node(t).rank}));return r.forEach(s,a),i}t.exports=o},{"../lodash":10}],19:[function(e,t,n){var r=e("../lodash");function o(e,t){var n={};return r.forEach(e,(function(e,t){var o=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};r.isUndefined(e.barycenter)||(o.barycenter=e.barycenter,o.weight=e.weight)})),r.forEach(t.edges(),(function(e){var t=n[e.v],o=n[e.w];r.isUndefined(t)||r.isUndefined(o)||(o.indegree++,t.out.push(n[e.w]))})),i(r.filter(n,(function(e){return!e.indegree})))}function i(e){var t=[];function n(e){return function(t){t.merged||(r.isUndefined(t.barycenter)||r.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&a(e,t)}}function o(t){return function(n){n.in.push(t),0==--n.indegree&&e.push(n)}}for(;e.length;){var i=e.pop();t.push(i),r.forEach(i.in.reverse(),n(i)),r.forEach(i.out,o(i))}return r.map(r.filter(t,(function(e){return!e.merged})),(function(e){return r.pick(e,["vs","i","barycenter","weight"])}))}function a(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}t.exports=o},{"../lodash":10}],20:[function(e,t,n){var r=e("../lodash"),o=e("./barycenter"),i=e("./resolve-conflicts"),a=e("./sort");function s(e,t,n,f){var d=e.children(t),h=e.node(t),l=h?h.borderLeft:void 0,p=h?h.borderRight:void 0,v={};l&&(d=r.filter(d,(function(e){return e!==l&&e!==p})));var _=o(e,d);r.forEach(_,(function(t){if(e.children(t.v).length){var o=s(e,t.v,n,f);v[t.v]=o,r.has(o,"barycenter")&&c(t,o)}}));var y=i(_,n);u(y,v);var g=a(y,f);if(l&&(g.vs=r.flatten([l,g.vs,p],!0),e.predecessors(l).length)){var b=e.node(e.predecessors(l)[0]),m=e.node(e.predecessors(p)[0]);r.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+b.order+m.order)/(g.weight+2),g.weight+=2}return g}function u(e,t){r.forEach(e,(function(e){e.vs=r.flatten(e.vs.map((function(e){return t[e]?t[e].vs:e})),!0)}))}function c(e,t){r.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}t.exports=s},{"../lodash":10,"./barycenter":14,"./resolve-conflicts":19,"./sort":21}],21:[function(e,t,n){var r=e("../lodash"),o=e("../util");function i(e,t){var n=o.partition(e,(function(e){return r.has(e,"barycenter")})),i=n.lhs,u=r.sortBy(n.rhs,(function(e){return-e.i})),c=[],f=0,d=0,h=0;i.sort(s(!!t)),h=a(c,u,h),r.forEach(i,(function(e){h+=e.vs.length,c.push(e.vs),f+=e.barycenter*e.weight,d+=e.weight,h=a(c,u,h)}));var l={vs:r.flatten(c,!0)};return d&&(l.barycenter=f/d,l.weight=d),l}function a(e,t,n){for(var o;t.length&&(o=r.last(t)).i<=n;)t.pop(),e.push(o.vs),n++;return n}function s(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}t.exports=i},{"../lodash":10,"../util":29}],22:[function(e,t,n){var r=e("./lodash");function o(e){var t=a(e);r.forEach(e.graph().dummyChains,(function(n){for(var r=e.node(n),o=r.edgeObj,a=i(e,t,o.v,o.w),s=a.path,u=a.lca,c=0,f=s[c],d=!0;n!==o.w;){if(r=e.node(n),d){for(;(f=s[c])!==u&&e.node(f).maxRank<r.rank;)c++;f===u&&(d=!1)}if(!d){for(;c<s.length-1&&e.node(f=s[c+1]).minRank<=r.rank;)c++;f=s[c]}e.setParent(n,f),n=e.successors(n)[0]}}))}function i(e,t,n,r){var o,i,a=[],s=[],u=Math.min(t[n].low,t[r].low),c=Math.max(t[n].lim,t[r].lim);o=n;do{o=e.parent(o),a.push(o)}while(o&&(t[o].low>u||c>t[o].lim));for(i=o,o=r;(o=e.parent(o))!==i;)s.push(o);return{path:a.concat(s.reverse()),lca:i}}function a(e){var t={},n=0;function o(i){var a=n;r.forEach(e.children(i),o),t[i]={low:a,lim:n++}}return r.forEach(e.children(),o),t}t.exports=o},{"./lodash":10}],23:[function(e,t,n){var r=e("../lodash"),o=e("../graphlib").Graph,i=e("../util");function a(e,t){var n={};function o(t,o){var i=0,a=0,s=t.length,f=r.last(o);return r.forEach(o,(function(t,d){var h=u(e,t),l=h?e.node(h).order:s;(h||t===f)&&(r.forEach(o.slice(a,d+1),(function(t){r.forEach(e.predecessors(t),(function(r){var o=e.node(r),a=o.order;!(a<i||l<a)||o.dummy&&e.node(t).dummy||c(n,r,t)}))})),a=d+1,i=l)})),o}return r.reduce(t,o),n}function s(e,t){var n={};function o(t,o,i,a,s){var u;r.forEach(r.range(o,i),(function(o){u=t[o],e.node(u).dummy&&r.forEach(e.predecessors(u),(function(t){var r=e.node(t);r.dummy&&(r.order<a||r.order>s)&&c(n,t,u)}))}))}function i(t,n){var i,a=-1,s=0;return r.forEach(n,(function(r,u){if("border"===e.node(r).dummy){var c=e.predecessors(r);c.length&&(i=e.node(c[0]).order,o(n,s,u,a,i),s=u,a=i)}o(n,s,n.length,i,t.length)})),n}return r.reduce(t,i),n}function u(e,t){if(e.node(t).dummy)return r.find(e.predecessors(t),(function(t){return e.node(t).dummy}))}function c(e,t,n){if(t>n){var r=t;t=n,n=r}var o=e[t];o||(e[t]=o={}),o[n]=!0}function f(e,t,n){if(t>n){var o=t;t=n,n=o}return r.has(e[t],n)}function d(e,t,n,o){var i={},a={},s={};return r.forEach(t,(function(e){r.forEach(e,(function(e,t){i[e]=e,a[e]=e,s[e]=t}))})),r.forEach(t,(function(e){var t=-1;r.forEach(e,(function(e){var u=o(e);if(u.length){u=r.sortBy(u,(function(e){return s[e]}));for(var c=(u.length-1)/2,d=Math.floor(c),h=Math.ceil(c);d<=h;++d){var l=u[d];a[e]===e&&t<s[l]&&!f(n,e,l)&&(a[l]=e,a[e]=i[e]=i[l],t=s[l])}}}))})),{root:i,align:a}}function h(e,t,n,o,i){var a={},s=l(e,t,n,i),u=i?"borderLeft":"borderRight";function c(e,t){for(var n=s.nodes(),r=n.pop(),o={};r;)o[r]?e(r):(o[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function f(e){a[e]=s.inEdges(e).reduce((function(e,t){return Math.max(e,a[t.v]+s.edge(t))}),0)}function d(t){var n=s.outEdges(t).reduce((function(e,t){return Math.min(e,a[t.w]-s.edge(t))}),Number.POSITIVE_INFINITY),r=e.node(t);n!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(a[t]=Math.max(a[t],n))}return c(f,s.predecessors.bind(s)),c(d,s.successors.bind(s)),r.forEach(o,(function(e){a[e]=a[n[e]]})),a}function l(e,t,n,i){var a=new o,s=e.graph(),u=g(s.nodesep,s.edgesep,i);return r.forEach(t,(function(t){var o;r.forEach(t,(function(t){var r=n[t];if(a.setNode(r),o){var i=n[o],s=a.edge(i,r);a.setEdge(i,r,Math.max(u(e,t,o),s||0))}o=t}))})),a}function p(e,t){return r.minBy(r.values(t),(function(t){var n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;return r.forIn(t,(function(t,r){var i=b(e,r)/2;n=Math.max(t+i,n),o=Math.min(t-i,o)})),n-o}))}function v(e,t){var n=r.values(t),o=r.min(n),i=r.max(n);r.forEach(["u","d"],(function(n){r.forEach(["l","r"],(function(a){var s,u=n+a,c=e[u];if(c!==t){var f=r.values(c);(s="l"===a?o-r.min(f):i-r.max(f))&&(e[u]=r.mapValues(c,(function(e){return e+s})))}}))}))}function _(e,t){return r.mapValues(e.ul,(function(n,o){if(t)return e[t.toLowerCase()][o];var i=r.sortBy(r.map(e,o));return(i[1]+i[2])/2}))}function y(e){var t,n=i.buildLayerMatrix(e),o=r.merge(a(e,n),s(e,n)),u={};r.forEach(["u","d"],(function(i){t="u"===i?n:r.values(n).reverse(),r.forEach(["l","r"],(function(n){"r"===n&&(t=r.map(t,(function(e){return r.values(e).reverse()})));var a=("u"===i?e.predecessors:e.successors).bind(e),s=d(e,t,o,a),c=h(e,t,s.root,s.align,"r"===n);"r"===n&&(c=r.mapValues(c,(function(e){return-e}))),u[i+n]=c}))}));var c=p(e,u);return v(u,c),_(u,e.graph().align)}function g(e,t,n){return function(o,i,a){var s,u=o.node(i),c=o.node(a),f=0;if(f+=u.width/2,r.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=-u.width/2;break;case"r":s=u.width/2}if(s&&(f+=n?s:-s),s=0,f+=(u.dummy?t:e)/2,f+=(c.dummy?t:e)/2,f+=c.width/2,r.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":s=c.width/2;break;case"r":s=-c.width/2}return s&&(f+=n?s:-s),s=0,f}}function b(e,t){return e.node(t).width}t.exports={positionX:y,findType1Conflicts:a,findType2Conflicts:s,addConflict:c,hasConflict:f,verticalAlignment:d,horizontalCompaction:h,alignCoordinates:v,findSmallestWidthAlignment:p,balance:_}},{"../graphlib":7,"../lodash":10,"../util":29}],24:[function(e,t,n){var r=e("../lodash"),o=e("../util"),i=e("./bk").positionX;function a(e){s(e=o.asNonCompoundGraph(e)),r.forEach(i(e),(function(t,n){e.node(n).x=t}))}function s(e){var t=o.buildLayerMatrix(e),n=e.graph().ranksep,i=0;r.forEach(t,(function(t){var o=r.max(r.map(t,(function(t){return e.node(t).height})));r.forEach(t,(function(t){e.node(t).y=i+o/2})),i+=o+n}))}t.exports=a},{"../lodash":10,"../util":29,"./bk":23}],25:[function(e,t,n){var r=e("../lodash"),o=e("../graphlib").Graph,i=e("./util").slack;function a(e){var t,n,r=new o({directed:!1}),a=e.nodes()[0],f=e.nodeCount();for(r.setNode(a,{});s(r,e)<f;)t=u(r,e),n=r.hasNode(t.v)?i(e,t):-i(e,t),c(r,e,n);return r}function s(e,t){function n(o){r.forEach(t.nodeEdges(o),(function(r){var a=r.v,s=o===a?r.w:a;e.hasNode(s)||i(t,r)||(e.setNode(s,{}),e.setEdge(o,s,{}),n(s))}))}return r.forEach(e.nodes(),n),e.nodeCount()}function u(e,t){return r.minBy(t.edges(),(function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return i(t,n)}))}function c(e,t,n){r.forEach(e.nodes(),(function(e){t.node(e).rank+=n}))}t.exports=a},{"../graphlib":7,"../lodash":10,"./util":28}],26:[function(e,t,n){var r=e("./util").longestPath,o=e("./feasible-tree"),i=e("./network-simplex");function a(e){switch(e.graph().ranker){case"network-simplex":default:c(e);break;case"tight-tree":u(e);break;case"longest-path":s(e)}}t.exports=a;var s=r;function u(e){r(e),o(e)}function c(e){i(e)}},{"./feasible-tree":25,"./network-simplex":27,"./util":28}],27:[function(e,t,n){var r=e("../lodash"),o=e("./feasible-tree"),i=e("./util").slack,a=e("./util").longestPath,s=e("../graphlib").alg.preorder,u=e("../graphlib").alg.postorder,c=e("../util").simplify;function f(e){e=c(e),a(e);var t,n=o(e);for(p(n),d(n,e);t=_(n);)g(n,e,t,y(n,e,t))}function d(e,t){var n=u(e,e.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){h(e,t,n)}))}function h(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=l(e,t,n)}function l(e,t,n){var o=e.node(n).parent,i=!0,a=t.edge(n,o),s=0;return a||(i=!1,a=t.edge(o,n)),s=a.weight,r.forEach(t.nodeEdges(n),(function(r){var a=r.v===n,u=a?r.w:r.v;if(u!==o){var c=a===i,f=t.edge(r).weight;if(s+=c?f:-f,m(e,n,u)){var d=e.edge(n,u).cutvalue;s+=c?-d:d}}})),s}function p(e,t){arguments.length<2&&(t=e.nodes()[0]),v(e,{},1,t)}function v(e,t,n,o,i){var a=n,s=e.node(o);return t[o]=!0,r.forEach(e.neighbors(o),(function(i){r.has(t,i)||(n=v(e,t,n,i,o))})),s.low=a,s.lim=n++,i?s.parent=i:delete s.parent,n}function _(e){return r.find(e.edges(),(function(t){return e.edge(t).cutvalue<0}))}function y(e,t,n){var o=n.v,a=n.w;t.hasEdge(o,a)||(o=n.w,a=n.v);var s=e.node(o),u=e.node(a),c=s,f=!1;s.lim>u.lim&&(c=u,f=!0);var d=r.filter(t.edges(),(function(t){return f===x(e,e.node(t.v),c)&&f!==x(e,e.node(t.w),c)}));return r.minBy(d,(function(e){return i(t,e)}))}function g(e,t,n,r){var o=n.v,i=n.w;e.removeEdge(o,i),e.setEdge(r.v,r.w,{}),p(e),d(e,t),b(e,t)}function b(e,t){var n=r.find(e.nodes(),(function(e){return!t.node(e).parent})),o=s(e,n);o=o.slice(1),r.forEach(o,(function(n){var r=e.node(n).parent,o=t.edge(n,r),i=!1;o||(o=t.edge(r,n),i=!0),t.node(n).rank=t.node(r).rank+(i?o.minlen:-o.minlen)}))}function m(e,t,n){return e.hasEdge(t,n)}function x(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}t.exports=f,f.initLowLimValues=p,f.initCutValues=d,f.calcCutValue=l,f.leaveEdge=_,f.enterEdge=y,f.exchangeEdges=g},{"../graphlib":7,"../lodash":10,"../util":29,"./feasible-tree":25,"./util":28}],28:[function(e,t,n){var r=e("../lodash");function o(e){var t={};function n(o){var i=e.node(o);if(r.has(t,o))return i.rank;t[o]=!0;var a=r.min(r.map(e.outEdges(o),(function(t){return n(t.w)-e.edge(t).minlen})));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),i.rank=a}r.forEach(e.sources(),n)}function i(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}t.exports={longestPath:o,slack:i}},{"../lodash":10}],29:[function(e,t,n){var r=e("./lodash"),o=e("./graphlib").Graph;function i(e,t,n,o){var i;do{i=r.uniqueId(o)}while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function a(e){var t=(new o).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})})),t}function s(e){var t=new o({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){e.children(n).length||t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){t.setEdge(n,e.edge(n))})),t}function u(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.outEdges(t),(function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)}function c(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.inEdges(t),(function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)}function f(e,t){var n,r,o=e.x,i=e.y,a=t.x-o,s=t.y-i,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),n=c*a/s,r=c):(a<0&&(u=-u),n=u,r=u*s/a),{x:o+n,y:i+r}}function d(e){var t=r.map(r.range(v(e)+1),(function(){return[]}));return r.forEach(e.nodes(),(function(n){var o=e.node(n),i=o.rank;r.isUndefined(i)||(t[i][o.order]=n)})),t}function h(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank})));r.forEach(e.nodes(),(function(n){var o=e.node(n);r.has(o,"rank")&&(o.rank-=t)}))}function l(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank}))),n=[];r.forEach(e.nodes(),(function(r){var o=e.node(r).rank-t;n[o]||(n[o]=[]),n[o].push(r)}));var o=0,i=e.graph().nodeRankFactor;r.forEach(n,(function(t,n){r.isUndefined(t)&&n%i!=0?--o:o&&r.forEach(t,(function(t){e.node(t).rank+=o}))}))}function p(e,t,n,r){var o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=r),i(e,"border",o,t)}function v(e){return r.max(r.map(e.nodes(),(function(t){var n=e.node(t).rank;if(!r.isUndefined(n))return n})))}function _(e,t){var n={lhs:[],rhs:[]};return r.forEach(e,(function(e){t(e)?n.lhs.push(e):n.rhs.push(e)})),n}function y(e,t){var n=r.now();try{return t()}finally{console.log(e+" time: "+(r.now()-n)+"ms")}}function g(e,t){return t()}t.exports={addDummyNode:i,simplify:a,asNonCompoundGraph:s,successorWeights:u,predecessorWeights:c,intersectRect:f,buildLayerMatrix:d,normalizeRanks:h,removeEmptyRanks:l,addBorderNode:p,maxRank:v,partition:_,time:y,notime:g}},{"./graphlib":7,"./lodash":10}],30:[function(e,t,n){t.exports="0.8.5"},{}],31:[function(e,t,n){var r=e("./lib");t.exports={Graph:r.Graph,json:e("./lib/json"),alg:e("./lib/alg"),version:r.version}},{"./lib":47,"./lib/alg":38,"./lib/json":48}],32:[function(e,t,n){var r=e("../lodash");function o(e){var t,n={},o=[];function i(o){r.has(n,o)||(n[o]=!0,t.push(o),r.each(e.successors(o),i),r.each(e.predecessors(o),i))}return r.each(e.nodes(),(function(e){t=[],i(e),t.length&&o.push(t)})),o}t.exports=o},{"../lodash":49}],33:[function(e,t,n){var r=e("../lodash");function o(e,t,n){r.isArray(t)||(t=[t]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],s={};return r.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);i(e,t,"post"===n,s,o,a)})),a}function i(e,t,n,o,a,s){r.has(o,t)||(o[t]=!0,n||s.push(t),r.each(a(t),(function(t){i(e,t,n,o,a,s)})),n&&s.push(t))}t.exports=o},{"../lodash":49}],34:[function(e,t,n){var r=e("./dijkstra"),o=e("../lodash");function i(e,t,n){return o.transform(e.nodes(),(function(o,i){o[i]=r(e,i,t,n)}),{})}t.exports=i},{"../lodash":49,"./dijkstra":35}],35:[function(e,t,n){var r=e("../lodash"),o=e("../data/priority-queue");t.exports=a;var i=r.constant(1);function a(e,t,n,r){return s(e,String(t),n||i,r||function(t){return e.outEdges(t)})}function s(e,t,n,r){var i,a,s={},u=new o,c=function(e){var t=e.v!==i?e.v:e.w,r=s[t],o=n(e),c=a.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);c<r.distance&&(r.distance=c,r.predecessor=i,u.decrease(t,c))};for(e.nodes().forEach((function(e){var n=e===t?0:Number.POSITIVE_INFINITY;s[e]={distance:n},u.add(e,n)}));u.size()>0&&(i=u.removeMin(),(a=s[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(c);return s}},{"../data/priority-queue":45,"../lodash":49}],36:[function(e,t,n){var r=e("../lodash"),o=e("./tarjan");function i(e){return r.filter(o(e),(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))}t.exports=i},{"../lodash":49,"./tarjan":43}],37:[function(e,t,n){var r=e("../lodash");t.exports=i;var o=r.constant(1);function i(e,t,n){return a(e,t||o,n||function(t){return e.outEdges(t)})}function a(e,t,n){var r={},o=e.nodes();return o.forEach((function(e){r[e]={},r[e][e]={distance:0},o.forEach((function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})})),n(e).forEach((function(n){var o=n.v===e?n.w:n.v,i=t(n);r[e][o]={distance:i,predecessor:e}}))})),o.forEach((function(e){var t=r[e];o.forEach((function(n){var i=r[n];o.forEach((function(n){var r=i[e],o=t[n],a=i[n],s=r.distance+o.distance;s<a.distance&&(a.distance=s,a.predecessor=o.predecessor)}))}))})),r}},{"../lodash":49}],38:[function(e,t,n){t.exports={components:e("./components"),dijkstra:e("./dijkstra"),dijkstraAll:e("./dijkstra-all"),findCycles:e("./find-cycles"),floydWarshall:e("./floyd-warshall"),isAcyclic:e("./is-acyclic"),postorder:e("./postorder"),preorder:e("./preorder"),prim:e("./prim"),tarjan:e("./tarjan"),topsort:e("./topsort")}},{"./components":32,"./dijkstra":35,"./dijkstra-all":34,"./find-cycles":36,"./floyd-warshall":37,"./is-acyclic":39,"./postorder":40,"./preorder":41,"./prim":42,"./tarjan":43,"./topsort":44}],39:[function(e,t,n){var r=e("./topsort");function o(e){try{r(e)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}t.exports=o},{"./topsort":44}],40:[function(e,t,n){var r=e("./dfs");function o(e,t){return r(e,t,"post")}t.exports=o},{"./dfs":33}],41:[function(e,t,n){var r=e("./dfs");function o(e,t){return r(e,t,"pre")}t.exports=o},{"./dfs":33}],42:[function(e,t,n){var r=e("../lodash"),o=e("../graph"),i=e("../data/priority-queue");function a(e,t){var n,a=new o,s={},u=new i;function c(e){var r=e.v===n?e.w:e.v,o=u.priority(r);if(void 0!==o){var i=t(e);i<o&&(s[r]=n,u.decrease(r,i))}}if(0===e.nodeCount())return a;r.each(e.nodes(),(function(e){u.add(e,Number.POSITIVE_INFINITY),a.setNode(e)})),u.decrease(e.nodes()[0],0);for(var f=!1;u.size()>0;){if(n=u.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(f)throw new Error("Input graph is not connected: "+e);f=!0}e.nodeEdges(n).forEach(c)}return a}t.exports=a},{"../data/priority-queue":45,"../graph":46,"../lodash":49}],43:[function(e,t,n){var r=e("../lodash");function o(e){var t=0,n=[],o={},i=[];function a(s){var u=o[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach((function(e){r.has(o,e)?o[e].onStack&&(u.lowlink=Math.min(u.lowlink,o[e].index)):(a(e),u.lowlink=Math.min(u.lowlink,o[e].lowlink))})),u.lowlink===u.index){var c,f=[];do{c=n.pop(),o[c].onStack=!1,f.push(c)}while(s!==c);i.push(f)}}return e.nodes().forEach((function(e){r.has(o,e)||a(e)})),i}t.exports=o},{"../lodash":49}],44:[function(e,t,n){var r=e("../lodash");function o(e){var t={},n={},o=[];function a(s){if(r.has(n,s))throw new i;r.has(t,s)||(n[s]=!0,t[s]=!0,r.each(e.predecessors(s),a),delete n[s],o.push(s))}if(r.each(e.sinks(),a),r.size(t)!==e.nodeCount())throw new i;return o}function i(){}t.exports=o,o.CycleException=i,i.prototype=new Error},{"../lodash":49}],45:[function(e,t,n){var r=e("../lodash");function o(){this._arr=[],this._keyIndices={}}t.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},o.prototype.has=function(e){return r.has(this._keyIndices,e)},o.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},o.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var o=this._arr,i=o.length;return n[e]=i,o.push({key:e,priority:t}),this._decrease(i),!0}return!1},o.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},o.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},o.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,o=e;n<t.length&&(o=t[n].priority<t[o].priority?n:o,r<t.length&&(o=t[r].priority<t[o].priority?r:o),o!==e&&(this._swap(e,o),this._heapify(o)))},o.prototype._decrease=function(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t},o.prototype._swap=function(e,t){var n=this._arr,r=this._keyIndices,o=n[e],i=n[t];n[e]=i,n[t]=o,r[i.key]=e,r[o.key]=t}},{"../lodash":49}],46:[function(e,t,n){var r=e("./lodash");t.exports=s;var o="\\0",i="\\0",a="";function s(e){this._isDirected=!r.has(e,"directed")||e.directed,this._isMultigraph=!!r.has(e,"multigraph")&&e.multigraph,this._isCompound=!!r.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[i]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function u(e,t){e[t]?e[t]++:e[t]=1}function c(e,t){--e[t]||delete e[t]}function f(e,t,n,i){var s=""+t,u=""+n;if(!e&&s>u){var c=s;s=u,u=c}return s+a+u+a+(r.isUndefined(i)?o:i)}function d(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};return r&&(s.name=r),s}function h(e,t){return f(e,t.v,t.w,t.name)}s.prototype._nodeCount=0,s.prototype._edgeCount=0,s.prototype.isDirected=function(){return this._isDirected},s.prototype.isMultigraph=function(){return this._isMultigraph},s.prototype.isCompound=function(){return this._isCompound},s.prototype.setGraph=function(e){return this._label=e,this},s.prototype.graph=function(){return this._label},s.prototype.setDefaultNodeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultNodeLabelFn=e,this},s.prototype.nodeCount=function(){return this._nodeCount},s.prototype.nodes=function(){return r.keys(this._nodes)},s.prototype.sources=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._in[t])}))},s.prototype.sinks=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._out[t])}))},s.prototype.setNodes=function(e,t){var n=arguments,o=this;return r.each(e,(function(e){n.length>1?o.setNode(e,t):o.setNode(e)})),this},s.prototype.setNode=function(e,t){return r.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=i,this._children[e]={},this._children[i][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},s.prototype.node=function(e){return this._nodes[e]},s.prototype.hasNode=function(e){return r.has(this._nodes,e)},s.prototype.removeNode=function(e){var t=this;if(r.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],r.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),r.each(r.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],r.each(r.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},s.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(t))t=i;else{for(var n=t+="";!r.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},s.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},s.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==i)return t}},s.prototype.children=function(e){if(r.isUndefined(e)&&(e=i),this._isCompound){var t=this._children[e];if(t)return r.keys(t)}else{if(e===i)return this.nodes();if(this.hasNode(e))return[]}},s.prototype.predecessors=function(e){var t=this._preds[e];if(t)return r.keys(t)},s.prototype.successors=function(e){var t=this._sucs[e];if(t)return r.keys(t)},s.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return r.union(t,this.successors(e))},s.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},s.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){e(r)&&t.setNode(r,n)})),r.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var o={};function i(e){var r=n.parent(e);return void 0===r||t.hasNode(r)?(o[e]=r,r):r in o?o[r]:i(r)}return this._isCompound&&r.each(t.nodes(),(function(e){t.setParent(e,i(e))})),t},s.prototype.setDefaultEdgeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultEdgeLabelFn=e,this},s.prototype.edgeCount=function(){return this._edgeCount},s.prototype.edges=function(){return r.values(this._edgeObjs)},s.prototype.setPath=function(e,t){var n=this,o=arguments;return r.reduce(e,(function(e,r){return o.length>1?n.setEdge(e,r,t):n.setEdge(e,r),r})),this},s.prototype.setEdge=function(){var e,t,n,o,i=!1,a=arguments[0];"object"==typeof a&&null!==a&&"v"in a?(e=a.v,t=a.w,n=a.name,2===arguments.length&&(o=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(o=arguments[2],i=!0)),e=""+e,t=""+t,r.isUndefined(n)||(n=""+n);var s=f(this._isDirected,e,t,n);if(r.has(this._edgeLabels,s))return i&&(this._edgeLabels[s]=o),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[s]=i?o:this._defaultEdgeLabelFn(e,t,n);var c=d(this._isDirected,e,t,n);return e=c.v,t=c.w,Object.freeze(c),this._edgeObjs[s]=c,u(this._preds[t],e),u(this._sucs[e],t),this._in[t][s]=c,this._out[e][s]=c,this._edgeCount++,this},s.prototype.edge=function(e,t,n){var r=1===arguments.length?h(this._isDirected,arguments[0]):f(this._isDirected,e,t,n);return this._edgeLabels[r]},s.prototype.hasEdge=function(e,t,n){var o=1===arguments.length?h(this._isDirected,arguments[0]):f(this._isDirected,e,t,n);return r.has(this._edgeLabels,o)},s.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?h(this._isDirected,arguments[0]):f(this._isDirected,e,t,n),o=this._edgeObjs[r];return o&&(e=o.v,t=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],c(this._preds[t],e),c(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},s.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var o=r.values(n);return t?r.filter(o,(function(e){return e.v===t})):o}},s.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var o=r.values(n);return t?r.filter(o,(function(e){return e.w===t})):o}},s.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},{"./lodash":49}],47:[function(e,t,n){t.exports={Graph:e("./graph"),version:e("./version")}},{"./graph":46,"./version":50}],48:[function(e,t,n){var r=e("./lodash"),o=e("./graph");function i(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:a(e),edges:s(e)};return r.isUndefined(e.graph())||(t.value=r.clone(e.graph())),t}function a(e){return r.map(e.nodes(),(function(t){var n=e.node(t),o=e.parent(t),i={v:t};return r.isUndefined(n)||(i.value=n),r.isUndefined(o)||(i.parent=o),i}))}function s(e){return r.map(e.edges(),(function(t){var n=e.edge(t),o={v:t.v,w:t.w};return r.isUndefined(t.name)||(o.name=t.name),r.isUndefined(n)||(o.value=n),o}))}function u(e){var t=new o(e.options).setGraph(e.value);return r.each(e.nodes,(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),r.each(e.edges,(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}t.exports={write:i,read:u}},{"./graph":46,"./lodash":49}],49:[function(e,t,n){var r;if("function"==typeof e)try{r={clone:e("lodash/clone"),constant:e("lodash/constant"),each:e("lodash/each"),filter:e("lodash/filter"),has:e("lodash/has"),isArray:e("lodash/isArray"),isEmpty:e("lodash/isEmpty"),isFunction:e("lodash/isFunction"),isUndefined:e("lodash/isUndefined"),keys:e("lodash/keys"),map:e("lodash/map"),reduce:e("lodash/reduce"),size:e("lodash/size"),transform:e("lodash/transform"),union:e("lodash/union"),values:e("lodash/values")}}catch(e){}r||(r=window._),t.exports=r},{"lodash/clone":226,"lodash/constant":228,"lodash/each":230,"lodash/filter":232,"lodash/has":239,"lodash/isArray":243,"lodash/isEmpty":247,"lodash/isFunction":248,"lodash/isUndefined":258,"lodash/keys":259,"lodash/map":262,"lodash/reduce":274,"lodash/size":275,"lodash/transform":284,"lodash/union":285,"lodash/values":287}],50:[function(e,t,n){t.exports="2.1.8"},{}],51:[function(e,t,n){var r=e("./_getNative")(e("./_root"),"DataView");t.exports=r},{"./_getNative":163,"./_root":208}],52:[function(e,t,n){var r=e("./_hashClear"),o=e("./_hashDelete"),i=e("./_hashGet"),a=e("./_hashHas"),s=e("./_hashSet");function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,t.exports=u},{"./_hashClear":172,"./_hashDelete":173,"./_hashGet":174,"./_hashHas":175,"./_hashSet":176}],53:[function(e,t,n){var r=e("./_listCacheClear"),o=e("./_listCacheDelete"),i=e("./_listCacheGet"),a=e("./_listCacheHas"),s=e("./_listCacheSet");function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,t.exports=u},{"./_listCacheClear":188,"./_listCacheDelete":189,"./_listCacheGet":190,"./_listCacheHas":191,"./_listCacheSet":192}],54:[function(e,t,n){var r=e("./_getNative")(e("./_root"),"Map");t.exports=r},{"./_getNative":163,"./_root":208}],55:[function(e,t,n){var r=e("./_mapCacheClear"),o=e("./_mapCacheDelete"),i=e("./_mapCacheGet"),a=e("./_mapCacheHas"),s=e("./_mapCacheSet");function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,t.exports=u},{"./_mapCacheClear":193,"./_mapCacheDelete":194,"./_mapCacheGet":195,"./_mapCacheHas":196,"./_mapCacheSet":197}],56:[function(e,t,n){var r=e("./_getNative")(e("./_root"),"Promise");t.exports=r},{"./_getNative":163,"./_root":208}],57:[function(e,t,n){var r=e("./_getNative")(e("./_root"),"Set");t.exports=r},{"./_getNative":163,"./_root":208}],58:[function(e,t,n){var r=e("./_MapCache"),o=e("./_setCacheAdd"),i=e("./_setCacheHas");function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,t.exports=a},{"./_MapCache":55,"./_setCacheAdd":210,"./_setCacheHas":211}],59:[function(e,t,n){var r=e("./_ListCache"),o=e("./_stackClear"),i=e("./_stackDelete"),a=e("./_stackGet"),s=e("./_stackHas"),u=e("./_stackSet");function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,t.exports=c},{"./_ListCache":53,"./_stackClear":215,"./_stackDelete":216,"./_stackGet":217,"./_stackHas":218,"./_stackSet":219}],60:[function(e,t,n){var r=e("./_root").Symbol;t.exports=r},{"./_root":208}],61:[function(e,t,n){var r=e("./_root").Uint8Array;t.exports=r},{"./_root":208}],62:[function(e,t,n){var r=e("./_getNative")(e("./_root"),"WeakMap");t.exports=r},{"./_getNative":163,"./_root":208}],63:[function(e,t,n){function r(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=r},{}],64:[function(e,t,n){function r(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}t.exports=r},{}],65:[function(e,t,n){function r(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}t.exports=r},{}],66:[function(e,t,n){var r=e("./_baseIndexOf");function o(e,t){return!(null==e||!e.length)&&r(e,t,0)>-1}t.exports=o},{"./_baseIndexOf":95}],67:[function(e,t,n){function r(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}t.exports=r},{}],68:[function(e,t,n){var r=e("./_baseTimes"),o=e("./isArguments"),i=e("./isArray"),a=e("./isBuffer"),s=e("./_isIndex"),u=e("./isTypedArray"),c=Object.prototype.hasOwnProperty;function f(e,t){var n=i(e),f=!n&&o(e),d=!n&&!f&&a(e),h=!n&&!f&&!d&&u(e),l=n||f||d||h,p=l?r(e.length,String):[],v=p.length;for(var _ in e)!t&&!c.call(e,_)||l&&("length"==_||d&&("offset"==_||"parent"==_)||h&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||s(_,v))||p.push(_);return p}t.exports=f},{"./_baseTimes":125,"./_isIndex":181,"./isArguments":242,"./isArray":243,"./isBuffer":246,"./isTypedArray":257}],69:[function(e,t,n){function r(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}t.exports=r},{}],70:[function(e,t,n){function r(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}t.exports=r},{}],71:[function(e,t,n){function r(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}t.exports=r},{}],72:[function(e,t,n){function r(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}t.exports=r},{}],73:[function(e,t,n){var r=e("./_baseProperty")("length");t.exports=r},{"./_baseProperty":117}],74:[function(e,t,n){var r=e("./_baseAssignValue"),o=e("./eq");function i(e,t,n){(void 0!==n&&!o(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}t.exports=i},{"./_baseAssignValue":79,"./eq":231}],75:[function(e,t,n){var r=e("./_baseAssignValue"),o=e("./eq"),i=Object.prototype.hasOwnProperty;function a(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}t.exports=a},{"./_baseAssignValue":79,"./eq":231}],76:[function(e,t,n){var r=e("./eq");function o(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}t.exports=o},{"./eq":231}],77:[function(e,t,n){var r=e("./_copyObject"),o=e("./keys");function i(e,t){return e&&r(t,o(t),e)}t.exports=i},{"./_copyObject":143,"./keys":259}],78:[function(e,t,n){var r=e("./_copyObject"),o=e("./keysIn");function i(e,t){return e&&r(t,o(t),e)}t.exports=i},{"./_copyObject":143,"./keysIn":260}],79:[function(e,t,n){var r=e("./_defineProperty");function o(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}t.exports=o},{"./_defineProperty":153}],80:[function(e,t,n){var r=e("./_Stack"),o=e("./_arrayEach"),i=e("./_assignValue"),a=e("./_baseAssign"),s=e("./_baseAssignIn"),u=e("./_cloneBuffer"),c=e("./_copyArray"),f=e("./_copySymbols"),d=e("./_copySymbolsIn"),h=e("./_getAllKeys"),l=e("./_getAllKeysIn"),p=e("./_getTag"),v=e("./_initCloneArray"),_=e("./_initCloneByTag"),y=e("./_initCloneObject"),g=e("./isArray"),b=e("./isBuffer"),m=e("./isMap"),x=e("./isObject"),w=e("./isSet"),E=e("./keys"),j=1,k=2,A=4,O="[object Arguments]",I="[object Array]",S="[object Boolean]",C="[object Date]",N="[object Error]",T="[object Function]",M="[object GeneratorFunction]",L="[object Map]",P="[object Number]",F="[object Object]",D="[object RegExp]",B="[object Set]",G="[object String]",R="[object Symbol]",U="[object WeakMap]",z="[object ArrayBuffer]",V="[object DataView]",q="[object Float32Array]",K="[object Float64Array]",H="[object Int8Array]",Y="[object Int16Array]",$="[object Int32Array]",W="[object Uint8Array]",J="[object Uint8ClampedArray]",X="[object Uint16Array]",Z="[object Uint32Array]",Q={};function ee(e,t,n,I,S,C){var N,L=t&j,P=t&k,D=t&A;if(n&&(N=S?n(e,I,S,C):n(e)),void 0!==N)return N;if(!x(e))return e;var B=g(e);if(B){if(N=v(e),!L)return c(e,N)}else{var G=p(e),R=G==T||G==M;if(b(e))return u(e,L);if(G==F||G==O||R&&!S){if(N=P||R?{}:y(e),!L)return P?d(e,s(N,e)):f(e,a(N,e))}else{if(!Q[G])return S?e:{};N=_(e,G,L)}}C||(C=new r);var U=C.get(e);if(U)return U;C.set(e,N),w(e)?e.forEach((function(r){N.add(ee(r,t,n,r,e,C))})):m(e)&&e.forEach((function(r,o){N.set(o,ee(r,t,n,o,e,C))}));var z=D?P?l:h:P?keysIn:E,V=B?void 0:z(e);return o(V||e,(function(r,o){V&&(r=e[o=r]),i(N,o,ee(r,t,n,o,e,C))})),N}Q[O]=Q[I]=Q[z]=Q[V]=Q[S]=Q[C]=Q[q]=Q[K]=Q[H]=Q[Y]=Q[$]=Q[L]=Q[P]=Q[F]=Q[D]=Q[B]=Q[G]=Q[R]=Q[W]=Q[J]=Q[X]=Q[Z]=!0,Q[N]=Q[T]=Q[U]=!1,t.exports=ee},{"./_Stack":59,"./_arrayEach":64,"./_assignValue":75,"./_baseAssign":77,"./_baseAssignIn":78,"./_cloneBuffer":135,"./_copyArray":142,"./_copySymbols":144,"./_copySymbolsIn":145,"./_getAllKeys":159,"./_getAllKeysIn":160,"./_getTag":168,"./_initCloneArray":177,"./_initCloneByTag":178,"./_initCloneObject":179,"./isArray":243,"./isBuffer":246,"./isMap":250,"./isObject":251,"./isSet":254,"./keys":259}],81:[function(e,t,n){var r=e("./isObject"),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();t.exports=i},{"./isObject":251}],82:[function(e,t,n){var r=e("./_baseForOwn"),o=e("./_createBaseEach")(r);t.exports=o},{"./_baseForOwn":88,"./_createBaseEach":148}],83:[function(e,t,n){var r=e("./isSymbol");function o(e,t,n){for(var o=-1,i=e.length;++o<i;){var a=e[o],s=t(a);if(null!=s&&(void 0===u?s==s&&!r(s):n(s,u)))var u=s,c=a}return c}t.exports=o},{"./isSymbol":256}],84:[function(e,t,n){var r=e("./_baseEach");function o(e,t){var n=[];return r(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}t.exports=o},{"./_baseEach":82}],85:[function(e,t,n){function r(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}t.exports=r},{}],86:[function(e,t,n){var r=e("./_arrayPush"),o=e("./_isFlattenable");function i(e,t,n,a,s){var u=-1,c=e.length;for(n||(n=o),s||(s=[]);++u<c;){var f=e[u];t>0&&n(f)?t>1?i(f,t-1,n,a,s):r(s,f):a||(s[s.length]=f)}return s}t.exports=i},{"./_arrayPush":70,"./_isFlattenable":180}],87:[function(e,t,n){var r=e("./_createBaseFor")();t.exports=r},{"./_createBaseFor":149}],88:[function(e,t,n){var r=e("./_baseFor"),o=e("./keys");function i(e,t){return e&&r(e,t,o)}t.exports=i},{"./_baseFor":87,"./keys":259}],89:[function(e,t,n){var r=e("./_castPath"),o=e("./_toKey");function i(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n<i;)e=e[o(t[n++])];return n&&n==i?e:void 0}t.exports=i},{"./_castPath":133,"./_toKey":223}],90:[function(e,t,n){var r=e("./_arrayPush"),o=e("./isArray");function i(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}t.exports=i},{"./_arrayPush":70,"./isArray":243}],91:[function(e,t,n){var r=e("./_Symbol"),o=e("./_getRawTag"),i=e("./_objectToString"),a="[object Null]",s="[object Undefined]",u=r?r.toStringTag:void 0;function c(e){return null==e?void 0===e?s:a:u&&u in Object(e)?o(e):i(e)}t.exports=c},{"./_Symbol":60,"./_getRawTag":165,"./_objectToString":205}],92:[function(e,t,n){function r(e,t){return e>t}t.exports=r},{}],93:[function(e,t,n){var r=Object.prototype.hasOwnProperty;function o(e,t){return null!=e&&r.call(e,t)}t.exports=o},{}],94:[function(e,t,n){function r(e,t){return null!=e&&t in Object(e)}t.exports=r},{}],95:[function(e,t,n){var r=e("./_baseFindIndex"),o=e("./_baseIsNaN"),i=e("./_strictIndexOf");function a(e,t,n){return t==t?i(e,t,n):r(e,o,n)}t.exports=a},{"./_baseFindIndex":85,"./_baseIsNaN":101,"./_strictIndexOf":220}],96:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./isObjectLike"),i="[object Arguments]";function a(e){return o(e)&&r(e)==i}t.exports=a},{"./_baseGetTag":91,"./isObjectLike":252}],97:[function(e,t,n){var r=e("./_baseIsEqualDeep"),o=e("./isObjectLike");function i(e,t,n,a,s){return e===t||(null==e||null==t||!o(e)&&!o(t)?e!=e&&t!=t:r(e,t,n,a,i,s))}t.exports=i},{"./_baseIsEqualDeep":98,"./isObjectLike":252}],98:[function(e,t,n){var r=e("./_Stack"),o=e("./_equalArrays"),i=e("./_equalByTag"),a=e("./_equalObjects"),s=e("./_getTag"),u=e("./isArray"),c=e("./isBuffer"),f=e("./isTypedArray"),d=1,h="[object Arguments]",l="[object Array]",p="[object Object]",v=Object.prototype.hasOwnProperty;function _(e,t,n,_,y,g){var b=u(e),m=u(t),x=b?l:s(e),w=m?l:s(t),E=(x=x==h?p:x)==p,j=(w=w==h?p:w)==p,k=x==w;if(k&&c(e)){if(!c(t))return!1;b=!0,E=!1}if(k&&!E)return g||(g=new r),b||f(e)?o(e,t,n,_,y,g):i(e,t,x,n,_,y,g);if(!(n&d)){var A=E&&v.call(e,"__wrapped__"),O=j&&v.call(t,"__wrapped__");if(A||O){var I=A?e.value():e,S=O?t.value():t;return g||(g=new r),y(I,S,n,_,g)}}return!!k&&(g||(g=new r),a(e,t,n,_,y,g))}t.exports=_},{"./_Stack":59,"./_equalArrays":154,"./_equalByTag":155,"./_equalObjects":156,"./_getTag":168,"./isArray":243,"./isBuffer":246,"./isTypedArray":257}],99:[function(e,t,n){var r=e("./_getTag"),o=e("./isObjectLike"),i="[object Map]";function a(e){return o(e)&&r(e)==i}t.exports=a},{"./_getTag":168,"./isObjectLike":252}],100:[function(e,t,n){var r=e("./_Stack"),o=e("./_baseIsEqual"),i=1,a=2;function s(e,t,n,s){var u=n.length,c=u,f=!s;if(null==e)return!c;for(e=Object(e);u--;){var d=n[u];if(f&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++u<c;){var h=(d=n[u])[0],l=e[h],p=d[1];if(f&&d[2]){if(void 0===l&&!(h in e))return!1}else{var v=new r;if(s)var _=s(l,p,h,e,t,v);if(!(void 0===_?o(p,l,i|a,s,v):_))return!1}}return!0}t.exports=s},{"./_Stack":59,"./_baseIsEqual":97}],101:[function(e,t,n){function r(e){return e!=e}t.exports=r},{}],102:[function(e,t,n){var r=e("./isFunction"),o=e("./_isMasked"),i=e("./isObject"),a=e("./_toSource"),s=/[\\\\^$.*+?()[\\]{}|]/g,u=/^\\[object .+?Constructor\\]$/,c=Function.prototype,f=Object.prototype,d=c.toString,h=f.hasOwnProperty,l=RegExp("^"+d.call(h).replace(s,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$");function p(e){return!(!i(e)||o(e))&&(r(e)?l:u).test(a(e))}t.exports=p},{"./_isMasked":185,"./_toSource":224,"./isFunction":248,"./isObject":251}],103:[function(e,t,n){var r=e("./_getTag"),o=e("./isObjectLike"),i="[object Set]";function a(e){return o(e)&&r(e)==i}t.exports=a},{"./_getTag":168,"./isObjectLike":252}],104:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./isLength"),i=e("./isObjectLike"),a="[object Arguments]",s="[object Array]",u="[object Boolean]",c="[object Date]",f="[object Error]",d="[object Function]",h="[object Map]",l="[object Number]",p="[object Object]",v="[object RegExp]",_="[object Set]",y="[object String]",g="[object WeakMap]",b="[object ArrayBuffer]",m="[object DataView]",x="[object Float64Array]",w="[object Int8Array]",E="[object Int16Array]",j="[object Int32Array]",k="[object Uint8Array]",A="[object Uint8ClampedArray]",O="[object Uint16Array]",I="[object Uint32Array]",S={};function C(e){return i(e)&&o(e.length)&&!!S[r(e)]}S["[object Float32Array]"]=S[x]=S[w]=S[E]=S[j]=S[k]=S[A]=S[O]=S[I]=!0,S[a]=S[s]=S[b]=S[u]=S[m]=S[c]=S[f]=S[d]=S[h]=S[l]=S[p]=S[v]=S[_]=S[y]=S[g]=!1,t.exports=C},{"./_baseGetTag":91,"./isLength":249,"./isObjectLike":252}],105:[function(e,t,n){var r=e("./_baseMatches"),o=e("./_baseMatchesProperty"),i=e("./identity"),a=e("./isArray"),s=e("./property");function u(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):r(e):s(e)}t.exports=u},{"./_baseMatches":110,"./_baseMatchesProperty":111,"./identity":241,"./isArray":243,"./property":272}],106:[function(e,t,n){var r=e("./_isPrototype"),o=e("./_nativeKeys"),i=Object.prototype.hasOwnProperty;function a(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}t.exports=a},{"./_isPrototype":186,"./_nativeKeys":202}],107:[function(e,t,n){var r=e("./isObject"),o=e("./_isPrototype"),i=e("./_nativeKeysIn"),a=Object.prototype.hasOwnProperty;function s(e){if(!r(e))return i(e);var t=o(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}t.exports=s},{"./_isPrototype":186,"./_nativeKeysIn":203,"./isObject":251}],108:[function(e,t,n){function r(e,t){return e<t}t.exports=r},{}],109:[function(e,t,n){var r=e("./_baseEach"),o=e("./isArrayLike");function i(e,t){var n=-1,i=o(e)?Array(e.length):[];return r(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}t.exports=i},{"./_baseEach":82,"./isArrayLike":244}],110:[function(e,t,n){var r=e("./_baseIsMatch"),o=e("./_getMatchData"),i=e("./_matchesStrictComparable");function a(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}t.exports=a},{"./_baseIsMatch":100,"./_getMatchData":162,"./_matchesStrictComparable":199}],111:[function(e,t,n){var r=e("./_baseIsEqual"),o=e("./get"),i=e("./hasIn"),a=e("./_isKey"),s=e("./_isStrictComparable"),u=e("./_matchesStrictComparable"),c=e("./_toKey"),f=1,d=2;function h(e,t){return a(e)&&s(t)?u(c(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?i(n,e):r(t,a,f|d)}}t.exports=h},{"./_baseIsEqual":97,"./_isKey":183,"./_isStrictComparable":187,"./_matchesStrictComparable":199,"./_toKey":223,"./get":238,"./hasIn":240}],112:[function(e,t,n){var r=e("./_Stack"),o=e("./_assignMergeValue"),i=e("./_baseFor"),a=e("./_baseMergeDeep"),s=e("./isObject"),u=e("./keysIn"),c=e("./_safeGet");function f(e,t,n,d,h){e!==t&&i(t,(function(i,u){if(h||(h=new r),s(i))a(e,t,u,n,f,d,h);else{var l=d?d(c(e,u),i,u+"",e,t,h):void 0;void 0===l&&(l=i),o(e,u,l)}}),u)}t.exports=f},{"./_Stack":59,"./_assignMergeValue":74,"./_baseFor":87,"./_baseMergeDeep":113,"./_safeGet":209,"./isObject":251,"./keysIn":260}],113:[function(e,t,n){var r=e("./_assignMergeValue"),o=e("./_cloneBuffer"),i=e("./_cloneTypedArray"),a=e("./_copyArray"),s=e("./_initCloneObject"),u=e("./isArguments"),c=e("./isArray"),f=e("./isArrayLikeObject"),d=e("./isBuffer"),h=e("./isFunction"),l=e("./isObject"),p=e("./isPlainObject"),v=e("./isTypedArray"),_=e("./_safeGet"),y=e("./toPlainObject");function g(e,t,n,g,b,m,x){var w=_(e,n),E=_(t,n),j=x.get(E);if(j)r(e,n,j);else{var k=m?m(w,E,n+"",e,t,x):void 0,A=void 0===k;if(A){var O=c(E),I=!O&&d(E),S=!O&&!I&&v(E);k=E,O||I||S?c(w)?k=w:f(w)?k=a(w):I?(A=!1,k=o(E,!0)):S?(A=!1,k=i(E,!0)):k=[]:p(E)||u(E)?(k=w,u(w)?k=y(w):l(w)&&!h(w)||(k=s(E))):A=!1}A&&(x.set(E,k),b(k,E,g,m,x),x.delete(E)),r(e,n,k)}}t.exports=g},{"./_assignMergeValue":74,"./_cloneBuffer":135,"./_cloneTypedArray":139,"./_copyArray":142,"./_initCloneObject":179,"./_safeGet":209,"./isArguments":242,"./isArray":243,"./isArrayLikeObject":245,"./isBuffer":246,"./isFunction":248,"./isObject":251,"./isPlainObject":253,"./isTypedArray":257,"./toPlainObject":282}],114:[function(e,t,n){var r=e("./_arrayMap"),o=e("./_baseIteratee"),i=e("./_baseMap"),a=e("./_baseSortBy"),s=e("./_baseUnary"),u=e("./_compareMultiple"),c=e("./identity");function f(e,t,n){var f=-1;t=r(t.length?t:[c],s(o));var d=i(e,(function(e,n,o){return{criteria:r(t,(function(t){return t(e)})),index:++f,value:e}}));return a(d,(function(e,t){return u(e,t,n)}))}t.exports=f},{"./_arrayMap":69,"./_baseIteratee":105,"./_baseMap":109,"./_baseSortBy":124,"./_baseUnary":127,"./_compareMultiple":141,"./identity":241}],115:[function(e,t,n){var r=e("./_basePickBy"),o=e("./hasIn");function i(e,t){return r(e,t,(function(t,n){return o(e,n)}))}t.exports=i},{"./_basePickBy":116,"./hasIn":240}],116:[function(e,t,n){var r=e("./_baseGet"),o=e("./_baseSet"),i=e("./_castPath");function a(e,t,n){for(var a=-1,s=t.length,u={};++a<s;){var c=t[a],f=r(e,c);n(f,c)&&o(u,i(c,e),f)}return u}t.exports=a},{"./_baseGet":89,"./_baseSet":122,"./_castPath":133}],117:[function(e,t,n){function r(e){return function(t){return null==t?void 0:t[e]}}t.exports=r},{}],118:[function(e,t,n){var r=e("./_baseGet");function o(e){return function(t){return r(t,e)}}t.exports=o},{"./_baseGet":89}],119:[function(e,t,n){var r=Math.ceil,o=Math.max;function i(e,t,n,i){for(var a=-1,s=o(r((t-e)/(n||1)),0),u=Array(s);s--;)u[i?s:++a]=e,e+=n;return u}t.exports=i},{}],120:[function(e,t,n){function r(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}t.exports=r},{}],121:[function(e,t,n){var r=e("./identity"),o=e("./_overRest"),i=e("./_setToString");function a(e,t){return i(o(e,t,r),e+"")}t.exports=a},{"./_overRest":207,"./_setToString":213,"./identity":241}],122:[function(e,t,n){var r=e("./_assignValue"),o=e("./_castPath"),i=e("./_isIndex"),a=e("./isObject"),s=e("./_toKey");function u(e,t,n,u){if(!a(e))return e;for(var c=-1,f=(t=o(t,e)).length,d=f-1,h=e;null!=h&&++c<f;){var l=s(t[c]),p=n;if(c!=d){var v=h[l];void 0===(p=u?u(v,l,h):void 0)&&(p=a(v)?v:i(t[c+1])?[]:{})}r(h,l,p),h=h[l]}return e}t.exports=u},{"./_assignValue":75,"./_castPath":133,"./_isIndex":181,"./_toKey":223,"./isObject":251}],123:[function(e,t,n){var r=e("./constant"),o=e("./_defineProperty"),i=e("./identity"),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;t.exports=a},{"./_defineProperty":153,"./constant":228,"./identity":241}],124:[function(e,t,n){function r(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}t.exports=r},{}],125:[function(e,t,n){function r(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}t.exports=r},{}],126:[function(e,t,n){var r=e("./_Symbol"),o=e("./_arrayMap"),i=e("./isArray"),a=e("./isSymbol"),s=1/0,u=r?r.prototype:void 0,c=u?u.toString:void 0;function f(e){if("string"==typeof e)return e;if(i(e))return o(e,f)+"";if(a(e))return c?c.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}t.exports=f},{"./_Symbol":60,"./_arrayMap":69,"./isArray":243,"./isSymbol":256}],127:[function(e,t,n){function r(e){return function(t){return e(t)}}t.exports=r},{}],128:[function(e,t,n){var r=e("./_SetCache"),o=e("./_arrayIncludes"),i=e("./_arrayIncludesWith"),a=e("./_cacheHas"),s=e("./_createSet"),u=e("./_setToArray"),c=200;function f(e,t,n){var f=-1,d=o,h=e.length,l=!0,p=[],v=p;if(n)l=!1,d=i;else if(h>=c){var _=t?null:s(e);if(_)return u(_);l=!1,d=a,v=new r}else v=t?[]:p;e:for(;++f<h;){var y=e[f],g=t?t(y):y;if(y=n||0!==y?y:0,l&&g==g){for(var b=v.length;b--;)if(v[b]===g)continue e;t&&v.push(g),p.push(y)}else d(v,g,n)||(v!==p&&v.push(g),p.push(y))}return p}t.exports=f},{"./_SetCache":58,"./_arrayIncludes":66,"./_arrayIncludesWith":67,"./_cacheHas":131,"./_createSet":152,"./_setToArray":212}],129:[function(e,t,n){var r=e("./_arrayMap");function o(e,t){return r(t,(function(t){return e[t]}))}t.exports=o},{"./_arrayMap":69}],130:[function(e,t,n){function r(e,t,n){for(var r=-1,o=e.length,i=t.length,a={};++r<o;){var s=r<i?t[r]:void 0;n(a,e[r],s)}return a}t.exports=r},{}],131:[function(e,t,n){function r(e,t){return e.has(t)}t.exports=r},{}],132:[function(e,t,n){var r=e("./identity");function o(e){return"function"==typeof e?e:r}t.exports=o},{"./identity":241}],133:[function(e,t,n){var r=e("./isArray"),o=e("./_isKey"),i=e("./_stringToPath"),a=e("./toString");function s(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}t.exports=s},{"./_isKey":183,"./_stringToPath":222,"./isArray":243,"./toString":283}],134:[function(e,t,n){var r=e("./_Uint8Array");function o(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}t.exports=o},{"./_Uint8Array":61}],135:[function(e,t,n){var r=e("./_root"),o="object"==typeof n&&n&&!n.nodeType&&n,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;function u(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}t.exports=u},{"./_root":208}],136:[function(e,t,n){var r=e("./_cloneArrayBuffer");function o(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}t.exports=o},{"./_cloneArrayBuffer":134}],137:[function(e,t,n){var r=/\\w*$/;function o(e){var t=new e.constructor(e.source,r.exec(e));return t.lastIndex=e.lastIndex,t}t.exports=o},{}],138:[function(e,t,n){var r=e("./_Symbol"),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;function a(e){return i?Object(i.call(e)):{}}t.exports=a},{"./_Symbol":60}],139:[function(e,t,n){var r=e("./_cloneArrayBuffer");function o(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}t.exports=o},{"./_cloneArrayBuffer":134}],140:[function(e,t,n){var r=e("./isSymbol");function o(e,t){if(e!==t){var n=void 0!==e,o=null===e,i=e==e,a=r(e),s=void 0!==t,u=null===t,c=t==t,f=r(t);if(!u&&!f&&!a&&e>t||a&&s&&c&&!u&&!f||o&&s&&c||!n&&c||!i)return 1;if(!o&&!a&&!f&&e<t||f&&n&&i&&!o&&!a||u&&n&&i||!s&&i||!c)return-1}return 0}t.exports=o},{"./isSymbol":256}],141:[function(e,t,n){var r=e("./_compareAscending");function o(e,t,n){for(var o=-1,i=e.criteria,a=t.criteria,s=i.length,u=n.length;++o<s;){var c=r(i[o],a[o]);if(c)return o>=u?c:c*("desc"==n[o]?-1:1)}return e.index-t.index}t.exports=o},{"./_compareAscending":140}],142:[function(e,t,n){function r(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}t.exports=r},{}],143:[function(e,t,n){var r=e("./_assignValue"),o=e("./_baseAssignValue");function i(e,t,n,i){var a=!n;n||(n={});for(var s=-1,u=t.length;++s<u;){var c=t[s],f=i?i(n[c],e[c],c,n,e):void 0;void 0===f&&(f=e[c]),a?o(n,c,f):r(n,c,f)}return n}t.exports=i},{"./_assignValue":75,"./_baseAssignValue":79}],144:[function(e,t,n){var r=e("./_copyObject"),o=e("./_getSymbols");function i(e,t){return r(e,o(e),t)}t.exports=i},{"./_copyObject":143,"./_getSymbols":166}],145:[function(e,t,n){var r=e("./_copyObject"),o=e("./_getSymbolsIn");function i(e,t){return r(e,o(e),t)}t.exports=i},{"./_copyObject":143,"./_getSymbolsIn":167}],146:[function(e,t,n){var r=e("./_root")["__core-js_shared__"];t.exports=r},{"./_root":208}],147:[function(e,t,n){var r=e("./_baseRest"),o=e("./_isIterateeCall");function i(e){return r((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var u=n[r];u&&e(t,u,r,a)}return t}))}t.exports=i},{"./_baseRest":121,"./_isIterateeCall":182}],148:[function(e,t,n){var r=e("./isArrayLike");function o(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var i=n.length,a=t?i:-1,s=Object(n);(t?a--:++a<i)&&!1!==o(s[a],a,s););return n}}t.exports=o},{"./isArrayLike":244}],149:[function(e,t,n){function r(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===n(i[u],u,i))break}return t}}t.exports=r},{}],150:[function(e,t,n){var r=e("./_baseIteratee"),o=e("./isArrayLike"),i=e("./keys");function a(e){return function(t,n,a){var s=Object(t);if(!o(t)){var u=r(n,3);t=i(t),n=function(e){return u(s[e],e,s)}}var c=e(t,n,a);return c>-1?s[u?t[c]:c]:void 0}}t.exports=a},{"./_baseIteratee":105,"./isArrayLike":244,"./keys":259}],151:[function(e,t,n){var r=e("./_baseRange"),o=e("./_isIterateeCall"),i=e("./toFinite");function a(e){return function(t,n,a){return a&&"number"!=typeof a&&o(t,n,a)&&(n=a=void 0),t=i(t),void 0===n?(n=t,t=0):n=i(n),a=void 0===a?t<n?1:-1:i(a),r(t,n,a,e)}}t.exports=a},{"./_baseRange":119,"./_isIterateeCall":182,"./toFinite":279}],152:[function(e,t,n){var r=e("./_Set"),o=e("./noop"),i=e("./_setToArray"),a=1/0,s=r&&1/i(new r([,-0]))[1]==a?function(e){return new r(e)}:o;t.exports=s},{"./_Set":57,"./_setToArray":212,"./noop":269}],153:[function(e,t,n){var r=e("./_getNative"),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();t.exports=o},{"./_getNative":163}],154:[function(e,t,n){var r=e("./_SetCache"),o=e("./_arraySome"),i=e("./_cacheHas"),a=1,s=2;function u(e,t,n,u,c,f){var d=n&a,h=e.length,l=t.length;if(h!=l&&!(d&&l>h))return!1;var p=f.get(e);if(p&&f.get(t))return p==t;var v=-1,_=!0,y=n&s?new r:void 0;for(f.set(e,t),f.set(t,e);++v<h;){var g=e[v],b=t[v];if(u)var m=d?u(b,g,v,t,e,f):u(g,b,v,e,t,f);if(void 0!==m){if(m)continue;_=!1;break}if(y){if(!o(t,(function(e,t){if(!i(y,t)&&(g===e||c(g,e,n,u,f)))return y.push(t)}))){_=!1;break}}else if(g!==b&&!c(g,b,n,u,f)){_=!1;break}}return f.delete(e),f.delete(t),_}t.exports=u},{"./_SetCache":58,"./_arraySome":72,"./_cacheHas":131}],155:[function(e,t,n){var r=e("./_Symbol"),o=e("./_Uint8Array"),i=e("./eq"),a=e("./_equalArrays"),s=e("./_mapToArray"),u=e("./_setToArray"),c=1,f=2,d="[object Boolean]",h="[object Date]",l="[object Error]",p="[object Map]",v="[object Number]",_="[object RegExp]",y="[object Set]",g="[object String]",b="[object Symbol]",m="[object ArrayBuffer]",x="[object DataView]",w=r?r.prototype:void 0,E=w?w.valueOf:void 0;function j(e,t,n,r,w,j,k){switch(n){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case m:return!(e.byteLength!=t.byteLength||!j(new o(e),new o(t)));case d:case h:case v:return i(+e,+t);case l:return e.name==t.name&&e.message==t.message;case _:case g:return e==t+"";case p:var A=s;case y:var O=r&c;if(A||(A=u),e.size!=t.size&&!O)return!1;var I=k.get(e);if(I)return I==t;r|=f,k.set(e,t);var S=a(A(e),A(t),r,w,j,k);return k.delete(e),S;case b:if(E)return E.call(e)==E.call(t)}return!1}t.exports=j},{"./_Symbol":60,"./_Uint8Array":61,"./_equalArrays":154,"./_mapToArray":198,"./_setToArray":212,"./eq":231}],156:[function(e,t,n){var r=e("./_getAllKeys"),o=1,i=Object.prototype.hasOwnProperty;function a(e,t,n,a,s,u){var c=n&o,f=r(e),d=f.length;if(d!=r(t).length&&!c)return!1;for(var h=d;h--;){var l=f[h];if(!(c?l in t:i.call(t,l)))return!1}var p=u.get(e);if(p&&u.get(t))return p==t;var v=!0;u.set(e,t),u.set(t,e);for(var _=c;++h<d;){var y=e[l=f[h]],g=t[l];if(a)var b=c?a(g,y,l,t,e,u):a(y,g,l,e,t,u);if(!(void 0===b?y===g||s(y,g,n,a,u):b)){v=!1;break}_||(_="constructor"==l)}if(v&&!_){var m=e.constructor,x=t.constructor;m==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof x&&x instanceof x||(v=!1)}return u.delete(e),u.delete(t),v}t.exports=a},{"./_getAllKeys":159}],157:[function(e,t,n){var r=e("./flatten"),o=e("./_overRest"),i=e("./_setToString");function a(e){return i(o(e,void 0,r),e+"")}t.exports=a},{"./_overRest":207,"./_setToString":213,"./flatten":235}],158:[function(t,n,r){(function(e){var t="object"==typeof e&&e&&e.Object===Object&&e;n.exports=t}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],159:[function(e,t,n){var r=e("./_baseGetAllKeys"),o=e("./_getSymbols"),i=e("./keys");function a(e){return r(e,i,o)}t.exports=a},{"./_baseGetAllKeys":90,"./_getSymbols":166,"./keys":259}],160:[function(e,t,n){var r=e("./_baseGetAllKeys"),o=e("./_getSymbolsIn"),i=e("./keysIn");function a(e){return r(e,i,o)}t.exports=a},{"./_baseGetAllKeys":90,"./_getSymbolsIn":167,"./keysIn":260}],161:[function(e,t,n){var r=e("./_isKeyable");function o(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}t.exports=o},{"./_isKeyable":184}],162:[function(e,t,n){var r=e("./_isStrictComparable"),o=e("./keys");function i(e){for(var t=o(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,r(a)]}return t}t.exports=i},{"./_isStrictComparable":187,"./keys":259}],163:[function(e,t,n){var r=e("./_baseIsNative"),o=e("./_getValue");function i(e,t){var n=o(e,t);return r(n)?n:void 0}t.exports=i},{"./_baseIsNative":102,"./_getValue":169}],164:[function(e,t,n){var r=e("./_overArg")(Object.getPrototypeOf,Object);t.exports=r},{"./_overArg":206}],165:[function(e,t,n){var r=e("./_Symbol"),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;function u(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}t.exports=u},{"./_Symbol":60}],166:[function(e,t,n){var r=e("./_arrayFilter"),o=e("./stubArray"),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;t.exports=s},{"./_arrayFilter":65,"./stubArray":277}],167:[function(e,t,n){var r=e("./_arrayPush"),o=e("./_getPrototype"),i=e("./_getSymbols"),a=e("./stubArray"),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;t.exports=s},{"./_arrayPush":70,"./_getPrototype":164,"./_getSymbols":166,"./stubArray":277}],168:[function(e,t,n){var r=e("./_DataView"),o=e("./_Map"),i=e("./_Promise"),a=e("./_Set"),s=e("./_WeakMap"),u=e("./_baseGetTag"),c=e("./_toSource"),f="[object Map]",d="[object Object]",h="[object Promise]",l="[object Set]",p="[object WeakMap]",v="[object DataView]",_=c(r),y=c(o),g=c(i),b=c(a),m=c(s),x=u;(r&&x(new r(new ArrayBuffer(1)))!=v||o&&x(new o)!=f||i&&x(i.resolve())!=h||a&&x(new a)!=l||s&&x(new s)!=p)&&(x=function(e){var t=u(e),n=t==d?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case _:return v;case y:return f;case g:return h;case b:return l;case m:return p}return t}),t.exports=x},{"./_DataView":51,"./_Map":54,"./_Promise":56,"./_Set":57,"./_WeakMap":62,"./_baseGetTag":91,"./_toSource":224}],169:[function(e,t,n){function r(e,t){return null==e?void 0:e[t]}t.exports=r},{}],170:[function(e,t,n){var r=e("./_castPath"),o=e("./isArguments"),i=e("./isArray"),a=e("./_isIndex"),s=e("./isLength"),u=e("./_toKey");function c(e,t,n){for(var c=-1,f=(t=r(t,e)).length,d=!1;++c<f;){var h=u(t[c]);if(!(d=null!=e&&n(e,h)))break;e=e[h]}return d||++c!=f?d:!!(f=null==e?0:e.length)&&s(f)&&a(h,f)&&(i(e)||o(e))}t.exports=c},{"./_castPath":133,"./_isIndex":181,"./_toKey":223,"./isArguments":242,"./isArray":243,"./isLength":249}],171:[function(e,t,n){var r=RegExp("[\\\\u200d\\\\ud800-\\\\udfff\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff\\\\ufe0e\\\\ufe0f]");function o(e){return r.test(e)}t.exports=o},{}],172:[function(e,t,n){var r=e("./_nativeCreate");function o(){this.__data__=r?r(null):{},this.size=0}t.exports=o},{"./_nativeCreate":201}],173:[function(e,t,n){function r(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}t.exports=r},{}],174:[function(e,t,n){var r=e("./_nativeCreate"),o="__lodash_hash_undefined__",i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(r){var n=t[e];return n===o?void 0:n}return i.call(t,e)?t[e]:void 0}t.exports=a},{"./_nativeCreate":201}],175:[function(e,t,n){var r=e("./_nativeCreate"),o=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}t.exports=i},{"./_nativeCreate":201}],176:[function(e,t,n){var r=e("./_nativeCreate"),o="__lodash_hash_undefined__";function i(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?o:t,this}t.exports=i},{"./_nativeCreate":201}],177:[function(e,t,n){var r=Object.prototype.hasOwnProperty;function o(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&r.call(e,"index")&&(n.index=e.index,n.input=e.input),n}t.exports=o},{}],178:[function(e,t,n){var r=e("./_cloneArrayBuffer"),o=e("./_cloneDataView"),i=e("./_cloneRegExp"),a=e("./_cloneSymbol"),s=e("./_cloneTypedArray"),u="[object Boolean]",c="[object Date]",f="[object Map]",d="[object Number]",h="[object RegExp]",l="[object Set]",p="[object String]",v="[object Symbol]",_="[object ArrayBuffer]",y="[object DataView]",g="[object Float32Array]",b="[object Float64Array]",m="[object Int8Array]",x="[object Int16Array]",w="[object Int32Array]",E="[object Uint8Array]",j="[object Uint8ClampedArray]",k="[object Uint16Array]",A="[object Uint32Array]";function O(e,t,n){var O=e.constructor;switch(t){case _:return r(e);case u:case c:return new O(+e);case y:return o(e,n);case g:case b:case m:case x:case w:case E:case j:case k:case A:return s(e,n);case f:return new O;case d:case p:return new O(e);case h:return i(e);case l:return new O;case v:return a(e)}}t.exports=O},{"./_cloneArrayBuffer":134,"./_cloneDataView":136,"./_cloneRegExp":137,"./_cloneSymbol":138,"./_cloneTypedArray":139}],179:[function(e,t,n){var r=e("./_baseCreate"),o=e("./_getPrototype"),i=e("./_isPrototype");function a(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}t.exports=a},{"./_baseCreate":81,"./_getPrototype":164,"./_isPrototype":186}],180:[function(e,t,n){var r=e("./_Symbol"),o=e("./isArguments"),i=e("./isArray"),a=r?r.isConcatSpreadable:void 0;function s(e){return i(e)||o(e)||!!(a&&e&&e[a])}t.exports=s},{"./_Symbol":60,"./isArguments":242,"./isArray":243}],181:[function(e,t,n){var r=9007199254740991,o=/^(?:0|[1-9]\\d*)$/;function i(e,t){var n=typeof e;return!!(t=null==t?r:t)&&("number"==n||"symbol"!=n&&o.test(e))&&e>-1&&e%1==0&&e<t}t.exports=i},{}],182:[function(e,t,n){var r=e("./eq"),o=e("./isArrayLike"),i=e("./_isIndex"),a=e("./isObject");function s(e,t,n){if(!a(n))return!1;var s=typeof t;return!!("number"==s?o(n)&&i(t,n.length):"string"==s&&t in n)&&r(n[t],e)}t.exports=s},{"./_isIndex":181,"./eq":231,"./isArrayLike":244,"./isObject":251}],183:[function(e,t,n){var r=e("./isArray"),o=e("./isSymbol"),i=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,a=/^\\w*$/;function s(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||a.test(e)||!i.test(e)||null!=t&&e in Object(t)}t.exports=s},{"./isArray":243,"./isSymbol":256}],184:[function(e,t,n){function r(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}t.exports=r},{}],185:[function(e,t,n){var r,o=e("./_coreJsData"),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";function a(e){return!!i&&i in e}t.exports=a},{"./_coreJsData":146}],186:[function(e,t,n){var r=Object.prototype;function o(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}t.exports=o},{}],187:[function(e,t,n){var r=e("./isObject");function o(e){return e==e&&!r(e)}t.exports=o},{"./isObject":251}],188:[function(e,t,n){function r(){this.__data__=[],this.size=0}t.exports=r},{}],189:[function(e,t,n){var r=e("./_assocIndexOf"),o=Array.prototype.splice;function i(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}t.exports=i},{"./_assocIndexOf":76}],190:[function(e,t,n){var r=e("./_assocIndexOf");function o(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}t.exports=o},{"./_assocIndexOf":76}],191:[function(e,t,n){var r=e("./_assocIndexOf");function o(e){return r(this.__data__,e)>-1}t.exports=o},{"./_assocIndexOf":76}],192:[function(e,t,n){var r=e("./_assocIndexOf");function o(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}t.exports=o},{"./_assocIndexOf":76}],193:[function(e,t,n){var r=e("./_Hash"),o=e("./_ListCache"),i=e("./_Map");function a(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}t.exports=a},{"./_Hash":52,"./_ListCache":53,"./_Map":54}],194:[function(e,t,n){var r=e("./_getMapData");function o(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}t.exports=o},{"./_getMapData":161}],195:[function(e,t,n){var r=e("./_getMapData");function o(e){return r(this,e).get(e)}t.exports=o},{"./_getMapData":161}],196:[function(e,t,n){var r=e("./_getMapData");function o(e){return r(this,e).has(e)}t.exports=o},{"./_getMapData":161}],197:[function(e,t,n){var r=e("./_getMapData");function o(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}t.exports=o},{"./_getMapData":161}],198:[function(e,t,n){function r(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}t.exports=r},{}],199:[function(e,t,n){function r(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}t.exports=r},{}],200:[function(e,t,n){var r=e("./memoize"),o=500;function i(e){var t=r(e,(function(e){return n.size===o&&n.clear(),e})),n=t.cache;return t}t.exports=i},{"./memoize":265}],201:[function(e,t,n){var r=e("./_getNative")(Object,"create");t.exports=r},{"./_getNative":163}],202:[function(e,t,n){var r=e("./_overArg")(Object.keys,Object);t.exports=r},{"./_overArg":206}],203:[function(e,t,n){function r(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}t.exports=r},{}],204:[function(e,t,n){var r=e("./_freeGlobal"),o="object"==typeof n&&n&&!n.nodeType&&n,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o&&r.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();t.exports=s},{"./_freeGlobal":158}],205:[function(e,t,n){var r=Object.prototype.toString;function o(e){return r.call(e)}t.exports=o},{}],206:[function(e,t,n){function r(e,t){return function(n){return e(t(n))}}t.exports=r},{}],207:[function(e,t,n){var r=e("./_apply"),o=Math.max;function i(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),u=Array(s);++a<s;)u[a]=i[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=i[a];return c[t]=n(u),r(e,this,c)}}t.exports=i},{"./_apply":63}],208:[function(e,t,n){var r=e("./_freeGlobal"),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},{"./_freeGlobal":158}],209:[function(e,t,n){function r(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}t.exports=r},{}],210:[function(e,t,n){var r="__lodash_hash_undefined__";function o(e){return this.__data__.set(e,r),this}t.exports=o},{}],211:[function(e,t,n){function r(e){return this.__data__.has(e)}t.exports=r},{}],212:[function(e,t,n){function r(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}t.exports=r},{}],213:[function(e,t,n){var r=e("./_baseSetToString"),o=e("./_shortOut")(r);t.exports=o},{"./_baseSetToString":123,"./_shortOut":214}],214:[function(e,t,n){var r=800,o=16,i=Date.now;function a(e){var t=0,n=0;return function(){var a=i(),s=o-(a-n);if(n=a,s>0){if(++t>=r)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=a},{}],215:[function(e,t,n){var r=e("./_ListCache");function o(){this.__data__=new r,this.size=0}t.exports=o},{"./_ListCache":53}],216:[function(e,t,n){function r(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=r},{}],217:[function(e,t,n){function r(e){return this.__data__.get(e)}t.exports=r},{}],218:[function(e,t,n){function r(e){return this.__data__.has(e)}t.exports=r},{}],219:[function(e,t,n){var r=e("./_ListCache"),o=e("./_Map"),i=e("./_MapCache"),a=200;function s(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!o||s.length<a-1)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(s)}return n.set(e,t),this.size=n.size,this}t.exports=s},{"./_ListCache":53,"./_Map":54,"./_MapCache":55}],220:[function(e,t,n){function r(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}t.exports=r},{}],221:[function(e,t,n){var r=e("./_asciiSize"),o=e("./_hasUnicode"),i=e("./_unicodeSize");function a(e){return o(e)?i(e):r(e)}t.exports=a},{"./_asciiSize":73,"./_hasUnicode":171,"./_unicodeSize":225}],222:[function(e,t,n){var r=e("./_memoizeCapped"),o=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,i=/\\\\(\\\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)})),t}));t.exports=a},{"./_memoizeCapped":200}],223:[function(e,t,n){var r=e("./isSymbol"),o=1/0;function i(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}t.exports=i},{"./isSymbol":256}],224:[function(e,t,n){var r=Function.prototype.toString;function o(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}t.exports=o},{}],225:[function(e,t,n){var r="\\\\ud800-\\\\udfff",o="["+r+"]",i="[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]",a="\\\\ud83c[\\\\udffb-\\\\udfff]",s="[^"+r+"]",u="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",c="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",f="(?:"+i+"|"+a+")?",d="[\\\\ufe0e\\\\ufe0f]?",h=d+f+"(?:\\\\u200d(?:"+[s,u,c].join("|")+")"+d+f+")*",l="(?:"+[s+i+"?",i,u,c,o].join("|")+")",p=RegExp(a+"(?="+a+")|"+l+h,"g");function v(e){for(var t=p.lastIndex=0;p.test(e);)++t;return t}t.exports=v},{}],226:[function(e,t,n){var r=e("./_baseClone"),o=4;function i(e){return r(e,o)}t.exports=i},{"./_baseClone":80}],227:[function(e,t,n){var r=e("./_baseClone"),o=1,i=4;function a(e){return r(e,o|i)}t.exports=a},{"./_baseClone":80}],228:[function(e,t,n){function r(e){return function(){return e}}t.exports=r},{}],229:[function(e,t,n){var r=e("./_baseRest"),o=e("./eq"),i=e("./_isIterateeCall"),a=e("./keysIn"),s=Object.prototype,u=s.hasOwnProperty,c=r((function(e,t){e=Object(e);var n=-1,r=t.length,c=r>2?t[2]:void 0;for(c&&i(t[0],t[1],c)&&(r=1);++n<r;)for(var f=t[n],d=a(f),h=-1,l=d.length;++h<l;){var p=d[h],v=e[p];(void 0===v||o(v,s[p])&&!u.call(e,p))&&(e[p]=f[p])}return e}));t.exports=c},{"./_baseRest":121,"./_isIterateeCall":182,"./eq":231,"./keysIn":260}],230:[function(e,t,n){t.exports=e("./forEach")},{"./forEach":236}],231:[function(e,t,n){function r(e,t){return e===t||e!=e&&t!=t}t.exports=r},{}],232:[function(e,t,n){var r=e("./_arrayFilter"),o=e("./_baseFilter"),i=e("./_baseIteratee"),a=e("./isArray");function s(e,t){return(a(e)?r:o)(e,i(t,3))}t.exports=s},{"./_arrayFilter":65,"./_baseFilter":84,"./_baseIteratee":105,"./isArray":243}],233:[function(e,t,n){var r=e("./_createFind")(e("./findIndex"));t.exports=r},{"./_createFind":150,"./findIndex":234}],234:[function(e,t,n){var r=e("./_baseFindIndex"),o=e("./_baseIteratee"),i=e("./toInteger"),a=Math.max;function s(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var u=null==n?0:i(n);return u<0&&(u=a(s+u,0)),r(e,o(t,3),u)}t.exports=s},{"./_baseFindIndex":85,"./_baseIteratee":105,"./toInteger":280}],235:[function(e,t,n){var r=e("./_baseFlatten");function o(e){return null!=e&&e.length?r(e,1):[]}t.exports=o},{"./_baseFlatten":86}],236:[function(e,t,n){var r=e("./_arrayEach"),o=e("./_baseEach"),i=e("./_castFunction"),a=e("./isArray");function s(e,t){return(a(e)?r:o)(e,i(t))}t.exports=s},{"./_arrayEach":64,"./_baseEach":82,"./_castFunction":132,"./isArray":243}],237:[function(e,t,n){var r=e("./_baseFor"),o=e("./_castFunction"),i=e("./keysIn");function a(e,t){return null==e?e:r(e,o(t),i)}t.exports=a},{"./_baseFor":87,"./_castFunction":132,"./keysIn":260}],238:[function(e,t,n){var r=e("./_baseGet");function o(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}t.exports=o},{"./_baseGet":89}],239:[function(e,t,n){var r=e("./_baseHas"),o=e("./_hasPath");function i(e,t){return null!=e&&o(e,t,r)}t.exports=i},{"./_baseHas":93,"./_hasPath":170}],240:[function(e,t,n){var r=e("./_baseHasIn"),o=e("./_hasPath");function i(e,t){return null!=e&&o(e,t,r)}t.exports=i},{"./_baseHasIn":94,"./_hasPath":170}],241:[function(e,t,n){function r(e){return e}t.exports=r},{}],242:[function(e,t,n){var r=e("./_baseIsArguments"),o=e("./isObjectLike"),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};t.exports=u},{"./_baseIsArguments":96,"./isObjectLike":252}],243:[function(e,t,n){var r=Array.isArray;t.exports=r},{}],244:[function(e,t,n){var r=e("./isFunction"),o=e("./isLength");function i(e){return null!=e&&o(e.length)&&!r(e)}t.exports=i},{"./isFunction":248,"./isLength":249}],245:[function(e,t,n){var r=e("./isArrayLike"),o=e("./isObjectLike");function i(e){return o(e)&&r(e)}t.exports=i},{"./isArrayLike":244,"./isObjectLike":252}],246:[function(e,t,n){var r=e("./_root"),o=e("./stubFalse"),i="object"==typeof n&&n&&!n.nodeType&&n,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===i?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||o;t.exports=u},{"./_root":208,"./stubFalse":278}],247:[function(e,t,n){var r=e("./_baseKeys"),o=e("./_getTag"),i=e("./isArguments"),a=e("./isArray"),s=e("./isArrayLike"),u=e("./isBuffer"),c=e("./_isPrototype"),f=e("./isTypedArray"),d="[object Map]",h="[object Set]",l=Object.prototype.hasOwnProperty;function p(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||f(e)||i(e)))return!e.length;var t=o(e);if(t==d||t==h)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(l.call(e,n))return!1;return!0}t.exports=p},{"./_baseKeys":106,"./_getTag":168,"./_isPrototype":186,"./isArguments":242,"./isArray":243,"./isArrayLike":244,"./isBuffer":246,"./isTypedArray":257}],248:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./isObject"),i="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",u="[object Proxy]";function c(e){if(!o(e))return!1;var t=r(e);return t==a||t==s||t==i||t==u}t.exports=c},{"./_baseGetTag":91,"./isObject":251}],249:[function(e,t,n){var r=9007199254740991;function o(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}t.exports=o},{}],250:[function(e,t,n){var r=e("./_baseIsMap"),o=e("./_baseUnary"),i=e("./_nodeUtil"),a=i&&i.isMap,s=a?o(a):r;t.exports=s},{"./_baseIsMap":99,"./_baseUnary":127,"./_nodeUtil":204}],251:[function(e,t,n){function r(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}t.exports=r},{}],252:[function(e,t,n){function r(e){return null!=e&&"object"==typeof e}t.exports=r},{}],253:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./_getPrototype"),i=e("./isObjectLike"),a="[object Object]",s=Function.prototype,u=Object.prototype,c=s.toString,f=u.hasOwnProperty,d=c.call(Object);function h(e){if(!i(e)||r(e)!=a)return!1;var t=o(e);if(null===t)return!0;var n=f.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==d}t.exports=h},{"./_baseGetTag":91,"./_getPrototype":164,"./isObjectLike":252}],254:[function(e,t,n){var r=e("./_baseIsSet"),o=e("./_baseUnary"),i=e("./_nodeUtil"),a=i&&i.isSet,s=a?o(a):r;t.exports=s},{"./_baseIsSet":103,"./_baseUnary":127,"./_nodeUtil":204}],255:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./isArray"),i=e("./isObjectLike"),a="[object String]";function s(e){return"string"==typeof e||!o(e)&&i(e)&&r(e)==a}t.exports=s},{"./_baseGetTag":91,"./isArray":243,"./isObjectLike":252}],256:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./isObjectLike"),i="[object Symbol]";function a(e){return"symbol"==typeof e||o(e)&&r(e)==i}t.exports=a},{"./_baseGetTag":91,"./isObjectLike":252}],257:[function(e,t,n){var r=e("./_baseIsTypedArray"),o=e("./_baseUnary"),i=e("./_nodeUtil"),a=i&&i.isTypedArray,s=a?o(a):r;t.exports=s},{"./_baseIsTypedArray":104,"./_baseUnary":127,"./_nodeUtil":204}],258:[function(e,t,n){function r(e){return void 0===e}t.exports=r},{}],259:[function(e,t,n){var r=e("./_arrayLikeKeys"),o=e("./_baseKeys"),i=e("./isArrayLike");function a(e){return i(e)?r(e):o(e)}t.exports=a},{"./_arrayLikeKeys":68,"./_baseKeys":106,"./isArrayLike":244}],260:[function(e,t,n){var r=e("./_arrayLikeKeys"),o=e("./_baseKeysIn"),i=e("./isArrayLike");function a(e){return i(e)?r(e,!0):o(e)}t.exports=a},{"./_arrayLikeKeys":68,"./_baseKeysIn":107,"./isArrayLike":244}],261:[function(e,t,n){function r(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}t.exports=r},{}],262:[function(e,t,n){var r=e("./_arrayMap"),o=e("./_baseIteratee"),i=e("./_baseMap"),a=e("./isArray");function s(e,t){return(a(e)?r:i)(e,o(t,3))}t.exports=s},{"./_arrayMap":69,"./_baseIteratee":105,"./_baseMap":109,"./isArray":243}],263:[function(e,t,n){var r=e("./_baseAssignValue"),o=e("./_baseForOwn"),i=e("./_baseIteratee");function a(e,t){var n={};return t=i(t,3),o(e,(function(e,o,i){r(n,o,t(e,o,i))})),n}t.exports=a},{"./_baseAssignValue":79,"./_baseForOwn":88,"./_baseIteratee":105}],264:[function(e,t,n){var r=e("./_baseExtremum"),o=e("./_baseGt"),i=e("./identity");function a(e){return e&&e.length?r(e,i,o):void 0}t.exports=a},{"./_baseExtremum":83,"./_baseGt":92,"./identity":241}],265:[function(e,t,n){var r=e("./_MapCache"),o="Expected a function";function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(o);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},{"./_MapCache":55}],266:[function(e,t,n){var r=e("./_baseMerge"),o=e("./_createAssigner")((function(e,t,n){r(e,t,n)}));t.exports=o},{"./_baseMerge":112,"./_createAssigner":147}],267:[function(e,t,n){var r=e("./_baseExtremum"),o=e("./_baseLt"),i=e("./identity");function a(e){return e&&e.length?r(e,i,o):void 0}t.exports=a},{"./_baseExtremum":83,"./_baseLt":108,"./identity":241}],268:[function(e,t,n){var r=e("./_baseExtremum"),o=e("./_baseIteratee"),i=e("./_baseLt");function a(e,t){return e&&e.length?r(e,o(t,2),i):void 0}t.exports=a},{"./_baseExtremum":83,"./_baseIteratee":105,"./_baseLt":108}],269:[function(e,t,n){function r(){}t.exports=r},{}],270:[function(e,t,n){var r=e("./_root"),o=function(){return r.Date.now()};t.exports=o},{"./_root":208}],271:[function(e,t,n){var r=e("./_basePick"),o=e("./_flatRest")((function(e,t){return null==e?{}:r(e,t)}));t.exports=o},{"./_basePick":115,"./_flatRest":157}],272:[function(e,t,n){var r=e("./_baseProperty"),o=e("./_basePropertyDeep"),i=e("./_isKey"),a=e("./_toKey");function s(e){return i(e)?r(a(e)):o(e)}t.exports=s},{"./_baseProperty":117,"./_basePropertyDeep":118,"./_isKey":183,"./_toKey":223}],273:[function(e,t,n){var r=e("./_createRange")();t.exports=r},{"./_createRange":151}],274:[function(e,t,n){var r=e("./_arrayReduce"),o=e("./_baseEach"),i=e("./_baseIteratee"),a=e("./_baseReduce"),s=e("./isArray");function u(e,t,n){var u=s(e)?r:a,c=arguments.length<3;return u(e,i(t,4),n,c,o)}t.exports=u},{"./_arrayReduce":71,"./_baseEach":82,"./_baseIteratee":105,"./_baseReduce":120,"./isArray":243}],275:[function(e,t,n){var r=e("./_baseKeys"),o=e("./_getTag"),i=e("./isArrayLike"),a=e("./isString"),s=e("./_stringSize"),u="[object Map]",c="[object Set]";function f(e){if(null==e)return 0;if(i(e))return a(e)?s(e):e.length;var t=o(e);return t==u||t==c?e.size:r(e).length}t.exports=f},{"./_baseKeys":106,"./_getTag":168,"./_stringSize":221,"./isArrayLike":244,"./isString":255}],276:[function(e,t,n){var r=e("./_baseFlatten"),o=e("./_baseOrderBy"),i=e("./_baseRest"),a=e("./_isIterateeCall"),s=i((function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),o(e,r(t,1),[])}));t.exports=s},{"./_baseFlatten":86,"./_baseOrderBy":114,"./_baseRest":121,"./_isIterateeCall":182}],277:[function(e,t,n){function r(){return[]}t.exports=r},{}],278:[function(e,t,n){function r(){return!1}t.exports=r},{}],279:[function(e,t,n){var r=e("./toNumber"),o=1/0,i=17976931348623157e292;function a(e){return e?(e=r(e))===o||e===-o?(e<0?-1:1)*i:e==e?e:0:0===e?e:0}t.exports=a},{"./toNumber":281}],280:[function(e,t,n){var r=e("./toFinite");function o(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}t.exports=o},{"./toFinite":279}],281:[function(e,t,n){var r=e("./isObject"),o=e("./isSymbol"),i=NaN,a=/^\\s+|\\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,f=parseInt;function d(e){if("number"==typeof e)return e;if(o(e))return i;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var n=u.test(e);return n||c.test(e)?f(e.slice(2),n?2:8):s.test(e)?i:+e}t.exports=d},{"./isObject":251,"./isSymbol":256}],282:[function(e,t,n){var r=e("./_copyObject"),o=e("./keysIn");function i(e){return r(e,o(e))}t.exports=i},{"./_copyObject":143,"./keysIn":260}],283:[function(e,t,n){var r=e("./_baseToString");function o(e){return null==e?"":r(e)}t.exports=o},{"./_baseToString":126}],284:[function(e,t,n){var r=e("./_arrayEach"),o=e("./_baseCreate"),i=e("./_baseForOwn"),a=e("./_baseIteratee"),s=e("./_getPrototype"),u=e("./isArray"),c=e("./isBuffer"),f=e("./isFunction"),d=e("./isObject"),h=e("./isTypedArray");function l(e,t,n){var l=u(e),p=l||c(e)||h(e);if(t=a(t,4),null==n){var v=e&&e.constructor;n=p?l?new v:[]:d(e)&&f(v)?o(s(e)):{}}return(p?r:i)(e,(function(e,r,o){return t(n,e,r,o)})),n}t.exports=l},{"./_arrayEach":64,"./_baseCreate":81,"./_baseForOwn":88,"./_baseIteratee":105,"./_getPrototype":164,"./isArray":243,"./isBuffer":246,"./isFunction":248,"./isObject":251,"./isTypedArray":257}],285:[function(e,t,n){var r=e("./_baseFlatten"),o=e("./_baseRest"),i=e("./_baseUniq"),a=e("./isArrayLikeObject"),s=o((function(e){return i(r(e,1,a,!0))}));t.exports=s},{"./_baseFlatten":86,"./_baseRest":121,"./_baseUniq":128,"./isArrayLikeObject":245}],286:[function(e,t,n){var r=e("./toString"),o=0;function i(e){var t=++o;return r(e)+t}t.exports=i},{"./toString":283}],287:[function(e,t,n){var r=e("./_baseValues"),o=e("./keys");function i(e){return null==e?[]:r(e,o(e))}t.exports=i},{"./_baseValues":129,"./keys":259}],288:[function(e,t,n){var r=e("./_assignValue"),o=e("./_baseZipObject");function i(e,t){return o(e||[],t||[],r)}t.exports=i},{"./_assignValue":75,"./_baseZipObject":130}]},{},[1])(1);var r={exports:{}};\n/*!\n\t * @overview es6-promise - a tiny implementation of Promises/A+.\n\t * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n\t * @license Licensed under MIT license\n\t * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n\t * @version v4.2.8+1e68dce6\n\t */function o(e,t){var r=e.subgraphs,o=e.nodes,i=e.links,a=e.hierarchy,s=new n.exports.graphlib.Graph({multigraph:!0,compound:!0,directed:!1!==t.digraph}).setGraph(t).setDefaultNodeLabel((function(){return{}})).setDefaultEdgeLabel((function(){return{}}));r.forEach((function(e){s.setNode(e.id,e)})),o.forEach((function(e){s.setNode(e.id,e)})),i.forEach((function(e){s.setEdge(e.source.id,e.target.id,e,e.id)})),a.forEach((function(e){s.setParent(e.child,e.parent)})),n.exports.layout(s,{debugTiming:!1});var u=-s.graph().width/2||0,c=-s.graph().height/2;return s.nodes().forEach((function(e){var t=s.node(e);t.x+=u,t.y+=c})),s.edges().forEach((function(e){var t=s.edge(e);t.points=t.points.map((function(e){return[e.x+u,e.y+c]}))})),{subgraphs:r,nodes:o,links:i}}!function(t,n){t.exports=function(){function t(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function n(e){return"function"==typeof e}var r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=0,i=void 0,a=void 0,s=function(e,t){m[o]=e,m[o+1]=t,2===(o+=2)&&(a?a(x):E())};function u(e){a=e}function c(e){s=e}var f="undefined"!=typeof window?window:void 0,d=f||{},h=d.MutationObserver||d.WebKitMutationObserver,l="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function v(){return function(){return process.nextTick(x)}}function _(){return void 0!==i?function(){i(x)}:b()}function y(){var e=0,t=new h(x),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function g(){var e=new MessageChannel;return e.port1.onmessage=x,function(){return e.port2.postMessage(0)}}function b(){var e=setTimeout;return function(){return e(x,1)}}var m=new Array(1e3);function x(){for(var e=0;e<o;e+=2)(0,m[e])(m[e+1]),m[e]=void 0,m[e+1]=void 0;o=0}function w(){try{var e=Function("return this")().require("vertx");return i=e.runOnLoop||e.runOnContext,_()}catch(e){return b()}}var E=void 0;function j(e,t){var n=this,r=new this.constructor(O);void 0===r[A]&&Y(r);var o=n._state;if(o){var i=arguments[o-1];s((function(){return V(o,r,i,n._result)}))}else U(n,r,e,t);return r}function k(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(O);return D(n,e),n}E=l?v():h?y():p?g():void 0===f?w():b();var A=Math.random().toString(36).substring(2);function O(){}var I=void 0,S=1,C=2;function N(){return new TypeError("You cannot resolve a promise with itself")}function T(){return new TypeError("A promises callback cannot return that same promise.")}function M(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}function L(e,t,n){s((function(e){var r=!1,o=M(n,t,(function(n){r||(r=!0,t!==n?D(e,n):G(e,n))}),(function(t){r||(r=!0,R(e,t))}),"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,R(e,o))}),e)}function P(e,t){t._state===S?G(e,t._result):t._state===C?R(e,t._result):U(t,void 0,(function(t){return D(e,t)}),(function(t){return R(e,t)}))}function F(e,t,r){t.constructor===e.constructor&&r===j&&t.constructor.resolve===k?P(e,t):void 0===r?G(e,t):n(r)?L(e,t,r):G(e,t)}function D(e,n){if(e===n)R(e,N());else if(t(n)){var r=void 0;try{r=n.then}catch(t){return void R(e,t)}F(e,n,r)}else G(e,n)}function B(e){e._onerror&&e._onerror(e._result),z(e)}function G(e,t){e._state===I&&(e._result=t,e._state=S,0!==e._subscribers.length&&s(z,e))}function R(e,t){e._state===I&&(e._state=C,e._result=t,s(B,e))}function U(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+S]=n,o[i+C]=r,0===i&&e._state&&s(z,e)}function z(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,o=void 0,i=e._result,a=0;a<t.length;a+=3)r=t[a],o=t[a+n],r?V(n,r,o,i):o(i);e._subscribers.length=0}}function V(e,t,r,o){var i=n(r),a=void 0,s=void 0,u=!0;if(i){try{a=r(o)}catch(e){u=!1,s=e}if(t===a)return void R(t,T())}else a=o;t._state!==I||(i&&u?D(t,a):!1===u?R(t,s):e===S?G(t,a):e===C&&R(t,a))}function q(e,t){try{t((function(t){D(e,t)}),(function(t){R(e,t)}))}catch(t){R(e,t)}}var K=0;function H(){return K++}function Y(e){e[A]=K++,e._state=void 0,e._result=void 0,e._subscribers=[]}function $(){return new Error("Array Methods must be provided an Array")}var W=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(O),this.promise[A]||Y(this.promise),r(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?G(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&G(this.promise,this._result))):R(this.promise,$())}return e.prototype._enumerate=function(e){for(var t=0;this._state===I&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===k){var o=void 0,i=void 0,a=!1;try{o=e.then}catch(e){a=!0,i=e}if(o===j&&e._state!==I)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===te){var s=new n(O);a?R(s,i):F(s,e,o),this._willSettleAt(s,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},e.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===I&&(this._remaining--,e===C?R(r,n):this._result[t]=n),0===this._remaining&&G(r,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;U(e,void 0,(function(e){return n._settledAt(S,t,e)}),(function(e){return n._settledAt(C,t,e)}))},e}();function J(e){return new W(this,e).promise}function X(e){var t=this;return r(e)?new t((function(n,r){for(var o=e.length,i=0;i<o;i++)t.resolve(e[i]).then(n,r)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))}function Z(e){var t=new this(O);return R(t,e),t}function Q(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function ee(){throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.")}var te=function(){function e(t){this[A]=H(),this._result=this._state=void 0,this._subscribers=[],O!==t&&("function"!=typeof t&&Q(),this instanceof e?q(this,t):ee())}return e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(e){var t=this,r=t.constructor;return n(e)?t.then((function(t){return r.resolve(e()).then((function(){return t}))}),(function(t){return r.resolve(e()).then((function(){throw t}))})):t.then(e,e)},e}();function ne(){var t=void 0;if(void 0!==e)t=e;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=te}return te.prototype.then=j,te.all=J,te.race=X,te.resolve=k,te.reject=Z,te._setScheduler=u,te._setAsap=c,te._asap=s,te.polyfill=ne,te.Promise=te,te}()}(r),r.exports.polyfill(),self.onmessage=function(e){var t=o.apply(void 0,e.data);self.postMessage(t)}}();'],{type:"application/javascript"}),n=URL.createObjectURL(r),o=new Worker(n);return{terminate:function(){return o.terminate()},response:new Promise((function(r){o.onmessage=function(e){r(e.data),o.terminate(),URL.revokeObjectURL(n)},o.postMessage([e,t])}))}}({subgraphs:n.allSubgraphs().map((function(e){return u(u({},e.props),{id:Y_(e.id)})})),nodes:n.allVertices().map((function(e){delete e.fx,delete e.fy;var t=e.element.node().getBBox();return u({width:t.width,height:t.height},e.props)})),links:n.allEdges().map((function(e){return e.props})),hierarchy:l(l([],n.allSubgraphs().filter((function(e){return!!n.subgraphParent(e.id)})).map((function(e){return{parent:Y_(n.subgraphParent(e.id).props.id),child:Y_(e.id)}})),!0),n.allVertices().filter((function(e){return void 0!==n.vertexParent(e.id)})).map((function(e){return{parent:Y_(n.vertexParent(e.id).props.id),child:e.id}})),!0)},this._options).response.then((function(e){return t.running()&&(e.subgraphs.forEach((function(e){var t=n.subgraph(e.id.substring(8));t.x=e.x+r.width/2,t.y=e.y+r.height/2,t.props.width=e.width,t.props.height=e.height})),e.nodes.forEach((function(e){var t=n.vertex(e.id);t.x=e.x+r.width/2,t.y=e.y+r.height/2})),e.links.forEach((function(e){var t=n.edge(e.id),o=R_(t.source.x,t.source.y,e.points[0][0]+r.width/2,e.points[0][1]+r.height/2),i=R_(t.target.x,t.target.y,e.points[0][0]+r.width/2,e.points[0][1]+r.height/2);t.points=l(l([o<i?[t.source.x,t.source.y]:[t.target.x,t.target.y]],e.points.map((function(e){return[e[0]+r.width/2,e[1]+r.height/2]})),!0),[o<i?[t.target.x,t.target.y]:[t.source.x,t.source.y]],!1)})),t._graph.moveVertices(!0).moveSubgraphs(!0).moveEdges(!0),t.stop()),t}))},t.prototype.edgePath=function(t,r){var n=this,o=[],i=!1;return t.points&&(o=t.points.map((function(e){var t=n._graph.project(e[0],!1),r=n._graph.project(e[1],!1);return(isNaN(t)||isNaN(r))&&(i=!0),[t,r]}))),i||o.length<2?e.prototype.edgePath.call(this,t,r):{path:L_(o),labelPos:this.center(o)}},t}(P_),z_=function(e){function t(t,r){var n=e.call(this,t)||this;return n._options=r,n}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=t._graph.size(),r=t._graph.graphData(),n=r.allVertices(),o=r.allEdges();o.forEach((function(e){return delete e.points})),t._links=Ny(o).id((function(e){return e.id})).distance(t._options.linkDistance).strength(t._options.linkStrength),t._charge=o_().strength(t._options.repulsionStrength).distanceMin(t._options.distanceMin).distanceMax(t._options.distanceMax),t._center=Ey(e.width/2,e.height/2);var i=function(e){var t,r,n,o=ky(.1);function i(e){for(var o,i=0,a=t.length;i<a;++i)(o=t[i]).vx+=(n[i]-o.x)*r[i]*e}function a(){if(t){var i,a=t.length;for(r=new Array(a),n=new Array(a),i=0;i<a;++i)r[i]=isNaN(n[i]=+e(t[i],i,t))?0:+o(t[i],i,t)}}return"function"!=typeof e&&(e=ky(null==e?0:+e)),i.initialize=function(e){t=e,a()},i.strength=function(e){return arguments.length?(o="function"==typeof e?e:ky(+e),a(),i):o},i.x=function(t){return arguments.length?(e="function"==typeof t?t:ky(+t),a(),i):e},i}().strength(t._options.forceStrength),a=function(e){var t,r,n,o=ky(.1);function i(e){for(var o,i=0,a=t.length;i<a;++i)(o=t[i]).vy+=(n[i]-o.y)*r[i]*e}function a(){if(t){var i,a=t.length;for(r=new Array(a),n=new Array(a),i=0;i<a;++i)r[i]=isNaN(n[i]=+e(t[i],i,t))?0:+o(t[i],i,t)}}return"function"!=typeof e&&(e=ky(null==e?0:+e)),i.initialize=function(e){t=e,a()},i.strength=function(e){return arguments.length?(o="function"==typeof e?e:ky(+e),a(),i):o},i.y=function(t){return arguments.length?(e="function"==typeof t?t:ky(+t),a(),i):e},i}().strength(t._options.forceStrength);return t._simulation=n_(n.map((function(r){var n=r.element.node().getBBox(),o=n.width,i=n.height;return r.fx=t._options.pinCentroid&&r.centroid?e.width/2:void 0,r.fy=t._options.pinCentroid&&r.centroid?e.height/2:void 0,r.width=o,r.height=i,r}))).force("link",t._links).force("charge",t._charge).force("center",t._center).force("x",i).force("y",a).alpha(t._options.alpha/2).alphaMin(t._options.alphaMin).alphaDecay(t._options.alphaDecay).velocityDecay(t._options.velocityDecay).stop(),t}))},t.prototype.stop=function(){return this._simulation.stop(),e.prototype.stop.call(this)},t}(P_),V_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){return t._simulation.tick(t._options.iterations),t.stop(),t._graph.moveVertices(!1).moveEdges(!1),t}))},t}(z_),G_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){return new Promise((function(e){t._simulation.on("tick",(function(){t._graph.moveVertices(!1).moveEdges(!1),t._graph.progress("layout-tick")})).on("end",(function(){t._running=!1,e(t)})).restart()}))}))},t}(z_);function H_(e,t){var r=new Blob(['!function(){"use strict";\n/*! *****************************************************************************\n Copyright (c) Microsoft Corporation.\n\n Permission to use, copy, modify, and/or distribute this software for any\n purpose with or without fee is hereby granted.\n\n THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n PERFORMANCE OF THIS SOFTWARE.\n ***************************************************************************** */function r(r,e,t){if(t||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return r.concat(n||Array.prototype.slice.call(e))}function e(r,e){return e.forEach((function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach((function(t){if("default"!==t&&!(t in r)){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}}))})),Object.freeze(r)}var t,n,o,i={exports:{}};t=i,n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,o=function(r){var e,t,o=void 0!==(r=r||{})?r:{};o.ready=new Promise((function(r,n){e=r,t=n}));var i,a,s=Object.assign({},o),u="./this.program",c="";"undefined"!=typeof document&&document.currentScript&&(c=document.currentScript.src),n&&(c=n),c=0!==c.indexOf("blob:")?c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1):"",i=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},a=(r,e,t)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)};var l,d,f=o.print||console.log.bind(console),p=o.printErr||console.warn.bind(console);Object.assign(o,s),s=null,o.arguments,o.thisProgram&&(u=o.thisProgram),o.quit,o.wasmBinary&&(l=o.wasmBinary),o.noExitRuntime,"object"!=typeof WebAssembly&&L("no native wasm support detected");var h=!1;function m(r,e){r||L(e)}var v,w,_,y,E,g,b="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function k(r,e,t){for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.subarray&&b)return b.decode(r.subarray(e,o));for(var i="";e<o;){var a=r[e++];if(128&a){var s=63&r[e++];if(192!=(224&a)){var u=63&r[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&r[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function D(r,e){return r?k(_,r,e):""}function S(r,e,t,n){if(!(n>0))return 0;for(var o=t,i=t+n-1,a=0;a<r.length;++a){var s=r.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&r.charCodeAt(++a)),s<=127){if(t>=i)break;e[t++]=s}else if(s<=2047){if(t+1>=i)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=i)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=i)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o}function A(r){for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++t)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function P(r){v=r,o.HEAP8=w=new Int8Array(r),o.HEAP16=new Int16Array(r),o.HEAP32=y=new Int32Array(r),o.HEAPU8=_=new Uint8Array(r),o.HEAPU16=new Uint16Array(r),o.HEAPU32=new Uint32Array(r),o.HEAPF32=new Float32Array(r),o.HEAPF64=E=new Float64Array(r)}o.INITIAL_MEMORY;var x,F,M,R,C=[],z=[],j=[],T=0,B=null;function N(r){T++,o.monitorRunDependencies&&o.monitorRunDependencies(T)}function O(r){if(T--,o.monitorRunDependencies&&o.monitorRunDependencies(T),0==T&&B){var e=B;B=null,e()}}function L(r){o.onAbort&&o.onAbort(r),p(r="Aborted("+r+")"),h=!0,r+=". Build with -s ASSERTIONS=1 for more info.";var e=new WebAssembly.RuntimeError(r);throw t(e),e}function I(r){return r.startsWith("data:application/octet-stream;base64,")}function U(r){try{if(r==x&&l)return new Uint8Array(l);throw"both async and sync fetching of the wasm failed"}catch(r){L(r)}}o.preloadedImages={},o.preloadedAudios={},I(x="expatlib.wasm")||(F=x,x=o.locateFile?o.locateFile(F,c):c+F);var H={11678:function(r){var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty("startElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::startElement.";e.startElement()},11896:function(r){var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty("endElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::endElement.";e.endElement()},12108:function(r){var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty("characterData"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::characterData.";e.characterData()}};function G(r){for(;r.length>0;){var e=r.shift();if("function"!=typeof e){var t=e.func;"number"==typeof t?void 0===e.arg?q(t)():q(t)(e.arg):t(void 0===e.arg?null:e.arg)}else e(o)}}function q(r){return g.get(r)}var W={splitPath:function(r){return/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/.exec(r).slice(1)},normalizeArray:function(r,e){for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:function(r){var e="/"===r.charAt(0),t="/"===r.substr(-1);return(r=W.normalizeArray(r.split("/").filter((function(r){return!!r})),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:function(r){var e=W.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:function(r){if("/"===r)return"/";var e=(r=(r=W.normalize(r)).replace(/\\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},extname:function(r){return W.splitPath(r)[3]},join:function(){var r=Array.prototype.slice.call(arguments,0);return W.normalize(r.join("/"))},join2:function(r,e){return W.normalize(r+"/"+e)}},V={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:Y.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e="/"===n.charAt(0)}return(e?"/":"")+(r=W.normalizeArray(r.split("/").filter((function(r){return!!r})),!e).join("/"))||"."},relative:function(r,e){function t(r){for(var e=0;e<r.length&&""===r[e];e++);for(var t=r.length-1;t>=0&&""===r[t];t--);return e>t?[]:r.slice(e,t-e+1)}r=V.resolve(r).substr(1),e=V.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(a))).join("/")}},J={ttys:[],init:function(){},shutdown:function(){},register:function(r,e){J.ttys[r]={input:[],output:[],ops:e},Y.registerDevice(r,J.stream_ops)},stream_ops:{open:function(r){var e=J.ttys[r.node.rdev];if(!e)throw new Y.ErrnoError(43);r.tty=e,r.seekable=!1},close:function(r){r.tty.ops.flush(r.tty)},flush:function(r){r.tty.ops.flush(r.tty)},read:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new Y.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(r){throw new Y.ErrnoError(29)}if(void 0===s&&0===i)throw new Y.ErrnoError(6);if(null==s)break;i++,e[t+a]=s}return i&&(r.node.timestamp=Date.now()),i},write:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new Y.ErrnoError(60);try{for(var i=0;i<n;i++)r.tty.ops.put_char(r.tty,e[t+i])}catch(r){throw new Y.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(r){if(!r.input.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\\n"),!e)return null;r.input=or(e,!0)}return r.input.shift()},put_char:function(r,e){null===e||10===e?(f(k(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(f(k(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,e){null===e||10===e?(p(k(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(p(k(r.output,0)),r.output=[])}}},X={ops_table:null,mount:function(r){return X.createNode(null,"/",16895,0)},createNode:function(r,e,t,n){if(Y.isBlkdev(t)||Y.isFIFO(t))throw new Y.ErrnoError(63);X.ops_table||(X.ops_table={dir:{node:{getattr:X.node_ops.getattr,setattr:X.node_ops.setattr,lookup:X.node_ops.lookup,mknod:X.node_ops.mknod,rename:X.node_ops.rename,unlink:X.node_ops.unlink,rmdir:X.node_ops.rmdir,readdir:X.node_ops.readdir,symlink:X.node_ops.symlink},stream:{llseek:X.stream_ops.llseek}},file:{node:{getattr:X.node_ops.getattr,setattr:X.node_ops.setattr},stream:{llseek:X.stream_ops.llseek,read:X.stream_ops.read,write:X.stream_ops.write,allocate:X.stream_ops.allocate,mmap:X.stream_ops.mmap,msync:X.stream_ops.msync}},link:{node:{getattr:X.node_ops.getattr,setattr:X.node_ops.setattr,readlink:X.node_ops.readlink},stream:{}},chrdev:{node:{getattr:X.node_ops.getattr,setattr:X.node_ops.setattr},stream:Y.chrdev_stream_ops}});var o=Y.createNode(r,e,t,n);return Y.isDir(o.mode)?(o.node_ops=X.ops_table.dir.node,o.stream_ops=X.ops_table.dir.stream,o.contents={}):Y.isFile(o.mode)?(o.node_ops=X.ops_table.file.node,o.stream_ops=X.ops_table.file.stream,o.usedBytes=0,o.contents=null):Y.isLink(o.mode)?(o.node_ops=X.ops_table.link.node,o.stream_ops=X.ops_table.link.stream):Y.isChrdev(o.mode)&&(o.node_ops=X.ops_table.chrdev.node,o.stream_ops=X.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){e=Math.max(e,t*(t<1048576?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var n=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr:function(r){var e={};return e.dev=Y.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,Y.isDir(r.mode)?e.size=4096:Y.isFile(r.mode)?e.size=r.usedBytes:Y.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&X.resizeFileStorage(r,e.size)},lookup:function(r,e){throw Y.genericErrors[44]},mknod:function(r,e,t,n){return X.createNode(r,e,t,n)},rename:function(r,e,t){if(Y.isDir(r.mode)){var n;try{n=Y.lookupNode(e,t)}catch(r){}if(n)for(var o in n.contents)throw new Y.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e},unlink:function(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir:function(r,e){var t=Y.lookupNode(r,e);for(var n in t.contents)throw new Y.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir:function(r){var e=[".",".."];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink:function(r,e,t){var n=X.createNode(r,e,41471,0);return n.link=t,n},readlink:function(r){if(!Y.isLink(r.mode))throw new Y.ErrnoError(28);return r.link}},stream_ops:{read:function(r,e,t,n,o){var i=r.node.contents;if(o>=r.node.usedBytes)return 0;var a=Math.min(r.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),t);else for(var s=0;s<a;s++)e[t+s]=i[o+s];return a},write:function(r,e,t,n,o,i){if(e.buffer===w.buffer&&(i=!1),!n)return 0;var a=r.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(t,t+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(t,t+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(t,t+n),o),n}if(X.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[t+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&Y.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new Y.ErrnoError(28);return n},allocate:function(r,e,t){X.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap:function(r,e,t,n,o,i){if(0!==e)throw new Y.ErrnoError(28);if(!Y.isFile(r.node.mode))throw new Y.ErrnoError(43);var a,s,u=r.node.contents;if(2&i||u.buffer!==v){if((n>0||n+t<u.length)&&(u=u.subarray?u.subarray(n,n+t):Array.prototype.slice.call(u,n,n+t)),s=!0,!(a=void L()))throw new Y.ErrnoError(48);w.set(u,a)}else s=!1,a=u.byteOffset;return{ptr:a,allocated:s}},msync:function(r,e,t,n,o){if(!Y.isFile(r.node.mode))throw new Y.ErrnoError(43);return 2&o||X.stream_ops.write(r,e,0,n,t,!1),0}}},Y={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,e={})=>{if(!(r=V.resolve(Y.cwd(),r)))return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};for(var n in t)void 0===e[n]&&(e[n]=t[n]);if(e.recurse_count>8)throw new Y.ErrnoError(32);for(var o=W.normalizeArray(r.split("/").filter((r=>!!r)),!1),i=Y.root,a="/",s=0;s<o.length;s++){var u=s===o.length-1;if(u&&e.parent)break;if(i=Y.lookupNode(i,o[s]),a=W.join2(a,o[s]),Y.isMountpoint(i)&&(!u||u&&e.follow_mount)&&(i=i.mounted.root),!u||e.follow)for(var c=0;Y.isLink(i.mode);){var l=Y.readlink(a);if(a=V.resolve(W.dirname(a),l),i=Y.lookupPath(a,{recurse_count:e.recurse_count}).node,c++>40)throw new Y.ErrnoError(32)}}return{path:a,node:i}},getPath:r=>{for(var e;;){if(Y.isRoot(r)){var t=r.mount.mountpoint;return e?"/"!==t[t.length-1]?t+"/"+e:t+e:t}e=e?r.name+"/"+e:r.name,r=r.parent}},hashName:(r,e)=>{for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%Y.nameTable.length},hashAddNode:r=>{var e=Y.hashName(r.parent.id,r.name);r.name_next=Y.nameTable[e],Y.nameTable[e]=r},hashRemoveNode:r=>{var e=Y.hashName(r.parent.id,r.name);if(Y.nameTable[e]===r)Y.nameTable[e]=r.name_next;else for(var t=Y.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode:(r,e)=>{var t=Y.mayLookup(r);if(t)throw new Y.ErrnoError(t,r);for(var n=Y.hashName(r.id,e),o=Y.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===r.id&&i===e)return o}return Y.lookup(r,e)},createNode:(r,e,t,n)=>{var o=new Y.FSNode(r,e,t,n);return Y.hashAddNode(o),o},destroyNode:r=>{Y.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>49152==(49152&r),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var e=Y.flagModes[r];if(void 0===e)throw new Error("Unknown file open mode: "+r);return e},flagsToPermissionString:r=>{var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>Y.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2,mayLookup:r=>{var e=Y.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate:(r,e)=>{try{return Y.lookupNode(r,e),20}catch(r){}return Y.nodePermissions(r,"wx")},mayDelete:(r,e,t)=>{var n;try{n=Y.lookupNode(r,e)}catch(r){return r.errno}var o=Y.nodePermissions(r,"wx");if(o)return o;if(t){if(!Y.isDir(n.mode))return 54;if(Y.isRoot(n)||Y.getPath(n)===Y.cwd())return 10}else if(Y.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?Y.isLink(r.mode)?32:Y.isDir(r.mode)&&("r"!==Y.flagsToPermissionString(e)||512&e)?31:Y.nodePermissions(r,Y.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,e=Y.MAX_OPEN_FDS)=>{for(var t=r;t<=e;t++)if(!Y.streams[t])return t;throw new Y.ErrnoError(33)},getStream:r=>Y.streams[r],createStream:(r,e,t)=>{Y.FSStream||(Y.FSStream=function(){},Y.FSStream.prototype={object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}}),r=Object.assign(new Y.FSStream,r);var n=Y.nextfd(e,t);return r.fd=n,Y.streams[n]=r,r},closeStream:r=>{Y.streams[r]=null},chrdev_stream_ops:{open:r=>{var e=Y.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new Y.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice:(r,e)=>{Y.devices[r]={stream_ops:e}},getDevice:r=>Y.devices[r],getMounts:r=>{for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs:(r,e)=>{"function"==typeof r&&(e=r,r=!1),Y.syncFSRequests++,Y.syncFSRequests>1&&p("warning: "+Y.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=Y.getMounts(Y.root.mount),n=0;function o(r){return Y.syncFSRequests--,e(r)}function i(r){if(r)return i.errored?void 0:(i.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return i(null);e.type.syncfs(e,r,i)}))},mount:(r,e,t)=>{var n,o="/"===t,i=!t;if(o&&Y.root)throw new Y.ErrnoError(10);if(!o&&!i){var a=Y.lookupPath(t,{follow_mount:!1});if(t=a.path,n=a.node,Y.isMountpoint(n))throw new Y.ErrnoError(10);if(!Y.isDir(n.mode))throw new Y.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?Y.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:r=>{var e=Y.lookupPath(r,{follow_mount:!1});if(!Y.isMountpoint(e.node))throw new Y.ErrnoError(28);var t=e.node,n=t.mounted,o=Y.getMounts(n);Object.keys(Y.nameTable).forEach((r=>{for(var e=Y.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&Y.destroyNode(e),e=t}})),t.mounted=null;var i=t.mount.mounts.indexOf(n);t.mount.mounts.splice(i,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod:(r,e,t)=>{var n=Y.lookupPath(r,{parent:!0}).node,o=W.basename(r);if(!o||"."===o||".."===o)throw new Y.ErrnoError(28);var i=Y.mayCreate(n,o);if(i)throw new Y.ErrnoError(i);if(!n.node_ops.mknod)throw new Y.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},create:(r,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,Y.mknod(r,e,0)),mkdir:(r,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,Y.mknod(r,e,0)),mkdirTree:(r,e)=>{for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{Y.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,e,t)=>(void 0===t&&(t=e,e=438),e|=8192,Y.mknod(r,e,t)),symlink:(r,e)=>{if(!V.resolve(r))throw new Y.ErrnoError(44);var t=Y.lookupPath(e,{parent:!0}).node;if(!t)throw new Y.ErrnoError(44);var n=W.basename(e),o=Y.mayCreate(t,n);if(o)throw new Y.ErrnoError(o);if(!t.node_ops.symlink)throw new Y.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename:(r,e)=>{var t,n,o=W.dirname(r),i=W.dirname(e),a=W.basename(r),s=W.basename(e);if(t=Y.lookupPath(r,{parent:!0}).node,n=Y.lookupPath(e,{parent:!0}).node,!t||!n)throw new Y.ErrnoError(44);if(t.mount!==n.mount)throw new Y.ErrnoError(75);var u,c=Y.lookupNode(t,a),l=V.relative(r,i);if("."!==l.charAt(0))throw new Y.ErrnoError(28);if("."!==(l=V.relative(e,o)).charAt(0))throw new Y.ErrnoError(55);try{u=Y.lookupNode(n,s)}catch(r){}if(c!==u){var d=Y.isDir(c.mode),f=Y.mayDelete(t,a,d);if(f)throw new Y.ErrnoError(f);if(f=u?Y.mayDelete(n,s,d):Y.mayCreate(n,s))throw new Y.ErrnoError(f);if(!t.node_ops.rename)throw new Y.ErrnoError(63);if(Y.isMountpoint(c)||u&&Y.isMountpoint(u))throw new Y.ErrnoError(10);if(n!==t&&(f=Y.nodePermissions(t,"w")))throw new Y.ErrnoError(f);Y.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(r){throw r}finally{Y.hashAddNode(c)}}},rmdir:r=>{var e=Y.lookupPath(r,{parent:!0}).node,t=W.basename(r),n=Y.lookupNode(e,t),o=Y.mayDelete(e,t,!0);if(o)throw new Y.ErrnoError(o);if(!e.node_ops.rmdir)throw new Y.ErrnoError(63);if(Y.isMountpoint(n))throw new Y.ErrnoError(10);e.node_ops.rmdir(e,t),Y.destroyNode(n)},readdir:r=>{var e=Y.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new Y.ErrnoError(54);return e.node_ops.readdir(e)},unlink:r=>{var e=Y.lookupPath(r,{parent:!0}).node;if(!e)throw new Y.ErrnoError(44);var t=W.basename(r),n=Y.lookupNode(e,t),o=Y.mayDelete(e,t,!1);if(o)throw new Y.ErrnoError(o);if(!e.node_ops.unlink)throw new Y.ErrnoError(63);if(Y.isMountpoint(n))throw new Y.ErrnoError(10);e.node_ops.unlink(e,t),Y.destroyNode(n)},readlink:r=>{var e=Y.lookupPath(r).node;if(!e)throw new Y.ErrnoError(44);if(!e.node_ops.readlink)throw new Y.ErrnoError(28);return V.resolve(Y.getPath(e.parent),e.node_ops.readlink(e))},stat:(r,e)=>{var t=Y.lookupPath(r,{follow:!e}).node;if(!t)throw new Y.ErrnoError(44);if(!t.node_ops.getattr)throw new Y.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>Y.stat(r,!0),chmod:(r,e,t)=>{var n;if(!(n="string"==typeof r?Y.lookupPath(r,{follow:!t}).node:r).node_ops.setattr)throw new Y.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,e)=>{Y.chmod(r,e,!0)},fchmod:(r,e)=>{var t=Y.getStream(r);if(!t)throw new Y.ErrnoError(8);Y.chmod(t.node,e)},chown:(r,e,t,n)=>{var o;if(!(o="string"==typeof r?Y.lookupPath(r,{follow:!n}).node:r).node_ops.setattr)throw new Y.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,e,t)=>{Y.chown(r,e,t,!0)},fchown:(r,e,t)=>{var n=Y.getStream(r);if(!n)throw new Y.ErrnoError(8);Y.chown(n.node,e,t)},truncate:(r,e)=>{if(e<0)throw new Y.ErrnoError(28);var t;if(!(t="string"==typeof r?Y.lookupPath(r,{follow:!0}).node:r).node_ops.setattr)throw new Y.ErrnoError(63);if(Y.isDir(t.mode))throw new Y.ErrnoError(31);if(!Y.isFile(t.mode))throw new Y.ErrnoError(28);var n=Y.nodePermissions(t,"w");if(n)throw new Y.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate:(r,e)=>{var t=Y.getStream(r);if(!t)throw new Y.ErrnoError(8);if(0==(2097155&t.flags))throw new Y.ErrnoError(28);Y.truncate(t.node,e)},utime:(r,e,t)=>{var n=Y.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open:(r,e,t,n,i)=>{if(""===r)throw new Y.ErrnoError(44);var a;if(t=void 0===t?438:t,t=64&(e="string"==typeof e?Y.modeStringToFlags(e):e)?4095&t|32768:0,"object"==typeof r)a=r;else{r=W.normalize(r);try{a=Y.lookupPath(r,{follow:!(131072&e)}).node}catch(r){}}var s=!1;if(64&e)if(a){if(128&e)throw new Y.ErrnoError(20)}else a=Y.mknod(r,t,0),s=!0;if(!a)throw new Y.ErrnoError(44);if(Y.isChrdev(a.mode)&&(e&=-513),65536&e&&!Y.isDir(a.mode))throw new Y.ErrnoError(54);if(!s){var u=Y.mayOpen(a,e);if(u)throw new Y.ErrnoError(u)}512&e&&Y.truncate(a,0),e&=-131713;var c=Y.createStream({node:a,path:Y.getPath(a),flags:e,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},n,i);return c.stream_ops.open&&c.stream_ops.open(c),!o.logReadFiles||1&e||(Y.readFiles||(Y.readFiles={}),r in Y.readFiles||(Y.readFiles[r]=1)),c},close:r=>{if(Y.isClosed(r))throw new Y.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{Y.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,e,t)=>{if(Y.isClosed(r))throw new Y.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new Y.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Y.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read:(r,e,t,n,o)=>{if(n<0||o<0)throw new Y.ErrnoError(28);if(Y.isClosed(r))throw new Y.ErrnoError(8);if(1==(2097155&r.flags))throw new Y.ErrnoError(8);if(Y.isDir(r.node.mode))throw new Y.ErrnoError(31);if(!r.stream_ops.read)throw new Y.ErrnoError(28);var i=void 0!==o;if(i){if(!r.seekable)throw new Y.ErrnoError(70)}else o=r.position;var a=r.stream_ops.read(r,e,t,n,o);return i||(r.position+=a),a},write:(r,e,t,n,o,i)=>{if(n<0||o<0)throw new Y.ErrnoError(28);if(Y.isClosed(r))throw new Y.ErrnoError(8);if(0==(2097155&r.flags))throw new Y.ErrnoError(8);if(Y.isDir(r.node.mode))throw new Y.ErrnoError(31);if(!r.stream_ops.write)throw new Y.ErrnoError(28);r.seekable&&1024&r.flags&&Y.llseek(r,0,2);var a=void 0!==o;if(a){if(!r.seekable)throw new Y.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,i);return a||(r.position+=s),s},allocate:(r,e,t)=>{if(Y.isClosed(r))throw new Y.ErrnoError(8);if(e<0||t<=0)throw new Y.ErrnoError(28);if(0==(2097155&r.flags))throw new Y.ErrnoError(8);if(!Y.isFile(r.node.mode)&&!Y.isDir(r.node.mode))throw new Y.ErrnoError(43);if(!r.stream_ops.allocate)throw new Y.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap:(r,e,t,n,o,i)=>{if(0!=(2&o)&&0==(2&i)&&2!=(2097155&r.flags))throw new Y.ErrnoError(2);if(1==(2097155&r.flags))throw new Y.ErrnoError(2);if(!r.stream_ops.mmap)throw new Y.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o,i)},msync:(r,e,t,n,o)=>r&&r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,munmap:r=>0,ioctl:(r,e,t)=>{if(!r.stream_ops.ioctl)throw new Y.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile:(r,e={})=>{if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error(\'Invalid encoding type "\'+e.encoding+\'"\');var t,n=Y.open(r,e.flags),o=Y.stat(r).size,i=new Uint8Array(o);return Y.read(n,i,0,o,0),"utf8"===e.encoding?t=k(i,0):"binary"===e.encoding&&(t=i),Y.close(n),t},writeFile:(r,e,t={})=>{t.flags=t.flags||577;var n=Y.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(A(e)+1),i=S(e,o,0,o.length);Y.write(n,o,0,i,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");Y.write(n,e,0,e.byteLength,void 0,t.canOwn)}Y.close(n)},cwd:()=>Y.currentPath,chdir:r=>{var e=Y.lookupPath(r,{follow:!0});if(null===e.node)throw new Y.ErrnoError(44);if(!Y.isDir(e.node.mode))throw new Y.ErrnoError(54);var t=Y.nodePermissions(e.node,"x");if(t)throw new Y.ErrnoError(t);Y.currentPath=e.path},createDefaultDirectories:()=>{Y.mkdir("/tmp"),Y.mkdir("/home"),Y.mkdir("/home/web_user")},createDefaultDevices:()=>{Y.mkdir("/dev"),Y.registerDevice(Y.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n}),Y.mkdev("/dev/null",Y.makedev(1,3)),J.register(Y.makedev(5,0),J.default_tty_ops),J.register(Y.makedev(6,0),J.default_tty1_ops),Y.mkdev("/dev/tty",Y.makedev(5,0)),Y.mkdev("/dev/tty1",Y.makedev(6,0));var r=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return function(){return crypto.getRandomValues(r),r[0]}}return function(){L("randomDevice")}}();Y.createDevice("/dev","random",r),Y.createDevice("/dev","urandom",r),Y.mkdir("/dev/shm"),Y.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{Y.mkdir("/proc");var r=Y.mkdir("/proc/self");Y.mkdir("/proc/self/fd"),Y.mount({mount:()=>{var e=Y.createNode(r,"fd",16895,73);return e.node_ops={lookup:(r,e)=>{var t=+e,n=Y.getStream(t);if(!n)throw new Y.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:()=>{o.stdin?Y.createDevice("/dev","stdin",o.stdin):Y.symlink("/dev/tty","/dev/stdin"),o.stdout?Y.createDevice("/dev","stdout",null,o.stdout):Y.symlink("/dev/tty","/dev/stdout"),o.stderr?Y.createDevice("/dev","stderr",null,o.stderr):Y.symlink("/dev/tty1","/dev/stderr"),Y.open("/dev/stdin",0),Y.open("/dev/stdout",1),Y.open("/dev/stderr",1)},ensureErrnoError:()=>{Y.ErrnoError||(Y.ErrnoError=function(r,e){this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},Y.ErrnoError.prototype=new Error,Y.ErrnoError.prototype.constructor=Y.ErrnoError,[44].forEach((r=>{Y.genericErrors[r]=new Y.ErrnoError(r),Y.genericErrors[r].stack="<generic error, no stack>"})))},staticInit:()=>{Y.ensureErrnoError(),Y.nameTable=new Array(4096),Y.mount(X,{},"/"),Y.createDefaultDirectories(),Y.createDefaultDevices(),Y.createSpecialDirectories(),Y.filesystems={MEMFS:X}},init:(r,e,t)=>{Y.init.initialized=!0,Y.ensureErrnoError(),o.stdin=r||o.stdin,o.stdout=e||o.stdout,o.stderr=t||o.stderr,Y.createStandardStreams()},quit:()=>{Y.init.initialized=!1;for(var r=0;r<Y.streams.length;r++){var e=Y.streams[r];e&&Y.close(e)}},getMode:(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},findObject:(r,e)=>{var t=Y.analyzePath(r,e);return t.exists?t.object:null},analyzePath:(r,e)=>{try{r=(n=Y.lookupPath(r,{follow:!e})).path}catch(r){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=Y.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=W.basename(r),n=Y.lookupPath(r,{follow:!e}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(r){t.error=r.errno}return t},createPath:(r,e,t,n)=>{r="string"==typeof r?r:Y.getPath(r);for(var o=e.split("/").reverse();o.length;){var i=o.pop();if(i){var a=W.join2(r,i);try{Y.mkdir(a)}catch(r){}r=a}}return a},createFile:(r,e,t,n,o)=>{var i=W.join2("string"==typeof r?r:Y.getPath(r),e),a=Y.getMode(n,o);return Y.create(i,a)},createDataFile:(r,e,t,n,o,i)=>{var a=e;r&&(r="string"==typeof r?r:Y.getPath(r),a=e?W.join2(r,e):r);var s=Y.getMode(n,o),u=Y.create(a,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),l=0,d=t.length;l<d;++l)c[l]=t.charCodeAt(l);t=c}Y.chmod(u,146|s);var f=Y.open(u,577);Y.write(f,t,0,t.length,0,i),Y.close(f),Y.chmod(u,s)}return u},createDevice:(r,e,t,n)=>{var o=W.join2("string"==typeof r?r:Y.getPath(r),e),i=Y.getMode(!!t,!!n);Y.createDevice.major||(Y.createDevice.major=64);var a=Y.makedev(Y.createDevice.major++,0);return Y.registerDevice(a,{open:r=>{r.seekable=!1},close:r=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(r,e,n,o,i)=>{for(var a=0,s=0;s<o;s++){var u;try{u=t()}catch(r){throw new Y.ErrnoError(29)}if(void 0===u&&0===a)throw new Y.ErrnoError(6);if(null==u)break;a++,e[n+s]=u}return a&&(r.node.timestamp=Date.now()),a},write:(r,e,t,o,i)=>{for(var a=0;a<o;a++)try{n(e[t+a])}catch(r){throw new Y.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),a}}),Y.mkdev(o,i,a)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!i)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=or(i(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new Y.ErrnoError(29)}},createLazyFile:(r,e,t,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}},i.prototype.setDataGetter=function(r){this.getter=r},i.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn\'t load "+t+". Status: "+r.status);var e,n=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,i=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;o||(a=n);var s=this;s.setDataGetter((r=>{var e=r*a,o=(r+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=((r,e)=>{if(r>e)throw new Error("invalid range ("+r+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==a&&o.setRequestHeader("Range","bytes="+r+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn\'t load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):or(o.responseText||"",!0)})(e,o)),void 0===s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,f("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a={isDevice:!1,url:t},s=Y.createFile(r,e,a,n,o);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(s.stream_ops).forEach((r=>{var e=s.stream_ops[r];u[r]=function(){return Y.forceLoadFile(s),e.apply(null,arguments)}})),u.read=(r,e,t,n,o)=>{Y.forceLoadFile(s);var i=r.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var u=0;u<a;u++)e[t+u]=i[o+u];else for(u=0;u<a;u++)e[t+u]=i.get(o+u);return a},s.stream_ops=u,s},createPreloadedFile:(r,e,t,n,o,i,s,u,c,l)=>{var d=e?V.resolve(W.join2(r,e)):r;function f(t){function a(t){l&&l(),u||Y.createDataFile(r,e,t,n,o,c),i&&i(),O()}Browser.handledByPreloadPlugin(t,d,a,(()=>{s&&s(),O()}))||a(t)}N(),"string"==typeof t?function(r,e,t,n){var o=n?"":"al "+r;a(r,(function(t){m(t,\'Loading data file "\'+r+\'" failed (no arrayBuffer).\'),e(new Uint8Array(t)),o&&O()}),(function(e){if(!t)throw\'Loading data file "\'+r+\'" failed.\';t()})),o&&N()}(t,(r=>f(r)),s):f(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=Y.indexedDB();try{var o=n.open(Y.DB_NAME(),Y.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=()=>{f("creating db"),o.result.createObjectStore(Y.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([Y.DB_STORE_NAME],"readwrite"),i=n.objectStore(Y.DB_STORE_NAME),a=0,s=0,u=r.length;function c(){0==s?e():t()}r.forEach((r=>{var e=i.put(Y.analyzePath(r).object.contents,r);e.onsuccess=()=>{++a+s==u&&c()},e.onerror=()=>{s++,a+s==u&&c()}})),n.onerror=t},o.onerror=t},loadFilesFromDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=Y.indexedDB();try{var o=n.open(Y.DB_NAME(),Y.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([Y.DB_STORE_NAME],"readonly")}catch(r){return void t(r)}var a=i.objectStore(Y.DB_STORE_NAME),s=0,u=0,c=r.length;function l(){0==u?e():t()}r.forEach((r=>{var e=a.get(r);e.onsuccess=()=>{Y.analyzePath(r).exists&&Y.unlink(r),Y.createDataFile(W.dirname(r),W.basename(r),e.result,!0,!0,!0),++s+u==c&&l()},e.onerror=()=>{u++,s+u==c&&l()}})),i.onerror=t},o.onerror=t}},K={DEFAULT_POLLMASK:5,calculateAt:function(r,e,t){if("/"===e[0])return e;var n;if(-100===r)n=Y.cwd();else{var o=Y.getStream(r);if(!o)throw new Y.ErrnoError(8);n=o.path}if(0==e.length){if(!t)throw new Y.ErrnoError(44);return n}return W.join2(n,e)},doStat:function(r,e,t){try{var n=r(e)}catch(r){if(r&&r.node&&W.normalize(e)!==W.normalize(Y.getPath(r.node)))return-54;throw r}return y[t>>2]=n.dev,y[t+4>>2]=0,y[t+8>>2]=n.ino,y[t+12>>2]=n.mode,y[t+16>>2]=n.nlink,y[t+20>>2]=n.uid,y[t+24>>2]=n.gid,y[t+28>>2]=n.rdev,y[t+32>>2]=0,R=[n.size>>>0,(M=n.size,+Math.abs(M)>=1?M>0?(0|Math.min(+Math.floor(M/4294967296),4294967295))>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],y[t+40>>2]=R[0],y[t+44>>2]=R[1],y[t+48>>2]=4096,y[t+52>>2]=n.blocks,y[t+56>>2]=n.atime.getTime()/1e3|0,y[t+60>>2]=0,y[t+64>>2]=n.mtime.getTime()/1e3|0,y[t+68>>2]=0,y[t+72>>2]=n.ctime.getTime()/1e3|0,y[t+76>>2]=0,R=[n.ino>>>0,(M=n.ino,+Math.abs(M)>=1?M>0?(0|Math.min(+Math.floor(M/4294967296),4294967295))>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],y[t+80>>2]=R[0],y[t+84>>2]=R[1],0},doMsync:function(r,e,t,n,o){var i=_.slice(r,r+t);Y.msync(e,i,o,t,n)},doMkdir:function(r,e){return"/"===(r=W.normalize(r))[r.length-1]&&(r=r.substr(0,r.length-1)),Y.mkdir(r,e,0),0},doMknod:function(r,e,t){switch(61440&e){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return Y.mknod(r,e,t),0},doReadlink:function(r,e,t){if(t<=0)return-28;var n=Y.readlink(r),o=Math.min(t,A(n)),i=w[e+o];return S(n,_,e,t+1),w[e+o]=i,o},doAccess:function(r,e){if(-8&e)return-28;var t=Y.lookupPath(r,{follow:!0}).node;if(!t)return-44;var n="";return 4&e&&(n+="r"),2&e&&(n+="w"),1&e&&(n+="x"),n&&Y.nodePermissions(t,n)?-2:0},doDup:function(r,e,t){var n=Y.getStream(t);return n&&Y.close(n),Y.open(r,e,0,t,t).fd},doReadv:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=y[e+8*i>>2],s=y[e+(8*i+4)>>2],u=Y.read(r,w,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o},doWritev:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=y[e+8*i>>2],s=y[e+(8*i+4)>>2],u=Y.write(r,w,a,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return K.varargs+=4,y[K.varargs-4>>2]},getStr:function(r){return D(r)},getStreamFromFD:function(r){var e=Y.getStream(r);if(!e)throw new Y.ErrnoError(8);return e},get64:function(r,e){return r}},$=[];function Q(r){try{return d.grow(r-v.byteLength+65535>>>16),P(d.buffer),1}catch(r){}}var Z={};function rr(){if(!rr.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:u||"./this.program"};for(var e in Z)void 0===Z[e]?delete r[e]:r[e]=Z[e];var t=[];for(var e in r)t.push(e+"="+r[e]);rr.strings=t}return rr.strings}var er=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=Y.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},tr=365,nr=146;function or(r,e,t){var n=t>0?t:A(r)+1,o=new Array(n),i=S(r,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(er.prototype,{read:{get:function(){return(this.mode&tr)===tr},set:function(r){r?this.mode|=tr:this.mode&=-366}},write:{get:function(){return(this.mode&nr)===nr},set:function(r){r?this.mode|=nr:this.mode&=-147}},isFolder:{get:function(){return Y.isDir(this.mode)}},isDevice:{get:function(){return Y.isChrdev(this.mode)}}}),Y.FSNode=er,Y.staticInit();var ir={g:function(r,e,t){K.varargs=t;try{var n=K.getStr(r),o=t?K.get():0;return Y.open(n,e,o).fd}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return-r.errno}},d:function(){L("")},a:function(r,e,t){var n=function(r,e){var t;for($.length=0,e>>=2;t=_[r++];){var n=t<105;n&&1&e&&e++,$.push(n?E[e++>>1]:y[e]),++e}return $}(e,t);return H[r].apply(null,n)},j:function(r,e,t){_.copyWithin(r,e,e+t)},e:function(r){var e,t,n=_.length,o=2147483648;if((r>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,r+100663296),Q(Math.min(o,(e=Math.max(r,a))+((t=65536)-e%t)%t)))return!0}return!1},h:function(r,e){var t=0;return rr().forEach((function(n,o){var i=e+t;y[r+4*o>>2]=i,function(r,e,t){for(var n=0;n<r.length;++n)w[e++>>0]=r.charCodeAt(n);t||(w[e>>0]=0)}(n,i),t+=n.length+1})),0},i:function(r,e){var t=rr();y[r>>2]=t.length;var n=0;return t.forEach((function(r){n+=r.length+1})),y[e>>2]=n,0},c:function(r){try{var e=K.getStreamFromFD(r);return Y.close(e),0}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return r.errno}},f:function(r,e,t,n){try{var o=K.getStreamFromFD(r),i=K.doReadv(o,e,t);return y[n>>2]=i,0}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return r.errno}},k:function(r,e,t,n,o){try{var i=K.getStreamFromFD(r),a=4294967296*t+(e>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(Y.llseek(i,a,n),R=[i.position>>>0,(M=i.position,+Math.abs(M)>=1?M>0?(0|Math.min(+Math.floor(M/4294967296),4294967295))>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],y[o>>2]=R[0],y[o+4>>2]=R[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return r.errno}},b:function(r,e,t,n){try{var o=K.getStreamFromFD(r),i=K.doWritev(o,e,t);return y[n>>2]=i,0}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return r.errno}},l:function(r){var e=Date.now();return y[r>>2]=e/1e3|0,y[r+4>>2]=e%1e3*1e3|0,0}};!function(){var r={a:ir};function e(r,e){var t,n=r.exports;o.asm=n,P((d=o.asm.m).buffer),g=o.asm.G,t=o.asm.n,z.unshift(t),O()}function n(r){e(r.instance)}function i(e){return(l||"function"!=typeof fetch?Promise.resolve().then((function(){return U(x)})):fetch(x,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at \'"+x+"\'";return r.arrayBuffer()})).catch((function(){return U(x)}))).then((function(e){return WebAssembly.instantiate(e,r)})).then((function(r){return r})).then(e,(function(r){p("failed to asynchronously prepare wasm: "+r),L(r)}))}if(N(),o.instantiateWasm)try{return o.instantiateWasm(r,e)}catch(r){return p("Module.instantiateWasm callback failed with error: "+r),!1}(l||"function"!=typeof WebAssembly.instantiateStreaming||I(x)||"function"!=typeof fetch?i(n):fetch(x,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(n,(function(r){return p("wasm streaming compile failed: "+r),p("falling back to ArrayBuffer instantiation"),i(n)}))}))).catch(t)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.n).apply(null,arguments)};var ar,sr=o._emscripten_bind_CExpat_CExpat_0=function(){return(sr=o._emscripten_bind_CExpat_CExpat_0=o.asm.o).apply(null,arguments)},ur=o._emscripten_bind_CExpat_version_0=function(){return(ur=o._emscripten_bind_CExpat_version_0=o.asm.p).apply(null,arguments)},cr=o._emscripten_bind_CExpat_create_0=function(){return(cr=o._emscripten_bind_CExpat_create_0=o.asm.q).apply(null,arguments)},lr=o._emscripten_bind_CExpat_destroy_0=function(){return(lr=o._emscripten_bind_CExpat_destroy_0=o.asm.r).apply(null,arguments)},dr=o._emscripten_bind_CExpat_parse_1=function(){return(dr=o._emscripten_bind_CExpat_parse_1=o.asm.s).apply(null,arguments)},fr=o._emscripten_bind_CExpat_tag_0=function(){return(fr=o._emscripten_bind_CExpat_tag_0=o.asm.t).apply(null,arguments)},pr=o._emscripten_bind_CExpat_attrs_0=function(){return(pr=o._emscripten_bind_CExpat_attrs_0=o.asm.u).apply(null,arguments)},hr=o._emscripten_bind_CExpat_content_0=function(){return(hr=o._emscripten_bind_CExpat_content_0=o.asm.v).apply(null,arguments)},mr=o._emscripten_bind_CExpat_startElement_0=function(){return(mr=o._emscripten_bind_CExpat_startElement_0=o.asm.w).apply(null,arguments)},vr=o._emscripten_bind_CExpat_endElement_0=function(){return(vr=o._emscripten_bind_CExpat_endElement_0=o.asm.x).apply(null,arguments)},wr=o._emscripten_bind_CExpat_characterData_0=function(){return(wr=o._emscripten_bind_CExpat_characterData_0=o.asm.y).apply(null,arguments)},_r=o._emscripten_bind_CExpat___destroy___0=function(){return(_r=o._emscripten_bind_CExpat___destroy___0=o.asm.z).apply(null,arguments)},yr=o._emscripten_bind_VoidPtr___destroy___0=function(){return(yr=o._emscripten_bind_VoidPtr___destroy___0=o.asm.A).apply(null,arguments)},Er=o._emscripten_bind_CExpatJS_CExpatJS_0=function(){return(Er=o._emscripten_bind_CExpatJS_CExpatJS_0=o.asm.B).apply(null,arguments)},gr=o._emscripten_bind_CExpatJS_startElement_0=function(){return(gr=o._emscripten_bind_CExpatJS_startElement_0=o.asm.C).apply(null,arguments)},br=o._emscripten_bind_CExpatJS_endElement_0=function(){return(br=o._emscripten_bind_CExpatJS_endElement_0=o.asm.D).apply(null,arguments)},kr=o._emscripten_bind_CExpatJS_characterData_0=function(){return(kr=o._emscripten_bind_CExpatJS_characterData_0=o.asm.E).apply(null,arguments)},Dr=o._emscripten_bind_CExpatJS___destroy___0=function(){return(Dr=o._emscripten_bind_CExpatJS___destroy___0=o.asm.F).apply(null,arguments)};function Sr(r){function t(){ar||(ar=!0,o.calledRun=!0,h||(o.noFSInit||Y.init.initialized||Y.init(),Y.ignorePermissions=!1,G(z),e(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)r=o.postRun.shift(),j.unshift(r);var r;G(j)}()))}T>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),C.unshift(r);var r;G(C)}(),T>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),t()}),1)):t()))}if(o._malloc=function(){return(o._malloc=o.asm.H).apply(null,arguments)},B=function r(){ar||Sr(),ar||(B=r)},o.run=Sr,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function Ar(){}function Pr(r){return(r||Ar).__cache__}function xr(r,e){var t=Pr(e),n=t[r];return n||((n=Object.create((e||Ar).prototype)).ptr=r,t[r]=n)}Sr(),Ar.prototype=Object.create(Ar.prototype),Ar.prototype.constructor=Ar,Ar.prototype.__class__=Ar,Ar.__cache__={},o.WrapperObject=Ar,o.getCache=Pr,o.wrapPointer=xr,o.castObject=function(r,e){return xr(r.ptr,e)},o.NULL=xr(0),o.destroy=function(r){if(!r.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";r.__destroy__(),delete Pr(r.__class__)[r.ptr]},o.compare=function(r,e){return r.ptr===e.ptr},o.getPointer=function(r){return r.ptr},o.getClass=function(r){return r.__class__};var Fr={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(Fr.needed){for(var r=0;r<Fr.temps.length;r++)o._free(Fr.temps[r]);Fr.temps.length=0,o._free(Fr.buffer),Fr.buffer=0,Fr.size+=Fr.needed,Fr.needed=0}Fr.buffer||(Fr.size+=128,Fr.buffer=o._malloc(Fr.size),m(Fr.buffer)),Fr.pos=0},alloc:function(r,e){m(Fr.buffer);var t,n=e.BYTES_PER_ELEMENT,i=r.length*n;return i=i+7&-8,Fr.pos+i>=Fr.size?(m(i>0),Fr.needed+=i,t=o._malloc(i),Fr.temps.push(t)):(t=Fr.buffer+Fr.pos,Fr.pos+=i),t},copy:function(r,e,t){switch(t>>>=0,e.BYTES_PER_ELEMENT){case 2:t>>>=1;break;case 4:t>>>=2;break;case 8:t>>>=3}for(var n=0;n<r.length;n++)e[t+n]=r[n]}};function Mr(){this.ptr=sr(),Pr(Mr)[this.ptr]=this}function Rr(){throw"cannot construct a VoidPtr, no constructor in IDL"}function Cr(){this.ptr=Er(),Pr(Cr)[this.ptr]=this}return Mr.prototype=Object.create(Ar.prototype),Mr.prototype.constructor=Mr,Mr.prototype.__class__=Mr,Mr.__cache__={},o.CExpat=Mr,Mr.prototype.version=Mr.prototype.version=function(){var r=this.ptr;return D(ur(r))},Mr.prototype.create=Mr.prototype.create=function(){var r=this.ptr;return!!cr(r)},Mr.prototype.destroy=Mr.prototype.destroy=function(){var r=this.ptr;lr(r)},Mr.prototype.parse=Mr.prototype.parse=function(r){var e=this.ptr;return Fr.prepare(),r=r&&"object"==typeof r?r.ptr:function(r){if("string"==typeof r){var e=or(r),t=Fr.alloc(e,w);return Fr.copy(e,w,t),t}return r}(r),!!dr(e,r)},Mr.prototype.tag=Mr.prototype.tag=function(){var r=this.ptr;return D(fr(r))},Mr.prototype.attrs=Mr.prototype.attrs=function(){var r=this.ptr;return D(pr(r))},Mr.prototype.content=Mr.prototype.content=function(){var r=this.ptr;return D(hr(r))},Mr.prototype.startElement=Mr.prototype.startElement=function(){var r=this.ptr;mr(r)},Mr.prototype.endElement=Mr.prototype.endElement=function(){var r=this.ptr;vr(r)},Mr.prototype.characterData=Mr.prototype.characterData=function(){var r=this.ptr;wr(r)},Mr.prototype.__destroy__=Mr.prototype.__destroy__=function(){var r=this.ptr;_r(r)},Rr.prototype=Object.create(Ar.prototype),Rr.prototype.constructor=Rr,Rr.prototype.__class__=Rr,Rr.__cache__={},o.VoidPtr=Rr,Rr.prototype.__destroy__=Rr.prototype.__destroy__=function(){var r=this.ptr;yr(r)},Cr.prototype=Object.create(Mr.prototype),Cr.prototype.constructor=Cr,Cr.prototype.__class__=Cr,Cr.__cache__={},o.CExpatJS=Cr,Cr.prototype.startElement=Cr.prototype.startElement=function(){var r=this.ptr;gr(r)},Cr.prototype.endElement=Cr.prototype.endElement=function(){var r=this.ptr;br(r)},Cr.prototype.characterData=Cr.prototype.characterData=function(){var r=this.ptr;kr(r)},Cr.prototype.__destroy__=Cr.prototype.__destroy__=function(){var r=this.ptr;Dr(r)},r.ready},t.exports=o;let a=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}().__hpcc_wasmFolder||void 0;function s(r,e,t){const n=r.default||r;return n.__hpcc_promise||(n.__hpcc_promise=n({wasmBinary:t,locateFile:(r,t)=>`${function(r,e){for(;r.charAt(r.length-1)===e;)r=r.substring(0,r.length-1);return r}(e||function(r){if(!arguments.length)return a;const e=a;return a=r,e}()||t||".","/")}/${function(r,e){for(;r.charAt(0)===e;)r=r.substring(1);return r}(r,"/")}`})),n.__hpcc_promise}var u={exports:{}};!function(r,e){var t=(()=>{var r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return function(e){var t,n,o=void 0!==(e=e||{})?e:{};o.ready=new Promise((function(r,e){t=r,n=e}));var i,a,s=Object.assign({},o),u="./this.program",c=(r,e)=>{throw e},l="";"undefined"!=typeof document&&document.currentScript&&(l=document.currentScript.src),r&&(l=r),l=0!==l.indexOf("blob:")?l.substr(0,l.replace(/[?#].*/,"").lastIndexOf("/")+1):"",i=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},a=(r,e,t)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)};var d=o.print||console.log.bind(console),f=o.printErr||console.warn.bind(console);Object.assign(o,s),s=null,o.arguments,o.thisProgram&&(u=o.thisProgram),o.quit&&(c=o.quit);var p,h=0;o.wasmBinary&&(p=o.wasmBinary);var m,v=o.noExitRuntime||!0;"object"!=typeof WebAssembly&&L("no native wasm support detected");var w=!1;function _(r,e){r||L(e)}var y,E,g,b,k,D,S,A="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function P(r,e,t){for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.subarray&&A)return A.decode(r.subarray(e,o));for(var i="";e<o;){var a=r[e++];if(128&a){var s=63&r[e++];if(192!=(224&a)){var u=63&r[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&r[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function x(r,e){return r?P(g,r,e):""}function F(r,e,t,n){if(!(n>0))return 0;for(var o=t,i=t+n-1,a=0;a<r.length;++a){var s=r.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&r.charCodeAt(++a);if(s<=127){if(t>=i)break;e[t++]=s}else if(s<=2047){if(t+1>=i)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=i)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=i)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o}function M(r){for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++t)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function R(r){y=r,o.HEAP8=E=new Int8Array(r),o.HEAP16=b=new Int16Array(r),o.HEAP32=k=new Int32Array(r),o.HEAPU8=g=new Uint8Array(r),o.HEAPU16=new Uint16Array(r),o.HEAPU32=new Uint32Array(r),o.HEAPF32=new Float32Array(r),o.HEAPF64=D=new Float64Array(r)}o.INITIAL_MEMORY;var C=[],z=[],j=[];var T=0,B=null;function N(r){T++,o.monitorRunDependencies&&o.monitorRunDependencies(T)}function O(r){if(T--,o.monitorRunDependencies&&o.monitorRunDependencies(T),0==T&&B){var e=B;B=null,e()}}function L(r){o.onAbort&&o.onAbort(r),f(r="Aborted("+r+")"),w=!0,r+=". Build with -s ASSERTIONS=1 for more info.";var e=new WebAssembly.RuntimeError(r);throw n(e),e}o.preloadedImages={},o.preloadedAudios={};var I,U,H,G;function q(r){return r.startsWith("data:application/octet-stream;base64,")}function W(r){try{if(r==I&&p)return new Uint8Array(p);throw"both async and sync fetching of the wasm failed"}catch(r){L(r)}}q(I="graphvizlib.wasm")||(U=I,I=o.locateFile?o.locateFile(U,l):l+U);var V,J={161520:function(r,e){var t=x(r),n=x(e);tr.createPath("/",$.dirname(t)),tr.writeFile($.join("/",t),n)}};function X(r){for(;r.length>0;){var e=r.shift();if("function"!=typeof e){var t=e.func;"number"==typeof t?void 0===e.arg?Y(t)():Y(t)(e.arg):t(void 0===e.arg?null:e.arg)}else e(o)}}function Y(r){return S.get(r)}V=()=>performance.now();function K(r){return k[gr()>>2]=r,r}var $={splitPath:function(r){return/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/.exec(r).slice(1)},normalizeArray:function(r,e){for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:function(r){var e="/"===r.charAt(0),t="/"===r.substr(-1);return(r=$.normalizeArray(r.split("/").filter((function(r){return!!r})),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:function(r){var e=$.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:function(r){if("/"===r)return"/";var e=(r=(r=$.normalize(r)).replace(/\\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},extname:function(r){return $.splitPath(r)[3]},join:function(){var r=Array.prototype.slice.call(arguments,0);return $.normalize(r.join("/"))},join2:function(r,e){return $.normalize(r+"/"+e)}};var Q={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:tr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e="/"===n.charAt(0)}return(e?"/":"")+(r=$.normalizeArray(r.split("/").filter((function(r){return!!r})),!e).join("/"))||"."},relative:function(r,e){function t(r){for(var e=0;e<r.length&&""===r[e];e++);for(var t=r.length-1;t>=0&&""===r[t];t--);return e>t?[]:r.slice(e,t-e+1)}r=Q.resolve(r).substr(1),e=Q.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(a))).join("/")}},Z={ttys:[],init:function(){},shutdown:function(){},register:function(r,e){Z.ttys[r]={input:[],output:[],ops:e},tr.registerDevice(r,Z.stream_ops)},stream_ops:{open:function(r){var e=Z.ttys[r.node.rdev];if(!e)throw new tr.ErrnoError(43);r.tty=e,r.seekable=!1},close:function(r){r.tty.ops.flush(r.tty)},flush:function(r){r.tty.ops.flush(r.tty)},read:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new tr.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(r){throw new tr.ErrnoError(29)}if(void 0===s&&0===i)throw new tr.ErrnoError(6);if(null==s)break;i++,e[t+a]=s}return i&&(r.node.timestamp=Date.now()),i},write:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new tr.ErrnoError(60);try{for(var i=0;i<n;i++)r.tty.ops.put_char(r.tty,e[t+i])}catch(r){throw new tr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(r){if(!r.input.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\\n"),!e)return null;r.input=dr(e,!0)}return r.input.shift()},put_char:function(r,e){null===e||10===e?(d(P(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(d(P(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,e){null===e||10===e?(f(P(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(f(P(r.output,0)),r.output=[])}}};function rr(r){r=function(r,e){return Math.ceil(r/e)*e}(r,65536);var e=br(65536,r);return e?(function(r,e){g.fill(0,r,r+e)}(e,r),e):0}var er={ops_table:null,mount:function(r){return er.createNode(null,"/",16895,0)},createNode:function(r,e,t,n){if(tr.isBlkdev(t)||tr.isFIFO(t))throw new tr.ErrnoError(63);er.ops_table||(er.ops_table={dir:{node:{getattr:er.node_ops.getattr,setattr:er.node_ops.setattr,lookup:er.node_ops.lookup,mknod:er.node_ops.mknod,rename:er.node_ops.rename,unlink:er.node_ops.unlink,rmdir:er.node_ops.rmdir,readdir:er.node_ops.readdir,symlink:er.node_ops.symlink},stream:{llseek:er.stream_ops.llseek}},file:{node:{getattr:er.node_ops.getattr,setattr:er.node_ops.setattr},stream:{llseek:er.stream_ops.llseek,read:er.stream_ops.read,write:er.stream_ops.write,allocate:er.stream_ops.allocate,mmap:er.stream_ops.mmap,msync:er.stream_ops.msync}},link:{node:{getattr:er.node_ops.getattr,setattr:er.node_ops.setattr,readlink:er.node_ops.readlink},stream:{}},chrdev:{node:{getattr:er.node_ops.getattr,setattr:er.node_ops.setattr},stream:tr.chrdev_stream_ops}});var o=tr.createNode(r,e,t,n);return tr.isDir(o.mode)?(o.node_ops=er.ops_table.dir.node,o.stream_ops=er.ops_table.dir.stream,o.contents={}):tr.isFile(o.mode)?(o.node_ops=er.ops_table.file.node,o.stream_ops=er.ops_table.file.stream,o.usedBytes=0,o.contents=null):tr.isLink(o.mode)?(o.node_ops=er.ops_table.link.node,o.stream_ops=er.ops_table.link.stream):tr.isChrdev(o.mode)&&(o.node_ops=er.ops_table.chrdev.node,o.stream_ops=er.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){e=Math.max(e,t*(t<1048576?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var n=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr:function(r){var e={};return e.dev=tr.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,tr.isDir(r.mode)?e.size=4096:tr.isFile(r.mode)?e.size=r.usedBytes:tr.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&er.resizeFileStorage(r,e.size)},lookup:function(r,e){throw tr.genericErrors[44]},mknod:function(r,e,t,n){return er.createNode(r,e,t,n)},rename:function(r,e,t){if(tr.isDir(r.mode)){var n;try{n=tr.lookupNode(e,t)}catch(r){}if(n)for(var o in n.contents)throw new tr.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e},unlink:function(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir:function(r,e){var t=tr.lookupNode(r,e);for(var n in t.contents)throw new tr.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir:function(r){var e=[".",".."];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink:function(r,e,t){var n=er.createNode(r,e,41471,0);return n.link=t,n},readlink:function(r){if(!tr.isLink(r.mode))throw new tr.ErrnoError(28);return r.link}},stream_ops:{read:function(r,e,t,n,o){var i=r.node.contents;if(o>=r.node.usedBytes)return 0;var a=Math.min(r.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),t);else for(var s=0;s<a;s++)e[t+s]=i[o+s];return a},write:function(r,e,t,n,o,i){if(e.buffer===E.buffer&&(i=!1),!n)return 0;var a=r.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(t,t+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(t,t+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(t,t+n),o),n}if(er.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[t+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&tr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new tr.ErrnoError(28);return n},allocate:function(r,e,t){er.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap:function(r,e,t,n,o,i){if(0!==e)throw new tr.ErrnoError(28);if(!tr.isFile(r.node.mode))throw new tr.ErrnoError(43);var a,s,u=r.node.contents;if(2&i||u.buffer!==y){if((n>0||n+t<u.length)&&(u=u.subarray?u.subarray(n,n+t):Array.prototype.slice.call(u,n,n+t)),s=!0,!(a=rr(t)))throw new tr.ErrnoError(48);E.set(u,a)}else s=!1,a=u.byteOffset;return{ptr:a,allocated:s}},msync:function(r,e,t,n,o){if(!tr.isFile(r.node.mode))throw new tr.ErrnoError(43);return 2&o||er.stream_ops.write(r,e,0,n,t,!1),0}}};var tr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,e={})=>{if(!(r=Q.resolve(tr.cwd(),r)))return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};for(var n in t)void 0===e[n]&&(e[n]=t[n]);if(e.recurse_count>8)throw new tr.ErrnoError(32);for(var o=$.normalizeArray(r.split("/").filter((r=>!!r)),!1),i=tr.root,a="/",s=0;s<o.length;s++){var u=s===o.length-1;if(u&&e.parent)break;if(i=tr.lookupNode(i,o[s]),a=$.join2(a,o[s]),tr.isMountpoint(i)&&(!u||u&&e.follow_mount)&&(i=i.mounted.root),!u||e.follow)for(var c=0;tr.isLink(i.mode);){var l=tr.readlink(a);if(a=Q.resolve($.dirname(a),l),i=tr.lookupPath(a,{recurse_count:e.recurse_count}).node,c++>40)throw new tr.ErrnoError(32)}}return{path:a,node:i}},getPath:r=>{for(var e;;){if(tr.isRoot(r)){var t=r.mount.mountpoint;return e?"/"!==t[t.length-1]?t+"/"+e:t+e:t}e=e?r.name+"/"+e:r.name,r=r.parent}},hashName:(r,e)=>{for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%tr.nameTable.length},hashAddNode:r=>{var e=tr.hashName(r.parent.id,r.name);r.name_next=tr.nameTable[e],tr.nameTable[e]=r},hashRemoveNode:r=>{var e=tr.hashName(r.parent.id,r.name);if(tr.nameTable[e]===r)tr.nameTable[e]=r.name_next;else for(var t=tr.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode:(r,e)=>{var t=tr.mayLookup(r);if(t)throw new tr.ErrnoError(t,r);for(var n=tr.hashName(r.id,e),o=tr.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===r.id&&i===e)return o}return tr.lookup(r,e)},createNode:(r,e,t,n)=>{var o=new tr.FSNode(r,e,t,n);return tr.hashAddNode(o),o},destroyNode:r=>{tr.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>49152==(49152&r),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var e=tr.flagModes[r];if(void 0===e)throw new Error("Unknown file open mode: "+r);return e},flagsToPermissionString:r=>{var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>tr.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2,mayLookup:r=>{var e=tr.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate:(r,e)=>{try{tr.lookupNode(r,e);return 20}catch(r){}return tr.nodePermissions(r,"wx")},mayDelete:(r,e,t)=>{var n;try{n=tr.lookupNode(r,e)}catch(r){return r.errno}var o=tr.nodePermissions(r,"wx");if(o)return o;if(t){if(!tr.isDir(n.mode))return 54;if(tr.isRoot(n)||tr.getPath(n)===tr.cwd())return 10}else if(tr.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?tr.isLink(r.mode)?32:tr.isDir(r.mode)&&("r"!==tr.flagsToPermissionString(e)||512&e)?31:tr.nodePermissions(r,tr.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,e=tr.MAX_OPEN_FDS)=>{for(var t=r;t<=e;t++)if(!tr.streams[t])return t;throw new tr.ErrnoError(33)},getStream:r=>tr.streams[r],createStream:(r,e,t)=>{tr.FSStream||(tr.FSStream=function(){},tr.FSStream.prototype={object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}}),r=Object.assign(new tr.FSStream,r);var n=tr.nextfd(e,t);return r.fd=n,tr.streams[n]=r,r},closeStream:r=>{tr.streams[r]=null},chrdev_stream_ops:{open:r=>{var e=tr.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new tr.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice:(r,e)=>{tr.devices[r]={stream_ops:e}},getDevice:r=>tr.devices[r],getMounts:r=>{for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs:(r,e)=>{"function"==typeof r&&(e=r,r=!1),tr.syncFSRequests++,tr.syncFSRequests>1&&f("warning: "+tr.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=tr.getMounts(tr.root.mount),n=0;function o(r){return tr.syncFSRequests--,e(r)}function i(r){if(r)return i.errored?void 0:(i.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return i(null);e.type.syncfs(e,r,i)}))},mount:(r,e,t)=>{var n,o="/"===t,i=!t;if(o&&tr.root)throw new tr.ErrnoError(10);if(!o&&!i){var a=tr.lookupPath(t,{follow_mount:!1});if(t=a.path,n=a.node,tr.isMountpoint(n))throw new tr.ErrnoError(10);if(!tr.isDir(n.mode))throw new tr.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?tr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:r=>{var e=tr.lookupPath(r,{follow_mount:!1});if(!tr.isMountpoint(e.node))throw new tr.ErrnoError(28);var t=e.node,n=t.mounted,o=tr.getMounts(n);Object.keys(tr.nameTable).forEach((r=>{for(var e=tr.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&tr.destroyNode(e),e=t}})),t.mounted=null;var i=t.mount.mounts.indexOf(n);t.mount.mounts.splice(i,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod:(r,e,t)=>{var n=tr.lookupPath(r,{parent:!0}).node,o=$.basename(r);if(!o||"."===o||".."===o)throw new tr.ErrnoError(28);var i=tr.mayCreate(n,o);if(i)throw new tr.ErrnoError(i);if(!n.node_ops.mknod)throw new tr.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},create:(r,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,tr.mknod(r,e,0)),mkdir:(r,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,tr.mknod(r,e,0)),mkdirTree:(r,e)=>{for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{tr.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,e,t)=>(void 0===t&&(t=e,e=438),e|=8192,tr.mknod(r,e,t)),symlink:(r,e)=>{if(!Q.resolve(r))throw new tr.ErrnoError(44);var t=tr.lookupPath(e,{parent:!0}).node;if(!t)throw new tr.ErrnoError(44);var n=$.basename(e),o=tr.mayCreate(t,n);if(o)throw new tr.ErrnoError(o);if(!t.node_ops.symlink)throw new tr.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename:(r,e)=>{var t,n,o=$.dirname(r),i=$.dirname(e),a=$.basename(r),s=$.basename(e);if(t=tr.lookupPath(r,{parent:!0}).node,n=tr.lookupPath(e,{parent:!0}).node,!t||!n)throw new tr.ErrnoError(44);if(t.mount!==n.mount)throw new tr.ErrnoError(75);var u,c=tr.lookupNode(t,a),l=Q.relative(r,i);if("."!==l.charAt(0))throw new tr.ErrnoError(28);if("."!==(l=Q.relative(e,o)).charAt(0))throw new tr.ErrnoError(55);try{u=tr.lookupNode(n,s)}catch(r){}if(c!==u){var d=tr.isDir(c.mode),f=tr.mayDelete(t,a,d);if(f)throw new tr.ErrnoError(f);if(f=u?tr.mayDelete(n,s,d):tr.mayCreate(n,s))throw new tr.ErrnoError(f);if(!t.node_ops.rename)throw new tr.ErrnoError(63);if(tr.isMountpoint(c)||u&&tr.isMountpoint(u))throw new tr.ErrnoError(10);if(n!==t&&(f=tr.nodePermissions(t,"w")))throw new tr.ErrnoError(f);tr.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(r){throw r}finally{tr.hashAddNode(c)}}},rmdir:r=>{var e=tr.lookupPath(r,{parent:!0}).node,t=$.basename(r),n=tr.lookupNode(e,t),o=tr.mayDelete(e,t,!0);if(o)throw new tr.ErrnoError(o);if(!e.node_ops.rmdir)throw new tr.ErrnoError(63);if(tr.isMountpoint(n))throw new tr.ErrnoError(10);e.node_ops.rmdir(e,t),tr.destroyNode(n)},readdir:r=>{var e=tr.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new tr.ErrnoError(54);return e.node_ops.readdir(e)},unlink:r=>{var e=tr.lookupPath(r,{parent:!0}).node;if(!e)throw new tr.ErrnoError(44);var t=$.basename(r),n=tr.lookupNode(e,t),o=tr.mayDelete(e,t,!1);if(o)throw new tr.ErrnoError(o);if(!e.node_ops.unlink)throw new tr.ErrnoError(63);if(tr.isMountpoint(n))throw new tr.ErrnoError(10);e.node_ops.unlink(e,t),tr.destroyNode(n)},readlink:r=>{var e=tr.lookupPath(r).node;if(!e)throw new tr.ErrnoError(44);if(!e.node_ops.readlink)throw new tr.ErrnoError(28);return Q.resolve(tr.getPath(e.parent),e.node_ops.readlink(e))},stat:(r,e)=>{var t=tr.lookupPath(r,{follow:!e}).node;if(!t)throw new tr.ErrnoError(44);if(!t.node_ops.getattr)throw new tr.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>tr.stat(r,!0),chmod:(r,e,t)=>{var n;"string"==typeof r?n=tr.lookupPath(r,{follow:!t}).node:n=r;if(!n.node_ops.setattr)throw new tr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,e)=>{tr.chmod(r,e,!0)},fchmod:(r,e)=>{var t=tr.getStream(r);if(!t)throw new tr.ErrnoError(8);tr.chmod(t.node,e)},chown:(r,e,t,n)=>{var o;"string"==typeof r?o=tr.lookupPath(r,{follow:!n}).node:o=r;if(!o.node_ops.setattr)throw new tr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,e,t)=>{tr.chown(r,e,t,!0)},fchown:(r,e,t)=>{var n=tr.getStream(r);if(!n)throw new tr.ErrnoError(8);tr.chown(n.node,e,t)},truncate:(r,e)=>{if(e<0)throw new tr.ErrnoError(28);var t;"string"==typeof r?t=tr.lookupPath(r,{follow:!0}).node:t=r;if(!t.node_ops.setattr)throw new tr.ErrnoError(63);if(tr.isDir(t.mode))throw new tr.ErrnoError(31);if(!tr.isFile(t.mode))throw new tr.ErrnoError(28);var n=tr.nodePermissions(t,"w");if(n)throw new tr.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate:(r,e)=>{var t=tr.getStream(r);if(!t)throw new tr.ErrnoError(8);if(0==(2097155&t.flags))throw new tr.ErrnoError(28);tr.truncate(t.node,e)},utime:(r,e,t)=>{var n=tr.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open:(r,e,t,n,i)=>{if(""===r)throw new tr.ErrnoError(44);var a;if(t=void 0===t?438:t,t=64&(e="string"==typeof e?tr.modeStringToFlags(e):e)?4095&t|32768:0,"object"==typeof r)a=r;else{r=$.normalize(r);try{a=tr.lookupPath(r,{follow:!(131072&e)}).node}catch(r){}}var s=!1;if(64&e)if(a){if(128&e)throw new tr.ErrnoError(20)}else a=tr.mknod(r,t,0),s=!0;if(!a)throw new tr.ErrnoError(44);if(tr.isChrdev(a.mode)&&(e&=-513),65536&e&&!tr.isDir(a.mode))throw new tr.ErrnoError(54);if(!s){var u=tr.mayOpen(a,e);if(u)throw new tr.ErrnoError(u)}512&e&&tr.truncate(a,0),e&=-131713;var c=tr.createStream({node:a,path:tr.getPath(a),flags:e,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},n,i);return c.stream_ops.open&&c.stream_ops.open(c),!o.logReadFiles||1&e||(tr.readFiles||(tr.readFiles={}),r in tr.readFiles||(tr.readFiles[r]=1)),c},close:r=>{if(tr.isClosed(r))throw new tr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{tr.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,e,t)=>{if(tr.isClosed(r))throw new tr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new tr.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new tr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read:(r,e,t,n,o)=>{if(n<0||o<0)throw new tr.ErrnoError(28);if(tr.isClosed(r))throw new tr.ErrnoError(8);if(1==(2097155&r.flags))throw new tr.ErrnoError(8);if(tr.isDir(r.node.mode))throw new tr.ErrnoError(31);if(!r.stream_ops.read)throw new tr.ErrnoError(28);var i=void 0!==o;if(i){if(!r.seekable)throw new tr.ErrnoError(70)}else o=r.position;var a=r.stream_ops.read(r,e,t,n,o);return i||(r.position+=a),a},write:(r,e,t,n,o,i)=>{if(n<0||o<0)throw new tr.ErrnoError(28);if(tr.isClosed(r))throw new tr.ErrnoError(8);if(0==(2097155&r.flags))throw new tr.ErrnoError(8);if(tr.isDir(r.node.mode))throw new tr.ErrnoError(31);if(!r.stream_ops.write)throw new tr.ErrnoError(28);r.seekable&&1024&r.flags&&tr.llseek(r,0,2);var a=void 0!==o;if(a){if(!r.seekable)throw new tr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,i);return a||(r.position+=s),s},allocate:(r,e,t)=>{if(tr.isClosed(r))throw new tr.ErrnoError(8);if(e<0||t<=0)throw new tr.ErrnoError(28);if(0==(2097155&r.flags))throw new tr.ErrnoError(8);if(!tr.isFile(r.node.mode)&&!tr.isDir(r.node.mode))throw new tr.ErrnoError(43);if(!r.stream_ops.allocate)throw new tr.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap:(r,e,t,n,o,i)=>{if(0!=(2&o)&&0==(2&i)&&2!=(2097155&r.flags))throw new tr.ErrnoError(2);if(1==(2097155&r.flags))throw new tr.ErrnoError(2);if(!r.stream_ops.mmap)throw new tr.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o,i)},msync:(r,e,t,n,o)=>r&&r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,munmap:r=>0,ioctl:(r,e,t)=>{if(!r.stream_ops.ioctl)throw new tr.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile:(r,e={})=>{if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error(\'Invalid encoding type "\'+e.encoding+\'"\');var t,n=tr.open(r,e.flags),o=tr.stat(r).size,i=new Uint8Array(o);return tr.read(n,i,0,o,0),"utf8"===e.encoding?t=P(i,0):"binary"===e.encoding&&(t=i),tr.close(n),t},writeFile:(r,e,t={})=>{t.flags=t.flags||577;var n=tr.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(M(e)+1),i=F(e,o,0,o.length);tr.write(n,o,0,i,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");tr.write(n,e,0,e.byteLength,void 0,t.canOwn)}tr.close(n)},cwd:()=>tr.currentPath,chdir:r=>{var e=tr.lookupPath(r,{follow:!0});if(null===e.node)throw new tr.ErrnoError(44);if(!tr.isDir(e.node.mode))throw new tr.ErrnoError(54);var t=tr.nodePermissions(e.node,"x");if(t)throw new tr.ErrnoError(t);tr.currentPath=e.path},createDefaultDirectories:()=>{tr.mkdir("/tmp"),tr.mkdir("/home"),tr.mkdir("/home/web_user")},createDefaultDevices:()=>{tr.mkdir("/dev"),tr.registerDevice(tr.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n}),tr.mkdev("/dev/null",tr.makedev(1,3)),Z.register(tr.makedev(5,0),Z.default_tty_ops),Z.register(tr.makedev(6,0),Z.default_tty1_ops),tr.mkdev("/dev/tty",tr.makedev(5,0)),tr.mkdev("/dev/tty1",tr.makedev(6,0));var r=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return function(){return crypto.getRandomValues(r),r[0]}}return function(){L("randomDevice")}}();tr.createDevice("/dev","random",r),tr.createDevice("/dev","urandom",r),tr.mkdir("/dev/shm"),tr.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{tr.mkdir("/proc");var r=tr.mkdir("/proc/self");tr.mkdir("/proc/self/fd"),tr.mount({mount:()=>{var e=tr.createNode(r,"fd",16895,73);return e.node_ops={lookup:(r,e)=>{var t=+e,n=tr.getStream(t);if(!n)throw new tr.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:()=>{o.stdin?tr.createDevice("/dev","stdin",o.stdin):tr.symlink("/dev/tty","/dev/stdin"),o.stdout?tr.createDevice("/dev","stdout",null,o.stdout):tr.symlink("/dev/tty","/dev/stdout"),o.stderr?tr.createDevice("/dev","stderr",null,o.stderr):tr.symlink("/dev/tty1","/dev/stderr"),tr.open("/dev/stdin",0),tr.open("/dev/stdout",1),tr.open("/dev/stderr",1)},ensureErrnoError:()=>{tr.ErrnoError||(tr.ErrnoError=function(r,e){this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},tr.ErrnoError.prototype=new Error,tr.ErrnoError.prototype.constructor=tr.ErrnoError,[44].forEach((r=>{tr.genericErrors[r]=new tr.ErrnoError(r),tr.genericErrors[r].stack="<generic error, no stack>"})))},staticInit:()=>{tr.ensureErrnoError(),tr.nameTable=new Array(4096),tr.mount(er,{},"/"),tr.createDefaultDirectories(),tr.createDefaultDevices(),tr.createSpecialDirectories(),tr.filesystems={MEMFS:er}},init:(r,e,t)=>{tr.init.initialized=!0,tr.ensureErrnoError(),o.stdin=r||o.stdin,o.stdout=e||o.stdout,o.stderr=t||o.stderr,tr.createStandardStreams()},quit:()=>{tr.init.initialized=!1;for(var r=0;r<tr.streams.length;r++){var e=tr.streams[r];e&&tr.close(e)}},getMode:(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},findObject:(r,e)=>{var t=tr.analyzePath(r,e);return t.exists?t.object:null},analyzePath:(r,e)=>{try{r=(n=tr.lookupPath(r,{follow:!e})).path}catch(r){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=tr.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=$.basename(r),n=tr.lookupPath(r,{follow:!e}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(r){t.error=r.errno}return t},createPath:(r,e,t,n)=>{r="string"==typeof r?r:tr.getPath(r);for(var o=e.split("/").reverse();o.length;){var i=o.pop();if(i){var a=$.join2(r,i);try{tr.mkdir(a)}catch(r){}r=a}}return a},createFile:(r,e,t,n,o)=>{var i=$.join2("string"==typeof r?r:tr.getPath(r),e),a=tr.getMode(n,o);return tr.create(i,a)},createDataFile:(r,e,t,n,o,i)=>{var a=e;r&&(r="string"==typeof r?r:tr.getPath(r),a=e?$.join2(r,e):r);var s=tr.getMode(n,o),u=tr.create(a,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),l=0,d=t.length;l<d;++l)c[l]=t.charCodeAt(l);t=c}tr.chmod(u,146|s);var f=tr.open(u,577);tr.write(f,t,0,t.length,0,i),tr.close(f),tr.chmod(u,s)}return u},createDevice:(r,e,t,n)=>{var o=$.join2("string"==typeof r?r:tr.getPath(r),e),i=tr.getMode(!!t,!!n);tr.createDevice.major||(tr.createDevice.major=64);var a=tr.makedev(tr.createDevice.major++,0);return tr.registerDevice(a,{open:r=>{r.seekable=!1},close:r=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(r,e,n,o,i)=>{for(var a=0,s=0;s<o;s++){var u;try{u=t()}catch(r){throw new tr.ErrnoError(29)}if(void 0===u&&0===a)throw new tr.ErrnoError(6);if(null==u)break;a++,e[n+s]=u}return a&&(r.node.timestamp=Date.now()),a},write:(r,e,t,o,i)=>{for(var a=0;a<o;a++)try{n(e[t+a])}catch(r){throw new tr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),a}}),tr.mkdev(o,i,a)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!i)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=dr(i(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new tr.ErrnoError(29)}},createLazyFile:(r,e,t,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}},i.prototype.setDataGetter=function(r){this.getter=r},i.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn\'t load "+t+". Status: "+r.status);var e,n=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,i=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;o||(a=n);var s=this;s.setDataGetter((r=>{var e=r*a,o=(r+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=((r,e)=>{if(r>e)throw new Error("invalid range ("+r+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==a&&o.setRequestHeader("Range","bytes="+r+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn\'t load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):dr(o.responseText||"",!0)})(e,o)),void 0===s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,d("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a={isDevice:!1,url:t},s=tr.createFile(r,e,a,n,o);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(s.stream_ops).forEach((r=>{var e=s.stream_ops[r];u[r]=function(){return tr.forceLoadFile(s),e.apply(null,arguments)}})),u.read=(r,e,t,n,o)=>{tr.forceLoadFile(s);var i=r.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var u=0;u<a;u++)e[t+u]=i[o+u];else for(u=0;u<a;u++)e[t+u]=i.get(o+u);return a},s.stream_ops=u,s},createPreloadedFile:(r,e,t,n,o,i,s,u,c,l)=>{var d=e?Q.resolve($.join2(r,e)):r;function f(t){function a(t){l&&l(),u||tr.createDataFile(r,e,t,n,o,c),i&&i(),O()}Browser.handledByPreloadPlugin(t,d,a,(()=>{s&&s(),O()}))||a(t)}N(),"string"==typeof t?function(r,e,t,n){var o=n?"":"al "+r;a(r,(function(t){_(t,\'Loading data file "\'+r+\'" failed (no arrayBuffer).\'),e(new Uint8Array(t)),o&&O()}),(function(e){if(!t)throw\'Loading data file "\'+r+\'" failed.\';t()})),o&&N()}(t,(r=>f(r)),s):f(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=tr.indexedDB();try{var o=n.open(tr.DB_NAME(),tr.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=()=>{d("creating db"),o.result.createObjectStore(tr.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([tr.DB_STORE_NAME],"readwrite"),i=n.objectStore(tr.DB_STORE_NAME),a=0,s=0,u=r.length;function c(){0==s?e():t()}r.forEach((r=>{var e=i.put(tr.analyzePath(r).object.contents,r);e.onsuccess=()=>{++a+s==u&&c()},e.onerror=()=>{s++,a+s==u&&c()}})),n.onerror=t},o.onerror=t},loadFilesFromDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=tr.indexedDB();try{var o=n.open(tr.DB_NAME(),tr.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([tr.DB_STORE_NAME],"readonly")}catch(r){return void t(r)}var a=i.objectStore(tr.DB_STORE_NAME),s=0,u=0,c=r.length;function l(){0==u?e():t()}r.forEach((r=>{var e=a.get(r);e.onsuccess=()=>{tr.analyzePath(r).exists&&tr.unlink(r),tr.createDataFile($.dirname(r),$.basename(r),e.result,!0,!0,!0),++s+u==c&&l()},e.onerror=()=>{u++,s+u==c&&l()}})),i.onerror=t},o.onerror=t}},nr={DEFAULT_POLLMASK:5,calculateAt:function(r,e,t){if("/"===e[0])return e;var n;if(-100===r)n=tr.cwd();else{var o=tr.getStream(r);if(!o)throw new tr.ErrnoError(8);n=o.path}if(0==e.length){if(!t)throw new tr.ErrnoError(44);return n}return $.join2(n,e)},doStat:function(r,e,t){try{var n=r(e)}catch(r){if(r&&r.node&&$.normalize(e)!==$.normalize(tr.getPath(r.node)))return-54;throw r}return k[t>>2]=n.dev,k[t+4>>2]=0,k[t+8>>2]=n.ino,k[t+12>>2]=n.mode,k[t+16>>2]=n.nlink,k[t+20>>2]=n.uid,k[t+24>>2]=n.gid,k[t+28>>2]=n.rdev,k[t+32>>2]=0,G=[n.size>>>0,(H=n.size,+Math.abs(H)>=1?H>0?(0|Math.min(+Math.floor(H/4294967296),4294967295))>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],k[t+40>>2]=G[0],k[t+44>>2]=G[1],k[t+48>>2]=4096,k[t+52>>2]=n.blocks,k[t+56>>2]=n.atime.getTime()/1e3|0,k[t+60>>2]=0,k[t+64>>2]=n.mtime.getTime()/1e3|0,k[t+68>>2]=0,k[t+72>>2]=n.ctime.getTime()/1e3|0,k[t+76>>2]=0,G=[n.ino>>>0,(H=n.ino,+Math.abs(H)>=1?H>0?(0|Math.min(+Math.floor(H/4294967296),4294967295))>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],k[t+80>>2]=G[0],k[t+84>>2]=G[1],0},doMsync:function(r,e,t,n,o){var i=g.slice(r,r+t);tr.msync(e,i,o,t,n)},doMkdir:function(r,e){return"/"===(r=$.normalize(r))[r.length-1]&&(r=r.substr(0,r.length-1)),tr.mkdir(r,e,0),0},doMknod:function(r,e,t){switch(61440&e){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return tr.mknod(r,e,t),0},doReadlink:function(r,e,t){if(t<=0)return-28;var n=tr.readlink(r),o=Math.min(t,M(n)),i=E[e+o];return F(n,g,e,t+1),E[e+o]=i,o},doAccess:function(r,e){if(-8&e)return-28;var t=tr.lookupPath(r,{follow:!0}).node;if(!t)return-44;var n="";return 4&e&&(n+="r"),2&e&&(n+="w"),1&e&&(n+="x"),n&&tr.nodePermissions(t,n)?-2:0},doDup:function(r,e,t){var n=tr.getStream(t);return n&&tr.close(n),tr.open(r,e,0,t,t).fd},doReadv:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=k[e+8*i>>2],s=k[e+(8*i+4)>>2],u=tr.read(r,E,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o},doWritev:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=k[e+8*i>>2],s=k[e+(8*i+4)>>2],u=tr.write(r,E,a,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return nr.varargs+=4,k[nr.varargs-4>>2]},getStr:function(r){return x(r)},getStreamFromFD:function(r){var e=tr.getStream(r);if(!e)throw new tr.ErrnoError(8);return e},get64:function(r,e){return r}};var or=[];function ir(r){try{return m.grow(r-y.byteLength+65535>>>16),R(m.buffer),1}catch(r){}}var ar={};function sr(){if(!sr.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:u||"./this.program"};for(var e in ar)void 0===ar[e]?delete r[e]:r[e]=ar[e];var t=[];for(var e in r)t.push(e+"="+r[e]);sr.strings=t}return sr.strings}var ur=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=tr.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},cr=365,lr=146;function dr(r,e,t){var n=t>0?t:M(r)+1,o=new Array(n),i=F(r,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(ur.prototype,{read:{get:function(){return(this.mode&cr)===cr},set:function(r){r?this.mode|=cr:this.mode&=-366}},write:{get:function(){return(this.mode&lr)===lr},set:function(r){r?this.mode|=lr:this.mode&=-147}},isFolder:{get:function(){return tr.isDir(this.mode)}},isDevice:{get:function(){return tr.isChrdev(this.mode)}}}),tr.FSNode=ur,tr.staticInit();var fr={s:function(r,e){return function(r,e){var t;if(0===r)t=Date.now();else{if(1!==r&&4!==r)return K(28),-1;t=V()}return k[e>>2]=t/1e3|0,k[e+4>>2]=t%1e3*1e3*1e3|0,0}(r,e)},j:function(r,e,t,n){try{return e=nr.getStr(e),e=nr.calculateAt(r,e),nr.doAccess(e,t)}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},i:function(r,e,t){nr.varargs=t;try{var n=nr.getStreamFromFD(r);switch(e){case 0:return(o=nr.get())<0?-28:tr.open(n.path,n.flags,0,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=nr.get();return n.flags|=o,0;case 5:o=nr.get();return b[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return K(28),-1}}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},z:function(r,e){try{var t=nr.getStreamFromFD(r);return nr.doStat(tr.stat,t.path,e)}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},x:function(r,e,t,n){try{e=nr.getStr(e);var o=256&n,i=4096&n;return n&=-4353,e=nr.calculateAt(r,e,i),nr.doStat(o?tr.lstat:tr.stat,e,t)}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},A:function(r,e,t){nr.varargs=t;try{var n=nr.getStreamFromFD(r);switch(e){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=nr.get();return k[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:o=nr.get();return tr.ioctl(n,e,o);default:L("bad ioctl syscall "+e)}}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},d:function(r,e,t){nr.varargs=t;try{var n=nr.getStr(r),o=t?nr.get():0;return tr.open(n,e,o).fd}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},y:function(r,e){try{return r=nr.getStr(r),nr.doStat(tr.stat,r,e)}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},r:function(r){try{return r=nr.getStr(r),tr.unlink(r),0}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},p:function(){throw 1/0},t:function(r,e,t,n,o,i,a,s){try{var u=tr.getStream(o);if(!u)return-8;var c=tr.mmap(u,r,e,i,t,n),l=c.ptr;return k[a>>2]=c.allocated,l}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},u:function(r,e,t,n,o,i){try{var a=tr.getStream(o);a&&(2&t&&nr.doMsync(r,a,e,n,i),tr.munmap(a))}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},o:function(){L("")},C:function(r,e,t){var n=function(r,e){var t;for(or.length=0,e>>=2;t=g[r++];){var n=t<105;n&&1&e&&e++,or.push(n?D[e++>>1]:k[e]),++e}return or}(e,t);return J[r].apply(null,n)},B:function(r,e,t){g.copyWithin(r,e,e+t)},q:function(r){var e,t,n=g.length,o=2147483648;if((r>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,r+100663296),ir(Math.min(o,(e=Math.max(r,a))+((t=65536)-e%t)%t)))return!0}return!1},v:function(r,e){var t=0;return sr().forEach((function(n,o){var i=e+t;k[r+4*o>>2]=i,function(r,e,t){for(var n=0;n<r.length;++n)E[e++>>0]=r.charCodeAt(n);t||(E[e>>0]=0)}(n,i),t+=n.length+1})),0},w:function(r,e){var t=sr();k[r>>2]=t.length;var n=0;return t.forEach((function(r){n+=r.length+1})),k[e>>2]=n,0},e:function(r){!function(r,e){!function(r){v||(o.onExit&&o.onExit(r),w=!0);c(r,new Ar(r))}(r)}(r)},c:function(r){try{var e=nr.getStreamFromFD(r);return tr.close(e),0}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return r.errno}},g:function(r,e,t,n){try{var o=nr.getStreamFromFD(r),i=nr.doReadv(o,e,t);return k[n>>2]=i,0}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return r.errno}},n:function(r,e,t,n,o){try{var i=nr.getStreamFromFD(r),a=4294967296*t+(e>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(tr.llseek(i,a,n),G=[i.position>>>0,(H=i.position,+Math.abs(H)>=1?H>0?(0|Math.min(+Math.floor(H/4294967296),4294967295))>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],k[o>>2]=G[0],k[o+4>>2]=G[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return r.errno}},h:function(r,e,t,n){try{var o=nr.getStreamFromFD(r),i=nr.doWritev(o,e,t);return k[n>>2]=i,0}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return r.errno}},b:function(){return h},k:function(r){var e=Date.now();return k[r>>2]=e/1e3|0,k[r+4>>2]=e%1e3*1e3|0,0},l:function(r,e,t,n,o,i,a){var s=Dr();try{return Y(r)(e,t,n,o,i,a)}catch(r){if(Sr(s),r!==r+0)throw r;kr(1,0)}},m:function(r,e){var t=Dr();try{Y(r)(e)}catch(r){if(Sr(t),r!==r+0)throw r;kr(1,0)}},a:function(r){h=r},f:function(r){var e=Date.now()/1e3|0;return r&&(k[r>>2]=e),e}};!function(){var r={a:fr};function e(r,e){var t,n=r.exports;o.asm=n,R((m=o.asm.D).buffer),S=o.asm.M,t=o.asm.E,z.unshift(t),O()}function t(r){e(r.instance)}function i(e){return(p||"function"!=typeof fetch?Promise.resolve().then((function(){return W(I)})):fetch(I,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at \'"+I+"\'";return r.arrayBuffer()})).catch((function(){return W(I)}))).then((function(e){return WebAssembly.instantiate(e,r)})).then((function(r){return r})).then(e,(function(r){f("failed to asynchronously prepare wasm: "+r),L(r)}))}if(N(),o.instantiateWasm)try{return o.instantiateWasm(r,e)}catch(r){return f("Module.instantiateWasm callback failed with error: "+r),!1}(p||"function"!=typeof WebAssembly.instantiateStreaming||q(I)||"function"!=typeof fetch?i(t):fetch(I,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(t,(function(r){return f("wasm streaming compile failed: "+r),f("falling back to ArrayBuffer instantiation"),i(t)}))}))).catch(n)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.E).apply(null,arguments)};var pr=o._emscripten_bind_VoidPtr___destroy___0=function(){return(pr=o._emscripten_bind_VoidPtr___destroy___0=o.asm.F).apply(null,arguments)},hr=o._emscripten_bind_Graphviz_Graphviz_2=function(){return(hr=o._emscripten_bind_Graphviz_Graphviz_2=o.asm.G).apply(null,arguments)},mr=o._emscripten_bind_Graphviz_version_0=function(){return(mr=o._emscripten_bind_Graphviz_version_0=o.asm.H).apply(null,arguments)},vr=o._emscripten_bind_Graphviz_lastError_0=function(){return(vr=o._emscripten_bind_Graphviz_lastError_0=o.asm.I).apply(null,arguments)},wr=o._emscripten_bind_Graphviz_layout_3=function(){return(wr=o._emscripten_bind_Graphviz_layout_3=o.asm.J).apply(null,arguments)},_r=o._emscripten_bind_Graphviz_createFile_2=function(){return(_r=o._emscripten_bind_Graphviz_createFile_2=o.asm.K).apply(null,arguments)},yr=o._emscripten_bind_Graphviz___destroy___0=function(){return(yr=o._emscripten_bind_Graphviz___destroy___0=o.asm.L).apply(null,arguments)};o._malloc=function(){return(o._malloc=o.asm.N).apply(null,arguments)},o._free=function(){return(o._free=o.asm.O).apply(null,arguments)};var Er,gr=o.___errno_location=function(){return(gr=o.___errno_location=o.asm.P).apply(null,arguments)},br=o._emscripten_builtin_memalign=function(){return(br=o._emscripten_builtin_memalign=o.asm.Q).apply(null,arguments)},kr=o._setThrew=function(){return(kr=o._setThrew=o.asm.R).apply(null,arguments)},Dr=o.stackSave=function(){return(Dr=o.stackSave=o.asm.S).apply(null,arguments)},Sr=o.stackRestore=function(){return(Sr=o.stackRestore=o.asm.T).apply(null,arguments)};function Ar(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function Pr(r){function e(){Er||(Er=!0,o.calledRun=!0,w||(o.noFSInit||tr.init.initialized||tr.init(),tr.ignorePermissions=!1,X(z),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)r=o.postRun.shift(),j.unshift(r);var r;X(j)}()))}T>0||(!function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),C.unshift(r);var r;X(C)}(),T>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(B=function r(){Er||Pr(),Er||(B=r)},o.run=Pr,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function xr(){}function Fr(r){return(r||xr).__cache__}function Mr(r,e){var t=Fr(e),n=t[r];return n||((n=Object.create((e||xr).prototype)).ptr=r,t[r]=n)}Pr(),xr.prototype=Object.create(xr.prototype),xr.prototype.constructor=xr,xr.prototype.__class__=xr,xr.__cache__={},o.WrapperObject=xr,o.getCache=Fr,o.wrapPointer=Mr,o.castObject=function(r,e){return Mr(r.ptr,e)},o.NULL=Mr(0),o.destroy=function(r){if(!r.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";r.__destroy__(),delete Fr(r.__class__)[r.ptr]},o.compare=function(r,e){return r.ptr===e.ptr},o.getPointer=function(r){return r.ptr},o.getClass=function(r){return r.__class__};var Rr={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(Rr.needed){for(var r=0;r<Rr.temps.length;r++)o._free(Rr.temps[r]);Rr.temps.length=0,o._free(Rr.buffer),Rr.buffer=0,Rr.size+=Rr.needed,Rr.needed=0}Rr.buffer||(Rr.size+=128,Rr.buffer=o._malloc(Rr.size),_(Rr.buffer)),Rr.pos=0},alloc:function(r,e){_(Rr.buffer);var t,n=e.BYTES_PER_ELEMENT,i=r.length*n;return i=i+7&-8,Rr.pos+i>=Rr.size?(_(i>0),Rr.needed+=i,t=o._malloc(i),Rr.temps.push(t)):(t=Rr.buffer+Rr.pos,Rr.pos+=i),t},copy:function(r,e,t){switch(t>>>=0,e.BYTES_PER_ELEMENT){case 2:t>>>=1;break;case 4:t>>>=2;break;case 8:t>>>=3}for(var n=0;n<r.length;n++)e[t+n]=r[n]}};function Cr(r){if("string"==typeof r){var e=dr(r),t=Rr.alloc(e,E);return Rr.copy(e,E,t),t}return r}function zr(){throw"cannot construct a VoidPtr, no constructor in IDL"}function jr(r,e){r&&"object"==typeof r&&(r=r.ptr),e&&"object"==typeof e&&(e=e.ptr),this.ptr=hr(r,e),Fr(jr)[this.ptr]=this}return zr.prototype=Object.create(xr.prototype),zr.prototype.constructor=zr,zr.prototype.__class__=zr,zr.__cache__={},o.VoidPtr=zr,zr.prototype.__destroy__=zr.prototype.__destroy__=function(){var r=this.ptr;pr(r)},jr.prototype=Object.create(xr.prototype),jr.prototype.constructor=jr,jr.prototype.__class__=jr,jr.__cache__={},o.Graphviz=jr,jr.prototype.version=jr.prototype.version=function(){var r=this.ptr;return x(mr(r))},jr.prototype.lastError=jr.prototype.lastError=function(){var r=this.ptr;return x(vr(r))},jr.prototype.layout=jr.prototype.layout=function(r,e,t){var n=this.ptr;return Rr.prepare(),r=r&&"object"==typeof r?r.ptr:Cr(r),e=e&&"object"==typeof e?e.ptr:Cr(e),t=t&&"object"==typeof t?t.ptr:Cr(t),x(wr(n,r,e,t))},jr.prototype.createFile=jr.prototype.createFile=function(r,e){var t=this.ptr;Rr.prepare(),r=r&&"object"==typeof r?r.ptr:Cr(r),e=e&&"object"==typeof e?e.ptr:Cr(e),_r(t,r,e)},jr.prototype.__destroy__=jr.prototype.__destroy__=function(){var r=this.ptr;yr(r)},e.ready}})();r.exports=t}(u);var c=e({__proto__:null,default:u.exports},[u.exports]);function l(r){return{path:r.path,data:`<?xml version="1.0" encoding="UTF-8" standalone="no"?>\\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\\n<svg width="${r.width}" height="${r.height}"></svg>`}}const d={layout:(r,e="svg",t="dot",n)=>r?s(c,null==n?void 0:n.wasmFolder,null==n?void 0:n.wasmBinary).then((o=>{const i=new o.Graphviz(void 0!==(null==n?void 0:n.yInvert)&&(null==n?void 0:n.yInvert),void 0!==(null==n?void 0:n.nop)?null==n?void 0:n.nop:0);!function(r,e){const t={images:[],files:[],...e};var n;[...t.files,...(n=t.images,n.map(l))].forEach((e=>r.createFile(e.path,e.data)))}(i,n);const a=i.layout(r,e,t);if(o.destroy(i),!a)throw new Error(o.Graphviz.prototype.lastError());return a})):Promise.resolve(""),circo(r,e="svg",t){return this.layout(r,e,"circo",t)},dot(r,e="svg",t){return this.layout(r,e,"dot",t)},fdp(r,e="svg",t){return this.layout(r,e,"fdp",t)},sfdp(r,e="svg",t){return this.layout(r,e,"sfdp",t)},neato(r,e="svg",t){return this.layout(r,e,"neato",t)},osage(r,e="svg",t){return this.layout(r,e,"osage",t)},patchwork(r,e="svg",t){return this.layout(r,e,"patchwork",t)},twopi(r,e="svg",t){return this.layout(r,e,"twopi",t)}};var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var p={exports:{}};\n/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.8+1e68dce6\n */function h(r){return void 0!==r.children}!function(r,e){r.exports=function(){function r(r){var e=typeof r;return null!==r&&("object"===e||"function"===e)}function e(r){return"function"==typeof r}var t=Array.isArray?Array.isArray:function(r){return"[object Array]"===Object.prototype.toString.call(r)},n=0,o=void 0,i=void 0,a=function(r,e){E[n]=r,E[n+1]=e,2===(n+=2)&&(i?i(g):k())};function s(r){i=r}function u(r){a=r}var c="undefined"!=typeof window?window:void 0,l=c||{},d=l.MutationObserver||l.WebKitMutationObserver,p="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function m(){return function(){return process.nextTick(g)}}function v(){return void 0!==o?function(){o(g)}:y()}function w(){var r=0,e=new d(g),t=document.createTextNode("");return e.observe(t,{characterData:!0}),function(){t.data=r=++r%2}}function _(){var r=new MessageChannel;return r.port1.onmessage=g,function(){return r.port2.postMessage(0)}}function y(){var r=setTimeout;return function(){return r(g,1)}}var E=new Array(1e3);function g(){for(var r=0;r<n;r+=2)(0,E[r])(E[r+1]),E[r]=void 0,E[r+1]=void 0;n=0}function b(){try{var r=Function("return this")().require("vertx");return o=r.runOnLoop||r.runOnContext,v()}catch(r){return y()}}var k=void 0;function D(r,e){var t=this,n=new this.constructor(P);void 0===n[A]&&J(n);var o=t._state;if(o){var i=arguments[o-1];a((function(){return G(o,n,i,t._result)}))}else U(t,n,r,e);return n}function S(r){var e=this;if(r&&"object"==typeof r&&r.constructor===e)return r;var t=new e(P);return N(t,r),t}k=p?m():d?w():h?_():void 0===c?b():y();var A=Math.random().toString(36).substring(2);function P(){}var x=void 0,F=1,M=2;function R(){return new TypeError("You cannot resolve a promise with itself")}function C(){return new TypeError("A promises callback cannot return that same promise.")}function z(r,e,t,n){try{r.call(e,t,n)}catch(r){return r}}function j(r,e,t){a((function(r){var n=!1,o=z(t,e,(function(t){n||(n=!0,e!==t?N(r,t):L(r,t))}),(function(e){n||(n=!0,I(r,e))}),"Settle: "+(r._label||" unknown promise"));!n&&o&&(n=!0,I(r,o))}),r)}function T(r,e){e._state===F?L(r,e._result):e._state===M?I(r,e._result):U(e,void 0,(function(e){return N(r,e)}),(function(e){return I(r,e)}))}function B(r,t,n){t.constructor===r.constructor&&n===D&&t.constructor.resolve===S?T(r,t):void 0===n?L(r,t):e(n)?j(r,t,n):L(r,t)}function N(e,t){if(e===t)I(e,R());else if(r(t)){var n=void 0;try{n=t.then}catch(r){return void I(e,r)}B(e,t,n)}else L(e,t)}function O(r){r._onerror&&r._onerror(r._result),H(r)}function L(r,e){r._state===x&&(r._result=e,r._state=F,0!==r._subscribers.length&&a(H,r))}function I(r,e){r._state===x&&(r._state=M,r._result=e,a(O,r))}function U(r,e,t,n){var o=r._subscribers,i=o.length;r._onerror=null,o[i]=e,o[i+F]=t,o[i+M]=n,0===i&&r._state&&a(H,r)}function H(r){var e=r._subscribers,t=r._state;if(0!==e.length){for(var n=void 0,o=void 0,i=r._result,a=0;a<e.length;a+=3)n=e[a],o=e[a+t],n?G(t,n,o,i):o(i);r._subscribers.length=0}}function G(r,t,n,o){var i=e(n),a=void 0,s=void 0,u=!0;if(i){try{a=n(o)}catch(r){u=!1,s=r}if(t===a)return void I(t,C())}else a=o;t._state!==x||(i&&u?N(t,a):!1===u?I(t,s):r===F?L(t,a):r===M&&I(t,a))}function q(r,e){try{e((function(e){N(r,e)}),(function(e){I(r,e)}))}catch(e){I(r,e)}}var W=0;function V(){return W++}function J(r){r[A]=W++,r._state=void 0,r._result=void 0,r._subscribers=[]}function X(){return new Error("Array Methods must be provided an Array")}var Y=function(){function r(r,e){this._instanceConstructor=r,this.promise=new r(P),this.promise[A]||J(this.promise),t(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?L(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&L(this.promise,this._result))):I(this.promise,X())}return r.prototype._enumerate=function(r){for(var e=0;this._state===x&&e<r.length;e++)this._eachEntry(r[e],e)},r.prototype._eachEntry=function(r,e){var t=this._instanceConstructor,n=t.resolve;if(n===S){var o=void 0,i=void 0,a=!1;try{o=r.then}catch(r){a=!0,i=r}if(o===D&&r._state!==x)this._settledAt(r._state,e,r._result);else if("function"!=typeof o)this._remaining--,this._result[e]=r;else if(t===er){var s=new t(P);a?I(s,i):B(s,r,o),this._willSettleAt(s,e)}else this._willSettleAt(new t((function(e){return e(r)})),e)}else this._willSettleAt(n(r),e)},r.prototype._settledAt=function(r,e,t){var n=this.promise;n._state===x&&(this._remaining--,r===M?I(n,t):this._result[e]=t),0===this._remaining&&L(n,this._result)},r.prototype._willSettleAt=function(r,e){var t=this;U(r,void 0,(function(r){return t._settledAt(F,e,r)}),(function(r){return t._settledAt(M,e,r)}))},r}();function K(r){return new Y(this,r).promise}function $(r){var e=this;return t(r)?new e((function(t,n){for(var o=r.length,i=0;i<o;i++)e.resolve(r[i]).then(t,n)})):new e((function(r,e){return e(new TypeError("You must pass an array to race."))}))}function Q(r){var e=new this(P);return I(e,r),e}function Z(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function rr(){throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.")}var er=function(){function r(e){this[A]=V(),this._result=this._state=void 0,this._subscribers=[],P!==e&&("function"!=typeof e&&Z(),this instanceof r?q(this,e):rr())}return r.prototype.catch=function(r){return this.then(null,r)},r.prototype.finally=function(r){var t=this,n=t.constructor;return e(r)?t.then((function(e){return n.resolve(r()).then((function(){return e}))}),(function(e){return n.resolve(r()).then((function(){throw e}))})):t.then(r,r)},r}();function tr(){var r=void 0;if(void 0!==f)r=f;else if("undefined"!=typeof self)r=self;else try{r=Function("return this")()}catch(r){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=r.Promise;if(e){var t=null;try{t=Object.prototype.toString.call(e.resolve())}catch(r){}if("[object Promise]"===t&&!e.cast)return}r.Promise=er}return er.prototype.then=D,er.all=K,er.race=$,er.resolve=S,er.reject=Q,er._setScheduler=s,er._setAsap=u,er._asap=a,er.polyfill=tr,er.Promise=er,er}()}(p),p.exports.polyfill();var m=function(r){var e=[];return r.children.forEach((function(r){h(r)?e.push(m(r)):e.push(v(r))})),"subgraph cluster_".concat(r.id,\' {\\nid="\').concat(r.id,\'";\\nlabel="\').concat(r.text,\'";\\nmargin=16;\\n\').concat(e.join("\\n"),"\\n}")},v=function(r){return"".concat(r.id,\' [id="\').concat(r.id,\'" label="\').concat(r.text,\'" width=\').concat(y(r.width)," height=").concat(y(r.height),"]")},w=function(r){return 96*r/72},_=function(r){return 96*r},y=function(r){return r/96};function E(r){var e=r?r.split(",").map((function(r){return w(+r)})):[0,0,0,0],t=e[0],n=e[1],o=e[2]-t,i=e[3]-n;return{x:t-o/2,y:n-i/2,width:o,height:i}}function g(r,e){var t=r.split(",").map((function(r){return w(+r)})),n=t[0],o=t[1];return{x:-n+e.width,y:-o+e.height}}function b(r,e,t){return void 0===t&&(t="json"),d[r](e,t).then((function(r){return"json"===t?JSON.parse(r):r}))}function k(e,t){if(self.document=self.document||{currentScript:{src:t.wasmFolder+"/dummy.js"}},e.raw)return b(t.engine,e.raw,"svg");var n={},o=[],i=[],a={},s=[],u=[],c={},l=[],d=[];function f(r,e){h(r)?(n[r.id]=r,o.push(r),r.children.forEach((function(r){return f(r,!1)})),e&&i.push(m(r))):(a[r.id]=r,s.push(r),e&&u.push(v(r)))}return e.items.forEach((function(r){return f(r,!0)})),e.links.forEach((function(r){var e,t,n,o;c[r.id]=r,l.push(r),d.push((e=r.source.id,t=r.target.id,n=r.id,o=r.text,"".concat(e," -> ").concat(t,\' [id="\').concat(n,\'", label="\').concat(o,\'"]\')))})),b(t.engine,"digraph G {\\n graph [fontname=Verdana,fontsize=11.0];\\n graph [rankdir=TB];\\n node [shape=rect,fontname=Verdana,fontsize=11.0,fixedsize=true];\\n edge [fontname=Verdana,fontsize=11.0];\\n\\n".concat(i.join("\\n"),"\\n\\n").concat(d.join("\\n"),"\\n\\n").concat(u.join("\\n"),"\\n}")).then((function(e){var t=E(e.bb);return e.objects&&e.objects.forEach((function(r){if(r.nodes){var e=function(r,e){var t=E(r);return{x:-t.x+e.width,y:-t.y+e.height,width:t.width,height:t.height}}(r.bb,t),o=n[r.id];o.x=e.x-t.width/2,o.y=e.y-t.height/2,o.width=e.width,o.height=e.height}else{var i=(u=r.pos,c=r.width,l=r.height,d=g(u,t),f=_(+c),p=_(+l),{x:d.x,y:d.y,width:f,height:p}),s=a[r.id];s&&(s.x=i.x-t.width/2,s.y=i.y-t.height/2)}var u,c,l,d,f,p})),e.edges&&e.edges.forEach((function(e){var n=c[e.id];n&&(n.points=function(e,t){if(e.pos){var n=e.pos.substr(2).split(" ").map((function(r){return g(r,t)})).map((function(r){return[r.x-t.width/2,r.y-t.height/2]})),o=n.shift();return r(r([],n,!0),[o],!1)}return[]}(e,t))})),{clusters:o,nodes:s,links:l}}))}self.onmessage=function(r){k.apply(void 0,r.data).then((function(r){self.postMessage(r)}))}}();'],{type:"application/javascript"}),n=URL.createObjectURL(r),o=new Worker(n);return{terminate:function(){return o.terminate()},response:new Promise((function(r){o.onmessage=function(e){r(e.data),o.terminate(),URL.revokeObjectURL(n)},o.postMessage([e,t])}))}}var U_=E().x((function(e){return e[0]})).y((function(e){return e[1]})).curve(I),W_=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o._engine=r,o._wasmFolder=n,o}return s(t,e),t.prototype.start=function(){var t=this;e.prototype.start.call(this);var r=this._graph.size(),n=this._graph.graphData(),o={};return H_({items:n.hierarchy((function(e,t,r){switch(e){case"subgraph":return{id:t.id,text:t.props.text,children:r};case"vertex":delete t.fx,delete t.fy;var n=t.element.node().getBBox(),i={id:t.id,text:t.props.text,width:n.width,height:n.height};return o[i.id]=i,i}})),links:n.allEdges().map((function(e){return{id:e.props.id,source:o[e.source.id],target:o[e.target.id],text:e.props.label||""}})),raw:""},{engine:this._engine,wasmFolder:this._wasmFolder}).response.then((function(e){return t.running()&&(e.clusters.forEach((function(e){var t=n.subgraph(e.id);t.x=e.x+r.width/2-e.width,t.y=e.y+r.height/2-e.height,t.props.width=e.width,t.props.height=e.height})),e.nodes.forEach((function(e){var t=n.vertex(e.id);t.x=e.x+r.width/2,t.y=e.y+r.height/2})),e.links.forEach((function(e){var t=n.edge(e.id);t.points=l(l([[t.source.x,t.source.y]],void 0!==e.points?e.points.map((function(e){return[e[0]+r.width/2,e[1]+r.height/2]})):[],!0),[[t.target.x,t.target.y]],!1)})),t._graph.moveSubgraphs(!0).moveVertices(!0).moveEdges(!0),t.stop()),t}))},t.prototype.edgePath=function(t,r){var n=this,o=[],i=!1;return t.points&&(o=t.points.map((function(e){var t=n._graph.project(e[0],!1),r=n._graph.project(e[1],!1);return(isNaN(t)||isNaN(r))&&(i=!0),[t,r]}))),i||o.length<2?e.prototype.edgePath.call(this,t,r):{path:U_(o),labelPos:this.center(o)}},t}(P_),q_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){return t.stop(),t}))},t}(P_);function X_(e,t){return e.parent===t.parent?1:2}function K_(e,t){return e+t.x}function $_(e,t){return Math.max(e,t.y)}function J_(){var e=X_,t=1,r=1,n=!1;function o(o){var i,a=0;o.eachAfter((function(t){var r=t.children;r?(t.x=function(e){return e.reduce(K_,0)/e.length}(r),t.y=function(e){return 1+e.reduce($_,0)}(r)):(t.x=i?a+=e(t,i):0,t.y=0,i=t)}));var s=function(e){for(var t;t=e.children;)e=t[0];return e}(o),u=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(o),c=s.x-e(s,u)/2,h=u.x+e(u,s)/2;return o.eachAfter(n?function(e){e.x=(e.x-o.x)*t,e.y=(o.y-e.y)*r}:function(e){e.x=(e.x-c)/(h-c)*t,e.y=(1-(o.y?e.y/o.y:1))*r})}return o.separation=function(t){return arguments.length?(e=t,o):e},o.size=function(e){return arguments.length?(n=!1,t=+e[0],r=+e[1],o):n?null:[t,r]},o.nodeSize=function(e){return arguments.length?(n=!0,t=+e[0],r=+e[1],o):n?[t,r]:null},o}function Q_(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function Z_(e,t){var r,n,o,i,a,s=new nm(e),u=+e.value&&(s.value=e.value),c=[s];for(null==t&&(t=em);r=c.pop();)if(u&&(r.value=+r.data.value),(o=t(r.data))&&(a=o.length))for(r.children=new Array(a),i=a-1;i>=0;--i)c.push(n=r.children[i]=new nm(o[i])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(rm)}function em(e){return e.children}function tm(e){e.data=e.data.data}function rm(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function nm(e){this.data=e,this.depth=this.height=0,this.parent=null}function om(e,t){return e.parent===t.parent?1:2}function im(e){var t=e.children;return t?t[0]:e.t}function am(e){var t=e.children;return t?t[t.length-1]:e.t}function sm(e,t,r){var n=r/(t.i-e.i);t.c-=n,t.s+=r,e.c+=n,t.z+=r,t.m+=r}function um(e,t,r){return e.a.parent===t.parent?e.a:r}function cm(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function hm(){var e=om,t=1,r=1,n=null;function o(o){var u=function(e){for(var t,r,n,o,i,a=new cm(e,0),s=[a];t=s.pop();)if(n=t._.children)for(t.children=new Array(i=n.length),o=i-1;o>=0;--o)s.push(r=t.children[o]=new cm(n[o],o)),r.parent=t;return(a.parent=new cm(null,0)).children=[a],a}(o);if(u.eachAfter(i),u.parent.m=-u.z,u.eachBefore(a),n)o.eachBefore(s);else{var c=o,h=o,l=o;o.eachBefore((function(e){e.x<c.x&&(c=e),e.x>h.x&&(h=e),e.depth>l.depth&&(l=e)}));var f=c===h?1:e(c,h)/2,d=f-c.x,p=t/(h.x+f+d),g=r/(l.depth||1);o.eachBefore((function(e){e.x=(e.x+d)*p,e.y=e.depth*g}))}return o}function i(t){var r=t.children,n=t.parent.children,o=t.i?n[t.i-1]:null;if(r){!function(e){for(var t,r=0,n=0,o=e.children,i=o.length;--i>=0;)(t=o[i]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(t);var i=(r[0].z+r[r.length-1].z)/2;o?(t.z=o.z+e(t._,o._),t.m=t.z-i):t.z=i}else o&&(t.z=o.z+e(t._,o._));t.parent.A=function(t,r,n){if(r){for(var o,i=t,a=t,s=r,u=i.parent.children[0],c=i.m,h=a.m,l=s.m,f=u.m;s=am(s),i=im(i),s&&i;)u=im(u),(a=am(a)).a=t,(o=s.z+l-i.z-c+e(s._,i._))>0&&(sm(um(s,t,n),t,o),c+=o,h+=o),l+=s.m,c+=i.m,f+=u.m,h+=a.m;s&&!am(a)&&(a.t=s,a.m+=l-h),i&&!im(u)&&(u.t=i,u.m+=c-f,n=t)}return n}(t,o,t.parent.A||n[0])}function a(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*r}return o.separation=function(t){return arguments.length?(e=t,o):e},o.size=function(e){return arguments.length?(n=!1,t=+e[0],r=+e[1],o):n?null:[t,r]},o.nodeSize=function(e){return arguments.length?(n=!0,t=+e[0],r=+e[1],o):n?[t,r]:null},o}!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=t._graph.size(),r=t._graph.graphData();return r.allEdges().forEach((function(e){return delete e.points})),r.allVertices().forEach((function(t){delete t.fx,delete t.fy,t.x=e.width/2+5*Math.random()-2.5,t.y=e.height/2+5*Math.random()-2.5})),t._graph.moveVertices(!0).moveEdges(!0),t.stop(),t}))}}(P_),nm.prototype=Z_.prototype={constructor:nm,count:function(){return this.eachAfter(Q_)},each:function(e){var t,r,n,o,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(e(i),r=i.children)for(n=0,o=r.length;n<o;++n)a.push(r[n])}while(a.length);return this},eachAfter:function(e){for(var t,r,n,o=this,i=[o],a=[];o=i.pop();)if(a.push(o),t=o.children)for(r=0,n=t.length;r<n;++r)i.push(t[r]);for(;o=a.pop();)e(o);return this},eachBefore:function(e){for(var t,r,n=this,o=[n];n=o.pop();)if(e(n),t=n.children)for(r=t.length-1;r>=0;--r)o.push(t[r]);return this},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,o=n&&n.length;--o>=0;)r+=n[o].value;t.value=r}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),o=null;e=r.pop(),t=n.pop();for(;e===t;)o=e,e=r.pop(),t=n.pop();return o}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var o=n.length;e!==r;)n.splice(o,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(r){r!==e&&t.push({source:r.parent,target:r})})),t},copy:function(){return Z_(this).eachBefore(tm)}},cm.prototype=Object.create(nm.prototype);var lm=A().x((function(e){return e.x})).y((function(e){return e.y})),fm=function(){function e(e,t,r,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=e),void 0===n&&(n=t),this.x1=e,this.y1=t,this.x2=r,this.y2=n}return Object.defineProperty(e.prototype,"x",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.x2-this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.y2-this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"center",{get:function(){return{x:this.x1+this.width/2,y:this.y1+this.height/2}},enumerable:!1,configurable:!0}),e.prototype.reset=function(e,t){this.x1=e,this.x2=e,this.y1=t,this.y2=t},e.prototype.expand=function(e,t){this.x1>e?this.x1=e:this.x2<e&&(this.x2=e),this.y1>t?this.y1=t:this.y2<t&&(this.y2=t)},e}(),dm=function(e){function t(t,r){var n=e.call(this,t)||this;return n.options=r,n._visited={},n}return s(t,e),t.prototype.sortTree=function(e,t){var r=this;t||(t=this._tree),t.children.sort((function(t,r){return e.neighbors(r.origData.id).length-e.neighbors(t.origData.id).length}));var n=[];t.children.forEach((function(e,t){t%2==0?n.push(e):n.unshift(e)})),t.children=n,t.children.forEach((function(t){return r.sortTree(e,t)}))},t.prototype.depthFirst=function(e,t,r){var n=this;if(void 0===r&&(this._visited={},this._tree=void 0),!this._visited[t.id]){this._visited[t.id]=t;var o={origData:t,children:[]};void 0===r?this._tree=o:r.children.push(o),e.neighbors(t.id).forEach((function(t){return n.depthFirst(e,t,o)}))}},t.prototype.breadthFirst=function(e,t){var r=this;this._visited={},this._visited[t.id]=t,this._tree={origData:t,children:[]};var n=[];n.push(this._tree);for(var o=function(){var t=n.shift();e.neighbors(t.origData.id).forEach((function(e){if(!r._visited[e.id]){r._visited[e.id]=e;var o={origData:e,children:[]};t.children.push(o),n.push(o)}}))};n.length;)o();this.sortTree(e)},t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){for(var e,r=t._graph.graphData(),n=0,o=r.allVertices();n<o.length;n++){var i=o[n];if(delete i.fx,delete i.fy,void 0===e&&(e=i),i.centroid){e=i;break}}return r.allEdges().forEach((function(e){return delete e.points})),t.breadthFirst(r,e),t._d3Hierarchy=Z_(t._tree),t}))},t.prototype.finalize=function(e){var t=this._graph.size(),r=new fm;e.forEach((function(e,t){0===t?r.reset(e.origData.x,e.origData.y):r.expand(e.origData.x,e.origData.y)}));var n=t.width/2-r.center.x,o=t.height/2-r.center.y;e.forEach((function(e){e.origData.x+=n,e.origData.y+=o})),this._graph.moveVertices(!0).moveEdges(!0),this.stop()},t}(P_),pm=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.options=r,n}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=hm().nodeSize(["TB"===t.options.rankdir?200:100,"TB"===t.options.rankdir?100:200])(t._d3Hierarchy).descendants().map((function(e){return e.data.origData.x="TB"===t.options.rankdir?e.x:e.y,e.data.origData.y="TB"===t.options.rankdir?e.y:e.x,e.data}));return t.finalize(e),t}))},t.prototype.edgePath=function(e,t){var r=this._graph.projectPlacholder(e.source),n=this._graph.projectPlacholder(e.target);return{path:lm({source:r,target:n}),labelPos:this.center([[r.x,r.y],[n.x,n.y]])}},t}(dm),gm=function(e){function t(t){return e.call(this,t,{})||this}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=hm().size([2*Math.PI,512]).separation((function(e,t){return(e.parent==t.parent?1:2)/e.depth}))(t._d3Hierarchy).descendants().map((function(e){return e.data.origData.angle=e.x,e.data.origData.radius=e.y,e.data.origData.x=Math.sin(e.x)*e.y,e.data.origData.y=Math.cos(e.x)*e.y,e.data}));return t.finalize(e),t}))},t}(dm),vm=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.options=r,n}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=J_().nodeSize(["TB"===t.options.rankdir?200:100,"TB"===t.options.rankdir?100:200])(t._d3Hierarchy).descendants().map((function(e){return e.data.origData.x="TB"===t.options.rankdir?e.x:e.y,e.data.origData.y="TB"===t.options.rankdir?e.y:e.x,e.data}));return t.finalize(e),t}))},t.prototype.edgePath=function(e,t){var r=this._graph.projectPlacholder(e.source),n=this._graph.projectPlacholder(e.target);return{path:lm({source:r,target:n}),labelPos:this.center([[r.x,r.y],[n.x,n.y]])}},t}(dm),ym=function(e){function t(t){return e.call(this,t,{})||this}return s(t,e),t.prototype.start=function(){var t=this;return e.prototype.start.call(this).then((function(){var e=J_().size([2*Math.PI,512]).separation((function(e,t){return(e.parent==t.parent?1:2)/e.depth}))(t._d3Hierarchy).descendants().map((function(e){return e.data.origData.x=Math.sin(e.x)*e.y,e.data.origData.y=Math.cos(e.x)*e.y,e.data}));return t.finalize(e),t}))},t}(dm);L(".graph_Graph2 .allowDragging .graphVertex,.graph_Graph2 .graphVertex{cursor:pointer}.graph_Graph2 .allowDragging .graphVertex.grabbed{cursor:grabbing}.graph_Graph2 .graphEdge{stroke:#a9a9a9;fill:none}.graph_Graph2 .graphEdge>text{stroke:none;fill:#000}.graph_Graph2 .graphEdge.hide-text>text{display:none}.graph_Graph2 g.selected circle,.graph_Graph2 g.selected rect{stroke:red!important}");var _m="".concat(r.getScriptSrc("/graph/lib-umd/graph2/graph")||r.getScriptSrc("/graph/dist/index")||".","/graph/dist"),mm=function(e){e.fx=e.sx=e.x,e.fy=e.sy=e.y},bm=function(e,t){e.fx=e.sx+t.fx-t.sx,e.fy=e.sy+t.fy-t.sy},wm=function(e){e.x=e.fx,e.y=e.fy,e.fx=e.sx=void 0,e.fy=e.sy=void 0},xm=function(e){function n(){var n=e.call(this)||this;n._toggleHierarchy=(new t.ToggleButton).faChar("fa-sitemap").tooltip("Hierarchy").on("click",(function(){return n.layoutClick("Hierarchy")})),n._toggleForceDirected=(new t.ToggleButton).faChar("fa-expand").tooltip("Force Directed").on("click",(function(){return n.layoutClick("ForceDirected")})),n._toggleForceDirected2=(new t.ToggleButton).faChar("fa-arrows").tooltip("Spring").on("click",(function(){return n.layoutClick("ForceDirected2")})),n._toggleCircle=(new t.ToggleButton).faChar("fa-circle-o").tooltip("Circle").on("click",(function(){return n.layoutClick("Circle")})),n._toggleDot=(new t.ToggleButton).faChar("fa-angle-double-down").tooltip("DOT").on("click",(function(){return n.layoutClick("DOT")})),n._toggleNeato=(new t.ToggleButton).faChar("fa-sun-o").tooltip("Neato").on("click",(function(){return n.layoutClick("Neato")})),n._toggleFDP=(new t.ToggleButton).faChar("fa-asterisk").tooltip("FDP").on("click",(function(){return n.layoutClick("FDP")})),n._toggleTwoPI=(new t.ToggleButton).faChar("fa-bullseye").tooltip("TwoPI").on("click",(function(){return n.layoutClick("TwoPI")})),n._toggleCirco=(new t.ToggleButton).faChar("fa-cogs").tooltip("Circo").on("click",(function(){return n.layoutClick("Circo")})),n._toggleT=(new t.ToggleButton).faChar("fa-sitemap fa-rotate-270").tooltip("Tree").on("click",(function(){return n.layoutClick("Tree")})),n._toggleRT=(new t.ToggleButton).faChar("fa-sun-o").tooltip("Radial Tree").on("click",(function(){return n.layoutClick("RadialTree")})),n._toggleD=(new t.ToggleButton).faChar("fa-sitemap fa-rotate-270").tooltip("Dendrogram").on("click",(function(){return n.layoutClick("Dendrogram")})),n._toggleRD=(new t.ToggleButton).faChar("fa-asterisk").tooltip("Radial Dendrogram").on("click",(function(){return n.layoutClick("RadialDendrogram")})),n._graphData=(new r.Graph2).idFunc((function(e){return e.id})).sourceFunc((function(e){return e.source.id})).targetFunc((function(e){return e.target.id})).updateFunc((function(e,t){return e.props=t.props,e})),n._prevDoClickTime=0,n._tooltip=new i.HTMLTooltip,n._selection=new t.Utility.Selection(n),n._dragHandler=t.drag(),n._catPalette=t.Palette.ordinal("hpcc10"),n._categories=[],n._annotations=[],n._origData={subgraphs:[],vertices:[],edges:[],hierarchy:[]},n._layoutAlgo=new q_(n),n.highlight={zoom:1.1,opacity:.33,edge:"1.25px"},n._centroidRenderer=o.Vertex,n._vertexRenderer=o.Vertex,n._transformScale=1;var a=n;n._drawStartPos="origin";var s=[n._toggleHierarchy,n._toggleForceDirected,n._toggleForceDirected2,n._toggleCircle,new t.Spacer,n._toggleDot,n._toggleNeato,n._toggleFDP,n._toggleTwoPI,n._toggleCirco,new t.Spacer,n._toggleT,n._toggleRT,n._toggleD,n._toggleRD,new t.Spacer];return n._iconBar.buttons(s.concat(n._iconBar.buttons())),n._dragHandler.on("start",(function(e){if(a.allowDragging()){t.select(this).classed("grabbed",!0),mm(e),t.Utility.safeRaise(this),a.moveVertexPlaceholder(e,!1,!0);var r=a.selection();a.selected(e.props,r)?r.filter((function(t){return t.id!==e.props.id})).forEach((function(e){var t=a._graphData.vertex(e.id);mm(t)})):a.dragSingleNeighbors()&&a._graphData.singleNeighbors(e.id).forEach((function(e){mm(e)}))}})).on("drag",(function(e){if(a.allowDragging()){e.fx=e.sx+a.rproject(t.d3Event().x-e.sx),e.fy=e.sy+a.rproject(t.d3Event().y-e.sy),a._graphData.vertexEdges(e.id).forEach((function(e){return delete e.points})),a.moveVertexPlaceholder(e,!1,!0);var r=a.selection();a.selected(e.props,r)?r.filter((function(t){return t.id!==e.props.id})).forEach((function(t){var r=a._graphData.vertex(t.id);bm(r,e),a.moveVertexPlaceholder(r,!1,!0)})):a.dragSingleNeighbors()&&a._graphData.singleNeighbors(e.id).forEach((function(t){bm(t,e),a.moveVertexPlaceholder(t,!1,!0)}))}})).on("end",(function(e){var r=!0;if(a.allowDragging()){r=Math.abs(e.sx-e.fx)<1&&Math.abs(e.sy-e.fy)<1,wm(e);var n=a.selection();a.selected(e.props,n)?n.filter((function(t){return t.id!==e.props.id})).forEach((function(e){var t=a._graphData.vertex(e.id);wm(t)})):a.dragSingleNeighbors()&&a._graphData.singleNeighbors(e.id).forEach(wm),t.select(this).classed("grabbed",!1)}if(r){a._selection.click({_id:e.id,element:function(){return e.element}},t.d3Event().sourceEvent),a.selectionChanged();var o=e.element.classed("selected");a.vertex_click(e.props.origData||e.props,"",o);var i=Date.now();i-a._prevDoClickTime<a.doubleClickMaxDelay()&&a.vertex_dblclick(e.props.origData||e.props,"",o),a._prevDoClickTime=i}})).filter((function(){return!0})),n.zoomToFitLimit(1),n}return s(n,e),n.prototype.iconBarButtons=function(){return this._iconBar.buttons()},n.prototype.categories=function(e){return void 0===e?this._categories:(this._categories=e,this)},n.prototype.annotations=function(e){return void 0===e?this._annotations:(this._annotations=e,this)},n.prototype.data=function(e,t){var r=this;return void 0===e?this._origData:(this._origData=e,this._graphData.mergeSubgraphs((e.subgraphs||[]).map((function(e){return{id:e.id,props:e}}))),this._graphData.mergeVertices((e.vertices||[]).map((function(e){return{id:e.id,centroid:e.centroid,props:e}}))),this._graphData.mergeEdges((e.edges||[]).filter((function(e){return r._graphData.vertexExists(e.source.id)&&r._graphData.vertexExists(e.target.id)})).map((function(e){return{id:e.id,props:e,source:r._graphData.vertex(e.source.id),target:r._graphData.vertex(e.target.id)}}))),this._graphData.clearParents(),(e.hierarchy?e.hierarchy:[]).forEach((function(e){r._graphData.subgraphExists(e.child.id)?r._graphData.subgraphParent(e.child.id,e.parent.id):r._graphData.vertexExists(e.child.id)&&r._graphData.vertexParent(e.child.id,e.parent.id)})),this)},n.prototype.selected=function(e,t){return(t||this.selection()).some((function(t){return t.id===e.id}))},n.prototype.selection=function(e){var t=this;return arguments.length?(this._selection.set(e.map((function(e){var r=t._graphData.item(e.id);return{_id:r.id,element:function(){return r.element}}}))),this):this._selection.get().map((function(e){return t._graphData.item(e._id).props}))},n.prototype.graphData=function(){return this._graphData},n.prototype.resetLayout=function(){return delete this._prevLayout,this},n.prototype.layoutRunning=function(){return this._layoutAlgo&&this._layoutAlgo.running()},n.prototype.layoutAlgo=function(e){var t=this;return this._layoutAlgo&&this._layoutAlgo.stop(),this._layoutAlgo=e,this._layoutAlgo.start().then((function(){t.updateIconBar(),t.applyScaleOnLayout()&&setTimeout((function(){t.zoomToFit()}),t.transitionDuration())}))},n.prototype.layoutClick=function(e){this.layoutRunning()?(this._layoutAlgo.stop(),this.updateIconBar()):(delete this._prevLayout,this.layout(e).render())},n.prototype.updateIconBarItem=function(e,t){var r=this.layout(),n=this._layoutAlgo&&this._layoutAlgo.running();e.enabled(!n||r===t).selected(n&&r===t).render()},n.prototype.updateIconBar=function(){e.prototype.updateIconBar.call(this),this.updateIconBarItem(this._toggleHierarchy,"Hierarchy"),this.updateIconBarItem(this._toggleDot,"DOT"),this.updateIconBarItem(this._toggleForceDirected,"ForceDirected"),this.updateIconBarItem(this._toggleNeato,"Neato"),this.updateIconBarItem(this._toggleFDP,"FDP"),this.updateIconBarItem(this._toggleForceDirected2,"ForceDirected2"),this.updateIconBarItem(this._toggleCircle,"Circle"),this.updateIconBarItem(this._toggleTwoPI,"TwoPI"),this.updateIconBarItem(this._toggleCirco,"Circo"),this.updateIconBarItem(this._toggleT,"Tree"),this.updateIconBarItem(this._toggleRT,"RadialTree"),this.updateIconBarItem(this._toggleD,"Dendrogram"),this.updateIconBarItem(this._toggleRD,"RadialDendrogram")},n.prototype.getNeighborMap=function(e){var t={},r={};if(e)for(var n=this._graphData.vertexEdges(e.id),o=0;o<n.length;++o){var i=this._graphData.edge(n[o].id);r[i.id]=i,i.source.id!==e.id&&(t[i.source.id]=i.source),i.target.id!==e.id&&(t[i.target.id]=i.target)}return{vertices:t,edges:r}},n.prototype.centerOnItem=function(e){var t,r,n,o=this._graphData.item(e);if((this._graphData.isSubgraph(o)||this._graphData.isVertex(o))&&(r=o.x,n=o.y),this._graphData.isEdge(o)&&(r=(t=[0,0])[0],n=t[1]),void 0!==r&&void 0!==n){var i=o.element.node().getBBox();if(this._graphData.isVertex(o)){var a=this.projectPlacholder(o);r=a.x,n=a.y}else this._graphData.isSubgraph(o)&&(r=this.project(o.x),n=this.project(o.y));var s=i.x+i.width/2,u=i.y+i.height/2,c={x:r+s-i.width/2,y:n+u-i.height/2,width:i.width,height:i.height};this.centerOnBBox(c)}},n.prototype.hideVertex=function(e){var t=this._graphData.item(e);return this._graphData.isVertex(t)&&(t.props.hidden=!0),this},n.prototype.showVertex=function(e){var t=this._graphData.item(e);return this._graphData.isVertex(t)&&(t.props.hidden=!1),this},n.prototype.highlightVerticies=function(e){var t=this,r=this,n=this._vertexG.selectAll(".graphVertex"),i=!r.showVertexLabels()&&r.showVertexLabelsOnHighlight();return n.classed("graphVertex-highlighted",(function(t){return!e||e[t.id]})).style("filter",(function(r){return e&&e[r.id]?"url(#"+t.id()+"_glow)":null})).each((function(t){if(i){var n=r.calcProps(t.centroid,u({showLabel:!(!e||!e[t.id])},r.vertexMapper(t.props,t.props.origData)));o.render(t.centroid?r._centroidRenderer:r._vertexRenderer,n,this)}})).transition().duration(this.transitionDuration()).on("end",(function(t){e&&e[t.id]&&t.element.node()&&t.element.node().parentNode&&t.element.node().parentNode.appendChild(t.element.node())})).style("opacity",(function(t){return t.props.hidden?0:!e||e[t.id]?1:r.highlight.opacity})),this},n.prototype.highlightEdges=function(e){var t=this;return this._edgeG.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:t.edgeStrokeWidth()+"px"})).transition().duration(this.transitionDuration()).style("opacity",(function(r){return r.source.props.hidden||r.target.props.hidden?0:!e||e[r.id]?1:t.highlight.opacity})),this},n.prototype.highlightVertex=function(e,t){if(this.highlightOnMouseOverVertex())if(t){var r=this.getNeighborMap(t);r.vertices[t.id]=t,this.highlightVerticies(r.vertices),this.highlightEdges(r.edges)}else this.highlightVerticies(null),this.highlightEdges(null)},n.prototype.highlightEdge=function(e,t){if(this.highlightOnMouseOverEdge())if(t){var r={};r[t.source.id]=t.source,r[t.target.id]=t.target;var n={};n[t.id]=t,this.highlightVerticies(r),this.highlightEdges(n)}else this.highlightVerticies(null),this.highlightEdges(null)},n.prototype.moveSubgraphPlaceholder=function(e,t){var r=this.project(e.x),n=this.project(e.y),i=this.project(e.props.width,!0),a=this.project(e.props.height,!0);return e.element&&(t?e.element.transition():e.element).attr("transform","translate(".concat(r," ").concat(n,")")).each((function(e){o.render(o.Subgraph,u(u({},e.props),{width:i,height:a}),this)})),this},n.prototype.moveEdgePlaceholder=function(e,t){var r,n,o=this._layoutAlgo.edgePath(e,this.edgeArcDepth());if(e.elementPath&&(t?e.elementPath.transition():e.elementPath).attr("d",o.path).attr("stroke-dasharray",(function(e){return e.props.strokeDasharray})),e.elementText){var i=null!==(n=null===(r=e.props.label)||void 0===r?void 0:r.split("\n"))&&void 0!==n?n:[];e.elementText.selectAll(".textLine").data(i,(function(e){return e})).join((function(e){return e.append("tspan").attr("class","textLine").attr("x",0)}),(function(e){return e.attr("dy",(function(e,t){return"".concat(t,"em")})).text((function(e){return e}))}),(function(e){return e.remove()})),(t?e.elementText.transition():e.elementText).attr("transform","translate(".concat(o.labelPos[0]," ").concat(o.labelPos[1],")")).attr("font-family",(function(e){return e.props.fontFamily||null}))}return this},n.prototype.moveVertexPlaceholder=function(e,t,r){var n=this,o=this.projectPlacholder(e),i=o.x,a=o.y;return e.element&&(t?e.element.transition():e.element).attr("transform","translate(".concat(i," ").concat(a,")")),r&&this._graphData.vertexEdges(e.id).forEach((function(e){return n.moveEdgePlaceholder(e,t)})),this},n.prototype.moveSubgraphs=function(e){var t=this;return this._graphData.allSubgraphs().forEach((function(r){return t.moveSubgraphPlaceholder(r,e)})),this},n.prototype.moveEdges=function(e){var t=this;return this._graphData.allEdges().forEach((function(r){return t.moveEdgePlaceholder(r,e)})),this},n.prototype.moveVertices=function(e){var t=this;return this._graphData.allVertices().forEach((function(r){return t.moveVertexPlaceholder(r,e,!1)})),this},n.prototype.project=function(e,t){void 0===t&&(t=!1);e=void 0!==e?e:0;var r=this._transformScale;return t&&(this._transformScale>this.maxScale()+(this._transformScale-this.maxScale())/2?r=this.maxScale()+(this._transformScale-this.maxScale())/2:(this._transformScale,this.minScale(),this._transformScale,this.minScale())),Math.round(e*r*10)/10},n.prototype.rproject=function(e){return e=void 0!==e?e:0,Math.round(e/this._transformScale*10)/10},n.prototype.projectPlacholder=function(e){return{x:this.project(void 0!==e.fx?e.fx:e.x),y:this.project(void 0!==e.fy?e.fy:e.y)}},n.prototype.categoryID=function(e,t){return void 0===t&&(t="cat"),void 0===e||""===e?"":"".concat(t).concat(this.id(),"_").concat(e)},n.prototype.updateCategories=function(){var e=this;o.render(o.Icons,{icons:this._categories.map((function(t){return u(u({},t),{id:e.categoryID(t.id),fill:t.fill||"transparent",imageCharFill:t.imageCharFill||e._catPalette(t.id)})}))},this._svgDefsCat.node())},n.prototype.updateAnnotations=function(){var e=this;o.render(o.Icons,{icons:this._annotations.map((function(t){return u(u({},t),{id:e.categoryID(t.id,"ann"),shape:t.shape||"square",height:t.height||12,fill:t.fill||e._catPalette(t.id)})}))},this._svgDefsAnn.node())},n.prototype.updateEdges=function(){var e=this,r=this;return this._edgeG.selectAll(".graphEdge").data(this._graphData.allEdges(),(function(e){return e.id})).join((function(e){return e.append("g").attr("class","graphEdge").on("click.selectionBag",(function(e){r._selection.click({_id:e.id,element:function(){return e.element}},t.d3Event()),r.selectionChanged()})).on("click",(function(e){var t=e.element.classed("selected");r.edge_click(e.props.origData||e.props,"",t)})).on("mouseover",(function(e){t.Utility.safeRaise(this),r.edge_mouseover(t.select(this),e)})).on("mouseout",(function(e){r.edge_mouseout(t.select(this),e)})).each((function(e){e.element=t.select(this),e.elementPath=e.element.append("path"),e.elementText=e.element.append("text").attr("text-anchor","middle")}))}),(function(e){return e.attr("opacity",(function(e){return e.source.props.hidden||e.target.props.hidden?0:1})).classed("hide-text",!r.showEdgeLabels())}),(function(e){return e.each((function(e){delete e.element})).remove()})).style("stroke",(function(t){var r,n;return null!==(n=null===(r=t.props)||void 0===r?void 0:r.color)&&void 0!==n?n:e.edgeColor()})).style("stroke-width",this.edgeStrokeWidth()+"px"),this},n.prototype.centroidRenderer=function(e){return arguments.length?(this._centroidRenderer=e,this):this._centroidRenderer},n.prototype.vertexRenderer=function(e){return arguments.length?(this._vertexRenderer=e,this):this._vertexRenderer},n.prototype.vertexMapper=function(e,t){var r=this;return u(u({},e),{categoryID:this.categoryID(e.categoryID),annotationIDs:e.annotationIDs?e.annotationIDs.map((function(e){return r.categoryID(e,"ann")})):[]})},n.prototype.updateVertices=function(){var e=this,r=this;return this._vertexG.selectAll(".graphVertex").data(this._graphData.allVertices(),(function(e){return e.id})).join((function(n){return n.append("g").attr("class","graphVertex").on("dblclick",(function(e){t.d3Event().stopPropagation()})).on("mousein",(function(e){t.Utility.safeRaise(this),r.highlightVertex(t.select(this),e);var n=e.element.classed("selected");r.vertex_mousein(e.props.origData||e.props,"",n)})).on("mouseover",(function(e){t.Utility.safeRaise(this),r.highlightVertex(t.select(this),e);var n=e.element.classed("selected");e.props.tooltip&&r._tooltip.tooltipHTML(r.tooltipHTML.bind(r)).triggerElement(e.element).tooltipWidth(r.tooltipWidth()).tooltipHeight(r.tooltipHeight()).enablePointerEvents(r.enableTooltipPointerEvents()).closeDelay(r.tooltipCloseDelay()).direction("n").data(e).visible(!0).render(),r.vertex_mouseover(e.props.origData||e.props,"",n)})).on("mouseout",(function(e){r.highlightVertex(null,null);var t=e.element.classed("selected");r.vertex_mouseout(e.props.origData||e.props,"",t),e.props.tooltip&&r._tooltip.mouseout()})).call(e._dragHandler).each((function(e){e.element=t.select(this)}))}),(function(e){return e}),(function(e){return e.each((function(e){delete e.element})).remove()})).classed("centroid",(function(e){return e.centroid})).attr("opacity",(function(e){return e.props.hidden?0:1})).attr("filter",(function(t){return t.centroid?"url(#"+e.id()+"_glow)":null})).each((function(e){var t=r.calcProps(e.centroid,u({showLabel:r.showVertexLabels()},r.vertexMapper(e.props,e.props.origData)));o.render(e.centroid?r._centroidRenderer:r._vertexRenderer,t,this)})),this},n.prototype.calcProps=function(e,t){t.icon||(t.icon={}),e?(t.textHeight=t.textHeight?t.textHeight:this.centroidTextHeight()*this.centroidScale(),t.textPadding=t.textPadding?t.textPadding:this.centroidTextPadding()*this.centroidScale(),t.textFontFamily=t.textFontFamily?t.textFontFamily:this.centroidLabelFontFamily(),t.icon.height=t.icon.height?t.icon.height:this.centroidIconHeight()*this.centroidScale(),t.icon.padding=t.icon.padding?t.icon.padding:this.centroidIconPadding()*this.centroidScale(),t.icon.strokeWidth=t.icon.strokeWidth?t.icon.strokeWidth:this.centroidIconStrokeWidth(),t.icon.imageFontFamily=t.icon.imageFontFamily?t.icon.imageFontFamily:this.centroidIconFontFamily()):(t.textHeight=t.textHeight?t.textHeight:this.vertexTextHeight(),t.textPadding=t.textPadding?t.textPadding:this.vertexTextPadding(),t.textFontFamily=t.textFontFamily?t.textFontFamily:this.vertexLabelFontFamily(),t.icon.height=t.icon.height?t.icon.height:this.vertexIconHeight(),t.icon.padding=t.icon.padding?t.icon.padding:this.vertexIconPadding(),t.icon.strokeWidth=t.icon.strokeWidth?t.icon.strokeWidth:this.vertexIconStrokeWidth(),t.icon.imageFontFamily=t.icon.imageFontFamily?t.icon.imageFontFamily:this.vertexIconFontFamily());var r=t.icon.imageChar,n=t.icon.imageFontFamily,o=t.icon.height-t.icon.padding,i=this.textRect(r,n,o);return t.icon.yOffset=-(i.top-o/2)-i.height/2+(t.icon.padding>0?o/t.icon.padding/2:0),t},n.prototype.hasSubgraphs=function(){switch(this.layout()){case"DOT":case"Hierarchy":return!0}return!1},n.prototype.updateSubgraphs=function(){var e=this;return this._subgraphG.selectAll(".subgraphPlaceholder").data(this.hasSubgraphs()?this._graphData.allSubgraphs():[],(function(e){return e.id})).join((function(r){return r.append("g").attr("class","subgraphPlaceholder").on("click.selectionBag",(function(r){e._selection.click({_id:r.id,element:function(){return r.element}},t.d3Event()),e.selectionChanged()})).on("click",(function(t){var r=t.element.classed("selected");e.subgraph_click(t.props.origData||t.props,"",r)})).on("mouseover",(function(){t.Utility.safeRaise(this)})).each((function(e){e.element=t.select(this)}))}),(function(e){return e}),(function(e){return e.each((function(e){delete e.element})).transition().style("opacity",0).remove()})).each((function(t){e.moveSubgraphPlaceholder(t,!1)})),this},n.prototype.enter=function(r,n){var o=this;e.prototype.enter.call(this,r,n);var i=this.locateSVGNode(r);this._svgDefs=t.select(i).select("defs"),this._centroidFilter=new t.SVGGlowFilter(this._svgDefs,this._id+"_glow"),this._svgDefsCat=this._svgDefs.append("g"),this._svgDefsAnn=this._svgDefs.append("g"),this._subgraphG=this._renderElement.append("g"),this._edgeG=this._renderElement.append("g"),this._vertexG=this._renderElement.append("g"),this._tooltip.target(r),this.on("startMarqueeSelection",(function(){})).on("updateMarqueeSelection",(function(e){var t=o._graphData.allVertices().filter((function(t){return t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height}));o.selection(t.map((function(e){return e.props})))})).on("endMarqueeSelection",(function(){o.selectionChanged()}))},n.prototype.forceDirectedOptions=function(){return{alpha:this.forceDirectedAlpha(),alphaMin:this.forceDirectedAlphaMin(),alphaDecay:this.forceDirectedAlphaDecay(),velocityDecay:this.forceDirectedVelocityDecay(),repulsionStrength:this.forceDirectedRepulsionStrength(),iterations:this.forceDirectedIterations(),linkDistance:this.forceDirectedLinkDistance(),linkStrength:this.forceDirectedLinkStrength(),pinCentroid:this.forceDirectedPinCentroid(),forceStrength:this.forceDirectedForceStrength(),distanceMin:this.forceDirectedMinDistance(),distanceMax:this.forceDirectedMaxDistance()}},n.prototype.layoutOptions=function(e){switch(e){case"ForceDirected":case"ForceDirected2":case"ForceDirectedHybrid":return this.forceDirectedOptions();case"Hierarchy":return{rankdir:this.hierarchyRankDirection(),nodesep:this.hierarchyNodeSeparation(),edgesep:this.hierarchyEdgeSeparation(),ranksep:this.hierarchyRankSeparation(),digraph:this.hierarchyDigraph()};case"Tree":case"Dendrogram":return{rankdir:this.treeRankDirection()};case"DOT":case"Neato":case"FDP":case"TwoPI":case"Circo":return this.wasmFolder()||_m;default:return}},n.prototype.updateLayout=function(){var e=this,t=this.layout(),n=this.layoutOptions(t),o=r.hashSum([t,n]);if(this._prevLayout!==o)switch(this._prevLayout=o,t){case"None":this.layoutAlgo(new q_(this));break;case"Circle":this.layoutAlgo(new N_(this));break;case"ForceDirected":this.layoutAlgo(new V_(this,n));break;case"ForceDirected2":this.layoutAlgo(new G_(this,n));break;case"ForceDirectedHybrid":this.layoutAlgo(new V_(this,n)).then((function(){e.layoutAlgo(new G_(e,n))}));break;case"Hierarchy":this.layoutAlgo(new B_(this,n));break;case"DOT":this.layoutAlgo(new W_(this,"dot",n));break;case"Tree":this.layoutAlgo(new pm(this,n));break;case"RadialTree":this.layoutAlgo(new gm(this));break;case"Dendrogram":this.layoutAlgo(new vm(this,n));break;case"RadialDendrogram":this.layoutAlgo(new ym(this));break;case"Neato":this.layoutAlgo(new W_(this,"neato",n));break;case"FDP":this.layoutAlgo(new W_(this,"fdp",n));break;case"TwoPI":this.layoutAlgo(new W_(this,"twopi",n));break;case"Circo":this.layoutAlgo(new W_(this,"circo",n))}},n.prototype.update=function(t,r){e.prototype.update.call(this,t,r),this._centroidFilter.update(this.centroidColor()),this._renderElement.classed("allowDragging",this.allowDragging()),this.updateCategories(),this.updateAnnotations(),this.updateSubgraphs(),this.updateVertices(),this.updateEdges(),this.updateLayout(),this.updateIconBar()},n.prototype.exit=function(t,r){e.prototype.exit.call(this,t,r),this._tooltip.target(null)},n.prototype.render=function(t){var r=this;return this.progress("start"),e.prototype.render.call(this,(function(e){r.progress("stop"),t&&t(e)})),this},n.prototype.zoomed=function(t){e.prototype.zoomed.call(this,t);var r=this.size(),n=r.width,o=r.height;t.k<this.minScale()?(this._edgeG.attr("transform","scale(".concat(this.minScale()/t.k,")")),this._subgraphG.attr("transform","scale(".concat(this.minScale()/t.k,")")),this._vertexG.attr("transform","scale(".concat(this.minScale()/t.k,")")),this._transformScale=t.k/this.minScale()):t.k>this.maxScale()?(this._edgeG.attr("transform","scale(".concat(this.maxScale()/t.k,")")),this._subgraphG.attr("transform","scale(".concat(this.maxScale()/t.k,")")),this._vertexG.attr("transform","scale(".concat(this.maxScale()/t.k,")")),this._transformScale=t.k/this.maxScale()):(this._transformScale=1,this._edgeG.attr("transform",null),this._subgraphG.attr("transform",null),this._vertexG.attr("transform",null)),this._prevTransformScale===this._transformScale&&this._prevWidth===n&&this._prevHeight===o||(this._prevTransformScale=this._transformScale,this._prevWidth=n,this._prevHeight=o,this.moveSubgraphs(!1).moveVertices(!1).moveEdges(!1))},n.prototype.centroids=function(){return this._graphData.allVertices().filter((function(e){return!!e.centroid}))},n.prototype.selectionChanged=function(){var e=this;if(this.highlightSelectedPathToCentroid()){var t={};this.centroids().forEach((function(r){e.selection().forEach((function(n){var o=e._graphData.dijkstra(r.id,n.id),i=o.ids;o.len&&i.forEach((function(e){t[e]=!0}))}))})),this._edgeG.selectAll(".graphEdge")}},n.prototype.tooltipHTML=function(e){return e.props.tooltip},n.prototype.subgraph_click=function(e,t,r){},n.prototype.vertex_click=function(e,t,r){},n.prototype.vertex_dblclick=function(e,t,r){},n.prototype.vertex_mousein=function(e,t,r){},n.prototype.vertex_mouseover=function(e,t,r){},n.prototype.vertex_mouseout=function(e,t,r){},n.prototype.edge_click=function(e,t,r){},n.prototype.edge_mouseover=function(e,t){this.highlightEdge(e,t)},n.prototype.edge_mouseout=function(e,t){this.highlightEdge(null,null)},n.prototype.progress=function(e){},n}(t.SVGZoomWidget);xm.prototype._class+=" graph_Graph2",xm.prototype.publish("allowDragging",!0,"boolean","Allow Dragging of Vertices"),xm.prototype.publish("dragSingleNeighbors",!0,"boolean","Dragging a Vertex also moves its singleton neighbors"),xm.prototype.publish("layout","ForceDirectedHybrid","set","Default Layout",["Hierarchy","DOT","Tree","Dendrogram","RadialTree","RadialDendrogram","ForceDirected","ForceDirected2","ForceDirectedHybrid","Neato","FDP","Circle","TwoPI","Circo","None"]),xm.prototype.publish("scale","100%","set","Zoom Level",["all","width","selection","100%","90%","75%","50%","25%","10%"]),xm.prototype.publish("applyScaleOnLayout",!1,"boolean","Shrink to fit on Layout"),xm.prototype.publish("highlightOnMouseOverVertex",!0,"boolean","Highlight Vertex on Mouse Over"),xm.prototype.publish("highlightOnMouseOverEdge",!0,"boolean","Highlight Edge on Mouse Over"),xm.prototype.publish("transitionDuration",250,"number","Transition Duration"),xm.prototype.publish("showEdges",!0,"boolean","Show Edges"),xm.prototype.publish("showEdgeLabels",!0,"boolean","Show Edge labels"),xm.prototype.publish("showEdgeLabelsOnHighlight",!0,"boolean","Show Edge labels when highlighted"),xm.prototype.publish("showVertexLabels",!0,"boolean","Show Vertex labels"),xm.prototype.publish("showVertexLabelsOnHighlight",!0,"boolean","Show Vertex labels when highlighted"),xm.prototype.publish("snapToGrid",0,"number","Snap to Grid"),xm.prototype.publish("selectionClearOnBackgroundClick",!1,"boolean","Clear selection on background click"),xm.prototype.publish("edgeArcDepth",8,"number","Edge Arc Depth"),xm.prototype.publish("edgeColor",null,"html-color","Edge line stroke color",null,{optional:!0}),xm.prototype.publish("edgeStrokeWidth",1,"number","Edge line stroke width (pixels)"),xm.prototype.publish("minScale",.6,"number","Min scale size for text"),xm.prototype.publish("maxScale",1,"number","Max scale size for text"),xm.prototype.publish("tooltipWidth",256,"number","Tooltip width (pixels)"),xm.prototype.publish("tooltipHeight",128,"number","Tooltip width (pixels)"),xm.prototype.publish("enableTooltipPointerEvents",!1,"boolean","If true, tooltip will use the style: 'pointer-events: all'"),xm.prototype.publish("tooltipCloseDelay",0,"number","Number of milliseconds to wait before closing tooltip (cancelled on tooltip mouseover event)"),xm.prototype.publish("doubleClickMaxDelay",300,"number","Number of milliseconds to wait before a subsequent click is not considered a double click"),xm.prototype.publish("centroidColor","#00A000","html-color","Centroid Glow Color"),xm.prototype.publish("centroidScale",1,"number","Centroid Scale"),xm.prototype.publish("centroidTextHeight",12,"number","Centroid Text Height"),xm.prototype.publish("centroidTextPadding",4,"number","Centroid Text Padding"),xm.prototype.publish("centroidIconHeight",50,"number","Centroid Icon Height"),xm.prototype.publish("centroidIconPadding",10,"number","Centroid Icon Padding"),xm.prototype.publish("centroidIconStrokeWidth",4,"number","Centroid Icon Stroke Width"),xm.prototype.publish("centroidIconFontFamily","FontAwesome","string","Centroid Icon Font Family"),xm.prototype.publish("centroidLabelFontFamily","FontAwesome","string","Centroid Label Font Family"),xm.prototype.publish("vertexTextHeight",10,"number","Vertex Text Height"),xm.prototype.publish("vertexTextPadding",4,"number","Vertex Text Padding"),xm.prototype.publish("vertexIconHeight",50,"number","Vertex Icon Height"),xm.prototype.publish("vertexIconPadding",10,"number","Vertex Icon Padding"),xm.prototype.publish("vertexIconStrokeWidth",0,"number","Vertex Icon Stroke Width"),xm.prototype.publish("vertexIconFontFamily","FontAwesome","string","Vertex Icon Font Family"),xm.prototype.publish("vertexLabelFontFamily","FontAwesome","string","Vertex Label Font Family"),xm.prototype.publish("highlightSelectedPathToCentroid",!0,"boolean","Highlight path to Center Vertex (for selected vertices)"),xm.prototype.publish("hierarchyRankDirection","TB","set","Direction for Rank Nodes",["TB","BT","LR","RL"],{disable:function(e){return"Hierarchy"!==e.layout()}}),xm.prototype.publish("hierarchyNodeSeparation",50,"number","Number of pixels that separate nodes horizontally in the layout",null,{disable:function(e){return"Hierarchy"!==e.layout()}}),xm.prototype.publish("hierarchyEdgeSeparation",10,"number","Number of pixels that separate edges horizontally in the layout",null,{disable:function(e){return"Hierarchy"!==e.layout()}}),xm.prototype.publish("hierarchyRankSeparation",50,"number","Number of pixels between each rank in the layout",null,{disable:function(e){return"Hierarchy"!==e.layout()}}),xm.prototype.publish("hierarchyDigraph",!0,"boolean","Directional Graph2",null,{disable:function(e){return"Hierarchy"!==e.layout()}}),xm.prototype.publish("forceDirectedAlpha",1,"number","Alpha",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("forceDirectedAlphaMin",.001,"number","Min Alpha",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("forceDirectedAlphaDecay",.0228,"number","Defaults to 1 - pow(alphaMin, 1 / 300)",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("forceDirectedRepulsionStrength",-350,"number","Charge strength ",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("forceDirectedVelocityDecay",.4,"number","Velocity Decay ",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("forceDirectedIterations",300,"number","Iterations",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("forceDirectedLinkDistance",300,"number","Target distance between linked nodes",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("forceDirectedLinkStrength",1,"number","Strength (rigidity) of links",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("forceDirectedPinCentroid",!1,"boolean","Pin centroid to center",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("forceDirectedForceStrength",0,"number","Strength of center force",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("forceDirectedMinDistance",1,"number","Min distance between nodes",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("forceDirectedMaxDistance",1/0,"number","Max distance between nodes",null,{disable:function(e){return 0!==e.layout().indexOf("ForceDirected")}}),xm.prototype.publish("treeRankDirection","LR","set","Direction for Rank Nodes",["TB","LR"],{disable:function(e){return"Tree"!==e.layout()&&"Dendrogram"!==e.layout()}}),xm.prototype.publish("wasmFolder",null,"string","WASM Folder",null,{optional:!0,disable:function(e){return["DOT","Neato","FDP","TwoPI","Circo"].indexOf(e.layout())<0}});var Em=xm.prototype.scale;function km(e,t){var r={};return t.forEach((function(t,n){return r[t]=e[n]})),r}xm.prototype.scale=function(e,t){var r=Em.apply(this,arguments);return arguments.length&&this.zoomTo(e,t),r};var Sm=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return s(r,e),r.prototype.owner=function(e){return arguments.length?(this._owner=e,this):this._owner},r.prototype.valid=function(){return!!this.columnID()},c([t.publish("","set","Annotation column (boolean)",(function(){return this._owner.vertexColumns()})),h("design:type",Function)],r.prototype,"columnID",void 0),c([t.publish("","string","Annotation ID"),h("design:type",Function)],r.prototype,"annotationID",void 0),r}(t.PropertyExt);Sm.prototype._class+=" graph_AnnotationColumn";var Dm=function(e){function n(){var t=e.call(this)||this;return t._prevSubgraphs=[],t._masterSubgraphs=[],t._masterSubgraphsMap={},t._prevVertices=[],t._masterVertices=[],t._masterVerticesMap={},t._prevEdges=[],t._masterEdges=[],t._masterEdgesMap={},t._prevHierarchy=[],t._masterHierarchy=[],t._masterHierarchyMap={},t.vertexRenderer(o.Vertex3).centroidRenderer(o.CentroidVertex3).edgeColor("#287EC4").edgeStrokeWidth(2).edgeArcDepth(0),t}return s(n,e),n.prototype.clear=function(){this._prevSubgraphs=[],this._masterSubgraphs=[],this._masterSubgraphsMap={},this._prevVertices=[],this._masterVertices=[],this._masterVerticesMap={},this._prevEdges=[],this._masterEdges=[],this._prevHierarchy=[],this._masterHierarchy=[],this._masterHierarchyMap={},this._graphData.clear(),this.resetLayout()},n.prototype.indexOf=function(e,t,r){void 0===r&&(r="");var n=e.indexOf(t);return n>=0?n:e.indexOf(r)},n.prototype.mergeSubgraphs=function(){var e=this,t=this.subgraphColumns(),n=this.indexOf(t,this.subgraphIDColumn(),"id"),o=this.indexOf(t,this.subgraphLabelColumn(),"label"),i=this.subgraphs().map((function(e){return{id:""+e[n],text:""+e[o],origData:km(e,t)}})),a=r.compare2(this._prevSubgraphs,i,(function(e){return e.id}));a.exit.forEach((function(t){e._masterSubgraphs=e._masterSubgraphs.filter((function(e){return e.id!==t.id})),delete e._masterSubgraphsMap[t.id]})),a.enter.forEach((function(t){e._masterSubgraphs.push(t),e._masterSubgraphsMap[t.id]=t})),a.update.forEach((function(t){e._masterSubgraphsMap[t.id].origData=t.origData})),this._prevSubgraphs=i},n.prototype.mergeVertices=function(){var e=this,t=this.vertexColumns(),n=this.vertexAnnotationColumns(),o=this.indexOf(t,this.vertexCategoryColumn(),"category"),i=this.indexOf(t,this.vertexIDColumn(),"id"),a=this.indexOf(t,this.vertexLabelColumn(),"label"),s=this.indexOf(t,this.vertexCentroidColumn(),"centroid"),u=this.indexOf(t,this.vertexFACharColumn(),"faChar"),c=this.indexOf(t,this.vertexTooltipColumn(),"tooltip"),h=n.map((function(r){return e.indexOf(t,r.columnID(),"")})),l=this.vertices().map((function(r){return{categoryID:""+r[o],id:""+r[i],text:""+r[a],tooltip:""+r[c],origData:km(r,t),centroid:!!r[s],icon:{imageChar:""+(r[u]||e.vertexFAChar())},annotationIDs:h.map((function(e,t){return r[e]?n[t].annotationID():void 0})).filter((function(e){return!!e}))}})),f=r.compare2(this._prevVertices,l,(function(e){return e.id}));f.exit.forEach((function(t){e._masterVertices=e._masterVertices.filter((function(e){return e.id!==t.id})),delete e._masterVerticesMap[t.id]})),f.enter.forEach((function(t){e._masterVertices.push(t),e._masterVerticesMap[t.id]=t})),f.update.forEach((function(t){e._masterVerticesMap[t.id].origData=t.origData})),this._prevVertices=l},n.prototype.mergeEdges=function(){var e=this,t=this.edgeColumns(),n=this.indexOf(t,this.edgeIDColumn(),"id"),o=this.indexOf(t,this.edgeSourceColumn(),"source"),i=this.indexOf(t,this.edgeTargetColumn(),"target"),a=this.indexOf(t,this.edgeLabelColumn(),"label"),s=this.indexOf(t,this.edgeWeightColumn(),"weight"),u=this.indexOf(t,this.edgeColorColumn(),"color"),c=this.edges().map((function(r){var c=e._masterVerticesMap[""+r[o]];c||console.error('Invalid edge source entity "'.concat(r[o],'" does not exist.'));var h=e._masterVerticesMap[""+r[i]];return h||console.error('Invalid edge target entity "'.concat(r[i],'" does not exist.')),{type:"edge",id:n>=0?""+r[n]:r[o]+"->"+r[i],source:c,target:h,weight:+r[s]||1,color:r[u],label:a>=0?""+r[a]:"",origData:km(r,t)}})).filter((function(e){return e.source&&e.target})),h=r.compare2(this._masterEdges,c,(function(e){return e.id}));h.exit.forEach((function(t){e._masterEdges=e._masterEdges.filter((function(e){return e.id!==t.id})),delete e._masterEdgesMap[t.id]})),h.enter.forEach((function(t){e._masterEdges.push(t),e._masterEdgesMap[t.id]=t})),h.update.forEach((function(t){e._masterEdgesMap[t.id].origData=t.origData})),this._prevEdges=c},n.prototype.mergeHierarchy=function(){var e=this,t=this.hierarchyColumns(),n=this.indexOf(t,this.hierarchyParentIDColumn(),"parentID"),o=this.indexOf(t,this.hierarchyChildIDColumn(),"childID"),i=this.hierarchy().map((function(t){return{id:t[n]+"=>"+t[o],parent:e._masterSubgraphsMap[""+t[n]],child:e._masterSubgraphsMap[""+t[o]]||e._masterVerticesMap[""+t[o]]}})),a=r.compare2(this._prevHierarchy,i,(function(e){return e.id}));a.exit.forEach((function(t){e._masterHierarchy=e._masterHierarchy.filter((function(e){return e.id!==t.id})),delete e._masterHierarchyMap[t.id]})),a.enter.forEach((function(t){e._masterHierarchy.push(t),e._masterHierarchyMap[t.id]=t})),this._prevHierarchy=i},n.prototype.update=function(t,r){this.mergeSubgraphs(),this.mergeVertices(),this.mergeEdges(),this.mergeHierarchy(),this.data({subgraphs:this._masterSubgraphs,vertices:this._masterVertices,edges:this._masterEdges,hierarchy:this._masterHierarchy}),e.prototype.update.call(this,t,r)},n.prototype.render=function(t){return e.prototype.render.call(this,(function(e){t&&t(e)})),this},c([t.publish([],"any","Subgraph Columns",null,{internal:!0}),h("design:type",Function)],n.prototype,"subgraphColumns",void 0),c([t.publish([],"any","Subgraphs",null,{internal:!0}),h("design:type",Function)],n.prototype,"subgraphs",void 0),c([t.publish("","string","Subgraph ID column"),h("design:type",Function)],n.prototype,"subgraphIDColumn",void 0),c([t.publish("","string","Subgraph Label column"),h("design:type",Function)],n.prototype,"subgraphLabelColumn",void 0),c([t.publish([],"any","Vertex Columns",null,{internal:!0}),h("design:type",Function)],n.prototype,"vertexColumns",void 0),c([t.publish([],"any","Vertices (Nodes)",null,{internal:!0}),h("design:type",Function)],n.prototype,"vertices",void 0),c([t.publish("","set","Vertex Category ID column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexCategoryColumn",void 0),c([t.publish("","set","Vertex ID column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexIDColumn",void 0),c([t.publish("","set","Vertex label column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexLabelColumn",void 0),c([t.publish("","set","Vertex centroid column (boolean)",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexCentroidColumn",void 0),c([t.publish("?","string","Vertex default FAChar"),h("design:type",Function)],n.prototype,"vertexFAChar",void 0),c([t.publish("","set","Vertex FAChar column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexFACharColumn",void 0),c([t.publish("","set","Vertex tooltip column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexTooltipColumn",void 0),c([t.publish([],"propertyArray","Annotations",null,{autoExpand:Sm}),h("design:type",Function)],n.prototype,"vertexAnnotationColumns",void 0),c([t.publish([],"any","Edge columns",null,{internal:!0}),h("design:type",Function)],n.prototype,"edgeColumns",void 0),c([t.publish([],"any","Edges (Edges)",null,{internal:!0}),h("design:type",Function)],n.prototype,"edges",void 0),c([t.publish("","set","Edge ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeIDColumn",void 0),c([t.publish("","set","Edge label column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeLabelColumn",void 0),c([t.publish("","set","Edge source ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeSourceColumn",void 0),c([t.publish("","set","Edge target ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeTargetColumn",void 0),c([t.publish("","set","Edge weight column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeWeightColumn",void 0),c([t.publish("","set","Edge color column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeColorColumn",void 0),c([t.publish([],"any","Subgraph Columns"),h("design:type",Function)],n.prototype,"hierarchyColumns",void 0),c([t.publish([],"any","Subgraphs"),h("design:type",Function)],n.prototype,"hierarchy",void 0),c([t.publish("","string","Subgraph ID column"),h("design:type",Function)],n.prototype,"hierarchyParentIDColumn",void 0),c([t.publish("","string","Subgraph Label column"),h("design:type",Function)],n.prototype,"hierarchyChildIDColumn",void 0),n}(xm);Dm.prototype._class+=" graph_DataGraph";L(".graph_SankeyGraph .node rect{fill-opacity:.9;shape-rendering:crispEdges;stroke:#a9a9a9;cursor:move}.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}");var Cm=function(e){function n(){var r=e.call(this)||this;return r._prevVertices=[],r._masterVertices=[],r._masterVerticesMap={},r._prevEdges=[],r._masterEdges=[],t.Utility.SimpleSelectionMixin.call(r),r._drawStartPos="origin",r}return s(n,e),n.prototype.mergeVertices=function(){var e=this,t=this.vertexColumns(),n=this.vertexAnnotationColumns(),o=this.indexOf(t,this.vertexCategoryColumn(),"category"),i=this.indexOf(t,this.vertexIDColumn(),"id"),a=this.indexOf(t,this.vertexLabelColumn(),"label"),s=this.indexOf(t,this.vertexCentroidColumn(),"centroid"),u=this.indexOf(t,this.vertexFACharColumn(),"faChar"),c=this.indexOf(t,this.vertexTooltipColumn(),"tooltip"),h=n.map((function(r){return e.indexOf(t,r.columnID(),"")})),l=this.vertices().map((function(r){return{categoryID:""+r[o],id:""+r[i],text:""+r[a],tooltip:""+r[c],origData:km(r,t),centroid:!!r[s],icon:{imageChar:""+(r[u]||e.vertexFAChar())},annotationIDs:h.map((function(e,t){return r[e]?n[t].annotationID():void 0})).filter((function(e){return!!e}))}})),f=r.compare2(this._prevVertices,l,(function(e){return e.id}));f.exit.forEach((function(t){e._masterVertices=e._masterVertices.filter((function(e){return e.id!==t.id}))})),f.enter.forEach((function(t){e._masterVertices.push(t),e._masterVerticesMap[t.id]=t})),this._prevVertices=l},n.prototype.indexOf=function(e,t,r){void 0===r&&(r="");var n=e.indexOf(t);return n>=0?n:e.indexOf(r)},n.prototype.mergeEdges=function(){var e=this,t=this.edgeColumns(),n=this.indexOf(t,this.edgeIDColumn(),"id"),o=this.indexOf(t,this.edgeSourceColumn(),"source"),i=this.indexOf(t,this.edgeTargetColumn(),"target"),a=this.indexOf(t,this.edgeLabelColumn(),"label"),s=this.indexOf(t,this.edgeWeightColumn(),"weight"),u=this.edges().map((function(r){var u=e._masterVerticesMap[""+r[o]];u||console.error('Invalid edge source entity "'.concat(r[o],'" does not exist.'));var c=e._masterVerticesMap[""+r[i]];return c||console.error('Invalid edge target entity "'.concat(r[i],'" does not exist.')),{type:"edge",id:n>=0?""+r[n]:r[o]+"->"+r[i],source:u,target:c,value:+r[s]||0,label:a>=0?""+r[a]:"",origData:km(r,t)}})).filter((function(e){return e.source&&e.target})),c=r.compare2(this._masterEdges,u,(function(e){return e.id}));c.exit.forEach((function(t){e._masterEdges=e._masterEdges.filter((function(e){return e.id!==t.id}))})),c.enter.forEach((function(t){e._masterEdges.push(t)})),this._prevEdges=u},n.prototype.sankeyData=function(){return this.mergeVertices(),this.mergeEdges(),{vertices:this._masterVertices,edges:this._masterEdges}},n.prototype.enter=function(t,r){e.prototype.enter.call(this,t,r),this._d3Sankey=S_(),this._selection.widgetElement(r)},n.prototype.update=function(r,n){e.prototype.update.call(this,r,n),this._palette=this._palette.switch(this.paletteID());var o=this.vertexStrokeWidth(),i=this.sankeyData();this._d3Sankey.nodeId((function(e){return e.id})).extent([[0,0],[this.width(),this.height()]]),i.vertices.length>0&&this._d3Sankey({nodes:i.vertices,links:i.edges});var a=this,s=n.selectAll(".link").data(i.edges);s.enter().append("path").attr("class","link").each((function(){t.select(this).append("title")})).merge(s).attr("d",A_()).style("stroke-width",(function(e){return Math.max(1,e.width)})).select("title").text((function(e){return e.source.text+" → "+e.target.text+"\n"+e.value})),s.exit().remove();var u=n.selectAll(".node").data(i.vertices);u.enter().append("g").attr("class","node").call(this._selection.enter.bind(this._selection)).on("click",(function(e){a.click(e.origData,"",a._selection.selected(this))})).on("dblclick",(function(e){a.dblclick(e.origData,"",a._selection.selected(this))})).each((function(){var e=t.select(this);e.append("rect"),e.append("text")})).merge(u).attr("transform",(function(e){var t=0,r=0;return e.x0&&(t=e.x0),e.y0&&(r=e.y0),"translate("+(t+o)+","+(r+o)+")"})).each((function(){var e=t.select(this);e.select("rect").attr("height",(function(e){return e.y1-e.y0})).attr("width",(function(e){return e.x1-e.x0})).style("fill",(function(e){return a._palette(e.categoryID)})).style("stroke",(function(e){return a.vertexStrokeColor()})).style("stroke-width",(function(e){return o})).style("cursor",a.xAxisMovement()||a.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.text})).filter((function(e){return e.x0<a.width()/2})).attr("x",6+a._d3Sankey.nodeWidth()).attr("text-anchor","start")})),u.exit().remove()},n.prototype.exit=function(t,r){e.prototype.exit.call(this,t,r)},n.prototype.click=function(e,t,r){},n.prototype.dblclick=function(e,t,r){},c([t.publish([],"any","Vertex Columns",null,{internal:!0}),h("design:type",Function)],n.prototype,"vertexColumns",void 0),c([t.publish([],"any","Vertices (Nodes)",null,{internal:!0}),h("design:type",Function)],n.prototype,"vertices",void 0),c([t.publish("","set","Vertex Category ID column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexCategoryColumn",void 0),c([t.publish("","set","Vertex ID column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexIDColumn",void 0),c([t.publish("","set","Vertex label column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexLabelColumn",void 0),c([t.publish("","set","Vertex centroid column (boolean)",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexCentroidColumn",void 0),c([t.publish("?","string","Vertex default FAChar"),h("design:type",Function)],n.prototype,"vertexFAChar",void 0),c([t.publish("","set","Vertex FAChar column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexFACharColumn",void 0),c([t.publish("","set","Vertex tooltip column",(function(){return this.vertexColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"vertexTooltipColumn",void 0),c([t.publish([],"propertyArray","Annotations",null,{autoExpand:Sm}),h("design:type",Function)],n.prototype,"vertexAnnotationColumns",void 0),c([t.publish([],"any","Edge columns",null,{internal:!0}),h("design:type",Function)],n.prototype,"edgeColumns",void 0),c([t.publish([],"any","Edges (Edges)",null,{internal:!0}),h("design:type",Function)],n.prototype,"edges",void 0),c([t.publish("","set","Edge ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeIDColumn",void 0),c([t.publish("","set","Edge label column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeLabelColumn",void 0),c([t.publish("","set","Edge source ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeSourceColumn",void 0),c([t.publish("","set","Edge target ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeTargetColumn",void 0),c([t.publish("","set","Edge target ID column",(function(){return this.edgeColumns()}),{optional:!0}),h("design:type",Function)],n.prototype,"edgeWeightColumn",void 0),n}(t.SVGWidget);Cm.prototype._class+=" graph_SankeyGraph",Cm.prototype.mixin(t.Utility.SimpleSelectionMixin),Cm.prototype._palette=t.Palette.ordinal("category10"),Cm.prototype.publish("paletteID","category10","set","Color palette for this widget",Cm.prototype._palette.switch()),Cm.prototype.publish("vertexStrokeWidth",1,"number","Vertex Stroke Width"),Cm.prototype.publish("vertexStrokeColor","darkgray","string","Vertex Stroke Color"),Cm.prototype.publish("vertexWidth",36,"number","Vertex Width"),Cm.prototype.publish("vertexPadding",20,"number","Vertex Padding"),Cm.prototype.publish("xAxisMovement",!1,"boolean","Enable x-axis movement"),Cm.prototype.publish("yAxisMovement",!1,"boolean","Enable y-axis movement"),e.AdjacencyGraph=d_,e.Annotation=f_,e.AnnotationColumn=Sm,e.BUILD_VERSION="2.103.5",e.DataGraph=Dm,e.Edge=R,e.Graph=h_,e.Graph2=xm,e.PKG_NAME="@hpcc-js/graph",e.PKG_VERSION="2.80.3",e.Sankey=I_,e.SankeyColumn=O_,e.SankeyGraph=Cm,e.Subgraph=u_,e.Vertex=c_,e.graphviz=function(e,t,r){return void 0===t&&(t="dot"),void 0===r&&(r=_m),H_({items:[],links:[],raw:e},{engine:t,wasmFolder:r})},e.toJsonObj=km,Object.defineProperty(e,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=index.min.js.map