(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{1062:function(e,t,n){"use strict";n.d(t,"a",(function(){return Nu})),n.d(t,"b",(function(){return bu})),n.d(t,"c",(function(){return Eu})),n.d(t,"d",(function(){return xc})),n.d(t,"e",(function(){return Mu})),n.d(t,"f",(function(){return Qc})),n.d(t,"g",(function(){return Da})),n.d(t,"h",(function(){return Pa})),n.d(t,"i",(function(){return Ca})),n.d(t,"j",(function(){return at})),n.d(t,"k",(function(){return ct})),n.d(t,"l",(function(){return $e})),n.d(t,"m",(function(){return Ge})),n.d(t,"n",(function(){return pc}));var r=n(7),o=n.n(r),i=n(36),a=n.n(i);function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function s(e){if("string"==typeof e||"number"==typeof e)return""+e;let t="";if(Array.isArray(e))for(let n,r=0;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(e,t),n)},nt=function(e,t){return{x:tt(e.x,t[0][0],t[1][0]),y:tt(e.y,t[0][1],t[1][1])}},rt=function(e){var t=Qe(Object(r.useState)(!1),2),n=t[0],o=t[1];return Object(r.useEffect)((function(){if(void 0!==e){var t=function(t){Je(t)||t.key!==e&&t.keyCode!==e||(t.preventDefault(),o(!0))},n=function(t){Je(t)||t.key!==e&&t.keyCode!==e||o(!1)},r=function(){return o(!1)};return window.addEventListener("keydown",t),window.addEventListener("keyup",n),window.addEventListener("blur",r),function(){window.removeEventListener("keydown",t),window.removeEventListener("keyup",n),window.removeEventListener("blur",r)}}}),[e,o]),n};function ot(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function it(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:[0,0,1],r=Qe(n,3),o=r[0],i=r[1],a=r[2],c=arguments.length>3&&void 0!==arguments[3]&&arguments[3],u=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=pt({x:(t.x-o)/a,y:(t.y-i)/a,width:t.width/a,height:t.height/a});return e.filter((function(e){var t=e.selectable,n=void 0===t||t,r=e.__rf,o=r.position,i=r.width,a=r.height,l=r.isDragging;if(u&&!n)return!1;var f=pt(it(it({},o),{},{width:i,height:a})),d=Math.max(0,Math.min(s.x2,f.x2)-Math.max(s.x,f.x)),p=Math.max(0,Math.min(s.y2,f.y2)-Math.max(s.y,f.y)),h=Math.ceil(d*p);return!(null!==i&&null!==a&&!l)||(c?h>0:h>=i*a)}))},mt=function(e,t){var n=e.map((function(e){return e.id}));return t.filter((function(e){return n.includes(e.source)||n.includes(e.target)}))},yt=function(e,t){return[].concat(qe(e.map((function(e){var t=it({},e);return t.position=t.__rf.position,delete t.__rf,t}))),qe(t.map((function(e){return it({},e)}))))},bt=function(e){return function(){var t=e.getState(),n=t.nodes,r=void 0===n?[]:n,o=t.edges;return yt(r,void 0===o?[]:o)}},wt=function(e){return function(){var t=e.getState(),n=t.nodes,r=void 0===n?[]:n,o=t.edges,i=void 0===o?[]:o,a=t.transform;return{elements:yt(r,i),position:[a[0],a[1]],zoom:a[2]}}},_t=function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:.1,a=t/(e.width*(1+i)),c=n/(e.height*(1+i)),u=Math.min(a,c),s=tt(u,r,o),l=e.x+e.width/2,f=e.y+e.height/2,d=t/2-l*s,p=n/2-f*s;return[d,p,s]},Et={value:()=>{}};function xt(){for(var e,t=0,n=arguments.length,r={};t=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}function jt(e,t){for(var n,r=0,o=e.length;r0)for(var n,r,o=new Array(n),i=0;i=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),Ct.hasOwnProperty(t)?{space:Ct[t],local:e}:e}function Pt(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Mt&&t.documentElement.namespaceURI===Mt?t.createElement(e):t.createElementNS(n,e)}}function Dt(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Tt(e){var t=kt(e);return(t.local?Dt:Pt)(t)}function It(){}function At(e){return null==e?It:function(){return this.querySelector(e)}}function Lt(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}function Rt(){return[]}function zt(e){return null==e?Rt:function(){return this.querySelectorAll(e)}}function Bt(e){return function(){return this.matches(e)}}function Ut(e){return function(t){return t.matches(e)}}var Yt=Array.prototype.find;function Xt(){return this.firstElementChild}var Ht=Array.prototype.filter;function Vt(){return Array.from(this.children)}function Ft(e){return new Array(e.length)}function Gt(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function Zt(e){return function(){return e}}function $t(e,t,n,r,o,i){for(var a,c=0,u=t.length,s=i.length;ct?1:e>=t?0:NaN}function Jt(e){return function(){this.removeAttribute(e)}}function en(e){return function(){this.removeAttributeNS(e.space,e.local)}}function tn(e,t){return function(){this.setAttribute(e,t)}}function nn(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function rn(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function on(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function an(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function cn(e){return function(){this.style.removeProperty(e)}}function un(e,t,n){return function(){this.style.setProperty(e,t,n)}}function sn(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function ln(e,t){return e.style.getPropertyValue(t)||an(e).getComputedStyle(e,null).getPropertyValue(t)}function fn(e){return function(){delete this[e]}}function dn(e,t){return function(){this[e]=t}}function pn(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function hn(e){return e.trim().split(/^|\s+/)}function vn(e){return e.classList||new gn(e)}function gn(e){this._node=e,this._names=hn(e.getAttribute("class")||"")}function mn(e,t){for(var n=vn(e),r=-1,o=t.length;++r=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}function An(e){return function(){var t=this.__on;if(t){for(var n,r=0,o=-1,i=t.length;r=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var Un=[null];function Yn(e,t){this._groups=e,this._parents=t}function Xn(){return new Yn([[document.documentElement]],Un)}function Hn(e){return"string"==typeof e?new Yn([[document.querySelector(e)]],[document.documentElement]):new Yn([[e]],Un)}function Vn(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}Yn.prototype=Xn.prototype={constructor:Yn,select:function(e){"function"!=typeof e&&(e=At(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o=_&&(_=w+1);!(b=g[_])&&++_=0;)(r=o[i])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=Qt);for(var n=this._groups,r=n.length,o=new Array(r),i=0;i1?this.each((null==t?cn:"function"==typeof t?sn:un)(e,t,null==n?"":n)):ln(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?fn:"function"==typeof t?pn:dn)(e,t)):this.node()[e]},classed:function(e,t){var n=hn(e+"");if(arguments.length<2){for(var r=vn(this.node()),o=-1,i=n.length;++o>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?pr(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?pr(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=nr.exec(e))?new gr(t[1],t[2],t[3],1):(t=rr.exec(e))?new gr(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=or.exec(e))?pr(t[1],t[2],t[3],t[4]):(t=ir.exec(e))?pr(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=ar.exec(e))?wr(t[1],t[2]/100,t[3]/100,1):(t=cr.exec(e))?wr(t[1],t[2]/100,t[3]/100,t[4]):ur.hasOwnProperty(e)?dr(ur[e]):"transparent"===e?new gr(NaN,NaN,NaN,0):null}function dr(e){return new gr(e>>16&255,e>>8&255,255&e,1)}function pr(e,t,n,r){return r<=0&&(e=t=n=NaN),new gr(e,t,n,r)}function hr(e){return e instanceof qn||(e=fr(e)),e?new gr((e=e.rgb()).r,e.g,e.b,e.opacity):new gr}function vr(e,t,n,r){return 1===arguments.length?hr(e):new gr(e,t,n,null==r?1:r)}function gr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function mr(){return"#"+br(this.r)+br(this.g)+br(this.b)}function yr(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function br(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function wr(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Er(e,t,n,r)}function _r(e){if(e instanceof Er)return new Er(e.h,e.s,e.l,e.opacity);if(e instanceof qn||(e=fr(e)),!e)return new Er;if(e instanceof Er)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,c=i-o,u=(i+o)/2;return c?(a=t===i?(n-r)/c+6*(n0&&u<1?0:a,new Er(a,c,u,e.opacity)}function Er(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function xr(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Wn(qn,fr,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:sr,formatHex:sr,formatHsl:function(){return _r(this).formatHsl()},formatRgb:lr,toString:lr}),Wn(gr,vr,Kn(qn,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new gr(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new gr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:mr,formatHex:mr,formatRgb:yr,toString:yr})),Wn(Er,(function(e,t,n,r){return 1===arguments.length?_r(e):new Er(e,t,n,null==r?1:r)}),Kn(qn,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new Er(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Er(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new gr(xr(e>=240?e-240:e+120,o,r),xr(e,o,r),xr(e<120?e+240:e-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Or=e=>()=>e;function Sr(e){return 1==(e=+e)?jr:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Or(isNaN(t)?n:t)}}function jr(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Or(isNaN(e)?t:e)}var Nr=function e(t){var n=Sr(t);function r(e,t){var r=n((e=vr(e)).r,(t=vr(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=jr(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Mr(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Cr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,kr=new RegExp(Cr.source,"g");function Pr(e,t){var n,r,o,i=Cr.lastIndex=kr.lastIndex=0,a=-1,c=[],u=[];for(e+="",t+="";(n=Cr.exec(e))&&(r=kr.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),c[a]?c[a]+=o:c[++a]=o),(n=n[0])===(r=r[0])?c[a]?c[a]+=r:c[++a]=r:(c[++a]=null,u.push({i:a,x:Mr(n,r)})),i=kr.lastIndex;return i180?t+=360:t-e>180&&(e+=360),i.push({i:n.push(o(n)+"rotate(",null,r)-2,x:Mr(e,t)})):t&&n.push(o(n)+"rotate("+t+r)}(i.rotate,a.rotate,c,u),function(e,t,n,i){e!==t?i.push({i:n.push(o(n)+"skewX(",null,r)-2,x:Mr(e,t)}):t&&n.push(o(n)+"skewX("+t+r)}(i.skewX,a.skewX,c,u),function(e,t,n,r,i,a){if(e!==n||t!==r){var c=i.push(o(i)+"scale(",null,",",null,")");a.push({i:c-4,x:Mr(e,n)},{i:c-2,x:Mr(t,r)})}else 1===n&&1===r||i.push(o(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,c,u),i=a=null,function(e){for(var t,n=-1,r=u.length;++n=0&&t._call.call(void 0,e),t=t._next;--Hr}()}finally{Hr=0,function(){var e,t,n=Ur,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:Ur=t);Yr=e,ro(r)}(),Zr=0}}function no(){var e=Wr.now(),t=e-Gr;t>1e3&&($r-=t,Gr=e)}function ro(e){Hr||(Vr&&(Vr=clearTimeout(Vr)),e-Zr>24?(e<1/0&&(Vr=setTimeout(to,e-Wr.now()-$r)),Fr&&(Fr=clearInterval(Fr))):(Fr||(Gr=Wr.now(),Fr=setInterval(no,1e3)),Hr=1,Kr(to)))}function oo(e,t,n){var r=new Jr;return t=null==t?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}Jr.prototype=eo.prototype={constructor:Jr,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?qr():+n)+(null==t?0:+t),this._next||Yr===this||(Yr?Yr._next=this:Ur=this,Yr=this),this._call=e,this._time=n,ro()},stop:function(){this._call&&(this._call=null,this._time=1/0,ro())}};var io=xt("start","end","cancel","interrupt"),ao=[];function co(e,t,n,r,o,i){var a=e.__transition;if(a){if(n in a)return}else e.__transition={};!function(e,t,n){var r,o=e.__transition;function i(u){var s,l,f,d;if(1!==n.state)return c();for(s in o)if((d=o[s]).name===n.name){if(3===d.state)return oo(i);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete o[s]):+s0)throw new Error("too late; already scheduled");return n}function so(e,t){var n=lo(e,t);if(n.state>3)throw new Error("too late; already running");return n}function lo(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function fo(e,t){var n,r,o,i=e.__transition,a=!0;if(i){for(o in t=null==t?null:t+"",i)(n=i[o]).name===t?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete i[o]):a=!1;a&&delete e.__transition}}function po(e,t){var n,r;return function(){var o=so(this,e),i=o.tween;if(i!==n)for(var a=0,c=(r=n=i).length;a=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?uo:so;return function(){var a=i(this,e),c=a.on;c!==r&&(o=(r=c).copy()).on(t,n),a.on=o}}var To=Xn.prototype.constructor;function Io(e){return function(){this.style.removeProperty(e)}}function Ao(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Lo(e,t,n){var r,o;function i(){var i=t.apply(this,arguments);return i!==o&&(r=(o=i)&&Ao(e,i,n)),r}return i._value=t,i}function Ro(e){return function(t){this.textContent=e.call(this,t)}}function zo(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Ro(r)),t}return r._value=e,r}var Bo=0;function Uo(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Yo(){return++Bo}var Xo=Xn.prototype;Uo.prototype={constructor:Uo,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=At(e));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a()=>e;function Go(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function Zo(e,t,n){this.k=e,this.x=t,this.y=n}Zo.prototype={constructor:Zo,scale:function(e){return 1===e?this:new Zo(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new Zo(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var $o=new Zo(1,0,0);function Wo(e){e.stopImmediatePropagation()}function Ko(e){e.preventDefault(),e.stopImmediatePropagation()}function qo(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function Qo(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function Jo(){return this.__zoom||$o}function ei(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function ti(){return navigator.maxTouchPoints||"ontouchstart"in this}function ni(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}var ri,oi,ii,ai,ci,ui;!function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"}(ri||(ri={})),function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"}(oi||(oi={})),function(e){e.Lines="lines",e.Dots="dots"}(ii||(ii={})),function(e){e.Strict="strict",e.Loose="loose"}(ai||(ai={})),function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep"}(ci||(ci={})),function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"}(ui||(ui={}));var si=function(e){return{x:e.x,y:e.y,zoom:e.k}},li=function(e){return e.target.closest(".nowheel")},fi=function(e){var t=e.onMove,n=e.onMoveStart,i=e.onMoveEnd,a=e.zoomOnScroll,c=void 0===a||a,u=e.zoomOnPinch,s=void 0===u||u,l=e.panOnScroll,f=void 0!==l&&l,d=e.panOnScrollSpeed,p=void 0===d?.5:d,h=e.panOnScrollMode,v=void 0===h?ui.Free:h,g=e.zoomOnDoubleClick,m=void 0===g||g,y=e.selectionKeyPressed,b=e.elementsSelectable,w=e.paneMoveable,_=void 0===w||w,E=e.defaultPosition,x=void 0===E?[0,0]:E,O=e.defaultZoom,S=void 0===O?1:O,j=e.translateExtent,N=e.zoomActivationKeyCode,M=e.preventScrolling,C=void 0===M||M,k=e.children,P=Object(r.useRef)(null),D=Object(r.useRef)({x:0,y:0,zoom:0}),T=$e(),I=Ze((function(e){return e.d3Zoom})),A=Ze((function(e){return e.d3Selection})),L=Ze((function(e){return e.d3ZoomHandler})),R=Ge((function(e){return e.initD3Zoom})),z=Ge((function(e){return e.updateTransform})),B=rt(N);return function(e){var t=Ge((function(e){return e.updateSize}));Object(r.useEffect)((function(){var n,r=function(){if(e.current){var n=et(e.current);0!==n.height&&0!==n.width||console.warn("The React Flow parent container needs a width and a height to render the graph."),t(n)}};return r(),window.onresize=r,e.current&&(n=new ResizeObserver((function(){return r()}))).observe(e.current),function(){window.onresize=null,n&&e.current&&n.unobserve(e.current)}}),[])}(P),Object(r.useEffect)((function(){if(P.current){var e=T.getState(),t=void 0!==j?j:e.translateExtent,n=function(){var e,t,n,r=qo,o=Qo,i=ni,a=ei,c=ti,u=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,f=Xr,d=xt("start","zoom","end"),p=0,h=10;function v(e){e.property("__zoom",Jo).on("wheel.zoom",E,{passive:!1}).on("mousedown.zoom",x).on("dblclick.zoom",O).filter(c).on("touchstart.zoom",S).on("touchmove.zoom",j).on("touchend.zoom touchcancel.zoom",N).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(e,t){return(t=Math.max(u[0],Math.min(u[1],t)))===e.k?e:new Zo(t,e.x,e.y)}function m(e,t,n){var r=t[0]-n[0]*e.k,o=t[1]-n[1]*e.k;return r===e.x&&o===e.y?e:new Zo(e.k,r,o)}function y(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function b(e,t,n,r){e.on("start.zoom",(function(){w(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){w(this,arguments).event(r).end()})).tween("zoom",(function(){var e=this,i=arguments,a=w(e,i).event(r),c=o.apply(e,i),u=null==n?y(c):"function"==typeof n?n.apply(e,i):n,s=Math.max(c[1][0]-c[0][0],c[1][1]-c[0][1]),l=e.__zoom,d="function"==typeof t?t.apply(e,i):t,p=f(l.invert(u).concat(s/l.k),d.invert(u).concat(s/d.k));return function(e){if(1===e)e=d;else{var t=p(e),n=s/t[2];e=new Zo(n,u[0]-t[0]*n,u[1]-t[1]*n)}a.zoom(null,e)}}))}function w(e,t,n){return!n&&e.__zooming||new _(e,t)}function _(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=o.apply(e,t),this.taps=0}function E(e,...t){if(r.apply(this,arguments)){var n=w(this,t).event(e),o=this.__zoom,c=Math.max(u[0],Math.min(u[1],o.k*Math.pow(2,a.apply(this,arguments)))),l=Vn(e);if(n.wheel)n.mouse[0][0]===l[0]&&n.mouse[0][1]===l[1]||(n.mouse[1]=o.invert(n.mouse[0]=l)),clearTimeout(n.wheel);else{if(o.k===c)return;n.mouse=[l,o.invert(l)],fo(this),n.start()}Ko(e),n.wheel=setTimeout(f,150),n.zoom("mouse",i(m(g(o,c),n.mouse[0],n.mouse[1]),n.extent,s))}function f(){n.wheel=null,n.end()}}function x(e,...t){if(!n&&r.apply(this,arguments)){var o=e.currentTarget,a=w(this,t,!0).event(e),c=Hn(e.view).on("mousemove.zoom",d,!0).on("mouseup.zoom",h,!0),u=Vn(e,o),l=e.clientX,f=e.clientY;Zn(e.view),Wo(e),a.mouse=[u,this.__zoom.invert(u)],fo(this),a.start()}function d(e){if(Ko(e),!a.moved){var t=e.clientX-l,n=e.clientY-f;a.moved=t*t+n*n>p}a.event(e).zoom("mouse",i(m(a.that.__zoom,a.mouse[0]=Vn(e,o),a.mouse[1]),a.extent,s))}function h(e){c.on("mousemove.zoom mouseup.zoom",null),$n(e.view,a.moved),Ko(e),a.event(e).end()}}function O(e,...t){if(r.apply(this,arguments)){var n=this.__zoom,a=Vn(e.changedTouches?e.changedTouches[0]:e,this),c=n.invert(a),u=n.k*(e.shiftKey?.5:2),f=i(m(g(n,u),a,c),o.apply(this,t),s);Ko(e),l>0?Hn(this).transition().duration(l).call(b,f,a,e):Hn(this).call(v.transform,f,a,e)}}function S(n,...o){if(r.apply(this,arguments)){var i,a,c,u,s=n.touches,l=s.length,f=w(this,o,n.changedTouches.length===l).event(n);for(Wo(n),a=0;a0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";var r=null===(e=window.document)||void 0===e||null===(t=e.documentElement)||void 0===t?void 0:t.style;if(!r)return"";if(n in r)return"";for(var o=0;o: Unmounted during event!");return t}var Xi={},Hi={};function Vi(e){return(Vi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.default=function(){},Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.default=void 0;var Fi=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==Vi(e)&&"function"!=typeof e)return{default:e};var n=Ji(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(o.a),Gi=Qi(b.exports),Zi=Qi(a.a),$i=bi,Wi=zi,Ki=wi,qi=Qi(Hi);function Qi(e){return e&&e.__esModule?e:{default:e}}function Ji(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(Ji=function(e){return e?n:t})(e)}function ea(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ta(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ta(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ta(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n not mounted on DragStart!");var r=n.ownerDocument;if(!(e.props.disabled||!(t.target instanceof r.defaultView.Node)||e.props.handle&&!(0,$i.matchesSelectorAndParentsTo)(t.target,e.props.handle,n)||e.props.cancel&&(0,$i.matchesSelectorAndParentsTo)(t.target,e.props.cancel,n))){"touchstart"===t.type&&t.preventDefault();var o=(0,$i.getTouchIdentifier)(t);e.setState({touchIdentifier:o});var i=(0,Wi.getControlPosition)(t,o,ca(e));if(null!=i){var a=i.x,c=i.y,u=(0,Wi.createCoreData)(ca(e),a,c);(0,qi.default)("DraggableCore: handleDragStart: %j",u),(0,qi.default)("calling",e.props.onStart),!1!==e.props.onStart(t,u)&&!1!==e.mounted&&(e.props.enableUserSelectHack&&(0,$i.addUserSelectStyles)(r),e.setState({dragging:!0,lastX:a,lastY:c}),(0,$i.addEvent)(r,da.move,e.handleDrag),(0,$i.addEvent)(r,da.stop,e.handleDragStop))}}})),sa(ca(e),"handleDrag",(function(t){var n=(0,Wi.getControlPosition)(t,e.state.touchIdentifier,ca(e));if(null!=n){var r=n.x,o=n.y;if(Array.isArray(e.props.grid)){var i=r-e.state.lastX,a=o-e.state.lastY,c=ea((0,Wi.snapToGrid)(e.props.grid,i,a),2);if(i=c[0],a=c[1],!i&&!a)return;r=e.state.lastX+i,o=e.state.lastY+a}var u=(0,Wi.createCoreData)(ca(e),r,o);if((0,qi.default)("DraggableCore: handleDrag: %j",u),!1!==e.props.onDrag(t,u)&&!1!==e.mounted)e.setState({lastX:r,lastY:o});else try{e.handleDragStop(new MouseEvent("mouseup"))}catch(t){var s=document.createEvent("MouseEvents");s.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.handleDragStop(s)}}})),sa(ca(e),"handleDragStop",(function(t){if(e.state.dragging){var n=(0,Wi.getControlPosition)(t,e.state.touchIdentifier,ca(e));if(null!=n){var r=n.x,o=n.y,i=(0,Wi.createCoreData)(ca(e),r,o);if(!1===e.props.onStop(t,i)||!1===e.mounted)return!1;var a=e.findDOMNode();a&&e.props.enableUserSelectHack&&(0,$i.removeUserSelectStyles)(a.ownerDocument),(0,qi.default)("DraggableCore: handleDragStop: %j",i),e.setState({dragging:!1,lastX:NaN,lastY:NaN}),a&&((0,qi.default)("DraggableCore: Removing handlers"),(0,$i.removeEvent)(a.ownerDocument,da.move,e.handleDrag),(0,$i.removeEvent)(a.ownerDocument,da.stop,e.handleDragStop))}}})),sa(ca(e),"onMouseDown",(function(t){return da=fa,e.handleDragStart(t)})),sa(ca(e),"onMouseUp",(function(t){return da=fa,e.handleDragStop(t)})),sa(ca(e),"onTouchStart",(function(t){return da=la,e.handleDragStart(t)})),sa(ca(e),"onTouchEnd",(function(t){return da=la,e.handleDragStop(t)})),e}return t=i,(n=[{key:"componentDidMount",value:function(){this.mounted=!0;var e=this.findDOMNode();e&&(0,$i.addEvent)(e,la.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.findDOMNode();if(e){var t=e.ownerDocument;(0,$i.removeEvent)(t,fa.move,this.handleDrag),(0,$i.removeEvent)(t,la.move,this.handleDrag),(0,$i.removeEvent)(t,fa.stop,this.handleDragStop),(0,$i.removeEvent)(t,la.stop,this.handleDragStop),(0,$i.removeEvent)(e,la.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,$i.removeUserSelectStyles)(t)}}},{key:"findDOMNode",value:function(){var e,t,n;return null!==(e=null===(t=this.props)||void 0===t||null===(n=t.nodeRef)||void 0===n?void 0:n.current)&&void 0!==e?e:Zi.default.findDOMNode(this)}},{key:"render",value:function(){return Fi.cloneElement(Fi.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}])&&ra(t.prototype,n),r&&ra(t,r),i}(Fi.Component);Xi.default=pa,sa(pa,"displayName","DraggableCore"),sa(pa,"propTypes",{allowAnyClick:Gi.default.bool,disabled:Gi.default.bool,enableUserSelectHack:Gi.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:Gi.default.arrayOf(Gi.default.number),handle:Gi.default.string,cancel:Gi.default.string,nodeRef:Gi.default.object,onStart:Gi.default.func,onDrag:Gi.default.func,onStop:Gi.default.func,onMouseDown:Gi.default.func,scale:Gi.default.number,className:Ki.dontSetMe,style:Ki.dontSetMe,transform:Ki.dontSetMe}),sa(pa,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(e){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return f.default}}),e.default=void 0;var n=function(e,n){if(!n&&e&&e.__esModule)return e;if(null===e||"object"!==t(e)&&"function"!=typeof e)return{default:e};var r=v(n);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var c=i?Object.getOwnPropertyDescriptor(e,a):null;c&&(c.get||c.set)?Object.defineProperty(o,a,c):o[a]=e[a]}o.default=e,r&&r.set(e,o);return o}(o.a),r=h(b.exports),i=h(a.a),c=h(yi),u=bi,s=zi,l=wi,f=h(Xi),d=h(Hi),p=["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"];function h(e){return e&&e.__esModule?e:{default:e}}function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}function g(){return(g=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."),t}return t=l,o=[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.position,r=t.prevPropsPosition;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,d.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:w({},n)})}}],(r=[{key:"componentDidMount",value:function(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"findDOMNode",value:function(){var e,t,n;return null!==(e=null===(t=this.props)||void 0===t||null===(n=t.nodeRef)||void 0===n?void 0:n.current)&&void 0!==e?e:i.default.findDOMNode(this)}},{key:"render",value:function(){var e,t=this.props;t.axis,t.bounds;var r=t.children,o=t.defaultPosition,i=t.defaultClassName,a=t.defaultClassNameDragging,l=t.defaultClassNameDragged,d=t.position,h=t.positionOffset;t.scale;var v=m(t,p),y={},b=null,_=!Boolean(d)||this.state.dragging,E=d||o,x={x:(0,s.canDragX)(this)&&_?this.state.x:E.x,y:(0,s.canDragY)(this)&&_?this.state.y:E.y};this.state.isElementSVG?b=(0,u.createSVGTransform)(x,h):y=(0,u.createCSSTransform)(x,h);var O=(0,c.default)(r.props.className||"",i,(C(e={},a,this.state.dragging),C(e,l,this.state.dragged),e));return n.createElement(f.default,g({},v,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),n.cloneElement(n.Children.only(r),{className:O,style:w(w({},r.props.style),y),transform:b}))}}])&&x(t.prototype,r),o&&x(t,o),l}(n.Component);e.default=k,C(k,"displayName","Draggable"),C(k,"propTypes",w(w({},f.default.propTypes),{},{axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe})),C(k,"defaultProps",w(w({},f.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))}(gi);var ha=gi.default,va=gi.DraggableCore;vi.exports=ha,vi.exports.default=ha;var ga=vi.exports.DraggableCore=va,ma=vi.exports;function ya(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ba(e){for(var t=1;tr?t-f:t+f,p=s?0:Math.abs(o-n);return[d,n2&&void 0!==arguments[2]?arguments[2]:null,r=((null==n?void 0:n.x)||0)+t.__rf.position.x,o=((null==n?void 0:n.y)||0)+t.__rf.position.y,i=(null==n?void 0:n.width)||t.__rf.width,a=(null==n?void 0:n.height)||t.__rf.height;switch(e){case ri.Top:return{x:r+i/2,y:o};case ri.Right:return{x:r+i,y:o+a/2};case ri.Bottom:return{x:r+i/2,y:o+a};case ri.Left:return{x:r,y:o+a/2}}}function cc(e,t){if(!e)return null;var n=null;return 1!==e.length&&t?t&&(n=e.find((function(e){return e.id===t}))):n=e[0],void 0===n?null:n}var uc=function(e){var t=e.edge,n=e.props,i=e.nodes,a=e.selectedElements,c=e.elementsSelectable,u=e.transform,s=e.width,l=e.height,f=e.onlyRenderVisibleElements,d=e.connectionMode,p=t.sourceHandle||null,h=t.targetHandle||null,v=function(e,t){return t.reduce((function(t,n){return n.id===e.source&&(t.sourceNode=n),n.id===e.target&&(t.targetNode=n),t}),{sourceNode:null,targetNode:null})}(t,i),g=v.sourceNode,m=v.targetNode,y=Object(r.useCallback)((function(e){var r;null===(r=n.onEdgeUpdate)||void 0===r||r.call(n,t,e)}),[t,n.onEdgeUpdate]);if(!g)return console.warn("couldn't create edge for source id: ".concat(t.source,"; edge id: ").concat(t.id)),null;if(!m)return console.warn("couldn't create edge for target id: ".concat(t.target,"; edge id: ").concat(t.id)),null;if(!g.__rf.width||!m.__rf.width)return null;var b=t.type||"default",w=n.edgeTypes[b]||n.edgeTypes.default,_=m.__rf.handleBounds,E=d===ai.Strict?_.target:_.target||_.source,x=cc(g.__rf.handleBounds.source,p),O=cc(E,h),S=x?x.position:ri.Bottom,j=O?O.position:ri.Top;if(!x)return console.warn("couldn't create edge for source handle id: ".concat(p,"; edge id: ").concat(t.id)),null;if(!O)return console.warn("couldn't create edge for target handle id: ".concat(h,"; edge id: ").concat(t.id)),null;var N=function(e,t,n,r,o,i){var a=ac(n,e,t),c=ac(i,r,o);return{sourceX:a.x,sourceY:a.y,targetX:c.x,targetY:c.y}}(g,x,S,m,O,j),M=N.sourceX,C=N.sourceY,k=N.targetX,P=N.targetY;if(!(!f||function(e){var t=e.sourcePos,n=e.targetPos,r=e.width,o=e.height,i=e.transform,a={x:Math.min(t.x,n.x),y:Math.min(t.y,n.y),x2:Math.max(t.x,n.x),y2:Math.max(t.y,n.y)};a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);var c=pt({x:(0-i[0])/i[2],y:(0-i[1])/i[2],width:r/i[2],height:o/i[2]}),u=Math.max(0,Math.min(c.x2,a.x2)-Math.max(c.x,a.x)),s=Math.max(0,Math.min(c.y2,a.y2)-Math.max(c.y,a.y));return Math.ceil(u*s)>0}({sourcePos:{x:M,y:C},targetPos:{x:k,y:P},width:s,height:l,transform:u})))return null;var D=(null==a?void 0:a.some((function(e){return at(e)&&e.id===t.id})))||!1;return o.a.createElement(w,{key:t.id,id:t.id,className:t.className,type:t.type,data:t.data,onClick:n.onElementClick,selected:D,animated:t.animated,label:t.label,labelStyle:t.labelStyle,labelShowBg:t.labelShowBg,labelBgStyle:t.labelBgStyle,labelBgPadding:t.labelBgPadding,labelBgBorderRadius:t.labelBgBorderRadius,style:t.style,arrowHeadType:t.arrowHeadType,source:t.source,target:t.target,sourceHandleId:p,targetHandleId:h,sourceX:M,sourceY:C,targetX:k,targetY:P,sourcePosition:S,targetPosition:j,elementsSelectable:c,markerEndId:n.markerEndId,isHidden:t.isHidden,onConnectEdge:y,handleEdgeUpdate:void 0!==n.onEdgeUpdate,onContextMenu:n.onEdgeContextMenu,onMouseEnter:n.onEdgeMouseEnter,onMouseMove:n.onEdgeMouseMove,onMouseLeave:n.onEdgeMouseLeave,edgeUpdaterRadius:n.edgeUpdaterRadius,onEdgeDoubleClick:n.onEdgeDoubleClick,onEdgeUpdateStart:n.onEdgeUpdateStart,onEdgeUpdateEnd:n.onEdgeUpdateEnd})},sc=function(e){var t=Ze((function(e){return e.transform})),n=Ze((function(e){return e.nodes})),r=Ze((function(e){return e.edges})),i=Ze((function(e){return e.connectionNodeId})),a=Ze((function(e){return e.connectionHandleId})),c=Ze((function(e){return e.connectionHandleType})),u=Ze((function(e){return e.connectionPosition})),s=Ze((function(e){return e.selectedElements})),l=Ze((function(e){return e.nodesConnectable})),f=Ze((function(e){return e.elementsSelectable})),d=Ze((function(e){return e.width})),p=Ze((function(e){return e.height}));if(!d)return null;var h=e.connectionLineType,v=e.arrowHeadColor,g=e.connectionLineStyle,m=e.connectionLineComponent,y=e.onlyRenderVisibleElements,b="translate(".concat(t[0],"px,").concat(t[1],"px) scale(").concat(t[2],")"),w=i&&c;return o.a.createElement("svg",{width:d,height:p,className:"react-flow__edges"},o.a.createElement(Ga,{color:v}),o.a.createElement("g",{style:{transform:b}},r.map((function(r){return o.a.createElement(uc,{key:r.id,edge:r,props:e,nodes:n,selectedElements:s,elementsSelectable:f,transform:t,width:d,height:p,onlyRenderVisibleElements:y})})),w&&o.a.createElement(Va,{nodes:n,connectionNodeId:i,connectionHandleId:a,connectionHandleType:c,connectionPositionX:u.x,connectionPositionY:u.y,transform:t,connectionLineStyle:g,connectionLineType:h,isConnectable:l,CustomConnectionLineComponent:m})))};sc.displayName="EdgeRenderer";var lc=Object(r.memo)(sc),fc={zoomIn:function(){},zoomOut:function(){},zoomTo:function(e){},transform:function(e){},fitView:function(){},setCenter:function(e,t){},fitBounds:function(e){},project:function(e){return e},initialized:!1},dc=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.transition().duration(t)},pc=function(){var e=$e(),t=Ze((function(e){return e.d3Zoom})),n=Ze((function(e){return e.d3Selection}));return Object(r.useMemo)((function(){return n&&t?{zoomIn:function(e){return t.scaleBy(dc(n,e),1.2)},zoomOut:function(e){return t.scaleBy(dc(n,e),1/1.2)},zoomTo:function(e,r){return t.scaleTo(dc(n,r),e)},transform:function(e,r){var o=$o.translate(e.x,e.y).scale(e.zoom);t.transform(dc(n,r),o)},fitView:function(){var r,o,i,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{padding:.1,includeHiddenNodes:!1,duration:0},c=e.getState(),u=c.nodes,s=c.width,l=c.height,f=c.minZoom,d=c.maxZoom;if(u.length){var p=vt(a.includeHiddenNodes?u:u.filter((function(e){return!e.isHidden}))),h=_t(p,s,l,null!==(r=a.minZoom)&&void 0!==r?r:f,null!==(o=a.maxZoom)&&void 0!==o?o:d,null!==(i=a.padding)&&void 0!==i?i:.1),v=Qe(h,3),g=v[0],m=v[1],y=v[2],b=$o.translate(g,m).scale(y);t.transform(dc(n,a.duration),b)}},setCenter:function(r,o,i,a){var c=e.getState(),u=c.width,s=c.height,l=c.maxZoom,f=void 0!==i?i:l,d=u/2-r*f,p=s/2-o*f,h=$o.translate(d,p).scale(f);t.transform(dc(n,a),h)},fitBounds:function(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.1,i=arguments.length>2?arguments[2]:void 0,a=e.getState(),c=a.width,u=a.height,s=a.minZoom,l=a.maxZoom,f=_t(r,c,u,s,l,o),d=Qe(f,3),p=d[0],h=d[1],v=d[2],g=$o.translate(p,h).scale(v);t.transform(dc(n,i),g)},project:function(t){var n=e.getState(),r=n.transform,o=n.snapToGrid,i=n.snapGrid;return ut(t,r,o,i)},initialized:!0}:fc}),[t,n])},hc=function(e){var t=e.nodeTypes,n=e.edgeTypes,i=e.onMove,a=e.onMoveStart,c=e.onMoveEnd,u=e.onLoad,s=e.onElementClick,l=e.onNodeDoubleClick,f=e.onEdgeDoubleClick,d=e.onNodeMouseEnter,p=e.onNodeMouseMove,h=e.onNodeMouseLeave,v=e.onNodeContextMenu,g=e.onNodeDragStart,m=e.onNodeDrag,y=e.onNodeDragStop,b=e.onSelectionDragStart,w=e.onSelectionDrag,_=e.onSelectionDragStop,E=e.onSelectionContextMenu,x=e.connectionMode,O=e.connectionLineType,S=e.connectionLineStyle,j=e.connectionLineComponent,N=e.selectionKeyCode,M=e.multiSelectionKeyCode,C=e.zoomActivationKeyCode,k=e.onElementsRemove,P=e.deleteKeyCode,D=e.onConnect,T=e.onConnectStart,I=e.onConnectStop,A=e.onConnectEnd,L=e.snapToGrid,R=e.snapGrid,z=e.onlyRenderVisibleElements,B=e.nodesDraggable,U=e.nodesConnectable,Y=e.elementsSelectable,X=e.selectNodesOnDrag,H=e.minZoom,V=e.maxZoom,F=e.defaultZoom,G=e.defaultPosition,Z=e.translateExtent,$=e.preventScrolling,W=e.nodeExtent,K=e.arrowHeadColor,q=e.markerEndId,Q=e.zoomOnScroll,J=e.zoomOnPinch,ee=e.panOnScroll,te=e.panOnScrollSpeed,ne=e.panOnScrollMode,re=e.zoomOnDoubleClick,oe=e.paneMoveable,ie=e.onPaneClick,ae=e.onPaneScroll,ce=e.onPaneContextMenu,ue=e.onEdgeUpdate,se=e.onEdgeContextMenu,le=e.onEdgeMouseEnter,fe=e.onEdgeMouseMove,de=e.onEdgeMouseLeave,pe=e.edgeUpdaterRadius,he=e.onEdgeUpdateStart,ve=e.onEdgeUpdateEnd,ge=Object(r.useRef)(!1),me=Ge((function(e){return e.setOnConnect})),ye=Ge((function(e){return e.setOnConnectStart})),be=Ge((function(e){return e.setOnConnectStop})),we=Ge((function(e){return e.setOnConnectEnd})),_e=Ge((function(e){return e.setSnapGrid})),Ee=Ge((function(e){return e.setSnapToGrid})),xe=Ge((function(e){return e.setNodesDraggable})),Oe=Ge((function(e){return e.setNodesConnectable})),Se=Ge((function(e){return e.setElementsSelectable})),je=Ge((function(e){return e.setMinZoom})),Ne=Ge((function(e){return e.setMaxZoom})),Me=Ge((function(e){return e.setTranslateExtent})),Ce=Ge((function(e){return e.setNodeExtent})),ke=Ge((function(e){return e.setConnectionMode})),Pe=$e(),De=pc(),Te=De.zoomIn,Ie=De.zoomOut,Ae=De.zoomTo,Le=De.transform,Re=De.fitView,ze=De.initialized;return Object(r.useEffect)((function(){!ge.current&&ze&&(u&&u({fitView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{padding:.1};return Re(e)},zoomIn:Te,zoomOut:Ie,zoomTo:Ae,setTransform:Le,project:st(Pe),getElements:bt(Pe),toObject:wt(Pe)}),ge.current=!0)}),[u,Te,Ie,Ae,Le,Re,ze]),Object(r.useEffect)((function(){D&&me(D)}),[D]),Object(r.useEffect)((function(){T&&ye(T)}),[T]),Object(r.useEffect)((function(){I&&be(I)}),[I]),Object(r.useEffect)((function(){A&&we(A)}),[A]),Object(r.useEffect)((function(){void 0!==L&&Ee(L)}),[L]),Object(r.useEffect)((function(){void 0!==R&&_e(R)}),[R]),Object(r.useEffect)((function(){void 0!==B&&xe(B)}),[B]),Object(r.useEffect)((function(){void 0!==U&&Oe(U)}),[U]),Object(r.useEffect)((function(){void 0!==Y&&Se(Y)}),[Y]),Object(r.useEffect)((function(){void 0!==H&&je(H)}),[H]),Object(r.useEffect)((function(){void 0!==V&&Ne(V)}),[V]),Object(r.useEffect)((function(){void 0!==Z&&Me(Z)}),[Z]),Object(r.useEffect)((function(){void 0!==W&&Ce(W)}),[W]),Object(r.useEffect)((function(){void 0!==x&&ke(x)}),[x]),o.a.createElement(Ea,{onPaneClick:ie,onPaneContextMenu:ce,onPaneScroll:ae,onElementsRemove:k,deleteKeyCode:P,selectionKeyCode:N,multiSelectionKeyCode:M,zoomActivationKeyCode:C,elementsSelectable:Y,onMove:i,onMoveStart:a,onMoveEnd:c,zoomOnScroll:Q,zoomOnPinch:J,zoomOnDoubleClick:re,panOnScroll:ee,panOnScrollSpeed:te,panOnScrollMode:ne,paneMoveable:oe,defaultPosition:G,defaultZoom:F,translateExtent:Z,onSelectionDragStart:b,onSelectionDrag:w,onSelectionDragStop:_,onSelectionContextMenu:E,preventScrolling:$},o.a.createElement(Oa,{nodeTypes:t,onElementClick:s,onNodeDoubleClick:l,onNodeMouseEnter:d,onNodeMouseMove:p,onNodeMouseLeave:h,onNodeContextMenu:v,onNodeDragStop:y,onNodeDrag:m,onNodeDragStart:g,selectNodesOnDrag:X,snapToGrid:L,snapGrid:R,onlyRenderVisibleElements:z}),o.a.createElement(lc,{edgeTypes:n,onElementClick:s,onEdgeDoubleClick:f,connectionLineType:O,connectionLineStyle:S,connectionLineComponent:j,connectionMode:x,arrowHeadColor:K,markerEndId:q,onEdgeUpdate:ue,onlyRenderVisibleElements:z,onEdgeContextMenu:se,onEdgeMouseEnter:le,onEdgeMouseMove:fe,onEdgeMouseLeave:de,onEdgeUpdateStart:he,onEdgeUpdateEnd:ve,edgeUpdaterRadius:pe}))};hc.displayName="GraphView";var vc=Object(r.memo)(hc),gc=function(e){var t=e.elements,n=Ge((function(e){return e.setElements}));return Object(r.useEffect)((function(){n(t)}),[t]),null},mc=Object(r.createContext)(null),yc=mc.Provider;mc.Consumer;var bc=["type","position","isValidConnection","isConnectable","id","onConnect","children","className"];function wc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var _c=function(){return!0},Ec=Object(r.forwardRef)((function(e,t){var n=e.type,i=void 0===n?"source":n,a=e.position,l=void 0===a?ri.Top:a,f=e.isValidConnection,d=void 0===f?_c:f,p=e.isConnectable,h=void 0===p||p,v=e.id,g=e.onConnect,m=e.children,y=e.className,b=u(e,bc),w=Object(r.useContext)(mc),_=Ge((function(e){return e.setConnectionPosition})),E=Ge((function(e){return e.setConnectionNodeId})),x=Ze((function(e){return e.onConnect})),O=Ze((function(e){return e.onConnectStart})),S=Ze((function(e){return e.onConnectStop})),j=Ze((function(e){return e.onConnectEnd})),N=Ze((function(e){return e.connectionMode})),M=v||null,C="target"===i,k=Object(r.useCallback)((function(e){null==x||x(e),null==g||g(e)}),[x,g]),P=Object(r.useCallback)((function(e){Ja(e,M,w,E,_,k,C,d,N,void 0,void 0,O,S,j)}),[M,w,E,_,k,C,d,N,O,S,j]),D=s(["react-flow__handle","react-flow__handle-".concat(l),"nodrag",y,{source:!C,target:C,connectable:h}]);return o.a.createElement("div",function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:Hc,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_ELEMENTS":var n=t.payload,r={nextNodes:[],nextEdges:[]},o=n.reduce((function(t,n){if(ct(n)){var r=e.nodes.find((function(e){return e.id===n.id}));if(r){var o=Uc(Uc({},r),n);r.position.x===n.position.x&&r.position.y===n.position.y||(o.__rf.position=n.position),void 0!==n.type&&n.type!==r.type&&(o.__rf.width=null),t.nextNodes.push(o)}else t.nextNodes.push(lt(n,e.nodeExtent))}else if(at(n)){var i=e.edges.find((function(e){return e.id===n.id}));i?t.nextEdges.push(Uc(Uc({},i),n)):t.nextEdges.push(ft(n))}return t}),r),i=o.nextNodes,a=o.nextEdges;return Uc(Uc({},e),{},{nodes:i,edges:a});case"UPDATE_NODE_DIMENSIONS":var c=e.nodes.map((function(n){var r=t.payload.find((function(e){return e.id===n.id}));if(r){var o=et(r.nodeElement);if(o.width&&o.height&&(n.__rf.width!==o.width||n.__rf.height!==o.height||r.forceUpdate)){var i=Rc(r.nodeElement,e.transform[2]);return Uc(Uc({},n),{},{__rf:Uc(Uc(Uc({},n.__rf),o),{},{handleBounds:i})})}}return n}));return Uc(Uc({},e),{},{nodes:c});case"UPDATE_NODE_POS":var u=t.payload,s=u.id,l=u.pos,f=l;if(e.snapToGrid){var d=Qe(e.snapGrid,2),p=d[0],h=d[1];f={x:p*Math.round(l.x/p),y:h*Math.round(l.y/h)}}var v=e.nodes.map((function(e){return e.id===s?Uc(Uc({},e),{},{__rf:Uc(Uc({},e.__rf),{},{position:f})}):e}));return Uc(Uc({},e),{},{nodes:v});case"UPDATE_NODE_POS_DIFF":var g=t.payload,m=g.id,y=g.diff,b=g.isDragging,w=e.nodes.map((function(t){var n;if(m===t.id||null!==(n=e.selectedElements)&&void 0!==n&&n.find((function(e){return e.id===t.id}))){var r=Uc(Uc({},t),{},{__rf:Uc(Uc({},t.__rf),{},{isDragging:b})});return y&&(r.__rf.position={x:t.__rf.position.x+y.x,y:t.__rf.position.y+y.y}),r}return t}));return Uc(Uc({},e),{},{nodes:w});case"SET_USER_SELECTION":var _=t.payload;return Uc(Uc({},e),{},{selectionActive:!0,userSelectionRect:{width:0,height:0,startX:_.x,startY:_.y,x:_.x,y:_.y,draw:!0}});case"UPDATE_USER_SELECTION":var E,x,O=t.payload,S=null!==(E=e.userSelectionRect.startX)&&void 0!==E?E:0,j=null!==(x=e.userSelectionRect.startY)&&void 0!==x?x:0,N=Uc(Uc({},e.userSelectionRect),{},{x:O.x0?k:null}:{};return Uc(Uc(Uc({},e),D),{},{userSelectionRect:N});case"UNSET_USER_SELECTION":var T,I=null===(T=e.selectedElements)||void 0===T?void 0:T.filter((function(e){return ct(e)&&e.__rf})),A=Uc(Uc({},e),{},{selectionActive:!1,userSelectionRect:Uc(Uc({},e.userSelectionRect),{},{draw:!1})});if(I&&0!==I.length){var L=vt(I);A.selectedNodesBbox=L,A.nodesSelectionActive=!0}else A.selectedElements=null,A.nodesSelectionActive=!1;return A;case"SET_SELECTED_ELEMENTS":var R=t.payload,z=Array.isArray(R)?R:[R],B=!Ac(z,e.selectedElements),U=B?z:e.selectedElements;return Uc(Uc({},e),{},{selectedElements:U});case"ADD_SELECTED_ELEMENTS":var Y=e.multiSelectionActive,X=e.selectedElements,H=t.payload,V=Array.isArray(H)?H:[H],F=V;Y&&(F=X?[].concat(qe(X),qe(V)):V);var G=!Ac(F,e.selectedElements),Z=G?F:e.selectedElements;return Uc(Uc({},e),{},{selectedElements:Z});case"INIT_D3ZOOM":var $=t.payload,W=$.d3Zoom,K=$.d3Selection,q=$.d3ZoomHandler,Q=$.transform;return Uc(Uc({},e),{},{d3Zoom:W,d3Selection:K,d3ZoomHandler:q,transform:Q});case"SET_MINZOOM":var J,ee=t.payload;return null===(J=e.d3Zoom)||void 0===J||J.scaleExtent([ee,e.maxZoom]),Uc(Uc({},e),{},{minZoom:ee});case"SET_MAXZOOM":var te,ne=t.payload;return null===(te=e.d3Zoom)||void 0===te||te.scaleExtent([e.minZoom,ne]),Uc(Uc({},e),{},{maxZoom:ne});case"SET_TRANSLATEEXTENT":var re,oe=t.payload;return null===(re=e.d3Zoom)||void 0===re||re.translateExtent(oe),Uc(Uc({},e),{},{translateExtent:oe});case"SET_NODE_EXTENT":var ie=t.payload;return Uc(Uc({},e),{},{nodeExtent:ie,nodes:e.nodes.map((function(e){return Uc(Uc({},e),{},{__rf:Uc(Uc({},e.__rf),{},{position:nt(e.__rf.position,ie)})})}))});case"SET_ON_CONNECT":case"SET_ON_CONNECT_START":case"SET_ON_CONNECT_STOP":case"SET_ON_CONNECT_END":case"RESET_SELECTED_ELEMENTS":case"UNSET_NODES_SELECTION":case"UPDATE_TRANSFORM":case"UPDATE_SIZE":case"SET_CONNECTION_POSITION":case"SET_CONNECTION_NODEID":case"SET_SNAPTOGRID":case"SET_SNAPGRID":case"SET_INTERACTIVE":case"SET_NODES_DRAGGABLE":case"SET_NODES_CONNECTABLE":case"SET_ELEMENTS_SELECTABLE":case"SET_MULTI_SELECTION_ACTIVE":case"SET_CONNECTION_MODE":return Uc(Uc({},e),t.payload);default:return e}}function Xc(e){return v(Yc,e)}var Hc={width:0,height:0,transform:[0,0,1],nodes:[],edges:[],selectedElements:null,selectedNodesBbox:{x:0,y:0,width:0,height:0},d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodesSelectionActive:!1,selectionActive:!1,userSelectionRect:{startX:0,startY:0,x:0,y:0,width:0,height:0,draw:!1},connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionMode:ai.Strict,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,elementsSelectable:!0,multiSelectionActive:!1,reactFlowVersion:"9.7.4"},Vc=Xc(Hc),Fc=function(e){var t=e.children,n=Object(r.useContext)(K);return Object(r.useMemo)((function(){var e,t;return null==n||null===(e=n.store)||void 0===e||null===(t=e.getState())||void 0===t?void 0:t.reactFlowVersion}),[n])?o.a.createElement(o.a.Fragment,null,t):o.a.createElement(ne,{store:Vc},t)};function Gc(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}Fc.displayName="ReactFlowWrapper";Gc(".react-flow{height:100%;overflow:hidden;position:relative;width:100%}.react-flow__pane,.react-flow__renderer,.react-flow__selectionpane{height:100%;left:0;position:absolute;top:0;width:100%}.react-flow__pane{z-index:1}.react-flow__renderer{z-index:4}.react-flow__selectionpane{z-index:5}.react-flow__edges,.react-flow__selection{left:0;position:absolute;top:0}.react-flow__edges{pointer-events:none;z-index:2}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.inactive{pointer-events:none}@-webkit-keyframes dashdraw{0%{stroke-dashoffset:10}}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edge-path{fill:none}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__connection-path{fill:none}.react-flow__nodes{height:100%;pointer-events:none;width:100%;z-index:3}.react-flow__node,.react-flow__nodes{position:absolute;transform-origin:0 0}.react-flow__node{pointer-events:all;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.react-flow__nodesselection{height:100%;left:0;pointer-events:none;position:absolute;top:0;transform-origin:left top;width:100%;z-index:3}.react-flow__nodesselection-rect{cursor:-webkit-grab;cursor:grab;pointer-events:all;position:absolute}.react-flow__handle{pointer-events:none}.react-flow__handle.connectable{pointer-events:all}.react-flow__handle-bottom{bottom:-4px;left:50%;top:auto;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{left:-4px;top:50%;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__background{height:100%;left:0;position:absolute;top:0;width:100%}.react-flow__controls{bottom:10px;left:10px;position:absolute;z-index:5}.react-flow__controls-button{border:none;height:24px;width:24px}.react-flow__controls-button svg{width:100%}.react-flow__minimap{bottom:10px;position:absolute;right:10px;z-index:5}");Gc(".react-flow__selection{background:rgba(0,89,220,.08);border:1px dotted rgba(0,89,220,.8)}.react-flow__edge.selected .react-flow__edge-path{stroke:#555}.react-flow__edge.animated path{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-path{stroke:#b1b1b7;stroke-width:1}.react-flow__edge-text{font-size:10px}.react-flow__edge-textbg{fill:#fff}.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1}.react-flow__node{cursor:-webkit-grab;cursor:grab}.react-flow__node-default,.react-flow__node-input,.react-flow__node-output{border-radius:3px;border-style:solid;border-width:1px;color:#222;font-size:12px;padding:10px;text-align:center;width:150px}.react-flow__node-default.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover{box-shadow:0 1px 4px 1px rgba(0,0,0,.08)}.react-flow__node-input{background:#fff;border-color:#0041d0}.react-flow__node-input.selected,.react-flow__node-input.selected:hover{box-shadow:0 0 0 .5px #0041d0}.react-flow__node-input .react-flow__handle{background:#0041d0}.react-flow__node-default{background:#fff;border-color:#1a192b}.react-flow__node-default.selected,.react-flow__node-default.selected:hover{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-default .react-flow__handle{background:#1a192b}.react-flow__node-output{background:#fff;border-color:#ff0072}.react-flow__node-output.selected,.react-flow__node-output.selected:hover{box-shadow:0 0 0 .5px #ff0072}.react-flow__node-output .react-flow__handle{background:#ff0072}.react-flow__nodesselection-rect{background:rgba(0,89,220,.08);border:1px dotted rgba(0,89,220,.8)}.react-flow__handle{background:#555;border:1px solid #fff;border-radius:100%;height:6px;position:absolute;width:6px}.react-flow__handle.connectable{cursor:crosshair}.react-flow__minimap{background-color:#fff}.react-flow__controls{box-shadow:0 0 2px 1px rgba(0,0,0,.08)}.react-flow__controls-button{align-items:center;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;cursor:pointer;display:flex;height:16px;justify-content:center;padding:5px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:16px}.react-flow__controls-button svg{max-height:12px;max-width:12px}.react-flow__controls-button:hover{background:#f4f4f4}");var Zc=["elements","className","nodeTypes","edgeTypes","onElementClick","onLoad","onMove","onMoveStart","onMoveEnd","onElementsRemove","onConnect","onConnectStart","onConnectStop","onConnectEnd","onNodeMouseEnter","onNodeMouseMove","onNodeMouseLeave","onNodeContextMenu","onNodeDoubleClick","onNodeDragStart","onNodeDrag","onNodeDragStop","onSelectionChange","onSelectionDragStart","onSelectionDrag","onSelectionDragStop","onSelectionContextMenu","connectionMode","connectionLineType","connectionLineStyle","connectionLineComponent","deleteKeyCode","selectionKeyCode","multiSelectionKeyCode","zoomActivationKeyCode","snapToGrid","snapGrid","onlyRenderVisibleElements","selectNodesOnDrag","nodesDraggable","nodesConnectable","elementsSelectable","minZoom","maxZoom","defaultZoom","defaultPosition","translateExtent","preventScrolling","nodeExtent","arrowHeadColor","markerEndId","zoomOnScroll","zoomOnPinch","panOnScroll","panOnScrollSpeed","panOnScrollMode","zoomOnDoubleClick","paneMoveable","onPaneClick","onPaneScroll","onPaneContextMenu","children","onEdgeUpdate","onEdgeContextMenu","onEdgeDoubleClick","onEdgeMouseEnter","onEdgeMouseMove","onEdgeMouseLeave","onEdgeUpdateStart","onEdgeUpdateEnd","edgeUpdaterRadius","nodeTypesId","edgeTypesId"];function $c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wc(e){for(var t=1;tMath.abs(a)*s?(c<0&&(s=-s),n=s*a/c,r=s):(a<0&&(u=-u),n=u,r=u*c/a);return{x:o+n,y:i+r}},buildLayerMatrix:function(e){var t=r.map(r.range(a(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},normalizeRanks:function(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank})));r.forEach(e.nodes(),(function(n){var o=e.node(n);r.has(o,"rank")&&(o.rank-=t)}))},removeEmptyRanks:function(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank}))),n=[];r.forEach(e.nodes(),(function(r){var 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}))}))},addBorderNode:function(e,t,n,r){var o={width:0,height:0};arguments.length>=4&&(o.rank=n,o.order=r);return i(e,"border",o,t)},maxRank:a,partition:function(e,t){var n={lhs:[],rhs:[]};return r.forEach(e,(function(e){t(e)?n.lhs.push(e):n.rhs.push(e)})),n},time:function(e,t){var n=r.now();try{return t()}finally{console.log(e+" time: "+(r.now()-n)+"ms")}},notime:function(e,t){return t()}}},1078:function(e,t,n){var r;try{r={clone:n(1246),constant:n(1142),each:n(1189),filter:n(1192),has:n(35),isArray:n(177),isEmpty:n(63),isFunction:n(351),isUndefined:n(1201),keys:n(1098),map:n(1202),reduce:n(1204),size:n(1289),transform:n(1294),union:n(1295),values:n(1208)}}catch(e){}r||(r=window._),e.exports=r},1083:function(e,t,n){var r;try{r=n(1244)}catch(e){}r||(r=window.graphlib),e.exports=r},1090:function(e,t,n){var r=n(1272),o=n(1282),i=n(1103),a=n(177),c=n(1285);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):r(e):c(e)}},1098:function(e,t,n){var r=n(1177),o=n(560),i=n(542);e.exports=function(e){return i(e)?r(e):o(e)}},1102:function(e,t,n){var r=n(1177),o=n(1255),i=n(542);e.exports=function(e){return i(e)?r(e,!0):o(e)}},1103:function(e,t){e.exports=function(e){return e}},1112:function(e,t,n){var r=n(1119),o=n(1120);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var c=-1,u=t.length;++ca){var c=i;i=a,a=c}return i+""+a+""+(r.isUndefined(o)?"\0":o)}function u(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}var c={v:o,w:i};return r&&(c.name=r),c}function s(e,t){return c(e,t.v,t.w,t.name)}o.prototype._nodeCount=0,o.prototype._edgeCount=0,o.prototype.isDirected=function(){return this._isDirected},o.prototype.isMultigraph=function(){return this._isMultigraph},o.prototype.isCompound=function(){return this._isCompound},o.prototype.setGraph=function(e){return this._label=e,this},o.prototype.graph=function(){return this._label},o.prototype.setDefaultNodeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultNodeLabelFn=e,this},o.prototype.nodeCount=function(){return this._nodeCount},o.prototype.nodes=function(){return r.keys(this._nodes)},o.prototype.sources=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._in[t])}))},o.prototype.sinks=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._out[t])}))},o.prototype.setNodes=function(e,t){var n=arguments,o=this;return r.each(e,(function(e){n.length>1?o.setNode(e,t):o.setNode(e)})),this},o.prototype.setNode=function(e,t){return r.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},o.prototype.node=function(e){return this._nodes[e]},o.prototype.hasNode=function(e){return r.has(this._nodes,e)},o.prototype.removeNode=function(e){var t=this;if(r.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],r.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),r.each(r.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],r.each(r.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},o.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(t))t="\0";else{for(var n=t+="";!r.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},o.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},o.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if("\0"!==t)return t}},o.prototype.children=function(e){if(r.isUndefined(e)&&(e="\0"),this._isCompound){var t=this._children[e];if(t)return r.keys(t)}else{if("\0"===e)return this.nodes();if(this.hasNode(e))return[]}},o.prototype.predecessors=function(e){var t=this._preds[e];if(t)return r.keys(t)},o.prototype.successors=function(e){var t=this._sucs[e];if(t)return r.keys(t)},o.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return r.union(t,this.successors(e))},o.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},o.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){e(r)&&t.setNode(r,n)})),r.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var o={};return this._isCompound&&r.each(t.nodes(),(function(e){t.setParent(e,function e(r){var i=n.parent(r);return void 0===i||t.hasNode(i)?(o[r]=i,i):i in o?o[i]:e(i)}(e))})),t},o.prototype.setDefaultEdgeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultEdgeLabelFn=e,this},o.prototype.edgeCount=function(){return this._edgeCount},o.prototype.edges=function(){return r.values(this._edgeObjs)},o.prototype.setPath=function(e,t){var n=this,o=arguments;return r.reduce(e,(function(e,r){return o.length>1?n.setEdge(e,r,t):n.setEdge(e,r),r})),this},o.prototype.setEdge=function(){var e,t,n,o,a=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(e=s.v,t=s.w,n=s.name,2===arguments.length&&(o=arguments[1],a=!0)):(e=s,t=arguments[1],n=arguments[3],arguments.length>2&&(o=arguments[2],a=!0)),e=""+e,t=""+t,r.isUndefined(n)||(n=""+n);var l=c(this._isDirected,e,t,n);if(r.has(this._edgeLabels,l))return a&&(this._edgeLabels[l]=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[l]=a?o:this._defaultEdgeLabelFn(e,t,n);var f=u(this._isDirected,e,t,n);return e=f.v,t=f.w,Object.freeze(f),this._edgeObjs[l]=f,i(this._preds[t],e),i(this._sucs[e],t),this._in[t][l]=f,this._out[e][l]=f,this._edgeCount++,this},o.prototype.edge=function(e,t,n){var r=1===arguments.length?s(this._isDirected,arguments[0]):c(this._isDirected,e,t,n);return this._edgeLabels[r]},o.prototype.hasEdge=function(e,t,n){var o=1===arguments.length?s(this._isDirected,arguments[0]):c(this._isDirected,e,t,n);return r.has(this._edgeLabels,o)},o.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?s(this._isDirected,arguments[0]):c(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],a(this._preds[t],e),a(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},o.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var o=r.values(n);return t?r.filter(o,(function(e){return e.v===t})):o}},o.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}},o.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},1138:function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n0&&i(l)?n>1?e(l,n-1,i,a,c):r(c,l):a||(c[c.length]=l)}return c}},1147:function(e,t,n){var r=n(202);e.exports=function(e,t,n){for(var o=-1,i=e.length;++ol))return!1;var d=u.get(e),p=u.get(t);if(d&&p)return d==t&&p==e;var h=-1,v=!0,g=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++h0&&(i=u.removeMin(),(a=c[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(s);return c}(e,String(t),n||i,r||function(t){return e.outEdges(t)})};var i=r.constant(1)},1210:function(e,t,n){var r=n(1078);function o(){this._arr=[],this._keyIndices={}}e.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>1].priority0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},1300:function(e,t,n){var r=n(1195),o=n(1301),i=n(1302),a=n(1196),c=n(1303),u=n(1145);e.exports=function(e,t,n){var s=-1,l=o,f=e.length,d=!0,p=[],h=p;if(n)d=!1,l=i;else if(f>=200){var v=t?null:c(e);if(v)return u(v);d=!1,l=a,h=new r}else h=t?[]:p;e:for(;++s-1}},1302:function(e,t){e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r1||1===t.length&&e.hasEdge(t[0],t[0])}))}},1312:function(e,t,n){var r=n(1078);e.exports=function(e,t,n){return function(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],c=r.distance+o.distance;c0;){if(n=u.removeMin(),r.has(c,n))a.setEdge(n,c[n]);else{if(l)throw new Error("Input graph is not connected: "+e);l=!0}e.nodeEdges(n).forEach(s)}return a}},1317:function(e,t,n){"use strict";var r=n(1064),o=n(1353),i=n(1356),a=n(1357),c=n(1071).normalizeRanks,u=n(1359),s=n(1071).removeEmptyRanks,l=n(1360),f=n(1361),d=n(1362),p=n(1363),h=n(1372),v=n(1071),g=n(1083).Graph;e.exports=function(e,t){var n=t&&t.debugTiming?v.time:v.notime;n("layout",(function(){var t=n(" buildLayoutGraph",(function(){return function(e){var t=new g({multigraph:!0,compound:!0}),n=j(e.graph());return t.setGraph(r.merge({},y,S(n,m),r.pick(n,b))),r.forEach(e.nodes(),(function(n){var o=j(e.node(n));t.setNode(n,r.defaults(S(o,w),_)),t.setParent(n,e.parent(n))})),r.forEach(e.edges(),(function(n){var o=j(e.edge(n));t.setEdge(n,r.merge({},x,S(o,E),r.pick(o,O)))})),t}(e)}));n(" runLayout",(function(){!function(e,t){t(" makeSpaceForEdgeLabels",(function(){!function(e){var t=e.graph();t.ranksep/=2,r.forEach(e.edges(),(function(n){var r=e.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(e)})),t(" removeSelfEdges",(function(){!function(e){r.forEach(e.edges(),(function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}}))}(e)})),t(" acyclic",(function(){o.run(e)})),t(" nestingGraph.run",(function(){l.run(e)})),t(" rank",(function(){a(v.asNonCompoundGraph(e))})),t(" injectEdgeLabelProxies",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),o={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};v.addDummyNode(e,"edge-proxy",o,"_ep")}}))}(e)})),t(" removeEmptyRanks",(function(){s(e)})),t(" nestingGraph.cleanup",(function(){l.cleanup(e)})),t(" normalizeRanks",(function(){c(e)})),t(" assignRankMinMax",(function(){!function(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}(e)})),t(" removeEdgeLabelProxies",(function(){!function(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))}))}(e)})),t(" normalize.run",(function(){i.run(e)})),t(" parentDummyChains",(function(){u(e)})),t(" addBorderSegments",(function(){f(e)})),t(" order",(function(){p(e)})),t(" insertSelfEdges",(function(){!function(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}))}))}(e)})),t(" adjustCoordinateSystem",(function(){d.adjust(e)})),t(" position",(function(){h(e)})),t(" positionSelfEdges",(function(){!function(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);if("selfedge"===n.dummy){var r=e.node(n.e.v),o=r.x+r.width/2,i=r.y,a=n.x-o,c=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:o+2*a/3,y:i-c},{x:o+5*a/6,y:i-c},{x:o+a,y:i},{x:o+5*a/6,y:i+c},{x:o+2*a/3,y:i+c}],n.label.x=n.x,n.label.y=n.y}}))}(e)})),t(" removeBorderNodes",(function(){!function(e){r.forEach(e.nodes(),(function(t){if(e.children(t).length){var n=e.node(t),o=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(r.last(n.borderLeft)),c=e.node(r.last(n.borderRight));n.width=Math.abs(c.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)}))}(e)})),t(" normalize.undo",(function(){i.undo(e)})),t(" fixupEdgeLabelCoords",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(e)})),t(" undoCoordinateSystem",(function(){d.undo(e)})),t(" translateGraph",(function(){!function(e){var t=Number.POSITIVE_INFINITY,n=0,o=Number.POSITIVE_INFINITY,i=0,a=e.graph(),c=a.marginx||0,u=a.marginy||0;function s(e){var r=e.x,a=e.y,c=e.width,u=e.height;t=Math.min(t,r-c/2),n=Math.max(n,r+c/2),o=Math.min(o,a-u/2),i=Math.max(i,a+u/2)}r.forEach(e.nodes(),(function(t){s(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.has(n,"x")&&s(n)})),t-=c,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+c,a.height=i-o+u}(e)})),t(" assignNodeIntersects",(function(){!function(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))}))}(e)})),t(" reversePoints",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);n.reversed&&n.points.reverse()}))}(e)})),t(" acyclic.undo",(function(){o.undo(e)}))}(t,n)})),n(" updateInputGraph",(function(){!function(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}(e,t)}))}))};var m=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],w=["width","height"],_={width:0,height:0},E=["minlen","weight","width","height","labeloffset"],x={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},O=["labelpos"];function S(e,t){return r.mapValues(r.pick(e,t),Number)}function j(e){var t={};return r.forEach(e,(function(e,n){t[n.toLowerCase()]=e})),t}},1318:function(e,t,n){var r=n(1175);e.exports=function(e){return r(e,5)}},1319:function(e,t,n){var r=n(1124),o=n(543),i=n(1125),a=n(1102),c=Object.prototype,u=c.hasOwnProperty,s=r((function(e,t){e=Object(e);var n=-1,r=t.length,s=r>2?t[2]:void 0;for(s&&i(t[0],t[1],s)&&(r=1);++n-1?c[u?t[s]:s]:void 0}}},1322:function(e,t,n){var r=n(1070),o=n(1090),i=n(1323),a=Math.max;e.exports=function(e,t,n){var c=null==e?0:e.length;if(!c)return-1;var u=null==n?0:i(n);return u<0&&(u=a(c+u,0)),r(e,o(t,3),u)}},1323:function(e,t,n){var r=n(1214);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},1324:function(e,t,n){var r=n(1144),o=n(1191),i=n(1102);e.exports=function(e,t){return null==e?e:r(e,o(t),i)}},1325:function(e,t){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},1326:function(e,t,n){var r=n(1120),o=n(1143),i=n(1090);e.exports=function(e,t){var n={};return t=i(t,3),o(e,(function(e,o,i){r(n,o,t(e,o,i))})),n}},1327:function(e,t,n){var r=n(1147),o=n(1328),i=n(1103);e.exports=function(e){return e&&e.length?r(e,i,o):void 0}},1328:function(e,t){e.exports=function(e,t){return e>t}},1329:function(e,t,n){var r=n(1330),o=n(1334)((function(e,t,n){r(e,t,n)}));e.exports=o},1330:function(e,t,n){var r=n(1118),o=n(1216),i=n(1144),a=n(1331),c=n(178),u=n(1102),s=n(1217);e.exports=function e(t,n,l,f,d){t!==n&&i(n,(function(i,u){if(d||(d=new r),c(i))a(t,n,u,l,e,f,d);else{var p=f?f(s(t,u),i,u+"",t,n,d):void 0;void 0===p&&(p=i),o(t,u,p)}}),u)}},1331:function(e,t,n){var r=n(1216),o=n(1178),i=n(1186),a=n(1179),c=n(1187),u=n(352),s=n(177),l=n(1207),f=n(545),d=n(351),p=n(178),h=n(1332),v=n(547),g=n(1217),m=n(1333);e.exports=function(e,t,n,y,b,w,_){var E=g(e,n),x=g(t,n),O=_.get(x);if(O)r(e,n,O);else{var S=w?w(E,x,n+"",e,t,_):void 0,j=void 0===S;if(j){var N=s(x),M=!N&&f(x),C=!N&&!M&&v(x);S=x,N||M||C?s(E)?S=E:l(E)?S=a(E):M?(j=!1,S=o(x,!0)):C?(j=!1,S=i(x,!0)):S=[]:h(x)||u(x)?(S=E,u(E)?S=m(E):p(E)&&!d(E)||(S=c(x))):j=!1}j&&(_.set(x,S),b(S,x,y,w,_),_.delete(x)),r(e,n,S)}}},1332:function(e,t,n){var r=n(180),o=n(1121),i=n(198),a=Function.prototype,c=Object.prototype,u=a.toString,s=c.hasOwnProperty,l=u.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=s.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==l}},1333:function(e,t,n){var r=n(1112),o=n(1102);e.exports=function(e){return r(e,o(e))}},1334:function(e,t,n){var r=n(1124),o=n(1125);e.exports=function(e){return r((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,c=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,c&&o(n[0],n[1],c)&&(a=i<3?void 0:a,i=1),t=Object(t);++r1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),o(e,r(t,1),[])}));e.exports=c},1346:function(e,t,n){var r=n(552),o=n(1123),i=n(1090),a=n(1203),c=n(1347),u=n(554),s=n(1348),l=n(1103),f=n(177);e.exports=function(e,t,n){t=t.length?r(t,(function(e){return f(e)?function(t){return o(t,1===e.length?e[0]:e)}:e})):[l];var d=-1;t=r(t,u(i));var p=a(e,(function(e,n,o){return{criteria:r(t,(function(t){return t(e)})),index:++d,value:e}}));return c(p,(function(e,t){return s(e,t,n)}))}},1347:function(e,t){e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},1348:function(e,t,n){var r=n(1349);e.exports=function(e,t,n){for(var o=-1,i=e.criteria,a=t.criteria,c=i.length,u=n.length;++o=u?s:s*("desc"==n[o]?-1:1)}return e.index-t.index}},1349:function(e,t,n){var r=n(202);e.exports=function(e,t){if(e!==t){var n=void 0!==e,o=null===e,i=e==e,a=r(e),c=void 0!==t,u=null===t,s=t==t,l=r(t);if(!u&&!l&&!a&&e>t||a&&c&&s&&!u&&!l||o&&c&&s||!n&&s||!i)return 1;if(!o&&!a&&!l&&e0;--u)if(r=t[u].dequeue()){o=o.concat(c(e,t,n,r,!0));break}}return o}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(s,(function(t){return e.outEdges(t.v,t.w)})),!0)};var a=r.constant(1);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),c=e.node(r.v);i&&a.push({v:r.v,w:r.w}),c.out-=o,u(t,n,c)})),r.forEach(e.outEdges(o.v),(function(r){var o=e.edge(r),i=r.w,a=e.node(i);a.in-=o,u(t,n,a)})),e.removeNode(o.v),a}function u(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)}},1355:function(e,t){function n(){var e={};e._next=e._prev=e,this._sentinel=e}function r(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function o(e,t){if("_next"!==e&&"_prev"!==e)return t}e.exports=n,n.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return r(t),t},n.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&r(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},n.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,o)),n=n._prev;return"["+e.join(", ")+"]"}},1356:function(e,t,n){"use strict";var r=n(1064),o=n(1071);e.exports={run:function(e){e.graph().dummyChains=[],r.forEach(e.edges(),(function(t){!function(e,t){var n,r,i,a=t.v,c=e.node(a).rank,u=t.w,s=e.node(u).rank,l=t.name,f=e.edge(t),d=f.labelRank;if(s===c+1)return;for(e.removeEdge(t),i=0,++c;cu.lim&&(s=u,l=!0);var f=r.filter(t.edges(),(function(t){return l===y(e,e.node(t.v),s)&&l!==y(e,e.node(t.w),s)}));return r.minBy(f,(function(e){return i(t,e)}))}function m(e,t,n,o){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(o.v,o.w,{}),p(e),f(e,t),function(e,t){var n=r.find(e.nodes(),(function(e){return!t.node(e).parent})),o=c(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)}))}(e,t)}function y(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}e.exports=l,l.initLowLimValues=p,l.initCutValues=f,l.calcCutValue=d,l.leaveEdge=v,l.enterEdge=g,l.exchangeEdges=m},1359:function(e,t,n){var r=n(1064);e.exports=function(e){var t=function(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}(e);r.forEach(e.graph().dummyChains,(function(n){for(var r=e.node(n),o=r.edgeObj,i=function(e,t,n,r){var o,i,a=[],c=[],u=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim);o=n;do{o=e.parent(o),a.push(o)}while(o&&(t[o].low>u||s>t[o].lim));i=o,o=r;for(;(o=e.parent(o))!==i;)c.push(o);return{path:a.concat(c.reverse()),lca:i}}(e,t,o.v,o.w),a=i.path,c=i.lca,u=0,s=a[u],l=!0;n!==o.w;){if(r=e.node(n),l){for(;(s=a[u])!==c&&e.node(s).maxRank=2),c=l.buildLayerMatrix(e);var g=i(e,c);g0;)t%2&&(n+=u[t+1]),u[t=t-1>>1]+=e.weight;s+=e.weight*n}))),s}e.exports=function(e,t){for(var n=0,r=1;r=e.barycenter)&&function(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}(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"])}))}(r.filter(n,(function(e){return!e.indegree})))}},1369:function(e,t,n){var r=n(1064),o=n(1071);function i(e,t,n){for(var o;t.length&&(o=r.last(t)).i<=n;)t.pop(),e.push(o.vs),n++;return n}e.exports=function(e,t){var n=o.partition(e,(function(e){return r.has(e,"barycenter")})),a=n.lhs,c=r.sortBy(n.rhs,(function(e){return-e.i})),u=[],s=0,l=0,f=0;a.sort((d=!!t,function(e,t){return e.barycentert.barycenter?1:d?t.i-e.i:e.i-t.i})),f=i(u,c,f),r.forEach(a,(function(e){f+=e.vs.length,u.push(e.vs),s+=e.barycenter*e.weight,l+=e.weight,f=i(u,c,f)}));var d;var p={vs:r.flatten(u,!0)};l&&(p.barycenter=s/l,p.weight=l);return p}},1370:function(e,t,n){var r=n(1064),o=n(1083).Graph;e.exports=function(e,t,n){var i=function(e){var t;for(;e.hasNode(t=r.uniqueId("_root")););return t}(e),a=new o({compound:!0}).setGraph({root:i}).setDefaultNodeLabel((function(t){return e.node(t)}));return r.forEach(e.nodes(),(function(o){var c=e.node(o),u=e.parent(o);(c.rank===t||c.minRank<=t&&t<=c.maxRank)&&(a.setNode(o),a.setParent(o,u||i),r.forEach(e[n](o),(function(t){var n=t.v===o?t.w:t.v,i=a.edge(n,o),c=r.isUndefined(i)?0:i.weight;a.setEdge(n,o,{weight:e.edge(t).weight+c})})),r.has(c,"minRank")&&a.setNode(o,{borderLeft:c.borderLeft[t],borderRight:c.borderRight[t]}))})),a}},1371:function(e,t,n){var r=n(1064);e.exports=function(e,t,n){var o,i={};r.forEach(n,(function(n){for(var r,a,c=e.parent(n);c;){if((r=e.parent(c))?(a=i[r],i[r]=c):(a=o,o=c),a&&a!==c)return void t.setEdge(a,c);c=r}}))}},1372:function(e,t,n){"use strict";var r=n(1064),o=n(1071),i=n(1373).positionX;e.exports=function(e){(function(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}))})(e=o.asNonCompoundGraph(e)),r.forEach(i(e),(function(t,n){e.node(n).x=t}))}},1373:function(e,t,n){"use strict";var r=n(1064),o=n(1083).Graph,i=n(1071);function a(e,t){var n={};return r.reduce(t,(function(t,o){var i=0,a=0,c=t.length,s=r.last(o);return r.forEach(o,(function(t,l){var f=function(e,t){if(e.node(t).dummy)return r.find(e.predecessors(t),(function(t){return e.node(t).dummy}))}(e,t),d=f?e.node(f).order:c;(f||t===s)&&(r.forEach(o.slice(a,l+1),(function(t){r.forEach(e.predecessors(t),(function(r){var o=e.node(r),a=o.order;!(ac)&&u(n,t,s)}))}))}return r.reduce(t,(function(t,n){var i,a=-1,c=0;return r.forEach(n,(function(r,u){if("border"===e.node(r).dummy){var s=e.predecessors(r);s.length&&(i=e.node(s[0]).order,o(n,c,u,a,i),c=u,a=i)}o(n,c,n.length,i,t.length)})),n})),n}function u(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 s(e,t,n){if(t>n){var o=t;t=n,n=o}return r.has(e[t],n)}function l(e,t,n,o){var i={},a={},c={};return r.forEach(t,(function(e){r.forEach(e,(function(e,t){i[e]=e,a[e]=e,c[e]=t}))})),r.forEach(t,(function(e){var t=-1;r.forEach(e,(function(e){var u=o(e);if(u.length)for(var l=((u=r.sortBy(u,(function(e){return c[e]}))).length-1)/2,f=Math.floor(l),d=Math.ceil(l);f<=d;++f){var p=u[f];a[e]===e&&t